Skip to contentSkip to conversation

Cleanup devicetree for the i.MX53 based TQma53 + mba53 development kit

PATCH New Juergen Borleis 1 participant 10 messages Sep 7, 2017

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

This series is a cleanup of the devicetree for the TQ's 'TQma53' CPU card in conjunction with its 'mba53' development baseboard. The cleanup should also simplify the use of the 'TQma53' CPU card for a customized baseboard instead of the development baseboard.

Comments are welcome.

Juergen

#1 lore raw

PATCH 1/9 ARM: dts: TQma53: regulators are no bus

---
 arch/arm/boot/dts/imx53-mba53.dts   | 33 +++++++++++++--------------------
 arch/arm/boot/dts/imx53-tqma53.dtsi | 19 ++++++-------------
 2 files changed, 19 insertions(+), 33 deletions(-)
arch/arm/boot/dts/imx53-mba53.dts +13 -20
index df705ba48897f..11c61844d5d85 100644
@@ -44,27 +44,20 @@
 		};
 	};
 
-	regulators {
-		compatible = "simple-bus";
-		#address-cells = <1>;
-		#size-cells = <0>;
-
-		reg_backlight: regulator at 0 {
-			compatible = "regulator-fixed";
-			reg = <0>;
-			regulator-name = "lcd-supply";
-			gpio = <&gpio2 5 0>;
-			startup-delay-us = <5000>;
-		};
 
-		reg_3p2v: regulator at 1 {
-			compatible = "regulator-fixed";
-			reg = <1>;
-			regulator-name = "3P2V";
-			regulator-min-microvolt = <3200000>;
-			regulator-max-microvolt = <3200000>;
-			regulator-always-on;
-		};
+	reg_backlight: backlight {
+		compatible = "regulator-fixed";
+		regulator-name = "lcd-supply";
+		gpio = <&gpio2 5 0>;
+		startup-delay-us = <5000>;
+	};
+
+	reg_3p2v: base3p2v {
+		compatible = "regulator-fixed";
+		regulator-name = "3P2V";
+		regulator-min-microvolt = <3200000>;
+		regulator-max-microvolt = <3200000>;
+		regulator-always-on;
 	};
 
 	sound {
arch/arm/boot/dts/imx53-tqma53.dtsi +6 -13
index eecdc1c55eefc..4aff91e31f288 100644
@@ -20,19 +20,12 @@
 		reg = <0x70000000 0x40000000>; /* Up to 1GiB */
 	};
 
-	regulators {
-		compatible = "simple-bus";
-		#address-cells = <1>;
-		#size-cells = <0>;
-
-		reg_3p3v: regulator at 0 {
-			compatible = "regulator-fixed";
-			reg = <0>;
-			regulator-name = "3P3V";
-			regulator-min-microvolt = <3300000>;
-			regulator-max-microvolt = <3300000>;
-			regulator-always-on;
-		};
+	reg_3p3v: card3p3v {
+		compatible = "regulator-fixed";
+		regulator-name = "3P3V";
+		regulator-min-microvolt = <3300000>;
+		regulator-max-microvolt = <3300000>;
+		regulator-always-on;
 	};
 };
 
Signature · 1 line
2.11.0
#2 lore raw

PATCH 2/9 ARM: dts: TQma53: define GPIO's active level by macro instead of anonymous number

In reply to Juergen Borleis
---
 arch/arm/boot/dts/imx53-mba53.dts | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/boot/dts/imx53-mba53.dts +1 -1
index 11c61844d5d85..5a21562a2dc1b 100644
@@ -48,7 +48,7 @@
 	reg_backlight: backlight {
 		compatible = "regulator-fixed";
 		regulator-name = "lcd-supply";
-		gpio = <&gpio2 5 0>;
+		gpio = <&gpio2 5 GPIO_ACTIVE_HIGH>;
 		startup-delay-us = <5000>;
 	};
 
Signature · 1 line
2.11.0
#3 lore raw

PATCH 3/9 ARM: dts: TQma53: define IRQ's active level by macro instead of anonymous number

In reply to Juergen Borleis
---
 arch/arm/boot/dts/imx53-tqma53.dtsi | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/boot/dts/imx53-tqma53.dtsi +1 -1
index 4aff91e31f288..eedeced3c8810 100644
@@ -256,7 +256,7 @@
 		reg = <0x8>;
 		fsl,mc13xxx-uses-rtc;
 		interrupt-parent = <&gpio2>;
-		interrupts = <6 4>; /* PATA_DATA6, active high */
+		interrupts = <6 IRQ_TYPE_LEVEL_HIGH>;
 	};
 
 	sensor1: lm75 at 48 {
Signature · 1 line
2.11.0
#4 lore raw

PATCH 4/9 ARM: dts: TQma53: ESDHC2: use correct IO lines power supply

In reply to Juergen Borleis

According to the devicetree bindings the 'vmmc' power supply is the SD card's power supply and 'vqmmc' is the IO line's power supply.

The i.MX53's ESDHC2 unit on the 'TQma53' CPU card is dedicated to be used with an externally connected SD card. The on-board power supply is connected to the SDHC2 IO lines only. The SD card socket is not part of the CPU card, so the 'vmmc' info must be part of the baseboard devicetree.

---
 arch/arm/boot/dts/imx53-mba53.dts   | 1 +
 arch/arm/boot/dts/imx53-tqma53.dtsi | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)
