2 * Copyright (c) 2017 Martin Blumenstingl <martin.blumenstingl@googlemail.com>.
3 * Copyright (c) 2017 BayLibre, SAS
4 * Author: Neil Armstrong <narmstrong@baylibre.com>
6 * SPDX-License-Identifier: (GPL-2.0+ OR MIT)
11 #include <dt-bindings/input/input.h>
12 #include <dt-bindings/thermal/thermal.h>
14 #include "meson-gxm.dtsi"
17 compatible = "khadas,vim2", "amlogic,s912", "amlogic,meson-gxm";
18 model = "Khadas VIM2";
27 stdout-path = "serial0:115200n8";
31 device_type = "memory";
32 reg = <0x0 0x0 0x0 0x80000000>;
36 compatible = "adc-keys";
37 io-channels = <&saradc 0>;
38 io-channel-names = "buttons";
39 keyup-threshold-microvolt = <1710000>;
43 linux,code = <KEY_FN>;
44 press-threshold-microvolt = <10000>;
48 emmc_pwrseq: emmc-pwrseq {
49 compatible = "mmc-pwrseq-emmc";
50 reset-gpios = <&gpio BOOT_9 GPIO_ACTIVE_LOW>;
54 compatible = "gpio-fan";
55 gpios = <&gpio GPIODV_14 GPIO_ACTIVE_HIGH
56 &gpio GPIODV_15 GPIO_ACTIVE_HIGH>;
57 /* Dummy RPM values since fan is optional */
58 gpio-fan,speed-map = <0 0
62 cooling-min-level = <0>;
63 cooling-max-level = <3>;
68 compatible = "gpio-keys-polled";
69 poll-interval = <100>;
73 linux,code = <KEY_POWER>;
74 gpios = <&gpio_ao GPIOAO_2 GPIO_ACTIVE_LOW>;
79 compatible = "hdmi-connector";
83 hdmi_connector_in: endpoint {
84 remote-endpoint = <&hdmi_tx_tmds_out>;
90 compatible = "pwm-leds";
93 label = "vim:red:power";
94 pwms = <&pwm_AO_ab 1 7812500 0>;
95 max-brightness = <255>;
96 linux,default-trigger = "default-on";
100 sdio_pwrseq: sdio-pwrseq {
101 compatible = "mmc-pwrseq-simple";
102 reset-gpios = <&gpio GPIOX_6 GPIO_ACTIVE_LOW>;
104 clock-names = "ext_clock";
109 polling-delay-passive = <250>; /* milliseconds */
110 polling-delay = <1000>; /* milliseconds */
112 thermal-sensors = <&scpi_sensors 0>;
115 cpu_alert0: cpu-alert0 {
116 temperature = <70000>; /* millicelsius */
117 hysteresis = <2000>; /* millicelsius */
121 cpu_alert1: cpu-alert1 {
122 temperature = <80000>; /* millicelsius */
123 hysteresis = <2000>; /* millicelsius */
130 trip = <&cpu_alert0>;
131 cooling-device = <&gpio_fan THERMAL_NO_LIMIT 1>;
135 trip = <&cpu_alert1>;
136 cooling-device = <&gpio_fan 2 THERMAL_NO_LIMIT>;
140 trip = <&cpu_alert1>;
142 <&cpu0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
146 trip = <&cpu_alert1>;
148 <&cpu4 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
154 vcc_3v3: regulator-vcc_3v3 {
155 compatible = "regulator-fixed";
156 regulator-name = "VCC_3V3";
157 regulator-min-microvolt = <3300000>;
158 regulator-max-microvolt = <3300000>;
161 vddio_ao18: regulator-vddio_ao18 {
162 compatible = "regulator-fixed";
163 regulator-name = "VDDIO_AO18";
164 regulator-min-microvolt = <1800000>;
165 regulator-max-microvolt = <1800000>;
168 vddio_boot: regulator-vddio_boot {
169 compatible = "regulator-fixed";
170 regulator-name = "VDDIO_BOOT";
171 regulator-min-microvolt = <1800000>;
172 regulator-max-microvolt = <1800000>;
175 vddao_3v3: regulator-vddao_3v3 {
176 compatible = "regulator-fixed";
177 regulator-name = "VDDAO_3V3";
178 regulator-min-microvolt = <3300000>;
179 regulator-max-microvolt = <3300000>;
183 compatible = "pwm-clock";
185 clock-frequency = <32768>;
186 pwms = <&pwm_ef 0 30518 0>; /* PWM_E at 32.768KHz */
192 pinctrl-0 = <&ao_cec_pins>;
193 pinctrl-names = "default";
194 hdmi-phandle = <&hdmi_tx>;
198 cooling-min-level = <0>;
199 cooling-max-level = <6>;
200 #cooling-cells = <2>;
204 cooling-min-level = <0>;
205 cooling-max-level = <4>;
206 #cooling-cells = <2>;
210 pinctrl-0 = <ð_pins>;
211 pinctrl-names = "default";
213 /* Select external PHY by default */
214 phy-handle = <&external_phy>;
216 amlogic,tx-delay-ns = <2>;
218 /* External PHY reset is shared with internal PHY Led signals */
219 snps,reset-gpio = <&gpio GPIOZ_14 0>;
220 snps,reset-delays-us = <0 10000 1000000>;
221 snps,reset-active-low;
223 /* External PHY is in RGMII */
230 external_phy: ethernet-phy@0 {
231 /* Realtek RTL8211F (0x001cc916) */
238 pinctrl-0 = <&hdmi_hpd_pins>, <&hdmi_i2c_pins>;
239 pinctrl-names = "default";
240 hdmi-supply = <&hdmi_5v>;
244 hdmi_tx_tmds_out: endpoint {
245 remote-endpoint = <&hdmi_connector_in>;
251 pinctrl-0 = <&i2c_a_pins>;
252 pinctrl-names = "default";
257 pinctrl-0 = <&i2c_b_pins>;
258 pinctrl-names = "default";
261 /* has to be enabled manually when a battery is connected: */
263 compatible = "haoyu,hym8563";
266 clock-frequency = <32768>;
267 clock-output-names = "xin32k";
273 pinctrl-0 = <&remote_input_ao_pins>;
274 pinctrl-names = "default";
275 linux,rc-map-name = "rc-geekbox";
280 pinctrl-0 = <&pwm_ao_a_3_pins>, <&pwm_ao_b_pins>;
281 pinctrl-names = "default";
282 clocks = <&clkc CLKID_FCLK_DIV4>;
283 clock-names = "clkin0";
288 pinctrl-0 = <&pwm_e_pins>, <&pwm_f_clk_pins>;
289 pinctrl-names = "default";
290 clocks = <&clkc CLKID_FCLK_DIV4>;
291 clock-names = "clkin0";
296 pinctrl-0 = <&sdio_pins>;
297 pinctrl-names = "default";
298 #address-cells = <1>;
302 max-frequency = <100000000>;
307 mmc-pwrseq = <&sdio_pwrseq>;
309 vmmc-supply = <&vddao_3v3>;
310 vqmmc-supply = <&vddio_boot>;
314 compatible = "brcm,bcm4329-fmac";
321 pinctrl-0 = <&sdcard_pins>;
322 pinctrl-names = "default";
326 max-frequency = <100000000>;
329 cd-gpios = <&gpio CARD_6 GPIO_ACTIVE_HIGH>;
332 vmmc-supply = <&vddao_3v3>;
333 vqmmc-supply = <&vddio_boot>;
339 pinctrl-0 = <&emmc_pins>, <&emmc_ds_pins>;
340 pinctrl-names = "default";
345 max-frequency = <200000000>;
352 mmc-pwrseq = <&emmc_pwrseq>;
353 vmmc-supply = <&vcc_3v3>;
354 vqmmc-supply = <&vddio_boot>;
358 * EMMC_DS pin is shared between SPI NOR CS and eMMC Data Strobe
359 * Remove emmc_ds_pins from sd_emmc_c pinctrl-0 then spifc can be enabled
363 pinctrl-0 = <&nor_pins>;
364 pinctrl-names = "default";
366 w25q32: spi-flash@0 {
367 #address-cells = <1>;
369 compatible = "winbond,w25q16", "jedec,spi-nor";
371 spi-max-frequency = <3000000>;
375 /* This one is connected to the Bluetooth module */
378 pinctrl-0 = <&uart_a_pins>;
379 pinctrl-names = "default";
382 /* This is brought out on the Linux_RX (18) and Linux_TX (19) pins: */
385 pinctrl-0 = <&uart_ao_a_pins>;
386 pinctrl-names = "default";
389 /* This is brought out on the UART_RX_AO_B (15) and UART_TX_AO_B (16) pins: */
392 pinctrl-0 = <&uart_ao_b_pins>;
393 pinctrl-names = "default";
398 vref-supply = <&vddio_ao18>;