1*c9ccf3a3SEmmanuel Vadot// SPDX-License-Identifier: (GPL-2.0+ OR MIT) 2*c9ccf3a3SEmmanuel Vadot/* 3*c9ccf3a3SEmmanuel Vadot * Copyright (c) 2019 BayLibre SAS. All rights reserved. 4*c9ccf3a3SEmmanuel Vadot * Copyright (c) 2020 Christian Hewitt <christianshewitt@gmail.com> 5*c9ccf3a3SEmmanuel Vadot */ 6*c9ccf3a3SEmmanuel Vadot 7*c9ccf3a3SEmmanuel Vadot/dts-v1/; 8*c9ccf3a3SEmmanuel Vadot 9*c9ccf3a3SEmmanuel Vadot#include "meson-sm1-ac2xx.dtsi" 10*c9ccf3a3SEmmanuel Vadot#include <dt-bindings/sound/meson-g12a-tohdmitx.h> 11*c9ccf3a3SEmmanuel Vadot 12*c9ccf3a3SEmmanuel Vadot/ { 13*c9ccf3a3SEmmanuel Vadot compatible = "amediatech,x96-air-gbit", "amlogic,sm1"; 14*c9ccf3a3SEmmanuel Vadot model = "Shenzhen Amediatech Technology Co., Ltd X96 Air"; 15*c9ccf3a3SEmmanuel Vadot 16*c9ccf3a3SEmmanuel Vadot sound { 17*c9ccf3a3SEmmanuel Vadot compatible = "amlogic,axg-sound-card"; 18*c9ccf3a3SEmmanuel Vadot model = "X96-AIR"; 19*c9ccf3a3SEmmanuel Vadot audio-aux-devs = <&tdmout_b>; 20*c9ccf3a3SEmmanuel Vadot audio-routing = "TDMOUT_B IN 0", "FRDDR_A OUT 1", 21*c9ccf3a3SEmmanuel Vadot "TDMOUT_B IN 1", "FRDDR_B OUT 1", 22*c9ccf3a3SEmmanuel Vadot "TDMOUT_B IN 2", "FRDDR_C OUT 1", 23*c9ccf3a3SEmmanuel Vadot "TDM_B Playback", "TDMOUT_B OUT"; 24*c9ccf3a3SEmmanuel Vadot 25*c9ccf3a3SEmmanuel Vadot assigned-clocks = <&clkc CLKID_MPLL2>, 26*c9ccf3a3SEmmanuel Vadot <&clkc CLKID_MPLL0>, 27*c9ccf3a3SEmmanuel Vadot <&clkc CLKID_MPLL1>; 28*c9ccf3a3SEmmanuel Vadot assigned-clock-parents = <0>, <0>, <0>; 29*c9ccf3a3SEmmanuel Vadot assigned-clock-rates = <294912000>, 30*c9ccf3a3SEmmanuel Vadot <270950400>, 31*c9ccf3a3SEmmanuel Vadot <393216000>; 32*c9ccf3a3SEmmanuel Vadot status = "okay"; 33*c9ccf3a3SEmmanuel Vadot 34*c9ccf3a3SEmmanuel Vadot dai-link-0 { 35*c9ccf3a3SEmmanuel Vadot sound-dai = <&frddr_a>; 36*c9ccf3a3SEmmanuel Vadot }; 37*c9ccf3a3SEmmanuel Vadot 38*c9ccf3a3SEmmanuel Vadot dai-link-1 { 39*c9ccf3a3SEmmanuel Vadot sound-dai = <&frddr_b>; 40*c9ccf3a3SEmmanuel Vadot }; 41*c9ccf3a3SEmmanuel Vadot 42*c9ccf3a3SEmmanuel Vadot dai-link-2 { 43*c9ccf3a3SEmmanuel Vadot sound-dai = <&frddr_c>; 44*c9ccf3a3SEmmanuel Vadot }; 45*c9ccf3a3SEmmanuel Vadot 46*c9ccf3a3SEmmanuel Vadot /* 8ch hdmi interface */ 47*c9ccf3a3SEmmanuel Vadot dai-link-3 { 48*c9ccf3a3SEmmanuel Vadot sound-dai = <&tdmif_b>; 49*c9ccf3a3SEmmanuel Vadot dai-format = "i2s"; 50*c9ccf3a3SEmmanuel Vadot dai-tdm-slot-tx-mask-0 = <1 1>; 51*c9ccf3a3SEmmanuel Vadot dai-tdm-slot-tx-mask-1 = <1 1>; 52*c9ccf3a3SEmmanuel Vadot dai-tdm-slot-tx-mask-2 = <1 1>; 53*c9ccf3a3SEmmanuel Vadot dai-tdm-slot-tx-mask-3 = <1 1>; 54*c9ccf3a3SEmmanuel Vadot mclk-fs = <256>; 55*c9ccf3a3SEmmanuel Vadot 56*c9ccf3a3SEmmanuel Vadot codec { 57*c9ccf3a3SEmmanuel Vadot sound-dai = <&tohdmitx TOHDMITX_I2S_IN_B>; 58*c9ccf3a3SEmmanuel Vadot }; 59*c9ccf3a3SEmmanuel Vadot }; 60*c9ccf3a3SEmmanuel Vadot 61*c9ccf3a3SEmmanuel Vadot /* hdmi glue */ 62*c9ccf3a3SEmmanuel Vadot dai-link-4 { 63*c9ccf3a3SEmmanuel Vadot sound-dai = <&tohdmitx TOHDMITX_I2S_OUT>; 64*c9ccf3a3SEmmanuel Vadot 65*c9ccf3a3SEmmanuel Vadot codec { 66*c9ccf3a3SEmmanuel Vadot sound-dai = <&hdmi_tx>; 67*c9ccf3a3SEmmanuel Vadot }; 68*c9ccf3a3SEmmanuel Vadot }; 69*c9ccf3a3SEmmanuel Vadot }; 70*c9ccf3a3SEmmanuel Vadot}; 71*c9ccf3a3SEmmanuel Vadot 72*c9ccf3a3SEmmanuel Vadot&arb { 73*c9ccf3a3SEmmanuel Vadot status = "okay"; 74*c9ccf3a3SEmmanuel Vadot}; 75*c9ccf3a3SEmmanuel Vadot 76*c9ccf3a3SEmmanuel Vadot&clkc_audio { 77*c9ccf3a3SEmmanuel Vadot status = "okay"; 78*c9ccf3a3SEmmanuel Vadot}; 79*c9ccf3a3SEmmanuel Vadot 80*c9ccf3a3SEmmanuel Vadotðmac { 81*c9ccf3a3SEmmanuel Vadot status = "okay"; 82*c9ccf3a3SEmmanuel Vadot 83*c9ccf3a3SEmmanuel Vadot pinctrl-0 = <ð_pins>, <ð_rgmii_pins>; 84*c9ccf3a3SEmmanuel Vadot pinctrl-names = "default"; 85*c9ccf3a3SEmmanuel Vadot phy-mode = "rgmii-txid"; 86*c9ccf3a3SEmmanuel Vadot phy-handle = <&external_phy>; 87*c9ccf3a3SEmmanuel Vadot 88*c9ccf3a3SEmmanuel Vadot rx-internal-delay-ps = <800>; 89*c9ccf3a3SEmmanuel Vadot}; 90*c9ccf3a3SEmmanuel Vadot 91*c9ccf3a3SEmmanuel Vadot&ext_mdio { 92*c9ccf3a3SEmmanuel Vadot external_phy: ethernet-phy@0 { 93*c9ccf3a3SEmmanuel Vadot /* Realtek RTL8211F (0x001cc916) */ 94*c9ccf3a3SEmmanuel Vadot reg = <0>; 95*c9ccf3a3SEmmanuel Vadot max-speed = <1000>; 96*c9ccf3a3SEmmanuel Vadot 97*c9ccf3a3SEmmanuel Vadot reset-assert-us = <10000>; 98*c9ccf3a3SEmmanuel Vadot reset-deassert-us = <80000>; 99*c9ccf3a3SEmmanuel Vadot reset-gpios = <&gpio GPIOZ_15 (GPIO_ACTIVE_LOW | GPIO_OPEN_DRAIN)>; 100*c9ccf3a3SEmmanuel Vadot 101*c9ccf3a3SEmmanuel Vadot interrupt-parent = <&gpio_intc>; 102*c9ccf3a3SEmmanuel Vadot /* MAC_INTR on GPIOZ_14 */ 103*c9ccf3a3SEmmanuel Vadot interrupts = <26 IRQ_TYPE_LEVEL_LOW>; 104*c9ccf3a3SEmmanuel Vadot }; 105*c9ccf3a3SEmmanuel Vadot}; 106*c9ccf3a3SEmmanuel Vadot 107*c9ccf3a3SEmmanuel Vadot&frddr_a { 108*c9ccf3a3SEmmanuel Vadot status = "okay"; 109*c9ccf3a3SEmmanuel Vadot}; 110*c9ccf3a3SEmmanuel Vadot 111*c9ccf3a3SEmmanuel Vadot&frddr_b { 112*c9ccf3a3SEmmanuel Vadot status = "okay"; 113*c9ccf3a3SEmmanuel Vadot}; 114*c9ccf3a3SEmmanuel Vadot 115*c9ccf3a3SEmmanuel Vadot&frddr_c { 116*c9ccf3a3SEmmanuel Vadot status = "okay"; 117*c9ccf3a3SEmmanuel Vadot}; 118*c9ccf3a3SEmmanuel Vadot 119*c9ccf3a3SEmmanuel Vadot&ir { 120*c9ccf3a3SEmmanuel Vadot linux,rc-map-name = "rc-x96max"; 121*c9ccf3a3SEmmanuel Vadot}; 122*c9ccf3a3SEmmanuel Vadot 123*c9ccf3a3SEmmanuel Vadot&tdmif_b { 124*c9ccf3a3SEmmanuel Vadot status = "okay"; 125*c9ccf3a3SEmmanuel Vadot}; 126*c9ccf3a3SEmmanuel Vadot 127*c9ccf3a3SEmmanuel Vadot&tdmout_b { 128*c9ccf3a3SEmmanuel Vadot status = "okay"; 129*c9ccf3a3SEmmanuel Vadot}; 130*c9ccf3a3SEmmanuel Vadot 131*c9ccf3a3SEmmanuel Vadot&tohdmitx { 132*c9ccf3a3SEmmanuel Vadot status = "okay"; 133*c9ccf3a3SEmmanuel Vadot}; 134