Commit graph

808 commits

Author SHA1 Message Date
Manuel Argüelles
2f7402d14a dts: bindings: rename nxp,kinetis-adc12 compatible
Rename "nxp,kinetis-adc12" compatible to "nxp,adc12" to remove the
device family from its name.

Signed-off-by: Manuel Argüelles <manuel.arguelles@nxp.com>
2024-12-03 19:55:50 +01:00
McAtee Maxwell
3024392d35 SOC: Remove config PINCTRL from xmc4xxx soc
- Move selection of CONFIG_PINCTRL from soc to individual
	  drivers
	- in accordance with issue #78619

Signed-off-by: McAtee Maxwell <maxwell.mcatee@infineon.com>
2024-12-02 22:05:16 +00:00
Pieter De Gendt
8442b6a83f drivers: adc: Place API into iterable section
Move all adc driver api structs into an iterable section, this allows us
to verify if an api pointer is located in compatible linker section.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2024-11-29 14:50:40 +01:00
Pieter De Gendt
b6253be8e1 drivers: adc: adc_emul: const API structure
Do not update the ref_internal value in the API structure.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2024-11-29 14:50:40 +01:00
Gerard Marull-Paretas
4f6de0169c drivers: microchip xec: select PINCTRL
All drivers using the pinctrl API must select the PINCTRL option.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-11-29 05:41:53 +01:00
TOKITA Hiroshi
88149afff7 soc: raspberrypi: Drop PINCTRL from Kconfig.defconfig
The `Kconfig.defconfig` is not good place for put `select PINCTRL`.
Drop `select PINCTL` from `Kconfig.defconfig` and add it at each
driver's Kconfig.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2024-11-25 14:42:01 +01:00
Jeppe Odgaard
c9dc58178a drivers: adc: adc_ad559x: implement double range option
Optionally write to ad559x register bit which increases ADC input range
from 0V to 2 x Vref.

Create an ADC API per instance since the double range option and thus
`ref_internal` is instance specific.

The functionality has been tested via double range DAC and wiring IO1 and
IO3:
```
$ dac setup ad5593dac 1 12
$ adc ad5593adc resolution 12
$ adc ad5593adc channel id 3
$ dac write_value ad5593dac 1 0
$ adc ad5593adc read 3
read: 1
$ dac write_value ad5593dac 1 1024
$ adc ad5593adc read 3
read: 1021
$ dac write_value ad5593dac 1 2048
$ adc ad5593adc read 3
read: 2044
$ dac write_value ad5593dac 1 3072
$ adc ad5593adc read 3
read: 3069
$ dac write_value ad5593dac 1 4095
$ adc ad5593adc read 3
read: 4091
```

Signed-off-by: Jeppe Odgaard <jeppe.odgaard@prevas.dk>
2024-11-25 12:17:00 +01:00
Carles Cufi
e78832034f soc: nordic: Introduce the nRF54L05 and nRF54L10
These two new ICs are variants of the nRF54L15 with different memory
sizes:

- nRF54L05: 500KB RRAM, 96KB RAM
- nRF54L10: 1022KB RRAM, 192KB RAM
- nRF54L15: 1524KB RRAM, 256KB RAM

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2024-11-21 09:26:38 +01:00
cyliang tw
355d032baa boards: nuvoton: numaker: Drop PINCTRL from board defconfig
To remove CONFIG_PINCTRL from board side for numaker boards.
The Drivers using Pinctrl should be turning Pinctrl on
instead of the responsibility of the board.

Fixes #78619

Signed-off-by: cyliang tw <cyliang@nuvoton.com>
2024-11-20 08:23:58 -05:00
Jun Lin
69e85b25fe board: npcx: remove CONFIG_PINCTRL from defconfig of npcx boards
The CONFIG_PINCTRL is removed from the board's defconfig files.
Drivers which use pin control function should add "select PINCTRL"
in their Kconfig files.

Fixes #78619

Signed-off-by: Jun Lin <CHLin56@nuvoton.com>
2024-11-07 08:59:14 -08:00
Thao Luong
c66dcd52db drivers: Select PINCTRL for renesas RA drivers
Select PINCTRL for drivers: adc, i2c, pwm, serial and spi

Signed-off-by: Thao Luong <thao.luong.uw@renesas.com>
2024-11-06 09:59:32 -08:00
Gerson Fernando Budke
0cc8f93e8a soc: atmel: Drop PINCTRL from Kconfig.defconfig
This Kconfig has wrongly been added to defconfig files. It is not the
right place for it. It has never been the right place for it. Drivers
that need it should select the symbol in their Kconfig entries. Drop
PINCTL from Kconfig.defconfig and add proper select at Kconfig.sam*.

