Skip to content

Commit

Permalink
arm: mvebu: move Armada 370/XP pinctrl node definition armada-370-xp.…
Browse files Browse the repository at this point in the history
…dtsi

What was done by Sebastian in 264a05e ("ARM: mvebu: armada-xp:
Add node alias to pinctrl and add base address") and 01c4342
("ARM: mvebu: armada-xp: Use pinctrl node alias") can also be done for
Armada 370, i.e.

 - Rename Armada 370 pinctrl node to pin-ctrl with its address encoded
 - Add a node alias to access the pinctrl node easily.
 - use the newly available alias in existing Armada 370 .dts files

We can even go a bit further by putting the pinctrl node definition in
armada-370-xp.dtsi, with only its reg property defined. This allows us
to then also use the newly defined node alias in armada-xp.dtsi,
armada-370.dtsi.

Suggested-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Suggested-by: Andrew Lunn <andrew@lunn.ch>
Acked-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: Arnaud Ebalard <arno@natisbad.org>
Link: https://lkml.kernel.org/r/b54eb45e5242728aace3ce8aef2eae4251f8dea3.1416613429.git.arno@natisbad.org
Signed-off-by: Jason Cooper <jason@lakedaemon.net>
  • Loading branch information
Arnaud Ebalard authored and Jason Cooper committed Nov 22, 2014
1 parent f19d09e commit 4904a82
Show file tree
Hide file tree
Showing 8 changed files with 222 additions and 196 deletions.
24 changes: 24 additions & 0 deletions arch/arm/boot/dts/armada-370-db.dts
Original file line number Diff line number Diff line change
Expand Up @@ -201,3 +201,27 @@
compatible = "linux,spdif-dir";
};
};

&pinctrl {
/*
* These pins might be muxed as I2S by
* the bootloader, but it conflicts
* with the real I2S pins that are
* muxed using i2s_pins. We must mux
* those pins to a function other than
* I2S.
*/
pinctrl-0 = <&hog_pins1 &hog_pins2>;
pinctrl-names = "default";

hog_pins1: hog-pins1 {
marvell,pins = "mpp6", "mpp8", "mpp10",
"mpp12", "mpp13";
marvell,function = "gpio";
};

hog_pins2: hog-pins2 {
marvell,pins = "mpp5", "mpp7", "mpp9";
marvell,function = "gpo";
};
};
25 changes: 13 additions & 12 deletions arch/arm/boot/dts/armada-370-mirabox.dts
Original file line number Diff line number Diff line change
Expand Up @@ -54,18 +54,6 @@
status = "okay";
};

pinctrl {
pwr_led_pin: pwr-led-pin {
marvell,pins = "mpp63";
marvell,function = "gpo";
};

stat_led_pins: stat-led-pins {
marvell,pins = "mpp64", "mpp65";
marvell,function = "gpio";
};
};

gpio_leds {
compatible = "gpio-leds";
pinctrl-names = "default";
Expand Down Expand Up @@ -169,3 +157,16 @@
};
};
};

&pinctrl {
pwr_led_pin: pwr-led-pin {
marvell,pins = "mpp63";
marvell,function = "gpo";
};

stat_led_pins: stat-led-pins {
marvell,pins = "mpp64", "mpp65";
marvell,function = "gpio";
};
};

84 changes: 42 additions & 42 deletions arch/arm/boot/dts/armada-370-netgear-rn102.dts
Original file line number Diff line number Diff line change
Expand Up @@ -59,48 +59,6 @@
status = "okay";
};

pinctrl {
power_led_pin: power-led-pin {
marvell,pins = "mpp57";
marvell,function = "gpio";
};

sata1_led_pin: sata1-led-pin {
marvell,pins = "mpp15";
marvell,function = "gpio";
};

sata2_led_pin: sata2-led-pin {
marvell,pins = "mpp14";
marvell,function = "gpio";
};

backup_led_pin: backup-led-pin {
marvell,pins = "mpp56";
marvell,function = "gpio";
};

backup_button_pin: backup-button-pin {
marvell,pins = "mpp58";
marvell,function = "gpio";
};

power_button_pin: power-button-pin {
marvell,pins = "mpp62";
marvell,function = "gpio";
};

reset_button_pin: reset-button-pin {
marvell,pins = "mpp6";
marvell,function = "gpio";
};

poweroff: poweroff {
marvell,pins = "mpp8";
marvell,function = "gpio";
};
};

