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>;
136 trip = <&cpu_alert1>;
138 <&cpu0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
142 trip = <&cpu_alert1>;
144 <&cpu4 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
150 hdmi_5v: regulator-hdmi-5v {
151 compatible = "regulator-fixed";
153 regulator-name = "HDMI_5V";
154 regulator-min-microvolt = <5000000>;
155 regulator-max-microvolt = <5000000>;
157 gpio = <&gpio GPIOH_3 GPIO_ACTIVE_HIGH>;
162 vcc_3v3: regulator-vcc_3v3 {
163 compatible = "regulator-fixed";
164 regulator-name = "VCC_3V3";
165 regulator-min-microvolt = <3300000>;
166 regulator-max-microvolt = <3300000>;
169 vddio_ao18: regulator-vddio_ao18 {
170 compatible = "regulator-fixed";
171 regulator-name = "VDDIO_AO18";
172 regulator-min-microvolt = <1800000>;
173 regulator-max-microvolt = <1800000>;
176 vddio_boot: regulator-vddio_boot {
177 compatible = "regulator-fixed";
178 regulator-name = "VDDIO_BOOT";
179 regulator-min-microvolt = <1800000>;
180 regulator-max-microvolt = <1800000>;
183 vddao_3v3: regulator-vddao_3v3 {
184 compatible = "regulator-fixed";
185 regulator-name = "VDDAO_3V3";
186 regulator-min-microvolt = <3300000>;
187 regulator-max-microvolt = <3300000>;
191 compatible = "pwm-clock";
193 clock-frequency = <32768>;
194 pwms = <&pwm_ef 0 30518 0>; /* PWM_E at 32.768KHz */
200 pinctrl-0 = <&ao_cec_pins>;
201 pinctrl-names = "default";
202 hdmi-phandle = <&hdmi_tx>;
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 #cooling-cells = <2>;
238 pinctrl-0 = <ð_pins>;
239 pinctrl-names = "default";
241 /* Select external PHY by default */
242 phy-handle = <&external_phy>;
244 amlogic,tx-delay-ns = <2>;
246 /* External PHY reset is shared with internal PHY Led signals */
247 snps,reset-gpio = <&gpio GPIOZ_14 0>;
248 snps,reset-delays-us = <0 10000 1000000>;
249 snps,reset-active-low;
251 /* External PHY is in RGMII */
258 external_phy: ethernet-phy@0 {
259 /* Realtek RTL8211F (0x001cc916) */
261 interrupt-parent = <&gpio_intc>;
262 /* MAC_INTR on GPIOZ_15 */
263 interrupts = <25 IRQ_TYPE_LEVEL_LOW>;
269 pinctrl-0 = <&hdmi_hpd_pins>, <&hdmi_i2c_pins>;
270 pinctrl-names = "default";
271 hdmi-supply = <&hdmi_5v>;
275 hdmi_tx_tmds_out: endpoint {
276 remote-endpoint = <&hdmi_connector_in>;
282 pinctrl-0 = <&i2c_a_pins>;
283 pinctrl-names = "default";
288 pinctrl-0 = <&i2c_b_pins>;
289 pinctrl-names = "default";
292 /* has to be enabled manually when a battery is connected: */
294 compatible = "haoyu,hym8563";
297 clock-frequency = <32768>;
298 clock-output-names = "xin32k";
304 pinctrl-0 = <&remote_input_ao_pins>;
305 pinctrl-names = "default";
306 linux,rc-map-name = "rc-geekbox";
311 pinctrl-0 = <&pwm_ao_a_3_pins>, <&pwm_ao_b_pins>;
312 pinctrl-names = "default";
313 clocks = <&clkc CLKID_FCLK_DIV4>;
314 clock-names = "clkin0";
319 pinctrl-0 = <&pwm_e_pins>, <&pwm_f_clk_pins>;
320 pinctrl-names = "default";
321 clocks = <&clkc CLKID_FCLK_DIV4>;
322 clock-names = "clkin0";
327 pinctrl-0 = <&sdio_pins>;
328 pinctrl-names = "default";
329 #address-cells = <1>;
333 max-frequency = <100000000>;
338 mmc-pwrseq = <&sdio_pwrseq>;
340 vmmc-supply = <&vddao_3v3>;
341 vqmmc-supply = <&vddio_boot>;
345 compatible = "brcm,bcm4329-fmac";
352 pinctrl-0 = <&sdcard_pins>;
353 pinctrl-names = "default";
357 max-frequency = <100000000>;
360 cd-gpios = <&gpio CARD_6 GPIO_ACTIVE_HIGH>;
363 vmmc-supply = <&vddao_3v3>;
364 vqmmc-supply = <&vddio_boot>;
370 pinctrl-0 = <&emmc_pins>, <&emmc_ds_pins>;
371 pinctrl-names = "default";
376 max-frequency = <200000000>;
383 mmc-pwrseq = <&emmc_pwrseq>;
384 vmmc-supply = <&vcc_3v3>;
385 vqmmc-supply = <&vddio_boot>;
389 * EMMC_DS pin is shared between SPI NOR CS and eMMC Data Strobe
390 * Remove emmc_ds_pins from sd_emmc_c pinctrl-0 then spifc can be enabled
394 pinctrl-0 = <&nor_pins>;
395 pinctrl-names = "default";
397 w25q32: spi-flash@0 {
398 #address-cells = <1>;
400 compatible = "winbond,w25q16", "jedec,spi-nor";
402 spi-max-frequency = <104000000>;
406 /* This one is connected to the Bluetooth module */
409 pinctrl-0 = <&uart_a_pins>, <&uart_a_cts_rts_pins>;
410 pinctrl-names = "default";
414 compatible = "brcm,bcm43438-bt";
415 shutdown-gpios = <&gpio GPIOX_17 GPIO_ACTIVE_HIGH>;
416 max-speed = <2000000>;
422 /* This is brought out on the Linux_RX (18) and Linux_TX (19) pins: */
425 pinctrl-0 = <&uart_ao_a_pins>;
426 pinctrl-names = "default";
429 /* This is brought out on the UART_RX_AO_B (15) and UART_TX_AO_B (16) pins: */
432 pinctrl-0 = <&uart_ao_b_pins>;
433 pinctrl-names = "default";
438 vref-supply = <&vddio_ao18>;