Skip to contentSkip to conversation

ARM: dts: AM33XX: Cleanup and pinctrl binding support

PATCH Superseded Vaibhav Hiremath 3 participants 14 messages Mar 27, 2013 – Mar 28, 2013 3 messages not in the archive Device tree bindings

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

cover ARM: dts: AM33XX: Cleanup and pinctrl binding support

This patch series fixes the numbering schema for I2C and GPIO module and adds the pin-control binding for I2C, UART, GPIO-LED across supported platforms (EVM, EVM-SK and Bone).

I have divided patches based on functionality and _not_ into EVM/Board perspective.

Vaibhav Hiremath (5):
ARM: dts: AM33XX: Fix the i2c numbering to match hardware/TRM
ARM: dts: AM33XX: Add default pinctrl binding for I2C device
ARM: dts: AM33XX: Fix gpio numbering to match hardware/TRM
ARM: dts: AM33XX: Add pinctrl binding to gpio-leds node
ARM: dts: AM33XX: Add default pinctrl binding for UART0 device

 arch/arm/boot/dts/am335x-bone.dts  |   35 +++++++++++++++++++++----
 arch/arm/boot/dts/am335x-evm.dts   |   48 +++++++++++++++++++++++++++++------
 arch/arm/boot/dts/am335x-evmsk.dts |   43 ++++++++++++++++++++++++-------
 arch/arm/boot/dts/am33xx.dtsi      |   14 +++++-----
 4 files changed, 108 insertions(+), 32 deletions(-)
#1 lore raw

PATCH 1/5 ARM: dts: AM33XX: Fix the i2c numbering to match hardware/TRM

With DT support, where naming convention is based on base-addr and not id, so we should follow TRM/Spec numbering label.

This patch changes I2C numbering as per TRM, as I2C0, I2C1 and I2C2.

---
 arch/arm/boot/dts/am335x-bone.dts  |    2 +-
 arch/arm/boot/dts/am335x-evm.dts   |    4 ++--
 arch/arm/boot/dts/am335x-evmsk.dts |    2 +-
 arch/arm/boot/dts/am33xx.dtsi      |    6 +++---
 4 files changed, 7 insertions(+), 7 deletions(-)
arch/arm/boot/dts/am335x-bone.dts +1 -1
index 11b240c..cdc8307 100644
@@ -43,7 +43,7 @@
 			status = "okay";
 		};
 
