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