meson-sm1-odroid.dtsi 9.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467
  1. // SPDX-License-Identifier: (GPL-2.0+ OR MIT)
  2. /*
  3. * Copyright (c) 2020 Dongjin Kim <[email protected]>
  4. */
  5. #include "meson-sm1.dtsi"
  6. #include <dt-bindings/gpio/meson-g12a-gpio.h>
  7. #include <dt-bindings/leds/common.h>
  8. #include <dt-bindings/sound/meson-g12a-tohdmitx.h>
  9. / {
  10. aliases {
  11. serial0 = &uart_AO;
  12. ethernet0 = &ethmac;
  13. };
  14. chosen {
  15. stdout-path = "serial0:115200n8";
  16. };
  17. memory@0 {
  18. device_type = "memory";
  19. reg = <0x0 0x0 0x0 0x40000000>;
  20. };
  21. emmc_pwrseq: emmc-pwrseq {
  22. compatible = "mmc-pwrseq-emmc";
  23. reset-gpios = <&gpio BOOT_12 GPIO_ACTIVE_LOW>;
  24. };
  25. tflash_vdd: regulator-tflash_vdd {
  26. compatible = "regulator-fixed";
  27. regulator-name = "TFLASH_VDD";
  28. regulator-min-microvolt = <3300000>;
  29. regulator-max-microvolt = <3300000>;
  30. gpio = <&gpio_ao GPIOAO_3 GPIO_OPEN_DRAIN>;
  31. enable-active-high;
  32. regulator-always-on;
  33. };
  34. tf_io: gpio-regulator-tf_io {
  35. compatible = "regulator-gpio";
  36. regulator-name = "TF_IO";
  37. regulator-min-microvolt = <1800000>;
  38. regulator-max-microvolt = <3300000>;
  39. vin-supply = <&vcc_5v>;
  40. enable-gpio = <&gpio_ao GPIOE_2 GPIO_OPEN_DRAIN>;
  41. enable-active-high;
  42. regulator-always-on;
  43. gpios = <&gpio_ao GPIOAO_6 GPIO_OPEN_SOURCE>;
  44. gpios-states = <0>;
  45. states = <3300000 0>,
  46. <1800000 1>;
  47. };
  48. flash_1v8: regulator-flash_1v8 {
  49. compatible = "regulator-fixed";
  50. regulator-name = "FLASH_1V8";
  51. regulator-min-microvolt = <1800000>;
  52. regulator-max-microvolt = <1800000>;
  53. vin-supply = <&vcc_3v3>;
  54. regulator-always-on;
  55. };
  56. main_12v: regulator-main_12v {
  57. compatible = "regulator-fixed";
  58. regulator-name = "12V";
  59. regulator-min-microvolt = <12000000>;
  60. regulator-max-microvolt = <12000000>;
  61. regulator-always-on;
  62. };
  63. vcc_5v: regulator-vcc_5v {
  64. compatible = "regulator-fixed";
  65. regulator-name = "5V";
  66. regulator-min-microvolt = <5000000>;
  67. regulator-max-microvolt = <5000000>;
  68. regulator-always-on;
  69. vin-supply = <&main_12v>;
  70. gpio = <&gpio GPIOH_8 GPIO_OPEN_DRAIN>;
  71. enable-active-high;
  72. };
  73. vcc_1v8: regulator-vcc_1v8 {
  74. compatible = "regulator-fixed";
  75. regulator-name = "VCC_1V8";
  76. regulator-min-microvolt = <1800000>;
  77. regulator-max-microvolt = <1800000>;
  78. vin-supply = <&vcc_3v3>;
  79. regulator-always-on;
  80. };
  81. vcc_3v3: regulator-vcc_3v3 {
  82. compatible = "regulator-fixed";
  83. regulator-name = "VCC_3V3";
  84. regulator-min-microvolt = <3300000>;
  85. regulator-max-microvolt = <3300000>;
  86. vin-supply = <&vddao_3v3>;
  87. regulator-always-on;
  88. /* FIXME: actually controlled by VDDCPU_B_EN */
  89. };
  90. vddcpu: regulator-vddcpu {
  91. /*
  92. * MP8756GD Regulator.
  93. */
  94. compatible = "pwm-regulator";
  95. regulator-name = "VDDCPU";
  96. regulator-min-microvolt = <721000>;
  97. regulator-max-microvolt = <1022000>;
  98. pwm-supply = <&main_12v>;
  99. pwms = <&pwm_AO_cd 1 1250 0>;
  100. pwm-dutycycle-range = <100 0>;
  101. regulator-boot-on;
  102. regulator-always-on;
  103. };
  104. usb_pwr_en: regulator-usb_pwr_en {
  105. compatible = "regulator-fixed";
  106. regulator-name = "USB_PWR_EN";
  107. regulator-min-microvolt = <5000000>;
  108. regulator-max-microvolt = <5000000>;
  109. vin-supply = <&vcc_5v>;
  110. /* Connected to the microUSB port power enable */
  111. gpio = <&gpio_ao GPIOAO_2 GPIO_ACTIVE_HIGH>;
  112. enable-active-high;
  113. };
  114. vddao_1v8: regulator-vddao_1v8 {
  115. compatible = "regulator-fixed";
  116. regulator-name = "VDDAO_1V8";
  117. regulator-min-microvolt = <1800000>;
  118. regulator-max-microvolt = <1800000>;
  119. vin-supply = <&vddao_3v3>;
  120. regulator-always-on;
  121. };
  122. vddao_3v3: regulator-vddao_3v3 {
  123. compatible = "regulator-fixed";
  124. regulator-name = "VDDAO_3V3";
  125. regulator-min-microvolt = <3300000>;
  126. regulator-max-microvolt = <3300000>;
  127. vin-supply = <&main_12v>;
  128. regulator-always-on;
  129. };
  130. hdmi-connector {
  131. compatible = "hdmi-connector";
  132. type = "a";
  133. port {
  134. hdmi_connector_in: endpoint {
  135. remote-endpoint = <&hdmi_tx_tmds_out>;
  136. };
  137. };
  138. };
  139. sound {
  140. compatible = "amlogic,axg-sound-card";
  141. audio-aux-devs = <&tdmout_b>;
  142. audio-routing = "TDMOUT_B IN 0", "FRDDR_A OUT 1",
  143. "TDMOUT_B IN 1", "FRDDR_B OUT 1",
  144. "TDMOUT_B IN 2", "FRDDR_C OUT 1",
  145. "TDM_B Playback", "TDMOUT_B OUT";
  146. assigned-clocks = <&clkc CLKID_MPLL2>,
  147. <&clkc CLKID_MPLL0>,
  148. <&clkc CLKID_MPLL1>;
  149. assigned-clock-parents = <0>, <0>, <0>;
  150. assigned-clock-rates = <294912000>,
  151. <270950400>,
  152. <393216000>;
  153. status = "okay";
  154. dai-link-0 {
  155. sound-dai = <&frddr_a>;
  156. };
  157. dai-link-1 {
  158. sound-dai = <&frddr_b>;
  159. };
  160. dai-link-2 {
  161. sound-dai = <&frddr_c>;
  162. };
  163. /* 8ch hdmi interface */
  164. dai-link-3 {
  165. sound-dai = <&tdmif_b>;
  166. dai-format = "i2s";
  167. dai-tdm-slot-tx-mask-0 = <1 1>;
  168. dai-tdm-slot-tx-mask-1 = <1 1>;
  169. dai-tdm-slot-tx-mask-2 = <1 1>;
  170. dai-tdm-slot-tx-mask-3 = <1 1>;
  171. mclk-fs = <256>;
  172. codec {
  173. sound-dai = <&tohdmitx TOHDMITX_I2S_IN_B>;
  174. };
  175. };
  176. /* hdmi glue */
  177. dai-link-4 {
  178. sound-dai = <&tohdmitx TOHDMITX_I2S_OUT>;
  179. codec {
  180. sound-dai = <&hdmi_tx>;
  181. };
  182. };
  183. };
  184. };
  185. &arb {
  186. status = "okay";
  187. };
  188. &cec_AO {
  189. pinctrl-0 = <&cec_ao_a_h_pins>;
  190. pinctrl-names = "default";
  191. status = "disabled";
  192. hdmi-phandle = <&hdmi_tx>;
  193. };
  194. &cecb_AO {
  195. pinctrl-0 = <&cec_ao_b_h_pins>;
  196. pinctrl-names = "default";
  197. status = "okay";
  198. hdmi-phandle = <&hdmi_tx>;
  199. };
  200. &clkc_audio {
  201. status = "okay";
  202. };
  203. &cpu0 {
  204. cpu-supply = <&vddcpu>;
  205. operating-points-v2 = <&cpu_opp_table>;
  206. clocks = <&clkc CLKID_CPU_CLK>;
  207. clock-latency = <50000>;
  208. };
  209. &cpu1 {
  210. cpu-supply = <&vddcpu>;
  211. operating-points-v2 = <&cpu_opp_table>;
  212. clocks = <&clkc CLKID_CPU1_CLK>;
  213. clock-latency = <50000>;
  214. };
  215. &cpu2 {
  216. cpu-supply = <&vddcpu>;
  217. operating-points-v2 = <&cpu_opp_table>;
  218. clocks = <&clkc CLKID_CPU2_CLK>;
  219. clock-latency = <50000>;
  220. };
  221. &cpu3 {
  222. cpu-supply = <&vddcpu>;
  223. operating-points-v2 = <&cpu_opp_table>;
  224. clocks = <&clkc CLKID_CPU3_CLK>;
  225. clock-latency = <50000>;
  226. };
  227. &ext_mdio {
  228. external_phy: ethernet-phy@0 {
  229. /* Realtek RTL8211F (0x001cc916) */
  230. reg = <0>;
  231. max-speed = <1000>;
  232. reset-assert-us = <10000>;
  233. reset-deassert-us = <80000>;
  234. reset-gpios = <&gpio GPIOZ_15 (GPIO_ACTIVE_LOW | GPIO_OPEN_DRAIN)>;
  235. interrupt-parent = <&gpio_intc>;
  236. /* MAC_INTR on GPIOZ_14 */
  237. interrupts = <26 IRQ_TYPE_LEVEL_LOW>;
  238. };
  239. };
  240. &ethmac {
  241. pinctrl-0 = <&eth_pins>, <&eth_rgmii_pins>;
  242. pinctrl-names = "default";
  243. status = "okay";
  244. phy-mode = "rgmii";
  245. phy-handle = <&external_phy>;
  246. amlogic,tx-delay-ns = <2>;
  247. };
  248. &frddr_a {
  249. status = "okay";
  250. };
  251. &frddr_b {
  252. status = "okay";
  253. };
  254. &frddr_c {
  255. status = "okay";
  256. };
  257. &gpio {
  258. gpio-line-names =
  259. /* GPIOZ */
  260. "", "", "", "", "", "", "", "",
  261. "", "", "", "", "", "", "", "",
  262. /* GPIOH */
  263. "", "", "", "", "",
  264. "PIN_36", /* GPIOH_5 */
  265. "PIN_26", /* GPIOH_6 */
  266. "PIN_32", /* GPIOH_7 */
  267. "",
  268. /* BOOT */
  269. "", "", "", "", "", "", "", "",
  270. "", "", "", "", "", "", "", "",
  271. /* GPIOC */
  272. "", "", "", "", "", "", "", "",
  273. /* GPIOA */
  274. "", "", "", "", "", "", "", "",
  275. "", "", "", "", "", "",
  276. "PIN_27", /* GPIOA_14 */
  277. "PIN_28", /* GPIOA_15 */
  278. /* GPIOX */
  279. "PIN_16", /* GPIOX_0 */
  280. "PIN_18", /* GPIOX_1 */
  281. "PIN_22", /* GPIOX_2 */
  282. "PIN_11", /* GPIOX_3 */
  283. "PIN_13", /* GPIOX_4 */
  284. "PIN_7", /* GPIOX_5 */
  285. "PIN_33", /* GPIOX_6 */
  286. "PIN_15", /* GPIOX_7 */
  287. "PIN_19", /* GPIOX_8 */
  288. "PIN_21", /* GPIOX_9 */
  289. "PIN_24", /* GPIOX_10 */
  290. "PIN_23", /* GPIOX_11 */
  291. "PIN_8", /* GPIOX_12 */
  292. "PIN_10", /* GPIOX_13 */
  293. "PIN_29", /* GPIOX_14 */
  294. "PIN_31", /* GPIOX_15 */
  295. "PIN_12", /* GPIOX_16 */
  296. "PIN_3", /* GPIOX_17 */
  297. "PIN_5", /* GPIOX_18 */
  298. "PIN_35"; /* GPIOX_19 */
  299. };
  300. &gpio_ao {
  301. gpio-line-names =
  302. /* GPIOAO */
  303. "", "", "", "",
  304. "PIN_47", /* GPIOAO_4 */
  305. "", "",
  306. "PIN_45", /* GPIOAO_7 */
  307. "PIN_46", /* GPIOAO_8 */
  308. "PIN_44", /* GPIOAO_9 */
  309. "PIN_42", /* GPIOAO_10 */
  310. "",
  311. /* GPIOE */
  312. "", "", "";
  313. };
  314. &hdmi_tx {
  315. status = "okay";
  316. pinctrl-0 = <&hdmitx_hpd_pins>, <&hdmitx_ddc_pins>;
  317. pinctrl-names = "default";
  318. hdmi-supply = <&vcc_5v>;
  319. };
  320. &hdmi_tx_tmds_port {
  321. hdmi_tx_tmds_out: endpoint {
  322. remote-endpoint = <&hdmi_connector_in>;
  323. };
  324. };
  325. &ir {
  326. status = "okay";
  327. pinctrl-0 = <&remote_input_ao_pins>;
  328. pinctrl-names = "default";
  329. };
  330. &pwm_AO_cd {
  331. pinctrl-0 = <&pwm_ao_d_e_pins>;
  332. pinctrl-names = "default";
  333. clocks = <&xtal>;
  334. clock-names = "clkin1";
  335. status = "okay";
  336. };
  337. &saradc {
  338. status = "okay";
  339. };
  340. /* SD card */
  341. &sd_emmc_b {
  342. status = "okay";
  343. pinctrl-0 = <&sdcard_c_pins>;
  344. pinctrl-1 = <&sdcard_clk_gate_c_pins>;
  345. pinctrl-names = "default", "clk-gate";
  346. bus-width = <4>;
  347. cap-sd-highspeed;
  348. max-frequency = <200000000>;
  349. sd-uhs-sdr12;
  350. sd-uhs-sdr25;
  351. sd-uhs-sdr50;
  352. sd-uhs-sdr104;
  353. disable-wp;
  354. cd-gpios = <&gpio GPIOC_6 GPIO_ACTIVE_LOW>;
  355. vmmc-supply = <&tflash_vdd>;
  356. vqmmc-supply = <&tf_io>;
  357. };
  358. /* eMMC */
  359. &sd_emmc_c {
  360. status = "okay";
  361. pinctrl-0 = <&emmc_ctrl_pins>, <&emmc_data_8b_pins>, <&emmc_ds_pins>;
  362. pinctrl-1 = <&emmc_clk_gate_pins>;
  363. pinctrl-names = "default", "clk-gate";
  364. bus-width = <8>;
  365. cap-mmc-highspeed;
  366. mmc-ddr-1_8v;
  367. mmc-hs200-1_8v;
  368. max-frequency = <200000000>;
  369. disable-wp;
  370. mmc-pwrseq = <&emmc_pwrseq>;
  371. vmmc-supply = <&vcc_3v3>;
  372. vqmmc-supply = <&flash_1v8>;
  373. };
  374. &tdmif_b {
  375. status = "okay";
  376. };
  377. &tdmout_b {
  378. status = "okay";
  379. };
  380. &tohdmitx {
  381. status = "okay";
  382. };
  383. &uart_AO {
  384. status = "okay";
  385. pinctrl-0 = <&uart_ao_a_pins>;
  386. pinctrl-names = "default";
  387. };
  388. &usb {
  389. status = "okay";
  390. vbus-supply = <&usb_pwr_en>;
  391. };
  392. &usb2_phy0 {
  393. phy-supply = <&vcc_5v>;
  394. };