arm64: dts: allwinner: a64: pinmux cleanups
Subsystems (2)
cover arm64: dts: allwinner: a64: pinmux cleanups
Hi,
This series does some cleanup of the Allwinner A64 pinmux groups.
The first addresses a limitation on the A64 where we have the eMMC's DS in always muxed in. The DS pin is shared with SPI0's MISO, thereby preventing SPI0 from being used. In this patch we split out the DS pin into a separate group for boards that actually utilize it to select on their own.
The other two patches just rename pinmux group node names and labels from <func>_pins_<[a-z]> to <func>_<pingroup/pin names>_pins. The latter is the style we adopted later on, and is easier to know which pins they correspond to, i.e. easier to review.
Please have a look.
While I want to do some more cleanup, I realized that the label and/or node names might be used by distro (Armbian comes to mind) or personal device tree overlay files. Do we need to have these remain fixed? Do we or can we provide a fallback? (Is that even possible?)
Regards
ChenYu
Chen-Yu Tsai (3):
arm64: dts: allwinner: a64: Split out data strobe pin from mmc2 pinmux
arm64: dts: allwinner: a64: Rename uart0_pins_a label to uart0_pb_pins
arm64: dts: allwinner: a64: Rename r_i2c_pins_a label to
r_i2c_pl89_pins
.../boot/dts/allwinner/sun50i-a64-amarula-relic.dts | 2 +- .../boot/dts/allwinner/sun50i-a64-bananapi-m64.dts | 4 ++-- .../boot/dts/allwinner/sun50i-a64-nanopi-a64.dts | 2 +- .../boot/dts/allwinner/sun50i-a64-olinuxino.dts | 2 +- .../boot/dts/allwinner/sun50i-a64-orangepi-win.dts | 2 +- arch/arm64/boot/dts/allwinner/sun50i-a64-pine64.dts | 2 +- .../boot/dts/allwinner/sun50i-a64-pinebook.dts | 6 +++--- .../dts/allwinner/sun50i-a64-sopine-baseboard.dts | 2 +- .../arm64/boot/dts/allwinner/sun50i-a64-teres-i.dts | 2 +- arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi | 13 ++++++++++--- 10 files changed, 22 insertions(+), 15 deletions(-)
Signature · 1 line
2.18.0
PATCH 1/3 arm64: dts: allwinner: a64: Split out data strobe pin from mmc2 pinmux
The eMMC 5.0 standard introduced the data strobe (DS) pin. This pin is not used for pre-5.0 data modes, nor is it found on pre-5.0 eMMC chips. On the A64, this pin is muxed with spi0's MISO pin. If the DS pin is included in the mmc2 pinmux by default, this wil prevent the usage of both mmc2 and spi0 together.
Instead, split out the DS pin to a separate pinmux that only gets used by boards that actually have it wired up. Currently supported ones include the Bananapi M64 and Pine64 Pinebook. These are fixed up.
--- .../arm64/boot/dts/allwinner/sun50i-a64-bananapi-m64.dts | 2 +- arch/arm64/boot/dts/allwinner/sun50i-a64-pinebook.dts | 2 +- arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi | 9 ++++++++- 3 files changed, 10 insertions(+), 3 deletions(-)
arch/arm64/boot/dts/allwinner/sun50i-a64-bananapi-m64.dts +1 -1
@@ -151,7 +151,7 @@ &mmc2 { pinctrl-names = "default"; - pinctrl-0 = <&mmc2_pins>; + pinctrl-0 = <&mmc2_pins>, <&mmc2_ds_pin>; vmmc-supply = <®_dcdc1>; bus-width = <8>; non-removable;
arch/arm64/boot/dts/allwinner/sun50i-a64-pinebook.dts +1 -1
@@ -103,7 +103,7 @@ &mmc2 { pinctrl-names = "default"; - pinctrl-0 = <&mmc2_pins>; + pinctrl-0 = <&mmc2_pins>, <&mmc2_ds_pin>; vmmc-supply = <®_dcdc1>; vqmmc-supply = <®_eldo1>; bus-width = <8>;
arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi +8 -1
@@ -413,7 +413,7 @@ }; mmc2_pins: mmc2-pins { - pins = "PC1", "PC5", "PC6", "PC8", "PC9", + pins = "PC5", "PC6", "PC8", "PC9", "PC10","PC11", "PC12", "PC13", "PC14", "PC15", "PC16"; function = "mmc2";
@@ -421,6 +421,13 @@ bias-pull-up; }; + mmc2_ds_pin: mmc2-ds-pin { + pins = "PC1"; + function = "mmc2"; + drive-strength = <30>; + bias-pull-up; + }; + pwm_pin: pwm_pin { pins = "PD22"; function = "pwm";
Signature · 1 line
2.18.0
PATCH 2/3 arm64: dts: allwinner: a64: Rename uart0_pins_a label to uart0_pb_pins
In reply to Chen-Yu TsaiThe pinmux name and label for a specific function should denote which pingroup it is on, or if there is only one option for the function, have not enumerating prefix/suffix at all.
The "uart0_pins_a" label is renamed to "uart0_pb_pins" to fit our current style. The node name "uart0" is also changed to "uart0-pb-pins" to match.
--- arch/arm64/boot/dts/allwinner/sun50i-a64-amarula-relic.dts | 2 +- arch/arm64/boot/dts/allwinner/sun50i-a64-bananapi-m64.dts | 2 +- arch/arm64/boot/dts/allwinner/sun50i-a64-nanopi-a64.dts | 2 +- arch/arm64/boot/dts/allwinner/sun50i-a64-olinuxino.dts | 2 +- arch/arm64/boot/dts/allwinner/sun50i-a64-orangepi-win.dts | 2 +- arch/arm64/boot/dts/allwinner/sun50i-a64-pine64.dts | 2 +- arch/arm64/boot/dts/allwinner/sun50i-a64-pinebook.dts | 2 +- arch/arm64/boot/dts/allwinner/sun50i-a64-sopine-baseboard.dts | 2 +- arch/arm64/boot/dts/allwinner/sun50i-a64-teres-i.dts | 2 +- arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi | 2 +- 10 files changed, 10 insertions(+), 10 deletions(-)
arch/arm64/boot/dts/allwinner/sun50i-a64-amarula-relic.dts +1 -1
@@ -203,7 +203,7 @@ &uart0 { pinctrl-names = "default"; - pinctrl-0 = <&uart0_pins_a>; + pinctrl-0 = <&uart0_pb_pins>; status = "okay"; };
arch/arm64/boot/dts/allwinner/sun50i-a64-bananapi-m64.dts +1 -1
@@ -302,7 +302,7 @@ &uart0 { pinctrl-names = "default"; - pinctrl-0 = <&uart0_pins_a>; + pinctrl-0 = <&uart0_pb_pins>; status = "okay"; };
arch/arm64/boot/dts/allwinner/sun50i-a64-nanopi-a64.dts +1 -1
@@ -252,7 +252,7 @@ &uart0 { pinctrl-names = "default"; - pinctrl-0 = <&uart0_pins_a>; + pinctrl-0 = <&uart0_pb_pins>; status = "okay"; };
arch/arm64/boot/dts/allwinner/sun50i-a64-olinuxino.dts +1 -1
@@ -274,7 +274,7 @@ &uart0 { pinctrl-names = "default"; - pinctrl-0 = <&uart0_pins_a>; + pinctrl-0 = <&uart0_pb_pins>; status = "okay"; };
arch/arm64/boot/dts/allwinner/sun50i-a64-orangepi-win.dts +1 -1
@@ -299,7 +299,7 @@ /* On debug connector */ &uart0 { pinctrl-names = "default"; - pinctrl-0 = <&uart0_pins_a>; + pinctrl-0 = <&uart0_pb_pins>; status = "okay"; };
arch/arm64/boot/dts/allwinner/sun50i-a64-pine64.dts +1 -1
@@ -241,7 +241,7 @@ /* On Exp and Euler connectors */ &uart0 { pinctrl-names = "default"; - pinctrl-0 = <&uart0_pins_a>; + pinctrl-0 = <&uart0_pb_pins>; status = "okay"; };
arch/arm64/boot/dts/allwinner/sun50i-a64-pinebook.dts +1 -1
@@ -269,7 +269,7 @@ &uart0 { pinctrl-names = "default"; - pinctrl-0 = <&uart0_pins_a>; + pinctrl-0 = <&uart0_pb_pins>; status = "okay"; };
arch/arm64/boot/dts/allwinner/sun50i-a64-sopine-baseboard.dts +1 -1
@@ -140,7 +140,7 @@ &uart0 { pinctrl-names = "default"; - pinctrl-0 = <&uart0_pins_a>; + pinctrl-0 = <&uart0_pb_pins>; status = "okay"; };
arch/arm64/boot/dts/allwinner/sun50i-a64-teres-i.dts +1 -1
@@ -260,7 +260,7 @@ &uart0 { pinctrl-names = "default"; - pinctrl-0 = <&uart0_pins_a>; + pinctrl-0 = <&uart0_pb_pins>; status = "okay"; };
arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi +1 -1
@@ -463,7 +463,7 @@ function = "spi1"; }; - uart0_pins_a: uart0 { + uart0_pb_pins: uart0-pb-pins { pins = "PB8", "PB9"; function = "uart0"; };
Signature · 1 line
2.18.0
PATCH 3/3 arm64: dts: allwinner: a64: Rename r_i2c_pins_a label to r_i2c_pl89_pins
In reply to Chen-Yu TsaiThe pinmux name and label for a specific function should denote which pingroup it is on, or if there is only one option for the function, have not enumerating prefix/suffix at all.
The "r_i2c_pins_a" label is renamed to "r_i2c_pl89_pins" to fit our current style. The node name "i2c" is also changed to "r-i2c-pl89-pins" to match. The reason for the peculiar name is that the other option for muxing R_I2C is on the PL0/PL1 pins, so the name has to mention the pin numbers in addition to the pingroup.
--- arch/arm64/boot/dts/allwinner/sun50i-a64-pinebook.dts | 2 +- arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
arch/arm64/boot/dts/allwinner/sun50i-a64-pinebook.dts +1 -1
@@ -142,7 +142,7 @@ &r_i2c { clock-frequency = <100000>; pinctrl-names = "default"; - pinctrl-0 = <&r_i2c_pins_a>; + pinctrl-0 = <&r_i2c_pl89_pins>; status = "okay"; };
arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi +1 -1
@@ -770,7 +770,7 @@ interrupt-controller; #interrupt-cells = <3>; - r_i2c_pins_a: i2c-a { + r_i2c_pl89_pins: r-i2c-pl89-pins { pins = "PL8", "PL9"; function = "s_i2c"; };
Signature · 1 line
2.18.0
cover arm64: dts: allwinner: a64: pinmux cleanups
In reply to Chen-Yu TsaiQuoted 10 lines · Chen-Yu Tsai
Hi,
This series does some cleanup of the Allwinner A64 pinmux groups.
The first addresses a limitation on the A64 where we have the eMMC's DS in always muxed in. The DS pin is shared with SPI0's MISO, thereby preventing SPI0 from being used. In this patch we split out the DS pin into a separate group for boards that actually utilize it to select on their own.
Quoted 6 lines
The other two patches just rename pinmux group node names and labels from <func>_pins_<[a-z]> to <func>_<pingroup/pin names>_pins. The latter is the style we adopted later on, and is easier to know which pins they correspond to, i.e. easier to review.
Please have a look.
Quoted 4 lines
While I want to do some more cleanup, I realized that the label and/or node names might be used by distro (Armbian comes to mind) or personal device tree overlay files. Do we need to have these remain fixed? Do we or can we provide a fallback? (Is that even possible?)
I wouldn't worry too much about this. We broke it a number of times already, and we probably will in the future for other stuff, I'm not sure we have to provide any guarantee there, as long as the old, compiled, dt still works.
Maxime
Signature · 10 lines
Maxime Ripard, Bootlin Embedded Linux and Kernel engineering https://bootlin.com -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 833 bytes Desc: not available URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20180828/cca1a80d/attachment.sig>
Chen-Yu Tsai
Appliedcover arm64: dts: allwinner: a64: pinmux cleanups
Quoted 12 lines · Maxime Ripard
Quoted 10 lines · Chen-Yu Tsai
Hi,
This series does some cleanup of the Allwinner A64 pinmux groups.
The first addresses a limitation on the A64 where we have the eMMC's DS in always muxed in. The DS pin is shared with SPI0's MISO, thereby preventing SPI0 from being used. In this patch we split out the DS pin into a separate group for boards that actually utilize it to select on their own.
Quoted 8 lines
Quoted 6 lines
The other two patches just rename pinmux group node names and labels from <func>_pins_<[a-z]> to <func>_<pingroup/pin names>_pins. The latter is the style we adopted later on, and is easier to know which pins they correspond to, i.e. easier to review.
Please have a look.
Acked-by Maxime Ripard <[email protected]>
Applied.
Quoted 9 lines
Quoted 4 lines
While I want to do some more cleanup, I realized that the label and/or node names might be used by distro (Armbian comes to mind) or personal device tree overlay files. Do we need to have these remain fixed? Do we or can we provide a fallback? (Is that even possible?)
I wouldn't worry too much about this. We broke it a number of times already, and we probably will in the future for other stuff, I'm not sure we have to provide any guarantee there, as long as the old, compiled, dt still works.
OK :)