ste-href-tvk1281618.dtsi 6.9 KB

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