Skip to contentSkip to conversation

iio: adc: add imx93 adc support

PATCH Superseded [email protected] 3 participants 8 messages Dec 14, 2022 – Dec 19, 2022

Subsystems (4)

v2 of 6 Superseded Latest is v6 →

lore
Share & tools
lore

[email protected]

author maintainer
#0 lore raw

PATCH v2 1/3 iio: adc: add imx93 adc support

From: Haibo Chen <[email protected]>

The ADC in i.mx93 is a total new ADC IP, add a driver to support this ADC.

Currently, only support one shot normal conversion triggered by software. For other mode, will add in future.

---
 MAINTAINERS                 |   4 +-
 drivers/iio/adc/Kconfig     |  10 +
 drivers/iio/adc/Makefile    |   1 +
 drivers/iio/adc/imx93_adc.c | 474 ++++++++++++++++++++++++++++++++++++
 4 files changed, 488 insertions(+), 1 deletion(-)
 create mode 100644 drivers/iio/adc/imx93_adc.c
MAINTAINERS +3 -1
index 3274b6db8be9..786c30bba19a 100644
@@ -15020,14 +15020,16 @@ S:	Maintained
 F:	Documentation/devicetree/bindings/iio/adc/nxp,imx8qxp-adc.yaml
 F:	drivers/iio/adc/imx8qxp-adc.c
 
-NXP i.MX 7D/6SX/6UL AND VF610 ADC DRIVER
+NXP i.MX 7D/6SX/6UL/93 AND VF610 ADC DRIVER
 M:	Haibo Chen <[email protected]>
 L:	[email protected]
 L:	[email protected]
 S:	Maintained
 F:	Documentation/devicetree/bindings/iio/adc/fsl,imx7d-adc.yaml
 F:	Documentation/devicetree/bindings/iio/adc/fsl,vf610-adc.yaml
+F:	Documentation/devicetree/bindings/iio/adc/nxp,imx93-adc.yaml
 F:	drivers/iio/adc/imx7d_adc.c
+F:	drivers/iio/adc/imx93_adc.c
 F:	drivers/iio/adc/vf610_adc.c
 
 NXP PF8100/PF8121A/PF8200 PMIC REGULATOR DEVICE DRIVER
drivers/iio/adc/Kconfig +10 -0
index 46c4fc2fc534..4fc826f52b8c 100644
@@ -565,6 +565,16 @@ config IMX8QXP_ADC
 	  This driver can also be built as a module. If so, the module will be
 	  called imx8qxp-adc.
 
+config IMX93_ADC
+	tristate "IMX93 ADC driver"
+	depends on ARCH_MXC || COMPILE_TEST
+	depends on HAS_IOMEM
+	help
+	  Say yes here to build support for IMX93 ADC.
+
+	  This driver can also be built as a module. If so, the module will be
+	  called imx93_adc.
+
 config LP8788_ADC
 	tristate "LP8788 ADC driver"
 	depends on MFD_LP8788
drivers/iio/adc/Makefile +1 -0
index 6e08415c3f3a..df8c0f26307d 100644
@@ -49,6 +49,7 @@ obj-$(CONFIG_HI8435) += hi8435.o
 obj-$(CONFIG_HX711) += hx711.o
 obj-$(CONFIG_IMX7D_ADC) += imx7d_adc.o
 obj-$(CONFIG_IMX8QXP_ADC) += imx8qxp-adc.o
+obj-$(CONFIG_IMX93_ADC) += imx93_adc.o
 obj-$(CONFIG_INA2XX_ADC) += ina2xx-adc.o
 obj-$(CONFIG_INGENIC_ADC) += ingenic-adc.o
 obj-$(CONFIG_INTEL_MRFLD_ADC) += intel_mrfld_adc.o
drivers/iio/adc/imx93_adc.c new file +474 -0

474 lines not on this page · raw message

Signature · 1 line
2.34.1
author maintainer
#1 lore raw

