linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v4 0/6] Support i.MX28 Amarula rmm board
@ 2025-05-29 14:35 Dario Binacchi
  2025-05-29 14:35 ` [PATCH v4 1/6] dt-bindings: mfd: convert mxs-lradc bindings to json-schema Dario Binacchi
                   ` (5 more replies)
  0 siblings, 6 replies; 11+ messages in thread
From: Dario Binacchi @ 2025-05-29 14:35 UTC (permalink / raw)
  To: linux-kernel
  Cc: linux-amarula, michael, Dario Binacchi, Alexander Stein,
	Ard Biesheuvel, Conor Dooley, Eric Biggers, Fabio Estevam,
	Fabio Estevam, Francesco Dolcini, Frieder Schrempf,
	Heiko Schocher, Krzysztof Kozlowski, Lee Jones, Marek Vasut,
	Martin K. Petersen, Max Merchel, Michael Walle, Peng Fan,
	Pengutronix Kernel Team, Rob Herring, Russell King, Sascha Hauer,
	Shawn Guo, Tim Harvey, devicetree, imx, linux-arm-kernel

The series adds support for i.MX28 Amarula rmm board.

The board includes the following resources:
 - 256 Mbytes NAND Flash
 - 128 Mbytes DRAM DDR2
 - CAN
 - USB 2.0 high-speed/full-speed
 - Ethernet MAC

Changes in v4:
- In mxs-lradc.txt:
  - Fix typo Low-Resoulution -> Low-Resolution'
  - Wrap lines at 80 char.
  - Drop '|' from the description
  - Describe what each interrupt is for.
  - Move touchscreen-wires constraint for imx28 to the top level
- In imx28-amarula-rmm.dts:
  - Drop label property (deprecated) under the leds sub-nodes.
  - Add microSD comment above the ssp0 node.
- Add patch 5/6 "ARM: mxs_defconfig: Cleanup mxs_defconfig"
- Add patch 6/6 "ARM: mxs_defconfig: select new drivers used by
  imx28-amarula-rmm"

Changes in v3:
- In imx28-amarula-rmm.dts:
  - Drop xceiver-supply property from can0 node.
  - Rearrange the order of specific nodes and properties
    alphabetically.

Changes in v2:
- In imx28-amarula-rmm.dts:
  - Replace '-' with '@' for the pinctrl sub-nodes.
  - Replace edt,edt-ft5x06 with edt,edt-ft5306.
  - Drop LCD reset hog pin.
  - Add correct #address-cells and #size-cells to gpmi node.
  - Replace edt-ft5x06@38 with touchscreen@38.
- Drop from commit messages all references to LCD display.
- Add patch [1/4] "dt-bindings: mfd: convert mxs-lradc bindings to
  json-schema".

Dario Binacchi (6):
  dt-bindings: mfd: convert mxs-lradc bindings to json-schema
  ARM: dts: imx28: add pwm7 muxing options
  dt-bindings: arm: fsl: add i.MX28 Amarula rmm board
  ARM: dts: mxs: support i.MX28 Amarula rmm board
  ARM: mxs_defconfig: Cleanup mxs_defconfig
  ARM: mxs_defconfig: select new drivers used by imx28-amarula-rmm

 .../devicetree/bindings/arm/fsl.yaml          |   1 +
 .../devicetree/bindings/mfd/mxs-lradc.txt     |  45 ---
 .../devicetree/bindings/mfd/mxs-lradc.yaml    | 131 ++++++++
 arch/arm/boot/dts/nxp/mxs/Makefile            |   1 +
 .../boot/dts/nxp/mxs/imx28-amarula-rmm.dts    | 301 ++++++++++++++++++
 arch/arm/boot/dts/nxp/mxs/imx28.dtsi          |  10 +
 arch/arm/configs/mxs_defconfig                |  14 +-
 7 files changed, 447 insertions(+), 56 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/mfd/mxs-lradc.txt
 create mode 100644 Documentation/devicetree/bindings/mfd/mxs-lradc.yaml
 create mode 100644 arch/arm/boot/dts/nxp/mxs/imx28-amarula-rmm.dts

-- 
2.43.0

base-commit: 2d1e9b3978bc041336f1bf6c611fbbf435a297f5
branch: imx28-amarula-rmm

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [PATCH v4 1/6] dt-bindings: mfd: convert mxs-lradc bindings to json-schema
  2025-05-29 14:35 [PATCH v4 0/6] Support i.MX28 Amarula rmm board Dario Binacchi
@ 2025-05-29 14:35 ` Dario Binacchi
  2025-05-30 14:37   ` Rob Herring
  2025-05-29 14:35 ` [PATCH v4 2/6] ARM: dts: imx28: add pwm7 muxing options Dario Binacchi
                   ` (4 subsequent siblings)
  5 siblings, 1 reply; 11+ messages in thread
From: Dario Binacchi @ 2025-05-29 14:35 UTC (permalink / raw)
  To: linux-kernel
  Cc: linux-amarula, michael, Dario Binacchi, Conor Dooley,
	Conor Dooley, Fabio Estevam, Krzysztof Kozlowski, Lee Jones,
	Pengutronix Kernel Team, Rob Herring, Sascha Hauer, Shawn Guo,
	devicetree, imx, linux-arm-kernel

Convert the Freescale MXS Low-Resoulution ADC (LRADC) device tree
binding documentation to json-schema.

The clocks and #io-channel-cells properties have also been added; They
are present in the respective SoC DTSI files but were missing from the
old mxs-lradc.txt file.

Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
Reviewed-by: Conor Dooley <conor.dooley@microchip.com>

---

Changes in v4:
- Fix typo Low-Resoulution -> Low-Resolution'
- Wrap lines at 80 char.
- Drop '|' from the description
- Describe what each interrupt is for.
- Move touchscreen-wires constraint for imx28 to the top level

Changes in v3:
- Add Reviewed-by tag of Conor Dooley

 .../devicetree/bindings/mfd/mxs-lradc.txt     |  45 ------
 .../devicetree/bindings/mfd/mxs-lradc.yaml    | 131 ++++++++++++++++++
 2 files changed, 131 insertions(+), 45 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/mfd/mxs-lradc.txt
 create mode 100644 Documentation/devicetree/bindings/mfd/mxs-lradc.yaml

