ARM: dts: DRA74X: Move common pinctrl definitions to common header
RFC PATCH 1/1 ARM: dts: DRA74X: Move common pinctrl definitions to common header
The I2C{1,2}, MCSPI{1,2}, UART{1,2}, QSPI1, USB{1,2}, RGMII and ATL functions can each be wired in only one way. Reduce duplication by defining that in dra74x.dtsi.
--- arch/arm/boot/dts/am57xx-beagle-x15.dts | 50 +--------- arch/arm/boot/dts/dra7-evm.dts | 142 +------------------------- arch/arm/boot/dts/dra74x.dtsi | 171 ++++++++++++++++++++++++++++++++ 3 files changed, 174 insertions(+), 189 deletions(-)
arch/arm/boot/dts/am57xx-beagle-x15.dts +2 -48
@@ -190,13 +190,6 @@ >; }; - i2c1_pins_default: i2c1_pins_default { - pinctrl-single,pins = < - DRA7XX_CORE_IOPAD(0x3800, PIN_INPUT_PULLUP | MUX_MODE0) /* i2c1_sda.sda */ - DRA7XX_CORE_IOPAD(0x3804, PIN_INPUT_PULLUP | MUX_MODE0) /* i2c1_scl.scl */ - >; - }; - hdmi_pins: pinmux_hdmi_pins { pinctrl-single,pins = < DRA7XX_CORE_IOPAD(0x3808, PIN_INPUT | MUX_MODE1) /* i2c2_sda.hdmi1_ddc_scl */
@@ -245,39 +238,6 @@ >; }; - cpsw_pins_default: cpsw_pins_default { - pinctrl-single,pins = < - /* Slave 1 */ - DRA7XX_CORE_IOPAD(0x3650, PIN_OUTPUT | MUX_MODE0) /* rgmii1_tclk */ - DRA7XX_CORE_IOPAD(0x3654, PIN_OUTPUT | MUX_MODE0) /* rgmii1_tctl */ - DRA7XX_CORE_IOPAD(0x3658, PIN_OUTPUT | MUX_MODE0) /* rgmii1_td3 */ - DRA7XX_CORE_IOPAD(0x365c, PIN_OUTPUT | MUX_MODE0) /* rgmii1_td2 */ - DRA7XX_CORE_IOPAD(0x3660, PIN_OUTPUT | MUX_MODE0) /* rgmii1_td1 */ - DRA7XX_CORE_IOPAD(0x3664, PIN_OUTPUT | MUX_MODE0) /* rgmii1_td0 */ - DRA7XX_CORE_IOPAD(0x3668, PIN_INPUT | MUX_MODE0) /* rgmii1_rclk */ - DRA7XX_CORE_IOPAD(0x366c, PIN_INPUT | MUX_MODE0) /* rgmii1_rctl */ - DRA7XX_CORE_IOPAD(0x3670, PIN_INPUT | MUX_MODE0) /* rgmii1_rd3 */ - DRA7XX_CORE_IOPAD(0x3674, PIN_INPUT | MUX_MODE0) /* rgmii1_rd2 */ - DRA7XX_CORE_IOPAD(0x3678, PIN_INPUT | MUX_MODE0) /* rgmii1_rd1 */ - DRA7XX_CORE_IOPAD(0x367c, PIN_INPUT | MUX_MODE0) /* rgmii1_rd0 */ - - /* Slave 2 */ - DRA7XX_CORE_IOPAD(0x3598, PIN_OUTPUT | MUX_MODE3) /* rgmii2_tclk */ - DRA7XX_CORE_IOPAD(0x359c, PIN_OUTPUT | MUX_MODE3) /* rgmii2_tctl */ - DRA7XX_CORE_IOPAD(0x35a0, PIN_OUTPUT | MUX_MODE3) /* rgmii2_td3 */ - DRA7XX_CORE_IOPAD(0x35a4, PIN_OUTPUT | MUX_MODE3) /* rgmii2_td2 */ - DRA7XX_CORE_IOPAD(0x35a8, PIN_OUTPUT | MUX_MODE3) /* rgmii2_td1 */ - DRA7XX_CORE_IOPAD(0x35ac, PIN_OUTPUT | MUX_MODE3) /* rgmii2_td0 */ - DRA7XX_CORE_IOPAD(0x35b0, PIN_INPUT | MUX_MODE3) /* rgmii2_rclk */ - DRA7XX_CORE_IOPAD(0x35b4, PIN_INPUT | MUX_MODE3) /* rgmii2_rctl */ - DRA7XX_CORE_IOPAD(0x35b8, PIN_INPUT | MUX_MODE3) /* rgmii2_rd3 */ - DRA7XX_CORE_IOPAD(0x35bc, PIN_INPUT | MUX_MODE3) /* rgmii2_rd2 */ - DRA7XX_CORE_IOPAD(0x35c0, PIN_INPUT | MUX_MODE3) /* rgmii2_rd1 */ - DRA7XX_CORE_IOPAD(0x35c4, PIN_INPUT | MUX_MODE3) /* rgmii2_rd0 */ - >; - - }; - cpsw_pins_sleep: cpsw_pins_sleep { pinctrl-single,pins = < /* Slave 1 */
@@ -343,12 +303,6 @@ >; }; - usb1_pins: pinmux_usb1_pins { - pinctrl-single,pins = < - DRA7XX_CORE_IOPAD(0x3680, PIN_INPUT_SLEW | MUX_MODE0) /* usb1_drvvbus */ - >; - }; - extcon_usb1_pins: extcon_usb1_pins { pinctrl-single,pins = < DRA7XX_CORE_IOPAD(0x37ec, PIN_INPUT_PULLUP | MUX_MODE14) /* uart1_rtsn.gpio7_25 */
@@ -397,7 +351,7 @@ &i2c1 { status = "okay"; pinctrl-names = "default"; - pinctrl-0 = <&i2c1_pins_default>; + pinctrl-0 = <&i2c1_pins>; clock-frequency = <400000>; tps659038: tps659038@58 {
@@ -642,7 +596,7 @@ &mac { status = "okay"; pinctrl-names = "default", "sleep"; - pinctrl-0 = <&cpsw_pins_default>; + pinctrl-0 = <&cpsw_pins_rgmii>; pinctrl-1 = <&cpsw_pins_sleep>; dual_emac; };
arch/arm/boot/dts/dra7-evm.dts +1 -141
232 lines not on this page · raw message
arch/arm/boot/dts/dra74x.dtsi +171 -0
183 lines not on this page · raw message
Signature · 8 lines
Ben Hutchings Software Developer, Codethink Ltd. -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 11 lines · Ben Hutchings
The I2C{1,2}, MCSPI{1,2}, UART{1,2}, QSPI1, USB{1,2}, RGMII and ATL functions can each be wired in only one way. Reduce duplication by defining that in
dra74x.dtsi.Signed-off-by Ben Hutchings <[email protected]>--- arch/arm/boot/dts/am57xx-beagle-x15.dts | 50 +--------- arch/arm/boot/dts/dra7-evm.dts | 142 +------------------------- arch/arm/boot/dts/dra74x.dtsi | 171 ++++++++++++++++++++++++++++++++ 3 files changed, 174 insertions(+), 189 deletions(-)
NAK. Couple of reasons:
A) Based on AM57xx/DRA7 SoC definitions these pin configuration should actually be deleted since the pinmuxing is only supposed to be done in u-boot (thanks to IODelay and other glitch constraints documented in TRM).
B) newer packaging plans do take place that will make reuse of dra74x.dtsi harder by consolidating the pinmux in a central location.
Signature · 6 lines
Regards, Nishanth Menon -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html