ste-ux500-samsung-codina-tmo.dts 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793
  1. // SPDX-License-Identifier: GPL-2.0-only
  2. /*
  3. * Devicetree for the Samsung Galaxy Exhibit SGH-T599 also known as Codina-TMO,
  4. * the "TMO" shall be read "T-Mobile" as this phone was produced exlusively
  5. * for T-Mobile in the United States.
  6. *
  7. * This phone is closely related to the Codina, but has:
  8. * - No CPU speed cap, full ~1GHz rate
  9. * - Different power management IC, AB8505
  10. * - As AB8505 has a micro USB phy, no TI TSU6111
  11. * - Different power routing such as the removal of the external LDO for the
  12. * touchscreen in favor of using the AB8505
  13. * - Using a regulator for the key backlight LED
  14. * - Using the Samsung S6D27A1 panel by default
  15. * - The panel is using one of the ordinary AB8505 regulators for 1.8V
  16. * - WiFi/Bluetooth combi chip upgraded to BCM4334
  17. * - GPIO for backlight control moved from 68 to 69
  18. */
  19. /dts-v1/;
  20. #include "ste-db8500.dtsi"
  21. #include "ste-ab8505.dtsi"
  22. #include "ste-dbx5x0-pinctrl.dtsi"
  23. #include <dt-bindings/gpio/gpio.h>
  24. #include <dt-bindings/leds/common.h>
  25. #include <dt-bindings/input/input.h>
  26. #include <dt-bindings/interrupt-controller/irq.h>
  27. / {
  28. model = "Samsung Galaxy Exhibit (SGH-T599)";
  29. compatible = "samsung,codina-tmo", "st-ericsson,u8500";
  30. chosen {
  31. stdout-path = &serial2;
  32. };
  33. battery: battery {
  34. compatible = "samsung,eb425161lu";
  35. };
  36. thermal-zones {
  37. battery-thermal {
  38. /* This zone will be polled by the battery temperature code */
  39. polling-delay = <0>;
  40. polling-delay-passive = <0>;
  41. thermal-sensors = <&bat_therm>;
  42. trips {
  43. battery-crit-hi {
  44. temperature = <70000>;
  45. hysteresis = <2000>;
  46. type = "critical";
  47. };
  48. };
  49. };
  50. };
  51. bat_therm: thermistor {
  52. compatible = "samsung,1404-001221";
  53. io-channels = <&gpadc 0x02>; /* BatTemp */
  54. pullup-uv = <1800000>;
  55. pullup-ohm = <230000>;
  56. pulldown-ohm = <0>;
  57. #thermal-sensor-cells = <0>;
  58. };
  59. /* TI TXS0206 level translator for 2.9 V */
  60. sd_level_translator: regulator-gpio {
  61. compatible = "regulator-fixed";
  62. /* GPIO87 EN */
  63. gpios = <&gpio2 23 GPIO_ACTIVE_HIGH>;
  64. enable-active-high;
  65. regulator-name = "sd-level-translator";
  66. regulator-min-microvolt = <2900000>;
  67. regulator-max-microvolt = <2900000>;
  68. regulator-type = "voltage";
  69. startup-delay-us = <200>;
  70. pinctrl-names = "default";
  71. pinctrl-0 = <&sd_level_translator_default>;
  72. };
  73. /* External LDO MIC5366-3.3YMT for eMMC */
  74. ldo_3v3_reg: regulator-gpio-ldo-3v3 {
  75. compatible = "regulator-fixed";
  76. /* Supplied in turn by VBAT */
  77. regulator-name = "VMEM_3V3";
  78. regulator-min-microvolt = <3300000>;
  79. regulator-max-microvolt = <3300000>;
  80. gpios = <&gpio6 31 GPIO_ACTIVE_HIGH>;
  81. startup-delay-us = <5000>;
  82. enable-active-high;
  83. pinctrl-names = "default";
  84. pinctrl-0 = <&emmc_ldo_en_default_mode>;
  85. };
  86. /*
  87. * External Ricoh RP152L010B-TR LCD LDO regulator for the display.
  88. * LCD_PWR_EN controls both the 3.0V output.
  89. */
  90. lcd_3v0_reg: regulator-gpio-lcd-3v0 {
  91. compatible = "regulator-fixed";
  92. /* Supplied in turn by VBAT */
  93. regulator-name = "VREG_LCD_3.0V";
  94. regulator-min-microvolt = <3000000>;
  95. regulator-max-microvolt = <3000000>;
  96. /* GPIO219 controls this regulator */
  97. gpio = <&gpio6 27 GPIO_ACTIVE_HIGH>;
  98. enable-active-high;
  99. pinctrl-names = "default";
  100. pinctrl-0 = <&lcd_pwr_en_default_mode>;
  101. };
  102. /*
  103. * This regulator is a GPIO line that drives the Broadcom WLAN
  104. * line WL_REG_ON high and enables the internal regulators
  105. * inside the chip. Unfortunatley it is erroneously named
  106. * WLAN_RST_N on the schematic but it is not a reset line.
  107. *
  108. * The voltage specified here is only used to determine the OCR mask,
  109. * the for the SDIO connector, the chip is actually connected
  110. * directly to VBAT.
  111. */
  112. wl_reg: regulator-gpio-wlan {
  113. compatible = "regulator-fixed";
  114. regulator-name = "WL_REG_ON";
  115. regulator-min-microvolt = <3000000>;
  116. regulator-max-microvolt = <3000000>;
  117. startup-delay-us = <100000>;
  118. /* GPIO215 (WLAN_RST_N to WL_REG_ON) */
  119. gpio = <&gpio6 23 GPIO_ACTIVE_HIGH>;
  120. enable-active-high;
  121. pinctrl-names = "default";
  122. pinctrl-0 = <&wlan_ldo_en_default>;
  123. };
  124. vibrator {
  125. compatible = "gpio-vibrator";
  126. /* GPIO195 "MOT_EN" */
  127. enable-gpios = <&gpio6 3 GPIO_ACTIVE_HIGH>;
  128. pinctrl-names = "default";
  129. pinctrl-0 = <&vibrator_default>;
  130. };
  131. gpio-keys {
  132. compatible = "gpio-keys";
  133. pinctrl-names = "default";
  134. pinctrl-0 = <&gpio_keys_default_mode>;
  135. button-home {
  136. linux,code = <KEY_HOME>;
  137. label = "HOME";
  138. /* GPIO91 */
  139. gpios = <&gpio2 27 GPIO_ACTIVE_LOW>;
  140. };
  141. button-volup {
  142. linux,code = <KEY_VOLUMEUP>;
  143. label = "VOL+";
  144. /* GPIO67 */
  145. gpios = <&gpio2 3 GPIO_ACTIVE_LOW>;
  146. };
  147. button-voldown {
  148. linux,code = <KEY_VOLUMEDOWN>;
  149. label = "VOL-";
  150. /* GPIO92 */
  151. gpios = <&gpio2 28 GPIO_ACTIVE_LOW>;
  152. };
  153. };
  154. led-touchkeys {
  155. compatible = "regulator-led";
  156. vled-supply = <&ab8500_ldo_aux4_reg>; // 3.3V
  157. default-state = "on";
  158. function = LED_FUNCTION_KBD_BACKLIGHT;
  159. color = <LED_COLOR_ID_WHITE>;
  160. };
  161. ktd253: backlight {
  162. compatible = "kinetic,ktd253";
  163. /* GPIO69 is used on Codina R0.4 and Codina TMO */
  164. enable-gpios = <&gpio2 5 GPIO_ACTIVE_HIGH>;
  165. /* Default to 13/32 brightness */
  166. default-brightness = <13>;
  167. pinctrl-names = "default";
  168. pinctrl-0 = <&ktd253_backlight_default_mode>;
  169. };
  170. /* Richtek RT8515GQW Flash LED Driver IC */
  171. flash {
  172. compatible = "richtek,rt8515";
  173. /* GPIO 140 */
  174. enf-gpios = <&gpio4 12 GPIO_ACTIVE_HIGH>;
  175. /* GPIO 141 */
  176. ent-gpios = <&gpio4 13 GPIO_ACTIVE_HIGH>;
  177. /*
  178. * RFS is 16 kOhm and RTS is 100 kOhm giving
  179. * the flash max current 343mA and torch max
  180. * current 55 mA.
  181. */
  182. richtek,rfs-ohms = <16000>;
  183. richtek,rts-ohms = <100000>;
  184. pinctrl-names = "default";
  185. pinctrl-0 = <&gpio_flash_default_mode>;
  186. led {
  187. function = LED_FUNCTION_FLASH;
  188. color = <LED_COLOR_ID_WHITE>;
  189. flash-max-timeout-us = <250000>;
  190. flash-max-microamp = <343750>;
  191. led-max-microamp = <55000>;
  192. };
  193. };
  194. /* Bit-banged I2C on GPIO143 and GPIO144 also called "SUBPMU I2C" */
  195. i2c-gpio-0 {
  196. compatible = "i2c-gpio";
  197. sda-gpios = <&gpio4 16 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>;
  198. scl-gpios = <&gpio4 15 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>;
  199. pinctrl-names = "default";
  200. pinctrl-0 = <&i2c_gpio_0_default>;
  201. #address-cells = <1>;
  202. #size-cells = <0>;
  203. /* TODO: this should also be used by the SM5103 Camera power management unit */
  204. };
  205. /* Bit-banged I2C on GPIO151 and GPIO152 also called "COMP I2C" */
  206. i2c-gpio-1 {
  207. compatible = "i2c-gpio";
  208. sda-gpios = <&gpio4 24 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>;
  209. scl-gpios = <&gpio4 23 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>;
  210. pinctrl-names = "default";
  211. pinctrl-0 = <&i2c_gpio_1_default>;
  212. #address-cells = <1>;
  213. #size-cells = <0>;
  214. magnetometer@c {
  215. compatible = "alps,hscdtd008a";
  216. reg = <0x0c>;
  217. clock-frequency = <400000>;
  218. avdd-supply = <&ab8500_ldo_aux1_reg>; // 3V
  219. dvdd-supply = <&ab8500_ldo_aux8_reg>; // 1.8V
  220. };
  221. };
  222. spi-gpio-0 {
  223. compatible = "spi-gpio";
  224. /* Clock on GPIO220, pin SCL */
  225. sck-gpios = <&gpio6 28 GPIO_ACTIVE_HIGH>;
  226. /* MOSI on GPIO224, pin SDI "slave data in" */
  227. mosi-gpios = <&gpio7 0 GPIO_ACTIVE_HIGH>;
  228. /* MISO on GPIO225, pin SDO "slave data out" */
  229. miso-gpios = <&gpio7 1 GPIO_ACTIVE_HIGH>;
  230. /* Chip select on GPIO201 */
  231. cs-gpios = <&gpio6 9 GPIO_ACTIVE_LOW>;
  232. num-chipselects = <1>;
  233. pinctrl-names = "default";
  234. pinctrl-0 = <&spi_gpio_0_default>;
  235. #address-cells = <1>;
  236. #size-cells = <0>;
  237. panel@0 {
  238. compatible = "samsung,s6d27a1";
  239. spi-max-frequency = <1200000>;
  240. /* TYPE 3: inverse clock polarity and phase */
  241. spi-cpha;
  242. spi-cpol;
  243. reg = <0>;
  244. vci-supply = <&lcd_3v0_reg>;
  245. vccio-supply = <&ab8500_ldo_aux6_reg>;
  246. /* Reset on GPIO139 */
  247. reset-gpios = <&gpio4 11 GPIO_ACTIVE_LOW>;
  248. /* LCD_VGH/LCD_DETECT, ESD IRQ on GPIO93 */
  249. interrupt-parent = <&gpio2>;
  250. interrupts = <29 IRQ_TYPE_EDGE_RISING>;
  251. pinctrl-names = "default";
  252. pinctrl-0 = <&panel_default_mode>;
  253. backlight = <&ktd253>;
  254. port {
  255. panel_in: endpoint {
  256. remote-endpoint = <&display_out>;
  257. };
  258. };
  259. };
  260. };
  261. soc {
  262. /* External Micro SD slot */
  263. mmc@80126000 {
  264. arm,primecell-periphid = <0x10480180>;
  265. max-frequency = <100000000>;
  266. bus-width = <4>;
  267. cap-sd-highspeed;
  268. cap-mmc-highspeed;
  269. st,sig-pin-fbclk;
  270. full-pwr-cycle;
  271. /* MMC is powered by AUX3 1.2V .. 2.91V */
  272. vmmc-supply = <&ab8500_ldo_aux3_reg>;
  273. /* 2.9 V level translator is using AUX3 at 2.9 V as well */
  274. vqmmc-supply = <&sd_level_translator>;
  275. pinctrl-names = "default", "sleep";
  276. pinctrl-0 = <&mc0_a_2_default>;
  277. pinctrl-1 = <&mc0_a_2_sleep>;
  278. cd-gpios = <&gpio6 25 GPIO_ACTIVE_LOW>; // GPIO217
  279. status = "okay";
  280. };
  281. /* WLAN SDIO channel */
  282. mmc@80118000 {
  283. arm,primecell-periphid = <0x10480180>;
  284. max-frequency = <50000000>;
  285. bus-width = <4>;
  286. non-removable;
  287. cap-sd-highspeed;
  288. pinctrl-names = "default", "sleep";
  289. pinctrl-0 = <&mc1_a_2_default>;
  290. pinctrl-1 = <&mc1_a_2_sleep>;
  291. /*
  292. * GPIO-controlled voltage enablement: this drives
  293. * the WL_REG_ON line high when we use this device.
  294. * Represented as regulator to fill OCR mask.
  295. */
  296. vmmc-supply = <&wl_reg>;
  297. #address-cells = <1>;
  298. #size-cells = <0>;
  299. status = "okay";
  300. wifi@1 {
  301. compatible = "brcm,bcm4334-fmac", "brcm,bcm4329-fmac";
  302. reg = <1>;
  303. /* GPIO216 WL_HOST_WAKE */
  304. interrupt-parent = <&gpio6>;
  305. interrupts = <24 IRQ_TYPE_EDGE_FALLING>;
  306. interrupt-names = "host-wake";
  307. pinctrl-names = "default";
  308. pinctrl-0 = <&wlan_default_mode>;
  309. };
  310. };
  311. /* eMMC */
  312. mmc@80005000 {
  313. arm,primecell-periphid = <0x10480180>;
  314. max-frequency = <100000000>;
  315. bus-width = <8>;
  316. non-removable;
  317. cap-mmc-highspeed;
  318. mmc-ddr-1_8v;
  319. no-sdio;
  320. no-sd;
  321. vmmc-supply = <&ldo_3v3_reg>;
  322. pinctrl-names = "default", "sleep";
  323. /*
  324. * GPIO130 will be set to input no pull-up resulting in a resistor
  325. * pulling the reset high and taking the memory out of reset.
  326. */
  327. pinctrl-0 = <&mc2_a_1_default>;
  328. pinctrl-1 = <&mc2_a_1_sleep>;
  329. status = "okay";
  330. };
  331. /* GBF (Bluetooth) UART */
  332. uart@80120000 {
  333. pinctrl-names = "default", "sleep";
  334. pinctrl-0 = <&u0_a_1_default>;
  335. pinctrl-1 = <&u0_a_1_sleep>;
  336. status = "okay";
  337. bluetooth {
  338. /* BCM4334B0 actually */
  339. compatible = "brcm,bcm4330-bt";
  340. /* GPIO222 rail BT_VREG_EN to BT_REG_ON */
  341. shutdown-gpios = <&gpio6 30 GPIO_ACTIVE_HIGH>;
  342. /* BT_WAKE on GPIO199 */
  343. device-wakeup-gpios = <&gpio6 7 GPIO_ACTIVE_HIGH>;
  344. /* BT_HOST_WAKE on GPIO97 */
  345. /* FIXME: convert to interrupt */
  346. host-wakeup-gpios = <&gpio3 1 GPIO_ACTIVE_HIGH>;
  347. /* BT_RST_N on GPIO209 */
  348. reset-gpios = <&gpio6 17 GPIO_ACTIVE_LOW>;
  349. pinctrl-names = "default";
  350. pinctrl-0 = <&bluetooth_default_mode>;
  351. };
  352. };
  353. /* GPS UART */
  354. uart@80121000 {
  355. status = "okay";
  356. pinctrl-names = "default", "sleep";
  357. /* CTS/RTS is not used, CTS is repurposed as GPIO */
  358. pinctrl-0 = <&u1rxtx_a_1_default>;
  359. pinctrl-1 = <&u1rxtx_a_1_sleep>;
  360. /* FIXME: add a device for the GPS here */
  361. };
  362. /* Debugging console UART connected to AB8505 */
  363. uart@80007000 {
  364. status = "okay";
  365. pinctrl-names = "default", "sleep";
  366. pinctrl-0 = <&u2rxtx_c_1_default>;
  367. pinctrl-1 = <&u2rxtx_c_1_sleep>;
  368. };
  369. prcmu@80157000 {
  370. ab8505 {
  371. phy {
  372. pinctrl-names = "default", "sleep";
  373. pinctrl-0 = <&usb_a_1_default>;
  374. pinctrl-1 = <&usb_a_1_sleep>;
  375. };
  376. ab8500_fg {
  377. line-impedance-micro-ohms = <36000>;
  378. };
  379. /* This is mostly identical to the Codina v0.4 regulators */
  380. regulator {
  381. ab8500_ldo_aux1 {
  382. regulator-name = "v-sensors-vdd";
  383. regulator-min-microvolt = <3000000>;
  384. regulator-max-microvolt = <3300000>;
  385. };
  386. ab8500_ldo_aux2 {
  387. regulator-name = "v-aux2";
  388. regulator-min-microvolt = <3300000>;
  389. regulator-max-microvolt = <3300000>;
  390. };
  391. ab8500_ldo_aux3 {
  392. regulator-name = "v-mmc-sd";
  393. };
  394. ab8500_ldo_aux4 {
  395. regulator-name = "v-aux4";
  396. /*
  397. * Providing some span here makes the touchkey
  398. * LEDs actually dimmable.
  399. */
  400. regulator-min-microvolt = <1100000>;
  401. regulator-max-microvolt = <3300000>;
  402. };
  403. ab8500_ldo_aux5 {
  404. regulator-name = "v-aux5";
  405. regulator-min-microvolt = <1800000>;
  406. regulator-max-microvolt = <1800000>;
  407. };
  408. ab8500_ldo_aux6 {
  409. /* 1.8 V to the display */
  410. regulator-name = "v-aux6";
  411. regulator-min-microvolt = <1800000>;
  412. regulator-max-microvolt = <1800000>;
  413. };
  414. ab8500_ldo_aux8 {
  415. regulator-name = "v-sensors-vio";
  416. };
  417. };
  418. };
  419. };
  420. /* I2C0 also known as "AGC I2C" */
  421. i2c@80004000 {
  422. status = "okay";
  423. pinctrl-names = "default", "sleep";
  424. pinctrl-0 = <&i2c0_a_1_default>;
  425. pinctrl-1 = <&i2c0_a_1_sleep>;
  426. proximity@39 {
  427. /* Codina has the Amstaos TMD2672 */
  428. compatible = "amstaos,tmd2672";
  429. clock-frequency = <400000>;
  430. reg = <0x39>;
  431. /* IRQ on GPIO146 "PS_INT" */
  432. interrupt-parent = <&gpio4>;
  433. interrupts = <18 IRQ_TYPE_EDGE_FALLING>;
  434. vdd-supply = <&ab8500_ldo_aux1_reg>;
  435. vddio-supply = <&ab8500_ldo_aux8_reg>;
  436. pinctrl-names = "default";
  437. pinctrl-0 = <&tmd2672_codina_default>;
  438. };
  439. };
  440. /* I2C2 on GPIO10 and GPIO11 also called "SENSORS I2C" */
  441. i2c@80128000 {
  442. status = "okay";
  443. pinctrl-names = "default", "sleep";
  444. pinctrl-0 = <&i2c2_b_2_default>;
  445. pinctrl-1 = <&i2c2_b_2_sleep>;
  446. /* Bosch BMA254 accelerometer */
  447. accelerometer@18 {
  448. compatible = "bosch,bma254";
  449. reg = <0x18>;
  450. mount-matrix = "0", "1", "0",
  451. "-1", "0", "0",
  452. "0", "0", "1";
  453. vddio-supply = <&ab8500_ldo_aux8_reg>; // 1.8V
  454. vdd-supply = <&ab8500_ldo_aux1_reg>; // 3V
  455. };
  456. };
  457. /* I2C3 */
  458. i2c@80110000 {
  459. status = "okay";
  460. pinctrl-names = "default", "sleep";
  461. pinctrl-0 = <&i2c3_c_2_default>;
  462. pinctrl-1 = <&i2c3_c_2_sleep>;
  463. /* TODO: write bindings and driver for this touchscreen */
  464. /* Zinitix BT404 ISP part */
  465. isp@50 {
  466. compatible = "zinitix,bt404-isp";
  467. reg = <0x50>;
  468. pinctrl-names = "default";
  469. pinctrl-0 = <&tsp_default>;
  470. };
  471. /* Zinitix BT404 touchscreen, also has the touchkeys for menu and back */
  472. touchscreen@20 {
  473. compatible = "zinitix,bt404";
  474. reg = <0x20>;
  475. /* GPIO218 (TSP_INT_1V8) */
  476. interrupt-parent = <&gpio6>;
  477. interrupts = <26 IRQ_TYPE_EDGE_FALLING>;
  478. vcca-supply = <&ab8500_ldo_aux2_reg>; // 3.3V
  479. vdd-supply = <&ab8500_ldo_aux5_reg>; // 1.8V
  480. zinitix,mode = <2>;
  481. touchscreen-size-x = <480>;
  482. touchscreen-size-y = <800>;
  483. pinctrl-names = "default";
  484. pinctrl-0 = <&tsp_default>;
  485. };
  486. };
  487. mcde@a0350000 {
  488. status = "okay";
  489. pinctrl-names = "default";
  490. pinctrl-0 = <&dpi_default_mode>;
  491. port {
  492. display_out: endpoint {
  493. remote-endpoint = <&panel_in>;
  494. };
  495. };
  496. };
  497. };
  498. };
  499. &pinctrl {
  500. /*
  501. * This extends the MC0_A_2 default config to include
  502. * the card detect GPIO217 line.
  503. */
  504. sdi0 {
  505. mc0_a_2_default {
  506. default_cfg4 {
  507. pins = "GPIO217_AH12"; /* card detect */
  508. ste,config = <&gpio_in_pd>;
  509. };
  510. };
  511. };
  512. sdi2 {
  513. /*
  514. * GPIO130 should be set in GPIO mode and
  515. * pulled down. (Not connected.)
  516. */
  517. mc2_a_1_default {
  518. default_cfg2 {
  519. pins = "GPIO130_C8"; /* FBCLK */
  520. ste,config = <&gpio_in_pd>;
  521. };
  522. };
  523. };
  524. /* GPIO that enables the 2.9V SD card level translator */
  525. sd-level-translator {
  526. sd_level_translator_default: sd_level_translator_default {
  527. /* level shifter on GPIO87 */
  528. codina_cfg1 {
  529. pins = "GPIO87_B3";
  530. ste,config = <&gpio_out_hi>;
  531. };
  532. };
  533. };
  534. /* GPIO that enables the LDO regulator for the eMMC */
  535. emmc-ldo {
  536. emmc_ldo_en_default_mode: emmc_ldo_default {
  537. /* LDO enable on GPIO223 */
  538. codina_cfg1 {
  539. pins = "GPIO223_AH9";
  540. ste,config = <&gpio_out_hi>;
  541. };
  542. };
  543. };
  544. /* GPIOs for panel control */
  545. panel {
  546. panel_default_mode: panel_default {
  547. codina_cfg1 {
  548. /* Reset line */
  549. pins = "GPIO139_C9";
  550. ste,config = <&gpio_out_lo>;
  551. };
  552. codina_cfg2 {
  553. /* ESD IRQ line "LCD detect" */
  554. pins = "GPIO93_B7";
  555. ste,config = <&gpio_in_nopull>;
  556. };
  557. };
  558. };
  559. /* GPIO that enables the LDO regulator for the LCD display */
  560. lcd-ldo {
  561. lcd_pwr_en_default_mode: lcd_pwr_en_default {
  562. /* LCD_PWR_EN on GPIO219 */
  563. codina_cfg1 {
  564. pins = "GPIO219_AG10";
  565. ste,config = <&gpio_out_hi>;
  566. };
  567. };
  568. };
  569. /* GPIO that enables the WLAN internal LDO regulators */
  570. wlan-ldo {
  571. wlan_ldo_en_default: wlan_ldo_default {
  572. /* GPIO215 named WLAN_RST_N */
  573. codina_cfg1 {
  574. pins = "GPIO215_AH13";
  575. ste,config = <&gpio_out_lo>;
  576. };
  577. };
  578. };
  579. /* Backlight GPIO */
  580. backlight {
  581. ktd253_backlight_default_mode: backlight_default {
  582. skomer_cfg1 {
  583. pins = "GPIO69_E2"; /* LCD_BL_CTRL */
  584. ste,config = <&gpio_out_lo>;
  585. };
  586. };
  587. };
  588. /* Flash and torch */
  589. flash {
  590. gpio_flash_default_mode: flash_default {
  591. codina_cfg1 {
  592. pins = "GPIO140_B11", "GPIO141_C12";
  593. ste,config = <&gpio_out_lo>;
  594. };
  595. };
  596. };
  597. /* GPIO keys */
  598. gpio-keys {
  599. gpio_keys_default_mode: gpio_keys_default {
  600. skomer_cfg1 {
  601. pins = "GPIO67_G2", /* VOL UP */
  602. "GPIO91_B6", /* HOME */
  603. "GPIO92_D6"; /* VOL DOWN */
  604. ste,config = <&gpio_in_pu>;
  605. };
  606. };
  607. };
  608. /* Interrupt line for the Zinitix BT404 touchscreen */
  609. tsp {
  610. tsp_default: tsp_default {
  611. codina_cfg1 {
  612. pins = "GPIO218_AH11"; /* TSP_INT_1V8 */
  613. ste,config = <&gpio_in_nopull>;
  614. };
  615. };
  616. };
  617. /* Interrupt line for light/proximity sensor TMD2672 */
  618. tmd2672 {
  619. tmd2672_codina_default: tmd2672_codina {
  620. codina_cfg1 {
  621. pins = "GPIO146_D13";
  622. ste,config = <&gpio_in_nopull>;
  623. };
  624. };
  625. };
  626. /* GPIO-based I2C bus for subpmu */
  627. i2c-gpio-0 {
  628. i2c_gpio_0_default: i2c_gpio_0 {
  629. codina_cfg1 {
  630. pins = "GPIO143_D12", "GPIO144_B13";
  631. ste,config = <&gpio_in_nopull>;
  632. };
  633. };
  634. };
  635. /* GPIO-based I2C bus for the NFC */
  636. i2c-gpio-1 {
  637. i2c_gpio_1_default: i2c_gpio_1 {
  638. codina_cfg1 {
  639. pins = "GPIO151_D17", "GPIO152_D16";
  640. ste,config = <&gpio_in_nopull>;
  641. };
  642. };
  643. };
  644. /* GPIO-based SPI bus for the display */
  645. spi-gpio-0 {
  646. spi_gpio_0_default: spi_gpio_0_d {
  647. codina_cfg1 {
  648. pins = "GPIO220_AH10", "GPIO201_AF24", "GPIO224_AG9";
  649. ste,config = <&gpio_out_hi>;
  650. };
  651. codina_cfg2 {
  652. pins = "GPIO225_AG8";
  653. /* Needs pull down, no pull down resistor on board */
  654. ste,config = <&gpio_in_pd>;
  655. };
  656. };
  657. spi_gpio_0_sleep: spi_gpio_0_s {
  658. codina_cfg1 {
  659. pins = "GPIO220_AH10", "GPIO201_AF24",
  660. "GPIO224_AG9", "GPIO225_AG8";
  661. ste,config = <&gpio_out_hi>;
  662. };
  663. };
  664. };
  665. wlan {
  666. wlan_default_mode: wlan_default {
  667. /* GPIO216 for WL_HOST_WAKE */
  668. codina_cfg2 {
  669. pins = "GPIO216_AG12";
  670. ste,config = <&gpio_in_pd>;
  671. };
  672. };
  673. };
  674. bluetooth {
  675. bluetooth_default_mode: bluetooth_default {
  676. /* GPIO199 BT_WAKE and GPIO222 BT_VREG_ON */
  677. codina_cfg1 {
  678. pins = "GPIO199_AH23", "GPIO222_AJ9";
  679. ste,config = <&gpio_out_lo>;
  680. };
  681. /* GPIO97 BT_HOST_WAKE */
  682. codina_cfg2 {
  683. pins = "GPIO97_D9";
  684. ste,config = <&gpio_in_nopull>;
  685. };
  686. /* GPIO209 BT_RST_N */
  687. codina_cfg3 {
  688. pins = "GPIO209_AG15";
  689. ste,config = <&gpio_out_hi>;
  690. };
  691. };
  692. };
  693. vibrator {
  694. vibrator_default: vibrator_default {
  695. codina_cfg1 {
  696. pins = "GPIO195_AG28"; /* MOT_EN */
  697. ste,config = <&gpio_out_lo>;
  698. };
  699. };
  700. };
  701. mcde {
  702. dpi_default_mode: dpi_default {
  703. default_mux1 {
  704. /* Mux in all the data lines */
  705. function = "lcd";
  706. groups =
  707. /* Data lines D0-D7 GPIO70..GPIO77 */
  708. "lcd_d0_d7_a_1",
  709. /* Data lines D8-D11 GPIO78..GPIO81 */
  710. "lcd_d8_d11_a_1",
  711. /* Data lines D12-D15 GPIO82..GPIO85 */
  712. "lcd_d12_d15_a_1",
  713. /* Data lines D16-D23 GPIO161..GPIO168 */
  714. "lcd_d16_d23_b_1";
  715. };
  716. default_mux2 {
  717. function = "lcda";
  718. /* Clock line on GPIO150, DE, VSO, HSO on GPIO169..GPIO171 */
  719. groups = "lcdaclk_b_1", "lcda_b_1";
  720. };
  721. /* Input, no pull-up is the default state for pins used for an alt function */
  722. default_cfg1 {
  723. pins = "GPIO150_C14", "GPIO169_D22", "GPIO170_C23", "GPIO171_D23";
  724. ste,config = <&in_nopull>;
  725. };
  726. };
  727. };
  728. };