diff --git a/Documentation/devicetree/bindings/mfd/mxs-lradc.txt b/Documentation/devicetree/bindings/mfd/mxs-lradc.txt
deleted file mode 100644
index 755cbef0647d..000000000000
--- a/Documentation/devicetree/bindings/mfd/mxs-lradc.txt
+++ /dev/null
@@ -1,45 +0,0 @@
-* Freescale MXS LRADC device driver
-
-Required properties:
-- compatible: Should be "fsl,imx23-lradc" for i.MX23 SoC and "fsl,imx28-lradc"
-              for i.MX28 SoC
-- reg: Address and length of the register set for the device
-- interrupts: Should contain the LRADC interrupts
-
-Optional properties:
-- fsl,lradc-touchscreen-wires: Number of wires used to connect the touchscreen
-                               to LRADC. Valid value is either 4 or 5. If this
-                               property is not present, then the touchscreen is
-                               disabled. 5 wires is valid for i.MX28 SoC only.
-- fsl,ave-ctrl: number of samples per direction to calculate an average value.
-                Allowed value is 1 ... 32, default is 4
-- fsl,ave-delay: delay between consecutive samples. Allowed value is
-                 2 ... 2048. It is used if 'fsl,ave-ctrl' > 1, counts at
-                 2 kHz and its default is 2 (= 1 ms)
-- fsl,settling: delay between plate switch to next sample. Allowed value is
-                1 ... 2047. It counts at 2 kHz and its default is
-                10 (= 5 ms)
-
-Example for i.MX23 SoC:
-
-	lradc@80050000 {
-		compatible = "fsl,imx23-lradc";
-		reg = <0x80050000 0x2000>;
-		interrupts = <36 37 38 39 40 41 42 43 44>;
-		fsl,lradc-touchscreen-wires = <4>;
-		fsl,ave-ctrl = <4>;
-		fsl,ave-delay = <2>;
-		fsl,settling = <10>;
-	};
-
-Example for i.MX28 SoC:
-
-	lradc@80050000 {
-		compatible = "fsl,imx28-lradc";
-		reg = <0x80050000 0x2000>;
-		interrupts = <10 14 15 16 17 18 19 20 21 22 23 24 25>;
-		fsl,lradc-touchscreen-wires = <5>;
-		fsl,ave-ctrl = <4>;
-		fsl,ave-delay = <2>;
-		fsl,settling = <10>;
-	};
diff --git a/Documentation/devicetree/bindings/mfd/mxs-lradc.yaml b/Documentation/devicetree/bindings/mfd/mxs-lradc.yaml
new file mode 100644
index 000000000000..f90fdfbb74a8
--- /dev/null
+++ b/Documentation/devicetree/bindings/mfd/mxs-lradc.yaml
@@ -0,0 +1,131 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/mfd/mxs-lradc.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Freescale MXS Low-Resolution ADC (LRADC)
+
+maintainers:
+  - Dario Binacchi <dario.binacchi@amarulasolutions.com>
+
+description:
+  The LRADC provides 16 physical channels of 12-bit resolution for
+  analog-to-digital conversion and includes an integrated 4-wire/5-wire
+  touchscreen controller.
+
+properties:
+  compatible:
+    items:
+      - enum:
+          - fsl,imx23-lradc
+          - fsl,imx28-lradc
+
+  reg:
+    maxItems: 1
+
+  clocks:
+    minItems: 1
+
+  interrupts:
+    minItems: 9
+    maxItems: 13
+
+  fsl,lradc-touchscreen-wires:
+    $ref: /schemas/types.yaml#/definitions/uint32
+    enum: [4, 5]
+    description:
+      Number of wires used to connect the touchscreen to LRADC.
+      If this property is not present, then the touchscreen is disabled.
+
+  fsl,ave-ctrl:
+    $ref: /schemas/types.yaml#/definitions/uint32
+    minimum: 1
+    maximum: 32
+    default: 4
+    description: |
+      Number of samples per direction to calculate an average value.
+
+  fsl,ave-delay:
+    $ref: /schemas/types.yaml#/definitions/uint32
+    minimum: 2
+    maximum: 2048
+    default: 2
+    description:
+      Delay between consecutive samples.
+      It is used if 'fsl,ave-ctrl' > 1, counts at 2 kHz and its
+      default value (i. e. 2) is 1 ms.
+
+  fsl,settling:
+    $ref: /schemas/types.yaml#/definitions/uint32
+    minimum: 1
+    maximum: 2047
+    default: 10
+    description:
+      Delay between plate switch to next sample.
+      It counts at 2 kHz and its default (i. e. 10) is 5 ms.
+
+  "#io-channel-cells":
+    const: 1
+
+required:
+  - compatible
+  - reg
+  - clocks
+  - interrupts
+
+if:
+  properties:
+    compatible:
+      contains:
+        enum:
+          - fsl,imx23-lradc
+then:
+  properties:
+    interrupts:
+      items:
+        - description: channel 0
+        - description: channel 1
+        - description: channel 2
+        - description: channel 3
+        - description: channel 4
+        - description: channel 5
+        - description: touchscreen
+        - description: channel 6
+        - description: channel 7
+    fsl,lradc-touchscreen-wires:
+      const: 4
+else:
+  properties:
+    interrupts:
+      items:
+        - description: threshold 0
+        - description: threshold 1
+        - description: channel 0
+        - description: channel 1
+        - description: channel 2
+        - description: channel 3
+        - description: channel 4
+        - description: channel 5
+        - description: button 0
+        - description: button 1
+        - description: touchscreen
+        - description: channel 6
+        - description: channel 7
+
+additionalProperties: false
+
+examples:
+  - |
+    lradc@80050000 {
+        compatible = "fsl,imx23-lradc";
+        reg = <0x80050000 0x2000>;
+        interrupts = <36>, <37>, <38>, <39>, <40>,
+                     <41>, <42>, <43>, <44>;
+        clocks = <&clks 26>;
+        #io-channel-cells = <1>;
+        fsl,lradc-touchscreen-wires = <4>;
+        fsl,ave-ctrl = <4>;
+        fsl,ave-delay = <2>;
+        fsl,settling = <10>;
+    };
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [PATCH v4 2/6] ARM: dts: imx28: add pwm7 muxing options
  2025-05-29 14:35 [PATCH v4 0/6] Support i.MX28 Amarula rmm board Dario Binacchi
  2025-05-29 14:35 ` [PATCH v4 1/6] dt-bindings: mfd: convert mxs-lradc bindings to json-schema Dario Binacchi
@ 2025-05-29 14:35 ` Dario Binacchi
  2025-05-29 15:49   ` Frank Li
  2025-05-29 14:35 ` [PATCH v4 3/6] dt-bindings: arm: fsl: add i.MX28 Amarula rmm board Dario Binacchi
                   ` (3 subsequent siblings)
  5 siblings, 1 reply; 11+ messages in thread
From: Dario Binacchi @ 2025-05-29 14:35 UTC (permalink / raw)
  To: linux-kernel
  Cc: linux-amarula, michael, Dario Binacchi, Conor Dooley,
	Fabio Estevam, Krzysztof Kozlowski, Pengutronix Kernel Team,
	Rob Herring, Sascha Hauer, Shawn Guo, devicetree, imx,
	linux-arm-kernel

Add alternative pinmuxing for pwm7.

Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>

---

(no changes since v3)

Changes in v3:
- Add commit body

 arch/arm/boot/dts/nxp/mxs/imx28.dtsi | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/arch/arm/boot/dts/nxp/mxs/imx28.dtsi b/arch/arm/boot/dts/nxp/mxs/imx28.dtsi
index bbea8b77386f..ece46d0e7c7f 100644
--- a/arch/arm/boot/dts/nxp/mxs/imx28.dtsi
+++ b/arch/arm/boot/dts/nxp/mxs/imx28.dtsi
@@ -755,6 +755,16 @@ MX28_PAD_PWM4__PWM_4
 					fsl,pull-up = <MXS_PULL_DISABLE>;
 				};
 
+				pwm7_pins_a: pwm7@0 {
+					reg = <0>;
+					fsl,pinmux-ids = <
+						MX28_PAD_SAIF1_SDATA0__PWM_7
+					>;
+					fsl,drive-strength = <MXS_DRIVE_4mA>;
+					fsl,voltage = <MXS_VOLTAGE_HIGH>;
+					fsl,pull-up = <MXS_PULL_DISABLE>;
+				};
+
 				lcdif_24bit_pins_a: lcdif-24bit@0 {
 					reg = <0>;
 					fsl,pinmux-ids = <
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [PATCH v4 3/6] dt-bindings: arm: fsl: add i.MX28 Amarula rmm board
  2025-05-29 14:35 [PATCH v4 0/6] Support i.MX28 Amarula rmm board Dario Binacchi
  2025-05-29 14:35 ` [PATCH v4 1/6] dt-bindings: mfd: convert mxs-lradc bindings to json-schema Dario Binacchi
  2025-05-29 14:35 ` [PATCH v4 2/6] ARM: dts: imx28: add pwm7 muxing options Dario Binacchi
@ 2025-05-29 14:35 ` Dario Binacchi
  2025-05-29 14:35 ` [PATCH v4 4/6] ARM: dts: mxs: support " Dario Binacchi
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 11+ messages in thread
From: Dario Binacchi @ 2025-05-29 14:35 UTC (permalink / raw)
  To: linux-kernel
  Cc: linux-amarula, michael, Dario Binacchi, Conor Dooley,
	Alexander Stein, Conor Dooley, Fabio Estevam, Francesco Dolcini,
	Frieder Schrempf, Heiko Schocher, Krzysztof Kozlowski,
	Marek Vasut, Max Merchel, Michael Walle, Peng Fan, Rob Herring,
	Shawn Guo, Tim Harvey, devicetree

The board includes the following resources:
 - 256 Mbytes NAND Flash
 - 128 Mbytes DRAM DDR2
 - CAN
 - USB 2.0 high-speed/full-speed
 - Ethernet MAC

Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
Acked-by: Conor Dooley <conor.dooley@microchip.com>

---

(no changes since v3)

Changes in v3:
- Add Acked-by tag of Conor Dooley

 Documentation/devicetree/bindings/arm/fsl.yaml | 1 +
 1 file changed, 1 insertion(+)

diff --git a/Documentation/devicetree/bindings/arm/fsl.yaml b/Documentation/devicetree/bindings/arm/fsl.yaml
index 1b90870958a2..b67f0e71e4c8 100644
--- a/Documentation/devicetree/bindings/arm/fsl.yaml
+++ b/Documentation/devicetree/bindings/arm/fsl.yaml
@@ -89,6 +89,7 @@ properties:
       - description: i.MX28 based Boards
         items:
           - enum:
+              - amarula,imx28-rmm
               - armadeus,imx28-apf28      # APF28 SoM
               - bluegiga,apx4devkit       # Bluegiga APx4 SoM on dev board
               - crystalfontz,cfa10036     # Crystalfontz CFA-10036 SoM
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [PATCH v4 4/6] ARM: dts: mxs: support i.MX28 Amarula rmm board
  2025-05-29 14:35 [PATCH v4 0/6] Support i.MX28 Amarula rmm board Dario Binacchi
                   ` (2 preceding siblings ...)
  2025-05-29 14:35 ` [PATCH v4 3/6] dt-bindings: arm: fsl: add i.MX28 Amarula rmm board Dario Binacchi
@ 2025-05-29 14:35 ` Dario Binacchi
  2025-05-29 15:54   ` Frank Li
  2025-05-29 14:35 ` [PATCH v4 5/6] ARM: mxs_defconfig: Cleanup mxs_defconfig Dario Binacchi
  2025-05-29 14:35 ` [PATCH v4 6/6] ARM: mxs_defconfig: select new drivers used by imx28-amarula-rmm Dario Binacchi
  5 siblings, 1 reply; 11+ messages in thread
From: Dario Binacchi @ 2025-05-29 14:35 UTC (permalink / raw)
  To: linux-kernel
  Cc: linux-amarula, michael, Dario Binacchi, Conor Dooley,
	Fabio Estevam, Krzysztof Kozlowski, Pengutronix Kernel Team,
	Rob Herring, Sascha Hauer, Shawn Guo, devicetree, imx,
	linux-arm-kernel

The board includes the following resources:
 - 256 Mbytes NAND Flash
 - 128 Mbytes DRAM DDR2
 - CAN
 - USB 2.0 high-speed/full-speed
 - Ethernet MAC

Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>

---

Changes in v4:
- Drop label property (deprecated) under the leds sub-nodes.
- Add microSD comment above the ssp0 node.

Changes in v3:
- Drop xceiver-supply property from can0 node.
- Rearrange the order of specific nodes and properties
  alphabetically.

Changes in v2:
- Replace '-' with '@' for the pinctrl sub-nodes.
- Replace edt,edt-ft5x06 with edt,edt-ft5306.
- Drop LCD reset hog pin.
- Add correct #address-cells and #size-cells to gpmi node.
- Replace edt-ft5x06@38 with touchscreen@38.

 arch/arm/boot/dts/nxp/mxs/Makefile            |   1 +
 .../boot/dts/nxp/mxs/imx28-amarula-rmm.dts    | 301 ++++++++++++++++++
 2 files changed, 302 insertions(+)
 create mode 100644 arch/arm/boot/dts/nxp/mxs/imx28-amarula-rmm.dts

diff --git a/arch/arm/boot/dts/nxp/mxs/Makefile b/arch/arm/boot/dts/nxp/mxs/Makefile
index 96dd31ea19ba..d72ba702b6fa 100644
--- a/arch/arm/boot/dts/nxp/mxs/Makefile
+++ b/arch/arm/boot/dts/nxp/mxs/Makefile
@@ -5,6 +5,7 @@ dtb-$(CONFIG_ARCH_MXS) += \
 	imx23-sansa.dtb \
 	imx23-stmp378x_devb.dtb \
 	imx23-xfi3.dtb \
+	imx28-amarula-rmm.dtb \
 	imx28-apf28.dtb \
 	imx28-apf28dev.dtb \
 	imx28-apx4devkit.dtb \
diff --git a/arch/arm/boot/dts/nxp/mxs/imx28-amarula-rmm.dts b/arch/arm/boot/dts/nxp/mxs/imx28-amarula-rmm.dts
new file mode 100644
index 000000000000..5ef9b79cda1c
--- /dev/null
+++ b/arch/arm/boot/dts/nxp/mxs/imx28-amarula-rmm.dts
@@ -0,0 +1,301 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Copyright (C) 2025 Amarula Solutions, Dario Binacchi <dario.binacchi@amarulasolutions.com>
+ */
+
+/dts-v1/;
+
+#include "imx28.dtsi"
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/interrupt-controller/irq.h>
+
+/ {
+	compatible = "amarula,imx28-rmm", "fsl,imx28";
+	model = "Amarula i.MX28 rmm";
+
+	memory@40000000 {
+		reg = <0x40000000 0x08000000>;
+		device_type = "memory";
+	};
+
+	backlight {
+		compatible = "pwm-backlight";
+		pwms = <&pwm 4 5000000 0>;
+		brightness-levels = <0 255>;
+		num-interpolated-steps = <255>;
+		default-brightness-level = <255>;
+		power-supply = <&reg_5v>;
+	};
+
+	beeper {
+		compatible = "pwm-beeper";
+		pwms = <&pwm 7 100000 0>;
+	};
+
+	leds {
+		compatible = "gpio-leds";
+		pinctrl-names = "default";
+		pinctrl-0 = <&leds_pins>;
+
+		led-0 {
+			gpios = <&gpio2 7 GPIO_ACTIVE_HIGH>;
+			default-state = "off";
+		};
+
+		led-1 {
+			gpios = <&gpio3 16 GPIO_ACTIVE_HIGH>;
+			default-state = "off";
+		};
+
+		led-2 {
+			gpios = <&gpio3 17 GPIO_ACTIVE_HIGH>;
+			default-state = "off";
+		};
+	};
+
+	reg_1v8: regulator-1v8 {
+		compatible = "regulator-fixed";
+		regulator-name = "1v8";
+		regulator-min-microvolt = <1800000>;
+		regulator-max-microvolt = <1800000>;
+	};
+
+	reg_3v3: regulator-3v3 {
+		compatible = "regulator-fixed";
+		regulator-name = "3v3";
+		regulator-min-microvolt = <3300000>;
+		regulator-max-microvolt = <3300000>;
+		regulator-always-on;
+	};
+
+	reg_5v: regulator-5v {
+		compatible = "regulator-fixed";
+		regulator-name = "5v";
+		regulator-min-microvolt = <5000000>;
+		regulator-max-microvolt = <5000000>;
+		regulator-always-on;
+	};
+
+	reg_fec_3v3: regulator-fec-3v3 {
+		compatible = "regulator-fixed";
+		pinctrl-names = "default";
+		pinctrl-0 = <&fec_3v3_enable_pin>;
+		regulator-name = "fec-3v3";
+		regulator-min-microvolt = <3300000>;
+		regulator-max-microvolt = <3300000>;
+		gpios = <&gpio3 27 GPIO_ACTIVE_HIGH>;
+		enable-active-high;
+		startup-delay-us = <300000>;
+		vin-supply = <&reg_5v>;
+	};
+
+	reg_usb0_vbus: regulator-usb0-vbus {
+		compatible = "regulator-fixed";
+		pinctrl-names = "default";
+		pinctrl-0 = <&usb0_vbus_enable_pin>;
+		regulator-name = "usb0_vbus";
+		regulator-min-microvolt = <5000000>;
+		regulator-max-microvolt = <5000000>;
+		gpio = <&gpio2 5 GPIO_ACTIVE_HIGH>;
+		enable-active-high;
+		regulator-always-on;
+	};
+
+	reg_usb1_vbus: regulator-usb1-vbus {
+		compatible = "regulator-fixed";
+		pinctrl-names = "default";
+		pinctrl-0 = <&usb1_vbus_enable_pin>;
+		regulator-name = "usb1_vbus";
+		regulator-min-microvolt = <5000000>;
+		regulator-max-microvolt = <5000000>;
+		gpio = <&gpio2 6 GPIO_ACTIVE_HIGH>;
+		enable-active-high;
+		regulator-always-on;
+	};
+};
+
+&auart0 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&auart0_2pins_a>;
+	status = "okay";
+};
+
+&auart1 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&auart1_pins_a>;
+	status = "okay";
+};
+
+&can0 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&can0_pins_a>;
+	status = "okay";
+};
+
+&duart {
+	pinctrl-names = "default";
+	pinctrl-0 = <&duart_pins_b>;
+	status = "okay";
+};
+
+&duart_pins_b {
+	fsl,voltage = <MXS_VOLTAGE_LOW>;
+};
+
+&gpmi {
+	#address-cells = <1>;
+	#size-cells = <0>;
+	pinctrl-names = "default";
+	pinctrl-0 = <&gpmi_pins_a &gpmi_status_cfg>;
+	status = "okay";
+};
+
+&i2c0 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&i2c0_pins_a>;
+	status = "okay";
+
+	touchscreen: touchscreen@38 {
+		compatible = "edt,edt-ft5306";
+		reg = <0x38>;
+		pinctrl-names = "default";
+		pinctrl-0 = <&edt_ft5x06_pins &edt_ft5x06_wake_pin>;
+		interrupt-parent = <&gpio0>;
+		interrupts = <19 IRQ_TYPE_EDGE_RISING>;
+		reset-gpios = <&gpio0 21 GPIO_ACTIVE_LOW>;
+		wake-gpios = <&gpio0 18 GPIO_ACTIVE_HIGH>;
+	};
+};
+
+&lradc {
+	status = "okay";
+};
+
+&mac0 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&mac0_pins_a>;
+	phy-mode = "rmii";
+	phy-supply = <&reg_fec_3v3>;
+	phy-handle = <&ethphy>;
+	status = "okay";
+
+	mdio {
+		#address-cells = <1>;
+		#size-cells = <0>;
+
+		ethphy: ethernet-phy@0 {
+			compatible = "ethernet-phy-ieee802.3-c22";
+			reg = <0>;
+			max-speed = <100>;
+			reset-gpios = <&gpio3 28 GPIO_ACTIVE_LOW>;
+			reset-assert-us = <4000>;
+			reset-deassert-us = <4000>;
+		};
+	};
+};
+
+&pinctrl {
+	pinctrl-names = "default";
+	pinctrl-0 = <&hog_pins_a>;
+
+	edt_ft5x06_pins: edt-ft5x06@0 {
+		reg = <0>;
+		fsl,pinmux-ids = <
+			MX28_PAD_GPMI_RDY1__GPIO_0_21 /* Reset */
+			MX28_PAD_GPMI_CE3N__GPIO_0_19 /* Interrupt */
+		>;
+		fsl,drive-strength = <MXS_DRIVE_4mA>;
+		fsl,pull-up = <MXS_PULL_ENABLE>;
+		fsl,voltage = <MXS_VOLTAGE_HIGH>;
+	};
+
+	edt_ft5x06_wake_pin: edt-ft5x06-wake@0 {
+		reg = <0>;
+		fsl,pinmux-ids = <MX28_PAD_GPMI_CE2N__GPIO_0_18>;
+		fsl,drive-strength = <MXS_DRIVE_16mA>;
+		fsl,pull-up = <MXS_PULL_DISABLE>;
+		fsl,voltage = <MXS_VOLTAGE_HIGH>;
+	};
+
+	fec_3v3_enable_pin: fec-3v3-enable@0 {
+		reg = <0>;
+		fsl,pinmux-ids = <MX28_PAD_SPDIF__GPIO_3_27>;
+		fsl,drive-strength = <MXS_DRIVE_4mA>;
+		fsl,pull-up = <MXS_PULL_DISABLE>;
+		fsl,voltage = <MXS_VOLTAGE_HIGH>;
+	};
+
+	hog_pins_a: hog@0 {
+		reg = <0>;
+		fsl,pinmux-ids = <
+			MX28_PAD_SSP2_SS1__GPIO_2_20  /* External power */
+		>;
+		fsl,drive-strength = <MXS_DRIVE_4mA>;
+		fsl,pull-up = <MXS_PULL_DISABLE>;
+		fsl,voltage = <MXS_VOLTAGE_HIGH>;
+	};
+
+	leds_pins: leds@0 {
+		reg = <0>;
+		fsl,pinmux-ids = <
+			MX28_PAD_SSP0_DATA7__GPIO_2_7
+			MX28_PAD_PWM0__GPIO_3_16
+			MX28_PAD_PWM1__GPIO_3_17
+		>;
+		fsl,drive-strength = <MXS_DRIVE_4mA>;
+		fsl,pull-up = <MXS_PULL_DISABLE>;
+		fsl,voltage = <MXS_VOLTAGE_HIGH>;
+	};
+
+	usb0_vbus_enable_pin: usb0-vbus-enable@0 {
+		reg = <0>;
+		fsl,pinmux-ids = <MX28_PAD_SSP0_DATA5__GPIO_2_5>;
+		fsl,drive-strength = <MXS_DRIVE_4mA>;
+		fsl,pull-up = <MXS_PULL_DISABLE>;
+		fsl,voltage = <MXS_VOLTAGE_HIGH>;
+	};
+
+	usb1_vbus_enable_pin: usb1-vbus-enable@0 {
+		reg = <0>;
+		fsl,pinmux-ids = <MX28_PAD_SSP0_DATA6__GPIO_2_6>;
+		fsl,drive-strength = <MXS_DRIVE_4mA>;
+		fsl,pull-up = <MXS_PULL_DISABLE>;
+		fsl,voltage = <MXS_VOLTAGE_HIGH>;
+	};
+};
+
+&pwm {
+	pinctrl-names = "default";
+	pinctrl-0 = <&pwm4_pins_a &pwm7_pins_a>;
+	status = "okay";
+};
+
+/* microSD */
+&ssp0 {
+	compatible = "fsl,imx28-mmc";
+	pinctrl-names = "default";
+	pinctrl-0 = <&mmc0_4bit_pins_a &mmc0_sck_cfg>;
+	broken-cd;
+	bus-width = <4>;
+	status = "okay";
+};
+
+&usb0 {
+	dr_mode = "host";
+	vbus-supply = <&reg_usb0_vbus>;
+	status = "okay";
+};
+
+&usb1 {
+	dr_mode = "host";
+	vbus-supply = <&reg_usb1_vbus>;
+	status = "okay";
+};
+
+&usbphy0 {
+	status = "okay";
+};
+
+&usbphy1 {
+	status = "okay";
+};
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [PATCH v4 5/6] ARM: mxs_defconfig: Cleanup mxs_defconfig
  2025-05-29 14:35 [PATCH v4 0/6] Support i.MX28 Amarula rmm board Dario Binacchi
                   ` (3 preceding siblings ...)
  2025-05-29 14:35 ` [PATCH v4 4/6] ARM: dts: mxs: support " Dario Binacchi
@ 2025-05-29 14:35 ` Dario Binacchi
  2025-05-29 14:35 ` [PATCH v4 6/6] ARM: mxs_defconfig: select new drivers used by imx28-amarula-rmm Dario Binacchi
  5 siblings, 0 replies; 11+ messages in thread
From: Dario Binacchi @ 2025-05-29 14:35 UTC (permalink / raw)
  To: linux-kernel
  Cc: linux-amarula, michael, Dario Binacchi, Ard Biesheuvel,
	Eric Biggers, Fabio Estevam, Martin K. Petersen,
	Pengutronix Kernel Team, Russell King, Sascha Hauer, Shawn Guo,
	imx, linux-arm-kernel

Generate mxs_defconfig by doing:

make mxs_defconfig
make savedefconfig
cp defconfig arch/arm/configs/mxs_defconfig

No functional change. The goal here is to cleanup mxs_defconfig file to
make easier and cleaner the addition of new entries.

Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
---

(no changes since v1)

 arch/arm/configs/mxs_defconfig | 11 -----------
 1 file changed, 11 deletions(-)

diff --git a/arch/arm/configs/mxs_defconfig b/arch/arm/configs/mxs_defconfig
index c76d66135abb..91723fdd3c04 100644
--- a/arch/arm/configs/mxs_defconfig
+++ b/arch/arm/configs/mxs_defconfig
@@ -32,9 +32,6 @@ CONFIG_INET=y
 CONFIG_IP_PNP=y
 CONFIG_IP_PNP_DHCP=y
 CONFIG_SYN_COOKIES=y
-# CONFIG_INET_XFRM_MODE_TRANSPORT is not set
-# CONFIG_INET_XFRM_MODE_TUNNEL is not set
-# CONFIG_INET_XFRM_MODE_BEET is not set
 # CONFIG_INET_DIAG is not set
 # CONFIG_IPV6 is not set
 CONFIG_CAN=m
@@ -45,7 +42,6 @@ CONFIG_MTD=y
 CONFIG_MTD_CMDLINE_PARTS=y
 CONFIG_MTD_BLOCK=y
 CONFIG_MTD_DATAFLASH=y
-CONFIG_MTD_M25P80=y
 CONFIG_MTD_SST25L=y
 CONFIG_MTD_RAW_NAND=y
 CONFIG_MTD_NAND_GPMI_NAND=y
@@ -60,7 +56,6 @@ CONFIG_ENC28J60=y
 CONFIG_ICPLUS_PHY=y
 CONFIG_MICREL_PHY=y
 CONFIG_REALTEK_PHY=y
-CONFIG_SMSC_PHY=y
 CONFIG_CAN_FLEXCAN=m
 CONFIG_USB_USBNET=y
 CONFIG_USB_NET_SMSC95XX=y
@@ -77,13 +72,11 @@ CONFIG_SERIAL_AMBA_PL011=y
 CONFIG_SERIAL_AMBA_PL011_CONSOLE=y
 CONFIG_SERIAL_MXS_AUART=y
 # CONFIG_HW_RANDOM is not set
-# CONFIG_I2C_COMPAT is not set
 CONFIG_I2C_CHARDEV=y
 CONFIG_I2C_MXS=y
 CONFIG_SPI=y
 CONFIG_SPI_GPIO=m
 CONFIG_SPI_MXS=y
-CONFIG_GPIO_SYSFS=y
 # CONFIG_HWMON is not set
 CONFIG_WATCHDOG=y
 CONFIG_STMP3XXX_RTC_WATCHDOG=y
@@ -138,10 +131,6 @@ CONFIG_PWM_MXS=y
 CONFIG_NVMEM_MXS_OCOTP=y
 CONFIG_EXT4_FS=y
 # CONFIG_DNOTIFY is not set
-CONFIG_NETFS_SUPPORT=m
-CONFIG_FSCACHE=y
-CONFIG_FSCACHE_STATS=y
-CONFIG_CACHEFILES=m
 CONFIG_VFAT_FS=y
 CONFIG_TMPFS=y
 CONFIG_TMPFS_POSIX_ACL=y
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [PATCH v4 6/6] ARM: mxs_defconfig: select new drivers used by imx28-amarula-rmm
  2025-05-29 14:35 [PATCH v4 0/6] Support i.MX28 Amarula rmm board Dario Binacchi
                   ` (4 preceding siblings ...)
  2025-05-29 14:35 ` [PATCH v4 5/6] ARM: mxs_defconfig: Cleanup mxs_defconfig Dario Binacchi
@ 2025-05-29 14:35 ` Dario Binacchi
  5 siblings, 0 replies; 11+ messages in thread