arch/arm/boot/dts/imx53-mba53.dts +1 -0
index 5a21562a2dc1b..69733c8473d2b 100644
@@ -193,6 +193,7 @@
 };
 
 &esdhc2 {
+	vmmc-supply = <&reg_3p3v>;
 	status = "okay";
 };
 
arch/arm/boot/dts/imx53-tqma53.dtsi +1 -1
index eedeced3c8810..ceba1004038b1 100644
@@ -33,7 +33,7 @@
 	pinctrl-names = "default";
 	pinctrl-0 = <&pinctrl_esdhc2>,
 		    <&pinctrl_esdhc2_cdwp>;
-	vmmc-supply = <&reg_3p3v>;
+	vqmmc-supply = <&reg_3p3v>;
 	wp-gpios = <&gpio1 2 GPIO_ACTIVE_HIGH>;
 	cd-gpios = <&gpio1 4 GPIO_ACTIVE_LOW>;
 	status = "disabled";
Signature · 1 line
2.11.0
#5 lore raw

PATCH 5/9 ARM: dts: TQma53: define eMMC's power supply

In reply to Juergen Borleis

The eMMC is part of the 'TQma53' CPU card and powered by its on-board power supply.

---
 arch/arm/boot/dts/imx53-tqma53.dtsi | 1 +
 1 file changed, 1 insertion(+)
arch/arm/boot/dts/imx53-tqma53.dtsi +1 -0
index ceba1004038b1..fa5d712bd47b8 100644
@@ -57,6 +57,7 @@
 	pinctrl-names = "default";
 	pinctrl-0 = <&pinctrl_esdhc3>;
 	vmmc-supply = <&reg_3p3v>;
+	vqmmc-supply = <&reg_3p3v>;
 	non-removable;
 	bus-width = <8>;
 	status = "okay";
Signature · 1 line
2.11.0
#6 lore raw

PATCH 6/9 ARM: dts: TQma53: fix and move regulator to its correct location

In reply to Juergen Borleis

The referenced 3.3 V regulator is a 3.2 V regulator and part of the 'TQma53' CPU card instead of the development 'mba53' baseboard. So fix the voltage and move it to where it belongs to.

---
 arch/arm/boot/dts/imx53-mba53.dts   | 10 +---------
 arch/arm/boot/dts/imx53-tqma53.dtsi | 14 +++++++-------
 2 files changed, 8 insertions(+), 16 deletions(-)
arch/arm/boot/dts/imx53-mba53.dts +1 -9
index 69733c8473d2b..5b9e9af14aa6c 100644
@@ -52,14 +52,6 @@
 		startup-delay-us = <5000>;
 	};
 
-	reg_3p2v: base3p2v {
-		compatible = "regulator-fixed";
-		regulator-name = "3P2V";
-		regulator-min-microvolt = <3200000>;
-		regulator-max-microvolt = <3200000>;
-		regulator-always-on;
-	};
-
 	sound {
 		compatible = "tq,imx53-mba53-sgtl5000",
 			     "fsl,imx-audio-sgtl5000";
@@ -193,7 +185,7 @@
 };
 
 &esdhc2 {
-	vmmc-supply = <&reg_3p3v>;
+	vmmc-supply = <&reg_3p2v>;
 	status = "okay";
 };
 
arch/arm/boot/dts/imx53-tqma53.dtsi +7 -7
index fa5d712bd47b8..02eb3f4b605de 100644
@@ -20,11 +20,11 @@
 		reg = <0x70000000 0x40000000>; /* Up to 1GiB */
 	};
 
