| 1 |
// SPDX-License-Identifier: (GPL-2.0+ OR MIT) |
| 2 |
/* |
| 3 |
* Copyright (c) 2024 Christian Hewitt <[email protected]> |
| 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-rates = <294912000>, |
| 102 |
<270950400>, |
| 103 |
<393216000>; |
| 104 |
|
| 105 |
dai-link-0 { |
| 106 |
sound-dai = <&aiu AIU_CPU CPU_I2S_FIFO>; |
| 107 |
}; |
| 108 |
|
| 109 |
dai-link-1 { |
| 110 |
sound-dai = <&aiu AIU_CPU CPU_SPDIF_FIFO>; |
| 111 |
}; |
| 112 |
|
| 113 |
dai-link-2 { |
| 114 |
sound-dai = <&aiu AIU_CPU CPU_I2S_ENCODER>; |
| 115 |
dai-format = "i2s"; |
| 116 |
mclk-fs = <256>; |
| 117 |
|
| 118 |
codec-0 { |
| 119 |
sound-dai = <&aiu AIU_HDMI CTRL_I2S>; |
| 120 |
}; |
| 121 |
|
| 122 |
codec-1 { |
| 123 |
sound-dai = <&aiu AIU_ACODEC CTRL_I2S>; |
| 124 |
}; |
| 125 |
}; |
| 126 |
|
| 127 |
dai-link-3 { |
| 128 |
sound-dai = <&aiu AIU_CPU CPU_SPDIF_ENCODER>; |
| 129 |
|
| 130 |
codec-0 { |
| 131 |
sound-dai = <&spdif_dit>; |
| 132 |
}; |
| 133 |
}; |
| 134 |
|
| 135 |
dai-link-4 { |
| 136 |
sound-dai = <&aiu AIU_HDMI CTRL_OUT>; |
| 137 |
|
| 138 |
codec-0 { |
| 139 |
sound-dai = <&hdmi_tx>; |
| 140 |
}; |
| 141 |
}; |
| 142 |
|
| 143 |
dai-link-5 { |
| 144 |
sound-dai = <&aiu AIU_ACODEC CTRL_OUT>; |
| 145 |
|
| 146 |
codec-0 { |
| 147 |
sound-dai = <&acodec>; |
| 148 |
}; |
| 149 |
}; |
| 150 |
}; |
| 151 |
}; |
| 152 |
|
| 153 |
&acodec { |
| 154 |
AVDD-supply = <&vddio_ao18>; |
| 155 |
status = "okay"; |
| 156 |
}; |
| 157 |
|
| 158 |
&aiu { |
| 159 |
status = "okay"; |
| 160 |
pinctrl-0 = <&spdif_out_h_pins>; |
| 161 |
pinctrl-names = "default"; |
| 162 |
}; |
| 163 |
|
| 164 |
&cec_AO { |
| 165 |
status = "okay"; |
| 166 |
pinctrl-0 = <&ao_cec_pins>; |
| 167 |
pinctrl-names = "default"; |
| 168 |
hdmi-phandle = <&hdmi_tx>; |
| 169 |
}; |
| 170 |
|
| 171 |
&cvbs_vdac_port { |
| 172 |
cvbs_vdac_out: endpoint { |
| 173 |
remote-endpoint = <&cvbs_connector_in>; |
| 174 |
}; |
| 175 |
}; |
| 176 |
|
| 177 |
ðmac { |
| 178 |
phy-mode = "rmii"; |
| 179 |
phy-handle = <&internal_phy>; |
| 180 |
}; |
| 181 |
|
| 182 |
&hdmi_tx { |
| 183 |
status = "okay"; |
| 184 |
pinctrl-0 = <&hdmi_hpd_pins>, <&hdmi_i2c_pins>; |
| 185 |
pinctrl-names = "default"; |
| 186 |
hdmi-supply = <&hdmi_5v>; |
| 187 |
}; |
| 188 |
|
| 189 |
&hdmi_tx_tmds_port { |
| 190 |
hdmi_tx_tmds_out: endpoint { |
| 191 |
remote-endpoint = <&hdmi_connector_in>; |
| 192 |
}; |
| 193 |
}; |
| 194 |
|
| 195 |
&internal_phy { |
| 196 |
pinctrl-0 = <ð_link_led_pins>, <ð_act_led_pins>; |
| 197 |
pinctrl-names = "default"; |
| 198 |
}; |
| 199 |
|
| 200 |
/* This UART is brought out to the DB9 connector */ |
| 201 |
&uart_AO { |
| 202 |
status = "okay"; |
| 203 |
}; |