meson-sm1-sei610.dts 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616
  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. key1 {
  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. key2 {
  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. key3 {
  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. 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. power_key {
  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. leds {
  88. compatible = "gpio-leds";
  89. bluetooth {
  90. label = "sei610:blue:bt";
  91. gpios = <&gpio GPIOC_7 (GPIO_ACTIVE_LOW | GPIO_OPEN_DRAIN)>;
  92. default-state = "off";
  93. };
  94. };
  95. pwmleds {
  96. compatible = "pwm-leds";
  97. power {
  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. enable-active-low;
  149. regulator-always-on;
  150. };
  151. vddcpu: regulator-vddcpu {
  152. /*
  153. * SY8120B1ABC DC/DC Regulator.
  154. */
  155. compatible = "pwm-regulator";
  156. regulator-name = "VDDCPU";
  157. regulator-min-microvolt = <690000>;
  158. regulator-max-microvolt = <1050000>;
  159. vin-supply = <&dc_in>;
  160. pwms = <&pwm_AO_cd 1 1500 0>;
  161. pwm-dutycycle-range = <100 0>;
  162. regulator-boot-on;
  163. regulator-always-on;
  164. };
  165. vddio_ao1v8: regulator-vddio_ao1v8 {
  166. compatible = "regulator-fixed";
  167. regulator-name = "VDDIO_AO1V8";
  168. regulator-min-microvolt = <1800000>;
  169. regulator-max-microvolt = <1800000>;
  170. vin-supply = <&vddao_3v3>;
  171. regulator-always-on;
  172. };
  173. reserved-memory {
  174. /* TEE Reserved Memory */
  175. bl32_reserved: bl32@5000000 {
  176. reg = <0x0 0x05300000 0x0 0x2000000>;
  177. no-map;
  178. };
  179. };
  180. sdio_pwrseq: sdio-pwrseq {
  181. compatible = "mmc-pwrseq-simple";
  182. reset-gpios = <&gpio GPIOX_6 GPIO_ACTIVE_LOW>;
  183. clocks = <&wifi32k>;
  184. clock-names = "ext_clock";
  185. };
  186. sound {
  187. compatible = "amlogic,axg-sound-card";
  188. model = "SM1-SEI610";
  189. audio-aux-devs = <&tdmout_a>, <&tdmout_b>,
  190. <&tdmin_a>, <&tdmin_b>;
  191. audio-routing = "TDMOUT_A IN 0", "FRDDR_A OUT 0",
  192. "TDMOUT_A IN 1", "FRDDR_B OUT 0",
  193. "TDMOUT_A IN 2", "FRDDR_C OUT 0",
  194. "TDM_A Playback", "TDMOUT_A OUT",
  195. "TDMOUT_B IN 0", "FRDDR_A OUT 1",
  196. "TDMOUT_B IN 1", "FRDDR_B OUT 1",
  197. "TDMOUT_B IN 2", "FRDDR_C OUT 1",
  198. "TDM_B Playback", "TDMOUT_B OUT",
  199. "TODDR_A IN 4", "PDM Capture",
  200. "TODDR_B IN 4", "PDM Capture",
  201. "TODDR_C IN 4", "PDM Capture",
  202. "TDMIN_A IN 0", "TDM_A Capture",
  203. "TDMIN_A IN 3", "TDM_A Loopback",
  204. "TDMIN_B IN 0", "TDM_A Capture",
  205. "TDMIN_B IN 3", "TDM_A Loopback",
  206. "TDMIN_A IN 1", "TDM_B Capture",
  207. "TDMIN_A IN 4", "TDM_B Loopback",
  208. "TDMIN_B IN 1", "TDM_B Capture",
  209. "TDMIN_B IN 4", "TDM_B Loopback",
  210. "TODDR_A IN 0", "TDMIN_A OUT",
  211. "TODDR_B IN 0", "TDMIN_A OUT",
  212. "TODDR_C IN 0", "TDMIN_A OUT",
  213. "TODDR_A IN 1", "TDMIN_B OUT",
  214. "TODDR_B IN 1", "TDMIN_B OUT",
  215. "TODDR_C IN 1", "TDMIN_B OUT";
  216. assigned-clocks = <&clkc CLKID_MPLL2>,
  217. <&clkc CLKID_MPLL0>,
  218. <&clkc CLKID_MPLL1>;
  219. assigned-clock-parents = <0>, <0>, <0>;
  220. assigned-clock-rates = <294912000>,
  221. <270950400>,
  222. <393216000>;
  223. status = "okay";
  224. dai-link-0 {
  225. sound-dai = <&frddr_a>;
  226. };
  227. dai-link-1 {
  228. sound-dai = <&frddr_b>;
  229. };
  230. dai-link-2 {
  231. sound-dai = <&frddr_c>;
  232. };
  233. dai-link-3 {
  234. sound-dai = <&toddr_a>;
  235. };
  236. dai-link-4 {
  237. sound-dai = <&toddr_b>;
  238. };
  239. dai-link-5 {
  240. sound-dai = <&toddr_c>;
  241. };
  242. /* internal speaker interface */
  243. dai-link-6 {
  244. sound-dai = <&tdmif_a>;
  245. dai-format = "i2s";
  246. dai-tdm-slot-tx-mask-0 = <1 1>;
  247. mclk-fs = <256>;
  248. codec-0 {
  249. sound-dai = <&mono_dac>;
  250. };
  251. codec-1 {
  252. sound-dai = <&tohdmitx TOHDMITX_I2S_IN_A>;
  253. };
  254. };
  255. /* 8ch hdmi interface */
  256. dai-link-7 {
  257. sound-dai = <&tdmif_b>;
  258. dai-format = "i2s";
  259. dai-tdm-slot-tx-mask-0 = <1 1>;
  260. dai-tdm-slot-tx-mask-1 = <1 1>;
  261. dai-tdm-slot-tx-mask-2 = <1 1>;
  262. dai-tdm-slot-tx-mask-3 = <1 1>;
  263. mclk-fs = <256>;
  264. codec {
  265. sound-dai = <&tohdmitx TOHDMITX_I2S_IN_B>;
  266. };
  267. };
  268. /* internal digital mics */
  269. dai-link-8 {
  270. sound-dai = <&pdm>;
  271. codec {
  272. sound-dai = <&dmics>;
  273. };
  274. };
  275. /* hdmi glue */
  276. dai-link-9 {
  277. sound-dai = <&tohdmitx TOHDMITX_I2S_OUT>;
  278. codec {
  279. sound-dai = <&hdmi_tx>;
  280. };
  281. };
  282. };
  283. wifi32k: wifi32k {
  284. compatible = "pwm-clock";
  285. #clock-cells = <0>;
  286. clock-frequency = <32768>;
  287. pwms = <&pwm_ef 0 30518 0>; /* PWM_E at 32.768KHz */
  288. };
  289. };
  290. &arb {
  291. status = "okay";
  292. };
  293. &cec_AO {
  294. pinctrl-0 = <&cec_ao_a_h_pins>;
  295. pinctrl-names = "default";
  296. status = "disabled";
  297. hdmi-phandle = <&hdmi_tx>;
  298. };
  299. &cecb_AO {
  300. pinctrl-0 = <&cec_ao_b_h_pins>;
  301. pinctrl-names = "default";
  302. status = "okay";
  303. hdmi-phandle = <&hdmi_tx>;
  304. };
  305. &clkc_audio {
  306. status = "okay";
  307. };
  308. &cpu0 {
  309. cpu-supply = <&vddcpu>;
  310. operating-points-v2 = <&cpu_opp_table>;
  311. clocks = <&clkc CLKID_CPU_CLK>;
  312. clock-latency = <50000>;
  313. };
  314. &cpu1 {
  315. cpu-supply = <&vddcpu>;
  316. operating-points-v2 = <&cpu_opp_table>;
  317. clocks = <&clkc CLKID_CPU1_CLK>;
  318. clock-latency = <50000>;
  319. };
  320. &cpu2 {
  321. cpu-supply = <&vddcpu>;
  322. operating-points-v2 = <&cpu_opp_table>;
  323. clocks = <&clkc CLKID_CPU2_CLK>;
  324. clock-latency = <50000>;
  325. };
  326. &cpu3 {
  327. cpu-supply = <&vddcpu>;
  328. operating-points-v2 = <&cpu_opp_table>;
  329. clocks = <&clkc CLKID_CPU3_CLK>;
  330. clock-latency = <50000>;
  331. };
  332. &ethmac {
  333. status = "okay";
  334. phy-handle = <&internal_ephy>;
  335. phy-mode = "rmii";
  336. };
  337. &frddr_a {
  338. status = "okay";
  339. };
  340. &frddr_b {
  341. status = "okay";
  342. };
  343. &frddr_c {
  344. status = "okay";
  345. };
  346. &hdmi_tx {
  347. status = "okay";
  348. pinctrl-0 = <&hdmitx_hpd_pins>, <&hdmitx_ddc_pins>;
  349. pinctrl-names = "default";
  350. };
  351. &hdmi_tx_tmds_port {
  352. hdmi_tx_tmds_out: endpoint {
  353. remote-endpoint = <&hdmi_connector_in>;
  354. };
  355. };
  356. &i2c3 {
  357. status = "okay";
  358. pinctrl-0 = <&i2c3_sda_a_pins>, <&i2c3_sck_a_pins>;
  359. pinctrl-names = "default";
  360. };
  361. &ir {
  362. status = "okay";
  363. pinctrl-0 = <&remote_input_ao_pins>;
  364. pinctrl-names = "default";
  365. };
  366. &pdm {
  367. pinctrl-0 = <&pdm_din0_z_pins>, <&pdm_dclk_z_pins>;
  368. pinctrl-names = "default";
  369. status = "okay";
  370. };
  371. &pwm_AO_ab {
  372. status = "okay";
  373. pinctrl-0 = <&pwm_ao_a_pins>;
  374. pinctrl-names = "default";
  375. clocks = <&xtal>;
  376. clock-names = "clkin0";
  377. };
  378. &pwm_AO_cd {
  379. pinctrl-0 = <&pwm_ao_d_e_pins>;
  380. pinctrl-names = "default";
  381. clocks = <&xtal>;
  382. clock-names = "clkin1";
  383. status = "okay";
  384. };
  385. &pwm_ef {
  386. status = "okay";
  387. pinctrl-0 = <&pwm_e_pins>;
  388. pinctrl-names = "default";
  389. clocks = <&xtal>;
  390. clock-names = "clkin0";
  391. };
  392. &saradc {
  393. status = "okay";
  394. vref-supply = <&vddio_ao1v8>;
  395. };
  396. /* SDIO */
  397. &sd_emmc_a {
  398. status = "okay";
  399. pinctrl-0 = <&sdio_pins>;
  400. pinctrl-1 = <&sdio_clk_gate_pins>;
  401. pinctrl-names = "default", "clk-gate";
  402. #address-cells = <1>;
  403. #size-cells = <0>;
  404. bus-width = <4>;
  405. cap-sd-highspeed;
  406. sd-uhs-sdr50;
  407. max-frequency = <100000000>;
  408. non-removable;
  409. disable-wp;
  410. /* WiFi firmware requires power to be kept while in suspend */
  411. keep-power-in-suspend;
  412. mmc-pwrseq = <&sdio_pwrseq>;
  413. vmmc-supply = <&vddao_3v3>;
  414. vqmmc-supply = <&vddio_ao1v8>;
  415. brcmf: wifi@1 {
  416. reg = <1>;
  417. compatible = "brcm,bcm4329-fmac";
  418. };
  419. };
  420. /* SD card */
  421. &sd_emmc_b {
  422. status = "okay";
  423. pinctrl-0 = <&sdcard_c_pins>;
  424. pinctrl-1 = <&sdcard_clk_gate_c_pins>;
  425. pinctrl-names = "default", "clk-gate";
  426. bus-width = <4>;
  427. cap-sd-highspeed;
  428. max-frequency = <50000000>;
  429. disable-wp;
  430. cd-gpios = <&gpio GPIOC_6 GPIO_ACTIVE_LOW>;
  431. vmmc-supply = <&vddao_3v3>;
  432. vqmmc-supply = <&vddao_3v3>;
  433. };
  434. /* eMMC */
  435. &sd_emmc_c {
  436. status = "okay";
  437. pinctrl-0 = <&emmc_ctrl_pins>, <&emmc_data_8b_pins>, <&emmc_ds_pins>;
  438. pinctrl-1 = <&emmc_clk_gate_pins>;
  439. pinctrl-names = "default", "clk-gate";
  440. bus-width = <8>;
  441. cap-mmc-highspeed;
  442. mmc-ddr-1_8v;
  443. mmc-hs200-1_8v;
  444. max-frequency = <200000000>;
  445. non-removable;
  446. disable-wp;
  447. mmc-pwrseq = <&emmc_pwrseq>;
  448. vmmc-supply = <&vddao_3v3>;
  449. vqmmc-supply = <&emmc_1v8>;
  450. };
  451. &tdmif_a {
  452. pinctrl-0 = <&tdm_a_dout0_pins>, <&tdm_a_fs_pins>, <&tdm_a_sclk_pins>;
  453. pinctrl-names = "default";
  454. status = "okay";
  455. assigned-clocks = <&clkc_audio AUD_CLKID_TDM_SCLK_PAD0>,
  456. <&clkc_audio AUD_CLKID_TDM_LRCLK_PAD0>;
  457. assigned-clock-parents = <&clkc_audio AUD_CLKID_MST_A_SCLK>,
  458. <&clkc_audio AUD_CLKID_MST_A_LRCLK>;
  459. assigned-clock-rates = <0>, <0>;
  460. };
  461. &tdmif_b {
  462. status = "okay";
  463. };
  464. &tdmin_a {
  465. status = "okay";
  466. };
  467. &tdmin_b {
  468. status = "okay";
  469. };
  470. &tdmout_a {
  471. status = "okay";
  472. };
  473. &tdmout_b {
  474. status = "okay";
  475. };
  476. &toddr_a {
  477. status = "okay";
  478. };
  479. &toddr_b {
  480. status = "okay";
  481. };
  482. &toddr_c {
  483. status = "okay";
  484. };
  485. &tohdmitx {
  486. status = "okay";
  487. };
  488. &uart_A {
  489. status = "okay";
  490. pinctrl-0 = <&uart_a_pins>, <&uart_a_cts_rts_pins>;
  491. pinctrl-names = "default";
  492. uart-has-rtscts;
  493. bluetooth {
  494. compatible = "brcm,bcm43438-bt";
  495. interrupt-parent = <&gpio_intc>;
  496. interrupts = <95 IRQ_TYPE_LEVEL_HIGH>;
  497. interrupt-names = "host-wakeup";
  498. shutdown-gpios = <&gpio GPIOX_17 GPIO_ACTIVE_HIGH>;
  499. max-speed = <2000000>;
  500. clocks = <&wifi32k>;
  501. clock-names = "lpo";
  502. vbat-supply = <&vddao_3v3>;
  503. vddio-supply = <&vddio_ao1v8>;
  504. };
  505. };
  506. /* Exposed via the on-board USB to Serial FT232RL IC */
  507. &uart_AO {
  508. status = "okay";
  509. pinctrl-0 = <&uart_ao_a_pins>;
  510. pinctrl-names = "default";
  511. };
  512. &usb {
  513. status = "okay";
  514. dr_mode = "otg";
  515. };