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";
71 poll-interval = <100>;
75 linux,code = <KEY_POWER>;
76 gpios = <&gpio_ao GPIOAO_2 GPIO_ACTIVE_LOW>;
81 compatible = "hdmi-connector";
85 hdmi_connector_in: endpoint {
86 remote-endpoint = <&hdmi_tx_tmds_out>;
92 compatible = "pwm-leds";
95 label = "vim:red:power";
96 pwms = <&pwm_AO_ab 1 7812500 0>;
97 max-brightness = <255>;
98 linux,default-trigger = "default-on";
102 sdio_pwrseq: sdio-pwrseq {
103 compatible = "mmc-pwrseq-simple";
104 reset-gpios = <&gpio GPIOX_6 GPIO_ACTIVE_LOW>;
106 clock-names = "ext_clock";
111 polling-delay-passive = <250>; /* milliseconds */
112 polling-delay = <1000>; /* milliseconds */
114 thermal-sensors = <&scpi_sensors 0>;
117 cpu_alert0: cpu-alert0 {
118 temperature = <70000>; /* millicelsius */
119 hysteresis = <2000>; /* millicelsius */
123 cpu_alert1: cpu-alert1 {
124 temperature = <80000>; /* millicelsius */
125 hysteresis = <2000>; /* millicelsius */
132 trip = <&cpu_alert0>;
133 cooling-device = <&gpio_fan THERMAL_NO_LIMIT 1>;
137 trip = <&cpu_alert1>;
138 cooling-device = <&gpio_fan 2 THERMAL_NO_LIMIT>;
142 trip = <&cpu_alert1>;
144 <&cpu0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
148 trip = <&cpu_alert1>;
150 <&cpu4 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
156 vcc_3v3: regulator-vcc_3v3 {
157 compatible = "regulator-fixed";
158 regulator-name = "VCC_3V3";
159 regulator-min-microvolt = <3300000>;
160 regulator-max-microvolt = <3300000>;
163 vddio_ao18: regulator-vddio_ao18 {
164 compatible = "regulator-fixed";
165 regulator-name = "VDDIO_AO18";
166 regulator-min-microvolt = <1800000>;
167 regulator-max-microvolt = <1800000>;
170 vddio_boot: regulator-vddio_boot {
171 compatible = "regulator-fixed";
172 regulator-name = "VDDIO_BOOT";
173 regulator-min-microvolt = <1800000>;
174 regulator-max-microvolt = <1800000>;
177 vddao_3v3: regulator-vddao_3v3 {
178 compatible = "regulator-fixed";
179 regulator-name = "VDDAO_3V3";
180 regulator-min-microvolt = <3300000>;
181 regulator-max-microvolt = <3300000>;
185 compatible = "pwm-clock";
187 clock-frequency = <32768>;
188 pwms = <&pwm_ef 0 30518 0>; /* PWM_E at 32.768KHz */
194 pinctrl-0 = <&ao_cec_pins>;
195 pinctrl-names = "default";
196 hdmi-phandle = <&hdmi_tx>;
200 cooling-min-level = <0>;
201 cooling-max-level = <6>;
202 #cooling-cells = <2>;
206 cooling-min-level = <0>;
207 cooling-max-level = <4>;
208 #cooling-cells = <2>;
212 pinctrl-0 = <ð_pins>;
213 pinctrl-names = "default";
215 /* Select external PHY by default */
216 phy-handle = <&external_phy>;
218 amlogic,tx-delay-ns = <2>;
220 /* External PHY reset is shared with internal PHY Led signals */
221 snps,reset-gpio = <&gpio GPIOZ_14 0>;
222 snps,reset-delays-us = <0 10000 1000000>;
223 snps,reset-active-low;
225 /* External PHY is in RGMII */
232 external_phy: ethernet-phy@0 {
233 /* Realtek RTL8211F (0x001cc916) */
240 pinctrl-0 = <&hdmi_hpd_pins>, <&hdmi_i2c_pins>;
241 pinctrl-names = "default";
245 hdmi_tx_tmds_out: endpoint {
246 remote-endpoint = <&hdmi_connector_in>;
252 pinctrl-0 = <&i2c_a_pins>;
253 pinctrl-names = "default";
258 pinctrl-0 = <&i2c_b_pins>;
259 pinctrl-names = "default";
262 /* has to be enabled manually when a battery is connected: */
264 compatible = "haoyu,hym8563";
267 clock-frequency = <32768>;
268 clock-output-names = "xin32k";
274 pinctrl-0 = <&remote_input_ao_pins>;
275 pinctrl-names = "default";
276 linux,rc-map-name = "rc-geekbox";
281 pinctrl-0 = <&pwm_ao_a_3_pins>, <&pwm_ao_b_pins>;
282 pinctrl-names = "default";
283 clocks = <&clkc CLKID_FCLK_DIV4>;
284 clock-names = "clkin0";
289 pinctrl-0 = <&pwm_e_pins>, <&pwm_f_clk_pins>;
290 pinctrl-names = "default";
291 clocks = <&clkc CLKID_FCLK_DIV4>;
292 clock-names = "clkin0";
297 pinctrl-0 = <&sdio_pins>;
298 pinctrl-names = "default";
299 #address-cells = <1>;
303 max-frequency = <100000000>;
308 mmc-pwrseq = <&sdio_pwrseq>;
310 vmmc-supply = <&vddao_3v3>;
311 vqmmc-supply = <&vddio_boot>;
315 compatible = "brcm,bcm4329-fmac";
322 pinctrl-0 = <&sdcard_pins>;
323 pinctrl-names = "default";
327 max-frequency = <100000000>;
330 cd-gpios = <&gpio CARD_6 GPIO_ACTIVE_HIGH>;
333 vmmc-supply = <&vddao_3v3>;
334 vqmmc-supply = <&vddio_boot>;
340 pinctrl-0 = <&emmc_pins>, <&emmc_ds_pins>;
341 pinctrl-names = "default";
346 max-frequency = <200000000>;
353 mmc-pwrseq = <&emmc_pwrseq>;
354 vmmc-supply = <&vcc_3v3>;
355 vqmmc-supply = <&vddio_boot>;
359 * EMMC_DS pin is shared between SPI NOR CS and eMMC Data Strobe
360 * Remove emmc_ds_pins from sd_emmc_c pinctrl-0 then spifc can be enabled
364 pinctrl-0 = <&nor_pins>;
365 pinctrl-names = "default";
367 w25q32: spi-flash@0 {
368 #address-cells = <1>;
370 compatible = "winbond,w25q16", "jedec,spi-nor";
372 spi-max-frequency = <3000000>;
376 /* This one is connected to the Bluetooth module */
379 pinctrl-0 = <&uart_a_pins>;
380 pinctrl-names = "default";
383 /* This is brought out on the Linux_RX (18) and Linux_TX (19) pins: */
386 pinctrl-0 = <&uart_ao_a_pins>;
387 pinctrl-names = "default";
390 /* This is brought out on the UART_RX_AO_B (15) and UART_TX_AO_B (16) pins: */
393 pinctrl-0 = <&uart_ao_b_pins>;
394 pinctrl-names = "default";
399 vref-supply = <&vddio_ao18>;