From: Dario Binacchi @ 2025-05-29 14:35 UTC (permalink / raw)
  To: linux-kernel
  Cc: linux-amarula, michael, Dario Binacchi, Ard Biesheuvel,
	Eric Biggers, Fabio Estevam, Martin K. Petersen,
	Pengutronix Kernel Team, Russell King, Sascha Hauer, Shawn Guo,
	imx, linux-arm-kernel

Select the options required by the imx28-amarula-rmm board.

Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>

---

Changes in v4:
- In mxs-lradc.txt:
  - Fix typo Low-Resoulution -> Low-Resolution'
  - Wrap lines at 80 char.
  - Drop '|' from the description
  - Describe what each interrupt is for.
  - Move touchscreen-wires constraint for imx28 to the top level
- In imx28-amarula-rmm.dts:
  - Drop label property (deprecated) under the leds sub-nodes.
  - Add microSD comment above the ssp0 node.
- Add patch 5/6 "ARM: mxs_defconfig: Cleanup mxs_defconfig"
- Add patch 6/6 "ARM: mxs_defconfig: select new drivers used by
  imx28-amarula-rmm"

Changes in v3:
- In imx28-amarula-rmm.dts:
  - Drop xceiver-supply property from can0 node.
  - Rearrange the order of specific nodes and properties
    alphabetically.

