xref: /linux/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-vero4k.dts (revision c7546e2c3cb739a3c1a2f5acaf9bb629d401afe5)
1// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
2/*
3 * Copyright (c) 2024 Christian Hewitt <christianshewitt@gmail.com>
4 */
5
6/dts-v1/;
7
8#include "meson-gxl-s905x-p212.dtsi"
9#include <dt-bindings/input/input.h>
10#include <dt-bindings/leds/common.h>
11#include <dt-bindings/sound/meson-aiu.h>
12
13/ {
14	compatible = "osmc,vero4k", "amlogic,s905x", "amlogic,meson-gxl";
15	model = "OSMC Vero 4K";
16
17	reserved-memory {
18		/* 32 MiB reserved for ARM Trusted Firmware (BL32) */
19		secmon_reserved_bl32: secmon@5300000 {
20			reg = <0x0 0x05300000 0x0 0x2000000>;
21			no-map;
22		};
23	};
24
25	gpio-keys-polled {
26		compatible = "gpio-keys-polled";
27		poll-interval = <20>;
28
29		button {
30			label = "power";
31			linux,code = <KEY_POWER>;
32			gpios = <&gpio_ao GPIOAO_2 GPIO_ACTIVE_HIGH>;
33		};
34	};
35
36	leds {
37		compatible = "gpio-leds";
38
39		led-standby {
40			color = <LED_COLOR_ID_RED>;
41			function = LED_FUNCTION_POWER;
42			gpios = <&gpio GPIODV_24 GPIO_ACTIVE_LOW>;
43			default-state = "off";
44			panic-indicator;
45		};
46	};
47
48	dio2133: analog-amplifier {
49		compatible = "simple-audio-amplifier";
50		sound-name-prefix = "AU2";
51		VCC-supply = <&hdmi_5v>;
52		enable-gpios = <&gpio GPIOH_5 GPIO_ACTIVE_HIGH>;
53	};
54
55	spdif_dit: audio-codec-0 {
56		#sound-dai-cells = <0>;
57		compatible = "linux,spdif-dit";
58		sound-name-prefix = "DIT";
59	};
60
61	cvbs-connector {
62		compatible = "composite-video-connector";
63
64		port {
65			cvbs_connector_in: endpoint {
66				remote-endpoint = <&cvbs_vdac_out>;
67			};
68		};
69	};
70
71	hdmi-connector {
72		compatible = "hdmi-connector";
73		type = "a";
74
75		port {
76			hdmi_connector_in: endpoint {
77				remote-endpoint = <&hdmi_tx_tmds_out>;
78			};
79		};
80	};
81
82	sound {
83		compatible = "amlogic,gx-sound-card";
84		model = "VERO4K";
85		audio-aux-devs = <&dio2133>;
86		audio-widgets = "Line", "Lineout";
87		audio-routing = "AU2 INL", "ACODEC LOLP",
88				"AU2 INR", "ACODEC LORP",
89				"AU2 INL", "ACODEC LOLN",
90				"AU2 INR", "ACODEC LORN",
91				"Lineout", "AU2 OUTL",
92				"Lineout", "AU2 OUTR";
93
94		clocks = <&clkc CLKID_MPLL0>,
95			 <&clkc CLKID_MPLL1>,
96			 <&clkc CLKID_MPLL2>;
97
98		assigned-clocks = <&clkc CLKID_MPLL0>,
99				  <&clkc CLKID_MPLL1>,
100				  <&clkc CLKID_MPLL2>;
101		assigned-clock-parents = <0>, <0>, <0>;
102		assigned-clock-rates = <294912000>,
103				       <270950400>,
104				       <393216000>;
105
106		dai-link-0 {
107			sound-dai = <&aiu AIU_CPU CPU_I2S_FIFO>;
108		};
109
110		dai-link-1 {
111			sound-dai = <&aiu AIU_CPU CPU_SPDIF_FIFO>;
112		};
113
114		dai-link-2 {
115			sound-dai = <&aiu AIU_CPU CPU_I2S_ENCODER>;
116			dai-format = "i2s";
117			mclk-fs = <256>;
118
119			codec-0 {
120				sound-dai = <&aiu AIU_HDMI CTRL_I2S>;
121			};
122
123			codec-1 {
124				sound-dai = <&aiu AIU_ACODEC CTRL_I2S>;
125			};
126		};
127
128		dai-link-3 {
129			sound-dai = <&aiu AIU_CPU CPU_SPDIF_ENCODER>;
130
131			codec-0 {
132				sound-dai = <&spdif_dit>;
133			};
134		};
135
136		dai-link-4 {
137			sound-dai = <&aiu AIU_HDMI CTRL_OUT>;
138
139			codec-0 {
140				sound-dai = <&hdmi_tx>;
141			};
142		};
143
144		dai-link-5 {
145			sound-dai = <&aiu AIU_ACODEC CTRL_OUT>;
146
147			codec-0 {
148				sound-dai = <&acodec>;
149			};
150		};
151	};
152};
153
154&acodec {
155	AVDD-supply = <&vddio_ao18>;
156	status = "okay";
157};
158
159&aiu {
160	status = "okay";
161	pinctrl-0 = <&spdif_out_h_pins>;
162	pinctrl-names = "default";
163};
164
165&cec_AO {
166	status = "okay";
167	pinctrl-0 = <&ao_cec_pins>;
168	pinctrl-names = "default";
169	hdmi-phandle = <&hdmi_tx>;
170};
171
172&cvbs_vdac_port {
173	cvbs_vdac_out: endpoint {
174		remote-endpoint = <&cvbs_connector_in>;
175	};
176};
177
178&ethmac {
179	phy-mode = "rmii";
180	phy-handle = <&internal_phy>;
181};
182
183&hdmi_tx {
184	status = "okay";
185	pinctrl-0 = <&hdmi_hpd_pins>, <&hdmi_i2c_pins>;
186	pinctrl-names = "default";
187	hdmi-supply = <&hdmi_5v>;
188};
189
190&hdmi_tx_tmds_port {
191	hdmi_tx_tmds_out: endpoint {
192		remote-endpoint = <&hdmi_connector_in>;
193	};
194};
195
196&internal_phy {
197	pinctrl-0 = <&eth_link_led_pins>, <&eth_act_led_pins>;
198	pinctrl-names = "default";
199};
200
201/* This UART is brought out to the DB9 connector */
202&uart_AO {
203	status = "okay";
204};
205