Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ad400x: Support for pulsar HDL and STM32 #2105

Merged
merged 16 commits into from
May 31, 2024
Merged

ad400x: Support for pulsar HDL and STM32 #2105

merged 16 commits into from
May 31, 2024

Commits on May 28, 2024

  1. projects: ad400x: Compile fix for Pulsar HDL

    The pulsar HDL now supports the ad400x parts.
    
    Signed-off-by: Axel Haslam <ahaslam@baylibre.com>
    ahaslam2 committed May 28, 2024
    Configuration menu
    Copy the full SHA
    ec63808 View commit details
    Browse the repository at this point in the history
  2. drivers: ad400x: Allow device id with standard spi

    Device id parameter is not set if using standard SPI. We need device
    id to be able to set IIO attributes on the IIO driver.
    
    Signed-off-by: Axel Haslam <ahaslam@baylibre.com>
    ahaslam2 committed May 28, 2024
    Configuration menu
    Copy the full SHA
    7126c02 View commit details
    Browse the repository at this point in the history
  3. drivers: ad400x: Add conversion gpio

    In standard SPI the CNV pin has to toggle before register access
    or getting a conversion result.
    
    Signed-off-by: Axel Haslam <ahaslam@baylibre.com>
    ahaslam2 committed May 28, 2024
    Configuration menu
    Copy the full SHA
    9da6e55 View commit details
    Browse the repository at this point in the history
  4. drivers: ad400x: Add support for more 400x parts

    This adds device id's for more ad400x parts that can use this same
    driver (AD4000, AD4001, AD4002, AD4004, AD4005, AD4006)
    
    Signed-off-by: Axel Haslam <ahaslam@baylibre.com>
    ahaslam2 committed May 28, 2024
    Configuration menu
    Copy the full SHA
    d5d098e View commit details
    Browse the repository at this point in the history
  5. drivers: ad400x: Fix xfer with when offload disabled

    If offload is disabled, the xfer width must be byte aligned. We can
    also simplify the macro wrappers around the set_xfer_width call.
    
    Signed-off-by: Axel Haslam <ahaslam@baylibre.com>
    ahaslam2 committed May 28, 2024
    Configuration menu
    Copy the full SHA
    34598dc View commit details
    Browse the repository at this point in the history
  6. drivers: ad400x: Fix single conversion transfer

    Fixes to get correct data out of 4-wire turbo mode:
    
    - For the chips that support 18 or 20 bit resolution, the least
      significant bits are in the higher nibble of the last byte.
    
    - Sign needs to be taken into consideration when printing the result.
    
    - The SDI line must remain high.
    
    - Move the bit operations that format the data to the project file,
      as we can avoid the performance hit in the IIO case were scan_type
      gives this info to the app for post processing.
    
    Signed-off-by: Axel Haslam <ahaslam@baylibre.com>
    ahaslam2 committed May 28, 2024
    Configuration menu
    Copy the full SHA
    cc7f90f View commit details
    Browse the repository at this point in the history
  7. drivers: ad400x: Add clkgen and pwm

    This adds axi clkgen and pwm to support the pulsar HDL, clkgen will
    ckl the spi_engine and pwm is used as offload trigger.
    
    Signed-off-by: Axel Haslam <ahaslam@baylibre.com>
    ahaslam2 committed May 28, 2024
    Configuration menu
    Copy the full SHA
    6559992 View commit details
    Browse the repository at this point in the history
  8. drivers: ad400x: use a pointer for spi_init parameters

    use a pointer for spi_init parameters, to be consistent accross most
    no-os projects, the parameters are passed by reference.
    
    Signed-off-by: Axel Haslam <ahaslam@baylibre.com>
    ahaslam2 committed May 28, 2024
    Configuration menu
    Copy the full SHA
    cbe4560 View commit details
    Browse the repository at this point in the history
  9. drivers: ad400x: Move offload to driver code

    In preparation for iio and making the projects platform independant,
    move the offload code to the driver so it is simply enabled or not
    by the project code.
    
    Signed-off-by: Axel Haslam <ahaslam@baylibre.com>
    ahaslam2 committed May 28, 2024
    Configuration menu
    Copy the full SHA
    5c2c291 View commit details
    Browse the repository at this point in the history
  10. drivers: ad400x: Add iio driver

    Add initial IIO support for the ad400x driver.
    
    Signed-off-by: Axel Haslam <ahaslam@baylibre.com>
    ahaslam2 committed May 28, 2024
    Configuration menu
    Copy the full SHA
    a75d593 View commit details
    Browse the repository at this point in the history
  11. projects: ad400x-fmcz: Migrate to new folder structure

    This migrates the ad400x project to the multiplatform sructure so
    that we can add stm32 and iio examples
    
    Signed-off-by: Axel Haslam <ahaslam@baylibre.com>
    ahaslam2 committed May 28, 2024
    Configuration menu
    Copy the full SHA
    503079d View commit details
    Browse the repository at this point in the history
  12. projects: ad400x-fmcz: Add iio example project

    This adds the iio example project that makes use of the iio driver
    for the ad400x.
    
    Signed-off-by: Axel Haslam <ahaslam@baylibre.com>
    ahaslam2 committed May 28, 2024
    Configuration menu
    Copy the full SHA
    65efcc8 View commit details
    Browse the repository at this point in the history
  13. projects: ad400x-fmcz: Add stm32 platform

    This adds the stm32 platfrom to the ad400x project. It uses the
    standard spi of the stm32 and was tested using the sdp K1
    development board.
    
    Signed-off-by: Axel Haslam <ahaslam@baylibre.com>
    ahaslam2 committed May 28, 2024
    Configuration menu
    Copy the full SHA
    4d3d2e8 View commit details
    Browse the repository at this point in the history
  14. drivers: ad400x: Add device info structure

    Instead of using separtate tables and exports, add a device info
    structure to hold the per device resolution and sign.
    
    Signed-off-by: Axel Haslam <ahaslam@baylibre.com>
    ahaslam2 committed May 28, 2024
    Configuration menu
    Copy the full SHA
    0ded3d5 View commit details
    Browse the repository at this point in the history
  15. drivers: ad400x: Check for null dev pointer

    The functions are missing a check for null dev pointer.
    This adds the check.
    
    Signed-off-by: Axel Haslam <ahaslam@baylibre.com>
    ahaslam2 committed May 28, 2024
    Configuration menu
    Copy the full SHA
    3a1a883 View commit details
    Browse the repository at this point in the history
  16. projects: ad400x-fmcz: Add README documentation

    This adds the project and driver documentation.
    
    Signed-off-by: Axel Haslam <ahaslam@baylibre.com>
    ahaslam2 committed May 28, 2024
    Configuration menu
    Copy the full SHA
    dcc36cb View commit details
    Browse the repository at this point in the history