1e15d2774SMartin Blumenstingl/* 2e15d2774SMartin Blumenstingl * Copyright (c) 2017 Martin Blumenstingl <martin.blumenstingl@googlemail.com>. 3e15d2774SMartin Blumenstingl * 4e15d2774SMartin Blumenstingl * SPDX-License-Identifier: (GPL-2.0+ OR MIT) 5e15d2774SMartin Blumenstingl */ 6e15d2774SMartin Blumenstingl 7e15d2774SMartin Blumenstingl/dts-v1/; 8e15d2774SMartin Blumenstingl 9e15d2774SMartin Blumenstingl#include <dt-bindings/input/input.h> 10e15d2774SMartin Blumenstingl 11e15d2774SMartin Blumenstingl#include "meson-gxl-s905x-p212.dtsi" 12e15d2774SMartin Blumenstingl 13e15d2774SMartin Blumenstingl/ { 14e15d2774SMartin Blumenstingl compatible = "khadas,vim", "amlogic,s905x", "amlogic,meson-gxl"; 15e15d2774SMartin Blumenstingl model = "Khadas VIM"; 16e15d2774SMartin Blumenstingl 17e15d2774SMartin Blumenstingl adc-keys { 18e15d2774SMartin Blumenstingl compatible = "adc-keys"; 19e15d2774SMartin Blumenstingl io-channels = <&saradc 0>; 20e15d2774SMartin Blumenstingl io-channel-names = "buttons"; 21e15d2774SMartin Blumenstingl keyup-threshold-microvolt = <1710000>; 22e15d2774SMartin Blumenstingl 23e15d2774SMartin Blumenstingl button-function { 24e15d2774SMartin Blumenstingl label = "Function"; 25e15d2774SMartin Blumenstingl linux,code = <KEY_FN>; 26e15d2774SMartin Blumenstingl press-threshold-microvolt = <10000>; 27e15d2774SMartin Blumenstingl }; 28e15d2774SMartin Blumenstingl }; 29e15d2774SMartin Blumenstingl 30e15d2774SMartin Blumenstingl aliases { 31e15d2774SMartin Blumenstingl serial2 = &uart_AO_B; 32e15d2774SMartin Blumenstingl }; 33e15d2774SMartin Blumenstingl 34e15d2774SMartin Blumenstingl gpio-keys-polled { 35e15d2774SMartin Blumenstingl compatible = "gpio-keys-polled"; 36e15d2774SMartin Blumenstingl #address-cells = <1>; 37e15d2774SMartin Blumenstingl #size-cells = <0>; 38e15d2774SMartin Blumenstingl poll-interval = <100>; 39e15d2774SMartin Blumenstingl 40e15d2774SMartin Blumenstingl button@0 { 41e15d2774SMartin Blumenstingl label = "power"; 42e15d2774SMartin Blumenstingl linux,code = <KEY_POWER>; 43e15d2774SMartin Blumenstingl gpios = <&gpio_ao GPIOAO_2 GPIO_ACTIVE_LOW>; 44e15d2774SMartin Blumenstingl }; 45e15d2774SMartin Blumenstingl }; 46e15d2774SMartin Blumenstingl 47e15d2774SMartin Blumenstingl pwmleds { 48e15d2774SMartin Blumenstingl compatible = "pwm-leds"; 49e15d2774SMartin Blumenstingl 50e15d2774SMartin Blumenstingl power { 51e15d2774SMartin Blumenstingl label = "vim:red:power"; 52e15d2774SMartin Blumenstingl pwms = <&pwm_AO_ab 1 7812500 0>; 53e15d2774SMartin Blumenstingl max-brightness = <255>; 54e15d2774SMartin Blumenstingl linux,default-trigger = "default-on"; 55e15d2774SMartin Blumenstingl }; 56e15d2774SMartin Blumenstingl }; 57e15d2774SMartin Blumenstingl}; 58e15d2774SMartin Blumenstingl 59e15d2774SMartin Blumenstingl&i2c_A { 60e15d2774SMartin Blumenstingl status = "okay"; 61e15d2774SMartin Blumenstingl pinctrl-0 = <&i2c_a_pins>; 62e15d2774SMartin Blumenstingl pinctrl-names = "default"; 63e15d2774SMartin Blumenstingl}; 64e15d2774SMartin Blumenstingl 65e15d2774SMartin Blumenstingl&i2c_B { 66e15d2774SMartin Blumenstingl status = "okay"; 67e15d2774SMartin Blumenstingl pinctrl-0 = <&i2c_b_pins>; 68e15d2774SMartin Blumenstingl pinctrl-names = "default"; 69e15d2774SMartin Blumenstingl 70e15d2774SMartin Blumenstingl rtc: rtc@51 { 71e15d2774SMartin Blumenstingl /* has to be enabled manually when a battery is connected: */ 72e15d2774SMartin Blumenstingl status = "disabled"; 73e15d2774SMartin Blumenstingl compatible = "haoyu,hym8563"; 74e15d2774SMartin Blumenstingl reg = <0x51>; 75e15d2774SMartin Blumenstingl #clock-cells = <0>; 76e15d2774SMartin Blumenstingl clock-frequency = <32768>; 77e15d2774SMartin Blumenstingl clock-output-names = "xin32k"; 78e15d2774SMartin Blumenstingl }; 79e15d2774SMartin Blumenstingl}; 80e15d2774SMartin Blumenstingl 81e15d2774SMartin Blumenstingl&ir { 82e15d2774SMartin Blumenstingl linux,rc-map-name = "rc-geekbox"; 83e15d2774SMartin Blumenstingl}; 84e15d2774SMartin Blumenstingl 85e15d2774SMartin Blumenstingl&pwm_AO_ab { 86e15d2774SMartin Blumenstingl status = "okay"; 87e15d2774SMartin Blumenstingl pinctrl-0 = <&pwm_ao_a_3_pins>, <&pwm_ao_b_pins>; 88e15d2774SMartin Blumenstingl pinctrl-names = "default"; 89e15d2774SMartin Blumenstingl clocks = <&clkc CLKID_FCLK_DIV4>; 90e15d2774SMartin Blumenstingl clock-names = "clkin0"; 91e15d2774SMartin Blumenstingl}; 92e15d2774SMartin Blumenstingl 93e15d2774SMartin Blumenstingl&pwm_ef { 94e15d2774SMartin Blumenstingl pinctrl-0 = <&pwm_e_pins>, <&pwm_f_clk_pins>; 95e15d2774SMartin Blumenstingl}; 96e15d2774SMartin Blumenstingl 97e15d2774SMartin Blumenstingl&sd_emmc_a { 98c26db7aaSAndreas Färber brcmf: wifi@1 { 99e15d2774SMartin Blumenstingl reg = <1>; 100e15d2774SMartin Blumenstingl compatible = "brcm,bcm4329-fmac"; 101e15d2774SMartin Blumenstingl }; 102e15d2774SMartin Blumenstingl}; 103e15d2774SMartin Blumenstingl 104e15d2774SMartin Blumenstingl/* This is brought out on the Linux_RX (18) and Linux_TX (19) pins: */ 105e15d2774SMartin Blumenstingl&uart_AO { 106e15d2774SMartin Blumenstingl status = "okay"; 107e15d2774SMartin Blumenstingl}; 108e15d2774SMartin Blumenstingl 109e15d2774SMartin Blumenstingl/* This is brought out on the UART_RX_AO_B (15) and UART_TX_AO_B (16) pins: */ 110e15d2774SMartin Blumenstingl&uart_AO_B { 111e15d2774SMartin Blumenstingl status = "okay"; 112e15d2774SMartin Blumenstingl pinctrl-0 = <&uart_ao_b_pins>; 113e15d2774SMartin Blumenstingl pinctrl-names = "default"; 114e15d2774SMartin Blumenstingl}; 115