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 hdmi_5v: regulator-hdmi-5v {
157 compatible = "regulator-fixed";
159 regulator-name = "HDMI_5V";
160 regulator-min-microvolt = <5000000>;
161 regulator-max-microvolt = <5000000>;
163 gpio = <&gpio GPIOH_3 GPIO_ACTIVE_HIGH>;
168 vcc_3v3: regulator-vcc_3v3 {
169 compatible = "regulator-fixed";
170 regulator-name = "VCC_3V3";
171 regulator-min-microvolt = <3300000>;
172 regulator-max-microvolt = <3300000>;
175 vddio_ao18: regulator-vddio_ao18 {
176 compatible = "regulator-fixed";
177 regulator-name = "VDDIO_AO18";
178 regulator-min-microvolt = <1800000>;
179 regulator-max-microvolt = <1800000>;
182 vddio_boot: regulator-vddio_boot {
183 compatible = "regulator-fixed";
184 regulator-name = "VDDIO_BOOT";
185 regulator-min-microvolt = <1800000>;
186 regulator-max-microvolt = <1800000>;
189 vddao_3v3: regulator-vddao_3v3 {
190 compatible = "regulator-fixed";
191 regulator-name = "VDDAO_3V3";
192 regulator-min-microvolt = <3300000>;
193 regulator-max-microvolt = <3300000>;
197 compatible = "pwm-clock";
199 clock-frequency = <32768>;
200 pwms = <&pwm_ef 0 30518 0>; /* PWM_E at 32.768KHz */
206 pinctrl-0 = <&ao_cec_pins>;
207 pinctrl-names = "default";
208 hdmi-phandle = <&hdmi_tx>;
212 cooling-min-level = <0>;
213 cooling-max-level = <6>;
214 #cooling-cells = <2>;
218 cooling-min-level = <0>;
219 cooling-max-level = <4>;
220 #cooling-cells = <2>;
224 pinctrl-0 = <ð_pins>;
225 pinctrl-names = "default";
227 /* Select external PHY by default */
228 phy-handle = <&external_phy>;
230 amlogic,tx-delay-ns = <2>;
232 /* External PHY reset is shared with internal PHY Led signals */
233 snps,reset-gpio = <&gpio GPIOZ_14 0>;
234 snps,reset-delays-us = <0 10000 1000000>;
235 snps,reset-active-low;
237 /* External PHY is in RGMII */
244 external_phy: ethernet-phy@0 {
245 /* Realtek RTL8211F (0x001cc916) */
247 interrupt-parent = <&gpio_intc>;
248 /* MAC_INTR on GPIOZ_15 */
249 interrupts = <25 IRQ_TYPE_LEVEL_LOW>;
255 pinctrl-0 = <&hdmi_hpd_pins>, <&hdmi_i2c_pins>;
256 pinctrl-names = "default";
260 hdmi_tx_tmds_out: endpoint {
261 remote-endpoint = <&hdmi_connector_in>;
267 pinctrl-0 = <&i2c_a_pins>;
268 pinctrl-names = "default";
273 pinctrl-0 = <&i2c_b_pins>;
274 pinctrl-names = "default";
277 /* has to be enabled manually when a battery is connected: */
279 compatible = "haoyu,hym8563";
282 clock-frequency = <32768>;
283 clock-output-names = "xin32k";
289 pinctrl-0 = <&remote_input_ao_pins>;
290 pinctrl-names = "default";
291 linux,rc-map-name = "rc-geekbox";
296 pinctrl-0 = <&pwm_ao_a_3_pins>, <&pwm_ao_b_pins>;
297 pinctrl-names = "default";
298 clocks = <&clkc CLKID_FCLK_DIV4>;
299 clock-names = "clkin0";
304 pinctrl-0 = <&pwm_e_pins>, <&pwm_f_clk_pins>;
305 pinctrl-names = "default";
306 clocks = <&clkc CLKID_FCLK_DIV4>;
307 clock-names = "clkin0";
312 pinctrl-0 = <&sdio_pins>;
313 pinctrl-names = "default";
314 #address-cells = <1>;
318 max-frequency = <100000000>;
323 mmc-pwrseq = <&sdio_pwrseq>;
325 vmmc-supply = <&vddao_3v3>;
326 vqmmc-supply = <&vddio_boot>;
330 compatible = "brcm,bcm4329-fmac";
337 pinctrl-0 = <&sdcard_pins>;
338 pinctrl-names = "default";
342 max-frequency = <100000000>;
345 cd-gpios = <&gpio CARD_6 GPIO_ACTIVE_HIGH>;
348 vmmc-supply = <&vddao_3v3>;
349 vqmmc-supply = <&vddio_boot>;
355 pinctrl-0 = <&emmc_pins>, <&emmc_ds_pins>;
356 pinctrl-names = "default";
361 max-frequency = <200000000>;
368 mmc-pwrseq = <&emmc_pwrseq>;
369 vmmc-supply = <&vcc_3v3>;
370 vqmmc-supply = <&vddio_boot>;
374 * EMMC_DS pin is shared between SPI NOR CS and eMMC Data Strobe
375 * Remove emmc_ds_pins from sd_emmc_c pinctrl-0 then spifc can be enabled
379 pinctrl-0 = <&nor_pins>;
380 pinctrl-names = "default";
382 w25q32: spi-flash@0 {
383 #address-cells = <1>;
385 compatible = "winbond,w25q16", "jedec,spi-nor";
387 spi-max-frequency = <3000000>;
391 /* This one is connected to the Bluetooth module */
394 pinctrl-0 = <&uart_a_pins>;
395 pinctrl-names = "default";
398 /* This is brought out on the Linux_RX (18) and Linux_TX (19) pins: */
401 pinctrl-0 = <&uart_ao_a_pins>;
402 pinctrl-names = "default";
405 /* This is brought out on the UART_RX_AO_B (15) and UART_TX_AO_B (16) pins: */
408 pinctrl-0 = <&uart_ao_b_pins>;
409 pinctrl-names = "default";
414 vref-supply = <&vddio_ao18>;