ste-ux500-samsung-janice.dts 26 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994
  1. // SPDX-License-Identifier: GPL-2.0-only
  2. /*
  3. * Devicetree for the Samsung Galaxy S Advance GT-I9070 also known as Janice.
  4. */
  5. /dts-v1/;
  6. #include "ste-db8500.dtsi"
  7. #include "ste-ab8500.dtsi"
  8. #include "ste-dbx5x0-pinctrl.dtsi"
  9. #include <dt-bindings/gpio/gpio.h>
  10. #include <dt-bindings/leds/common.h>
  11. #include <dt-bindings/input/input.h>
  12. #include <dt-bindings/interrupt-controller/irq.h>
  13. / {
  14. model = "Samsung Galaxy S Advance (GT-I9070)";
  15. compatible = "samsung,janice", "st-ericsson,u8500";
  16. chosen {
  17. stdout-path = &serial2;
  18. };
  19. battery: battery {
  20. compatible = "samsung,eb535151vu";
  21. };
  22. thermal-zones {
  23. battery-thermal {
  24. /* This zone will be polled by the battery temperature code */
  25. polling-delay = <0>;
  26. polling-delay-passive = <0>;
  27. thermal-sensors = <&bat_therm>;
  28. trips {
  29. battery-crit-hi {
  30. temperature = <70000>;
  31. hysteresis = <2000>;
  32. type = "critical";
  33. };
  34. };
  35. };
  36. };
  37. bat_therm: thermistor {
  38. compatible = "samsung,1404-001221";
  39. io-channels = <&gpadc 0x02>; /* BatTemp */
  40. pullup-uv = <1800000>;
  41. pullup-ohm = <230000>;
  42. pulldown-ohm = <0>;
  43. #thermal-sensor-cells = <0>;
  44. };
  45. /* External LDO for eMMC LDO VMEM_3V3 controlled by GPIO6 */
  46. ldo_3v3_reg: regulator-gpio-ldo-3v3 {
  47. compatible = "regulator-fixed";
  48. /* Supplied in turn by VBAT */
  49. regulator-name = "VMEM_3V3";
  50. regulator-min-microvolt = <3300000>;
  51. regulator-max-microvolt = <3300000>;
  52. gpio = <&gpio0 6 GPIO_ACTIVE_HIGH>;
  53. startup-delay-us = <5000>; // FIXME
  54. enable-active-high;
  55. pinctrl-names = "default";
  56. pinctrl-0 = <&emmc_ldo_en_default_mode>;
  57. };
  58. /*
  59. * External Ricoh "TSP" regulator for the touchscreen.
  60. * One GPIO line controls two voltages of 3.3V and 1.8V
  61. * this line is known as "TSP_LDO_ON1" in the schematics.
  62. */
  63. ldo_tsp_3v3_reg: regulator-gpio-tsp-ldo-3v3 {
  64. compatible = "regulator-fixed";
  65. /* Supplied in turn by VBAT */
  66. regulator-name = "LDO_TSP_A3V3";
  67. regulator-min-microvolt = <3300000>;
  68. regulator-max-microvolt = <3300000>;
  69. /* GPIO94 controls this regulator */
  70. gpio = <&gpio2 30 GPIO_ACTIVE_HIGH>;
  71. /* 70 ms power-on delay */
  72. startup-delay-us = <70000>;
  73. enable-active-high;
  74. pinctrl-names = "default";
  75. pinctrl-0 = <&tsp_ldo_en_default_mode>;
  76. };
  77. ldo_tsp_1v8_reg: regulator-gpio-tsp-ldo-1v8 {
  78. compatible = "regulator-fixed";
  79. /* Supplied in turn by VBAT */
  80. regulator-name = "VREG_TSP_1V8";
  81. regulator-min-microvolt = <1800000>;
  82. regulator-max-microvolt = <1800000>;
  83. /* GPIO94 controls this regulator */
  84. gpio = <&gpio2 30 GPIO_ACTIVE_HIGH>;
  85. /* 70 ms power-on delay */
  86. startup-delay-us = <70000>;
  87. enable-active-high;
  88. pinctrl-names = "default";
  89. pinctrl-0 = <&tsp_ldo_en_default_mode>;
  90. };
  91. /*
  92. * External Ricoh "TSP" regulator for the touchkeys.
  93. * Two GPIO lines controls two voltages of 3.3V and 1.8V
  94. * TSP_LDO_ON2 controls VREG_TOUCHKEY_1V8
  95. * EN_LED_LDO controls VREG_KLED_3V3 (key LED)
  96. */
  97. ldo_kled_3v3_reg: regulator-gpio-vreg-kled-3v3 {
  98. compatible = "regulator-fixed";
  99. /* Supplied in turn by VBAT */
  100. regulator-name = "VREG_KLED_3V3";
  101. regulator-min-microvolt = <3300000>;
  102. regulator-max-microvolt = <3300000>;
  103. /* GPIO68 controls this regulator */
  104. gpio = <&gpio2 4 GPIO_ACTIVE_HIGH>;
  105. /* 70 ms power-on delay */
  106. startup-delay-us = <70000>;
  107. enable-active-high;
  108. pinctrl-names = "default";
  109. pinctrl-0 = <&en_led_ldo_default_mode>;
  110. };
  111. ldo_touchkey_1v8_reg: regulator-gpio-vreg-touchkey-1v8 {
  112. compatible = "regulator-fixed";
  113. /* Supplied in turn by VBAT */
  114. regulator-name = "VREG_TOUCHKEY_1V8";
  115. regulator-min-microvolt = <1800000>;
  116. regulator-max-microvolt = <1800000>;
  117. /* GPIO89 controls this regulator */
  118. gpio = <&gpio2 25 GPIO_ACTIVE_HIGH>;
  119. /* 70 ms power-on delay */
  120. startup-delay-us = <70000>;
  121. enable-active-high;
  122. pinctrl-names = "default";
  123. pinctrl-0 = <&tsp_ldo_on2_default_mode>;
  124. };
  125. /*
  126. * External Ricoh RP152L010B-TR LCD LDO regulator for the display.
  127. * LCD_PWR_EN controls a 3.0V and 1.8V output.
  128. */
  129. lcd_3v0_reg: regulator-gpio-lcd-3v0 {
  130. compatible = "regulator-fixed";
  131. /* Supplied in turn by VBAT */
  132. regulator-name = "VREG_LCD_3V0";
  133. regulator-min-microvolt = <3000000>;
  134. regulator-max-microvolt = <3000000>;
  135. /* GPIO219 controls this regulator */
  136. gpio = <&gpio6 27 GPIO_ACTIVE_HIGH>;
  137. enable-active-high;
  138. pinctrl-names = "default";
  139. pinctrl-0 = <&lcd_pwr_en_default_mode>;
  140. };
  141. lcd_1v8_reg: regulator-gpio-lcd-1v8 {
  142. compatible = "regulator-fixed";
  143. /* Supplied in turn by VBAT */
  144. regulator-name = "VREG_LCD_1V8";
  145. regulator-min-microvolt = <1800000>;
  146. regulator-max-microvolt = <1800000>;
  147. /* GPIO219 controls this regulator */
  148. gpio = <&gpio6 27 GPIO_ACTIVE_HIGH>;
  149. enable-active-high;
  150. pinctrl-names = "default";
  151. pinctrl-0 = <&lcd_pwr_en_default_mode>;
  152. };
  153. /*
  154. * This regulator is a GPIO line that drives the Broadcom WLAN
  155. * line WL_REG_ON high and enables the internal regulators
  156. * inside the chip. Unfortunatley it is erroneously named
  157. * WLAN_RST_N on the schematic but it is not a reset line.
  158. *
  159. * The voltage specified here is only used to determine the OCR mask,
  160. * the for the SDIO connector, the chip is actually connected
  161. * directly to VBAT.
  162. */
  163. wl_reg: regulator-gpio-wlan {
  164. compatible = "regulator-fixed";
  165. regulator-name = "WL_REG_ON";
  166. regulator-min-microvolt = <3000000>;
  167. regulator-max-microvolt = <3000000>;
  168. startup-delay-us = <100000>;
  169. /* GPIO215 (WLAN_RST_N to WL_REG_ON) */
  170. gpio = <&gpio6 23 GPIO_ACTIVE_HIGH>;
  171. enable-active-high;
  172. pinctrl-names = "default";
  173. pinctrl-0 = <&wlan_ldo_en_default>;
  174. };
  175. gpio-keys {
  176. compatible = "gpio-keys";
  177. pinctrl-names = "default";
  178. pinctrl-0 = <&gpio_keys_default_mode>;
  179. button-home {
  180. linux,code = <KEY_HOME>;
  181. label = "HOME";
  182. /* GPIO91 */
  183. gpios = <&gpio2 27 GPIO_ACTIVE_LOW>;
  184. };
  185. button-volup {
  186. linux,code = <KEY_VOLUMEUP>;
  187. label = "VOL+";
  188. /* GPIO67 */
  189. gpios = <&gpio2 3 GPIO_ACTIVE_LOW>;
  190. };
  191. button-voldown {
  192. linux,code = <KEY_VOLUMEDOWN>;
  193. label = "VOL-";
  194. /* GPIO92 */
  195. gpios = <&gpio2 28 GPIO_ACTIVE_LOW>;
  196. };
  197. };
  198. /* Richtek RT8515GQW Flash LED Driver IC */
  199. flash {
  200. compatible = "richtek,rt8515";
  201. /* GPIO 140 */
  202. enf-gpios = <&gpio4 12 GPIO_ACTIVE_HIGH>;
  203. /* GPIO 141 */
  204. ent-gpios = <&gpio4 13 GPIO_ACTIVE_HIGH>;
  205. /*
  206. * RFS is 16 kOhm and RTS is 100 kOhm giving
  207. * the flash max current 343mA and torch max
  208. * current 55 mA.
  209. */
  210. richtek,rfs-ohms = <16000>;
  211. richtek,rts-ohms = <100000>;
  212. pinctrl-names = "default";
  213. pinctrl-0 = <&gpio_flash_default_mode>;
  214. led {
  215. function = LED_FUNCTION_FLASH;
  216. color = <LED_COLOR_ID_WHITE>;
  217. flash-max-timeout-us = <250000>;
  218. flash-max-microamp = <343750>;
  219. led-max-microamp = <55000>;
  220. };
  221. };
  222. /* Bit-banged I2C on GPIO143 and GPIO144 also called "SUBPMU I2C" */
  223. i2c-gpio-0 {
  224. compatible = "i2c-gpio";
  225. sda-gpios = <&gpio4 16 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>;
  226. scl-gpios = <&gpio4 15 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>;
  227. pinctrl-names = "default";
  228. pinctrl-0 = <&i2c_gpio_0_default>;
  229. #address-cells = <1>;
  230. #size-cells = <0>;
  231. /* Yamaha YAS530 magnetometer */
  232. magnetometer@2e {
  233. compatible = "yamaha,yas530";
  234. reg = <0x2e>;
  235. /* VDD 3V */
  236. vdd-supply = <&ab8500_ldo_aux1_reg>;
  237. /* IOVDD 1.8V */
  238. iovdd-supply = <&ab8500_ldo_aux2_reg>;
  239. /* GPIO204 COMPASS_RST_N */
  240. reset-gpios = <&gpio6 12 GPIO_ACTIVE_LOW>;
  241. pinctrl-names = "default";
  242. pinctrl-0 = <&yas529_default>;
  243. };
  244. /* TODO: this should also be used by the NCP6914 Camera power management unit */
  245. };
  246. /*
  247. * These pins do have an spi controller, however the controller on
  248. * these pins is not the fully featured PL022 SSP/SPI block but the
  249. * ST Micro diet "PL023" version. One of the lacking features in
  250. * this derivative is 3wire support, so it cannot be used to drive
  251. * this panel interface. We have to use GPIO bit-banging instead.
  252. */
  253. spi-gpio-0 {
  254. compatible = "spi-gpio";
  255. /* Clock on GPIO220 */
  256. sck-gpios = <&gpio6 28 GPIO_ACTIVE_HIGH>;
  257. /* MISO/MOSI on GPIO224 (no separate MISO pin) */
  258. mosi-gpios = <&gpio7 0 GPIO_ACTIVE_HIGH>;
  259. /* Chip select on GPIO223 */
  260. cs-gpios = <&gpio6 31 GPIO_ACTIVE_LOW>;
  261. num-chipselects = <1>;
  262. pinctrl-names = "default";
  263. pinctrl-0 = <&spi_gpio_0_default>;
  264. #address-cells = <1>;
  265. #size-cells = <0>;
  266. panel@0 {
  267. compatible = "samsung,s6e63m0";
  268. reg = <0>;
  269. vdd3-supply = <&lcd_3v0_reg>;
  270. vci-supply = <&lcd_1v8_reg>;
  271. /* Reset on GPIO139 */
  272. reset-gpios = <&gpio4 11 GPIO_ACTIVE_LOW>;
  273. pinctrl-names = "default";
  274. pinctrl-0 = <&panel_default_mode>;
  275. spi-3wire;
  276. /* TYPE 3: inverse clock polarity and phase */
  277. spi-cpha;
  278. spi-cpol;
  279. port {
  280. panel_in: endpoint {
  281. remote-endpoint = <&display_out>;
  282. };
  283. };
  284. };
  285. };
  286. /*
  287. * Current sense amplifier on the light sensor to convert current to
  288. * voltage. We do not know if this is the actual configuration. The
  289. * sense resistor value was found by calibrating in a room ambient
  290. * light with a second mobile phone light sensor as reference. If you
  291. * pry a Janice phone apart and inspect it you may figure this out.
  292. */
  293. gp2a_shunt: current-sense-shunt {
  294. compatible = "current-sense-shunt";
  295. io-channels = <&gpadc 0x07>;
  296. shunt-resistor-micro-ohms = <15000000>; /* 15 ohms c:a */
  297. #io-channel-cells = <0>;
  298. io-channel-ranges;
  299. };
  300. /* Bit-banged I2C on GPIO196 and GPIO197 also called "TOUCHKEY_I2C" */
  301. i2c-gpio-1 {
  302. compatible = "i2c-gpio";
  303. sda-gpios = <&gpio6 5 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>;
  304. scl-gpios = <&gpio6 4 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>;
  305. clock-frequency = <400000>;
  306. pinctrl-names = "default";
  307. pinctrl-0 = <&i2c_gpio_1_default>;
  308. #address-cells = <1>;
  309. #size-cells = <0>;
  310. touchkey@20 {
  311. compatible = "coreriver,tc360-touchkey";
  312. reg = <0x20>;
  313. vdd-supply = <&ldo_kled_3v3_reg>;
  314. vcc-supply = <&ldo_touchkey_1v8_reg>;
  315. vddio-supply = <&ldo_touchkey_1v8_reg>;
  316. /* Interrupt on GPIO 198 */
  317. interrupt-parent = <&gpio6>;
  318. interrupts = <6 IRQ_TYPE_EDGE_RISING>;
  319. pinctrl-names = "default";
  320. pinctrl-0 = <&touchkey_default_mode>;
  321. linux,keycodes = <KEY_MENU KEY_BACK>;
  322. };
  323. };
  324. /* Bit-banged I2C on GPIO201 and GPIO202 also called "MOT_I2C" */
  325. i2c-gpio-2 {
  326. compatible = "i2c-gpio";
  327. sda-gpios = <&gpio6 10 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>;
  328. scl-gpios = <&gpio6 9 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>;
  329. pinctrl-names = "default";
  330. pinctrl-0 = <&i2c_gpio_2_default>;
  331. #address-cells = <1>;
  332. #size-cells = <0>;
  333. /* TODO: add the Immersion ISA1200 I2C device here */
  334. };
  335. /* Bit-banged I2C on GPIO151 and GPIO152 also called "NFC_I2C" */
  336. i2c-gpio-3 {
  337. compatible = "i2c-gpio";
  338. sda-gpios = <&gpio4 24 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>;
  339. scl-gpios = <&gpio4 23 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>;
  340. pinctrl-names = "default";
  341. pinctrl-0 = <&i2c_gpio_3_default>;
  342. #address-cells = <1>;
  343. #size-cells = <0>;
  344. nfc@30 {
  345. compatible = "nxp,pn547", "nxp,nxp-nci-i2c";
  346. reg = <0x30>;
  347. /* NFC IRQ on GPIO32 */
  348. interrupt-parent = <&gpio1>;
  349. interrupts = <0 IRQ_TYPE_EDGE_FALLING>;
  350. /* GPIO 31 */
  351. firmware-gpios = <&gpio0 31 GPIO_ACTIVE_HIGH>;
  352. /* GPIO88 */
  353. enable-gpios = <&gpio2 24 GPIO_ACTIVE_HIGH>;
  354. pinctrl-names = "default";
  355. pinctrl-0 = <&pn547_janice_default>;
  356. };
  357. };
  358. soc {
  359. /* External Micro SD slot */
  360. mmc@80126000 {
  361. arm,primecell-periphid = <0x10480180>;
  362. max-frequency = <50000000>;
  363. bus-width = <4>;
  364. cap-sd-highspeed;
  365. cap-mmc-highspeed;
  366. st,sig-dir-cmd;
  367. st,sig-dir-dat0;
  368. st,sig-dir-dat2;
  369. st,sig-pin-fbclk;
  370. full-pwr-cycle;
  371. /* MMC is powered by AUX3 1.2V .. 2.91V */
  372. vmmc-supply = <&ab8500_ldo_aux3_reg>;
  373. /* 2.9 V level translator is using AUX3 at 2.9 V as well */
  374. vqmmc-supply = <&ab8500_ldo_aux3_reg>;
  375. pinctrl-names = "default", "sleep";
  376. pinctrl-0 = <&mc0_a_2_default>;
  377. pinctrl-1 = <&mc0_a_2_sleep>;
  378. cd-gpios = <&gpio6 25 GPIO_ACTIVE_LOW>; // GPIO217
  379. status = "okay";
  380. };
  381. /* WLAN SDIO channel */
  382. mmc@80118000 {
  383. arm,primecell-periphid = <0x10480180>;
  384. max-frequency = <50000000>;
  385. bus-width = <4>;
  386. non-removable;
  387. cap-sd-highspeed;
  388. pinctrl-names = "default", "sleep";
  389. pinctrl-0 = <&mc1_a_2_default>;
  390. pinctrl-1 = <&mc1_a_2_sleep>;
  391. /*
  392. * GPIO-controlled voltage enablement: this drives
  393. * the WL_REG_ON line high when we use this device.
  394. * Represented as regulator to fill OCR mask.
  395. */
  396. vmmc-supply = <&wl_reg>;
  397. #address-cells = <1>;
  398. #size-cells = <0>;
  399. status = "okay";
  400. wifi@1 {
  401. compatible = "brcm,bcm4330-fmac", "brcm,bcm4329-fmac";
  402. reg = <1>;
  403. /* GPIO216 WL_HOST_WAKE */
  404. interrupt-parent = <&gpio6>;
  405. interrupts = <24 IRQ_TYPE_EDGE_FALLING>;
  406. interrupt-names = "host-wake";
  407. pinctrl-names = "default";
  408. pinctrl-0 = <&wlan_default_mode>;
  409. };
  410. };
  411. /* eMMC */
  412. mmc@80005000 {
  413. arm,primecell-periphid = <0x10480180>;
  414. max-frequency = <50000000>;
  415. bus-width = <8>;
  416. non-removable;
  417. cap-mmc-highspeed;
  418. mmc-ddr-1_8v;
  419. no-sdio;
  420. no-sd;
  421. vmmc-supply = <&ldo_3v3_reg>;
  422. pinctrl-names = "default", "sleep";
  423. pinctrl-0 = <&mc2_a_1_default>;
  424. pinctrl-1 = <&mc2_a_1_sleep>;
  425. status = "okay";
  426. };
  427. /* GBF (Bluetooth) UART */
  428. uart@80120000 {
  429. pinctrl-names = "default", "sleep";
  430. pinctrl-0 = <&u0_a_1_default>;
  431. pinctrl-1 = <&u0_a_1_sleep>;
  432. status = "okay";
  433. bluetooth {
  434. /* BCM4330B1 actually */
  435. compatible = "brcm,bcm4330-bt";
  436. /* GPIO222 rail BT_VREG_EN to BT_REG_ON */
  437. shutdown-gpios = <&gpio6 30 GPIO_ACTIVE_HIGH>;
  438. /* BT_WAKE on GPIO199 */
  439. device-wakeup-gpios = <&gpio6 7 GPIO_ACTIVE_HIGH>;
  440. /* BT_HOST_WAKE on GPIO97 */
  441. /* FIXME: convert to interrupt */
  442. host-wakeup-gpios = <&gpio3 1 GPIO_ACTIVE_HIGH>;
  443. /* BT_RST_N on GPIO209 */
  444. reset-gpios = <&gpio6 17 GPIO_ACTIVE_LOW>;
  445. pinctrl-names = "default";
  446. pinctrl-0 = <&bluetooth_default_mode>;
  447. };
  448. };
  449. /* GPS UART */
  450. uart@80121000 {
  451. status = "okay";
  452. pinctrl-names = "default", "sleep";
  453. /* CTS/RTS is not used, CTS is repurposed as GPIO */
  454. pinctrl-0 = <&u1rxtx_a_1_default>;
  455. pinctrl-1 = <&u1rxtx_a_1_sleep>;
  456. gnss {
  457. /*
  458. * The Low Noise Amplifier (LNA) power and enablement is controlled
  459. * autonomously by the GSD4t.
  460. * Janice has a SiRFstarIV-based GSD4t
  461. * Golden has a SiRFstarV 5t-based CSRG05TA03-ICJE-R.
  462. */
  463. compatible = "csr,gsd4t";
  464. /* GPS_RSTN on GPIO21 */
  465. reset-gpios = <&gpio0 21 GPIO_ACTIVE_LOW>;
  466. /* GPS_ON_OFF on GPIO96 */
  467. sirf,onoff-gpios = <&gpio3 0 GPIO_ACTIVE_HIGH>;
  468. /* GPS_1V8 (VSMPS2) */
  469. vcc-supply = <&db8500_vsmps2_reg>;
  470. pinctrl-names = "default";
  471. pinctrl-0 = <&gsd4t_janice_default>;
  472. /* According to /etc/sirfgps.conf */
  473. current-speed = <460800>;
  474. };
  475. };
  476. /* Debugging console UART connected to TSU6111RSVR (FSA880) */
  477. uart@80007000 {
  478. status = "okay";
  479. pinctrl-names = "default", "sleep";
  480. pinctrl-0 = <&u2rxtx_c_1_default>;
  481. pinctrl-1 = <&u2rxtx_c_1_sleep>;
  482. };
  483. prcmu@80157000 {
  484. ab8500 {
  485. phy {
  486. pinctrl-names = "default", "sleep";
  487. pinctrl-0 = <&usb_a_1_default>;
  488. pinctrl-1 = <&usb_a_1_sleep>;
  489. };
  490. ab8500_fg {
  491. line-impedance-micro-ohms = <15000>;
  492. };
  493. regulator {
  494. ab8500_ldo_aux1 {
  495. /* Used for VDD for sensors */
  496. regulator-name = "V-SENSORS-VDD";
  497. regulator-min-microvolt = <3000000>;
  498. regulator-max-microvolt = <3000000>;
  499. };
  500. ab8500_ldo_aux2 {
  501. /* Used for VIO for sensors */
  502. regulator-name = "V-SENSORS-VIO";
  503. regulator-min-microvolt = <1800000>;
  504. regulator-max-microvolt = <1800000>;
  505. };
  506. ab8500_ldo_aux3 {
  507. /* Used for voltage for external MMC/SD card */
  508. regulator-name = "V-MMC-SD";
  509. regulator-min-microvolt = <1200000>;
  510. regulator-max-microvolt = <2910000>;
  511. };
  512. };
  513. };
  514. };
  515. /* I2C0 */
  516. i2c@80004000 {
  517. status = "okay";
  518. pinctrl-names = "default", "sleep";
  519. pinctrl-0 = <&i2c0_a_1_default>;
  520. pinctrl-1 = <&i2c0_a_1_sleep>;
  521. proximity@44 {
  522. /* Janice has the GP2AP002A00F with light sensor */
  523. compatible = "sharp,gp2ap002a00f";
  524. clock-frequency = <400000>;
  525. reg = <0x44>;
  526. interrupt-parent = <&gpio4>;
  527. interrupts = <18 IRQ_TYPE_EDGE_FALLING>;
  528. vdd-supply = <&ab8500_ldo_aux1_reg>;
  529. vio-supply = <&ab8500_ldo_aux2_reg>;
  530. /* ADC channel AUX2 to read ALSOUT ambient light sensor out */
  531. io-channels = <&gp2a_shunt>;
  532. io-channel-names = "alsout";
  533. pinctrl-names = "default";
  534. pinctrl-0 = <&gp2ap002_janice_default>;
  535. /* B1 mode (arch/arm/mach-ux500/include/mach/gp2a.h) */
  536. sharp,proximity-far-hysteresis = /bits/ 8 <0x40>;
  537. sharp,proximity-close-hysteresis = /bits/ 8 <0x0f>;
  538. };
  539. };
  540. /* I2C1 on GPIO16 and GPIO17 also called "MUS I2C" */
  541. i2c@80122000 {
  542. status = "okay";
  543. pinctrl-names = "default","sleep";
  544. pinctrl-0 = <&i2c1_b_2_default>;
  545. pinctrl-1 = <&i2c1_b_2_sleep>;
  546. /* Texas Instruments TSU6111 micro USB switch */
  547. usb-switch@25 {
  548. compatible = "ti,tsu6111";
  549. reg = <0x25>;
  550. /* Interrupt JACK_INT_N on GPIO95 */
  551. interrupt-parent = <&gpio2>;
  552. interrupts = <31 IRQ_TYPE_EDGE_FALLING>;
  553. pinctrl-names = "default";
  554. pinctrl-0 = <&tsu6111_janice_default>;
  555. };
  556. };
  557. /* I2C2 on GPIO10 and GPIO11 also called "SENSORS I2C" */
  558. i2c@80128000 {
  559. status = "okay";
  560. pinctrl-names = "default", "sleep";
  561. pinctrl-0 = <&i2c2_b_2_default>;
  562. pinctrl-1 = <&i2c2_b_2_sleep>;
  563. gyroscope@68 {
  564. compatible = "invensense,mpu3050";
  565. reg = <0x68>;
  566. /* GPIO226 interrupt */
  567. interrupt-parent = <&gpio7>;
  568. interrupts = <2 IRQ_TYPE_EDGE_FALLING>;
  569. /* FIXME: no idea about this */
  570. mount-matrix = "1", "0", "0",
  571. "0", "1", "0",
  572. "0", "0", "1";
  573. vlogic-supply = <&ab8500_ldo_aux2_reg>; // 1.8V
  574. vdd-supply = <&ab8500_ldo_aux1_reg>; // 3V
  575. pinctrl-names = "default";
  576. pinctrl-0 = <&mpu3050_janice_default>;
  577. /*
  578. * The MPU-3050 acts as a hub for the
  579. * accelerometer.
  580. */
  581. i2c-gate {
  582. #address-cells = <1>;
  583. #size-cells = <0>;
  584. /* Bosch BMA222 accelerometer */
  585. accelerometer@8 {
  586. compatible = "bosch,bma222";
  587. reg = <0x08>;
  588. mount-matrix = "0", "-1", "0",
  589. "1", "0", "0",
  590. "0", "0", "1";
  591. vddio-supply = <&ab8500_ldo_aux2_reg>; // 1.8V
  592. vdd-supply = <&ab8500_ldo_aux1_reg>; // 3V
  593. };
  594. };
  595. };
  596. };
  597. /* I2C3 */
  598. i2c@80110000 {
  599. status = "okay";
  600. pinctrl-names = "default", "sleep";
  601. pinctrl-0 = <&i2c3_c_2_default>;
  602. pinctrl-1 = <&i2c3_c_2_sleep>;
  603. /* Atmel mXT224E touchscreen */
  604. touchscreen@4a {
  605. compatible = "atmel,maxtouch";
  606. reg = <0x4a>;
  607. /* GPIO218 (TSP_INT_1V8) */
  608. interrupt-parent = <&gpio6>;
  609. interrupts = <26 IRQ_TYPE_EDGE_FALLING>;
  610. /* VDDA is "analog supply", 2.57-3.47 V */
  611. vdda-supply = <&ldo_tsp_3v3_reg>;
  612. /* VDD is "digital supply" 1.71-3.47V */
  613. vdd-supply = <&ldo_tsp_1v8_reg>;
  614. pinctrl-names = "default";
  615. pinctrl-0 = <&tsp_default>;
  616. };
  617. };
  618. mcde@a0350000 {
  619. status = "okay";
  620. pinctrl-names = "default";
  621. pinctrl-0 = <&dpi_default_mode>;
  622. port {
  623. display_out: endpoint {
  624. remote-endpoint = <&panel_in>;
  625. };
  626. };
  627. };
  628. };
  629. };
  630. &pinctrl {
  631. /*
  632. * This extends the MC0_A_2 default config to include
  633. * the card detect GPIO217 line.
  634. */
  635. sdi0 {
  636. mc0_a_2_default {
  637. default_cfg4 {
  638. pins = "GPIO217_AH12"; /* card detect */
  639. ste,config = <&gpio_in_pd>;
  640. };
  641. };
  642. };
  643. mcde {
  644. dpi_default_mode: dpi_default {
  645. default_mux1 {
  646. /* Mux in all the data lines */
  647. function = "lcd";
  648. groups =
  649. /* Data lines D0-D7 GPIO70..GPIO77 */
  650. "lcd_d0_d7_a_1",
  651. /* Data lines D8-D11 GPIO78..GPIO81 */
  652. "lcd_d8_d11_a_1",
  653. /* Data lines D12-D15 GPIO82..GPIO85 */
  654. "lcd_d12_d15_a_1",
  655. /* Data lines D16-D23 GPIO161..GPIO168 */
  656. "lcd_d16_d23_b_1";
  657. };
  658. default_mux2 {
  659. function = "lcda";
  660. /* Clock line on GPIO150, DE, VSO, HSO on GPIO169..GPIO171 */
  661. groups = "lcdaclk_b_1", "lcda_b_1";
  662. };
  663. /* Input, no pull-up is the default state for pins used for an alt function */
  664. default_cfg1 {
  665. pins = "GPIO150_C14", "GPIO169_D22", "GPIO170_C23", "GPIO171_D23";
  666. ste,config = <&in_nopull>;
  667. };
  668. };
  669. };
  670. /* GPIO for panel reset control */
  671. panel {
  672. panel_default_mode: panel_default {
  673. janice_cfg1 {
  674. /* Reset line */
  675. pins = "GPIO139_C9";
  676. ste,config = <&gpio_out_lo>;
  677. };
  678. };
  679. };
  680. /* GPIO that enables the LDO regulator for the eMMC */
  681. emmc-ldo {
  682. emmc_ldo_en_default_mode: emmc_ldo_default {
  683. /* LDO enable on GPIO6 */
  684. janice_cfg1 {
  685. pins = "GPIO6_AF6";
  686. ste,config = <&gpio_out_hi>;
  687. };
  688. };
  689. };
  690. /* GPIO that enables the LDO regulator for the touchscreen */
  691. tsp-ldo {
  692. tsp_ldo_en_default_mode: tsp_ldo_default {
  693. /* LDO enable on GPIO94 */
  694. janice_cfg1 {
  695. pins = "GPIO94_D7";
  696. ste,config = <&gpio_out_hi>;
  697. };
  698. };
  699. };
  700. /* GPIO that enables the LDO regulator for the key LED */
  701. key-led {
  702. en_led_ldo_default_mode: en_led_ldo_default {
  703. /* EN_LED_LDO on GPIO68 */
  704. janice_cfg1 {
  705. pins = "GPIO68_E1";
  706. ste,config = <&gpio_out_hi>;
  707. };
  708. };
  709. };
  710. /* GPIO that enables the LDO regulator for the touchkeys */
  711. touchkey-ldo {
  712. tsp_ldo_on2_default_mode: tsp_ldo_on2_default {
  713. /* TSP_LDO_ON2 on GPIO89 */
  714. janice_cfg1 {
  715. pins = "GPIO89_E6";
  716. ste,config = <&gpio_out_lo>;
  717. };
  718. };
  719. };
  720. touchkey {
  721. touchkey_default_mode: touchkey_default {
  722. janice_cfg1 {
  723. /* Interrupt */
  724. pins = "GPIO198_AG25";
  725. ste,config = <&gpio_in_nopull>;
  726. };
  727. janice_cfg2 {
  728. /* Reset, actually completely unused (not routed) */
  729. pins = "GPIO205_AG23";
  730. ste,config = <&gpio_in_pd>;
  731. };
  732. };
  733. };
  734. /* GPIO that enabled the LDO regulator for the LCD display */
  735. lcd-ldo {
  736. lcd_pwr_en_default_mode: lcd_pwr_en_default {
  737. /* LCD_PWR_EN on GPIO219 */
  738. janice_cfg1 {
  739. pins = "GPIO219_AG10";
  740. ste,config = <&gpio_out_hi>;
  741. };
  742. };
  743. };
  744. /* GPIO that enables the WLAN internal LDO regulators */
  745. wlan-ldo {
  746. wlan_ldo_en_default: wlan_ldo_default {
  747. /* GPIO215 named WLAN_RST_N */
  748. janice_cfg1 {
  749. pins = "GPIO215_AH13";
  750. ste,config = <&gpio_out_lo>;
  751. };
  752. };
  753. };
  754. /* Flash and torch */
  755. flash {
  756. gpio_flash_default_mode: flash_default {
  757. janice_cfg1 {
  758. pins = "GPIO140_B11", "GPIO141_C12";
  759. ste,config = <&gpio_out_lo>;
  760. };
  761. };
  762. };
  763. /* GPIO keys */
  764. gpio-keys {
  765. gpio_keys_default_mode: gpio_keys_default {
  766. skomer_cfg1 {
  767. pins = "GPIO67_G2", /* VOL UP */
  768. "GPIO91_B6", /* HOME */
  769. "GPIO92_D6"; /* VOL DOWN */
  770. ste,config = <&gpio_in_pu>;
  771. };
  772. };
  773. };
  774. /* Interrupt line for the Atmel MXT228 touchscreen */
  775. tsp {
  776. tsp_default: tsp_default {
  777. janice_cfg1 {
  778. pins = "GPIO218_AH11"; /* TSP_INT_1V8 */
  779. ste,config = <&gpio_in_nopull>;
  780. };
  781. };
  782. };
  783. /* Reset line for the Yamaha YAS529 magnetometer */
  784. yas529 {
  785. yas529_default: yas529_janice {
  786. janice_cfg1 {
  787. pins = "GPIO204_AF23";
  788. ste,config = <&gpio_out_hi>;
  789. };
  790. };
  791. };
  792. /* Interrupt line for light/proximity sensor GP2AP002 */
  793. gp2ap002 {
  794. gp2ap002_janice_default: gp2ap002_janice {
  795. janice_cfg1 {
  796. pins = "GPIO146_D13";
  797. ste,config = <&gpio_in_nopull>;
  798. };
  799. };
  800. };
  801. /* Interrupt line for Invensense MPU3050 gyroscope */
  802. mpu3050 {
  803. mpu3050_janice_default: mpu3050_janice {
  804. janice_cfg1 {
  805. /* GPIO226 used for IRQ */
  806. pins = "GPIO226_AF8";
  807. ste,config = <&gpio_in_nopull>;
  808. };
  809. };
  810. };
  811. /* GPIO-based I2C bus for magnetometer and NCP6914 */
  812. i2c-gpio-0 {
  813. i2c_gpio_0_default: i2c_gpio_0 {
  814. janice_cfg1 {
  815. pins = "GPIO143_D12", "GPIO144_B13";
  816. ste,config = <&gpio_in_nopull>;
  817. };
  818. };
  819. };
  820. /* GPIO-based I2C bus for the Cypress touchkeys */
  821. i2c-gpio-1 {
  822. i2c_gpio_1_default: i2c_gpio_1 {
  823. janice_cfg1 {
  824. pins = "GPIO196_AG26", "GPIO197_AH24";
  825. ste,config = <&gpio_in_nopull>;
  826. };
  827. };
  828. };
  829. /* GPIO-based I2C bus for the Immersion ISA1200 */
  830. i2c-gpio-2 {
  831. i2c_gpio_2_default: i2c_gpio_2 {
  832. janice_cfg1 {
  833. pins = "GPIO201_AF24", "GPIO202_AF25";
  834. ste,config = <&gpio_in_nopull>;
  835. };
  836. };
  837. };
  838. /* GPIO-based I2C bus for the NFC */
  839. i2c-gpio-3 {
  840. i2c_gpio_3_default: i2c_gpio_3 {
  841. janice_cfg1 {
  842. pins = "GPIO151_D17", "GPIO152_D16";
  843. ste,config = <&gpio_in_nopull>;
  844. };
  845. };
  846. };
  847. /* GPIO-based SPI bus for the display */
  848. spi-gpio-0 {
  849. spi_gpio_0_default: spi_gpio_0 {
  850. janice_cfg1 {
  851. pins = "GPIO220_AH10", "GPIO223_AH9", "GPIO224_AG9";
  852. ste,config = <&gpio_out_hi>;
  853. };
  854. /* This pin is unused but belongs with this SPI block */
  855. janice_cfg2 {
  856. pins = "GPIO225_AG8";
  857. ste,config = <&in_pd>;
  858. };
  859. };
  860. };
  861. wlan {
  862. wlan_default_mode: wlan_default {
  863. /* GPIO216 for WL_HOST_WAKE */
  864. janice_cfg2 {
  865. pins = "GPIO216_AG12";
  866. ste,config = <&gpio_in_pd>;
  867. };
  868. };
  869. };
  870. bluetooth {
  871. bluetooth_default_mode: bluetooth_default {
  872. /* GPIO199 BT_WAKE and GPIO222 BT_VREG_ON */
  873. janice_cfg1 {
  874. pins = "GPIO199_AH23", "GPIO222_AJ9";
  875. ste,config = <&gpio_out_lo>;
  876. };
  877. /* GPIO97 BT_HOST_WAKE */
  878. janice_cfg2 {
  879. pins = "GPIO97_D9";
  880. ste,config = <&gpio_in_nopull>;
  881. };
  882. /* GPIO209 BT_RST_N */
  883. janice_cfg3 {
  884. pins = "GPIO209_AG15";
  885. ste,config = <&gpio_out_hi>;
  886. };
  887. };
  888. };
  889. /* Interrupt line for TI TSU6111 Micro USB switch */
  890. tsu6111 {
  891. tsu6111_janice_default: tsu6111_janice {
  892. janice_cfg1 {
  893. /* GPIO95 used for IRQ */
  894. pins = "GPIO95_E8";
  895. ste,config = <&gpio_in_nopull>;
  896. };
  897. };
  898. };
  899. nfc {
  900. pn547_janice_default: pn547_janice {
  901. /* Interrupt line */
  902. janice_cfg1 {
  903. pins = "GPIO32_V2";
  904. ste,config = <&gpio_in_nopull>;
  905. };
  906. /* Enable and firmware GPIOs */
  907. janice_cfg2 {
  908. pins = "GPIO31_V3", "GPIO88_C4";
  909. ste,config = <&gpio_out_lo>;
  910. };
  911. };
  912. };
  913. gsd4t {
  914. gsd4t_janice_default: gsd4t_janice {
  915. /* Reset line, start out asserted */
  916. janice_cfg1 {
  917. pins = "GPIO21_AB3";
  918. ste,config = <&gpio_out_lo>;
  919. };
  920. /* GPS_ON_OFF, start out deasserted (off) */
  921. janice_cfg2 {
  922. pins = "GPIO96_D8";
  923. ste,config = <&gpio_out_lo>;
  924. };
  925. /* Unused power enablement line, used in R0.0 and R0.1 boards */
  926. janice_cfg3 {
  927. pins = "GPIO86_C6";
  928. ste,config = <&gpio_in_pd>;
  929. };
  930. };
  931. };
  932. };