PATCH v2 2/3 dt-bindings: iio: adc: Add binding documentation for NXP IMX93 ADC

From: Haibo Chen <[email protected]>

The IMX93 SoC has a new ADC IP, so add binding documentation for NXP IMX93 ADC.

---
 .../bindings/iio/adc/nxp,imx93-adc.yaml       | 79 +++++++++++++++++++
 1 file changed, 79 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/iio/adc/nxp,imx93-adc.yaml
Documentation/devicetree/bindings/iio/adc/nxp,imx93-adc.yaml new file +79 -0
new file mode 100644
index 000000000000..229bb79e255c
@@ -0,0 +1,79 @@
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/iio/adc/nxp,imx93-adc.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: NXP iMX93 ADC bindings
+
+maintainers:
+  - Haibo Chen <[email protected]>
+
+description:
+  The ADC on iMX93 is a 8-channel 12-bit 1MS/s ADC with 4 channels
+  connected to pins. it support normal and inject mode, include
+  One-Shot and Scan (continuous) conversions. Programmable DMA
+  enables for each channel  Also this ADC contain alternate analog
+  watchdog thresholds, select threshold through input ports. And
+  also has Self-test logic and Software-initiated calibration.
+
+properties:
+  compatible:
+    const: nxp,imx93-adc
+
+  reg:
+    maxItems: 1
+
+  interrupts:
+    description:
+      line 0 for WDGnL (watchdog threshold) interrupt requests.
+      line 1 for WDGnH (watchdog threshold) interrupt requests.
+      line 2 for normal conversion, include EOC (End of Conversion)
+      interrupt request, ECH (End of Chain) interrupt request,
+      JEOC (End of Injected Conversion mode) interrupt request
+      and JECH (End of injected Chain) interrupt request.
+      line 3 for Self-testing Interrupts.
+    maxItems: 4
+
+  clocks:
+    maxItems: 1
+
+  vref-supply:
+    description:
+      The reference voltage which used to establish channel scaling.
+
+  "#io-channel-cells":
+    const: 1
+
+required:
+  - compatible
+  - reg
+  - interrupts
+  - clocks
+  - clock-names
+  - vref-supply
+  - "#io-channel-cells"
+
+additionalProperties: false
+
+examples:
+  - |
+    #include <dt-bindings/interrupt-controller/irq.h>
+    #include <dt-bindings/clock/imx93-clock.h>
+    #include <dt-bindings/interrupt-controller/arm-gic.h>
+    soc {
+        #address-cells = <1>;
+        #size-cells = <1>;
+        adc@44530000 {
+            compatible = "nxp,imx93-adc";
+            reg = <0x44530000 0x10000>;
+            interrupts = <GIC_SPI 217 IRQ_TYPE_LEVEL_HIGH>,
+                         <GIC_SPI 218 IRQ_TYPE_LEVEL_HIGH>,
+                         <GIC_SPI 219 IRQ_TYPE_LEVEL_HIGH>,
+                         <GIC_SPI 268 IRQ_TYPE_LEVEL_HIGH>;
+            clocks = <&clk IMX93_CLK_ADC1_GATE>;
+            clock-names = "ipg";
+            vref-supply = <&reg_vref_1v8>;
+        };
+    };
+...
Signature · 1 line
2.34.1
maintainer
#2 lore raw

Re: [PATCH v2 2/3] dt-bindings: iio: adc: Add binding documentation for NXP IMX93 ADC

Quoted 11 lines · On Wed, 14 Dec 2022 21:35:38 +0800, [email protected] wrote:

From: Haibo Chen <[email protected]>

The IMX93 SoC has a new ADC IP, so add binding documentation for NXP IMX93 ADC.

---
 .../bindings/iio/adc/nxp,imx93-adc.yaml       | 79 +++++++++++++++++++
 1 file changed, 79 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/iio/adc/nxp,imx93-adc.yaml

My bot found errors running 'make DT_CHECKER_FLAGS=-m dt_binding_check' on your patch (DT_CHECKER_FLAGS is new in v5.13):