mdio {
pinctrl-0 = <&mdio_pins>;
pinctrl-names = "default";
Expand Down Expand Up @@ -257,3 +215,45 @@
gpios = <&gpio0 8 GPIO_ACTIVE_LOW>;
};
};

&pinctrl {
power_led_pin: power-led-pin {
marvell,pins = "mpp57";
marvell,function = "gpio";
};

sata1_led_pin: sata1-led-pin {
marvell,pins = "mpp15";
marvell,function = "gpio";
};

sata2_led_pin: sata2-led-pin {
marvell,pins = "mpp14";
marvell,function = "gpio";
};

backup_led_pin: backup-led-pin {
marvell,pins = "mpp56";
marvell,function = "gpio";
};

backup_button_pin: backup-button-pin {
marvell,pins = "mpp58";
marvell,function = "gpio";
};

power_button_pin: power-button-pin {
marvell,pins = "mpp62";
marvell,function = "gpio";
};

reset_button_pin: reset-button-pin {
marvell,pins = "mpp6";
marvell,function = "gpio";
};

poweroff: poweroff {
marvell,pins = "mpp8";
marvell,function = "gpio";
};
};
64 changes: 32 additions & 32 deletions arch/arm/boot/dts/armada-370-netgear-rn104.dts
Original file line number Diff line number Diff line change
Expand Up @@ -53,38 +53,6 @@
status = "okay";
};

pinctrl {
poweroff: poweroff {
marvell,pins = "mpp60";
marvell,function = "gpio";
};

backup_button_pin: backup-button-pin {
marvell,pins = "mpp52";
marvell,function = "gpio";
};

power_button_pin: power-button-pin {
marvell,pins = "mpp62";
marvell,function = "gpio";
};

backup_led_pin: backup-led-pin {
marvell,pins = "mpp63";
marvell,function = "gpo";
};

power_led_pin: power-led-pin {
marvell,pins = "mpp64";
marvell,function = "gpio";
};

reset_button_pin: reset-button-pin {
marvell,pins = "mpp65";
marvell,function = "gpio";
};
};

mdio {
pinctrl-0 = <&mdio_pins>;
pinctrl-names = "default";
Expand Down Expand Up @@ -269,3 +237,35 @@
gpios = <&gpio1 28 GPIO_ACTIVE_LOW>;
};
};

&pinctrl {
poweroff: poweroff {
marvell,pins = "mpp60";
marvell,function = "gpio";
};

backup_button_pin: backup-button-pin {
marvell,pins = "mpp52";
marvell,function = "gpio";
};

power_button_pin: power-button-pin {
marvell,pins = "mpp62";
marvell,function = "gpio";
};

backup_led_pin: backup-led-pin {
marvell,pins = "mpp63";
marvell,function = "gpo";
};

power_led_pin: power-led-pin {
marvell,pins = "mpp64";
marvell,function = "gpio";
};

reset_button_pin: reset-button-pin {
marvell,pins = "mpp65";
marvell,function = "gpio";
};
};
24 changes: 12 additions & 12 deletions arch/arm/boot/dts/armada-370-rd.dts
Original file line number Diff line number Diff line change
Expand Up @@ -59,18 +59,6 @@
};

internal-regs {
pinctrl {
fan_pins: fan-pins {
marvell,pins = "mpp8";
marvell,function = "gpio";
};

led_pins: led-pins {
marvell,pins = "mpp32";
marvell,function = "gpio";
};
};

serial@12000 {
status = "okay";
};
Expand Down Expand Up @@ -213,3 +201,15 @@
};
};
};

&pinctrl {
fan_pins: fan-pins {
marvell,pins = "mpp8";
marvell,function = "gpio";
};

led_pins: led-pins {
marvell,pins = "mpp32";
marvell,function = "gpio";
};
};
4 changes: 4 additions & 0 deletions arch/arm/boot/dts/armada-370-xp.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,10 @@
status = "disabled";
};

pinctrl: pin-ctrl@18000 {
reg = <0x18000 0x38>;
};

coredivclk: corediv-clock@18740 {
compatible = "marvell,armada-370-corediv-clock";
reg = <0x18740 0xc>;
Expand Down
Loading

0 comments on commit 4904a82

Please sign in to comment.