| 1 |
// SPDX-License-Identifier: (GPL-2.0+ OR MIT) |
| 2 |
/* |
| 3 |
* Copyright (c) 2018 BayLibre, SAS. |
| 4 |
* Author: Neil Armstrong <[email protected]> |
| 5 |
* Author: Jerome Brunet <[email protected]> |
| 6 |
*/ |
| 7 |
|
| 8 |
/dts-v1/; |
| 9 |
|
| 10 |
#include <dt-bindings/input/input.h> |
| 11 |
#include <dt-bindings/sound/meson-aiu.h> |
| 12 |
|
| 13 |
#include "meson-gxl-s805x.dtsi" |
| 14 |
|
| 15 |
/ { |
| 16 |
compatible = "libretech,aml-s805x-ac", "amlogic,s805x", |
| 17 |
"amlogic,meson-gxl"; |
| 18 |
model = "Libre Computer AML-S805X-AC"; |
| 19 |
|
| 20 |
aliases { |
| 21 |
serial0 = &uart_AO; |
| 22 |
ethernet0 = ðmac; |
| 23 |
spi0 = &spifc; |
| 24 |
}; |
| 25 |
|
| 26 |
chosen { |
| 27 |
stdout-path = "serial0:115200n8"; |
| 28 |
}; |
| 29 |
|
| 30 |
cvbs-connector { |
| 31 |
/* |
| 32 |
* The pads are present but no connector is soldered on |
| 33 |
* 2J2, so keep this off by default. |
| 34 |
*/ |
| 35 |
status = "disabled"; |
| 36 |
compatible = "composite-video-connector"; |
| 37 |
|
| 38 |
port { |
| 39 |
cvbs_connector_in: endpoint { |
| 40 |
remote-endpoint = <&cvbs_vdac_out>; |
| 41 |
}; |
| 42 |
}; |
| 43 |
}; |
| 44 |
|
| 45 |
dc_5v: regulator-dc-5v { |
| 46 |
compatible = "regulator-fixed"; |
| 47 |
regulator-name = "DC_5V"; |
| 48 |
regulator-min-microvolt = <5000000>; |
| 49 |
regulator-max-microvolt = <5000000>; |
| 50 |
regulator-always-on; |
| 51 |
}; |
| 52 |
|
| 53 |
emmc_pwrseq: emmc-pwrseq { |
| 54 |
compatible = "mmc-pwrseq-emmc"; |
| 55 |
reset-gpios = <&gpio BOOT_9 GPIO_ACTIVE_LOW>; |
| 56 |
}; |
| 57 |
|
| 58 |
hdmi-connector { |
| 59 |
compatible = "hdmi-connector"; |
| 60 |
type = "a"; |
| 61 |
|
| 62 |
port { |
| 63 |
hdmi_connector_in: endpoint { |
| 64 |
remote-endpoint = <&hdmi_tx_tmds_out>; |
| 65 |
}; |
| 66 |
}; |
| 67 |
}; |
| 68 |
|
| 69 |
memory@0 { |
| 70 |
device_type = "memory"; |
| 71 |
reg = <0x0 0x0 0x0 0x20000000>; |
| 72 |
}; |
| 73 |
|
| 74 |
vcck: regulator-vcck { |
| 75 |
compatible = "regulator-fixed"; |
| 76 |
regulator-name = "VCCK"; |
| 77 |
regulator-min-microvolt = <3300000>; |
| 78 |
regulator-max-microvolt = <3300000>; |
| 79 |
vin-supply = <&dc_5v>; |
| 80 |
|
| 81 |
/* |
| 82 |
* This is controlled by GPIOAO_9 we reserve this but |
| 83 |
* claiming it as done below reset the board anyway |
| 84 |
* Need to investigate this |
| 85 |
* |
| 86 |
* gpio = <&gpio_ao GPIOAO_9 GPIO_ACTIVE_HIGH>; |
| 87 |
* enable-active-high; |
| 88 |
*/ |
| 89 |
regulator-always-on; |
| 90 |
}; |
| 91 |
|
| 92 |
vcc_3v3: regulator-vcc-3v3 { |
| 93 |
compatible = "regulator-fixed"; |
| 94 |
regulator-name = "VCC_3V3"; |
| 95 |
regulator-min-microvolt = <3300000>; |
| 96 |
regulator-max-microvolt = <3300000>; |
| 97 |
vin-supply = <&dc_5v>; |
| 98 |
regulator-always-on; |
| 99 |
}; |
| 100 |
|
| 101 |
vddio_ao18: regulator-vddio-ao18 { |
| 102 |
compatible = "regulator-fixed"; |
| 103 |
regulator-name = "VDDIO_AO18"; |
| 104 |
regulator-min-microvolt = <1800000>; |
| 105 |
regulator-max-microvolt = <1800000>; |
| 106 |
vin-supply = <&vcc_3v3>; |
| 107 |
regulator-always-on; |
| 108 |
}; |
| 109 |
|
| 110 |
vddio_boot: regulator-vddio-boot { |
| 111 |
compatible = "regulator-fixed"; |
| 112 |
regulator-name = "VDDIO_BOOT"; |
| 113 |
regulator-min-microvolt = <1800000>; |
| 114 |
regulator-max-microvolt = <1800000>; |
| 115 |
vin-supply = <&vcc_3v3>; |
| 116 |
regulator-always-on; |
| 117 |
}; |
| 118 |
|
| 119 |
sound { |
| 120 |
compatible = "amlogic,gx-sound-card"; |
| 121 |
model = "LIBRETECH-AC"; |
| 122 |
audio-widgets = "Speaker", "9J5-3 LEFT", |
| 123 |
"Speaker", "9J5-2 RIGHT"; |
| 124 |
audio-routing = "9J5-3 LEFT", "ACODEC LOLN", |
| 125 |
"9J5-2 RIGHT", "ACODEC LORN"; |
| 126 |
clocks = <&clkc CLKID_MPLL0>, |
| 127 |
<&clkc CLKID_MPLL1>, |
| 128 |
<&clkc CLKID_MPLL2>; |
| 129 |
|
| 130 |
assigned-clocks = <&clkc CLKID_MPLL0>, |
| 131 |
<&clkc CLKID_MPLL1>, |
| 132 |
<&clkc CLKID_MPLL2>; |
| 133 |
assigned-clock-rates = <294912000>, |
| 134 |
<270950400>, |
| 135 |
<393216000>; |
| 136 |
|
| 137 |
dai-link-0 { |
| 138 |
sound-dai = <&aiu AIU_CPU CPU_I2S_FIFO>; |
| 139 |
}; |
| 140 |
|
| 141 |
dai-link-1 { |
| 142 |
sound-dai = <&aiu AIU_CPU CPU_I2S_ENCODER>; |
| 143 |
dai-format = "i2s"; |
| 144 |
mclk-fs = <256>; |
| 145 |
|
| 146 |
codec-0 { |
| 147 |
sound-dai = <&aiu AIU_HDMI CTRL_I2S>; |
| 148 |
}; |
| 149 |
|
| 150 |
codec-1 { |
| 151 |
sound-dai = <&aiu AIU_ACODEC CTRL_I2S>; |
| 152 |
}; |
| 153 |
}; |
| 154 |
|
| 155 |
dai-link-2 { |
| 156 |
sound-dai = <&aiu AIU_HDMI CTRL_OUT>; |
| 157 |
|
| 158 |
codec-0 { |
| 159 |
sound-dai = <&hdmi_tx>; |
| 160 |
}; |
| 161 |
}; |
| 162 |
|
| 163 |
dai-link-3 { |
| 164 |
sound-dai = <&aiu AIU_ACODEC CTRL_OUT>; |
| 165 |
|
| 166 |
codec-0 { |
| 167 |
sound-dai = <&acodec>; |
| 168 |
}; |
| 169 |
}; |
| 170 |
}; |
| 171 |
}; |
| 172 |
|
| 173 |
&acodec { |
| 174 |
AVDD-supply = <&vddio_ao18>; |
| 175 |
status = "okay"; |
| 176 |
}; |
| 177 |
|
| 178 |
&aiu { |
| 179 |
status = "okay"; |
| 180 |
}; |
| 181 |
|
| 182 |
&cec_AO { |
| 183 |
status = "okay"; |
| 184 |
pinctrl-0 = <&ao_cec_pins>; |
| 185 |
pinctrl-names = "default"; |
| 186 |
hdmi-phandle = <&hdmi_tx>; |
| 187 |
}; |
| 188 |
|
| 189 |
&cvbs_vdac_port { |
| 190 |
cvbs_vdac_out: endpoint { |
| 191 |
remote-endpoint = <&cvbs_connector_in>; |
| 192 |
}; |
| 193 |
}; |
| 194 |
|
| 195 |
ðmac { |
| 196 |
status = "okay"; |
| 197 |
}; |
| 198 |
|
| 199 |
&internal_phy { |
| 200 |
pinctrl-0 = <ð_link_led_pins>, <ð_act_led_pins>; |
| 201 |
pinctrl-names = "default"; |
| 202 |
}; |
| 203 |
|
| 204 |
&ir { |
| 205 |
status = "okay"; |
| 206 |
pinctrl-0 = <&remote_input_ao_pins>; |
| 207 |
pinctrl-names = "default"; |
| 208 |
}; |
| 209 |
|
| 210 |
&hdmi_tx { |
| 211 |
status = "okay"; |
| 212 |
pinctrl-0 = <&hdmi_hpd_pins>, <&hdmi_i2c_pins>; |
| 213 |
pinctrl-names = "default"; |
| 214 |
}; |
| 215 |
|
| 216 |
&hdmi_tx_tmds_port { |
| 217 |
hdmi_tx_tmds_out: endpoint { |
| 218 |
remote-endpoint = <&hdmi_connector_in>; |
| 219 |
}; |
| 220 |
}; |
| 221 |
|
| 222 |
&gpio_ao { |
| 223 |
gpio-line-names = "UART TX", |
| 224 |
"UART RX", |
| 225 |
"7J1 Header Pin31", |
| 226 |
"", "", "", "", |
| 227 |
"IR In", |
| 228 |
"HDMI CEC", |
| 229 |
"5V VCCK Regulator", |
| 230 |
/* GPIO_TEST_N */ |
| 231 |
""; |
| 232 |
}; |
| 233 |
|
| 234 |
&gpio { |
| 235 |
gpio-line-names = /* Bank GPIOZ */ |
| 236 |
"", "", "", "", "", "", "", |
| 237 |
"", "", "", "", "", "", "", |
| 238 |
"Eth Link LED", "Eth Activity LED", |
| 239 |
/* Bank GPIOH */ |
| 240 |
"HDMI HPD", "HDMI SDA", "HDMI SCL", |
| 241 |
"", "7J1 Header Pin13", |
| 242 |
"7J1 Header Pin15", |
| 243 |
"7J1 Header Pin7", |
| 244 |
"7J1 Header Pin12", |
| 245 |
"7J1 Header Pin16", |
| 246 |
"7J1 Header Pin18", |
| 247 |
/* Bank BOOT */ |
| 248 |
"eMMC D0", "eMMC D1", "eMMC D2", "eMMC D3", |
| 249 |
"eMMC D4", "eMMC D5", "eMMC D6", "eMMC D7", |
| 250 |
"eMMC Clk", "eMMC Reset", "eMMC CMD", |
| 251 |
"SPI NOR MOSI", "SPI NOR MISO", "SPI NOR Clk", |
| 252 |
"", "SPI NOR Chip Select", |
| 253 |
/* Bank CARD */ |
| 254 |
"", "", "", "", "", "", "", |
| 255 |
/* Bank GPIODV */ |
| 256 |
"", "", "", "", "", "", "", "", "", "", "", "", |
| 257 |
"", "", "", "", "", "", "", "", "", "", "", "", |
| 258 |
"7J1 Header Pin27", "7J1 Header Pin28", "", |
| 259 |
"7J1 Header Pin29", |
| 260 |
"VCCK Regulator", "VDDEE Regulator", |
| 261 |
/* Bank GPIOX */ |
| 262 |
"7J1 Header Pin22", "7J1 Header Pin26", |
| 263 |
"7J1 Header Pin36", "7J1 Header Pin38", |
| 264 |
"7J1 Header Pin40", "7J1 Header Pin37", |
| 265 |
"7J1 Header Pin33", "7J1 Header Pin35", |
| 266 |
"7J1 Header Pin19", "7J1 Header Pin21", |
| 267 |
"7J1 Header Pin24", "7J1 Header Pin23", |
| 268 |
"7J1 Header Pin8", "7J1 Header Pin10", |
| 269 |
"", "", "7J1 Header Pin32", "", "", |
| 270 |
/* Bank GPIOCLK */ |
| 271 |
"", ""; |
| 272 |
}; |
| 273 |
|
| 274 |
&saradc { |
| 275 |
status = "okay"; |
| 276 |
vref-supply = <&vddio_boot>; |
| 277 |
}; |
| 278 |
|
| 279 |
/* eMMC */ |
| 280 |
&sd_emmc_c { |
| 281 |
status = "okay"; |
| 282 |
pinctrl-0 = <&emmc_pins>; |
| 283 |
pinctrl-1 = <&emmc_clk_gate_pins>; |
| 284 |
pinctrl-names = "default", "clk-gate"; |
| 285 |
|
| 286 |
bus-width = <8>; |
| 287 |
cap-mmc-highspeed; |
| 288 |
mmc-ddr-1_8v; |
| 289 |
mmc-hs200-1_8v; |
| 290 |
max-frequency = <200000000>; |
| 291 |
disable-wp; |
| 292 |
|
| 293 |
mmc-pwrseq = <&emmc_pwrseq>; |
| 294 |
vmmc-supply = <&vcc_3v3>; |
| 295 |
vqmmc-supply = <&vddio_boot>; |
| 296 |
}; |
| 297 |
|
| 298 |
&spifc { |
| 299 |
status = "okay"; |
| 300 |
pinctrl-0 = <&nor_pins>; |
| 301 |
pinctrl-names = "default"; |
| 302 |
|
| 303 |
w25q32: flash@0 { |
| 304 |
#address-cells = <1>; |
| 305 |
#size-cells = <1>; |
| 306 |
compatible = "jedec,spi-nor"; |
| 307 |
reg = <0>; |
| 308 |
spi-max-frequency = <3000000>; |
| 309 |
}; |
| 310 |
}; |
| 311 |
|
| 312 |
&uart_AO { |
| 313 |
status = "okay"; |
| 314 |
pinctrl-0 = <&uart_ao_a_pins>; |
| 315 |
pinctrl-names = "default"; |
| 316 |
}; |
| 317 |
|
| 318 |
&usb { |
| 319 |
status = "okay"; |
| 320 |
dr_mode = "host"; |
| 321 |
}; |