Changes in v2:
- In imx28-amarula-rmm.dts:
  - Replace '-' with '@' for the pinctrl sub-nodes.
  - Replace edt,edt-ft5x06 with edt,edt-ft5306.
  - Drop LCD reset hog pin.
  - Add correct #address-cells and #size-cells to gpmi node.
  - Replace edt-ft5x06@38 with touchscreen@38.
- Drop from commit messages all references to LCD display.
- Add patch [1/4] "dt-bindings: mfd: convert mxs-lradc bindings to
  json-schema".

 arch/arm/configs/mxs_defconfig | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/arch/arm/configs/mxs_defconfig b/arch/arm/configs/mxs_defconfig
index 91723fdd3c04..3b08c63b6de4 100644
--- a/arch/arm/configs/mxs_defconfig
+++ b/arch/arm/configs/mxs_defconfig
@@ -64,8 +64,11 @@ CONFIG_INPUT_EVDEV=y
 # CONFIG_INPUT_KEYBOARD is not set
 # CONFIG_INPUT_MOUSE is not set
 CONFIG_INPUT_TOUCHSCREEN=y
+CONFIG_TOUCHSCREEN_EDT_FT5X06=y
 CONFIG_TOUCHSCREEN_MXS_LRADC=y
 CONFIG_TOUCHSCREEN_TSC2007=m
+CONFIG_INPUT_MISC=y
+CONFIG_INPUT_PWM_BEEPER=y
 # CONFIG_SERIO is not set
 # CONFIG_LEGACY_PTYS is not set
 CONFIG_SERIAL_AMBA_PL011=y
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* Re: [PATCH v4 2/6] ARM: dts: imx28: add pwm7 muxing options
  2025-05-29 14:35 ` [PATCH v4 2/6] ARM: dts: imx28: add pwm7 muxing options Dario Binacchi
@ 2025-05-29 15:49   ` Frank Li
  0 siblings, 0 replies; 11+ messages in thread
From: Frank Li @ 2025-05-29 15:49 UTC (permalink / raw)
  To: Dario Binacchi
  Cc: linux-kernel, linux-amarula, michael, Conor Dooley, Fabio Estevam,
	Krzysztof Kozlowski, Pengutronix Kernel Team, Rob Herring,
	Sascha Hauer, Shawn Guo, devicetree, imx, linux-arm-kernel

On Thu, May 29, 2025 at 04:35:09PM +0200, Dario Binacchi wrote:
> Add alternative pinmuxing for pwm7.
>
> Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
>
> ---

Reviewed-by: Frank Li <Frank.Li@nxp.com>

