aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm
diff options
context:
space:
mode:
authorLee Jones <lee.jones@linaro.org>2012-03-15 12:46:17 -0400
committerArnd Bergmann <arnd@arndb.de>2012-03-16 15:46:13 -0400
commit7e0ce270b2ef3d0d00c3f0725f48aa3127d73edf (patch)
tree554deb8c395f901c217f948671822dce634aab77 /arch/arm
parent5d0769f063c87ff4a3d123e4e256f5b19c9e68bd (diff)
ARM: ux500: db8500: list most devices in the snowball device tree
This adds all devices that are normally present through the u8500_init_machine function in the device tree as well, which will duplicate the devices that are visible. This will not do much by itself because the device from the device tree are not matched by any device driver until they are converted as well. The next step is to move over one device at a time to actually be used from the device tree instead of the hardcoded device using auxdata to pass the correct platform_data. Acked-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Diffstat (limited to 'arch/arm')
-rw-r--r--arch/arm/boot/dts/db8500.dtsi228
-rw-r--r--arch/arm/boot/dts/snowball.dts102
-rw-r--r--arch/arm/mach-ux500/board-mop500.c14
3 files changed, 343 insertions, 1 deletions
diff --git a/arch/arm/boot/dts/db8500.dtsi b/arch/arm/boot/dts/db8500.dtsi
index 50c84b2e20e2..67423e4fe107 100644
--- a/arch/arm/boot/dts/db8500.dtsi
+++ b/arch/arm/boot/dts/db8500.dtsi
@@ -15,7 +15,233 @@
15 soc-u9500 { 15 soc-u9500 {
16 #address-cells = <1>; 16 #address-cells = <1>;
17 #size-cells = <1>; 17 #size-cells = <1>;
18 compatible = "simple-bus"; 18 compatible = "stericsson,db8500";
19 ranges; 19 ranges;
20
21 pmu {
22 compatible = "arm,cortex-a9-pmu";
23 interrupts = <0 7 0x4>;
24 };
25
26 rtc@80154000 {
27 compatible = "stericsson,db8500-rtc";
28 reg = <0x80154000 0x1000>;
29 interrupts = <0 18 0x4>;
30 };
31
32 gpio0: gpio@8012e000 {
33 compatible = "stericsson,db8500-gpio",
34 "stmicroelectronics,nomadik-gpio";
35 reg = <0x8012e000 0x80>;
36 interrupts = <0 119 0x4>;
37 supports-sleepmode;
38 gpio-controller;
39 };
40
41 gpio1: gpio@8012e080 {
42 compatible = "stericsson,db8500-gpio",
43 "stmicroelectronics,nomadik-gpio";
44 reg = <0x8012e080 0x80>;
45 interrupts = <0 120 0x4>;
46 supports-sleepmode;
47 gpio-controller;
48 };
49
50 gpio2: gpio@8000e000 {
51 compatible = "stericsson,db8500-gpio",
52 "stmicroelectronics,nomadik-gpio";
53 reg = <0x8000e000 0x80>;
54 interrupts = <0 121 0x4>;
55 supports-sleepmode;
56 gpio-controller;
57 };
58
59 gpio3: gpio@8000e080 {
60 compatible = "stericsson,db8500-gpio",
61 "stmicroelectronics,nomadik-gpio";
62 reg = <0x8000e080 0x80>;
63 interrupts = <0 122 0x4>;
64 supports-sleepmode;
65 gpio-controller;
66 };
67
68 gpio4: gpio@8000e100 {
69 compatible = "stericsson,db8500-gpio",
70 "stmicroelectronics,nomadik-gpio";
71 reg = <0x8000e100 0x80>;
72 interrupts = <0 123 0x4>;
73 supports-sleepmode;
74 gpio-controller;
75 };
76
77 gpio5: gpio@8000e180 {
78 compatible = "stericsson,db8500-gpio",
79 "stmicroelectronics,nomadik-gpio";
80 reg = <0x8000e180 0x80>;
81 interrupts = <0 124 0x4>;
82 supports-sleepmode;
83 gpio-controller;
84 };
85
86 gpio6: gpio@8011e000 {
87 compatible = "stericsson,db8500-gpio",
88 "stmicroelectronics,nomadik-gpio";
89 reg = <0x8011e000 0x80>;
90 interrupts = <0 125 0x4>;
91 supports-sleepmode;
92 gpio-controller;
93 };
94
95 gpio7: gpio@8011e080 {
96 compatible = "stericsson,db8500-gpio",
97 "stmicroelectronics,nomadik-gpio";
98 reg = <0x8011e080 0x80>;
99 interrupts = <0 126 0x4>;
100 supports-sleepmode;
101 gpio-controller;
102 };
103
104 gpio8: gpio@a03fe000 {
105 compatible = "stericsson,db8500-gpio",
106 "stmicroelectronics,nomadik-gpio";
107 reg = <0xa03fe000 0x80>;
108 interrupts = <0 127 0x4>;
109 supports-sleepmode;
110 gpio-controller;
111 };
112
113 usb@a03e0000 {
114 compatible = "stericsson,db8500-musb",
115 "mentor,musb";
116 reg = <0xa03e0000 0x10000>;
117 interrupts = <0 23 0x4>;
118 };
119
120 dma-controller@801C0000 {
121 compatible = "stericsson,db8500-dma40",
122 "stericsson,dma40";
123 reg = <0x801C0000 0x1000 0x40010000 0x800>;
124 interrupts = <0 25 0x4>;
125 };
126
127 prcmu@80157000 {
128 compatible = "stericsson,db8500-prcmu";
129 reg = <0x80157000 0x1000>;
130 interrupts = <46 47>;
131 #address-cells = <1>;
132 #size-cells = <0>;
133
134 ab8500@5 {
135 compatible = "stericsson,ab8500";
136 reg = <5>; /* mailbox 5 is i2c */
137 interrupts = <0 40 0x4>;
138 };
139 };
140
141 i2c@80004000 {
142 compatible = "stericsson,db8500-i2c", "stmicroelectronics,nomadik-i2c";
143 reg = <0x80004000 0x1000>;
144 interrupts = <0 21 0x4>;
145 #address-cells = <1>;
146 #size-cells = <0>;
147 };
148
149 i2c@80122000 {
150 compatible = "stericsson,db8500-i2c", "stmicroelectronics,nomadik-i2c";
151 reg = <0x80122000 0x1000>;
152 interrupts = <0 22 0x4>;
153 #address-cells = <1>;
154 #size-cells = <0>;
155 };
156
157 i2c@80128000 {
158 compatible = "stericsson,db8500-i2c", "stmicroelectronics,nomadik-i2c";
159 reg = <0x80128000 0x1000>;
160 interrupts = <0 55 0x4>;
161 #address-cells = <1>;
162 #size-cells = <0>;
163 };
164
165 i2c@80110000 {
166 compatible = "stericsson,db8500-i2c", "stmicroelectronics,nomadik-i2c";
167 reg = <0x80110000 0x1000>;
168 interrupts = <0 12 0x4>;
169 #address-cells = <1>;
170 #size-cells = <0>;
171 };
172
173 i2c@8012a000 {
174 compatible = "stericsson,db8500-i2c", "stmicroelectronics,nomadik-i2c";
175 reg = <0x8012a000 0x1000>;
176 interrupts = <0 51 0x4>;
177 #address-cells = <1>;
178 #size-cells = <0>;
179 };
180
181 ssp@80002000 {
182 compatible = "arm,pl022", "arm,primecell";
183 reg = <80002000 0x1000>;
184 interrupts = <0 14 0x4>;
185 #address-cells = <1>;
186 #size-cells = <0>;
187 status = "disabled";
188 cs-gpios = <&gpio0 31 &gpio4 14 &gpio4 16 &gpio6 22 &gpio7 0>;
189 };
190
191 uart@80120000 {
192 compatible = "arm,pl011", "arm,primecell";
193 reg = <0x80120000 0x1000>;
194 interrupts = <0 11 0x4>;
195 status = "disabled";
196 };
197 uart@80121000 {
198 compatible = "arm,pl011", "arm,primecell";
199 reg = <0x80121000 0x1000>;
200 interrupts = <0 19 0x4>;
201 status = "disabled";
202 };
203 uart@80007000 {
204 compatible = "arm,pl011", "arm,primecell";
205 reg = <0x80007000 0x1000>;
206 interrupts = <0 26 0x4>;
207 status = "disabled";
208 };
209
210 sdi@80126000 {
211 compatible = "arm,pl18x", "arm,primecell";
212 reg = <0x80126000 0x1000>;
213 interrupts = <0 60 0x4>;
214 status = "disabled";
215 };
216 sdi@80118000 {
217 compatible = "arm,pl18x", "arm,primecell";
218 reg = <0x80118000 0x1000>;
219 interrupts = <0 50 0x4>;
220 status = "disabled";
221 };
222 sdi@80005000 {
223 compatible = "arm,pl18x", "arm,primecell";
224 reg = <0x80005000 0x1000>;
225 interrupts = <0 41 0x4>;
226 status = "disabled";
227 };
228 sdi@80119000 {
229 compatible = "arm,pl18x", "arm,primecell";
230 reg = <0x80119000 0x1000>;
231 interrupts = <0 59 0x4>;
232 status = "disabled";
233 };
234 sdi@80114000 {
235 compatible = "arm,pl18x", "arm,primecell";
236 reg = <0x80114000 0x1000>;
237 interrupts = <0 99 0x4>;
238 status = "disabled";
239 };
240 sdi@80008000 {
241 compatible = "arm,pl18x", "arm,primecell";
242 reg = <0x80114000 0x1000>;
243 interrupts = <0 100 0x4>;
244 status = "disabled";
245 };
20 }; 246 };
21}; 247};
diff --git a/arch/arm/boot/dts/snowball.dts b/arch/arm/boot/dts/snowball.dts
index 0ea947023556..34bfd79fb073 100644
--- a/arch/arm/boot/dts/snowball.dts
+++ b/arch/arm/boot/dts/snowball.dts
@@ -20,6 +20,108 @@
20 reg = <0x00000000 0x20000000>; 20 reg = <0x00000000 0x20000000>;
21 }; 21 };
22 22
23 gpio_keys {
24 compatible = "gpio-keys";
25 #address-cells = <1>;
26 #size-cells = <0>;
27
28 button@1 {
29 debounce_interval = <50>;
30 wakeup = <1>;
31 linux,code = <2>;
32 label = "userpb";
33 gpios = <&gpio1 0>;
34 };
35 button@2 {
36 debounce_interval = <50>;
37 wakeup = <1>;
38 linux,code = <3>;
39 label = "userpb";
40 gpios = <&gpio4 23>;
41 };
42 button@3 {
43 debounce_interval = <50>;
44 wakeup = <1>;
45 linux,code = <4>;
46 label = "userpb";
47 gpios = <&gpio4 23>;
48 };
49 button@4 {
50 debounce_interval = <50>;
51 wakeup = <1>;
52 linux,code = <5>;
53 label = "userpb";
54 gpios = <&gpio5 1>;
55 };
56 button@5 {
57 debounce_interval = <50>;
58 wakeup = <1>;
59 linux,code = <6>;
60 label = "userpb";
61 gpios = <&gpio5 2>;
62 };
63 };
64
65 leds {
66 compatible = "gpio-leds";
67 used-led {
68 label = "user_led";
69 gpios = <&gpio4 14>;
70 };
71 };
72
23 soc-u9500 { 73 soc-u9500 {
74
75 external-bus@50000000 {
76 compatible = "simple-bus";
77 reg = <0x50000000 0x10000000>;
78 #address-cells = <1>;
79 #size-cells = <1>;
80 ranges;
81
82 ethernet@50000000 {
83 compatible = "smsc,9111";
84 reg = <0x50000000 0x10000>;
85 interrupts = <12>;
86 interrupt-parent = <&gpio4>;
87 };
88 };
89
90 sdi@80126000 {
91 status = "enabled";
92 cd-gpios = <&gpio6 26>;
93 };
94
95 sdi@80114000 {
96 status = "enabled";
97 };
98
99 i2c@80004000 {
100 tc3589x@42 {
101 //compatible = "tc3589x";
102 reg = <0x42>;
103 interrupts = <25>;
104 interrupt-parent = <&gpio6>;
105 };
106 tps61052@33 {
107 //compatible = "tps61052";
108 reg = <0x33>;
109 };
110 };
111
112 i2c@80128000 {
113 lp5521@0x33 {
114 // compatible = "lp5521";
115 reg = <0x33>;
116 };
117 lp5521@0x34 {
118 // compatible = "lp5521";
119 reg = <0x34>;
120 };
121 bh1780@0x29 {
122 // compatible = "rohm,bh1780gli";
123 reg = <0x33>;
124 };
125 };
24 }; 126 };
25}; 127};
diff --git a/arch/arm/mach-ux500/board-mop500.c b/arch/arm/mach-ux500/board-mop500.c
index e2932fcba75e..482b86ef757d 100644
--- a/arch/arm/mach-ux500/board-mop500.c
+++ b/arch/arm/mach-ux500/board-mop500.c
@@ -621,6 +621,7 @@ static void __init mop500_init_machine(void)
621 621
622 mop500_pins_init(); 622 mop500_pins_init();
623 623
624 /* FIXME: parent of ab8500 should be prcmu */
624 for (i = 0; i < ARRAY_SIZE(mop500_platform_devs); i++) 625 for (i = 0; i < ARRAY_SIZE(mop500_platform_devs); i++)
625 mop500_platform_devs[i]->dev.parent = parent; 626 mop500_platform_devs[i]->dev.parent = parent;
626 627
@@ -743,6 +744,17 @@ MACHINE_START(SNOWBALL, "Calao Systems Snowball platform")
743MACHINE_END 744MACHINE_END
744 745
745#ifdef CONFIG_MACH_UX500_DT 746#ifdef CONFIG_MACH_UX500_DT
747
748struct of_dev_auxdata u8500_auxdata_lookup[] __initdata = {
749 {},
750};
751
752static const struct of_device_id u8500_soc_node[] = {
753 /* only create devices below soc node */
754 { .compatible = "stericsson,db8500", },
755 { },
756};
757
746static void __init u8500_init_machine(void) 758static void __init u8500_init_machine(void)
747{ 759{
748 struct device *parent = NULL; 760 struct device *parent = NULL;
@@ -757,6 +769,8 @@ static void __init u8500_init_machine(void)
757 for (i = 0; i < ARRAY_SIZE(snowball_platform_devs); i++) 769 for (i = 0; i < ARRAY_SIZE(snowball_platform_devs); i++)
758 snowball_platform_devs[i]->dev.parent = parent; 770 snowball_platform_devs[i]->dev.parent = parent;
759 771
772 /* automatically probe child nodes of db8500 device */
773 of_platform_populate(NULL, u8500_soc_node, u8500_auxdata_lookup, parent);
760 774
761 if (of_machine_is_compatible("st-ericsson,mop500")) { 775 if (of_machine_is_compatible("st-ericsson,mop500")) {
762 mop500_gpio_keys[0].gpio = GPIO_PROX_SENSOR; 776 mop500_gpio_keys[0].gpio = GPIO_PROX_SENSOR;