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 <dt-bindings/input/input.h>
11 #include <dt-bindings/thermal/thermal.h>
13 #include "meson-gxm.dtsi"
16 compatible = "khadas,vim2", "amlogic,s912", "amlogic,meson-gxm";
17 model = "Khadas VIM2";
25 stdout-path = "serial0:115200n8";
29 device_type = "memory";
30 reg = <0x0 0x0 0x0 0x80000000>;
34 compatible = "adc-keys";
35 io-channels = <&saradc 0>;
36 io-channel-names = "buttons";
37 keyup-threshold-microvolt = <1710000>;
41 linux,code = <KEY_FN>;
42 press-threshold-microvolt = <10000>;
46 emmc_pwrseq: emmc-pwrseq {
47 compatible = "mmc-pwrseq-emmc";
48 reset-gpios = <&gpio BOOT_9 GPIO_ACTIVE_LOW>;
52 compatible = "gpio-fan";
53 gpios = <&gpio GPIODV_14 GPIO_ACTIVE_HIGH
54 &gpio GPIODV_15 GPIO_ACTIVE_HIGH>;
55 /* Dummy RPM values since fan is optional */
56 gpio-fan,speed-map = <0 0
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";
105 polling-delay-passive = <250>; /* milliseconds */
106 polling-delay = <1000>; /* milliseconds */
108 thermal-sensors = <&scpi_sensors 0>;
111 cpu_alert0: cpu-alert0 {
112 temperature = <70000>; /* millicelsius */
113 hysteresis = <2000>; /* millicelsius */
117 cpu_alert1: cpu-alert1 {
118 temperature = <80000>; /* millicelsius */
119 hysteresis = <2000>; /* millicelsius */
126 trip = <&cpu_alert0>;
127 cooling-device = <&gpio_fan THERMAL_NO_LIMIT 1>;
131 trip = <&cpu_alert1>;
132 cooling-device = <&gpio_fan 2 THERMAL_NO_LIMIT>,
133 <&cpu0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
134 <&cpu1 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
135 <&cpu2 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
136 <&cpu3 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
137 <&cpu4 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
138 <&cpu5 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
139 <&cpu6 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
140 <&cpu7 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
146 hdmi_5v: regulator-hdmi-5v {
147 compatible = "regulator-fixed";
149 regulator-name = "HDMI_5V";
150 regulator-min-microvolt = <5000000>;
151 regulator-max-microvolt = <5000000>;
153 gpio = <&gpio GPIOH_3 GPIO_ACTIVE_HIGH>;
158 vcc_3v3: regulator-vcc_3v3 {
159 compatible = "regulator-fixed";
160 regulator-name = "VCC_3V3";
161 regulator-min-microvolt = <3300000>;
162 regulator-max-microvolt = <3300000>;
165 vddio_ao18: regulator-vddio_ao18 {
166 compatible = "regulator-fixed";
167 regulator-name = "VDDIO_AO18";
168 regulator-min-microvolt = <1800000>;
169 regulator-max-microvolt = <1800000>;
172 vddio_boot: regulator-vddio_boot {
173 compatible = "regulator-fixed";
174 regulator-name = "VDDIO_BOOT";
175 regulator-min-microvolt = <1800000>;
176 regulator-max-microvolt = <1800000>;
179 vddao_3v3: regulator-vddao_3v3 {
180 compatible = "regulator-fixed";
181 regulator-name = "VDDAO_3V3";
182 regulator-min-microvolt = <3300000>;
183 regulator-max-microvolt = <3300000>;
187 compatible = "pwm-clock";
189 clock-frequency = <32768>;
190 pwms = <&pwm_ef 0 30518 0>; /* PWM_E at 32.768KHz */
196 pinctrl-0 = <&ao_cec_pins>;
197 pinctrl-names = "default";
198 hdmi-phandle = <&hdmi_tx>;
202 #cooling-cells = <2>;
206 #cooling-cells = <2>;
210 #cooling-cells = <2>;
214 #cooling-cells = <2>;
218 #cooling-cells = <2>;
222 #cooling-cells = <2>;
226 #cooling-cells = <2>;
230 #cooling-cells = <2>;
234 pinctrl-0 = <ð_pins>;
235 pinctrl-names = "default";
237 /* Select external PHY by default */
238 phy-handle = <&external_phy>;
240 amlogic,tx-delay-ns = <2>;
242 /* External PHY is in RGMII */
249 external_phy: ethernet-phy@0 {
250 /* Realtek RTL8211F (0x001cc916) */
253 reset-assert-us = <10000>;
254 reset-deassert-us = <80000>;
255 reset-gpios = <&gpio GPIOZ_14 GPIO_ACTIVE_LOW>;
257 interrupt-parent = <&gpio_intc>;
258 /* MAC_INTR on GPIOZ_15 */
259 interrupts = <25 IRQ_TYPE_LEVEL_LOW>;
265 pinctrl-0 = <&hdmi_hpd_pins>, <&hdmi_i2c_pins>;
266 pinctrl-names = "default";
267 hdmi-supply = <&hdmi_5v>;
271 hdmi_tx_tmds_out: endpoint {
272 remote-endpoint = <&hdmi_connector_in>;
278 pinctrl-0 = <&i2c_a_pins>;
279 pinctrl-names = "default";
284 pinctrl-0 = <&i2c_b_pins>;
285 pinctrl-names = "default";
288 /* has to be enabled manually when a battery is connected: */
290 compatible = "haoyu,hym8563";
293 clock-frequency = <32768>;
294 clock-output-names = "xin32k";
300 pinctrl-0 = <&remote_input_ao_pins>;
301 pinctrl-names = "default";
302 linux,rc-map-name = "rc-khadas";
307 pinctrl-0 = <&pwm_ao_a_3_pins>, <&pwm_ao_b_pins>;
308 pinctrl-names = "default";
309 clocks = <&clkc CLKID_FCLK_DIV4>;
310 clock-names = "clkin0";
315 pinctrl-0 = <&pwm_e_pins>, <&pwm_f_clk_pins>;
316 pinctrl-names = "default";
317 clocks = <&clkc CLKID_FCLK_DIV4>;
318 clock-names = "clkin0";
323 pinctrl-0 = <&sdio_pins>;
324 pinctrl-1 = <&sdio_clk_gate_pins>;
325 pinctrl-names = "default", "clk-gate";
326 #address-cells = <1>;
330 max-frequency = <60000000>;
335 mmc-pwrseq = <&sdio_pwrseq>;
337 vmmc-supply = <&vddao_3v3>;
338 vqmmc-supply = <&vddio_boot>;
342 compatible = "brcm,bcm4329-fmac";
349 pinctrl-0 = <&sdcard_pins>;
350 pinctrl-1 = <&sdcard_clk_gate_pins>;
351 pinctrl-names = "default", "clk-gate";
355 max-frequency = <50000000>;
358 cd-gpios = <&gpio CARD_6 GPIO_ACTIVE_LOW>;
360 vmmc-supply = <&vddao_3v3>;
361 vqmmc-supply = <&vddio_boot>;
367 pinctrl-0 = <&emmc_pins>, <&emmc_ds_pins>;
368 pinctrl-1 = <&emmc_clk_gate_pins>;
369 pinctrl-names = "default", "clk-gate";
373 max-frequency = <200000000>;
379 mmc-pwrseq = <&emmc_pwrseq>;
380 vmmc-supply = <&vcc_3v3>;
381 vqmmc-supply = <&vddio_boot>;
385 * EMMC_DS pin is shared between SPI NOR CS and eMMC Data Strobe
386 * Remove emmc_ds_pins from sd_emmc_c pinctrl-0 then spifc can be enabled
390 pinctrl-0 = <&nor_pins>;
391 pinctrl-names = "default";
393 w25q32: spi-flash@0 {
394 #address-cells = <1>;
396 compatible = "winbond,w25q16", "jedec,spi-nor";
398 spi-max-frequency = <104000000>;
402 /* This one is connected to the Bluetooth module */
405 pinctrl-0 = <&uart_a_pins>, <&uart_a_cts_rts_pins>;
406 pinctrl-names = "default";
410 compatible = "brcm,bcm43438-bt";
411 shutdown-gpios = <&gpio GPIOX_17 GPIO_ACTIVE_HIGH>;
412 max-speed = <2000000>;
418 /* This is brought out on the Linux_RX (18) and Linux_TX (19) pins: */
421 pinctrl-0 = <&uart_ao_a_pins>;
422 pinctrl-names = "default";
425 /* This is brought out on the UART_RX_AO_B (15) and UART_TX_AO_B (16) pins: */
428 pinctrl-0 = <&uart_ao_b_pins>;
429 pinctrl-names = "default";
434 vref-supply = <&vddio_ao18>;