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

drivers: adc: iadc_gecko: Use pinctrl and clock control, add bindings #84508

Merged

Conversation

asmellby
Copy link
Contributor

@asmellby asmellby commented Jan 24, 2025

Use pinctrl for ABUS allocation (leveraging #84462), use clock control to enable peripheral clock. Add headers with utility macros for easier configuration of IADC inputs. Enable accuracy test, update api test to use bindings header.

@asmellby asmellby force-pushed the feature/series2-iadc-improvements branch from a7542ca to 15f82f5 Compare January 24, 2025 16:16
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since this driver is only compatible with SiSDK/Series-2, I suggest to drop "gecko" from its name.

include/zephyr/dt-bindings/adc/silabs/xg24-adc.h Outdated Show resolved Hide resolved
include/zephyr/dt-bindings/adc/silabs/xg21-adc.h Outdated Show resolved Hide resolved
@asmellby asmellby force-pushed the feature/series2-iadc-improvements branch from 15f82f5 to a03fc42 Compare January 25, 2025 09:52
Copy link
Contributor

@jerome-pouiller jerome-pouiller left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I still suggest to remove "gecko" from the name. But this is not a blocker.

@asmellby asmellby force-pushed the feature/series2-iadc-improvements branch from a03fc42 to 87cbe14 Compare January 31, 2025 08:13
jhedberg
jhedberg previously approved these changes Jan 31, 2025
anangl
anangl previously approved these changes Feb 3, 2025
@jhedberg
Copy link
Member

jhedberg commented Feb 3, 2025

@asmellby this has some merge conflicts

Make use of ABUS support in the pinctrl driver to allocate
analog buses, rather than hard-coding bus 0 in the ADC driver.

Signed-off-by: Aksel Skauge Mellbye <[email protected]>
Use clock control driver instead of hard-coding HAL function calls
to configure clocks.

Signed-off-by: Aksel Skauge Mellbye <[email protected]>
Add macros for use in devicetree to configure IADC on Silabs
Series 2 devices.

Signed-off-by: Aksel Skauge Mellbye <[email protected]>
Add overlays for xg24_dk2601b and xg27_dk2602a for the accuracy test.
Update the api test to use named macros for readability.

Signed-off-by: Aksel Skauge Mellbye <[email protected]>
Add support for xg24_rb4187c to the ADC sample app. Configure two
channels, one measuring the AVDD supply against the 1.21V bandgap
reference, and one measuring pin PB1 (wired to button 0) against
the AVDD (VDDX) reference.

Signed-off-by: Aksel Skauge Mellbye <[email protected]>
@asmellby asmellby dismissed stale reviews from anangl, jhedberg, and jerome-pouiller via 0c7ddfe February 3, 2025 12:01
@asmellby asmellby force-pushed the feature/series2-iadc-improvements branch from 87cbe14 to 0c7ddfe Compare February 3, 2025 12:01
@kartben kartben merged commit bb38100 into zephyrproject-rtos:main Feb 3, 2025
26 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: ADC Analog-to-Digital Converter (ADC) area: Pinctrl area: Samples Samples platform: Silabs Silicon Labs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants