fix gpio interrupt-cells property on AM335x
[openwrt/openwrt.git] / target / linux / omap / patches-3.12 / 103-ARM-dts-add-AM33XX-MMC-support-and-documentation.patch
1 Adds AM33XX MMC support for am335x-bone, am335x-evm and am335x-evmsk boards.
2
3 Also added is the DMA binding definitions based on the generic DMA request
4 binding.
5
6 Additional changes made to DTS:
7 * Interrupt, reg and compatible properties added
8 * ti,needs-special-hs-handling added
9
10 Signed-off-by: Matt Porter <mporter@ti.com>
11 Acked-by: Tony Lindgren <tony@atomide.com>
12 Signed-off-by: Joel Fernandes <joelf@ti.com>
13
14 ---
15 .../devicetree/bindings/mmc/ti-omap-hsmmc.txt | 26 ++++++++++++++-
16 arch/arm/boot/dts/am335x-bone.dts | 11 +++++++
17 arch/arm/boot/dts/am335x-evm.dts | 7 ++++
18 arch/arm/boot/dts/am335x-evmsk.dts | 7 ++++
19 arch/arm/boot/dts/am33xx.dtsi | 38 ++++++++++++++++++++++
20 5 files changed, 88 insertions(+), 1 deletion(-)
21
22 diff --git a/Documentation/devicetree/bindings/mmc/ti-omap-hsmmc.txt b/Documentation/devicetree/bindings/mmc/ti-omap-hsmmc.txt
23 index ed271fc..8c8908a 100644
24 --- a/Documentation/devicetree/bindings/mmc/ti-omap-hsmmc.txt
25 +++ b/Documentation/devicetree/bindings/mmc/ti-omap-hsmmc.txt
26 @@ -20,8 +20,29 @@ ti,dual-volt: boolean, supports dual voltage cards
27 ti,non-removable: non-removable slot (like eMMC)
28 ti,needs-special-reset: Requires a special softreset sequence
29 ti,needs-special-hs-handling: HSMMC IP needs special setting for handling High Speed
30 +dmas: List of DMA specifiers with the controller specific format
31 +as described in the generic DMA client binding. A tx and rx
32 +specifier is required.
33 +dma-names: List of DMA request names. These strings correspond
34 +1:1 with the DMA specifiers listed in dmas. The string naming is
35 +to be "rx" and "tx" for RX and TX DMA requests, respectively.
36 +
37 +Examples:
38 +
39 +[hwmod populated DMA resources]
40 +
41 + mmc1: mmc@0x4809c000 {
42 + compatible = "ti,omap4-hsmmc";
43 + reg = <0x4809c000 0x400>;
44 + ti,hwmods = "mmc1";
45 + ti,dual-volt;
46 + bus-width = <4>;
47 + vmmc-supply = <&vmmc>; /* phandle to regulator node */
48 + ti,non-removable;
49 + };
50 +
51 +[generic DMA request binding]
52
53 -Example:
54 mmc1: mmc@0x4809c000 {
55 compatible = "ti,omap4-hsmmc";
56 reg = <0x4809c000 0x400>;
57 @@ -30,4 +51,7 @@ Example:
58 bus-width = <4>;
59 vmmc-supply = <&vmmc>; /* phandle to regulator node */
60 ti,non-removable;
61 + dmas = <&edma 24
62 + &edma 25>;
63 + dma-names = "tx", "rx";
64 };
65 diff --git a/arch/arm/boot/dts/am335x-bone.dts b/arch/arm/boot/dts/am335x-bone.dts
66 index 7993c48..d5f43fe 100644
67 --- a/arch/arm/boot/dts/am335x-bone.dts
68 +++ b/arch/arm/boot/dts/am335x-bone.dts
69 @@ -9,3 +9,14 @@
70
71 #include "am33xx.dtsi"
72 #include "am335x-bone-common.dtsi"
73 +
74 +&ldo3_reg {
75 + regulator-min-microvolt = <1800000>;
76 + regulator-max-microvolt = <3300000>;
77 + regulator-always-on;
78 +};
79 +
80 +&mmc1 {
81 + status = "okay";
82 + vmmc-supply = <&ldo3_reg>;
83 +};
84 diff --git a/arch/arm/boot/dts/am335x-evm.dts b/arch/arm/boot/dts/am335x-evm.dts
85 index e8ec875..bc4a69d 100644
86 --- a/arch/arm/boot/dts/am335x-evm.dts
87 +++ b/arch/arm/boot/dts/am335x-evm.dts
88 @@ -477,6 +477,8 @@
89 };
90
91 vmmc_reg: regulator@12 {
92 + regulator-min-microvolt = <1800000>;
93 + regulator-max-microvolt = <3300000>;
94 regulator-always-on;
95 };
96 };
97 @@ -517,3 +519,8 @@
98 ti,adc-channels = <4 5 6 7>;
99 };
100 };
101 +
102 +&mmc1 {
103 + status = "okay";
104 + vmmc-supply = <&vmmc_reg>;
105 +};
106 diff --git a/arch/arm/boot/dts/am335x-evmsk.dts b/arch/arm/boot/dts/am335x-evmsk.dts
107 index 4f339fa..55fd194 100644
108 --- a/arch/arm/boot/dts/am335x-evmsk.dts
109 +++ b/arch/arm/boot/dts/am335x-evmsk.dts
110 @@ -393,6 +393,8 @@
111 };
112
113 vmmc_reg: regulator@12 {
114 + regulator-min-microvolt = <1800000>;
115 + regulator-max-microvolt = <3300000>;
116 regulator-always-on;
117 };
118 };
119 @@ -419,3 +421,8 @@
120 phy_id = <&davinci_mdio>, <1>;
121 phy-mode = "rgmii-txid";
122 };
123 +
124 +&mmc1 {
125 + status = "okay";
126 + vmmc-supply = <&vmmc_reg>;
127 +};
128 diff --git a/arch/arm/boot/dts/am33xx.dtsi b/arch/arm/boot/dts/am33xx.dtsi
129 index 9ce85e5..0a82fca 100644
130 --- a/arch/arm/boot/dts/am33xx.dtsi
131 +++ b/arch/arm/boot/dts/am33xx.dtsi
132 @@ -240,6 +240,44 @@
133 status = "disabled";
134 };
135
136 + mmc1: mmc@48060000 {
137 + compatible = "ti,omap4-hsmmc";
138 + ti,hwmods = "mmc1";
139 + ti,dual-volt;
140 + ti,needs-special-reset;
141 + ti,needs-special-hs-handling;
142 + dmas = <&edma 24
143 + &edma 25>;
144 + dma-names = "tx", "rx";
145 + interrupts = <64>;
146 + interrupt-parent = <&intc>;
147 + reg = <0x48060000 0x1000>;
148 + status = "disabled";
149 + };
150 +
151 + mmc2: mmc@481d8000 {
152 + compatible = "ti,omap4-hsmmc";
153 + ti,hwmods = "mmc2";
154 + ti,needs-special-reset;
155 + dmas = <&edma 2
156 + &edma 3>;
157 + dma-names = "tx", "rx";
158 + interrupts = <28>;
159 + interrupt-parent = <&intc>;
160 + reg = <0x481d8000 0x1000>;
161 + status = "disabled";
162 + };
163 +
164 + mmc3: mmc@47810000 {
165 + compatible = "ti,omap4-hsmmc";
166 + ti,hwmods = "mmc3";
167 + ti,needs-special-reset;
168 + interrupts = <29>;
169 + interrupt-parent = <&intc>;
170 + reg = <0x47810000 0x1000>;
171 + status = "disabled";
172 + };
173 +
174 wdt2: wdt@44e35000 {
175 compatible = "ti,omap3-wdt";
176 ti,hwmods = "wd_timer2";