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";
26 stdout-path = "serial0:115200n8";
30 device_type = "memory";
31 reg = <0x0 0x0 0x0 0x80000000>;
35 compatible = "adc-keys";
36 io-channels = <&saradc 0>;
37 io-channel-names = "buttons";
38 keyup-threshold-microvolt = <1710000>;
42 linux,code = <KEY_FN>;
43 press-threshold-microvolt = <10000>;
47 emmc_pwrseq: emmc-pwrseq {
48 compatible = "mmc-pwrseq-emmc";
49 reset-gpios = <&gpio BOOT_9 GPIO_ACTIVE_LOW>;
53 compatible = "gpio-fan";
54 gpios = <&gpio GPIODV_14 GPIO_ACTIVE_HIGH
55 &gpio GPIODV_15 GPIO_ACTIVE_HIGH>;
56 /* Dummy RPM values since fan is optional */
57 gpio-fan,speed-map = <0 0
65 compatible = "gpio-keys-polled";
68 poll-interval = <100>;
72 linux,code = <KEY_POWER>;
73 gpios = <&gpio_ao GPIOAO_2 GPIO_ACTIVE_LOW>;
78 compatible = "hdmi-connector";
82 hdmi_connector_in: endpoint {
83 remote-endpoint = <&hdmi_tx_tmds_out>;
89 compatible = "pwm-leds";
92 label = "vim:red:power";
93 pwms = <&pwm_AO_ab 1 7812500 0>;
94 max-brightness = <255>;
95 linux,default-trigger = "default-on";
99 sdio_pwrseq: sdio-pwrseq {
100 compatible = "mmc-pwrseq-simple";
101 reset-gpios = <&gpio GPIOX_6 GPIO_ACTIVE_LOW>;
103 clock-names = "ext_clock";
108 polling-delay-passive = <250>; /* milliseconds */
109 polling-delay = <1000>; /* milliseconds */
111 thermal-sensors = <&scpi_sensors 0>;
114 cpu_alert0: cpu-alert0 {
115 temperature = <70000>; /* millicelsius */
116 hysteresis = <2000>; /* millicelsius */
120 cpu_alert1: cpu-alert1 {
121 temperature = <80000>; /* millicelsius */
122 hysteresis = <2000>; /* millicelsius */
129 trip = <&cpu_alert0>;
130 cooling-device = <&gpio_fan THERMAL_NO_LIMIT 1>;
134 trip = <&cpu_alert1>;
135 cooling-device = <&gpio_fan 2 THERMAL_NO_LIMIT>,
136 <&cpu0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
137 <&cpu1 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
138 <&cpu2 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
139 <&cpu3 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
140 <&cpu4 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
141 <&cpu5 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
142 <&cpu6 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
143 <&cpu7 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
149 hdmi_5v: regulator-hdmi-5v {
150 compatible = "regulator-fixed";
152 regulator-name = "HDMI_5V";
153 regulator-min-microvolt = <5000000>;
154 regulator-max-microvolt = <5000000>;
156 gpio = <&gpio GPIOH_3 GPIO_ACTIVE_HIGH>;
161 vcc_3v3: regulator-vcc_3v3 {
162 compatible = "regulator-fixed";
163 regulator-name = "VCC_3V3";
164 regulator-min-microvolt = <3300000>;
165 regulator-max-microvolt = <3300000>;
168 vddio_ao18: regulator-vddio_ao18 {
169 compatible = "regulator-fixed";
170 regulator-name = "VDDIO_AO18";
171 regulator-min-microvolt = <1800000>;
172 regulator-max-microvolt = <1800000>;
175 vddio_boot: regulator-vddio_boot {
176 compatible = "regulator-fixed";
177 regulator-name = "VDDIO_BOOT";
178 regulator-min-microvolt = <1800000>;
179 regulator-max-microvolt = <1800000>;
182 vddao_3v3: regulator-vddao_3v3 {
183 compatible = "regulator-fixed";
184 regulator-name = "VDDAO_3V3";
185 regulator-min-microvolt = <3300000>;
186 regulator-max-microvolt = <3300000>;
190 compatible = "pwm-clock";
192 clock-frequency = <32768>;
193 pwms = <&pwm_ef 0 30518 0>; /* PWM_E at 32.768KHz */
199 pinctrl-0 = <&ao_cec_pins>;
200 pinctrl-names = "default";
201 hdmi-phandle = <&hdmi_tx>;
205 #cooling-cells = <2>;
209 #cooling-cells = <2>;
213 #cooling-cells = <2>;
217 #cooling-cells = <2>;
221 #cooling-cells = <2>;
225 #cooling-cells = <2>;
229 #cooling-cells = <2>;
233 #cooling-cells = <2>;
237 pinctrl-0 = <ð_pins>;
238 pinctrl-names = "default";
240 /* Select external PHY by default */
241 phy-handle = <&external_phy>;
243 amlogic,tx-delay-ns = <2>;
245 /* External PHY reset is shared with internal PHY Led signals */
246 snps,reset-gpio = <&gpio GPIOZ_14 0>;
247 snps,reset-delays-us = <0 10000 1000000>;
248 snps,reset-active-low;
250 /* External PHY is in RGMII */
257 external_phy: ethernet-phy@0 {
258 /* Realtek RTL8211F (0x001cc916) */
260 interrupt-parent = <&gpio_intc>;
261 /* MAC_INTR on GPIOZ_15 */
262 interrupts = <25 IRQ_TYPE_LEVEL_LOW>;
268 pinctrl-0 = <&hdmi_hpd_pins>, <&hdmi_i2c_pins>;
269 pinctrl-names = "default";
270 hdmi-supply = <&hdmi_5v>;
274 hdmi_tx_tmds_out: endpoint {
275 remote-endpoint = <&hdmi_connector_in>;
281 pinctrl-0 = <&i2c_a_pins>;
282 pinctrl-names = "default";
287 pinctrl-0 = <&i2c_b_pins>;
288 pinctrl-names = "default";
291 /* has to be enabled manually when a battery is connected: */
293 compatible = "haoyu,hym8563";
296 clock-frequency = <32768>;
297 clock-output-names = "xin32k";
303 pinctrl-0 = <&remote_input_ao_pins>;
304 pinctrl-names = "default";
305 linux,rc-map-name = "rc-geekbox";
310 pinctrl-0 = <&pwm_ao_a_3_pins>, <&pwm_ao_b_pins>;
311 pinctrl-names = "default";
312 clocks = <&clkc CLKID_FCLK_DIV4>;
313 clock-names = "clkin0";
318 pinctrl-0 = <&pwm_e_pins>, <&pwm_f_clk_pins>;
319 pinctrl-names = "default";
320 clocks = <&clkc CLKID_FCLK_DIV4>;
321 clock-names = "clkin0";
326 pinctrl-0 = <&sdio_pins>;
327 pinctrl-names = "default";
328 #address-cells = <1>;
332 max-frequency = <100000000>;
337 mmc-pwrseq = <&sdio_pwrseq>;
339 vmmc-supply = <&vddao_3v3>;
340 vqmmc-supply = <&vddio_boot>;
344 compatible = "brcm,bcm4329-fmac";
351 pinctrl-0 = <&sdcard_pins>;
352 pinctrl-names = "default";
356 max-frequency = <100000000>;
359 cd-gpios = <&gpio CARD_6 GPIO_ACTIVE_HIGH>;
362 vmmc-supply = <&vddao_3v3>;
363 vqmmc-supply = <&vddio_boot>;
369 pinctrl-0 = <&emmc_pins>, <&emmc_ds_pins>;
370 pinctrl-names = "default";
375 max-frequency = <200000000>;
382 mmc-pwrseq = <&emmc_pwrseq>;
383 vmmc-supply = <&vcc_3v3>;
384 vqmmc-supply = <&vddio_boot>;
388 * EMMC_DS pin is shared between SPI NOR CS and eMMC Data Strobe
389 * Remove emmc_ds_pins from sd_emmc_c pinctrl-0 then spifc can be enabled
393 pinctrl-0 = <&nor_pins>;
394 pinctrl-names = "default";
396 w25q32: spi-flash@0 {
397 #address-cells = <1>;
399 compatible = "winbond,w25q16", "jedec,spi-nor";
401 spi-max-frequency = <3000000>;
405 /* This one is connected to the Bluetooth module */
408 pinctrl-0 = <&uart_a_pins>;
409 pinctrl-names = "default";
412 /* This is brought out on the Linux_RX (18) and Linux_TX (19) pins: */
415 pinctrl-0 = <&uart_ao_a_pins>;
416 pinctrl-names = "default";
419 /* This is brought out on the UART_RX_AO_B (15) and UART_TX_AO_B (16) pins: */
422 pinctrl-0 = <&uart_ao_b_pins>;
423 pinctrl-names = "default";
428 vref-supply = <&vddio_ao18>;