-		i2c1: i2c at 44e0b000 {
+		i2c0: i2c at 44e0b000 {
 			status = "okay";
 			clock-frequency = <400000>;
 
arch/arm/boot/dts/am335x-evm.dts +2 -2
index d649644..a6539ad 100644
@@ -51,7 +51,7 @@
 			status = "okay";
 		};
 
-		i2c1: i2c at 44e0b000 {
+		i2c0: i2c at 44e0b000 {
 			status = "okay";
 			clock-frequency = <400000>;
 
@@ -60,7 +60,7 @@
 			};
 		};
 
-		i2c2: i2c at 4802a000 {
+		i2c1: i2c at 4802a000 {
 			status = "okay";
 			clock-frequency = <100000>;
 
arch/arm/boot/dts/am335x-evmsk.dts +1 -1
index f5a6162..45cb39a 100644
@@ -58,7 +58,7 @@
 			status = "okay";
 		};
 
-		i2c1: i2c at 44e0b000 {
+		i2c0: i2c at 44e0b000 {
 			status = "okay";
 			clock-frequency = <400000>;
 
arch/arm/boot/dts/am33xx.dtsi +3 -3
index 0957645..c38b2fa 100644
@@ -185,7 +185,7 @@
 			status = "disabled";
 		};
 
-		i2c1: i2c at 44e0b000 {
+		i2c0: i2c at 44e0b000 {
 			compatible = "ti,omap4-i2c";
 			#address-cells = <1>;
 			#size-cells = <0>;
@@ -195,7 +195,7 @@
 			status = "disabled";
 		};
 
-		i2c2: i2c at 4802a000 {
+		i2c1: i2c at 4802a000 {
 			compatible = "ti,omap4-i2c";
 			#address-cells = <1>;
 			#size-cells = <0>;
@@ -205,7 +205,7 @@
 			status = "disabled";
 		};
 
-		i2c3: i2c at 4819c000 {
+		i2c2: i2c at 4819c000 {
 			compatible = "ti,omap4-i2c";
 			#address-cells = <1>;
 			#size-cells = <0>;
Signature · 1 line
1.7.0.4
#2 lore raw

PATCH 1/5 ARM: dts: AM33XX: Fix the i2c numbering to match hardware/TRM

Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Vaibhav" == Vaibhav Hiremath <[email protected]> writes:

Vaibhav> With DT support, where naming convention is based on base-addr Vaibhav> and not id, so we should follow TRM/Spec numbering label.

Vaibhav> This patch changes I2C numbering as per TRM, as I2C0, I2C1 and I2C2.

What about the uart numbers while we're at it?

Signature · 1 line
Bye, Peter Korsgaard
#3 lore raw

PATCH 1/5 ARM: dts: AM33XX: Fix the i2c numbering to match hardware/TRM

Quoted 16 lines

-----Original Message-----
From: Peter Korsgaard [mailto:jacmet at gmail.com] On Behalf Of Peter Korsgaard
Sent: Wednesday, March 27, 2013 6:52 PM
To: Hiremath, Vaibhav
Cc: linux-omap at vger.kernel.org; linux-arm-kernel at lists.infradead.org; Cousson, Benoit; Porter, Matt; devicetree-discuss at lists.ozlabs.org
Subject: Re: [PATCH 1/5] ARM: dts: AM33XX: Fix the i2c numbering to match hardware/TRM

Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Vaibhav" == Vaibhav Hiremath <[email protected]> writes:

Vaibhav> With DT support, where naming convention is based on base-
addr
Vaibhav> and not id, so we should follow TRM/Spec numbering label.

Quoted 7 lines

Vaibhav> This patch changes I2C numbering as per TRM, as I2C0, I2C1
and I2C2.

What about the uart numbers while we're at it?

Just responded to Matt on the same note,
I will change it and submit the next version with your acked-by.

Thanks,
Vaibhav

#4 lore raw

PATCH 2/5 ARM: dts: AM33XX: Add default pinctrl binding for I2C device

In reply to Vaibhav Hiremath

Add pin control binding for I2C device nodes in all board specific DT files (as per current usage),

EVM: Both i2c0 and i2c1
EVM-SK and Bone: Only i2c0

---
 arch/arm/boot/dts/am335x-bone.dts  |   10 ++++++++++
 arch/arm/boot/dts/am335x-evm.dts   |   20 ++++++++++++++++++++
 arch/arm/boot/dts/am335x-evmsk.dts |   10 ++++++++++
 3 files changed, 40 insertions(+), 0 deletions(-)
arch/arm/boot/dts/am335x-bone.dts +10 -0
index cdc8307..c917efa 100644
@@ -36,6 +36,13 @@
 				0x60 0x17	/* gpmc_a8.gpio1_24, OUTPUT_PULLUP | MODE7 */
 			>;
 		};
+
+		i2c0_pins: pinmux_i2c0_pins {
+			pinctrl-single,pins = <
+				0x188 0x30	/* i2c0_sda.i2c0_sda PULLUP | INPUTENABLE | MODE0 */
+				0x18c 0x30	/* i2c0_scl.i2c0_scl PULLUP | INPUTENABLE | MODE0 */
+			>;
+		};
 	};
 
 	ocp {
@@ -44,6 +51,9 @@
 		};
 
 		i2c0: i2c at 44e0b000 {
+			pinctrl-names = "default";
+			pinctrl-0 = <&i2c0_pins>;
+
 			status = "okay";
 			clock-frequency = <400000>;
 
arch/arm/boot/dts/am335x-evm.dts +20 -0
index a6539ad..db52d3c 100644
@@ -44,6 +44,20 @@
 				0x154 0x27	/* spi0_d0.gpio0_3, INPUT | MODE7 */
 			>;
 		};
+
+		i2c0_pins: pinmux_i2c0_pins {
+			pinctrl-single,pins = <
+				0x188 0x30	/* i2c0_sda.i2c0_sda PULLUP | INPUTENABLE | MODE0 */
+				0x18c 0x30	/* i2c0_scl.i2c0_scl PULLUP | INPUTENABLE | MODE0 */
+			>;
+		};
+
+		i2c1_pins: pinmux_i2c1_pins {
+			pinctrl-single,pins = <
+				0x158 0x32	/* spi0_d1.i2c1_sda PULLUP | INPUTENABLE | MODE2 */
+				0x15c 0x32	/* spi0_cs0.i2c1_scl PULLUP | INPUTENABLE | MODE2 */
+			>;
+		};
 	};
 
 	ocp {
@@ -52,6 +66,9 @@
 		};
 
 		i2c0: i2c at 44e0b000 {
+			pinctrl-names = "default";
+			pinctrl-0 = <&i2c0_pins>;
+
 			status = "okay";
 			clock-frequency = <400000>;
 
@@ -61,6 +78,9 @@
 		};
 
 		i2c1: i2c at 4802a000 {
+			pinctrl-names = "default";
+			pinctrl-0 = <&i2c1_pins>;
+
 			status = "okay";
 			clock-frequency = <100000>;
 
arch/arm/boot/dts/am335x-evmsk.dts +10 -0
index 45cb39a..24e915c 100644
@@ -51,6 +51,13 @@
 				0x9c 0x27	/* gpmc_ben0_cle.gpio2_5, INPUT | MODE7 */
 			>;
 		};
+
+		i2c0_pins: pinmux_i2c0_pins {
+			pinctrl-single,pins = <
+				0x188 0x30	/* i2c0_sda.i2c0_sda PULLUP | INPUTENABLE | MODE0 */
+				0x18c 0x30	/* i2c0_scl.i2c0_scl PULLUP | INPUTENABLE | MODE0 */
+			>;
+		};
 	};
 
 	ocp {
@@ -59,6 +66,9 @@
 		};
 
 		i2c0: i2c at 44e0b000 {
+			pinctrl-names = "default";
+			pinctrl-0 = <&i2c0_pins>;
+
 			status = "okay";
 			clock-frequency = <400000>;
 
Signature · 1 line
1.7.0.4
#5 lore raw

PATCH 3/5 ARM: dts: AM33XX: Fix gpio numbering to match hardware/TRM

In reply to Vaibhav Hiremath

With DT support, where naming convention is based on base-addr and not id, so we should follow TRM/Spec numbering label.

This patch changes GPIO numbering as per TRM, as gpio0-3.

Matt Porter had submitted base patch sometime back but it didn't make it to the mainline -
https://patchwork.kernel.org/patch/1433001/

Later DT nodes for gpio based keypad and led driver got merged, so this fix needs to propagate to board dts files as well.

---
 arch/arm/boot/dts/am335x-bone.dts  |    8 ++++----
 arch/arm/boot/dts/am335x-evm.dts   |   14 +++++++-------
 arch/arm/boot/dts/am335x-evmsk.dts |   16 ++++++++--------
 arch/arm/boot/dts/am33xx.dtsi      |    8 ++++----
 4 files changed, 23 insertions(+), 23 deletions(-)
arch/arm/boot/dts/am335x-bone.dts +4 -4
index c917efa..860630b 100644
@@ -69,27 +69,27 @@
 
 		led at 2 {
 			label = "beaglebone:green:heartbeat";
-			gpios = <&gpio2 21 0>;
+			gpios = <&gpio1 21 0>;
 			linux,default-trigger = "heartbeat";
 			default-state = "off";
 		};
 
 		led at 3 {
 			label = "beaglebone:green:mmc0";
-			gpios = <&gpio2 22 0>;
+			gpios = <&gpio1 22 0>;
 			linux,default-trigger = "mmc0";
 			default-state = "off";
 		};
 
 		led at 4 {
 			label = "beaglebone:green:usr2";
-			gpios = <&gpio2 23 0>;
+			gpios = <&gpio1 23 0>;
 			default-state = "off";
 		};
 
 		led at 5 {
 			label = "beaglebone:green:usr3";
-			gpios = <&gpio2 24 0>;
+			gpios = <&gpio1 24 0>;
 			default-state = "off";
 		};
 	};
arch/arm/boot/dts/am335x-evm.dts +7 -7
index db52d3c..79b3cc8 100644
@@ -143,12 +143,12 @@
 		debounce-delay-ms = <5>;
 		col-scan-delay-us = <2>;
 
-		row-gpios = <&gpio2 25 0	/* Bank1, pin25 */
-			     &gpio2 26 0	/* Bank1, pin26 */
-			     &gpio2 27 0>;	/* Bank1, pin27 */
+		row-gpios = <&gpio1 25 0	/* Bank1, pin25 */
+			     &gpio1 26 0	/* Bank1, pin26 */
+			     &gpio1 27 0>;	/* Bank1, pin27 */
 
-		col-gpios = <&gpio2 21 0	/* Bank1, pin21 */
-			     &gpio2 22 0>;	/* Bank1, pin22 */
+		col-gpios = <&gpio1 21 0	/* Bank1, pin21 */
+			     &gpio1 22 0>;	/* Bank1, pin22 */
 
 		linux,keymap = <0x0000008b	/* MENU */
 				0x0100009e	/* BACK */
@@ -167,14 +167,14 @@
 		switch@9 {
 			label = "volume-up";
 			linux,code = <115>;
-			gpios = <&gpio1 2 1>;
+			gpios = <&gpio0 2 1>;	/* Bank0, pin2 */
 			gpio-key,wakeup;
 		};
 
 		switch at 10 {
 			label = "volume-down";
 			linux,code = <114>;
-			gpios = <&gpio1 3 1>;
+			gpios = <&gpio0 3 1>;	/* Bank0, pin3 */
 			gpio-key,wakeup;
 		};
 	};
arch/arm/boot/dts/am335x-evmsk.dts +8 -8
index 24e915c..15a3052 100644
@@ -125,26 +125,26 @@
 
 		led at 1 {
 			label = "evmsk:green:usr0";
-			gpios = <&gpio2 4 0>;
+			gpios = <&gpio1 4 0>;
 			default-state = "off";
 		};
 
 		led at 2 {
 			label = "evmsk:green:usr1";
-			gpios = <&gpio2 5 0>;
+			gpios = <&gpio1 5 0>;
 			default-state = "off";
 		};
 
 		led at 3 {
 			label = "evmsk:green:mmc0";
-			gpios = <&gpio2 6 0>;
+			gpios = <&gpio1 6 0>;
 			linux,default-trigger = "mmc0";
 			default-state = "off";
 		};
 
 		led at 4 {
 			label = "evmsk:green:heartbeat";
-			gpios = <&gpio2 7 0>;
+			gpios = <&gpio1 7 0>;
 			linux,default-trigger = "heartbeat";
 			default-state = "off";
 		};
@@ -158,26 +158,26 @@
 		switch at 1 {
 			label = "button0";
 			linux,code = <0x100>;
-			gpios = <&gpio3 3 0>;
+			gpios = <&gpio2 3 0>;
 		};
 
 		switch at 2 {
 			label = "button1";
 			linux,code = <0x101>;
-			gpios = <&gpio3 2 0>;
+			gpios = <&gpio2 2 0>;
 		};
 
 		switch at 3 {
 			label = "button2";
 			linux,code = <0x102>;
-			gpios = <&gpio1 30 0>;
+			gpios = <&gpio0 30 0>;
 			gpio-key,wakeup;
 		};
 
 		switch at 4 {
 			label = "button3";
 			linux,code = <0x103>;
-			gpios = <&gpio3 5 0>;
+			gpios = <&gpio2 5 0>;
 		};
 	};
 };