yamllint warnings/errors:

dtschema/dtc warnings/errors:
/builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/iio/adc/nxp,imx93-adc.example.dtb: adc@44530000: '#io-channel-cells' is a required property
From schema: /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/iio/adc/nxp,imx93-adc.yaml
/builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/iio/adc/nxp,imx93-adc.example.dtb: adc@44530000: 'clock-names' does not match any of the regexes: 'pinctrl-[0-9]+'
From schema: /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/iio/adc/nxp,imx93-adc.yaml

doc reference errors (make refcheckdocs):

See https://patchwork.ozlabs.org/project/devicetree-bindings/patch/[email protected]

The base for the series is generally the latest rc1. A different dependency should be noted in *this* patch.

If you already ran 'make dt_binding_check' and didn't see the above error(s), then make sure 'yamllint' is installed and dt-schema is up to date:

pip3 install dtschema --upgrade

Please check and re-submit after running the above command yourself. Note that DT_SCHEMA_FILES can be set to your schema file to speed up checking your schema. However, it must be unset to test all examples with your schema.

maintainer
#3 lore raw

Re: [PATCH v2 2/3] dt-bindings: iio: adc: Add binding documentation for NXP IMX93 ADC

In reply to [email protected]
Quoted 43 lines · On Wed, Dec 14, 2022 at 09:35:38PM +0800, [email protected] wrote:

From: Haibo Chen <[email protected]>

The IMX93 SoC has a new ADC IP, so add binding documentation for NXP IMX93 ADC.

---
 .../bindings/iio/adc/nxp,imx93-adc.yaml       | 79 +++++++++++++++++++
 1 file changed, 79 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/iio/adc/nxp,imx93-adc.yaml
Documentation/devicetree/bindings/iio/adc/nxp,imx93-adc.yaml new file +26 -0
new file mode 100644
index 000000000000..229bb79e255c
@@ -0,0 +1,79 @@
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/iio/adc/nxp,imx93-adc.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: NXP iMX93 ADC bindings
+
+maintainers:
+  - Haibo Chen <[email protected]>
+
+description:
+  The ADC on iMX93 is a 8-channel 12-bit 1MS/s ADC with 4 channels
+  connected to pins. it support normal and inject mode, include
+  One-Shot and Scan (continuous) conversions. Programmable DMA
+  enables for each channel  Also this ADC contain alternate analog
+  watchdog thresholds, select threshold through input ports. And
+  also has Self-test logic and Software-initiated calibration.
+
+properties:
+  compatible:
+    const: nxp,imx93-adc
+
+  reg:
+    maxItems: 1
+

Documentation/devicetree/bindings/iio/adc/nxp,imx93-adc.yaml line 36

Quoted 10 lines
Documentation/devicetree/bindings/iio/adc/nxp,imx93-adc.yaml new file +10 -0
+  interrupts:
+    description:
+      line 0 for WDGnL (watchdog threshold) interrupt requests.
+      line 1 for WDGnH (watchdog threshold) interrupt requests.
+      line 2 for normal conversion, include EOC (End of Conversion)
+      interrupt request, ECH (End of Chain) interrupt request,
+      JEOC (End of Injected Conversion mode) interrupt request
+      and JECH (End of injected Chain) interrupt request.
+      line 3 for Self-testing Interrupts.
+    maxItems: 4

Split the descriptions:

items:
- description: WDGnL ...
- description: ...

And then drop maxItems

