Skip to contentSkip to conversation

ARM: dts: ux500: Move generic pin configs out of ste-href-family-pinctrl.dtsi

PATCH In review Stephan Gerhold 2 participants 10 messages Nov 25, 2019 Device tree bindings

lore
Share & tools
lore
#0 lore raw

PATCH 1/5 ARM: dts: ux500: Move generic pin configs out of ste-href-family-pinctrl.dtsi

All existing Ux500 boards make use of ste-href-family-pinctrl.dtsi, which contains shared pin configurations for UART, I2C and SDI. Most of these can be also used for devices not based on HREF.

Move the generic pin configs into a new device tree include "ste-dbx5x0-pinctrl.dtsi". There is no functional change (yet), as a next step we will rename the pin configs to use more generic names.

---
 arch/arm/boot/dts/ste-dbx5x0-pinctrl.dtsi     | 529 +++++++++++++++++
 .../arm/boot/dts/ste-href-family-pinctrl.dtsi | 532 +-----------------
 2 files changed, 530 insertions(+), 531 deletions(-)
 create mode 100644 arch/arm/boot/dts/ste-dbx5x0-pinctrl.dtsi
arch/arm/boot/dts/ste-dbx5x0-pinctrl.dtsi new file +529 -0
new file mode 100644
index 000000000000..fbc41cacf690
@@ -0,0 +1,529 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
+/*
+ * Copyright 2013 Linaro Ltd.
+ */
+
+#include "ste-nomadik-pinctrl.dtsi"
+
+&pinctrl {
+	/* Settings for all UART default and sleep states */
+	uart0 {
+		uart0_default_mode: uart0_default {
+			default_mux {
+				function = "u0";
+				groups = "u0_a_1";
+			};
+			default_cfg1 {
+				pins = "GPIO0_AJ5", "GPIO2_AH4"; /* CTS+RXD */
+				ste,config = <&in_pu>;
+			};
+			default_cfg2 {
+				pins = "GPIO1_AJ3", "GPIO3_AH3"; /* RTS+TXD */
+				ste,config = <&out_hi>;
+			};
+		};
+
+		uart0_sleep_mode: uart0_sleep {
+			sleep_cfg1 {
+				pins = "GPIO0_AJ5", "GPIO2_AH4"; /* CTS+RXD */
+				ste,config = <&slpm_in_wkup_pdis>;
+			};
+			sleep_cfg2 {
+				pins = "GPIO1_AJ3"; /* RTS */
+				ste,config = <&slpm_out_hi_wkup_pdis>;
+			};
+			sleep_cfg3 {
+				pins = "GPIO3_AH3"; /* TXD */
+				ste,config = <&slpm_out_wkup_pdis>;
+			};
+		};
+	};
+
+	uart1 {
+		uart1_default_mode: uart1_default {
+			default_mux {
+				function = "u1";
+				groups = "u1rxtx_a_1";
+			};
+			default_cfg1 {
+				pins = "GPIO4_AH6"; /* RXD */
+				ste,config = <&in_pu>;
+			};
+			default_cfg2 {
+				pins = "GPIO5_AG6"; /* TXD */
+				ste,config = <&out_hi>;
+			};
+		};
+
+		uart1_sleep_mode: uart1_sleep {
+			sleep_cfg1 {
+				pins = "GPIO4_AH6"; /* RXD */
+				ste,config = <&slpm_in_wkup_pdis>;
+			};
+			sleep_cfg2 {
+				pins = "GPIO5_AG6"; /* TXD */
+				ste,config = <&slpm_out_wkup_pdis>;
+			};
+		};
+	};
+
+	uart2 {
+		uart2_default_mode: uart2_default {
+			default_mux {
+				function = "u2";
+				groups = "u2rxtx_c_1";
+			};
+			default_cfg1 {
+				pins = "GPIO29_W2"; /* RXD */
+				ste,config = <&in_pu>;
+			};
+			default_cfg2 {
+				pins = "GPIO30_W3"; /* TXD */
+				ste,config = <&out_hi>;
+			};
+		};
+
+		uart2_sleep_mode: uart2_sleep {
+			sleep_cfg1 {
+				pins = "GPIO29_W2"; /* RXD */
+				ste,config = <&in_wkup_pdis>;
+			};
+			sleep_cfg2 {
+				pins = "GPIO30_W3"; /* TXD */
+				ste,config = <&out_wkup_pdis>;
+			};
+		};
+	};
+
+	/* Settings for all I2C default and sleep states */
+	i2c0 {
+		i2c0_default_mode: i2c_default {
+			default_mux {
+				function = "i2c0";
+				groups = "i2c0_a_1";
+			};
+			default_cfg1 {
+				pins = "GPIO147_C15", "GPIO148_B16"; /* SDA/SCL */
+				ste,config = <&in_pu>;
+			};
+		};
+
+		i2c0_sleep_mode: i2c_sleep {
+			sleep_cfg1 {
+				pins = "GPIO147_C15", "GPIO148_B16"; /* SDA/SCL */
+				ste,config = <&slpm_in_wkup_pdis>;
+			};
+		};
+	};
+
+	i2c1 {
+		i2c1_default_mode: i2c_default {
+			default_mux {
+				function = "i2c1";
+				groups = "i2c1_b_2";
+			};
+			default_cfg1 {
+				pins = "GPIO16_AD3", "GPIO17_AD4"; /* SDA/SCL */
+				ste,config = <&in_pu>;
+			};
+		};
+
+		i2c1_sleep_mode: i2c_sleep {
+			sleep_cfg1 {
+				pins = "GPIO16_AD3", "GPIO17_AD4"; /* SDA/SCL */
+				ste,config = <&slpm_in_wkup_pdis>;
+			};
+		};
+	};
+
+	i2c2 {
+		i2c2_default_mode: i2c_default {
+			default_mux {
+				function = "i2c2";
+				groups = "i2c2_b_2";
+			};
+			default_cfg1 {
+				pins = "GPIO10_AF5", "GPIO11_AG4"; /* SDA/SCL */
+				ste,config = <&in_pu>;
+			};
+		};
+
+		i2c2_sleep_mode: i2c_sleep {
+			sleep_cfg1 {
+				pins = "GPIO10_AF5", "GPIO11_AG4"; /* SDA/SCL */
+				ste,config = <&slpm_in_wkup_pdis>;
+			};
+		};
+	};
+
+	i2c3 {
+		i2c3_default_mode: i2c_default {
+			default_mux {
+				function = "i2c3";
+				groups = "i2c3_c_2";
+			};
+			default_cfg1 {
+				pins = "GPIO229_AG7", "GPIO230_AF7"; /* SDA/SCL */
+				ste,config = <&in_pu>;
+			};
+		};
+
+		i2c3_sleep_mode: i2c_sleep {
+			sleep_cfg1 {
+				pins = "GPIO229_AG7", "GPIO230_AF7"; /* SDA/SCL */
+				ste,config = <&slpm_in_wkup_pdis>;
+			};
+		};
+	};
+
+	/*
+	 * Activating I2C4 will conflict with UART1 about the same pins so do not
+	 * enable I2C4 and UART1 at the same time.
+	 */
+	i2c4 {
+		i2c4_default_mode: i2c_default {
+			default_mux {
+				function = "i2c4";
+				groups = "i2c4_b_1";
+			};
+			default_cfg1 {
+				pins = "GPIO4_AH6", "GPIO5_AG6"; /* SDA/SCL */
+				ste,config = <&in_pu>;
+			};
+		};
+
+		i2c4_sleep_mode: i2c_sleep {
+			sleep_cfg1 {
+				pins = "GPIO4_AH6", "GPIO5_AG6"; /* SDA/SCL */
+				ste,config = <&slpm_in_wkup_pdis>;
+			};
+		};
+	};
+
+	/* Settings for all MMC/SD/SDIO default and sleep states */
+	sdi0 {
+		/* This is the external SD card slot, 4 bits wide */
+		sdi0_default_mode: sdi0_default {
+			default_mux {
+				function = "mc0";
+				groups = "mc0_a_1";
+			};
+			default_cfg1 {
+				pins =
+				"GPIO18_AC2", /* CMDDIR */
+				"GPIO19_AC1", /* DAT0DIR */
+				"GPIO20_AB4"; /* DAT2DIR */
+				ste,config = <&out_hi>;
+			};
+			default_cfg2 {
+				pins = "GPIO22_AA3"; /* FBCLK */
+				ste,config = <&in_nopull>;
+			};
+			default_cfg3 {
+				pins = "GPIO23_AA4"; /* CLK */
+				ste,config = <&out_lo>;
+			};
+			default_cfg4 {
+				pins =
+				"GPIO24_AB2", /* CMD */
+				"GPIO25_Y4", /* DAT0 */
+				"GPIO26_Y2", /* DAT1 */
+				"GPIO27_AA2", /* DAT2 */
+				"GPIO28_AA1"; /* DAT3 */
+				ste,config = <&in_pu>;
+			};
+		};
+
+		sdi0_sleep_mode: sdi0_sleep {
+			sleep_cfg1 {
+				pins =
+				"GPIO18_AC2", /* CMDDIR */
+				"GPIO19_AC1", /* DAT0DIR */
+				"GPIO20_AB4"; /* DAT2DIR */
+				ste,config = <&slpm_out_hi_wkup_pdis>;
+			};
+			sleep_cfg2 {
+				pins =
+				"GPIO22_AA3", /* FBCLK */
+				"GPIO24_AB2", /* CMD */
+				"GPIO25_Y4", /* DAT0 */
+				"GPIO26_Y2", /* DAT1 */
+				"GPIO27_AA2", /* DAT2 */
+				"GPIO28_AA1"; /* DAT3 */
+				ste,config = <&slpm_in_wkup_pdis>;
+			};
+			sleep_cfg3 {
+				pins = "GPIO23_AA4"; /* CLK */
+				ste,config = <&slpm_out_lo_wkup_pdis>;
+			};
+		};
+	};
+
+	sdi1 {
+		/* This is the WLAN SDIO 4 bits wide */
+		sdi1_default_mode: sdi1_default {
+			default_mux {
+				function = "mc1";
+				groups = "mc1_a_1";
+			};
+			default_cfg1 {
+				pins = "GPIO208_AH16"; /* CLK */
+				ste,config = <&out_lo>;
+			};
+			default_cfg2 {
+				pins = "GPIO209_AG15"; /* FBCLK */
+				ste,config = <&in_nopull>;
+			};
+			default_cfg3 {
+				pins =
+				"GPIO210_AJ15", /* CMD */
+				"GPIO211_AG14", /* DAT0 */
+				"GPIO212_AF13", /* DAT1 */
+				"GPIO213_AG13", /* DAT2 */
+				"GPIO214_AH15"; /* DAT3 */
+				ste,config = <&in_pu>;
+			};
+		};
+
+		sdi1_sleep_mode: sdi1_sleep {
+			sleep_cfg1 {
+				pins = "GPIO208_AH16"; /* CLK */
+				ste,config = <&slpm_out_lo_wkup_pdis>;
+			};
+			sleep_cfg2 {
+				pins =
+				"GPIO209_AG15", /* FBCLK */
+				"GPIO210_AJ15", /* CMD */
+				"GPIO211_AG14", /* DAT0 */
+				"GPIO212_AF13", /* DAT1 */
+				"GPIO213_AG13", /* DAT2 */
+				"GPIO214_AH15"; /* DAT3 */
+				ste,config = <&slpm_in_wkup_pdis>;
+			};
+		};
+	};
+
+	sdi2 {
+		/* This is the eMMC 8 bits wide, usually PoP eMMC */
+		sdi2_default_mode: sdi2_default {
+			default_mux {
+				function = "mc2";
+				groups = "mc2_a_1";
+			};
+			default_cfg1 {
+				pins = "GPIO128_A5"; /* CLK */
+				ste,config = <&out_lo>;
+			};
+			default_cfg2 {
+				pins = "GPIO130_C8"; /* FBCLK */
+				ste,config = <&in_nopull>;
+			};
+			default_cfg3 {
+				pins =
+				"GPIO129_B4", /* CMD */
+				"GPIO131_A12", /* DAT0 */
+				"GPIO132_C10", /* DAT1 */
+				"GPIO133_B10", /* DAT2 */
+				"GPIO134_B9", /* DAT3 */
+				"GPIO135_A9", /* DAT4 */
+				"GPIO136_C7", /* DAT5 */
+				"GPIO137_A7", /* DAT6 */
+				"GPIO138_C5"; /* DAT7 */
+				ste,config = <&in_pu>;
+			};
+		};
+
+		sdi2_sleep_mode: sdi2_sleep {
+			sleep_cfg1 {
+				pins = "GPIO128_A5"; /* CLK */
+				ste,config = <&out_lo_wkup_pdis>;
+			};
+			sleep_cfg2 {
+				pins =
+				"GPIO130_C8", /* FBCLK */
+				"GPIO129_B4"; /* CMD */
+				ste,config = <&in_wkup_pdis_en>;
+			};
+			sleep_cfg3 {
+				pins =
+				"GPIO131_A12", /* DAT0 */
+				"GPIO132_C10", /* DAT1 */
+				"GPIO133_B10", /* DAT2 */
+				"GPIO134_B9", /* DAT3 */
+				"GPIO135_A9", /* DAT4 */
+				"GPIO136_C7", /* DAT5 */
+				"GPIO137_A7", /* DAT6 */
+				"GPIO138_C5"; /* DAT7 */
+				ste,config = <&in_wkup_pdis>;
+			};
+		};
+	};
+
+	sdi4 {
+		/* This is the eMMC 8 bits wide, usually PCB-mounted eMMC */
+		sdi4_default_mode: sdi4_default {
+			default_mux {
+				function = "mc4";
+				groups = "mc4_a_1";
+			};
+			default_cfg1 {
+				pins = "GPIO203_AE23"; /* CLK */
+				ste,config = <&out_lo>;
+			};
+			default_cfg2 {
+				pins = "GPIO202_AF25"; /* FBCLK */
+				ste,config = <&in_nopull>;
+			};
+			default_cfg3 {
+				pins =
+				"GPIO201_AF24", /* CMD */
+				"GPIO200_AH26", /* DAT0 */
+				"GPIO199_AH23", /* DAT1 */
+				"GPIO198_AG25", /* DAT2 */
+				"GPIO197_AH24", /* DAT3 */
+				"GPIO207_AJ23", /* DAT4 */
+				"GPIO206_AG24", /* DAT5 */
+				"GPIO205_AG23", /* DAT6 */
+				"GPIO204_AF23"; /* DAT7 */
+				ste,config = <&in_pu>;
+			};
+		};
+
+		sdi4_sleep_mode: sdi4_sleep {
+			sleep_cfg1 {
+				pins = "GPIO203_AE23"; /* CLK */
+				ste,config = <&out_lo_wkup_pdis>;
+			};
+			sleep_cfg2 {
+				pins =
+				"GPIO202_AF25", /* FBCLK */
+				"GPIO201_AF24", /* CMD */
+				"GPIO200_AH26", /* DAT0 */
+				"GPIO199_AH23", /* DAT1 */
+				"GPIO198_AG25", /* DAT2 */
+				"GPIO197_AH24", /* DAT3 */
+				"GPIO207_AJ23", /* DAT4 */
+				"GPIO206_AG24", /* DAT5 */
+				"GPIO205_AG23", /* DAT6 */
+				"GPIO204_AF23"; /* DAT7 */
+				ste,config = <&slpm_in_wkup_pdis>;
+			};
+		};
+	};
+
+	/*
+	 * Multi-rate serial ports (MSPs) - MSP3 output is internal and
+	 * cannot be muxed onto any pins.
+	 */
+	msp0 {
+		msp0_default_mode: msp0_default {
+			default_msp0_mux {
+				function = "msp0";
+				groups = "msp0txrx_a_1", "msp0tfstck_a_1";
+			};
+			default_msp0_cfg {
+				pins =
+				"GPIO12_AC4", /* TXD */
+				"GPIO15_AC3", /* RXD */
+				"GPIO13_AF3", /* TFS */
+				"GPIO14_AE3"; /* TCK */
+				ste,config = <&in_nopull>;
+			};
+		};
+	};
+
+	msp1 {
+		msp1_default_mode: msp1_default {
+			default_mux {
+				function = "msp1";
+				groups = "msp1txrx_a_1", "msp1_a_1";
+			};
+			default_cfg1 {
+				pins = "GPIO33_AF2";
+				ste,config = <&out_lo>;
+			};
+			default_cfg2 {
+				pins =
+				"GPIO34_AE1",
+				"GPIO35_AE2",
+				"GPIO36_AG2";
+				ste,config = <&in_nopull>;
+			};
+		};
+	};
+
+	msp2 {
+		msp2_default_mode: msp2_default {
+			/* MSP2 usually used for HDMI audio */
+			default_mux {
+				function = "msp2";
+				groups = "msp2_a_1";
+			};
+			default_cfg1 {
+				pins =
+				"GPIO193_AH27", /* TXD */
+				"GPIO194_AF27", /* TCK */
+				"GPIO195_AG28"; /* TFS */
+				ste,config = <&in_pd>;
+			};
+			default_cfg2 {
+				pins = "GPIO196_AG26"; /* RXD */
+				ste,config = <&out_lo>;
+			};
+		};
+	};
+
+	musb {
+		musb_default_mode: musb_default {
+			default_mux {
+				function = "usb";
+				groups = "usb_a_1";
+			};
+			default_cfg1 {
+				pins =
+				"GPIO256_AF28", /* NXT */
+				"GPIO258_AD29", /* XCLK */
+				"GPIO259_AC29", /* DIR */
+				"GPIO260_AD28", /* DAT7 */
+				"GPIO261_AD26", /* DAT6 */
+				"GPIO262_AE26", /* DAT5 */
+				"GPIO263_AG29", /* DAT4 */
+				"GPIO264_AE27", /* DAT3 */
+				"GPIO265_AD27", /* DAT2 */
+				"GPIO266_AC28", /* DAT1 */
+				"GPIO267_AC27"; /* DAT0 */
+				ste,config = <&in_nopull>;
+			};
+			default_cfg2 {
+				pins = "GPIO257_AE29"; /* STP */
+				ste,config = <&out_hi>;
+			};
+		};
+
+		musb_sleep_mode: musb_sleep {
+			sleep_cfg1 {
+				pins =
+				"GPIO256_AF28", /* NXT */
+				"GPIO258_AD29", /* XCLK */
+				"GPIO259_AC29"; /* DIR */
+				ste,config = <&slpm_wkup_pdis_en>;
+			};
+			sleep_cfg2 {
+				pins = "GPIO257_AE29"; /* STP */
+				ste,config = <&slpm_out_hi_wkup_pdis>;
+			};
+			sleep_cfg3 {
+				pins =
+				"GPIO260_AD28", /* DAT7 */
+				"GPIO261_AD26", /* DAT6 */
+				"GPIO262_AE26", /* DAT5 */
+				"GPIO263_AG29", /* DAT4 */
+				"GPIO264_AE27", /* DAT3 */
+				"GPIO265_AD27", /* DAT2 */
+				"GPIO266_AC28", /* DAT1 */
+				"GPIO267_AC27"; /* DAT0 */
+				ste,config = <&slpm_in_wkup_pdis_en>;
+			};
+		};
+	};
+};
arch/arm/boot/dts/ste-href-family-pinctrl.dtsi +1 -531

