1 // SPDX-License-Identifier: (GPL-2.0+ OR MIT) 1 // SPDX-License-Identifier: (GPL-2.0+ OR MIT) 2 /* 2 /* 3 * Copyright (c) 2017 BayLibre, SAS. 3 * Copyright (c) 2017 BayLibre, SAS. 4 * Author: Neil Armstrong <narmstrong@baylibre. 4 * Author: Neil Armstrong <narmstrong@baylibre.com> 5 * Author: Jerome Brunet <jbrunet@baylibre.com> 5 * Author: Jerome Brunet <jbrunet@baylibre.com> 6 */ 6 */ 7 7 8 /dts-v1/; 8 /dts-v1/; 9 9 10 #include <dt-bindings/input/input.h> 10 #include <dt-bindings/input/input.h> 11 #include <dt-bindings/sound/meson-aiu.h> << 12 11 13 #include "meson-gxl-s905x.dtsi" 12 #include "meson-gxl-s905x.dtsi" 14 13 15 / { 14 / { 16 compatible = "libretech,aml-s905x-cc", 15 compatible = "libretech,aml-s905x-cc", "amlogic,s905x", 17 "amlogic,meson-gxl"; 16 "amlogic,meson-gxl"; 18 model = "Libre Computer AML-S905X-CC"; 17 model = "Libre Computer AML-S905X-CC"; 19 18 20 aliases { 19 aliases { 21 serial0 = &uart_AO; 20 serial0 = &uart_AO; 22 ethernet0 = ðmac; 21 ethernet0 = ðmac; 23 }; 22 }; 24 23 25 dio2133: analog-amplifier { << 26 compatible = "simple-audio-amp << 27 sound-name-prefix = "AU2"; << 28 VCC-supply = <&hdmi_5v>; << 29 enable-gpios = <&gpio GPIOH_5 << 30 }; << 31 << 32 chosen { 24 chosen { 33 stdout-path = "serial0:115200n 25 stdout-path = "serial0:115200n8"; 34 }; 26 }; 35 27 36 cvbs-connector { 28 cvbs-connector { 37 compatible = "composite-video- 29 compatible = "composite-video-connector"; 38 30 39 port { 31 port { 40 cvbs_connector_in: end 32 cvbs_connector_in: endpoint { 41 remote-endpoin 33 remote-endpoint = <&cvbs_vdac_out>; 42 }; 34 }; 43 }; 35 }; 44 }; 36 }; 45 37 46 emmc_pwrseq: emmc-pwrseq { 38 emmc_pwrseq: emmc-pwrseq { 47 compatible = "mmc-pwrseq-emmc" 39 compatible = "mmc-pwrseq-emmc"; 48 reset-gpios = <&gpio BOOT_9 GP 40 reset-gpios = <&gpio BOOT_9 GPIO_ACTIVE_LOW>; 49 }; 41 }; 50 42 51 hdmi-connector { 43 hdmi-connector { 52 compatible = "hdmi-connector"; 44 compatible = "hdmi-connector"; 53 type = "a"; 45 type = "a"; 54 46 55 port { 47 port { 56 hdmi_connector_in: end 48 hdmi_connector_in: endpoint { 57 remote-endpoin 49 remote-endpoint = <&hdmi_tx_tmds_out>; 58 }; 50 }; 59 }; 51 }; 60 }; 52 }; 61 53 62 leds { 54 leds { 63 compatible = "gpio-leds"; 55 compatible = "gpio-leds"; 64 56 65 led-system { 57 led-system { 66 label = "librecomputer 58 label = "librecomputer:system-status"; 67 gpios = <&gpio GPIODV_ 59 gpios = <&gpio GPIODV_24 GPIO_ACTIVE_HIGH>; 68 default-state = "on"; 60 default-state = "on"; 69 panic-indicator; 61 panic-indicator; 70 }; 62 }; 71 63 72 led-blue { 64 led-blue { 73 label = "librecomputer 65 label = "librecomputer:blue"; 74 gpios = <&gpio_ao GPIO 66 gpios = <&gpio_ao GPIOAO_2 GPIO_ACTIVE_HIGH>; 75 linux,default-trigger 67 linux,default-trigger = "heartbeat"; 76 }; 68 }; 77 }; 69 }; 78 70 79 memory@0 { 71 memory@0 { 80 device_type = "memory"; 72 device_type = "memory"; 81 reg = <0x0 0x0 0x0 0x80000000> 73 reg = <0x0 0x0 0x0 0x80000000>; 82 }; 74 }; 83 75 84 hdmi_5v: regulator-hdmi-5v { 76 hdmi_5v: regulator-hdmi-5v { 85 compatible = "regulator-fixed" 77 compatible = "regulator-fixed"; 86 78 87 regulator-name = "HDMI_5V"; 79 regulator-name = "HDMI_5V"; 88 regulator-min-microvolt = <500 80 regulator-min-microvolt = <5000000>; 89 regulator-max-microvolt = <500 81 regulator-max-microvolt = <5000000>; 90 82 91 gpio = <&gpio GPIOH_3 GPIO_ACT 83 gpio = <&gpio GPIOH_3 GPIO_ACTIVE_HIGH>; 92 enable-active-high; 84 enable-active-high; 93 regulator-always-on; 85 regulator-always-on; 94 }; 86 }; 95 87 96 vcc_3v3: regulator-vcc-3v3 { !! 88 vcc_3v3: regulator-vcc_3v3 { 97 compatible = "regulator-fixed" 89 compatible = "regulator-fixed"; 98 regulator-name = "VCC_3V3"; 90 regulator-name = "VCC_3V3"; 99 regulator-min-microvolt = <330 91 regulator-min-microvolt = <3300000>; 100 regulator-max-microvolt = <330 92 regulator-max-microvolt = <3300000>; 101 }; 93 }; 102 94 103 vcc_card: regulator-vcc-card { 95 vcc_card: regulator-vcc-card { 104 compatible = "regulator-gpio"; 96 compatible = "regulator-gpio"; 105 97 106 regulator-name = "VCC_CARD"; 98 regulator-name = "VCC_CARD"; 107 regulator-min-microvolt = <180 99 regulator-min-microvolt = <1800000>; 108 regulator-max-microvolt = <330 100 regulator-max-microvolt = <3300000>; 109 101 110 gpios = <&gpio_ao GPIOAO_3 GPI 102 gpios = <&gpio_ao GPIOAO_3 GPIO_ACTIVE_HIGH>; 111 gpios-states = <0>; 103 gpios-states = <0>; 112 104 113 states = <3300000 0>, 105 states = <3300000 0>, 114 <1800000 1>; 106 <1800000 1>; 115 107 116 regulator-settling-time-up-us 108 regulator-settling-time-up-us = <200>; 117 regulator-settling-time-down-u 109 regulator-settling-time-down-us = <50000>; 118 }; 110 }; 119 111 120 vddio_ao18: regulator-vddio-ao18 { !! 112 vddio_ao18: regulator-vddio_ao18 { 121 compatible = "regulator-fixed" 113 compatible = "regulator-fixed"; 122 regulator-name = "VDDIO_AO18"; 114 regulator-name = "VDDIO_AO18"; 123 regulator-min-microvolt = <180 115 regulator-min-microvolt = <1800000>; 124 regulator-max-microvolt = <180 116 regulator-max-microvolt = <1800000>; 125 }; 117 }; 126 118 127 /* This is provided by LDOs on the eMM 119 /* This is provided by LDOs on the eMMC daugther card */ 128 vddio_boot: regulator-vddio-boot { !! 120 vddio_boot: regulator-vddio_boot { 129 compatible = "regulator-fixed" 121 compatible = "regulator-fixed"; 130 regulator-name = "VDDIO_BOOT"; 122 regulator-name = "VDDIO_BOOT"; 131 regulator-min-microvolt = <180 123 regulator-min-microvolt = <1800000>; 132 regulator-max-microvolt = <180 124 regulator-max-microvolt = <1800000>; 133 vin-supply = <&vcc_3v3>; 125 vin-supply = <&vcc_3v3>; 134 }; 126 }; 135 << 136 sound { << 137 compatible = "amlogic,gx-sound << 138 model = "LIBRETECH-CC"; << 139 audio-aux-devs = <&dio2133>; << 140 audio-widgets = "Line", "Lineo << 141 audio-routing = "AU2 INL", "AC << 142 "AU2 INR", "AC << 143 "Lineout", "AU << 144 "Lineout", "AU << 145 clocks = <&clkc CLKID_MPLL0>, << 146 <&clkc CLKID_MPLL1>, << 147 <&clkc CLKID_MPLL2>; << 148 << 149 assigned-clocks = <&clkc CLKID << 150 <&clkc CLKID << 151 <&clkc CLKID << 152 assigned-clock-parents = <0>, << 153 assigned-clock-rates = <294912 << 154 <270950 << 155 <393216 << 156 << 157 dai-link-0 { << 158 sound-dai = <&aiu AIU_ << 159 }; << 160 << 161 dai-link-1 { << 162 sound-dai = <&aiu AIU_ << 163 dai-format = "i2s"; << 164 mclk-fs = <256>; << 165 << 166 codec-0 { << 167 sound-dai = <& << 168 }; << 169 << 170 codec-1 { << 171 sound-dai = <& << 172 }; << 173 }; << 174 << 175 dai-link-2 { << 176 sound-dai = <&aiu AIU_ << 177 << 178 codec-0 { << 179 sound-dai = <& << 180 }; << 181 }; << 182 << 183 dai-link-3 { << 184 sound-dai = <&aiu AIU_ << 185 << 186 codec-0 { << 187 sound-dai = <& << 188 }; << 189 }; << 190 }; << 191 }; << 192 << 193 &acodec { << 194 AVDD-supply = <&vddio_ao18>; << 195 status = "okay"; << 196 }; << 197 << 198 &aiu { << 199 status = "okay"; << 200 }; 127 }; 201 128 202 &cec_AO { 129 &cec_AO { 203 status = "okay"; 130 status = "okay"; 204 pinctrl-0 = <&ao_cec_pins>; 131 pinctrl-0 = <&ao_cec_pins>; 205 pinctrl-names = "default"; 132 pinctrl-names = "default"; 206 hdmi-phandle = <&hdmi_tx>; 133 hdmi-phandle = <&hdmi_tx>; 207 }; 134 }; 208 135 209 &cvbs_vdac_port { 136 &cvbs_vdac_port { 210 cvbs_vdac_out: endpoint { 137 cvbs_vdac_out: endpoint { 211 remote-endpoint = <&cvbs_conne 138 remote-endpoint = <&cvbs_connector_in>; 212 }; 139 }; 213 }; 140 }; 214 141 215 ðmac { 142 ðmac { 216 status = "okay"; 143 status = "okay"; 217 }; 144 }; 218 145 219 &internal_phy { 146 &internal_phy { 220 pinctrl-0 = <ð_link_led_pins>, <&et 147 pinctrl-0 = <ð_link_led_pins>, <ð_act_led_pins>; 221 pinctrl-names = "default"; 148 pinctrl-names = "default"; 222 }; 149 }; 223 150 224 &ir { 151 &ir { 225 status = "okay"; 152 status = "okay"; 226 pinctrl-0 = <&remote_input_ao_pins>; 153 pinctrl-0 = <&remote_input_ao_pins>; 227 pinctrl-names = "default"; 154 pinctrl-names = "default"; 228 }; 155 }; 229 156 230 &hdmi_tx { 157 &hdmi_tx { 231 status = "okay"; 158 status = "okay"; 232 pinctrl-0 = <&hdmi_hpd_pins>, <&hdmi_i 159 pinctrl-0 = <&hdmi_hpd_pins>, <&hdmi_i2c_pins>; 233 pinctrl-names = "default"; 160 pinctrl-names = "default"; 234 hdmi-supply = <&hdmi_5v>; 161 hdmi-supply = <&hdmi_5v>; 235 }; 162 }; 236 163 237 &hdmi_tx_tmds_port { 164 &hdmi_tx_tmds_port { 238 hdmi_tx_tmds_out: endpoint { 165 hdmi_tx_tmds_out: endpoint { 239 remote-endpoint = <&hdmi_conne 166 remote-endpoint = <&hdmi_connector_in>; 240 }; 167 }; 241 }; 168 }; 242 169 243 &gpio_ao { 170 &gpio_ao { 244 gpio-line-names = "UART TX", 171 gpio-line-names = "UART TX", 245 "UART RX", 172 "UART RX", 246 "Blue LED", 173 "Blue LED", 247 "SDCard Voltage Swit 174 "SDCard Voltage Switch", 248 "7J1 Header Pin5", 175 "7J1 Header Pin5", 249 "7J1 Header Pin3", 176 "7J1 Header Pin3", 250 "7J1 Header Pin12", 177 "7J1 Header Pin12", 251 "IR In", 178 "IR In", 252 "9J3 Switch HDMI CEC 179 "9J3 Switch HDMI CEC/7J1 Header Pin11", 253 "7J1 Header Pin13", 180 "7J1 Header Pin13", 254 /* GPIO_TEST_N */ 181 /* GPIO_TEST_N */ 255 "7J1 Header Pin15"; 182 "7J1 Header Pin15"; 256 }; 183 }; 257 184 258 &gpio { 185 &gpio { 259 gpio-line-names = /* Bank GPIOZ */ 186 gpio-line-names = /* Bank GPIOZ */ 260 "", "", "", "", "", 187 "", "", "", "", "", "", "", 261 "", "", "", "", "", 188 "", "", "", "", "", "", "", 262 "Eth Link LED", "Eth 189 "Eth Link LED", "Eth Activity LED", 263 /* Bank GPIOH */ 190 /* Bank GPIOH */ 264 "HDMI HPD", "HDMI SD 191 "HDMI HPD", "HDMI SDA", "HDMI SCL", 265 "HDMI_5V_EN", "9J1 H 192 "HDMI_5V_EN", "9J1 Header Pin2", 266 "Analog Audio Mute", 193 "Analog Audio Mute", 267 "2J3 Header Pin6", 194 "2J3 Header Pin6", 268 "2J3 Header Pin5", 195 "2J3 Header Pin5", 269 "2J3 Header Pin4", 196 "2J3 Header Pin4", 270 "2J3 Header Pin3", 197 "2J3 Header Pin3", 271 /* Bank BOOT */ 198 /* Bank BOOT */ 272 "eMMC D0", "eMMC D1" 199 "eMMC D0", "eMMC D1", "eMMC D2", "eMMC D3", 273 "eMMC D4", "eMMC D5" 200 "eMMC D4", "eMMC D5", "eMMC D6", "eMMC D7", 274 "eMMC Clk", "eMMC Re 201 "eMMC Clk", "eMMC Reset", "eMMC CMD", 275 "ALT BOOT MODE", "", 202 "ALT BOOT MODE", "", "", "", "eMMC Data Strobe", 276 /* Bank CARD */ 203 /* Bank CARD */ 277 "SDCard D1", "SDCard 204 "SDCard D1", "SDCard D0", "SDCard CLK", "SDCard CMD", 278 "SDCard D3", "SDCard 205 "SDCard D3", "SDCard D2", "SDCard Det", 279 /* Bank GPIODV */ 206 /* Bank GPIODV */ 280 "", "", "", "", "", 207 "", "", "", "", "", "", "", "", "", "", "", "", 281 "", "", "", "", "", 208 "", "", "", "", "", "", "", "", "", "", "", "", 282 "Green LED", "VCCK E 209 "Green LED", "VCCK Enable", 283 "7J1 Header Pin27", 210 "7J1 Header Pin27", "7J1 Header Pin28", 284 "VCCK Regulator", "V 211 "VCCK Regulator", "VDDEE Regulator", 285 /* Bank GPIOX */ 212 /* Bank GPIOX */ 286 "7J1 Header Pin22", 213 "7J1 Header Pin22", "7J1 Header Pin26", 287 "7J1 Header Pin36", 214 "7J1 Header Pin36", "7J1 Header Pin38", 288 "7J1 Header Pin40", 215 "7J1 Header Pin40", "7J1 Header Pin37", 289 "7J1 Header Pin33", 216 "7J1 Header Pin33", "7J1 Header Pin35", 290 "7J1 Header Pin19", 217 "7J1 Header Pin19", "7J1 Header Pin21", 291 "7J1 Header Pin24", 218 "7J1 Header Pin24", "7J1 Header Pin23", 292 "7J1 Header Pin8", " 219 "7J1 Header Pin8", "7J1 Header Pin10", 293 "7J1 Header Pin16", 220 "7J1 Header Pin16", "7J1 Header Pin18", 294 "7J1 Header Pin32", 221 "7J1 Header Pin32", "7J1 Header Pin29", 295 "7J1 Header Pin31", 222 "7J1 Header Pin31", 296 /* Bank GPIOCLK */ 223 /* Bank GPIOCLK */ 297 "7J1 Header Pin7", " 224 "7J1 Header Pin7", ""; 298 }; 225 }; 299 226 300 &saradc { 227 &saradc { 301 status = "okay"; 228 status = "okay"; 302 vref-supply = <&vddio_ao18>; 229 vref-supply = <&vddio_ao18>; 303 }; 230 }; 304 231 305 /* SD card */ 232 /* SD card */ 306 &sd_emmc_b { 233 &sd_emmc_b { 307 status = "okay"; 234 status = "okay"; 308 pinctrl-0 = <&sdcard_pins>; 235 pinctrl-0 = <&sdcard_pins>; 309 pinctrl-1 = <&sdcard_clk_gate_pins>; 236 pinctrl-1 = <&sdcard_clk_gate_pins>; 310 pinctrl-names = "default", "clk-gate"; 237 pinctrl-names = "default", "clk-gate"; 311 238 312 bus-width = <4>; 239 bus-width = <4>; 313 cap-sd-highspeed; 240 cap-sd-highspeed; 314 max-frequency = <50000000>; 241 max-frequency = <50000000>; 315 disable-wp; 242 disable-wp; 316 243 317 cd-gpios = <&gpio CARD_6 GPIO_ACTIVE_L 244 cd-gpios = <&gpio CARD_6 GPIO_ACTIVE_LOW>; 318 245 319 vmmc-supply = <&vcc_3v3>; 246 vmmc-supply = <&vcc_3v3>; 320 vqmmc-supply = <&vcc_card>; 247 vqmmc-supply = <&vcc_card>; 321 }; 248 }; 322 249 323 /* eMMC */ 250 /* eMMC */ 324 &sd_emmc_c { 251 &sd_emmc_c { 325 status = "okay"; 252 status = "okay"; 326 pinctrl-0 = <&emmc_pins>, <&emmc_ds_pi 253 pinctrl-0 = <&emmc_pins>, <&emmc_ds_pins>; 327 pinctrl-1 = <&emmc_clk_gate_pins>; 254 pinctrl-1 = <&emmc_clk_gate_pins>; 328 pinctrl-names = "default", "clk-gate"; 255 pinctrl-names = "default", "clk-gate"; 329 256 330 bus-width = <8>; 257 bus-width = <8>; 331 cap-mmc-highspeed; 258 cap-mmc-highspeed; 332 mmc-ddr-1_8v; 259 mmc-ddr-1_8v; 333 mmc-hs200-1_8v; 260 mmc-hs200-1_8v; 334 max-frequency = <200000000>; 261 max-frequency = <200000000>; 335 disable-wp; 262 disable-wp; 336 263 337 mmc-pwrseq = <&emmc_pwrseq>; 264 mmc-pwrseq = <&emmc_pwrseq>; 338 vmmc-supply = <&vcc_3v3>; 265 vmmc-supply = <&vcc_3v3>; 339 vqmmc-supply = <&vddio_boot>; 266 vqmmc-supply = <&vddio_boot>; 340 }; 267 }; 341 268 342 &uart_AO { 269 &uart_AO { 343 status = "okay"; 270 status = "okay"; 344 pinctrl-0 = <&uart_ao_a_pins>; 271 pinctrl-0 = <&uart_ao_a_pins>; 345 pinctrl-names = "default"; 272 pinctrl-names = "default"; 346 }; 273 }; 347 274 348 &usb { !! 275 &usb0 { 349 status = "okay"; 276 status = "okay"; 350 dr_mode = "host"; << 351 }; 277 }; 352 278 353 &usb2_phy0 { 279 &usb2_phy0 { 354 /* 280 /* 355 * even though the schematics don't sh 281 * even though the schematics don't show it: 356 * HDMI_5V is also used as supply for 282 * HDMI_5V is also used as supply for the USB VBUS. 357 */ 283 */ 358 phy-supply = <&hdmi_5v>; 284 phy-supply = <&hdmi_5v>; 359 }; 285 };
Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.