ste-hrefv60plus.dtsi 9.2 KB

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