-	reg_3p3v: card3p3v {
+	reg_3p2v: card3p2v {
 		compatible = "regulator-fixed";
-		regulator-name = "3P3V";
-		regulator-min-microvolt = <3300000>;
-		regulator-max-microvolt = <3300000>;
+		regulator-name = "3P2V";
+		regulator-min-microvolt = <3200000>;
+		regulator-max-microvolt = <3200000>;
 		regulator-always-on;
 	};
 };
@@ -33,7 +33,7 @@
 	pinctrl-names = "default";
 	pinctrl-0 = <&pinctrl_esdhc2>,
 		    <&pinctrl_esdhc2_cdwp>;
-	vqmmc-supply = <&reg_3p3v>;
+	vqmmc-supply = <&reg_3p2v>;
 	wp-gpios = <&gpio1 2 GPIO_ACTIVE_HIGH>;
 	cd-gpios = <&gpio1 4 GPIO_ACTIVE_LOW>;
 	status = "disabled";
@@ -56,8 +56,8 @@
 &esdhc3 { /* EMMC */
 	pinctrl-names = "default";
 	pinctrl-0 = <&pinctrl_esdhc3>;
-	vmmc-supply = <&reg_3p3v>;
-	vqmmc-supply = <&reg_3p3v>;
+	vmmc-supply = <&reg_3p2v>;
+	vqmmc-supply = <&reg_3p2v>;
 	non-removable;
 	bus-width = <8>;
 	status = "okay";
Signature · 1 line
2.11.0
#7 lore raw

PATCH 7/9 ARM: dts: TQma53: move PMIC's IRQ pin control where it belongs to

In reply to Juergen Borleis

Signal needs SoC's internal pull down.

---
 arch/arm/boot/dts/imx53-tqma53.dtsi | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)
arch/arm/boot/dts/imx53-tqma53.dtsi +8 -1
index 02eb3f4b605de..1c5cd103ed841 100644
@@ -74,7 +74,6 @@
 				 MX53_PAD_PATA_DA_1__GPIO7_7     0x80000000 /* LCD_BLT_EN */
 				 MX53_PAD_PATA_DA_2__GPIO7_8     0x80000000 /* LCD_RESET */
 				 MX53_PAD_PATA_DATA5__GPIO2_5    0x80000000 /* LCD_POWER */
-				 MX53_PAD_PATA_DATA6__GPIO2_6    0x80000000 /* PMIC_INT */
 				 MX53_PAD_PATA_DATA14__GPIO2_14  0x80000000 /* CSI_RST */
 				 MX53_PAD_PATA_DATA15__GPIO2_15  0x80000000 /* CSI_PWDN */
 				 MX53_PAD_GPIO_19__GPIO4_5 	 0x80000000 /* #SYSTEM_DOWN */
@@ -205,6 +204,12 @@
 				MX53_PAD_PATA_CS_1__UART3_RXD_MUX	0x1e4
 			>;
 		};
+
+		pinctrl_pmic: pmicgrp {
+			fsl,pins = <
+				MX53_PAD_PATA_DATA6__GPIO2_6		0x000001c0
+			>;
+		};
 	};
 };
 
@@ -254,6 +259,8 @@
 
 	pmic: mc34708 at 8 {
 		compatible = "fsl,mc34708";
+		pinctrl-names = "default";
+		pinctrl-0 = <&pinctrl_pmic>;
 		reg = <0x8>;
 		fsl,mc13xxx-uses-rtc;
 		interrupt-parent = <&gpio2>;
Signature · 1 line
2.11.0
#8 lore raw

PATCH 8/9 ARM: dts: TQma53: move network phy reset GPIO where it belongs to

In reply to Juergen Borleis

Signal has an external pullup and works with weakest settings (driver strength and speed).

---
 arch/arm/boot/dts/imx53-mba53.dts   | 7 +++++++
 arch/arm/boot/dts/imx53-tqma53.dtsi | 1 -
 2 files changed, 7 insertions(+), 1 deletion(-)
arch/arm/boot/dts/imx53-mba53.dts +7 -0
index 5b9e9af14aa6c..fb50ed8cc8f47 100644
@@ -139,6 +139,12 @@
 				MX53_PAD_EIM_DA15__IPU_DI1_PIN4	   0xe6
 			>;
 		};
+
+		pinctrl_fec_reset: fecreset-grp {
+			fsl,pins = <
+				MX53_PAD_PATA_DA_0__GPIO7_6	0x00000000
+			>;
+		};
 	};
 };
 
