dts: infineon: psc3m5 devicetree changes to support HPPASS ADC
* Separates HPPASS and HPPASS SAR ADC in the device tree
* Makes HPPASS SAR ADC a child of the HPPASS system to reflect hardware
architecture.
* Adds binding files for HPPASS SAR ADC driver.
Signed-off-by: John Batch <john.batch@infineon.com>
diff --git a/dts/arm/infineon/cat1b/psc3/psc3.dtsi b/dts/arm/infineon/cat1b/psc3/psc3.dtsi
index 4fd0e44..e5841ca 100644
--- a/dts/arm/infineon/cat1b/psc3/psc3.dtsi
+++ b/dts/arm/infineon/cat1b/psc3/psc3.dtsi
@@ -128,12 +128,20 @@
#gpio-cells = <2>;
};
- adc0: adc@42b70000 {
- compatible = "infineon,adc-hppass-saradc";
- reg = <0x42b70000 0x10000>;
- interrupts = <109 4>;
- status = "disabled";
- #io-channel-cells = <1>;
+ hppass_analog0: analog@42b00000 {
+ reg = <0x42b00000 0x100000>;
+ #address-cells = <1>;
+ #size-cells = <1>;
+ ranges;
+
+ adc0: adc@70000 {
+ compatible = "infineon,hppass-sar-adc";
+ /* Offset within HPPASS analog region => 0x42b70000 physical */
+ reg = <0x00070000 0x10000>;
+ interrupts = <109 4>;
+ status = "disabled";
+ #io-channel-cells = <1>;
+ };
};
ipc0: ipc@421d0000 {
diff --git a/dts/arm/infineon/cat1b/psc3/psc3_s.dtsi b/dts/arm/infineon/cat1b/psc3/psc3_s.dtsi
index 22ad185..ac013a8 100644
--- a/dts/arm/infineon/cat1b/psc3/psc3_s.dtsi
+++ b/dts/arm/infineon/cat1b/psc3/psc3_s.dtsi
@@ -128,12 +128,20 @@
#gpio-cells = <2>;
};
- adc0: adc@52b70000 {
- compatible = "infineon,adc-hppass-saradc";
- reg = <0x52b70000 0x10000>;
- interrupts = <109 4>;
- status = "disabled";
- #io-channel-cells = <1>;
+ hppass_analog0: analog@52b00000 {
+ reg = <0x52b00000 0x100000>;
+ #address-cells = <1>;
+ #size-cells = <1>;
+ ranges;
+
+ adc0: adc@70000 {
+ compatible = "infineon,hppass-sar-adc";
+ /* Offset within HPPASS analog region */
+ reg = <0x00070000 0x10000>;
+ interrupts = <109 4>;
+ status = "disabled";
+ #io-channel-cells = <1>;
+ };
};
ipc0: ipc@521d0000 {
diff --git a/dts/bindings/adc/infineon,hppass-sar-adc.yaml b/dts/bindings/adc/infineon,hppass-sar-adc.yaml
new file mode 100644
index 0000000..7e073d8
--- /dev/null
+++ b/dts/bindings/adc/infineon,hppass-sar-adc.yaml
@@ -0,0 +1,77 @@
+# Copyright (c) 2025 Infineon Technologies AG,
+# or an affiliate of Infineon Technologies AG.
+#
+# SPDX-License-Identifier: Apache-2.0
+
+title: PSOC C3 HPPASS SAR ADC
+
+description: |
+ Infineon PSOC C3 HPPASS SAR ADC
+
+ The HPPASS (High Performance Programmable Analog Sub-System) SAR ADC
+ provides high-resolution analog-to-digital conversion capabilities
+ for the PSOC C3 family of microcontrollers.
+
+ Each ADC channel corresponds to a dedicated analog input pin, except for
+ the last four sampler inputs which are muxed. See the device datasheet for
+ pin assignments and mux options.
+
+ Dependency: This ADC node must be a child of the HPPASS analog subsystem
+ node ("infineon,hppass-analog"), which provides clock, power, and reference
+ resources.
+
+compatible: "infineon,hppass-sar-adc"
+
+include: adc-controller.yaml
+
+properties:
+ reg:
+ required: true
+ description: Base address of the HPPASS SAR ADC registers
+
+ interrupts:
+ required: true
+ description: Interrupt configuration for the HPPASS SAR ADC
+
+ "#io-channel-cells":
+ const: 1
+ description: Number of cells in an io-channel specifier
+
+ clock-frequency:
+ type: int
+ description: |
+ ADC clock frequency in Hz. If not specified, the driver will use
+ the default clock configuration.
+
+ vref-mv:
+ type: int
+ default: 3300
+ description: |
+ Internal reference voltage in millivolts.
+
+ offset-cal:
+ type: boolean
+ description:
+ Enables Self-Calibration for offset correction within the ADC. If left disabled,
+ the factory calibration for offset correction will be used.
+
+ gain-cal:
+ type: boolean
+ description: |
+ Enables Self-Calibration for gain within the ADC. If left disabled,
+ the factory calibration for gain will be used.
+
+ linear-cal:
+ type: boolean
+ description: |
+ Enables Self-Calibration for linearity correction within the ADC. If left disabled,
+ the factory calibration for linearity will be used.
+
+ ref-internal-source:
+ type: boolean
+ description: |
+ Selects whether the ADC uses internal (true) or external (false) reference.
+ External reference recommended for best performance.
+
+io-channel-cells:
+ - input
diff --git a/modules/hal_infineon/CMakeLists.txt b/modules/hal_infineon/CMakeLists.txt
index dd400d5..ac5eb53 100644
--- a/modules/hal_infineon/CMakeLists.txt
+++ b/modules/hal_infineon/CMakeLists.txt
@@ -70,6 +70,10 @@
add_subdirectory(mtb-dsl-pse8xxgp)
endif()
+if(CONFIG_SOC_SERIES_PSC3)
+ add_subdirectory(zephyr-ifx-cycfg)
+endif()
+
## Add Wi-Fi assets for AIROC devices
if (CONFIG_WIFI_AIROC)
add_subdirectory(whd-expansion)
diff --git a/modules/hal_infineon/Kconfig b/modules/hal_infineon/Kconfig
index 2b54d74..dd6a637 100644
--- a/modules/hal_infineon/Kconfig
+++ b/modules/hal_infineon/Kconfig
@@ -14,10 +14,20 @@
help
Enable Analog-to-Digital Converter (ADC) HAL module driver for Infineon devices
+config USE_INFINEON_HPPASS_SAR_ADC
+ bool
+ help
+ Enable Infineon HPPASS SAR ADC PDL library support
+
+config USE_INFINEON_HPPASS_ANALOG
+ bool
+ help
+ Enable Infineon HPPASS Analog PDL library support
+
config USE_INFINEON_DMA
bool
help
- Enable ADC HAL module driver for Infineon devices
+ Enable DMA HAL module driver for Infineon devices
config USE_INFINEON_I2C
bool
diff --git a/modules/hal_infineon/mtb-pdl-cat1/CMakeLists.txt b/modules/hal_infineon/mtb-pdl-cat1/CMakeLists.txt
index bbe29ce..feaa7d8 100644
--- a/modules/hal_infineon/mtb-pdl-cat1/CMakeLists.txt
+++ b/modules/hal_infineon/mtb-pdl-cat1/CMakeLists.txt
@@ -56,6 +56,11 @@
zephyr_library_sources_ifdef(CONFIG_USE_INFINEON_ADC ${pdl_drv_dir}/source/cy_sar.c)
endif()
+zephyr_library_sources_ifdef(CONFIG_USE_INFINEON_HPPASS_SAR_ADC ${pdl_drv_dir}/source/cy_hppass_sar.c)
+zephyr_library_sources_ifdef(CONFIG_USE_INFINEON_HPPASS_SAR_ADC ${pdl_drv_dir}/source/cy_hppass.c)
+zephyr_library_sources_ifdef(CONFIG_USE_INFINEON_HPPASS_SAR_ADC ${pdl_drv_dir}/source/cy_hppass_csg.c)
+zephyr_library_sources_ifdef(CONFIG_USE_INFINEON_HPPASS_SAR_ADC ${pdl_drv_dir}/source/cy_hppass_ac.c)
+
if(CONFIG_USE_INFINEON_TRNG)
zephyr_library_sources(${pdl_drv_dir}/source/cy_crypto.c)
zephyr_library_sources(${pdl_drv_dir}/source/cy_crypto_core_trng_v1.c)
diff --git a/modules/hal_infineon/zephyr-ifx-cycfg/CMakeLists.txt b/modules/hal_infineon/zephyr-ifx-cycfg/CMakeLists.txt
index 7884d5d..1af8acc 100644
--- a/modules/hal_infineon/zephyr-ifx-cycfg/CMakeLists.txt
+++ b/modules/hal_infineon/zephyr-ifx-cycfg/CMakeLists.txt
@@ -9,3 +9,11 @@
zephyr_include_directories(${zephyr_ifx_cycfg_dir})
zephyr_library_sources(${zephyr_ifx_cycfg_dir}/cycfg_qspi_memslot.c)
endif()
+
+if(CONFIG_SOC_SERIES_PSC3)
+ set(zephyr_ifx_cycfg_dir ${ZEPHYR_HAL_INFINEON_MODULE_DIR}/zephyr-ifx-cycfg/soc_psc3)
+
+ zephyr_include_directories(${zephyr_ifx_cycfg_dir})
+ zephyr_library_sources(${zephyr_ifx_cycfg_dir}/ifx_hppass_analog.c)
+ zephyr_library_sources(${zephyr_ifx_cycfg_dir}/ifx_cycfg_init.c)
+endif()