1 // SPDX-License-Identifier: (GPL-2.0+ OR MIT)
3 * Copyright (c) 2017 Martin Blumenstingl <martin.blumenstingl@googlemail.com>.
4 * Copyright (c) 2017 BayLibre, SAS
5 * Author: Neil Armstrong <narmstrong@baylibre.com>
10 #include "meson-gxm.dtsi"
11 #include <dt-bindings/input/input.h>
12 #include <dt-bindings/sound/meson-aiu.h>
15 compatible = "khadas,vim2", "amlogic,s912", "amlogic,meson-gxm";
16 model = "Khadas VIM2";
24 stdout-path = "serial0:115200n8";
28 device_type = "memory";
29 reg = <0x0 0x0 0x0 0x80000000>;
33 compatible = "adc-keys";
34 io-channels = <&saradc 0>;
35 io-channel-names = "buttons";
36 keyup-threshold-microvolt = <1710000>;
40 linux,code = <KEY_FN>;
41 press-threshold-microvolt = <10000>;
45 emmc_pwrseq: emmc-pwrseq {
46 compatible = "mmc-pwrseq-emmc";
47 reset-gpios = <&gpio BOOT_9 GPIO_ACTIVE_LOW>;
51 compatible = "gpio-fan";
52 gpios = <&gpio GPIODV_14 GPIO_ACTIVE_HIGH
53 &gpio GPIODV_15 GPIO_ACTIVE_HIGH>;
54 /* Dummy RPM values since fan is optional */
64 compatible = "gpio-keys-polled";
65 poll-interval = <100>;
69 linux,code = <KEY_POWER>;
70 gpios = <&gpio_ao GPIOAO_2 GPIO_ACTIVE_LOW>;
75 compatible = "hdmi-connector";
79 hdmi_connector_in: endpoint {
80 remote-endpoint = <&hdmi_tx_tmds_out>;
86 compatible = "pwm-leds";
89 label = "vim:red:power";
90 pwms = <&pwm_AO_ab 1 7812500 0>;
91 max-brightness = <255>;
92 linux,default-trigger = "default-on";
96 sdio_pwrseq: sdio-pwrseq {
97 compatible = "mmc-pwrseq-simple";
98 reset-gpios = <&gpio GPIOX_6 GPIO_ACTIVE_LOW>;
100 clock-names = "ext_clock";
103 hdmi_5v: regulator-hdmi-5v {
104 compatible = "regulator-fixed";
106 regulator-name = "HDMI_5V";
107 regulator-min-microvolt = <5000000>;
108 regulator-max-microvolt = <5000000>;
110 gpio = <&gpio GPIOH_3 GPIO_ACTIVE_HIGH>;
115 vcc_3v3: regulator-vcc_3v3 {
116 compatible = "regulator-fixed";
117 regulator-name = "VCC_3V3";
118 regulator-min-microvolt = <3300000>;
119 regulator-max-microvolt = <3300000>;
122 vddio_ao18: regulator-vddio_ao18 {
123 compatible = "regulator-fixed";
124 regulator-name = "VDDIO_AO18";
125 regulator-min-microvolt = <1800000>;
126 regulator-max-microvolt = <1800000>;
129 vddio_boot: regulator-vddio_boot {
130 compatible = "regulator-fixed";
131 regulator-name = "VDDIO_BOOT";
132 regulator-min-microvolt = <1800000>;
133 regulator-max-microvolt = <1800000>;
136 vddao_3v3: regulator-vddao_3v3 {
137 compatible = "regulator-fixed";
138 regulator-name = "VDDAO_3V3";
139 regulator-min-microvolt = <3300000>;
140 regulator-max-microvolt = <3300000>;
144 compatible = "pwm-clock";
146 clock-frequency = <32768>;
147 pwms = <&pwm_ef 0 30518 0>; /* PWM_E at 32.768KHz */
151 compatible = "amlogic,gx-sound-card";
152 model = "KHADAS-VIM2";
153 assigned-clocks = <&clkc CLKID_MPLL0>,
156 assigned-clock-parents = <0>, <0>, <0>;
157 assigned-clock-rates = <294912000>,
162 sound-dai = <&aiu AIU_CPU CPU_I2S_FIFO>;
166 sound-dai = <&aiu AIU_CPU CPU_I2S_ENCODER>;
171 sound-dai = <&aiu AIU_HDMI CTRL_I2S>;
176 sound-dai = <&aiu AIU_HDMI CTRL_OUT>;
179 sound-dai = <&hdmi_tx>;
191 pinctrl-0 = <&ao_cec_pins>;
192 pinctrl-names = "default";
193 hdmi-phandle = <&hdmi_tx>;
198 cooling-device = <&gpio_fan THERMAL_NO_LIMIT 1>;
202 cooling-device = <&gpio_fan 2 THERMAL_NO_LIMIT>,
203 <&cpu0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
204 <&cpu1 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
205 <&cpu2 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
206 <&cpu3 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
207 <&cpu4 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
208 <&cpu5 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
209 <&cpu6 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
210 <&cpu7 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
215 pinctrl-0 = <ð_pins>;
216 pinctrl-names = "default";
218 /* Select external PHY by default */
219 phy-handle = <&external_phy>;
221 amlogic,tx-delay-ns = <2>;
223 /* External PHY is in RGMII */
230 external_phy: ethernet-phy@0 {
231 /* Realtek RTL8211F (0x001cc916) */
234 reset-assert-us = <10000>;
235 reset-deassert-us = <80000>;
236 reset-gpios = <&gpio GPIOZ_14 GPIO_ACTIVE_LOW>;
238 interrupt-parent = <&gpio_intc>;
239 /* MAC_INTR on GPIOZ_15 */
240 interrupts = <25 IRQ_TYPE_LEVEL_LOW>;
246 pinctrl-0 = <&hdmi_hpd_pins>, <&hdmi_i2c_pins>;
247 pinctrl-names = "default";
248 hdmi-supply = <&hdmi_5v>;
252 hdmi_tx_tmds_out: endpoint {
253 remote-endpoint = <&hdmi_connector_in>;
259 pinctrl-0 = <&i2c_a_pins>;
260 pinctrl-names = "default";
265 pinctrl-0 = <&i2c_b_pins>;
266 pinctrl-names = "default";
270 compatible = "haoyu,hym8563";
273 clock-output-names = "xin32k";
279 pinctrl-0 = <&remote_input_ao_pins>;
280 pinctrl-names = "default";
281 linux,rc-map-name = "rc-khadas";
286 pinctrl-0 = <&pwm_ao_a_3_pins>, <&pwm_ao_b_pins>;
287 pinctrl-names = "default";
288 clocks = <&clkc CLKID_FCLK_DIV4>;
289 clock-names = "clkin0";
294 pinctrl-0 = <&pwm_e_pins>, <&pwm_f_clk_pins>;
295 pinctrl-names = "default";
296 clocks = <&clkc CLKID_FCLK_DIV4>;
297 clock-names = "clkin0";
302 pinctrl-0 = <&sdio_pins>;
303 pinctrl-1 = <&sdio_clk_gate_pins>;
304 pinctrl-names = "default", "clk-gate";
305 #address-cells = <1>;
310 max-frequency = <100000000>;
315 /* WiFi firmware requires power to be kept while in suspend */
316 keep-power-in-suspend;
318 mmc-pwrseq = <&sdio_pwrseq>;
320 vmmc-supply = <&vddao_3v3>;
321 vqmmc-supply = <&vddio_boot>;
325 compatible = "brcm,bcm4329-fmac";
332 pinctrl-0 = <&sdcard_pins>;
333 pinctrl-1 = <&sdcard_clk_gate_pins>;
334 pinctrl-names = "default", "clk-gate";
338 max-frequency = <50000000>;
341 cd-gpios = <&gpio CARD_6 GPIO_ACTIVE_LOW>;
343 vmmc-supply = <&vddao_3v3>;
344 vqmmc-supply = <&vddio_boot>;
350 pinctrl-0 = <&emmc_pins>, <&emmc_ds_pins>;
351 pinctrl-1 = <&emmc_clk_gate_pins>;
352 pinctrl-names = "default", "clk-gate";
356 max-frequency = <200000000>;
362 mmc-pwrseq = <&emmc_pwrseq>;
363 vmmc-supply = <&vcc_3v3>;
364 vqmmc-supply = <&vddio_boot>;
368 * EMMC_DS pin is shared between SPI NOR CS and eMMC Data Strobe
369 * Remove emmc_ds_pins from sd_emmc_c pinctrl-0 then spifc can be enabled
373 pinctrl-0 = <&nor_pins>;
374 pinctrl-names = "default";
377 #address-cells = <1>;
379 compatible = "winbond,w25q16", "jedec,spi-nor";
381 spi-max-frequency = <104000000>;
385 /* This one is connected to the Bluetooth module */
388 pinctrl-0 = <&uart_a_pins>, <&uart_a_cts_rts_pins>;
389 pinctrl-names = "default";
393 compatible = "brcm,bcm43438-bt";
394 shutdown-gpios = <&gpio GPIOX_17 GPIO_ACTIVE_HIGH>;
395 max-speed = <2000000>;
401 /* This is brought out on the Linux_RX (18) and Linux_TX (19) pins: */
404 pinctrl-0 = <&uart_ao_a_pins>;
405 pinctrl-names = "default";
408 /* This is brought out on the UART_RX_AO_B (15) and UART_TX_AO_B (16) pins: */
411 pinctrl-0 = <&uart_ao_b_pins>;
412 pinctrl-names = "default";
417 vref-supply = <&vddio_ao18>;
422 dr_mode = "peripheral";