xref: /freebsd/sys/contrib/device-tree/src/arm64/amlogic/meson-g12b-ugoos-am6.dts (revision 96190b4fef3b4a0cc3ca0606b0c4e3e69a5e6717)
1// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
2/*
3 * Copyright (c) 2019 BayLibre, SAS
4 * Author: Neil Armstrong <narmstrong@baylibre.com>
5 * Copyright (c) 2019 Christian Hewitt <christianshewitt@gmail.com>
6 */
7
8/dts-v1/;
9
10#include "meson-g12b-w400.dtsi"
11#include <dt-bindings/sound/meson-g12a-tohdmitx.h>
12
13/ {
14	compatible = "ugoos,am6", "amlogic,s922x", "amlogic,g12b";
15	model = "Ugoos AM6";
16
17	spdif_dit: audio-codec-1 {
18		#sound-dai-cells = <0>;
19		compatible = "linux,spdif-dit";
20		sound-name-prefix = "DIT";
21	};
22
23	sound {
24		compatible = "amlogic,axg-sound-card";
25		model = "UGOOS-AM6";
26		audio-aux-devs = <&tdmout_b>;
27		audio-routing = "TDMOUT_B IN 0", "FRDDR_A OUT 1",
28				"TDMOUT_B IN 1", "FRDDR_B OUT 1",
29				"TDMOUT_B IN 2", "FRDDR_C OUT 1",
30				"TDM_B Playback", "TDMOUT_B OUT",
31				"SPDIFOUT_A IN 0", "FRDDR_A OUT 3",
32				"SPDIFOUT_A IN 1", "FRDDR_B OUT 3",
33				"SPDIFOUT_A IN 2", "FRDDR_C OUT 3";
34
35		assigned-clocks = <&clkc CLKID_MPLL2>,
36				  <&clkc CLKID_MPLL0>,
37				  <&clkc CLKID_MPLL1>;
38		assigned-clock-parents = <0>, <0>, <0>;
39		assigned-clock-rates = <294912000>,
40				       <270950400>,
41				       <393216000>;
42
43		dai-link-0 {
44			sound-dai = <&frddr_a>;
45		};
46
47		dai-link-1 {
48			sound-dai = <&frddr_b>;
49		};
50
51		dai-link-2 {
52			sound-dai = <&frddr_c>;
53		};
54
55		/* 8ch hdmi interface */
56		dai-link-3 {
57			sound-dai = <&tdmif_b>;
58			dai-format = "i2s";
59			dai-tdm-slot-tx-mask-0 = <1 1>;
60			dai-tdm-slot-tx-mask-1 = <1 1>;
61			dai-tdm-slot-tx-mask-2 = <1 1>;
62			dai-tdm-slot-tx-mask-3 = <1 1>;
63			mclk-fs = <256>;
64
65			codec {
66				sound-dai = <&tohdmitx TOHDMITX_I2S_IN_B>;
67			};
68		};
69
70		/* spdif hdmi or toslink interface */
71		dai-link-4 {
72			sound-dai = <&spdifout_a>;
73
74			codec-0 {
75				sound-dai = <&spdif_dit>;
76			};
77
78			codec-1 {
79				sound-dai = <&tohdmitx TOHDMITX_SPDIF_IN_A>;
80			};
81		};
82
83		/* spdif hdmi interface */
84		dai-link-5 {
85			sound-dai = <&spdifout_b>;
86
87			codec {
88				sound-dai = <&tohdmitx TOHDMITX_SPDIF_IN_B>;
89			};
90		};
91
92		/* hdmi glue */
93		dai-link-6 {
94			sound-dai = <&tohdmitx TOHDMITX_I2S_OUT>;
95
96			codec {
97				sound-dai = <&hdmi_tx>;
98			};
99		};
100	};
101};
102
103&arb {
104	status = "okay";
105};
106
107&clkc_audio {
108	status = "okay";
109};
110
111&frddr_a {
112	status = "okay";
113};
114
115&frddr_b {
116	status = "okay";
117};
118
119&frddr_c {
120	status = "okay";
121};
122
123&ir {
124	linux,rc-map-name = "rc-khadas";
125};
126
127&spdifout_a {
128	pinctrl-0 = <&spdif_out_h_pins>;
129	pinctrl-names = "default";
130	status = "okay";
131};
132
133&spdifout_b {
134	status = "okay";
135};
136
137&tdmif_b {
138	status = "okay";
139};
140
141&tdmout_b {
142	status = "okay";
143};
144
145&tohdmitx {
146	status = "okay";
147};
148
149&uart_A {
150	status = "okay";
151	pinctrl-0 = <&uart_a_pins>, <&uart_a_cts_rts_pins>;
152	pinctrl-names = "default";
153	uart-has-rtscts;
154
155	bluetooth {
156		compatible = "brcm,bcm43438-bt";
157		shutdown-gpios = <&gpio GPIOX_17 GPIO_ACTIVE_HIGH>;
158		max-speed = <2000000>;
159		clocks = <&wifi32k>;
160	clock-names = "lpo";
161	};
162};
163
164&uart_AO {
165	status = "okay";
166	pinctrl-0 = <&uart_ao_a_pins>;
167	pinctrl-names = "default";
168};
169
170&usb {
171	status = "okay";
172	dr_mode = "host";
173	vbus-supply = <&usb_pwr_en>;
174};
175
176&usb2_phy0 {
177	phy-supply = <&usb1_pow>;
178};
179
180&usb2_phy1 {
181	phy-supply = <&usb1_pow>;
182};
183