ste-href-tvk1281618-r2.dtsi 7.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289
  1. // SPDX-License-Identifier: GPL-2.0-or-later
  2. /*
  3. * Device Tree for the TVK1281618 R2 user interface board (UIB)
  4. */
  5. #include <dt-bindings/interrupt-controller/irq.h>
  6. #include <dt-bindings/input/input.h>
  7. / {
  8. gpio_keys {
  9. compatible = "gpio-keys";
  10. #address-cells = <1>;
  11. #size-cells = <0>;
  12. vdd-supply = <&ab8500_ldo_aux1_reg>;
  13. pinctrl-names = "default";
  14. pinctrl-0 = <&prox_tvk_mode>, <&hall_tvk_mode>;
  15. button@139 {
  16. /* Proximity sensor */
  17. gpios = <&gpio6 25 GPIO_ACTIVE_HIGH>;
  18. linux,code = <11>; /* SW_FRONT_PROXIMITY */
  19. label = "SFH7741 Proximity Sensor";
  20. };
  21. button@145 {
  22. /* Hall sensor */
  23. gpios = <&gpio4 17 GPIO_ACTIVE_HIGH>;
  24. linux,code = <0>; /* SW_LID */
  25. label = "HED54XXU11 Hall Effect Sensor";
  26. };
  27. };
  28. soc {
  29. i2c@80004000 {
  30. tc35893@44 {
  31. compatible = "toshiba,tc35893";
  32. reg = <0x44>;
  33. interrupt-parent = <&gpio6>;
  34. interrupts = <26 IRQ_TYPE_EDGE_RISING>;
  35. pinctrl-names = "default";
  36. pinctrl-0 = <&tc35893_tvk_mode>;
  37. interrupt-controller;
  38. #interrupt-cells = <1>;
  39. status = "disabled";
  40. tc3589x_gpio {
  41. compatible = "toshiba,tc3589x-gpio";
  42. interrupts = <0>;
  43. interrupt-controller;
  44. #interrupt-cells = <2>;
  45. gpio-controller;
  46. #gpio-cells = <2>;
  47. };
  48. tc3589x_keypad {
  49. compatible = "toshiba,tc3589x-keypad";
  50. interrupts = <6>;
  51. debounce-delay-ms = <4>;
  52. keypad,num-columns = <8>;
  53. keypad,num-rows = <8>;
  54. linux,no-autorepeat;
  55. wakeup-source;
  56. linux,keymap = <MATRIX_KEY(3, 1, KEY_END)>,
  57. <MATRIX_KEY(4, 1, KEY_HOME)>,
  58. <MATRIX_KEY(6, 4, KEY_VOLUMEDOWN)>,
  59. <MATRIX_KEY(4, 2, KEY_EMAIL)>,
  60. <MATRIX_KEY(3, 3, KEY_RIGHT)>,
  61. <MATRIX_KEY(2, 5, KEY_BACKSPACE)>,
  62. <MATRIX_KEY(6, 7, KEY_MENU)>,
  63. <MATRIX_KEY(5, 0, KEY_ENTER)>,
  64. <MATRIX_KEY(4, 3, KEY_0)>,
  65. <MATRIX_KEY(3, 4, KEY_DOT)>,
  66. <MATRIX_KEY(5, 2, KEY_UP)>,
  67. <MATRIX_KEY(3, 5, KEY_DOWN)>,
  68. <MATRIX_KEY(4, 5, KEY_SEND)>,
  69. <MATRIX_KEY(0, 5, KEY_BACK)>,
  70. <MATRIX_KEY(6, 2, KEY_VOLUMEUP)>,
  71. <MATRIX_KEY(1, 3, KEY_SPACE)>,
  72. <MATRIX_KEY(7, 6, KEY_LEFT)>,
  73. <MATRIX_KEY(5, 5, KEY_SEARCH)>;
  74. };
  75. };
  76. };
  77. i2c@80128000 {
  78. accelerometer@18 {
  79. /* Accelerometer */
  80. compatible = "st,lsm303dlh-accel";
  81. st,drdy-int-pin = <1>;
  82. drive-open-drain;
  83. reg = <0x18>;
  84. vdd-supply = <&ab8500_ldo_aux1_reg>;
  85. vddio-supply = <&db8500_vsmps2_reg>;
  86. pinctrl-names = "default";
  87. pinctrl-0 = <&accel_tvk_mode>;
  88. /*
  89. * These interrupts cannot be used: the other component
  90. * ST-Micro L3D4200D gyro that is connected to the same lines
  91. * cannot set its DRDY line to open drain, so it cannot be
  92. * shared with other peripherals. The should be defined for
  93. * the falling edge if they could be wired together.
  94. *
  95. * interrupts-extended =
  96. * <&gpio1 0 IRQ_TYPE_EDGE_FALLING>,
  97. * <&gpio2 19 IRQ_TYPE_EDGE_FALLING>;
  98. */
  99. mount-matrix = "0", "1", "0",
  100. "1", "0", "0",
  101. "0", "0", "-1";
  102. };
  103. magnetometer@1e {
  104. /* Magnetometer */
  105. compatible = "st,lsm303dlh-magn";
  106. reg = <0x1e>;
  107. vdd-supply = <&ab8500_ldo_aux1_reg>;
  108. vddio-supply = <&db8500_vsmps2_reg>;
  109. /*
  110. * These interrupts cannot be used: the other component
  111. * ST-Micro L3D4200D gyro that is connected to the same lines
  112. * cannot set its DRDY line to open drain, so it cannot be
  113. * shared with other peripherals. The should be defined for
  114. * the falling edge if they could be wired together.
  115. *
  116. * interrupts-extended =
  117. * <&gpio1 0 IRQ_TYPE_EDGE_FALLING>,
  118. * <&gpio2 19 IRQ_TYPE_EDGE_FALLING>;
  119. */
  120. };
  121. accelerometer@1c {
  122. /* Accelerometer */
  123. compatible = "st,lis331dl-accel";
  124. st,drdy-int-pin = <1>;
  125. reg = <0x1c>;
  126. vdd-supply = <&ab8500_ldo_aux1_reg>;
  127. vddio-supply = <&db8500_vsmps2_reg>;
  128. pinctrl-names = "default";
  129. pinctrl-0 = <&accel_tvk_mode>;
  130. interrupt-parent = <&gpio2>;
  131. /* INT2 would need to be open drain */
  132. interrupts = <18 IRQ_TYPE_EDGE_RISING>,
  133. <19 IRQ_TYPE_EDGE_RISING>;
  134. mount-matrix = "0", "-1", "0",
  135. "-1", "0", "0",
  136. "0", "0", "-1";
  137. };
  138. magnetometer@f {
  139. /* Magnetometer */
  140. compatible = "asahi-kasei,ak8974";
  141. reg = <0x0f>;
  142. avdd-supply = <&ab8500_ldo_aux1_reg>;
  143. dvdd-supply = <&db8500_vsmps2_reg>;
  144. pinctrl-names = "default";
  145. pinctrl-0 = <&gyro_magn_tvk_mode>;
  146. /*
  147. * These interrupts cannot be used: the other component
  148. * ST-Micro L3D4200D gyro that is connected to the same lines
  149. * cannot set its DRDY line to open drain, so it cannot be
  150. * shared with other peripherals. The should be defined for
  151. * the falling edge if they could be wired together.
  152. *
  153. * interrupts-extended =
  154. * <&gpio1 0 IRQ_TYPE_EDGE_FALLING>,
  155. * <&gpio0 31 IRQ_TYPE_EDGE_FALLING>;
  156. */
  157. };
  158. gyroscope@68 {
  159. /* Gyroscope */
  160. compatible = "st,l3g4200d-gyro";
  161. st,drdy-int-pin = <2>;
  162. reg = <0x68>;
  163. vdd-supply = <&ab8500_ldo_aux1_reg>;
  164. vddio-supply = <&db8500_vsmps2_reg>;
  165. pinctrl-names = "default";
  166. pinctrl-0 = <&gyro_magn_tvk_mode>;
  167. interrupts-extended =
  168. <&gpio1 0 IRQ_TYPE_EDGE_RISING>,
  169. <&gpio0 31 IRQ_TYPE_EDGE_RISING>;
  170. };
  171. pressure@5c {
  172. /* Barometer/pressure sensor */
  173. compatible = "st,lps001wp-press";
  174. reg = <0x5c>;
  175. vdd-supply = <&ab8500_ldo_aux1_reg>;
  176. vddio-supply = <&db8500_vsmps2_reg>;
  177. };
  178. };
  179. i2c@80110000 {
  180. synaptics@4b {
  181. /* Synaptics RMI4 TM1217 touchscreen */
  182. compatible = "syna,rmi4-i2c";
  183. #address-cells = <1>;
  184. #size-cells = <0>;
  185. reg = <0x4b>;
  186. vdd-supply = <&ab8500_ldo_aux1_reg>;
  187. vddio-supply = <&db8500_vsmps2_reg>;
  188. pinctrl-names = "default";
  189. pinctrl-0 = <&synaptics_tvk_mode>;
  190. interrupt-parent = <&gpio2>;
  191. interrupts = <20 IRQ_TYPE_EDGE_FALLING>;
  192. rmi4-f01@1 {
  193. reg = <0x1>;
  194. syna,nosleep = <1>;
  195. };
  196. rmi4-f11@11 {
  197. reg = <0x11>;
  198. syna,sensor-type = <1>;
  199. /* This is a landscape display */
  200. touchscreen-swapped-x-y;
  201. };
  202. };
  203. };
  204. mcde@a0350000 {
  205. status = "okay";
  206. dsi@a0351000 {
  207. panel {
  208. compatible = "samsung,s6d16d0";
  209. reg = <0>;
  210. vdd1-supply = <&ab8500_ldo_aux1_reg>;
  211. reset-gpios = <&gpio2 1 GPIO_ACTIVE_LOW>;
  212. };
  213. };
  214. };
  215. pinctrl {
  216. prox {
  217. prox_tvk_mode: prox_tvk {
  218. tvk_cfg {
  219. pins = "GPIO217_AH12";
  220. ste,config = <&gpio_in_pu>;
  221. };
  222. };
  223. };
  224. hall {
  225. hall_tvk_mode: hall_tvk {
  226. tvk_cfg {
  227. pins = "GPIO145_C13";
  228. ste,config = <&gpio_in_pu>;
  229. };
  230. };
  231. };
  232. tc35893 {
  233. /* IRQ from the TC35893 */
  234. tc35893_tvk_mode: tc35893_tvk {
  235. tvk_cfg {
  236. pins = "GPIO218_AH11";
  237. ste,config = <&gpio_in_pu>;
  238. };
  239. };
  240. };
  241. accelerometer {
  242. accel_tvk_mode: accel_tvk {
  243. /* Accelerometer interrupt lines 1 & 2 */
  244. tvk_cfg {
  245. pins = "GPIO82_C1", "GPIO83_D3";
  246. ste,config = <&gpio_in_pd>;
  247. };
  248. };
  249. };
  250. gyroscope {
  251. /*
  252. * These lines are shared between Gyroscope l3g400dh
  253. * and AK8974 magnetometer.
  254. */
  255. gyro_magn_tvk_mode: gyro_magn_tvk {
  256. /* GPIO 31 used for INT pull down the line */
  257. tvk_cfg1 {
  258. pins = "GPIO31_V3";
  259. ste,config = <&gpio_in_pd>;
  260. };
  261. /* GPIO 32 used for DRDY, pull this down */
  262. tvk_cfg2 {
  263. pins = "GPIO32_V2";
  264. ste,config = <&gpio_in_pd>;
  265. };
  266. };
  267. };
  268. synaptics {
  269. synaptics_tvk_mode: synaptics_tvk {
  270. /* Touchscreen uses GPIO 84 */
  271. tvk_cfg1 {
  272. pins = "GPIO84_C2";
  273. ste,config = <&gpio_in_pu>;
  274. };
  275. };
  276. };
  277. };
  278. };
  279. };