Quoted 47 lines
Documentation/devicetree/bindings/iio/adc/nxp,imx93-adc.yaml new file +43 -0
+
+  clocks:
+    maxItems: 1
+
+  vref-supply:
+    description:
+      The reference voltage which used to establish channel scaling.
+
+  "#io-channel-cells":
+    const: 1
+
+required:
+  - compatible
+  - reg
+  - interrupts
+  - clocks
+  - clock-names
+  - vref-supply
+  - "#io-channel-cells"
+
+additionalProperties: false
+
+examples:
+  - |
+    #include <dt-bindings/interrupt-controller/irq.h>
+    #include <dt-bindings/clock/imx93-clock.h>
+    #include <dt-bindings/interrupt-controller/arm-gic.h>
+    soc {
+        #address-cells = <1>;
+        #size-cells = <1>;
+        adc@44530000 {
+            compatible = "nxp,imx93-adc";
+            reg = <0x44530000 0x10000>;
+            interrupts = <GIC_SPI 217 IRQ_TYPE_LEVEL_HIGH>,
+                         <GIC_SPI 218 IRQ_TYPE_LEVEL_HIGH>,
+                         <GIC_SPI 219 IRQ_TYPE_LEVEL_HIGH>,
+                         <GIC_SPI 268 IRQ_TYPE_LEVEL_HIGH>;
+            clocks = <&clk IMX93_CLK_ADC1_GATE>;
+            clock-names = "ipg";
+            vref-supply = <&reg_vref_1v8>;
+        };
+    };
+...
Signature · 1 line
2.34.1
#4 lore raw

Re: [PATCH v2 2/3] dt-bindings: iio: adc: Add binding documentation for NXP IMX93 ADC

In reply to [email protected]

Documentation/devicetree/bindings/iio/adc/nxp,imx93-adc.yaml

Quoted 16 lines · On 14/12/2022 14:35, [email protected] wrote:

From: Haibo Chen <[email protected]>

The IMX93 SoC has a new ADC IP, so add binding documentation for NXP IMX93 ADC.

---
 .../bindings/iio/adc/nxp,imx93-adc.yaml       | 79 +++++++++++++++++++
 1 file changed, 79 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/iio/adc/nxp,imx93-adc.yaml
Documentation/devicetree/bindings/iio/adc/nxp,imx93-adc.yaml new file +0 -0
new file mode 100644
index 000000000000..229bb79e255c

This was already sent, so I am surprised to see this in worse or the same state. Don't force us to repeat review, it's a waste of time.

Documentation/devicetree/bindings/iio/adc/nxp,imx93-adc.yaml line 7

Quoted 8 lines
Documentation/devicetree/bindings/iio/adc/nxp,imx93-adc.yaml new file +7 -0
@@ -0,0 +1,79 @@
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/iio/adc/nxp,imx93-adc.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: NXP iMX93 ADC bindings

Drop bindings. How did it appear here? It wasn't in v1.

Quoted 41 lines
Documentation/devicetree/bindings/iio/adc/nxp,imx93-adc.yaml new file +41 -0
+
+maintainers:
+  - Haibo Chen <[email protected]>
+
+description:
+  The ADC on iMX93 is a 8-channel 12-bit 1MS/s ADC with 4 channels
+  connected to pins. it support normal and inject mode, include
+  One-Shot and Scan (continuous) conversions. Programmable DMA
+  enables for each channel  Also this ADC contain alternate analog
+  watchdog thresholds, select threshold through input ports. And
+  also has Self-test logic and Software-initiated calibration.
+
+properties:
+  compatible:
+    const: nxp,imx93-adc
+
+  reg:
+    maxItems: 1
+
+  interrupts:
+    description:
+      line 0 for WDGnL (watchdog threshold) interrupt requests.
+      line 1 for WDGnH (watchdog threshold) interrupt requests.
+      line 2 for normal conversion, include EOC (End of Conversion)
+      interrupt request, ECH (End of Chain) interrupt request,
+      JEOC (End of Injected Conversion mode) interrupt request
+      and JECH (End of injected Chain) interrupt request.
+      line 3 for Self-testing Interrupts.
+    maxItems: 4
+
+  clocks:
+    maxItems: 1
+
+  vref-supply:
+    description:
+      The reference voltage which used to establish channel scaling.
+
+  "#io-channel-cells":
+    const: 1
+
+required:

Documentation/devicetree/bindings/iio/adc/nxp,imx93-adc.yaml line 58

