Back to home page

OSCL-LXR

 
 

    


0001 // SPDX-License-Identifier: (GPL-2.0+ OR MIT)
0002 /*
0003  * Copyright (c) 2018 BayLibre SAS. All rights reserved.
0004  */
0005 
0006 /dts-v1/;
0007 
0008 #include "meson-g12a.dtsi"
0009 #include <dt-bindings/gpio/meson-g12a-gpio.h>
0010 #include <dt-bindings/sound/meson-g12a-tohdmitx.h>
0011 
0012 / {
0013         compatible = "radxa,zero", "amlogic,g12a";
0014         model = "Radxa Zero";
0015 
0016         aliases {
0017                 serial0 = &uart_AO;
0018         };
0019 
0020         chosen {
0021                 stdout-path = "serial0:115200n8";
0022         };
0023 
0024         memory@0 {
0025                 device_type = "memory";
0026                 reg = <0x0 0x0 0x0 0x40000000>;
0027         };
0028 
0029         cvbs-connector {
0030                 status = "disabled";
0031                 compatible = "composite-video-connector";
0032 
0033                 port {
0034                         cvbs_connector_in: endpoint {
0035                                 remote-endpoint = <&cvbs_vdac_out>;
0036                         };
0037                 };
0038         };
0039 
0040         hdmi-connector {
0041                 compatible = "hdmi-connector";
0042                 type = "a";
0043 
0044                 port {
0045                         hdmi_connector_in: endpoint {
0046                                 remote-endpoint = <&hdmi_tx_tmds_out>;
0047                         };
0048                 };
0049         };
0050 
0051         emmc_pwrseq: emmc-pwrseq {
0052                 compatible = "mmc-pwrseq-emmc";
0053                 reset-gpios = <&gpio BOOT_12 GPIO_ACTIVE_LOW>;
0054         };
0055 
0056         sdio_pwrseq: sdio-pwrseq {
0057                 compatible = "mmc-pwrseq-simple";
0058                 reset-gpios = <&gpio GPIOX_6 GPIO_ACTIVE_LOW>;
0059                 clocks = <&wifi32k>;
0060                 clock-names = "ext_clock";
0061         };
0062 
0063         ao_5v: regulator-ao_5v {
0064                 compatible = "regulator-fixed";
0065                 regulator-name = "AO_5V";
0066                 regulator-min-microvolt = <5000000>;
0067                 regulator-max-microvolt = <5000000>;
0068                 regulator-always-on;
0069         };
0070 
0071         vcc_1v8: regulator-vcc_1v8 {
0072                 compatible = "regulator-fixed";
0073                 regulator-name = "VCC_1V8";
0074                 regulator-min-microvolt = <1800000>;
0075                 regulator-max-microvolt = <1800000>;
0076                 vin-supply = <&vcc_3v3>;
0077                 regulator-always-on;
0078         };
0079 
0080         vcc_3v3: regulator-vcc_3v3 {
0081                 compatible = "regulator-fixed";
0082                 regulator-name = "VCC_3V3";
0083                 regulator-min-microvolt = <3300000>;
0084                 regulator-max-microvolt = <3300000>;
0085                 vin-supply = <&vddao_3v3>;
0086                 regulator-always-on;
0087         };
0088 
0089         hdmi_pw: regulator-hdmi_pw {
0090                 compatible = "regulator-fixed";
0091                 regulator-name = "HDMI_PW";
0092                 regulator-min-microvolt = <5000000>;
0093                 regulator-max-microvolt = <5000000>;
0094                 vin-supply = <&ao_5v>;
0095                 regulator-always-on;
0096         };
0097 
0098         vddao_1v8: regulator-vddao_1v8 {
0099                 compatible = "regulator-fixed";
0100                 regulator-name = "VDDAO_1V8";
0101                 regulator-min-microvolt = <1800000>;
0102                 regulator-max-microvolt = <1800000>;
0103                 vin-supply = <&vddao_3v3>;
0104                 regulator-always-on;
0105         };
0106 
0107         vddao_3v3: regulator-vddao_3v3 {
0108                 compatible = "regulator-fixed";
0109                 regulator-name = "VDDAO_3V3";
0110                 regulator-min-microvolt = <3300000>;
0111                 regulator-max-microvolt = <3300000>;
0112                 vin-supply = <&ao_5v>;
0113                 regulator-always-on;
0114         };
0115 
0116         vddcpu: regulator-vddcpu {
0117                 compatible = "pwm-regulator";
0118 
0119                 regulator-name = "VDDCPU";
0120                 regulator-min-microvolt = <721000>;
0121                 regulator-max-microvolt = <1022000>;
0122 
0123                 vin-supply = <&ao_5v>;
0124 
0125                 pwms = <&pwm_AO_cd 1 1250 0>;
0126                 pwm-dutycycle-range = <100 0>;
0127 
0128                 regulator-boot-on;
0129                 regulator-always-on;
0130         };
0131 
0132         sound {
0133                 compatible = "amlogic,axg-sound-card";
0134                 model = "RADXA-ZERO";
0135                 audio-aux-devs = <&tdmout_b>;
0136                 audio-routing = "TDMOUT_B IN 0", "FRDDR_A OUT 1",
0137                                 "TDMOUT_B IN 1", "FRDDR_B OUT 1",
0138                                 "TDMOUT_B IN 2", "FRDDR_C OUT 1",
0139                                 "TDM_B Playback", "TDMOUT_B OUT";
0140 
0141                 assigned-clocks = <&clkc CLKID_MPLL2>,
0142                                   <&clkc CLKID_MPLL0>,
0143                                   <&clkc CLKID_MPLL1>;
0144                 assigned-clock-parents = <0>, <0>, <0>;
0145                 assigned-clock-rates = <294912000>,
0146                                        <270950400>,
0147                                        <393216000>;
0148                 status = "okay";
0149 
0150                 dai-link-0 {
0151                         sound-dai = <&frddr_a>;
0152                 };
0153 
0154                 dai-link-1 {
0155                         sound-dai = <&frddr_b>;
0156                 };
0157 
0158                 dai-link-2 {
0159                         sound-dai = <&frddr_c>;
0160                 };
0161 
0162                 /* 8ch hdmi interface */
0163                 dai-link-3 {
0164                         sound-dai = <&tdmif_b>;
0165                         dai-format = "i2s";
0166                         dai-tdm-slot-tx-mask-0 = <1 1>;
0167                         dai-tdm-slot-tx-mask-1 = <1 1>;
0168                         dai-tdm-slot-tx-mask-2 = <1 1>;
0169                         dai-tdm-slot-tx-mask-3 = <1 1>;
0170                         mclk-fs = <256>;
0171 
0172                         codec {
0173                                 sound-dai = <&tohdmitx TOHDMITX_I2S_IN_B>;
0174                         };
0175                 };
0176 
0177                 dai-link-4 {
0178                         sound-dai = <&tohdmitx TOHDMITX_I2S_OUT>;
0179 
0180                         codec {
0181                                 sound-dai = <&hdmi_tx>;
0182                         };
0183                 };
0184         };
0185 
0186         wifi32k: wifi32k {
0187                 compatible = "pwm-clock";
0188                 #clock-cells = <0>;
0189                 clock-frequency = <32768>;
0190                 pwms = <&pwm_ef 0 30518 0>; /* PWM_E at 32.768KHz */
0191         };
0192 };
0193 
0194 &arb {
0195         status = "okay";
0196 };
0197 
0198 &cec_AO {
0199         pinctrl-0 = <&cec_ao_a_h_pins>;
0200         pinctrl-names = "default";
0201         status = "disabled";
0202         hdmi-phandle = <&hdmi_tx>;
0203 };
0204 
0205 &cecb_AO {
0206         pinctrl-0 = <&cec_ao_b_h_pins>;
0207         pinctrl-names = "default";
0208         status = "okay";
0209         hdmi-phandle = <&hdmi_tx>;
0210 };
0211 
0212 &clkc_audio {
0213         status = "okay";
0214 };
0215 
0216 &cpu0 {
0217         cpu-supply = <&vddcpu>;
0218         operating-points-v2 = <&cpu_opp_table>;
0219         clocks = <&clkc CLKID_CPU_CLK>;
0220         clock-latency = <50000>;
0221 };
0222 
0223 &cpu1 {
0224         cpu-supply = <&vddcpu>;
0225         operating-points-v2 = <&cpu_opp_table>;
0226         clocks = <&clkc CLKID_CPU_CLK>;
0227         clock-latency = <50000>;
0228 };
0229 
0230 &cpu2 {
0231         cpu-supply = <&vddcpu>;
0232         operating-points-v2 = <&cpu_opp_table>;
0233         clocks = <&clkc CLKID_CPU_CLK>;
0234         clock-latency = <50000>;
0235 };
0236 
0237 &cpu3 {
0238         cpu-supply = <&vddcpu>;
0239         operating-points-v2 = <&cpu_opp_table>;
0240         clocks = <&clkc CLKID_CPU_CLK>;
0241         clock-latency = <50000>;
0242 };
0243 
0244 &cvbs_vdac_port {
0245         cvbs_vdac_out: endpoint {
0246                 remote-endpoint = <&cvbs_connector_in>;
0247         };
0248 };
0249 
0250 &frddr_a {
0251         status = "okay";
0252 };
0253 
0254 &frddr_b {
0255         status = "okay";
0256 };
0257 
0258 &frddr_c {
0259         status = "okay";
0260 };
0261 
0262 &hdmi_tx {
0263         status = "okay";
0264         pinctrl-0 = <&hdmitx_hpd_pins>, <&hdmitx_ddc_pins>;
0265         pinctrl-names = "default";
0266         hdmi-supply = <&hdmi_pw>;
0267 };
0268 
0269 &hdmi_tx_tmds_port {
0270         hdmi_tx_tmds_out: endpoint {
0271                 remote-endpoint = <&hdmi_connector_in>;
0272         };
0273 };
0274 
0275 &ir {
0276         status = "disabled";
0277         pinctrl-0 = <&remote_input_ao_pins>;
0278         pinctrl-names = "default";
0279 };
0280 
0281 &pwm_AO_cd {
0282         pinctrl-0 = <&pwm_ao_d_e_pins>;
0283         pinctrl-names = "default";
0284         clocks = <&xtal>;
0285         clock-names = "clkin1";
0286         status = "okay";
0287 };
0288 
0289 &pwm_ef {
0290         status = "okay";
0291         pinctrl-0 = <&pwm_e_pins>;
0292         pinctrl-names = "default";
0293         clocks = <&xtal>;
0294         clock-names = "clkin0";
0295 };
0296 
0297 &saradc {
0298         status = "okay";
0299         vref-supply = <&vddao_1v8>;
0300 };
0301 
0302 /* SDIO */
0303 &sd_emmc_a {
0304         status = "okay";
0305         pinctrl-0 = <&sdio_pins>;
0306         pinctrl-1 = <&sdio_clk_gate_pins>;
0307         pinctrl-names = "default", "clk-gate";
0308         #address-cells = <1>;
0309         #size-cells = <0>;
0310 
0311         bus-width = <4>;
0312         cap-sd-highspeed;
0313         sd-uhs-sdr50;
0314         max-frequency = <100000000>;
0315 
0316         non-removable;
0317         disable-wp;
0318 
0319         /* WiFi firmware requires power to be kept while in suspend */
0320         keep-power-in-suspend;
0321 
0322         mmc-pwrseq = <&sdio_pwrseq>;
0323 
0324         vmmc-supply = <&vddao_3v3>;
0325         vqmmc-supply = <&vddao_1v8>;
0326 
0327         brcmf: wifi@1 {
0328                 reg = <1>;
0329                 compatible = "brcm,bcm4329-fmac";
0330         };
0331 };
0332 
0333 /* SD card */
0334 &sd_emmc_b {
0335         status = "okay";
0336         pinctrl-0 = <&sdcard_c_pins>;
0337         pinctrl-1 = <&sdcard_clk_gate_c_pins>;
0338         pinctrl-names = "default", "clk-gate";
0339 
0340         bus-width = <4>;
0341         cap-sd-highspeed;
0342         max-frequency = <100000000>;
0343         disable-wp;
0344 
0345         cd-gpios = <&gpio GPIOC_6 GPIO_ACTIVE_LOW>;
0346         vmmc-supply = <&vddao_3v3>;
0347         vqmmc-supply = <&vddao_3v3>;
0348 };
0349 
0350 /* eMMC */
0351 &sd_emmc_c {
0352         status = "okay";
0353         pinctrl-0 = <&emmc_ctrl_pins>, <&emmc_data_8b_pins>, <&emmc_ds_pins>;
0354         pinctrl-1 = <&emmc_clk_gate_pins>;
0355         pinctrl-names = "default", "clk-gate";
0356 
0357         bus-width = <8>;
0358         cap-mmc-highspeed;
0359         mmc-ddr-1_8v;
0360         mmc-hs200-1_8v;
0361         max-frequency = <200000000>;
0362         disable-wp;
0363 
0364         mmc-pwrseq = <&emmc_pwrseq>;
0365         vmmc-supply = <&vcc_3v3>;
0366         vqmmc-supply = <&vcc_1v8>;
0367 };
0368 
0369 &tdmif_b {
0370         status = "okay";
0371 };
0372 
0373 &tdmout_b {
0374         status = "okay";
0375 };
0376 
0377 &tohdmitx {
0378         status = "okay";
0379 };
0380 
0381 &uart_A {
0382         status = "okay";
0383         pinctrl-0 = <&uart_a_pins>, <&uart_a_cts_rts_pins>;
0384         pinctrl-names = "default";
0385         uart-has-rtscts;
0386 
0387         bluetooth {
0388                 compatible = "brcm,bcm43438-bt";
0389                 shutdown-gpios = <&gpio GPIOX_17 GPIO_ACTIVE_HIGH>;
0390                 max-speed = <2000000>;
0391                 clocks = <&wifi32k>;
0392                 clock-names = "lpo";
0393         };
0394 };
0395 
0396 &uart_AO {
0397         status = "okay";
0398         pinctrl-0 = <&uart_ao_a_pins>;
0399         pinctrl-names = "default";
0400 };
0401 
0402 &usb {
0403         status = "okay";
0404         dr_mode = "host";
0405 };