>
> (no changes since v3)
>
> Changes in v3:
> - Add commit body
>
>  arch/arm/boot/dts/nxp/mxs/imx28.dtsi | 10 ++++++++++
>  1 file changed, 10 insertions(+)
>
> diff --git a/arch/arm/boot/dts/nxp/mxs/imx28.dtsi b/arch/arm/boot/dts/nxp/mxs/imx28.dtsi
> index bbea8b77386f..ece46d0e7c7f 100644
> --- a/arch/arm/boot/dts/nxp/mxs/imx28.dtsi
> +++ b/arch/arm/boot/dts/nxp/mxs/imx28.dtsi
> @@ -755,6 +755,16 @@ MX28_PAD_PWM4__PWM_4
>  					fsl,pull-up = <MXS_PULL_DISABLE>;
>  				};
>
> +				pwm7_pins_a: pwm7@0 {
> +					reg = <0>;
> +					fsl,pinmux-ids = <
> +						MX28_PAD_SAIF1_SDATA0__PWM_7
> +					>;
> +					fsl,drive-strength = <MXS_DRIVE_4mA>;
> +					fsl,voltage = <MXS_VOLTAGE_HIGH>;
> +					fsl,pull-up = <MXS_PULL_DISABLE>;
> +				};
> +
>  				lcdif_24bit_pins_a: lcdif-24bit@0 {
>  					reg = <0>;
>  					fsl,pinmux-ids = <
> --
> 2.43.0
>

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH v4 4/6] ARM: dts: mxs: support i.MX28 Amarula rmm board
  2025-05-29 14:35 ` [PATCH v4 4/6] ARM: dts: mxs: support " Dario Binacchi
@ 2025-05-29 15:54   ` Frank Li
  2025-05-30  7:16     ` Dario Binacchi
  0 siblings, 1 reply; 11+ messages in thread
From: Frank Li @ 2025-05-29 15:54 UTC (permalink / raw)
  To: Dario Binacchi
  Cc: linux-kernel, linux-amarula, michael, Conor Dooley, Fabio Estevam,
	Krzysztof Kozlowski, Pengutronix Kernel Team, Rob Herring,
	Sascha Hauer, Shawn Guo, devicetree, imx, linux-arm-kernel

On Thu, May 29, 2025 at 04:35:11PM +0200, Dario Binacchi wrote:
> The board includes the following resources:
>  - 256 Mbytes NAND Flash
>  - 128 Mbytes DRAM DDR2
>  - CAN
>  - USB 2.0 high-speed/full-speed
>  - Ethernet MAC
>
> Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
>
> ---
>
> Changes in v4:
> - Drop label property (deprecated) under the leds sub-nodes.
> - Add microSD comment above the ssp0 node.
>
> Changes in v3:
> - Drop xceiver-supply property from can0 node.
> - Rearrange the order of specific nodes and properties
>   alphabetically.
>
> Changes in v2:
> - Replace '-' with '@' for the pinctrl sub-nodes.
> - Replace edt,edt-ft5x06 with edt,edt-ft5306.
> - Drop LCD reset hog pin.
> - Add correct #address-cells and #size-cells to gpmi node.
> - Replace edt-ft5x06@38 with touchscreen@38.
>
>  arch/arm/boot/dts/nxp/mxs/Makefile            |   1 +
>  .../boot/dts/nxp/mxs/imx28-amarula-rmm.dts    | 301 ++++++++++++++++++
>  2 files changed, 302 insertions(+)
>  create mode 100644 arch/arm/boot/dts/nxp/mxs/imx28-amarula-rmm.dts
>
> diff --git a/arch/arm/boot/dts/nxp/mxs/Makefile b/arch/arm/boot/dts/nxp/mxs/Makefile
> index 96dd31ea19ba..d72ba702b6fa 100644
> --- a/arch/arm/boot/dts/nxp/mxs/Makefile
> +++ b/arch/arm/boot/dts/nxp/mxs/Makefile
> @@ -5,6 +5,7 @@ dtb-$(CONFIG_ARCH_MXS) += \
>  	imx23-sansa.dtb \
>  	imx23-stmp378x_devb.dtb \
>  	imx23-xfi3.dtb \
> +	imx28-amarula-rmm.dtb \
>  	imx28-apf28.dtb \
>  	imx28-apf28dev.dtb \
>  	imx28-apx4devkit.dtb \
> diff --git a/arch/arm/boot/dts/nxp/mxs/imx28-amarula-rmm.dts b/arch/arm/boot/dts/nxp/mxs/imx28-amarula-rmm.dts
> new file mode 100644
> index 000000000000..5ef9b79cda1c
> --- /dev/null
> +++ b/arch/arm/boot/dts/nxp/mxs/imx28-amarula-rmm.dts
> @@ -0,0 +1,301 @@
> +// SPDX-License-Identifier: GPL-2.0
> +/*
> + * Copyright (C) 2025 Amarula Solutions, Dario Binacchi <dario.binacchi@amarulasolutions.com>
> + */
> +
> +/dts-v1/;
> +
> +#include "imx28.dtsi"
> +#include <dt-bindings/gpio/gpio.h>
> +#include <dt-bindings/interrupt-controller/irq.h>
> +
> +/ {
> +	compatible = "amarula,imx28-rmm", "fsl,imx28";
> +	model = "Amarula i.MX28 rmm";
> +
> +	memory@40000000 {
> +		reg = <0x40000000 0x08000000>;
> +		device_type = "memory";
> +	};
> +
> +	backlight {
> +		compatible = "pwm-backlight";
> +		pwms = <&pwm 4 5000000 0>;
> +		brightness-levels = <0 255>;
> +		num-interpolated-steps = <255>;
> +		default-brightness-level = <255>;
> +		power-supply = <&reg_5v>;
> +	};
> +
> +	beeper {
> +		compatible = "pwm-beeper";
> +		pwms = <&pwm 7 100000 0>;
> +	};
> +
> +	leds {
> +		compatible = "gpio-leds";
> +		pinctrl-names = "default";
> +		pinctrl-0 = <&leds_pins>;
> +
> +		led-0 {
> +			gpios = <&gpio2 7 GPIO_ACTIVE_HIGH>;
> +			default-state = "off";
> +		};
> +
> +		led-1 {
> +			gpios = <&gpio3 16 GPIO_ACTIVE_HIGH>;
> +			default-state = "off";
> +		};
> +
> +		led-2 {
> +			gpios = <&gpio3 17 GPIO_ACTIVE_HIGH>;
> +			default-state = "off";
> +		};
> +	};
> +
> +	reg_1v8: regulator-1v8 {
> +		compatible = "regulator-fixed";
> +		regulator-name = "1v8";
> +		regulator-min-microvolt = <1800000>;
> +		regulator-max-microvolt = <1800000>;
> +	};
> +
> +	reg_3v3: regulator-3v3 {
> +		compatible = "regulator-fixed";
> +		regulator-name = "3v3";
> +		regulator-min-microvolt = <3300000>;
> +		regulator-max-microvolt = <3300000>;
> +		regulator-always-on;
> +	};
> +
> +	reg_5v: regulator-5v {
> +		compatible = "regulator-fixed";
> +		regulator-name = "5v";
> +		regulator-min-microvolt = <5000000>;
> +		regulator-max-microvolt = <5000000>;
> +		regulator-always-on;
> +	};
> +
> +	reg_fec_3v3: regulator-fec-3v3 {
> +		compatible = "regulator-fixed";
> +		pinctrl-names = "default";
> +		pinctrl-0 = <&fec_3v3_enable_pin>;
> +		regulator-name = "fec-3v3";
> +		regulator-min-microvolt = <3300000>;
> +		regulator-max-microvolt = <3300000>;
> +		gpios = <&gpio3 27 GPIO_ACTIVE_HIGH>;
> +		enable-active-high;
> +		startup-delay-us = <300000>;
> +		vin-supply = <&reg_5v>;
> +	};
> +
> +	reg_usb0_vbus: regulator-usb0-vbus {
> +		compatible = "regulator-fixed";
> +		pinctrl-names = "default";
> +		pinctrl-0 = <&usb0_vbus_enable_pin>;
> +		regulator-name = "usb0_vbus";
> +		regulator-min-microvolt = <5000000>;
> +		regulator-max-microvolt = <5000000>;
> +		gpio = <&gpio2 5 GPIO_ACTIVE_HIGH>;
> +		enable-active-high;
> +		regulator-always-on;
> +	};
> +
> +	reg_usb1_vbus: regulator-usb1-vbus {
> +		compatible = "regulator-fixed";
> +		pinctrl-names = "default";
> +		pinctrl-0 = <&usb1_vbus_enable_pin>;
> +		regulator-name = "usb1_vbus";
> +		regulator-min-microvolt = <5000000>;
> +		regulator-max-microvolt = <5000000>;
> +		gpio = <&gpio2 6 GPIO_ACTIVE_HIGH>;
> +		enable-active-high;
> +		regulator-always-on;
> +	};
> +};
> +
> +&auart0 {
> +	pinctrl-names = "default";
> +	pinctrl-0 = <&auart0_2pins_a>;
> +	status = "okay";
> +};
> +
> +&auart1 {
> +	pinctrl-names = "default";
> +	pinctrl-0 = <&auart1_pins_a>;
> +	status = "okay";
> +};
> +
> +&can0 {
> +	pinctrl-names = "default";
> +	pinctrl-0 = <&can0_pins_a>;
> +	status = "okay";
> +};
> +
> +&duart {
> +	pinctrl-names = "default";
> +	pinctrl-0 = <&duart_pins_b>;
> +	status = "okay";
> +};
> +
> +&duart_pins_b {
> +	fsl,voltage = <MXS_VOLTAGE_LOW>;
> +};
> +
> +&gpmi {
> +	#address-cells = <1>;
> +	#size-cells = <0>;

Needn't this, dtsi already set it.

> +	pinctrl-names = "default";
> +	pinctrl-0 = <&gpmi_pins_a &gpmi_status_cfg>;
> +	status = "okay";
> +};
> +
> +&i2c0 {
> +	pinctrl-names = "default";
> +	pinctrl-0 = <&i2c0_pins_a>;
> +	status = "okay";
> +
> +	touchscreen: touchscreen@38 {
> +		compatible = "edt,edt-ft5306";
> +		reg = <0x38>;
> +		pinctrl-names = "default";
> +		pinctrl-0 = <&edt_ft5x06_pins &edt_ft5x06_wake_pin>;
> +		interrupt-parent = <&gpio0>;
> +		interrupts = <19 IRQ_TYPE_EDGE_RISING>;
> +		reset-gpios = <&gpio0 21 GPIO_ACTIVE_LOW>;
> +		wake-gpios = <&gpio0 18 GPIO_ACTIVE_HIGH>;
> +	};
> +};
> +
> +&lradc {
> +	status = "okay";
> +};
> +
> +&mac0 {
> +	pinctrl-names = "default";
> +	pinctrl-0 = <&mac0_pins_a>;
> +	phy-mode = "rmii";
> +	phy-supply = <&reg_fec_3v3>;
> +	phy-handle = <&ethphy>;
> +	status = "okay";
> +
> +	mdio {
> +		#address-cells = <1>;
> +		#size-cells = <0>;
> +
> +		ethphy: ethernet-phy@0 {
> +			compatible = "ethernet-phy-ieee802.3-c22";
> +			reg = <0>;
> +			max-speed = <100>;
> +			reset-gpios = <&gpio3 28 GPIO_ACTIVE_LOW>;
> +			reset-assert-us = <4000>;
> +			reset-deassert-us = <4000>;
> +		};
> +	};
> +};
> +
> +&pinctrl {
> +	pinctrl-names = "default";
> +	pinctrl-0 = <&hog_pins_a>;
> +
> +	edt_ft5x06_pins: edt-ft5x06@0 {
> +		reg = <0>;
> +		fsl,pinmux-ids = <
> +			MX28_PAD_GPMI_RDY1__GPIO_0_21 /* Reset */
> +			MX28_PAD_GPMI_CE3N__GPIO_0_19 /* Interrupt */
> +		>;
> +		fsl,drive-strength = <MXS_DRIVE_4mA>;
> +		fsl,pull-up = <MXS_PULL_ENABLE>;
> +		fsl,voltage = <MXS_VOLTAGE_HIGH>;
> +	};
> +
> +	edt_ft5x06_wake_pin: edt-ft5x06-wake@0 {
> +		reg = <0>;

Any warning report if all reg is 0?

Frank
> +		fsl,pinmux-ids = <MX28_PAD_GPMI_CE2N__GPIO_0_18>;
> +		fsl,drive-strength = <MXS_DRIVE_16mA>;
> +		fsl,pull-up = <MXS_PULL_DISABLE>;
> +		fsl,voltage = <MXS_VOLTAGE_HIGH>;
> +	};
> +
> +	fec_3v3_enable_pin: fec-3v3-enable@0 {
> +		reg = <0>;
> +		fsl,pinmux-ids = <MX28_PAD_SPDIF__GPIO_3_27>;
> +		fsl,drive-strength = <MXS_DRIVE_4mA>;
> +		fsl,pull-up = <MXS_PULL_DISABLE>;
> +		fsl,voltage = <MXS_VOLTAGE_HIGH>;
> +	};
> +
> +	hog_pins_a: hog@0 {
> +		reg = <0>;
> +		fsl,pinmux-ids = <
> +			MX28_PAD_SSP2_SS1__GPIO_2_20  /* External power */
> +		>;
> +		fsl,drive-strength = <MXS_DRIVE_4mA>;
> +		fsl,pull-up = <MXS_PULL_DISABLE>;
> +		fsl,voltage = <MXS_VOLTAGE_HIGH>;
> +	};
> +
> +	leds_pins: leds@0 {
> +		reg = <0>;
> +		fsl,pinmux-ids = <
> +			MX28_PAD_SSP0_DATA7__GPIO_2_7
> +			MX28_PAD_PWM0__GPIO_3_16
> +			MX28_PAD_PWM1__GPIO_3_17
> +		>;
> +		fsl,drive-strength = <MXS_DRIVE_4mA>;
> +		fsl,pull-up = <MXS_PULL_DISABLE>;
> +		fsl,voltage = <MXS_VOLTAGE_HIGH>;
> +	};
> +
> +	usb0_vbus_enable_pin: usb0-vbus-enable@0 {
> +		reg = <0>;
> +		fsl,pinmux-ids = <MX28_PAD_SSP0_DATA5__GPIO_2_5>;
> +		fsl,drive-strength = <MXS_DRIVE_4mA>;
> +		fsl,pull-up = <MXS_PULL_DISABLE>;
> +		fsl,voltage = <MXS_VOLTAGE_HIGH>;
> +	};
> +
> +	usb1_vbus_enable_pin: usb1-vbus-enable@0 {
> +		reg = <0>;
> +		fsl,pinmux-ids = <MX28_PAD_SSP0_DATA6__GPIO_2_6>;
> +		fsl,drive-strength = <MXS_DRIVE_4mA>;
> +		fsl,pull-up = <MXS_PULL_DISABLE>;
> +		fsl,voltage = <MXS_VOLTAGE_HIGH>;
> +	};
> +};
> +
> +&pwm {
> +	pinctrl-names = "default";
> +	pinctrl-0 = <&pwm4_pins_a &pwm7_pins_a>;
> +	status = "okay";
> +};
> +
> +/* microSD */
> +&ssp0 {
> +	compatible = "fsl,imx28-mmc";
> +	pinctrl-names = "default";
> +	pinctrl-0 = <&mmc0_4bit_pins_a &mmc0_sck_cfg>;
> +	broken-cd;
> +	bus-width = <4>;
> +	status = "okay";
> +};
> +
> +&usb0 {
> +	dr_mode = "host";
> +	vbus-supply = <&reg_usb0_vbus>;
> +	status = "okay";
> +};
> +
> +&usb1 {
> +	dr_mode = "host";
> +	vbus-supply = <&reg_usb1_vbus>;
> +	status = "okay";
> +};
> +
> +&usbphy0 {
> +	status = "okay";
> +};
> +
> +&usbphy1 {
> +	status = "okay";
> +};
> --
> 2.43.0
>

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH v4 4/6] ARM: dts: mxs: support i.MX28 Amarula rmm board
  2025-05-29 15:54   ` Frank Li
