1 // SPDX-License-Identifier: (GPL-2.0+ OR MIT) 1 // SPDX-License-Identifier: (GPL-2.0+ OR MIT) 2 /* 2 /* 3 * Copyright (c) 2018 BayLibre SAS. All rights 3 * Copyright (c) 2018 BayLibre SAS. All rights reserved. 4 */ 4 */ 5 5 6 /dts-v1/; 6 /dts-v1/; 7 7 8 #include "meson-g12a.dtsi" 8 #include "meson-g12a.dtsi" 9 #include <dt-bindings/gpio/meson-g12a-gpio.h> 9 #include <dt-bindings/gpio/meson-g12a-gpio.h> 10 #include <dt-bindings/sound/meson-g12a-tohdmit 10 #include <dt-bindings/sound/meson-g12a-tohdmitx.h> 11 11 12 / { 12 / { 13 compatible = "radxa,zero", "amlogic,g1 13 compatible = "radxa,zero", "amlogic,g12a"; 14 model = "Radxa Zero"; 14 model = "Radxa Zero"; 15 15 16 aliases { 16 aliases { 17 serial0 = &uart_AO; 17 serial0 = &uart_AO; 18 }; 18 }; 19 19 20 chosen { 20 chosen { 21 stdout-path = "serial0:115200n 21 stdout-path = "serial0:115200n8"; 22 }; 22 }; 23 23 24 memory@0 { 24 memory@0 { 25 device_type = "memory"; 25 device_type = "memory"; 26 reg = <0x0 0x0 0x0 0x40000000> 26 reg = <0x0 0x0 0x0 0x40000000>; 27 }; 27 }; 28 28 29 cvbs-connector { 29 cvbs-connector { 30 status = "disabled"; 30 status = "disabled"; 31 compatible = "composite-video- 31 compatible = "composite-video-connector"; 32 32 33 port { 33 port { 34 cvbs_connector_in: end 34 cvbs_connector_in: endpoint { 35 remote-endpoin 35 remote-endpoint = <&cvbs_vdac_out>; 36 }; 36 }; 37 }; 37 }; 38 }; 38 }; 39 39 40 hdmi-connector { 40 hdmi-connector { 41 compatible = "hdmi-connector"; 41 compatible = "hdmi-connector"; 42 type = "a"; 42 type = "a"; 43 43 44 port { 44 port { 45 hdmi_connector_in: end 45 hdmi_connector_in: endpoint { 46 remote-endpoin 46 remote-endpoint = <&hdmi_tx_tmds_out>; 47 }; 47 }; 48 }; 48 }; 49 }; 49 }; 50 50 51 emmc_pwrseq: emmc-pwrseq { 51 emmc_pwrseq: emmc-pwrseq { 52 compatible = "mmc-pwrseq-emmc" 52 compatible = "mmc-pwrseq-emmc"; 53 reset-gpios = <&gpio BOOT_12 G 53 reset-gpios = <&gpio BOOT_12 GPIO_ACTIVE_LOW>; 54 }; 54 }; 55 55 56 sdio_pwrseq: sdio-pwrseq { 56 sdio_pwrseq: sdio-pwrseq { 57 compatible = "mmc-pwrseq-simpl 57 compatible = "mmc-pwrseq-simple"; 58 reset-gpios = <&gpio GPIOX_6 G 58 reset-gpios = <&gpio GPIOX_6 GPIO_ACTIVE_LOW>; 59 clocks = <&wifi32k>; 59 clocks = <&wifi32k>; 60 clock-names = "ext_clock"; 60 clock-names = "ext_clock"; 61 }; 61 }; 62 62 63 ao_5v: regulator-ao-5v { 63 ao_5v: regulator-ao-5v { 64 compatible = "regulator-fixed" 64 compatible = "regulator-fixed"; 65 regulator-name = "AO_5V"; 65 regulator-name = "AO_5V"; 66 regulator-min-microvolt = <500 66 regulator-min-microvolt = <5000000>; 67 regulator-max-microvolt = <500 67 regulator-max-microvolt = <5000000>; 68 regulator-always-on; 68 regulator-always-on; 69 }; 69 }; 70 70 71 vcc_1v8: regulator-vcc-1v8 { 71 vcc_1v8: regulator-vcc-1v8 { 72 compatible = "regulator-fixed" 72 compatible = "regulator-fixed"; 73 regulator-name = "VCC_1V8"; 73 regulator-name = "VCC_1V8"; 74 regulator-min-microvolt = <180 74 regulator-min-microvolt = <1800000>; 75 regulator-max-microvolt = <180 75 regulator-max-microvolt = <1800000>; 76 vin-supply = <&vcc_3v3>; 76 vin-supply = <&vcc_3v3>; 77 regulator-always-on; 77 regulator-always-on; 78 }; 78 }; 79 79 80 vcc_3v3: regulator-vcc-3v3 { 80 vcc_3v3: regulator-vcc-3v3 { 81 compatible = "regulator-fixed" 81 compatible = "regulator-fixed"; 82 regulator-name = "VCC_3V3"; 82 regulator-name = "VCC_3V3"; 83 regulator-min-microvolt = <330 83 regulator-min-microvolt = <3300000>; 84 regulator-max-microvolt = <330 84 regulator-max-microvolt = <3300000>; 85 vin-supply = <&vddao_3v3>; 85 vin-supply = <&vddao_3v3>; 86 regulator-always-on; 86 regulator-always-on; 87 }; 87 }; 88 88 89 hdmi_pw: regulator-hdmi-pw { 89 hdmi_pw: regulator-hdmi-pw { 90 compatible = "regulator-fixed" 90 compatible = "regulator-fixed"; 91 regulator-name = "HDMI_PW"; 91 regulator-name = "HDMI_PW"; 92 regulator-min-microvolt = <500 92 regulator-min-microvolt = <5000000>; 93 regulator-max-microvolt = <500 93 regulator-max-microvolt = <5000000>; 94 vin-supply = <&ao_5v>; 94 vin-supply = <&ao_5v>; 95 regulator-always-on; 95 regulator-always-on; 96 }; 96 }; 97 97 98 vddao_1v8: regulator-vddao-1v8 { 98 vddao_1v8: regulator-vddao-1v8 { 99 compatible = "regulator-fixed" 99 compatible = "regulator-fixed"; 100 regulator-name = "VDDAO_1V8"; 100 regulator-name = "VDDAO_1V8"; 101 regulator-min-microvolt = <180 101 regulator-min-microvolt = <1800000>; 102 regulator-max-microvolt = <180 102 regulator-max-microvolt = <1800000>; 103 vin-supply = <&vddao_3v3>; 103 vin-supply = <&vddao_3v3>; 104 regulator-always-on; 104 regulator-always-on; 105 }; 105 }; 106 106 107 vddao_3v3: regulator-vddao-3v3 { 107 vddao_3v3: regulator-vddao-3v3 { 108 compatible = "regulator-fixed" 108 compatible = "regulator-fixed"; 109 regulator-name = "VDDAO_3V3"; 109 regulator-name = "VDDAO_3V3"; 110 regulator-min-microvolt = <330 110 regulator-min-microvolt = <3300000>; 111 regulator-max-microvolt = <330 111 regulator-max-microvolt = <3300000>; 112 vin-supply = <&ao_5v>; 112 vin-supply = <&ao_5v>; 113 regulator-always-on; 113 regulator-always-on; 114 }; 114 }; 115 115 116 vddcpu: regulator-vddcpu { 116 vddcpu: regulator-vddcpu { 117 compatible = "pwm-regulator"; 117 compatible = "pwm-regulator"; 118 118 119 regulator-name = "VDDCPU"; 119 regulator-name = "VDDCPU"; 120 regulator-min-microvolt = <721 120 regulator-min-microvolt = <721000>; 121 regulator-max-microvolt = <102 121 regulator-max-microvolt = <1022000>; 122 122 123 vin-supply = <&ao_5v>; 123 vin-supply = <&ao_5v>; 124 124 125 pwms = <&pwm_AO_cd 1 1250 0>; 125 pwms = <&pwm_AO_cd 1 1250 0>; 126 pwm-dutycycle-range = <100 0>; 126 pwm-dutycycle-range = <100 0>; 127 127 128 regulator-boot-on; 128 regulator-boot-on; 129 regulator-always-on; 129 regulator-always-on; 130 }; 130 }; 131 131 132 sound { 132 sound { 133 compatible = "amlogic,axg-soun 133 compatible = "amlogic,axg-sound-card"; 134 model = "RADXA-ZERO"; 134 model = "RADXA-ZERO"; 135 audio-aux-devs = <&tdmout_b>; 135 audio-aux-devs = <&tdmout_b>; 136 audio-routing = "TDMOUT_B IN 0 136 audio-routing = "TDMOUT_B IN 0", "FRDDR_A OUT 1", 137 "TDMOUT_B IN 1 137 "TDMOUT_B IN 1", "FRDDR_B OUT 1", 138 "TDMOUT_B IN 2 138 "TDMOUT_B IN 2", "FRDDR_C OUT 1", 139 "TDM_B Playbac 139 "TDM_B Playback", "TDMOUT_B OUT"; 140 140 141 clocks = <&clkc CLKID_MPLL2>, << 142 <&clkc CLKID_MPLL0>, << 143 <&clkc CLKID_MPLL1>; << 144 << 145 assigned-clocks = <&clkc CLKID 141 assigned-clocks = <&clkc CLKID_MPLL2>, 146 <&clkc CLKID 142 <&clkc CLKID_MPLL0>, 147 <&clkc CLKID 143 <&clkc CLKID_MPLL1>; 148 assigned-clock-parents = <0>, 144 assigned-clock-parents = <0>, <0>, <0>; 149 assigned-clock-rates = <294912 145 assigned-clock-rates = <294912000>, 150 <270950 146 <270950400>, 151 <393216 147 <393216000>; 152 148 153 dai-link-0 { 149 dai-link-0 { 154 sound-dai = <&frddr_a> 150 sound-dai = <&frddr_a>; 155 }; 151 }; 156 152 157 dai-link-1 { 153 dai-link-1 { 158 sound-dai = <&frddr_b> 154 sound-dai = <&frddr_b>; 159 }; 155 }; 160 156 161 dai-link-2 { 157 dai-link-2 { 162 sound-dai = <&frddr_c> 158 sound-dai = <&frddr_c>; 163 }; 159 }; 164 160 165 /* 8ch hdmi interface */ 161 /* 8ch hdmi interface */ 166 dai-link-3 { 162 dai-link-3 { 167 sound-dai = <&tdmif_b> 163 sound-dai = <&tdmif_b>; 168 dai-format = "i2s"; 164 dai-format = "i2s"; 169 dai-tdm-slot-tx-mask-0 165 dai-tdm-slot-tx-mask-0 = <1 1>; 170 dai-tdm-slot-tx-mask-1 166 dai-tdm-slot-tx-mask-1 = <1 1>; 171 dai-tdm-slot-tx-mask-2 167 dai-tdm-slot-tx-mask-2 = <1 1>; 172 dai-tdm-slot-tx-mask-3 168 dai-tdm-slot-tx-mask-3 = <1 1>; 173 mclk-fs = <256>; 169 mclk-fs = <256>; 174 170 175 codec { 171 codec { 176 sound-dai = <& 172 sound-dai = <&tohdmitx TOHDMITX_I2S_IN_B>; 177 }; 173 }; 178 }; 174 }; 179 175 180 dai-link-4 { 176 dai-link-4 { 181 sound-dai = <&tohdmitx 177 sound-dai = <&tohdmitx TOHDMITX_I2S_OUT>; 182 178 183 codec { 179 codec { 184 sound-dai = <& 180 sound-dai = <&hdmi_tx>; 185 }; 181 }; 186 }; 182 }; 187 }; 183 }; 188 184 189 wifi32k: wifi32k { 185 wifi32k: wifi32k { 190 compatible = "pwm-clock"; 186 compatible = "pwm-clock"; 191 #clock-cells = <0>; 187 #clock-cells = <0>; 192 clock-frequency = <32768>; 188 clock-frequency = <32768>; 193 pwms = <&pwm_ef 0 30518 0>; /* 189 pwms = <&pwm_ef 0 30518 0>; /* PWM_E at 32.768KHz */ 194 }; 190 }; 195 }; 191 }; 196 192 197 &arb { 193 &arb { 198 status = "okay"; 194 status = "okay"; 199 }; 195 }; 200 196 201 &cec_AO { 197 &cec_AO { 202 pinctrl-0 = <&cec_ao_a_h_pins>; 198 pinctrl-0 = <&cec_ao_a_h_pins>; 203 pinctrl-names = "default"; 199 pinctrl-names = "default"; 204 status = "disabled"; 200 status = "disabled"; 205 hdmi-phandle = <&hdmi_tx>; 201 hdmi-phandle = <&hdmi_tx>; 206 }; 202 }; 207 203 208 &cecb_AO { 204 &cecb_AO { 209 pinctrl-0 = <&cec_ao_b_h_pins>; 205 pinctrl-0 = <&cec_ao_b_h_pins>; 210 pinctrl-names = "default"; 206 pinctrl-names = "default"; 211 status = "okay"; 207 status = "okay"; 212 hdmi-phandle = <&hdmi_tx>; 208 hdmi-phandle = <&hdmi_tx>; 213 }; 209 }; 214 210 215 &clkc_audio { 211 &clkc_audio { 216 status = "okay"; 212 status = "okay"; 217 }; 213 }; 218 214 219 &cpu0 { 215 &cpu0 { 220 cpu-supply = <&vddcpu>; 216 cpu-supply = <&vddcpu>; 221 operating-points-v2 = <&cpu_opp_table> 217 operating-points-v2 = <&cpu_opp_table>; 222 clocks = <&clkc CLKID_CPU_CLK>; 218 clocks = <&clkc CLKID_CPU_CLK>; 223 clock-latency = <50000>; 219 clock-latency = <50000>; 224 }; 220 }; 225 221 226 &cpu1 { 222 &cpu1 { 227 cpu-supply = <&vddcpu>; 223 cpu-supply = <&vddcpu>; 228 operating-points-v2 = <&cpu_opp_table> 224 operating-points-v2 = <&cpu_opp_table>; 229 clocks = <&clkc CLKID_CPU_CLK>; 225 clocks = <&clkc CLKID_CPU_CLK>; 230 clock-latency = <50000>; 226 clock-latency = <50000>; 231 }; 227 }; 232 228 233 &cpu2 { 229 &cpu2 { 234 cpu-supply = <&vddcpu>; 230 cpu-supply = <&vddcpu>; 235 operating-points-v2 = <&cpu_opp_table> 231 operating-points-v2 = <&cpu_opp_table>; 236 clocks = <&clkc CLKID_CPU_CLK>; 232 clocks = <&clkc CLKID_CPU_CLK>; 237 clock-latency = <50000>; 233 clock-latency = <50000>; 238 }; 234 }; 239 235 240 &cpu3 { 236 &cpu3 { 241 cpu-supply = <&vddcpu>; 237 cpu-supply = <&vddcpu>; 242 operating-points-v2 = <&cpu_opp_table> 238 operating-points-v2 = <&cpu_opp_table>; 243 clocks = <&clkc CLKID_CPU_CLK>; 239 clocks = <&clkc CLKID_CPU_CLK>; 244 clock-latency = <50000>; 240 clock-latency = <50000>; 245 }; 241 }; 246 242 247 &cvbs_vdac_port { 243 &cvbs_vdac_port { 248 cvbs_vdac_out: endpoint { 244 cvbs_vdac_out: endpoint { 249 remote-endpoint = <&cvbs_conne 245 remote-endpoint = <&cvbs_connector_in>; 250 }; 246 }; 251 }; 247 }; 252 248 253 &frddr_a { 249 &frddr_a { 254 status = "okay"; 250 status = "okay"; 255 }; 251 }; 256 252 257 &frddr_b { 253 &frddr_b { 258 status = "okay"; 254 status = "okay"; 259 }; 255 }; 260 256 261 &frddr_c { 257 &frddr_c { 262 status = "okay"; 258 status = "okay"; 263 }; 259 }; 264 260 265 &hdmi_tx { 261 &hdmi_tx { 266 status = "okay"; 262 status = "okay"; 267 pinctrl-0 = <&hdmitx_hpd_pins>, <&hdmi 263 pinctrl-0 = <&hdmitx_hpd_pins>, <&hdmitx_ddc_pins>; 268 pinctrl-names = "default"; 264 pinctrl-names = "default"; 269 hdmi-supply = <&hdmi_pw>; 265 hdmi-supply = <&hdmi_pw>; 270 }; 266 }; 271 267 272 &hdmi_tx_tmds_port { 268 &hdmi_tx_tmds_port { 273 hdmi_tx_tmds_out: endpoint { 269 hdmi_tx_tmds_out: endpoint { 274 remote-endpoint = <&hdmi_conne 270 remote-endpoint = <&hdmi_connector_in>; 275 }; 271 }; 276 }; 272 }; 277 273 278 &ir { 274 &ir { 279 status = "disabled"; 275 status = "disabled"; 280 pinctrl-0 = <&remote_input_ao_pins>; 276 pinctrl-0 = <&remote_input_ao_pins>; 281 pinctrl-names = "default"; 277 pinctrl-names = "default"; 282 }; 278 }; 283 279 284 &pwm_AO_cd { 280 &pwm_AO_cd { 285 pinctrl-0 = <&pwm_ao_d_e_pins>; 281 pinctrl-0 = <&pwm_ao_d_e_pins>; 286 pinctrl-names = "default"; 282 pinctrl-names = "default"; 287 clocks = <&xtal>; 283 clocks = <&xtal>; 288 clock-names = "clkin1"; 284 clock-names = "clkin1"; 289 status = "okay"; 285 status = "okay"; 290 }; 286 }; 291 287 292 &pwm_ef { 288 &pwm_ef { 293 status = "okay"; 289 status = "okay"; 294 pinctrl-0 = <&pwm_e_pins>; 290 pinctrl-0 = <&pwm_e_pins>; 295 pinctrl-names = "default"; 291 pinctrl-names = "default"; 296 clocks = <&xtal>; 292 clocks = <&xtal>; 297 clock-names = "clkin0"; 293 clock-names = "clkin0"; 298 }; 294 }; 299 295 300 &saradc { 296 &saradc { 301 status = "okay"; 297 status = "okay"; 302 vref-supply = <&vddao_1v8>; 298 vref-supply = <&vddao_1v8>; 303 }; 299 }; 304 300 305 /* SDIO */ 301 /* SDIO */ 306 &sd_emmc_a { 302 &sd_emmc_a { 307 status = "okay"; 303 status = "okay"; 308 pinctrl-0 = <&sdio_pins>; 304 pinctrl-0 = <&sdio_pins>; 309 pinctrl-1 = <&sdio_clk_gate_pins>; 305 pinctrl-1 = <&sdio_clk_gate_pins>; 310 pinctrl-names = "default", "clk-gate"; 306 pinctrl-names = "default", "clk-gate"; 311 #address-cells = <1>; 307 #address-cells = <1>; 312 #size-cells = <0>; 308 #size-cells = <0>; 313 309 314 bus-width = <4>; 310 bus-width = <4>; 315 cap-sd-highspeed; 311 cap-sd-highspeed; 316 sd-uhs-sdr50; 312 sd-uhs-sdr50; 317 max-frequency = <100000000>; 313 max-frequency = <100000000>; 318 314 319 non-removable; 315 non-removable; 320 disable-wp; 316 disable-wp; 321 317 322 /* WiFi firmware requires power to be 318 /* WiFi firmware requires power to be kept while in suspend */ 323 keep-power-in-suspend; 319 keep-power-in-suspend; 324 320 325 mmc-pwrseq = <&sdio_pwrseq>; 321 mmc-pwrseq = <&sdio_pwrseq>; 326 322 327 vmmc-supply = <&vddao_3v3>; 323 vmmc-supply = <&vddao_3v3>; 328 vqmmc-supply = <&vddao_1v8>; 324 vqmmc-supply = <&vddao_1v8>; 329 325 330 brcmf: wifi@1 { 326 brcmf: wifi@1 { 331 reg = <1>; 327 reg = <1>; 332 compatible = "brcm,bcm4329-fma 328 compatible = "brcm,bcm4329-fmac"; 333 }; 329 }; 334 }; 330 }; 335 331 336 /* SD card */ 332 /* SD card */ 337 &sd_emmc_b { 333 &sd_emmc_b { 338 status = "okay"; 334 status = "okay"; 339 pinctrl-0 = <&sdcard_c_pins>; 335 pinctrl-0 = <&sdcard_c_pins>; 340 pinctrl-1 = <&sdcard_clk_gate_c_pins>; 336 pinctrl-1 = <&sdcard_clk_gate_c_pins>; 341 pinctrl-names = "default", "clk-gate"; 337 pinctrl-names = "default", "clk-gate"; 342 338 343 bus-width = <4>; 339 bus-width = <4>; 344 cap-sd-highspeed; 340 cap-sd-highspeed; 345 max-frequency = <100000000>; 341 max-frequency = <100000000>; 346 disable-wp; 342 disable-wp; 347 343 348 cd-gpios = <&gpio GPIOC_6 GPIO_ACTIVE_ 344 cd-gpios = <&gpio GPIOC_6 GPIO_ACTIVE_LOW>; 349 vmmc-supply = <&vddao_3v3>; 345 vmmc-supply = <&vddao_3v3>; 350 vqmmc-supply = <&vddao_3v3>; 346 vqmmc-supply = <&vddao_3v3>; 351 }; 347 }; 352 348 353 /* eMMC */ 349 /* eMMC */ 354 &sd_emmc_c { 350 &sd_emmc_c { 355 status = "okay"; 351 status = "okay"; 356 pinctrl-0 = <&emmc_ctrl_pins>, <&emmc_ 352 pinctrl-0 = <&emmc_ctrl_pins>, <&emmc_data_8b_pins>, <&emmc_ds_pins>; 357 pinctrl-1 = <&emmc_clk_gate_pins>; 353 pinctrl-1 = <&emmc_clk_gate_pins>; 358 pinctrl-names = "default", "clk-gate"; 354 pinctrl-names = "default", "clk-gate"; 359 355 360 bus-width = <8>; 356 bus-width = <8>; 361 cap-mmc-highspeed; 357 cap-mmc-highspeed; 362 mmc-ddr-1_8v; 358 mmc-ddr-1_8v; 363 mmc-hs200-1_8v; 359 mmc-hs200-1_8v; 364 max-frequency = <200000000>; 360 max-frequency = <200000000>; 365 disable-wp; 361 disable-wp; 366 362 367 mmc-pwrseq = <&emmc_pwrseq>; 363 mmc-pwrseq = <&emmc_pwrseq>; 368 vmmc-supply = <&vcc_3v3>; 364 vmmc-supply = <&vcc_3v3>; 369 vqmmc-supply = <&vcc_1v8>; 365 vqmmc-supply = <&vcc_1v8>; 370 }; 366 }; 371 367 372 &tdmif_b { 368 &tdmif_b { 373 status = "okay"; 369 status = "okay"; 374 }; 370 }; 375 371 376 &tdmout_b { 372 &tdmout_b { 377 status = "okay"; 373 status = "okay"; 378 }; 374 }; 379 375 380 &tohdmitx { 376 &tohdmitx { 381 status = "okay"; 377 status = "okay"; 382 }; 378 }; 383 379 384 &uart_A { 380 &uart_A { 385 status = "okay"; 381 status = "okay"; 386 pinctrl-0 = <&uart_a_pins>, <&uart_a_c 382 pinctrl-0 = <&uart_a_pins>, <&uart_a_cts_rts_pins>; 387 pinctrl-names = "default"; 383 pinctrl-names = "default"; 388 uart-has-rtscts; 384 uart-has-rtscts; 389 385 390 bluetooth { 386 bluetooth { 391 compatible = "brcm,bcm43438-bt 387 compatible = "brcm,bcm43438-bt"; 392 shutdown-gpios = <&gpio GPIOX_ 388 shutdown-gpios = <&gpio GPIOX_17 GPIO_ACTIVE_HIGH>; 393 max-speed = <2000000>; 389 max-speed = <2000000>; 394 clocks = <&wifi32k>; 390 clocks = <&wifi32k>; 395 clock-names = "lpo"; 391 clock-names = "lpo"; 396 }; 392 }; 397 }; 393 }; 398 394 399 &uart_AO { 395 &uart_AO { 400 status = "okay"; 396 status = "okay"; 401 pinctrl-0 = <&uart_ao_a_pins>; 397 pinctrl-0 = <&uart_ao_a_pins>; 402 pinctrl-names = "default"; 398 pinctrl-names = "default"; 403 }; 399 }; 404 400 405 &usb { 401 &usb { 406 status = "okay"; 402 status = "okay"; 407 }; 403 };
Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.