ste-snowball.dts 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538
  1. /*
  2. * Copyright 2011 ST-Ericsson AB
  3. *
  4. * The code contained herein is licensed under the GNU General Public
  5. * License. You may obtain a copy of the GNU General Public License
  6. * Version 2 or later at the following locations:
  7. *
  8. * http://www.opensource.org/licenses/gpl-license.html
  9. * http://www.gnu.org/copyleft/gpl.html
  10. */
  11. /dts-v1/;
  12. #include "ste-dbx5x0.dtsi"
  13. #include "ste-href-ab8500.dtsi"
  14. #include "ste-href-family-pinctrl.dtsi"
  15. / {
  16. model = "Calao Systems Snowball platform with device tree";
  17. compatible = "calaosystems,snowball-a9500", "st-ericsson,u9500";
  18. memory {
  19. reg = <0x00000000 0x20000000>;
  20. };
  21. en_3v3_reg: en_3v3 {
  22. compatible = "regulator-fixed";
  23. regulator-name = "en-3v3-fixed-supply";
  24. regulator-min-microvolt = <3300000>;
  25. regulator-max-microvolt = <3300000>;
  26. /* AB8500 GPIOs start from 1 - offset 25 is GPIO26. */
  27. gpio = <&ab8500_gpio 25 0x4>;
  28. startup-delay-us = <5000>;
  29. enable-active-high;
  30. };
  31. gpio_keys {
  32. compatible = "gpio-keys";
  33. #address-cells = <1>;
  34. #size-cells = <0>;
  35. button@1 {
  36. debounce_interval = <50>;
  37. wakeup = <1>;
  38. linux,code = <2>;
  39. label = "userpb";
  40. gpios = <&gpio1 0 0x4>;
  41. };
  42. button@2 {
  43. debounce_interval = <50>;
  44. wakeup = <1>;
  45. linux,code = <3>;
  46. label = "extkb1";
  47. gpios = <&gpio4 23 0x4>;
  48. };
  49. button@3 {
  50. debounce_interval = <50>;
  51. wakeup = <1>;
  52. linux,code = <4>;
  53. label = "extkb2";
  54. gpios = <&gpio4 24 0x4>;
  55. };
  56. button@4 {
  57. debounce_interval = <50>;
  58. wakeup = <1>;
  59. linux,code = <5>;
  60. label = "extkb3";
  61. gpios = <&gpio5 1 0x4>;
  62. };
  63. button@5 {
  64. debounce_interval = <50>;
  65. wakeup = <1>;
  66. linux,code = <6>;
  67. label = "extkb4";
  68. gpios = <&gpio5 2 0x4>;
  69. };
  70. };
  71. leds {
  72. compatible = "gpio-leds";
  73. pinctrl-names = "default";
  74. pinctrl-0 = <&gpioled_snowball_mode>;
  75. used-led {
  76. label = "user_led";
  77. gpios = <&gpio4 14 0x4>;
  78. default-state = "on";
  79. linux,default-trigger = "heartbeat";
  80. };
  81. };
  82. soc {
  83. usb_per5@a03e0000 {
  84. pinctrl-names = "default", "sleep";
  85. pinctrl-0 = <&musb_default_mode>;
  86. pinctrl-1 = <&musb_sleep_mode>;
  87. };
  88. sound {
  89. compatible = "stericsson,snd-soc-mop500";
  90. stericsson,cpu-dai = <&msp1 &msp3>;
  91. stericsson,audio-codec = <&codec>;
  92. };
  93. msp0: msp@80123000 {
  94. pinctrl-names = "default";
  95. pinctrl-0 = <&msp0_default_mode>;
  96. status = "okay";
  97. };
  98. msp1: msp@80124000 {
  99. pinctrl-names = "default";
  100. pinctrl-0 = <&msp1_default_mode>;
  101. status = "okay";
  102. };
  103. msp2: msp@80117000 {
  104. pinctrl-names = "default";
  105. pinctrl-0 = <&msp2_default_mode>;
  106. };
  107. msp3: msp@80125000 {
  108. status = "okay";
  109. };
  110. external-bus@50000000 {
  111. status = "okay";
  112. ethernet@0 {
  113. compatible = "smsc,lan9115";
  114. reg = <0 0x10000>;
  115. interrupts = <12 IRQ_TYPE_EDGE_RISING>;
  116. interrupt-parent = <&gpio4>;
  117. vdd33a-supply = <&en_3v3_reg>;
  118. vddvario-supply = <&db8500_vape_reg>;
  119. pinctrl-names = "default";
  120. pinctrl-0 = <&eth_snowball_mode>;
  121. reg-shift = <1>;
  122. reg-io-width = <2>;
  123. smsc,force-internal-phy;
  124. smsc,irq-active-high;
  125. smsc,irq-push-pull;
  126. clocks = <&prcc_pclk 3 0>;
  127. };
  128. };
  129. vmmci: regulator-gpio {
  130. compatible = "regulator-gpio";
  131. gpios = <&gpio7 4 0x4>;
  132. enable-gpio = <&gpio6 25 0x4>;
  133. regulator-min-microvolt = <1800000>;
  134. regulator-max-microvolt = <2900000>;
  135. regulator-name = "mmci-reg";
  136. regulator-type = "voltage";
  137. startup-delay-us = <100>;
  138. enable-active-high;
  139. states = <1800000 0x1
  140. 2900000 0x0>;
  141. };
  142. // External Micro SD slot
  143. sdi0_per1@80126000 {
  144. arm,primecell-periphid = <0x10480180>;
  145. max-frequency = <100000000>;
  146. bus-width = <4>;
  147. cap-mmc-highspeed;
  148. vmmc-supply = <&ab8500_ldo_aux3_reg>;
  149. vqmmc-supply = <&vmmci>;
  150. pinctrl-names = "default", "sleep";
  151. pinctrl-0 = <&sdi0_default_mode>;
  152. pinctrl-1 = <&sdi0_sleep_mode>;
  153. cd-gpios = <&gpio6 26 0x4>; // 218
  154. cd-inverted;
  155. status = "okay";
  156. };
  157. // WLAN SDIO channel
  158. sdi1_per2@80118000 {
  159. arm,primecell-periphid = <0x10480180>;
  160. max-frequency = <100000000>;
  161. bus-width = <4>;
  162. pinctrl-names = "default", "sleep";
  163. pinctrl-0 = <&sdi1_default_mode>;
  164. pinctrl-1 = <&sdi1_sleep_mode>;
  165. status = "okay";
  166. };
  167. // Unused PoP eMMC - register and put it to sleep by default */
  168. sdi2_per3@80005000 {
  169. arm,primecell-periphid = <0x10480180>;
  170. pinctrl-names = "default";
  171. pinctrl-0 = <&sdi2_sleep_mode>;
  172. status = "okay";
  173. };
  174. // On-board eMMC
  175. sdi4_per2@80114000 {
  176. arm,primecell-periphid = <0x10480180>;
  177. max-frequency = <100000000>;
  178. bus-width = <8>;
  179. cap-mmc-highspeed;
  180. vmmc-supply = <&ab8500_ldo_aux2_reg>;
  181. pinctrl-names = "default", "sleep";
  182. pinctrl-0 = <&sdi4_default_mode>;
  183. pinctrl-1 = <&sdi4_sleep_mode>;
  184. status = "okay";
  185. };
  186. uart@80120000 {
  187. pinctrl-names = "default", "sleep";
  188. pinctrl-0 = <&uart0_default_mode>;
  189. pinctrl-1 = <&uart0_sleep_mode>;
  190. status = "okay";
  191. };
  192. uart@80121000 {
  193. pinctrl-names = "default", "sleep";
  194. pinctrl-0 = <&uart1_default_mode>;
  195. pinctrl-1 = <&uart1_sleep_mode>;
  196. status = "okay";
  197. };
  198. uart@80007000 {
  199. pinctrl-names = "default", "sleep";
  200. pinctrl-0 = <&uart2_default_mode>;
  201. pinctrl-1 = <&uart2_sleep_mode>;
  202. status = "okay";
  203. };
  204. i2c@80004000 {
  205. pinctrl-names = "default","sleep";
  206. pinctrl-0 = <&i2c0_default_mode>;
  207. pinctrl-1 = <&i2c0_sleep_mode>;
  208. };
  209. i2c@80122000 {
  210. pinctrl-names = "default","sleep";
  211. pinctrl-0 = <&i2c1_default_mode>;
  212. pinctrl-1 = <&i2c1_sleep_mode>;
  213. };
  214. i2c@80128000 {
  215. pinctrl-names = "default","sleep";
  216. pinctrl-0 = <&i2c2_default_mode>;
  217. pinctrl-1 = <&i2c2_sleep_mode>;
  218. lsm303dlh@18 {
  219. /* Accelerometer */
  220. compatible = "st,lsm303dlh-accel";
  221. st,drdy-int-pin = <1>;
  222. reg = <0x18>;
  223. vdd-supply = <&ab8500_ldo_aux1_reg>;
  224. vddio-supply = <&db8500_vsmps2_reg>;
  225. pinctrl-names = "default";
  226. pinctrl-0 = <&accel_snowball_mode>;
  227. };
  228. lsm303dlm@1e {
  229. /* Magnetometer */
  230. compatible = "st,lsm303dlm-magn";
  231. reg = <0x1e>;
  232. vdd-supply = <&ab8500_ldo_aux1_reg>;
  233. vddio-supply = <&db8500_vsmps2_reg>;
  234. pinctrl-names = "default";
  235. pinctrl-0 = <&magneto_snowball_mode>;
  236. };
  237. l3g4200d@68 {
  238. /* Gyroscope */
  239. compatible = "st,l3g4200d-gyro";
  240. st,drdy-int-pin = <2>;
  241. reg = <0x68>;
  242. vdd-supply = <&ab8500_ldo_aux1_reg>;
  243. vddio-supply = <&db8500_vsmps2_reg>;
  244. };
  245. lsp001wm@5c {
  246. /* Barometer/pressure sensor */
  247. compatible = "st,lps001wp-press";
  248. reg = <0x5c>;
  249. vdd-supply = <&ab8500_ldo_aux1_reg>;
  250. vddio-supply = <&db8500_vsmps2_reg>;
  251. };
  252. };
  253. i2c@80110000 {
  254. pinctrl-names = "default","sleep";
  255. pinctrl-0 = <&i2c3_default_mode>;
  256. pinctrl-1 = <&i2c3_sleep_mode>;
  257. };
  258. ssp@80002000 {
  259. pinctrl-names = "default";
  260. pinctrl-0 = <&ssp0_snowball_mode>;
  261. };
  262. cpufreq-cooling {
  263. status = "okay";
  264. };
  265. prcmu@80157000 {
  266. cpufreq {
  267. status = "okay";
  268. };
  269. thermal@801573c0 {
  270. num-trips = <4>;
  271. trip0-temp = <70000>;
  272. trip0-type = "active";
  273. trip0-cdev-num = <1>;
  274. trip0-cdev-name0 = "thermal-cpufreq-0";
  275. trip1-temp = <75000>;
  276. trip1-type = "active";
  277. trip1-cdev-num = <1>;
  278. trip1-cdev-name0 = "thermal-cpufreq-0";
  279. trip2-temp = <80000>;
  280. trip2-type = "active";
  281. trip2-cdev-num = <1>;
  282. trip2-cdev-name0 = "thermal-cpufreq-0";
  283. trip3-temp = <85000>;
  284. trip3-type = "critical";
  285. trip3-cdev-num = <0>;
  286. status = "okay";
  287. };
  288. ab8500 {
  289. ab8500-gpio {
  290. compatible = "stericsson,ab8500-gpio";
  291. };
  292. ext_regulators: ab8500-ext-regulators {
  293. ab8500_ext1_reg: ab8500_ext1 {
  294. regulator-name = "ab8500-ext-supply1";
  295. };
  296. ab8500_ext2_reg_reg: ab8500_ext2 {
  297. regulator-name = "ab8500-ext-supply2";
  298. };
  299. ab8500_ext3_reg_reg: ab8500_ext3 {
  300. regulator-name = "ab8500-ext-supply3";
  301. };
  302. };
  303. ab8500-regulators {
  304. ab8500_ldo_aux1_reg: ab8500_ldo_aux1 {
  305. regulator-name = "V-DISPLAY";
  306. };
  307. ab8500_ldo_aux2_reg: ab8500_ldo_aux2 {
  308. regulator-name = "V-eMMC1";
  309. };
  310. ab8500_ldo_aux3_reg: ab8500_ldo_aux3 {
  311. regulator-name = "V-MMC-SD";
  312. };
  313. ab8500_ldo_intcore_reg: ab8500_ldo_intcore {
  314. regulator-name = "V-INTCORE";
  315. };
  316. ab8500_ldo_tvout_reg: ab8500_ldo_tvout {
  317. regulator-name = "V-TVOUT";
  318. };
  319. ab8500_ldo_usb_reg: ab8500_ldo_usb {
  320. regulator-name = "dummy";
  321. };
  322. ab8500_ldo_audio_reg: ab8500_ldo_audio {
  323. regulator-name = "V-AUD";
  324. };
  325. ab8500_ldo_anamic1_reg: ab8500_ldo_anamic1 {
  326. regulator-name = "V-AMIC1";
  327. };
  328. ab8500_ldo_anamic2_reg: ab8500_ldo_anamic2 {
  329. regulator-name = "V-AMIC2";
  330. };
  331. ab8500_ldo_dmic_reg: ab8500_ldo_dmic {
  332. regulator-name = "V-DMIC";
  333. };
  334. ab8500_ldo_ana_reg: ab8500_ldo_ana {
  335. regulator-name = "V-CSI/DSI";
  336. };
  337. };
  338. };
  339. };
  340. pinctrl {
  341. /*
  342. * Set this up using hogs, as time goes by and as seems fit, these
  343. * can be moved over to being controlled by respective device.
  344. */
  345. pinctrl-names = "default";
  346. pinctrl-0 = <&gbf_snowball_mode>,
  347. <&wlan_snowball_mode>;
  348. ethernet {
  349. /*
  350. * Mux in "SM" which is used for the
  351. * SMSC911x Ethernet adapter
  352. */
  353. eth_snowball_mode: eth_snowball {
  354. snowball_mux {
  355. ste,function = "sm";
  356. ste,pins = "sm_b_1";
  357. };
  358. /* LAN IRQ pin */
  359. snowball_cfg1 {
  360. ste,pins = "GPIO140_B11";
  361. ste,config = <&in_nopull>;
  362. };
  363. /* LAN reset pin */
  364. snowball_cfg2 {
  365. ste,pins = "GPIO141_C12";
  366. ste,config = <&gpio_out_hi>;
  367. };
  368. };
  369. };
  370. sdi0 {
  371. sdi0_default_mode: sdi0_default {
  372. snowball_mux {
  373. ste,function = "mc0";
  374. ste,pins = "mc0dat31dir_a_1";
  375. };
  376. snowball_cfg1 {
  377. ste,pins = "GPIO21_AB3"; /* DAT31DIR */
  378. ste,config = <&out_hi>;
  379. };
  380. };
  381. };
  382. ssp0 {
  383. ssp0_snowball_mode: ssp0_snowball_default {
  384. snowball_mux {
  385. ste,function = "ssp0";
  386. ste,pins = "ssp0_a_1";
  387. };
  388. snowball_cfg1 {
  389. ste,pins = "GPIO144_B13"; /* FRM */
  390. ste,config = <&gpio_out_hi>;
  391. };
  392. snowball_cfg2 {
  393. ste,pins = "GPIO145_C13"; /* RXD */
  394. ste,config = <&in_pd>;
  395. };
  396. snowball_cfg3 {
  397. ste,pins =
  398. "GPIO146_D13", /* TXD */
  399. "GPIO143_D12"; /* CLK */
  400. ste,config = <&out_lo>;
  401. };
  402. };
  403. };
  404. gpio_led {
  405. gpioled_snowball_mode: gpioled_default {
  406. snowball_cfg1 {
  407. ste,pins = "GPIO142_C11";
  408. ste,config = <&gpio_out_hi>;
  409. };
  410. };
  411. };
  412. accelerometer {
  413. accel_snowball_mode: accel_snowball {
  414. /* Accelerometer lines */
  415. snowball_cfg1 {
  416. ste,pins =
  417. "GPIO163_C20", /* ACCEL_IRQ1 */
  418. "GPIO164_B21"; /* ACCEL_IRQ2 */
  419. ste,config = <&gpio_in_pu>;
  420. };
  421. };
  422. };
  423. magnetometer {
  424. magneto_snowball_mode: magneto_snowball {
  425. snowball_cfg1 {
  426. ste,pins = "GPIO165_C21"; /* MAG_DRDY */
  427. ste,config = <&gpio_in_pu>;
  428. };
  429. };
  430. };
  431. gbf {
  432. gbf_snowball_mode: gbf_snowball {
  433. /*
  434. * GBF (GPS, Bluetooth, FM-radio) interface,
  435. * pull low to reset state
  436. */
  437. snowball_cfg1 {
  438. ste,pins = "GPIO171_D23"; /* GBF_ENA_RESET */
  439. ste,config = <&gpio_out_lo>;
  440. };
  441. };
  442. };
  443. wlan {
  444. wlan_snowball_mode: wlan_snowball {
  445. /*
  446. * Activate this mode with the WLAN chip.
  447. * These are plain GPIO pins used by WLAN
  448. */
  449. snowball_cfg1 {
  450. ste,pins =
  451. "GPIO161_D21", /* WLAN_PMU_EN */
  452. "GPIO215_AH13"; /* WLAN_ENA */
  453. ste,config = <&gpio_out_lo>;
  454. };
  455. snowball_cfg2 {
  456. ste,pins = "GPIO216_AG12"; /* WLAN_IRQ */
  457. ste,config = <&gpio_in_pu>;
  458. };
  459. };
  460. };
  461. };
  462. mcde@a0350000 {
  463. pinctrl-names = "default", "sleep";
  464. pinctrl-0 = <&lcd_default_mode>;
  465. pinctrl-1 = <&lcd_sleep_mode>;
  466. };
  467. };
  468. };