@@ -180,6 +186,7 @@
 };
 
 &fec {
+	pinctrl-0 = <&pinctrl_fec>, <&pinctrl_fec_reset>;
 	phy-reset-gpios = <&gpio7 6 GPIO_ACTIVE_LOW>;
 	status = "okay";
 };
arch/arm/boot/dts/imx53-tqma53.dtsi +0 -1
index 1c5cd103ed841..1ab5fbab1d728 100644
@@ -78,7 +78,6 @@
 				 MX53_PAD_PATA_DATA15__GPIO2_15  0x80000000 /* CSI_PWDN */
 				 MX53_PAD_GPIO_19__GPIO4_5 	 0x80000000 /* #SYSTEM_DOWN */
 				 MX53_PAD_GPIO_3__GPIO1_3        0x80000000
-				 MX53_PAD_PATA_DA_0__GPIO7_6	 0x80000000 /* #PHY_RESET */
 				 MX53_PAD_GPIO_1__PWM2_PWMO	 0x80000000 /* LCD_CONTRAST */
 			>;
 		};
Signature · 1 line
2.11.0
#9 lore raw

PATCH 9/9 ARM: dts: TQma53: describe the full power supply tree

In reply to Juergen Borleis
       |<--- mba53 devel baseboard --->|<----- TQma53 CPU card ----->|
       |                               |                             |
+12 V -|-o--> 3.3 V ----> internal use |                             |
       | |                             |                             |
       | \--> 5.0 V -o--> internal use | /--> 3.8 V --> PMIC         |
       |             |                 | |                           |
       |             \---------------->|-o--> 3.2 V --> internal use |
       |                               |
---
 arch/arm/boot/dts/imx53-mba53.dts   | 36 +++++++++++++++++++++++++++++++++++-
 arch/arm/boot/dts/imx53-tqma53.dtsi |  9 +++++++++
 2 files changed, 44 insertions(+), 1 deletion(-)
arch/arm/boot/dts/imx53-mba53.dts +35 -1
index fb50ed8cc8f47..b5e1b9b373bf5 100644
@@ -44,6 +44,32 @@
 		};
 	};
 
+	main_power_in_12p0v: mainpowerin {
+		/* external power-in */
+		compatible = "regulator-fixed";
+		regulator-name = "12P0V";
+		regulator-min-microvolt = <12000000>;
+		regulator-max-microvolt = <12000000>;
+		regulator-always-on;
+	};
+
+	reg_5p0v: base5p0v {
+		compatible = "regulator-fixed";
+		regulator-name = "5P0V";
+		regulator-min-microvolt = <5000000>;
+		regulator-max-microvolt = <5000000>;
+		vin-supply = <&main_power_in_12p0v>;
+		regulator-always-on;
+	};
+
+	reg_3p3v: base3p3v {
+		compatible = "regulator-fixed";
+		regulator-name = "3P3V";
+		regulator-min-microvolt = <3300000>;
+		regulator-max-microvolt = <3300000>;
+		vin-supply = <&main_power_in_12p0v>;
+		regulator-always-on;
+	};
 
 	reg_backlight: backlight {
 		compatible = "regulator-fixed";
@@ -67,6 +93,14 @@
 	};
 };
 
+&reg_3p2v {
+	vin-supply = <&reg_5p0v>;
+};
+
+&reg_3p8v {
+	vin-supply = <&reg_5p0v>;
+};
+
 &ldb {
 	pinctrl-names = "default";
 	pinctrl-0 = <&pinctrl_lvds1_1>;
@@ -192,7 +226,7 @@
 };
 
 &esdhc2 {
-	vmmc-supply = <&reg_3p2v>;
+	vmmc-supply = <&reg_3p3v>;
 	status = "okay";
 };
 
arch/arm/boot/dts/imx53-tqma53.dtsi +9 -0
index 1ab5fbab1d728..ff4608b7318f4 100644
@@ -27,6 +27,14 @@
 		regulator-max-microvolt = <3200000>;
 		regulator-always-on;
 	};
+
+	reg_3p8v: card3p8v {
+		compatible = "regulator-fixed";
+		regulator-name = "3P8V";
+		regulator-min-microvolt = <3800000>;
+		regulator-max-microvolt = <3800000>;
+		regulator-always-on;
+	};
 };
 
 &esdhc2 {
@@ -264,6 +272,7 @@
 		fsl,mc13xxx-uses-rtc;
 		interrupt-parent = <&gpio2>;
 		interrupts = <6 IRQ_TYPE_LEVEL_HIGH>;
+		/* power supply input is &reg_3p8v */
 	};
 
 	sensor1: lm75 at 48 {
Signature · 1 line
2.11.0