Skip to contentSkip to conversation

ARM: dts: Add default pin states for client nodes on Exynos4/5 platforms

PATCH New Thomas Abraham 5 participants 8 messages Mar 6, 2013 – Mar 25, 2013

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

cover ARM: dts: Add default pin states for client nodes on Exynos4/5 platforms

This patch series populates the default pin states in client nodes of Exynos4 and Exynos5 platforms. Exynos4/5 platforms are migrating to use pinctrl framework and having the default pin states listed in the client nodes allows the device core to setup the default pin configuration for all the controllers.

This means the old-styled Samsung specific gpio bindings, which have been used till now for setting up the pin configurations, will not be used anymore. The corresponding changes required in device drivers have been posted seperatly.

Thomas Abraham (2):
ARM: dts: add pin state information in client nodes for Exynos4 platforms
ARM: dts: add pin state information in client nodes for Exynos5 platforms

 arch/arm/boot/dts/cros5250-common.dtsi    |   51 +--
 arch/arm/boot/dts/exynos4.dtsi            |   10 +
 arch/arm/boot/dts/exynos4210-smdkv310.dts |   53 +--
 arch/arm/boot/dts/exynos5250-pinctrl.dtsi |  783 +++++++++++++++++++++++++++++
 arch/arm/boot/dts/exynos5250-smdk5250.dts |   33 +-
 arch/arm/boot/dts/exynos5250-snow.dts     |   22 +-
 arch/arm/boot/dts/exynos5250.dtsi         |  310 +++---------
 7 files changed, 923 insertions(+), 339 deletions(-)
 create mode 100755 arch/arm/boot/dts/exynos5250-pinctrl.dtsi
#1 lore raw

PATCH 1/2 ARM: dts: add pin state information in client nodes for Exynos4 platforms

Add default pin state information for all client nodes that require pin configuration support using pinctrl interface.

---
 arch/arm/boot/dts/exynos4.dtsi            |   10 +++++
 arch/arm/boot/dts/exynos4210-smdkv310.dts |   53 +++++++++++++----------------
 2 files changed, 34 insertions(+), 29 deletions(-)
arch/arm/boot/dts/exynos4.dtsi +10 -0
index e1347fc..d160892 100644
@@ -165,6 +165,8 @@
 		compatible = "samsung,s3c2440-i2c";
 		reg = <0x13860000 0x100>;
 		interrupts = <0 58 0>;
+		pinctrl-names = "default";
+		pinctrl-0 = <&i2c0_bus>;
 		status = "disabled";
 	};
 
@@ -174,6 +176,8 @@
 		compatible = "samsung,s3c2440-i2c";
 		reg = <0x13870000 0x100>;
 		interrupts = <0 59 0>;
+		pinctrl-names = "default";
+		pinctrl-0 = <&i2c1_bus>;
 		status = "disabled";
 	};
 
@@ -239,6 +243,8 @@
 		rx-dma-channel = <&pdma0 6>; /* preliminary */
 		#address-cells = <1>;
 		#size-cells = <0>;
+		pinctrl-names = "default";
+		pinctrl-0 = <&spi0_bus>;
 		status = "disabled";
 	};
 
@@ -250,6 +256,8 @@
 		rx-dma-channel = <&pdma1 6>; /* preliminary */
 		#address-cells = <1>;
 		#size-cells = <0>;
+		pinctrl-names = "default";
+		pinctrl-0 = <&spi1_bus>;
 		status = "disabled";
 	};
 
@@ -261,6 +269,8 @@
 		rx-dma-channel = <&pdma0 8>; /* preliminary */
 		#address-cells = <1>;
 		#size-cells = <0>;
+		pinctrl-names = "default";
+		pinctrl-0 = <&spi2_bus>;
 		status = "disabled";
 	};
 
arch/arm/boot/dts/exynos4210-smdkv310.dts +24 -29

90 lines not on this page · raw message

Signature · 1 line
1.6.6.rc2
#2 lore raw

PATCH 2/2 ARM: dts: add pin state information in client nodes for Exynos5 platforms

In reply to Thomas Abraham

Add default pin state information for all client nodes that require pin configuration support using pinctrl interface.