@ 2025-05-30  7:16     ` Dario Binacchi
  0 siblings, 0 replies; 11+ messages in thread
From: Dario Binacchi @ 2025-05-30  7:16 UTC (permalink / raw)
  To: Frank Li
  Cc: linux-kernel, linux-amarula, michael, Conor Dooley, Fabio Estevam,
	Krzysztof Kozlowski, Pengutronix Kernel Team, Rob Herring,
	Sascha Hauer, Shawn Guo, devicetree, imx, linux-arm-kernel

Hi Frank,

On Thu, May 29, 2025 at 5:55 PM Frank Li <Frank.li@nxp.com> wrote:
>
> On Thu, May 29, 2025 at 04:35:11PM +0200, Dario Binacchi wrote:
> > The board includes the following resources:
> >  - 256 Mbytes NAND Flash
> >  - 128 Mbytes DRAM DDR2
> >  - CAN
> >  - USB 2.0 high-speed/full-speed
> >  - Ethernet MAC
> >
> > Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
> >
> > ---
> >
> > Changes in v4:
> > - Drop label property (deprecated) under the leds sub-nodes.
> > - Add microSD comment above the ssp0 node.
> >
> > Changes in v3:
> > - Drop xceiver-supply property from can0 node.
> > - Rearrange the order of specific nodes and properties
> >   alphabetically.
> >
> > Changes in v2:
> > - Replace '-' with '@' for the pinctrl sub-nodes.
> > - Replace edt,edt-ft5x06 with edt,edt-ft5306.
> > - Drop LCD reset hog pin.
> > - Add correct #address-cells and #size-cells to gpmi node.
> > - Replace edt-ft5x06@38 with touchscreen@38.
> >
> >  arch/arm/boot/dts/nxp/mxs/Makefile            |   1 +
> >  .../boot/dts/nxp/mxs/imx28-amarula-rmm.dts    | 301 ++++++++++++++++++
> >  2 files changed, 302 insertions(+)
> >  create mode 100644 arch/arm/boot/dts/nxp/mxs/imx28-amarula-rmm.dts
> >
> > diff --git a/arch/arm/boot/dts/nxp/mxs/Makefile b/arch/arm/boot/dts/nxp/mxs/Makefile
> > index 96dd31ea19ba..d72ba702b6fa 100644
> > --- a/arch/arm/boot/dts/nxp/mxs/Makefile
> > +++ b/arch/arm/boot/dts/nxp/mxs/Makefile
> > @@ -5,6 +5,7 @@ dtb-$(CONFIG_ARCH_MXS) += \
> >       imx23-sansa.dtb \
> >       imx23-stmp378x_devb.dtb \
> >       imx23-xfi3.dtb \
> > +     imx28-amarula-rmm.dtb \
> >       imx28-apf28.dtb \
> >       imx28-apf28dev.dtb \
> >       imx28-apx4devkit.dtb \
> > diff --git a/arch/arm/boot/dts/nxp/mxs/imx28-amarula-rmm.dts b/arch/arm/boot/dts/nxp/mxs/imx28-amarula-rmm.dts
> > new file mode 100644
> > index 000000000000..5ef9b79cda1c
> > --- /dev/null
> > +++ b/arch/arm/boot/dts/nxp/mxs/imx28-amarula-rmm.dts
> > @@ -0,0 +1,301 @@
> > +// SPDX-License-Identifier: GPL-2.0
> > +/*
> > + * Copyright (C) 2025 Amarula Solutions, Dario Binacchi <dario.binacchi@amarulasolutions.com>
> > + */
> > +
> > +/dts-v1/;
> > +
> > +#include "imx28.dtsi"
> > +#include <dt-bindings/gpio/gpio.h>
> > +#include <dt-bindings/interrupt-controller/irq.h>
> > +
> > +/ {
> > +     compatible = "amarula,imx28-rmm", "fsl,imx28";
> > +     model = "Amarula i.MX28 rmm";
> > +
> > +     memory@40000000 {
> > +             reg = <0x40000000 0x08000000>;
> > +             device_type = "memory";
> > +     };
> > +
> > +     backlight {
> > +             compatible = "pwm-backlight";
> > +             pwms = <&pwm 4 5000000 0>;
> > +             brightness-levels = <0 255>;
> > +             num-interpolated-steps = <255>;
> > +             default-brightness-level = <255>;
> > +             power-supply = <&reg_5v>;
> > +     };
> > +
> > +     beeper {
> > +             compatible = "pwm-beeper";
> > +             pwms = <&pwm 7 100000 0>;
> > +     };
> > +
> > +     leds {
> > +             compatible = "gpio-leds";
> > +             pinctrl-names = "default";
> > +             pinctrl-0 = <&leds_pins>;
> > +
> > +             led-0 {
> > +                     gpios = <&gpio2 7 GPIO_ACTIVE_HIGH>;
> > +                     default-state = "off";
> > +             };
> > +
> > +             led-1 {
> > +                     gpios = <&gpio3 16 GPIO_ACTIVE_HIGH>;
> > +                     default-state = "off";
> > +             };
> > +
> > +             led-2 {
> > +                     gpios = <&gpio3 17 GPIO_ACTIVE_HIGH>;
> > +                     default-state = "off";
> > +             };
> > +     };
> > +
> > +     reg_1v8: regulator-1v8 {
> > +             compatible = "regulator-fixed";
> > +             regulator-name = "1v8";
> > +             regulator-min-microvolt = <1800000>;
> > +             regulator-max-microvolt = <1800000>;
> > +     };
> > +
> > +     reg_3v3: regulator-3v3 {
> > +             compatible = "regulator-fixed";
> > +             regulator-name = "3v3";
> > +             regulator-min-microvolt = <3300000>;
> > +             regulator-max-microvolt = <3300000>;
> > +             regulator-always-on;
> > +     };
> > +
> > +     reg_5v: regulator-5v {
> > +             compatible = "regulator-fixed";
> > +             regulator-name = "5v";
> > +             regulator-min-microvolt = <5000000>;
> > +             regulator-max-microvolt = <5000000>;
> > +             regulator-always-on;
> > +     };
> > +
> > +     reg_fec_3v3: regulator-fec-3v3 {
> > +             compatible = "regulator-fixed";
> > +             pinctrl-names = "default";
> > +             pinctrl-0 = <&fec_3v3_enable_pin>;
> > +             regulator-name = "fec-3v3";
> > +             regulator-min-microvolt = <3300000>;
> > +             regulator-max-microvolt = <3300000>;
> > +             gpios = <&gpio3 27 GPIO_ACTIVE_HIGH>;
> > +             enable-active-high;
> > +             startup-delay-us = <300000>;
> > +             vin-supply = <&reg_5v>;
> > +     };
> > +
> > +     reg_usb0_vbus: regulator-usb0-vbus {
> > +             compatible = "regulator-fixed";
> > +             pinctrl-names = "default";
> > +             pinctrl-0 = <&usb0_vbus_enable_pin>;
> > +             regulator-name = "usb0_vbus";
> > +             regulator-min-microvolt = <5000000>;
> > +             regulator-max-microvolt = <5000000>;
> > +             gpio = <&gpio2 5 GPIO_ACTIVE_HIGH>;
> > +             enable-active-high;
> > +             regulator-always-on;
> > +     };
> > +
> > +     reg_usb1_vbus: regulator-usb1-vbus {
> > +             compatible = "regulator-fixed";
> > +             pinctrl-names = "default";
> > +             pinctrl-0 = <&usb1_vbus_enable_pin>;
> > +             regulator-name = "usb1_vbus";
> > +             regulator-min-microvolt = <5000000>;
> > +             regulator-max-microvolt = <5000000>;
> > +             gpio = <&gpio2 6 GPIO_ACTIVE_HIGH>;
> > +             enable-active-high;
> > +             regulator-always-on;
> > +     };
> > +};
> > +
> > +&auart0 {
> > +     pinctrl-names = "default";
> > +     pinctrl-0 = <&auart0_2pins_a>;
> > +     status = "okay";
> > +};
> > +
> > +&auart1 {
> > +     pinctrl-names = "default";
> > +     pinctrl-0 = <&auart1_pins_a>;
> > +     status = "okay";
> > +};
> > +
> > +&can0 {
> > +     pinctrl-names = "default";
> > +     pinctrl-0 = <&can0_pins_a>;
> > +     status = "okay";
> > +};
> > +
> > +&duart {
> > +     pinctrl-names = "default";
> > +     pinctrl-0 = <&duart_pins_b>;
> > +     status = "okay";
> > +};
> > +
> > +&duart_pins_b {
> > +     fsl,voltage = <MXS_VOLTAGE_LOW>;
> > +};
> > +
> > +&gpmi {
> > +     #address-cells = <1>;
> > +     #size-cells = <0>;
>
> Needn't this, dtsi already set it.

Yes,  I can drop #address-cells, it's already set by imx28.dtsi
But I must re-set size-cells.

>
> > +     pinctrl-names = "default";
> > +     pinctrl-0 = <&gpmi_pins_a &gpmi_status_cfg>;
> > +     status = "okay";
> > +};
> > +
> > +&i2c0 {
> > +     pinctrl-names = "default";
> > +     pinctrl-0 = <&i2c0_pins_a>;
> > +     status = "okay";
> > +
> > +     touchscreen: touchscreen@38 {
> > +             compatible = "edt,edt-ft5306";
> > +             reg = <0x38>;
> > +             pinctrl-names = "default";
> > +             pinctrl-0 = <&edt_ft5x06_pins &edt_ft5x06_wake_pin>;
> > +             interrupt-parent = <&gpio0>;
> > +             interrupts = <19 IRQ_TYPE_EDGE_RISING>;
> > +             reset-gpios = <&gpio0 21 GPIO_ACTIVE_LOW>;
> > +             wake-gpios = <&gpio0 18 GPIO_ACTIVE_HIGH>;
> > +     };
> > +};
> > +
> > +&lradc {
> > +     status = "okay";
> > +};
> > +
> > +&mac0 {
> > +     pinctrl-names = "default";
> > +     pinctrl-0 = <&mac0_pins_a>;
> > +     phy-mode = "rmii";
> > +     phy-supply = <&reg_fec_3v3>;
> > +     phy-handle = <&ethphy>;
> > +     status = "okay";
> > +
> > +     mdio {
> > +             #address-cells = <1>;
> > +             #size-cells = <0>;
> > +
> > +             ethphy: ethernet-phy@0 {
> > +                     compatible = "ethernet-phy-ieee802.3-c22";
> > +                     reg = <0>;
> > +                     max-speed = <100>;
> > +                     reset-gpios = <&gpio3 28 GPIO_ACTIVE_LOW>;
> > +                     reset-assert-us = <4000>;
> > +                     reset-deassert-us = <4000>;
> > +             };
> > +     };
> > +};
> > +
> > +&pinctrl {
> > +     pinctrl-names = "default";
> > +     pinctrl-0 = <&hog_pins_a>;
> > +
> > +     edt_ft5x06_pins: edt-ft5x06@0 {
> > +             reg = <0>;
> > +             fsl,pinmux-ids = <
> > +                     MX28_PAD_GPMI_RDY1__GPIO_0_21 /* Reset */
> > +                     MX28_PAD_GPMI_CE3N__GPIO_0_19 /* Interrupt */
> > +             >;
> > +             fsl,drive-strength = <MXS_DRIVE_4mA>;
> > +             fsl,pull-up = <MXS_PULL_ENABLE>;
> > +             fsl,voltage = <MXS_VOLTAGE_HIGH>;
> > +     };
> > +
> > +     edt_ft5x06_wake_pin: edt-ft5x06-wake@0 {
> > +             reg = <0>;
>
> Any warning report if all reg is 0?

No, I don't see any warnings of that kind. Nor do I see them for those
contained in imx28.dtsi.

Thanks and regards,
Dario
>
> Frank
> > +             fsl,pinmux-ids = <MX28_PAD_GPMI_CE2N__GPIO_0_18>;
> > +             fsl,drive-strength = <MXS_DRIVE_16mA>;
> > +             fsl,pull-up = <MXS_PULL_DISABLE>;
> > +             fsl,voltage = <MXS_VOLTAGE_HIGH>;
> > +     };
> > +
> > +     fec_3v3_enable_pin: fec-3v3-enable@0 {
> > +             reg = <0>;
> > +             fsl,pinmux-ids = <MX28_PAD_SPDIF__GPIO_3_27>;
> > +             fsl,drive-strength = <MXS_DRIVE_4mA>;
> > +             fsl,pull-up = <MXS_PULL_DISABLE>;
> > +             fsl,voltage = <MXS_VOLTAGE_HIGH>;
> > +     };
> > +
> > +     hog_pins_a: hog@0 {
> > +             reg = <0>;
> > +             fsl,pinmux-ids = <
> > +                     MX28_PAD_SSP2_SS1__GPIO_2_20  /* External power */
> > +             >;
> > +             fsl,drive-strength = <MXS_DRIVE_4mA>;
> > +             fsl,pull-up = <MXS_PULL_DISABLE>;
> > +             fsl,voltage = <MXS_VOLTAGE_HIGH>;
> > +     };
> > +
> > +     leds_pins: leds@0 {
> > +             reg = <0>;
> > +             fsl,pinmux-ids = <
> > +                     MX28_PAD_SSP0_DATA7__GPIO_2_7
> > +                     MX28_PAD_PWM0__GPIO_3_16
> > +                     MX28_PAD_PWM1__GPIO_3_17
> > +             >;
> > +             fsl,drive-strength = <MXS_DRIVE_4mA>;
> > +             fsl,pull-up = <MXS_PULL_DISABLE>;
> > +             fsl,voltage = <MXS_VOLTAGE_HIGH>;
> > +     };
> > +
> > +     usb0_vbus_enable_pin: usb0-vbus-enable@0 {
> > +             reg = <0>;
> > +             fsl,pinmux-ids = <MX28_PAD_SSP0_DATA5__GPIO_2_5>;
> > +             fsl,drive-strength = <MXS_DRIVE_4mA>;
> > +             fsl,pull-up = <MXS_PULL_DISABLE>;
> > +             fsl,voltage = <MXS_VOLTAGE_HIGH>;
> > +     };
> > +
> > +     usb1_vbus_enable_pin: usb1-vbus-enable@0 {
> > +             reg = <0>;
> > +             fsl,pinmux-ids = <MX28_PAD_SSP0_DATA6__GPIO_2_6>;
> > +             fsl,drive-strength = <MXS_DRIVE_4mA>;
> > +             fsl,pull-up = <MXS_PULL_DISABLE>;
> > +             fsl,voltage = <MXS_VOLTAGE_HIGH>;
> > +     };
> > +};
> > +
> > +&pwm {
> > +     pinctrl-names = "default";
> > +     pinctrl-0 = <&pwm4_pins_a &pwm7_pins_a>;
> > +     status = "okay";
> > +};
> > +
> > +/* microSD */
> > +&ssp0 {
> > +     compatible = "fsl,imx28-mmc";
> > +     pinctrl-names = "default";
> > +     pinctrl-0 = <&mmc0_4bit_pins_a &mmc0_sck_cfg>;
> > +     broken-cd;
> > +     bus-width = <4>;
> > +     status = "okay";
> > +};
> > +
> > +&usb0 {
> > +     dr_mode = "host";
> > +     vbus-supply = <&reg_usb0_vbus>;
> > +     status = "okay";
> > +};
> > +
> > +&usb1 {
> > +     dr_mode = "host";
> > +     vbus-supply = <&reg_usb1_vbus>;
> > +     status = "okay";
> > +};
> > +
> > +&usbphy0 {
> > +     status = "okay";
> > +};
> > +
> > +&usbphy1 {
> > +     status = "okay";
> > +};
> > --
> > 2.43.0
> >



-- 

Dario Binacchi

Senior Embedded Linux Developer

dario.binacchi@amarulasolutions.com

__________________________________


Amarula Solutions SRL

Via Le Canevare 30, 31100 Treviso, Veneto, IT

T. +39 042 243 5310
info@amarulasolutions.com

www.amarulasolutions.com

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH v4 1/6] dt-bindings: mfd: convert mxs-lradc bindings to json-schema
  2025-05-29 14:35 ` [PATCH v4 1/6] dt-bindings: mfd: convert mxs-lradc bindings to json-schema Dario Binacchi
