xref: /linux/arch/arm64/boot/dts/amlogic/meson-g12b-gtking-pro.dts (revision 06a130e42a5bfc84795464bff023bff4c16f58c5)
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 = "azw,gtking", "amlogic,s922x", "amlogic,g12b";
15	model = "Beelink GT-King Pro";
16
17	aliases {
18		rtc0 = &rtc;
19		rtc1 = &vrtc;
20	};
21
22	gpio-keys-polled {
23		compatible = "gpio-keys-polled";
24		poll-interval = <100>;
25
26		power-button {
27			label = "power";
28			linux,code = <KEY_POWER>;
29			gpios = <&gpio_ao GPIOAO_3 GPIO_ACTIVE_HIGH>;
30		};
31	};
32
33	leds {
34		compatible = "gpio-leds";
35
36		led-white {
37			label = "power:white";
38			gpios = <&gpio_ao GPIOAO_11 GPIO_ACTIVE_HIGH>;
39			default-state = "on";
40		};
41	};
42
43	sound {
44		compatible = "amlogic,axg-sound-card";
45		model = "GTKING-PRO";
46		audio-aux-devs = <&tdmout_b>;
47		audio-routing = "TDMOUT_B IN 0", "FRDDR_A OUT 1",
48				"TDMOUT_B IN 1", "FRDDR_B OUT 1",
49				"TDMOUT_B IN 2", "FRDDR_C OUT 1",
50				"TDM_B Playback", "TDMOUT_B OUT";
51
52		clocks = <&clkc CLKID_MPLL2>,
53			 <&clkc CLKID_MPLL0>,
54			 <&clkc CLKID_MPLL1>;
55
56		assigned-clocks = <&clkc CLKID_MPLL2>,
57				  <&clkc CLKID_MPLL0>,
58				  <&clkc CLKID_MPLL1>;
59		assigned-clock-parents = <0>, <0>, <0>;
60		assigned-clock-rates = <294912000>,
61				       <270950400>,
62				       <393216000>;
63
64		dai-link-0 {
65			sound-dai = <&frddr_a>;
66		};
67
68		dai-link-1 {
69			sound-dai = <&frddr_b>;
70		};
71
72		dai-link-2 {
73			sound-dai = <&frddr_c>;
74		};
75
76		/* 8ch hdmi interface */
77		dai-link-3 {
78			sound-dai = <&tdmif_b>;
79			dai-format = "i2s";
80			dai-tdm-slot-tx-mask-0 = <1 1>;
81			dai-tdm-slot-tx-mask-1 = <1 1>;
82			dai-tdm-slot-tx-mask-2 = <1 1>;
83			dai-tdm-slot-tx-mask-3 = <1 1>;
84			mclk-fs = <256>;
85
86			codec {
87				sound-dai = <&tohdmitx TOHDMITX_I2S_IN_B>;
88			};
89		};
90
91		dai-link-4 {
92			sound-dai = <&tohdmitx TOHDMITX_I2S_OUT>;
93
94			codec {
95				sound-dai = <&hdmi_tx>;
96			};
97		};
98	};
99};
100
101&arb {
102	status = "okay";
103};
104
105&clkc_audio {
106	status = "okay";
107};
108
109&frddr_a {
110	status = "okay";
111};
112
113&frddr_b {
114	status = "okay";
115};
116
117&frddr_c {
118	status = "okay";
119};
120
121&i2c3 {
122	status = "okay";
123	pinctrl-0 = <&i2c3_sda_a_pins>, <&i2c3_sck_a_pins>;
124	pinctrl-names = "default";
125
126	rtc: rtc@51 {
127		compatible = "nxp,pcf8563";
128		reg = <0x51>;
129		wakeup-source;
130	};
131};
132
133&tdmif_b {
134	status = "okay";
135};
136
137&tdmout_b {
138	status = "okay";
139};
140
141&tohdmitx {
142	status = "okay";
143};
144