Quoted 10 lines
Documentation/devicetree/bindings/iio/adc/nxp,imx93-adc.yaml new file +10 -0
+  - compatible
+  - reg
+  - interrupts
+  - clocks
+  - clock-names
+  - vref-supply
+  - "#io-channel-cells"
+
+additionalProperties: false
+

Best regards,
Krzysztof

author maintainer
#5 lore raw

RE: [PATCH v2 2/3] dt-bindings: iio: adc: Add binding documentation for NXP IMX93 ADC

Quoted 26 lines

-----Original Message-----
From: Krzysztof Kozlowski <[email protected]>
Sent: 2022年12月15日 18:12
To: Bough Chen <[email protected]>; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]
Cc: [email protected]; dl-linux-imx <[email protected]>; [email protected]; [email protected]; [email protected]
Subject: Re: [PATCH v2 2/3] dt-bindings: iio: adc: Add binding documentation for NXP IMX93 ADC

Quoted 8 lines · On 14/12/2022 14:35, [email protected] wrote:

From: Haibo Chen <[email protected]>

The IMX93 SoC has a new ADC IP, so add binding documentation for NXP IMX93 ADC.

---
 .../bindings/iio/adc/nxp,imx93-adc.yaml       | 79

+++++++++++++++++++

Quoted 4 lines
 1 file changed, 79 insertions(+)
 create mode 100644

Documentation/devicetree/bindings/iio/adc/nxp,imx93-adc.yaml

Quoted 10 lines

Documentation/devicetree/bindings/iio/adc/nxp,imx93-adc.yaml

Quoted 7 lines

diff --git a/Documentation/devicetree/bindings/iio/adc/nxp,imx93-adc.yaml b/Documentation/devicetree/bindings/iio/adc/nxp,imx93-adc.yaml new file mode 100644
index 000000000000..229bb79e255c

Documentation/devicetree/bindings/iio/adc/nxp,imx93-adc.yaml new file +0 -0

This was already sent, so I am surprised to see this in worse or the same state. Don't force us to repeat review, it's a waste of time.

Sorry, I'm focus on the driver side, will pay much attention on the yaml binding.

By the way, for your first review comments:

Documentation/devicetree/bindings/iio/adc/nxp,imx93-adc.yaml

Quoted 6 lines
Documentation/devicetree/bindings/iio/adc/nxp,imx93-adc.yaml new file +6 -0
+
+  clocks:
+    maxItems: 1
+
+  clock-names:
+    const: ipg

No need for clock-names in such case.

How should I handle this case here? I search in this directory(iio/adc), and find many other yaml also write this way. Do you mean change like this:
clock-names: true

If you will, can you help tell where is the yaml guide, I'm not familiar with yaml rule.

Best Regards
Haibo Chen

Quoted 99 lines

Documentation/devicetree/bindings/iio/adc/nxp,imx93-adc.yaml line 4

Quoted 7 lines
Documentation/devicetree/bindings/iio/adc/nxp,imx93-adc.yaml new file +4 -0
@@ -0,0 +1,79 @@
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) %YAML 1.2
+---
+$id:
+https://eur01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fdevi

+cetree.org%2Fschemas%2Fiio%2Fadc%2Fnxp%2Cimx93-adc.yaml%23&amp;da ta=0

Quoted 1 line

+5%7C01%7Chaibo.chen%40nxp.com%7C0f5dbde6e91b4c8f920c08dade84c2b4 %7C68

Quoted 1 line

+6ea1d3bc2b4c6fa92cd99c5c301635%7C0%7C0%7C638066959030689942%7C Unknown

Quoted 1 line

+%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haW wiLC

Quoted 1 line

+JXVCI6Mn0%3D%7C3000%7C%7C%7C&amp;sdata=iG7kL12EZ17jqPyLPx8X79 m8Muzaul

Documentation/devicetree/bindings/iio/adc/nxp,imx93-adc.yaml