arch/arm/boot/dts/am33xx.dtsi +4 -4
index c38b2fa..dd237de 100644
@@ -87,7 +87,7 @@
 			reg = <0x48200000 0x1000>;
 		};
 
-		gpio1: gpio at 44e07000 {
+		gpio0: gpio at 44e07000 {
 			compatible = "ti,omap4-gpio";
 			ti,hwmods = "gpio1";
 			gpio-controller;
@@ -98,7 +98,7 @@
 			interrupts = <96>;
 		};
 
-		gpio2: gpio at 4804c000 {
+		gpio1: gpio at 4804c000 {
 			compatible = "ti,omap4-gpio";
 			ti,hwmods = "gpio2";
 			gpio-controller;
@@ -109,7 +109,7 @@
 			interrupts = <98>;
 		};
 
-		gpio3: gpio at 481ac000 {
+		gpio2: gpio at 481ac000 {
 			compatible = "ti,omap4-gpio";
 			ti,hwmods = "gpio3";
 			gpio-controller;
@@ -120,7 +120,7 @@
 			interrupts = <32>;
 		};
 
-		gpio4: gpio at 481ae000 {
+		gpio3: gpio at 481ae000 {
 			compatible = "ti,omap4-gpio";
 			ti,hwmods = "gpio4";
 			gpio-controller;
Signature · 1 line
1.7.0.4
#6 lore raw

PATCH 3/5 ARM: dts: AM33XX: Fix gpio numbering to match hardware/TRM

Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Vaibhav" == Vaibhav Hiremath <[email protected]> writes:

Vaibhav> With DT support, where naming convention is based on base-addr Vaibhav> and not id, so we should follow TRM/Spec numbering label.

Vaibhav> This patch changes GPIO numbering as per TRM, as gpio0-3.

Vaibhav> Matt Porter had submitted base patch sometime back but it Vaibhav> didn't make it to the mainline -
Vaibhav> https://patchwork.kernel.org/patch/1433001/

Vaibhav> Later DT nodes for gpio based keypad and led driver got Vaibhav> merged, so this fix needs to propagate to board dts files Vaibhav> as well.

Signature · 1 line
Bye, Peter Korsgaard
#7 lore raw

PATCH 3/5 ARM: dts: AM33XX: Fix gpio numbering to match hardware/TRM

In reply to Vaibhav Hiremath
Quoted 9 lines · Vaibhav Hiremath

With DT support, where naming convention is based on base-addr and not id, so we should follow TRM/Spec numbering label.

This patch changes GPIO numbering as per TRM, as gpio0-3.

Matt Porter had submitted base patch sometime back but it didn't make it to the mainline -
https://patchwork.kernel.org/patch/1433001/

Quoted 7 lines

Later DT nodes for gpio based keypad and led driver got merged, so this fix needs to propagate to board dts files as well.

Thanks for picking this up, Vaibhav. It'll eliminate all the pain people have with the DT not matching the TRM.

-Matt

#8 lore raw

PATCH 4/5 ARM: dts: AM33XX: Add pinctrl binding to gpio-leds node

In reply to Vaibhav Hiremath

Now gpio-leds driver is using devm_pinctrl_get_select_default() api to set default pinmux configuration required for the functionality of the driver, so this patch moves respective pinctrl binding inside leds node.

---
 arch/arm/boot/dts/am335x-bone.dts  |    5 ++++-
 arch/arm/boot/dts/am335x-evmsk.dts |    5 ++++-
 2 files changed, 8 insertions(+), 2 deletions(-)
arch/arm/boot/dts/am335x-bone.dts +4 -1
index 860630b..1d623e4 100644
@@ -26,7 +26,7 @@
 
 	am33xx_pinmux: pinmux at 44e10800 {
 		pinctrl-names = "default";
-		pinctrl-0 = <&user_leds_s0>;
+		pinctrl-0 = <>;
 
 		user_leds_s0: user_leds_s0 {
 			pinctrl-single,pins = <
@@ -65,6 +65,9 @@
 	};
 
 	leds {
+		pinctrl-names = "default";
+		pinctrl-0 = <&user_leds_s0>;
+
 		compatible = "gpio-leds";
 
 		led at 2 {
arch/arm/boot/dts/am335x-evmsk.dts +4 -1
index 15a3052..21d5a08 100644
@@ -32,7 +32,7 @@
 
 	am33xx_pinmux: pinmux at 44e10800 {
 		pinctrl-names = "default";
-		pinctrl-0 = <&user_leds_s0 &gpio_keys_s0>;
+		pinctrl-0 = <&gpio_keys_s0>;
 
 		user_leds_s0: user_leds_s0 {
 			pinctrl-single,pins = <
@@ -121,6 +121,9 @@
 	};
 
 	leds {
+		pinctrl-names = "default";
+		pinctrl-0 = <&user_leds_s0>;
+
 		compatible = "gpio-leds";
 
 		led at 1 {
Signature · 1 line
1.7.0.4
#9 lore raw

PATCH 5/5 ARM: dts: AM33XX: Add default pinctrl binding for UART0 device

In reply to Vaibhav Hiremath

Add pin control binding for UART0 device nodes in all board specific DT files.

---
 arch/arm/boot/dts/am335x-bone.dts  |   10 ++++++++++
 arch/arm/boot/dts/am335x-evm.dts   |   10 ++++++++++
 arch/arm/boot/dts/am335x-evmsk.dts |   10 ++++++++++
 3 files changed, 30 insertions(+), 0 deletions(-)
arch/arm/boot/dts/am335x-bone.dts +10 -0
index 1d623e4..3c4c66f 100644
@@ -43,10 +43,20 @@
 				0x18c 0x30	/* i2c0_scl.i2c0_scl PULLUP | INPUTENABLE | MODE0 */
 			>;
 		};
+
+		uart0_pins: pinmux_uart0_pins {
+			pinctrl-single,pins = <
+				0x170 0x30	/* uart0_rxd.uart0_rxd PULLUP | INPUTENABLE | MODE0 */
+				0x174 0x00	/* uart0_txd.uart0_txd PULLDOWN | MODE0 */
+			>;
+		};
 	};
 
 	ocp {
 		uart1: serial at 44e09000 {
+			pinctrl-names = "default";
+			pinctrl-0 = <&uart0_pins>;
+
 			status = "okay";
 		};
 
arch/arm/boot/dts/am335x-evm.dts +10 -0
index 79b3cc8..89e1edd 100644
@@ -58,10 +58,20 @@
 				0x15c 0x32	/* spi0_cs0.i2c1_scl PULLUP | INPUTENABLE | MODE2 */
 			>;
 		};
+
+		uart0_pins: pinmux_uart0_pins {
+			pinctrl-single,pins = <
+				0x170 0x30	/* uart0_rxd.uart0_rxd PULLUP | INPUTENABLE | MODE0 */
+				0x174 0x00	/* uart0_txd.uart0_txd PULLDOWN | MODE0 */
+			>;
+		};
 	};
 
 	ocp {
 		uart1: serial at 44e09000 {
+			pinctrl-names = "default";
+			pinctrl-0 = <&uart0_pins>;
+
 			status = "okay";
 		};
 
arch/arm/boot/dts/am335x-evmsk.dts +10 -0
index 21d5a08..0e7f1b8 100644
@@ -58,10 +58,20 @@
 				0x18c 0x30	/* i2c0_scl.i2c0_scl PULLUP | INPUTENABLE | MODE0 */
 			>;
 		};
+
+		uart0_pins: pinmux_uart0_pins {
+			pinctrl-single,pins = <
+				0x170 0x30	/* uart0_rxd.uart0_rxd PULLUP | INPUTENABLE | MODE0 */
+				0x174 0x00	/* uart0_txd.uart0_txd PULLDOWN | MODE0 */
+			>;
+		};
 	};
 
 	ocp {
 		uart1: serial at 44e09000 {
+			pinctrl-names = "default";
+			pinctrl-0 = <&uart0_pins>;
+
 			status = "okay";
 		};
 
Signature · 1 line
1.7.0.4

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): [email protected]

#15 lore raw

PATCH 5/5 ARM: dts: AM33XX: Add default pinctrl binding for UART0 device

Quoted 5 lines · Vaibhav Hiremath

Add pin control binding for UART0 device nodes in all board specific DT files.

Except for trivial comments below I'll add my

Quoted 18 lines
---
 arch/arm/boot/dts/am335x-bone.dts  |   10 ++++++++++
 arch/arm/boot/dts/am335x-evm.dts   |   10 ++++++++++
 arch/arm/boot/dts/am335x-evmsk.dts |   10 ++++++++++
 3 files changed, 30 insertions(+), 0 deletions(-)
arch/arm/boot/dts/am335x-bone.dts +4 -0
index 1d623e4..3c4c66f 100644
@@ -43,10 +43,20 @@
 				0x18c 0x30	/* i2c0_scl.i2c0_scl PULLUP | INPUTENABLE | MODE0 */
 			>;
 		};
+
+		uart0_pins: pinmux_uart0_pins {
+			pinctrl-single,pins = <
+				0x170 0x30	/* uart0_rxd.uart0_rxd PULLUP | INPUTENABLE | MODE0 */

arch/arm/boot/dts/am335x-bone.dts line 59

Quoted 10 lines
arch/arm/boot/dts/am335x-bone.dts +6 -0
+				0x174 0x00	/* uart0_txd.uart0_txd PULLDOWN | MODE0 */
+			>;
+		};
 	};
 
 	ocp {
 		uart1: serial@44e09000 {
+			pinctrl-names = "default";
+			pinctrl-0 = <&uart0_pins>;
+

Please change this to be uart0 so it all matches.

Quoted 15 lines
arch/arm/boot/dts/am335x-bone.dts +0 -0
 			status = "okay";
 		};
 
arch/arm/boot/dts/am335x-evm.dts +4 -0
index 79b3cc8..89e1edd 100644
@@ -58,10 +58,20 @@
 				0x15c 0x32	/* spi0_cs0.i2c1_scl PULLUP | INPUTENABLE | MODE2 */
 			>;
 		};
+
+		uart0_pins: pinmux_uart0_pins {
+			pinctrl-single,pins = <
+				0x170 0x30	/* uart0_rxd.uart0_rxd PULLUP | INPUTENABLE | MODE0 */

arch/arm/boot/dts/am335x-evm.dts line 74

Quoted 10 lines
arch/arm/boot/dts/am335x-evm.dts +6 -0
+				0x174 0x00	/* uart0_txd.uart0_txd PULLDOWN | MODE0 */
+			>;
+		};
 	};
 
 	ocp {
 		uart1: serial@44e09000 {
+			pinctrl-names = "default";
+			pinctrl-0 = <&uart0_pins>;
+

Also here.

Quoted 17 lines
arch/arm/boot/dts/am335x-evm.dts +0 -0
 			status = "okay";
 		};
 
arch/arm/boot/dts/am335x-evmsk.dts +6 -0
index 21d5a08..0e7f1b8 100644
@@ -58,10 +58,20 @@
 				0x18c 0x30	/* i2c0_scl.i2c0_scl PULLUP | INPUTENABLE | MODE0 */
 			>;
 		};
+
+		uart0_pins: pinmux_uart0_pins {
+			pinctrl-single,pins = <
+				0x170 0x30	/* uart0_rxd.uart0_rxd PULLUP | INPUTENABLE | MODE0 */
+				0x174 0x00	/* uart0_txd.uart0_txd PULLDOWN | MODE0 */
+			>;

arch/arm/boot/dts/am335x-evmsk.dts line 76

Quoted 10 lines
arch/arm/boot/dts/am335x-evmsk.dts +4 -0
+		};
 	};
 
 	ocp {
 		uart1: serial@44e09000 {
+			pinctrl-names = "default";
+			pinctrl-0 = <&uart0_pins>;
+
 			status = "okay";
 		};

And here.

-Matt

#16 lore raw

PATCH 5/5 ARM: dts: AM33XX: Add default pinctrl binding for UART0 device

Quoted 48 lines

-----Original Message-----
From: Matt Porter [mailto:ohiomdp at gmail.com] On Behalf Of Porter, Matt
Sent: Wednesday, March 27, 2013 7:03 PM
To: Hiremath, Vaibhav
Cc: linux-omap at vger.kernel.org; linux-arm-kernel at lists.infradead.org; Cousson, Benoit; devicetree-discuss at lists.ozlabs.org
Subject: Re: [PATCH 5/5] ARM: dts: AM33XX: Add default pinctrl binding for UART0 device

Quoted 5 lines · Vaibhav Hiremath

Add pin control binding for UART0 device nodes in all board specific DT files.

Except for trivial comments below I'll add my

Review

Quoted 7 lines
---
 arch/arm/boot/dts/am335x-bone.dts  |   10 ++++++++++
 arch/arm/boot/dts/am335x-evm.dts   |   10 ++++++++++
 arch/arm/boot/dts/am335x-evmsk.dts |   10 ++++++++++
 3 files changed, 30 insertions(+), 0 deletions(-)
(quoted diff) +0 -0

b/arch/arm/boot/dts/am335x-bone.dts

arch/arm/boot/dts/am335x-bone.dts line 43

Quoted 5 lines

index 1d623e4..3c4c66f 100644

arch/arm/boot/dts/am335x-bone.dts +0 -0
@@ -43,10 +43,20 @@
 				0x18c 0x30	/* i2c0_scl.i2c0_scl PULLUP |

INPUTENABLE | MODE0 */

arch/arm/boot/dts/am335x-bone.dts line 49

Quoted 6 lines
arch/arm/boot/dts/am335x-bone.dts +4 -0
 			>;
 		};
+
+		uart0_pins: pinmux_uart0_pins {
+			pinctrl-single,pins = <
+				0x170 0x30	/* uart0_rxd.uart0_rxd PULLUP |

INPUTENABLE | MODE0 */

arch/arm/boot/dts/am335x-bone.dts line 50

Quoted 1 line
arch/arm/boot/dts/am335x-bone.dts +1 -0
+				0x174 0x00	/* uart0_txd.uart0_txd PULLDOWN |

MODE0 */

Quoted 4 lines
arch/arm/boot/dts/am335x-bone.dts +2 -0
+			>;
+		};
 	};
 
Quoted 8 lines

arch/arm/boot/dts/am335x-bone.dts line 59

Quoted 5 lines
arch/arm/boot/dts/am335x-bone.dts +3 -0
 	ocp {
 		uart1: serial at 44e09000 {
+			pinctrl-names = "default";
+			pinctrl-0 = <&uart0_pins>;
+

Please change this to be uart0 so it all matches.

Yes, you are right, this also can be changed now. I tested it with changed uart numbering and it is working.

I didn?t touch uart, as I recall earlier discussion of Having 1-based uart numbering and also it is being documented In DT for hwmod -

ti,hwmods : Must be "uart<n>", n being the instance number (1-based)

I will change it and submit the next version with your acked-by.

Thanks,
Vaibhav