rs90.dts 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327
  1. // SPDX-License-Identifier: GPL-2.0
  2. /dts-v1/;
  3. #include "jz4725b.dtsi"
  4. #include <dt-bindings/gpio/gpio.h>
  5. #include <dt-bindings/iio/adc/ingenic,adc.h>
  6. #include <dt-bindings/input/linux-event-codes.h>
  7. / {
  8. compatible = "ylm,rs90", "ingenic,jz4725b";
  9. model = "RS-90";
  10. memory {
  11. device_type = "memory";
  12. reg = <0x0 0x2000000>;
  13. };
  14. reserved-memory {
  15. #address-cells = <1>;
  16. #size-cells = <1>;
  17. ranges;
  18. vmem: video-memory@1f00000 {
  19. compatible = "shared-dma-pool";
  20. reg = <0x1f00000 0x100000>;
  21. reusable;
  22. };
  23. };
  24. vcc: regulator {
  25. compatible = "regulator-fixed";
  26. regulator-name = "vcc";
  27. regulaor-min-microvolt = <3300000>;
  28. regulaor-max-microvolt = <3300000>;
  29. regulator-always-on;
  30. };
  31. backlight: backlight {
  32. compatible = "pwm-backlight";
  33. pwms = <&pwm 3 40000 0>;
  34. brightness-levels = <0 16 32 48 64 80 112 144 192 255>;
  35. default-brightness-level = <8>;
  36. pinctrl-names = "default";
  37. pinctrl-0 = <&pins_pwm3>;
  38. power-supply = <&vcc>;
  39. };
  40. keys@0 {
  41. compatible = "gpio-keys";
  42. key-0 {
  43. label = "D-pad up";
  44. linux,code = <KEY_UP>;
  45. gpios = <&gpc 10 GPIO_ACTIVE_LOW>;
  46. };
  47. key-1 {
  48. label = "D-pad down";
  49. linux,code = <KEY_DOWN>;
  50. gpios = <&gpc 11 GPIO_ACTIVE_LOW>;
  51. };
  52. key-2 {
  53. label = "D-pad left";
  54. linux,code = <KEY_LEFT>;
  55. gpios = <&gpb 31 GPIO_ACTIVE_LOW>;
  56. };
  57. key-3 {
  58. label = "D-pad right";
  59. linux,code = <KEY_RIGHT>;
  60. gpios = <&gpd 21 GPIO_ACTIVE_LOW>;
  61. };
  62. key-4 {
  63. label = "Button A";
  64. linux,code = <KEY_LEFTCTRL>;
  65. gpios = <&gpc 31 GPIO_ACTIVE_LOW>;
  66. };
  67. key-5 {
  68. label = "Button B";
  69. linux,code = <KEY_LEFTALT>;
  70. gpios = <&gpc 30 GPIO_ACTIVE_LOW>;
  71. };
  72. key-6 {
  73. label = "Right shoulder button";
  74. linux,code = <KEY_BACKSPACE>;
  75. gpios = <&gpc 12 GPIO_ACTIVE_LOW>;
  76. debounce-interval = <10>;
  77. };
  78. key-7 {
  79. label = "Start button";
  80. linux,code = <KEY_ENTER>;
  81. gpios = <&gpd 17 GPIO_ACTIVE_LOW>;
  82. };
  83. };
  84. keys@1 {
  85. compatible = "adc-keys";
  86. io-channels = <&adc INGENIC_ADC_AUX>;
  87. io-channel-names = "buttons";
  88. keyup-threshold-microvolt = <1400000>;
  89. poll-interval = <30>;
  90. key@0 {
  91. label = "Left shoulder button";
  92. linux,code = <KEY_TAB>;
  93. press-threshold-microvolt = <800000>;
  94. };
  95. key@1 {
  96. label = "Select button";
  97. linux,code = <KEY_ESC>;
  98. press-threshold-microvolt = <1100000>;
  99. };
  100. };
  101. amp: analog-amplifier {
  102. compatible = "simple-audio-amplifier";
  103. enable-gpios = <&gpc 15 GPIO_ACTIVE_HIGH>;
  104. VCC-supply = <&vcc>;
  105. };
  106. sound {
  107. compatible = "simple-audio-card";
  108. simple-audio-card,name = "rs90-audio";
  109. simple-audio-card,format = "i2s";
  110. simple-audio-card,widgets =
  111. "Speaker", "Speaker",
  112. "Headphone", "Headphones";
  113. simple-audio-card,routing =
  114. "INL", "LHPOUT",
  115. "INR", "RHPOUT",
  116. "Headphones", "LHPOUT",
  117. "Headphones", "RHPOUT",
  118. "Speaker", "OUTL",
  119. "Speaker", "OUTR";
  120. simple-audio-card,pin-switches = "Speaker";
  121. simple-audio-card,hp-det-gpio = <&gpd 16 GPIO_ACTIVE_LOW>;
  122. simple-audio-card,aux-devs = <&amp>;
  123. simple-audio-card,bitclock-master = <&dai_codec>;
  124. simple-audio-card,frame-master = <&dai_codec>;
  125. dai_cpu: simple-audio-card,cpu {
  126. sound-dai = <&aic>;
  127. };
  128. dai_codec: simple-audio-card,codec {
  129. sound-dai = <&codec>;
  130. };
  131. };
  132. usb_phy: usb-phy {
  133. compatible = "usb-nop-xceiv";
  134. #phy-cells = <0>;
  135. clocks = <&cgu JZ4725B_CLK_UDC_PHY>;
  136. clock-names = "main_clk";
  137. vcc-supply = <&vcc>;
  138. };
  139. panel {
  140. compatible = "sharp,ls020b1dd01d";
  141. backlight = <&backlight>;
  142. power-supply = <&vcc>;
  143. port {
  144. panel_input: endpoint {
  145. remote-endpoint = <&panel_output>;
  146. };
  147. };
  148. };
  149. };
  150. &ext {
  151. clock-frequency = <12000000>;
  152. };
  153. &rtc_dev {
  154. system-power-controller;
  155. };
  156. &udc {
  157. phys = <&usb_phy>;
  158. };
  159. &pinctrl {
  160. pins_mmc1: mmc1 {
  161. function = "mmc1";
  162. groups = "mmc1-1bit";
  163. };
  164. pins_nemc: nemc {
  165. function = "nand";
  166. groups = "nand-cs1", "nand-cle-ale", "nand-fre-fwe";
  167. };
  168. pins_pwm3: pwm3 {
  169. function = "pwm3";
  170. groups = "pwm3";
  171. bias-disable;
  172. };
  173. pins_lcd: lcd {
  174. function = "lcd";
  175. groups = "lcd-8bit", "lcd-16bit", "lcd-special";
  176. };
  177. };
  178. &mmc0 {
  179. status = "disabled";
  180. };
  181. &mmc1 {
  182. bus-width = <1>;
  183. max-frequency = <48000000>;
  184. pinctrl-names = "default";
  185. pinctrl-0 = <&pins_mmc1>;
  186. cd-gpios = <&gpc 20 GPIO_ACTIVE_LOW>;
  187. };
  188. &uart {
  189. /*
  190. * The pins for RX/TX are used for the right shoulder button and
  191. * backlight PWM.
  192. */
  193. status = "disabled";
  194. };
  195. &nemc {
  196. nandc: nand-controller@1 {
  197. compatible = "ingenic,jz4725b-nand";
  198. reg = <1 0 0x4000000>;
  199. #address-cells = <1>;
  200. #size-cells = <0>;
  201. ecc-engine = <&bch>;
  202. ingenic,nemc-tAS = <10>;
  203. ingenic,nemc-tAH = <5>;
  204. ingenic,nemc-tBP = <10>;
  205. ingenic,nemc-tAW = <15>;
  206. ingenic,nemc-tSTRV = <100>;
  207. pinctrl-names = "default";
  208. pinctrl-0 = <&pins_nemc>;
  209. rb-gpios = <&gpc 27 GPIO_ACTIVE_HIGH>;
  210. nand@1 {
  211. reg = <1>;
  212. nand-ecc-step-size = <512>;
  213. nand-ecc-strength = <8>;
  214. nand-ecc-mode = "hw";
  215. nand-is-boot-medium;
  216. nand-on-flash-bbt;
  217. partitions {
  218. compatible = "fixed-partitions";
  219. #address-cells = <1>;
  220. #size-cells = <1>;
  221. partition@0 {
  222. label = "bootloader";
  223. reg = <0x0 0x20000>;
  224. };
  225. partition@20000 {
  226. label = "system";
  227. reg = <0x20000 0x0>;
  228. };
  229. };
  230. };
  231. };
  232. };
  233. &cgu {
  234. /* Use 32kHz oscillator as the parent of the RTC clock */
  235. assigned-clocks = <&cgu JZ4725B_CLK_RTC>;
  236. assigned-clock-parents = <&cgu JZ4725B_CLK_OSC32K>;
  237. };
  238. &tcu {
  239. /*
  240. * 750 kHz for the system timer and clocksource, and use RTC as the
  241. * parent for the watchdog clock.
  242. */
  243. assigned-clocks = <&tcu TCU_CLK_TIMER0>, <&tcu TCU_CLK_TIMER1>, <&tcu TCU_CLK_WDT>;
  244. assigned-clock-parents = <0>, <0>, <&cgu JZ4725B_CLK_RTC>;
  245. assigned-clock-rates = <750000>, <750000>;
  246. };
  247. &lcd {
  248. memory-region = <&vmem>;
  249. pinctrl-names = "default";
  250. pinctrl-0 = <&pins_lcd>;
  251. };
  252. &lcd_ports {
  253. port@0 {
  254. reg = <0>;
  255. panel_output: endpoint {
  256. remote-endpoint = <&panel_input>;
  257. };
  258. };
  259. };