1 // SPDX-License-Identifier: (GPL-2.0+ OR MIT) 2 /* 3 * Copyright (c) 2017 Martin Blumenstingl <martin.blumenstingl@googlemail.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/sound/meson-aiu.h> 11 12 / { 13 compatible = "khadas,vim", "amlogic,s905x", "amlogic,meson-gxl"; 14 model = "Khadas VIM"; 15 16 adc-keys { 17 compatible = "adc-keys"; 18 io-channels = <&saradc 0>; 19 io-channel-names = "buttons"; 20 keyup-threshold-microvolt = <1710000>; 21 22 button-function { 23 label = "Function"; 24 linux,code = <KEY_FN>; 25 press-threshold-microvolt = <10000>; 26 }; 27 }; 28 29 aliases { 30 serial2 = &uart_AO_B; 31 ethernet0 = ðmac; 32 }; 33 34 gpio-keys-polled { 35 compatible = "gpio-keys-polled"; 36 poll-interval = <100>; 37 38 power-button { 39 label = "power"; 40 linux,code = <KEY_POWER>; 41 gpios = <&gpio_ao GPIOAO_2 GPIO_ACTIVE_LOW>; 42 }; 43 }; 44 45 led-controller { 46 compatible = "pwm-leds"; 47 48 led-1 { 49 label = "vim:red:power"; 50 pwms = <&pwm_AO_ab 1 7812500 0>; 51 max-brightness = <255>; 52 linux,default-trigger = "default-on"; 53 }; 54 }; 55 56 hdmi-connector { 57 compatible = "hdmi-connector"; 58 type = "a"; 59 60 port { 61 hdmi_connector_in: endpoint { 62 remote-endpoint = <&hdmi_tx_tmds_out>; 63 }; 64 }; 65 }; 66 67 sound { 68 compatible = "amlogic,gx-sound-card"; 69 model = "KHADAS-VIM"; 70 clocks = <&clkc CLKID_MPLL0>, 71 <&clkc CLKID_MPLL1>, 72 <&clkc CLKID_MPLL2>; 73 74 assigned-clocks = <&clkc CLKID_MPLL0>, 75 <&clkc CLKID_MPLL1>, 76 <&clkc CLKID_MPLL2>; 77 assigned-clock-parents = <0>, <0>, <0>; 78 assigned-clock-rates = <294912000>, 79 <270950400>, 80 <393216000>; 81 82 dai-link-0 { 83 sound-dai = <&aiu AIU_CPU CPU_I2S_FIFO>; 84 }; 85 86 dai-link-1 { 87 sound-dai = <&aiu AIU_CPU CPU_I2S_ENCODER>; 88 dai-format = "i2s"; 89 mclk-fs = <256>; 90 91 codec-0 { 92 sound-dai = <&aiu AIU_HDMI CTRL_I2S>; 93 }; 94 }; 95 96 dai-link-2 { 97 sound-dai = <&aiu AIU_HDMI CTRL_OUT>; 98 99 codec-0 { 100 sound-dai = <&hdmi_tx>; 101 }; 102 }; 103 }; 104 }; 105 106 &aiu { 107 status = "okay"; 108 }; 109 110 &cec_AO { 111 status = "okay"; 112 pinctrl-0 = <&ao_cec_pins>; 113 pinctrl-names = "default"; 114 hdmi-phandle = <&hdmi_tx>; 115 }; 116 117 &hdmi_tx { 118 status = "okay"; 119 pinctrl-0 = <&hdmi_hpd_pins>, <&hdmi_i2c_pins>; 120 pinctrl-names = "default"; 121 hdmi-supply = <&hdmi_5v>; 122 }; 123 124 &hdmi_tx_tmds_port { 125 hdmi_tx_tmds_out: endpoint { 126 remote-endpoint = <&hdmi_connector_in>; 127 }; 128 }; 129 130 &i2c_A { 131 status = "okay"; 132 pinctrl-0 = <&i2c_a_pins>; 133 pinctrl-names = "default"; 134 }; 135 136 &i2c_B { 137 status = "okay"; 138 pinctrl-0 = <&i2c_b_pins>; 139 pinctrl-names = "default"; 140 141 rtc: rtc@51 { 142 status = "okay"; 143 compatible = "haoyu,hym8563"; 144 reg = <0x51>; 145 #clock-cells = <0>; 146 clock-output-names = "xin32k"; 147 }; 148 }; 149 150 &ir { 151 linux,rc-map-name = "rc-khadas"; 152 }; 153 154 &gpio_ao { 155 gpio-line-names = "UART TX", 156 "UART RX", 157 "Power Key In", 158 "J9 Header Pin35", 159 "J9 Header Pin16", 160 "J9 Header Pin15", 161 "J9 Header Pin33", 162 "IR In", 163 "HDMI CEC", 164 "SYS LED", 165 /* GPIO_TEST_N */ 166 ""; 167 }; 168 169 &gpio { 170 gpio-line-names = /* Bank GPIOZ */ 171 "", "", "", "", "", "", "", 172 "", "", "", "", "", "", "", 173 "Power OFF", 174 "VCCK Enable", 175 /* Bank GPIOH */ 176 "HDMI HPD", "HDMI SDA", "HDMI SCL", 177 "HDMI_5V_EN", "SPDIF", 178 "J9 Header Pin37", 179 "J9 Header Pin30", 180 "J9 Header Pin29", 181 "J9 Header Pin32", 182 "J9 Header Pin31", 183 /* Bank BOOT */ 184 "eMMC D0", "eMMC D1", "eMMC D2", "eMMC D3", 185 "eMMC D4", "eMMC D5", "eMMC D6", "eMMC D7", 186 "eMMC Clk", "eMMC Reset", "eMMC CMD", 187 "", "BOOT_MODE", "", "", "eMMC Data Strobe", 188 /* Bank CARD */ 189 "SDCard D1", "SDCard D0", "SDCard CLK", "SDCard CMD", 190 "SDCard D3", "SDCard D2", "SDCard Det", 191 /* Bank GPIODV */ 192 "", "", "", "", "", "", "", "", "", "", "", "", 193 "", "", "", "", "", "", "", "", "", "", "", "", 194 "I2C A SDA", "I2C A SCK", "I2C B SDA", "I2C B SCK", 195 "VCCK Regulator", "VDDEE Regulator", 196 /* Bank GPIOX */ 197 "WIFI SDIO D0", "WIFI SDIO D1", "WIFI SDIO D2", 198 "WIFI SDIO D3", "WIFI SDIO CLK", "WIFI SDIO CMD", 199 "WIFI Power Enable", "WIFI WAKE HOST", 200 "Bluetooth PCM DOUT", "Bluetooth PCM DIN", 201 "Bluetooth PCM SYNC", "Bluetooth PCM CLK", 202 "Bluetooth UART TX", "Bluetooth UART RX", 203 "Bluetooth UART CTS", "Bluetooth UART RTS", 204 "WIFI 32K", "Bluetooth Enable", 205 "Bluetooth WAKE HOST", 206 /* Bank GPIOCLK */ 207 "", "J9 Header Pin39"; 208 }; 209 210 &pwm_AO_ab { 211 status = "okay"; 212 pinctrl-0 = <&pwm_ao_a_3_pins>, <&pwm_ao_b_pins>; 213 pinctrl-names = "default"; 214 clocks = <&xtal> , <&xtal>; 215 clock-names = "clkin0", "clkin1" ; 216 }; 217 218 &pwm_ef { 219 pinctrl-0 = <&pwm_e_pins>, <&pwm_f_clk_pins>; 220 }; 221 222 &sd_emmc_a { 223 max-frequency = <100000000>; 224 }; 225 226 /* This is brought out on the Linux_RX (18) and Linux_TX (19) pins: */ 227 &uart_AO { 228 status = "okay"; 229 }; 230 231 /* This is brought out on the UART_RX_AO_B (15) and UART_TX_AO_B (16) pins: */ 232 &uart_AO_B { 233 status = "okay"; 234 pinctrl-0 = <&uart_ao_b_pins>; 235 pinctrl-names = "default"; 236 }; 237 238 &usb { 239 dr_mode = "peripheral"; 240 };
Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.