Fixes #78619

Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
2024-11-04 13:43:26 -06:00
Gerson Fernando Budke
52d21d7bf0 soc: gd32: Drop PINCTRL from Kconfig.defconfig
This Kconfig has wrongly been added to defconfig files. It is not the
right place for it. It has never been the right place for it. Drivers
that need it should select the symbol in their Kconfig entries. Drop
PINCTL from Kconfig.defconfig and add proper select at Kconfig.gd32.

Fixes #78619

Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
2024-11-04 13:40:42 -06:00
Sylvio Alves
a70741bc82 west.yml: update hal_espressif to latest version
- Update GDMA and ADC drivers and remove deprecated entries.
- Rebased hal_espressif to latest bump sync.
- Added ESP Timer and Radio common config values

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2024-10-27 20:53:48 -05:00
Mathieu Choplain
c86f0ac6f3 drivers: adc: stm32: add STM32WB0 ADC
Add driver for ADC in STM32WB0 series.

Signed-off-by: Mathieu Choplain <mathieu.choplain@st.com>
2024-10-27 01:08:25 +02:00
Grzegorz Swiderski
96f08d53a4 drivers: adc: nrfx_saadc: Use CONFIG_NRF_PLATFORM_HALTIUM
Apply it in a few more locations that were missed in
5a4655f69f.

Signed-off-by: Grzegorz Swiderski <grzegorz.swiderski@nordicsemi.no>
2024-10-24 16:55:44 +01:00
Hao Luo
18dc21b44d drivers: adc: add adc disable to save power
Disables adc once conversion completes and enables
again before sampling

Signed-off-by: Hao Luo <hluo@ambiq.com>
2024-10-21 12:35:28 +02:00
Nikodem Kastelik
ece7da5947 drivers: adc: nrf: add support for nrf54l internal SAADC inputs
SAADC peripheral for nRF54L Series allows to choose internal
voltages as positive inputs.

Signed-off-by: Nikodem Kastelik <nikodem.kastelik@nordicsemi.no>
2024-10-16 09:59:16 +02:00
Nikodem Kastelik
d494769948 dts: nordic: refactor bindings helper symbols for SAADC
Split header files containing symbols denoting SAADC inputs
so that only supported inputs can be used for given device.

Signed-off-by: Nikodem Kastelik <nikodem.kastelik@nordicsemi.no>
2024-10-16 09:59:16 +02:00
Emilio Benavente
82a192c8a9 boards: nxp: Removing CONFIG_PINCTRL from the boards defconfig
The Drivers using Pinctrl should be turning Pinctrl on
this should not be the responsibility of the board. This
commit removes CONFIG_PINCTRL from the boards side for nxp boards.

Signed-off-by: Emilio Benavente <emilio.benavente@nxp.com>
2024-10-15 19:09:45 -04:00
Tim Lin
7fa962589f ITE: it8xxx2: Remove CONFIG_PINCTRL from soc defconfig file
The driver Kconfig determines whether pinctrl is enabled
instead of soc defconfig.

Signed-off-by: Tim Lin <tim2.lin@ite.corp-partner.google.com>
2024-10-15 13:52:55 +02:00
Guillaume Gautier
f4f1b1a365 drivers: adc: stm32: fix clock check for stm32f1
STM32F1 doesn't have synchronous/asynchronous source clock choice.
The recently added clock check was failing compilation for these series.
This commit removes the check for F1.

Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
2024-10-15 04:05:22 -04:00
Bas van Loon
1adb779ba5 drivers: adc: stm32: Implement boost settings for STM32H7.
After boost is implemented and enabled it allows for higher
sampling frequencies.

Signed-off-by: Bas van Loon <bas@arch-embedded.com>
2024-10-09 13:44:54 +02:00
Marcio Ribeiro
b7a4bb3ef9 drivers: adc: esp32: adc2 init code calibration
Add call to adc2_init_code_calibration during adc initialization on esp32s2
and esp32c3

