[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250903102756.1748596-2-daniel.lezcano@linaro.org>
Date: Wed, 3 Sep 2025 12:27:55 +0200
From: Daniel Lezcano <daniel.lezcano@...aro.org>
To: jic23@...nel.org,
dlechner@...libre.com,
nuno.sa@...log.com,
andy@...nel.org,
robh@...nel.org,
conor+dt@...nel.org,
krzk+dt@...nel.org
Cc: linux-iio@...r.kernel.org,
s32@....com,
linux-kernel@...r.kernel.org,
devicetree@...r.kernel.org,
chester62515@...il.com,
mbrugger@...e.com,
ghennadi.procopciuc@....nxp.com
Subject: [PATCH v1 1/2] dt-bindings: iio: adc: Add the NXP SAR ADC for s32g2/3 platforms
The s32g2 and s32g3 NXP platforms have two instances of a Successive
Approximation Register ADC. It supports the raw, trigger and scan
modes which involves the DMA. Add their descriptions.
Signed-off-by: Daniel Lezcano <daniel.lezcano@...aro.org>
---
.../bindings/iio/adc/nxp,s32g2-sar-adc.yaml | 68 +++++++++++++++++++
1 file changed, 68 insertions(+)
create mode 100644 Documentation/devicetree/bindings/iio/adc/nxp,s32g2-sar-adc.yaml
diff --git a/Documentation/devicetree/bindings/iio/adc/nxp,s32g2-sar-adc.yaml b/Documentation/devicetree/bindings/iio/adc/nxp,s32g2-sar-adc.yaml
new file mode 100644
index 000000000000..dc6ec240f816
--- /dev/null
+++ b/Documentation/devicetree/bindings/iio/adc/nxp,s32g2-sar-adc.yaml
@@ -0,0 +1,68 @@
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/iio/adc/nxp,s32g2-sar-adc.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: NXP Successive Approximation ADC
+
+description:
+ The NXP SAR ADC provides fast and accurate analog-to-digital
+ conversion using the Successive Approximation Register (SAR) method.
+ It has 12-bit resolution with 8 input channels. Conversions can be
+ launched in software or using hardware triggers. It supports
+ continuous and one-shot modes with separate registers.
+
+maintainers:
+ - Daniel Lezcano <daniel.lezcano@...nel.org>
+
+properties:
+ compatible:
+ oneOf:
+ - const: nxp,s32g2-sar-adc
+ - items:
+ - const: nxp,s32g3-sar-adc
+ - const: nxp,s32g2-sar-adc
+
+ reg:
+ maxItems: 1
+
+ interrupts:
+ maxItems: 1
+
+ clocks:
+ minItems: 1
+
+ clock-names:
+ minItems: 1
+
+ dmas:
+ minItems: 1
+
+ dma-names:
+ const: rx
+
+required:
+ - compatible
+ - reg
+ - interrupts
+ - clocks
+ - clock-names
+ - dmas
+ - dma-names
+
+additionalProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/interrupt-controller/arm-gic.h>
+
+ adc@...f8000 {
+ compatible = "nxp,s32g2-sar-adc";
+ reg = <0x401f8000 0x1000>;
+ interrupts = <GIC_SPI 70 IRQ_TYPE_LEVEL_HIGH>;
+ clocks = <&clks 0x41>;
+ clock-names = "adc";
+ dmas = <&edma0 0 32>;
+ dma-names = "rx";
+ };
--
2.43.0
Powered by blists - more mailing lists