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