Signed-off-by: Marcio Ribeiro <marcio.ribeiro@espressif.com>
2024-10-09 09:43:58 +02:00
Gerard Marull-Paretas
5a4655f69f drivers: adc: nrfx_saadc: use CONFIG_NRF_PLATFORM_HALTIUM
So that any Haltium based SoC uses the same settings, including nRF54H20
EngB.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-10-07 18:42:14 +02:00
Guillaume Gautier
9566d4ecb5 drivers: adc: stm32: add a check for asynchronous clock source
Add a compile-time check to verify that a domain clock is explicitly
defined if a STM32 ADC is configured to use an asynchronous clock.

Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
2024-10-07 13:40:06 +02:00
Yong Cong Sin
52a202309b zephyr: bulk update to DT_NODE_HAS_STATUS_OKAY
Change instances of:

DT_NODE_HAS_STATUS(<node_id>, okay)

to

DT_NODE_HAS_STATUS_OKAY(<node_id>)

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
Signed-off-by: Yong Cong Sin <yongcong.sin@gmail.com>
2024-10-03 17:06:52 +01:00
Fabrice DJIATSA
bfa6c32e07 divers: adc: update adc driver to integrate stm32u0
add u0 config_soc conditions in adc driver to handle
news peripherals.

Signed-off-by: Fabrice DJIATSA <fabrice.djiatsa-ext@st.com>
2024-09-27 10:55:56 +01:00
TOKITA Hiroshi
a29c27f050 drivers: adc: ads1112: Remove unused variables
Remove unused variables for suppress warnings

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2024-09-26 17:43:52 -04:00
TOKITA Hiroshi
a873c73701 driver: adc: ads1112 Fix missing default y in config ADC_ADS1112
The `default y`, which is coupled with
depends on DT_HAS_TI_ADS1112_ENABLED to link the settings with DeviceTree,
which was missing, so I added it.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2024-09-26 17:43:52 -04:00
Guillaume Gautier
7e160453e2 drivers: adc: stm32: fix stm32u5 extended calibration
Add Data Memory Barrier during the extended calibration of STM32U5, as it
is done in STM32Cube HAL, to avoid sporadic errors during calibration that
may result in measures that are offset from real values.

Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
2024-09-24 10:12:26 +02:00
Michal Smola
1c944ba9ef drivers: adc: adc_mcux_adc16: Remove reference check
Only ADC_REF_INTERNAL reference option is allowed in
adc_mcux_adc16 driver, but the reference is not used
for driver configuration. Internal, external or VDD
can be used in reality depending on SoC type and
its configuration.
Remove the reference option check to allow any reference
option from Devicetree.

Signed-off-by: Michal Smola <michal.smola@nxp.com>
2024-09-23 10:02:10 +02:00
Lucien Zhao
23f58fd3a4 dts: arm: nxp: rt1180: add lpadc modules
Register all the lpi2c instances.

Add no-power-level property and update driver
to adapt no-power-level property.

Signed-off-by: Lucien Zhao <lucien.zhao@nxp.com>
2024-09-19 18:16:04 +01:00
Mathieu Choplain
3328d7cb01 drivers: adc: stm32: don't fail init if pinctrl is not provided
Commit 47187a9ec9 made the `pinctrl` property
of STM32 ADCs optional, to allow usage of internal channels without wasting
GPIO pins. However, the driver was not adapted to support this new usecase.

(The real bug comes from commit 93956b2073,
that transitioned from a custom `stm32_dt_pinctrl_configure` function to
the standard `pinctrl_apply_state`, without accounting for the fact that
the former returns 0 when pinctrl is empty, but the latter returns -ENOENT)

Modify the driver to work even if no `pinctrl` is present on the ADC node.

Signed-off-by: Mathieu Choplain <mathieu.choplain@st.com>
2024-09-16 13:50:42 +02:00
Sylvio Alves
8233b70ece espressif: clean up unused code
Remove all entries that as not being used.
This also update hal to re-enable warning flags
as such as -Wno-unused-variable.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2024-09-09 13:55:39 -04:00
Furkan Akkiz
11a172a610 drivers: adc: Add ADC driver for MAX32xxx MCUs
Added ADC driver for MAX32xxx MCUs

Signed-off-by: Furkan Akkiz <hasanfurkan.akkiz@analog.com>
Co-authored-by: Okan Sahin <okan.sahin@analog.com>
Co-authored-by: Sadik Ozer <sadik.ozer@analog.com>
2024-09-04 21:28:08 +02:00
Erwan Gouriou
d13f9d9b9b drivers: stm32: Select PINCTRL when required
Select PINCTRL subsystem by drivers which require it.
Prevent the need from enabling this symbol at board or soc level.

