2017-09-07 09:05:49

by Juergen Borleis

[permalink] [raw]
Subject: Cleanup devicetree for the i.MX53 based TQma53 + mba53 development kit

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


2017-09-07 09:05:57

by Juergen Borleis

[permalink] [raw]
Subject: [PATCH 4/9] ARM: dts: TQma53: ESDHC2: use correct IO lines power supply

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.

Signed-off-by: Juergen Borleis <[email protected]>
---
arch/arm/boot/dts/imx53-mba53.dts | 1 +
arch/arm/boot/dts/imx53-tqma53.dtsi | 2 +-
2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/arch/arm/boot/dts/imx53-mba53.dts b/arch/arm/boot/dts/imx53-mba53.dts
index 5a21562a2dc1b..69733c8473d2b 100644
--- a/arch/arm/boot/dts/imx53-mba53.dts
+++ b/arch/arm/boot/dts/imx53-mba53.dts
@@ -193,6 +193,7 @@
};

&esdhc2 {
+ vmmc-supply = <&reg_3p3v>;
status = "okay";
};

diff --git a/arch/arm/boot/dts/imx53-tqma53.dtsi b/arch/arm/boot/dts/imx53-tqma53.dtsi
index eedeced3c8810..ceba1004038b1 100644
--- a/arch/arm/boot/dts/imx53-tqma53.dtsi
+++ b/arch/arm/boot/dts/imx53-tqma53.dtsi
@@ -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";
--
2.11.0

2017-09-07 09:05:56

by Juergen Borleis

[permalink] [raw]
Subject: [PATCH 1/9] ARM: dts: TQma53: regulators are no bus

Signed-off-by: Juergen Borleis <[email protected]>
---
arch/arm/boot/dts/imx53-mba53.dts | 33 +++++++++++++--------------------
arch/arm/boot/dts/imx53-tqma53.dtsi | 19 ++++++-------------
2 files changed, 19 insertions(+), 33 deletions(-)

diff --git a/arch/arm/boot/dts/imx53-mba53.dts b/arch/arm/boot/dts/imx53-mba53.dts
index df705ba48897f..11c61844d5d85 100644
--- a/arch/arm/boot/dts/imx53-mba53.dts
+++ b/arch/arm/boot/dts/imx53-mba53.dts
@@ -44,27 +44,20 @@
};
};

- regulators {
- compatible = "simple-bus";
- #address-cells = <1>;
- #size-cells = <0>;
-
- reg_backlight: regulator@0 {
- compatible = "regulator-fixed";
- reg = <0>;
- regulator-name = "lcd-supply";
- gpio = <&gpio2 5 0>;
- startup-delay-us = <5000>;
- };

- reg_3p2v: regulator@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 {
diff --git a/arch/arm/boot/dts/imx53-tqma53.dtsi b/arch/arm/boot/dts/imx53-tqma53.dtsi
index eecdc1c55eefc..4aff91e31f288 100644
--- a/arch/arm/boot/dts/imx53-tqma53.dtsi
+++ b/arch/arm/boot/dts/imx53-tqma53.dtsi
@@ -20,19 +20,12 @@
reg = <0x70000000 0x40000000>; /* Up to 1GiB */
};

- regulators {
- compatible = "simple-bus";
- #address-cells = <1>;
- #size-cells = <0>;
-
- reg_3p3v: regulator@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;
};
};

--
2.11.0

2017-09-07 09:05:53

by Juergen Borleis

[permalink] [raw]
Subject: [PATCH 6/9] ARM: dts: TQma53: fix and move regulator to its correct location

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.

Signed-off-by: Juergen Borleis <[email protected]>
---
arch/arm/boot/dts/imx53-mba53.dts | 10 +---------
arch/arm/boot/dts/imx53-tqma53.dtsi | 14 +++++++-------
2 files changed, 8 insertions(+), 16 deletions(-)

diff --git a/arch/arm/boot/dts/imx53-mba53.dts b/arch/arm/boot/dts/imx53-mba53.dts
index 69733c8473d2b..5b9e9af14aa6c 100644
--- a/arch/arm/boot/dts/imx53-mba53.dts
+++ b/arch/arm/boot/dts/imx53-mba53.dts
@@ -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";
};

diff --git a/arch/arm/boot/dts/imx53-tqma53.dtsi b/arch/arm/boot/dts/imx53-tqma53.dtsi
index fa5d712bd47b8..02eb3f4b605de 100644
--- a/arch/arm/boot/dts/imx53-tqma53.dtsi
+++ b/arch/arm/boot/dts/imx53-tqma53.dtsi
@@ -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";
--
2.11.0

2017-09-07 09:05:52

by Juergen Borleis

[permalink] [raw]
Subject: [PATCH 8/9] ARM: dts: TQma53: move network phy reset GPIO where it belongs to

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

