meson-sm1-sei610.dts 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607
  1. // SPDX-License-Identifier: (GPL-2.0+ OR MIT)
  2. /*
  3. * Copyright (c) 2019 BayLibre SAS. All rights reserved.
  4. */
  5. /dts-v1/;
  6. #include "meson-sm1.dtsi"
  7. #include <dt-bindings/gpio/gpio.h>
  8. #include <dt-bindings/input/input.h>
  9. #include <dt-bindings/gpio/meson-g12a-gpio.h>
  10. #include <dt-bindings/sound/meson-g12a-tohdmitx.h>
  11. / {
  12. compatible = "seirobotics,sei610", "amlogic,sm1";
  13. model = "SEI Robotics SEI610";
  14. aliases {
  15. serial0 = &uart_AO;
  16. ethernet0 = &ethmac;
  17. };
  18. mono_dac: audio-codec-0 {
  19. compatible = "maxim,max98357a";
  20. #sound-dai-cells = <0>;
  21. sound-name-prefix = "U16";
  22. sdmode-gpios = <&gpio GPIOX_8 GPIO_ACTIVE_HIGH>;
  23. };
  24. dmics: audio-codec-1 {
  25. #sound-dai-cells = <0>;
  26. compatible = "dmic-codec";
  27. num-channels = <2>;
  28. wakeup-delay-ms = <50>;
  29. status = "okay";
  30. sound-name-prefix = "MIC";
  31. };
  32. chosen {
  33. stdout-path = "serial0:115200n8";
  34. };
  35. emmc_pwrseq: emmc-pwrseq {
  36. compatible = "mmc-pwrseq-emmc";
  37. reset-gpios = <&gpio BOOT_12 GPIO_ACTIVE_LOW>;
  38. };
  39. gpio-keys {
  40. compatible = "gpio-keys";
  41. key-1 {
  42. label = "A";
  43. linux,code = <BTN_0>;
  44. gpios = <&gpio GPIOH_6 GPIO_ACTIVE_LOW>;
  45. interrupt-parent = <&gpio_intc>;
  46. interrupts = <34 IRQ_TYPE_EDGE_BOTH>;
  47. };
  48. key-2 {
  49. label = "B";
  50. linux,code = <BTN_1>;
  51. gpios = <&gpio GPIOH_7 GPIO_ACTIVE_LOW>;
  52. interrupt-parent = <&gpio_intc>;
  53. interrupts = <35 IRQ_TYPE_EDGE_BOTH>;
  54. };
  55. key-3 {
  56. label = "C";
  57. linux,code = <BTN_2>;
  58. gpios = <&gpio_ao GPIOAO_2 GPIO_ACTIVE_LOW>;
  59. interrupt-parent = <&gpio_intc>;
  60. interrupts = <2 IRQ_TYPE_EDGE_BOTH>;
  61. };
  62. key-mic-mute {
  63. label = "MicMute";
  64. linux,code = <SW_MUTE_DEVICE>;
  65. linux,input-type = <EV_SW>;
  66. gpios = <&gpio_ao GPIOE_2 GPIO_ACTIVE_LOW>;
  67. interrupt-parent = <&gpio_intc>;
  68. interrupts = <99 IRQ_TYPE_EDGE_BOTH>;
  69. };
  70. key-power {
  71. label = "PowerKey";
  72. linux,code = <KEY_POWER>;
  73. gpios = <&gpio_ao GPIOAO_3 GPIO_ACTIVE_LOW>;
  74. interrupt-parent = <&gpio_intc>;
  75. interrupts = <3 IRQ_TYPE_EDGE_BOTH>;
  76. };
  77. };
  78. hdmi-connector {
  79. compatible = "hdmi-connector";
  80. type = "a";
  81. port {
  82. hdmi_connector_in: endpoint {
  83. remote-endpoint = <&hdmi_tx_tmds_out>;
  84. };
  85. };
  86. };
  87. led-controller-1 {
  88. compatible = "gpio-leds";
  89. led-1 {
  90. label = "sei610:blue:bt";
  91. gpios = <&gpio GPIOC_7 (GPIO_ACTIVE_LOW | GPIO_OPEN_DRAIN)>;
  92. default-state = "off";
  93. };
  94. };
  95. led-controller-2 {
  96. compatible = "pwm-leds";
  97. led-2 {
  98. label = "sei610:red:power";
  99. pwms = <&pwm_AO_ab 0 30518 0>;
  100. max-brightness = <255>;
  101. linux,default-trigger = "default-on";
  102. active-low;
  103. };
  104. };
  105. memory@0 {
  106. device_type = "memory";
  107. reg = <0x0 0x0 0x0 0x40000000>;
  108. };
  109. ao_5v: regulator-ao_5v {
  110. compatible = "regulator-fixed";
  111. regulator-name = "AO_5V";
  112. regulator-min-microvolt = <5000000>;
  113. regulator-max-microvolt = <5000000>;
  114. vin-supply = <&dc_in>;
  115. regulator-always-on;
  116. };
  117. dc_in: regulator-dc_in {
  118. compatible = "regulator-fixed";
  119. regulator-name = "DC_IN";
  120. regulator-min-microvolt = <5000000>;
  121. regulator-max-microvolt = <5000000>;
  122. regulator-always-on;
  123. };
  124. emmc_1v8: regulator-emmc_1v8 {
  125. compatible = "regulator-fixed";
  126. regulator-name = "EMMC_1V8";
  127. regulator-min-microvolt = <1800000>;
  128. regulator-max-microvolt = <1800000>;
  129. vin-supply = <&vddao_3v3>;
  130. regulator-always-on;
  131. };
  132. vddao_3v3: regulator-vddao_3v3 {
  133. compatible = "regulator-fixed";
  134. regulator-name = "VDDAO_3V3";
  135. regulator-min-microvolt = <3300000>;
  136. regulator-max-microvolt = <3300000>;
  137. vin-supply = <&dc_in>;
  138. regulator-always-on;
  139. };
  140. /* Used by Tuner, RGB Led & IR Emitter LED array */
  141. vddao_3v3_t: regulator-vddao_3v3_t {
  142. compatible = "regulator-fixed";
  143. regulator-name = "VDDAO_3V3_T";
  144. regulator-min-microvolt = <3300000>;
  145. regulator-max-microvolt = <3300000>;
  146. vin-supply = <&vddao_3v3>;
  147. gpio = <&gpio GPIOH_8 GPIO_OPEN_DRAIN>;
  148. regulator-always-on;
  149. };
  150. vddcpu: regulator-vddcpu {
  151. /*
  152. * SY8120B1ABC DC/DC Regulator.
  153. */
  154. compatible = "pwm-regulator";
  155. regulator-name = "VDDCPU";
  156. regulator-min-microvolt = <690000>;
  157. regulator-max-microvolt = <1050000>;
  158. pwm-supply = <&dc_in>;
  159. pwms = <&pwm_AO_cd 1 1500 0>;
  160. pwm-dutycycle-range = <100 0>;
  161. regulator-boot-on;
  162. regulator-always-on;
  163. };
  164. vddio_ao1v8: regulator-vddio_ao1v8 {
  165. compatible = "regulator-fixed";
  166. regulator-name = "VDDIO_AO1V8";
  167. regulator-min-microvolt = <1800000>;
  168. regulator-max-microvolt = <1800000>;
  169. vin-supply = <&vddao_3v3>;
  170. regulator-always-on;
  171. };
  172. sdio_pwrseq: sdio-pwrseq {
  173. compatible = "mmc-pwrseq-simple";
  174. reset-gpios = <&gpio GPIOX_6 GPIO_ACTIVE_LOW>;
  175. clocks = <&wifi32k>;
  176. clock-names = "ext_clock";
  177. };
  178. sound {
  179. compatible = "amlogic,axg-sound-card";
  180. model = "SEI610";
  181. audio-aux-devs = <&tdmout_a>, <&tdmout_b>,
  182. <&tdmin_a>, <&tdmin_b>;
  183. audio-routing = "TDMOUT_A IN 0", "FRDDR_A OUT 0",
  184. "TDMOUT_A IN 1", "FRDDR_B OUT 0",
  185. "TDMOUT_A IN 2", "FRDDR_C OUT 0",
  186. "TDM_A Playback", "TDMOUT_A OUT",
  187. "TDMOUT_B IN 0", "FRDDR_A OUT 1",
  188. "TDMOUT_B IN 1", "FRDDR_B OUT 1",
  189. "TDMOUT_B IN 2", "FRDDR_C OUT 1",
  190. "TDM_B Playback", "TDMOUT_B OUT",
  191. "TODDR_A IN 4", "PDM Capture",
  192. "TODDR_B IN 4", "PDM Capture",
  193. "TODDR_C IN 4", "PDM Capture",
  194. "TDMIN_A IN 0", "TDM_A Capture",
  195. "TDMIN_A IN 3", "TDM_A Loopback",
  196. "TDMIN_B IN 0", "TDM_A Capture",
  197. "TDMIN_B IN 3", "TDM_A Loopback",
  198. "TDMIN_A IN 1", "TDM_B Capture",
  199. "TDMIN_A IN 4", "TDM_B Loopback",
  200. "TDMIN_B IN 1", "TDM_B Capture",
  201. "TDMIN_B IN 4", "TDM_B Loopback",
  202. "TODDR_A IN 0", "TDMIN_A OUT",
  203. "TODDR_B IN 0", "TDMIN_A OUT",
  204. "TODDR_C IN 0", "TDMIN_A OUT",
  205. "TODDR_A IN 1", "TDMIN_B OUT",
  206. "TODDR_B IN 1", "TDMIN_B OUT",
  207. "TODDR_C IN 1", "TDMIN_B OUT";
  208. assigned-clocks = <&clkc CLKID_MPLL2>,
  209. <&clkc CLKID_MPLL0>,
  210. <&clkc CLKID_MPLL1>;
  211. assigned-clock-parents = <0>, <0>, <0>;
  212. assigned-clock-rates = <294912000>,
  213. <270950400>,
  214. <393216000>;
  215. status = "okay";
  216. dai-link-0 {
  217. sound-dai = <&frddr_a>;
  218. };
  219. dai-link-1 {
  220. sound-dai = <&frddr_b>;
  221. };
  222. dai-link-2 {
  223. sound-dai = <&frddr_c>;
  224. };
  225. dai-link-3 {
  226. sound-dai = <&toddr_a>;
  227. };
  228. dai-link-4 {
  229. sound-dai = <&toddr_b>;
  230. };
  231. dai-link-5 {
  232. sound-dai = <&toddr_c>;
  233. };
  234. /* internal speaker interface */
  235. dai-link-6 {
  236. sound-dai = <&tdmif_a>;
  237. dai-format = "i2s";
  238. dai-tdm-slot-tx-mask-0 = <1 1>;
  239. mclk-fs = <256>;
  240. codec-0 {
  241. sound-dai = <&mono_dac>;
  242. };
  243. codec-1 {
  244. sound-dai = <&tohdmitx TOHDMITX_I2S_IN_A>;
  245. };
  246. };
  247. /* 8ch hdmi interface */
  248. dai-link-7 {
  249. sound-dai = <&tdmif_b>;
  250. dai-format = "i2s";
  251. dai-tdm-slot-tx-mask-0 = <1 1>;
  252. dai-tdm-slot-tx-mask-1 = <1 1>;
  253. dai-tdm-slot-tx-mask-2 = <1 1>;
  254. dai-tdm-slot-tx-mask-3 = <1 1>;
  255. mclk-fs = <256>;
  256. codec {
  257. sound-dai = <&tohdmitx TOHDMITX_I2S_IN_B>;
  258. };
  259. };
  260. /* internal digital mics */
  261. dai-link-8 {
  262. sound-dai = <&pdm>;
  263. codec {
  264. sound-dai = <&dmics>;
  265. };
  266. };
  267. /* hdmi glue */
  268. dai-link-9 {
  269. sound-dai = <&tohdmitx TOHDMITX_I2S_OUT>;
  270. codec {
  271. sound-dai = <&hdmi_tx>;
  272. };
  273. };
  274. };
  275. wifi32k: wifi32k {
  276. compatible = "pwm-clock";
  277. #clock-cells = <0>;
  278. clock-frequency = <32768>;
  279. pwms = <&pwm_ef 0 30518 0>; /* PWM_E at 32.768KHz */
  280. };
  281. };
  282. &arb {
  283. status = "okay";
  284. };
  285. &cec_AO {
  286. pinctrl-0 = <&cec_ao_a_h_pins>;
  287. pinctrl-names = "default";
  288. status = "disabled";
  289. hdmi-phandle = <&hdmi_tx>;
  290. };
  291. &cecb_AO {
  292. pinctrl-0 = <&cec_ao_b_h_pins>;
  293. pinctrl-names = "default";
  294. status = "okay";
  295. hdmi-phandle = <&hdmi_tx>;
  296. };
  297. &clkc_audio {
  298. status = "okay";
  299. };
  300. &cpu0 {
  301. cpu-supply = <&vddcpu>;
  302. operating-points-v2 = <&cpu_opp_table>;
  303. clocks = <&clkc CLKID_CPU_CLK>;
  304. clock-latency = <50000>;
  305. };
  306. &cpu1 {
  307. cpu-supply = <&vddcpu>;
  308. operating-points-v2 = <&cpu_opp_table>;
  309. clocks = <&clkc CLKID_CPU1_CLK>;
  310. clock-latency = <50000>;
  311. };
  312. &cpu2 {
  313. cpu-supply = <&vddcpu>;
  314. operating-points-v2 = <&cpu_opp_table>;
  315. clocks = <&clkc CLKID_CPU2_CLK>;
  316. clock-latency = <50000>;
  317. };
  318. &cpu3 {
  319. cpu-supply = <&vddcpu>;
  320. operating-points-v2 = <&cpu_opp_table>;
  321. clocks = <&clkc CLKID_CPU3_CLK>;
  322. clock-latency = <50000>;
  323. };
  324. &ethmac {
  325. status = "okay";
  326. phy-handle = <&internal_ephy>;
  327. phy-mode = "rmii";
  328. };
  329. &frddr_a {
  330. status = "okay";
  331. };
  332. &frddr_b {
  333. status = "okay";
  334. };
  335. &frddr_c {
  336. status = "okay";
  337. };
  338. &hdmi_tx {
  339. status = "okay";
  340. pinctrl-0 = <&hdmitx_hpd_pins>, <&hdmitx_ddc_pins>;
  341. pinctrl-names = "default";
  342. };
  343. &hdmi_tx_tmds_port {
  344. hdmi_tx_tmds_out: endpoint {
  345. remote-endpoint = <&hdmi_connector_in>;
  346. };
  347. };
  348. &i2c3 {
  349. status = "okay";
  350. pinctrl-0 = <&i2c3_sda_a_pins>, <&i2c3_sck_a_pins>;
  351. pinctrl-names = "default";
  352. };
  353. &ir {
  354. status = "okay";
  355. pinctrl-0 = <&remote_input_ao_pins>;
  356. pinctrl-names = "default";
  357. };
  358. &pdm {
  359. pinctrl-0 = <&pdm_din0_z_pins>, <&pdm_dclk_z_pins>;
  360. pinctrl-names = "default";
  361. status = "okay";
  362. };
  363. &pwm_AO_ab {
  364. status = "okay";
  365. pinctrl-0 = <&pwm_ao_a_pins>;
  366. pinctrl-names = "default";
  367. clocks = <&xtal>;
  368. clock-names = "clkin0";
  369. };
  370. &pwm_AO_cd {
  371. pinctrl-0 = <&pwm_ao_d_e_pins>;
  372. pinctrl-names = "default";
  373. clocks = <&xtal>;
  374. clock-names = "clkin1";
  375. status = "okay";
  376. };
  377. &pwm_ef {
  378. status = "okay";
  379. pinctrl-0 = <&pwm_e_pins>;
  380. pinctrl-names = "default";
  381. clocks = <&xtal>;
  382. clock-names = "clkin0";
  383. };
  384. &saradc {
  385. status = "okay";
  386. vref-supply = <&vddio_ao1v8>;
  387. };
  388. /* SDIO */
  389. &sd_emmc_a {
  390. status = "okay";
  391. pinctrl-0 = <&sdio_pins>;
  392. pinctrl-1 = <&sdio_clk_gate_pins>;
  393. pinctrl-names = "default", "clk-gate";
  394. #address-cells = <1>;
  395. #size-cells = <0>;
  396. bus-width = <4>;
  397. cap-sd-highspeed;
  398. sd-uhs-sdr50;
  399. max-frequency = <100000000>;
  400. non-removable;
  401. disable-wp;
  402. /* WiFi firmware requires power to be kept while in suspend */
  403. keep-power-in-suspend;
  404. mmc-pwrseq = <&sdio_pwrseq>;
  405. vmmc-supply = <&vddao_3v3>;
  406. vqmmc-supply = <&vddio_ao1v8>;
  407. brcmf: wifi@1 {
  408. reg = <1>;
  409. compatible = "brcm,bcm4329-fmac";
  410. };
  411. };
  412. /* SD card */
  413. &sd_emmc_b {
  414. status = "okay";
  415. pinctrl-0 = <&sdcard_c_pins>;
  416. pinctrl-1 = <&sdcard_clk_gate_c_pins>;
  417. pinctrl-names = "default", "clk-gate";
  418. bus-width = <4>;
  419. cap-sd-highspeed;
  420. max-frequency = <50000000>;
  421. disable-wp;
  422. cd-gpios = <&gpio GPIOC_6 GPIO_ACTIVE_LOW>;
  423. vmmc-supply = <&vddao_3v3>;
  424. vqmmc-supply = <&vddao_3v3>;
  425. };
  426. /* eMMC */
  427. &sd_emmc_c {
  428. status = "okay";
  429. pinctrl-0 = <&emmc_ctrl_pins>, <&emmc_data_8b_pins>, <&emmc_ds_pins>;
  430. pinctrl-1 = <&emmc_clk_gate_pins>;
  431. pinctrl-names = "default", "clk-gate";
  432. bus-width = <8>;
  433. cap-mmc-highspeed;
  434. mmc-ddr-1_8v;
  435. mmc-hs200-1_8v;
  436. max-frequency = <200000000>;
  437. non-removable;
  438. disable-wp;
  439. mmc-pwrseq = <&emmc_pwrseq>;
  440. vmmc-supply = <&vddao_3v3>;
  441. vqmmc-supply = <&emmc_1v8>;
  442. };
  443. &tdmif_a {
  444. pinctrl-0 = <&tdm_a_dout0_pins>, <&tdm_a_fs_pins>, <&tdm_a_sclk_pins>;
  445. pinctrl-names = "default";
  446. status = "okay";
  447. assigned-clocks = <&clkc_audio AUD_CLKID_TDM_SCLK_PAD0>,
  448. <&clkc_audio AUD_CLKID_TDM_LRCLK_PAD0>;
  449. assigned-clock-parents = <&clkc_audio AUD_CLKID_MST_A_SCLK>,
  450. <&clkc_audio AUD_CLKID_MST_A_LRCLK>;
  451. assigned-clock-rates = <0>, <0>;
  452. };
  453. &tdmif_b {
  454. status = "okay";
  455. };
  456. &tdmin_a {
  457. status = "okay";
  458. };
  459. &tdmin_b {
  460. status = "okay";
  461. };
  462. &tdmout_a {
  463. status = "okay";
  464. };
  465. &tdmout_b {
  466. status = "okay";
  467. };
  468. &toddr_a {
  469. status = "okay";
  470. };
  471. &toddr_b {
  472. status = "okay";
  473. };
  474. &toddr_c {
  475. status = "okay";
  476. };
  477. &tohdmitx {
  478. status = "okay";
  479. };
  480. &uart_A {
  481. status = "okay";
  482. pinctrl-0 = <&uart_a_pins>, <&uart_a_cts_rts_pins>;
  483. pinctrl-names = "default";
  484. uart-has-rtscts;
  485. bluetooth {
  486. compatible = "brcm,bcm43438-bt";
  487. interrupt-parent = <&gpio_intc>;
  488. interrupts = <95 IRQ_TYPE_LEVEL_HIGH>;
  489. interrupt-names = "host-wakeup";
  490. shutdown-gpios = <&gpio GPIOX_17 GPIO_ACTIVE_HIGH>;
  491. max-speed = <2000000>;
  492. clocks = <&wifi32k>;
  493. clock-names = "lpo";
  494. vbat-supply = <&vddao_3v3>;
  495. vddio-supply = <&vddio_ao1v8>;
  496. };
  497. };
  498. /* Exposed via the on-board USB to Serial FT232RL IC */
  499. &uart_AO {
  500. status = "okay";
  501. pinctrl-0 = <&uart_ao_a_pins>;
  502. pinctrl-names = "default";
  503. };
  504. &usb {
  505. status = "okay";
  506. dr_mode = "otg";
  507. };