diff options
author | Olof Johansson <olof@lixom.net> | 2013-01-11 14:03:29 -0500 |
---|---|---|
committer | Olof Johansson <olof@lixom.net> | 2013-01-11 14:03:29 -0500 |
commit | 65aabd61a4c5fa4033d2af7692ae7994845ab0ca (patch) | |
tree | 31409a5f16c266841218df07814363a3b7dd4fc7 /arch/arm | |
parent | 434fec16948cf5afa3cba31dcb00359bdbf24758 (diff) | |
parent | 11d5993df2e1f65e3acfeb92a3febe88803b3e7f (diff) |
Merge tag 'mvebu_fixes_for_v3.8-rc3' of git://git.infradead.org/users/jcooper/linux into fixes
From Jason Cooper:
mvebu fixes for v3.8-rc3
- gpio fixes in mvebu, kirkwood, and dove
- small DT fix for mvebu (correct RAM size)
* tag 'mvebu_fixes_for_v3.8-rc3' of git://git.infradead.org/users/jcooper/linux:
arm: mvebu: Fix memory size for Armada 370 DB
ARM: Dove: add Cubox sdhci card detect gpio
ARM: Kirkwood: fix ns2 gpios by converting to pinctrl
arm: mvebu: use global interrupts for GPIOs on Armada XP
Diffstat (limited to 'arch/arm')
-rw-r--r-- | arch/arm/boot/dts/armada-370-db.dts | 2 | ||||
-rw-r--r-- | arch/arm/boot/dts/armada-xp-mv78230.dtsi | 14 | ||||
-rw-r--r-- | arch/arm/boot/dts/armada-xp-mv78260.dtsi | 21 | ||||
-rw-r--r-- | arch/arm/boot/dts/armada-xp-mv78460.dtsi | 21 | ||||
-rw-r--r-- | arch/arm/boot/dts/dove-cubox.dts | 14 | ||||
-rw-r--r-- | arch/arm/boot/dts/kirkwood-ns2-common.dtsi | 16 | ||||
-rw-r--r-- | arch/arm/mach-kirkwood/board-ns2.c | 38 |
7 files changed, 53 insertions, 73 deletions
diff --git a/arch/arm/boot/dts/armada-370-db.dts b/arch/arm/boot/dts/armada-370-db.dts index 00044026ef1f..9b82facb2561 100644 --- a/arch/arm/boot/dts/armada-370-db.dts +++ b/arch/arm/boot/dts/armada-370-db.dts | |||
@@ -26,7 +26,7 @@ | |||
26 | 26 | ||
27 | memory { | 27 | memory { |
28 | device_type = "memory"; | 28 | device_type = "memory"; |
29 | reg = <0x00000000 0x20000000>; /* 512 MB */ | 29 | reg = <0x00000000 0x40000000>; /* 1 GB */ |
30 | }; | 30 | }; |
31 | 31 | ||
32 | soc { | 32 | soc { |
diff --git a/arch/arm/boot/dts/armada-xp-mv78230.dtsi b/arch/arm/boot/dts/armada-xp-mv78230.dtsi index 271855a6e224..e041f42ed711 100644 --- a/arch/arm/boot/dts/armada-xp-mv78230.dtsi +++ b/arch/arm/boot/dts/armada-xp-mv78230.dtsi | |||
@@ -50,27 +50,25 @@ | |||
50 | }; | 50 | }; |
51 | 51 | ||
52 | gpio0: gpio@d0018100 { | 52 | gpio0: gpio@d0018100 { |
53 | compatible = "marvell,armadaxp-gpio"; | 53 | compatible = "marvell,orion-gpio"; |
54 | reg = <0xd0018100 0x40>, | 54 | reg = <0xd0018100 0x40>; |
55 | <0xd0018800 0x30>; | ||
56 | ngpios = <32>; | 55 | ngpios = <32>; |
57 | gpio-controller; | 56 | gpio-controller; |
58 | #gpio-cells = <2>; | 57 | #gpio-cells = <2>; |
59 | interrupt-controller; | 58 | interrupt-controller; |
60 | #interrupts-cells = <2>; | 59 | #interrupts-cells = <2>; |
61 | interrupts = <16>, <17>, <18>, <19>; | 60 | interrupts = <82>, <83>, <84>, <85>; |
62 | }; | 61 | }; |
63 | 62 | ||
64 | gpio1: gpio@d0018140 { | 63 | gpio1: gpio@d0018140 { |
65 | compatible = "marvell,armadaxp-gpio"; | 64 | compatible = "marvell,orion-gpio"; |
66 | reg = <0xd0018140 0x40>, | 65 | reg = <0xd0018140 0x40>; |
67 | <0xd0018840 0x30>; | ||
68 | ngpios = <17>; | 66 | ngpios = <17>; |
69 | gpio-controller; | 67 | gpio-controller; |
70 | #gpio-cells = <2>; | 68 | #gpio-cells = <2>; |
71 | interrupt-controller; | 69 | interrupt-controller; |
72 | #interrupts-cells = <2>; | 70 | #interrupts-cells = <2>; |
73 | interrupts = <20>, <21>, <22>; | 71 | interrupts = <87>, <88>, <89>; |
74 | }; | 72 | }; |
75 | }; | 73 | }; |
76 | }; | 74 | }; |
diff --git a/arch/arm/boot/dts/armada-xp-mv78260.dtsi b/arch/arm/boot/dts/armada-xp-mv78260.dtsi index 1c1937dbce73..9e23bd8c9536 100644 --- a/arch/arm/boot/dts/armada-xp-mv78260.dtsi +++ b/arch/arm/boot/dts/armada-xp-mv78260.dtsi | |||
@@ -51,39 +51,36 @@ | |||
51 | }; | 51 | }; |
52 | 52 | ||
53 | gpio0: gpio@d0018100 { | 53 | gpio0: gpio@d0018100 { |
54 | compatible = "marvell,armadaxp-gpio"; | 54 | compatible = "marvell,orion-gpio"; |
55 | reg = <0xd0018100 0x40>, | 55 | reg = <0xd0018100 0x40>; |
56 | <0xd0018800 0x30>; | ||
57 | ngpios = <32>; | 56 | ngpios = <32>; |
58 | gpio-controller; | 57 | gpio-controller; |
59 | #gpio-cells = <2>; | 58 | #gpio-cells = <2>; |
60 | interrupt-controller; | 59 | interrupt-controller; |
61 | #interrupts-cells = <2>; | 60 | #interrupts-cells = <2>; |
62 | interrupts = <16>, <17>, <18>, <19>; | 61 | interrupts = <82>, <83>, <84>, <85>; |
63 | }; | 62 | }; |
64 | 63 | ||
65 | gpio1: gpio@d0018140 { | 64 | gpio1: gpio@d0018140 { |
66 | compatible = "marvell,armadaxp-gpio"; | 65 | compatible = "marvell,orion-gpio"; |
67 | reg = <0xd0018140 0x40>, | 66 | reg = <0xd0018140 0x40>; |
68 | <0xd0018840 0x30>; | ||
69 | ngpios = <32>; | 67 | ngpios = <32>; |
70 | gpio-controller; | 68 | gpio-controller; |
71 | #gpio-cells = <2>; | 69 | #gpio-cells = <2>; |
72 | interrupt-controller; | 70 | interrupt-controller; |
73 | #interrupts-cells = <2>; | 71 | #interrupts-cells = <2>; |
74 | interrupts = <20>, <21>, <22>, <23>; | 72 | interrupts = <87>, <88>, <89>, <90>; |
75 | }; | 73 | }; |
76 | 74 | ||
77 | gpio2: gpio@d0018180 { | 75 | gpio2: gpio@d0018180 { |
78 | compatible = "marvell,armadaxp-gpio"; | 76 | compatible = "marvell,orion-gpio"; |
79 | reg = <0xd0018180 0x40>, | 77 | reg = <0xd0018180 0x40>; |
80 | <0xd0018870 0x30>; | ||
81 | ngpios = <3>; | 78 | ngpios = <3>; |
82 | gpio-controller; | 79 | gpio-controller; |
83 | #gpio-cells = <2>; | 80 | #gpio-cells = <2>; |
84 | interrupt-controller; | 81 | interrupt-controller; |
85 | #interrupts-cells = <2>; | 82 | #interrupts-cells = <2>; |
86 | interrupts = <24>; | 83 | interrupts = <91>; |
87 | }; | 84 | }; |
88 | 85 | ||
89 | ethernet@d0034000 { | 86 | ethernet@d0034000 { |
diff --git a/arch/arm/boot/dts/armada-xp-mv78460.dtsi b/arch/arm/boot/dts/armada-xp-mv78460.dtsi index 4905cf3a5ef8..965966110e38 100644 --- a/arch/arm/boot/dts/armada-xp-mv78460.dtsi +++ b/arch/arm/boot/dts/armada-xp-mv78460.dtsi | |||
@@ -66,39 +66,36 @@ | |||
66 | }; | 66 | }; |
67 | 67 | ||
68 | gpio0: gpio@d0018100 { | 68 | gpio0: gpio@d0018100 { |
69 | compatible = "marvell,armadaxp-gpio"; | 69 | compatible = "marvell,orion-gpio"; |
70 | reg = <0xd0018100 0x40>, | 70 | reg = <0xd0018100 0x40>; |
71 | <0xd0018800 0x30>; | ||
72 | ngpios = <32>; | 71 | ngpios = <32>; |
73 | gpio-controller; | 72 | gpio-controller; |
74 | #gpio-cells = <2>; | 73 | #gpio-cells = <2>; |
75 | interrupt-controller; | 74 | interrupt-controller; |
76 | #interrupts-cells = <2>; | 75 | #interrupts-cells = <2>; |
77 | interrupts = <16>, <17>, <18>, <19>; | 76 | interrupts = <82>, <83>, <84>, <85>; |
78 | }; | 77 | }; |
79 | 78 | ||
80 | gpio1: gpio@d0018140 { | 79 | gpio1: gpio@d0018140 { |
81 | compatible = "marvell,armadaxp-gpio"; | 80 | compatible = "marvell,orion-gpio"; |
82 | reg = <0xd0018140 0x40>, | 81 | reg = <0xd0018140 0x40>; |
83 | <0xd0018840 0x30>; | ||
84 | ngpios = <32>; | 82 | ngpios = <32>; |
85 | gpio-controller; | 83 | gpio-controller; |
86 | #gpio-cells = <2>; | 84 | #gpio-cells = <2>; |
87 | interrupt-controller; | 85 | interrupt-controller; |
88 | #interrupts-cells = <2>; | 86 | #interrupts-cells = <2>; |
89 | interrupts = <20>, <21>, <22>, <23>; | 87 | interrupts = <87>, <88>, <89>, <90>; |
90 | }; | 88 | }; |
91 | 89 | ||
92 | gpio2: gpio@d0018180 { | 90 | gpio2: gpio@d0018180 { |
93 | compatible = "marvell,armadaxp-gpio"; | 91 | compatible = "marvell,orion-gpio"; |
94 | reg = <0xd0018180 0x40>, | 92 | reg = <0xd0018180 0x40>; |
95 | <0xd0018870 0x30>; | ||
96 | ngpios = <3>; | 93 | ngpios = <3>; |
97 | gpio-controller; | 94 | gpio-controller; |
98 | #gpio-cells = <2>; | 95 | #gpio-cells = <2>; |
99 | interrupt-controller; | 96 | interrupt-controller; |
100 | #interrupts-cells = <2>; | 97 | #interrupts-cells = <2>; |
101 | interrupts = <24>; | 98 | interrupts = <91>; |
102 | }; | 99 | }; |
103 | 100 | ||
104 | ethernet@d0034000 { | 101 | ethernet@d0034000 { |
diff --git a/arch/arm/boot/dts/dove-cubox.dts b/arch/arm/boot/dts/dove-cubox.dts index fed7d3f9f431..cdee96fca6e2 100644 --- a/arch/arm/boot/dts/dove-cubox.dts +++ b/arch/arm/boot/dts/dove-cubox.dts | |||
@@ -26,10 +26,15 @@ | |||
26 | }; | 26 | }; |
27 | 27 | ||
28 | &uart0 { status = "okay"; }; | 28 | &uart0 { status = "okay"; }; |
29 | &sdio0 { status = "okay"; }; | ||
30 | &sata0 { status = "okay"; }; | 29 | &sata0 { status = "okay"; }; |
31 | &i2c0 { status = "okay"; }; | 30 | &i2c0 { status = "okay"; }; |
32 | 31 | ||
32 | &sdio0 { | ||
33 | status = "okay"; | ||
34 | /* sdio0 card detect is connected to wrong pin on CuBox */ | ||
35 | cd-gpios = <&gpio0 12 1>; | ||
36 | }; | ||
37 | |||
33 | &spi0 { | 38 | &spi0 { |
34 | status = "okay"; | 39 | status = "okay"; |
35 | 40 | ||
@@ -42,9 +47,14 @@ | |||
42 | }; | 47 | }; |
43 | 48 | ||
44 | &pinctrl { | 49 | &pinctrl { |
45 | pinctrl-0 = <&pmx_gpio_18>; | 50 | pinctrl-0 = <&pmx_gpio_12 &pmx_gpio_18>; |
46 | pinctrl-names = "default"; | 51 | pinctrl-names = "default"; |
47 | 52 | ||
53 | pmx_gpio_12: pmx-gpio-12 { | ||
54 | marvell,pins = "mpp12"; | ||
55 | marvell,function = "gpio"; | ||
56 | }; | ||
57 | |||
48 | pmx_gpio_18: pmx-gpio-18 { | 58 | pmx_gpio_18: pmx-gpio-18 { |
49 | marvell,pins = "mpp18"; | 59 | marvell,pins = "mpp18"; |
50 | marvell,function = "gpio"; | 60 | marvell,function = "gpio"; |
diff --git a/arch/arm/boot/dts/kirkwood-ns2-common.dtsi b/arch/arm/boot/dts/kirkwood-ns2-common.dtsi index 9bc6785ad228..77d21abfcdf7 100644 --- a/arch/arm/boot/dts/kirkwood-ns2-common.dtsi +++ b/arch/arm/boot/dts/kirkwood-ns2-common.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,21 @@ | |||
6 | }; | 7 | }; |
7 | 8 | ||
8 | ocp@f1000000 { | 9 | ocp@f1000000 { |
10 | pinctrl: pinctrl@10000 { | ||
11 | pinctrl-0 = < &pmx_spi &pmx_twsi0 &pmx_uart0 | ||
12 | &pmx_ns2_sata0 &pmx_ns2_sata1>; | ||
13 | pinctrl-names = "default"; | ||
14 | |||
15 | pmx_ns2_sata0: pmx-ns2-sata0 { | ||
16 | marvell,pins = "mpp21"; | ||
17 | marvell,function = "sata0"; | ||
18 | }; | ||
19 | pmx_ns2_sata1: pmx-ns2-sata1 { | ||
20 | marvell,pins = "mpp20"; | ||
21 | marvell,function = "sata1"; | ||
22 | }; | ||
23 | }; | ||
24 | |||
9 | serial@12000 { | 25 | serial@12000 { |
10 | clock-frequency = <166666667>; | 26 | clock-frequency = <166666667>; |
11 | status = "okay"; | 27 | status = "okay"; |
diff --git a/arch/arm/mach-kirkwood/board-ns2.c b/arch/arm/mach-kirkwood/board-ns2.c index 8821720ab5a4..f4632a809f68 100644 --- a/arch/arm/mach-kirkwood/board-ns2.c +++ b/arch/arm/mach-kirkwood/board-ns2.c | |||
@@ -18,47 +18,11 @@ | |||
18 | #include <linux/gpio.h> | 18 | #include <linux/gpio.h> |
19 | #include <linux/of.h> | 19 | #include <linux/of.h> |
20 | #include "common.h" | 20 | #include "common.h" |
21 | #include "mpp.h" | ||
22 | 21 | ||
23 | static struct mv643xx_eth_platform_data ns2_ge00_data = { | 22 | static struct mv643xx_eth_platform_data ns2_ge00_data = { |
24 | .phy_addr = MV643XX_ETH_PHY_ADDR(8), | 23 | .phy_addr = MV643XX_ETH_PHY_ADDR(8), |
25 | }; | 24 | }; |
26 | 25 | ||
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 | 26 | #define NS2_GPIO_POWER_OFF 31 |
63 | 27 | ||
64 | static void ns2_power_off(void) | 28 | static void ns2_power_off(void) |
@@ -71,8 +35,6 @@ void __init ns2_init(void) | |||
71 | /* | 35 | /* |
72 | * Basic setup. Needs to be called early. | 36 | * Basic setup. Needs to be called early. |
73 | */ | 37 | */ |
74 | kirkwood_mpp_conf(ns2_mpp_config); | ||
75 | |||
76 | if (of_machine_is_compatible("lacie,netspace_lite_v2") || | 38 | if (of_machine_is_compatible("lacie,netspace_lite_v2") || |
77 | of_machine_is_compatible("lacie,netspace_mini_v2")) | 39 | of_machine_is_compatible("lacie,netspace_mini_v2")) |
78 | ns2_ge00_data.phy_addr = MV643XX_ETH_PHY_ADDR(0); | 40 | ns2_ge00_data.phy_addr = MV643XX_ETH_PHY_ADDR(0); |