rk3368-evb.dtsi 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244
  1. // SPDX-License-Identifier: (GPL-2.0+ OR MIT)
  2. /*
  3. * Copyright (c) 2015 Caesar Wang <[email protected]>
  4. */
  5. #include <dt-bindings/input/input.h>
  6. #include <dt-bindings/pwm/pwm.h>
  7. #include "rk3368.dtsi"
  8. / {
  9. aliases {
  10. mmc0 = &emmc;
  11. };
  12. chosen {
  13. stdout-path = "serial2:115200n8";
  14. };
  15. memory {
  16. device_type = "memory";
  17. reg = <0x0 0x0 0x0 0x40000000>;
  18. };
  19. backlight: backlight {
  20. compatible = "pwm-backlight";
  21. brightness-levels = <
  22. 0 1 2 3 4 5 6 7
  23. 8 9 10 11 12 13 14 15
  24. 16 17 18 19 20 21 22 23
  25. 24 25 26 27 28 29 30 31
  26. 32 33 34 35 36 37 38 39
  27. 40 41 42 43 44 45 46 47
  28. 48 49 50 51 52 53 54 55
  29. 56 57 58 59 60 61 62 63
  30. 64 65 66 67 68 69 70 71
  31. 72 73 74 75 76 77 78 79
  32. 80 81 82 83 84 85 86 87
  33. 88 89 90 91 92 93 94 95
  34. 96 97 98 99 100 101 102 103
  35. 104 105 106 107 108 109 110 111
  36. 112 113 114 115 116 117 118 119
  37. 120 121 122 123 124 125 126 127
  38. 128 129 130 131 132 133 134 135
  39. 136 137 138 139 140 141 142 143
  40. 144 145 146 147 148 149 150 151
  41. 152 153 154 155 156 157 158 159
  42. 160 161 162 163 164 165 166 167
  43. 168 169 170 171 172 173 174 175
  44. 176 177 178 179 180 181 182 183
  45. 184 185 186 187 188 189 190 191
  46. 192 193 194 195 196 197 198 199
  47. 200 201 202 203 204 205 206 207
  48. 208 209 210 211 212 213 214 215
  49. 216 217 218 219 220 221 222 223
  50. 224 225 226 227 228 229 230 231
  51. 232 233 234 235 236 237 238 239
  52. 240 241 242 243 244 245 246 247
  53. 248 249 250 251 252 253 254 255>;
  54. default-brightness-level = <128>;
  55. enable-gpios = <&gpio0 RK_PC4 GPIO_ACTIVE_HIGH>;
  56. pinctrl-names = "default";
  57. pinctrl-0 = <&bl_en>;
  58. pwms = <&pwm0 0 1000000 PWM_POLARITY_INVERTED>;
  59. pwm-delay-us = <10000>;
  60. };
  61. emmc_pwrseq: emmc-pwrseq {
  62. compatible = "mmc-pwrseq-emmc";
  63. pinctrl-0 = <&emmc_reset>;
  64. pinctrl-names = "default";
  65. reset-gpios = <&gpio2 RK_PA3 GPIO_ACTIVE_HIGH>;
  66. };
  67. keys: gpio-keys {
  68. compatible = "gpio-keys";
  69. pinctrl-names = "default";
  70. pinctrl-0 = <&pwr_key>;
  71. key-power {
  72. wakeup-source;
  73. gpios = <&gpio0 RK_PA2 GPIO_ACTIVE_LOW>;
  74. label = "GPIO Power";
  75. linux,code = <KEY_POWER>;
  76. };
  77. };
  78. /* supplies both host and otg */
  79. vcc_host: vcc-host-regulator {
  80. compatible = "regulator-fixed";
  81. enable-active-high;
  82. gpio = <&gpio0 RK_PA4 GPIO_ACTIVE_HIGH>;
  83. pinctrl-names = "default";
  84. pinctrl-0 = <&host_vbus_drv>;
  85. regulator-name = "vcc_host";
  86. regulator-always-on;
  87. regulator-boot-on;
  88. vin-supply = <&vcc_sys>;
  89. };
  90. vcc_lan: vcc-lan-regulator {
  91. compatible = "regulator-fixed";
  92. regulator-name = "vcc_lan";
  93. regulator-min-microvolt = <3300000>;
  94. regulator-max-microvolt = <3300000>;
  95. regulator-always-on;
  96. regulator-boot-on;
  97. vin-supply = <&vcc_io>;
  98. };
  99. vcc_sys: vcc-sys-regulator {
  100. compatible = "regulator-fixed";
  101. regulator-name = "vcc_sys";
  102. regulator-min-microvolt = <5000000>;
  103. regulator-max-microvolt = <5000000>;
  104. regulator-always-on;
  105. regulator-boot-on;
  106. };
  107. };
  108. &emmc {
  109. bus-width = <8>;
  110. cap-mmc-highspeed;
  111. mmc-pwrseq = <&emmc_pwrseq>;
  112. non-removable;
  113. pinctrl-names = "default";
  114. pinctrl-0 = <&emmc_clk &emmc_cmd &emmc_bus8>;
  115. status = "okay";
  116. };
  117. &gmac {
  118. phy-supply = <&vcc_lan>;
  119. phy-mode = "rmii";
  120. clock_in_out = "output";
  121. snps,reset-gpio = <&gpio3 RK_PB4 GPIO_ACTIVE_HIGH>;
  122. snps,reset-active-low;
  123. snps,reset-delays-us = <0 10000 1000000>;
  124. pinctrl-names = "default";
  125. pinctrl-0 = <&rmii_pins>;
  126. tx_delay = <0x30>;
  127. rx_delay = <0x10>;
  128. status = "okay";
  129. };
  130. &i2c0 {
  131. status = "okay";
  132. };
  133. &pinctrl {
  134. pcfg_pull_none_drv_8ma: pcfg-pull-none-drv-8ma {
  135. bias-disable;
  136. drive-strength = <8>;
  137. };
  138. pcfg_pull_up_drv_8ma: pcfg-pull-up-drv-8ma {
  139. bias-pull-up;
  140. drive-strength = <8>;
  141. };
  142. backlight {
  143. bl_en: bl-en {
  144. rockchip,pins = <0 RK_PC4 RK_FUNC_GPIO &pcfg_pull_none>;
  145. };
  146. };
  147. emmc {
  148. emmc_bus8: emmc-bus8 {
  149. rockchip,pins = <1 RK_PC2 2 &pcfg_pull_up_drv_8ma>,
  150. <1 RK_PC3 2 &pcfg_pull_up_drv_8ma>,
  151. <1 RK_PC4 2 &pcfg_pull_up_drv_8ma>,
  152. <1 RK_PC5 2 &pcfg_pull_up_drv_8ma>,
  153. <1 RK_PC6 2 &pcfg_pull_up_drv_8ma>,
  154. <1 RK_PC7 2 &pcfg_pull_up_drv_8ma>,
  155. <1 RK_PD0 2 &pcfg_pull_up_drv_8ma>,
  156. <1 RK_PD1 2 &pcfg_pull_up_drv_8ma>;
  157. };
  158. emmc-clk {
  159. rockchip,pins = <2 RK_PA4 2 &pcfg_pull_none_drv_8ma>;
  160. };
  161. emmc-cmd {
  162. rockchip,pins = <1 RK_PD2 2 &pcfg_pull_up_drv_8ma>;
  163. };
  164. emmc_reset: emmc-reset {
  165. rockchip,pins = <2 RK_PA3 RK_FUNC_GPIO &pcfg_pull_none>;
  166. };
  167. };
  168. keys {
  169. pwr_key: pwr-key {
  170. rockchip,pins = <0 RK_PA2 RK_FUNC_GPIO &pcfg_pull_up>;
  171. };
  172. };
  173. pmic {
  174. pmic_int: pmic-int {
  175. rockchip,pins = <0 RK_PA1 RK_FUNC_GPIO &pcfg_pull_up>;
  176. };
  177. };
  178. sdio {
  179. wifi_reg_on: wifi-reg-on {
  180. rockchip,pins = <3 RK_PA4 RK_FUNC_GPIO &pcfg_pull_none>;
  181. };
  182. bt_rst: bt-rst {
  183. rockchip,pins = <3 RK_PA5 RK_FUNC_GPIO &pcfg_pull_none>;
  184. };
  185. };
  186. usb {
  187. host_vbus_drv: host-vbus-drv {
  188. rockchip,pins = <0 RK_PA4 RK_FUNC_GPIO &pcfg_pull_none>;
  189. };
  190. };
  191. };
  192. &pwm0 {
  193. status = "okay";
  194. };
  195. &tsadc {
  196. rockchip,hw-tshut-mode = <0>; /* tshut mode 0:CRU 1:GPIO */
  197. rockchip,hw-tshut-polarity = <0>; /* tshut polarity 0:LOW 1:HIGH */
  198. status = "okay";
  199. };
  200. &uart2 {
  201. status = "okay";
  202. };
  203. &usb_host0_ehci {
  204. status = "okay";
  205. };
  206. &usb_otg {
  207. dr_mode = "host";
  208. status = "okay";
  209. };
  210. &wdt {
  211. status = "okay";
  212. };