Quoted 4 lines
Documentation/devicetree/bindings/iio/adc/nxp,imx93-adc.yaml new file +3 -0
+CZDuqAl8Ayhdw%3D&amp;reserved=0
+$schema:
+https://eur01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fdevi

+cetree.org%2Fmeta-schemas%2Fcore.yaml%23&amp;data=05%7C01%7Chaib o.che

Quoted 1 line

+n%40nxp.com%7C0f5dbde6e91b4c8f920c08dade84c2b4%7C686ea1d3bc2b4c 6fa92c

Quoted 1 line

+d99c5c301635%7C0%7C0%7C638066959030689942%7CUnknown%7CTWFpb GZsb3d8eyJ

Quoted 1 line

+WIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7 C300

Quoted 1 line

+0%7C%7C%7C&amp;sdata=fXkafmq9%2FLxo2I%2FyIFRcTgwVMLP7yBXYDPrn0 DJzuV4%

Documentation/devicetree/bindings/iio/adc/nxp,imx93-adc.yaml line 7

Quoted 3 lines

+3D&amp;reserved=0

Documentation/devicetree/bindings/iio/adc/nxp,imx93-adc.yaml new file +2 -0
+
+title: NXP iMX93 ADC bindings

Drop bindings. How did it appear here? It wasn't in v1.

Quoted 41 lines
Documentation/devicetree/bindings/iio/adc/nxp,imx93-adc.yaml new file +41 -0
+
+maintainers:
+  - Haibo Chen <[email protected]>
+
+description:
+  The ADC on iMX93 is a 8-channel 12-bit 1MS/s ADC with 4 channels
+  connected to pins. it support normal and inject mode, include
+  One-Shot and Scan (continuous) conversions. Programmable DMA
+  enables for each channel  Also this ADC contain alternate analog
+  watchdog thresholds, select threshold through input ports. And
+  also has Self-test logic and Software-initiated calibration.
+
+properties:
+  compatible:
+    const: nxp,imx93-adc
+
+  reg:
+    maxItems: 1
+
+  interrupts:
+    description:
+      line 0 for WDGnL (watchdog threshold) interrupt requests.
+      line 1 for WDGnH (watchdog threshold) interrupt requests.
+      line 2 for normal conversion, include EOC (End of Conversion)
+      interrupt request, ECH (End of Chain) interrupt request,
+      JEOC (End of Injected Conversion mode) interrupt request
+      and JECH (End of injected Chain) interrupt request.
+      line 3 for Self-testing Interrupts.
+    maxItems: 4
+
+  clocks:
+    maxItems: 1
+
+  vref-supply:
+    description:
+      The reference voltage which used to establish channel scaling.
+
+  "#io-channel-cells":
+    const: 1
+
+required:

Documentation/devicetree/bindings/iio/adc/nxp,imx93-adc.yaml line 58

Quoted 10 lines
Documentation/devicetree/bindings/iio/adc/nxp,imx93-adc.yaml new file +10 -0
+  - compatible
+  - reg
+  - interrupts
+  - clocks
+  - clock-names
+  - vref-supply
+  - "#io-channel-cells"
+
+additionalProperties: false
+

Best regards,
Krzysztof

#6 lore raw

Re: [PATCH v2 2/3] dt-bindings: iio: adc: Add binding documentation for NXP IMX93 ADC

Quoted 41 lines · Bough Chen
Quoted 26 lines

-----Original Message-----
From: Krzysztof Kozlowski <[email protected]>
Sent: 2022年12月15日 18:12
To: Bough Chen <[email protected]>; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]
Cc: [email protected]; dl-linux-imx <[email protected]>; [email protected]; [email protected]; [email protected]
Subject: Re: [PATCH v2 2/3] dt-bindings: iio: adc: Add binding documentation for NXP IMX93 ADC

Quoted 8 lines · On 14/12/2022 14:35, [email protected] wrote:

From: Haibo Chen <[email protected]>

The IMX93 SoC has a new ADC IP, so add binding documentation for NXP IMX93 ADC.

---
 .../bindings/iio/adc/nxp,imx93-adc.yaml       | 79