@ 2025-05-30 14:37   ` Rob Herring
  0 siblings, 0 replies; 11+ messages in thread
From: Rob Herring @ 2025-05-30 14:37 UTC (permalink / raw)
  To: Dario Binacchi
  Cc: linux-kernel, linux-amarula, michael, Conor Dooley, Conor Dooley,
	Fabio Estevam, Krzysztof Kozlowski, Lee Jones,
	Pengutronix Kernel Team, Sascha Hauer, Shawn Guo, devicetree, imx,
	linux-arm-kernel

On Thu, May 29, 2025 at 04:35:08PM +0200, Dario Binacchi wrote:
> Convert the Freescale MXS Low-Resoulution ADC (LRADC) device tree
> binding documentation to json-schema.
> 
> The clocks and #io-channel-cells properties have also been added; They
> are present in the respective SoC DTSI files but were missing from the
> old mxs-lradc.txt file.
> 
> Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
> Reviewed-by: Conor Dooley <conor.dooley@microchip.com>
> 
> ---
> 
> Changes in v4:
> - Fix typo Low-Resoulution -> Low-Resolution'
> - Wrap lines at 80 char.
> - Drop '|' from the description
> - Describe what each interrupt is for.
> - Move touchscreen-wires constraint for imx28 to the top level
> 
> Changes in v3:
> - Add Reviewed-by tag of Conor Dooley
> 
>  .../devicetree/bindings/mfd/mxs-lradc.txt     |  45 ------
>  .../devicetree/bindings/mfd/mxs-lradc.yaml    | 131 ++++++++++++++++++
>  2 files changed, 131 insertions(+), 45 deletions(-)
>  delete mode 100644 Documentation/devicetree/bindings/mfd/mxs-lradc.txt
>  create mode 100644 Documentation/devicetree/bindings/mfd/mxs-lradc.yaml
> 
> diff --git a/Documentation/devicetree/bindings/mfd/mxs-lradc.txt b/Documentation/devicetree/bindings/mfd/mxs-lradc.txt
> deleted file mode 100644
> index 755cbef0647d..000000000000
> --- a/Documentation/devicetree/bindings/mfd/mxs-lradc.txt
> +++ /dev/null
> @@ -1,45 +0,0 @@
> -* Freescale MXS LRADC device driver
> -
> -Required properties:
> -- compatible: Should be "fsl,imx23-lradc" for i.MX23 SoC and "fsl,imx28-lradc"
> -              for i.MX28 SoC
> -- reg: Address and length of the register set for the device
> -- interrupts: Should contain the LRADC interrupts
> -
> -Optional properties:
> -- fsl,lradc-touchscreen-wires: Number of wires used to connect the touchscreen
> -                               to LRADC. Valid value is either 4 or 5. If this
> -                               property is not present, then the touchscreen is
> -                               disabled. 5 wires is valid for i.MX28 SoC only.
> -- fsl,ave-ctrl: number of samples per direction to calculate an average value.
> -                Allowed value is 1 ... 32, default is 4
> -- fsl,ave-delay: delay between consecutive samples. Allowed value is
> -                 2 ... 2048. It is used if 'fsl,ave-ctrl' > 1, counts at
> -                 2 kHz and its default is 2 (= 1 ms)
> -- fsl,settling: delay between plate switch to next sample. Allowed value is
> -                1 ... 2047. It counts at 2 kHz and its default is
> -                10 (= 5 ms)
> -
> -Example for i.MX23 SoC:
> -
> -	lradc@80050000 {
> -		compatible = "fsl,imx23-lradc";
> -		reg = <0x80050000 0x2000>;
> -		interrupts = <36 37 38 39 40 41 42 43 44>;
> -		fsl,lradc-touchscreen-wires = <4>;
> -		fsl,ave-ctrl = <4>;
> -		fsl,ave-delay = <2>;
> -		fsl,settling = <10>;
> -	};
> -
> -Example for i.MX28 SoC:
> -
> -	lradc@80050000 {
> -		compatible = "fsl,imx28-lradc";
> -		reg = <0x80050000 0x2000>;
> -		interrupts = <10 14 15 16 17 18 19 20 21 22 23 24 25>;
> -		fsl,lradc-touchscreen-wires = <5>;
> -		fsl,ave-ctrl = <4>;
> -		fsl,ave-delay = <2>;
> -		fsl,settling = <10>;
> -	};
> diff --git a/Documentation/devicetree/bindings/mfd/mxs-lradc.yaml b/Documentation/devicetree/bindings/mfd/mxs-lradc.yaml
> new file mode 100644
> index 000000000000..f90fdfbb74a8
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/mfd/mxs-lradc.yaml
> @@ -0,0 +1,131 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/mfd/mxs-lradc.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Freescale MXS Low-Resolution ADC (LRADC)
> +
> +maintainers:
> +  - Dario Binacchi <dario.binacchi@amarulasolutions.com>
> +
> +description:
> +  The LRADC provides 16 physical channels of 12-bit resolution for
> +  analog-to-digital conversion and includes an integrated 4-wire/5-wire
> +  touchscreen controller.
> +
> +properties:
> +  compatible:
> +    items:
> +      - enum:
> +          - fsl,imx23-lradc
> +          - fsl,imx28-lradc
> +
> +  reg:
> +    maxItems: 1
> +
> +  clocks:
> +    minItems: 1
> +
> +  interrupts:
> +    minItems: 9
> +    maxItems: 13
> +
> +  fsl,lradc-touchscreen-wires:
> +    $ref: /schemas/types.yaml#/definitions/uint32
> +    enum: [4, 5]
> +    description:
> +      Number of wires used to connect the touchscreen to LRADC.
> +      If this property is not present, then the touchscreen is disabled.

Is this 1 paragraph or 2? If 1, it is not wrapped properly.

If 2, then it should have a blank line in between paragraphs and use 
'>':

    description: >
      Number of wires used to connect the touchscreen to LRADC.

      If this property is not present, then the touchscreen is disabled.


See writing-schema.rst for more details.

> +
> +  fsl,ave-ctrl:
> +    $ref: /schemas/types.yaml#/definitions/uint32
> +    minimum: 1
> +    maximum: 32
> +    default: 4
> +    description: |

Don't need '|'.

> +      Number of samples per direction to calculate an average value.
> +
> +  fsl,ave-delay:
> +    $ref: /schemas/types.yaml#/definitions/uint32
> +    minimum: 2
> +    maximum: 2048
> +    default: 2
> +    description:
> +      Delay between consecutive samples.
> +      It is used if 'fsl,ave-ctrl' > 1, counts at 2 kHz and its
> +      default value (i. e. 2) is 1 ms.

1 paragraph or 2?

> +
> +  fsl,settling:
> +    $ref: /schemas/types.yaml#/definitions/uint32
> +    minimum: 1
> +    maximum: 2047
> +    default: 10
> +    description:
> +      Delay between plate switch to next sample.
> +      It counts at 2 kHz and its default (i. e. 10) is 5 ms.

1 paragraph or 2?

> +
> +  "#io-channel-cells":
> +    const: 1
> +
> +required:
> +  - compatible
> +  - reg
> +  - clocks
> +  - interrupts
> +
> +if:
> +  properties:
> +    compatible:
> +      contains:
> +        enum:
> +          - fsl,imx23-lradc
> +then:
> +  properties:
> +    interrupts:
> +      items:
> +        - description: channel 0
> +        - description: channel 1
> +        - description: channel 2
> +        - description: channel 3
> +        - description: channel 4
> +        - description: channel 5
> +        - description: touchscreen
> +        - description: channel 6
> +        - description: channel 7
> +    fsl,lradc-touchscreen-wires:
> +      const: 4
> +else:
> +  properties:
> +    interrupts:
> +      items:
> +        - description: threshold 0
> +        - description: threshold 1
> +        - description: channel 0
> +        - description: channel 1
> +        - description: channel 2
> +        - description: channel 3
> +        - description: channel 4
> +        - description: channel 5
> +        - description: button 0
> +        - description: button 1
> +        - description: touchscreen
> +        - description: channel 6
> +        - description: channel 7
> +
> +additionalProperties: false
> +
> +examples:
> +  - |
> +    lradc@80050000 {
> +        compatible = "fsl,imx23-lradc";
> +        reg = <0x80050000 0x2000>;
> +        interrupts = <36>, <37>, <38>, <39>, <40>,
> +                     <41>, <42>, <43>, <44>;
> +        clocks = <&clks 26>;
> +        #io-channel-cells = <1>;
> +        fsl,lradc-touchscreen-wires = <4>;
> +        fsl,ave-ctrl = <4>;
> +        fsl,ave-delay = <2>;
> +        fsl,settling = <10>;
> +    };
> -- 
> 2.43.0
> 

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2025-05-30 14:37 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-05-29 14:35 [PATCH v4 0/6] Support i.MX28 Amarula rmm board Dario Binacchi
2025-05-29 14:35 ` [PATCH v4 1/6] dt-bindings: mfd: convert mxs-lradc bindings to json-schema Dario Binacchi
2025-05-30 14:37   ` Rob Herring
2025-05-29 14:35 ` [PATCH v4 2/6] ARM: dts: imx28: add pwm7 muxing options Dario Binacchi
2025-05-29 15:49   ` Frank Li
2025-05-29 14:35 ` [PATCH v4 3/6] dt-bindings: arm: fsl: add i.MX28 Amarula rmm board Dario Binacchi
2025-05-29 14:35 ` [PATCH v4 4/6] ARM: dts: mxs: support " Dario Binacchi
2025-05-29 15:54   ` Frank Li
2025-05-30  7:16     ` Dario Binacchi
2025-05-29 14:35 ` [PATCH v4 5/6] ARM: mxs_defconfig: Cleanup mxs_defconfig Dario Binacchi
2025-05-29 14:35 ` [PATCH v4 6/6] ARM: mxs_defconfig: select new drivers used by imx28-amarula-rmm Dario Binacchi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).