ste-nomadik-nhk15.dts 6.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266
  1. // SPDX-License-Identifier: GPL-2.0
  2. /*
  3. * Device Tree for the ST Microelectronics Nomadik NHK8815 board
  4. */
  5. /dts-v1/;
  6. #include <dt-bindings/interrupt-controller/irq.h>
  7. #include <dt-bindings/gpio/gpio.h>
  8. #include "ste-nomadik-stn8815.dtsi"
  9. / {
  10. model = "Nomadik STN8815NHK";
  11. compatible = "st,nomadik-nhk-15";
  12. chosen {
  13. bootargs = "root=/dev/ram0 console=ttyAMA1,115200n8 earlyprintk";
  14. };
  15. aliases {
  16. serial0 = &uart0;
  17. serial1 = &uart1;
  18. stmpe-i2c0 = &stmpe0;
  19. stmpe-i2c1 = &stmpe1;
  20. };
  21. pinctrl {
  22. uart0 {
  23. uart0_nhk_mode: uart0_mux {
  24. u0_default_mux {
  25. function = "u0";
  26. groups = "u0txrx_a_1", "u0ctsrts_a_1";
  27. };
  28. };
  29. };
  30. stmpe2401_1 {
  31. stmpe2401_1_nhk_mode: stmpe2401_1_nhk {
  32. nhk_cfg1 {
  33. pins = "GPIO76_B20"; // IRQ line
  34. ste,input = <0>;
  35. };
  36. nhk_cfg2 {
  37. pins = "GPIO77_B8"; // reset line
  38. ste,output = <1>;
  39. };
  40. };
  41. };
  42. stmpe2401_2 {
  43. stmpe2401_2_nhk_mode: stmpe2401_2_nhk {
  44. nhk_cfg1 {
  45. pins = "GPIO78_A8"; // IRQ line
  46. ste,input = <0>;
  47. };
  48. nhk_cfg2 {
  49. pins = "GPIO79_C9"; // reset line
  50. ste,output = <1>;
  51. };
  52. };
  53. };
  54. lis3lv02dl {
  55. lis3lv02dl_nhk_mode: lis3lv02dl_nhk {
  56. nhk_cfg1 {
  57. pins = "GPIO82_C10"; // IRQ line
  58. ste,input = <0>;
  59. };
  60. };
  61. };
  62. };
  63. src@101e0000 {
  64. /* These chrystal outputs are not used on this board */
  65. disable-sxtalo;
  66. disable-mxtalo;
  67. };
  68. /* This is where the interrupt is routed on the NHK-15 debug board */
  69. external-bus@34000000 {
  70. compatible = "simple-bus";
  71. reg = <0x34000000 0x1000000>;
  72. #address-cells = <1>;
  73. #size-cells = <1>;
  74. ranges = <0 0x34000000 0x1000000>;
  75. ethernet@300 {
  76. compatible = "smsc,lan91c111";
  77. reg = <0x300 0x0fd00>;
  78. reg-io-width = <2>;
  79. reset-gpios = <&stmpe_gpio44 10 GPIO_ACTIVE_HIGH>;
  80. interrupt-parent = <&stmpe_gpio44>;
  81. interrupts = <11 IRQ_TYPE_EDGE_RISING>;
  82. };
  83. };
  84. i2c0 {
  85. lis3lv02dl@1d {
  86. /* Accelerometer */
  87. compatible = "st,lis3lv02dl-accel";
  88. interrupt-parent = <&gpio2>;
  89. interrupts = <18 IRQ_TYPE_EDGE_RISING>; // GPIO 82
  90. pinctrl-0 = <&lis3lv02dl_nhk_mode>;
  91. pinctrl-names = "default";
  92. reg = <0x1d>;
  93. };
  94. stmpe0: stmpe2401@43 {
  95. compatible = "st,stmpe2401";
  96. reg = <0x43>;
  97. reset-gpios = <&gpio2 13 GPIO_ACTIVE_LOW>; // GPIO77
  98. interrupts = <12 IRQ_TYPE_EDGE_FALLING>; // GPIO76
  99. interrupt-parent = <&gpio2>;
  100. interrupt-controller;
  101. wakeup-source;
  102. pinctrl-names = "default";
  103. pinctrl-0 = <&stmpe2401_1_nhk_mode>;
  104. stmpe_gpio43: stmpe_gpio {
  105. compatible = "st,stmpe-gpio";
  106. gpio-controller;
  107. #gpio-cells = <2>;
  108. interrupt-controller;
  109. #interrupt-cells = <2>;
  110. /* Some pins in alternate functions */
  111. st,norequest-mask = <0xf0f002>;
  112. };
  113. stmpe_keypad {
  114. compatible = "st,stmpe-keypad";
  115. debounce-interval = <64>;
  116. st,scan-count = <8>;
  117. st,no-autorepeat;
  118. keypad,num-rows = <8>;
  119. keypad,num-columns = <8>;
  120. linux,keymap = <0x00020072 // Vol down
  121. 0x00030073 // Vol up
  122. 0x0100009e // Back
  123. 0x010100e3 // TV out
  124. 0x01020098 // Lock
  125. 0x0103013b // Start
  126. 0x020000a3 // Next
  127. 0x020100a4 // Play
  128. 0x020200a5 // Prev
  129. 0x02030160 // OK
  130. 0x03000069 // Left
  131. 0x0301006a // Right
  132. 0x03020067 // Up
  133. 0x0303006c>; // Down
  134. };
  135. stmpe0_pwm: stmpe_pwm {
  136. compatible = "st,stmpe-pwm";
  137. #pwm-cells = <2>;
  138. };
  139. };
  140. stmpe1: stmpe2401@44 {
  141. compatible = "st,stmpe2401";
  142. reg = <0x44>;
  143. reset-gpios = <&gpio2 15 GPIO_ACTIVE_LOW>; // GPIO79
  144. interrupts = <14 IRQ_TYPE_EDGE_FALLING>; // GPIO78
  145. interrupt-parent = <&gpio2>;
  146. interrupt-controller;
  147. wakeup-source;
  148. pinctrl-names = "default";
  149. pinctrl-0 = <&stmpe2401_2_nhk_mode>;
  150. stmpe_gpio44: stmpe_gpio {
  151. compatible = "st,stmpe-gpio";
  152. gpio-controller;
  153. #gpio-cells = <2>;
  154. interrupt-controller;
  155. #interrupt-cells = <2>;
  156. /*
  157. * This will turn off SATA so that MMC/SD
  158. * can thrive
  159. */
  160. mmcsd-gpio {
  161. gpio-hog;
  162. gpios = <2 0x0>;
  163. output-low;
  164. line-name = "SATA EN";
  165. };
  166. };
  167. };
  168. };
  169. amba {
  170. clcd@10120000 {
  171. status = "okay";
  172. pinctrl-names = "default";
  173. pinctrl-0 = <&clcd_24bit_mux>;
  174. port {
  175. nomadik_clcd: endpoint {
  176. remote-endpoint = <&nomadik_clcd_panel>;
  177. arm,pl11x,tft-r0g0b0-pads = <16 8 0>;
  178. };
  179. };
  180. };
  181. /* Activate RX/TX and CTS/RTS on UART 0 */
  182. uart0: uart@101fd000 {
  183. pinctrl-names = "default";
  184. pinctrl-0 = <&uart0_nhk_mode>;
  185. status = "okay";
  186. };
  187. mmcsd: mmc@101f6000 {
  188. cd-gpios = <&stmpe_gpio44 7 GPIO_ACTIVE_LOW>;
  189. wp-gpios = <&stmpe_gpio44 18 GPIO_ACTIVE_HIGH>;
  190. };
  191. };
  192. spi {
  193. compatible = "spi-gpio";
  194. #address-cells = <1>;
  195. #size-cells = <0>;
  196. /*
  197. * As we're dealing with 3wire SPI, we only define SCK
  198. * and MOSI (in the spec MOSI is called "SDA").
  199. */
  200. gpio-sck = <&gpio0 5 GPIO_ACTIVE_HIGH>;
  201. gpio-mosi = <&gpio0 4 GPIO_ACTIVE_HIGH>;
  202. cs-gpios = <&gpio0 6 GPIO_ACTIVE_LOW>;
  203. num-chipselects = <1>;
  204. /*
  205. * WVGA connector 21
  206. * WVGA (800x480): 4.3" TPG110 TDO43MTEA2 24-bit RGB
  207. * with TPO touch screen.
  208. */
  209. panel: display@0 {
  210. /*
  211. * The TPO display driver is connected to a
  212. * 5.7" OSD OSD057VA01CT TFT display.
  213. */
  214. compatible = "tpo,tpg110";
  215. reg = <0>;
  216. spi-3wire;
  217. /* 320 ns min period ~= 3 MHz */
  218. spi-max-frequency = <3000000>;
  219. /* Width and height from the OSD data sheet */
  220. width-mm = <116>;
  221. height-mm = <87>;
  222. grestb-gpios = <&stmpe_gpio44 5 GPIO_ACTIVE_LOW>;
  223. backlight = <&bl>;
  224. port {
  225. nomadik_clcd_panel: endpoint {
  226. remote-endpoint = <&nomadik_clcd>;
  227. };
  228. };
  229. };
  230. };
  231. bl: backlight {
  232. compatible = "pwm-backlight";
  233. pwms = <&stmpe0_pwm 0 500000>;
  234. pwm-names = "backlight";
  235. brightness-levels = <
  236. 0 1 2 3 4 5 6 7 8 9
  237. 10 11 12 13 14 15 16 17 18 19
  238. 20 21 22 23 24 25 26 27 28 29
  239. 30 31 32 33 34 35 36 37 38 39
  240. 40 41 42 43 44 45 46 47 48 49
  241. 50 51 52 53 54 55 56 57 58 59
  242. 60 61 62 63 64 65 66 67 68 69
  243. 70 71 72 73 74 75 76 77 78 79
  244. 80 81 82 83 84 85 86 87 88 89
  245. 90 91 92 93 94 95 96 97 98 99
  246. 100
  247. >;
  248. default-brightness-level = <100>;
  249. };
  250. };