ARM: kirkwood: improve pinmux configs in Device Tree
cover ARM: kirkwood: improve pinmux configs in Device Tree
Hello,
This series of patches has the goal of adding support for the Init button on OpenBlocks A6, but takes this opportunity to do a little bit of cleanup in the pinmux configurations of the various Kirkwood Device Trees.
Until now, all pinmux configurations were "owned" by the pinctrl driver, because back when they were introduced, the driver core was not selecting the pinmux configuration, each driver had to do it manually (and not all drivers were doing so). Now that the driver core selects the default pinmux configuration when available, it makes sense to associate the pinmux configuration to the particular device it is related to.
It allows pinctrl to show nice informations in debugfs, which associates a particular pin with the particular device using it:
# cat pinctrl/f1010000.pinctrl/pinmux-pins Pinmux settings per pin Format: pin (name): mux_owner gpio_owner hog? pin 0 (PIN0): f4000000.nand (GPIO UNCLAIMED) function nand group mpp0 pin 1 (PIN1): f4000000.nand (GPIO UNCLAIMED) function nand group mpp1 pin 2 (PIN2): f4000000.nand (GPIO UNCLAIMED) function nand group mpp2 pin 3 (PIN3): f4000000.nand (GPIO UNCLAIMED) function nand group mpp3 pin 4 (PIN4): f4000000.nand (GPIO UNCLAIMED) function nand group mpp4 pin 5 (PIN5): f4000000.nand (GPIO UNCLAIMED) function nand group mpp5 pin 6 (PIN6): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 7 (PIN7): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 8 (PIN8): f1012100.serial (GPIO UNCLAIMED) function uart1 group mpp8 pin 9 (PIN9): f1012100.serial (GPIO UNCLAIMED) function uart1 group mpp9 pin 10 (PIN10): f1012000.serial (GPIO UNCLAIMED) function uart0 group mpp10 pin 11 (PIN11): f1012000.serial (GPIO UNCLAIMED) function uart0 group mpp11 pin 12 (PIN12): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 13 (PIN13): f1012100.serial (GPIO UNCLAIMED) function uart1 group mpp13 pin 14 (PIN14): f1012100.serial (GPIO UNCLAIMED) function uart1 group mpp14 pin 15 (PIN15): f1012000.serial (GPIO UNCLAIMED) function uart0 group mpp15 pin 16 (PIN16): f1012000.serial (GPIO UNCLAIMED) function uart0 group mpp16 pin 17 (PIN17): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 18 (PIN18): f4000000.nand (GPIO UNCLAIMED) function nand group mpp18 pin 19 (PIN19): f4000000.nand (GPIO UNCLAIMED) function nand group mpp19 pin 20 (PIN20): f1010000.pinctrl (GPIO UNCLAIMED) (HOG) function gpio group mpp20 pin 21 (PIN21): f1010000.pinctrl (GPIO UNCLAIMED) (HOG) function gpio group mpp21 pin 22 (PIN22): f1010000.pinctrl (GPIO UNCLAIMED) (HOG) function gpio group mpp22 pin 23 (PIN23): f1010000.pinctrl (GPIO UNCLAIMED) (HOG) function gpio group mpp23 pin 24 (PIN24): f1010000.pinctrl (GPIO UNCLAIMED) (HOG) function gpio group mpp24 pin 25 (PIN25): f1010000.pinctrl (GPIO UNCLAIMED) (HOG) function gpio group mpp25 pin 26 (PIN26): f1010000.pinctrl (GPIO UNCLAIMED) (HOG) function gpio group mpp26 pin 27 (PIN27): f1010000.pinctrl (GPIO UNCLAIMED) (HOG) function gpio group mpp27 pin 28 (PIN28): f1010000.pinctrl (GPIO UNCLAIMED) (HOG) function gpio group mpp28 pin 29 (PIN29): f1010000.pinctrl (GPIO UNCLAIMED) (HOG) function gpio group mpp29 pin 30 (PIN30): f1010000.pinctrl (GPIO UNCLAIMED) (HOG) function gpio group mpp30 pin 31 (PIN31): f1010000.pinctrl (GPIO UNCLAIMED) (HOG) function gpio group mpp31 pin 32 (PIN32): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 33 (PIN33): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 34 (PIN34): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 35 (PIN35): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 36 (PIN36): f1011100.i2c (GPIO UNCLAIMED) function twsi1 group mpp36 pin 37 (PIN37): f1011100.i2c (GPIO UNCLAIMED) function twsi1 group mpp37 pin 38 (PIN38): gpio_keys.2 mvebu-gpio:38 function gpio group mpp38 pin 39 (PIN39): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 40 (PIN40): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 41 (PIN41): gpio-leds.1 mvebu-gpio:41 function gpio group mpp41 pin 42 (PIN42): gpio-leds.1 mvebu-gpio:42 function gpio group mpp42 pin 43 (PIN43): gpio-leds.1 mvebu-gpio:43 function gpio group mpp43 pin 44 (PIN44): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 45 (PIN45): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 46 (PIN46): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 47 (PIN47): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 48 (PIN48): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 49 (PIN49): (MUX UNCLAIMED) (GPIO UNCLAIMED)
Without this patch set, all pins appear to be owned by "f1010000.pinctrl".
Even though GPIO muxing is automatically done when a device driver requests a GPIO, Andrew Lunn and I had agreed to make the pinmuxing explicit, in order to have correct informations in debugfs. See our discussion at
http://lists.infradead.org/pipermail/linux-arm-kernel/2013-March/158190.html.
The last patch finally adds support for the init button of the Plathome OpenBlocks A6 platform.
Best regards,
Thomas
Thomas Petazzoni (21):
arm: kirkwood: cloudbox: affect pinmux configs to the right devices
arm: kirkwood: dlink dns: affect pinmux configs to the right devices
arm: kirkwood: dockstar: affect pinmux configs to the right devices
arm: kirkwood: dreamplug: affect pinmux configs to the right devices
arm: kirkwood: goflexnet: affect pinmux configs to the right devices
arm: kirkwood: guruplug: affect pinmux configs to the right devices
arm: kirkwood: ib62x0: affect pinmux configs to the right devices
arm: kirkwood: iconnect: give meaningful names to pinmux configs
arm: kirkwood: iconnect: affect pinmux configs to the right devices
arm: kirkwood: iomega ix2-200: affect pinmux configs to the right
devices
arm: kirkwood: ns2: affect pinmux configs to the right devices
arm: kirkwood: keymile: affect pinmux configs to the right devices
arm: kirkwood: buffalo linkstation: affect pinmux configs to the
right devices
arm: kirkwood: mplcec4: affect pinmux configs to the right devices
arm: kirkwood: readynas: affect pinmux configs to the right devices
arm: kirkwood: nsa310: affect pinmux configs to the right devices
arm: kirkwood: openblocks_a6: affect pinmux configs to the right
devices
arm: kirkwood: topkick: affect pinmux configs to the right devices
arm: kirkwood: ts219: affect pinmux configs to the right devices
arm: kirkwood: openblocks-a6: group pinmux configurations
arm: kirkwood: openblocks-a6: add support for Init button
arch/arm/boot/dts/kirkwood-cloudbox.dts | 10 +- arch/arm/boot/dts/kirkwood-dns320.dts | 7 ++ arch/arm/boot/dts/kirkwood-dns325.dts | 5 + arch/arm/boot/dts/kirkwood-dnskw.dtsi | 32 +++--- arch/arm/boot/dts/kirkwood-dockstar.dts | 9 +- arch/arm/boot/dts/kirkwood-dreamplug.dts | 11 +- arch/arm/boot/dts/kirkwood-goflexnet.dts | 18 ++-- .../arm/boot/dts/kirkwood-guruplug-server-plus.dts | 8 +- arch/arm/boot/dts/kirkwood-ib62x0.dts | 17 +-- arch/arm/boot/dts/kirkwood-iconnect.dts | 36 +++---- arch/arm/boot/dts/kirkwood-iomega_ix2_200.dts | 15 +-- arch/arm/boot/dts/kirkwood-is2.dts | 2 + arch/arm/boot/dts/kirkwood-km_kirkwood.dts | 6 +- arch/arm/boot/dts/kirkwood-lsxl.dtsi | 22 ++-- arch/arm/boot/dts/kirkwood-mplcec4.dts | 23 +++-- .../boot/dts/kirkwood-netgear_readynas_duo_v2.dts | 22 ++-- arch/arm/boot/dts/kirkwood-ns2-common.dtsi | 10 +- arch/arm/boot/dts/kirkwood-ns2.dts | 2 + arch/arm/boot/dts/kirkwood-ns2lite.dts | 2 + arch/arm/boot/dts/kirkwood-ns2max.dts | 2 + arch/arm/boot/dts/kirkwood-ns2mini.dts | 2 + arch/arm/boot/dts/kirkwood-nsa310.dts | 29 +++--- arch/arm/boot/dts/kirkwood-openblocks_a6.dts | 108 ++++++-------------- arch/arm/boot/dts/kirkwood-topkick.dts | 51 ++++----- arch/arm/boot/dts/kirkwood-ts219-6281.dts | 8 +- arch/arm/boot/dts/kirkwood-ts219-6282.dts | 8 +- arch/arm/boot/dts/kirkwood-ts219.dtsi | 10 ++ 27 files changed, 235 insertions(+), 240 deletions(-)
Signature · 1 line
1.7.9.5
PATCH 1/21 arm: kirkwood: cloudbox: affect pinmux configs to the right devices
When the pinmux mechanism was added in Kirkwood, the device driver core was not yet providing the possibility of attaching pinmux configurations to all devices, drivers had to do it explicitly, and not all drivers were doing this.
Now that the driver core does that in a generic way, it makes sense to attach the pinmux configuration to their corresponding devices.
This allows the pinctrl subsystem to show in debugfs to which device is related which pins, for example:
pin 41 (PIN41): gpio-leds.1 mvebu-gpio:41 function gpio group mpp41 pin 42 (PIN42): gpio-leds.1 mvebu-gpio:42 function gpio group mpp42 pin 43 (PIN43): gpio-leds.1 mvebu-gpio:43 function gpio group mpp43
--- arch/arm/boot/dts/kirkwood-cloudbox.dts | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-)
arch/arm/boot/dts/kirkwood-cloudbox.dts +6 -4
@@ -18,10 +18,6 @@ ocp at f1000000 { pinctrl: pinctrl at 10000 { - pinctrl-0 = < &pmx_spi &pmx_uart0 - &pmx_cloudbox_sata0 >; - pinctrl-names = "default"; - pmx_cloudbox_sata0: pmx-cloudbox-sata0 { marvell,pins = "mpp15"; marvell,function = "sata0";
@@ -29,16 +25,22 @@ }; serial at 12000 { + pinctrl-0 = <&pmx_uart0>; + pinctrl-names = "default"; clock-frequency = <166666667>; status = "okay"; }; sata at 80000 { + pinctrl-0 = <&pmx_cloudbox_sata0>; + pinctrl-names = "default"; status = "okay"; nr-ports = <1>; }; spi at 10600 { + pinctrl-0 = <&pmx_spi>; + pinctrl-names = "default"; status = "okay"; flash at 0 {
Signature · 1 line
1.7.9.5
PATCH 2/21 arm: kirkwood: dlink dns: affect pinmux configs to the right devices
In reply to Thomas PetazzoniWhen the pinmux mechanism was added in Kirkwood, the device driver core was not yet providing the possibility of attaching pinmux configurations to all devices, drivers had to do it explicitly, and not all drivers were doing this.
Now that the driver core does that in a generic way, it makes sense to attach the pinmux configuration to their corresponding devices.
This allows the pinctrl subsystem to show in debugfs to which device is related which pins, for example:
pin 41 (PIN41): gpio-leds.1 mvebu-gpio:41 function gpio group mpp41 pin 42 (PIN42): gpio-leds.1 mvebu-gpio:42 function gpio group mpp42 pin 43 (PIN43): gpio-leds.1 mvebu-gpio:43 function gpio group mpp43
--- arch/arm/boot/dts/kirkwood-dns320.dts | 7 +++++++ arch/arm/boot/dts/kirkwood-dns325.dts | 5 +++++ arch/arm/boot/dts/kirkwood-dnskw.dtsi | 32 +++++++++++++++++--------------- 3 files changed, 29 insertions(+), 15 deletions(-)
arch/arm/boot/dts/kirkwood-dns320.dts +7 -0
@@ -17,6 +17,11 @@ gpio-leds { compatible = "gpio-leds"; + pinctrl-0 = <&pmx_led_power &pmx_led_red_usb_320 + &pmx_led_red_left_hdd &pmx_led_red_right_hdd + &pmx_led_white_usb>; + pinctrl-names = "default"; + blue-power { label = "dns320:blue:power"; gpios = <&gpio0 26 1>; /* GPIO 26 Active Low */
@@ -46,6 +51,8 @@ }; serial at 12100 { + pinctrl-0 = <&pmx_uart1>; + pinctrl-names = "default"; status = "okay"; }; };
arch/arm/boot/dts/kirkwood-dns325.dts +5 -0
@@ -17,6 +17,11 @@ gpio-leds { compatible = "gpio-leds"; + pinctrl-0 = <&pmx_led_power &pmx_led_red_usb_325 + &pmx_led_red_left_hdd &pmx_led_red_right_hdd + &pmx_led_white_usb>; + pinctrl-names = "default"; + white-power { label = "dns325:white:power"; gpios = <&gpio0 26 1>; /* GPIO 26 Active Low */
arch/arm/boot/dts/kirkwood-dnskw.dtsi +17 -15
@@ -9,6 +9,10 @@ compatible = "gpio-keys"; #address-cells = <1>; #size-cells = <0>; + pinctrl-0 = <&pmx_button_power &pmx_button_unmount + &pmx_button_reset>; + pinctrl-names = "default"; + button at 1 { label = "Power button"; linux,code = <116>;
@@ -29,6 +33,8 @@ gpio_fan { /* Fan: ADDA AD045HB-G73 40mm 6000rpm at 5v */ compatible = "gpio-fan"; + pinctrl-0 = <&pmx_fan_high_speed &pmx_fan_low_speed>; + pinctrl-names = "default"; gpios = <&gpio1 14 1 &gpio1 13 1>; gpio-fan,speed-map = <0 0
@@ -38,27 +44,17 @@ gpio_poweroff { compatible = "gpio-poweroff"; + pinctrl-0 = <&pmx_power_off>; + pinctrl-names = "default"; gpios = <&gpio1 4 0>; }; ocp at f1000000 { pinctrl: pinctrl at 10000 { - pinctrl-0 = < &pmx_nand &pmx_uart1 - &pmx_sata0 &pmx_sata1 - &pmx_led_power - &pmx_led_red_right_hdd - &pmx_led_red_left_hdd - &pmx_led_red_usb_325 - &pmx_button_power - &pmx_led_red_usb_320 - &pmx_power_off &pmx_power_back_on - &pmx_power_sata0 &pmx_power_sata1 - &pmx_present_sata0 &pmx_present_sata1 - &pmx_led_white_usb &pmx_fan_tacho - &pmx_fan_high_speed &pmx_fan_low_speed - &pmx_button_unmount &pmx_button_reset - &pmx_temp_alarm >; + pinctrl-0 = <&pmx_power_back_on &pmx_present_sata0 + &pmx_present_sata1 &pmx_fan_tacho + &pmx_temp_alarm>; pinctrl-names = "default"; pmx_sata0: pmx-sata0 {
@@ -147,11 +143,15 @@ }; }; sata at 80000 { + pinctrl-0 = <&pmx_sata0 &pmx_sata1>; + pinctrl-names = "default"; status = "okay"; nr-ports = <2>; }; nand at 3000000 { + pinctrl-0 = <&pmx_nand>; + pinctrl-names = "default"; status = "okay"; chip-delay = <35>;
@@ -192,6 +192,8 @@ compatible = "simple-bus"; #address-cells = <1>; #size-cells = <0>; + pinctrl-0 = <&pmx_power_sata0 &pmx_power_sata1>; + pinctrl-names = "default"; sata0_power: regulator at 1 { compatible = "regulator-fixed";
Signature · 1 line
1.7.9.5
PATCH 3/21 arm: kirkwood: dockstar: affect pinmux configs to the right devices
In reply to Thomas PetazzoniWhen the pinmux mechanism was added in Kirkwood, the device driver core was not yet providing the possibility of attaching pinmux configurations to all devices, drivers had to do it explicitly, and not all drivers were doing this.
Now that the driver core does that in a generic way, it makes sense to attach the pinmux configuration to their corresponding devices.
This allows the pinctrl subsystem to show in debugfs to which device is related which pins, for example:
pin 41 (PIN41): gpio-leds.1 mvebu-gpio:41 function gpio group mpp41 pin 42 (PIN42): gpio-leds.1 mvebu-gpio:42 function gpio group mpp42 pin 43 (PIN43): gpio-leds.1 mvebu-gpio:43 function gpio group mpp43
--- arch/arm/boot/dts/kirkwood-dockstar.dts | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-)
arch/arm/boot/dts/kirkwood-dockstar.dts +4 -5
@@ -18,11 +18,6 @@ ocp at f1000000 { pinctrl: pinctrl at 10000 { - - pinctrl-0 = < &pmx_usb_power_enable - &pmx_led_green &pmx_led_orange >; - pinctrl-names = "default"; - pmx_usb_power_enable: pmx-usb-power-enable { marvell,pins = "mpp29"; marvell,function = "gpio";
@@ -62,6 +57,8 @@ }; gpio-leds { compatible = "gpio-leds"; + pinctrl-0 = <&pmx_led_green &pmx_led_orange>; + pinctrl-names = "default"; health { label = "status:green:health";
@@ -77,6 +74,8 @@ compatible = "simple-bus"; #address-cells = <1>; #size-cells = <0>; + pinctrl-0 = <&pmx_usb_power_enable>; + pinctrl-names = "default"; usb_power: regulator at 1 { compatible = "regulator-fixed";
Signature · 1 line
1.7.9.5
PATCH 4/21 arm: kirkwood: dreamplug: affect pinmux configs to the right devices
In reply to Thomas PetazzoniWhen the pinmux mechanism was added in Kirkwood, the device driver core was not yet providing the possibility of attaching pinmux configurations to all devices, drivers had to do it explicitly, and not all drivers were doing this.
Now that the driver core does that in a generic way, it makes sense to attach the pinmux configuration to their corresponding devices.
This allows the pinctrl subsystem to show in debugfs to which device is related which pins, for example:
pin 41 (PIN41): gpio-leds.1 mvebu-gpio:41 function gpio group mpp41 pin 42 (PIN42): gpio-leds.1 mvebu-gpio:42 function gpio group mpp42 pin 43 (PIN43): gpio-leds.1 mvebu-gpio:43 function gpio group mpp43
--- arch/arm/boot/dts/kirkwood-dreamplug.dts | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-)
arch/arm/boot/dts/kirkwood-dreamplug.dts +5 -6
@@ -18,12 +18,6 @@ ocp at f1000000 { pinctrl: pinctrl at 10000 { - - pinctrl-0 = < &pmx_spi - &pmx_led_bluetooth &pmx_led_wifi - &pmx_led_wifi_ap >; - pinctrl-names = "default"; - pmx_led_bluetooth: pmx-led-bluetooth { marvell,pins = "mpp47"; marvell,function = "gpio";
@@ -43,6 +37,8 @@ spi at 10600 { status = "okay"; + pinctrl-0 = <&pmx_spi>; + pinctrl-names = "default"; m25p40 at 0 { #address-cells = <1>;
@@ -84,6 +80,9 @@ gpio-leds { compatible = "gpio-leds"; + pinctrl-0 = <&pmx_led_bluetooth &pmx_led_wifi + &pmx_led_wifi_ap >; + pinctrl-names = "default"; bluetooth { label = "dreamplug:blue:bluetooth";
Signature · 1 line
1.7.9.5
PATCH 5/21 arm: kirkwood: goflexnet: affect pinmux configs to the right devices
In reply to Thomas PetazzoniWhen the pinmux mechanism was added in Kirkwood, the device driver core was not yet providing the possibility of attaching pinmux configurations to all devices, drivers had to do it explicitly, and not all drivers were doing this.
Now that the driver core does that in a generic way, it makes sense to attach the pinmux configuration to their corresponding devices.
This allows the pinctrl subsystem to show in debugfs to which device is related which pins, for example:
pin 41 (PIN41): gpio-leds.1 mvebu-gpio:41 function gpio group mpp41 pin 42 (PIN42): gpio-leds.1 mvebu-gpio:42 function gpio group mpp42 pin 43 (PIN43): gpio-leds.1 mvebu-gpio:43 function gpio group mpp43
--- arch/arm/boot/dts/kirkwood-goflexnet.dts | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-)
arch/arm/boot/dts/kirkwood-goflexnet.dts +9 -9
@@ -18,15 +18,6 @@ ocp at f1000000 { pinctrl: pinctrl at 10000 { - - pinctrl-0 = < &pmx_usb_power_enable &pmx_led_orange - &pmx_led_left_cap_0 &pmx_led_left_cap_1 - &pmx_led_left_cap_2 &pmx_led_left_cap_3 - &pmx_led_right_cap_0 &pmx_led_right_cap_1 - &pmx_led_right_cap_2 &pmx_led_right_cap_3 - >; - pinctrl-names = "default"; - pmx_usb_power_enable: pmx-usb-power-enable { marvell,pins = "mpp29"; marvell,function = "gpio";
@@ -109,6 +100,13 @@ }; gpio-leds { compatible = "gpio-leds"; + pinctrl-0 = < &pmx_led_orange + &pmx_led_left_cap_0 &pmx_led_left_cap_1 + &pmx_led_left_cap_2 &pmx_led_left_cap_3 + &pmx_led_right_cap_0 &pmx_led_right_cap_1 + &pmx_led_right_cap_2 &pmx_led_right_cap_3 + >; + pinctrl-names = "default"; health { label = "status:green:health";
@@ -156,6 +154,8 @@ compatible = "simple-bus"; #address-cells = <1>; #size-cells = <0>; + pinctrl-0 = <&pmx_usb_power_enable>; + pinctrl-names = "default"; usb_power: regulator at 1 { compatible = "regulator-fixed";
Signature · 1 line
1.7.9.5
PATCH 6/21 arm: kirkwood: guruplug: affect pinmux configs to the right devices
In reply to Thomas PetazzoniWhen the pinmux mechanism was added in Kirkwood, the device driver core was not yet providing the possibility of attaching pinmux configurations to all devices, drivers had to do it explicitly, and not all drivers were doing this.
Now that the driver core does that in a generic way, it makes sense to attach the pinmux configuration to their corresponding devices.
This allows the pinctrl subsystem to show in debugfs to which device is related which pins, for example:
pin 41 (PIN41): gpio-leds.1 mvebu-gpio:41 function gpio group mpp41 pin 42 (PIN42): gpio-leds.1 mvebu-gpio:42 function gpio group mpp42 pin 43 (PIN43): gpio-leds.1 mvebu-gpio:43 function gpio group mpp43
--- .../arm/boot/dts/kirkwood-guruplug-server-plus.dts | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-)
arch/arm/boot/dts/kirkwood-guruplug-server-plus.dts +3 -5
@@ -18,11 +18,6 @@ ocp at f1000000 { pinctrl: pinctrl at 10000 { - - pinctrl-0 = < &pmx_led_health_r &pmx_led_health_g - &pmx_led_wmode_r &pmx_led_wmode_g >; - pinctrl-names = "default"; - pmx_led_health_r: pmx-led-health-r { marvell,pins = "mpp46"; marvell,function = "gpio";
@@ -77,6 +72,9 @@ gpio-leds { compatible = "gpio-leds"; + pinctrl-0 = < &pmx_led_health_r &pmx_led_health_g + &pmx_led_wmode_r &pmx_led_wmode_g >; + pinctrl-names = "default"; health-r { label = "guruplug:red:health";
Signature · 1 line
1.7.9.5
PATCH 7/21 arm: kirkwood: ib62x0: affect pinmux configs to the right devices
In reply to Thomas PetazzoniWhen the pinmux mechanism was added in Kirkwood, the device driver core was not yet providing the possibility of attaching pinmux configurations to all devices, drivers had to do it explicitly, and not all drivers were doing this.
Now that the driver core does that in a generic way, it makes sense to attach the pinmux configuration to their corresponding devices.
This allows the pinctrl subsystem to show in debugfs to which device is related which pins, for example:
pin 41 (PIN41): gpio-leds.1 mvebu-gpio:41 function gpio group mpp41 pin 42 (PIN42): gpio-leds.1 mvebu-gpio:42 function gpio group mpp42 pin 43 (PIN43): gpio-leds.1 mvebu-gpio:43 function gpio group mpp43
--- arch/arm/boot/dts/kirkwood-ib62x0.dts | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-)
arch/arm/boot/dts/kirkwood-ib62x0.dts +10 -7
@@ -18,13 +18,6 @@ ocp at f1000000 { pinctrl: pinctrl at 10000 { - - pinctrl-0 = < &pmx_nand - &pmx_led_os_red &pmx_power_off - &pmx_led_os_green &pmx_led_usb_transfer - &pmx_button_reset &pmx_button_usb_copy >; - pinctrl-names = "default"; - pmx_led_os_red: pmx-led-os-red { marvell,pins = "mpp22"; marvell,function = "gpio";
@@ -61,6 +54,8 @@ nand at 3000000 { status = "okay"; + pinctrl-0 = <&pmx_nand>; + pinctrl-names = "default"; partition at 0 { label = "u-boot";
@@ -84,6 +79,9 @@ compatible = "gpio-keys"; #address-cells = <1>; #size-cells = <0>; + pinctrl-0 = <&pmx_button_reset &pmx_button_usb_copy>; + pinctrl-names = "default"; + button at 1 { label = "USB Copy"; linux,code = <133>;
@@ -97,6 +95,9 @@ }; gpio-leds { compatible = "gpio-leds"; + pinctrl-0 = <&pmx_led_os_red &pmx_led_os_green + &pmx_led_usb_transfer>; + pinctrl-names = "default"; green-os { label = "ib62x0:green:os";
@@ -114,6 +115,8 @@ }; gpio_poweroff { compatible = "gpio-poweroff"; + pinctrl-0 = <&pmx_power_off>; + pinctrl-names = "default"; gpios = <&gpio0 24 0>; };
Signature · 1 line
1.7.9.5
PATCH 8/21 arm: kirkwood: iconnect: give meaningful names to pinmux configs
In reply to Thomas PetazzoniThe Kirkwood iConnect Device Tree is currently using totally meaningless names for the pinmux configuration: pmx_gpio_XY.
This patch fixes that by using some more meaningful names such as pmx_button_power.
--- arch/arm/boot/dts/kirkwood-iconnect.dts | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-)
arch/arm/boot/dts/kirkwood-iconnect.dts +15 -15
@@ -21,50 +21,50 @@ ocp at f1000000 { pinctrl: pinctrl at 10000 { - pinctrl-0 = < &pmx_gpio_12 &pmx_gpio_35 - &pmx_gpio_41 &pmx_gpio_42 - &pmx_gpio_43 &pmx_gpio_44 - &pmx_gpio_45 &pmx_gpio_46 - &pmx_gpio_47 &pmx_gpio_48 >; + pinctrl-0 = < &pmx_button_reset &pmx_button_otb + &pmx_led_level &pmx_led_power_blue + &pmx_led_power_red &pmx_led_usb1 + &pmx_led_usb2 &pmx_led_usb3 + &pmx_led_usb4 &pmx_led_otb >; pinctrl-names = "default"; - pmx_gpio_12: pmx-gpio-12 { + pmx_button_reset: pmx-button-reset { marvell,pins = "mpp12"; marvell,function = "gpio"; }; - pmx_gpio_35: pmx-gpio-35 { + pmx_button_otb: pmx-button-otb { marvell,pins = "mpp35"; marvell,function = "gpio"; }; - pmx_gpio_41: pmx-gpio-41 { + pmx_led_level: pmx-led-level { marvell,pins = "mpp41"; marvell,function = "gpio"; }; - pmx_gpio_42: pmx-gpio-42 { + pmx_led_power_blue: pmx-led-power-blue { marvell,pins = "mpp42"; marvell,function = "gpio"; }; - pmx_gpio_43: pmx-gpio-43 { + pmx_led_power_red: pmx-power-red { marvell,pins = "mpp43"; marvell,function = "gpio"; }; - pmx_gpio_44: pmx-gpio-44 { + pmx_led_usb1: pmx-led-usb1 { marvell,pins = "mpp44"; marvell,function = "gpio"; }; - pmx_gpio_45: pmx-gpio-45 { + pmx_led_usb2: pmx-led-usb2 { marvell,pins = "mpp45"; marvell,function = "gpio"; }; - pmx_gpio_46: pmx-gpio-46 { + pmx_led_usb3: pmx-led-usb3 { marvell,pins = "mpp46"; marvell,function = "gpio"; }; - pmx_gpio_47: pmx-gpio-47 { + pmx_led_usb4: pmx-led-usb4 { marvell,pins = "mpp47"; marvell,function = "gpio"; }; - pmx_gpio_48: pmx-gpio-48 { + pmx_led_otb: pmx-led-otb { marvell,pins = "mpp48"; marvell,function = "gpio"; };
Signature · 1 line
1.7.9.5
PATCH 9/21 arm: kirkwood: iconnect: affect pinmux configs to the right devices
In reply to Thomas PetazzoniWhen the pinmux mechanism was added in Kirkwood, the device driver core was not yet providing the possibility of attaching pinmux configurations to all devices, drivers had to do it explicitly, and not all drivers were doing this.
Now that the driver core does that in a generic way, it makes sense to attach the pinmux configuration to their corresponding devices.
This allows the pinctrl subsystem to show in debugfs to which device is related which pins, for example:
pin 41 (PIN41): gpio-leds.1 mvebu-gpio:41 function gpio group mpp41 pin 42 (PIN42): gpio-leds.1 mvebu-gpio:42 function gpio group mpp42 pin 43 (PIN43): gpio-leds.1 mvebu-gpio:43 function gpio group mpp43
--- arch/arm/boot/dts/kirkwood-iconnect.dts | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-)
arch/arm/boot/dts/kirkwood-iconnect.dts +8 -8
@@ -20,14 +20,6 @@ ocp at f1000000 { pinctrl: pinctrl at 10000 { - - pinctrl-0 = < &pmx_button_reset &pmx_button_otb - &pmx_led_level &pmx_led_power_blue - &pmx_led_power_red &pmx_led_usb1 - &pmx_led_usb2 &pmx_led_usb3 - &pmx_led_usb4 &pmx_led_otb >; - pinctrl-names = "default"; - pmx_button_reset: pmx-button-reset { marvell,pins = "mpp12"; marvell,function = "gpio";
@@ -113,6 +105,11 @@ gpio-leds { compatible = "gpio-leds"; + pinctrl-0 = < &pmx_led_level &pmx_led_power_blue + &pmx_led_power_red &pmx_led_usb1 + &pmx_led_usb2 &pmx_led_usb3 + &pmx_led_usb4 &pmx_led_otb >; + pinctrl-names = "default"; led-level { label = "led_level";
@@ -154,6 +151,9 @@ compatible = "gpio-keys"; #address-cells = <1>; #size-cells = <0>; + pinctrl-0 = < &pmx_button_reset &pmx_button_otb >; + pinctrl-names = "default"; + button at 1 { label = "OTB Button"; linux,code = <133>;
Signature · 1 line
1.7.9.5
PATCH 10/21 arm: kirkwood: iomega ix2-200: affect pinmux configs to the right devices
In reply to Thomas PetazzoniWhen the pinmux mechanism was added in Kirkwood, the device driver core was not yet providing the possibility of attaching pinmux configurations to all devices, drivers had to do it explicitly, and not all drivers were doing this.
Now that the driver core does that in a generic way, it makes sense to attach the pinmux configuration to their corresponding devices.
Note that some of the LEDs pinmux configurations are kept in the pinctrl node, because they are not used by the gpio-leds driver.
This allows the pinctrl subsystem to show in debugfs to which device is related which pins, for example:
pin 41 (PIN41): gpio-leds.1 mvebu-gpio:41 function gpio group mpp41 pin 42 (PIN42): gpio-leds.1 mvebu-gpio:42 function gpio group mpp42 pin 43 (PIN43): gpio-leds.1 mvebu-gpio:43 function gpio group mpp43
--- arch/arm/boot/dts/kirkwood-iomega_ix2_200.dts | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-)
arch/arm/boot/dts/kirkwood-iomega_ix2_200.dts +9 -6
@@ -18,12 +18,7 @@ ocp at f1000000 { pinctrl: pinctrl at 10000 { - - pinctrl-0 = < &pmx_button_reset &pmx_button_power - &pmx_led_backup &pmx_led_power - &pmx_button_otb &pmx_led_rebuild - &pmx_led_health - &pmx_led_sata_brt_ctrl_1 + pinctrl-0 = < &pmx_led_sata_brt_ctrl_1 &pmx_led_sata_brt_ctrl_2 &pmx_led_backup_brt_ctrl_1 &pmx_led_backup_brt_ctrl_2
@@ -151,6 +146,9 @@ }; gpio-leds { compatible = "gpio-leds"; + pinctrl-0 = < &pmx_led_backup &pmx_led_power + &pmx_led_rebuild &pmx_led_health >; + pinctrl-names = "default"; power_led { label = "status:white:power_led";
@@ -174,6 +172,11 @@ compatible = "gpio-keys"; #address-cells = <1>; #size-cells = <0>; + pinctrl-0 = <&pmx_button_reset &pmx_button_power + &pmx_button_otb>; + pinctrl-names = "default"; + + Power { label = "Power Button"; linux,code = <116>;
Signature · 1 line
1.7.9.5
PATCH 11/21 arm: kirkwood: ns2: affect pinmux configs to the right devices
In reply to Thomas PetazzoniWhen the pinmux mechanism was added in Kirkwood, the device driver core was not yet providing the possibility of attaching pinmux configurations to all devices, drivers had to do it explicitly, and not all drivers were doing this.
Now that the driver core does that in a generic way, it makes sense to attach the pinmux configuration to their corresponding devices.
This allows the pinctrl subsystem to show in debugfs to which device is related which pins, for example:
pin 41 (PIN41): gpio-leds.1 mvebu-gpio:41 function gpio group mpp41 pin 42 (PIN42): gpio-leds.1 mvebu-gpio:42 function gpio group mpp42 pin 43 (PIN43): gpio-leds.1 mvebu-gpio:43 function gpio group mpp43
--- arch/arm/boot/dts/kirkwood-is2.dts | 2 ++ arch/arm/boot/dts/kirkwood-ns2-common.dtsi | 10 ++++++---- arch/arm/boot/dts/kirkwood-ns2.dts | 2 ++ arch/arm/boot/dts/kirkwood-ns2lite.dts | 2 ++ arch/arm/boot/dts/kirkwood-ns2max.dts | 2 ++ arch/arm/boot/dts/kirkwood-ns2mini.dts | 2 ++ 6 files changed, 16 insertions(+), 4 deletions(-)
arch/arm/boot/dts/kirkwood-is2.dts +2 -0
@@ -13,6 +13,8 @@ ocp at f1000000 { sata at 80000 { + pinctrl-0 = <&pmx_ns2_sata0>; + pinctrl-names = "default"; status = "okay"; nr-ports = <1>; };
arch/arm/boot/dts/kirkwood-ns2-common.dtsi +6 -4
@@ -8,10 +8,6 @@ ocp at f1000000 { pinctrl: pinctrl at 10000 { - pinctrl-0 = < &pmx_spi &pmx_twsi0 &pmx_uart0 - &pmx_ns2_sata0 &pmx_ns2_sata1>; - pinctrl-names = "default"; - pmx_ns2_sata0: pmx-ns2-sata0 { marvell,pins = "mpp21"; marvell,function = "sata0";
@@ -23,10 +19,14 @@ }; serial at 12000 { + pinctrl-0 = <&pmx_uart0>; + pinctrl-names = "default"; status = "okay"; }; spi at 10600 { + pinctrl-0 = <&pmx_spi>; + pinctrl-names = "default"; status = "okay"; flash at 0 {
@@ -45,6 +45,8 @@ }; i2c at 11000 { + pinctrl-0 = <&pmx_twsi0>; + pinctrl-names = "default"; status = "okay"; eeprom at 50 {
arch/arm/boot/dts/kirkwood-ns2.dts +2 -0
@@ -13,6 +13,8 @@ ocp at f1000000 { sata at 80000 { + pinctrl-0 = <&pmx_ns2_sata0>; + pinctrl-names = "default"; status = "okay"; nr-ports = <1>; };
arch/arm/boot/dts/kirkwood-ns2lite.dts +2 -0
@@ -13,6 +13,8 @@ ocp at f1000000 { sata at 80000 { + pinctrl-0 = <&pmx_ns2_sata0>; + pinctrl-names = "default"; status = "okay"; nr-ports = <1>; };
arch/arm/boot/dts/kirkwood-ns2max.dts +2 -0
@@ -13,6 +13,8 @@ ocp at f1000000 { sata at 80000 { + pinctrl-0 = <&pmx_ns2_sata0 &pmx_ns2_sata1>; + pinctrl-names = "default"; status = "okay"; nr-ports = <2>; };
arch/arm/boot/dts/kirkwood-ns2mini.dts +2 -0
@@ -14,6 +14,8 @@ ocp at f1000000 { sata at 80000 { + pinctrl-0 = <&pmx_ns2_sata0>; + pinctrl-names = "default"; status = "okay"; nr-ports = <1>; };
Signature · 1 line
1.7.9.5
PATCH 12/21 arm: kirkwood: keymile: affect pinmux configs to the right devices
In reply to Thomas PetazzoniWhen the pinmux mechanism was added in Kirkwood, the device driver core was not yet providing the possibility of attaching pinmux configurations to all devices, drivers had to do it explicitly, and not all drivers were doing this.
Now that the driver core does that in a generic way, it makes sense to attach the pinmux configuration to their corresponding devices.
This allows the pinctrl subsystem to show in debugfs to which device is related which pins, for example:
pin 41 (PIN41): gpio-leds.1 mvebu-gpio:41 function gpio group mpp41 pin 42 (PIN42): gpio-leds.1 mvebu-gpio:42 function gpio group mpp42 pin 43 (PIN43): gpio-leds.1 mvebu-gpio:43 function gpio group mpp43
---
Note: not sure what the pmx_i2c_gpio_sda and pmx_i2c_gpio_scl pinmux configurations are for. Certainly for an I2C bus bit-banged over GPIOs, but I don't see where such an I2C bus is declared in the Device Tree.
--- arch/arm/boot/dts/kirkwood-km_kirkwood.dts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
arch/arm/boot/dts/kirkwood-km_kirkwood.dts +3 -3
@@ -18,9 +18,7 @@ ocp at f1000000 { pinctrl: pinctrl at 10000 { - - pinctrl-0 = < &pmx_nand &pmx_i2c_gpio_sda - &pmx_i2c_gpio_scl >; + pinctrl-0 = < &pmx_i2c_gpio_sda &pmx_i2c_gpio_scl >; pinctrl-names = "default"; pmx_i2c_gpio_sda: pmx-gpio-sda {
@@ -38,6 +36,8 @@ }; nand at 3000000 { + pinctrl-0 = <&pmx_nand>; + pinctrl-names = "default"; status = "ok"; chip-delay = <25>; };
Signature · 1 line
1.7.9.5
PATCH 13/21 arm: kirkwood: buffalo linkstation: affect pinmux configs to the right devices
In reply to Thomas PetazzoniWhen the pinmux mechanism was added in Kirkwood, the device driver core was not yet providing the possibility of attaching pinmux configurations to all devices, drivers had to do it explicitly, and not all drivers were doing this.
Now that the driver core does that in a generic way, it makes sense to attach the pinmux configuration to their corresponding devices.
This allows the pinctrl subsystem to show in debugfs to which device is related which pins, for example:
pin 41 (PIN41): gpio-leds.1 mvebu-gpio:41 function gpio group mpp41 pin 42 (PIN42): gpio-leds.1 mvebu-gpio:42 function gpio group mpp42 pin 43 (PIN43): gpio-leds.1 mvebu-gpio:43 function gpio group mpp43
--- arch/arm/boot/dts/kirkwood-lsxl.dtsi | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-)
arch/arm/boot/dts/kirkwood-lsxl.dtsi +12 -10
@@ -8,16 +8,6 @@ ocp at f1000000 { pinctrl: pinctrl at 10000 { - - pinctrl-0 = < &pmx_power_hdd &pmx_usb_vbus - &pmx_fan_low &pmx_fan_high - &pmx_led_function_red &pmx_led_alarm - &pmx_led_info &pmx_led_power - &pmx_fan_lock &pmx_button_function - &pmx_power_switch &pmx_power_auto_switch - &pmx_led_function_blue >; - pinctrl-names = "default"; - pmx_power_hdd: pmx-power-hdd { marvell,pins = "mpp10"; marvell,function = "gpo";
@@ -112,6 +102,10 @@ compatible = "gpio-keys"; #address-cells = <1>; #size-cells = <0>; + pinctrl-0 = <&pmx_button_function &pmx_power_switch + &pmx_power_auto_switch>; + pinctrl-names = "default"; + button at 1 { label = "Function Button"; linux,code = <357>;
@@ -133,6 +127,10 @@ gpio_leds { compatible = "gpio-leds"; + pinctrl-0 = <&pmx_led_function_red &pmx_led_alarm + &pmx_led_info &pmx_led_power + &pmx_led_function_blue>; + pinctrl-names = "default"; led at 1 { label = "lsxl:blue:func";
@@ -163,6 +161,8 @@ gpio_fan { compatible = "gpio-fan"; + pinctrl-0 = <&pmx_fan_low &pmx_fan_high &pmx_fan_lock>; + pinctrl-names = "default"; gpios = <&gpio0 19 1 &gpio0 18 1>; gpio-fan,speed-map = <0 3
@@ -176,6 +176,8 @@ compatible = "simple-bus"; #address-cells = <1>; #size-cells = <0>; + pinctrl-0 = <&pmx_power_hdd &pmx_usb_vbus>; + pinctrl-names = "default"; usb_power: regulator at 1 { compatible = "regulator-fixed";
Signature · 1 line
1.7.9.5
PATCH 14/21 arm: kirkwood: mplcec4: affect pinmux configs to the right devices
In reply to Thomas PetazzoniWhen the pinmux mechanism was added in Kirkwood, the device driver core was not yet providing the possibility of attaching pinmux configurations to all devices, drivers had to do it explicitly, and not all drivers were doing this.
Now that the driver core does that in a generic way, it makes sense to attach the pinmux configuration to their corresponding devices.
This allows the pinctrl subsystem to show in debugfs to which device is related which pins, for example:
pin 41 (PIN41): gpio-leds.1 mvebu-gpio:41 function gpio group mpp41 pin 42 (PIN42): gpio-leds.1 mvebu-gpio:42 function gpio group mpp42 pin 43 (PIN43): gpio-leds.1 mvebu-gpio:43 function gpio group mpp43
--- arch/arm/boot/dts/kirkwood-mplcec4.dts | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-)
arch/arm/boot/dts/kirkwood-mplcec4.dts +12 -11
@@ -18,16 +18,6 @@ ocp at f1000000 { pinctrl: pinctrl at 10000 { - - pinctrl-0 = < &pmx_nand &pmx_uart0 - &pmx_led_health - &pmx_sata0 &pmx_sata1 - &pmx_led_user1o - &pmx_led_user1g &pmx_led_user0o - &pmx_led_user0g &pmx_led_misc - >; - pinctrl-names = "default"; - pmx_led_health: pmx-led-health { marvell,pins = "mpp7"; marvell,function = "gpo";
@@ -91,9 +81,13 @@ serial at 12000 { status = "ok"; + pinctrl-0 = <&pmx_uart0>; + pinctrl-names = "default"; }; nand at 3000000 { + pinctrl-0 = <&pmx_nand>; + pinctrl-names = "default"; status = "okay"; partition at 0 {
@@ -127,9 +121,10 @@ }; sata at 80000 { + pinctrl-0 = <&pmx_sata0 &pmx_sata1>; + pinctrl-names = "default"; nr-ports = <2>; status = "okay"; - }; mvsdio at 90000 {
@@ -143,6 +138,12 @@ gpio-leds { compatible = "gpio-leds"; + pinctrl-0 = < &pmx_led_health + &pmx_led_user1o + &pmx_led_user1g &pmx_led_user0o + &pmx_led_user0g &pmx_led_misc + >; + pinctrl-names = "default"; health { label = "status:green:health";
Signature · 1 line
1.7.9.5
PATCH 15/21 arm: kirkwood: readynas: affect pinmux configs to the right devices
In reply to Thomas PetazzoniWhen the pinmux mechanism was added in Kirkwood, the device driver core was not yet providing the possibility of attaching pinmux configurations to all devices, drivers had to do it explicitly, and not all drivers were doing this.
Now that the driver core does that in a generic way, it makes sense to attach the pinmux configuration to their corresponding devices.
This allows the pinctrl subsystem to show in debugfs to which device is related which pins, for example:
pin 41 (PIN41): gpio-leds.1 mvebu-gpio:41 function gpio group mpp41 pin 42 (PIN42): gpio-leds.1 mvebu-gpio:42 function gpio group mpp42 pin 43 (PIN43): gpio-leds.1 mvebu-gpio:43 function gpio group mpp43
--- .../boot/dts/kirkwood-netgear_readynas_duo_v2.dts | 22 +++++++++----------- 1 file changed, 10 insertions(+), 12 deletions(-)
arch/arm/boot/dts/kirkwood-netgear_readynas_duo_v2.dts +10 -12
@@ -18,18 +18,6 @@ ocp at f1000000 { pinctrl: pinctrl at 10000 { - - pinctrl-0 = < &pmx_uart0 - &pmx_button_power - &pmx_button_backup - &pmx_button_reset - &pmx_led_blue_power - &pmx_led_blue_activity - &pmx_led_blue_disk1 - &pmx_led_blue_disk2 - &pmx_led_blue_backup >; - pinctrl-names = "default"; - pmx_button_power: pmx-button-power { marvell,pins = "mpp47"; marvell,function = "gpio";
@@ -74,6 +62,8 @@ }; serial at 12000 { + pinctrl-0 = <&pmx_uart0>; + pinctrl-names = "default"; status = "okay"; };
@@ -115,6 +105,10 @@ gpio-leds { compatible = "gpio-leds"; + pinctrl-0 = < &pmx_led_blue_power &pmx_led_blue_activity + &pmx_led_blue_disk1 &pmx_led_blue_disk2 + &pmx_led_blue_backup >; + pinctrl-names = "default"; power_led { label = "status:blue:power_led";
@@ -143,6 +137,10 @@ compatible = "gpio-keys"; #address-cells = <1>; #size-cells = <0>; + pinctrl-0 = <&pmx_button_power &pmx_button_backup + &pmx_button_reset>; + pinctrl-names = "default"; + button at 1 { label = "Power Button"; linux,code = <116>; /* KEY_POWER */
Signature · 1 line
1.7.9.5
PATCH 16/21 arm: kirkwood: nsa310: affect pinmux configs to the right devices
In reply to Thomas PetazzoniWhen the pinmux mechanism was added in Kirkwood, the device driver core was not yet providing the possibility of attaching pinmux configurations to all devices, drivers had to do it explicitly, and not all drivers were doing this.
Now that the driver core does that in a generic way, it makes sense to attach the pinmux configuration to their corresponding devices.
This allows the pinctrl subsystem to show in debugfs to which device is related which pins, for example:
pin 41 (PIN41): gpio-leds.1 mvebu-gpio:41 function gpio group mpp41 pin 42 (PIN42): gpio-leds.1 mvebu-gpio:42 function gpio group mpp42 pin 43 (PIN43): gpio-leds.1 mvebu-gpio:43 function gpio group mpp43
--- arch/arm/boot/dts/kirkwood-nsa310.dts | 29 +++++++++++++---------------- 1 file changed, 13 insertions(+), 16 deletions(-)
arch/arm/boot/dts/kirkwood-nsa310.dts +13 -16
@@ -17,22 +17,7 @@ ocp at f1000000 { pinctrl: pinctrl at 10000 { - pinctrl-0 = < &pmx_led_esata_green - &pmx_led_esata_red - &pmx_led_usb_green - &pmx_led_usb_red - &pmx_usb_power_off - &pmx_led_sys_green - &pmx_led_sys_red - &pmx_btn_reset - &pmx_btn_copy - &pmx_led_copy_green - &pmx_led_copy_red - &pmx_led_hdd_green - &pmx_led_hdd_red - &pmx_unknown - &pmx_btn_power - &pmx_pwr_off >; + pinctrl-0 = <&pmx_unknown>; pinctrl-names = "default"; pmx_led_esata_green: pmx-led-esata-green {
@@ -182,6 +167,8 @@ compatible = "gpio-keys"; #address-cells = <1>; #size-cells = <0>; + pinctrl-0 = <&pmx_btn_reset &pmx_btn_copy &pmx_btn_power>; + pinctrl-names = "default"; button at 1 { label = "Power Button";
@@ -202,6 +189,12 @@ gpio-leds { compatible = "gpio-leds"; + pinctrl-0 = <&pmx_led_esata_green &pmx_led_esata_red + &pmx_led_usb_green &pmx_led_usb_red + &pmx_led_sys_green &pmx_led_sys_red + &pmx_led_copy_green &pmx_led_copy_red + &pmx_led_hdd_green &pmx_led_hdd_red>; + pinctrl-names = "default"; green-sys { label = "nsa310:green:sys";
@@ -247,6 +240,8 @@ gpio_poweroff { compatible = "gpio-poweroff"; + pinctrl-0 = <&pmx_pwr_off>; + pinctrl-names = "default"; gpios = <&gpio1 16 0>; };
@@ -254,6 +249,8 @@ compatible = "simple-bus"; #address-cells = <1>; #size-cells = <0>; + pinctrl-0 = <&pmx_usb_power_off>; + pinctrl-names = "default"; usb0_power_off: regulator at 1 { compatible = "regulator-fixed";
Signature · 1 line
1.7.9.5
PATCH 17/21 arm: kirkwood: openblocks_a6: affect pinmux configs to the right devices
In reply to Thomas PetazzoniWhen the pinmux mechanism was added in Kirkwood, the device driver core was not yet providing the possibility of attaching pinmux configurations to all devices, drivers had to do it explicitly, and not all drivers were doing this.
Now that the driver core does that in a generic way, it makes sense to attach the pinmux configuration to their corresponding devices.
This allows the pinctrl subsystem to show in debugfs to which device is related which pins, for example:
pin 41 (PIN41): gpio-leds.1 mvebu-gpio:41 function gpio group mpp41 pin 42 (PIN42): gpio-leds.1 mvebu-gpio:42 function gpio group mpp42 pin 43 (PIN43): gpio-leds.1 mvebu-gpio:43 function gpio group mpp43
--- arch/arm/boot/dts/kirkwood-openblocks_a6.dts | 26 ++++++++++++++++---------- 1 file changed, 16 insertions(+), 10 deletions(-)
arch/arm/boot/dts/kirkwood-openblocks_a6.dts +16 -10
@@ -19,15 +19,21 @@ ocp at f1000000 { serial at 12000 { status = "ok"; + pinctrl-0 = <&pmx_uart0>; + pinctrl-names = "default"; }; serial at 12100 { status = "ok"; + pinctrl-0 = <&pmx_uart1>; + pinctrl-names = "default"; }; nand at 3000000 { chip-delay = <25>; status = "okay"; + pinctrl-0 = <&pmx_nand>; + pinctrl-names = "default"; partition at 0 { label = "uboot";
@@ -67,6 +73,8 @@ i2c at 11100 { status = "okay"; + pinctrl-0 = <&pmx_twsi1>; + pinctrl-names = "default"; s35390a: s35390a at 30 { compatible = "s35390a";
@@ -75,16 +83,12 @@ }; pinctrl: pinctrl at 10000 { - pinctrl-0 = < &pmx_nand &pmx_uart0 - &pmx_uart1 &pmx_twsi1 - &pmx_dip_sw0 &pmx_dip_sw1 - &pmx_dip_sw2 &pmx_dip_sw3 - &pmx_gpio_0 &pmx_gpio_1 - &pmx_gpio_2 &pmx_gpio_3 - &pmx_gpio_4 &pmx_gpio_5 - &pmx_gpio_6 &pmx_gpio_7 - &pmx_led_red &pmx_led_green - &pmx_led_yellow >; + pinctrl-0 = <&pmx_dip_sw0 &pmx_dip_sw1 + &pmx_dip_sw2 &pmx_dip_sw3 + &pmx_gpio_0 &pmx_gpio_1 + &pmx_gpio_2 &pmx_gpio_3 + &pmx_gpio_4 &pmx_gpio_5 + &pmx_gpio_6 &pmx_gpio_7>; pinctrl-names = "default"; pmx_uart0: pmx-uart0 {
@@ -193,6 +197,8 @@ gpio-leds { compatible = "gpio-leds"; + pinctrl-0 = <&pmx_led_red &pmx_led_green &pmx_led_yellow>; + pinctrl-names = "default"; led-red { label = "obsa6:red:stat";
Signature · 1 line
1.7.9.5
PATCH 18/21 arm: kirkwood: topkick: affect pinmux configs to the right devices
In reply to Thomas PetazzoniWhen the pinmux mechanism was added in Kirkwood, the device driver core was not yet providing the possibility of attaching pinmux configurations to all devices, drivers had to do it explicitly, and not all drivers were doing this.
Now that the driver core does that in a generic way, it makes sense to attach the pinmux configuration to their corresponding devices.
This allows the pinctrl subsystem to show in debugfs to which device is related which pins, for example:
pin 41 (PIN41): gpio-leds.1 mvebu-gpio:41 function gpio group mpp41 pin 42 (PIN42): gpio-leds.1 mvebu-gpio:42 function gpio group mpp42 pin 43 (PIN43): gpio-leds.1 mvebu-gpio:43 function gpio group mpp43
--- arch/arm/boot/dts/kirkwood-topkick.dts | 51 ++++++++++++++++---------------- 1 file changed, 26 insertions(+), 25 deletions(-)
arch/arm/boot/dts/kirkwood-topkick.dts +26 -25
@@ -19,18 +19,6 @@ ocp at f1000000 { pinctrl: pinctrl at 10000 { /* - * GPIO LED layout - * - * /-SYS_LED(2) - * | - * | /-DISK_LED - * | | - * | | /-WLAN_LED(2) - * | | | - * [SW] [*] [*] [*] - */ - - /* * Switch positions * * /-SW_LEFT(2)
@@ -41,19 +29,8 @@ * | | | * PS [L] [I] [R] LEDS */ - pinctrl-0 = < &pmx_led_disk_yellow - &pmx_sata0_pwr_enable - &pmx_led_sys_red - &pmx_led_sys_blue - &pmx_led_wifi_green - &pmx_sw_left - &pmx_sw_right - &pmx_sw_idle - &pmx_sw_left2 - &pmx_led_wifi_yellow - &pmx_uart0 - &pmx_nand - &pmx_twsi0 >; + pinctrl-0 = <&pmx_sw_left &pmx_sw_right + &pmx_sw_idle &pmx_sw_left2>; pinctrl-names = "default"; pmx_led_disk_yellow: pmx-led-disk-yellow {
@@ -109,10 +86,14 @@ serial at 12000 { status = "ok"; + pinctrl-0 = <&pmx_uart0>; + pinctrl-names = "default"; }; nand at 3000000 { status = "okay"; + pinctrl-0 = <&pmx_nand>; + pinctrl-names = "default"; partition at 0 { label = "u-boot";
@@ -147,6 +128,8 @@ i2c at 11000 { status = "ok"; + pinctrl-0 = <&pmx_twsi0>; + pinctrl-names = "default"; }; mvsdio at 90000 {
@@ -158,7 +141,23 @@ }; gpio-leds { + /* + * GPIO LED layout + * + * /-SYS_LED(2) + * | + * | /-DISK_LED + * | | + * | | /-WLAN_LED(2) + * | | | + * [SW] [*] [*] [*] + */ + compatible = "gpio-leds"; + pinctrl-0 = <&pmx_led_disk_yellow &pmx_led_sys_red + &pmx_led_sys_blue &pmx_led_wifi_green + &pmx_led_wifi_yellow>; + pinctrl-names = "default"; disk { label = "topkick:yellow:disk";
@@ -187,6 +186,8 @@ compatible = "simple-bus"; #address-cells = <1>; #size-cells = <0>; + pinctrl-0 = <&pmx_sata0_pwr_enable>; + pinctrl-names = "default"; sata0_power: regulator at 1 { compatible = "regulator-fixed";
Signature · 1 line
1.7.9.5
PATCH 19/21 arm: kirkwood: ts219: affect pinmux configs to the right devices
In reply to Thomas PetazzoniWhen the pinmux mechanism was added in Kirkwood, the device driver core was not yet providing the possibility of attaching pinmux configurations to all devices, drivers had to do it explicitly, and not all drivers were doing this.
Now that the driver core does that in a generic way, it makes sense to attach the pinmux configuration to their corresponding devices.
This allows the pinctrl subsystem to show in debugfs to which device is related which pins, for example:
pin 41 (PIN41): gpio-leds.1 mvebu-gpio:41 function gpio group mpp41 pin 42 (PIN42): gpio-leds.1 mvebu-gpio:42 function gpio group mpp42 pin 43 (PIN43): gpio-leds.1 mvebu-gpio:43 function gpio group mpp43
--- arch/arm/boot/dts/kirkwood-ts219-6281.dts | 8 ++++---- arch/arm/boot/dts/kirkwood-ts219-6282.dts | 8 ++++---- arch/arm/boot/dts/kirkwood-ts219.dtsi | 10 ++++++++++ 3 files changed, 18 insertions(+), 8 deletions(-)
arch/arm/boot/dts/kirkwood-ts219-6281.dts +4 -4
@@ -7,10 +7,7 @@ ocp at f1000000 { pinctrl: pinctrl at 10000 { - pinctrl-0 = < &pmx_uart0 &pmx_uart1 &pmx_spi - &pmx_twsi0 &pmx_sata0 &pmx_sata1 - &pmx_ram_size &pmx_reset_button - &pmx_USB_copy_button &pmx_board_id>; + pinctrl-0 = <&pmx_ram_size &pmx_board_id>; pinctrl-names = "default"; pmx_ram_size: pmx-ram-size {
@@ -38,6 +35,9 @@ compatible = "gpio-keys"; #address-cells = <1>; #size-cells = <0>; + pinctrl-0 = <&pmx_reset_button &pmx_USB_copy_button>; + pinctrl-names = "default"; + button at 1 { label = "USB Copy"; linux,code = <133>;
arch/arm/boot/dts/kirkwood-ts219-6282.dts +4 -4
@@ -7,10 +7,7 @@ ocp at f1000000 { pinctrl: pinctrl at 10000 { - pinctrl-0 = < &pmx_uart0 &pmx_uart1 &pmx_spi - &pmx_twsi0 &pmx_sata0 &pmx_sata1 - &pmx_ram_size &pmx_reset_button - &pmx_USB_copy_button &pmx_board_id>; + pinctrl-0 = <&pmx_ram_size &pmx_board_id>; pinctrl-names = "default"; pmx_ram_size: pmx-ram-size {
@@ -38,6 +35,9 @@ compatible = "gpio-keys"; #address-cells = <1>; #size-cells = <0>; + pinctrl-0 = <&pmx_reset_button &pmx_USB_copy_button>; + pinctrl-names = "default"; + button at 1 { label = "USB Copy"; linux,code = <133>;
arch/arm/boot/dts/kirkwood-ts219.dtsi +10 -0
@@ -17,6 +17,8 @@ i2c at 11000 { status = "okay"; clock-frequency = <400000>; + pinctrl-0 = <&pmx_twsi0>; + pinctrl-names = "default"; s35390a: s35390a at 30 { compatible = "s35390a";
@@ -26,13 +28,19 @@ serial at 12000 { clock-frequency = <200000000>; status = "okay"; + pinctrl-0 = <&pmx_uart0>; + pinctrl-names = "default"; }; serial at 12100 { clock-frequency = <200000000>; status = "okay"; + pinctrl-0 = <&pmx_uart1>; + pinctrl-names = "default"; }; spi at 10600 { status = "okay"; + pinctrl-0 = <&pmx_spi>; + pinctrl-names = "default"; m25p128 at 0 { #address-cells = <1>;
@@ -71,6 +79,8 @@ }; }; sata at 80000 { + pinctrl-0 = <&pmx_sata0 &pmx_sata1>; + pinctrl-names = "default"; status = "okay"; nr-ports = <2>; };
Signature · 1 line
1.7.9.5
PATCH 20/21 arm: kirkwood: openblocks-a6: group pinmux configurations
In reply to Thomas PetazzoniInstead of having one separate pinmux configuration for each LED, for each GPIO of the GPIO header, for each DIP switch, this patch groups them together in configurations that make sense together: LEDs on one side, GPIOs of the GPIO header on another side, and DIP switches on yet another side.
--- arch/arm/boot/dts/kirkwood-openblocks_a6.dts | 82 +++----------------------- 1 file changed, 9 insertions(+), 73 deletions(-)
arch/arm/boot/dts/kirkwood-openblocks_a6.dts +9 -73
@@ -83,12 +83,7 @@ }; pinctrl: pinctrl at 10000 { - pinctrl-0 = <&pmx_dip_sw0 &pmx_dip_sw1 - &pmx_dip_sw2 &pmx_dip_sw3 - &pmx_gpio_0 &pmx_gpio_1 - &pmx_gpio_2 &pmx_gpio_3 - &pmx_gpio_4 &pmx_gpio_5 - &pmx_gpio_6 &pmx_gpio_7>; + pinctrl-0 = <&pmx_dip_switches &pmx_gpio_header>; pinctrl-names = "default"; pmx_uart0: pmx-uart0 {
@@ -108,63 +103,14 @@ marvell,function = "sysrst"; }; - pmx_dip_sw0: pmx-dip-sw0 { - marvell,pins = "mpp20"; + pmx_dip_switches: pmx-dip-switches { + marvell,pins = "mpp20", "mpp21", "mpp22", "mpp23"; marvell,function = "gpio"; }; - pmx_dip_sw1: pmx-dip-sw1 { - marvell,pins = "mpp21"; - marvell,function = "gpio"; - }; - - pmx_dip_sw2: pmx-dip-sw2 { - marvell,pins = "mpp22"; - marvell,function = "gpio"; - }; - - pmx_dip_sw3: pmx-dip-sw3 { - marvell,pins = "mpp23"; - marvell,function = "gpio"; - }; - - pmx_gpio_0: pmx-gpio-0 { - marvell,pins = "mpp24"; - marvell,function = "gpio"; - }; - - pmx_gpio_1: pmx-gpio-1 { - marvell,pins = "mpp25"; - marvell,function = "gpio"; - }; - - pmx_gpio_2: pmx-gpio-2 { - marvell,pins = "mpp26"; - marvell,function = "gpio"; - }; - - pmx_gpio_3: pmx-gpio-3 { - marvell,pins = "mpp27"; - marvell,function = "gpio"; - }; - - pmx_gpio_4: pmx-gpio-4 { - marvell,pins = "mpp28"; - marvell,function = "gpio"; - }; - - pmx_gpio_5: pmx-gpio-5 { - marvell,pins = "mpp29"; - marvell,function = "gpio"; - }; - - pmx_gpio_6: pmx-gpio-6 { - marvell,pins = "mpp30"; - marvell,function = "gpio"; - }; - - pmx_gpio_7: pmx-gpio-7 { - marvell,pins = "mpp31"; + pmx_gpio_header: pmx-gpio-header { + marvell,pins = "mpp24", "mpp25", "mpp26", "mpp27", + "mpp28", "mpp29", "mpp30", "mpp31"; marvell,function = "gpio"; };
@@ -178,18 +124,8 @@ marvell,function = "gpio"; }; - pmx_led_red: pmx-led-red { - marvell,pins = "mpp41"; - marvell,function = "gpio"; - }; - - pmx_led_green: pmx-led-green { - marvell,pins = "mpp42"; - marvell,function = "gpio"; - }; - - pmx_led_yellow: pmx-led-yellow { - marvell,pins = "mpp43"; + pmx_leds: pmx-leds { + marvell,pins = "mpp41", "mpp42", "mpp43"; marvell,function = "gpio"; }; };
@@ -197,7 +133,7 @@ gpio-leds { compatible = "gpio-leds"; - pinctrl-0 = <&pmx_led_red &pmx_led_green &pmx_led_yellow>; + pinctrl-0 = <&pmx_leds>; pinctrl-names = "default"; led-red {
Signature · 1 line
1.7.9.5
PATCH 21/21 arm: kirkwood: openblocks-a6: add support for Init button
In reply to Thomas PetazzoniThe Kirkwood-based PlatHome OpenBlocks A6 board has an Init button connected to MPP pin 38. This commit adds support for this button.
--- arch/arm/boot/dts/kirkwood-openblocks_a6.dts | 14 ++++++++++++++ 1 file changed, 14 insertions(+)
arch/arm/boot/dts/kirkwood-openblocks_a6.dts +14 -0
@@ -151,4 +151,18 @@ gpios = <&gpio1 11 1>; }; }; + + gpio_keys { + compatible = "gpio-keys"; + pinctrl-0 = <&pmx_gpio_init>; + pinctrl-names = "default"; + #address-cells = <1>; + #size-cells = <0>; + + button at 1 { + label = "Init Button"; + linux,code = <116>; + gpios = <&gpio1 6 0>; + }; + }; };
Signature · 1 line
1.7.9.5
cover ARM: kirkwood: improve pinmux configs in Device Tree
In reply to Thomas PetazzoniQuoted 134 lines · Thomas Petazzoni
Hello,
This series of patches has the goal of adding support for the Init button on OpenBlocks A6, but takes this opportunity to do a little bit of cleanup in the pinmux configurations of the various Kirkwood Device Trees.
Until now, all pinmux configurations were "owned" by the pinctrl driver, because back when they were introduced, the driver core was not selecting the pinmux configuration, each driver had to do it manually (and not all drivers were doing so). Now that the driver core selects the default pinmux configuration when available, it makes sense to associate the pinmux configuration to the particular device it is related to.
It allows pinctrl to show nice informations in debugfs, which associates a particular pin with the particular device using it:
# cat pinctrl/f1010000.pinctrl/pinmux-pins Pinmux settings per pin Format: pin (name): mux_owner gpio_owner hog? pin 0 (PIN0): f4000000.nand (GPIO UNCLAIMED) function nand group mpp0 pin 1 (PIN1): f4000000.nand (GPIO UNCLAIMED) function nand group mpp1 pin 2 (PIN2): f4000000.nand (GPIO UNCLAIMED) function nand group mpp2 pin 3 (PIN3): f4000000.nand (GPIO UNCLAIMED) function nand group mpp3 pin 4 (PIN4): f4000000.nand (GPIO UNCLAIMED) function nand group mpp4 pin 5 (PIN5): f4000000.nand (GPIO UNCLAIMED) function nand group mpp5 pin 6 (PIN6): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 7 (PIN7): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 8 (PIN8): f1012100.serial (GPIO UNCLAIMED) function uart1 group mpp8 pin 9 (PIN9): f1012100.serial (GPIO UNCLAIMED) function uart1 group mpp9 pin 10 (PIN10): f1012000.serial (GPIO UNCLAIMED) function uart0 group mpp10 pin 11 (PIN11): f1012000.serial (GPIO UNCLAIMED) function uart0 group mpp11 pin 12 (PIN12): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 13 (PIN13): f1012100.serial (GPIO UNCLAIMED) function uart1 group mpp13 pin 14 (PIN14): f1012100.serial (GPIO UNCLAIMED) function uart1 group mpp14 pin 15 (PIN15): f1012000.serial (GPIO UNCLAIMED) function uart0 group mpp15 pin 16 (PIN16): f1012000.serial (GPIO UNCLAIMED) function uart0 group mpp16 pin 17 (PIN17): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 18 (PIN18): f4000000.nand (GPIO UNCLAIMED) function nand group mpp18 pin 19 (PIN19): f4000000.nand (GPIO UNCLAIMED) function nand group mpp19 pin 20 (PIN20): f1010000.pinctrl (GPIO UNCLAIMED) (HOG) function gpio group mpp20 pin 21 (PIN21): f1010000.pinctrl (GPIO UNCLAIMED) (HOG) function gpio group mpp21 pin 22 (PIN22): f1010000.pinctrl (GPIO UNCLAIMED) (HOG) function gpio group mpp22 pin 23 (PIN23): f1010000.pinctrl (GPIO UNCLAIMED) (HOG) function gpio group mpp23 pin 24 (PIN24): f1010000.pinctrl (GPIO UNCLAIMED) (HOG) function gpio group mpp24 pin 25 (PIN25): f1010000.pinctrl (GPIO UNCLAIMED) (HOG) function gpio group mpp25 pin 26 (PIN26): f1010000.pinctrl (GPIO UNCLAIMED) (HOG) function gpio group mpp26 pin 27 (PIN27): f1010000.pinctrl (GPIO UNCLAIMED) (HOG) function gpio group mpp27 pin 28 (PIN28): f1010000.pinctrl (GPIO UNCLAIMED) (HOG) function gpio group mpp28 pin 29 (PIN29): f1010000.pinctrl (GPIO UNCLAIMED) (HOG) function gpio group mpp29 pin 30 (PIN30): f1010000.pinctrl (GPIO UNCLAIMED) (HOG) function gpio group mpp30 pin 31 (PIN31): f1010000.pinctrl (GPIO UNCLAIMED) (HOG) function gpio group mpp31 pin 32 (PIN32): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 33 (PIN33): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 34 (PIN34): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 35 (PIN35): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 36 (PIN36): f1011100.i2c (GPIO UNCLAIMED) function twsi1 group mpp36 pin 37 (PIN37): f1011100.i2c (GPIO UNCLAIMED) function twsi1 group mpp37 pin 38 (PIN38): gpio_keys.2 mvebu-gpio:38 function gpio group mpp38 pin 39 (PIN39): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 40 (PIN40): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 41 (PIN41): gpio-leds.1 mvebu-gpio:41 function gpio group mpp41 pin 42 (PIN42): gpio-leds.1 mvebu-gpio:42 function gpio group mpp42 pin 43 (PIN43): gpio-leds.1 mvebu-gpio:43 function gpio group mpp43 pin 44 (PIN44): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 45 (PIN45): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 46 (PIN46): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 47 (PIN47): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 48 (PIN48): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 49 (PIN49): (MUX UNCLAIMED) (GPIO UNCLAIMED)Without this patch set, all pins appear to be owned by "f1010000.pinctrl".
Even though GPIO muxing is automatically done when a device driver requests a GPIO, Andrew Lunn and I had agreed to make the pinmuxing explicit, in order to have correct informations in debugfs. See our discussion at
http://lists.infradead.org/pipermail/linux-arm-kernel/2013-March/158190.html.The last patch finally adds support for the init button of the Plathome OpenBlocks A6 platform.
Best regards,
Thomas
Thomas Petazzoni (21):
arm: kirkwood: cloudbox: affect pinmux configs to the right devices
arm: kirkwood: dlink dns: affect pinmux configs to the right devices
arm: kirkwood: dockstar: affect pinmux configs to the right devices
arm: kirkwood: dreamplug: affect pinmux configs to the right devices
arm: kirkwood: goflexnet: affect pinmux configs to the right devices
arm: kirkwood: guruplug: affect pinmux configs to the right devices
arm: kirkwood: ib62x0: affect pinmux configs to the right devices
arm: kirkwood: iconnect: give meaningful names to pinmux configs
arm: kirkwood: iconnect: affect pinmux configs to the right devices
arm: kirkwood: iomega ix2-200: affect pinmux configs to the right
devices
arm: kirkwood: ns2: affect pinmux configs to the right devices
arm: kirkwood: keymile: affect pinmux configs to the right devices
arm: kirkwood: buffalo linkstation: affect pinmux configs to the
right devices
arm: kirkwood: mplcec4: affect pinmux configs to the right devices
arm: kirkwood: readynas: affect pinmux configs to the right devices
arm: kirkwood: nsa310: affect pinmux configs to the right devices
arm: kirkwood:openblocks_a6: affect pinmux configs to the right
devices
arm: kirkwood: topkick: affect pinmux configs to the right devices
arm: kirkwood: ts219: affect pinmux configs to the right devices
arm: kirkwood: openblocks-a6: group pinmux configurations
arm: kirkwood: openblocks-a6: add support for Init buttonarch/arm/boot/dts/kirkwood-cloudbox.dts | 10 +- arch/arm/boot/dts/kirkwood-dns320.dts | 7 ++ arch/arm/boot/dts/kirkwood-dns325.dts | 5 + arch/arm/boot/dts/kirkwood-dnskw.dtsi | 32 +++--- arch/arm/boot/dts/kirkwood-dockstar.dts | 9 +- arch/arm/boot/dts/kirkwood-dreamplug.dts | 11 +- arch/arm/boot/dts/kirkwood-goflexnet.dts | 18 ++-- .../arm/boot/dts/kirkwood-guruplug-server-plus.dts | 8 +- arch/arm/boot/dts/kirkwood-ib62x0.dts | 17 +-- arch/arm/boot/dts/kirkwood-iconnect.dts | 36 +++---- arch/arm/boot/dts/kirkwood-iomega_ix2_200.dts | 15 +-- arch/arm/boot/dts/kirkwood-is2.dts | 2 + arch/arm/boot/dts/kirkwood-km_kirkwood.dts | 6 +- arch/arm/boot/dts/kirkwood-lsxl.dtsi | 22 ++-- arch/arm/boot/dts/kirkwood-mplcec4.dts | 23 +++-- .../boot/dts/kirkwood-netgear_readynas_duo_v2.dts | 22 ++-- arch/arm/boot/dts/kirkwood-ns2-common.dtsi | 10 +- arch/arm/boot/dts/kirkwood-ns2.dts | 2 + arch/arm/boot/dts/kirkwood-ns2lite.dts | 2 + arch/arm/boot/dts/kirkwood-ns2max.dts | 2 +
Quoted 8 lines
arch/arm/boot/dts/kirkwood-ns2mini.dts | 2 + arch/arm/boot/dts/kirkwood-nsa310.dts | 29 +++--- arch/arm/boot/dts/kirkwood-openblocks_a6.dts | 108 ++++++-------------- arch/arm/boot/dts/kirkwood-topkick.dts | 51 ++++----- arch/arm/boot/dts/kirkwood-ts219-6281.dts | 8 +- arch/arm/boot/dts/kirkwood-ts219-6282.dts | 8 +- arch/arm/boot/dts/kirkwood-ts219.dtsi | 10 ++ 27 files changed, 235 insertions(+), 240 deletions(-)
Whole series applied to mvebu/dt with one small change, s/affect/move/ on the Subjects.
thx,
Jason.
cover ARM: kirkwood: improve pinmux configs in Device Tree
Dear Jason Cooper,
Quoted 4 lines · Jason Cooper
Quoted 1 line
27 files changed, 235 insertions(+), 240 deletions(-)Whole series applied to mvebu/dt with one small change, s/affect/move/ on the Subjects.
Ok, thanks!
Thomas
Signature · 4 lines
Thomas Petazzoni, Free Electrons Kernel, drivers, real-time and embedded Linux development, consulting, training and support. http://free-electrons.com
cover ARM: kirkwood: improve pinmux configs in Device Tree
In reply to Thomas PetazzoniQuoted 81 lines · Thomas Petazzoni
Hello,
This series of patches has the goal of adding support for the Init button on OpenBlocks A6, but takes this opportunity to do a little bit of cleanup in the pinmux configurations of the various Kirkwood Device Trees.
Until now, all pinmux configurations were "owned" by the pinctrl driver, because back when they were introduced, the driver core was not selecting the pinmux configuration, each driver had to do it manually (and not all drivers were doing so). Now that the driver core selects the default pinmux configuration when available, it makes sense to associate the pinmux configuration to the particular device it is related to.
It allows pinctrl to show nice informations in debugfs, which associates a particular pin with the particular device using it:
# cat pinctrl/f1010000.pinctrl/pinmux-pins Pinmux settings per pin Format: pin (name): mux_owner gpio_owner hog? pin 0 (PIN0): f4000000.nand (GPIO UNCLAIMED) function nand group mpp0 pin 1 (PIN1): f4000000.nand (GPIO UNCLAIMED) function nand group mpp1 pin 2 (PIN2): f4000000.nand (GPIO UNCLAIMED) function nand group mpp2 pin 3 (PIN3): f4000000.nand (GPIO UNCLAIMED) function nand group mpp3 pin 4 (PIN4): f4000000.nand (GPIO UNCLAIMED) function nand group mpp4 pin 5 (PIN5): f4000000.nand (GPIO UNCLAIMED) function nand group mpp5 pin 6 (PIN6): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 7 (PIN7): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 8 (PIN8): f1012100.serial (GPIO UNCLAIMED) function uart1 group mpp8 pin 9 (PIN9): f1012100.serial (GPIO UNCLAIMED) function uart1 group mpp9 pin 10 (PIN10): f1012000.serial (GPIO UNCLAIMED) function uart0 group mpp10 pin 11 (PIN11): f1012000.serial (GPIO UNCLAIMED) function uart0 group mpp11 pin 12 (PIN12): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 13 (PIN13): f1012100.serial (GPIO UNCLAIMED) function uart1 group mpp13 pin 14 (PIN14): f1012100.serial (GPIO UNCLAIMED) function uart1 group mpp14 pin 15 (PIN15): f1012000.serial (GPIO UNCLAIMED) function uart0 group mpp15 pin 16 (PIN16): f1012000.serial (GPIO UNCLAIMED) function uart0 group mpp16 pin 17 (PIN17): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 18 (PIN18): f4000000.nand (GPIO UNCLAIMED) function nand group mpp18 pin 19 (PIN19): f4000000.nand (GPIO UNCLAIMED) function nand group mpp19 pin 20 (PIN20): f1010000.pinctrl (GPIO UNCLAIMED) (HOG) function gpio group mpp20 pin 21 (PIN21): f1010000.pinctrl (GPIO UNCLAIMED) (HOG) function gpio group mpp21 pin 22 (PIN22): f1010000.pinctrl (GPIO UNCLAIMED) (HOG) function gpio group mpp22 pin 23 (PIN23): f1010000.pinctrl (GPIO UNCLAIMED) (HOG) function gpio group mpp23 pin 24 (PIN24): f1010000.pinctrl (GPIO UNCLAIMED) (HOG) function gpio group mpp24 pin 25 (PIN25): f1010000.pinctrl (GPIO UNCLAIMED) (HOG) function gpio group mpp25 pin 26 (PIN26): f1010000.pinctrl (GPIO UNCLAIMED) (HOG) function gpio group mpp26 pin 27 (PIN27): f1010000.pinctrl (GPIO UNCLAIMED) (HOG) function gpio group mpp27 pin 28 (PIN28): f1010000.pinctrl (GPIO UNCLAIMED) (HOG) function gpio group mpp28 pin 29 (PIN29): f1010000.pinctrl (GPIO UNCLAIMED) (HOG) function gpio group mpp29 pin 30 (PIN30): f1010000.pinctrl (GPIO UNCLAIMED) (HOG) function gpio group mpp30 pin 31 (PIN31): f1010000.pinctrl (GPIO UNCLAIMED) (HOG) function gpio group mpp31 pin 32 (PIN32): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 33 (PIN33): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 34 (PIN34): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 35 (PIN35): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 36 (PIN36): f1011100.i2c (GPIO UNCLAIMED) function twsi1 group mpp36 pin 37 (PIN37): f1011100.i2c (GPIO UNCLAIMED) function twsi1 group mpp37 pin 38 (PIN38): gpio_keys.2 mvebu-gpio:38 function gpio group mpp38 pin 39 (PIN39): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 40 (PIN40): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 41 (PIN41): gpio-leds.1 mvebu-gpio:41 function gpio group mpp41 pin 42 (PIN42): gpio-leds.1 mvebu-gpio:42 function gpio group mpp42 pin 43 (PIN43): gpio-leds.1 mvebu-gpio:43 function gpio group mpp43 pin 44 (PIN44): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 45 (PIN45): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 46 (PIN46): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 47 (PIN47): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 48 (PIN48): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 49 (PIN49): (MUX UNCLAIMED) (GPIO UNCLAIMED)Without this patch set, all pins appear to be owned by "f1010000.pinctrl".
Even though GPIO muxing is automatically done when a device driver requests a GPIO, Andrew Lunn and I had agreed to make the pinmuxing explicit, in order to have correct informations in debugfs. See our discussion at
http://lists.infradead.org/pipermail/linux-arm-kernel/2013-March/158190.html.
Quoted 6 lines
The last patch finally adds support for the init button of the Plathome OpenBlocks A6 platform.
Best regards,
Thomas
Hi Thomas, Jason
You can add a
to the topkick and ts219 patches, and a general
to the rest.
Andrew
Quoted 59 lines
Thomas Petazzoni (21):
arm: kirkwood: cloudbox: affect pinmux configs to the right devices
arm: kirkwood: dlink dns: affect pinmux configs to the right devices
arm: kirkwood: dockstar: affect pinmux configs to the right devices
arm: kirkwood: dreamplug: affect pinmux configs to the right devices
arm: kirkwood: goflexnet: affect pinmux configs to the right devices
arm: kirkwood: guruplug: affect pinmux configs to the right devices
arm: kirkwood: ib62x0: affect pinmux configs to the right devices
arm: kirkwood: iconnect: give meaningful names to pinmux configs
arm: kirkwood: iconnect: affect pinmux configs to the right devices
arm: kirkwood: iomega ix2-200: affect pinmux configs to the right
devices
arm: kirkwood: ns2: affect pinmux configs to the right devices
arm: kirkwood: keymile: affect pinmux configs to the right devices
arm: kirkwood: buffalo linkstation: affect pinmux configs to the
right devices
arm: kirkwood: mplcec4: affect pinmux configs to the right devices
arm: kirkwood: readynas: affect pinmux configs to the right devices
arm: kirkwood: nsa310: affect pinmux configs to the right devices
arm: kirkwood:openblocks_a6: affect pinmux configs to the right
devices
arm: kirkwood: topkick: affect pinmux configs to the right devices
arm: kirkwood: ts219: affect pinmux configs to the right devices
arm: kirkwood: openblocks-a6: group pinmux configurations
arm: kirkwood: openblocks-a6: add support for Init buttonarch/arm/boot/dts/kirkwood-cloudbox.dts | 10 +- arch/arm/boot/dts/kirkwood-dns320.dts | 7 ++ arch/arm/boot/dts/kirkwood-dns325.dts | 5 + arch/arm/boot/dts/kirkwood-dnskw.dtsi | 32 +++--- arch/arm/boot/dts/kirkwood-dockstar.dts | 9 +- arch/arm/boot/dts/kirkwood-dreamplug.dts | 11 +- arch/arm/boot/dts/kirkwood-goflexnet.dts | 18 ++-- .../arm/boot/dts/kirkwood-guruplug-server-plus.dts | 8 +- arch/arm/boot/dts/kirkwood-ib62x0.dts | 17 +-- arch/arm/boot/dts/kirkwood-iconnect.dts | 36 +++---- arch/arm/boot/dts/kirkwood-iomega_ix2_200.dts | 15 +-- arch/arm/boot/dts/kirkwood-is2.dts | 2 + arch/arm/boot/dts/kirkwood-km_kirkwood.dts | 6 +- arch/arm/boot/dts/kirkwood-lsxl.dtsi | 22 ++-- arch/arm/boot/dts/kirkwood-mplcec4.dts | 23 +++-- .../boot/dts/kirkwood-netgear_readynas_duo_v2.dts | 22 ++-- arch/arm/boot/dts/kirkwood-ns2-common.dtsi | 10 +- arch/arm/boot/dts/kirkwood-ns2.dts | 2 + arch/arm/boot/dts/kirkwood-ns2lite.dts | 2 + arch/arm/boot/dts/kirkwood-ns2max.dts | 2 + arch/arm/boot/dts/kirkwood-ns2mini.dts | 2 + arch/arm/boot/dts/kirkwood-nsa310.dts | 29 +++--- arch/arm/boot/dts/kirkwood-openblocks_a6.dts | 108 ++++++-------------- arch/arm/boot/dts/kirkwood-topkick.dts | 51 ++++----- arch/arm/boot/dts/kirkwood-ts219-6281.dts | 8 +- arch/arm/boot/dts/kirkwood-ts219-6282.dts | 8 +- arch/arm/boot/dts/kirkwood-ts219.dtsi | 10 ++ 27 files changed, 235 insertions(+), 240 deletions(-)Signature · 1 line
1.7.9.5
cover ARM: kirkwood: improve pinmux configs in Device Tree
In reply to Thomas PetazzoniDear Mr. Petazzoni
Quoted 2 lines
The last patch finally adds support for the init button of the Plathome OpenBlocks A6 platform.
I have checked the init button worked well with your three patches for linux-3.10-rc3 and 3.9.4.
BEGIN--------
root at obsa6:~# evtest /dev/input/event0
Input driver version is 1.0.1
Input device ID: bus 0x19 vendor 0x1 product 0x1 version 0x100 Input device name: "gpio_keys.2"
Supported events:
Event type 0 (EV_SYN)
Event type 1 (EV_KEY)
Event code 116 (KEY_POWER)
Properties:
Testing ... (interrupt to exit)
Event: time 1369641859.652847, type 1 (EV_KEY), code 116 (KEY_POWER), value 1
Event: time 1369641859.652847, -------------- SYN_REPORT ------------
Event: time 1369641859.992842, type 1 (EV_KEY), code 116 (KEY_POWER), value 0
Event: time 1369641859.992842, -------------- SYN_REPORT ------------
Event: time 1369641860.582840, type 1 (EV_KEY), code 116 (KEY_POWER), value 1
Event: time 1369641860.582840, -------------- SYN_REPORT ------------
Event: time 1369641860.862840, type 1 (EV_KEY), code 116 (KEY_POWER), value 0
Event: time 1369641860.862840, -------------- SYN_REPORT ------------
Event: time 1369641861.332838, type 1 (EV_KEY), code 116 (KEY_POWER), value 1
Event: time 1369641861.332838, -------------- SYN_REPORT ------------
Event: time 1369641861.592839, type 1 (EV_KEY), code 116 (KEY_POWER), value 0
Event: time 1369641861.592839, -------------- SYN_REPORT ------------ ^C
root at obsa6:~#
END--------
Best regards
Atsushi Yamagata
--- Atsushi Yamagata
cover ARM: kirkwood: improve pinmux configs in Device Tree
Hello,
Quoted 9 lines · yamagata at plathome.co.jp
Dear Mr. Petazzoni
Quoted 2 lines
The last patch finally adds support for the init button of the Plathome OpenBlocks A6 platform.
I have checked the init button worked well with your three patches for linux-3.10-rc3 and 3.9.4.
Tested-by Atsushi Yamagata <[email protected]>
Thanks for your testing!
Thomas
Signature · 4 lines
Thomas Petazzoni, Free Electrons Kernel, drivers, real-time and embedded Linux development, consulting, training and support. http://free-electrons.com
cover ARM: kirkwood: improve pinmux configs in Device Tree
In reply to yamagata at plathome.co.jpAll,
Quoted 7 lines · yamagata at plathome.co.jp
Quoted 2 lines
The last patch finally adds support for the init button of the Plathome OpenBlocks A6 platform.
I have checked the init button worked well with your three patches for linux-3.10-rc3 and 3.9.4.
Tested-by Atsushi Yamagata <[email protected]>
Added the above to the relevant patches, as well as Andrew's Ack's and his Tested-by's on topkick and ts219.
FYI: mvebu/dt has been rebased *after* tags/dt-3.11-2. Actually, I rebased after '0e99b15 arm: mvebu: enable two USB interfaces on the Armada XP GP board'. The important thing is that what was rebased is *not* in arm-soc, nor has a pending PR for arm-soc.
thx,
Jason.