---
 arch/arm/boot/dts/cros5250-common.dtsi    |   51 +--
 arch/arm/boot/dts/exynos5250-pinctrl.dtsi |  783 +++++++++++++++++++++++++++++
 arch/arm/boot/dts/exynos5250-smdk5250.dts |   33 +-
 arch/arm/boot/dts/exynos5250-snow.dts     |   22 +-
 arch/arm/boot/dts/exynos5250.dtsi         |  310 +++---------
 5 files changed, 889 insertions(+), 310 deletions(-)
 create mode 100755 arch/arm/boot/dts/exynos5250-pinctrl.dtsi
arch/arm/boot/dts/cros5250-common.dtsi +18 -33
index 46c0980..e782706 100644
@@ -19,31 +19,30 @@
 	chosen {
 	};
 
+	pinctrl@11400000 {
+		/*
+		 * Disabled pullups since external part has its own pullups and
+		 * double-pulling gets us out of spec in some cases.
+		 */
+		i2c2_bus: i2c2-bus {
+			samsung,pin-pud = <0>;
+		};
+	};
+
 	i2c@12C60000 {
 		samsung,i2c-sda-delay = <100>;
 		samsung,i2c-max-bus-freq = <378000>;
-		gpios = <&gpb3 0 2 3 0>,
-			<&gpb3 1 2 3 0>;
 	};
 
 	i2c@12C70000 {
 		samsung,i2c-sda-delay = <100>;
 		samsung,i2c-max-bus-freq = <378000>;
-		gpios = <&gpb3 2 2 3 0>,
-			<&gpb3 3 2 3 0>;
 	};
 
 	i2c@12C80000 {
 		samsung,i2c-sda-delay = <100>;
 		samsung,i2c-max-bus-freq = <66000>;
 
-		/*
-		 * Disabled pullups since external part has its own pullups and
-		 * double-pulling gets us out of spec in some cases.
-		 */
-		gpios = <&gpa0 6 3 0 0>,
-			<&gpa0 7 3 0 0>;
-
 		hdmiddc@50 {
 			compatible = "samsung,exynos5-hdmiddc";
 			reg = <0x50>;
@@ -53,8 +52,6 @@
 	i2c@12C90000 {
 		samsung,i2c-sda-delay = <100>;
 		samsung,i2c-max-bus-freq = <66000>;
-		gpios = <&gpa1 2 3 3 0>,
-			<&gpa1 3 3 3 0>;
 	};
 
 	i2c@12CA0000 {
@@ -64,8 +61,6 @@
 	i2c@12CB0000 {
 		samsung,i2c-sda-delay = <100>;
 		samsung,i2c-max-bus-freq = <66000>;
-		gpios = <&gpa2 2 3 3 0>,
-			<&gpa2 3 3 3 0>;
 	};
 
 	i2c@12CC0000 {
@@ -75,8 +70,6 @@
 	i2c@12CD0000 {
 		samsung,i2c-sda-delay = <100>;
 		samsung,i2c-max-bus-freq = <66000>;
-		gpios = <&gpb2 2 3 3 0>,
-			<&gpb2 3 3 3 0>;
 	};
 
 	i2c@12CE0000 {
@@ -98,15 +91,12 @@
 		samsung,dw-mshc-ciu-div = <3>;
 		samsung,dw-mshc-sdr-timing = <2 3>;
 		samsung,dw-mshc-ddr-timing = <1 2>;
+		pinctrl-names = "default";
+		pinctrl-0 = <&sd0_clk &sd0_cmd &sd0_cd &sd0_bus4 &sd0_bus8>;
 
 		slot@0 {
 			reg = <0>;
 			bus-width = <8>;
-			gpios = <&gpc0 0 2 0 3>, <&gpc0 1 2 0 3>,
-				<&gpc1 0 2 3 3>, <&gpc1 1 2 3 3>,
-				<&gpc1 2 2 3 3>, <&gpc1 3 2 3 3>,
-				<&gpc0 3 2 3 3>, <&gpc0 4 2 3 3>,
-				<&gpc0 5 2 3 3>, <&gpc0 6 2 3 3>;
 		};
 	};
 
@@ -122,15 +112,13 @@
 		samsung,dw-mshc-ciu-div = <3>;
 		samsung,dw-mshc-sdr-timing = <2 3>;
 		samsung,dw-mshc-ddr-timing = <1 2>;
+		pinctrl-names = "default";
+		pinctrl-0 = <&sd2_clk &sd2_cmd &sd2_cd &sd2_bus4>;
 
 		slot@0 {
 			reg = <0>;
 			bus-width = <4>;
-			samsung,cd-pinmux-gpio = <&gpc3 2 2 3 3>;
-			wp-gpios = <&gpc2 1 0 0 3>;
-			gpios = <&gpc3 0 2 0 3>, <&gpc3 1 2 0 3>,
-				<&gpc3 3 2 3 3>, <&gpc3 4 2 3 3>,
-				<&gpc3 5 2 3 3>, <&gpc3 6 2 3 3>;
+			wp-gpios = <&gpc2 1 0>;
 		};
 	};
 
@@ -143,11 +131,11 @@
 		samsung,dw-mshc-ciu-div = <3>;
 		samsung,dw-mshc-sdr-timing = <2 3>;
 		samsung,dw-mshc-ddr-timing = <1 2>;
+		/* See board-specific dts files for pin setup */
 
 		slot@0 {
 			reg = <0>;
 			bus-width = <4>;
-			/* See board-specific dts files for GPIOs */
 		};
 	};
 
@@ -156,9 +144,6 @@
 	};
 
 	spi_1: spi@12d30000 {
-		gpios = <&gpa2 4 2 3 0>,
-			<&gpa2 6 2 3 0>,
-			<&gpa2 7 2 3 0>;
 		samsung,spi-src-clk = <0>;
 		num-cs = <1>;
 	};
@@ -168,7 +153,7 @@
 	};
 
 	hdmi {
-		hpd-gpio = <&gpx3 7 0xf 1 3>;
+		hpd-gpio = <&gpx3 7 0>;
 	};
 
 	gpio-keys {
@@ -176,7 +161,7 @@
 
 		power {
 			label = "Power";
-			gpios = <&gpx1 3 0 0x10000 0>;
+			gpios = <&gpx1 3 1>;
 			linux,code = <116>; /* KEY_POWER */
 			gpio-key,wakeup;
 		};
arch/arm/boot/dts/exynos5250-pinctrl.dtsi new file +783 -0

783 lines not on this page · raw message

arch/arm/boot/dts/exynos5250-smdk5250.dts +7 -26
index 1b8d410..ef35f3f 100644
@@ -30,8 +30,6 @@
 	i2c@12C60000 {
 		samsung,i2c-sda-delay = <100>;
 		samsung,i2c-max-bus-freq = <20000>;
-		gpios = <&gpb3 0 2 3 0>,
-			<&gpb3 1 2 3 0>;
 
 		eeprom@50 {
 			compatible = "samsung,s524ad0xd1";
@@ -42,8 +40,6 @@
 	i2c@12C70000 {
 		samsung,i2c-sda-delay = <100>;
 		samsung,i2c-max-bus-freq = <20000>;
-		gpios = <&gpb3 2 2 3 0>,
-			<&gpb3 3 2 3 0>;
 
 		eeprom@51 {
 			compatible = "samsung,s524ad0xd1";
@@ -74,8 +70,6 @@
 	i2c@12C80000 {
 		samsung,i2c-sda-delay = <100>;
 		samsung,i2c-max-bus-freq = <66000>;
-		gpios = <&gpa0 6 3 3 0>,
-			<&gpa0 7 3 3 0>;
 
 		hdmiddc@50 {
 			compatible = "samsung,exynos5-hdmiddc";
@@ -122,15 +116,12 @@
 		samsung,dw-mshc-ciu-div = <3>;
 		samsung,dw-mshc-sdr-timing = <2 3>;
 		samsung,dw-mshc-ddr-timing = <1 2>;
+		pinctrl-names = "default";
+		pinctrl-0 = <&sd0_clk &sd0_cmd &sd0_bus4 &sd0_bus8>;
 
 		slot@0 {
 			reg = <0>;
 			bus-width = <8>;
-			gpios = <&gpc0 0 2 0 3>, <&gpc0 1 2 0 3>,
-				<&gpc1 0 2 3 3>, <&gpc1 1 2 3 3>,
-				<&gpc1 2 2 3 3>, <&gpc1 3 2 3 3>,
-				<&gpc0 3 2 3 3>, <&gpc0 4 2 3 3>,
-				<&gpc0 5 2 3 3>, <&gpc0 6 2 3 3>;
 		};
 	};
 
@@ -146,17 +137,13 @@
 		samsung,dw-mshc-ciu-div = <3>;
 		samsung,dw-mshc-sdr-timing = <2 3>;
 		samsung,dw-mshc-ddr-timing = <1 2>;
+		pinctrl-names = "default";
+		pinctrl-0 = <&sd2_clk &sd2_cmd &sd2_cd &sd2_bus4>;
 
 		slot@0 {
 			reg = <0>;
 			bus-width = <4>;
-			samsung,cd-pinmux-gpio = <&gpc3 2 2 3 3>;
 			disable-wp;
-			gpios = <&gpc3 0 2 0 3>, <&gpc3 1 2 0 3>,
-				<&gpc3 3 2 3 3>, <&gpc3 4 2 3 3>,
-				<&gpc3 5 2 3 3>, <&gpc3 6 2 3 3>,
-				<&gpc4 3 3 3 3>, <&gpc4 3 3 3 3>,
-				<&gpc4 5 3 3 3>, <&gpc4 6 3 3 3>;
 		};
 	};
 
@@ -169,10 +156,6 @@
 	};
 
 	spi_1: spi@12d30000 {
-		gpios = <&gpa2 4 2 3 0>,
-			<&gpa2 6 2 3 0>,
-			<&gpa2 7 2 3 0>;
-
 		w25q80bw@0 {
 			#address-cells = <1>;
 			#size-cells = <1>;
@@ -181,7 +164,7 @@
 			spi-max-frequency = <1000000>;
 
 			controller-data {
-				cs-gpio = <&gpa2 5 1 0 3>;
+				cs-gpio = <&gpa2 5 0>;
 				samsung,spi-feedback-delay = <0>;
 			};
 
@@ -203,7 +186,7 @@
 	};
 
 	hdmi {
-		hpd-gpio = <&gpx3 7 0xf 1 3>;
+		hpd-gpio = <&gpx3 7 0>;
 	};
 
 	codec@11000000 {
@@ -212,9 +195,7 @@
 	};
 
 	i2s0: i2s@03830000 {
-		gpios = <&gpz 0 2 0 0>, <&gpz 1 2 0 0>, <&gpz 2 2 0 0>,
-			<&gpz 3 2 0 0>, <&gpz 4 2 0 0>, <&gpz 5 2 0 0>,
-			<&gpz 6 2 0 0>;
+		status = "okay";
 	};
 
 	i2s1: i2s@12D60000 {
arch/arm/boot/dts/exynos5250-snow.dts +18 -4
index 17dd951..434e440 100644
@@ -16,12 +16,27 @@
 	model = "Google Snow";
 	compatible = "google,snow", "samsung,exynos5250";
 
+	pinctrl@11400000 {
+		sd3_clk: sd3-clk {
+			samsung,pin-drv = <0>;
+		};
+
+		sd3_cmd: sd3-cmd {
+			samsung,pin-pud = <3>;
+			samsung,pin-drv = <0>;
+		};
+
+		sd3_bus4: sd3-bus-width4 {
+			samsung,pin-drv = <0>;
+		};
+	};
+
 	gpio-keys {
 		compatible = "gpio-keys";
 
 		lid-switch {
 			label = "Lid";
-			gpios = <&gpx3 5 0 0x10000 0>;
+			gpios = <&gpx3 5 1>;
 			linux,input-type = <5>; /* EV_SW */
 			linux,code = <0>; /* SW_LID */
 			debounce-interval = <1>;
@@ -35,9 +50,8 @@
 	 */
 	dwmmc3@12230000 {
 		slot@0 {
-			gpios = <&gpc4 0 2 0 0>, <&gpc4 1 2 3 0>,
-				<&gpc4 3 2 3 0>, <&gpc4 4 2 3 0>,
-				<&gpc4 5 2 3 0>, <&gpc4 6 2 3 0>;
+			pinctrl-names = "default";
+			pinctrl-0 = <&sd3_clk &sd3_cmd &sd3_bus4>;
 		};
 	};
 };
arch/arm/boot/dts/exynos5250.dtsi +63 -247

418 lines not on this page · raw message

Signature · 1 line
1.6.6.rc2
#3 lore raw

PATCH 2/2 ARM: dts: add pin state information in client nodes for Exynos5 platforms

Thomas,

Thank you for doing this! :)

On Wed, Mar 6, 2013 at 4:36 AM, Thomas Abraham
<[email protected]> wrote:>

arch/arm/boot/dts/exynos5250-snow.dts line 54

Quoted 13 lines
arch/arm/boot/dts/exynos5250-snow.dts +2 -3
index 17dd951..434e440 100644
@@ -35,9 +50,8 @@
         */
        dwmmc3 at 12230000 {
                slot at 0 {
-                       gpios = <&gpc4 0 2 0 0>, <&gpc4 1 2 3 0>,
-                               <&gpc4 3 2 3 0>, <&gpc4 4 2 3 0>,
-                               <&gpc4 5 2 3 0>, <&gpc4 6 2 3 0>;
+                       pinctrl-names = "default";
+                       pinctrl-0 = <&sd3_clk &sd3_cmd &sd3_bus4>;

nit: Move comment about EMI to the "pinctrl at 11400000" that you added earlier in this file. ...then move the pinctrl-names and pinctrl-0 to "cros5250.dtsi". This is not major and could be done in a follow-up patch.

I done basic testing of this patch series on exynos5250-snow atop linux-next 20130307. By series I mean these patchwork IDs:

2224531 New mmc: sdhci-s3c: let device core setup the default
pin configuration
2224621 New spi: s3c64xx: let device core setup the default
pin configuration
2224731 New input: samsung-keypad: let device core setup the
default pin configuration
2224801 New ASoC: samsung: let device core setup the default
pin configuration
2224851 New mmc: dwmmc: let device core setup the default pin
configuration
2225141 New [1/2] ARM: dts: add pin state information in
client nodes for Exynos4 platforms
2225151 New [2/2] ARM: dts: add pin state information in
client nodes for Exynos5 platforms

This patch looks good to me with or without the above nit fix.

#4 lore raw

cover ARM: dts: Add default pin states for client nodes on Exynos4/5 platforms

In reply to Thomas Abraham
Quoted 5 lines · Thomas Abraham

This patch series populates the default pin states in client nodes of Exynos4 and Exynos5 platforms. Exynos4/5 platforms are migrating to use pinctrl framework and having the default pin states listed in the client nodes allows the device core to setup the default pin configuration for all the controllers.

The series:

Yours,
Linus Walleij

#5 lore raw

cover ARM: dts: Add default pin states for client nodes on Exynos4/5 platforms

Quoted 10 lines · Linus Walleij
Quoted 5 lines · Thomas Abraham

This patch series populates the default pin states in client nodes of Exynos4 and Exynos5 platforms. Exynos4/5 platforms are migrating to use pinctrl framework and having the default pin states listed in the client nodes allows the device core to setup the default pin configuration for all the controllers.

The series:

Quoted 9 lines

Yours,
Linus Walleij
--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in the body of a message to majordomo at vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html

Kukjin,

Would you be applying this patch-set to your tree? We need that to rebase Arndale related patches for v3.10.

Signature · 1 line
Tushar Behera
#6 lore raw

cover ARM: dts: Add default pin states for client nodes on Exynos4/5 platforms

Quoted 19 lines · Tushar Behera
Quoted 9 lines · Linus Walleij
Quoted 5 lines · Thomas Abraham

This patch series populates the default pin states in client nodes of Exynos4 and Exynos5 platforms. Exynos4/5 platforms are migrating to use pinctrl framework and having the default pin states listed in the client nodes allows the device core to setup the default pin configuration for all the controllers.

Quoted 7 lines

The series:

Yours,
Linus Walleij
--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-

soc" in

Quoted 9 lines
Quoted 3 lines

the body of a message to majordomo at vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Kukjin,

Would you be applying this patch-set to your tree? We need that to rebase Arndale related patches for v3.10.

Just note, you will see this series late tomorrow because I need to sort out samsung tree.

Thanks for your reminder.

- Kukjin

#7 lore raw

cover ARM: dts: Add default pin states for client nodes on Exynos4/5 platforms

In reply to Linus Walleij
Quoted 4 lines · Linus Walleij

On Wed, Mar 6, 2013 at 1:36 PM, Thomas Abraham
<[email protected]> wrote:

Quoted 9 lines
Quoted 5 lines

This patch series populates the default pin states in client nodes of Exynos4 and Exynos5 platforms. Exynos4/5 platforms are migrating to use pinctrl framework and having the default pin states listed in the client nodes allows the device core to setup the default pin configuration for all the controllers.

The series:

Looks good to me, applied.

Thanks.

- Kukjin