meson-g12b-w400.dtsi 8.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425
  1. // SPDX-License-Identifier: (GPL-2.0+ OR MIT)
  2. /*
  3. * Copyright (c) 2019 BayLibre, SAS
  4. * Author: Neil Armstrong <[email protected]>
  5. * Copyright (c) 2019 Christian Hewitt <[email protected]>
  6. */
  7. /dts-v1/;
  8. #include "meson-g12b.dtsi"
  9. #include "meson-g12b-s922x.dtsi"
  10. #include <dt-bindings/input/input.h>
  11. #include <dt-bindings/gpio/meson-g12a-gpio.h>
  12. / {
  13. aliases {
  14. serial0 = &uart_AO;
  15. ethernet0 = &ethmac;
  16. };
  17. chosen {
  18. stdout-path = "serial0:115200n8";
  19. };
  20. memory@0 {
  21. device_type = "memory";
  22. reg = <0x0 0x0 0x0 0x40000000>;
  23. };
  24. emmc_pwrseq: emmc-pwrseq {
  25. compatible = "mmc-pwrseq-emmc";
  26. reset-gpios = <&gpio BOOT_12 GPIO_ACTIVE_LOW>;
  27. };
  28. sdio_pwrseq: sdio-pwrseq {
  29. compatible = "mmc-pwrseq-simple";
  30. reset-gpios = <&gpio GPIOX_6 GPIO_ACTIVE_LOW>;
  31. clocks = <&wifi32k>;
  32. clock-names = "ext_clock";
  33. };
  34. flash_1v8: regulator-flash_1v8 {
  35. compatible = "regulator-fixed";
  36. regulator-name = "FLASH_1V8";
  37. regulator-min-microvolt = <1800000>;
  38. regulator-max-microvolt = <1800000>;
  39. vin-supply = <&vcc_3v3>;
  40. regulator-always-on;
  41. };
  42. main_12v: regulator-main_12v {
  43. compatible = "regulator-fixed";
  44. regulator-name = "12V";
  45. regulator-min-microvolt = <12000000>;
  46. regulator-max-microvolt = <12000000>;
  47. regulator-always-on;
  48. };
  49. vcc_5v: regulator-vcc_5v {
  50. compatible = "regulator-fixed";
  51. regulator-name = "VCC_5V";
  52. regulator-min-microvolt = <5000000>;
  53. regulator-max-microvolt = <5000000>;
  54. vin-supply = <&main_12v>;
  55. gpio = <&gpio GPIOH_8 GPIO_OPEN_DRAIN>;
  56. enable-active-high;
  57. };
  58. vcc_1v8: regulator-vcc_1v8 {
  59. compatible = "regulator-fixed";
  60. regulator-name = "VCC_1V8";
  61. regulator-min-microvolt = <1800000>;
  62. regulator-max-microvolt = <1800000>;
  63. vin-supply = <&vcc_3v3>;
  64. regulator-always-on;
  65. };
  66. vcc_3v3: regulator-vcc_3v3 {
  67. compatible = "regulator-fixed";
  68. regulator-name = "VCC_3V3";
  69. regulator-min-microvolt = <3300000>;
  70. regulator-max-microvolt = <3300000>;
  71. vin-supply = <&vddao_3v3>;
  72. regulator-always-on;
  73. /* FIXME: actually controlled by VDDCPU_B_EN */
  74. };
  75. vddcpu_a: regulator-vddcpu-a {
  76. /*
  77. * MP1653 Regulator.
  78. */
  79. compatible = "pwm-regulator";
  80. regulator-name = "VDDCPU_A";
  81. regulator-min-microvolt = <721000>;
  82. regulator-max-microvolt = <1022000>;
  83. pwm-supply = <&main_12v>;
  84. pwms = <&pwm_ab 0 1250 0>;
  85. pwm-dutycycle-range = <100 0>;
  86. regulator-boot-on;
  87. regulator-always-on;
  88. };
  89. vddcpu_b: regulator-vddcpu-b {
  90. /*
  91. * MP1652 Regulator.
  92. */
  93. compatible = "pwm-regulator";
  94. regulator-name = "VDDCPU_B";
  95. regulator-min-microvolt = <721000>;
  96. regulator-max-microvolt = <1022000>;
  97. pwm-supply = <&main_12v>;
  98. pwms = <&pwm_AO_cd 1 1250 0>;
  99. pwm-dutycycle-range = <100 0>;
  100. regulator-boot-on;
  101. regulator-always-on;
  102. };
  103. usb1_pow: regulator-usb1-pow {
  104. compatible = "regulator-fixed";
  105. regulator-name = "USB1_POW";
  106. regulator-min-microvolt = <5000000>;
  107. regulator-max-microvolt = <5000000>;
  108. vin-supply = <&vcc_5v>;
  109. /* connected to SY6280A Power Switch */
  110. gpio = <&gpio GPIOA_8 GPIO_ACTIVE_HIGH>;
  111. enable-active-high;
  112. };
  113. usb_pwr_en: regulator-usb-pwr-en {
  114. compatible = "regulator-fixed";
  115. regulator-name = "USB_PWR_EN";
  116. regulator-min-microvolt = <5000000>;
  117. regulator-max-microvolt = <5000000>;
  118. vin-supply = <&vcc_5v>;
  119. /* Connected to USB3 Type-A Port power enable */
  120. gpio = <&gpio GPIOAO_7 GPIO_ACTIVE_HIGH>;
  121. enable-active-high;
  122. };
  123. vddao_1v8: regulator-vddao-1v8 {
  124. compatible = "regulator-fixed";
  125. regulator-name = "VDDAO_1V8";
  126. regulator-min-microvolt = <1800000>;
  127. regulator-max-microvolt = <1800000>;
  128. vin-supply = <&vddao_3v3>;
  129. regulator-always-on;
  130. };
  131. vddao_3v3: regulator-vddao-3v3 {
  132. compatible = "regulator-fixed";
  133. regulator-name = "VDDAO_3V3";
  134. regulator-min-microvolt = <3300000>;
  135. regulator-max-microvolt = <3300000>;
  136. vin-supply = <&main_12v>;
  137. regulator-always-on;
  138. };
  139. cvbs-connector {
  140. compatible = "composite-video-connector";
  141. port {
  142. cvbs_connector_in: endpoint {
  143. remote-endpoint = <&cvbs_vdac_out>;
  144. };
  145. };
  146. };
  147. hdmi-connector {
  148. compatible = "hdmi-connector";
  149. type = "a";
  150. port {
  151. hdmi_connector_in: endpoint {
  152. remote-endpoint = <&hdmi_tx_tmds_out>;
  153. };
  154. };
  155. };
  156. wifi32k: wifi32k {
  157. compatible = "pwm-clock";
  158. #clock-cells = <0>;
  159. clock-frequency = <32768>;
  160. pwms = <&pwm_ef 0 30518 0>; /* PWM_E at 32.768KHz */
  161. };
  162. };
  163. &cec_AO {
  164. pinctrl-0 = <&cec_ao_a_h_pins>;
  165. pinctrl-names = "default";
  166. status = "disabled";
  167. hdmi-phandle = <&hdmi_tx>;
  168. };
  169. &cecb_AO {
  170. pinctrl-0 = <&cec_ao_b_h_pins>;
  171. pinctrl-names = "default";
  172. status = "okay";
  173. hdmi-phandle = <&hdmi_tx>;
  174. };
  175. &cpu0 {
  176. cpu-supply = <&vddcpu_b>;
  177. operating-points-v2 = <&cpu_opp_table_0>;
  178. clocks = <&clkc CLKID_CPU_CLK>;
  179. clock-latency = <50000>;
  180. };
  181. &cpu1 {
  182. cpu-supply = <&vddcpu_b>;
  183. operating-points-v2 = <&cpu_opp_table_0>;
  184. clocks = <&clkc CLKID_CPU_CLK>;
  185. clock-latency = <50000>;
  186. };
  187. &cpu100 {
  188. cpu-supply = <&vddcpu_a>;
  189. operating-points-v2 = <&cpub_opp_table_1>;
  190. clocks = <&clkc CLKID_CPUB_CLK>;
  191. clock-latency = <50000>;
  192. };
  193. &cpu101 {
  194. cpu-supply = <&vddcpu_a>;
  195. operating-points-v2 = <&cpub_opp_table_1>;
  196. clocks = <&clkc CLKID_CPUB_CLK>;
  197. clock-latency = <50000>;
  198. };
  199. &cpu102 {
  200. cpu-supply = <&vddcpu_a>;
  201. operating-points-v2 = <&cpub_opp_table_1>;
  202. clocks = <&clkc CLKID_CPUB_CLK>;
  203. clock-latency = <50000>;
  204. };
  205. &cpu103 {
  206. cpu-supply = <&vddcpu_a>;
  207. operating-points-v2 = <&cpub_opp_table_1>;
  208. clocks = <&clkc CLKID_CPUB_CLK>;
  209. clock-latency = <50000>;
  210. };
  211. &cvbs_vdac_port {
  212. cvbs_vdac_out: endpoint {
  213. remote-endpoint = <&cvbs_connector_in>;
  214. };
  215. };
  216. &ext_mdio {
  217. external_phy: ethernet-phy@0 {
  218. /* Realtek RTL8211F (0x001cc916) */
  219. reg = <0>;
  220. max-speed = <1000>;
  221. reset-assert-us = <10000>;
  222. reset-deassert-us = <80000>;
  223. reset-gpios = <&gpio GPIOZ_15 (GPIO_ACTIVE_LOW | GPIO_OPEN_DRAIN)>;
  224. interrupt-parent = <&gpio_intc>;
  225. /* MAC_INTR on GPIOZ_14 */
  226. interrupts = <26 IRQ_TYPE_LEVEL_LOW>;
  227. };
  228. };
  229. &ethmac {
  230. pinctrl-0 = <&eth_pins>, <&eth_rgmii_pins>;
  231. pinctrl-names = "default";
  232. status = "okay";
  233. phy-mode = "rgmii";
  234. phy-handle = <&external_phy>;
  235. amlogic,tx-delay-ns = <2>;
  236. };
  237. &hdmi_tx {
  238. status = "okay";
  239. pinctrl-0 = <&hdmitx_hpd_pins>, <&hdmitx_ddc_pins>;
  240. pinctrl-names = "default";
  241. hdmi-supply = <&vcc_5v>;
  242. };
  243. &hdmi_tx_tmds_port {
  244. hdmi_tx_tmds_out: endpoint {
  245. remote-endpoint = <&hdmi_connector_in>;
  246. };
  247. };
  248. &ir {
  249. status = "okay";
  250. pinctrl-0 = <&remote_input_ao_pins>;
  251. pinctrl-names = "default";
  252. };
  253. &pwm_ab {
  254. pinctrl-0 = <&pwm_a_e_pins>;
  255. pinctrl-names = "default";
  256. clocks = <&xtal>;
  257. clock-names = "clkin0";
  258. status = "okay";
  259. };
  260. &pwm_AO_cd {
  261. pinctrl-0 = <&pwm_ao_d_e_pins>;
  262. pinctrl-names = "default";
  263. clocks = <&xtal>;
  264. clock-names = "clkin1";
  265. status = "okay";
  266. };
  267. &pwm_ef {
  268. pinctrl-0 = <&pwm_e_pins>;
  269. pinctrl-names = "default";
  270. clocks = <&xtal>;
  271. clock-names = "clkin0";
  272. status = "okay";
  273. };
  274. /* SDIO */
  275. &sd_emmc_a {
  276. status = "okay";
  277. pinctrl-0 = <&sdio_pins>;
  278. pinctrl-1 = <&sdio_clk_gate_pins>;
  279. pinctrl-names = "default", "clk-gate";
  280. #address-cells = <1>;
  281. #size-cells = <0>;
  282. bus-width = <4>;
  283. cap-sd-highspeed;
  284. max-frequency = <100000000>;
  285. /* WiFi firmware requires power to be kept while in suspend */
  286. keep-power-in-suspend;
  287. non-removable;
  288. disable-wp;
  289. mmc-pwrseq = <&sdio_pwrseq>;
  290. vmmc-supply = <&vddao_3v3>;
  291. vqmmc-supply = <&vddao_1v8>;
  292. brcmf: wifi@1 {
  293. reg = <1>;
  294. compatible = "brcm,bcm4329-fmac";
  295. };
  296. };
  297. /* SD card */
  298. &sd_emmc_b {
  299. status = "okay";
  300. pinctrl-0 = <&sdcard_c_pins>;
  301. pinctrl-1 = <&sdcard_clk_gate_c_pins>;
  302. pinctrl-names = "default", "clk-gate";
  303. bus-width = <4>;
  304. cap-sd-highspeed;
  305. max-frequency = <50000000>;
  306. disable-wp;
  307. cd-gpios = <&gpio GPIOC_6 GPIO_ACTIVE_LOW>;
  308. vmmc-supply = <&vddao_3v3>;
  309. vqmmc-supply = <&vddao_3v3>;
  310. };
  311. /* eMMC */
  312. &sd_emmc_c {
  313. status = "okay";
  314. pinctrl-0 = <&emmc_ctrl_pins>, <&emmc_data_8b_pins>, <&emmc_ds_pins>;
  315. pinctrl-1 = <&emmc_clk_gate_pins>;
  316. pinctrl-names = "default", "clk-gate";
  317. bus-width = <8>;
  318. cap-mmc-highspeed;
  319. max-frequency = <100000000>;
  320. disable-wp;
  321. mmc-pwrseq = <&emmc_pwrseq>;
  322. vmmc-supply = <&vcc_3v3>;
  323. vqmmc-supply = <&flash_1v8>;
  324. };
  325. &uart_A {
  326. status = "okay";
  327. pinctrl-0 = <&uart_a_pins>, <&uart_a_cts_rts_pins>;
  328. pinctrl-names = "default";
  329. uart-has-rtscts;
  330. bluetooth {
  331. compatible = "brcm,bcm43438-bt";
  332. shutdown-gpios = <&gpio GPIOX_17 GPIO_ACTIVE_HIGH>;
  333. max-speed = <2000000>;
  334. clocks = <&wifi32k>;
  335. clock-names = "lpo";
  336. };
  337. };
  338. &uart_AO {
  339. status = "okay";
  340. pinctrl-0 = <&uart_ao_a_pins>;
  341. pinctrl-names = "default";
  342. };
  343. &usb {
  344. status = "okay";
  345. dr_mode = "host";
  346. vbus-supply = <&usb_pwr_en>;
  347. };
  348. &usb2_phy0 {
  349. phy-supply = <&usb1_pow>;
  350. };
  351. &usb2_phy1 {
  352. phy-supply = <&usb1_pow>;
  353. };