548 lines not on this page · raw message

Signature · 1 line
2.24.0
#1 lore raw

PATCH 2/5 ARM: dts: ux500: Rename generic pin configs according to pin group

Some components (e.g. SDI, I2C) can be used with different pin assignments. Before we can add the alternative configurations, we need to rename the current configurations to more generic names.

Each pin configuration usually configures one specific pin group. Therefore we rename the configurations to use the pin group as name. Make up for the slightly longer names by removing the "_mode" suffix.

Rename all existing uses to use the new labels.

---
 arch/arm/boot/dts/ste-dbx5x0-pinctrl.dtsi | 58 ++++++++++-----------
 arch/arm/boot/dts/ste-href.dtsi           | 62 +++++++++++++----------
 arch/arm/boot/dts/ste-snowball.dts        | 52 +++++++++----------
 3 files changed, 90 insertions(+), 82 deletions(-)
arch/arm/boot/dts/ste-dbx5x0-pinctrl.dtsi +29 -29
index fbc41cacf690..b3ef91b98207 100644
@@ -8,7 +8,7 @@
 &pinctrl {
 	/* Settings for all UART default and sleep states */
 	uart0 {
-		uart0_default_mode: uart0_default {
+		u0_a_1_default: u0_a_1_default {
 			default_mux {
 				function = "u0";
 				groups = "u0_a_1";
@@ -23,7 +23,7 @@
 			};
 		};
 
-		uart0_sleep_mode: uart0_sleep {
+		u0_a_1_sleep: u0_a_1_sleep {
 			sleep_cfg1 {
 				pins = "GPIO0_AJ5", "GPIO2_AH4"; /* CTS+RXD */
 				ste,config = <&slpm_in_wkup_pdis>;
@@ -40,7 +40,7 @@
 	};
 
 	uart1 {
-		uart1_default_mode: uart1_default {
+		u1rxtx_a_1_default: u1rxtx_a_1_default {
 			default_mux {
 				function = "u1";
 				groups = "u1rxtx_a_1";
@@ -55,7 +55,7 @@
 			};
 		};
 
-		uart1_sleep_mode: uart1_sleep {
+		u1rxtx_a_1_sleep: u1rxtx_a_1_sleep {
 			sleep_cfg1 {
 				pins = "GPIO4_AH6"; /* RXD */
 				ste,config = <&slpm_in_wkup_pdis>;
@@ -68,7 +68,7 @@
 	};
 
 	uart2 {
-		uart2_default_mode: uart2_default {
+		u2rxtx_c_1_default: u2rxtx_c_1_default {
 			default_mux {
 				function = "u2";
 				groups = "u2rxtx_c_1";
@@ -83,7 +83,7 @@
 			};
 		};
 
-		uart2_sleep_mode: uart2_sleep {
+		u2rxtx_c_1_sleep: u2rxtx_c_1_sleep {
 			sleep_cfg1 {
 				pins = "GPIO29_W2"; /* RXD */
 				ste,config = <&in_wkup_pdis>;
@@ -97,7 +97,7 @@
 
 	/* Settings for all I2C default and sleep states */
 	i2c0 {
-		i2c0_default_mode: i2c_default {
+		i2c0_a_1_default: i2c0_a_1_default {
 			default_mux {
 				function = "i2c0";
 				groups = "i2c0_a_1";
@@ -108,7 +108,7 @@
 			};
 		};
 
-		i2c0_sleep_mode: i2c_sleep {
+		i2c0_a_1_sleep: i2c0_a_1_sleep {
 			sleep_cfg1 {
 				pins = "GPIO147_C15", "GPIO148_B16"; /* SDA/SCL */
 				ste,config = <&slpm_in_wkup_pdis>;
@@ -117,7 +117,7 @@
 	};
 
 	i2c1 {
-		i2c1_default_mode: i2c_default {
+		i2c1_b_2_default: i2c1_b_2_default {
 			default_mux {
 				function = "i2c1";
 				groups = "i2c1_b_2";
@@ -128,7 +128,7 @@
 			};
 		};
 
-		i2c1_sleep_mode: i2c_sleep {
+		i2c1_b_2_sleep: i2c1_b_2_sleep {
 			sleep_cfg1 {
 				pins = "GPIO16_AD3", "GPIO17_AD4"; /* SDA/SCL */
 				ste,config = <&slpm_in_wkup_pdis>;
@@ -137,7 +137,7 @@
 	};
 
 	i2c2 {
-		i2c2_default_mode: i2c_default {
+		i2c2_b_2_default: i2c2_b_2_default {
 			default_mux {
 				function = "i2c2";
 				groups = "i2c2_b_2";
@@ -148,7 +148,7 @@
 			};
 		};
 
-		i2c2_sleep_mode: i2c_sleep {
+		i2c2_b_2_sleep: i2c2_b_2_sleep {
 			sleep_cfg1 {
 				pins = "GPIO10_AF5", "GPIO11_AG4"; /* SDA/SCL */
 				ste,config = <&slpm_in_wkup_pdis>;
@@ -157,7 +157,7 @@
 	};
 
 	i2c3 {
-		i2c3_default_mode: i2c_default {
+		i2c3_c_2_default: i2c3_c_2_default {
 			default_mux {
 				function = "i2c3";
 				groups = "i2c3_c_2";
@@ -168,7 +168,7 @@
 			};
 		};
 
-		i2c3_sleep_mode: i2c_sleep {
+		i2c3_c_2_sleep: i2c3_c_2_sleep {
 			sleep_cfg1 {
 				pins = "GPIO229_AG7", "GPIO230_AF7"; /* SDA/SCL */
 				ste,config = <&slpm_in_wkup_pdis>;
@@ -181,7 +181,7 @@
 	 * enable I2C4 and UART1 at the same time.
 	 */
 	i2c4 {
-		i2c4_default_mode: i2c_default {
+		i2c4_b_1_default: i2c4_b_1_default {
 			default_mux {
 				function = "i2c4";
 				groups = "i2c4_b_1";
@@ -192,7 +192,7 @@
 			};
 		};
 
-		i2c4_sleep_mode: i2c_sleep {
+		i2c4_b_1_sleep: i2c4_b_1_sleep {
 			sleep_cfg1 {
 				pins = "GPIO4_AH6", "GPIO5_AG6"; /* SDA/SCL */
 				ste,config = <&slpm_in_wkup_pdis>;
@@ -203,7 +203,7 @@
 	/* Settings for all MMC/SD/SDIO default and sleep states */
 	sdi0 {
 		/* This is the external SD card slot, 4 bits wide */
-		sdi0_default_mode: sdi0_default {
+		mc0_a_1_default: mc0_a_1_default {
 			default_mux {
 				function = "mc0";
 				groups = "mc0_a_1";
@@ -234,7 +234,7 @@
 			};
 		};
 
-		sdi0_sleep_mode: sdi0_sleep {
+		mc0_a_1_sleep: mc0_a_1_sleep {
 			sleep_cfg1 {
 				pins =
 				"GPIO18_AC2", /* CMDDIR */
@@ -261,7 +261,7 @@
 
 	sdi1 {
 		/* This is the WLAN SDIO 4 bits wide */
-		sdi1_default_mode: sdi1_default {
+		mc1_a_1_default: mc1_a_1_default {
 			default_mux {
 				function = "mc1";
 				groups = "mc1_a_1";
@@ -285,7 +285,7 @@
 			};
 		};
 
-		sdi1_sleep_mode: sdi1_sleep {
+		mc1_a_1_sleep: mc1_a_1_sleep {
 			sleep_cfg1 {
 				pins = "GPIO208_AH16"; /* CLK */
 				ste,config = <&slpm_out_lo_wkup_pdis>;
@@ -305,7 +305,7 @@
 
 	sdi2 {
 		/* This is the eMMC 8 bits wide, usually PoP eMMC */
-		sdi2_default_mode: sdi2_default {
+		mc2_a_1_default: mc2_a_1_default {
 			default_mux {
 				function = "mc2";
 				groups = "mc2_a_1";
@@ -333,7 +333,7 @@
 			};
 		};
 
-		sdi2_sleep_mode: sdi2_sleep {
+		mc2_a_1_sleep: mc2_a_1_sleep {
 			sleep_cfg1 {
 				pins = "GPIO128_A5"; /* CLK */
 				ste,config = <&out_lo_wkup_pdis>;
@@ -361,7 +361,7 @@
 
 	sdi4 {
 		/* This is the eMMC 8 bits wide, usually PCB-mounted eMMC */
-		sdi4_default_mode: sdi4_default {
+		mc4_a_1_default: mc4_a_1_default {
 			default_mux {
 				function = "mc4";
 				groups = "mc4_a_1";
@@ -389,7 +389,7 @@
 			};
 		};
 
-		sdi4_sleep_mode: sdi4_sleep {
+		mc4_a_1_sleep: mc4_a_1_sleep {
 			sleep_cfg1 {
 				pins = "GPIO203_AE23"; /* CLK */
 				ste,config = <&out_lo_wkup_pdis>;
@@ -416,7 +416,7 @@
 	 * cannot be muxed onto any pins.
 	 */
 	msp0 {
-		msp0_default_mode: msp0_default {
+		msp0txrxtfstck_a_1_default: msp0txrxtfstck_a_1_default {
 			default_msp0_mux {
 				function = "msp0";
 				groups = "msp0txrx_a_1", "msp0tfstck_a_1";
@@ -433,7 +433,7 @@
 	};
 
 	msp1 {
-		msp1_default_mode: msp1_default {
+		msp1txrx_a_1_default: msp1txrx_a_1_default {
 			default_mux {
 				function = "msp1";
 				groups = "msp1txrx_a_1", "msp1_a_1";
@@ -453,7 +453,7 @@
 	};
 
 	msp2 {
-		msp2_default_mode: msp2_default {
+		msp2_a_1_default: msp2_a_1_default {
 			/* MSP2 usually used for HDMI audio */
 			default_mux {
 				function = "msp2";
@@ -474,7 +474,7 @@
 	};
 
 	musb {
-		musb_default_mode: musb_default {
+		usb_a_1_default: usb_a_1_default {
 			default_mux {
 				function = "usb";
 				groups = "usb_a_1";
@@ -500,7 +500,7 @@
 			};
 		};
 
-		musb_sleep_mode: musb_sleep {
+		usb_a_1_sleep: usb_a_1_sleep {
 			sleep_cfg1 {
 				pins =
 				"GPIO256_AF28", /* NXT */
arch/arm/boot/dts/ste-href.dtsi +35 -27

149 lines not on this page · raw message

arch/arm/boot/dts/ste-snowball.dts +26 -26

133 lines not on this page · raw message

Signature · 1 line
2.24.0
#2 lore raw

Re: [PATCH 2/5] ARM: dts: ux500: Rename generic pin configs according to pin group

Quoted 11 lines · Stephan Gerhold

Some components (e.g. SDI, I2C) can be used with different pin assignments. Before we can add the alternative configurations, we need to rename the current configurations to more generic names.

Each pin configuration usually configures one specific pin group. Therefore we rename the configurations to use the pin group as name. Make up for the slightly longer names by removing the "_mode" suffix.

Rename all existing uses to use the new labels.

Patch applied for v5.6.

Yours,
Linus Walleij

#3 lore raw

PATCH 3/5 ARM: dts: ux500: Add alternative SDI pin configs

In reply to Stephan Gerhold

SDI0/SDI1 can be used in configurations where some of the pins (e.g. direction control) are not used. The pinctrl driver has separate pin groups for them.

Add new pin configurations for:
- mc0_a_2: like mc0_a_1, but without CMDDIR/DAT0DIR/DAT2DIR
- mc1_a_2: like mc1_a_1, but without FBCLK

---
 arch/arm/boot/dts/ste-dbx5x0-pinctrl.dtsi | 77 +++++++++++++++++++++++
 1 file changed, 77 insertions(+)
arch/arm/boot/dts/ste-dbx5x0-pinctrl.dtsi +77 -0
index b3ef91b98207..b6d0a60e9aed 100644
@@ -257,6 +257,47 @@
 				ste,config = <&slpm_out_lo_wkup_pdis>;
 			};
 		};
+
+		mc0_a_2_default: mc0_a_2_default {
+			default_mux {
+				function = "mc0";
+				groups = "mc0_a_2";
+			};
+			default_cfg1 {
+				pins = "GPIO22_AA3"; /* FBCLK */
+				ste,config = <&in_nopull>;
+			};
+			default_cfg2 {
+				pins = "GPIO23_AA4"; /* CLK */
+				ste,config = <&out_lo>;
+			};
+			default_cfg3 {
+				pins =
+				"GPIO24_AB2", /* CMD */
+				"GPIO25_Y4", /* DAT0 */
+				"GPIO26_Y2", /* DAT1 */
+				"GPIO27_AA2", /* DAT2 */
+				"GPIO28_AA1"; /* DAT3 */
+				ste,config = <&in_pu>;
+			};
+		};
+
+		mc0_a_2_sleep: mc0_a_2_sleep {
+			sleep_cfg1 {
+				pins =
+				"GPIO22_AA3", /* FBCLK */
+				"GPIO24_AB2", /* CMD */
+				"GPIO25_Y4", /* DAT0 */
+				"GPIO26_Y2", /* DAT1 */
+				"GPIO27_AA2", /* DAT2 */
+				"GPIO28_AA1"; /* DAT3 */
+				ste,config = <&slpm_in_wkup_pdis>;
+			};
+			sleep_cfg2 {
+				pins = "GPIO23_AA4"; /* CLK */
+				ste,config = <&slpm_out_lo_wkup_pdis>;
+			};
+		};
 	};
 
 	sdi1 {
@@ -301,6 +342,42 @@
 				ste,config = <&slpm_in_wkup_pdis>;
 			};
 		};
+
+		mc1_a_2_default: mc1_a_2_default {
+			default_mux {
+				function = "mc1";
+				groups = "mc1_a_2";
+			};
+			default_cfg1 {
+				pins = "GPIO208_AH16"; /* CLK */
+				ste,config = <&out_lo>;
+			};
+			default_cfg2 {
+				pins =
+				"GPIO210_AJ15", /* CMD */
+				"GPIO211_AG14", /* DAT0 */
+				"GPIO212_AF13", /* DAT1 */
+				"GPIO213_AG13", /* DAT2 */
+				"GPIO214_AH15"; /* DAT3 */
+				ste,config = <&in_pu>;
+			};
+		};
+
+		mc1_a_2_sleep: mc1_a_2_sleep {
+			sleep_cfg1 {
+				pins = "GPIO208_AH16"; /* CLK */
+				ste,config = <&slpm_out_lo_wkup_pdis>;
+			};
+			sleep_cfg2 {
+				pins =
+				"GPIO210_AJ15", /* CMD */
+				"GPIO211_AG14", /* DAT0 */
+				"GPIO212_AF13", /* DAT1 */
+				"GPIO213_AG13", /* DAT2 */
+				"GPIO214_AH15"; /* DAT3 */
+				ste,config = <&slpm_in_wkup_pdis>;
+			};
+		};
 	};
 
 	sdi2 {
Signature · 1 line
2.24.0
#4 lore raw

Re: [PATCH 3/5] ARM: dts: ux500: Add alternative SDI pin configs

Quoted 9 lines · Stephan Gerhold

SDI0/SDI1 can be used in configurations where some of the pins (e.g. direction control) are not used. The pinctrl driver has separate pin groups for them.

Add new pin configurations for:
- mc0_a_2: like mc0_a_1, but without CMDDIR/DAT0DIR/DAT2DIR
- mc1_a_2: like mc1_a_1, but without FBCLK

Patch applied for v5.6

Yours,
Linus Walleij

#5 lore raw

PATCH 4/5 ARM: dts: ux500: Add pin configs for UART1 CTS/RTS pins

In reply to Stephan Gerhold

UART1 an be optionally used with additional CTS/RTS pins. The pinctrl driver has an extra "u1ctsrts_a_1" pin group for them.

Add a new pin configuration to configure them correctly if needed.

---
 arch/arm/boot/dts/ste-dbx5x0-pinctrl.dtsi | 26 +++++++++++++++++++++++
 1 file changed, 26 insertions(+)
arch/arm/boot/dts/ste-dbx5x0-pinctrl.dtsi +26 -0
index b6d0a60e9aed..e85a08ad2ea7 100644
@@ -65,6 +65,32 @@
 				ste,config = <&slpm_out_wkup_pdis>;
 			};
 		};
+
+		u1ctsrts_a_1_default: u1ctsrts_a_1_default {
+			default_mux {
+				function = "u1";
+				groups = "u1ctsrts_a_1";
+			};
+			default_cfg1 {
+				pins = "GPIO6_AF6"; /* CTS */
+				ste,config = <&in_pu>;
+			};
+			default_cfg2 {
+				pins = "GPIO7_AG5"; /* RTS */
+				ste,config = <&out_hi>;
+			};
+		};
+
+		u1ctsrts_a_1_sleep: u1ctsrts_a_1_sleep {
+			sleep_cfg1 {
+				pins = "GPIO6_AF6"; /* CTS */
+				ste,config = <&slpm_in_wkup_pdis>;
+			};
+			sleep_cfg2 {
+				pins = "GPIO7_AG5"; /* RTS */
+				ste,config = <&slpm_out_hi_wkup_pdis>;
+			};
+		};
 	};
 
 	uart2 {
Signature · 1 line
2.24.0
#6 lore raw

Re: [PATCH 4/5] ARM: dts: ux500: Add pin configs for UART1 CTS/RTS pins

Quoted 1 line · Stephan Gerhold

UART1 an be optionally used with additional CTS/RTS pins.

s/an/can, duh.
I will fix this if a v2 is needed for some reason; otherwise, can you fix this when applying the patch?

Thanks!

Quoted 49 lines

The pinctrl driver has an extra "u1ctsrts_a_1" pin group for them.

Add a new pin configuration to configure them correctly if needed.

---
 arch/arm/boot/dts/ste-dbx5x0-pinctrl.dtsi | 26 +++++++++++++++++++++++
 1 file changed, 26 insertions(+)
arch/arm/boot/dts/ste-dbx5x0-pinctrl.dtsi +26 -0
index b6d0a60e9aed..e85a08ad2ea7 100644
@@ -65,6 +65,32 @@
 				ste,config = <&slpm_out_wkup_pdis>;
 			};
 		};
+
+		u1ctsrts_a_1_default: u1ctsrts_a_1_default {
+			default_mux {
+				function = "u1";
+				groups = "u1ctsrts_a_1";
+			};
+			default_cfg1 {
+				pins = "GPIO6_AF6"; /* CTS */
+				ste,config = <&in_pu>;
+			};
+			default_cfg2 {
+				pins = "GPIO7_AG5"; /* RTS */
+				ste,config = <&out_hi>;
+			};
+		};
+
+		u1ctsrts_a_1_sleep: u1ctsrts_a_1_sleep {
+			sleep_cfg1 {
+				pins = "GPIO6_AF6"; /* CTS */
+				ste,config = <&slpm_in_wkup_pdis>;
+			};
+			sleep_cfg2 {
+				pins = "GPIO7_AG5"; /* RTS */
+				ste,config = <&slpm_out_hi_wkup_pdis>;
+			};
+		};
 	};
 
 	uart2 {
Signature · 1 line
2.24.0
#7 lore raw

Re: [PATCH 4/5] ARM: dts: ux500: Add pin configs for UART1 CTS/RTS pins

In reply to Stephan Gerhold
Quoted 6 lines · Stephan Gerhold

UART1 an be optionally used with additional CTS/RTS pins. The pinctrl driver has an extra "u1ctsrts_a_1" pin group for them.

Add a new pin configuration to configure them correctly if needed.

Patch applied for v5.6 fixing up a spelling mistake in the process.

Yours,
Linus Walleij

#8 lore raw

PATCH 5/5 ARM: dts: ux500: nomadik-pinctrl: Add &gpio_in_nopull

In reply to Stephan Gerhold

ste-nomadik-pinctrl.dtsi already defines in_nopull and gpio_in_pu/pd, but there is no node to configure a pin as GPIO without pull up/down. Add a new &gpio_in_nopull node for this.

---
 arch/arm/boot/dts/ste-nomadik-pinctrl.dtsi | 5 +++++
 1 file changed, 5 insertions(+)
arch/arm/boot/dts/ste-nomadik-pinctrl.dtsi +5 -0
index 5673a1113aef..bfdb5d9a014f 100644
@@ -25,6 +25,11 @@
 		ste,output = <OUTPUT_LOW>;
 	};
 
+	gpio_in_nopull: gpio_input_nopull {
+		ste,gpio = <GPIOMODE_ENABLED>;
+		ste,input = <INPUT_NOPULL>;
+	};
+
 	gpio_in_pu: gpio_input_pull_up {
 		ste,gpio = <GPIOMODE_ENABLED>;
 		ste,input = <INPUT_PULLUP>;
Signature · 1 line
2.24.0
#9 lore raw
In reply to Stephan Gerhold
Quoted 10 lines · Stephan Gerhold

All existing Ux500 boards make use of ste-href-family-pinctrl.dtsi, which contains shared pin configurations for UART, I2C and SDI. Most of these can be also used for devices not based on HREF.

Move the generic pin configs into a new device tree include "ste-dbx5x0-pinctrl.dtsi". There is no functional change (yet), as a next step we will rename the pin configs to use more generic names.

Patch applied for v5.6.

Yours,
Linus Walleij