1/* 2 * Copyright (c) 2017 Martin Blumenstingl <martin.blumenstingl@googlemail.com>. 3 * 4 * SPDX-License-Identifier: (GPL-2.0+ OR MIT) 5 */ 6 7/dts-v1/; 8 9#include <dt-bindings/input/input.h> 10 11#include "meson-gxl-s905x-p212.dtsi" 12 13/ { 14 compatible = "khadas,vim", "amlogic,s905x", "amlogic,meson-gxl"; 15 model = "Khadas VIM"; 16 17 adc-keys { 18 compatible = "adc-keys"; 19 io-channels = <&saradc 0>; 20 io-channel-names = "buttons"; 21 keyup-threshold-microvolt = <1710000>; 22 23 button-function { 24 label = "Function"; 25 linux,code = <KEY_FN>; 26 press-threshold-microvolt = <10000>; 27 }; 28 }; 29 30 aliases { 31 serial2 = &uart_AO_B; 32 }; 33 34 gpio-keys-polled { 35 compatible = "gpio-keys-polled"; 36 #address-cells = <1>; 37 #size-cells = <0>; 38 poll-interval = <100>; 39 40 button@0 { 41 label = "power"; 42 linux,code = <KEY_POWER>; 43 gpios = <&gpio_ao GPIOAO_2 GPIO_ACTIVE_LOW>; 44 }; 45 }; 46 47 pwmleds { 48 compatible = "pwm-leds"; 49 50 power { 51 label = "vim:red:power"; 52 pwms = <&pwm_AO_ab 1 7812500 0>; 53 max-brightness = <255>; 54 linux,default-trigger = "default-on"; 55 }; 56 }; 57 58 hdmi-connector { 59 compatible = "hdmi-connector"; 60 type = "a"; 61 62 port { 63 hdmi_connector_in: endpoint { 64 remote-endpoint = <&hdmi_tx_tmds_out>; 65 }; 66 }; 67 }; 68}; 69 70&hdmi_tx { 71 status = "okay"; 72 pinctrl-0 = <&hdmi_hpd_pins>, <&hdmi_i2c_pins>; 73 pinctrl-names = "default"; 74}; 75 76&hdmi_tx_tmds_port { 77 hdmi_tx_tmds_out: endpoint { 78 remote-endpoint = <&hdmi_connector_in>; 79 }; 80}; 81 82&i2c_A { 83 status = "okay"; 84 pinctrl-0 = <&i2c_a_pins>; 85 pinctrl-names = "default"; 86}; 87 88&i2c_B { 89 status = "okay"; 90 pinctrl-0 = <&i2c_b_pins>; 91 pinctrl-names = "default"; 92 93 rtc: rtc@51 { 94 /* has to be enabled manually when a battery is connected: */ 95 status = "disabled"; 96 compatible = "haoyu,hym8563"; 97 reg = <0x51>; 98 #clock-cells = <0>; 99 clock-frequency = <32768>; 100 clock-output-names = "xin32k"; 101 }; 102}; 103 104&ir { 105 linux,rc-map-name = "rc-geekbox"; 106}; 107 108&pinctrl_aobus { 109 gpio-line-names = "UART TX", 110 "UART RX", 111 "Power Key In", 112 "J9 Header Pin35", 113 "J9 Header Pin16", 114 "J9 Header Pin15", 115 "J9 Header Pin33", 116 "IR In", 117 "HDMI CEC", 118 "SYS LED"; 119}; 120 121&pinctrl_periphs { 122 gpio-line-names = /* Bank GPIOZ */ 123 "", "", "", "", "", "", "", 124 "", "", "", "", "", "", "", 125 "Power OFF", 126 "VCCK Enable", 127 /* Bank GPIOH */ 128 "HDMI HPD", "HDMI SDA", "HDMI SCL", 129 "HDMI_5V_EN", "SPDIF", 130 "J9 Header Pin37", 131 "J9 Header Pin30", 132 "J9 Header Pin29", 133 "J9 Header Pin32", 134 "J9 Header Pin31", 135 /* Bank BOOT */ 136 "eMMC D0", "eMMC D1", "eMMC D2", "eMMC D3", 137 "eMMC D4", "eMMC D5", "eMMC D6", "eMMC D7", 138 "eMMC Clk", "eMMC Reset", "eMMC CMD", 139 "", "BOOT_MODE", "", "", "eMMC Data Strobe", 140 /* Bank CARD */ 141 "SDCard D1", "SDCard D0", "SDCard CLK", "SDCard CMD", 142 "SDCard D3", "SDCard D2", "SDCard Det", 143 /* Bank GPIODV */ 144 "", "", "", "", "", "", "", "", "", "", "", "", 145 "", "", "", "", "", "", "", "", "", "", "", "", 146 "I2C A SDA", "I2C A SCK", "I2C B SDA", "I2C B SCK", 147 "VCCK Regulator", "VDDEE Regulator", 148 /* Bank GPIOX */ 149 "WIFI SDIO D0", "WIFI SDIO D1", "WIFI SDIO D2", 150 "WIFI SDIO D3", "WIFI SDIO CLK", "WIFI SDIO CMD", 151 "WIFI Power Enable", "WIFI WAKE HOST", 152 "Bluetooth PCM DOUT", "Bluetooth PCM DIN", 153 "Bluetooth PCM SYNC", "Bluetooth PCM CLK", 154 "Bluetooth UART TX", "Bluetooth UART RX", 155 "Bluetooth UART CTS", "Bluetooth UART RTS", 156 "WIFI 32K", "Bluetooth Enable", 157 "Bluetooth WAKE HOST", 158 /* Bank GPIOCLK */ 159 "", "J9 Header Pin39", 160 /* GPIO_TEST_N */ 161 ""; 162}; 163 164&pwm_AO_ab { 165 status = "okay"; 166 pinctrl-0 = <&pwm_ao_a_3_pins>, <&pwm_ao_b_pins>; 167 pinctrl-names = "default"; 168 clocks = <&clkc CLKID_FCLK_DIV4>; 169 clock-names = "clkin0"; 170}; 171 172&pwm_ef { 173 pinctrl-0 = <&pwm_e_pins>, <&pwm_f_clk_pins>; 174}; 175 176&sd_emmc_a { 177 brcmf: wifi@1 { 178 reg = <1>; 179 compatible = "brcm,bcm4329-fmac"; 180 }; 181}; 182 183/* This is brought out on the Linux_RX (18) and Linux_TX (19) pins: */ 184&uart_AO { 185 status = "okay"; 186}; 187 188/* This is brought out on the UART_RX_AO_B (15) and UART_TX_AO_B (16) pins: */ 189&uart_AO_B { 190 status = "okay"; 191 pinctrl-0 = <&uart_ao_b_pins>; 192 pinctrl-names = "default"; 193}; 194