Signed-off-by: Juergen Borleis <[email protected]>
---
arch/arm/boot/dts/imx53-mba53.dts | 7 +++++++
arch/arm/boot/dts/imx53-tqma53.dtsi | 1 -
2 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/arch/arm/boot/dts/imx53-mba53.dts b/arch/arm/boot/dts/imx53-mba53.dts
index 5b9e9af14aa6c..fb50ed8cc8f47 100644
--- a/arch/arm/boot/dts/imx53-mba53.dts
+++ b/arch/arm/boot/dts/imx53-mba53.dts
@@ -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";
};
diff --git a/arch/arm/boot/dts/imx53-tqma53.dtsi b/arch/arm/boot/dts/imx53-tqma53.dtsi
index 1c5cd103ed841..1ab5fbab1d728 100644
--- a/arch/arm/boot/dts/imx53-tqma53.dtsi
+++ b/arch/arm/boot/dts/imx53-tqma53.dtsi
@@ -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 */
>;
};
--
2.11.0

2017-09-07 09:05:50

by Juergen Borleis

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

Signed-off-by: Juergen Borleis <[email protected]>
---
arch/arm/boot/dts/imx53-tqma53.dtsi | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/boot/dts/imx53-tqma53.dtsi b/arch/arm/boot/dts/imx53-tqma53.dtsi
index 4aff91e31f288..eedeced3c8810 100644
--- a/arch/arm/boot/dts/imx53-tqma53.dtsi
+++ b/arch/arm/boot/dts/imx53-tqma53.dtsi
@@ -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@48 {
--
2.11.0

2017-09-07 09:06:56

by Juergen Borleis

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

Signed-off-by: Juergen Borleis <[email protected]>
---
arch/arm/boot/dts/imx53-mba53.dts | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/boot/dts/imx53-mba53.dts b/arch/arm/boot/dts/imx53-mba53.dts
index 11c61844d5d85..5a21562a2dc1b 100644
--- a/arch/arm/boot/dts/imx53-mba53.dts
+++ b/arch/arm/boot/dts/imx53-mba53.dts
@@ -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>;
};

--
2.11.0

2017-09-07 09:07:23

by Juergen Borleis

[permalink] [raw]
Subject: [PATCH 7/9] ARM: dts: TQma53: move PMIC's IRQ pin control where it belongs to

Signal needs SoC's internal pull down.

Signed-off-by: Juergen Borleis <[email protected]>
---
arch/arm/boot/dts/imx53-tqma53.dtsi | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/arch/arm/boot/dts/imx53-tqma53.dtsi b/arch/arm/boot/dts/imx53-tqma53.dtsi
index 02eb3f4b605de..1c5cd103ed841 100644
--- a/arch/arm/boot/dts/imx53-tqma53.dtsi
+++ b/arch/arm/boot/dts/imx53-tqma53.dtsi
@@ -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@8 {
compatible = "fsl,mc34708";
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_pmic>;
reg = <0x8>;
fsl,mc13xxx-uses-rtc;
interrupt-parent = <&gpio2>;
--
2.11.0

2017-09-07 09:07:21

by Juergen Borleis

[permalink] [raw]
Subject: [PATCH 5/9] ARM: dts: TQma53: define eMMC's power supply

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

Signed-off-by: Juergen Borleis <[email protected]>
---
arch/arm/boot/dts/imx53-tqma53.dtsi | 1 +
1 file changed, 1 insertion(+)

diff --git a/arch/arm/boot/dts/imx53-tqma53.dtsi b/arch/arm/boot/dts/imx53-tqma53.dtsi
index ceba1004038b1..fa5d712bd47b8 100644
--- a/arch/arm/boot/dts/imx53-tqma53.dtsi
+++ b/arch/arm/boot/dts/imx53-tqma53.dtsi
@@ -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";
--
2.11.0

2017-09-07 09:08:06

by Juergen Borleis

[permalink] [raw]
Subject: [PATCH 9/9] ARM: dts: TQma53: describe the full power supply tree

|<--- 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 |
| |

Signed-off-by: Juergen Borleis <[email protected]>
---
arch/arm/boot/dts/imx53-mba53.dts | 36 +++++++++++++++++++++++++++++++++++-
arch/arm/boot/dts/imx53-tqma53.dtsi | 9 +++++++++
2 files changed, 44 insertions(+), 1 deletion(-)

diff --git a/arch/arm/boot/dts/imx53-mba53.dts b/arch/arm/boot/dts/imx53-mba53.dts
index fb50ed8cc8f47..b5e1b9b373bf5 100644
--- a/arch/arm/boot/dts/imx53-mba53.dts
+++ b/arch/arm/boot/dts/imx53-mba53.dts
@@ -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";
};

diff --git a/arch/arm/boot/dts/imx53-tqma53.dtsi b/arch/arm/boot/dts/imx53-tqma53.dtsi
index 1ab5fbab1d728..ff4608b7318f4 100644
--- a/arch/arm/boot/dts/imx53-tqma53.dtsi
+++ b/arch/arm/boot/dts/imx53-tqma53.dtsi
@@ -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@48 {
--
2.11.0