+++++++++++++++++++

Quoted 4 lines
 1 file changed, 79 insertions(+)
 create mode 100644

Documentation/devicetree/bindings/iio/adc/nxp,imx93-adc.yaml

Quoted 10 lines

Documentation/devicetree/bindings/iio/adc/nxp,imx93-adc.yaml

Quoted 7 lines

diff --git a/Documentation/devicetree/bindings/iio/adc/nxp,imx93-adc.yaml b/Documentation/devicetree/bindings/iio/adc/nxp,imx93-adc.yaml new file mode 100644
index 000000000000..229bb79e255c

Documentation/devicetree/bindings/iio/adc/nxp,imx93-adc.yaml new file +0 -0

This was already sent, so I am surprised to see this in worse or the same state. Don't force us to repeat review, it's a waste of time.

Sorry, I'm focus on the driver side, will pay much attention on the yaml binding.

By the way, for your first review comments:

Quoted 8 lines

Documentation/devicetree/bindings/iio/adc/nxp,imx93-adc.yaml

Quoted 6 lines
Documentation/devicetree/bindings/iio/adc/nxp,imx93-adc.yaml new file +6 -0
+
+  clocks:
+    maxItems: 1
+
+  clock-names:
+    const: ipg

No need for clock-names in such case.

I think this was for the other patch and recommendation was to drop entire clock-names. Here you do not have it, so no need to change this.

Best regards,
Krzysztof

author maintainer
#7 lore raw

PATCH v2 3/3 arm64: dts: imx93: add ADC support

In reply to [email protected]

From: Haibo Chen <[email protected]>

Add ADC support for imx93-11x11-evk board.

---
 arch/arm64/boot/dts/freescale/imx93-11x11-evk.dts | 12 ++++++++++++
 arch/arm64/boot/dts/freescale/imx93.dtsi          | 12 ++++++++++++
 2 files changed, 24 insertions(+)
arch/arm64/boot/dts/freescale/imx93-11x11-evk.dts +12 -0
index 69786c326db0..cab5f4d66bf9 100644
@@ -15,6 +15,13 @@ chosen {
 		stdout-path = &lpuart1;
 	};
 
+	reg_vref_1v8: regulator-adc-vref {
+		compatible = "regulator-fixed";
+		regulator-name = "vref_1v8";
+		regulator-min-microvolt = <1800000>;
+		regulator-max-microvolt = <1800000>;
+	};
+
 	reg_usdhc2_vmmc: regulator-usdhc2 {
 		compatible = "regulator-fixed";
 		pinctrl-names = "default";
@@ -27,6 +34,11 @@ reg_usdhc2_vmmc: regulator-usdhc2 {
 	};
 };
 
+&adc1 {
+	vref-supply = <&reg_vref_1v8>;
+	status = "okay";
+};
+
 &mu1 {
 	status = "okay";
 };
arch/arm64/boot/dts/freescale/imx93.dtsi +12 -0
index 5d79663b3b84..d29a8d375aa4 100644
@@ -266,6 +266,18 @@ anatop: anatop@44480000 {
 				compatible = "fsl,imx93-anatop", "syscon";
 				reg = <0x44480000 0x10000>;
 			};
+
+			adc1: adc@44530000 {
+				compatible = "nxp,imx93-adc";
+				reg = <0x44530000 0x10000>;
+				interrupts = <GIC_SPI 217 IRQ_TYPE_LEVEL_HIGH>,
+					     <GIC_SPI 218 IRQ_TYPE_LEVEL_HIGH>,
+					     <GIC_SPI 219 IRQ_TYPE_LEVEL_HIGH>,
+					     <GIC_SPI 268 IRQ_TYPE_LEVEL_HIGH>;
+				clocks = <&clk IMX93_CLK_ADC1_GATE>;
+				clock-names = "ipg";
+				status = "disabled";
+			};
 		};
 
 		aips2: bus@42000000 {
Signature · 1 line
2.34.1