xref: /freebsd/sys/contrib/device-tree/src/arm64/amlogic/meson-g12b-gtking-pro.dts (revision aa1a8ff2d6dbc51ef058f46f3db5a8bb77967145)
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		assigned-clocks = <&clkc CLKID_MPLL2>,
53				  <&clkc CLKID_MPLL0>,
54				  <&clkc CLKID_MPLL1>;
55		assigned-clock-parents = <0>, <0>, <0>;
56		assigned-clock-rates = <294912000>,
57				       <270950400>,
58				       <393216000>;
59
60		dai-link-0 {
61			sound-dai = <&frddr_a>;
62		};
63
64		dai-link-1 {
65			sound-dai = <&frddr_b>;
66		};
67
68		dai-link-2 {
69			sound-dai = <&frddr_c>;
70		};
71
72		/* 8ch hdmi interface */
73		dai-link-3 {
74			sound-dai = <&tdmif_b>;
75			dai-format = "i2s";
76			dai-tdm-slot-tx-mask-0 = <1 1>;
77			dai-tdm-slot-tx-mask-1 = <1 1>;
78			dai-tdm-slot-tx-mask-2 = <1 1>;
79			dai-tdm-slot-tx-mask-3 = <1 1>;
80			mclk-fs = <256>;
81
82			codec {
83				sound-dai = <&tohdmitx TOHDMITX_I2S_IN_B>;
84			};
85		};
86
87		dai-link-4 {
88			sound-dai = <&tohdmitx TOHDMITX_I2S_OUT>;
89
90			codec {
91				sound-dai = <&hdmi_tx>;
92			};
93		};
94	};
95};
96
97&arb {
98	status = "okay";
99};
100
101&clkc_audio {
102	status = "okay";
103};
104
105&frddr_a {
106	status = "okay";
107};
108
109&frddr_b {
110	status = "okay";
111};
112
113&frddr_c {
114	status = "okay";
115};
116
117&i2c3 {
118	status = "okay";
119	pinctrl-0 = <&i2c3_sda_a_pins>, <&i2c3_sck_a_pins>;
120	pinctrl-names = "default";
121
122	rtc: rtc@51 {
123		compatible = "nxp,pcf8563";
124		reg = <0x51>;
125		wakeup-source;
126	};
127};
128
129&tdmif_b {
130	status = "okay";
131};
132
133&tdmout_b {
134	status = "okay";
135};
136
137&tohdmitx {
138	status = "okay";
139};
140