Signed-off-by: Erwan Gouriou <erwan.gouriou@st.com>
2024-09-03 14:40:55 +01:00
Jordan Yates
ae046fe5ea adc: adc_nrfx_saadc: support ADC_ACQ_TIME_MAX
Support the `ADC_ACQ_TIME_MAX` define in addition to
`ADC_ACQ_TIME_DEFAULT`.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-09-02 12:31:17 -04:00
Marcin Wierzbicki
970638371c drivers: adc: adc_mcux_adc12: add API internal reference
Extend the adc_mcux_adc12 adc api to set the ref_internal to
a value of vref-mv property.

Signed-off-by: Marcin Wierzbicki <marcin.wierzbicki@accenture.com>
2024-08-30 11:47:07 -04:00
Marcin Wierzbicki
53e7a9dd86 drivers: adc: adc_mcux_adc12: enable support for channel>=16 on S32K14X
Enable support for channels >= 16 on devices S32K146 and S32K148.
Channels >= 16 are encoded as 100000b..101111b in SC1[ADCH] field.

Signed-off-by: Marcin Wierzbicki <marcin.wierzbicki@accenture.com>
2024-08-30 11:47:07 -04:00
Richard Wheatley
cb20e865d6 drivers: adc: format ambiq adc driver
run clang-format on ambiq adc driver

Signed-off-by: Richard Wheatley <richard.wheatley@ambiq.com>
2024-08-30 11:46:56 -04:00
Richard Wheatley
8561d0285d drivers: adc: update ambiq adc driver
Update Ambiq adc driver to add apollo4
fixed typ of BUMBER to NUMBER
Move buffer size prio to configuring slots
and enabling the ADC
removed #if defined(CONFIG_PM_DEVICE_RUNTIME)

Signed-off-by: Richard Wheatley <richard.wheatley@ambiq.com>
2024-08-30 11:46:56 -04:00
Ha Duong Quang
77968d4dd8 boards: s32z2xxdc2: add support for adc
Add devicetree of adc instances for s32z270.

Signed-off-by: Ha Duong Quang <ha.duongquang@nxp.com>
2024-08-29 18:04:36 +02:00
Lars Jeppesen
8c3790d9b7 drivers: adc: stm32h5x: Set option register for adc1/channel 0
The STM32H5x adc has a special option register that
needs to be set when using channel 0 on adc1.

fixes: #77618

Signed-off-by: Lars Jeppesen <lje@foss.dk>
2024-08-29 18:03:33 +02:00
Efrain Calderon
40414f72e9 drivers: adc: ads1x1x: add support for RDY pin
Some hardware configuration require rely on the ALERT/RDY
pin to know when and ADC conversion is completed.

The polling thread is left as fallback, when the pin
is not defined.

Signed-off-by: Efrain Calderon <efrain.calderon.estrada@gmail.com>
2024-08-29 15:55:14 +02:00
Fin Maaß
4a6dacf01b drivers: adc: tla2021: seperate thread, only when needed
only use the separate thread, when
CONFIG_ADC_ASYNC is enabled.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2024-08-29 15:52:46 +02:00
Andrey VOLKOV
665da7354b drivers: adc: ra: rename "channels-num" to the more common "channel-count"
The "channels-num" should not be used here, other system's parts are using
"channel-count" instead for the same purpose.

Also property's description has been сorrected.

Signed-off-by: Andrey VOLKOV <andrey.volkov@munic.io>
2024-08-28 14:01:46 -04:00
Andreas Moltumyr
2f1a5ce104 drivers: adc: nrf: Update adc driver to support nRF9280
Expands driver to support nRF9280 similar to nRF54H20 device.

Signed-off-by: Andreas Moltumyr <andreas.moltumyr@nordicsemi.no>
2024-08-22 14:24:38 -04:00
Pisit Sawangvonganan
1bcae0ea9f style: drivers: comply with MISRA C:2012 Rule 15.6
Add missing braces to comply with MISRA C:2012 Rule 15.6 and
also following Zephyr's style guideline.

Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
2024-08-20 10:33:51 +02:00
Thao Luong
4cebe5354f drivers: adc: initialize to add ADC driver
Add minimal ADC driver code for EK-RA8M1 board

Signed-off-by: Duy Phuong Hoang. Nguyen <duy.nguyen.xa@renesas.com>
Signed-off-by: Tri Nguyen <tri.nguyen.wj@bp.renesas.com>
Signed-off-by: Thao Luong <thao.luong.uw@renesas.com>
2024-08-20 10:31:43 +02:00