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