Merge branch 'dmi-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jdelvar...
[sfrench/cifs-2.6.git] / arch / arm / boot / dts / tegra124-apalis-v1.2-eval.dts
1 // SPDX-License-Identifier: (GPL-2.0 OR MIT)
2 /*
3  * Copyright 2016-2018 Toradex AG
4  */
5
6 /dts-v1/;
7
8 #include <dt-bindings/input/input.h>
9 #include "tegra124-apalis-v1.2.dtsi"
10
11 / {
12         model = "Toradex Apalis TK1 on Apalis Evaluation Board";
13         compatible = "toradex,apalis-tk1-v1.2-eval", "toradex,apalis-tk1-eval",
14                      "toradex,apalis-tk1", "nvidia,tegra124";
15
16         aliases {
17                 rtc0 = "/i2c@7000c000/rtc@68";
18                 rtc1 = "/i2c@7000d000/pmic@40";
19                 rtc2 = "/rtc@7000e000";
20                 serial0 = &uarta;
21                 serial1 = &uartb;
22                 serial2 = &uartc;
23                 serial3 = &uartd;
24         };
25
26         chosen {
27                 stdout-path = "serial0:115200n8";
28         };
29
30         pcie@1003000 {
31                 pci@1,0 {
32                         status = "okay";
33                 };
34         };
35
36         host1x@50000000 {
37                 hdmi@54280000 {
38                         status = "okay";
39                 };
40         };
41
42         /* Apalis UART1 */
43         serial@70006000 {
44                 status = "okay";
45         };
46
47         /* Apalis UART2 */
48         serial@70006040 {
49                 status = "okay";
50         };
51
52         /* Apalis UART3 */
53         serial@70006200 {
54                 status = "okay";
55         };
56
57         /* Apalis UART4 */
58         serial@70006300 {
59                 status = "okay";
60         };
61
62         pwm@7000a000 {
63                 status = "okay";
64         };
65
66         /*
67          * GEN1_I2C: I2C1_SDA/SCL on MXM3 pin 209/211 (e.g. RTC on carrier
68          * board)
69          */
70         i2c@7000c000 {
71                 status = "okay";
72                 clock-frequency = <400000>;
73
74                 pcie-switch@58 {
75                         compatible = "plx,pex8605";
76                         reg = <0x58>;
77                 };
78
79                 /* M41T0M6 real time clock on carrier board */
80                 rtc@68 {
81                         compatible = "st,m41t0";
82                         reg = <0x68>;
83                 };
84         };
85
86         /* GEN2_I2C: unused */
87
88         /*
89          * CAM_I2C: I2C3_SDA/SCL (CAM) on MXM3 pin 201/203 (e.g. camera sensor
90          * on carrier board)
91          */
92         i2c@7000c500 {
93                 status = "okay";
94                 clock-frequency = <400000>;
95         };
96
97         /*
98          * I2C4 (DDC): I2C4_SDA/SCL (DDC) on MXM3 pin 205/207
99          * (e.g. display EDID)
100          */
101         hdmi_ddc: i2c@7000c700 {
102                 status = "okay";
103         };
104
105         /* SPI1: Apalis SPI1 */
106         spi@7000d400 {
107                 status = "okay";
108                 spi-max-frequency = <50000000>;
109
110                 spidev0: spidev@0 {
111                         compatible = "spidev";
112                         reg = <0>;
113                         spi-max-frequency = <50000000>;
114                 };
115         };
116
117         /* SPI4: Apalis SPI2 */
118         spi@7000da00 {
119                 status = "okay";
120                 spi-max-frequency = <50000000>;
121
122                 spidev1: spidev@0 {
123                         compatible = "spidev";
124                         reg = <0>;
125                         spi-max-frequency = <50000000>;
126                 };
127         };
128
129         /* Apalis Serial ATA */
130         sata@70020000 {
131                 status = "okay";
132         };
133
134         hda@70030000 {
135                 status = "okay";
136         };
137
138         usb@70090000 {
139                 status = "okay";
140         };
141
142         /* Apalis MMC1 */
143         sdhci@700b0000 {
144                 status = "okay";
145                 /* MMC1_CD# */
146                 cd-gpios = <&gpio TEGRA_GPIO(V, 3) GPIO_ACTIVE_LOW>;
147                 bus-width = <4>;
148                 vqmmc-supply = <&vddio_sdmmc1>;
149         };
150
151         /* Apalis SD1 */
152         sdhci@700b0400 {
153                 status = "okay";
154                 /* SD1_CD# */
155                 cd-gpios = <&gpio TEGRA_GPIO(V, 2) GPIO_ACTIVE_LOW>;
156                 bus-width = <4>;
157                 vqmmc-supply = <&vddio_sdmmc3>;
158         };
159
160         /* EHCI instance 0: USB1_DP/N -> USBO1_DP/N */
161         usb@7d000000 {
162                 status = "okay";
163                 dr_mode = "otg";
164         };
165
166         usb-phy@7d000000 {
167                 status = "okay";
168                 vbus-supply = <&reg_usbo1_vbus>;
169         };
170
171         /* EHCI instance 1: USB2_DP/N -> USBH2_DP/N */
172         usb@7d004000 {
173                 status = "okay";
174         };
175
176         usb-phy@7d004000 {
177                 status = "okay";
178                 vbus-supply = <&reg_usbh_vbus>;
179         };
180
181         /* EHCI instance 2: USB3_DP/N -> USBH4_DP/N */
182         usb@7d008000 {
183                 status = "okay";
184         };
185
186         usb-phy@7d008000 {
187                 status = "okay";
188                 vbus-supply = <&reg_usbh_vbus>;
189         };
190
191         backlight: backlight {
192                 compatible = "pwm-backlight";
193                 pwms = <&pwm 3 5000000>; /* BKL1_PWM */
194                 brightness-levels = <255 231 223 207 191 159 127 0>;
195                 default-brightness-level = <6>;
196                 /* BKL1_ON */
197                 enable-gpios = <&gpio TEGRA_GPIO(BB, 5) GPIO_ACTIVE_HIGH>;
198         };
199
200         gpio-keys {
201                 compatible = "gpio-keys";
202
203                 wakeup {
204                         label = "WAKE1_MICO";
205                         gpios = <&gpio TEGRA_GPIO(DD, 3) GPIO_ACTIVE_LOW>;
206                         linux,code = <KEY_WAKEUP>;
207                         debounce-interval = <10>;
208                         wakeup-source;
209                 };
210         };
211
212         reg_5v0: regulator-5v0 {
213                 compatible = "regulator-fixed";
214                 regulator-name = "5V_SW";
215                 regulator-min-microvolt = <5000000>;
216                 regulator-max-microvolt = <5000000>;
217         };
218
219         /* USBO1_EN */
220         reg_usbo1_vbus: regulator-usbo1-vbus {
221                 compatible = "regulator-fixed";
222                 regulator-name = "VCC_USBO1";
223                 regulator-min-microvolt = <5000000>;
224                 regulator-max-microvolt = <5000000>;
225                 gpio = <&gpio TEGRA_GPIO(T, 5) GPIO_ACTIVE_HIGH>;
226                 enable-active-high;
227                 vin-supply = <&reg_5v0>;
228         };
229
230         /* USBH_EN */
231         reg_usbh_vbus: regulator-usbh-vbus {
232                 compatible = "regulator-fixed";
233                 regulator-name = "VCC_USBH(2A|2C|2D|3|4)";
234                 regulator-min-microvolt = <5000000>;
235                 regulator-max-microvolt = <5000000>;
236                 gpio = <&gpio TEGRA_GPIO(T, 6) GPIO_ACTIVE_HIGH>;
237                 enable-active-high;
238                 vin-supply = <&reg_5v0>;
239         };
240 };
241
242 &gpio {
243         /* Apalis GPIO7 MXM3 pin 15 PLX PEX 8605 PCIe Switch Reset */
244         pex_perst_n {
245                 gpio-hog;
246                 gpios = <TEGRA_GPIO(DD, 1) GPIO_ACTIVE_HIGH>;
247                 output-high;
248                 line-name = "PEX_PERST_N";
249         };
250 };