diff options
89 files changed, 3321 insertions, 991 deletions
diff --git a/Documentation/devicetree/bindings/gpio/gpio-poweroff.txt b/Documentation/devicetree/bindings/gpio/gpio-poweroff.txt new file mode 100644 index 000000000000..558cdf3c9abc --- /dev/null +++ b/Documentation/devicetree/bindings/gpio/gpio-poweroff.txt | |||
@@ -0,0 +1,22 @@ | |||
1 | GPIO line that should be set high/low to power off a device | ||
2 | |||
3 | Required properties: | ||
4 | - compatible : should be "gpio-poweroff". | ||
5 | - gpios : The GPIO to set high/low, see "gpios property" in | ||
6 | Documentation/devicetree/bindings/gpio/gpio.txt. If the pin should be | ||
7 | low to power down the board set it to "Active Low", otherwise set | ||
8 | gpio to "Active High". | ||
9 | |||
10 | Optional properties: | ||
11 | - input : Initially configure the GPIO line as an input. Only reconfigure | ||
12 | it to an output when the pm_power_off function is called. If this optional | ||
13 | property is not specified, the GPIO is initialized as an output in its | ||
14 | inactive state. | ||
15 | |||
16 | |||
17 | Examples: | ||
18 | |||
19 | gpio-poweroff { | ||
20 | compatible = "gpio-poweroff"; | ||
21 | gpios = <&gpio 4 0>; /* GPIO 4 Active Low */ | ||
22 | }; | ||
diff --git a/Documentation/devicetree/bindings/gpio/leds-ns2.txt b/Documentation/devicetree/bindings/gpio/leds-ns2.txt new file mode 100644 index 000000000000..aef3aca34d2d --- /dev/null +++ b/Documentation/devicetree/bindings/gpio/leds-ns2.txt | |||
@@ -0,0 +1,26 @@ | |||
1 | Binding for dual-GPIO LED found on Network Space v2 (and parents). | ||
2 | |||
3 | Required properties: | ||
4 | - compatible: "lacie,ns2-leds". | ||
5 | |||
6 | Each LED is represented as a sub-node of the ns2-leds device. | ||
7 | |||
8 | Required sub-node properties: | ||
9 | - cmd-gpio: Command LED GPIO. See OF device-tree GPIO specification. | ||
10 | - slow-gpio: Slow LED GPIO. See OF device-tree GPIO specification. | ||
11 | |||
12 | Optional sub-node properties: | ||
13 | - label: Name for this LED. If omitted, the label is taken from the node name. | ||
14 | - linux,default-trigger: Trigger assigned to the LED. | ||
15 | |||
16 | Example: | ||
17 | |||
18 | ns2-leds { | ||
19 | compatible = "lacie,ns2-leds"; | ||
20 | |||
21 | blue-sata { | ||
22 | label = "ns2:blue:sata"; | ||
23 | slow-gpio = <&gpio0 29 0>; | ||
24 | cmd-gpio = <&gpio0 30 0>; | ||
25 | }; | ||
26 | }; | ||
diff --git a/Documentation/devicetree/bindings/pinctrl/marvell,kirkwood-pinctrl.txt b/Documentation/devicetree/bindings/pinctrl/marvell,kirkwood-pinctrl.txt index 361bccb7ec89..95daf6335c37 100644 --- a/Documentation/devicetree/bindings/pinctrl/marvell,kirkwood-pinctrl.txt +++ b/Documentation/devicetree/bindings/pinctrl/marvell,kirkwood-pinctrl.txt | |||
@@ -7,8 +7,10 @@ Required properties: | |||
7 | - compatible: "marvell,88f6180-pinctrl", | 7 | - compatible: "marvell,88f6180-pinctrl", |
8 | "marvell,88f6190-pinctrl", "marvell,88f6192-pinctrl", | 8 | "marvell,88f6190-pinctrl", "marvell,88f6192-pinctrl", |
9 | "marvell,88f6281-pinctrl", "marvell,88f6282-pinctrl" | 9 | "marvell,88f6281-pinctrl", "marvell,88f6282-pinctrl" |
10 | "marvell,98dx4122-pinctrl" | ||
10 | 11 | ||
11 | This driver supports all kirkwood variants, i.e. 88f6180, 88f619x, and 88f628x. | 12 | This driver supports all kirkwood variants, i.e. 88f6180, 88f619x, and 88f628x. |
13 | It also support the 88f6281-based variant in the 98dx412x Bobcat SoCs. | ||
12 | 14 | ||
13 | Available mpp pins/groups and functions: | 15 | Available mpp pins/groups and functions: |
14 | Note: brackets (x) are not part of the mpp name for marvell,function and given | 16 | Note: brackets (x) are not part of the mpp name for marvell,function and given |
@@ -277,3 +279,40 @@ mpp46 46 gpio, ts(mp10), tdm(fs), lcd(hsync) | |||
277 | mpp47 47 gpio, ts(mp11), tdm(drx), lcd(vsync) | 279 | mpp47 47 gpio, ts(mp11), tdm(drx), lcd(vsync) |
278 | mpp48 48 gpio, ts(mp12), tdm(dtx), lcd(d16) | 280 | mpp48 48 gpio, ts(mp12), tdm(dtx), lcd(d16) |
279 | mpp49 49 gpo, tdm(rx0ql), pex(clkreq), lcd(d17) | 281 | mpp49 49 gpo, tdm(rx0ql), pex(clkreq), lcd(d17) |
282 | |||
283 | * Marvell Bobcat 98dx4122 | ||
284 | |||
285 | name pins functions | ||
286 | ================================================================================ | ||
287 | mpp0 0 gpio, nand(io2), spi(cs) | ||
288 | mpp1 1 gpo, nand(io3), spi(mosi) | ||
289 | mpp2 2 gpo, nand(io4), spi(sck) | ||
290 | mpp3 3 gpo, nand(io5), spi(miso) | ||
291 | mpp4 4 gpio, nand(io6), uart0(rxd) | ||
292 | mpp5 5 gpo, nand(io7), uart0(txd) | ||
293 | mpp6 6 sysrst(out), spi(mosi) | ||
294 | mpp7 7 gpo, pex(rsto), spi(cs) | ||
295 | mpp8 8 gpio, twsi0(sda), uart0(rts), uart1(rts) | ||
296 | mpp9 9 gpio, twsi(sck), uart0(cts), uart1(cts) | ||
297 | mpp10 10 gpo, spi(sck), uart0(txd) | ||
298 | mpp11 11 gpio, spi(miso), uart0(rxd) | ||
299 | mpp13 13 gpio, uart1(txd) | ||
300 | mpp14 14 gpio, uart1(rxd) | ||
301 | mpp15 15 gpio, uart0(rts) | ||
302 | mpp16 16 gpio, uart0(cts) | ||
303 | mpp18 18 gpo, nand(io0) | ||
304 | mpp19 19 gpo, nand(io1) | ||
305 | mpp34 34 gpio | ||
306 | mpp35 35 gpio | ||
307 | mpp36 36 gpio | ||
308 | mpp37 37 gpio | ||
309 | mpp38 38 gpio | ||
310 | mpp39 39 gpio | ||
311 | mpp40 40 gpio | ||
312 | mpp41 41 gpio | ||
313 | mpp42 42 gpio | ||
314 | mpp43 43 gpio | ||
315 | mpp44 44 gpio | ||
316 | mpp45 45 gpio | ||
317 | mpp49 49 gpio | ||
318 | |||
diff --git a/Documentation/devicetree/bindings/usb/ehci-orion.txt b/Documentation/devicetree/bindings/usb/ehci-orion.txt new file mode 100644 index 000000000000..6bc09ec14c4d --- /dev/null +++ b/Documentation/devicetree/bindings/usb/ehci-orion.txt | |||
@@ -0,0 +1,15 @@ | |||
1 | * EHCI controller, Orion Marvell variants | ||
2 | |||
3 | Required properties: | ||
4 | - compatible: must be "marvell,orion-ehci" | ||
5 | - reg: physical base address of the controller and length of memory mapped | ||
6 | region. | ||
7 | - interrupts: The EHCI interrupt | ||
8 | |||
9 | Example: | ||
10 | |||
11 | ehci@50000 { | ||
12 | compatible = "marvell,orion-ehci"; | ||
13 | reg = <0x50000 0x1000>; | ||
14 | interrupts = <19>; | ||
15 | }; | ||
diff --git a/Documentation/pinctrl.txt b/Documentation/pinctrl.txt index 3b4ee5328868..a1cd2f9428d7 100644 --- a/Documentation/pinctrl.txt +++ b/Documentation/pinctrl.txt | |||
@@ -1193,4 +1193,6 @@ foo_switch() | |||
1193 | ... | 1193 | ... |
1194 | } | 1194 | } |
1195 | 1195 | ||
1196 | The above has to be done from process context. | 1196 | The above has to be done from process context. The reservation of the pins |
1197 | will be done when the state is activated, so in effect one specific pin | ||
1198 | can be used by different functions at different times on a running system. | ||
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index ade7e924bef5..3cf5742a23ca 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig | |||
@@ -536,6 +536,8 @@ config ARCH_DOVE | |||
536 | select CPU_V7 | 536 | select CPU_V7 |
537 | select GENERIC_CLOCKEVENTS | 537 | select GENERIC_CLOCKEVENTS |
538 | select MIGHT_HAVE_PCI | 538 | select MIGHT_HAVE_PCI |
539 | select PINCTRL | ||
540 | select PINCTRL_DOVE | ||
539 | select PLAT_ORION_LEGACY | 541 | select PLAT_ORION_LEGACY |
540 | select USB_ARCH_HAS_EHCI | 542 | select USB_ARCH_HAS_EHCI |
541 | help | 543 | help |
@@ -547,6 +549,8 @@ config ARCH_KIRKWOOD | |||
547 | select CPU_FEROCEON | 549 | select CPU_FEROCEON |
548 | select GENERIC_CLOCKEVENTS | 550 | select GENERIC_CLOCKEVENTS |
549 | select PCI | 551 | select PCI |
552 | select PINCTRL | ||
553 | select PINCTRL_KIRKWOOD | ||
550 | select PLAT_ORION_LEGACY | 554 | select PLAT_ORION_LEGACY |
551 | help | 555 | help |
552 | Support for the following Marvell Kirkwood series SoCs: | 556 | Support for the following Marvell Kirkwood series SoCs: |
diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile index f37cf9fa5fa0..94561b500429 100644 --- a/arch/arm/boot/dts/Makefile +++ b/arch/arm/boot/dts/Makefile | |||
@@ -36,11 +36,20 @@ dtb-$(CONFIG_ARCH_KIRKWOOD) += kirkwood-dns320.dtb \ | |||
36 | kirkwood-ib62x0.dtb \ | 36 | kirkwood-ib62x0.dtb \ |
37 | kirkwood-iconnect.dtb \ | 37 | kirkwood-iconnect.dtb \ |
38 | kirkwood-iomega_ix2_200.dtb \ | 38 | kirkwood-iomega_ix2_200.dtb \ |
39 | kirkwood-is2.dtb \ | ||
39 | kirkwood-km_kirkwood.dtb \ | 40 | kirkwood-km_kirkwood.dtb \ |
40 | kirkwood-lschlv2.dtb \ | 41 | kirkwood-lschlv2.dtb \ |
41 | kirkwood-lsxhl.dtb \ | 42 | kirkwood-lsxhl.dtb \ |
43 | kirkwood-mplcec4.dtb \ | ||
44 | kirkwood-ns2.dtb \ | ||
45 | kirkwood-ns2lite.dtb \ | ||
46 | kirkwood-ns2max.dtb \ | ||
47 | kirkwood-ns2mini.dtb \ | ||
48 | kirkwood-nsa310.dtb \ | ||
49 | kirkwood-topkick.dtb \ | ||
42 | kirkwood-ts219-6281.dtb \ | 50 | kirkwood-ts219-6281.dtb \ |
43 | kirkwood-ts219-6282.dtb | 51 | kirkwood-ts219-6282.dtb \ |
52 | kirkwood-openblocks_a6.dtb | ||
44 | dtb-$(CONFIG_ARCH_MSM) += msm8660-surf.dtb \ | 53 | dtb-$(CONFIG_ARCH_MSM) += msm8660-surf.dtb \ |
45 | msm8960-cdp.dtb | 54 | msm8960-cdp.dtb |
46 | dtb-$(CONFIG_ARCH_MVEBU) += armada-370-db.dtb \ | 55 | dtb-$(CONFIG_ARCH_MVEBU) += armada-370-db.dtb \ |
@@ -73,6 +82,7 @@ dtb-$(CONFIG_ARCH_OMAP2PLUS) += omap2420-h4.dtb \ | |||
73 | omap5-evm.dtb \ | 82 | omap5-evm.dtb \ |
74 | am335x-evm.dtb \ | 83 | am335x-evm.dtb \ |
75 | am335x-bone.dtb | 84 | am335x-bone.dtb |
85 | dtb-$(CONFIG_ARCH_ORION5X) += orion5x-lacie-ethernet-disk-mini-v2.dtb | ||
76 | dtb-$(CONFIG_ARCH_PRIMA2) += prima2-evb.dtb | 86 | dtb-$(CONFIG_ARCH_PRIMA2) += prima2-evb.dtb |
77 | dtb-$(CONFIG_ARCH_U8500) += snowball.dtb | 87 | dtb-$(CONFIG_ARCH_U8500) += snowball.dtb |
78 | dtb-$(CONFIG_ARCH_SHMOBILE) += emev2-kzm9d.dtb \ | 88 | dtb-$(CONFIG_ARCH_SHMOBILE) += emev2-kzm9d.dtb \ |
diff --git a/arch/arm/boot/dts/dove-cubox.dts b/arch/arm/boot/dts/dove-cubox.dts index 0adbd5a38095..fed7d3f9f431 100644 --- a/arch/arm/boot/dts/dove-cubox.dts +++ b/arch/arm/boot/dts/dove-cubox.dts | |||
@@ -40,3 +40,13 @@ | |||
40 | reg = <0>; | 40 | reg = <0>; |
41 | }; | 41 | }; |
42 | }; | 42 | }; |
43 | |||
44 | &pinctrl { | ||
45 | pinctrl-0 = <&pmx_gpio_18>; | ||
46 | pinctrl-names = "default"; | ||
47 | |||
48 | pmx_gpio_18: pmx-gpio-18 { | ||
49 | marvell,pins = "mpp18"; | ||
50 | marvell,function = "gpio"; | ||
51 | }; | ||
52 | }; | ||
diff --git a/arch/arm/boot/dts/dove.dtsi b/arch/arm/boot/dts/dove.dtsi index 5a00022383e7..61f391412a5a 100644 --- a/arch/arm/boot/dts/dove.dtsi +++ b/arch/arm/boot/dts/dove.dtsi | |||
@@ -4,6 +4,12 @@ | |||
4 | compatible = "marvell,dove"; | 4 | compatible = "marvell,dove"; |
5 | model = "Marvell Armada 88AP510 SoC"; | 5 | model = "Marvell Armada 88AP510 SoC"; |
6 | 6 | ||
7 | aliases { | ||
8 | gpio0 = &gpio0; | ||
9 | gpio1 = &gpio1; | ||
10 | gpio2 = &gpio2; | ||
11 | }; | ||
12 | |||
7 | soc@f1000000 { | 13 | soc@f1000000 { |
8 | compatible = "simple-bus"; | 14 | compatible = "simple-bus"; |
9 | #address-cells = <1>; | 15 | #address-cells = <1>; |
@@ -72,7 +78,8 @@ | |||
72 | #gpio-cells = <2>; | 78 | #gpio-cells = <2>; |
73 | gpio-controller; | 79 | gpio-controller; |
74 | reg = <0xd0400 0x20>; | 80 | reg = <0xd0400 0x20>; |
75 | ngpio = <32>; | 81 | ngpios = <32>; |
82 | interrupt-controller; | ||
76 | interrupts = <12>, <13>, <14>, <60>; | 83 | interrupts = <12>, <13>, <14>, <60>; |
77 | }; | 84 | }; |
78 | 85 | ||
@@ -81,7 +88,8 @@ | |||
81 | #gpio-cells = <2>; | 88 | #gpio-cells = <2>; |
82 | gpio-controller; | 89 | gpio-controller; |
83 | reg = <0xd0420 0x20>; | 90 | reg = <0xd0420 0x20>; |
84 | ngpio = <32>; | 91 | ngpios = <32>; |
92 | interrupt-controller; | ||
85 | interrupts = <61>; | 93 | interrupts = <61>; |
86 | }; | 94 | }; |
87 | 95 | ||
@@ -90,7 +98,12 @@ | |||
90 | #gpio-cells = <2>; | 98 | #gpio-cells = <2>; |
91 | gpio-controller; | 99 | gpio-controller; |
92 | reg = <0xe8400 0x0c>; | 100 | reg = <0xe8400 0x0c>; |
93 | ngpio = <8>; | 101 | ngpios = <8>; |
102 | }; | ||
103 | |||
104 | pinctrl: pinctrl@d0200 { | ||
105 | compatible = "marvell,dove-pinctrl"; | ||
106 | reg = <0xd0200 0x10>; | ||
94 | }; | 107 | }; |
95 | 108 | ||
96 | spi0: spi@10600 { | 109 | spi0: spi@10600 { |
diff --git a/arch/arm/boot/dts/kirkwood-6281.dtsi b/arch/arm/boot/dts/kirkwood-6281.dtsi new file mode 100644 index 000000000000..d6c9d65cbaeb --- /dev/null +++ b/arch/arm/boot/dts/kirkwood-6281.dtsi | |||
@@ -0,0 +1,44 @@ | |||
1 | / { | ||
2 | ocp@f1000000 { | ||
3 | pinctrl: pinctrl@10000 { | ||
4 | compatible = "marvell,88f6281-pinctrl"; | ||
5 | reg = <0x10000 0x20>; | ||
6 | |||
7 | pmx_nand: pmx-nand { | ||
8 | marvell,pins = "mpp0", "mpp1", "mpp2", "mpp3", | ||
9 | "mpp4", "mpp5", "mpp18", | ||
10 | "mpp19"; | ||
11 | marvell,function = "nand"; | ||
12 | }; | ||
13 | pmx_sata0: pmx-sata0 { | ||
14 | marvell,pins = "mpp5", "mpp21", "mpp23"; | ||
15 | marvell,function = "sata0"; | ||
16 | }; | ||
17 | pmx_sata1: pmx-sata1 { | ||
18 | marvell,pins = "mpp4", "mpp20", "mpp22"; | ||
19 | marvell,function = "sata1"; | ||
20 | }; | ||
21 | pmx_spi: pmx-spi { | ||
22 | marvell,pins = "mpp0", "mpp1", "mpp2", "mpp3"; | ||
23 | marvell,function = "spi"; | ||
24 | }; | ||
25 | pmx_twsi0: pmx-twsi0 { | ||
26 | marvell,pins = "mpp8", "mpp9"; | ||
27 | marvell,function = "twsi0"; | ||
28 | }; | ||
29 | pmx_uart0: pmx-uart0 { | ||
30 | marvell,pins = "mpp10", "mpp11"; | ||
31 | marvell,function = "uart0"; | ||
32 | }; | ||
33 | pmx_uart1: pmx-uart1 { | ||
34 | marvell,pins = "mpp13", "mpp14"; | ||
35 | marvell,function = "uart1"; | ||
36 | }; | ||
37 | pmx_sdio: pmx-sdio { | ||
38 | marvell,pins = "mpp12", "mpp13", "mpp14", | ||
39 | "mpp15", "mpp16", "mpp17"; | ||
40 | marvell,function = "sdio"; | ||
41 | }; | ||
42 | }; | ||
43 | }; | ||
44 | }; | ||
diff --git a/arch/arm/boot/dts/kirkwood-6282.dtsi b/arch/arm/boot/dts/kirkwood-6282.dtsi new file mode 100644 index 000000000000..9ae2004d5675 --- /dev/null +++ b/arch/arm/boot/dts/kirkwood-6282.dtsi | |||
@@ -0,0 +1,45 @@ | |||
1 | / { | ||
2 | ocp@f1000000 { | ||
3 | |||
4 | pinctrl: pinctrl@10000 { | ||
5 | compatible = "marvell,88f6282-pinctrl"; | ||
6 | reg = <0x10000 0x20>; | ||
7 | |||
8 | pmx_sata0: pmx-sata0 { | ||
9 | marvell,pins = "mpp5", "mpp21", "mpp23"; | ||
10 | marvell,function = "sata0"; | ||
11 | }; | ||
12 | pmx_sata1: pmx-sata1 { | ||
13 | marvell,pins = "mpp4", "mpp20", "mpp22"; | ||
14 | marvell,function = "sata1"; | ||
15 | }; | ||
16 | pmx_spi: pmx-spi { | ||
17 | marvell,pins = "mpp0", "mpp1", "mpp2", "mpp3"; | ||
18 | marvell,function = "spi"; | ||
19 | }; | ||
20 | pmx_twsi0: pmx-twsi0 { | ||
21 | marvell,pins = "mpp8", "mpp9"; | ||
22 | marvell,function = "twsi0"; | ||
23 | }; | ||
24 | pmx_uart0: pmx-uart0 { | ||
25 | marvell,pins = "mpp10", "mpp11"; | ||
26 | marvell,function = "uart0"; | ||
27 | }; | ||
28 | |||
29 | pmx_uart1: pmx-uart1 { | ||
30 | marvell,pins = "mpp13", "mpp14"; | ||
31 | marvell,function = "uart1"; | ||
32 | }; | ||
33 | }; | ||
34 | |||
35 | i2c@11100 { | ||
36 | compatible = "marvell,mv64xxx-i2c"; | ||
37 | reg = <0x11100 0x20>; | ||
38 | #address-cells = <1>; | ||
39 | #size-cells = <0>; | ||
40 | interrupts = <32>; | ||
41 | clock-frequency = <100000>; | ||
42 | status = "disabled"; | ||
43 | }; | ||
44 | }; | ||
45 | }; | ||
diff --git a/arch/arm/boot/dts/kirkwood-98dx4122.dtsi b/arch/arm/boot/dts/kirkwood-98dx4122.dtsi new file mode 100644 index 000000000000..3271e4c8ea07 --- /dev/null +++ b/arch/arm/boot/dts/kirkwood-98dx4122.dtsi | |||
@@ -0,0 +1,31 @@ | |||
1 | / { | ||
2 | ocp@f1000000 { | ||
3 | pinctrl: pinctrl@10000 { | ||
4 | compatible = "marvell,98dx4122-pinctrl"; | ||
5 | reg = <0x10000 0x20>; | ||
6 | |||
7 | pmx_nand: pmx-nand { | ||
8 | marvell,pins = "mpp0", "mpp1", "mpp2", "mpp3", | ||
9 | "mpp4", "mpp5", "mpp18", | ||
10 | "mpp19"; | ||
11 | marvell,function = "nand"; | ||
12 | }; | ||
13 | pmx_spi: pmx-spi { | ||
14 | marvell,pins = "mpp0", "mpp1", "mpp2", "mpp3"; | ||
15 | marvell,function = "spi"; | ||
16 | }; | ||
17 | pmx_twsi0: pmx-twsi0 { | ||
18 | marvell,pins = "mpp8", "mpp9"; | ||
19 | marvell,function = "twsi0"; | ||
20 | }; | ||
21 | pmx_uart0: pmx-uart0 { | ||
22 | marvell,pins = "mpp10", "mpp11"; | ||
23 | marvell,function = "uart0"; | ||
24 | }; | ||
25 | pmx_uart1: pmx-uart1 { | ||
26 | marvell,pins = "mpp13", "mpp14"; | ||
27 | marvell,function = "uart1"; | ||
28 | }; | ||
29 | }; | ||
30 | }; | ||
31 | }; | ||
diff --git a/arch/arm/boot/dts/kirkwood-dnskw.dtsi b/arch/arm/boot/dts/kirkwood-dnskw.dtsi index 9b32d0272825..6875ac00c174 100644 --- a/arch/arm/boot/dts/kirkwood-dnskw.dtsi +++ b/arch/arm/boot/dts/kirkwood-dnskw.dtsi | |||
@@ -1,4 +1,5 @@ | |||
1 | /include/ "kirkwood.dtsi" | 1 | /include/ "kirkwood.dtsi" |
2 | /include/ "kirkwood-6281.dtsi" | ||
2 | 3 | ||
3 | / { | 4 | / { |
4 | model = "D-Link DNS NASes (kirkwood-based)"; | 5 | model = "D-Link DNS NASes (kirkwood-based)"; |
@@ -35,7 +36,116 @@ | |||
35 | 6000 2>; | 36 | 6000 2>; |
36 | }; | 37 | }; |
37 | 38 | ||
39 | gpio_poweroff { | ||
40 | compatible = "gpio-poweroff"; | ||
41 | gpios = <&gpio1 4 0>; | ||
42 | }; | ||
43 | |||
38 | ocp@f1000000 { | 44 | ocp@f1000000 { |
45 | pinctrl: pinctrl@10000 { | ||
46 | |||
47 | pinctrl-0 = < &pmx_nand &pmx_uart1 | ||
48 | &pmx_sata0 &pmx_sata1 | ||
49 | &pmx_led_power | ||
50 | &pmx_led_red_right_hdd | ||
51 | &pmx_led_red_left_hdd | ||
52 | &pmx_led_red_usb_325 | ||
53 | &pmx_button_power | ||
54 | &pmx_led_red_usb_320 | ||
55 | &pmx_power_off &pmx_power_back_on | ||
56 | &pmx_power_sata0 &pmx_power_sata1 | ||
57 | &pmx_present_sata0 &pmx_present_sata1 | ||
58 | &pmx_led_white_usb &pmx_fan_tacho | ||
59 | &pmx_fan_high_speed &pmx_fan_low_speed | ||
60 | &pmx_button_unmount &pmx_button_reset | ||
61 | &pmx_temp_alarm >; | ||
62 | pinctrl-names = "default"; | ||
63 | |||
64 | pmx_sata0: pmx-sata0 { | ||
65 | marvell,pins = "mpp20"; | ||
66 | marvell,function = "sata1"; | ||
67 | }; | ||
68 | pmx_sata1: pmx-sata1 { | ||
69 | marvell,pins = "mpp21"; | ||
70 | marvell,function = "sata0"; | ||
71 | }; | ||
72 | pmx_led_power: pmx-led-power { | ||
73 | marvell,pins = "mpp26"; | ||
74 | marvell,function = "gpio"; | ||
75 | }; | ||
76 | pmx_led_red_right_hdd: pmx-led-red-right-hdd { | ||
77 | marvell,pins = "mpp27"; | ||
78 | marvell,function = "gpio"; | ||
79 | }; | ||
80 | pmx_led_red_left_hdd: pmx-led-red-left-hdd { | ||
81 | marvell,pins = "mpp28"; | ||
82 | marvell,function = "gpio"; | ||
83 | }; | ||
84 | pmx_led_red_usb_325: pmx-led-red-usb-325 { | ||
85 | marvell,pins = "mpp29"; | ||
86 | marvell,function = "gpio"; | ||
87 | }; | ||
88 | pmx_button_power: pmx-button-power { | ||
89 | marvell,pins = "mpp34"; | ||
90 | marvell,function = "gpio"; | ||
91 | }; | ||
92 | pmx_led_red_usb_320: pmx-led-red-usb-320 { | ||
93 | marvell,pins = "mpp35"; | ||
94 | marvell,function = "gpio"; | ||
95 | }; | ||
96 | pmx_power_off: pmx-power-off { | ||
97 | marvell,pins = "mpp36"; | ||
98 | marvell,function = "gpio"; | ||
99 | }; | ||
100 | pmx_power_back_on: pmx-power-back-on { | ||
101 | marvell,pins = "mpp37"; | ||
102 | marvell,function = "gpio"; | ||
103 | }; | ||
104 | pmx_power_sata0: pmx-power-sata0 { | ||
105 | marvell,pins = "mpp39"; | ||
106 | marvell,function = "gpio"; | ||
107 | }; | ||
108 | pmx_power_sata1: pmx-power-sata1 { | ||
109 | marvell,pins = "mpp40"; | ||
110 | marvell,function = "gpio"; | ||
111 | }; | ||
112 | pmx_present_sata0: pmx-present-sata0 { | ||
113 | marvell,pins = "mpp41"; | ||
114 | marvell,function = "gpio"; | ||
115 | }; | ||
116 | pmx_present_sata1: pmx-present-sata1 { | ||
117 | marvell,pins = "mpp42"; | ||
118 | marvell,function = "gpio"; | ||
119 | }; | ||
120 | pmx_led_white_usb: pmx-led-white-usb { | ||
121 | marvell,pins = "mpp43"; | ||
122 | marvell,function = "gpio"; | ||
123 | }; | ||
124 | pmx_fan_tacho: pmx-fan-tacho { | ||
125 | marvell,pins = "mpp44"; | ||
126 | marvell,function = "gpio"; | ||
127 | }; | ||
128 | pmx_fan_high_speed: pmx-fan-high-speed { | ||
129 | marvell,pins = "mpp45"; | ||
130 | marvell,function = "gpio"; | ||
131 | }; | ||
132 | pmx_fan_low_speed: pmx-fan-low-speed { | ||
133 | marvell,pins = "mpp46"; | ||
134 | marvell,function = "gpio"; | ||
135 | }; | ||
136 | pmx_button_unmount: pmx-button-unmount { | ||
137 | marvell,pins = "mpp47"; | ||
138 | marvell,function = "gpio"; | ||
139 | }; | ||
140 | pmx_button_reset: pmx-button-reset { | ||
141 | marvell,pins = "mpp48"; | ||
142 | marvell,function = "gpio"; | ||
143 | }; | ||
144 | pmx_temp_alarm: pmx-temp-alarm { | ||
145 | marvell,pins = "mpp49"; | ||
146 | marvell,function = "gpio"; | ||
147 | }; | ||
148 | }; | ||
39 | sata@80000 { | 149 | sata@80000 { |
40 | status = "okay"; | 150 | status = "okay"; |
41 | nr-ports = <2>; | 151 | nr-ports = <2>; |
@@ -43,6 +153,7 @@ | |||
43 | 153 | ||
44 | nand@3000000 { | 154 | nand@3000000 { |
45 | status = "okay"; | 155 | status = "okay"; |
156 | chip-delay = <35>; | ||
46 | 157 | ||
47 | partition@0 { | 158 | partition@0 { |
48 | label = "u-boot"; | 159 | label = "u-boot"; |
@@ -76,4 +187,33 @@ | |||
76 | }; | 187 | }; |
77 | }; | 188 | }; |
78 | }; | 189 | }; |
190 | |||
191 | regulators { | ||
192 | compatible = "simple-bus"; | ||
193 | #address-cells = <1>; | ||
194 | #size-cells = <0>; | ||
195 | |||
196 | sata0_power: regulator@1 { | ||
197 | compatible = "regulator-fixed"; | ||
198 | reg = <1>; | ||
199 | regulator-name = "SATA0 Power"; | ||
200 | regulator-min-microvolt = <5000000>; | ||
201 | regulator-max-microvolt = <5000000>; | ||
202 | enable-active-high; | ||
203 | regulator-always-on; | ||
204 | regulator-boot-on; | ||
205 | gpio = <&gpio1 7 0>; | ||
206 | }; | ||
207 | sata1_power: regulator@2 { | ||
208 | compatible = "regulator-fixed"; | ||
209 | reg = <2>; | ||
210 | regulator-name = "SATA1 Power"; | ||
211 | regulator-min-microvolt = <5000000>; | ||
212 | regulator-max-microvolt = <5000000>; | ||
213 | enable-active-high; | ||
214 | regulator-always-on; | ||
215 | regulator-boot-on; | ||
216 | gpio = <&gpio1 8 0>; | ||
217 | }; | ||
218 | }; | ||
79 | }; | 219 | }; |
diff --git a/arch/arm/boot/dts/kirkwood-dockstar.dts b/arch/arm/boot/dts/kirkwood-dockstar.dts index 08a582414b88..2e3dd34e21a5 100644 --- a/arch/arm/boot/dts/kirkwood-dockstar.dts +++ b/arch/arm/boot/dts/kirkwood-dockstar.dts | |||
@@ -1,6 +1,7 @@ | |||
1 | /dts-v1/; | 1 | /dts-v1/; |
2 | 2 | ||
3 | /include/ "kirkwood.dtsi" | 3 | /include/ "kirkwood.dtsi" |
4 | /include/ "kirkwood-6281.dtsi" | ||
4 | 5 | ||
5 | / { | 6 | / { |
6 | model = "Seagate FreeAgent Dockstar"; | 7 | model = "Seagate FreeAgent Dockstar"; |
@@ -16,6 +17,25 @@ | |||
16 | }; | 17 | }; |
17 | 18 | ||
18 | ocp@f1000000 { | 19 | ocp@f1000000 { |
20 | pinctrl: pinctrl@10000 { | ||
21 | |||
22 | pinctrl-0 = < &pmx_usb_power_enable | ||
23 | &pmx_led_green &pmx_led_orange >; | ||
24 | pinctrl-names = "default"; | ||
25 | |||
26 | pmx_usb_power_enable: pmx-usb-power-enable { | ||
27 | marvell,pins = "mpp29"; | ||
28 | marvell,function = "gpio"; | ||
29 | }; | ||
30 | pmx_led_green: pmx-led-green { | ||
31 | marvell,pins = "mpp46"; | ||
32 | marvell,function = "gpio"; | ||
33 | }; | ||
34 | pmx_led_orange: pmx-led-orange { | ||
35 | marvell,pins = "mpp47"; | ||
36 | marvell,function = "gpio"; | ||
37 | }; | ||
38 | }; | ||
19 | serial@12000 { | 39 | serial@12000 { |
20 | clock-frequency = <200000000>; | 40 | clock-frequency = <200000000>; |
21 | status = "ok"; | 41 | status = "ok"; |
@@ -54,4 +74,21 @@ | |||
54 | gpios = <&gpio1 15 1>; | 74 | gpios = <&gpio1 15 1>; |
55 | }; | 75 | }; |
56 | }; | 76 | }; |
77 | regulators { | ||
78 | compatible = "simple-bus"; | ||
79 | #address-cells = <1>; | ||
80 | #size-cells = <0>; | ||
81 | |||
82 | usb_power: regulator@1 { | ||
83 | compatible = "regulator-fixed"; | ||
84 | reg = <1>; | ||
85 | regulator-name = "USB Power"; | ||
86 | regulator-min-microvolt = <5000000>; | ||
87 | regulator-max-microvolt = <5000000>; | ||
88 | enable-active-high; | ||
89 | regulator-always-on; | ||
90 | regulator-boot-on; | ||
91 | gpio = <&gpio0 29 0>; | ||
92 | }; | ||
93 | }; | ||
57 | }; | 94 | }; |
diff --git a/arch/arm/boot/dts/kirkwood-dreamplug.dts b/arch/arm/boot/dts/kirkwood-dreamplug.dts index 26e281fbf6bc..f2d386c95b07 100644 --- a/arch/arm/boot/dts/kirkwood-dreamplug.dts +++ b/arch/arm/boot/dts/kirkwood-dreamplug.dts | |||
@@ -1,6 +1,7 @@ | |||
1 | /dts-v1/; | 1 | /dts-v1/; |
2 | 2 | ||
3 | /include/ "kirkwood.dtsi" | 3 | /include/ "kirkwood.dtsi" |
4 | /include/ "kirkwood-6281.dtsi" | ||
4 | 5 | ||
5 | / { | 6 | / { |
6 | model = "Globalscale Technologies Dreamplug"; | 7 | model = "Globalscale Technologies Dreamplug"; |
@@ -16,6 +17,26 @@ | |||
16 | }; | 17 | }; |
17 | 18 | ||
18 | ocp@f1000000 { | 19 | ocp@f1000000 { |
20 | pinctrl: pinctrl@10000 { | ||
21 | |||
22 | pinctrl-0 = < &pmx_spi | ||
23 | &pmx_led_bluetooth &pmx_led_wifi | ||
24 | &pmx_led_wifi_ap >; | ||
25 | pinctrl-names = "default"; | ||
26 | |||
27 | pmx_led_bluetooth: pmx-led-bluetooth { | ||
28 | marvell,pins = "mpp47"; | ||
29 | marvell,function = "gpio"; | ||
30 | }; | ||
31 | pmx_led_wifi: pmx-led-wifi { | ||
32 | marvell,pins = "mpp48"; | ||
33 | marvell,function = "gpio"; | ||
34 | }; | ||
35 | pmx_led_wifi_ap: pmx-led-wifi-ap { | ||
36 | marvell,pins = "mpp49"; | ||
37 | marvell,function = "gpio"; | ||
38 | }; | ||
39 | }; | ||
19 | serial@12000 { | 40 | serial@12000 { |
20 | clock-frequency = <200000000>; | 41 | clock-frequency = <200000000>; |
21 | status = "ok"; | 42 | status = "ok"; |
diff --git a/arch/arm/boot/dts/kirkwood-goflexnet.dts b/arch/arm/boot/dts/kirkwood-goflexnet.dts index 7c8238fbb6f9..1b133e0c566e 100644 --- a/arch/arm/boot/dts/kirkwood-goflexnet.dts +++ b/arch/arm/boot/dts/kirkwood-goflexnet.dts | |||
@@ -1,6 +1,7 @@ | |||
1 | /dts-v1/; | 1 | /dts-v1/; |
2 | 2 | ||
3 | /include/ "kirkwood.dtsi" | 3 | /include/ "kirkwood.dtsi" |
4 | /include/ "kirkwood-6281.dtsi" | ||
4 | 5 | ||
5 | / { | 6 | / { |
6 | model = "Seagate GoFlex Net"; | 7 | model = "Seagate GoFlex Net"; |
@@ -16,6 +17,61 @@ | |||
16 | }; | 17 | }; |
17 | 18 | ||
18 | ocp@f1000000 { | 19 | ocp@f1000000 { |
20 | pinctrl: pinctrl@10000 { | ||
21 | |||
22 | pinctrl-0 = < &pmx_usb_power_enable &pmx_led_orange | ||
23 | &pmx_led_left_cap_0 &pmx_led_left_cap_1 | ||
24 | &pmx_led_left_cap_2 &pmx_led_left_cap_3 | ||
25 | &pmx_led_right_cap_0 &pmx_led_right_cap_1 | ||
26 | &pmx_led_right_cap_2 &pmx_led_right_cap_3 | ||
27 | >; | ||
28 | pinctrl-names = "default"; | ||
29 | |||
30 | pmx_usb_power_enable: pmx-usb-power-enable { | ||
31 | marvell,pins = "mpp29"; | ||
32 | marvell,function = "gpio"; | ||
33 | }; | ||
34 | pmx_led_right_cap_0: pmx-led_right_cap_0 { | ||
35 | marvell,pins = "mpp38"; | ||
36 | marvell,function = "gpio"; | ||
37 | }; | ||
38 | pmx_led_right_cap_1: pmx-led_right_cap_1 { | ||
39 | marvell,pins = "mpp39"; | ||
40 | marvell,function = "gpio"; | ||
41 | }; | ||
42 | pmx_led_right_cap_2: pmx-led_right_cap_2 { | ||
43 | marvell,pins = "mpp40"; | ||
44 | marvell,function = "gpio"; | ||
45 | }; | ||
46 | pmx_led_right_cap_3: pmx-led_right_cap_3 { | ||
47 | marvell,pins = "mpp41"; | ||
48 | marvell,function = "gpio"; | ||
49 | }; | ||
50 | pmx_led_left_cap_0: pmx-led_left_cap_0 { | ||
51 | marvell,pins = "mpp42"; | ||
52 | marvell,function = "gpio"; | ||
53 | }; | ||
54 | pmx_led_left_cap_1: pmx-led_left_cap_1 { | ||
55 | marvell,pins = "mpp43"; | ||
56 | marvell,function = "gpio"; | ||
57 | }; | ||
58 | pmx_led_left_cap_2: pmx-led_left_cap_2 { | ||
59 | marvell,pins = "mpp44"; | ||
60 | marvell,function = "gpio"; | ||
61 | }; | ||
62 | pmx_led_left_cap_3: pmx-led_left_cap_3 { | ||
63 | marvell,pins = "mpp45"; | ||
64 | marvell,function = "gpio"; | ||
65 | }; | ||
66 | pmx_led_green: pmx-led_green { | ||
67 | marvell,pins = "mpp46"; | ||
68 | marvell,function = "gpio"; | ||
69 | }; | ||
70 | pmx_led_orange: pmx-led_orange { | ||
71 | marvell,pins = "mpp47"; | ||
72 | marvell,function = "gpio"; | ||
73 | }; | ||
74 | }; | ||
19 | serial@12000 { | 75 | serial@12000 { |
20 | clock-frequency = <200000000>; | 76 | clock-frequency = <200000000>; |
21 | status = "ok"; | 77 | status = "ok"; |
@@ -96,4 +152,21 @@ | |||
96 | gpios = <&gpio1 9 0>; | 152 | gpios = <&gpio1 9 0>; |
97 | }; | 153 | }; |
98 | }; | 154 | }; |
155 | regulators { | ||
156 | compatible = "simple-bus"; | ||
157 | #address-cells = <1>; | ||
158 | #size-cells = <0>; | ||
159 | |||
160 | usb_power: regulator@1 { | ||
161 | compatible = "regulator-fixed"; | ||
162 | reg = <1>; | ||
163 | regulator-name = "USB Power"; | ||
164 | regulator-min-microvolt = <5000000>; | ||
165 | regulator-max-microvolt = <5000000>; | ||
166 | enable-active-high; | ||
167 | regulator-always-on; | ||
168 | regulator-boot-on; | ||
169 | gpio = <&gpio0 29 0>; | ||
170 | }; | ||
171 | }; | ||
99 | }; | 172 | }; |
diff --git a/arch/arm/boot/dts/kirkwood-ib62x0.dts b/arch/arm/boot/dts/kirkwood-ib62x0.dts index 66794ed75ff1..71902da33d63 100644 --- a/arch/arm/boot/dts/kirkwood-ib62x0.dts +++ b/arch/arm/boot/dts/kirkwood-ib62x0.dts | |||
@@ -1,6 +1,7 @@ | |||
1 | /dts-v1/; | 1 | /dts-v1/; |
2 | 2 | ||
3 | /include/ "kirkwood.dtsi" | 3 | /include/ "kirkwood.dtsi" |
4 | /include/ "kirkwood-6281.dtsi" | ||
4 | 5 | ||
5 | / { | 6 | / { |
6 | model = "RaidSonic ICY BOX IB-NAS62x0 (Rev B)"; | 7 | model = "RaidSonic ICY BOX IB-NAS62x0 (Rev B)"; |
@@ -16,6 +17,39 @@ | |||
16 | }; | 17 | }; |
17 | 18 | ||
18 | ocp@f1000000 { | 19 | ocp@f1000000 { |
20 | pinctrl: pinctrl@10000 { | ||
21 | |||
22 | pinctrl-0 = < &pmx_nand | ||
23 | &pmx_led_os_red &pmx_power_off | ||
24 | &pmx_led_os_green &pmx_led_usb_transfer | ||
25 | &pmx_button_reset &pmx_button_usb_copy >; | ||
26 | pinctrl-names = "default"; | ||
27 | |||
28 | pmx_led_os_red: pmx-led-os-red { | ||
29 | marvell,pins = "mpp22"; | ||
30 | marvell,function = "gpio"; | ||
31 | }; | ||
32 | pmx_power_off: pmx-power-off { | ||
33 | marvell,pins = "mpp24"; | ||
34 | marvell,function = "gpio"; | ||
35 | }; | ||
36 | pmx_led_os_green: pmx-led-os-green { | ||
37 | marvell,pins = "mpp25"; | ||
38 | marvell,function = "gpio"; | ||
39 | }; | ||
40 | pmx_led_usb_transfer: pmx-led-usb-transfer { | ||
41 | marvell,pins = "mpp27"; | ||
42 | marvell,function = "gpio"; | ||
43 | }; | ||
44 | pmx_button_reset: pmx-button-reset { | ||
45 | marvell,pins = "mpp28"; | ||
46 | marvell,function = "gpio"; | ||
47 | }; | ||
48 | pmx_button_usb_copy: pmx-button-usb-copy { | ||
49 | marvell,pins = "mpp29"; | ||
50 | marvell,function = "gpio"; | ||
51 | }; | ||
52 | }; | ||
19 | serial@12000 { | 53 | serial@12000 { |
20 | clock-frequency = <200000000>; | 54 | clock-frequency = <200000000>; |
21 | status = "okay"; | 55 | status = "okay"; |
@@ -79,4 +113,10 @@ | |||
79 | gpios = <&gpio0 27 0>; | 113 | gpios = <&gpio0 27 0>; |
80 | }; | 114 | }; |
81 | }; | 115 | }; |
116 | gpio_poweroff { | ||
117 | compatible = "gpio-poweroff"; | ||
118 | gpios = <&gpio0 24 0>; | ||
119 | }; | ||
120 | |||
121 | |||
82 | }; | 122 | }; |
diff --git a/arch/arm/boot/dts/kirkwood-iconnect.dts b/arch/arm/boot/dts/kirkwood-iconnect.dts index d97cd9d4753e..504f16be8b54 100644 --- a/arch/arm/boot/dts/kirkwood-iconnect.dts +++ b/arch/arm/boot/dts/kirkwood-iconnect.dts | |||
@@ -1,6 +1,7 @@ | |||
1 | /dts-v1/; | 1 | /dts-v1/; |
2 | 2 | ||
3 | /include/ "kirkwood.dtsi" | 3 | /include/ "kirkwood.dtsi" |
4 | /include/ "kirkwood-6281.dtsi" | ||
4 | 5 | ||
5 | / { | 6 | / { |
6 | model = "Iomega Iconnect"; | 7 | model = "Iomega Iconnect"; |
@@ -18,6 +19,56 @@ | |||
18 | }; | 19 | }; |
19 | 20 | ||
20 | ocp@f1000000 { | 21 | ocp@f1000000 { |
22 | pinctrl: pinctrl@10000 { | ||
23 | |||
24 | pinctrl-0 = < &pmx_gpio_12 &pmx_gpio_35 | ||
25 | &pmx_gpio_41 &pmx_gpio_42 | ||
26 | &pmx_gpio_43 &pmx_gpio_44 | ||
27 | &pmx_gpio_45 &pmx_gpio_46 | ||
28 | &pmx_gpio_47 &pmx_gpio_48 >; | ||
29 | pinctrl-names = "default"; | ||
30 | |||
31 | pmx_gpio_12: pmx-gpio-12 { | ||
32 | marvell,pins = "mpp12"; | ||
33 | marvell,function = "gpio"; | ||
34 | }; | ||
35 | pmx_gpio_35: pmx-gpio-35 { | ||
36 | marvell,pins = "mpp35"; | ||
37 | marvell,function = "gpio"; | ||
38 | }; | ||
39 | pmx_gpio_41: pmx-gpio-41 { | ||
40 | marvell,pins = "mpp41"; | ||
41 | marvell,function = "gpio"; | ||
42 | }; | ||
43 | pmx_gpio_42: pmx-gpio-42 { | ||
44 | marvell,pins = "mpp42"; | ||
45 | marvell,function = "gpio"; | ||
46 | }; | ||
47 | pmx_gpio_43: pmx-gpio-43 { | ||
48 | marvell,pins = "mpp43"; | ||
49 | marvell,function = "gpio"; | ||
50 | }; | ||
51 | pmx_gpio_44: pmx-gpio-44 { | ||
52 | marvell,pins = "mpp44"; | ||
53 | marvell,function = "gpio"; | ||
54 | }; | ||
55 | pmx_gpio_45: pmx-gpio-45 { | ||
56 | marvell,pins = "mpp45"; | ||
57 | marvell,function = "gpio"; | ||
58 | }; | ||
59 | pmx_gpio_46: pmx-gpio-46 { | ||
60 | marvell,pins = "mpp46"; | ||
61 | marvell,function = "gpio"; | ||
62 | }; | ||
63 | pmx_gpio_47: pmx-gpio-47 { | ||
64 | marvell,pins = "mpp47"; | ||
65 | marvell,function = "gpio"; | ||
66 | }; | ||
67 | pmx_gpio_48: pmx-gpio-48 { | ||
68 | marvell,pins = "mpp48"; | ||
69 | marvell,function = "gpio"; | ||
70 | }; | ||
71 | }; | ||
21 | i2c@11000 { | 72 | i2c@11000 { |
22 | status = "okay"; | 73 | status = "okay"; |
23 | 74 | ||
diff --git a/arch/arm/boot/dts/kirkwood-iomega_ix2_200.dts b/arch/arm/boot/dts/kirkwood-iomega_ix2_200.dts index 865aeec40a26..6cae4599c4b3 100644 --- a/arch/arm/boot/dts/kirkwood-iomega_ix2_200.dts +++ b/arch/arm/boot/dts/kirkwood-iomega_ix2_200.dts | |||
@@ -1,6 +1,7 @@ | |||
1 | /dts-v1/; | 1 | /dts-v1/; |
2 | 2 | ||
3 | /include/ "kirkwood.dtsi" | 3 | /include/ "kirkwood.dtsi" |
4 | /include/ "kirkwood-6281.dtsi" | ||
4 | 5 | ||
5 | / { | 6 | / { |
6 | model = "Iomega StorCenter ix2-200"; | 7 | model = "Iomega StorCenter ix2-200"; |
@@ -16,6 +17,94 @@ | |||
16 | }; | 17 | }; |
17 | 18 | ||
18 | ocp@f1000000 { | 19 | ocp@f1000000 { |
20 | pinctrl: pinctrl@10000 { | ||
21 | |||
22 | pinctrl-0 = < &pmx_button_reset &pmx_button_power | ||
23 | &pmx_led_backup &pmx_led_power | ||
24 | &pmx_button_otb &pmx_led_rebuild | ||
25 | &pmx_led_health | ||
26 | &pmx_led_sata_brt_ctrl_1 | ||
27 | &pmx_led_sata_brt_ctrl_2 | ||
28 | &pmx_led_backup_brt_ctrl_1 | ||
29 | &pmx_led_backup_brt_ctrl_2 | ||
30 | &pmx_led_power_brt_ctrl_1 | ||
31 | &pmx_led_power_brt_ctrl_2 | ||
32 | &pmx_led_health_brt_ctrl_1 | ||
33 | &pmx_led_health_brt_ctrl_2 | ||
34 | &pmx_led_rebuild_brt_ctrl_1 | ||
35 | &pmx_led_rebuild_brt_ctrl_2 >; | ||
36 | pinctrl-names = "default"; | ||
37 | |||
38 | pmx_button_reset: pmx-button-reset { | ||
39 | marvell,pins = "mpp12"; | ||
40 | marvell,function = "gpio"; | ||
41 | }; | ||
42 | pmx_button_power: pmx-button-power { | ||
43 | marvell,pins = "mpp14"; | ||
44 | marvell,function = "gpio"; | ||
45 | }; | ||
46 | pmx_led_backup: pmx-led-backup { | ||
47 | marvell,pins = "mpp15"; | ||
48 | marvell,function = "gpio"; | ||
49 | }; | ||
50 | pmx_led_power: pmx-led-power { | ||
51 | marvell,pins = "mpp16"; | ||
52 | marvell,function = "gpio"; | ||
53 | }; | ||
54 | pmx_button_otb: pmx-button-otb { | ||
55 | marvell,pins = "mpp35"; | ||
56 | marvell,function = "gpio"; | ||
57 | }; | ||
58 | pmx_led_rebuild: pmx-led-rebuild { | ||
59 | marvell,pins = "mpp36"; | ||
60 | marvell,function = "gpio"; | ||
61 | }; | ||
62 | pmx_led_health: pmx-led_health { | ||
63 | marvell,pins = "mpp37"; | ||
64 | marvell,function = "gpio"; | ||
65 | }; | ||
66 | pmx_led_sata_brt_ctrl_1: pmx-led-sata-brt-ctrl-1 { | ||
67 | marvell,pins = "mpp38"; | ||
68 | marvell,function = "gpio"; | ||
69 | }; | ||
70 | pmx_led_sata_brt_ctrl_2: pmx-led-sata-brt-ctrl-2 { | ||
71 | marvell,pins = "mpp39"; | ||
72 | marvell,function = "gpio"; | ||
73 | }; | ||
74 | pmx_led_backup_brt_ctrl_1: pmx-led-backup-brt-ctrl-1 { | ||
75 | marvell,pins = "mpp40"; | ||
76 | marvell,function = "gpio"; | ||
77 | }; | ||
78 | pmx_led_backup_brt_ctrl_2: pmx-led-backup-brt-ctrl-2 { | ||
79 | marvell,pins = "mpp41"; | ||
80 | marvell,function = "gpio"; | ||
81 | }; | ||
82 | pmx_led_power_brt_ctrl_1: pmx-led-power-brt-ctrl-1 { | ||
83 | marvell,pins = "mpp42"; | ||
84 | marvell,function = "gpio"; | ||
85 | }; | ||
86 | pmx_led_power_brt_ctrl_2: pmx-led-power-brt-ctrl-2 { | ||
87 | marvell,pins = "mpp43"; | ||
88 | marvell,function = "gpio"; | ||
89 | }; | ||
90 | pmx_led_health_brt_ctrl_1: pmx-led-health-brt-ctrl-1 { | ||
91 | marvell,pins = "mpp44"; | ||
92 | marvell,function = "gpio"; | ||
93 | }; | ||
94 | pmx_led_health_brt_ctrl_2: pmx-led-health-brt-ctrl-2 { | ||
95 | marvell,pins = "mpp45"; | ||
96 | marvell,function = "gpio"; | ||
97 | }; | ||
98 | pmx_led_rebuild_brt_ctrl_1: pmx-led-rebuild-brt-ctrl-1 { | ||
99 | marvell,pins = "mpp44"; | ||
100 | marvell,function = "gpio"; | ||
101 | }; | ||
102 | pmx_led_rebuild_brt_ctrl_2: pmx-led-rebuild-brt-ctrl-2 { | ||
103 | marvell,pins = "mpp45"; | ||
104 | marvell,function = "gpio"; | ||
105 | }; | ||
106 | |||
107 | }; | ||
19 | i2c@11000 { | 108 | i2c@11000 { |
20 | status = "okay"; | 109 | status = "okay"; |
21 | 110 | ||
diff --git a/arch/arm/boot/dts/kirkwood-is2.dts b/arch/arm/boot/dts/kirkwood-is2.dts new file mode 100644 index 000000000000..0bdce0ad7277 --- /dev/null +++ b/arch/arm/boot/dts/kirkwood-is2.dts | |||
@@ -0,0 +1,30 @@ | |||
1 | /dts-v1/; | ||
2 | |||
3 | /include/ "kirkwood-ns2-common.dtsi" | ||
4 | |||
5 | / { | ||
6 | model = "LaCie Internet Space v2"; | ||
7 | compatible = "lacie,inetspace_v2", "marvell,kirkwood-88f6281", "marvell,kirkwood"; | ||
8 | |||
9 | memory { | ||
10 | device_type = "memory"; | ||
11 | reg = <0x00000000 0x8000000>; | ||
12 | }; | ||
13 | |||
14 | ocp@f1000000 { | ||
15 | sata@80000 { | ||
16 | status = "okay"; | ||
17 | nr-ports = <1>; | ||
18 | }; | ||
19 | }; | ||
20 | |||
21 | ns2-leds { | ||
22 | compatible = "lacie,ns2-leds"; | ||
23 | |||
24 | blue-sata { | ||
25 | label = "ns2:blue:sata"; | ||
26 | slow-gpio = <&gpio0 29 0>; | ||
27 | cmd-gpio = <&gpio0 30 0>; | ||
28 | }; | ||
29 | }; | ||
30 | }; | ||
diff --git a/arch/arm/boot/dts/kirkwood-km_kirkwood.dts b/arch/arm/boot/dts/kirkwood-km_kirkwood.dts index 75bdb93fed26..8db3123ac80f 100644 --- a/arch/arm/boot/dts/kirkwood-km_kirkwood.dts +++ b/arch/arm/boot/dts/kirkwood-km_kirkwood.dts | |||
@@ -1,6 +1,7 @@ | |||
1 | /dts-v1/; | 1 | /dts-v1/; |
2 | 2 | ||
3 | /include/ "kirkwood.dtsi" | 3 | /include/ "kirkwood.dtsi" |
4 | /include/ "kirkwood-98dx4122.dtsi" | ||
4 | 5 | ||
5 | / { | 6 | / { |
6 | model = "Keymile Kirkwood Reference Design"; | 7 | model = "Keymile Kirkwood Reference Design"; |
@@ -16,6 +17,22 @@ | |||
16 | }; | 17 | }; |
17 | 18 | ||
18 | ocp@f1000000 { | 19 | ocp@f1000000 { |
20 | pinctrl: pinctrl@10000 { | ||
21 | |||
22 | pinctrl-0 = < &pmx_nand &pmx_i2c_gpio_sda | ||
23 | &pmx_i2c_gpio_scl >; | ||
24 | pinctrl-names = "default"; | ||
25 | |||
26 | pmx_i2c_gpio_sda: pmx-gpio-sda { | ||
27 | marvell,pins = "mpp8"; | ||
28 | marvell,function = "gpio"; | ||
29 | }; | ||
30 | pmx_i2c_gpio_scl: pmx-gpio-scl { | ||
31 | marvell,pins = "mpp9"; | ||
32 | marvell,function = "gpio"; | ||
33 | }; | ||
34 | }; | ||
35 | |||
19 | serial@12000 { | 36 | serial@12000 { |
20 | clock-frequency = <200000000>; | 37 | clock-frequency = <200000000>; |
21 | status = "ok"; | 38 | status = "ok"; |
diff --git a/arch/arm/boot/dts/kirkwood-lsxl.dtsi b/arch/arm/boot/dts/kirkwood-lsxl.dtsi index 8fea375c734d..37d45c4f88fb 100644 --- a/arch/arm/boot/dts/kirkwood-lsxl.dtsi +++ b/arch/arm/boot/dts/kirkwood-lsxl.dtsi | |||
@@ -1,4 +1,5 @@ | |||
1 | /include/ "kirkwood.dtsi" | 1 | /include/ "kirkwood.dtsi" |
2 | /include/ "kirkwood-6281.dtsi" | ||
2 | 3 | ||
3 | / { | 4 | / { |
4 | chosen { | 5 | chosen { |
@@ -6,6 +7,71 @@ | |||
6 | }; | 7 | }; |
7 | 8 | ||
8 | ocp@f1000000 { | 9 | ocp@f1000000 { |
10 | pinctrl: pinctrl@10000 { | ||
11 | |||
12 | pinctrl-0 = < &pmx_power_hdd &pmx_usb_vbus | ||
13 | &pmx_fan_low &pmx_fan_high | ||
14 | &pmx_led_function_red &pmx_led_alarm | ||
15 | &pmx_led_info &pmx_led_power | ||
16 | &pmx_fan_lock &pmx_button_function | ||
17 | &pmx_power_switch &pmx_power_auto_switch | ||
18 | &pmx_led_function_blue >; | ||
19 | pinctrl-names = "default"; | ||
20 | |||
21 | pmx_power_hdd: pmx-power-hdd { | ||
22 | marvell,pins = "mpp10"; | ||
23 | marvell,function = "gpo"; | ||
24 | }; | ||
25 | pmx_usb_vbus: pmx-usb-vbus { | ||
26 | marvell,pins = "mpp11"; | ||
27 | marvell,function = "gpio"; | ||
28 | }; | ||
29 | pmx_fan_high: pmx-fan-high { | ||
30 | marvell,pins = "mpp18"; | ||
31 | marvell,function = "gpo"; | ||
32 | }; | ||
33 | pmx_fan_low: pmx-fan-low { | ||
34 | marvell,pins = "mpp19"; | ||
35 | marvell,function = "gpo"; | ||
36 | }; | ||
37 | pmx_led_function_blue: pmx-led-function-blue { | ||
38 | marvell,pins = "mpp36"; | ||
39 | marvell,function = "gpio"; | ||
40 | }; | ||
41 | pmx_led_alarm: pmx-led-alarm { | ||
42 | marvell,pins = "mpp37"; | ||
43 | marvell,function = "gpio"; | ||
44 | }; | ||
45 | pmx_led_info: pmx-led-info { | ||
46 | marvell,pins = "mpp38"; | ||
47 | marvell,function = "gpio"; | ||
48 | }; | ||
49 | pmx_led_power: pmx-led-power { | ||
50 | marvell,pins = "mpp39"; | ||
51 | marvell,function = "gpio"; | ||
52 | }; | ||
53 | pmx_fan_lock: pmx-fan-lock { | ||
54 | marvell,pins = "mpp40"; | ||
55 | marvell,function = "gpio"; | ||
56 | }; | ||
57 | pmx_button_function: pmx-button-function { | ||
58 | marvell,pins = "mpp41"; | ||
59 | marvell,function = "gpio"; | ||
60 | }; | ||
61 | pmx_power_switch: pmx-power-switch { | ||
62 | marvell,pins = "mpp42"; | ||
63 | marvell,function = "gpio"; | ||
64 | }; | ||
65 | pmx_power_auto_switch: pmx-power-auto-switch { | ||
66 | marvell,pins = "mpp43"; | ||
67 | marvell,function = "gpio"; | ||
68 | }; | ||
69 | pmx_led_function_red: pmx-led-function_red { | ||
70 | marvell,pins = "mpp48"; | ||
71 | marvell,function = "gpio"; | ||
72 | }; | ||
73 | |||
74 | }; | ||
9 | sata@80000 { | 75 | sata@80000 { |
10 | status = "okay"; | 76 | status = "okay"; |
11 | nr-ports = <1>; | 77 | nr-ports = <1>; |
@@ -94,4 +160,44 @@ | |||
94 | gpios = <&gpio1 16 1>; | 160 | gpios = <&gpio1 16 1>; |
95 | }; | 161 | }; |
96 | }; | 162 | }; |
163 | |||
164 | gpio_fan { | ||
165 | compatible = "gpio-fan"; | ||
166 | gpios = <&gpio0 19 1 | ||
167 | &gpio0 18 1>; | ||
168 | gpio-fan,speed-map = <0 3 | ||
169 | 1500 2 | ||
170 | 3250 1 | ||
171 | 5000 0>; | ||
172 | alarm-gpios = <&gpio1 8 0>; | ||
173 | }; | ||
174 | |||
175 | regulators { | ||
176 | compatible = "simple-bus"; | ||
177 | #address-cells = <1>; | ||
178 | #size-cells = <0>; | ||
179 | |||
180 | usb_power: regulator@1 { | ||
181 | compatible = "regulator-fixed"; | ||
182 | reg = <1>; | ||
183 | regulator-name = "USB Power"; | ||
184 | regulator-min-microvolt = <5000000>; | ||
185 | regulator-max-microvolt = <5000000>; | ||
186 | enable-active-high; | ||
187 | regulator-always-on; | ||
188 | regulator-boot-on; | ||
189 | gpio = <&gpio0 11 0>; | ||
190 | }; | ||
191 | hdd_power: regulator@2 { | ||
192 | compatible = "regulator-fixed"; | ||
193 | reg = <2>; | ||
194 | regulator-name = "HDD Power"; | ||
195 | regulator-min-microvolt = <5000000>; | ||
196 | regulator-max-microvolt = <5000000>; | ||
197 | enable-active-high; | ||
198 | regulator-always-on; | ||
199 | regulator-boot-on; | ||
200 | gpio = <&gpio0 10 0>; | ||
201 | }; | ||
202 | }; | ||
97 | }; | 203 | }; |
diff --git a/arch/arm/boot/dts/kirkwood-mplcec4.dts b/arch/arm/boot/dts/kirkwood-mplcec4.dts new file mode 100644 index 000000000000..262c65403760 --- /dev/null +++ b/arch/arm/boot/dts/kirkwood-mplcec4.dts | |||
@@ -0,0 +1,178 @@ | |||
1 | /dts-v1/; | ||
2 | |||
3 | /include/ "kirkwood.dtsi" | ||
4 | /include/ "kirkwood-6281.dtsi" | ||
5 | |||
6 | / { | ||
7 | model = "MPL CEC4"; | ||
8 | compatible = "mpl,cec4-10", "mpl,cec4", "marvell,kirkwood-88f6281", "marvell,kirkwood"; | ||
9 | |||
10 | memory { | ||
11 | device_type = "memory"; | ||
12 | reg = <0x00000000 0x20000000>; | ||
13 | }; | ||
14 | |||
15 | chosen { | ||
16 | bootargs = "console=ttyS0,115200n8 earlyprintk"; | ||
17 | }; | ||
18 | |||
19 | ocp@f1000000 { | ||
20 | pinctrl: pinctrl@10000 { | ||
21 | |||
22 | pinctrl-0 = < &pmx_nand &pmx_uart0 | ||
23 | &pmx_led_health &pmx_sdio | ||
24 | &pmx_sata0 &pmx_sata1 | ||
25 | &pmx_led_user1o | ||
26 | &pmx_led_user1g &pmx_led_user0o | ||
27 | &pmx_led_user0g &pmx_led_misc | ||
28 | &pmx_sdio_cd | ||
29 | >; | ||
30 | pinctrl-names = "default"; | ||
31 | |||
32 | pmx_led_health: pmx-led-health { | ||
33 | marvell,pins = "mpp7"; | ||
34 | marvell,function = "gpo"; | ||
35 | }; | ||
36 | |||
37 | pmx_sata1: pmx-sata1 { | ||
38 | marvell,pins = "mpp34"; | ||
39 | marvell,function = "sata1"; | ||
40 | }; | ||
41 | |||
42 | pmx_sata0: pmx-sata0 { | ||
43 | marvell,pins = "mpp35"; | ||
44 | marvell,function = "sata0"; | ||
45 | }; | ||
46 | |||
47 | pmx_led_user1o: pmx-led-user1o { | ||
48 | marvell,pins = "mpp40"; | ||
49 | marvell,function = "gpio"; | ||
50 | }; | ||
51 | |||
52 | pmx_led_user1g: pmx-led-user1g { | ||
53 | marvell,pins = "mpp41"; | ||
54 | marvell,function = "gpio"; | ||
55 | }; | ||
56 | |||
57 | pmx_led_user0o: pmx-led-user0o { | ||
58 | marvell,pins = "mpp44"; | ||
59 | marvell,function = "gpio"; | ||
60 | }; | ||
61 | |||
62 | pmx_led_user0g: pmx-led-user0g { | ||
63 | marvell,pins = "mpp45"; | ||
64 | marvell,function = "gpio"; | ||
65 | }; | ||
66 | |||
67 | pmx_led_misc: pmx-led-misc { | ||
68 | marvell,pins = "mpp46"; | ||
69 | marvell,function = "gpio"; | ||
70 | }; | ||
71 | |||
72 | pmx_sdio_cd: pmx-sdio-cd { | ||
73 | marvell,pins = "mpp47"; | ||
74 | marvell,function = "gpio"; | ||
75 | }; | ||
76 | }; | ||
77 | |||
78 | i2c@11000 { | ||
79 | status = "okay"; | ||
80 | |||
81 | rtc@51 { | ||
82 | compatible = "nxp,pcf8563"; | ||
83 | reg = <0x51>; | ||
84 | }; | ||
85 | |||
86 | eeprom@57 { | ||
87 | compatible = "atmel,24c02"; | ||
88 | reg = <0x57>; | ||
89 | }; | ||
90 | |||
91 | }; | ||
92 | |||
93 | serial@12000 { | ||
94 | clock-frequency = <200000000>; | ||
95 | status = "ok"; | ||
96 | }; | ||
97 | |||
98 | nand@3000000 { | ||
99 | status = "okay"; | ||
100 | |||
101 | partition@0 { | ||
102 | label = "uboot"; | ||
103 | reg = <0x0000000 0x100000>; | ||
104 | }; | ||
105 | |||
106 | partition@100000 { | ||
107 | label = "env"; | ||
108 | reg = <0x100000 0x80000>; | ||
109 | }; | ||
110 | |||
111 | partition@180000 { | ||
112 | label = "fdt"; | ||
113 | reg = <0x180000 0x80000>; | ||
114 | }; | ||
115 | |||
116 | partition@200000 { | ||
117 | label = "kernel"; | ||
118 | reg = <0x200000 0x400000>; | ||
119 | }; | ||
120 | |||
121 | partition@600000 { | ||
122 | label = "rootfs"; | ||
123 | reg = <0x600000 0x1fa00000>; | ||
124 | }; | ||
125 | }; | ||
126 | |||
127 | rtc@10300 { | ||
128 | status = "disabled"; | ||
129 | }; | ||
130 | |||
131 | sata@80000 { | ||
132 | nr-ports = <2>; | ||
133 | status = "okay"; | ||
134 | |||
135 | }; | ||
136 | }; | ||
137 | |||
138 | gpio-leds { | ||
139 | compatible = "gpio-leds"; | ||
140 | |||
141 | health { | ||
142 | label = "status:green:health"; | ||
143 | gpios = <&gpio0 7 1>; | ||
144 | }; | ||
145 | |||
146 | user1o { | ||
147 | label = "user1:orange"; | ||
148 | gpios = <&gpio1 8 1>; | ||
149 | default-state = "on"; | ||
150 | }; | ||
151 | |||
152 | user1g { | ||
153 | label = "user1:green"; | ||
154 | gpios = <&gpio1 9 1>; | ||
155 | default-state = "on"; | ||
156 | }; | ||
157 | |||
158 | user0o { | ||
159 | label = "user0:orange"; | ||
160 | gpios = <&gpio1 12 1>; | ||
161 | default-state = "on"; | ||
162 | }; | ||
163 | |||
164 | user0g { | ||
165 | label = "user0:green"; | ||
166 | gpios = <&gpio1 13 1>; | ||
167 | default-state = "on"; | ||
168 | }; | ||
169 | |||
170 | misc { | ||
171 | label = "status:orange:misc"; | ||
172 | gpios = <&gpio1 14 1>; | ||
173 | default-state = "on"; | ||
174 | }; | ||
175 | |||
176 | }; | ||
177 | }; | ||
178 | |||
diff --git a/arch/arm/boot/dts/kirkwood-ns2-common.dtsi b/arch/arm/boot/dts/kirkwood-ns2-common.dtsi new file mode 100644 index 000000000000..9bc6785ad228 --- /dev/null +++ b/arch/arm/boot/dts/kirkwood-ns2-common.dtsi | |||
@@ -0,0 +1,63 @@ | |||
1 | /include/ "kirkwood.dtsi" | ||
2 | |||
3 | / { | ||
4 | chosen { | ||
5 | bootargs = "console=ttyS0,115200n8"; | ||
6 | }; | ||
7 | |||
8 | ocp@f1000000 { | ||
9 | serial@12000 { | ||
10 | clock-frequency = <166666667>; | ||
11 | status = "okay"; | ||
12 | }; | ||
13 | |||
14 | spi@10600 { | ||
15 | status = "okay"; | ||
16 | |||
17 | flash@0 { | ||
18 | #address-cells = <1>; | ||
19 | #size-cells = <1>; | ||
20 | compatible = "mx25l4005a"; | ||
21 | reg = <0>; | ||
22 | spi-max-frequency = <20000000>; | ||
23 | mode = <0>; | ||
24 | |||
25 | partition@0 { | ||
26 | reg = <0x0 0x80000>; | ||
27 | label = "u-boot"; | ||
28 | }; | ||
29 | }; | ||
30 | }; | ||
31 | |||
32 | i2c@11000 { | ||
33 | status = "okay"; | ||
34 | |||
35 | eeprom@50 { | ||
36 | compatible = "at,24c04"; | ||
37 | pagesize = <16>; | ||
38 | reg = <0x50>; | ||
39 | }; | ||
40 | }; | ||
41 | }; | ||
42 | |||
43 | gpio_keys { | ||
44 | compatible = "gpio-keys"; | ||
45 | #address-cells = <1>; | ||
46 | #size-cells = <0>; | ||
47 | |||
48 | button@1 { | ||
49 | label = "Power push button"; | ||
50 | linux,code = <116>; | ||
51 | gpios = <&gpio1 0 0>; | ||
52 | }; | ||
53 | }; | ||
54 | |||
55 | gpio-leds { | ||
56 | compatible = "gpio-leds"; | ||
57 | |||
58 | red-fail { | ||
59 | label = "ns2:red:fail"; | ||
60 | gpios = <&gpio0 12 0>; | ||
61 | }; | ||
62 | }; | ||
63 | }; | ||
diff --git a/arch/arm/boot/dts/kirkwood-ns2.dts b/arch/arm/boot/dts/kirkwood-ns2.dts new file mode 100644 index 000000000000..f2d36ecf36d8 --- /dev/null +++ b/arch/arm/boot/dts/kirkwood-ns2.dts | |||
@@ -0,0 +1,30 @@ | |||
1 | /dts-v1/; | ||
2 | |||
3 | /include/ "kirkwood-ns2-common.dtsi" | ||
4 | |||
5 | / { | ||
6 | model = "LaCie Network Space v2"; | ||
7 | compatible = "lacie,netspace_v2", "marvell,kirkwood-88f6281", "marvell,kirkwood"; | ||
8 | |||
9 | memory { | ||
10 | device_type = "memory"; | ||
11 | reg = <0x00000000 0x10000000>; | ||
12 | }; | ||
13 | |||
14 | ocp@f1000000 { | ||
15 | sata@80000 { | ||
16 | status = "okay"; | ||
17 | nr-ports = <1>; | ||
18 | }; | ||
19 | }; | ||
20 | |||
21 | ns2-leds { | ||
22 | compatible = "lacie,ns2-leds"; | ||
23 | |||
24 | blue-sata { | ||
25 | label = "ns2:blue:sata"; | ||
26 | slow-gpio = <&gpio0 29 0>; | ||
27 | cmd-gpio = <&gpio0 30 0>; | ||
28 | }; | ||
29 | }; | ||
30 | }; | ||
diff --git a/arch/arm/boot/dts/kirkwood-ns2lite.dts b/arch/arm/boot/dts/kirkwood-ns2lite.dts new file mode 100644 index 000000000000..b02eb4ea1bb4 --- /dev/null +++ b/arch/arm/boot/dts/kirkwood-ns2lite.dts | |||
@@ -0,0 +1,30 @@ | |||
1 | /dts-v1/; | ||
2 | |||
3 | /include/ "kirkwood-ns2-common.dtsi" | ||
4 | |||
5 | / { | ||
6 | model = "LaCie Network Space Lite v2"; | ||
7 | compatible = "lacie,netspace_lite_v2", "marvell,kirkwood-88f6192", "marvell,kirkwood"; | ||
8 | |||
9 | memory { | ||
10 | device_type = "memory"; | ||
11 | reg = <0x00000000 0x8000000>; | ||
12 | }; | ||
13 | |||
14 | ocp@f1000000 { | ||
15 | sata@80000 { | ||
16 | status = "okay"; | ||
17 | nr-ports = <1>; | ||
18 | }; | ||
19 | }; | ||
20 | |||
21 | gpio-leds { | ||
22 | compatible = "gpio-leds"; | ||
23 | |||
24 | blue-sata { | ||
25 | label = "ns2:blue:sata"; | ||
26 | gpios = <&gpio0 30 1>; | ||
27 | linux,default-trigger = "default-on"; | ||
28 | }; | ||
29 | }; | ||
30 | }; | ||
diff --git a/arch/arm/boot/dts/kirkwood-ns2max.dts b/arch/arm/boot/dts/kirkwood-ns2max.dts new file mode 100644 index 000000000000..bcec4d6cada7 --- /dev/null +++ b/arch/arm/boot/dts/kirkwood-ns2max.dts | |||
@@ -0,0 +1,49 @@ | |||
1 | /dts-v1/; | ||
2 | |||
3 | /include/ "kirkwood-ns2-common.dtsi" | ||
4 | |||
5 | / { | ||
6 | model = "LaCie Network Space Max v2"; | ||
7 | compatible = "lacie,netspace_max_v2", "marvell,kirkwood-88f6281", "marvell,kirkwood"; | ||
8 | |||
9 | memory { | ||
10 | device_type = "memory"; | ||
11 | reg = <0x00000000 0x10000000>; | ||
12 | }; | ||
13 | |||
14 | ocp@f1000000 { | ||
15 | sata@80000 { | ||
16 | status = "okay"; | ||
17 | nr-ports = <2>; | ||
18 | }; | ||
19 | }; | ||
20 | |||
21 | gpio_fan { | ||
22 | compatible = "gpio-fan"; | ||
23 | gpios = <&gpio0 22 1 | ||
24 | &gpio0 7 1 | ||
25 | &gpio1 1 1 | ||
26 | &gpio0 23 1>; | ||
27 | gpio-fan,speed-map = | ||
28 | < 0 0 | ||
29 | 1500 15 | ||
30 | 1700 14 | ||
31 | 1800 13 | ||
32 | 2100 12 | ||
33 | 3100 11 | ||
34 | 3300 10 | ||
35 | 4300 9 | ||
36 | 5500 8>; | ||
37 | alarm-gpios = <&gpio0 25 1>; | ||
38 | }; | ||
39 | |||
40 | ns2-leds { | ||
41 | compatible = "lacie,ns2-leds"; | ||
42 | |||
43 | blue-sata { | ||
44 | label = "ns2:blue:sata"; | ||
45 | slow-gpio = <&gpio0 29 0>; | ||
46 | cmd-gpio = <&gpio0 30 0>; | ||
47 | }; | ||
48 | }; | ||
49 | }; | ||
diff --git a/arch/arm/boot/dts/kirkwood-ns2mini.dts b/arch/arm/boot/dts/kirkwood-ns2mini.dts new file mode 100644 index 000000000000..b79f5eb25589 --- /dev/null +++ b/arch/arm/boot/dts/kirkwood-ns2mini.dts | |||
@@ -0,0 +1,49 @@ | |||
1 | /dts-v1/; | ||
2 | |||
3 | /include/ "kirkwood-ns2-common.dtsi" | ||
4 | |||
5 | / { | ||
6 | model = "LaCie Network Space Mini v2"; | ||
7 | compatible = "lacie,netspace_mini_v2", "marvell,kirkwood-88f6192", "marvell,kirkwood"; | ||
8 | |||
9 | memory { | ||
10 | device_type = "memory"; | ||
11 | reg = <0x00000000 0x8000000>; | ||
12 | }; | ||
13 | |||
14 | ocp@f1000000 { | ||
15 | sata@80000 { | ||
16 | status = "okay"; | ||
17 | nr-ports = <1>; | ||
18 | }; | ||
19 | }; | ||
20 | |||
21 | gpio_fan { | ||
22 | compatible = "gpio-fan"; | ||
23 | gpios = <&gpio0 22 1 | ||
24 | &gpio0 7 1 | ||
25 | &gpio1 1 1 | ||
26 | &gpio0 23 1>; | ||
27 | gpio-fan,speed-map = | ||
28 | < 0 0 | ||
29 | 3000 15 | ||
30 | 3180 14 | ||
31 | 4140 13 | ||
32 | 4570 12 | ||
33 | 6760 11 | ||
34 | 7140 10 | ||
35 | 7980 9 | ||
36 | 9200 8>; | ||
37 | alarm-gpios = <&gpio0 25 1>; | ||
38 | }; | ||
39 | |||
40 | ns2-leds { | ||
41 | compatible = "lacie,ns2-leds"; | ||
42 | |||
43 | blue-sata { | ||
44 | label = "ns2:blue:sata"; | ||
45 | slow-gpio = <&gpio0 29 0>; | ||
46 | cmd-gpio = <&gpio0 30 0>; | ||
47 | }; | ||
48 | }; | ||
49 | }; | ||
diff --git a/arch/arm/boot/dts/kirkwood-nsa310.dts b/arch/arm/boot/dts/kirkwood-nsa310.dts new file mode 100644 index 000000000000..5509f9659546 --- /dev/null +++ b/arch/arm/boot/dts/kirkwood-nsa310.dts | |||
@@ -0,0 +1,144 @@ | |||
1 | /dts-v1/; | ||
2 | |||
3 | /include/ "kirkwood.dtsi" | ||
4 | |||
5 | / { | ||
6 | model = "ZyXEL NSA310"; | ||
7 | compatible = "zyxel,nsa310", "marvell,kirkwood-88f6281", "marvell,kirkwood"; | ||
8 | |||
9 | memory { | ||
10 | device_type = "memory"; | ||
11 | reg = <0x00000000 0x10000000>; | ||
12 | }; | ||
13 | |||
14 | chosen { | ||
15 | bootargs = "console=ttyS0,115200"; | ||
16 | }; | ||
17 | |||
18 | ocp@f1000000 { | ||
19 | |||
20 | serial@12000 { | ||
21 | clock-frequency = <200000000>; | ||
22 | status = "ok"; | ||
23 | }; | ||
24 | |||
25 | sata@80000 { | ||
26 | status = "okay"; | ||
27 | nr-ports = <2>; | ||
28 | }; | ||
29 | |||
30 | i2c@11000 { | ||
31 | status = "okay"; | ||
32 | }; | ||
33 | |||
34 | nand@3000000 { | ||
35 | status = "okay"; | ||
36 | chip-delay = <35>; | ||
37 | |||
38 | partition@0 { | ||
39 | label = "uboot"; | ||
40 | reg = <0x0000000 0x0100000>; | ||
41 | read-only; | ||
42 | }; | ||
43 | partition@100000 { | ||
44 | label = "uboot_env"; | ||
45 | reg = <0x0100000 0x0080000>; | ||
46 | }; | ||
47 | partition@180000 { | ||
48 | label = "key_store"; | ||
49 | reg = <0x0180000 0x0080000>; | ||
50 | }; | ||
51 | partition@200000 { | ||
52 | label = "info"; | ||
53 | reg = <0x0200000 0x0080000>; | ||
54 | }; | ||
55 | partition@280000 { | ||
56 | label = "etc"; | ||
57 | reg = <0x0280000 0x0a00000>; | ||
58 | }; | ||
59 | partition@c80000 { | ||
60 | label = "kernel_1"; | ||
61 | reg = <0x0c80000 0x0a00000>; | ||
62 | }; | ||
63 | partition@1680000 { | ||
64 | label = "rootfs1"; | ||
65 | reg = <0x1680000 0x2fc0000>; | ||
66 | }; | ||
67 | partition@4640000 { | ||
68 | label = "kernel_2"; | ||
69 | reg = <0x4640000 0x0a00000>; | ||
70 | }; | ||
71 | partition@5040000 { | ||
72 | label = "rootfs2"; | ||
73 | reg = <0x5040000 0x2fc0000>; | ||
74 | }; | ||
75 | }; | ||
76 | }; | ||
77 | |||
78 | gpio_keys { | ||
79 | compatible = "gpio-keys"; | ||
80 | #address-cells = <1>; | ||
81 | #size-cells = <0>; | ||
82 | |||
83 | button@1 { | ||
84 | label = "Power Button"; | ||
85 | linux,code = <116>; | ||
86 | gpios = <&gpio1 14 0>; | ||
87 | }; | ||
88 | button@2 { | ||
89 | label = "Copy Button"; | ||
90 | linux,code = <133>; | ||
91 | gpios = <&gpio1 5 1>; | ||
92 | }; | ||
93 | button@3 { | ||
94 | label = "Reset Button"; | ||
95 | linux,code = <0x198>; | ||
96 | gpios = <&gpio1 4 1>; | ||
97 | }; | ||
98 | }; | ||
99 | |||
100 | gpio-leds { | ||
101 | compatible = "gpio-leds"; | ||
102 | |||
103 | green-sys { | ||
104 | label = "nsa310:green:sys"; | ||
105 | gpios = <&gpio0 28 0>; | ||
106 | }; | ||
107 | red-sys { | ||
108 | label = "nsa310:red:sys"; | ||
109 | gpios = <&gpio0 29 0>; | ||
110 | }; | ||
111 | green-hdd { | ||
112 | label = "nsa310:green:hdd"; | ||
113 | gpios = <&gpio1 9 0>; | ||
114 | }; | ||
115 | red-hdd { | ||
116 | label = "nsa310:red:hdd"; | ||
117 | gpios = <&gpio1 10 0>; | ||
118 | }; | ||
119 | green-esata { | ||
120 | label = "nsa310:green:esata"; | ||
121 | gpios = <&gpio0 12 0>; | ||
122 | }; | ||
123 | red-esata { | ||
124 | label = "nsa310:red:esata"; | ||
125 | gpios = <&gpio0 13 0>; | ||
126 | }; | ||
127 | green-usb { | ||
128 | label = "nsa310:green:usb"; | ||
129 | gpios = <&gpio0 15 0>; | ||
130 | }; | ||
131 | red-usb { | ||
132 | label = "nsa310:red:usb"; | ||
133 | gpios = <&gpio0 16 0>; | ||
134 | }; | ||
135 | green-copy { | ||
136 | label = "nsa310:green:copy"; | ||
137 | gpios = <&gpio1 7 0>; | ||
138 | }; | ||
139 | red-copy { | ||
140 | label = "nsa310:red:copy"; | ||
141 | gpios = <&gpio1 8 0>; | ||
142 | }; | ||
143 | }; | ||
144 | }; | ||
diff --git a/arch/arm/boot/dts/kirkwood-openblocks_a6.dts b/arch/arm/boot/dts/kirkwood-openblocks_a6.dts new file mode 100644 index 000000000000..49d3d74d4d38 --- /dev/null +++ b/arch/arm/boot/dts/kirkwood-openblocks_a6.dts | |||
@@ -0,0 +1,98 @@ | |||
1 | /dts-v1/; | ||
2 | |||
3 | /include/ "kirkwood.dtsi" | ||
4 | /include/ "kirkwood-6282.dtsi" | ||
5 | |||
6 | / { | ||
7 | model = "Plat'Home OpenBlocksA6"; | ||
8 | compatible = "plathome,openblocks-a6", "marvell,kirkwood-88f6283", "marvell,kirkwood"; | ||
9 | |||
10 | memory { | ||
11 | device_type = "memory"; | ||
12 | reg = <0x00000000 0x20000000>; | ||
13 | }; | ||
14 | |||
15 | chosen { | ||
16 | bootargs = "console=ttyS0,115200n8 earlyprintk"; | ||
17 | }; | ||
18 | |||
19 | ocp@f1000000 { | ||
20 | serial@12000 { | ||
21 | clock-frequency = <200000000>; | ||
22 | status = "ok"; | ||
23 | }; | ||
24 | |||
25 | serial@12100 { | ||
26 | clock-frequency = <200000000>; | ||
27 | status = "ok"; | ||
28 | }; | ||
29 | |||
30 | nand@3000000 { | ||
31 | chip-delay = <25>; | ||
32 | status = "okay"; | ||
33 | |||
34 | partition@0 { | ||
35 | label = "uboot"; | ||
36 | reg = <0x0 0x90000>; | ||
37 | }; | ||
38 | |||
39 | partition@90000 { | ||
40 | label = "env"; | ||
41 | reg = <0x90000 0x44000>; | ||
42 | }; | ||
43 | |||
44 | partition@d4000 { | ||
45 | label = "test"; | ||
46 | reg = <0xd4000 0x24000>; | ||
47 | }; | ||
48 | |||
49 | partition@f4000 { | ||
50 | label = "conf"; | ||
51 | reg = <0xf4000 0x400000>; | ||
52 | }; | ||
53 | |||
54 | partition@4f4000 { | ||
55 | label = "linux"; | ||
56 | reg = <0x4f4000 0x1d20000>; | ||
57 | }; | ||
58 | |||
59 | partition@2214000 { | ||
60 | label = "user"; | ||
61 | reg = <0x2214000 0x1dec000>; | ||
62 | }; | ||
63 | }; | ||
64 | |||
65 | sata@80000 { | ||
66 | nr-ports = <1>; | ||
67 | status = "okay"; | ||
68 | }; | ||
69 | |||
70 | i2c@11100 { | ||
71 | status = "okay"; | ||
72 | |||
73 | s35390a: s35390a@30 { | ||
74 | compatible = "s35390a"; | ||
75 | reg = <0x30>; | ||
76 | }; | ||
77 | }; | ||
78 | }; | ||
79 | |||
80 | gpio-leds { | ||
81 | compatible = "gpio-leds"; | ||
82 | |||
83 | led-red { | ||
84 | label = "obsa6:red:stat"; | ||
85 | gpios = <&gpio1 9 1>; | ||
86 | }; | ||
87 | |||
88 | led-green { | ||
89 | label = "obsa6:green:stat"; | ||
90 | gpios = <&gpio1 10 1>; | ||
91 | }; | ||
92 | |||
93 | led-yellow { | ||
94 | label = "obsa6:yellow:stat"; | ||
95 | gpios = <&gpio1 11 1>; | ||
96 | }; | ||
97 | }; | ||
98 | }; | ||
diff --git a/arch/arm/boot/dts/kirkwood-topkick.dts b/arch/arm/boot/dts/kirkwood-topkick.dts new file mode 100644 index 000000000000..c0de5a7f660d --- /dev/null +++ b/arch/arm/boot/dts/kirkwood-topkick.dts | |||
@@ -0,0 +1,85 @@ | |||
1 | /dts-v1/; | ||
2 | |||
3 | /include/ "kirkwood.dtsi" | ||
4 | |||
5 | / { | ||
6 | model = "Univeral Scientific Industrial Co. Topkick-1281P2"; | ||
7 | compatible = "usi,topkick-1281P2", "usi,topkick", "marvell,kirkwood-88f6282", "marvell,kirkwood"; | ||
8 | |||
9 | memory { | ||
10 | device_type = "memory"; | ||
11 | reg = <0x00000000 0x10000000>; | ||
12 | }; | ||
13 | |||
14 | chosen { | ||
15 | bootargs = "console=ttyS0,115200n8 earlyprintk"; | ||
16 | }; | ||
17 | |||
18 | ocp@f1000000 { | ||
19 | serial@12000 { | ||
20 | clock-frequency = <200000000>; | ||
21 | status = "ok"; | ||
22 | }; | ||
23 | |||
24 | nand@3000000 { | ||
25 | status = "okay"; | ||
26 | |||
27 | partition@0 { | ||
28 | label = "u-boot"; | ||
29 | reg = <0x0000000 0x180000>; | ||
30 | }; | ||
31 | |||
32 | partition@180000 { | ||
33 | label = "u-boot env"; | ||
34 | reg = <0x0180000 0x20000>; | ||
35 | }; | ||
36 | |||
37 | partition@200000 { | ||
38 | label = "uImage"; | ||
39 | reg = <0x0200000 0x600000>; | ||
40 | }; | ||
41 | |||
42 | partition@800000 { | ||
43 | label = "uInitrd"; | ||
44 | reg = <0x0800000 0x1000000>; | ||
45 | }; | ||
46 | |||
47 | partition@1800000 { | ||
48 | label = "rootfs"; | ||
49 | reg = <0x1800000 0xe800000>; | ||
50 | }; | ||
51 | }; | ||
52 | |||
53 | sata@80000 { | ||
54 | status = "okay"; | ||
55 | nr-ports = <1>; | ||
56 | }; | ||
57 | }; | ||
58 | |||
59 | gpio-leds { | ||
60 | compatible = "gpio-leds"; | ||
61 | |||
62 | disk { | ||
63 | label = "topkick:yellow:disk"; | ||
64 | gpios = <&gpio0 21 1>; | ||
65 | linux,default-trigger = "ide-disk"; | ||
66 | }; | ||
67 | system2 { | ||
68 | label = "topkick:red:system"; | ||
69 | gpios = <&gpio1 5 1>; | ||
70 | }; | ||
71 | system { | ||
72 | label = "topkick:blue:system"; | ||
73 | gpios = <&gpio1 6 1>; | ||
74 | default-state = "on"; | ||
75 | }; | ||
76 | wifi { | ||
77 | label = "topkick:green:wifi"; | ||
78 | gpios = <&gpio1 7 1>; | ||
79 | }; | ||
80 | wifi2 { | ||
81 | label = "topkick:yellow:wifi"; | ||
82 | gpios = <&gpio1 16 1>; | ||
83 | }; | ||
84 | }; | ||
85 | }; | ||
diff --git a/arch/arm/boot/dts/kirkwood-ts219-6281.dts b/arch/arm/boot/dts/kirkwood-ts219-6281.dts index ccbf32757800..8295c833887f 100644 --- a/arch/arm/boot/dts/kirkwood-ts219-6281.dts +++ b/arch/arm/boot/dts/kirkwood-ts219-6281.dts | |||
@@ -1,8 +1,39 @@ | |||
1 | /dts-v1/; | 1 | /dts-v1/; |
2 | 2 | ||
3 | /include/ "kirkwood-ts219.dtsi" | 3 | /include/ "kirkwood-ts219.dtsi" |
4 | /include/ "kirkwood-6281.dtsi" | ||
4 | 5 | ||
5 | / { | 6 | / { |
7 | ocp@f1000000 { | ||
8 | pinctrl: pinctrl@10000 { | ||
9 | |||
10 | pinctrl-0 = < &pmx_uart0 &pmx_uart1 &pmx_spi | ||
11 | &pmx_twsi0 &pmx_sata0 &pmx_sata1 | ||
12 | &pmx_ram_size &pmx_reset_button | ||
13 | &pmx_USB_copy_button &pmx_board_id>; | ||
14 | pinctrl-names = "default"; | ||
15 | |||
16 | pmx_ram_size: pmx-ram-size { | ||
17 | /* RAM: 0: 256 MB, 1: 512 MB */ | ||
18 | marvell,pins = "mpp36"; | ||
19 | marvell,function = "gpio"; | ||
20 | }; | ||
21 | pmx_USB_copy_button: pmx-USB-copy-button { | ||
22 | marvell,pins = "mpp15"; | ||
23 | marvell,function = "gpio"; | ||
24 | }; | ||
25 | pmx_reset_button: pmx-reset-button { | ||
26 | marvell,pins = "mpp16"; | ||
27 | marvell,function = "gpio"; | ||
28 | }; | ||
29 | pmx_board_id: pmx-board-id { | ||
30 | /* 0: TS-11x, 1: TS-21x */ | ||
31 | marvell,pins = "mpp44"; | ||
32 | marvell,function = "gpio"; | ||
33 | }; | ||
34 | }; | ||
35 | }; | ||
36 | |||
6 | gpio_keys { | 37 | gpio_keys { |
7 | compatible = "gpio-keys"; | 38 | compatible = "gpio-keys"; |
8 | #address-cells = <1>; | 39 | #address-cells = <1>; |
diff --git a/arch/arm/boot/dts/kirkwood-ts219-6282.dts b/arch/arm/boot/dts/kirkwood-ts219-6282.dts index fbe9932161a1..df3f95dfba33 100644 --- a/arch/arm/boot/dts/kirkwood-ts219-6282.dts +++ b/arch/arm/boot/dts/kirkwood-ts219-6282.dts | |||
@@ -1,8 +1,39 @@ | |||
1 | /dts-v1/; | 1 | /dts-v1/; |
2 | 2 | ||
3 | /include/ "kirkwood-ts219.dtsi" | 3 | /include/ "kirkwood-ts219.dtsi" |
4 | /include/ "kirkwood-6282.dtsi" | ||
4 | 5 | ||
5 | / { | 6 | / { |
7 | ocp@f1000000 { | ||
8 | pinctrl: pinctrl@10000 { | ||
9 | |||
10 | pinctrl-0 = < &pmx_uart0 &pmx_uart1 &pmx_spi | ||
11 | &pmx_twsi0 &pmx_sata0 &pmx_sata1 | ||
12 | &pmx_ram_size &pmx_reset_button | ||
13 | &pmx_USB_copy_button &pmx_board_id>; | ||
14 | pinctrl-names = "default"; | ||
15 | |||
16 | pmx_ram_size: pmx-ram-size { | ||
17 | /* RAM: 0: 256 MB, 1: 512 MB */ | ||
18 | marvell,pins = "mpp36"; | ||
19 | marvell,function = "gpio"; | ||
20 | }; | ||
21 | pmx_reset_button: pmx-reset-button { | ||
22 | marvell,pins = "mpp37"; | ||
23 | marvell,function = "gpio"; | ||
24 | }; | ||
25 | pmx_USB_copy_button: pmx-USB-copy-button { | ||
26 | marvell,pins = "mpp43"; | ||
27 | marvell,function = "gpio"; | ||
28 | }; | ||
29 | pmx_board_id: pmx-board-id { | ||
30 | /* 0: TS-11x, 1: TS-21x */ | ||
31 | marvell,pins = "mpp44"; | ||
32 | marvell,function = "gpio"; | ||
33 | }; | ||
34 | }; | ||
35 | }; | ||
36 | |||
6 | gpio_keys { | 37 | gpio_keys { |
7 | compatible = "gpio-keys"; | 38 | compatible = "gpio-keys"; |
8 | #address-cells = <1>; | 39 | #address-cells = <1>; |
diff --git a/arch/arm/boot/dts/kirkwood.dtsi b/arch/arm/boot/dts/kirkwood.dtsi index 4e5b8154a5be..a990c30f0a26 100644 --- a/arch/arm/boot/dts/kirkwood.dtsi +++ b/arch/arm/boot/dts/kirkwood.dtsi | |||
@@ -4,6 +4,10 @@ | |||
4 | compatible = "marvell,kirkwood"; | 4 | compatible = "marvell,kirkwood"; |
5 | interrupt-parent = <&intc>; | 5 | interrupt-parent = <&intc>; |
6 | 6 | ||
7 | aliases { | ||
8 | gpio0 = &gpio0; | ||
9 | gpio1 = &gpio1; | ||
10 | }; | ||
7 | intc: interrupt-controller { | 11 | intc: interrupt-controller { |
8 | compatible = "marvell,orion-intc", "marvell,intc"; | 12 | compatible = "marvell,orion-intc", "marvell,intc"; |
9 | interrupt-controller; | 13 | interrupt-controller; |
@@ -24,7 +28,8 @@ | |||
24 | #gpio-cells = <2>; | 28 | #gpio-cells = <2>; |
25 | gpio-controller; | 29 | gpio-controller; |
26 | reg = <0x10100 0x40>; | 30 | reg = <0x10100 0x40>; |
27 | ngpio = <32>; | 31 | ngpios = <32>; |
32 | interrupt-controller; | ||
28 | interrupts = <35>, <36>, <37>, <38>; | 33 | interrupts = <35>, <36>, <37>, <38>; |
29 | }; | 34 | }; |
30 | 35 | ||
@@ -33,7 +38,8 @@ | |||
33 | #gpio-cells = <2>; | 38 | #gpio-cells = <2>; |
34 | gpio-controller; | 39 | gpio-controller; |
35 | reg = <0x10140 0x40>; | 40 | reg = <0x10140 0x40>; |
36 | ngpio = <18>; | 41 | ngpios = <18>; |
42 | interrupt-controller; | ||
37 | interrupts = <39>, <40>, <41>; | 43 | interrupts = <39>, <40>, <41>; |
38 | }; | 44 | }; |
39 | 45 | ||
@@ -77,6 +83,13 @@ | |||
77 | status = "okay"; | 83 | status = "okay"; |
78 | }; | 84 | }; |
79 | 85 | ||
86 | ehci@50000 { | ||
87 | compatible = "marvell,orion-ehci"; | ||
88 | reg = <0x50000 0x1000>; | ||
89 | interrupts = <19>; | ||
90 | status = "okay"; | ||
91 | }; | ||
92 | |||
80 | sata@80000 { | 93 | sata@80000 { |
81 | compatible = "marvell,orion-sata"; | 94 | compatible = "marvell,orion-sata"; |
82 | reg = <0x80000 0x5000>; | 95 | reg = <0x80000 0x5000>; |
diff --git a/arch/arm/boot/dts/orion5x-lacie-ethernet-disk-mini-v2.dts b/arch/arm/boot/dts/orion5x-lacie-ethernet-disk-mini-v2.dts new file mode 100644 index 000000000000..5a3a58b7e18f --- /dev/null +++ b/arch/arm/boot/dts/orion5x-lacie-ethernet-disk-mini-v2.dts | |||
@@ -0,0 +1,55 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2012 Thomas Petazzoni <thomas.petazzoni@free-electrons.com> | ||
3 | * | ||
4 | * This file is licensed under the terms of the GNU General Public | ||
5 | * License version 2. This program is licensed "as is" without any | ||
6 | * warranty of any kind, whether express or implied. | ||
7 | */ | ||
8 | |||
9 | /dts-v1/; | ||
10 | /include/ "orion5x.dtsi" | ||
11 | |||
12 | / { | ||
13 | model = "LaCie Ethernet Disk mini V2"; | ||
14 | compatible = "lacie,ethernet-disk-mini-v2", "marvell-orion5x-88f5182", "marvell,orion5x"; | ||
15 | |||
16 | memory { | ||
17 | reg = <0x00000000 0x4000000>; /* 64 MB */ | ||
18 | }; | ||
19 | |||
20 | chosen { | ||
21 | bootargs = "console=ttyS0,115200n8 earlyprintk"; | ||
22 | }; | ||
23 | |||
24 | ocp@f1000000 { | ||
25 | serial@12000 { | ||
26 | clock-frequency = <166666667>; | ||
27 | status = "okay"; | ||
28 | }; | ||
29 | |||
30 | sata@80000 { | ||
31 | status = "okay"; | ||
32 | nr-ports = <2>; | ||
33 | }; | ||
34 | }; | ||
35 | |||
36 | gpio_keys { | ||
37 | compatible = "gpio-keys"; | ||
38 | #address-cells = <1>; | ||
39 | #size-cells = <0>; | ||
40 | button@1 { | ||
41 | label = "Power-on Switch"; | ||
42 | linux,code = <116>; /* KEY_POWER */ | ||
43 | gpios = <&gpio0 18 0>; | ||
44 | }; | ||
45 | }; | ||
46 | |||
47 | gpio_leds { | ||
48 | compatible = "gpio-leds"; | ||
49 | |||
50 | led@1 { | ||
51 | label = "power:blue"; | ||
52 | gpios = <&gpio0 16 1>; | ||
53 | }; | ||
54 | }; | ||
55 | }; | ||
diff --git a/arch/arm/boot/dts/orion5x.dtsi b/arch/arm/boot/dts/orion5x.dtsi new file mode 100644 index 000000000000..8aad00f81ed9 --- /dev/null +++ b/arch/arm/boot/dts/orion5x.dtsi | |||
@@ -0,0 +1,98 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2012 Thomas Petazzoni <thomas.petazzoni@free-electrons.com> | ||
3 | * | ||
4 | * This file is licensed under the terms of the GNU General Public | ||
5 | * License version 2. This program is licensed "as is" without any | ||
6 | * warranty of any kind, whether express or implied. | ||
7 | */ | ||
8 | |||
9 | /include/ "skeleton.dtsi" | ||
10 | |||
11 | / { | ||
12 | model = "Marvell Orion5x SoC"; | ||
13 | compatible = "marvell,orion5x"; | ||
14 | interrupt-parent = <&intc>; | ||
15 | |||
16 | intc: interrupt-controller { | ||
17 | compatible = "marvell,orion-intc", "marvell,intc"; | ||
18 | interrupt-controller; | ||
19 | #interrupt-cells = <1>; | ||
20 | reg = <0xf1020204 0x04>; | ||
21 | }; | ||
22 | |||
23 | ocp@f1000000 { | ||
24 | compatible = "simple-bus"; | ||
25 | ranges = <0x00000000 0xf1000000 0x4000000 | ||
26 | 0xf2200000 0xf2200000 0x0000800>; | ||
27 | #address-cells = <1>; | ||
28 | #size-cells = <1>; | ||
29 | |||
30 | gpio0: gpio@10100 { | ||
31 | compatible = "marvell,orion-gpio"; | ||
32 | #gpio-cells = <2>; | ||
33 | gpio-controller; | ||
34 | reg = <0x10100 0x40>; | ||
35 | ngpio = <32>; | ||
36 | interrupts = <6>, <7>, <8>, <9>; | ||
37 | }; | ||
38 | |||
39 | serial@12000 { | ||
40 | compatible = "ns16550a"; | ||
41 | reg = <0x12000 0x100>; | ||
42 | reg-shift = <2>; | ||
43 | interrupts = <3>; | ||
44 | /* set clock-frequency in board dts */ | ||
45 | status = "disabled"; | ||
46 | }; | ||
47 | |||
48 | serial@12100 { | ||
49 | compatible = "ns16550a"; | ||
50 | reg = <0x12100 0x100>; | ||
51 | reg-shift = <2>; | ||
52 | interrupts = <4>; | ||
53 | /* set clock-frequency in board dts */ | ||
54 | status = "disabled"; | ||
55 | }; | ||
56 | |||
57 | spi@10600 { | ||
58 | compatible = "marvell,orion-spi"; | ||
59 | #address-cells = <1>; | ||
60 | #size-cells = <0>; | ||
61 | cell-index = <0>; | ||
62 | reg = <0x10600 0x28>; | ||
63 | status = "disabled"; | ||
64 | }; | ||
65 | |||
66 | wdt@20300 { | ||
67 | compatible = "marvell,orion-wdt"; | ||
68 | reg = <0x20300 0x28>; | ||
69 | status = "okay"; | ||
70 | }; | ||
71 | |||
72 | sata@80000 { | ||
73 | compatible = "marvell,orion-sata"; | ||
74 | reg = <0x80000 0x5000>; | ||
75 | interrupts = <29>; | ||
76 | status = "disabled"; | ||
77 | }; | ||
78 | |||
79 | i2c@11000 { | ||
80 | compatible = "marvell,mv64xxx-i2c"; | ||
81 | reg = <0x11000 0x20>; | ||
82 | #address-cells = <1>; | ||
83 | #size-cells = <0>; | ||
84 | interrupts = <5>; | ||
85 | clock-frequency = <100000>; | ||
86 | status = "disabled"; | ||
87 | }; | ||
88 | |||
89 | crypto@90000 { | ||
90 | compatible = "marvell,orion-crypto"; | ||
91 | reg = <0x90000 0x10000>, | ||
92 | <0xf2200000 0x800>; | ||
93 | reg-names = "regs", "sram"; | ||
94 | interrupts = <22>; | ||
95 | status = "okay"; | ||
96 | }; | ||
97 | }; | ||
98 | }; | ||
diff --git a/arch/arm/configs/dove_defconfig b/arch/arm/configs/dove_defconfig index 40db34cf2771..0b7ee92c5713 100644 --- a/arch/arm/configs/dove_defconfig +++ b/arch/arm/configs/dove_defconfig | |||
@@ -8,11 +8,19 @@ CONFIG_MODULE_UNLOAD=y | |||
8 | # CONFIG_BLK_DEV_BSG is not set | 8 | # CONFIG_BLK_DEV_BSG is not set |
9 | CONFIG_ARCH_DOVE=y | 9 | CONFIG_ARCH_DOVE=y |
10 | CONFIG_MACH_DOVE_DB=y | 10 | CONFIG_MACH_DOVE_DB=y |
11 | CONFIG_MACH_CM_A510=y | ||
12 | CONFIG_MACH_DOVE_DT=y | ||
11 | CONFIG_NO_HZ=y | 13 | CONFIG_NO_HZ=y |
12 | CONFIG_HIGH_RES_TIMERS=y | 14 | CONFIG_HIGH_RES_TIMERS=y |
13 | CONFIG_AEABI=y | 15 | CONFIG_AEABI=y |
14 | CONFIG_ZBOOT_ROM_TEXT=0x0 | 16 | CONFIG_ZBOOT_ROM_TEXT=0x0 |
15 | CONFIG_ZBOOT_ROM_BSS=0x0 | 17 | CONFIG_ZBOOT_ROM_BSS=0x0 |
18 | CONFIG_HIGHMEM=y | ||
19 | CONFIG_USE_OF=y | ||
20 | CONFIG_ATAGS=y | ||
21 | CONFIG_ARM_APPENDED_DTB=y | ||
22 | CONFIG_ARM_ATAG_DTB_COMPAT=y | ||
23 | CONFIG_ARM_ATAG_DTB_COMPAT_CMDLINE_FROM_BOOTLOADER=y | ||
16 | CONFIG_VFP=y | 24 | CONFIG_VFP=y |
17 | CONFIG_NET=y | 25 | CONFIG_NET=y |
18 | CONFIG_PACKET=y | 26 | CONFIG_PACKET=y |
@@ -62,6 +70,9 @@ CONFIG_SERIAL_8250=y | |||
62 | CONFIG_SERIAL_8250_CONSOLE=y | 70 | CONFIG_SERIAL_8250_CONSOLE=y |
63 | # CONFIG_SERIAL_8250_PCI is not set | 71 | # CONFIG_SERIAL_8250_PCI is not set |
64 | CONFIG_SERIAL_8250_RUNTIME_UARTS=2 | 72 | CONFIG_SERIAL_8250_RUNTIME_UARTS=2 |
73 | CONFIG_SERIAL_CORE=y | ||
74 | CONFIG_SERIAL_CORE_CONSOLE=y | ||
75 | CONFIG_SERIAL_OF_PLATFORM=y | ||
65 | # CONFIG_HW_RANDOM is not set | 76 | # CONFIG_HW_RANDOM is not set |
66 | CONFIG_I2C=y | 77 | CONFIG_I2C=y |
67 | CONFIG_I2C_CHARDEV=y | 78 | CONFIG_I2C_CHARDEV=y |
@@ -74,6 +85,18 @@ CONFIG_USB_DEVICEFS=y | |||
74 | CONFIG_USB_EHCI_HCD=y | 85 | CONFIG_USB_EHCI_HCD=y |
75 | CONFIG_USB_EHCI_ROOT_HUB_TT=y | 86 | CONFIG_USB_EHCI_ROOT_HUB_TT=y |
76 | CONFIG_USB_STORAGE=y | 87 | CONFIG_USB_STORAGE=y |
88 | CONFIG_MMC=y | ||
89 | CONFIG_MMC_SDHCI=y | ||
90 | CONFIG_MMC_SDHCI_IO_ACCESSORS=y | ||
91 | CONFIG_MMC_SDHCI_PLTFM=y | ||
92 | CONFIG_MMC_SDHCI_DOVE=y | ||
93 | CONFIG_NEW_LEDS=y | ||
94 | CONFIG_LEDS_CLASS=y | ||
95 | CONFIG_LEDS_GPIO=y | ||
96 | CONFIG_LEDS_TRIGGERS=y | ||
97 | CONFIG_LEDS_TRIGGER_TIMER=y | ||
98 | CONFIG_LEDS_TRIGGER_HEARTBEAT=y | ||
99 | CONFIG_LEDS_TRIGGER_DEFAULT_ON=y | ||
77 | CONFIG_RTC_CLASS=y | 100 | CONFIG_RTC_CLASS=y |
78 | CONFIG_RTC_DRV_MV=y | 101 | CONFIG_RTC_DRV_MV=y |
79 | CONFIG_DMADEVICES=y | 102 | CONFIG_DMADEVICES=y |
@@ -122,6 +145,7 @@ CONFIG_CRYPTO_TWOFISH=y | |||
122 | CONFIG_CRYPTO_DEFLATE=y | 145 | CONFIG_CRYPTO_DEFLATE=y |
123 | CONFIG_CRYPTO_LZO=y | 146 | CONFIG_CRYPTO_LZO=y |
124 | # CONFIG_CRYPTO_ANSI_CPRNG is not set | 147 | # CONFIG_CRYPTO_ANSI_CPRNG is not set |
148 | CONFIG_CRYPTO_DEV_MV_CESA=y | ||
125 | CONFIG_CRC_CCITT=y | 149 | CONFIG_CRC_CCITT=y |
126 | CONFIG_CRC16=y | 150 | CONFIG_CRC16=y |
127 | CONFIG_LIBCRC32C=y | 151 | CONFIG_LIBCRC32C=y |
diff --git a/arch/arm/configs/kirkwood_defconfig b/arch/arm/configs/kirkwood_defconfig index 74eee0c78f28..93f3794ba5cb 100644 --- a/arch/arm/configs/kirkwood_defconfig +++ b/arch/arm/configs/kirkwood_defconfig | |||
@@ -27,6 +27,14 @@ CONFIG_MACH_GOFLEXNET_DT=y | |||
27 | CONFIG_MACH_LSXL_DT=y | 27 | CONFIG_MACH_LSXL_DT=y |
28 | CONFIG_MACH_IOMEGA_IX2_200_DT=y | 28 | CONFIG_MACH_IOMEGA_IX2_200_DT=y |
29 | CONFIG_MACH_KM_KIRKWOOD_DT=y | 29 | CONFIG_MACH_KM_KIRKWOOD_DT=y |
30 | CONFIG_MACH_INETSPACE_V2_DT=y | ||
31 | CONFIG_MACH_MPLCEC4_DT=y | ||
32 | CONFIG_MACH_NETSPACE_V2_DT=y | ||
33 | CONFIG_MACH_NETSPACE_MAX_V2_DT=y | ||
34 | CONFIG_MACH_NETSPACE_LITE_V2_DT=y | ||
35 | CONFIG_MACH_NETSPACE_MINI_V2_DT=y | ||
36 | CONFIG_MACH_OPENBLOCKS_A6_DT=y | ||
37 | CONFIG_MACH_TOPKICK_DT=y | ||
30 | CONFIG_MACH_TS219=y | 38 | CONFIG_MACH_TS219=y |
31 | CONFIG_MACH_TS41X=y | 39 | CONFIG_MACH_TS41X=y |
32 | CONFIG_MACH_DOCKSTAR=y | 40 | CONFIG_MACH_DOCKSTAR=y |
@@ -40,6 +48,7 @@ CONFIG_MACH_D2NET_V2=y | |||
40 | CONFIG_MACH_NET2BIG_V2=y | 48 | CONFIG_MACH_NET2BIG_V2=y |
41 | CONFIG_MACH_NET5BIG_V2=y | 49 | CONFIG_MACH_NET5BIG_V2=y |
42 | CONFIG_MACH_T5325=y | 50 | CONFIG_MACH_T5325=y |
51 | CONFIG_MACH_NSA310_DT=y | ||
43 | # CONFIG_CPU_FEROCEON_OLD_ID is not set | 52 | # CONFIG_CPU_FEROCEON_OLD_ID is not set |
44 | CONFIG_PREEMPT=y | 53 | CONFIG_PREEMPT=y |
45 | CONFIG_AEABI=y | 54 | CONFIG_AEABI=y |
diff --git a/arch/arm/configs/orion5x_defconfig b/arch/arm/configs/orion5x_defconfig index cd5e6ba9a54d..952430d9e2d9 100644 --- a/arch/arm/configs/orion5x_defconfig +++ b/arch/arm/configs/orion5x_defconfig | |||
@@ -1,7 +1,8 @@ | |||
1 | CONFIG_EXPERIMENTAL=y | 1 | CONFIG_EXPERIMENTAL=y |
2 | CONFIG_SYSVIPC=y | 2 | CONFIG_SYSVIPC=y |
3 | CONFIG_NO_HZ=y | ||
4 | CONFIG_HIGH_RES_TIMERS=y | ||
3 | CONFIG_LOG_BUF_SHIFT=14 | 5 | CONFIG_LOG_BUF_SHIFT=14 |
4 | CONFIG_SYSFS_DEPRECATED_V2=y | ||
5 | CONFIG_EXPERT=y | 6 | CONFIG_EXPERT=y |
6 | # CONFIG_SLUB_DEBUG is not set | 7 | # CONFIG_SLUB_DEBUG is not set |
7 | CONFIG_PROFILING=y | 8 | CONFIG_PROFILING=y |
@@ -10,6 +11,8 @@ CONFIG_KPROBES=y | |||
10 | CONFIG_MODULES=y | 11 | CONFIG_MODULES=y |
11 | CONFIG_MODULE_UNLOAD=y | 12 | CONFIG_MODULE_UNLOAD=y |
12 | # CONFIG_BLK_DEV_BSG is not set | 13 | # CONFIG_BLK_DEV_BSG is not set |
14 | CONFIG_PARTITION_ADVANCED=y | ||
15 | CONFIG_BSD_DISKLABEL=y | ||
13 | CONFIG_ARCH_ORION5X=y | 16 | CONFIG_ARCH_ORION5X=y |
14 | CONFIG_MACH_DB88F5281=y | 17 | CONFIG_MACH_DB88F5281=y |
15 | CONFIG_MACH_RD88F5182=y | 18 | CONFIG_MACH_RD88F5182=y |
@@ -24,7 +27,7 @@ CONFIG_MACH_TS409=y | |||
24 | CONFIG_MACH_WRT350N_V2=y | 27 | CONFIG_MACH_WRT350N_V2=y |
25 | CONFIG_MACH_TS78XX=y | 28 | CONFIG_MACH_TS78XX=y |
26 | CONFIG_MACH_MV2120=y | 29 | CONFIG_MACH_MV2120=y |
27 | CONFIG_MACH_EDMINI_V2=y | 30 | CONFIG_MACH_EDMINI_V2_DT=y |
28 | CONFIG_MACH_D2NET=y | 31 | CONFIG_MACH_D2NET=y |
29 | CONFIG_MACH_BIGDISK=y | 32 | CONFIG_MACH_BIGDISK=y |
30 | CONFIG_MACH_NET2BIG=y | 33 | CONFIG_MACH_NET2BIG=y |
@@ -33,17 +36,13 @@ CONFIG_MACH_WNR854T=y | |||
33 | CONFIG_MACH_RD88F5181L_GE=y | 36 | CONFIG_MACH_RD88F5181L_GE=y |
34 | CONFIG_MACH_RD88F5181L_FXO=y | 37 | CONFIG_MACH_RD88F5181L_FXO=y |
35 | CONFIG_MACH_RD88F6183AP_GE=y | 38 | CONFIG_MACH_RD88F6183AP_GE=y |
36 | CONFIG_NO_HZ=y | ||
37 | CONFIG_HIGH_RES_TIMERS=y | ||
38 | CONFIG_PREEMPT=y | 39 | CONFIG_PREEMPT=y |
39 | CONFIG_AEABI=y | 40 | CONFIG_AEABI=y |
40 | CONFIG_LEDS=y | ||
41 | CONFIG_LEDS_CPU=y | ||
42 | CONFIG_ZBOOT_ROM_TEXT=0x0 | 41 | CONFIG_ZBOOT_ROM_TEXT=0x0 |
43 | CONFIG_ZBOOT_ROM_BSS=0x0 | 42 | CONFIG_ZBOOT_ROM_BSS=0x0 |
43 | CONFIG_ARM_APPENDED_DTB=y | ||
44 | CONFIG_FPE_NWFPE=y | 44 | CONFIG_FPE_NWFPE=y |
45 | CONFIG_VFP=y | 45 | CONFIG_VFP=y |
46 | # CONFIG_SUSPEND is not set | ||
47 | CONFIG_NET=y | 46 | CONFIG_NET=y |
48 | CONFIG_PACKET=y | 47 | CONFIG_PACKET=y |
49 | CONFIG_UNIX=y | 48 | CONFIG_UNIX=y |
@@ -54,13 +53,10 @@ CONFIG_IP_PNP_DHCP=y | |||
54 | CONFIG_IP_PNP_BOOTP=y | 53 | CONFIG_IP_PNP_BOOTP=y |
55 | # CONFIG_IPV6 is not set | 54 | # CONFIG_IPV6 is not set |
56 | CONFIG_NET_DSA=y | 55 | CONFIG_NET_DSA=y |
57 | CONFIG_NET_DSA_MV88E6131=y | ||
58 | CONFIG_NET_DSA_MV88E6123_61_65=y | ||
59 | CONFIG_NET_PKTGEN=m | 56 | CONFIG_NET_PKTGEN=m |
60 | CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" | 57 | CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" |
61 | # CONFIG_FIRMWARE_IN_KERNEL is not set | 58 | # CONFIG_FIRMWARE_IN_KERNEL is not set |
62 | CONFIG_MTD=y | 59 | CONFIG_MTD=y |
63 | CONFIG_MTD_PARTITIONS=y | ||
64 | CONFIG_MTD_CMDLINE_PARTS=y | 60 | CONFIG_MTD_CMDLINE_PARTS=y |
65 | CONFIG_MTD_CHAR=y | 61 | CONFIG_MTD_CHAR=y |
66 | CONFIG_MTD_BLOCK=y | 62 | CONFIG_MTD_BLOCK=y |
@@ -82,12 +78,11 @@ CONFIG_CHR_DEV_SG=m | |||
82 | CONFIG_ATA=y | 78 | CONFIG_ATA=y |
83 | CONFIG_SATA_MV=y | 79 | CONFIG_SATA_MV=y |
84 | CONFIG_NETDEVICES=y | 80 | CONFIG_NETDEVICES=y |
85 | CONFIG_MARVELL_PHY=y | ||
86 | CONFIG_NET_ETHERNET=y | ||
87 | CONFIG_MII=y | 81 | CONFIG_MII=y |
88 | CONFIG_NET_PCI=y | 82 | CONFIG_NET_DSA_MV88E6131=y |
83 | CONFIG_NET_DSA_MV88E6123_61_65=y | ||
89 | CONFIG_MV643XX_ETH=y | 84 | CONFIG_MV643XX_ETH=y |
90 | # CONFIG_NETDEV_10000 is not set | 85 | CONFIG_MARVELL_PHY=y |
91 | # CONFIG_INPUT_MOUSEDEV is not set | 86 | # CONFIG_INPUT_MOUSEDEV is not set |
92 | CONFIG_INPUT_EVDEV=y | 87 | CONFIG_INPUT_EVDEV=y |
93 | # CONFIG_KEYBOARD_ATKBD is not set | 88 | # CONFIG_KEYBOARD_ATKBD is not set |
@@ -95,11 +90,12 @@ CONFIG_KEYBOARD_GPIO=y | |||
95 | # CONFIG_INPUT_MOUSE is not set | 90 | # CONFIG_INPUT_MOUSE is not set |
96 | # CONFIG_SERIO is not set | 91 | # CONFIG_SERIO is not set |
97 | # CONFIG_VT is not set | 92 | # CONFIG_VT is not set |
93 | CONFIG_LEGACY_PTY_COUNT=16 | ||
98 | CONFIG_SERIAL_8250=y | 94 | CONFIG_SERIAL_8250=y |
99 | CONFIG_SERIAL_8250_CONSOLE=y | 95 | CONFIG_SERIAL_8250_CONSOLE=y |
100 | # CONFIG_SERIAL_8250_PCI is not set | 96 | # CONFIG_SERIAL_8250_PCI is not set |
101 | CONFIG_SERIAL_8250_RUNTIME_UARTS=2 | 97 | CONFIG_SERIAL_8250_RUNTIME_UARTS=2 |
102 | CONFIG_LEGACY_PTY_COUNT=16 | 98 | CONFIG_SERIAL_OF_PLATFORM=y |
103 | CONFIG_HW_RANDOM_TIMERIOMEM=m | 99 | CONFIG_HW_RANDOM_TIMERIOMEM=m |
104 | CONFIG_I2C=y | 100 | CONFIG_I2C=y |
105 | # CONFIG_I2C_COMPAT is not set | 101 | # CONFIG_I2C_COMPAT is not set |
@@ -109,10 +105,8 @@ CONFIG_GPIO_SYSFS=y | |||
109 | CONFIG_SENSORS_LM75=y | 105 | CONFIG_SENSORS_LM75=y |
110 | # CONFIG_VGA_ARB is not set | 106 | # CONFIG_VGA_ARB is not set |
111 | CONFIG_USB=y | 107 | CONFIG_USB=y |
112 | CONFIG_USB_DEVICEFS=y | ||
113 | CONFIG_USB_EHCI_HCD=y | 108 | CONFIG_USB_EHCI_HCD=y |
114 | CONFIG_USB_EHCI_ROOT_HUB_TT=y | 109 | CONFIG_USB_EHCI_ROOT_HUB_TT=y |
115 | CONFIG_USB_EHCI_TT_NEWSCHED=y | ||
116 | CONFIG_USB_PRINTER=y | 110 | CONFIG_USB_PRINTER=y |
117 | CONFIG_USB_STORAGE=y | 111 | CONFIG_USB_STORAGE=y |
118 | CONFIG_USB_STORAGE_DATAFAB=y | 112 | CONFIG_USB_STORAGE_DATAFAB=y |
@@ -140,7 +134,6 @@ CONFIG_EXT2_FS=y | |||
140 | CONFIG_EXT3_FS=y | 134 | CONFIG_EXT3_FS=y |
141 | # CONFIG_EXT3_FS_XATTR is not set | 135 | # CONFIG_EXT3_FS_XATTR is not set |
142 | CONFIG_EXT4_FS=m | 136 | CONFIG_EXT4_FS=m |
143 | CONFIG_INOTIFY=y | ||
144 | CONFIG_ISO9660_FS=m | 137 | CONFIG_ISO9660_FS=m |
145 | CONFIG_JOLIET=y | 138 | CONFIG_JOLIET=y |
146 | CONFIG_UDF_FS=m | 139 | CONFIG_UDF_FS=m |
@@ -150,25 +143,18 @@ CONFIG_TMPFS=y | |||
150 | CONFIG_JFFS2_FS=y | 143 | CONFIG_JFFS2_FS=y |
151 | CONFIG_CRAMFS=y | 144 | CONFIG_CRAMFS=y |
152 | CONFIG_NFS_FS=y | 145 | CONFIG_NFS_FS=y |
153 | CONFIG_NFS_V3=y | ||
154 | CONFIG_ROOT_NFS=y | 146 | CONFIG_ROOT_NFS=y |
155 | CONFIG_PARTITION_ADVANCED=y | ||
156 | CONFIG_BSD_DISKLABEL=y | ||
157 | CONFIG_NLS_CODEPAGE_437=y | 147 | CONFIG_NLS_CODEPAGE_437=y |
158 | CONFIG_NLS_CODEPAGE_850=y | 148 | CONFIG_NLS_CODEPAGE_850=y |
159 | CONFIG_NLS_ISO8859_1=y | 149 | CONFIG_NLS_ISO8859_1=y |
160 | CONFIG_NLS_ISO8859_2=y | 150 | CONFIG_NLS_ISO8859_2=y |
161 | CONFIG_MAGIC_SYSRQ=y | 151 | CONFIG_MAGIC_SYSRQ=y |
162 | CONFIG_DEBUG_FS=y | 152 | CONFIG_DEBUG_FS=y |
163 | CONFIG_DEBUG_KERNEL=y | ||
164 | # CONFIG_DEBUG_BUGVERBOSE is not set | 153 | # CONFIG_DEBUG_BUGVERBOSE is not set |
165 | CONFIG_DEBUG_INFO=y | 154 | CONFIG_DEBUG_INFO=y |
166 | # CONFIG_RCU_CPU_STALL_DETECTOR is not set | ||
167 | CONFIG_LATENCYTOP=y | 155 | CONFIG_LATENCYTOP=y |
168 | CONFIG_SYSCTL_SYSCALL_CHECK=y | ||
169 | # CONFIG_FTRACE is not set | 156 | # CONFIG_FTRACE is not set |
170 | CONFIG_DEBUG_USER=y | 157 | CONFIG_DEBUG_USER=y |
171 | CONFIG_DEBUG_ERRORS=y | ||
172 | CONFIG_DEBUG_LL=y | 158 | CONFIG_DEBUG_LL=y |
173 | CONFIG_CRYPTO_CBC=m | 159 | CONFIG_CRYPTO_CBC=m |
174 | CONFIG_CRYPTO_ECB=m | 160 | CONFIG_CRYPTO_ECB=m |
diff --git a/arch/arm/mach-kirkwood/Kconfig b/arch/arm/mach-kirkwood/Kconfig index 50bca5032b7e..503d7dd944ff 100644 --- a/arch/arm/mach-kirkwood/Kconfig +++ b/arch/arm/mach-kirkwood/Kconfig | |||
@@ -46,6 +46,11 @@ config MACH_GURUPLUG | |||
46 | 46 | ||
47 | config ARCH_KIRKWOOD_DT | 47 | config ARCH_KIRKWOOD_DT |
48 | bool "Marvell Kirkwood Flattened Device Tree" | 48 | bool "Marvell Kirkwood Flattened Device Tree" |
49 | select POWER_SUPPLY | ||
50 | select POWER_RESET | ||
51 | select POWER_RESET_GPIO | ||
52 | select REGULATOR | ||
53 | select REGULATOR_FIXED_VOLTAGE | ||
49 | select USE_OF | 54 | select USE_OF |
50 | help | 55 | help |
51 | Say 'Y' here if you want your kernel to support the | 56 | Say 'Y' here if you want your kernel to support the |
@@ -130,6 +135,63 @@ config MACH_KM_KIRKWOOD_DT | |||
130 | Say 'Y' here if you want your kernel to support the | 135 | Say 'Y' here if you want your kernel to support the |
131 | Keymile Kirkwood Reference Desgin, using Flattened Device Tree. | 136 | Keymile Kirkwood Reference Desgin, using Flattened Device Tree. |
132 | 137 | ||
138 | config MACH_INETSPACE_V2_DT | ||
139 | bool "LaCie Internet Space v2 NAS (Flattened Device Tree)" | ||
140 | select ARCH_KIRKWOOD_DT | ||
141 | help | ||
142 | Say 'Y' here if you want your kernel to support the LaCie | ||
143 | Internet Space v2 NAS, using Flattened Device Tree. | ||
144 | |||
145 | config MACH_MPLCEC4_DT | ||
146 | bool "MPL CEC4 (Flattened Device Tree)" | ||
147 | select ARCH_KIRKWOOD_DT | ||
148 | help | ||
149 | Say 'Y' here if you want your kernel to support the | ||
150 | MPL CEC4 (Flattened Device Tree). | ||
151 | |||
152 | config MACH_NETSPACE_V2_DT | ||
153 | bool "LaCie Network Space v2 NAS (Flattened Device Tree)" | ||
154 | select ARCH_KIRKWOOD_DT | ||
155 | help | ||
156 | Say 'Y' here if you want your kernel to support the LaCie | ||
157 | Network Space v2 NAS, using Flattened Device Tree. | ||
158 | |||
159 | config MACH_NETSPACE_MAX_V2_DT | ||
160 | bool "LaCie Network Space Max v2 NAS (Flattened Device Tree)" | ||
161 | select ARCH_KIRKWOOD_DT | ||
162 | help | ||
163 | Say 'Y' here if you want your kernel to support the LaCie | ||
164 | Network Space Max v2 NAS, using Flattened Device Tree. | ||
165 | |||
166 | config MACH_NETSPACE_LITE_V2_DT | ||
167 | bool "LaCie Network Space Lite v2 NAS (Flattened Device Tree)" | ||
168 | select ARCH_KIRKWOOD_DT | ||
169 | help | ||
170 | Say 'Y' here if you want your kernel to support the LaCie | ||
171 | Network Space Lite v2 NAS, using Flattened Device Tree. | ||
172 | |||
173 | config MACH_NETSPACE_MINI_V2_DT | ||
174 | bool "LaCie Network Space Mini v2 NAS (Flattened Device Tree)" | ||
175 | select ARCH_KIRKWOOD_DT | ||
176 | help | ||
177 | Say 'Y' here if you want your kernel to support the LaCie | ||
178 | Network Space Mini v2 NAS (aka SafeBox), using Flattened | ||
179 | Device Tree. | ||
180 | |||
181 | config MACH_OPENBLOCKS_A6_DT | ||
182 | bool "Plat'Home OpenBlocks A6 (Flattened Device Tree)" | ||
183 | select ARCH_KIRKWOOD_DT | ||
184 | help | ||
185 | Say 'Y' here if you want your kernel to support the | ||
186 | Plat'Home OpenBlocks A6 (Flattened Device Tree). | ||
187 | |||
188 | config MACH_TOPKICK_DT | ||
189 | bool "USI Topkick (Flattened Device Tree)" | ||
190 | select ARCH_KIRKWOOD_DT | ||
191 | help | ||
192 | Say 'Y' here if you want your kernel to support the | ||
193 | USI Topkick, using Flattened Device Tree | ||
194 | |||
133 | config MACH_TS219 | 195 | config MACH_TS219 |
134 | bool "QNAP TS-110, TS-119, TS-119P+, TS-210, TS-219, TS-219P and TS-219P+ Turbo NAS" | 196 | bool "QNAP TS-110, TS-119, TS-119P+, TS-210, TS-219, TS-219P and TS-219P+ Turbo NAS" |
135 | help | 197 | help |
@@ -216,6 +278,14 @@ config MACH_T5325 | |||
216 | Say 'Y' here if you want your kernel to support the | 278 | Say 'Y' here if you want your kernel to support the |
217 | HP t5325 Thin Client. | 279 | HP t5325 Thin Client. |
218 | 280 | ||
281 | config MACH_NSA310_DT | ||
282 | bool "ZyXEL NSA-310 (Flattened Device Tree)" | ||
283 | select ARCH_KIRKWOOD_DT | ||
284 | select ARM_ATAG_DTB_COMPAT | ||
285 | help | ||
286 | Say 'Y' here if you want your kernel to support the | ||
287 | ZyXEL NSA-310 board (Flattened Device Tree). | ||
288 | |||
219 | endmenu | 289 | endmenu |
220 | 290 | ||
221 | endif | 291 | endif |
diff --git a/arch/arm/mach-kirkwood/Makefile b/arch/arm/mach-kirkwood/Makefile index 294779f892d9..8d2e5a96247c 100644 --- a/arch/arm/mach-kirkwood/Makefile +++ b/arch/arm/mach-kirkwood/Makefile | |||
@@ -31,3 +31,12 @@ obj-$(CONFIG_MACH_GOFLEXNET_DT) += board-goflexnet.o | |||
31 | obj-$(CONFIG_MACH_LSXL_DT) += board-lsxl.o | 31 | obj-$(CONFIG_MACH_LSXL_DT) += board-lsxl.o |
32 | obj-$(CONFIG_MACH_IOMEGA_IX2_200_DT) += board-iomega_ix2_200.o | 32 | obj-$(CONFIG_MACH_IOMEGA_IX2_200_DT) += board-iomega_ix2_200.o |
33 | obj-$(CONFIG_MACH_KM_KIRKWOOD_DT) += board-km_kirkwood.o | 33 | obj-$(CONFIG_MACH_KM_KIRKWOOD_DT) += board-km_kirkwood.o |
34 | obj-$(CONFIG_MACH_INETSPACE_V2_DT) += board-ns2.o | ||
35 | obj-$(CONFIG_MACH_MPLCEC4_DT) += board-mplcec4.o | ||
36 | obj-$(CONFIG_MACH_NETSPACE_V2_DT) += board-ns2.o | ||
37 | obj-$(CONFIG_MACH_NETSPACE_MAX_V2_DT) += board-ns2.o | ||
38 | obj-$(CONFIG_MACH_NETSPACE_LITE_V2_DT) += board-ns2.o | ||
39 | obj-$(CONFIG_MACH_NETSPACE_MINI_V2_DT) += board-ns2.o | ||
40 | obj-$(CONFIG_MACH_NSA310_DT) += board-nsa310.o | ||
41 | obj-$(CONFIG_MACH_OPENBLOCKS_A6_DT) += board-openblocks_a6.o | ||
42 | obj-$(CONFIG_MACH_TOPKICK_DT) += board-usi_topkick.o | ||
diff --git a/arch/arm/mach-kirkwood/board-dnskw.c b/arch/arm/mach-kirkwood/board-dnskw.c index 43d16d6714b8..a1aa87f09180 100644 --- a/arch/arm/mach-kirkwood/board-dnskw.c +++ b/arch/arm/mach-kirkwood/board-dnskw.c | |||
@@ -17,51 +17,11 @@ | |||
17 | #include <linux/mv643xx_eth.h> | 17 | #include <linux/mv643xx_eth.h> |
18 | #include <linux/gpio.h> | 18 | #include <linux/gpio.h> |
19 | #include "common.h" | 19 | #include "common.h" |
20 | #include "mpp.h" | ||
21 | 20 | ||
22 | static struct mv643xx_eth_platform_data dnskw_ge00_data = { | 21 | static struct mv643xx_eth_platform_data dnskw_ge00_data = { |
23 | .phy_addr = MV643XX_ETH_PHY_ADDR(8), | 22 | .phy_addr = MV643XX_ETH_PHY_ADDR(8), |
24 | }; | 23 | }; |
25 | 24 | ||
26 | static unsigned int dnskw_mpp_config[] __initdata = { | ||
27 | MPP13_UART1_TXD, /* Custom ... */ | ||
28 | MPP14_UART1_RXD, /* ... Controller (DNS-320 only) */ | ||
29 | MPP20_SATA1_ACTn, /* LED: White Right HDD */ | ||
30 | MPP21_SATA0_ACTn, /* LED: White Left HDD */ | ||
31 | MPP24_GPIO, | ||
32 | MPP25_GPIO, | ||
33 | MPP26_GPIO, /* LED: Power */ | ||
34 | MPP27_GPIO, /* LED: Red Right HDD */ | ||
35 | MPP28_GPIO, /* LED: Red Left HDD */ | ||
36 | MPP29_GPIO, /* LED: Red USB (DNS-325 only) */ | ||
37 | MPP30_GPIO, | ||
38 | MPP31_GPIO, | ||
39 | MPP32_GPIO, | ||
40 | MPP33_GPO, | ||
41 | MPP34_GPIO, /* Button: Front power */ | ||
42 | MPP35_GPIO, /* LED: Red USB (DNS-320 only) */ | ||
43 | MPP36_GPIO, /* Power: Turn off board */ | ||
44 | MPP37_GPIO, /* Power: Turn back on after power failure */ | ||
45 | MPP38_GPIO, | ||
46 | MPP39_GPIO, /* Power: SATA0 */ | ||
47 | MPP40_GPIO, /* Power: SATA1 */ | ||
48 | MPP41_GPIO, /* SATA0 present */ | ||
49 | MPP42_GPIO, /* SATA1 present */ | ||
50 | MPP43_GPIO, /* LED: White USB */ | ||
51 | MPP44_GPIO, /* Fan: Tachometer Pin */ | ||
52 | MPP45_GPIO, /* Fan: high speed */ | ||
53 | MPP46_GPIO, /* Fan: low speed */ | ||
54 | MPP47_GPIO, /* Button: Back unmount */ | ||
55 | MPP48_GPIO, /* Button: Back reset */ | ||
56 | MPP49_GPIO, /* Temp Alarm (DNS-325) Pin of U5 (DNS-320) */ | ||
57 | 0 | ||
58 | }; | ||
59 | |||
60 | static void dnskw_power_off(void) | ||
61 | { | ||
62 | gpio_set_value(36, 1); | ||
63 | } | ||
64 | |||
65 | /* Register any GPIO for output and set the value */ | 25 | /* Register any GPIO for output and set the value */ |
66 | static void __init dnskw_gpio_register(unsigned gpio, char *name, int def) | 26 | static void __init dnskw_gpio_register(unsigned gpio, char *name, int def) |
67 | { | 27 | { |
@@ -76,22 +36,8 @@ static void __init dnskw_gpio_register(unsigned gpio, char *name, int def) | |||
76 | 36 | ||
77 | void __init dnskw_init(void) | 37 | void __init dnskw_init(void) |
78 | { | 38 | { |
79 | kirkwood_mpp_conf(dnskw_mpp_config); | ||
80 | |||
81 | kirkwood_ehci_init(); | ||
82 | kirkwood_ge00_init(&dnskw_ge00_data); | 39 | kirkwood_ge00_init(&dnskw_ge00_data); |
83 | 40 | ||
84 | /* Register power-off GPIO. */ | ||
85 | if (gpio_request(36, "dnskw:power:off") == 0 | ||
86 | && gpio_direction_output(36, 0) == 0) | ||
87 | pm_power_off = dnskw_power_off; | ||
88 | else | ||
89 | pr_err("dnskw: failed to configure power-off GPIO\n"); | ||
90 | |||
91 | /* Ensure power is supplied to both HDDs */ | ||
92 | dnskw_gpio_register(39, "dnskw:power:sata0", 1); | ||
93 | dnskw_gpio_register(40, "dnskw:power:sata1", 1); | ||
94 | |||
95 | /* Set NAS to turn back on after a power failure */ | 41 | /* Set NAS to turn back on after a power failure */ |
96 | dnskw_gpio_register(37, "dnskw:power:recover", 1); | 42 | dnskw_gpio_register(37, "dnskw:power:recover", 1); |
97 | } | 43 | } |
diff --git a/arch/arm/mach-kirkwood/board-dockstar.c b/arch/arm/mach-kirkwood/board-dockstar.c index 6912882b0aa9..d7196db33984 100644 --- a/arch/arm/mach-kirkwood/board-dockstar.c +++ b/arch/arm/mach-kirkwood/board-dockstar.c | |||
@@ -17,32 +17,16 @@ | |||
17 | #include <linux/kernel.h> | 17 | #include <linux/kernel.h> |
18 | #include <linux/init.h> | 18 | #include <linux/init.h> |
19 | #include <linux/mv643xx_eth.h> | 19 | #include <linux/mv643xx_eth.h> |
20 | #include <linux/gpio.h> | ||
21 | #include "common.h" | 20 | #include "common.h" |
22 | #include "mpp.h" | ||
23 | 21 | ||
24 | static struct mv643xx_eth_platform_data dockstar_ge00_data = { | 22 | static struct mv643xx_eth_platform_data dockstar_ge00_data = { |
25 | .phy_addr = MV643XX_ETH_PHY_ADDR(0), | 23 | .phy_addr = MV643XX_ETH_PHY_ADDR(0), |
26 | }; | 24 | }; |
27 | 25 | ||
28 | static unsigned int dockstar_mpp_config[] __initdata = { | ||
29 | MPP29_GPIO, /* USB Power Enable */ | ||
30 | MPP46_GPIO, /* LED green */ | ||
31 | MPP47_GPIO, /* LED orange */ | ||
32 | 0 | ||
33 | }; | ||
34 | |||
35 | void __init dockstar_dt_init(void) | 26 | void __init dockstar_dt_init(void) |
36 | { | 27 | { |
37 | /* | 28 | /* |
38 | * Basic setup. Needs to be called early. | 29 | * Basic setup. Needs to be called early. |
39 | */ | 30 | */ |
40 | kirkwood_mpp_conf(dockstar_mpp_config); | ||
41 | |||
42 | if (gpio_request(29, "USB Power Enable") != 0 || | ||
43 | gpio_direction_output(29, 1) != 0) | ||
44 | pr_err("can't setup GPIO 29 (USB Power Enable)\n"); | ||
45 | kirkwood_ehci_init(); | ||
46 | |||
47 | kirkwood_ge00_init(&dockstar_ge00_data); | 31 | kirkwood_ge00_init(&dockstar_ge00_data); |
48 | } | 32 | } |
diff --git a/arch/arm/mach-kirkwood/board-dreamplug.c b/arch/arm/mach-kirkwood/board-dreamplug.c index 8a8ebe09e512..08248e24ffcd 100644 --- a/arch/arm/mach-kirkwood/board-dreamplug.c +++ b/arch/arm/mach-kirkwood/board-dreamplug.c | |||
@@ -17,7 +17,6 @@ | |||
17 | #include <linux/gpio.h> | 17 | #include <linux/gpio.h> |
18 | #include <linux/platform_data/mmc-mvsdio.h> | 18 | #include <linux/platform_data/mmc-mvsdio.h> |
19 | #include "common.h" | 19 | #include "common.h" |
20 | #include "mpp.h" | ||
21 | 20 | ||
22 | static struct mv643xx_eth_platform_data dreamplug_ge00_data = { | 21 | static struct mv643xx_eth_platform_data dreamplug_ge00_data = { |
23 | .phy_addr = MV643XX_ETH_PHY_ADDR(0), | 22 | .phy_addr = MV643XX_ETH_PHY_ADDR(0), |
@@ -31,25 +30,11 @@ static struct mvsdio_platform_data dreamplug_mvsdio_data = { | |||
31 | /* unfortunately the CD signal has not been connected */ | 30 | /* unfortunately the CD signal has not been connected */ |
32 | }; | 31 | }; |
33 | 32 | ||
34 | static unsigned int dreamplug_mpp_config[] __initdata = { | ||
35 | MPP0_SPI_SCn, | ||
36 | MPP1_SPI_MOSI, | ||
37 | MPP2_SPI_SCK, | ||
38 | MPP3_SPI_MISO, | ||
39 | MPP47_GPIO, /* Bluetooth LED */ | ||
40 | MPP48_GPIO, /* Wifi LED */ | ||
41 | MPP49_GPIO, /* Wifi AP LED */ | ||
42 | 0 | ||
43 | }; | ||
44 | |||
45 | void __init dreamplug_init(void) | 33 | void __init dreamplug_init(void) |
46 | { | 34 | { |
47 | /* | 35 | /* |
48 | * Basic setup. Needs to be called early. | 36 | * Basic setup. Needs to be called early. |
49 | */ | 37 | */ |
50 | kirkwood_mpp_conf(dreamplug_mpp_config); | ||
51 | |||
52 | kirkwood_ehci_init(); | ||
53 | kirkwood_ge00_init(&dreamplug_ge00_data); | 38 | kirkwood_ge00_init(&dreamplug_ge00_data); |
54 | kirkwood_ge01_init(&dreamplug_ge01_data); | 39 | kirkwood_ge01_init(&dreamplug_ge01_data); |
55 | kirkwood_sdio_init(&dreamplug_mvsdio_data); | 40 | kirkwood_sdio_init(&dreamplug_mvsdio_data); |
diff --git a/arch/arm/mach-kirkwood/board-dt.c b/arch/arm/mach-kirkwood/board-dt.c index e75fbdb533de..375f7d88551c 100644 --- a/arch/arm/mach-kirkwood/board-dt.c +++ b/arch/arm/mach-kirkwood/board-dt.c | |||
@@ -30,6 +30,8 @@ static struct of_dev_auxdata kirkwood_auxdata_lookup[] __initdata = { | |||
30 | OF_DEV_AUXDATA("marvell,orion-spi", 0xf1010600, "orion_spi.0", NULL), | 30 | OF_DEV_AUXDATA("marvell,orion-spi", 0xf1010600, "orion_spi.0", NULL), |
31 | OF_DEV_AUXDATA("marvell,mv64xxx-i2c", 0xf1011000, "mv64xxx_i2c.0", | 31 | OF_DEV_AUXDATA("marvell,mv64xxx-i2c", 0xf1011000, "mv64xxx_i2c.0", |
32 | NULL), | 32 | NULL), |
33 | OF_DEV_AUXDATA("marvell,mv64xxx-i2c", 0xf1011100, "mv64xxx_i2c.1", | ||
34 | NULL), | ||
33 | OF_DEV_AUXDATA("marvell,orion-wdt", 0xf1020300, "orion_wdt", NULL), | 35 | OF_DEV_AUXDATA("marvell,orion-wdt", 0xf1020300, "orion_wdt", NULL), |
34 | OF_DEV_AUXDATA("marvell,orion-sata", 0xf1080000, "sata_mv.0", NULL), | 36 | OF_DEV_AUXDATA("marvell,orion-sata", 0xf1080000, "sata_mv.0", NULL), |
35 | OF_DEV_AUXDATA("marvell,orion-nand", 0xf4000000, "orion_nand", NULL), | 37 | OF_DEV_AUXDATA("marvell,orion-nand", 0xf4000000, "orion_nand", NULL), |
@@ -94,6 +96,25 @@ static void __init kirkwood_dt_init(void) | |||
94 | if (of_machine_is_compatible("keymile,km_kirkwood")) | 96 | if (of_machine_is_compatible("keymile,km_kirkwood")) |
95 | km_kirkwood_init(); | 97 | km_kirkwood_init(); |
96 | 98 | ||
99 | if (of_machine_is_compatible("lacie,inetspace_v2") || | ||
100 | of_machine_is_compatible("lacie,netspace_v2") || | ||
101 | of_machine_is_compatible("lacie,netspace_max_v2") || | ||
102 | of_machine_is_compatible("lacie,netspace_lite_v2") || | ||
103 | of_machine_is_compatible("lacie,netspace_mini_v2")) | ||
104 | ns2_init(); | ||
105 | |||
106 | if (of_machine_is_compatible("mpl,cec4")) | ||
107 | mplcec4_init(); | ||
108 | |||
109 | if (of_machine_is_compatible("plathome,openblocks-a6")) | ||
110 | openblocks_a6_init(); | ||
111 | |||
112 | if (of_machine_is_compatible("usi,topkick")) | ||
113 | usi_topkick_init(); | ||
114 | |||
115 | if (of_machine_is_compatible("zyxel,nsa310")) | ||
116 | nsa310_init(); | ||
117 | |||
97 | of_platform_populate(NULL, kirkwood_dt_match_table, | 118 | of_platform_populate(NULL, kirkwood_dt_match_table, |
98 | kirkwood_auxdata_lookup, NULL); | 119 | kirkwood_auxdata_lookup, NULL); |
99 | } | 120 | } |
@@ -110,6 +131,15 @@ static const char * const kirkwood_dt_board_compat[] = { | |||
110 | "buffalo,lsxl", | 131 | "buffalo,lsxl", |
111 | "iom,ix2-200", | 132 | "iom,ix2-200", |
112 | "keymile,km_kirkwood", | 133 | "keymile,km_kirkwood", |
134 | "lacie,inetspace_v2", | ||
135 | "lacie,netspace_max_v2", | ||
136 | "lacie,netspace_v2", | ||
137 | "lacie,netspace_lite_v2", | ||
138 | "lacie,netspace_mini_v2", | ||
139 | "mpl,cec4", | ||
140 | "plathome,openblocks-a6", | ||
141 | "usi,topkick", | ||
142 | "zyxel,nsa310", | ||
113 | NULL | 143 | NULL |
114 | }; | 144 | }; |
115 | 145 | ||
diff --git a/arch/arm/mach-kirkwood/board-goflexnet.c b/arch/arm/mach-kirkwood/board-goflexnet.c index 5dcd0d62aa42..9db979aec82e 100644 --- a/arch/arm/mach-kirkwood/board-goflexnet.c +++ b/arch/arm/mach-kirkwood/board-goflexnet.c | |||
@@ -19,40 +19,16 @@ | |||
19 | #include <linux/kernel.h> | 19 | #include <linux/kernel.h> |
20 | #include <linux/init.h> | 20 | #include <linux/init.h> |
21 | #include <linux/mv643xx_eth.h> | 21 | #include <linux/mv643xx_eth.h> |
22 | #include <linux/gpio.h> | ||
23 | #include "common.h" | 22 | #include "common.h" |
24 | #include "mpp.h" | ||
25 | 23 | ||
26 | static struct mv643xx_eth_platform_data goflexnet_ge00_data = { | 24 | static struct mv643xx_eth_platform_data goflexnet_ge00_data = { |
27 | .phy_addr = MV643XX_ETH_PHY_ADDR(0), | 25 | .phy_addr = MV643XX_ETH_PHY_ADDR(0), |
28 | }; | 26 | }; |
29 | 27 | ||
30 | static unsigned int goflexnet_mpp_config[] __initdata = { | ||
31 | MPP29_GPIO, /* USB Power Enable */ | ||
32 | MPP47_GPIO, /* LED Orange */ | ||
33 | MPP46_GPIO, /* LED Green */ | ||
34 | MPP45_GPIO, /* LED Left Capacity 3 */ | ||
35 | MPP44_GPIO, /* LED Left Capacity 2 */ | ||
36 | MPP43_GPIO, /* LED Left Capacity 1 */ | ||
37 | MPP42_GPIO, /* LED Left Capacity 0 */ | ||
38 | MPP41_GPIO, /* LED Right Capacity 3 */ | ||
39 | MPP40_GPIO, /* LED Right Capacity 2 */ | ||
40 | MPP39_GPIO, /* LED Right Capacity 1 */ | ||
41 | MPP38_GPIO, /* LED Right Capacity 0 */ | ||
42 | 0 | ||
43 | }; | ||
44 | |||
45 | void __init goflexnet_init(void) | 28 | void __init goflexnet_init(void) |
46 | { | 29 | { |
47 | /* | 30 | /* |
48 | * Basic setup. Needs to be called early. | 31 | * Basic setup. Needs to be called early. |
49 | */ | 32 | */ |
50 | kirkwood_mpp_conf(goflexnet_mpp_config); | ||
51 | |||
52 | if (gpio_request(29, "USB Power Enable") != 0 || | ||
53 | gpio_direction_output(29, 1) != 0) | ||
54 | pr_err("can't setup GPIO 29 (USB Power Enable)\n"); | ||
55 | kirkwood_ehci_init(); | ||
56 | |||
57 | kirkwood_ge00_init(&goflexnet_ge00_data); | 33 | kirkwood_ge00_init(&goflexnet_ge00_data); |
58 | } | 34 | } |
diff --git a/arch/arm/mach-kirkwood/board-ib62x0.c b/arch/arm/mach-kirkwood/board-ib62x0.c index 6d3a56421142..9f6f496380d8 100644 --- a/arch/arm/mach-kirkwood/board-ib62x0.c +++ b/arch/arm/mach-kirkwood/board-ib62x0.c | |||
@@ -14,52 +14,17 @@ | |||
14 | #include <linux/kernel.h> | 14 | #include <linux/kernel.h> |
15 | #include <linux/init.h> | 15 | #include <linux/init.h> |
16 | #include <linux/mv643xx_eth.h> | 16 | #include <linux/mv643xx_eth.h> |
17 | #include <linux/gpio.h> | ||
18 | #include <linux/input.h> | 17 | #include <linux/input.h> |
19 | #include "common.h" | 18 | #include "common.h" |
20 | #include "mpp.h" | ||
21 | |||
22 | #define IB62X0_GPIO_POWER_OFF 24 | ||
23 | 19 | ||
24 | static struct mv643xx_eth_platform_data ib62x0_ge00_data = { | 20 | static struct mv643xx_eth_platform_data ib62x0_ge00_data = { |
25 | .phy_addr = MV643XX_ETH_PHY_ADDR(8), | 21 | .phy_addr = MV643XX_ETH_PHY_ADDR(8), |
26 | }; | 22 | }; |
27 | 23 | ||
28 | static unsigned int ib62x0_mpp_config[] __initdata = { | ||
29 | MPP0_NF_IO2, | ||
30 | MPP1_NF_IO3, | ||
31 | MPP2_NF_IO4, | ||
32 | MPP3_NF_IO5, | ||
33 | MPP4_NF_IO6, | ||
34 | MPP5_NF_IO7, | ||
35 | MPP18_NF_IO0, | ||
36 | MPP19_NF_IO1, | ||
37 | MPP22_GPIO, /* OS LED red */ | ||
38 | MPP24_GPIO, /* Power off device */ | ||
39 | MPP25_GPIO, /* OS LED green */ | ||
40 | MPP27_GPIO, /* USB transfer LED */ | ||
41 | MPP28_GPIO, /* Reset button */ | ||
42 | MPP29_GPIO, /* USB Copy button */ | ||
43 | 0 | ||
44 | }; | ||
45 | |||
46 | static void ib62x0_power_off(void) | ||
47 | { | ||
48 | gpio_set_value(IB62X0_GPIO_POWER_OFF, 1); | ||
49 | } | ||
50 | |||
51 | void __init ib62x0_init(void) | 24 | void __init ib62x0_init(void) |
52 | { | 25 | { |
53 | /* | 26 | /* |
54 | * Basic setup. Needs to be called early. | 27 | * Basic setup. Needs to be called early. |
55 | */ | 28 | */ |
56 | kirkwood_mpp_conf(ib62x0_mpp_config); | ||
57 | |||
58 | kirkwood_ehci_init(); | ||
59 | kirkwood_ge00_init(&ib62x0_ge00_data); | 29 | kirkwood_ge00_init(&ib62x0_ge00_data); |
60 | if (gpio_request(IB62X0_GPIO_POWER_OFF, "ib62x0:power:off") == 0 && | ||
61 | gpio_direction_output(IB62X0_GPIO_POWER_OFF, 0) == 0) | ||
62 | pm_power_off = ib62x0_power_off; | ||
63 | else | ||
64 | pr_err("board-ib62x0: failed to configure power-off GPIO\n"); | ||
65 | } | 30 | } |
diff --git a/arch/arm/mach-kirkwood/board-iconnect.c b/arch/arm/mach-kirkwood/board-iconnect.c index 24f5aa7f698b..c8ebde4919e2 100644 --- a/arch/arm/mach-kirkwood/board-iconnect.c +++ b/arch/arm/mach-kirkwood/board-iconnect.c | |||
@@ -13,31 +13,13 @@ | |||
13 | #include <linux/of.h> | 13 | #include <linux/of.h> |
14 | #include <linux/mv643xx_eth.h> | 14 | #include <linux/mv643xx_eth.h> |
15 | #include "common.h" | 15 | #include "common.h" |
16 | #include "mpp.h" | ||
17 | 16 | ||
18 | static struct mv643xx_eth_platform_data iconnect_ge00_data = { | 17 | static struct mv643xx_eth_platform_data iconnect_ge00_data = { |
19 | .phy_addr = MV643XX_ETH_PHY_ADDR(11), | 18 | .phy_addr = MV643XX_ETH_PHY_ADDR(11), |
20 | }; | 19 | }; |
21 | 20 | ||
22 | static unsigned int iconnect_mpp_config[] __initdata = { | ||
23 | MPP12_GPIO, | ||
24 | MPP35_GPIO, | ||
25 | MPP41_GPIO, | ||
26 | MPP42_GPIO, | ||
27 | MPP43_GPIO, | ||
28 | MPP44_GPIO, | ||
29 | MPP45_GPIO, | ||
30 | MPP46_GPIO, | ||
31 | MPP47_GPIO, | ||
32 | MPP48_GPIO, | ||
33 | 0 | ||
34 | }; | ||
35 | |||
36 | void __init iconnect_init(void) | 21 | void __init iconnect_init(void) |
37 | { | 22 | { |
38 | kirkwood_mpp_conf(iconnect_mpp_config); | ||
39 | |||
40 | kirkwood_ehci_init(); | ||
41 | kirkwood_ge00_init(&iconnect_ge00_data); | 23 | kirkwood_ge00_init(&iconnect_ge00_data); |
42 | } | 24 | } |
43 | 25 | ||
diff --git a/arch/arm/mach-kirkwood/board-iomega_ix2_200.c b/arch/arm/mach-kirkwood/board-iomega_ix2_200.c index e4ed62c28f54..f655b2637b0e 100644 --- a/arch/arm/mach-kirkwood/board-iomega_ix2_200.c +++ b/arch/arm/mach-kirkwood/board-iomega_ix2_200.c | |||
@@ -13,7 +13,6 @@ | |||
13 | #include <linux/mv643xx_eth.h> | 13 | #include <linux/mv643xx_eth.h> |
14 | #include <linux/ethtool.h> | 14 | #include <linux/ethtool.h> |
15 | #include "common.h" | 15 | #include "common.h" |
16 | #include "mpp.h" | ||
17 | 16 | ||
18 | static struct mv643xx_eth_platform_data iomega_ix2_200_ge00_data = { | 17 | static struct mv643xx_eth_platform_data iomega_ix2_200_ge00_data = { |
19 | .phy_addr = MV643XX_ETH_PHY_NONE, | 18 | .phy_addr = MV643XX_ETH_PHY_NONE, |
@@ -21,35 +20,10 @@ static struct mv643xx_eth_platform_data iomega_ix2_200_ge00_data = { | |||
21 | .duplex = DUPLEX_FULL, | 20 | .duplex = DUPLEX_FULL, |
22 | }; | 21 | }; |
23 | 22 | ||
24 | static unsigned int iomega_ix2_200_mpp_config[] __initdata = { | ||
25 | MPP12_GPIO, /* Reset Button */ | ||
26 | MPP14_GPIO, /* Power Button */ | ||
27 | MPP15_GPIO, /* Backup LED (blue) */ | ||
28 | MPP16_GPIO, /* Power LED (white) */ | ||
29 | MPP35_GPIO, /* OTB Button */ | ||
30 | MPP36_GPIO, /* Rebuild LED (white) */ | ||
31 | MPP37_GPIO, /* Health LED (red) */ | ||
32 | MPP38_GPIO, /* SATA LED brightness control 1 */ | ||
33 | MPP39_GPIO, /* SATA LED brightness control 2 */ | ||
34 | MPP40_GPIO, /* Backup LED brightness control 1 */ | ||
35 | MPP41_GPIO, /* Backup LED brightness control 2 */ | ||
36 | MPP42_GPIO, /* Power LED brightness control 1 */ | ||
37 | MPP43_GPIO, /* Power LED brightness control 2 */ | ||
38 | MPP44_GPIO, /* Health LED brightness control 1 */ | ||
39 | MPP45_GPIO, /* Health LED brightness control 2 */ | ||
40 | MPP46_GPIO, /* Rebuild LED brightness control 1 */ | ||
41 | MPP47_GPIO, /* Rebuild LED brightness control 2 */ | ||
42 | 0 | ||
43 | }; | ||
44 | |||
45 | void __init iomega_ix2_200_init(void) | 23 | void __init iomega_ix2_200_init(void) |
46 | { | 24 | { |
47 | /* | 25 | /* |
48 | * Basic setup. Needs to be called early. | 26 | * Basic setup. Needs to be called early. |
49 | */ | 27 | */ |
50 | kirkwood_mpp_conf(iomega_ix2_200_mpp_config); | ||
51 | |||
52 | kirkwood_ehci_init(); | ||
53 | |||
54 | kirkwood_ge01_init(&iomega_ix2_200_ge00_data); | 28 | kirkwood_ge01_init(&iomega_ix2_200_ge00_data); |
55 | } | 29 | } |
diff --git a/arch/arm/mach-kirkwood/board-km_kirkwood.c b/arch/arm/mach-kirkwood/board-km_kirkwood.c index f7d32834b757..44e4605ba0bf 100644 --- a/arch/arm/mach-kirkwood/board-km_kirkwood.c +++ b/arch/arm/mach-kirkwood/board-km_kirkwood.c | |||
@@ -18,27 +18,15 @@ | |||
18 | #include <linux/clk.h> | 18 | #include <linux/clk.h> |
19 | #include <linux/clk-private.h> | 19 | #include <linux/clk-private.h> |
20 | #include "common.h" | 20 | #include "common.h" |
21 | #include "mpp.h" | ||
22 | 21 | ||
23 | static struct mv643xx_eth_platform_data km_kirkwood_ge00_data = { | 22 | static struct mv643xx_eth_platform_data km_kirkwood_ge00_data = { |
24 | .phy_addr = MV643XX_ETH_PHY_ADDR(0), | 23 | .phy_addr = MV643XX_ETH_PHY_ADDR(0), |
25 | }; | 24 | }; |
26 | 25 | ||
27 | static unsigned int km_kirkwood_mpp_config[] __initdata = { | ||
28 | MPP8_GPIO, /* I2C SDA */ | ||
29 | MPP9_GPIO, /* I2C SCL */ | ||
30 | 0 | ||
31 | }; | ||
32 | |||
33 | void __init km_kirkwood_init(void) | 26 | void __init km_kirkwood_init(void) |
34 | { | 27 | { |
35 | struct clk *sata_clk; | 28 | struct clk *sata_clk; |
36 | /* | 29 | /* |
37 | * Basic setup. Needs to be called early. | ||
38 | */ | ||
39 | kirkwood_mpp_conf(km_kirkwood_mpp_config); | ||
40 | |||
41 | /* | ||
42 | * Our variant of kirkwood (integrated in the Bobcat) hangs on accessing | 30 | * Our variant of kirkwood (integrated in the Bobcat) hangs on accessing |
43 | * SATA bits (14-15) of the Clock Gating Control Register. Since these | 31 | * SATA bits (14-15) of the Clock Gating Control Register. Since these |
44 | * devices are also not present in this variant, their clocks get | 32 | * devices are also not present in this variant, their clocks get |
@@ -52,6 +40,5 @@ void __init km_kirkwood_init(void) | |||
52 | if (!IS_ERR(sata_clk)) | 40 | if (!IS_ERR(sata_clk)) |
53 | sata_clk->flags |= CLK_IGNORE_UNUSED; | 41 | sata_clk->flags |= CLK_IGNORE_UNUSED; |
54 | 42 | ||
55 | kirkwood_ehci_init(); | ||
56 | kirkwood_ge00_init(&km_kirkwood_ge00_data); | 43 | kirkwood_ge00_init(&km_kirkwood_ge00_data); |
57 | } | 44 | } |
diff --git a/arch/arm/mach-kirkwood/board-lsxl.c b/arch/arm/mach-kirkwood/board-lsxl.c index 64e5cc6b6d5f..4ec8b7ae784a 100644 --- a/arch/arm/mach-kirkwood/board-lsxl.c +++ b/arch/arm/mach-kirkwood/board-lsxl.c | |||
@@ -15,10 +15,7 @@ | |||
15 | #include <linux/init.h> | 15 | #include <linux/init.h> |
16 | #include <linux/platform_device.h> | 16 | #include <linux/platform_device.h> |
17 | #include <linux/mv643xx_eth.h> | 17 | #include <linux/mv643xx_eth.h> |
18 | #include <linux/gpio.h> | ||
19 | #include <linux/gpio-fan.h> | ||
20 | #include "common.h" | 18 | #include "common.h" |
21 | #include "mpp.h" | ||
22 | 19 | ||
23 | static struct mv643xx_eth_platform_data lsxl_ge00_data = { | 20 | static struct mv643xx_eth_platform_data lsxl_ge00_data = { |
24 | .phy_addr = MV643XX_ETH_PHY_ADDR(0), | 21 | .phy_addr = MV643XX_ETH_PHY_ADDR(0), |
@@ -28,68 +25,6 @@ static struct mv643xx_eth_platform_data lsxl_ge01_data = { | |||
28 | .phy_addr = MV643XX_ETH_PHY_ADDR(8), | 25 | .phy_addr = MV643XX_ETH_PHY_ADDR(8), |
29 | }; | 26 | }; |
30 | 27 | ||
31 | static unsigned int lsxl_mpp_config[] __initdata = { | ||
32 | MPP10_GPO, /* HDD Power Enable */ | ||
33 | MPP11_GPIO, /* USB Vbus Enable */ | ||
34 | MPP18_GPO, /* FAN High Enable# */ | ||
35 | MPP19_GPO, /* FAN Low Enable# */ | ||
36 | MPP36_GPIO, /* Function Blue LED */ | ||
37 | MPP37_GPIO, /* Alarm LED */ | ||
38 | MPP38_GPIO, /* Info LED */ | ||
39 | MPP39_GPIO, /* Power LED */ | ||
40 | MPP40_GPIO, /* Fan Lock */ | ||
41 | MPP41_GPIO, /* Function Button */ | ||
42 | MPP42_GPIO, /* Power Switch */ | ||
43 | MPP43_GPIO, /* Power Auto Switch */ | ||
44 | MPP48_GPIO, /* Function Red LED */ | ||
45 | 0 | ||
46 | }; | ||
47 | |||
48 | #define LSXL_GPIO_FAN_HIGH 18 | ||
49 | #define LSXL_GPIO_FAN_LOW 19 | ||
50 | #define LSXL_GPIO_FAN_LOCK 40 | ||
51 | |||
52 | static struct gpio_fan_alarm lsxl_alarm = { | ||
53 | .gpio = LSXL_GPIO_FAN_LOCK, | ||
54 | }; | ||
55 | |||
56 | static struct gpio_fan_speed lsxl_speeds[] = { | ||
57 | { | ||
58 | .rpm = 0, | ||
59 | .ctrl_val = 3, | ||
60 | }, { | ||
61 | .rpm = 1500, | ||
62 | .ctrl_val = 1, | ||
63 | }, { | ||
64 | .rpm = 3250, | ||
65 | .ctrl_val = 2, | ||
66 | }, { | ||
67 | .rpm = 5000, | ||
68 | .ctrl_val = 0, | ||
69 | } | ||
70 | }; | ||
71 | |||
72 | static int lsxl_gpio_list[] = { | ||
73 | LSXL_GPIO_FAN_HIGH, LSXL_GPIO_FAN_LOW, | ||
74 | }; | ||
75 | |||
76 | static struct gpio_fan_platform_data lsxl_fan_data = { | ||
77 | .num_ctrl = ARRAY_SIZE(lsxl_gpio_list), | ||
78 | .ctrl = lsxl_gpio_list, | ||
79 | .alarm = &lsxl_alarm, | ||
80 | .num_speed = ARRAY_SIZE(lsxl_speeds), | ||
81 | .speed = lsxl_speeds, | ||
82 | }; | ||
83 | |||
84 | static struct platform_device lsxl_fan_device = { | ||
85 | .name = "gpio-fan", | ||
86 | .id = -1, | ||
87 | .num_resources = 0, | ||
88 | .dev = { | ||
89 | .platform_data = &lsxl_fan_data, | ||
90 | }, | ||
91 | }; | ||
92 | |||
93 | /* | 28 | /* |
94 | * On the LS-XHL/LS-CHLv2, the shutdown process is following: | 29 | * On the LS-XHL/LS-CHLv2, the shutdown process is following: |
95 | * - Userland monitors key events until the power switch goes to off position | 30 | * - Userland monitors key events until the power switch goes to off position |
@@ -103,24 +38,14 @@ static void lsxl_power_off(void) | |||
103 | kirkwood_restart('h', NULL); | 38 | kirkwood_restart('h', NULL); |
104 | } | 39 | } |
105 | 40 | ||
106 | #define LSXL_GPIO_HDD_POWER 10 | ||
107 | #define LSXL_GPIO_USB_POWER 11 | ||
108 | |||
109 | void __init lsxl_init(void) | 41 | void __init lsxl_init(void) |
110 | { | 42 | { |
111 | /* | 43 | /* |
112 | * Basic setup. Needs to be called early. | 44 | * Basic setup. Needs to be called early. |
113 | */ | 45 | */ |
114 | kirkwood_mpp_conf(lsxl_mpp_config); | ||
115 | |||
116 | /* usb and sata power on */ | ||
117 | gpio_set_value(LSXL_GPIO_USB_POWER, 1); | ||
118 | gpio_set_value(LSXL_GPIO_HDD_POWER, 1); | ||
119 | 46 | ||
120 | kirkwood_ehci_init(); | ||
121 | kirkwood_ge00_init(&lsxl_ge00_data); | 47 | kirkwood_ge00_init(&lsxl_ge00_data); |
122 | kirkwood_ge01_init(&lsxl_ge01_data); | 48 | kirkwood_ge01_init(&lsxl_ge01_data); |
123 | platform_device_register(&lsxl_fan_device); | ||
124 | 49 | ||
125 | /* register power-off method */ | 50 | /* register power-off method */ |
126 | pm_power_off = lsxl_power_off; | 51 | pm_power_off = lsxl_power_off; |
diff --git a/arch/arm/mach-kirkwood/board-mplcec4.c b/arch/arm/mach-kirkwood/board-mplcec4.c new file mode 100644 index 000000000000..56bfe5a1605a --- /dev/null +++ b/arch/arm/mach-kirkwood/board-mplcec4.c | |||
@@ -0,0 +1,44 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2012 MPL AG, Switzerland | ||
3 | * Stefan Peter <s.peter@mpl.ch> | ||
4 | * | ||
5 | * arch/arm/mach-kirkwood/board-mplcec4.c | ||
6 | * | ||
7 | * This file is licensed under the terms of the GNU General Public | ||
8 | * License version 2. This program is licensed "as is" without any | ||
9 | * warranty of any kind, whether express or implied. | ||
10 | */ | ||
11 | |||
12 | #include <linux/kernel.h> | ||
13 | #include <linux/init.h> | ||
14 | #include <linux/mv643xx_eth.h> | ||
15 | #include <linux/platform_data/mmc-mvsdio.h> | ||
16 | #include "common.h" | ||
17 | #include "mpp.h" | ||
18 | |||
19 | static struct mv643xx_eth_platform_data mplcec4_ge00_data = { | ||
20 | .phy_addr = MV643XX_ETH_PHY_ADDR(1), | ||
21 | }; | ||
22 | |||
23 | static struct mv643xx_eth_platform_data mplcec4_ge01_data = { | ||
24 | .phy_addr = MV643XX_ETH_PHY_ADDR(2), | ||
25 | }; | ||
26 | |||
27 | static struct mvsdio_platform_data mplcec4_mvsdio_data = { | ||
28 | .gpio_card_detect = 47, /* MPP47 used as SD card detect */ | ||
29 | }; | ||
30 | |||
31 | |||
32 | void __init mplcec4_init(void) | ||
33 | { | ||
34 | /* | ||
35 | * Basic setup. Needs to be called early. | ||
36 | */ | ||
37 | kirkwood_ge00_init(&mplcec4_ge00_data); | ||
38 | kirkwood_ge01_init(&mplcec4_ge01_data); | ||
39 | kirkwood_sdio_init(&mplcec4_mvsdio_data); | ||
40 | kirkwood_pcie_init(KW_PCIE0); | ||
41 | } | ||
42 | |||
43 | |||
44 | |||
diff --git a/arch/arm/mach-kirkwood/board-ns2.c b/arch/arm/mach-kirkwood/board-ns2.c new file mode 100644 index 000000000000..8821720ab5a4 --- /dev/null +++ b/arch/arm/mach-kirkwood/board-ns2.c | |||
@@ -0,0 +1,86 @@ | |||
1 | /* | ||
2 | * Copyright 2012 (C), Simon Guinot <simon.guinot@sequanux.org> | ||
3 | * | ||
4 | * arch/arm/mach-kirkwood/board-ns2.c | ||
5 | * | ||
6 | * LaCie Network Space v2 board (and parents) initialization for drivers | ||
7 | * not converted to flattened device tree yet. | ||
8 | * | ||
9 | * This file is licensed under the terms of the GNU General Public | ||
10 | * License version 2. This program is licensed "as is" without any | ||
11 | * warranty of any kind, whether express or implied. | ||
12 | */ | ||
13 | |||
14 | #include <linux/kernel.h> | ||
15 | #include <linux/init.h> | ||
16 | #include <linux/platform_device.h> | ||
17 | #include <linux/mv643xx_eth.h> | ||
18 | #include <linux/gpio.h> | ||
19 | #include <linux/of.h> | ||
20 | #include "common.h" | ||
21 | #include "mpp.h" | ||
22 | |||
23 | static struct mv643xx_eth_platform_data ns2_ge00_data = { | ||
24 | .phy_addr = MV643XX_ETH_PHY_ADDR(8), | ||
25 | }; | ||
26 | |||
27 | static unsigned int ns2_mpp_config[] __initdata = { | ||
28 | MPP0_SPI_SCn, | ||
29 | MPP1_SPI_MOSI, | ||
30 | MPP2_SPI_SCK, | ||
31 | MPP3_SPI_MISO, | ||
32 | MPP4_NF_IO6, | ||
33 | MPP5_NF_IO7, | ||
34 | MPP6_SYSRST_OUTn, | ||
35 | MPP7_GPO, /* Fan speed (bit 1) */ | ||
36 | MPP8_TW0_SDA, | ||
37 | MPP9_TW0_SCK, | ||
38 | MPP10_UART0_TXD, | ||
39 | MPP11_UART0_RXD, | ||
40 | MPP12_GPO, /* Red led */ | ||
41 | MPP14_GPIO, /* USB fuse */ | ||
42 | MPP16_GPIO, /* SATA 0 power */ | ||
43 | MPP17_GPIO, /* SATA 1 power */ | ||
44 | MPP18_NF_IO0, | ||
45 | MPP19_NF_IO1, | ||
46 | MPP20_SATA1_ACTn, | ||
47 | MPP21_SATA0_ACTn, | ||
48 | MPP22_GPIO, /* Fan speed (bit 0) */ | ||
49 | MPP23_GPIO, /* Fan power */ | ||
50 | MPP24_GPIO, /* USB mode select */ | ||
51 | MPP25_GPIO, /* Fan rotation fail */ | ||
52 | MPP26_GPIO, /* USB device vbus */ | ||
53 | MPP28_GPIO, /* USB enable host vbus */ | ||
54 | MPP29_GPIO, /* Blue led (slow register) */ | ||
55 | MPP30_GPIO, /* Blue led (command register) */ | ||
56 | MPP31_GPIO, /* Board power off */ | ||
57 | MPP32_GPIO, /* Power button (0 = Released, 1 = Pushed) */ | ||
58 | MPP33_GPO, /* Fan speed (bit 2) */ | ||
59 | 0 | ||
60 | }; | ||
61 | |||
62 | #define NS2_GPIO_POWER_OFF 31 | ||
63 | |||
64 | static void ns2_power_off(void) | ||
65 | { | ||
66 | gpio_set_value(NS2_GPIO_POWER_OFF, 1); | ||
67 | } | ||
68 | |||
69 | void __init ns2_init(void) | ||
70 | { | ||
71 | /* | ||
72 | * Basic setup. Needs to be called early. | ||
73 | */ | ||
74 | kirkwood_mpp_conf(ns2_mpp_config); | ||
75 | |||
76 | if (of_machine_is_compatible("lacie,netspace_lite_v2") || | ||
77 | of_machine_is_compatible("lacie,netspace_mini_v2")) | ||
78 | ns2_ge00_data.phy_addr = MV643XX_ETH_PHY_ADDR(0); | ||
79 | kirkwood_ge00_init(&ns2_ge00_data); | ||
80 | |||
81 | if (gpio_request(NS2_GPIO_POWER_OFF, "power-off") == 0 && | ||
82 | gpio_direction_output(NS2_GPIO_POWER_OFF, 0) == 0) | ||
83 | pm_power_off = ns2_power_off; | ||
84 | else | ||
85 | pr_err("ns2: failed to configure power-off GPIO\n"); | ||
86 | } | ||
diff --git a/arch/arm/mach-kirkwood/board-nsa310.c b/arch/arm/mach-kirkwood/board-nsa310.c new file mode 100644 index 000000000000..f58d2e1a4042 --- /dev/null +++ b/arch/arm/mach-kirkwood/board-nsa310.c | |||
@@ -0,0 +1,101 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-kirkwood/nsa-310-setup.c | ||
3 | * | ||
4 | * ZyXEL NSA-310 Setup | ||
5 | * | ||
6 | * This file is licensed under the terms of the GNU General Public | ||
7 | * License version 2. This program is licensed "as is" without any | ||
8 | * warranty of any kind, whether express or implied. | ||
9 | */ | ||
10 | |||
11 | #include <linux/kernel.h> | ||
12 | #include <linux/init.h> | ||
13 | #include <linux/i2c.h> | ||
14 | #include <linux/gpio.h> | ||
15 | |||
16 | #include <asm/mach-types.h> | ||
17 | #include <asm/mach/arch.h> | ||
18 | #include <mach/kirkwood.h> | ||
19 | #include "common.h" | ||
20 | #include "mpp.h" | ||
21 | |||
22 | #define NSA310_GPIO_USB_POWER_OFF 21 | ||
23 | #define NSA310_GPIO_POWER_OFF 48 | ||
24 | |||
25 | static unsigned int nsa310_mpp_config[] __initdata = { | ||
26 | MPP12_GPIO, /* led esata green */ | ||
27 | MPP13_GPIO, /* led esata red */ | ||
28 | MPP15_GPIO, /* led usb green */ | ||
29 | MPP16_GPIO, /* led usb red */ | ||
30 | MPP21_GPIO, /* control usb power off */ | ||
31 | MPP28_GPIO, /* led sys green */ | ||
32 | MPP29_GPIO, /* led sys red */ | ||
33 | MPP36_GPIO, /* key reset */ | ||
34 | MPP37_GPIO, /* key copy */ | ||
35 | MPP39_GPIO, /* led copy green */ | ||
36 | MPP40_GPIO, /* led copy red */ | ||
37 | MPP41_GPIO, /* led hdd green */ | ||
38 | MPP42_GPIO, /* led hdd red */ | ||
39 | MPP44_GPIO, /* ?? */ | ||
40 | MPP46_GPIO, /* key power */ | ||
41 | MPP48_GPIO, /* control power off */ | ||
42 | 0 | ||
43 | }; | ||
44 | |||
45 | static struct i2c_board_info __initdata nsa310_i2c_info[] = { | ||
46 | { I2C_BOARD_INFO("adt7476", 0x2e) }, | ||
47 | }; | ||
48 | |||
49 | static void nsa310_power_off(void) | ||
50 | { | ||
51 | gpio_set_value(NSA310_GPIO_POWER_OFF, 1); | ||
52 | } | ||
53 | |||
54 | static int __init nsa310_gpio_request(unsigned int gpio, unsigned long flags, | ||
55 | const char *label) | ||
56 | { | ||
57 | int err; | ||
58 | |||
59 | err = gpio_request_one(gpio, flags, label); | ||
60 | if (err) | ||
61 | pr_err("NSA-310: can't setup GPIO%u (%s), err=%d\n", | ||
62 | gpio, label, err); | ||
63 | |||
64 | return err; | ||
65 | } | ||
66 | |||
67 | static void __init nsa310_gpio_init(void) | ||
68 | { | ||
69 | int err; | ||
70 | |||
71 | err = nsa310_gpio_request(NSA310_GPIO_POWER_OFF, GPIOF_OUT_INIT_LOW, | ||
72 | "Power Off"); | ||
73 | if (!err) | ||
74 | pm_power_off = nsa310_power_off; | ||
75 | |||
76 | nsa310_gpio_request(NSA310_GPIO_USB_POWER_OFF, GPIOF_OUT_INIT_LOW, | ||
77 | "USB Power Off"); | ||
78 | } | ||
79 | |||
80 | void __init nsa310_init(void) | ||
81 | { | ||
82 | u32 dev, rev; | ||
83 | |||
84 | kirkwood_mpp_conf(nsa310_mpp_config); | ||
85 | |||
86 | nsa310_gpio_init(); | ||
87 | |||
88 | kirkwood_pcie_id(&dev, &rev); | ||
89 | |||
90 | i2c_register_board_info(0, ARRAY_AND_SIZE(nsa310_i2c_info)); | ||
91 | } | ||
92 | |||
93 | static int __init nsa310_pci_init(void) | ||
94 | { | ||
95 | if (of_machine_is_compatible("zyxel,nsa310")) | ||
96 | kirkwood_pcie_init(KW_PCIE0); | ||
97 | |||
98 | return 0; | ||
99 | } | ||
100 | |||
101 | subsys_initcall(nsa310_pci_init); | ||
diff --git a/arch/arm/mach-kirkwood/board-openblocks_a6.c b/arch/arm/mach-kirkwood/board-openblocks_a6.c new file mode 100644 index 000000000000..815fc6451d52 --- /dev/null +++ b/arch/arm/mach-kirkwood/board-openblocks_a6.c | |||
@@ -0,0 +1,70 @@ | |||
1 | /* | ||
2 | * Copyright 2012 Nobuhiro Iwamatsu <iwamatsu@nigauri.org> | ||
3 | * | ||
4 | * arch/arm/mach-kirkwood/board-openblocks_a6.c | ||
5 | * | ||
6 | * This file is licensed under the terms of the GNU General Public | ||
7 | * License version 2. This program is licensed "as is" without any | ||
8 | * warranty of any kind, whether express or implied. | ||
9 | */ | ||
10 | |||
11 | #include <linux/kernel.h> | ||
12 | #include <linux/init.h> | ||
13 | #include <linux/mv643xx_eth.h> | ||
14 | #include <linux/clk.h> | ||
15 | #include <linux/clk-private.h> | ||
16 | #include "common.h" | ||
17 | #include "mpp.h" | ||
18 | |||
19 | static struct mv643xx_eth_platform_data openblocks_ge00_data = { | ||
20 | .phy_addr = MV643XX_ETH_PHY_ADDR(0), | ||
21 | }; | ||
22 | |||
23 | static unsigned int openblocks_a6_mpp_config[] __initdata = { | ||
24 | MPP0_NF_IO2, | ||
25 | MPP1_NF_IO3, | ||
26 | MPP2_NF_IO4, | ||
27 | MPP3_NF_IO5, | ||
28 | MPP4_NF_IO6, | ||
29 | MPP5_NF_IO7, | ||
30 | MPP6_SYSRST_OUTn, | ||
31 | MPP8_UART1_RTS, | ||
32 | MPP9_UART1_CTS, | ||
33 | MPP10_UART0_TXD, | ||
34 | MPP11_UART0_RXD, | ||
35 | MPP13_UART1_TXD, | ||
36 | MPP14_UART1_RXD, | ||
37 | MPP15_UART0_RTS, | ||
38 | MPP16_UART0_CTS, | ||
39 | MPP18_NF_IO0, | ||
40 | MPP19_NF_IO1, | ||
41 | MPP20_GPIO, /* DIP SW0 */ | ||
42 | MPP21_GPIO, /* DIP SW1 */ | ||
43 | MPP22_GPIO, /* DIP SW2 */ | ||
44 | MPP23_GPIO, /* DIP SW3 */ | ||
45 | MPP24_GPIO, /* GPIO 0 */ | ||
46 | MPP25_GPIO, /* GPIO 1 */ | ||
47 | MPP26_GPIO, /* GPIO 2 */ | ||
48 | MPP27_GPIO, /* GPIO 3 */ | ||
49 | MPP28_GPIO, /* GPIO 4 */ | ||
50 | MPP29_GPIO, /* GPIO 5 */ | ||
51 | MPP30_GPIO, /* GPIO 6 */ | ||
52 | MPP31_GPIO, /* GPIO 7 */ | ||
53 | MPP36_TW1_SDA, | ||
54 | MPP37_TW1_SCK, | ||
55 | MPP38_GPIO, /* INIT */ | ||
56 | MPP39_GPIO, /* USB OC */ | ||
57 | MPP41_GPIO, /* LED: Red */ | ||
58 | MPP42_GPIO, /* LED: Green */ | ||
59 | MPP43_GPIO, /* LED: Yellow */ | ||
60 | 0, | ||
61 | }; | ||
62 | |||
63 | void __init openblocks_a6_init(void) | ||
64 | { | ||
65 | /* | ||
66 | * Basic setup. Needs to be called early. | ||
67 | */ | ||
68 | kirkwood_mpp_conf(openblocks_a6_mpp_config); | ||
69 | kirkwood_ge00_init(&openblocks_ge00_data); | ||
70 | } | ||
diff --git a/arch/arm/mach-kirkwood/board-ts219.c b/arch/arm/mach-kirkwood/board-ts219.c index f3bfedae3a20..acb0187c7ee1 100644 --- a/arch/arm/mach-kirkwood/board-ts219.c +++ b/arch/arm/mach-kirkwood/board-ts219.c | |||
@@ -23,47 +23,21 @@ | |||
23 | #include <asm/mach/arch.h> | 23 | #include <asm/mach/arch.h> |
24 | #include <mach/kirkwood.h> | 24 | #include <mach/kirkwood.h> |
25 | #include "common.h" | 25 | #include "common.h" |
26 | #include "mpp.h" | ||
27 | #include "tsx1x-common.h" | 26 | #include "tsx1x-common.h" |
28 | 27 | ||
29 | static struct mv643xx_eth_platform_data qnap_ts219_ge00_data = { | 28 | static struct mv643xx_eth_platform_data qnap_ts219_ge00_data = { |
30 | .phy_addr = MV643XX_ETH_PHY_ADDR(8), | 29 | .phy_addr = MV643XX_ETH_PHY_ADDR(8), |
31 | }; | 30 | }; |
32 | 31 | ||
33 | static unsigned int qnap_ts219_mpp_config[] __initdata = { | ||
34 | MPP0_SPI_SCn, | ||
35 | MPP1_SPI_MOSI, | ||
36 | MPP2_SPI_SCK, | ||
37 | MPP3_SPI_MISO, | ||
38 | MPP4_SATA1_ACTn, | ||
39 | MPP5_SATA0_ACTn, | ||
40 | MPP8_TW0_SDA, | ||
41 | MPP9_TW0_SCK, | ||
42 | MPP10_UART0_TXD, | ||
43 | MPP11_UART0_RXD, | ||
44 | MPP13_UART1_TXD, /* PIC controller */ | ||
45 | MPP14_UART1_RXD, /* PIC controller */ | ||
46 | MPP15_GPIO, /* USB Copy button (on devices with 88F6281) */ | ||
47 | MPP16_GPIO, /* Reset button (on devices with 88F6281) */ | ||
48 | MPP36_GPIO, /* RAM: 0: 256 MB, 1: 512 MB */ | ||
49 | MPP37_GPIO, /* Reset button (on devices with 88F6282) */ | ||
50 | MPP43_GPIO, /* USB Copy button (on devices with 88F6282) */ | ||
51 | MPP44_GPIO, /* Board ID: 0: TS-11x, 1: TS-21x */ | ||
52 | 0 | ||
53 | }; | ||
54 | |||
55 | void __init qnap_dt_ts219_init(void) | 32 | void __init qnap_dt_ts219_init(void) |
56 | { | 33 | { |
57 | u32 dev, rev; | 34 | u32 dev, rev; |
58 | 35 | ||
59 | kirkwood_mpp_conf(qnap_ts219_mpp_config); | ||
60 | |||
61 | kirkwood_pcie_id(&dev, &rev); | 36 | kirkwood_pcie_id(&dev, &rev); |
62 | if (dev == MV88F6282_DEV_ID) | 37 | if (dev == MV88F6282_DEV_ID) |
63 | qnap_ts219_ge00_data.phy_addr = MV643XX_ETH_PHY_ADDR(0); | 38 | qnap_ts219_ge00_data.phy_addr = MV643XX_ETH_PHY_ADDR(0); |
64 | 39 | ||
65 | kirkwood_ge00_init(&qnap_ts219_ge00_data); | 40 | kirkwood_ge00_init(&qnap_ts219_ge00_data); |
66 | kirkwood_ehci_init(); | ||
67 | 41 | ||
68 | pm_power_off = qnap_tsx1x_power_off; | 42 | pm_power_off = qnap_tsx1x_power_off; |
69 | } | 43 | } |
diff --git a/arch/arm/mach-kirkwood/board-usi_topkick.c b/arch/arm/mach-kirkwood/board-usi_topkick.c new file mode 100644 index 000000000000..15e69fcde9f4 --- /dev/null +++ b/arch/arm/mach-kirkwood/board-usi_topkick.c | |||
@@ -0,0 +1,81 @@ | |||
1 | /* | ||
2 | * Copyright 2012 (C), Jason Cooper <jason@lakedaemon.net> | ||
3 | * | ||
4 | * arch/arm/mach-kirkwood/board-usi_topkick.c | ||
5 | * | ||
6 | * USI Topkick Init for drivers not converted to flattened device tree yet. | ||
7 | * | ||
8 | * This file is licensed under the terms of the GNU General Public | ||
9 | * License version 2. This program is licensed "as is" without any | ||
10 | * warranty of any kind, whether express or implied. | ||
11 | */ | ||
12 | |||
13 | #include <linux/kernel.h> | ||
14 | #include <linux/init.h> | ||
15 | #include <linux/mv643xx_eth.h> | ||
16 | #include <linux/gpio.h> | ||
17 | #include <linux/platform_data/mmc-mvsdio.h> | ||
18 | #include "common.h" | ||
19 | #include "mpp.h" | ||
20 | |||
21 | static struct mv643xx_eth_platform_data topkick_ge00_data = { | ||
22 | .phy_addr = MV643XX_ETH_PHY_ADDR(0), | ||
23 | }; | ||
24 | |||
25 | static struct mvsdio_platform_data topkick_mvsdio_data = { | ||
26 | /* unfortunately the CD signal has not been connected */ | ||
27 | }; | ||
28 | |||
29 | /* | ||
30 | * GPIO LED layout | ||
31 | * | ||
32 | * /-SYS_LED(2) | ||
33 | * | | ||
34 | * | /-DISK_LED | ||
35 | * | | | ||
36 | * | | /-WLAN_LED(2) | ||
37 | * | | | | ||
38 | * [SW] [*] [*] [*] | ||
39 | */ | ||
40 | |||
41 | /* | ||
42 | * Switch positions | ||
43 | * | ||
44 | * /-SW_LEFT | ||
45 | * | | ||
46 | * | /-SW_IDLE | ||
47 | * | | | ||
48 | * | | /-SW_RIGHT | ||
49 | * | | | | ||
50 | * PS [L] [I] [R] LEDS | ||
51 | */ | ||
52 | |||
53 | static unsigned int topkick_mpp_config[] __initdata = { | ||
54 | MPP21_GPIO, /* DISK_LED (low active) - yellow */ | ||
55 | MPP36_GPIO, /* SATA0 power enable (high active) */ | ||
56 | MPP37_GPIO, /* SYS_LED2 (low active) - red */ | ||
57 | MPP38_GPIO, /* SYS_LED (low active) - blue */ | ||
58 | MPP39_GPIO, /* WLAN_LED (low active) - green */ | ||
59 | MPP43_GPIO, /* SW_LEFT (low active) */ | ||
60 | MPP44_GPIO, /* SW_RIGHT (low active) */ | ||
61 | MPP45_GPIO, /* SW_IDLE (low active) */ | ||
62 | MPP46_GPIO, /* SW_LEFT (low active) */ | ||
63 | MPP48_GPIO, /* WLAN_LED2 (low active) - yellow */ | ||
64 | 0 | ||
65 | }; | ||
66 | |||
67 | #define TOPKICK_SATA0_PWR_ENABLE 36 | ||
68 | |||
69 | void __init usi_topkick_init(void) | ||
70 | { | ||
71 | /* | ||
72 | * Basic setup. Needs to be called early. | ||
73 | */ | ||
74 | kirkwood_mpp_conf(topkick_mpp_config); | ||
75 | |||
76 | /* SATA0 power enable */ | ||
77 | gpio_set_value(TOPKICK_SATA0_PWR_ENABLE, 1); | ||
78 | |||
79 | kirkwood_ge00_init(&topkick_ge00_data); | ||
80 | kirkwood_sdio_init(&topkick_mvsdio_data); | ||
81 | } | ||
diff --git a/arch/arm/mach-kirkwood/common.c b/arch/arm/mach-kirkwood/common.c index f0fc25bd3ffe..5303be62b311 100644 --- a/arch/arm/mach-kirkwood/common.c +++ b/arch/arm/mach-kirkwood/common.c | |||
@@ -266,6 +266,7 @@ void __init kirkwood_clk_init(void) | |||
266 | orion_clkdev_add("1", "pcie", pex1); | 266 | orion_clkdev_add("1", "pcie", pex1); |
267 | orion_clkdev_add(NULL, "kirkwood-i2s", audio); | 267 | orion_clkdev_add(NULL, "kirkwood-i2s", audio); |
268 | orion_clkdev_add(NULL, MV64XXX_I2C_CTLR_NAME ".0", runit); | 268 | orion_clkdev_add(NULL, MV64XXX_I2C_CTLR_NAME ".0", runit); |
269 | orion_clkdev_add(NULL, MV64XXX_I2C_CTLR_NAME ".1", runit); | ||
269 | 270 | ||
270 | /* Marvell says runit is used by SPI, UART, NAND, TWSI, ..., | 271 | /* Marvell says runit is used by SPI, UART, NAND, TWSI, ..., |
271 | * so should never be gated. | 272 | * so should never be gated. |
diff --git a/arch/arm/mach-kirkwood/common.h b/arch/arm/mach-kirkwood/common.h index 6088e9227889..5ffa57f08c80 100644 --- a/arch/arm/mach-kirkwood/common.h +++ b/arch/arm/mach-kirkwood/common.h | |||
@@ -113,6 +113,40 @@ void km_kirkwood_init(void); | |||
113 | static inline void km_kirkwood_init(void) {}; | 113 | static inline void km_kirkwood_init(void) {}; |
114 | #endif | 114 | #endif |
115 | 115 | ||
116 | #ifdef CONFIG_MACH_MPLCEC4_DT | ||
117 | void mplcec4_init(void); | ||
118 | #else | ||
119 | static inline void mplcec4_init(void) {}; | ||
120 | #endif | ||
121 | |||
122 | #if defined(CONFIG_MACH_INETSPACE_V2_DT) || \ | ||
123 | defined(CONFIG_MACH_NETSPACE_V2_DT) || \ | ||
124 | defined(CONFIG_MACH_NETSPACE_MAX_V2_DT) || \ | ||
125 | defined(CONFIG_MACH_NETSPACE_LITE_V2_DT) || \ | ||
126 | defined(CONFIG_MACH_NETSPACE_MINI_V2_DT) | ||
127 | void ns2_init(void); | ||
128 | #else | ||
129 | static inline void ns2_init(void) {}; | ||
130 | #endif | ||
131 | |||
132 | #ifdef CONFIG_MACH_NSA310_DT | ||
133 | void nsa310_init(void); | ||
134 | #else | ||
135 | static inline void nsa310_init(void) {}; | ||
136 | #endif | ||
137 | |||
138 | #ifdef CONFIG_MACH_OPENBLOCKS_A6_DT | ||
139 | void openblocks_a6_init(void); | ||
140 | #else | ||
141 | static inline void openblocks_a6_init(void) {}; | ||
142 | #endif | ||
143 | |||
144 | #ifdef CONFIG_MACH_TOPKICK_DT | ||
145 | void usi_topkick_init(void); | ||
146 | #else | ||
147 | static inline void usi_topkick_init(void) {}; | ||
148 | #endif | ||
149 | |||
116 | /* early init functions not converted to fdt yet */ | 150 | /* early init functions not converted to fdt yet */ |
117 | char *kirkwood_id(void); | 151 | char *kirkwood_id(void); |
118 | void kirkwood_l2_init(void); | 152 | void kirkwood_l2_init(void); |
diff --git a/arch/arm/mach-orion5x/Kconfig b/arch/arm/mach-orion5x/Kconfig index 0673f0c10432..2cb2f06c20f5 100644 --- a/arch/arm/mach-orion5x/Kconfig +++ b/arch/arm/mach-orion5x/Kconfig | |||
@@ -2,6 +2,13 @@ if ARCH_ORION5X | |||
2 | 2 | ||
3 | menu "Orion Implementations" | 3 | menu "Orion Implementations" |
4 | 4 | ||
5 | config ARCH_ORION5X_DT | ||
6 | bool "Marvell Orion5x Flattened Device Tree" | ||
7 | select USE_OF | ||
8 | help | ||
9 | Say 'Y' here if you want your kernel to support the | ||
10 | Marvell Orion5x using flattened device tree. | ||
11 | |||
5 | config MACH_DB88F5281 | 12 | config MACH_DB88F5281 |
6 | bool "Marvell Orion-2 Development Board" | 13 | bool "Marvell Orion-2 Development Board" |
7 | select I2C_BOARDINFO | 14 | select I2C_BOARDINFO |
@@ -96,12 +103,13 @@ config MACH_MV2120 | |||
96 | Say 'Y' here if you want your kernel to support the | 103 | Say 'Y' here if you want your kernel to support the |
97 | HP Media Vault mv2120 or mv5100. | 104 | HP Media Vault mv2120 or mv5100. |
98 | 105 | ||
99 | config MACH_EDMINI_V2 | 106 | config MACH_EDMINI_V2_DT |
100 | bool "LaCie Ethernet Disk mini V2" | 107 | bool "LaCie Ethernet Disk mini V2 (Flattened Device Tree)" |
101 | select I2C_BOARDINFO | 108 | select I2C_BOARDINFO |
109 | select ARCH_ORION5X_DT | ||
102 | help | 110 | help |
103 | Say 'Y' here if you want your kernel to support the | 111 | Say 'Y' here if you want your kernel to support the |
104 | LaCie Ethernet Disk mini V2. | 112 | LaCie Ethernet Disk mini V2 (Flattened Device Tree). |
105 | 113 | ||
106 | config MACH_D2NET | 114 | config MACH_D2NET |
107 | bool "LaCie d2 Network" | 115 | bool "LaCie d2 Network" |
diff --git a/arch/arm/mach-orion5x/Makefile b/arch/arm/mach-orion5x/Makefile index 7f18cdacd487..9e809a7c05c0 100644 --- a/arch/arm/mach-orion5x/Makefile +++ b/arch/arm/mach-orion5x/Makefile | |||
@@ -12,7 +12,6 @@ obj-$(CONFIG_MACH_TS409) += ts409-setup.o tsx09-common.o | |||
12 | obj-$(CONFIG_MACH_WRT350N_V2) += wrt350n-v2-setup.o | 12 | obj-$(CONFIG_MACH_WRT350N_V2) += wrt350n-v2-setup.o |
13 | obj-$(CONFIG_MACH_TS78XX) += ts78xx-setup.o | 13 | obj-$(CONFIG_MACH_TS78XX) += ts78xx-setup.o |
14 | obj-$(CONFIG_MACH_MV2120) += mv2120-setup.o | 14 | obj-$(CONFIG_MACH_MV2120) += mv2120-setup.o |
15 | obj-$(CONFIG_MACH_EDMINI_V2) += edmini_v2-setup.o | ||
16 | obj-$(CONFIG_MACH_D2NET) += d2net-setup.o | 15 | obj-$(CONFIG_MACH_D2NET) += d2net-setup.o |
17 | obj-$(CONFIG_MACH_BIGDISK) += d2net-setup.o | 16 | obj-$(CONFIG_MACH_BIGDISK) += d2net-setup.o |
18 | obj-$(CONFIG_MACH_NET2BIG) += net2big-setup.o | 17 | obj-$(CONFIG_MACH_NET2BIG) += net2big-setup.o |
@@ -22,3 +21,6 @@ obj-$(CONFIG_MACH_RD88F5181L_GE) += rd88f5181l-ge-setup.o | |||
22 | obj-$(CONFIG_MACH_RD88F5181L_FXO) += rd88f5181l-fxo-setup.o | 21 | obj-$(CONFIG_MACH_RD88F5181L_FXO) += rd88f5181l-fxo-setup.o |
23 | obj-$(CONFIG_MACH_RD88F6183AP_GE) += rd88f6183ap-ge-setup.o | 22 | obj-$(CONFIG_MACH_RD88F6183AP_GE) += rd88f6183ap-ge-setup.o |
24 | obj-$(CONFIG_MACH_LINKSTATION_LSCHL) += ls-chl-setup.o | 23 | obj-$(CONFIG_MACH_LINKSTATION_LSCHL) += ls-chl-setup.o |
24 | |||
25 | obj-$(CONFIG_ARCH_ORION5X_DT) += board-dt.o | ||
26 | obj-$(CONFIG_MACH_EDMINI_V2_DT) += edmini_v2-setup.o | ||
diff --git a/arch/arm/mach-orion5x/board-dt.c b/arch/arm/mach-orion5x/board-dt.c new file mode 100644 index 000000000000..32e5c211a89b --- /dev/null +++ b/arch/arm/mach-orion5x/board-dt.c | |||
@@ -0,0 +1,79 @@ | |||
1 | /* | ||
2 | * Copyright 2012 (C), Thomas Petazzoni <thomas.petazzoni@free-electrons.com> | ||
3 | * | ||
4 | * arch/arm/mach-orion5x/board-dt.c | ||
5 | * | ||
6 | * Flattened Device Tree board initialization | ||
7 | * | ||
8 | * This file is licensed under the terms of the GNU General Public | ||
9 | * License version 2. This program is licensed "as is" without any | ||
10 | * warranty of any kind, whether express or implied. | ||
11 | */ | ||
12 | |||
13 | #include <linux/kernel.h> | ||
14 | #include <linux/init.h> | ||
15 | #include <linux/of.h> | ||
16 | #include <linux/of_platform.h> | ||
17 | #include <asm/system_misc.h> | ||
18 | #include <asm/mach/arch.h> | ||
19 | #include <mach/orion5x.h> | ||
20 | #include <plat/irq.h> | ||
21 | #include "common.h" | ||
22 | |||
23 | struct of_dev_auxdata orion5x_auxdata_lookup[] __initdata = { | ||
24 | OF_DEV_AUXDATA("marvell,orion-spi", 0xf1010600, "orion_spi.0", NULL), | ||
25 | OF_DEV_AUXDATA("marvell,mv64xxx-i2c", 0xf1011000, "mv64xxx_i2c.0", | ||
26 | NULL), | ||
27 | OF_DEV_AUXDATA("marvell,orion-wdt", 0xf1020300, "orion_wdt", NULL), | ||
28 | OF_DEV_AUXDATA("marvell,orion-sata", 0xf1080000, "sata_mv.0", NULL), | ||
29 | OF_DEV_AUXDATA("marvell,orion-crypto", 0xf1090000, "mv_crypto", NULL), | ||
30 | {}, | ||
31 | }; | ||
32 | |||
33 | static void __init orion5x_dt_init(void) | ||
34 | { | ||
35 | char *dev_name; | ||
36 | u32 dev, rev; | ||
37 | |||
38 | orion5x_id(&dev, &rev, &dev_name); | ||
39 | printk(KERN_INFO "Orion ID: %s. TCLK=%d.\n", dev_name, orion5x_tclk); | ||
40 | |||
41 | /* | ||
42 | * Setup Orion address map | ||
43 | */ | ||
44 | orion5x_setup_cpu_mbus_bridge(); | ||
45 | |||
46 | /* Setup root of clk tree */ | ||
47 | clk_init(); | ||
48 | |||
49 | /* | ||
50 | * Don't issue "Wait for Interrupt" instruction if we are | ||
51 | * running on D0 5281 silicon. | ||
52 | */ | ||
53 | if (dev == MV88F5281_DEV_ID && rev == MV88F5281_REV_D0) { | ||
54 | printk(KERN_INFO "Orion: Applying 5281 D0 WFI workaround.\n"); | ||
55 | disable_hlt(); | ||
56 | } | ||
57 | |||
58 | if (of_machine_is_compatible("lacie,ethernet-disk-mini-v2")) | ||
59 | edmini_v2_init(); | ||
60 | |||
61 | of_platform_populate(NULL, of_default_bus_match_table, | ||
62 | orion5x_auxdata_lookup, NULL); | ||
63 | } | ||
64 | |||
65 | static const char *orion5x_dt_compat[] = { | ||
66 | "marvell,orion5x", | ||
67 | NULL, | ||
68 | }; | ||
69 | |||
70 | DT_MACHINE_START(ORION5X_DT, "Marvell Orion5x (Flattened Device Tree)") | ||
71 | /* Maintainer: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> */ | ||
72 | .map_io = orion5x_map_io, | ||
73 | .init_early = orion5x_init_early, | ||
74 | .init_irq = orion_dt_init_irq, | ||
75 | .timer = &orion5x_timer, | ||
76 | .init_machine = orion5x_dt_init, | ||
77 | .restart = orion5x_restart, | ||
78 | .dt_compat = orion5x_dt_compat, | ||
79 | MACHINE_END | ||
diff --git a/arch/arm/mach-orion5x/common.c b/arch/arm/mach-orion5x/common.c index b3eb3da01160..550f92320afb 100644 --- a/arch/arm/mach-orion5x/common.c +++ b/arch/arm/mach-orion5x/common.c | |||
@@ -65,7 +65,7 @@ void __init orion5x_map_io(void) | |||
65 | ****************************************************************************/ | 65 | ****************************************************************************/ |
66 | static struct clk *tclk; | 66 | static struct clk *tclk; |
67 | 67 | ||
68 | static void __init clk_init(void) | 68 | void __init clk_init(void) |
69 | { | 69 | { |
70 | tclk = clk_register_fixed_rate(NULL, "tclk", NULL, CLK_IS_ROOT, | 70 | tclk = clk_register_fixed_rate(NULL, "tclk", NULL, CLK_IS_ROOT, |
71 | orion5x_tclk); | 71 | orion5x_tclk); |
@@ -236,7 +236,7 @@ struct sys_timer orion5x_timer = { | |||
236 | /* | 236 | /* |
237 | * Identify device ID and rev from PCIe configuration header space '0'. | 237 | * Identify device ID and rev from PCIe configuration header space '0'. |
238 | */ | 238 | */ |
239 | static void __init orion5x_id(u32 *dev, u32 *rev, char **dev_name) | 239 | void __init orion5x_id(u32 *dev, u32 *rev, char **dev_name) |
240 | { | 240 | { |
241 | orion5x_pcie_id(dev, rev); | 241 | orion5x_pcie_id(dev, rev); |
242 | 242 | ||
diff --git a/arch/arm/mach-orion5x/common.h b/arch/arm/mach-orion5x/common.h index 31bab92ce038..7db5cdd9c4b7 100644 --- a/arch/arm/mach-orion5x/common.h +++ b/arch/arm/mach-orion5x/common.h | |||
@@ -12,6 +12,8 @@ void orion5x_map_io(void); | |||
12 | void orion5x_init_early(void); | 12 | void orion5x_init_early(void); |
13 | void orion5x_init_irq(void); | 13 | void orion5x_init_irq(void); |
14 | void orion5x_init(void); | 14 | void orion5x_init(void); |
15 | void orion5x_id(u32 *dev, u32 *rev, char **dev_name); | ||
16 | void clk_init(void); | ||
15 | extern int orion5x_tclk; | 17 | extern int orion5x_tclk; |
16 | extern struct sys_timer orion5x_timer; | 18 | extern struct sys_timer orion5x_timer; |
17 | 19 | ||
@@ -54,6 +56,13 @@ int orion5x_pci_sys_setup(int nr, struct pci_sys_data *sys); | |||
54 | struct pci_bus *orion5x_pci_sys_scan_bus(int nr, struct pci_sys_data *sys); | 56 | struct pci_bus *orion5x_pci_sys_scan_bus(int nr, struct pci_sys_data *sys); |
55 | int orion5x_pci_map_irq(const struct pci_dev *dev, u8 slot, u8 pin); | 57 | int orion5x_pci_map_irq(const struct pci_dev *dev, u8 slot, u8 pin); |
56 | 58 | ||
59 | /* board init functions for boards not fully converted to fdt */ | ||
60 | #ifdef CONFIG_MACH_EDMINI_V2_DT | ||
61 | void edmini_v2_init(void); | ||
62 | #else | ||
63 | static inline void edmini_v2_init(void) {}; | ||
64 | #endif | ||
65 | |||
57 | struct meminfo; | 66 | struct meminfo; |
58 | struct tag; | 67 | struct tag; |
59 | extern void __init tag_fixup_mem32(struct tag *, char **, struct meminfo *); | 68 | extern void __init tag_fixup_mem32(struct tag *, char **, struct meminfo *); |
diff --git a/arch/arm/mach-orion5x/edmini_v2-setup.c b/arch/arm/mach-orion5x/edmini_v2-setup.c index 355e962137c7..d675e727803d 100644 --- a/arch/arm/mach-orion5x/edmini_v2-setup.c +++ b/arch/arm/mach-orion5x/edmini_v2-setup.c | |||
@@ -115,69 +115,6 @@ static struct i2c_board_info __initdata edmini_v2_i2c_rtc = { | |||
115 | }; | 115 | }; |
116 | 116 | ||
117 | /***************************************************************************** | 117 | /***************************************************************************** |
118 | * Sata | ||
119 | ****************************************************************************/ | ||
120 | |||
121 | static struct mv_sata_platform_data edmini_v2_sata_data = { | ||
122 | .n_ports = 2, | ||
123 | }; | ||
124 | |||
125 | /***************************************************************************** | ||
126 | * GPIO LED (simple - doesn't use hardware blinking support) | ||
127 | ****************************************************************************/ | ||
128 | |||
129 | #define EDMINI_V2_GPIO_LED_POWER 16 | ||
130 | |||
131 | static struct gpio_led edmini_v2_leds[] = { | ||
132 | { | ||
133 | .name = "power:blue", | ||
134 | .gpio = EDMINI_V2_GPIO_LED_POWER, | ||
135 | .active_low = 1, | ||
136 | }, | ||
137 | }; | ||
138 | |||
139 | static struct gpio_led_platform_data edmini_v2_led_data = { | ||
140 | .num_leds = ARRAY_SIZE(edmini_v2_leds), | ||
141 | .leds = edmini_v2_leds, | ||
142 | }; | ||
143 | |||
144 | static struct platform_device edmini_v2_gpio_leds = { | ||
145 | .name = "leds-gpio", | ||
146 | .id = -1, | ||
147 | .dev = { | ||
148 | .platform_data = &edmini_v2_led_data, | ||
149 | }, | ||
150 | }; | ||
151 | |||
152 | /**************************************************************************** | ||
153 | * GPIO key | ||
154 | ****************************************************************************/ | ||
155 | |||
156 | #define EDMINI_V2_GPIO_KEY_POWER 18 | ||
157 | |||
158 | static struct gpio_keys_button edmini_v2_buttons[] = { | ||
159 | { | ||
160 | .code = KEY_POWER, | ||
161 | .gpio = EDMINI_V2_GPIO_KEY_POWER, | ||
162 | .desc = "Power Button", | ||
163 | .active_low = 0, | ||
164 | }, | ||
165 | }; | ||
166 | |||
167 | static struct gpio_keys_platform_data edmini_v2_button_data = { | ||
168 | .buttons = edmini_v2_buttons, | ||
169 | .nbuttons = ARRAY_SIZE(edmini_v2_buttons), | ||
170 | }; | ||
171 | |||
172 | static struct platform_device edmini_v2_gpio_buttons = { | ||
173 | .name = "gpio-keys", | ||
174 | .id = -1, | ||
175 | .dev = { | ||
176 | .platform_data = &edmini_v2_button_data, | ||
177 | }, | ||
178 | }; | ||
179 | |||
180 | /***************************************************************************** | ||
181 | * General Setup | 118 | * General Setup |
182 | ****************************************************************************/ | 119 | ****************************************************************************/ |
183 | static unsigned int edminiv2_mpp_modes[] __initdata = { | 120 | static unsigned int edminiv2_mpp_modes[] __initdata = { |
@@ -207,13 +144,8 @@ static unsigned int edminiv2_mpp_modes[] __initdata = { | |||
207 | 0, | 144 | 0, |
208 | }; | 145 | }; |
209 | 146 | ||
210 | static void __init edmini_v2_init(void) | 147 | void __init edmini_v2_init(void) |
211 | { | 148 | { |
212 | /* | ||
213 | * Setup basic Orion functions. Need to be called early. | ||
214 | */ | ||
215 | orion5x_init(); | ||
216 | |||
217 | orion5x_mpp_conf(edminiv2_mpp_modes); | 149 | orion5x_mpp_conf(edminiv2_mpp_modes); |
218 | 150 | ||
219 | /* | 151 | /* |
@@ -221,15 +153,10 @@ static void __init edmini_v2_init(void) | |||
221 | */ | 153 | */ |
222 | orion5x_ehci0_init(); | 154 | orion5x_ehci0_init(); |
223 | orion5x_eth_init(&edmini_v2_eth_data); | 155 | orion5x_eth_init(&edmini_v2_eth_data); |
224 | orion5x_i2c_init(); | ||
225 | orion5x_sata_init(&edmini_v2_sata_data); | ||
226 | orion5x_uart0_init(); | ||
227 | 156 | ||
228 | orion5x_setup_dev_boot_win(EDMINI_V2_NOR_BOOT_BASE, | 157 | orion5x_setup_dev_boot_win(EDMINI_V2_NOR_BOOT_BASE, |
229 | EDMINI_V2_NOR_BOOT_SIZE); | 158 | EDMINI_V2_NOR_BOOT_SIZE); |
230 | platform_device_register(&edmini_v2_nor_flash); | 159 | platform_device_register(&edmini_v2_nor_flash); |
231 | platform_device_register(&edmini_v2_gpio_leds); | ||
232 | platform_device_register(&edmini_v2_gpio_buttons); | ||
233 | 160 | ||
234 | pr_notice("edmini_v2: USB device port, flash write and power-off " | 161 | pr_notice("edmini_v2: USB device port, flash write and power-off " |
235 | "are not yet supported.\n"); | 162 | "are not yet supported.\n"); |
@@ -247,16 +174,3 @@ static void __init edmini_v2_init(void) | |||
247 | 174 | ||
248 | i2c_register_board_info(0, &edmini_v2_i2c_rtc, 1); | 175 | i2c_register_board_info(0, &edmini_v2_i2c_rtc, 1); |
249 | } | 176 | } |
250 | |||
251 | /* Warning: LaCie use a wrong mach-type (0x20e=526) in their bootloader. */ | ||
252 | MACHINE_START(EDMINI_V2, "LaCie Ethernet Disk mini V2") | ||
253 | /* Maintainer: Christopher Moore <moore@free.fr> */ | ||
254 | .atag_offset = 0x100, | ||
255 | .init_machine = edmini_v2_init, | ||
256 | .map_io = orion5x_map_io, | ||
257 | .init_early = orion5x_init_early, | ||
258 | .init_irq = orion5x_init_irq, | ||
259 | .timer = &orion5x_timer, | ||
260 | .fixup = tag_fixup_mem32, | ||
261 | .restart = orion5x_restart, | ||
262 | MACHINE_END | ||
diff --git a/arch/arm/plat-orion/irq.c b/arch/arm/plat-orion/irq.c index 1867944415ca..8db0b981ca64 100644 --- a/arch/arm/plat-orion/irq.c +++ b/arch/arm/plat-orion/irq.c | |||
@@ -41,7 +41,7 @@ void __init orion_irq_init(unsigned int irq_start, void __iomem *maskaddr) | |||
41 | static int __init orion_add_irq_domain(struct device_node *np, | 41 | static int __init orion_add_irq_domain(struct device_node *np, |
42 | struct device_node *interrupt_parent) | 42 | struct device_node *interrupt_parent) |
43 | { | 43 | { |
44 | int i = 0, irq_gpio; | 44 | int i = 0; |
45 | void __iomem *base; | 45 | void __iomem *base; |
46 | 46 | ||
47 | do { | 47 | do { |
@@ -54,10 +54,6 @@ static int __init orion_add_irq_domain(struct device_node *np, | |||
54 | 54 | ||
55 | irq_domain_add_legacy(np, i * 32, 0, 0, | 55 | irq_domain_add_legacy(np, i * 32, 0, 0, |
56 | &irq_domain_simple_ops, NULL); | 56 | &irq_domain_simple_ops, NULL); |
57 | |||
58 | irq_gpio = i * 32; | ||
59 | orion_gpio_of_init(irq_gpio); | ||
60 | |||
61 | return 0; | 57 | return 0; |
62 | } | 58 | } |
63 | 59 | ||
diff --git a/drivers/gpio/Kconfig b/drivers/gpio/Kconfig index f11d8e3b4041..6dbc4031f825 100644 --- a/drivers/gpio/Kconfig +++ b/drivers/gpio/Kconfig | |||
@@ -152,7 +152,7 @@ config GPIO_MSM_V2 | |||
152 | 152 | ||
153 | config GPIO_MVEBU | 153 | config GPIO_MVEBU |
154 | def_bool y | 154 | def_bool y |
155 | depends on ARCH_MVEBU | 155 | depends on PLAT_ORION |
156 | select GPIO_GENERIC | 156 | select GPIO_GENERIC |
157 | select GENERIC_IRQ_CHIP | 157 | select GENERIC_IRQ_CHIP |
158 | 158 | ||
diff --git a/drivers/leds/Kconfig b/drivers/leds/Kconfig index f508defc0d96..b58bc8a14b9c 100644 --- a/drivers/leds/Kconfig +++ b/drivers/leds/Kconfig | |||
@@ -379,7 +379,9 @@ config LEDS_NS2 | |||
379 | tristate "LED support for Network Space v2 GPIO LEDs" | 379 | tristate "LED support for Network Space v2 GPIO LEDs" |
380 | depends on LEDS_CLASS | 380 | depends on LEDS_CLASS |
381 | depends on MACH_NETSPACE_V2 || MACH_INETSPACE_V2 || \ | 381 | depends on MACH_NETSPACE_V2 || MACH_INETSPACE_V2 || \ |
382 | MACH_NETSPACE_MAX_V2 || MACH_D2NET_V2 | 382 | MACH_NETSPACE_MAX_V2 || MACH_D2NET_V2 || \ |
383 | MACH_NETSPACE_V2_DT || MACH_INETSPACE_V2_DT || \ | ||
384 | MACH_NETSPACE_MAX_V2_DT || MACH_NETSPACE_MINI_V2_DT | ||
383 | default y | 385 | default y |
384 | help | 386 | help |
385 | This option enable support for the dual-GPIO LED found on the | 387 | This option enable support for the dual-GPIO LED found on the |
diff --git a/drivers/leds/leds-ns2.c b/drivers/leds/leds-ns2.c index d176ec83f5d9..d64cc2227fd9 100644 --- a/drivers/leds/leds-ns2.c +++ b/drivers/leds/leds-ns2.c | |||
@@ -30,6 +30,7 @@ | |||
30 | #include <linux/leds.h> | 30 | #include <linux/leds.h> |
31 | #include <linux/module.h> | 31 | #include <linux/module.h> |
32 | #include <linux/platform_data/leds-kirkwood-ns2.h> | 32 | #include <linux/platform_data/leds-kirkwood-ns2.h> |
33 | #include <linux/of_gpio.h> | ||
33 | 34 | ||
34 | /* | 35 | /* |
35 | * The Network Space v2 dual-GPIO LED is wired to a CPLD and can blink in | 36 | * The Network Space v2 dual-GPIO LED is wired to a CPLD and can blink in |
@@ -263,6 +264,62 @@ static void delete_ns2_led(struct ns2_led_data *led_dat) | |||
263 | gpio_free(led_dat->slow); | 264 | gpio_free(led_dat->slow); |
264 | } | 265 | } |
265 | 266 | ||
267 | #ifdef CONFIG_OF_GPIO | ||
268 | /* | ||
269 | * Translate OpenFirmware node properties into platform_data. | ||
270 | */ | ||
271 | static int __devinit | ||
272 | ns2_leds_get_of_pdata(struct device *dev, struct ns2_led_platform_data *pdata) | ||
273 | { | ||
274 | struct device_node *np = dev->of_node; | ||
275 | struct device_node *child; | ||
276 | struct ns2_led *leds; | ||
277 | int num_leds = 0; | ||
278 | int i = 0; | ||
279 | |||
280 | num_leds = of_get_child_count(np); | ||
281 | if (!num_leds) | ||
282 | return -ENODEV; | ||
283 | |||
284 | leds = devm_kzalloc(dev, num_leds * sizeof(struct ns2_led), | ||
285 | GFP_KERNEL); | ||
286 | if (!leds) | ||
287 | return -ENOMEM; | ||
288 | |||
289 | for_each_child_of_node(np, child) { | ||
290 | const char *string; | ||
291 | int ret; | ||
292 | |||
293 | ret = of_get_named_gpio(child, "cmd-gpio", 0); | ||
294 | if (ret < 0) | ||
295 | return ret; | ||
296 | leds[i].cmd = ret; | ||
297 | ret = of_get_named_gpio(child, "slow-gpio", 0); | ||
298 | if (ret < 0) | ||
299 | return ret; | ||
300 | leds[i].slow = ret; | ||
301 | ret = of_property_read_string(child, "label", &string); | ||
302 | leds[i].name = (ret == 0) ? string : child->name; | ||
303 | ret = of_property_read_string(child, "linux,default-trigger", | ||
304 | &string); | ||
305 | if (ret == 0) | ||
306 | leds[i].default_trigger = string; | ||
307 | |||
308 | i++; | ||
309 | } | ||
310 | |||
311 | pdata->leds = leds; | ||
312 | pdata->num_leds = num_leds; | ||
313 | |||
314 | return 0; | ||
315 | } | ||
316 | |||
317 | static const struct of_device_id of_ns2_leds_match[] = { | ||
318 | { .compatible = "lacie,ns2-leds", }, | ||
319 | {}, | ||
320 | }; | ||
321 | #endif /* CONFIG_OF_GPIO */ | ||
322 | |||
266 | static int __devinit ns2_led_probe(struct platform_device *pdev) | 323 | static int __devinit ns2_led_probe(struct platform_device *pdev) |
267 | { | 324 | { |
268 | struct ns2_led_platform_data *pdata = pdev->dev.platform_data; | 325 | struct ns2_led_platform_data *pdata = pdev->dev.platform_data; |
@@ -270,11 +327,25 @@ static int __devinit ns2_led_probe(struct platform_device *pdev) | |||
270 | int i; | 327 | int i; |
271 | int ret; | 328 | int ret; |
272 | 329 | ||
330 | #ifdef CONFIG_OF_GPIO | ||
331 | if (!pdata) { | ||
332 | pdata = devm_kzalloc(&pdev->dev, | ||
333 | sizeof(struct ns2_led_platform_data), | ||
334 | GFP_KERNEL); | ||
335 | if (!pdata) | ||
336 | return -ENOMEM; | ||
337 | |||
338 | ret = ns2_leds_get_of_pdata(&pdev->dev, pdata); | ||
339 | if (ret) | ||
340 | return ret; | ||
341 | } | ||
342 | #else | ||
273 | if (!pdata) | 343 | if (!pdata) |
274 | return -EINVAL; | 344 | return -EINVAL; |
345 | #endif /* CONFIG_OF_GPIO */ | ||
275 | 346 | ||
276 | leds_data = devm_kzalloc(&pdev->dev, sizeof(struct ns2_led_data) * | 347 | leds_data = devm_kzalloc(&pdev->dev, sizeof(struct ns2_led_data) * |
277 | pdata->num_leds, GFP_KERNEL); | 348 | pdata->num_leds, GFP_KERNEL); |
278 | if (!leds_data) | 349 | if (!leds_data) |
279 | return -ENOMEM; | 350 | return -ENOMEM; |
280 | 351 | ||
@@ -312,8 +383,9 @@ static struct platform_driver ns2_led_driver = { | |||
312 | .probe = ns2_led_probe, | 383 | .probe = ns2_led_probe, |
313 | .remove = __devexit_p(ns2_led_remove), | 384 | .remove = __devexit_p(ns2_led_remove), |
314 | .driver = { | 385 | .driver = { |
315 | .name = "leds-ns2", | 386 | .name = "leds-ns2", |
316 | .owner = THIS_MODULE, | 387 | .owner = THIS_MODULE, |
388 | .of_match_table = of_match_ptr(of_ns2_leds_match), | ||
317 | }, | 389 | }, |
318 | }; | 390 | }; |
319 | 391 | ||
diff --git a/drivers/pinctrl/Kconfig b/drivers/pinctrl/Kconfig index d96caefd914a..011133772d2a 100644 --- a/drivers/pinctrl/Kconfig +++ b/drivers/pinctrl/Kconfig | |||
@@ -188,27 +188,7 @@ config PINCTRL_EXYNOS4 | |||
188 | depends on OF && GPIOLIB | 188 | depends on OF && GPIOLIB |
189 | select PINCTRL_SAMSUNG | 189 | select PINCTRL_SAMSUNG |
190 | 190 | ||
191 | config PINCTRL_MVEBU | 191 | source "drivers/pinctrl/mvebu/Kconfig" |
192 | bool | ||
193 | depends on ARCH_MVEBU | ||
194 | select PINMUX | ||
195 | select PINCONF | ||
196 | |||
197 | config PINCTRL_DOVE | ||
198 | bool | ||
199 | select PINCTRL_MVEBU | ||
200 | |||
201 | config PINCTRL_KIRKWOOD | ||
202 | bool | ||
203 | select PINCTRL_MVEBU | ||
204 | |||
205 | config PINCTRL_ARMADA_370 | ||
206 | bool | ||
207 | select PINCTRL_MVEBU | ||
208 | |||
209 | config PINCTRL_ARMADA_XP | ||
210 | bool | ||
211 | select PINCTRL_MVEBU | ||
212 | 192 | ||
213 | source "drivers/pinctrl/spear/Kconfig" | 193 | source "drivers/pinctrl/spear/Kconfig" |
214 | 194 | ||
diff --git a/drivers/pinctrl/Makefile b/drivers/pinctrl/Makefile index f395ba5cec25..3cb6a0a668a8 100644 --- a/drivers/pinctrl/Makefile +++ b/drivers/pinctrl/Makefile | |||
@@ -36,12 +36,8 @@ obj-$(CONFIG_PINCTRL_U300) += pinctrl-u300.o | |||
36 | obj-$(CONFIG_PINCTRL_COH901) += pinctrl-coh901.o | 36 | obj-$(CONFIG_PINCTRL_COH901) += pinctrl-coh901.o |
37 | obj-$(CONFIG_PINCTRL_SAMSUNG) += pinctrl-samsung.o | 37 | obj-$(CONFIG_PINCTRL_SAMSUNG) += pinctrl-samsung.o |
38 | obj-$(CONFIG_PINCTRL_EXYNOS4) += pinctrl-exynos.o | 38 | obj-$(CONFIG_PINCTRL_EXYNOS4) += pinctrl-exynos.o |
39 | obj-$(CONFIG_PINCTRL_MVEBU) += pinctrl-mvebu.o | ||
40 | obj-$(CONFIG_PINCTRL_DOVE) += pinctrl-dove.o | ||
41 | obj-$(CONFIG_PINCTRL_KIRKWOOD) += pinctrl-kirkwood.o | ||
42 | obj-$(CONFIG_PINCTRL_ARMADA_370) += pinctrl-armada-370.o | ||
43 | obj-$(CONFIG_PINCTRL_ARMADA_XP) += pinctrl-armada-xp.o | ||
44 | obj-$(CONFIG_PINCTRL_XWAY) += pinctrl-xway.o | 39 | obj-$(CONFIG_PINCTRL_XWAY) += pinctrl-xway.o |
45 | obj-$(CONFIG_PINCTRL_LANTIQ) += pinctrl-lantiq.o | 40 | obj-$(CONFIG_PINCTRL_LANTIQ) += pinctrl-lantiq.o |
46 | 41 | ||
42 | obj-$(CONFIG_PLAT_ORION) += mvebu/ | ||
47 | obj-$(CONFIG_PLAT_SPEAR) += spear/ | 43 | obj-$(CONFIG_PLAT_SPEAR) += spear/ |
diff --git a/drivers/pinctrl/core.c b/drivers/pinctrl/core.c index 2e39c04fc16b..cec6072cd7c1 100644 --- a/drivers/pinctrl/core.c +++ b/drivers/pinctrl/core.c | |||
@@ -563,6 +563,8 @@ static int add_setting(struct pinctrl *p, struct pinctrl_map const *map) | |||
563 | return -EPROBE_DEFER; | 563 | return -EPROBE_DEFER; |
564 | } | 564 | } |
565 | 565 | ||
566 | setting->dev_name = map->dev_name; | ||
567 | |||
566 | switch (map->type) { | 568 | switch (map->type) { |
567 | case PIN_MAP_TYPE_MUX_GROUP: | 569 | case PIN_MAP_TYPE_MUX_GROUP: |
568 | ret = pinmux_map_to_setting(map, setting); | 570 | ret = pinmux_map_to_setting(map, setting); |
diff --git a/drivers/pinctrl/core.h b/drivers/pinctrl/core.h index 1f40ff68a8c4..12f5694f3d5d 100644 --- a/drivers/pinctrl/core.h +++ b/drivers/pinctrl/core.h | |||
@@ -105,12 +105,14 @@ struct pinctrl_setting_configs { | |||
105 | * @type: the type of setting | 105 | * @type: the type of setting |
106 | * @pctldev: pin control device handling to be programmed. Not used for | 106 | * @pctldev: pin control device handling to be programmed. Not used for |
107 | * PIN_MAP_TYPE_DUMMY_STATE. | 107 | * PIN_MAP_TYPE_DUMMY_STATE. |
108 | * @dev_name: the name of the device using this state | ||
108 | * @data: Data specific to the setting type | 109 | * @data: Data specific to the setting type |
109 | */ | 110 | */ |
110 | struct pinctrl_setting { | 111 | struct pinctrl_setting { |
111 | struct list_head node; | 112 | struct list_head node; |
112 | enum pinctrl_map_type type; | 113 | enum pinctrl_map_type type; |
113 | struct pinctrl_dev *pctldev; | 114 | struct pinctrl_dev *pctldev; |
115 | const char *dev_name; | ||
114 | union { | 116 | union { |
115 | struct pinctrl_setting_mux mux; | 117 | struct pinctrl_setting_mux mux; |
116 | struct pinctrl_setting_configs configs; | 118 | struct pinctrl_setting_configs configs; |
diff --git a/drivers/pinctrl/mvebu/Kconfig b/drivers/pinctrl/mvebu/Kconfig new file mode 100644 index 000000000000..366fa541ee91 --- /dev/null +++ b/drivers/pinctrl/mvebu/Kconfig | |||
@@ -0,0 +1,24 @@ | |||
1 | if PLAT_ORION | ||
2 | |||
3 | config PINCTRL_MVEBU | ||
4 | bool | ||
5 | select PINMUX | ||
6 | select PINCONF | ||
7 | |||
8 | config PINCTRL_DOVE | ||
9 | bool | ||
10 | select PINCTRL_MVEBU | ||
11 | |||
12 | config PINCTRL_KIRKWOOD | ||
13 | bool | ||
14 | select PINCTRL_MVEBU | ||
15 | |||
16 | config PINCTRL_ARMADA_370 | ||
17 | bool | ||
18 | select PINCTRL_MVEBU | ||
19 | |||
20 | config PINCTRL_ARMADA_XP | ||
21 | bool | ||
22 | select PINCTRL_MVEBU | ||
23 | |||
24 | endif | ||
diff --git a/drivers/pinctrl/mvebu/Makefile b/drivers/pinctrl/mvebu/Makefile new file mode 100644 index 000000000000..37c253297af0 --- /dev/null +++ b/drivers/pinctrl/mvebu/Makefile | |||
@@ -0,0 +1,5 @@ | |||
1 | obj-$(CONFIG_PINCTRL_MVEBU) += pinctrl-mvebu.o | ||
2 | obj-$(CONFIG_PINCTRL_DOVE) += pinctrl-dove.o | ||
3 | obj-$(CONFIG_PINCTRL_KIRKWOOD) += pinctrl-kirkwood.o | ||
4 | obj-$(CONFIG_PINCTRL_ARMADA_370) += pinctrl-armada-370.o | ||
5 | obj-$(CONFIG_PINCTRL_ARMADA_XP) += pinctrl-armada-xp.o | ||
diff --git a/drivers/pinctrl/pinctrl-armada-370.c b/drivers/pinctrl/mvebu/pinctrl-armada-370.c index c907647de6ad..c907647de6ad 100644 --- a/drivers/pinctrl/pinctrl-armada-370.c +++ b/drivers/pinctrl/mvebu/pinctrl-armada-370.c | |||
diff --git a/drivers/pinctrl/pinctrl-armada-xp.c b/drivers/pinctrl/mvebu/pinctrl-armada-xp.c index 40bd52a46b4e..40bd52a46b4e 100644 --- a/drivers/pinctrl/pinctrl-armada-xp.c +++ b/drivers/pinctrl/mvebu/pinctrl-armada-xp.c | |||
diff --git a/drivers/pinctrl/pinctrl-dove.c b/drivers/pinctrl/mvebu/pinctrl-dove.c index ffe74b27d66d..40c9c3eecd94 100644 --- a/drivers/pinctrl/pinctrl-dove.c +++ b/drivers/pinctrl/mvebu/pinctrl-dove.c | |||
@@ -22,22 +22,22 @@ | |||
22 | 22 | ||
23 | #include "pinctrl-mvebu.h" | 23 | #include "pinctrl-mvebu.h" |
24 | 24 | ||
25 | #define DOVE_SB_REGS_VIRT_BASE 0xfde00000 | 25 | #define DOVE_SB_REGS_VIRT_BASE IOMEM(0xfde00000) |
26 | #define DOVE_MPP_VIRT_BASE (DOVE_SB_REGS_VIRT_BASE | 0xd0200) | 26 | #define DOVE_MPP_VIRT_BASE (DOVE_SB_REGS_VIRT_BASE + 0xd0200) |
27 | #define DOVE_PMU_MPP_GENERAL_CTRL (DOVE_MPP_VIRT_BASE + 0x10) | 27 | #define DOVE_PMU_MPP_GENERAL_CTRL (DOVE_MPP_VIRT_BASE + 0x10) |
28 | #define DOVE_AU0_AC97_SEL BIT(16) | 28 | #define DOVE_AU0_AC97_SEL BIT(16) |
29 | #define DOVE_GLOBAL_CONFIG_1 (DOVE_SB_REGS_VIRT_BASE | 0xe802C) | 29 | #define DOVE_GLOBAL_CONFIG_1 (DOVE_SB_REGS_VIRT_BASE + 0xe802C) |
30 | #define DOVE_TWSI_ENABLE_OPTION1 BIT(7) | 30 | #define DOVE_TWSI_ENABLE_OPTION1 BIT(7) |
31 | #define DOVE_GLOBAL_CONFIG_2 (DOVE_SB_REGS_VIRT_BASE | 0xe8030) | 31 | #define DOVE_GLOBAL_CONFIG_2 (DOVE_SB_REGS_VIRT_BASE + 0xe8030) |
32 | #define DOVE_TWSI_ENABLE_OPTION2 BIT(20) | 32 | #define DOVE_TWSI_ENABLE_OPTION2 BIT(20) |
33 | #define DOVE_TWSI_ENABLE_OPTION3 BIT(21) | 33 | #define DOVE_TWSI_ENABLE_OPTION3 BIT(21) |
34 | #define DOVE_TWSI_OPTION3_GPIO BIT(22) | 34 | #define DOVE_TWSI_OPTION3_GPIO BIT(22) |
35 | #define DOVE_SSP_CTRL_STATUS_1 (DOVE_SB_REGS_VIRT_BASE | 0xe8034) | 35 | #define DOVE_SSP_CTRL_STATUS_1 (DOVE_SB_REGS_VIRT_BASE + 0xe8034) |
36 | #define DOVE_SSP_ON_AU1 BIT(0) | 36 | #define DOVE_SSP_ON_AU1 BIT(0) |
37 | #define DOVE_MPP_GENERAL_VIRT_BASE (DOVE_SB_REGS_VIRT_BASE | 0xe803c) | 37 | #define DOVE_MPP_GENERAL_VIRT_BASE (DOVE_SB_REGS_VIRT_BASE + 0xe803c) |
38 | #define DOVE_AU1_SPDIFO_GPIO_EN BIT(1) | 38 | #define DOVE_AU1_SPDIFO_GPIO_EN BIT(1) |
39 | #define DOVE_NAND_GPIO_EN BIT(0) | 39 | #define DOVE_NAND_GPIO_EN BIT(0) |
40 | #define DOVE_GPIO_LO_VIRT_BASE (DOVE_SB_REGS_VIRT_BASE | 0xd0400) | 40 | #define DOVE_GPIO_LO_VIRT_BASE (DOVE_SB_REGS_VIRT_BASE + 0xd0400) |
41 | #define DOVE_MPP_CTRL4_VIRT_BASE (DOVE_GPIO_LO_VIRT_BASE + 0x40) | 41 | #define DOVE_MPP_CTRL4_VIRT_BASE (DOVE_GPIO_LO_VIRT_BASE + 0x40) |
42 | #define DOVE_SPI_GPIO_SEL BIT(5) | 42 | #define DOVE_SPI_GPIO_SEL BIT(5) |
43 | #define DOVE_UART1_GPIO_SEL BIT(4) | 43 | #define DOVE_UART1_GPIO_SEL BIT(4) |
@@ -234,6 +234,14 @@ static int dove_audio1_ctrl_set(struct mvebu_mpp_ctrl *ctrl, | |||
234 | unsigned long gmpp = readl(DOVE_MPP_GENERAL_VIRT_BASE); | 234 | unsigned long gmpp = readl(DOVE_MPP_GENERAL_VIRT_BASE); |
235 | unsigned long gcfg2 = readl(DOVE_GLOBAL_CONFIG_2); | 235 | unsigned long gcfg2 = readl(DOVE_GLOBAL_CONFIG_2); |
236 | 236 | ||
237 | /* | ||
238 | * clear all audio1 related bits before configure | ||
239 | */ | ||
240 | gcfg2 &= ~DOVE_TWSI_OPTION3_GPIO; | ||
241 | gmpp &= ~DOVE_AU1_SPDIFO_GPIO_EN; | ||
242 | sspc1 &= ~DOVE_SSP_ON_AU1; | ||
243 | mpp4 &= ~DOVE_AU1_GPIO_SEL; | ||
244 | |||
237 | if (config & BIT(0)) | 245 | if (config & BIT(0)) |
238 | gcfg2 |= DOVE_TWSI_OPTION3_GPIO; | 246 | gcfg2 |= DOVE_TWSI_OPTION3_GPIO; |
239 | if (config & BIT(1)) | 247 | if (config & BIT(1)) |
diff --git a/drivers/pinctrl/mvebu/pinctrl-kirkwood.c b/drivers/pinctrl/mvebu/pinctrl-kirkwood.c new file mode 100644 index 000000000000..fa6ce31c94d9 --- /dev/null +++ b/drivers/pinctrl/mvebu/pinctrl-kirkwood.c | |||
@@ -0,0 +1,484 @@ | |||
1 | /* | ||
2 | * Marvell Kirkwood pinctrl driver based on mvebu pinctrl core | ||
3 | * | ||
4 | * Author: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com> | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License as published by | ||
8 | * the Free Software Foundation; either version 2 of the License, or | ||
9 | * (at your option) any later version. | ||
10 | */ | ||
11 | |||
12 | #include <linux/err.h> | ||
13 | #include <linux/init.h> | ||
14 | #include <linux/io.h> | ||
15 | #include <linux/module.h> | ||
16 | #include <linux/platform_device.h> | ||
17 | #include <linux/clk.h> | ||
18 | #include <linux/of.h> | ||
19 | #include <linux/of_device.h> | ||
20 | #include <linux/pinctrl/pinctrl.h> | ||
21 | |||
22 | #include "pinctrl-mvebu.h" | ||
23 | |||
24 | #define V(f6180, f6190, f6192, f6281, f6282, dx4122) \ | ||
25 | ((f6180 << 0) | (f6190 << 1) | (f6192 << 2) | \ | ||
26 | (f6281 << 3) | (f6282 << 4) | (dx4122 << 5)) | ||
27 | |||
28 | enum kirkwood_variant { | ||
29 | VARIANT_MV88F6180 = V(1, 0, 0, 0, 0, 0), | ||
30 | VARIANT_MV88F6190 = V(0, 1, 0, 0, 0, 0), | ||
31 | VARIANT_MV88F6192 = V(0, 0, 1, 0, 0, 0), | ||
32 | VARIANT_MV88F6281 = V(0, 0, 0, 1, 0, 0), | ||
33 | VARIANT_MV88F6282 = V(0, 0, 0, 0, 1, 0), | ||
34 | VARIANT_MV98DX4122 = V(0, 0, 0, 0, 0, 1), | ||
35 | }; | ||
36 | |||
37 | static struct mvebu_mpp_mode mv88f6xxx_mpp_modes[] = { | ||
38 | MPP_MODE(0, | ||
39 | MPP_VAR_FUNCTION(0x0, "gpio", NULL, V(1, 1, 1, 1, 1, 1)), | ||
40 | MPP_VAR_FUNCTION(0x1, "nand", "io2", V(1, 1, 1, 1, 1, 1)), | ||
41 | MPP_VAR_FUNCTION(0x2, "spi", "cs", V(1, 1, 1, 1, 1, 1))), | ||
42 | MPP_MODE(1, | ||
43 | MPP_VAR_FUNCTION(0x0, "gpo", NULL, V(1, 1, 1, 1, 1, 1)), | ||
44 | MPP_VAR_FUNCTION(0x1, "nand", "io3", V(1, 1, 1, 1, 1, 1)), | ||
45 | MPP_VAR_FUNCTION(0x2, "spi", "mosi", V(1, 1, 1, 1, 1, 1))), | ||
46 | MPP_MODE(2, | ||
47 | MPP_VAR_FUNCTION(0x0, "gpo", NULL, V(1, 1, 1, 1, 1, 1)), | ||
48 | MPP_VAR_FUNCTION(0x1, "nand", "io4", V(1, 1, 1, 1, 1, 1)), | ||
49 | MPP_VAR_FUNCTION(0x2, "spi", "sck", V(1, 1, 1, 1, 1, 1))), | ||
50 | MPP_MODE(3, | ||
51 | MPP_VAR_FUNCTION(0x0, "gpo", NULL, V(1, 1, 1, 1, 1, 1)), | ||
52 | MPP_VAR_FUNCTION(0x1, "nand", "io5", V(1, 1, 1, 1, 1, 1)), | ||
53 | MPP_VAR_FUNCTION(0x2, "spi", "miso", V(1, 1, 1, 1, 1, 1))), | ||
54 | MPP_MODE(4, | ||
55 | MPP_VAR_FUNCTION(0x0, "gpio", NULL, V(1, 1, 1, 1, 1, 1)), | ||
56 | MPP_VAR_FUNCTION(0x1, "nand", "io6", V(1, 1, 1, 1, 1, 1)), | ||
57 | MPP_VAR_FUNCTION(0x2, "uart0", "rxd", V(1, 1, 1, 1, 1, 1)), | ||
58 | MPP_VAR_FUNCTION(0x5, "sata1", "act", V(0, 0, 1, 1, 1, 0)), | ||
59 | MPP_VAR_FUNCTION(0xb, "lcd", "hsync", V(0, 0, 0, 0, 1, 0)), | ||
60 | MPP_VAR_FUNCTION(0xd, "ptp", "clk", V(1, 1, 1, 1, 0, 0))), | ||
61 | MPP_MODE(5, | ||
62 | MPP_VAR_FUNCTION(0x0, "gpo", NULL, V(1, 1, 1, 1, 1, 1)), | ||
63 | MPP_VAR_FUNCTION(0x1, "nand", "io7", V(1, 1, 1, 1, 1, 1)), | ||
64 | MPP_VAR_FUNCTION(0x2, "uart0", "txd", V(1, 1, 1, 1, 1, 1)), | ||
65 | MPP_VAR_FUNCTION(0x4, "ptp", "trig", V(1, 1, 1, 1, 0, 0)), | ||
66 | MPP_VAR_FUNCTION(0x5, "sata0", "act", V(0, 1, 1, 1, 1, 0)), | ||
67 | MPP_VAR_FUNCTION(0xb, "lcd", "vsync", V(0, 0, 0, 0, 1, 0))), | ||
68 | MPP_MODE(6, | ||
69 | MPP_VAR_FUNCTION(0x0, "sysrst", "out", V(1, 1, 1, 1, 1, 1)), | ||
70 | MPP_VAR_FUNCTION(0x1, "spi", "mosi", V(1, 1, 1, 1, 1, 1)), | ||
71 | MPP_VAR_FUNCTION(0x2, "ptp", "trig", V(1, 1, 1, 1, 0, 0))), | ||
72 | MPP_MODE(7, | ||
73 | MPP_VAR_FUNCTION(0x0, "gpo", NULL, V(1, 1, 1, 1, 1, 1)), | ||
74 | MPP_VAR_FUNCTION(0x1, "pex", "rsto", V(1, 1, 1, 1, 0, 1)), | ||
75 | MPP_VAR_FUNCTION(0x2, "spi", "cs", V(1, 1, 1, 1, 1, 1)), | ||
76 | MPP_VAR_FUNCTION(0x3, "ptp", "trig", V(1, 1, 1, 1, 0, 0)), | ||
77 | MPP_VAR_FUNCTION(0xb, "lcd", "pwm", V(0, 0, 0, 0, 1, 0))), | ||
78 | MPP_MODE(8, | ||
79 | MPP_VAR_FUNCTION(0x0, "gpio", NULL, V(1, 1, 1, 1, 1, 1)), | ||
80 | MPP_VAR_FUNCTION(0x1, "twsi0", "sda", V(1, 1, 1, 1, 1, 1)), | ||
81 | MPP_VAR_FUNCTION(0x2, "uart0", "rts", V(1, 1, 1, 1, 1, 1)), | ||
82 | MPP_VAR_FUNCTION(0x3, "uart1", "rts", V(1, 1, 1, 1, 1, 1)), | ||
83 | MPP_VAR_FUNCTION(0x4, "mii-1", "rxerr", V(0, 1, 1, 1, 1, 0)), | ||
84 | MPP_VAR_FUNCTION(0x5, "sata1", "prsnt", V(0, 0, 1, 1, 1, 0)), | ||
85 | MPP_VAR_FUNCTION(0xc, "ptp", "clk", V(1, 1, 1, 1, 0, 0)), | ||
86 | MPP_VAR_FUNCTION(0xd, "mii", "col", V(1, 1, 1, 1, 1, 0))), | ||
87 | MPP_MODE(9, | ||
88 | MPP_VAR_FUNCTION(0x0, "gpio", NULL, V(1, 1, 1, 1, 1, 1)), | ||
89 | MPP_VAR_FUNCTION(0x1, "twsi0", "sck", V(1, 1, 1, 1, 1, 1)), | ||
90 | MPP_VAR_FUNCTION(0x2, "uart0", "cts", V(1, 1, 1, 1, 1, 1)), | ||
91 | MPP_VAR_FUNCTION(0x3, "uart1", "cts", V(1, 1, 1, 1, 1, 1)), | ||
92 | MPP_VAR_FUNCTION(0x5, "sata0", "prsnt", V(0, 1, 1, 1, 1, 0)), | ||
93 | MPP_VAR_FUNCTION(0xc, "ptp", "evreq", V(1, 1, 1, 1, 0, 0)), | ||
94 | MPP_VAR_FUNCTION(0xd, "mii", "crs", V(1, 1, 1, 1, 1, 0))), | ||
95 | MPP_MODE(10, | ||
96 | MPP_VAR_FUNCTION(0x0, "gpo", NULL, V(1, 1, 1, 1, 1, 1)), | ||
97 | MPP_VAR_FUNCTION(0x2, "spi", "sck", V(1, 1, 1, 1, 1, 1)), | ||
98 | MPP_VAR_FUNCTION(0X3, "uart0", "txd", V(1, 1, 1, 1, 1, 1)), | ||
99 | MPP_VAR_FUNCTION(0x5, "sata1", "act", V(0, 0, 1, 1, 1, 0)), | ||
100 | MPP_VAR_FUNCTION(0xc, "ptp", "trig", V(1, 1, 1, 1, 0, 0))), | ||
101 | MPP_MODE(11, | ||
102 | MPP_VAR_FUNCTION(0x0, "gpio", NULL, V(1, 1, 1, 1, 1, 1)), | ||
103 | MPP_VAR_FUNCTION(0x2, "spi", "miso", V(1, 1, 1, 1, 1, 1)), | ||
104 | MPP_VAR_FUNCTION(0x3, "uart0", "rxd", V(1, 1, 1, 1, 1, 1)), | ||
105 | MPP_VAR_FUNCTION(0x4, "ptp-1", "evreq", V(1, 1, 1, 1, 0, 0)), | ||
106 | MPP_VAR_FUNCTION(0xc, "ptp-2", "trig", V(1, 1, 1, 1, 0, 0)), | ||
107 | MPP_VAR_FUNCTION(0xd, "ptp", "clk", V(1, 1, 1, 1, 0, 0)), | ||
108 | MPP_VAR_FUNCTION(0x5, "sata0", "act", V(0, 1, 1, 1, 1, 0))), | ||
109 | MPP_MODE(12, | ||
110 | MPP_VAR_FUNCTION(0x0, "gpo", NULL, V(1, 1, 1, 0, 1, 0)), | ||
111 | MPP_VAR_FUNCTION(0x0, "gpio", NULL, V(0, 0, 0, 1, 0, 0)), | ||
112 | MPP_VAR_FUNCTION(0x1, "sdio", "clk", V(1, 1, 1, 1, 1, 0)), | ||
113 | MPP_VAR_FUNCTION(0xa, "audio", "spdifo", V(0, 0, 0, 0, 1, 0)), | ||
114 | MPP_VAR_FUNCTION(0xb, "spi", "mosi", V(0, 0, 0, 0, 1, 0)), | ||
115 | MPP_VAR_FUNCTION(0xd, "twsi1", "sda", V(0, 0, 0, 0, 1, 0))), | ||
116 | MPP_MODE(13, | ||
117 | MPP_VAR_FUNCTION(0x0, "gpio", NULL, V(1, 1, 1, 1, 1, 1)), | ||
118 | MPP_VAR_FUNCTION(0x1, "sdio", "cmd", V(1, 1, 1, 1, 1, 0)), | ||
119 | MPP_VAR_FUNCTION(0x3, "uart1", "txd", V(1, 1, 1, 1, 1, 1)), | ||
120 | MPP_VAR_FUNCTION(0xa, "audio", "rmclk", V(0, 0, 0, 0, 1, 0)), | ||
121 | MPP_VAR_FUNCTION(0xb, "lcd", "pwm", V(0, 0, 0, 0, 1, 0))), | ||
122 | MPP_MODE(14, | ||
123 | MPP_VAR_FUNCTION(0x0, "gpio", NULL, V(1, 1, 1, 1, 1, 1)), | ||
124 | MPP_VAR_FUNCTION(0x1, "sdio", "d0", V(1, 1, 1, 1, 1, 0)), | ||
125 | MPP_VAR_FUNCTION(0x3, "uart1", "rxd", V(1, 1, 1, 1, 1, 1)), | ||
126 | MPP_VAR_FUNCTION(0x4, "sata1", "prsnt", V(0, 0, 1, 1, 1, 0)), | ||
127 | MPP_VAR_FUNCTION(0xa, "audio", "spdifi", V(0, 0, 0, 0, 1, 0)), | ||
128 | MPP_VAR_FUNCTION(0xb, "audio-1", "sdi", V(0, 0, 0, 0, 1, 0)), | ||
129 | MPP_VAR_FUNCTION(0xd, "mii", "col", V(1, 1, 1, 1, 1, 0))), | ||
130 | MPP_MODE(15, | ||
131 | MPP_VAR_FUNCTION(0x0, "gpio", NULL, V(1, 1, 1, 1, 1, 1)), | ||
132 | MPP_VAR_FUNCTION(0x1, "sdio", "d1", V(1, 1, 1, 1, 1, 0)), | ||
133 | MPP_VAR_FUNCTION(0x2, "uart0", "rts", V(1, 1, 1, 1, 1, 1)), | ||
134 | MPP_VAR_FUNCTION(0x3, "uart1", "txd", V(1, 1, 1, 1, 1, 0)), | ||
135 | MPP_VAR_FUNCTION(0x4, "sata0", "act", V(0, 1, 1, 1, 1, 0)), | ||
136 | MPP_VAR_FUNCTION(0xb, "spi", "cs", V(0, 0, 0, 0, 1, 0))), | ||
137 | MPP_MODE(16, | ||
138 | MPP_VAR_FUNCTION(0x0, "gpio", NULL, V(1, 1, 1, 1, 1, 1)), | ||
139 | MPP_VAR_FUNCTION(0x1, "sdio", "d2", V(1, 1, 1, 1, 1, 0)), | ||
140 | MPP_VAR_FUNCTION(0x2, "uart0", "cts", V(1, 1, 1, 1, 1, 1)), | ||
141 | MPP_VAR_FUNCTION(0x3, "uart1", "rxd", V(1, 1, 1, 1, 1, 0)), | ||
142 | MPP_VAR_FUNCTION(0x4, "sata1", "act", V(0, 0, 1, 1, 1, 0)), | ||
143 | MPP_VAR_FUNCTION(0xb, "lcd", "extclk", V(0, 0, 0, 0, 1, 0)), | ||
144 | MPP_VAR_FUNCTION(0xd, "mii", "crs", V(1, 1, 1, 1, 1, 0))), | ||
145 | MPP_MODE(17, | ||
146 | MPP_VAR_FUNCTION(0x0, "gpio", NULL, V(1, 1, 1, 1, 1, 0)), | ||
147 | MPP_VAR_FUNCTION(0x1, "sdio", "d3", V(1, 1, 1, 1, 1, 0)), | ||
148 | MPP_VAR_FUNCTION(0x4, "sata0", "prsnt", V(0, 1, 1, 1, 1, 0)), | ||
149 | MPP_VAR_FUNCTION(0xa, "sata1", "act", V(0, 0, 0, 0, 1, 0)), | ||
150 | MPP_VAR_FUNCTION(0xd, "twsi1", "sck", V(0, 0, 0, 0, 1, 0))), | ||
151 | MPP_MODE(18, | ||
152 | MPP_VAR_FUNCTION(0x0, "gpo", NULL, V(1, 1, 1, 1, 1, 1)), | ||
153 | MPP_VAR_FUNCTION(0x1, "nand", "io0", V(1, 1, 1, 1, 1, 1)), | ||
154 | MPP_VAR_FUNCTION(0x2, "pex", "clkreq", V(0, 0, 0, 0, 1, 0))), | ||
155 | MPP_MODE(19, | ||
156 | MPP_VAR_FUNCTION(0x0, "gpo", NULL, V(1, 1, 1, 1, 1, 1)), | ||
157 | MPP_VAR_FUNCTION(0x1, "nand", "io1", V(1, 1, 1, 1, 1, 1))), | ||
158 | MPP_MODE(20, | ||
159 | MPP_VAR_FUNCTION(0x0, "gpio", NULL, V(1, 1, 1, 1, 1, 0)), | ||
160 | MPP_VAR_FUNCTION(0x1, "ts", "mp0", V(0, 0, 1, 1, 1, 0)), | ||
161 | MPP_VAR_FUNCTION(0x2, "tdm", "tx0ql", V(0, 0, 1, 1, 1, 0)), | ||
162 | MPP_VAR_FUNCTION(0x3, "ge1", "txd0", V(0, 1, 1, 1, 1, 0)), | ||
163 | MPP_VAR_FUNCTION(0x4, "audio", "spdifi", V(0, 0, 1, 1, 1, 0)), | ||
164 | MPP_VAR_FUNCTION(0x5, "sata1", "act", V(0, 0, 1, 1, 1, 0)), | ||
165 | MPP_VAR_FUNCTION(0xb, "lcd", "d0", V(0, 0, 0, 0, 1, 0)), | ||
166 | MPP_VAR_FUNCTION(0xc, "mii", "rxerr", V(1, 0, 0, 0, 0, 0))), | ||
167 | MPP_MODE(21, | ||
168 | MPP_VAR_FUNCTION(0x0, "gpio", NULL, V(1, 1, 1, 1, 1, 0)), | ||
169 | MPP_VAR_FUNCTION(0x1, "ts", "mp1", V(0, 0, 1, 1, 1, 0)), | ||
170 | MPP_VAR_FUNCTION(0x2, "tdm", "rx0ql", V(0, 0, 1, 1, 1, 0)), | ||
171 | MPP_VAR_FUNCTION(0x3, "ge1", "txd1", V(0, 1, 1, 1, 1, 0)), | ||
172 | MPP_VAR_FUNCTION(0x4, "audio", "spdifi", V(1, 0, 0, 0, 0, 0)), | ||
173 | MPP_VAR_FUNCTION(0x4, "audio", "spdifo", V(0, 0, 1, 1, 1, 0)), | ||
174 | MPP_VAR_FUNCTION(0x5, "sata0", "act", V(0, 1, 1, 1, 1, 0)), | ||
175 | MPP_VAR_FUNCTION(0xb, "lcd", "d1", V(0, 0, 0, 0, 1, 0))), | ||
176 | MPP_MODE(22, | ||
177 | MPP_VAR_FUNCTION(0x0, "gpio", NULL, V(1, 1, 1, 1, 1, 0)), | ||
178 | MPP_VAR_FUNCTION(0x1, "ts", "mp2", V(0, 0, 1, 1, 1, 0)), | ||
179 | MPP_VAR_FUNCTION(0x2, "tdm", "tx2ql", V(0, 0, 1, 1, 1, 0)), | ||
180 | MPP_VAR_FUNCTION(0x3, "ge1", "txd2", V(0, 1, 1, 1, 1, 0)), | ||
181 | MPP_VAR_FUNCTION(0x4, "audio", "spdifo", V(1, 0, 0, 0, 0, 0)), | ||
182 | MPP_VAR_FUNCTION(0x4, "audio", "rmclk", V(0, 0, 1, 1, 1, 0)), | ||
183 | MPP_VAR_FUNCTION(0x5, "sata1", "prsnt", V(0, 0, 1, 1, 1, 0)), | ||
184 | MPP_VAR_FUNCTION(0xb, "lcd", "d2", V(0, 0, 0, 0, 1, 0))), | ||
185 | MPP_MODE(23, | ||
186 | MPP_VAR_FUNCTION(0x0, "gpio", NULL, V(1, 1, 1, 1, 1, 0)), | ||
187 | MPP_VAR_FUNCTION(0x1, "ts", "mp3", V(0, 0, 1, 1, 1, 0)), | ||
188 | MPP_VAR_FUNCTION(0x2, "tdm", "rx2ql", V(0, 0, 1, 1, 1, 0)), | ||
189 | MPP_VAR_FUNCTION(0x3, "ge1", "txd3", V(0, 1, 1, 1, 1, 0)), | ||
190 | MPP_VAR_FUNCTION(0x4, "audio", "rmclk", V(1, 0, 0, 0, 0, 0)), | ||
191 | MPP_VAR_FUNCTION(0x4, "audio", "bclk", V(0, 0, 1, 1, 1, 0)), | ||
192 | MPP_VAR_FUNCTION(0x5, "sata0", "prsnt", V(0, 1, 1, 1, 1, 0)), | ||
193 | MPP_VAR_FUNCTION(0xb, "lcd", "d3", V(0, 0, 0, 0, 1, 0))), | ||
194 | MPP_MODE(24, | ||
195 | MPP_VAR_FUNCTION(0x0, "gpio", NULL, V(1, 1, 1, 1, 1, 0)), | ||
196 | MPP_VAR_FUNCTION(0x1, "ts", "mp4", V(0, 0, 1, 1, 1, 0)), | ||
197 | MPP_VAR_FUNCTION(0x2, "tdm", "spi-cs0", V(0, 0, 1, 1, 1, 0)), | ||
198 | MPP_VAR_FUNCTION(0x3, "ge1", "rxd0", V(0, 1, 1, 1, 1, 0)), | ||
199 | MPP_VAR_FUNCTION(0x4, "audio", "bclk", V(1, 0, 0, 0, 0, 0)), | ||
200 | MPP_VAR_FUNCTION(0x4, "audio", "sdo", V(0, 0, 1, 1, 1, 0)), | ||
201 | MPP_VAR_FUNCTION(0xb, "lcd", "d4", V(0, 0, 0, 0, 1, 0))), | ||
202 | MPP_MODE(25, | ||
203 | MPP_VAR_FUNCTION(0x0, "gpio", NULL, V(1, 1, 1, 1, 1, 0)), | ||
204 | MPP_VAR_FUNCTION(0x1, "ts", "mp5", V(0, 0, 1, 1, 1, 0)), | ||
205 | MPP_VAR_FUNCTION(0x2, "tdm", "spi-sck", V(0, 0, 1, 1, 1, 0)), | ||
206 | MPP_VAR_FUNCTION(0x3, "ge1", "rxd1", V(0, 1, 1, 1, 1, 0)), | ||
207 | MPP_VAR_FUNCTION(0x4, "audio", "sdo", V(1, 0, 0, 0, 0, 0)), | ||
208 | MPP_VAR_FUNCTION(0x4, "audio", "lrclk", V(0, 0, 1, 1, 1, 0)), | ||
209 | MPP_VAR_FUNCTION(0xb, "lcd", "d5", V(0, 0, 0, 0, 1, 0))), | ||
210 | MPP_MODE(26, | ||
211 | MPP_VAR_FUNCTION(0x0, "gpio", NULL, V(1, 1, 1, 1, 1, 0)), | ||
212 | MPP_VAR_FUNCTION(0x1, "ts", "mp6", V(0, 0, 1, 1, 1, 0)), | ||
213 | MPP_VAR_FUNCTION(0x2, "tdm", "spi-miso", V(0, 0, 1, 1, 1, 0)), | ||
214 | MPP_VAR_FUNCTION(0x3, "ge1", "rxd2", V(0, 1, 1, 1, 1, 0)), | ||
215 | MPP_VAR_FUNCTION(0x4, "audio", "lrclk", V(1, 0, 0, 0, 0, 0)), | ||
216 | MPP_VAR_FUNCTION(0x4, "audio", "mclk", V(0, 0, 1, 1, 1, 0)), | ||
217 | MPP_VAR_FUNCTION(0xb, "lcd", "d6", V(0, 0, 0, 0, 1, 0))), | ||
218 | MPP_MODE(27, | ||
219 | MPP_VAR_FUNCTION(0x0, "gpio", NULL, V(1, 1, 1, 1, 1, 0)), | ||
220 | MPP_VAR_FUNCTION(0x1, "ts", "mp7", V(0, 0, 1, 1, 1, 0)), | ||
221 | MPP_VAR_FUNCTION(0x2, "tdm", "spi-mosi", V(0, 0, 1, 1, 1, 0)), | ||
222 | MPP_VAR_FUNCTION(0x3, "ge1", "rxd3", V(0, 1, 1, 1, 1, 0)), | ||
223 | MPP_VAR_FUNCTION(0x4, "audio", "mclk", V(1, 0, 0, 0, 0, 0)), | ||
224 | MPP_VAR_FUNCTION(0x4, "audio", "sdi", V(0, 0, 1, 1, 1, 0)), | ||
225 | MPP_VAR_FUNCTION(0xb, "lcd", "d7", V(0, 0, 0, 0, 1, 0))), | ||
226 | MPP_MODE(28, | ||
227 | MPP_VAR_FUNCTION(0x0, "gpio", NULL, V(1, 1, 1, 1, 1, 0)), | ||
228 | MPP_VAR_FUNCTION(0x1, "ts", "mp8", V(0, 0, 1, 1, 1, 0)), | ||
229 | MPP_VAR_FUNCTION(0x2, "tdm", "int", V(0, 0, 1, 1, 1, 0)), | ||
230 | MPP_VAR_FUNCTION(0x3, "ge1", "col", V(0, 1, 1, 1, 1, 0)), | ||
231 | MPP_VAR_FUNCTION(0x4, "audio", "sdi", V(1, 0, 0, 0, 0, 0)), | ||
232 | MPP_VAR_FUNCTION(0x4, "audio", "extclk", V(0, 0, 1, 1, 1, 0)), | ||
233 | MPP_VAR_FUNCTION(0xb, "lcd", "d8", V(0, 0, 0, 0, 1, 0))), | ||
234 | MPP_MODE(29, | ||
235 | MPP_VAR_FUNCTION(0x0, "gpio", NULL, V(1, 1, 1, 1, 1, 0)), | ||
236 | MPP_VAR_FUNCTION(0x1, "ts", "mp9", V(0, 0, 1, 1, 1, 0)), | ||
237 | MPP_VAR_FUNCTION(0x2, "tdm", "rst", V(0, 0, 1, 1, 1, 0)), | ||
238 | MPP_VAR_FUNCTION(0x3, "ge1", "txclk", V(0, 1, 1, 1, 1, 0)), | ||
239 | MPP_VAR_FUNCTION(0x4, "audio", "extclk", V(1, 0, 0, 0, 0, 0)), | ||
240 | MPP_VAR_FUNCTION(0xb, "lcd", "d9", V(0, 0, 0, 0, 1, 0))), | ||
241 | MPP_MODE(30, | ||
242 | MPP_VAR_FUNCTION(0x0, "gpio", NULL, V(0, 1, 1, 1, 1, 0)), | ||
243 | MPP_VAR_FUNCTION(0x1, "ts", "mp10", V(0, 0, 1, 1, 1, 0)), | ||
244 | MPP_VAR_FUNCTION(0x2, "tdm", "pclk", V(0, 0, 1, 1, 1, 0)), | ||
245 | MPP_VAR_FUNCTION(0x3, "ge1", "rxctl", V(0, 1, 1, 1, 1, 0)), | ||
246 | MPP_VAR_FUNCTION(0xb, "lcd", "d10", V(0, 0, 0, 0, 1, 0))), | ||
247 | MPP_MODE(31, | ||
248 | MPP_VAR_FUNCTION(0x0, "gpio", NULL, V(0, 1, 1, 1, 1, 0)), | ||
249 | MPP_VAR_FUNCTION(0x1, "ts", "mp11", V(0, 0, 1, 1, 1, 0)), | ||
250 | MPP_VAR_FUNCTION(0x2, "tdm", "fs", V(0, 0, 1, 1, 1, 0)), | ||
251 | MPP_VAR_FUNCTION(0x3, "ge1", "rxclk", V(0, 1, 1, 1, 1, 0)), | ||
252 | MPP_VAR_FUNCTION(0xb, "lcd", "d11", V(0, 0, 0, 0, 1, 0))), | ||
253 | MPP_MODE(32, | ||
254 | MPP_VAR_FUNCTION(0x0, "gpio", NULL, V(0, 1, 1, 1, 1, 0)), | ||
255 | MPP_VAR_FUNCTION(0x1, "ts", "mp12", V(0, 0, 1, 1, 1, 0)), | ||
256 | MPP_VAR_FUNCTION(0x2, "tdm", "drx", V(0, 0, 1, 1, 1, 0)), | ||
257 | MPP_VAR_FUNCTION(0x3, "ge1", "txclko", V(0, 1, 1, 1, 1, 0)), | ||
258 | MPP_VAR_FUNCTION(0xb, "lcd", "d12", V(0, 0, 0, 0, 1, 0))), | ||
259 | MPP_MODE(33, | ||
260 | MPP_VAR_FUNCTION(0x0, "gpo", NULL, V(0, 1, 1, 1, 1, 0)), | ||
261 | MPP_VAR_FUNCTION(0x2, "tdm", "dtx", V(0, 0, 1, 1, 1, 0)), | ||
262 | MPP_VAR_FUNCTION(0x3, "ge1", "txctl", V(0, 1, 1, 1, 1, 0)), | ||
263 | MPP_VAR_FUNCTION(0xb, "lcd", "d13", V(0, 0, 0, 0, 1, 0))), | ||
264 | MPP_MODE(34, | ||
265 | MPP_VAR_FUNCTION(0x0, "gpio", NULL, V(0, 1, 1, 1, 1, 1)), | ||
266 | MPP_VAR_FUNCTION(0x2, "tdm", "spi-cs1", V(0, 0, 1, 1, 1, 0)), | ||
267 | MPP_VAR_FUNCTION(0x3, "ge1", "txen", V(0, 1, 1, 1, 1, 0)), | ||
268 | MPP_VAR_FUNCTION(0x5, "sata1", "act", V(0, 0, 0, 1, 1, 0)), | ||
269 | MPP_VAR_FUNCTION(0xb, "lcd", "d14", V(0, 0, 0, 0, 1, 0))), | ||
270 | MPP_MODE(35, | ||
271 | MPP_VAR_FUNCTION(0x0, "gpio", NULL, V(0, 1, 1, 1, 1, 1)), | ||
272 | MPP_VAR_FUNCTION(0x2, "tdm", "tx0ql", V(0, 0, 1, 1, 1, 0)), | ||
273 | MPP_VAR_FUNCTION(0x3, "ge1", "rxerr", V(0, 1, 1, 1, 1, 0)), | ||
274 | MPP_VAR_FUNCTION(0x5, "sata0", "act", V(0, 1, 1, 1, 1, 0)), | ||
275 | MPP_VAR_FUNCTION(0xb, "lcd", "d15", V(0, 0, 0, 0, 1, 0)), | ||
276 | MPP_VAR_FUNCTION(0xc, "mii", "rxerr", V(0, 1, 1, 1, 1, 0))), | ||
277 | MPP_MODE(36, | ||
278 | MPP_VAR_FUNCTION(0x0, "gpio", NULL, V(0, 0, 0, 1, 1, 1)), | ||
279 | MPP_VAR_FUNCTION(0x1, "ts", "mp0", V(0, 0, 0, 1, 1, 0)), | ||
280 | MPP_VAR_FUNCTION(0x2, "tdm", "spi-cs1", V(0, 0, 0, 1, 1, 0)), | ||
281 | MPP_VAR_FUNCTION(0x4, "audio", "spdifi", V(0, 0, 0, 1, 1, 0)), | ||
282 | MPP_VAR_FUNCTION(0xb, "twsi1", "sda", V(0, 0, 0, 0, 1, 0))), | ||
283 | MPP_MODE(37, | ||
284 | MPP_VAR_FUNCTION(0x0, "gpio", NULL, V(0, 0, 0, 1, 1, 1)), | ||
285 | MPP_VAR_FUNCTION(0x1, "ts", "mp1", V(0, 0, 0, 1, 1, 0)), | ||
286 | MPP_VAR_FUNCTION(0x2, "tdm", "tx2ql", V(0, 0, 0, 1, 1, 0)), | ||
287 | MPP_VAR_FUNCTION(0x4, "audio", "spdifo", V(0, 0, 0, 1, 1, 0)), | ||
288 | MPP_VAR_FUNCTION(0xb, "twsi1", "sck", V(0, 0, 0, 0, 1, 0))), | ||
289 | MPP_MODE(38, | ||
290 | MPP_VAR_FUNCTION(0x0, "gpio", NULL, V(0, 0, 0, 1, 1, 1)), | ||
291 | MPP_VAR_FUNCTION(0x1, "ts", "mp2", V(0, 0, 0, 1, 1, 0)), | ||
292 | MPP_VAR_FUNCTION(0x2, "tdm", "rx2ql", V(0, 0, 0, 1, 1, 0)), | ||
293 | MPP_VAR_FUNCTION(0x4, "audio", "rmclk", V(0, 0, 0, 1, 1, 0)), | ||
294 | MPP_VAR_FUNCTION(0xb, "lcd", "d18", V(0, 0, 0, 0, 1, 0))), | ||
295 | MPP_MODE(39, | ||
296 | MPP_VAR_FUNCTION(0x0, "gpio", NULL, V(0, 0, 0, 1, 1, 1)), | ||
297 | MPP_VAR_FUNCTION(0x1, "ts", "mp3", V(0, 0, 0, 1, 1, 0)), | ||
298 | MPP_VAR_FUNCTION(0x2, "tdm", "spi-cs0", V(0, 0, 0, 1, 1, 0)), | ||
299 | MPP_VAR_FUNCTION(0x4, "audio", "bclk", V(0, 0, 0, 1, 1, 0)), | ||
300 | MPP_VAR_FUNCTION(0xb, "lcd", "d19", V(0, 0, 0, 0, 1, 0))), | ||
301 | MPP_MODE(40, | ||
302 | MPP_VAR_FUNCTION(0x0, "gpio", NULL, V(0, 0, 0, 1, 1, 1)), | ||
303 | MPP_VAR_FUNCTION(0x1, "ts", "mp4", V(0, 0, 0, 1, 1, 0)), | ||
304 | MPP_VAR_FUNCTION(0x2, "tdm", "spi-sck", V(0, 0, 0, 1, 1, 0)), | ||
305 | MPP_VAR_FUNCTION(0x4, "audio", "sdo", V(0, 0, 0, 1, 1, 0)), | ||
306 | MPP_VAR_FUNCTION(0xb, "lcd", "d20", V(0, 0, 0, 0, 1, 0))), | ||
307 | MPP_MODE(41, | ||
308 | MPP_VAR_FUNCTION(0x0, "gpio", NULL, V(0, 0, 0, 1, 1, 1)), | ||
309 | MPP_VAR_FUNCTION(0x1, "ts", "mp5", V(0, 0, 0, 1, 1, 0)), | ||
310 | MPP_VAR_FUNCTION(0x2, "tdm", "spi-miso", V(0, 0, 0, 1, 1, 0)), | ||
311 | MPP_VAR_FUNCTION(0x4, "audio", "lrclk", V(0, 0, 0, 1, 1, 0)), | ||
312 | MPP_VAR_FUNCTION(0xb, "lcd", "d21", V(0, 0, 0, 0, 1, 0))), | ||
313 | MPP_MODE(42, | ||
314 | MPP_VAR_FUNCTION(0x0, "gpio", NULL, V(0, 0, 0, 1, 1, 1)), | ||
315 | MPP_VAR_FUNCTION(0x1, "ts", "mp6", V(0, 0, 0, 1, 1, 0)), | ||
316 | MPP_VAR_FUNCTION(0x2, "tdm", "spi-mosi", V(0, 0, 0, 1, 1, 0)), | ||
317 | MPP_VAR_FUNCTION(0x4, "audio", "mclk", V(0, 0, 0, 1, 1, 0)), | ||
318 | MPP_VAR_FUNCTION(0xb, "lcd", "d22", V(0, 0, 0, 0, 1, 0))), | ||
319 | MPP_MODE(43, | ||
320 | MPP_VAR_FUNCTION(0x0, "gpio", NULL, V(0, 0, 0, 1, 1, 1)), | ||
321 | MPP_VAR_FUNCTION(0x1, "ts", "mp7", V(0, 0, 0, 1, 1, 0)), | ||
322 | MPP_VAR_FUNCTION(0x2, "tdm", "int", V(0, 0, 0, 1, 1, 0)), | ||
323 | MPP_VAR_FUNCTION(0x4, "audio", "sdi", V(0, 0, 0, 1, 1, 0)), | ||
324 | MPP_VAR_FUNCTION(0xb, "lcd", "d23", V(0, 0, 0, 0, 1, 0))), | ||
325 | MPP_MODE(44, | ||
326 | MPP_VAR_FUNCTION(0x0, "gpio", NULL, V(0, 0, 0, 1, 1, 1)), | ||
327 | MPP_VAR_FUNCTION(0x1, "ts", "mp8", V(0, 0, 0, 1, 1, 0)), | ||
328 | MPP_VAR_FUNCTION(0x2, "tdm", "rst", V(0, 0, 0, 1, 1, 0)), | ||
329 | MPP_VAR_FUNCTION(0x4, "audio", "extclk", V(0, 0, 0, 1, 1, 0)), | ||
330 | MPP_VAR_FUNCTION(0xb, "lcd", "clk", V(0, 0, 0, 0, 1, 0))), | ||
331 | MPP_MODE(45, | ||
332 | MPP_VAR_FUNCTION(0x0, "gpio", NULL, V(0, 0, 0, 1, 1, 1)), | ||
333 | MPP_VAR_FUNCTION(0x1, "ts", "mp9", V(0, 0, 0, 1, 1, 0)), | ||
334 | MPP_VAR_FUNCTION(0x2, "tdm", "pclk", V(0, 0, 0, 1, 1, 0)), | ||
335 | MPP_VAR_FUNCTION(0xb, "lcd", "e", V(0, 0, 0, 0, 1, 0))), | ||
336 | MPP_MODE(46, | ||
337 | MPP_VAR_FUNCTION(0x0, "gpio", NULL, V(0, 0, 0, 1, 1, 0)), | ||
338 | MPP_VAR_FUNCTION(0x1, "ts", "mp10", V(0, 0, 0, 1, 1, 0)), | ||
339 | MPP_VAR_FUNCTION(0x2, "tdm", "fs", V(0, 0, 0, 1, 1, 0)), | ||
340 | MPP_VAR_FUNCTION(0xb, "lcd", "hsync", V(0, 0, 0, 0, 1, 0))), | ||
341 | MPP_MODE(47, | ||
342 | MPP_VAR_FUNCTION(0x0, "gpio", NULL, V(0, 0, 0, 1, 1, 0)), | ||
343 | MPP_VAR_FUNCTION(0x1, "ts", "mp11", V(0, 0, 0, 1, 1, 0)), | ||
344 | MPP_VAR_FUNCTION(0x2, "tdm", "drx", V(0, 0, 0, 1, 1, 0)), | ||
345 | MPP_VAR_FUNCTION(0xb, "lcd", "vsync", V(0, 0, 0, 0, 1, 0))), | ||
346 | MPP_MODE(48, | ||
347 | MPP_VAR_FUNCTION(0x0, "gpio", NULL, V(0, 0, 0, 1, 1, 0)), | ||
348 | MPP_VAR_FUNCTION(0x1, "ts", "mp12", V(0, 0, 0, 1, 1, 0)), | ||
349 | MPP_VAR_FUNCTION(0x2, "tdm", "dtx", V(0, 0, 0, 1, 1, 0)), | ||
350 | MPP_VAR_FUNCTION(0xb, "lcd", "d16", V(0, 0, 0, 0, 1, 0))), | ||
351 | MPP_MODE(49, | ||
352 | MPP_VAR_FUNCTION(0x0, "gpio", NULL, V(0, 0, 0, 1, 0, 1)), | ||
353 | MPP_VAR_FUNCTION(0x0, "gpo", NULL, V(0, 0, 0, 0, 1, 0)), | ||
354 | MPP_VAR_FUNCTION(0x1, "ts", "mp9", V(0, 0, 0, 1, 0, 0)), | ||
355 | MPP_VAR_FUNCTION(0x2, "tdm", "rx0ql", V(0, 0, 0, 1, 1, 0)), | ||
356 | MPP_VAR_FUNCTION(0x5, "ptp", "clk", V(0, 0, 0, 1, 0, 0)), | ||
357 | MPP_VAR_FUNCTION(0xa, "pex", "clkreq", V(0, 0, 0, 0, 1, 0)), | ||
358 | MPP_VAR_FUNCTION(0xb, "lcd", "d17", V(0, 0, 0, 0, 1, 0))), | ||
359 | }; | ||
360 | |||
361 | static struct mvebu_mpp_ctrl mv88f6180_mpp_controls[] = { | ||
362 | MPP_REG_CTRL(0, 29), | ||
363 | }; | ||
364 | |||
365 | static struct pinctrl_gpio_range mv88f6180_gpio_ranges[] = { | ||
366 | MPP_GPIO_RANGE(0, 0, 0, 30), | ||
367 | }; | ||
368 | |||
369 | static struct mvebu_mpp_ctrl mv88f619x_mpp_controls[] = { | ||
370 | MPP_REG_CTRL(0, 35), | ||
371 | }; | ||
372 | |||
373 | static struct pinctrl_gpio_range mv88f619x_gpio_ranges[] = { | ||
374 | MPP_GPIO_RANGE(0, 0, 0, 32), | ||
375 | MPP_GPIO_RANGE(1, 32, 32, 4), | ||
376 | }; | ||
377 | |||
378 | static struct mvebu_mpp_ctrl mv88f628x_mpp_controls[] = { | ||
379 | MPP_REG_CTRL(0, 49), | ||
380 | }; | ||
381 | |||
382 | static struct pinctrl_gpio_range mv88f628x_gpio_ranges[] = { | ||
383 | MPP_GPIO_RANGE(0, 0, 0, 32), | ||
384 | MPP_GPIO_RANGE(1, 32, 32, 18), | ||
385 | }; | ||
386 | |||
387 | static struct mvebu_pinctrl_soc_info mv88f6180_info = { | ||
388 | .variant = VARIANT_MV88F6180, | ||
389 | .controls = mv88f6180_mpp_controls, | ||
390 | .ncontrols = ARRAY_SIZE(mv88f6180_mpp_controls), | ||
391 | .modes = mv88f6xxx_mpp_modes, | ||
392 | .nmodes = ARRAY_SIZE(mv88f6xxx_mpp_modes), | ||
393 | .gpioranges = mv88f6180_gpio_ranges, | ||
394 | .ngpioranges = ARRAY_SIZE(mv88f6180_gpio_ranges), | ||
395 | }; | ||
396 | |||
397 | static struct mvebu_pinctrl_soc_info mv88f6190_info = { | ||
398 | .variant = VARIANT_MV88F6190, | ||
399 | .controls = mv88f619x_mpp_controls, | ||
400 | .ncontrols = ARRAY_SIZE(mv88f619x_mpp_controls), | ||
401 | .modes = mv88f6xxx_mpp_modes, | ||
402 | .nmodes = ARRAY_SIZE(mv88f6xxx_mpp_modes), | ||
403 | .gpioranges = mv88f619x_gpio_ranges, | ||
404 | .ngpioranges = ARRAY_SIZE(mv88f619x_gpio_ranges), | ||
405 | }; | ||
406 | |||
407 | static struct mvebu_pinctrl_soc_info mv88f6192_info = { | ||
408 | .variant = VARIANT_MV88F6192, | ||
409 | .controls = mv88f619x_mpp_controls, | ||
410 | .ncontrols = ARRAY_SIZE(mv88f619x_mpp_controls), | ||
411 | .modes = mv88f6xxx_mpp_modes, | ||
412 | .nmodes = ARRAY_SIZE(mv88f6xxx_mpp_modes), | ||
413 | .gpioranges = mv88f619x_gpio_ranges, | ||
414 | .ngpioranges = ARRAY_SIZE(mv88f619x_gpio_ranges), | ||
415 | }; | ||
416 | |||
417 | static struct mvebu_pinctrl_soc_info mv88f6281_info = { | ||
418 | .variant = VARIANT_MV88F6281, | ||
419 | .controls = mv88f628x_mpp_controls, | ||
420 | .ncontrols = ARRAY_SIZE(mv88f628x_mpp_controls), | ||
421 | .modes = mv88f6xxx_mpp_modes, | ||
422 | .nmodes = ARRAY_SIZE(mv88f6xxx_mpp_modes), | ||
423 | .gpioranges = mv88f628x_gpio_ranges, | ||
424 | .ngpioranges = ARRAY_SIZE(mv88f628x_gpio_ranges), | ||
425 | }; | ||
426 | |||
427 | static struct mvebu_pinctrl_soc_info mv88f6282_info = { | ||
428 | .variant = VARIANT_MV88F6282, | ||
429 | .controls = mv88f628x_mpp_controls, | ||
430 | .ncontrols = ARRAY_SIZE(mv88f628x_mpp_controls), | ||
431 | .modes = mv88f6xxx_mpp_modes, | ||
432 | .nmodes = ARRAY_SIZE(mv88f6xxx_mpp_modes), | ||
433 | .gpioranges = mv88f628x_gpio_ranges, | ||
434 | .ngpioranges = ARRAY_SIZE(mv88f628x_gpio_ranges), | ||
435 | }; | ||
436 | |||
437 | static struct mvebu_pinctrl_soc_info mv98dx4122_info = { | ||
438 | .variant = VARIANT_MV98DX4122, | ||
439 | .controls = mv88f628x_mpp_controls, | ||
440 | .ncontrols = ARRAY_SIZE(mv88f628x_mpp_controls), | ||
441 | .modes = mv88f6xxx_mpp_modes, | ||
442 | .nmodes = ARRAY_SIZE(mv88f6xxx_mpp_modes), | ||
443 | .gpioranges = mv88f628x_gpio_ranges, | ||
444 | .ngpioranges = ARRAY_SIZE(mv88f628x_gpio_ranges), | ||
445 | }; | ||
446 | |||
447 | static struct of_device_id kirkwood_pinctrl_of_match[] __devinitdata = { | ||
448 | { .compatible = "marvell,88f6180-pinctrl", .data = &mv88f6180_info }, | ||
449 | { .compatible = "marvell,88f6190-pinctrl", .data = &mv88f6190_info }, | ||
450 | { .compatible = "marvell,88f6192-pinctrl", .data = &mv88f6192_info }, | ||
451 | { .compatible = "marvell,88f6281-pinctrl", .data = &mv88f6281_info }, | ||
452 | { .compatible = "marvell,88f6282-pinctrl", .data = &mv88f6282_info }, | ||
453 | { .compatible = "marvell,98dx4122-pinctrl", .data = &mv98dx4122_info }, | ||
454 | { } | ||
455 | }; | ||
456 | |||
457 | static int __devinit kirkwood_pinctrl_probe(struct platform_device *pdev) | ||
458 | { | ||
459 | const struct of_device_id *match = | ||
460 | of_match_device(kirkwood_pinctrl_of_match, &pdev->dev); | ||
461 | pdev->dev.platform_data = match->data; | ||
462 | return mvebu_pinctrl_probe(pdev); | ||
463 | } | ||
464 | |||
465 | static int __devexit kirkwood_pinctrl_remove(struct platform_device *pdev) | ||
466 | { | ||
467 | return mvebu_pinctrl_remove(pdev); | ||
468 | } | ||
469 | |||
470 | static struct platform_driver kirkwood_pinctrl_driver = { | ||
471 | .driver = { | ||
472 | .name = "kirkwood-pinctrl", | ||
473 | .owner = THIS_MODULE, | ||
474 | .of_match_table = of_match_ptr(kirkwood_pinctrl_of_match), | ||
475 | }, | ||
476 | .probe = kirkwood_pinctrl_probe, | ||
477 | .remove = __devexit_p(kirkwood_pinctrl_remove), | ||
478 | }; | ||
479 | |||
480 | module_platform_driver(kirkwood_pinctrl_driver); | ||
481 | |||
482 | MODULE_AUTHOR("Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>"); | ||
483 | MODULE_DESCRIPTION("Marvell Kirkwood pinctrl driver"); | ||
484 | MODULE_LICENSE("GPL v2"); | ||
diff --git a/drivers/pinctrl/pinctrl-mvebu.c b/drivers/pinctrl/mvebu/pinctrl-mvebu.c index 8e6266c6249a..6c44b7e8964c 100644 --- a/drivers/pinctrl/pinctrl-mvebu.c +++ b/drivers/pinctrl/mvebu/pinctrl-mvebu.c | |||
@@ -24,7 +24,6 @@ | |||
24 | #include <linux/pinctrl/pinctrl.h> | 24 | #include <linux/pinctrl/pinctrl.h> |
25 | #include <linux/pinctrl/pinmux.h> | 25 | #include <linux/pinctrl/pinmux.h> |
26 | 26 | ||
27 | #include "core.h" | ||
28 | #include "pinctrl-mvebu.h" | 27 | #include "pinctrl-mvebu.h" |
29 | 28 | ||
30 | #define MPPS_PER_REG 8 | 29 | #define MPPS_PER_REG 8 |
diff --git a/drivers/pinctrl/pinctrl-mvebu.h b/drivers/pinctrl/mvebu/pinctrl-mvebu.h index 90bd3beee860..90bd3beee860 100644 --- a/drivers/pinctrl/pinctrl-mvebu.h +++ b/drivers/pinctrl/mvebu/pinctrl-mvebu.h | |||
diff --git a/drivers/pinctrl/pinctrl-kirkwood.c b/drivers/pinctrl/pinctrl-kirkwood.c deleted file mode 100644 index 9a74ef674a0e..000000000000 --- a/drivers/pinctrl/pinctrl-kirkwood.c +++ /dev/null | |||
@@ -1,472 +0,0 @@ | |||
1 | /* | ||
2 | * Marvell Kirkwood pinctrl driver based on mvebu pinctrl core | ||
3 | * | ||
4 | * Author: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com> | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License as published by | ||
8 | * the Free Software Foundation; either version 2 of the License, or | ||
9 | * (at your option) any later version. | ||
10 | */ | ||
11 | |||
12 | #include <linux/err.h> | ||
13 | #include <linux/init.h> | ||
14 | #include <linux/io.h> | ||
15 | #include <linux/module.h> | ||
16 | #include <linux/platform_device.h> | ||
17 | #include <linux/clk.h> | ||
18 | #include <linux/of.h> | ||
19 | #include <linux/of_device.h> | ||
20 | #include <linux/pinctrl/pinctrl.h> | ||
21 | |||
22 | #include "pinctrl-mvebu.h" | ||
23 | |||
24 | #define V(f6180, f6190, f6192, f6281, f6282) \ | ||
25 | ((f6180 << 0) | (f6190 << 1) | (f6192 << 2) | \ | ||
26 | (f6281 << 3) | (f6282 << 4)) | ||
27 | |||
28 | enum kirkwood_variant { | ||
29 | VARIANT_MV88F6180 = V(1, 0, 0, 0, 0), | ||
30 | VARIANT_MV88F6190 = V(0, 1, 0, 0, 0), | ||
31 | VARIANT_MV88F6192 = V(0, 0, 1, 0, 0), | ||
32 | VARIANT_MV88F6281 = V(0, 0, 0, 1, 0), | ||
33 | VARIANT_MV88F6282 = V(0, 0, 0, 0, 1), | ||
34 | }; | ||
35 | |||
36 | static struct mvebu_mpp_mode mv88f6xxx_mpp_modes[] = { | ||
37 | MPP_MODE(0, | ||
38 | MPP_VAR_FUNCTION(0x0, "gpio", NULL, V(1, 1, 1, 1, 1)), | ||
39 | MPP_VAR_FUNCTION(0x1, "nand", "io2", V(1, 1, 1, 1, 1)), | ||
40 | MPP_VAR_FUNCTION(0x2, "spi", "cs", V(1, 1, 1, 1, 1))), | ||
41 | MPP_MODE(1, | ||
42 | MPP_VAR_FUNCTION(0x0, "gpo", NULL, V(1, 1, 1, 1, 1)), | ||
43 | MPP_VAR_FUNCTION(0x1, "nand", "io3", V(1, 1, 1, 1, 1)), | ||
44 | MPP_VAR_FUNCTION(0x2, "spi", "mosi", V(1, 1, 1, 1, 1))), | ||
45 | MPP_MODE(2, | ||
46 | MPP_VAR_FUNCTION(0x0, "gpo", NULL, V(1, 1, 1, 1, 1)), | ||
47 | MPP_VAR_FUNCTION(0x1, "nand", "io4", V(1, 1, 1, 1, 1)), | ||
48 | MPP_VAR_FUNCTION(0x2, "spi", "sck", V(1, 1, 1, 1, 1))), | ||
49 | MPP_MODE(3, | ||
50 | MPP_VAR_FUNCTION(0x0, "gpo", NULL, V(1, 1, 1, 1, 1)), | ||
51 | MPP_VAR_FUNCTION(0x1, "nand", "io5", V(1, 1, 1, 1, 1)), | ||
52 | MPP_VAR_FUNCTION(0x2, "spi", "miso", V(1, 1, 1, 1, 1))), | ||
53 | MPP_MODE(4, | ||
54 | MPP_VAR_FUNCTION(0x0, "gpio", NULL, V(1, 1, 1, 1, 1)), | ||
55 | MPP_VAR_FUNCTION(0x1, "nand", "io6", V(1, 1, 1, 1, 1)), | ||
56 | MPP_VAR_FUNCTION(0x2, "uart0", "rxd", V(1, 1, 1, 1, 1)), | ||
57 | MPP_VAR_FUNCTION(0x5, "sata1", "act", V(0, 0, 1, 1, 1)), | ||
58 | MPP_VAR_FUNCTION(0xb, "lcd", "hsync", V(0, 0, 0, 0, 1)), | ||
59 | MPP_VAR_FUNCTION(0xd, "ptp", "clk", V(1, 1, 1, 1, 0))), | ||
60 | MPP_MODE(5, | ||
61 | MPP_VAR_FUNCTION(0x0, "gpo", NULL, V(1, 1, 1, 1, 1)), | ||
62 | MPP_VAR_FUNCTION(0x1, "nand", "io7", V(1, 1, 1, 1, 1)), | ||
63 | MPP_VAR_FUNCTION(0x2, "uart0", "txd", V(1, 1, 1, 1, 1)), | ||
64 | MPP_VAR_FUNCTION(0x4, "ptp", "trig", V(1, 1, 1, 1, 0)), | ||
65 | MPP_VAR_FUNCTION(0x5, "sata0", "act", V(0, 1, 1, 1, 1)), | ||
66 | MPP_VAR_FUNCTION(0xb, "lcd", "vsync", V(0, 0, 0, 0, 1))), | ||
67 | MPP_MODE(6, | ||
68 | MPP_VAR_FUNCTION(0x0, "sysrst", "out", V(1, 1, 1, 1, 1)), | ||
69 | MPP_VAR_FUNCTION(0x1, "spi", "mosi", V(1, 1, 1, 1, 1)), | ||
70 | MPP_VAR_FUNCTION(0x2, "ptp", "trig", V(1, 1, 1, 1, 0))), | ||
71 | MPP_MODE(7, | ||
72 | MPP_VAR_FUNCTION(0x0, "gpo", NULL, V(1, 1, 1, 1, 1)), | ||
73 | MPP_VAR_FUNCTION(0x1, "pex", "rsto", V(1, 1, 1, 1, 0)), | ||
74 | MPP_VAR_FUNCTION(0x2, "spi", "cs", V(1, 1, 1, 1, 1)), | ||
75 | MPP_VAR_FUNCTION(0x3, "ptp", "trig", V(1, 1, 1, 1, 0)), | ||
76 | MPP_VAR_FUNCTION(0xb, "lcd", "pwm", V(0, 0, 0, 0, 1))), | ||
77 | MPP_MODE(8, | ||
78 | MPP_VAR_FUNCTION(0x0, "gpio", NULL, V(1, 1, 1, 1, 1)), | ||
79 | MPP_VAR_FUNCTION(0x1, "twsi0", "sda", V(1, 1, 1, 1, 1)), | ||
80 | MPP_VAR_FUNCTION(0x2, "uart0", "rts", V(1, 1, 1, 1, 1)), | ||
81 | MPP_VAR_FUNCTION(0x3, "uart1", "rts", V(1, 1, 1, 1, 1)), | ||
82 | MPP_VAR_FUNCTION(0x4, "mii-1", "rxerr", V(0, 1, 1, 1, 1)), | ||
83 | MPP_VAR_FUNCTION(0x5, "sata1", "prsnt", V(0, 0, 1, 1, 1)), | ||
84 | MPP_VAR_FUNCTION(0xc, "ptp", "clk", V(1, 1, 1, 1, 0)), | ||
85 | MPP_VAR_FUNCTION(0xd, "mii", "col", V(1, 1, 1, 1, 1))), | ||
86 | MPP_MODE(9, | ||
87 | MPP_VAR_FUNCTION(0x0, "gpio", NULL, V(1, 1, 1, 1, 1)), | ||
88 | MPP_VAR_FUNCTION(0x1, "twsi0", "sck", V(1, 1, 1, 1, 1)), | ||
89 | MPP_VAR_FUNCTION(0x2, "uart0", "cts", V(1, 1, 1, 1, 1)), | ||
90 | MPP_VAR_FUNCTION(0x3, "uart1", "cts", V(1, 1, 1, 1, 1)), | ||
91 | MPP_VAR_FUNCTION(0x5, "sata0", "prsnt", V(0, 1, 1, 1, 1)), | ||
92 | MPP_VAR_FUNCTION(0xc, "ptp", "evreq", V(1, 1, 1, 1, 0)), | ||
93 | MPP_VAR_FUNCTION(0xd, "mii", "crs", V(1, 1, 1, 1, 1))), | ||
94 | MPP_MODE(10, | ||
95 | MPP_VAR_FUNCTION(0x0, "gpo", NULL, V(1, 1, 1, 1, 1)), | ||
96 | MPP_VAR_FUNCTION(0x2, "spi", "sck", V(1, 1, 1, 1, 1)), | ||
97 | MPP_VAR_FUNCTION(0X3, "uart0", "txd", V(1, 1, 1, 1, 1)), | ||
98 | MPP_VAR_FUNCTION(0x5, "sata1", "act", V(0, 0, 1, 1, 1)), | ||
99 | MPP_VAR_FUNCTION(0xc, "ptp", "trig", V(1, 1, 1, 1, 0))), | ||
100 | MPP_MODE(11, | ||
101 | MPP_VAR_FUNCTION(0x0, "gpio", NULL, V(1, 1, 1, 1, 1)), | ||
102 | MPP_VAR_FUNCTION(0x2, "spi", "miso", V(1, 1, 1, 1, 1)), | ||
103 | MPP_VAR_FUNCTION(0x3, "uart0", "rxd", V(1, 1, 1, 1, 1)), | ||
104 | MPP_VAR_FUNCTION(0x4, "ptp-1", "evreq", V(1, 1, 1, 1, 0)), | ||
105 | MPP_VAR_FUNCTION(0xc, "ptp-2", "trig", V(1, 1, 1, 1, 0)), | ||
106 | MPP_VAR_FUNCTION(0xd, "ptp", "clk", V(1, 1, 1, 1, 0)), | ||
107 | MPP_VAR_FUNCTION(0x5, "sata0", "act", V(0, 1, 1, 1, 1))), | ||
108 | MPP_MODE(12, | ||
109 | MPP_VAR_FUNCTION(0x0, "gpo", NULL, V(1, 1, 1, 0, 1)), | ||
110 | MPP_VAR_FUNCTION(0x0, "gpio", NULL, V(0, 0, 0, 1, 0)), | ||
111 | MPP_VAR_FUNCTION(0x1, "sdio", "clk", V(1, 1, 1, 1, 1)), | ||
112 | MPP_VAR_FUNCTION(0xa, "audio", "spdifo", V(0, 0, 0, 0, 1)), | ||
113 | MPP_VAR_FUNCTION(0xb, "spi", "mosi", V(0, 0, 0, 0, 1)), | ||
114 | MPP_VAR_FUNCTION(0xd, "twsi1", "sda", V(0, 0, 0, 0, 1))), | ||
115 | MPP_MODE(13, | ||
116 | MPP_VAR_FUNCTION(0x0, "gpio", NULL, V(1, 1, 1, 1, 1)), | ||
117 | MPP_VAR_FUNCTION(0x1, "sdio", "cmd", V(1, 1, 1, 1, 1)), | ||
118 | MPP_VAR_FUNCTION(0x3, "uart1", "txd", V(1, 1, 1, 1, 1)), | ||
119 | MPP_VAR_FUNCTION(0xa, "audio", "rmclk", V(0, 0, 0, 0, 1)), | ||
120 | MPP_VAR_FUNCTION(0xb, "lcd", "pwm", V(0, 0, 0, 0, 1))), | ||
121 | MPP_MODE(14, | ||
122 | MPP_VAR_FUNCTION(0x0, "gpio", NULL, V(1, 1, 1, 1, 1)), | ||
123 | MPP_VAR_FUNCTION(0x1, "sdio", "d0", V(1, 1, 1, 1, 1)), | ||
124 | MPP_VAR_FUNCTION(0x3, "uart1", "rxd", V(1, 1, 1, 1, 1)), | ||
125 | MPP_VAR_FUNCTION(0x4, "sata1", "prsnt", V(0, 0, 1, 1, 1)), | ||
126 | MPP_VAR_FUNCTION(0xa, "audio", "spdifi", V(0, 0, 0, 0, 1)), | ||
127 | MPP_VAR_FUNCTION(0xb, "audio-1", "sdi", V(0, 0, 0, 0, 1)), | ||
128 | MPP_VAR_FUNCTION(0xd, "mii", "col", V(1, 1, 1, 1, 1))), | ||
129 | MPP_MODE(15, | ||
130 | MPP_VAR_FUNCTION(0x0, "gpio", NULL, V(1, 1, 1, 1, 1)), | ||
131 | MPP_VAR_FUNCTION(0x1, "sdio", "d1", V(1, 1, 1, 1, 1)), | ||
132 | MPP_VAR_FUNCTION(0x2, "uart0", "rts", V(1, 1, 1, 1, 1)), | ||
133 | MPP_VAR_FUNCTION(0x3, "uart1", "txd", V(1, 1, 1, 1, 1)), | ||
134 | MPP_VAR_FUNCTION(0x4, "sata0", "act", V(0, 1, 1, 1, 1)), | ||
135 | MPP_VAR_FUNCTION(0xb, "spi", "cs", V(0, 0, 0, 0, 1))), | ||
136 | MPP_MODE(16, | ||
137 | MPP_VAR_FUNCTION(0x0, "gpio", NULL, V(1, 1, 1, 1, 1)), | ||
138 | MPP_VAR_FUNCTION(0x1, "sdio", "d2", V(1, 1, 1, 1, 1)), | ||
139 | MPP_VAR_FUNCTION(0x2, "uart0", "cts", V(1, 1, 1, 1, 1)), | ||
140 | MPP_VAR_FUNCTION(0x3, "uart1", "rxd", V(1, 1, 1, 1, 1)), | ||
141 | MPP_VAR_FUNCTION(0x4, "sata1", "act", V(0, 0, 1, 1, 1)), | ||
142 | MPP_VAR_FUNCTION(0xb, "lcd", "extclk", V(0, 0, 0, 0, 1)), | ||
143 | MPP_VAR_FUNCTION(0xd, "mii", "crs", V(1, 1, 1, 1, 1))), | ||
144 | MPP_MODE(17, | ||
145 | MPP_VAR_FUNCTION(0x0, "gpio", NULL, V(1, 1, 1, 1, 1)), | ||
146 | MPP_VAR_FUNCTION(0x1, "sdio", "d3", V(1, 1, 1, 1, 1)), | ||
147 | MPP_VAR_FUNCTION(0x4, "sata0", "prsnt", V(0, 1, 1, 1, 1)), | ||
148 | MPP_VAR_FUNCTION(0xa, "sata1", "act", V(0, 0, 0, 0, 1)), | ||
149 | MPP_VAR_FUNCTION(0xd, "twsi1", "sck", V(0, 0, 0, 0, 1))), | ||
150 | MPP_MODE(18, | ||
151 | MPP_VAR_FUNCTION(0x0, "gpo", NULL, V(1, 1, 1, 1, 1)), | ||
152 | MPP_VAR_FUNCTION(0x1, "nand", "io0", V(1, 1, 1, 1, 1)), | ||
153 | MPP_VAR_FUNCTION(0x2, "pex", "clkreq", V(0, 0, 0, 0, 1))), | ||
154 | MPP_MODE(19, | ||
155 | MPP_VAR_FUNCTION(0x0, "gpo", NULL, V(1, 1, 1, 1, 1)), | ||
156 | MPP_VAR_FUNCTION(0x1, "nand", "io1", V(1, 1, 1, 1, 1))), | ||
157 | MPP_MODE(20, | ||
158 | MPP_VAR_FUNCTION(0x0, "gpio", NULL, V(1, 1, 1, 1, 1)), | ||
159 | MPP_VAR_FUNCTION(0x1, "ts", "mp0", V(0, 0, 1, 1, 1)), | ||
160 | MPP_VAR_FUNCTION(0x2, "tdm", "tx0ql", V(0, 0, 1, 1, 1)), | ||
161 | MPP_VAR_FUNCTION(0x3, "ge1", "txd0", V(0, 1, 1, 1, 1)), | ||
162 | MPP_VAR_FUNCTION(0x4, "audio", "spdifi", V(0, 0, 1, 1, 1)), | ||
163 | MPP_VAR_FUNCTION(0x5, "sata1", "act", V(0, 0, 1, 1, 1)), | ||
164 | MPP_VAR_FUNCTION(0xb, "lcd", "d0", V(0, 0, 0, 0, 1)), | ||
165 | MPP_VAR_FUNCTION(0xc, "mii", "rxerr", V(1, 0, 0, 0, 0))), | ||
166 | MPP_MODE(21, | ||
167 | MPP_VAR_FUNCTION(0x0, "gpio", NULL, V(1, 1, 1, 1, 1)), | ||
168 | MPP_VAR_FUNCTION(0x1, "ts", "mp1", V(0, 0, 1, 1, 1)), | ||
169 | MPP_VAR_FUNCTION(0x2, "tdm", "rx0ql", V(0, 0, 1, 1, 1)), | ||
170 | MPP_VAR_FUNCTION(0x3, "ge1", "txd1", V(0, 1, 1, 1, 1)), | ||
171 | MPP_VAR_FUNCTION(0x4, "audio", "spdifi", V(1, 0, 0, 0, 0)), | ||
172 | MPP_VAR_FUNCTION(0x4, "audio", "spdifo", V(0, 0, 1, 1, 1)), | ||
173 | MPP_VAR_FUNCTION(0x5, "sata0", "act", V(0, 1, 1, 1, 1)), | ||
174 | MPP_VAR_FUNCTION(0xb, "lcd", "d1", V(0, 0, 0, 0, 1))), | ||
175 | MPP_MODE(22, | ||
176 | MPP_VAR_FUNCTION(0x0, "gpio", NULL, V(1, 1, 1, 1, 1)), | ||
177 | MPP_VAR_FUNCTION(0x1, "ts", "mp2", V(0, 0, 1, 1, 1)), | ||
178 | MPP_VAR_FUNCTION(0x2, "tdm", "tx2ql", V(0, 0, 1, 1, 1)), | ||
179 | MPP_VAR_FUNCTION(0x3, "ge1", "txd2", V(0, 1, 1, 1, 1)), | ||
180 | MPP_VAR_FUNCTION(0x4, "audio", "spdifo", V(1, 0, 0, 0, 0)), | ||
181 | MPP_VAR_FUNCTION(0x4, "audio", "rmclk", V(0, 0, 1, 1, 1)), | ||
182 | MPP_VAR_FUNCTION(0x5, "sata1", "prsnt", V(0, 0, 1, 1, 1)), | ||
183 | MPP_VAR_FUNCTION(0xb, "lcd", "d2", V(0, 0, 0, 0, 1))), | ||
184 | MPP_MODE(23, | ||
185 | MPP_VAR_FUNCTION(0x0, "gpio", NULL, V(1, 1, 1, 1, 1)), | ||
186 | MPP_VAR_FUNCTION(0x1, "ts", "mp3", V(0, 0, 1, 1, 1)), | ||
187 | MPP_VAR_FUNCTION(0x2, "tdm", "rx2ql", V(0, 0, 1, 1, 1)), | ||
188 | MPP_VAR_FUNCTION(0x3, "ge1", "txd3", V(0, 1, 1, 1, 1)), | ||
189 | MPP_VAR_FUNCTION(0x4, "audio", "rmclk", V(1, 0, 0, 0, 0)), | ||
190 | MPP_VAR_FUNCTION(0x4, "audio", "bclk", V(0, 0, 1, 1, 1)), | ||
191 | MPP_VAR_FUNCTION(0x5, "sata0", "prsnt", V(0, 1, 1, 1, 1)), | ||
192 | MPP_VAR_FUNCTION(0xb, "lcd", "d3", V(0, 0, 0, 0, 1))), | ||
193 | MPP_MODE(24, | ||
194 | MPP_VAR_FUNCTION(0x0, "gpio", NULL, V(1, 1, 1, 1, 1)), | ||
195 | MPP_VAR_FUNCTION(0x1, "ts", "mp4", V(0, 0, 1, 1, 1)), | ||
196 | MPP_VAR_FUNCTION(0x2, "tdm", "spi-cs0", V(0, 0, 1, 1, 1)), | ||
197 | MPP_VAR_FUNCTION(0x3, "ge1", "rxd0", V(0, 1, 1, 1, 1)), | ||
198 | MPP_VAR_FUNCTION(0x4, "audio", "bclk", V(1, 0, 0, 0, 0)), | ||
199 | MPP_VAR_FUNCTION(0x4, "audio", "sdo", V(0, 0, 1, 1, 1)), | ||
200 | MPP_VAR_FUNCTION(0xb, "lcd", "d4", V(0, 0, 0, 0, 1))), | ||
201 | MPP_MODE(25, | ||
202 | MPP_VAR_FUNCTION(0x0, "gpio", NULL, V(1, 1, 1, 1, 1)), | ||
203 | MPP_VAR_FUNCTION(0x1, "ts", "mp5", V(0, 0, 1, 1, 1)), | ||
204 | MPP_VAR_FUNCTION(0x2, "tdm", "spi-sck", V(0, 0, 1, 1, 1)), | ||
205 | MPP_VAR_FUNCTION(0x3, "ge1", "rxd1", V(0, 1, 1, 1, 1)), | ||
206 | MPP_VAR_FUNCTION(0x4, "audio", "sdo", V(1, 0, 0, 0, 0)), | ||
207 | MPP_VAR_FUNCTION(0x4, "audio", "lrclk", V(0, 0, 1, 1, 1)), | ||
208 | MPP_VAR_FUNCTION(0xb, "lcd", "d5", V(0, 0, 0, 0, 1))), | ||
209 | MPP_MODE(26, | ||
210 | MPP_VAR_FUNCTION(0x0, "gpio", NULL, V(1, 1, 1, 1, 1)), | ||
211 | MPP_VAR_FUNCTION(0x1, "ts", "mp6", V(0, 0, 1, 1, 1)), | ||
212 | MPP_VAR_FUNCTION(0x2, "tdm", "spi-miso", V(0, 0, 1, 1, 1)), | ||
213 | MPP_VAR_FUNCTION(0x3, "ge1", "rxd2", V(0, 1, 1, 1, 1)), | ||
214 | MPP_VAR_FUNCTION(0x4, "audio", "lrclk", V(1, 0, 0, 0, 0)), | ||
215 | MPP_VAR_FUNCTION(0x4, "audio", "mclk", V(0, 0, 1, 1, 1)), | ||
216 | MPP_VAR_FUNCTION(0xb, "lcd", "d6", V(0, 0, 0, 0, 1))), | ||
217 | MPP_MODE(27, | ||
218 | MPP_VAR_FUNCTION(0x0, "gpio", NULL, V(1, 1, 1, 1, 1)), | ||
219 | MPP_VAR_FUNCTION(0x1, "ts", "mp7", V(0, 0, 1, 1, 1)), | ||
220 | MPP_VAR_FUNCTION(0x2, "tdm", "spi-mosi", V(0, 0, 1, 1, 1)), | ||
221 | MPP_VAR_FUNCTION(0x3, "ge1", "rxd3", V(0, 1, 1, 1, 1)), | ||
222 | MPP_VAR_FUNCTION(0x4, "audio", "mclk", V(1, 0, 0, 0, 0)), | ||
223 | MPP_VAR_FUNCTION(0x4, "audio", "sdi", V(0, 0, 1, 1, 1)), | ||
224 | MPP_VAR_FUNCTION(0xb, "lcd", "d7", V(0, 0, 0, 0, 1))), | ||
225 | MPP_MODE(28, | ||
226 | MPP_VAR_FUNCTION(0x0, "gpio", NULL, V(1, 1, 1, 1, 1)), | ||
227 | MPP_VAR_FUNCTION(0x1, "ts", "mp8", V(0, 0, 1, 1, 1)), | ||
228 | MPP_VAR_FUNCTION(0x2, "tdm", "int", V(0, 0, 1, 1, 1)), | ||
229 | MPP_VAR_FUNCTION(0x3, "ge1", "col", V(0, 1, 1, 1, 1)), | ||
230 | MPP_VAR_FUNCTION(0x4, "audio", "sdi", V(1, 0, 0, 0, 0)), | ||
231 | MPP_VAR_FUNCTION(0x4, "audio", "extclk", V(0, 0, 1, 1, 1)), | ||
232 | MPP_VAR_FUNCTION(0xb, "lcd", "d8", V(0, 0, 0, 0, 1))), | ||
233 | MPP_MODE(29, | ||
234 | MPP_VAR_FUNCTION(0x0, "gpio", NULL, V(1, 1, 1, 1, 1)), | ||
235 | MPP_VAR_FUNCTION(0x1, "ts", "mp9", V(0, 0, 1, 1, 1)), | ||
236 | MPP_VAR_FUNCTION(0x2, "tdm", "rst", V(0, 0, 1, 1, 1)), | ||
237 | MPP_VAR_FUNCTION(0x3, "ge1", "txclk", V(0, 1, 1, 1, 1)), | ||
238 | MPP_VAR_FUNCTION(0x4, "audio", "extclk", V(1, 0, 0, 0, 0)), | ||
239 | MPP_VAR_FUNCTION(0xb, "lcd", "d9", V(0, 0, 0, 0, 1))), | ||
240 | MPP_MODE(30, | ||
241 | MPP_VAR_FUNCTION(0x0, "gpio", NULL, V(0, 1, 1, 1, 1)), | ||
242 | MPP_VAR_FUNCTION(0x1, "ts", "mp10", V(0, 0, 1, 1, 1)), | ||
243 | MPP_VAR_FUNCTION(0x2, "tdm", "pclk", V(0, 0, 1, 1, 1)), | ||
244 | MPP_VAR_FUNCTION(0x3, "ge1", "rxctl", V(0, 1, 1, 1, 1)), | ||
245 | MPP_VAR_FUNCTION(0xb, "lcd", "d10", V(0, 0, 0, 0, 1))), | ||
246 | MPP_MODE(31, | ||
247 | MPP_VAR_FUNCTION(0x0, "gpio", NULL, V(0, 1, 1, 1, 1)), | ||
248 | MPP_VAR_FUNCTION(0x1, "ts", "mp11", V(0, 0, 1, 1, 1)), | ||
249 | MPP_VAR_FUNCTION(0x2, "tdm", "fs", V(0, 0, 1, 1, 1)), | ||
250 | MPP_VAR_FUNCTION(0x3, "ge1", "rxclk", V(0, 1, 1, 1, 1)), | ||
251 | MPP_VAR_FUNCTION(0xb, "lcd", "d11", V(0, 0, 0, 0, 1))), | ||
252 | MPP_MODE(32, | ||
253 | MPP_VAR_FUNCTION(0x0, "gpio", NULL, V(0, 1, 1, 1, 1)), | ||
254 | MPP_VAR_FUNCTION(0x1, "ts", "mp12", V(0, 0, 1, 1, 1)), | ||
255 | MPP_VAR_FUNCTION(0x2, "tdm", "drx", V(0, 0, 1, 1, 1)), | ||
256 | MPP_VAR_FUNCTION(0x3, "ge1", "txclko", V(0, 1, 1, 1, 1)), | ||
257 | MPP_VAR_FUNCTION(0xb, "lcd", "d12", V(0, 0, 0, 0, 1))), | ||
258 | MPP_MODE(33, | ||
259 | MPP_VAR_FUNCTION(0x0, "gpo", NULL, V(0, 1, 1, 1, 1)), | ||
260 | MPP_VAR_FUNCTION(0x2, "tdm", "dtx", V(0, 0, 1, 1, 1)), | ||
261 | MPP_VAR_FUNCTION(0x3, "ge1", "txctl", V(0, 1, 1, 1, 1)), | ||
262 | MPP_VAR_FUNCTION(0xb, "lcd", "d13", V(0, 0, 0, 0, 1))), | ||
263 | MPP_MODE(34, | ||
264 | MPP_VAR_FUNCTION(0x0, "gpio", NULL, V(0, 1, 1, 1, 1)), | ||
265 | MPP_VAR_FUNCTION(0x2, "tdm", "spi-cs1", V(0, 0, 1, 1, 1)), | ||
266 | MPP_VAR_FUNCTION(0x3, "ge1", "txen", V(0, 1, 1, 1, 1)), | ||
267 | MPP_VAR_FUNCTION(0x5, "sata1", "act", V(0, 0, 0, 1, 1)), | ||
268 | MPP_VAR_FUNCTION(0xb, "lcd", "d14", V(0, 0, 0, 0, 1))), | ||
269 | MPP_MODE(35, | ||
270 | MPP_VAR_FUNCTION(0x0, "gpio", NULL, V(0, 1, 1, 1, 1)), | ||
271 | MPP_VAR_FUNCTION(0x2, "tdm", "tx0ql", V(0, 0, 1, 1, 1)), | ||
272 | MPP_VAR_FUNCTION(0x3, "ge1", "rxerr", V(0, 1, 1, 1, 1)), | ||
273 | MPP_VAR_FUNCTION(0x5, "sata0", "act", V(0, 1, 1, 1, 1)), | ||
274 | MPP_VAR_FUNCTION(0xb, "lcd", "d15", V(0, 0, 0, 0, 1)), | ||
275 | MPP_VAR_FUNCTION(0xc, "mii", "rxerr", V(0, 1, 1, 1, 1))), | ||
276 | MPP_MODE(36, | ||
277 | MPP_VAR_FUNCTION(0x0, "gpio", NULL, V(0, 0, 0, 1, 1)), | ||
278 | MPP_VAR_FUNCTION(0x1, "ts", "mp0", V(0, 0, 0, 1, 1)), | ||
279 | MPP_VAR_FUNCTION(0x2, "tdm", "spi-cs1", V(0, 0, 0, 1, 1)), | ||
280 | MPP_VAR_FUNCTION(0x4, "audio", "spdifi", V(0, 0, 0, 1, 1)), | ||
281 | MPP_VAR_FUNCTION(0xb, "twsi1", "sda", V(0, 0, 0, 0, 1))), | ||
282 | MPP_MODE(37, | ||
283 | MPP_VAR_FUNCTION(0x0, "gpio", NULL, V(0, 0, 0, 1, 1)), | ||
284 | MPP_VAR_FUNCTION(0x1, "ts", "mp1", V(0, 0, 0, 1, 1)), | ||
285 | MPP_VAR_FUNCTION(0x2, "tdm", "tx2ql", V(0, 0, 0, 1, 1)), | ||
286 | MPP_VAR_FUNCTION(0x4, "audio", "spdifo", V(0, 0, 0, 1, 1)), | ||
287 | MPP_VAR_FUNCTION(0xb, "twsi1", "sck", V(0, 0, 0, 0, 1))), | ||
288 | MPP_MODE(38, | ||
289 | MPP_VAR_FUNCTION(0x0, "gpio", NULL, V(0, 0, 0, 1, 1)), | ||
290 | MPP_VAR_FUNCTION(0x1, "ts", "mp2", V(0, 0, 0, 1, 1)), | ||
291 | MPP_VAR_FUNCTION(0x2, "tdm", "rx2ql", V(0, 0, 0, 1, 1)), | ||
292 | MPP_VAR_FUNCTION(0x4, "audio", "rmclk", V(0, 0, 0, 1, 1)), | ||
293 | MPP_VAR_FUNCTION(0xb, "lcd", "d18", V(0, 0, 0, 0, 1))), | ||
294 | MPP_MODE(39, | ||
295 | MPP_VAR_FUNCTION(0x0, "gpio", NULL, V(0, 0, 0, 1, 1)), | ||
296 | MPP_VAR_FUNCTION(0x1, "ts", "mp3", V(0, 0, 0, 1, 1)), | ||
297 | MPP_VAR_FUNCTION(0x2, "tdm", "spi-cs0", V(0, 0, 0, 1, 1)), | ||
298 | MPP_VAR_FUNCTION(0x4, "audio", "bclk", V(0, 0, 0, 1, 1)), | ||
299 | MPP_VAR_FUNCTION(0xb, "lcd", "d19", V(0, 0, 0, 0, 1))), | ||
300 | MPP_MODE(40, | ||
301 | MPP_VAR_FUNCTION(0x0, "gpio", NULL, V(0, 0, 0, 1, 1)), | ||
302 | MPP_VAR_FUNCTION(0x1, "ts", "mp4", V(0, 0, 0, 1, 1)), | ||
303 | MPP_VAR_FUNCTION(0x2, "tdm", "spi-sck", V(0, 0, 0, 1, 1)), | ||
304 | MPP_VAR_FUNCTION(0x4, "audio", "sdo", V(0, 0, 0, 1, 1)), | ||
305 | MPP_VAR_FUNCTION(0xb, "lcd", "d20", V(0, 0, 0, 0, 1))), | ||
306 | MPP_MODE(41, | ||
307 | MPP_VAR_FUNCTION(0x0, "gpio", NULL, V(0, 0, 0, 1, 1)), | ||
308 | MPP_VAR_FUNCTION(0x1, "ts", "mp5", V(0, 0, 0, 1, 1)), | ||
309 | MPP_VAR_FUNCTION(0x2, "tdm", "spi-miso", V(0, 0, 0, 1, 1)), | ||
310 | MPP_VAR_FUNCTION(0x4, "audio", "lrclk", V(0, 0, 0, 1, 1)), | ||
311 | MPP_VAR_FUNCTION(0xb, "lcd", "d21", V(0, 0, 0, 0, 1))), | ||
312 | MPP_MODE(42, | ||
313 | MPP_VAR_FUNCTION(0x0, "gpio", NULL, V(0, 0, 0, 1, 1)), | ||
314 | MPP_VAR_FUNCTION(0x1, "ts", "mp6", V(0, 0, 0, 1, 1)), | ||
315 | MPP_VAR_FUNCTION(0x2, "tdm", "spi-mosi", V(0, 0, 0, 1, 1)), | ||
316 | MPP_VAR_FUNCTION(0x4, "audio", "mclk", V(0, 0, 0, 1, 1)), | ||
317 | MPP_VAR_FUNCTION(0xb, "lcd", "d22", V(0, 0, 0, 0, 1))), | ||
318 | MPP_MODE(43, | ||
319 | MPP_VAR_FUNCTION(0x0, "gpio", NULL, V(0, 0, 0, 1, 1)), | ||
320 | MPP_VAR_FUNCTION(0x1, "ts", "mp7", V(0, 0, 0, 1, 1)), | ||
321 | MPP_VAR_FUNCTION(0x2, "tdm", "int", V(0, 0, 0, 1, 1)), | ||
322 | MPP_VAR_FUNCTION(0x4, "audio", "sdi", V(0, 0, 0, 1, 1)), | ||
323 | MPP_VAR_FUNCTION(0xb, "lcd", "d23", V(0, 0, 0, 0, 1))), | ||
324 | MPP_MODE(44, | ||
325 | MPP_VAR_FUNCTION(0x0, "gpio", NULL, V(0, 0, 0, 1, 1)), | ||
326 | MPP_VAR_FUNCTION(0x1, "ts", "mp8", V(0, 0, 0, 1, 1)), | ||
327 | MPP_VAR_FUNCTION(0x2, "tdm", "rst", V(0, 0, 0, 1, 1)), | ||
328 | MPP_VAR_FUNCTION(0x4, "audio", "extclk", V(0, 0, 0, 1, 1)), | ||
329 | MPP_VAR_FUNCTION(0xb, "lcd", "clk", V(0, 0, 0, 0, 1))), | ||
330 | MPP_MODE(45, | ||
331 | MPP_VAR_FUNCTION(0x0, "gpio", NULL, V(0, 0, 0, 1, 1)), | ||
332 | MPP_VAR_FUNCTION(0x1, "ts", "mp9", V(0, 0, 0, 1, 1)), | ||
333 | MPP_VAR_FUNCTION(0x2, "tdm", "pclk", V(0, 0, 0, 1, 1)), | ||
334 | MPP_VAR_FUNCTION(0xb, "lcd", "e", V(0, 0, 0, 0, 1))), | ||
335 | MPP_MODE(46, | ||
336 | MPP_VAR_FUNCTION(0x0, "gpio", NULL, V(0, 0, 0, 1, 1)), | ||
337 | MPP_VAR_FUNCTION(0x1, "ts", "mp10", V(0, 0, 0, 1, 1)), | ||
338 | MPP_VAR_FUNCTION(0x2, "tdm", "fs", V(0, 0, 0, 1, 1)), | ||
339 | MPP_VAR_FUNCTION(0xb, "lcd", "hsync", V(0, 0, 0, 0, 1))), | ||
340 | MPP_MODE(47, | ||
341 | MPP_VAR_FUNCTION(0x0, "gpio", NULL, V(0, 0, 0, 1, 1)), | ||
342 | MPP_VAR_FUNCTION(0x1, "ts", "mp11", V(0, 0, 0, 1, 1)), | ||
343 | MPP_VAR_FUNCTION(0x2, "tdm", "drx", V(0, 0, 0, 1, 1)), | ||
344 | MPP_VAR_FUNCTION(0xb, "lcd", "vsync", V(0, 0, 0, 0, 1))), | ||
345 | MPP_MODE(48, | ||
346 | MPP_VAR_FUNCTION(0x0, "gpio", NULL, V(0, 0, 0, 1, 1)), | ||
347 | MPP_VAR_FUNCTION(0x1, "ts", "mp12", V(0, 0, 0, 1, 1)), | ||
348 | MPP_VAR_FUNCTION(0x2, "tdm", "dtx", V(0, 0, 0, 1, 1)), | ||
349 | MPP_VAR_FUNCTION(0xb, "lcd", "d16", V(0, 0, 0, 0, 1))), | ||
350 | MPP_MODE(49, | ||
351 | MPP_VAR_FUNCTION(0x0, "gpio", NULL, V(0, 0, 0, 1, 0)), | ||
352 | MPP_VAR_FUNCTION(0x0, "gpo", NULL, V(0, 0, 0, 0, 1)), | ||
353 | MPP_VAR_FUNCTION(0x1, "ts", "mp9", V(0, 0, 0, 1, 0)), | ||
354 | MPP_VAR_FUNCTION(0x2, "tdm", "rx0ql", V(0, 0, 0, 1, 1)), | ||
355 | MPP_VAR_FUNCTION(0x5, "ptp", "clk", V(0, 0, 0, 1, 0)), | ||
356 | MPP_VAR_FUNCTION(0xa, "pex", "clkreq", V(0, 0, 0, 0, 1)), | ||
357 | MPP_VAR_FUNCTION(0xb, "lcd", "d17", V(0, 0, 0, 0, 1))), | ||
358 | }; | ||
359 | |||
360 | static struct mvebu_mpp_ctrl mv88f6180_mpp_controls[] = { | ||
361 | MPP_REG_CTRL(0, 29), | ||
362 | }; | ||
363 | |||
364 | static struct pinctrl_gpio_range mv88f6180_gpio_ranges[] = { | ||
365 | MPP_GPIO_RANGE(0, 0, 0, 30), | ||
366 | }; | ||
367 | |||
368 | static struct mvebu_mpp_ctrl mv88f619x_mpp_controls[] = { | ||
369 | MPP_REG_CTRL(0, 35), | ||
370 | }; | ||
371 | |||
372 | static struct pinctrl_gpio_range mv88f619x_gpio_ranges[] = { | ||
373 | MPP_GPIO_RANGE(0, 0, 0, 32), | ||
374 | MPP_GPIO_RANGE(1, 32, 32, 4), | ||
375 | }; | ||
376 | |||
377 | static struct mvebu_mpp_ctrl mv88f628x_mpp_controls[] = { | ||
378 | MPP_REG_CTRL(0, 49), | ||
379 | }; | ||
380 | |||
381 | static struct pinctrl_gpio_range mv88f628x_gpio_ranges[] = { | ||
382 | MPP_GPIO_RANGE(0, 0, 0, 32), | ||
383 | MPP_GPIO_RANGE(1, 32, 32, 18), | ||
384 | }; | ||
385 | |||
386 | static struct mvebu_pinctrl_soc_info mv88f6180_info = { | ||
387 | .variant = VARIANT_MV88F6180, | ||
388 | .controls = mv88f6180_mpp_controls, | ||
389 | .ncontrols = ARRAY_SIZE(mv88f6180_mpp_controls), | ||
390 | .modes = mv88f6xxx_mpp_modes, | ||
391 | .nmodes = ARRAY_SIZE(mv88f6xxx_mpp_modes), | ||
392 | .gpioranges = mv88f6180_gpio_ranges, | ||
393 | .ngpioranges = ARRAY_SIZE(mv88f6180_gpio_ranges), | ||
394 | }; | ||
395 | |||
396 | static struct mvebu_pinctrl_soc_info mv88f6190_info = { | ||
397 | .variant = VARIANT_MV88F6190, | ||
398 | .controls = mv88f619x_mpp_controls, | ||
399 | .ncontrols = ARRAY_SIZE(mv88f619x_mpp_controls), | ||
400 | .modes = mv88f6xxx_mpp_modes, | ||
401 | .nmodes = ARRAY_SIZE(mv88f6xxx_mpp_modes), | ||
402 | .gpioranges = mv88f619x_gpio_ranges, | ||
403 | .ngpioranges = ARRAY_SIZE(mv88f619x_gpio_ranges), | ||
404 | }; | ||
405 | |||
406 | static struct mvebu_pinctrl_soc_info mv88f6192_info = { | ||
407 | .variant = VARIANT_MV88F6192, | ||
408 | .controls = mv88f619x_mpp_controls, | ||
409 | .ncontrols = ARRAY_SIZE(mv88f619x_mpp_controls), | ||
410 | .modes = mv88f6xxx_mpp_modes, | ||
411 | .nmodes = ARRAY_SIZE(mv88f6xxx_mpp_modes), | ||
412 | .gpioranges = mv88f619x_gpio_ranges, | ||
413 | .ngpioranges = ARRAY_SIZE(mv88f619x_gpio_ranges), | ||
414 | }; | ||
415 | |||
416 | static struct mvebu_pinctrl_soc_info mv88f6281_info = { | ||
417 | .variant = VARIANT_MV88F6281, | ||
418 | .controls = mv88f628x_mpp_controls, | ||
419 | .ncontrols = ARRAY_SIZE(mv88f628x_mpp_controls), | ||
420 | .modes = mv88f6xxx_mpp_modes, | ||
421 | .nmodes = ARRAY_SIZE(mv88f6xxx_mpp_modes), | ||
422 | .gpioranges = mv88f628x_gpio_ranges, | ||
423 | .ngpioranges = ARRAY_SIZE(mv88f628x_gpio_ranges), | ||
424 | }; | ||
425 | |||
426 | static struct mvebu_pinctrl_soc_info mv88f6282_info = { | ||
427 | .variant = VARIANT_MV88F6282, | ||
428 | .controls = mv88f628x_mpp_controls, | ||
429 | .ncontrols = ARRAY_SIZE(mv88f628x_mpp_controls), | ||
430 | .modes = mv88f6xxx_mpp_modes, | ||
431 | .nmodes = ARRAY_SIZE(mv88f6xxx_mpp_modes), | ||
432 | .gpioranges = mv88f628x_gpio_ranges, | ||
433 | .ngpioranges = ARRAY_SIZE(mv88f628x_gpio_ranges), | ||
434 | }; | ||
435 | |||
436 | static struct of_device_id kirkwood_pinctrl_of_match[] __devinitdata = { | ||
437 | { .compatible = "marvell,88f6180-pinctrl", .data = &mv88f6180_info }, | ||
438 | { .compatible = "marvell,88f6190-pinctrl", .data = &mv88f6190_info }, | ||
439 | { .compatible = "marvell,88f6192-pinctrl", .data = &mv88f6192_info }, | ||
440 | { .compatible = "marvell,88f6281-pinctrl", .data = &mv88f6281_info }, | ||
441 | { .compatible = "marvell,88f6282-pinctrl", .data = &mv88f6282_info }, | ||
442 | { } | ||
443 | }; | ||
444 | |||
445 | static int __devinit kirkwood_pinctrl_probe(struct platform_device *pdev) | ||
446 | { | ||
447 | const struct of_device_id *match = | ||
448 | of_match_device(kirkwood_pinctrl_of_match, &pdev->dev); | ||
449 | pdev->dev.platform_data = match->data; | ||
450 | return mvebu_pinctrl_probe(pdev); | ||
451 | } | ||
452 | |||
453 | static int __devexit kirkwood_pinctrl_remove(struct platform_device *pdev) | ||
454 | { | ||
455 | return mvebu_pinctrl_remove(pdev); | ||
456 | } | ||
457 | |||
458 | static struct platform_driver kirkwood_pinctrl_driver = { | ||
459 | .driver = { | ||
460 | .name = "kirkwood-pinctrl", | ||
461 | .owner = THIS_MODULE, | ||
462 | .of_match_table = of_match_ptr(kirkwood_pinctrl_of_match), | ||
463 | }, | ||
464 | .probe = kirkwood_pinctrl_probe, | ||
465 | .remove = __devexit_p(kirkwood_pinctrl_remove), | ||
466 | }; | ||
467 | |||
468 | module_platform_driver(kirkwood_pinctrl_driver); | ||
469 | |||
470 | MODULE_AUTHOR("Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>"); | ||
471 | MODULE_DESCRIPTION("Marvell Kirkwood pinctrl driver"); | ||
472 | MODULE_LICENSE("GPL v2"); | ||
diff --git a/drivers/pinctrl/pinmux.c b/drivers/pinctrl/pinmux.c index 9301a7a95eff..0ef01ee2835f 100644 --- a/drivers/pinctrl/pinmux.c +++ b/drivers/pinctrl/pinmux.c | |||
@@ -314,14 +314,11 @@ int pinmux_map_to_setting(struct pinctrl_map const *map, | |||
314 | { | 314 | { |
315 | struct pinctrl_dev *pctldev = setting->pctldev; | 315 | struct pinctrl_dev *pctldev = setting->pctldev; |
316 | const struct pinmux_ops *pmxops = pctldev->desc->pmxops; | 316 | const struct pinmux_ops *pmxops = pctldev->desc->pmxops; |
317 | const struct pinctrl_ops *pctlops = pctldev->desc->pctlops; | ||
318 | char const * const *groups; | 317 | char const * const *groups; |
319 | unsigned num_groups; | 318 | unsigned num_groups; |
320 | int ret; | 319 | int ret; |
321 | const char *group; | 320 | const char *group; |
322 | int i; | 321 | int i; |
323 | const unsigned *pins; | ||
324 | unsigned num_pins; | ||
325 | 322 | ||
326 | if (!pmxops) { | 323 | if (!pmxops) { |
327 | dev_err(pctldev->dev, "does not support mux function\n"); | 324 | dev_err(pctldev->dev, "does not support mux function\n"); |
@@ -376,53 +373,12 @@ int pinmux_map_to_setting(struct pinctrl_map const *map, | |||
376 | } | 373 | } |
377 | setting->data.mux.group = ret; | 374 | setting->data.mux.group = ret; |
378 | 375 | ||
379 | ret = pctlops->get_group_pins(pctldev, setting->data.mux.group, &pins, | ||
380 | &num_pins); | ||
381 | if (ret) { | ||
382 | dev_err(pctldev->dev, | ||
383 | "could not get pins for device %s group selector %d\n", | ||
384 | pinctrl_dev_get_name(pctldev), setting->data.mux.group); | ||
385 | return -ENODEV; | ||
386 | } | ||
387 | |||
388 | /* Try to allocate all pins in this group, one by one */ | ||
389 | for (i = 0; i < num_pins; i++) { | ||
390 | ret = pin_request(pctldev, pins[i], map->dev_name, NULL); | ||
391 | if (ret) { | ||
392 | dev_err(pctldev->dev, | ||
393 | "could not request pin %d on device %s\n", | ||
394 | pins[i], pinctrl_dev_get_name(pctldev)); | ||
395 | /* On error release all taken pins */ | ||
396 | i--; /* this pin just failed */ | ||
397 | for (; i >= 0; i--) | ||
398 | pin_free(pctldev, pins[i], NULL); | ||
399 | return -ENODEV; | ||
400 | } | ||
401 | } | ||
402 | |||
403 | return 0; | 376 | return 0; |
404 | } | 377 | } |
405 | 378 | ||
406 | void pinmux_free_setting(struct pinctrl_setting const *setting) | 379 | void pinmux_free_setting(struct pinctrl_setting const *setting) |
407 | { | 380 | { |
408 | struct pinctrl_dev *pctldev = setting->pctldev; | 381 | /* This function is currently unused */ |
409 | const struct pinctrl_ops *pctlops = pctldev->desc->pctlops; | ||
410 | const unsigned *pins; | ||
411 | unsigned num_pins; | ||
412 | int ret; | ||
413 | int i; | ||
414 | |||
415 | ret = pctlops->get_group_pins(pctldev, setting->data.mux.group, | ||
416 | &pins, &num_pins); | ||
417 | if (ret) { | ||
418 | dev_err(pctldev->dev, | ||
419 | "could not get pins for device %s group selector %d\n", | ||
420 | pinctrl_dev_get_name(pctldev), setting->data.mux.group); | ||
421 | return; | ||
422 | } | ||
423 | |||
424 | for (i = 0; i < num_pins; i++) | ||
425 | pin_free(pctldev, pins[i], NULL); | ||
426 | } | 382 | } |
427 | 383 | ||
428 | int pinmux_enable_setting(struct pinctrl_setting const *setting) | 384 | int pinmux_enable_setting(struct pinctrl_setting const *setting) |
@@ -446,6 +402,22 @@ int pinmux_enable_setting(struct pinctrl_setting const *setting) | |||
446 | num_pins = 0; | 402 | num_pins = 0; |
447 | } | 403 | } |
448 | 404 | ||
405 | /* Try to allocate all pins in this group, one by one */ | ||
406 | for (i = 0; i < num_pins; i++) { | ||
407 | ret = pin_request(pctldev, pins[i], setting->dev_name, NULL); | ||
408 | if (ret) { | ||
409 | dev_err(pctldev->dev, | ||
410 | "could not request pin %d on device %s\n", | ||
411 | pins[i], pinctrl_dev_get_name(pctldev)); | ||
412 | /* On error release all taken pins */ | ||
413 | i--; /* this pin just failed */ | ||
414 | for (; i >= 0; i--) | ||
415 | pin_free(pctldev, pins[i], NULL); | ||
416 | return -ENODEV; | ||
417 | } | ||
418 | } | ||
419 | |||
420 | /* Now that we have acquired the pins, encode the mux setting */ | ||
449 | for (i = 0; i < num_pins; i++) { | 421 | for (i = 0; i < num_pins; i++) { |
450 | desc = pin_desc_get(pctldev, pins[i]); | 422 | desc = pin_desc_get(pctldev, pins[i]); |
451 | if (desc == NULL) { | 423 | if (desc == NULL) { |
@@ -482,6 +454,7 @@ void pinmux_disable_setting(struct pinctrl_setting const *setting) | |||
482 | num_pins = 0; | 454 | num_pins = 0; |
483 | } | 455 | } |
484 | 456 | ||
457 | /* Flag the descs that no setting is active */ | ||
485 | for (i = 0; i < num_pins; i++) { | 458 | for (i = 0; i < num_pins; i++) { |
486 | desc = pin_desc_get(pctldev, pins[i]); | 459 | desc = pin_desc_get(pctldev, pins[i]); |
487 | if (desc == NULL) { | 460 | if (desc == NULL) { |
@@ -493,6 +466,10 @@ void pinmux_disable_setting(struct pinctrl_setting const *setting) | |||
493 | desc->mux_setting = NULL; | 466 | desc->mux_setting = NULL; |
494 | } | 467 | } |
495 | 468 | ||
469 | /* And release the pins */ | ||
470 | for (i = 0; i < num_pins; i++) | ||
471 | pin_free(pctldev, pins[i], NULL); | ||
472 | |||
496 | if (ops->disable) | 473 | if (ops->disable) |
497 | ops->disable(pctldev, setting->data.mux.func, setting->data.mux.group); | 474 | ops->disable(pctldev, setting->data.mux.func, setting->data.mux.group); |
498 | } | 475 | } |
diff --git a/drivers/power/Kconfig b/drivers/power/Kconfig index 49a893972318..b1d956d81f0c 100644 --- a/drivers/power/Kconfig +++ b/drivers/power/Kconfig | |||
@@ -335,6 +335,9 @@ config AB8500_BATTERY_THERM_ON_BATCTRL | |||
335 | help | 335 | help |
336 | Say Y to enable battery temperature measurements using | 336 | Say Y to enable battery temperature measurements using |
337 | thermistor connected on BATCTRL ADC. | 337 | thermistor connected on BATCTRL ADC. |
338 | |||
339 | source "drivers/power/reset/Kconfig" | ||
340 | |||
338 | endif # POWER_SUPPLY | 341 | endif # POWER_SUPPLY |
339 | 342 | ||
340 | source "drivers/power/avs/Kconfig" | 343 | source "drivers/power/avs/Kconfig" |
diff --git a/drivers/power/Makefile b/drivers/power/Makefile index b949cf85590c..f1d99f4a0bc3 100644 --- a/drivers/power/Makefile +++ b/drivers/power/Makefile | |||
@@ -49,3 +49,4 @@ obj-$(CONFIG_CHARGER_MAX8997) += max8997_charger.o | |||
49 | obj-$(CONFIG_CHARGER_MAX8998) += max8998_charger.o | 49 | obj-$(CONFIG_CHARGER_MAX8998) += max8998_charger.o |
50 | obj-$(CONFIG_POWER_AVS) += avs/ | 50 | obj-$(CONFIG_POWER_AVS) += avs/ |
51 | obj-$(CONFIG_CHARGER_SMB347) += smb347-charger.o | 51 | obj-$(CONFIG_CHARGER_SMB347) += smb347-charger.o |
52 | obj-$(CONFIG_POWER_RESET) += reset/ | ||
diff --git a/drivers/power/reset/Kconfig b/drivers/power/reset/Kconfig new file mode 100644 index 000000000000..6461b489fb09 --- /dev/null +++ b/drivers/power/reset/Kconfig | |||
@@ -0,0 +1,15 @@ | |||
1 | menuconfig POWER_RESET | ||
2 | bool "Board level reset or power off" | ||
3 | help | ||
4 | Provides a number of drivers which either reset a complete board | ||
5 | or shut it down, by manipulating the main power supply on the board. | ||
6 | |||
7 | Say Y here to enable board reset and power off | ||
8 | |||
9 | config POWER_RESET_GPIO | ||
10 | bool "GPIO power-off driver" | ||
11 | depends on OF_GPIO && POWER_RESET | ||
12 | help | ||
13 | This driver supports turning off your board via a GPIO line. | ||
14 | If your board needs a GPIO high/low to power down, say Y and | ||
15 | create a binding in your devicetree. | ||
diff --git a/drivers/power/reset/Makefile b/drivers/power/reset/Makefile new file mode 100644 index 000000000000..751488a4a0c5 --- /dev/null +++ b/drivers/power/reset/Makefile | |||
@@ -0,0 +1 @@ | |||
obj-$(CONFIG_POWER_RESET_GPIO) += gpio-poweroff.o | |||
diff --git a/drivers/power/reset/gpio-poweroff.c b/drivers/power/reset/gpio-poweroff.c new file mode 100644 index 000000000000..0491e5335d02 --- /dev/null +++ b/drivers/power/reset/gpio-poweroff.c | |||
@@ -0,0 +1,129 @@ | |||
1 | /* | ||
2 | * Toggles a GPIO pin to power down a device | ||
3 | * | ||
4 | * Jamie Lentin <jm@lentin.co.uk> | ||
5 | * Andrew Lunn <andrew@lunn.ch> | ||
6 | * | ||
7 | * Copyright (C) 2012 Jamie Lentin | ||
8 | * | ||
9 | * This program is free software; you can redistribute it and/or modify | ||
10 | * it under the terms of the GNU General Public License version 2 as | ||
11 | * published by the Free Software Foundation. | ||
12 | * | ||
13 | */ | ||
14 | #include <linux/kernel.h> | ||
15 | #include <linux/init.h> | ||
16 | #include <linux/delay.h> | ||
17 | #include <linux/platform_device.h> | ||
18 | #include <linux/gpio.h> | ||
19 | #include <linux/of_platform.h> | ||
20 | #include <linux/of_gpio.h> | ||
21 | #include <linux/module.h> | ||
22 | |||
23 | /* | ||
24 | * Hold configuration here, cannot be more than one instance of the driver | ||
25 | * since pm_power_off itself is global. | ||
26 | */ | ||
27 | static int gpio_num = -1; | ||
28 | static int gpio_active_low; | ||
29 | |||
30 | static void gpio_poweroff_do_poweroff(void) | ||
31 | { | ||
32 | BUG_ON(gpio_num == -1); | ||
33 | |||
34 | /* drive it active */ | ||
35 | gpio_direction_output(gpio_num, !gpio_active_low); | ||
36 | mdelay(100); | ||
37 | /* rising edge or drive inactive */ | ||
38 | gpio_set_value(gpio_num, gpio_active_low); | ||
39 | mdelay(100); | ||
40 | /* falling edge */ | ||
41 | gpio_set_value(gpio_num, !gpio_active_low); | ||
42 | |||
43 | /* give it some time */ | ||
44 | mdelay(3000); | ||
45 | |||
46 | WARN_ON(1); | ||
47 | } | ||
48 | |||
49 | static int __devinit gpio_poweroff_probe(struct platform_device *pdev) | ||
50 | { | ||
51 | enum of_gpio_flags flags; | ||
52 | bool input = false; | ||
53 | int ret; | ||
54 | |||
55 | /* If a pm_power_off function has already been added, leave it alone */ | ||
56 | if (pm_power_off != NULL) { | ||
57 | pr_err("%s: pm_power_off function already registered", | ||
58 | __func__); | ||
59 | return -EBUSY; | ||
60 | } | ||
61 | |||
62 | gpio_num = of_get_gpio_flags(pdev->dev.of_node, 0, &flags); | ||
63 | if (gpio_num < 0) { | ||
64 | pr_err("%s: Could not get GPIO configuration: %d", | ||
65 | __func__, gpio_num); | ||
66 | return -ENODEV; | ||
67 | } | ||
68 | gpio_active_low = flags & OF_GPIO_ACTIVE_LOW; | ||
69 | |||
70 | if (of_get_property(pdev->dev.of_node, "input", NULL)) | ||
71 | input = true; | ||
72 | |||
73 | ret = gpio_request(gpio_num, "poweroff-gpio"); | ||
74 | if (ret) { | ||
75 | pr_err("%s: Could not get GPIO %d", __func__, gpio_num); | ||
76 | return ret; | ||
77 | } | ||
78 | if (input) { | ||
79 | if (gpio_direction_input(gpio_num)) { | ||
80 | pr_err("Could not set direction of GPIO %d to input", | ||
81 | gpio_num); | ||
82 | goto err; | ||
83 | } | ||
84 | } else { | ||
85 | if (gpio_direction_output(gpio_num, gpio_active_low)) { | ||
86 | pr_err("Could not set direction of GPIO %d", gpio_num); | ||
87 | goto err; | ||
88 | } | ||
89 | } | ||
90 | |||
91 | pm_power_off = &gpio_poweroff_do_poweroff; | ||
92 | return 0; | ||
93 | |||
94 | err: | ||
95 | gpio_free(gpio_num); | ||
96 | return -ENODEV; | ||
97 | } | ||
98 | |||
99 | static int __devexit gpio_poweroff_remove(struct platform_device *pdev) | ||
100 | { | ||
101 | if (gpio_num != -1) | ||
102 | gpio_free(gpio_num); | ||
103 | if (pm_power_off == &gpio_poweroff_do_poweroff) | ||
104 | pm_power_off = NULL; | ||
105 | |||
106 | return 0; | ||
107 | } | ||
108 | |||
109 | static const struct of_device_id of_gpio_poweroff_match[] = { | ||
110 | { .compatible = "gpio-poweroff", }, | ||
111 | {}, | ||
112 | }; | ||
113 | |||
114 | static struct platform_driver gpio_poweroff_driver = { | ||
115 | .probe = gpio_poweroff_probe, | ||
116 | .remove = __devexit_p(gpio_poweroff_remove), | ||
117 | .driver = { | ||
118 | .name = "poweroff-gpio", | ||
119 | .owner = THIS_MODULE, | ||
120 | .of_match_table = of_gpio_poweroff_match, | ||
121 | }, | ||
122 | }; | ||
123 | |||
124 | module_platform_driver(gpio_poweroff_driver); | ||
125 | |||
126 | MODULE_AUTHOR("Jamie Lentin <jm@lentin.co.uk>"); | ||
127 | MODULE_DESCRIPTION("GPIO poweroff driver"); | ||
128 | MODULE_LICENSE("GPL"); | ||
129 | MODULE_ALIAS("platform:poweroff-gpio"); | ||
diff --git a/drivers/usb/host/ehci-orion.c b/drivers/usb/host/ehci-orion.c index 9c2717d66730..e7e8275028d3 100644 --- a/drivers/usb/host/ehci-orion.c +++ b/drivers/usb/host/ehci-orion.c | |||
@@ -14,6 +14,9 @@ | |||
14 | #include <linux/mbus.h> | 14 | #include <linux/mbus.h> |
15 | #include <linux/clk.h> | 15 | #include <linux/clk.h> |
16 | #include <linux/platform_data/usb-ehci-orion.h> | 16 | #include <linux/platform_data/usb-ehci-orion.h> |
17 | #include <linux/of.h> | ||
18 | #include <linux/of_device.h> | ||
19 | #include <linux/of_irq.h> | ||
17 | 20 | ||
18 | #define rdl(off) __raw_readl(hcd->regs + (off)) | 21 | #define rdl(off) __raw_readl(hcd->regs + (off)) |
19 | #define wrl(off, val) __raw_writel((val), hcd->regs + (off)) | 22 | #define wrl(off, val) __raw_writel((val), hcd->regs + (off)) |
@@ -181,6 +184,8 @@ ehci_orion_conf_mbus_windows(struct usb_hcd *hcd, | |||
181 | } | 184 | } |
182 | } | 185 | } |
183 | 186 | ||
187 | static u64 ehci_orion_dma_mask = DMA_BIT_MASK(32); | ||
188 | |||
184 | static int __devinit ehci_orion_drv_probe(struct platform_device *pdev) | 189 | static int __devinit ehci_orion_drv_probe(struct platform_device *pdev) |
185 | { | 190 | { |
186 | struct orion_ehci_data *pd = pdev->dev.platform_data; | 191 | struct orion_ehci_data *pd = pdev->dev.platform_data; |
@@ -191,13 +196,17 @@ static int __devinit ehci_orion_drv_probe(struct platform_device *pdev) | |||
191 | struct clk *clk; | 196 | struct clk *clk; |
192 | void __iomem *regs; | 197 | void __iomem *regs; |
193 | int irq, err; | 198 | int irq, err; |
199 | enum orion_ehci_phy_ver phy_version; | ||
194 | 200 | ||
195 | if (usb_disabled()) | 201 | if (usb_disabled()) |
196 | return -ENODEV; | 202 | return -ENODEV; |
197 | 203 | ||
198 | pr_debug("Initializing Orion-SoC USB Host Controller\n"); | 204 | pr_debug("Initializing Orion-SoC USB Host Controller\n"); |
199 | 205 | ||
200 | irq = platform_get_irq(pdev, 0); | 206 | if (pdev->dev.of_node) |
207 | irq = irq_of_parse_and_map(pdev->dev.of_node, 0); | ||
208 | else | ||
209 | irq = platform_get_irq(pdev, 0); | ||
201 | if (irq <= 0) { | 210 | if (irq <= 0) { |
202 | dev_err(&pdev->dev, | 211 | dev_err(&pdev->dev, |
203 | "Found HC with no IRQ. Check %s setup!\n", | 212 | "Found HC with no IRQ. Check %s setup!\n", |
@@ -215,6 +224,14 @@ static int __devinit ehci_orion_drv_probe(struct platform_device *pdev) | |||
215 | goto err1; | 224 | goto err1; |
216 | } | 225 | } |
217 | 226 | ||
227 | /* | ||
228 | * Right now device-tree probed devices don't get dma_mask | ||
229 | * set. Since shared usb code relies on it, set it here for | ||
230 | * now. Once we have dma capability bindings this can go away. | ||
231 | */ | ||
232 | if (!pdev->dev.dma_mask) | ||
233 | pdev->dev.dma_mask = &ehci_orion_dma_mask; | ||
234 | |||
218 | if (!request_mem_region(res->start, resource_size(res), | 235 | if (!request_mem_region(res->start, resource_size(res), |
219 | ehci_orion_hc_driver.description)) { | 236 | ehci_orion_hc_driver.description)) { |
220 | dev_dbg(&pdev->dev, "controller already in use\n"); | 237 | dev_dbg(&pdev->dev, "controller already in use\n"); |
@@ -262,7 +279,12 @@ static int __devinit ehci_orion_drv_probe(struct platform_device *pdev) | |||
262 | /* | 279 | /* |
263 | * setup Orion USB controller. | 280 | * setup Orion USB controller. |
264 | */ | 281 | */ |
265 | switch (pd->phy_version) { | 282 | if (pdev->dev.of_node) |
283 | phy_version = EHCI_PHY_NA; | ||
284 | else | ||
285 | phy_version = pd->phy_version; | ||
286 | |||
287 | switch (phy_version) { | ||
266 | case EHCI_PHY_NA: /* dont change USB phy settings */ | 288 | case EHCI_PHY_NA: /* dont change USB phy settings */ |
267 | break; | 289 | break; |
268 | case EHCI_PHY_ORION: | 290 | case EHCI_PHY_ORION: |
@@ -317,9 +339,19 @@ static int __exit ehci_orion_drv_remove(struct platform_device *pdev) | |||
317 | 339 | ||
318 | MODULE_ALIAS("platform:orion-ehci"); | 340 | MODULE_ALIAS("platform:orion-ehci"); |
319 | 341 | ||
342 | static const struct of_device_id ehci_orion_dt_ids[] __devinitdata = { | ||
343 | { .compatible = "marvell,orion-ehci", }, | ||
344 | {}, | ||
345 | }; | ||
346 | MODULE_DEVICE_TABLE(of, ehci_orion_dt_ids); | ||
347 | |||
320 | static struct platform_driver ehci_orion_driver = { | 348 | static struct platform_driver ehci_orion_driver = { |
321 | .probe = ehci_orion_drv_probe, | 349 | .probe = ehci_orion_drv_probe, |
322 | .remove = __exit_p(ehci_orion_drv_remove), | 350 | .remove = __exit_p(ehci_orion_drv_remove), |
323 | .shutdown = usb_hcd_platform_shutdown, | 351 | .shutdown = usb_hcd_platform_shutdown, |
324 | .driver.name = "orion-ehci", | 352 | .driver = { |
353 | .name = "orion-ehci", | ||
354 | .owner = THIS_MODULE, | ||
355 | .of_match_table = of_match_ptr(ehci_orion_dt_ids), | ||
356 | }, | ||
325 | }; | 357 | }; |