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