meson-axg-jethome-jethub-j1xx.dtsi 7.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351
  1. // SPDX-License-Identifier: (GPL-2.0+ OR MIT)
  2. /*
  3. * Copyright (c) 2022 Vyacheslav Bocharov <[email protected]>
  4. * Copyright (c) 2022 JetHome
  5. * Author: Vyacheslav Bocharov <[email protected]>
  6. * Author: Aleksandr Kazantsev <[email protected]>
  7. * Author: Alexey Shevelkin <[email protected]>
  8. */
  9. /dts-v1/;
  10. #include "meson-axg.dtsi"
  11. #include <dt-bindings/input/input.h>
  12. #include <dt-bindings/thermal/thermal.h>
  13. / {
  14. aliases {
  15. serial0 = &uart_AO; /* Console */
  16. serial2 = &uart_AO_B; /* External UART (Wireless Module) */
  17. ethernet0 = &ethmac;
  18. };
  19. chosen {
  20. stdout-path = "serial0:115200n8";
  21. };
  22. reserved-memory {
  23. linux,cma {
  24. size = <0x0 0x400000>;
  25. };
  26. };
  27. emmc_pwrseq: emmc-pwrseq {
  28. compatible = "mmc-pwrseq-emmc";
  29. reset-gpios = <&gpio BOOT_9 GPIO_ACTIVE_LOW>;
  30. };
  31. vcc_3v3: regulator-vcc_3v3 {
  32. compatible = "regulator-fixed";
  33. regulator-name = "VCC_3V3";
  34. regulator-min-microvolt = <3300000>;
  35. regulator-max-microvolt = <3300000>;
  36. vin-supply = <&vddao_3v3>;
  37. regulator-always-on;
  38. };
  39. vcc_5v: regulator-vcc_5v {
  40. compatible = "regulator-fixed";
  41. regulator-name = "VCC5V";
  42. regulator-min-microvolt = <5000000>;
  43. regulator-max-microvolt = <5000000>;
  44. regulator-always-on;
  45. };
  46. vddao_3v3: regulator-vddao_3v3 {
  47. compatible = "regulator-fixed";
  48. regulator-name = "VDDAO_3V3";
  49. regulator-min-microvolt = <3300000>;
  50. regulator-max-microvolt = <3300000>;
  51. vin-supply = <&vcc_5v>;
  52. regulator-always-on;
  53. };
  54. vddio_ao18: regulator-vddio_ao18 {
  55. compatible = "regulator-fixed";
  56. regulator-name = "VDDIO_AO18";
  57. regulator-min-microvolt = <1800000>;
  58. regulator-max-microvolt = <1800000>;
  59. vin-supply = <&vddao_3v3>;
  60. regulator-always-on;
  61. };
  62. vddio_boot: regulator-vddio_boot {
  63. compatible = "regulator-fixed";
  64. regulator-name = "VDDIO_BOOT";
  65. regulator-min-microvolt = <3300000>;
  66. regulator-max-microvolt = <3300000>;
  67. vin-supply = <&vddao_3v3>;
  68. regulator-always-on;
  69. };
  70. vccq_1v8: regulator-vccq_1v8 {
  71. compatible = "regulator-fixed";
  72. regulator-name = "VCCQ_1V8";
  73. regulator-min-microvolt = <1800000>;
  74. regulator-max-microvolt = <1800000>;
  75. vin-supply = <&vddao_3v3>;
  76. regulator-always-on;
  77. };
  78. usb_pwr: regulator-usb_pwr {
  79. compatible = "regulator-fixed";
  80. regulator-name = "USB_PWR";
  81. regulator-min-microvolt = <5000000>;
  82. regulator-max-microvolt = <5000000>;
  83. vin-supply = <&vcc_5v>;
  84. regulator-always-on;
  85. };
  86. sdio_pwrseq: sdio-pwrseq {
  87. compatible = "mmc-pwrseq-simple";
  88. reset-gpios = <&gpio GPIOX_7 GPIO_ACTIVE_LOW>;
  89. clocks = <&wifi32k>;
  90. clock-names = "ext_clock";
  91. };
  92. wifi32k: wifi32k {
  93. compatible = "pwm-clock";
  94. #clock-cells = <0>;
  95. clock-frequency = <32768>;
  96. pwms = <&pwm_ab 0 30518 0>; /* PWM_A at 32.768KHz */
  97. };
  98. thermal-zones {
  99. cpu_thermal: cpu-thermal {
  100. polling-delay-passive = <250>;
  101. polling-delay = <1000>;
  102. thermal-sensors = <&scpi_sensors 0>;
  103. trips {
  104. cpu_passive: cpu-passive {
  105. temperature = <70000>; /* millicelsius */
  106. hysteresis = <2000>; /* millicelsius */
  107. type = "passive";
  108. };
  109. cpu_hot: cpu-hot {
  110. temperature = <80000>; /* millicelsius */
  111. hysteresis = <2000>; /* millicelsius */
  112. type = "hot";
  113. };
  114. cpu_critical: cpu-critical {
  115. temperature = <100000>; /* millicelsius */
  116. hysteresis = <2000>; /* millicelsius */
  117. type = "critical";
  118. };
  119. };
  120. cpu_cooling_maps: cooling-maps {
  121. map0 {
  122. trip = <&cpu_passive>;
  123. cooling-device = <&cpu0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
  124. <&cpu1 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
  125. <&cpu2 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
  126. <&cpu3 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
  127. };
  128. map1 {
  129. trip = <&cpu_hot>;
  130. cooling-device = <&cpu0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
  131. <&cpu1 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
  132. <&cpu2 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
  133. <&cpu3 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
  134. };
  135. };
  136. };
  137. };
  138. onewire {
  139. compatible = "w1-gpio";
  140. gpios = <&gpio GPIOA_14 GPIO_ACTIVE_HIGH>;
  141. #gpio-cells = <1>;
  142. };
  143. };
  144. &efuse {
  145. sn: sn@32 {
  146. reg = <0x32 0x20>;
  147. };
  148. eth_mac: eth-mac@0 {
  149. reg = <0x0 0x6>;
  150. };
  151. bt_mac: bt-mac@6 {
  152. reg = <0x6 0x6>;
  153. };
  154. wifi_mac: wifi-mac@c {
  155. reg = <0xc 0x6>;
  156. };
  157. bid: bid@12 {
  158. reg = <0x12 0x20>;
  159. };
  160. };
  161. &ethmac {
  162. status = "okay";
  163. pinctrl-0 = <&eth_rmii_x_pins>;
  164. pinctrl-names = "default";
  165. phy-handle = <&eth_phy0>;
  166. phy-mode = "rmii";
  167. mdio {
  168. compatible = "snps,dwmac-mdio";
  169. #address-cells = <1>;
  170. #size-cells = <0>;
  171. /* ICPlus IP101A/G Ethernet PHY (vendor_id=0x0243, model_id=0x0c54) */
  172. eth_phy0: ethernet-phy@0 {
  173. /* compatible = "ethernet-phy-id0243.0c54";*/
  174. max-speed = <100>;
  175. reg = <0>;
  176. reset-assert-us = <10000>;
  177. reset-deassert-us = <10000>;
  178. reset-gpios = <&gpio GPIOZ_5 GPIO_ACTIVE_LOW>;
  179. };
  180. };
  181. };
  182. /* Internal I2C bus (on CPU module) */
  183. &i2c1 {
  184. status = "okay";
  185. pinctrl-0 = <&i2c1_z_pins>;
  186. pinctrl-names = "default";
  187. /* RTC */
  188. pcf8563: rtc@51 {
  189. compatible = "nxp,pcf8563";
  190. reg = <0x51>;
  191. status = "okay";
  192. };
  193. };
  194. /* Peripheral I2C bus (on motherboard) */
  195. &i2c_AO {
  196. status = "okay";
  197. pinctrl-0 = <&i2c_ao_sck_10_pins>, <&i2c_ao_sda_11_pins>;
  198. pinctrl-names = "default";
  199. };
  200. &pwm_ab {
  201. status = "okay";
  202. pinctrl-0 = <&pwm_a_x20_pins>;
  203. pinctrl-names = "default";
  204. };
  205. /* wifi module */
  206. &sd_emmc_b {
  207. status = "okay";
  208. #address-cells = <1>;
  209. #size-cells = <0>;
  210. pinctrl-0 = <&sdio_pins>;
  211. pinctrl-1 = <&sdio_clk_gate_pins>;
  212. pinctrl-names = "default", "clk-gate";
  213. bus-width = <4>;
  214. cap-sd-highspeed;
  215. max-frequency = <50000000>;
  216. disable-wp;
  217. mmc-pwrseq = <&sdio_pwrseq>;
  218. vmmc-supply = <&vddao_3v3>;
  219. vqmmc-supply = <&vddio_boot>;
  220. };
  221. /* emmc storage */
  222. &sd_emmc_c {
  223. status = "okay";
  224. pinctrl-0 = <&emmc_pins>, <&emmc_ds_pins>;
  225. pinctrl-1 = <&emmc_clk_gate_pins>;
  226. pinctrl-names = "default", "clk-gate";
  227. bus-width = <8>;
  228. cap-mmc-highspeed;
  229. max-frequency = <200000000>;
  230. non-removable;
  231. disable-wp;
  232. mmc-ddr-1_8v;
  233. mmc-hs200-1_8v;
  234. mmc-pwrseq = <&emmc_pwrseq>;
  235. vmmc-supply = <&vcc_3v3>;
  236. vqmmc-supply = <&vccq_1v8>;
  237. };
  238. /* UART Bluetooth */
  239. &uart_B {
  240. status = "okay";
  241. pinctrl-0 = <&uart_b_z_pins>, <&uart_b_z_cts_rts_pins>;
  242. pinctrl-names = "default";
  243. uart-has-rtscts;
  244. };
  245. /* UART Console */
  246. &uart_AO {
  247. status = "okay";
  248. pinctrl-0 = <&uart_ao_a_pins>;
  249. pinctrl-names = "default";
  250. };
  251. /* UART Wireless module */
  252. &uart_AO_B {
  253. status = "okay";
  254. pinctrl-0 = <&uart_ao_b_pins>;
  255. pinctrl-names = "default";
  256. };
  257. &usb {
  258. status = "okay";
  259. vbus-supply = <&usb_pwr>;
  260. };
  261. &spicc1 {
  262. status = "okay";
  263. pinctrl-0 = <&spi1_x_pins>, <&spi1_ss0_x_pins>;
  264. pinctrl-names = "default";
  265. };
  266. &gpio {
  267. gpio-line-names =
  268. "", "", "", "", "", // 0 - 4
  269. "", "", "", "", "", // 5 - 9
  270. "UserButton", "", "", "", "", // 10 - 14
  271. "", "", "", "", "", // 15 - 19
  272. "", "", "", "", "", // 20 - 24
  273. "", "LedRed", "LedGreen", "Output3", "Output2", // 25 - 29
  274. "Output1", "", "", "", "", // 30 - 34
  275. "", "ZigBeeBOOT", "", "", "", // 35 - 39
  276. "1Wire", "ZigBeeRESET", "", "Input4", "Input3", // 40 - 44
  277. "Input2", "Input1", "", "", "", // 45 - 49
  278. "", "", "", "", "", // 50 - 54
  279. "", "", "", "", "", // 55 - 59
  280. "", "", "", "", "", // 60 - 64
  281. "", "", "", "", "", // 65 - 69
  282. "", "", "", "", "", // 70 - 74
  283. "", "", "", "", "", // 75 - 79
  284. "", "", "", "", "", // 80 - 84
  285. "", ""; // 85-86
  286. };
  287. &cpu0 {
  288. #cooling-cells = <2>;
  289. };
  290. &cpu1 {
  291. #cooling-cells = <2>;
  292. };
  293. &cpu2 {
  294. #cooling-cells = <2>;
  295. };
  296. &cpu3 {
  297. #cooling-cells = <2>;
  298. };