ste-hrefv60plus.dtsi 9.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377
  1. // SPDX-License-Identifier: GPL-2.0-or-later
  2. /*
  3. * Copyright 2012 ST-Ericsson AB
  4. */
  5. #include "ste-href-ab8500.dtsi"
  6. #include "ste-href.dtsi"
  7. / {
  8. model = "ST-Ericsson HREF (v60+) platform with Device Tree";
  9. compatible = "st-ericsson,hrefv60+", "st-ericsson,u8500";
  10. thermal-zones {
  11. chassis-thermal {
  12. /* Poll every 20 seconds */
  13. polling-delay = <20000>;
  14. /* Poll every 2nd second when cooling */
  15. polling-delay-passive = <2000>;
  16. thermal-sensors = <&therm1>, <&therm2>;
  17. /* Tripping points made from rough guess about operating conditions */
  18. trips {
  19. chassis_alert: chassis-alert {
  20. /* At 50 degrees take down the CPU frequency */
  21. temperature = <50000>;
  22. hysteresis = <3000>;
  23. type = "active";
  24. };
  25. chassis_crit: chassis-crit {
  26. /* Just shut down at 70 degrees */
  27. temperature = <70000>;
  28. hysteresis = <2000>;
  29. type = "critical";
  30. };
  31. };
  32. /* Push down the operating frequency of the SoC when it gets hot */
  33. cooling-maps {
  34. map0 {
  35. trip = <&chassis_alert>;
  36. cooling-device = <&CPU0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
  37. contribution = <100>;
  38. };
  39. };
  40. };
  41. };
  42. /*
  43. * Thermistors on the board, formally to monitor battery temperatures
  44. * but what they measure is the board temperature.
  45. */
  46. therm1: thermistor@0 {
  47. compatible = "murata,ncp18wb473";
  48. io-channels = <&gpadc 0x06>; /* AUX1 */
  49. pullup-uv = <1800000>;
  50. pullup-ohm = <220000>;
  51. pulldown-ohm = <0>;
  52. #thermal-sensor-cells = <0>;
  53. };
  54. therm2: thermistor@1 {
  55. compatible = "murata,ncp18wb473";
  56. io-channels = <&gpadc 0x07>; /* AUX2 */
  57. pullup-uv = <1800000>;
  58. pullup-ohm = <220000>;
  59. pulldown-ohm = <0>;
  60. #thermal-sensor-cells = <0>;
  61. };
  62. soc {
  63. /* Name the GPIO muxed rails on the HREF boards */
  64. gpio@8012e000 {
  65. /* GPIOs 0 - 31 */
  66. gpio-line-names =
  67. /* GPIO0,1 used for UART0 BT RX/TX */
  68. "", "",
  69. "UART_WAKE",
  70. "BT_WAKE",
  71. "",
  72. "SDMMC_1V8_3V_SEL",
  73. "FLASH_LED_SYNC (FLASH_CTRL_0)",
  74. "XENON_READY (FLASH_CTRL_1)",
  75. "", "", "", "", "", "", "", "",
  76. "", "", "", "",
  77. "",
  78. "FLASH_LED_EN (FLASH_CTRL_3)",
  79. "", "",
  80. "", "", "", "", "",
  81. /* Used by UART2 (console) */
  82. "", "",
  83. "MAGNETOMETER_INT";
  84. };
  85. gpio@8012e080 {
  86. /* GPIOs 32 - 63 */
  87. gpio-line-names =
  88. "MAGNETOMETER_DRDY",
  89. "", "", "", "", "", "", "",
  90. "", "", "", "", "", "", "", "",
  91. "", "", "", "", "", "", "", "",
  92. "", "", "", "", "", "", "", "";
  93. };
  94. gpio@8000e000 {
  95. /* GPIOs 64 - 95 */
  96. gpio-line-names = "XENON_EN2 (FLASH_CTRL_4)",
  97. "DISP1_RST",
  98. "DISP2_RST",
  99. "TOUCH_INT2",
  100. "LCD_VSI0_A",
  101. "LCD_VSI1_A",
  102. /* GPIO 70-77 used for ETM */
  103. "", "", "", "", "", "", "", "",
  104. /* GPIO 78-81 used for YCBCR */
  105. "", "", "", "",
  106. "ACCELEROMETER_INT1_RDY",
  107. "ACCELEROMETER_INT2",
  108. "TOUCH_INT",
  109. "WLAN_ENA",
  110. "", "", "", "", "",
  111. "FORCE_SENSING_INT",
  112. "FORCE_SENSING_RESET",
  113. "", "",
  114. "SDMMC_CD";
  115. };
  116. gpio@8000e080 {
  117. /* GPIOs 96 - 127 */
  118. gpio-line-names = "",
  119. "FORCE_SENSING_WU",
  120. "", "", "", "", "", "",
  121. "", "", "", "", "", "", "", "",
  122. "", "", "", "", "", "", "", "",
  123. "", "", "", "", "", "", "", "";
  124. };
  125. gpio@8000e100 {
  126. /* GPIOs 128 - 159 */
  127. gpio-line-names = "", "", "", "", "", "", "", "",
  128. "", "", "",
  129. "DIPRO_INT", /* GPIO139 */
  130. "XSHUTDOWN_SECONDARY_SENSOR",
  131. "XSHUTDOWN_PRIMARY_SENSOR",
  132. "NFC_RST (NFC_CTRL_",
  133. "TOUCH_RST",
  134. "NFC_IRQ (NFC_CTRL_1)",
  135. "HAL_SW",
  136. "TOUCH_RST2",
  137. "", "",
  138. "VAUDIO_HF_EN", /* GPIO149 */
  139. "", "", "", "", "", "", "", "", "", "";
  140. };
  141. gpio@8000e180 {
  142. /* GPIOs 160 - 191 */
  143. gpio-line-names = "", "", "", "", "", "", "", "",
  144. "",
  145. "SDMMC_EN",
  146. "XENON_CHARGE (FLASH_CONTROL_5)",
  147. "GBF_ENA_RESET",
  148. "", "", "", "",
  149. "", "", "", "", "", "", "", "",
  150. "", "", "", "", "", "", "", "";
  151. };
  152. gpio@8011e000 {
  153. /* GPIOs 192 - 223 */
  154. gpio-line-names = "HDTV_INTN",
  155. "", "", "",
  156. "HDTV_RSTN",
  157. "", "", "",
  158. "", /* GPIO200 */
  159. "", "", "", "", "", "", "",
  160. /* GPIO208-216 used for WGBF_MC1 */
  161. "", "", "", "", "", "", "", "", "",
  162. "SW_FRONT_PROXIMITY", /* GPIO217 */
  163. "KPD_CTRL_INT", /* Keypad controller */
  164. "", "", "", "", "";
  165. };
  166. gpio@8011e080 {
  167. /* GPIOs 224 - 255 */
  168. gpio-line-names = "", "",
  169. "HSIT_ACWAKE0",
  170. "", "", "", "", "",
  171. "", "", "", "", "", "", "", "",
  172. "", "", "", "", "", "", "", "",
  173. "", "", "", "", "", "", "", "";
  174. };
  175. // External Micro SD slot
  176. mmc@80126000 {
  177. cd-gpios = <&gpio2 31 GPIO_ACTIVE_HIGH>; // 95
  178. };
  179. pinctrl {
  180. /*
  181. * Set this up using hogs, as time goes by and as seems fit, these
  182. * can be moved over to being controlled by respective device.
  183. */
  184. pinctrl-names = "default";
  185. pinctrl-0 = <&ipgpio_hrefv60_mode>,
  186. <&etm_hrefv60_mode>,
  187. <&nahj_hrefv60_mode>,
  188. <&nfc_hrefv60_mode>,
  189. <&force_hrefv60_mode>,
  190. <&dipro_hrefv60_mode>,
  191. <&vaudio_hf_hrefv60_mode>,
  192. <&gbf_hrefv60_mode>,
  193. <&hdtv_hrefv60_mode>,
  194. <&gpios_hrefv60_mode>;
  195. sdi0 {
  196. sdi0_default_mode: sdi0_default {
  197. /* SD card detect GPIO pin, extend default state */
  198. default_hrefv60_cfg1 {
  199. pins = "GPIO95_E8";
  200. ste,config = <&gpio_in_pu>;
  201. };
  202. };
  203. };
  204. ipgpio {
  205. /*
  206. * XENON Flashgun on image processor GPIO (controlled from image
  207. * processor firmware), mux in these image processor GPIO lines 0
  208. * (XENON_FLASH_ID), 1 (XENON_READY) and there is an assistant
  209. * LED on IP GPIO 4 (XENON_EN2) on altfunction C, that need bias
  210. * from GPIO21 so pull up 0, 1 and drive 4 and GPIO21 low as output.
  211. */
  212. ipgpio_hrefv60_mode: ipgpio_hrefv60 {
  213. hrefv60_mux {
  214. function = "ipgpio";
  215. groups = "ipgpio0_c_1", "ipgpio1_c_1", "ipgpio4_c_1";
  216. };
  217. hrefv60_cfg1 {
  218. pins = "GPIO6_AF6", "GPIO7_AG5";
  219. ste,config = <&in_pu>;
  220. };
  221. hrefv60_cfg2 {
  222. pins = "GPIO21_AB3";
  223. ste,config = <&gpio_out_lo>;
  224. };
  225. hrefv60_cfg3 {
  226. pins = "GPIO64_F3";
  227. ste,config = <&out_lo>;
  228. };
  229. };
  230. };
  231. etm {
  232. /*
  233. * Drive D19-D23 for the ETM PTM trace interface low,
  234. * (presumably pins are unconnected therefore grounded here,
  235. * the "other alt C1" setting enables these pins)
  236. */
  237. etm_hrefv60_mode: etm_hrefv60 {
  238. hrefv60_cfg1 {
  239. pins =
  240. "GPIO70_G5",
  241. "GPIO71_G4",
  242. "GPIO72_H4",
  243. "GPIO73_H3",
  244. "GPIO74_J3";
  245. ste,config = <&gpio_out_lo>;
  246. };
  247. };
  248. };
  249. nahj {
  250. nahj_hrefv60_mode: nahj_hrefv60 {
  251. /* NAHJ CTRL on GPIO76 to low, CTRL_INV on GPIO216 to high */
  252. hrefv60_cfg1 {
  253. pins = "GPIO76_J2";
  254. ste,config = <&gpio_out_lo>;
  255. };
  256. hrefv60_cfg2 {
  257. pins = "GPIO216_AG12";
  258. ste,config = <&gpio_out_hi>;
  259. };
  260. };
  261. };
  262. nfc {
  263. nfc_hrefv60_mode: nfc_hrefv60 {
  264. /* NFC ENA and RESET to low, pulldown IRQ line */
  265. hrefv60_cfg1 {
  266. pins =
  267. "GPIO77_H1", /* NFC_ENA */
  268. "GPIO142_C11"; /* NFC_RESET */
  269. ste,config = <&gpio_out_lo>;
  270. };
  271. hrefv60_cfg2 {
  272. pins = "GPIO144_B13"; /* NFC_IRQ */
  273. ste,config = <&gpio_in_pd>;
  274. };
  275. };
  276. };
  277. force {
  278. force_hrefv60_mode: force_hrefv60 {
  279. hrefv60_cfg1 {
  280. pins = "GPIO91_B6"; /* FORCE_SENSING_INT */
  281. ste,config = <&gpio_in_pu>;
  282. };
  283. hrefv60_cfg2 {
  284. pins =
  285. "GPIO92_D6", /* FORCE_SENSING_RST */
  286. "GPIO97_D9"; /* FORCE_SENSING_WU */
  287. ste,config = <&gpio_out_lo>;
  288. };
  289. };
  290. };
  291. dipro {
  292. dipro_hrefv60_mode: dipro_hrefv60 {
  293. hrefv60_cfg1 {
  294. pins = "GPIO139_C9"; /* DIPRO_INT */
  295. ste,config = <&gpio_in_pu>;
  296. };
  297. };
  298. };
  299. vaudio_hf {
  300. vaudio_hf_hrefv60_mode: vaudio_hf_hrefv60 {
  301. /* Audio Amplifier HF enable GPIO */
  302. hrefv60_cfg1 {
  303. pins = "GPIO149_B14"; /* VAUDIO_HF_EN, enable MAX8968 */
  304. ste,config = <&gpio_out_hi>;
  305. };
  306. };
  307. };
  308. gbf {
  309. gbf_hrefv60_mode: gbf_hrefv60 {
  310. /*
  311. * GBF (GPS, Bluetooth, FM-radio) interface,
  312. * pull low to reset state
  313. */
  314. hrefv60_cfg1 {
  315. pins = "GPIO171_D23"; /* GBF_ENA_RESET */
  316. ste,config = <&gpio_out_lo>;
  317. };
  318. };
  319. };
  320. hdtv {
  321. hdtv_hrefv60_mode: hdtv_hrefv60 {
  322. /* MSP : HDTV INTERFACE GPIO line */
  323. hrefv60_cfg1 {
  324. pins = "GPIO192_AJ27";
  325. ste,config = <&gpio_in_pd>;
  326. };
  327. };
  328. };
  329. mcde {
  330. lcd_hrefv60_mode: lcd_hrefv60 {
  331. /*
  332. * Display Interface 1 uses GPIO 65 for RST (reset).
  333. * Display Interface 2 uses GPIO 66 for RST (reset).
  334. * Drive DISP1 reset high (not reset), driver DISP2 reset low (reset)
  335. */
  336. hrefv60_cfg1 {
  337. pins = "GPIO65_F1";
  338. ste,config = <&gpio_out_hi>;
  339. };
  340. hrefv60_cfg2 {
  341. pins = "GPIO66_G3";
  342. ste,config = <&gpio_out_lo>;
  343. };
  344. };
  345. };
  346. gpios {
  347. /* Dangling GPIO pins */
  348. gpios_hrefv60_mode: gpios_hrefv60 {
  349. default_cfg1 {
  350. /* Normally UART1 RXD, now dangling */
  351. pins = "GPIO4_AH6";
  352. ste,config = <&in_pu>;
  353. };
  354. };
  355. };
  356. };
  357. };
  358. };