ARM: dts: imx6q-apalis: Move pinmux groups to SoM dtsi
[platform/kernel/linux-starfive.git] / arch / arm / boot / dts / imx6q-apalis-eval.dts
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2 /*
3  * Copyright 2014-2022 Toradex
4  * Copyright 2012 Freescale Semiconductor, Inc.
5  * Copyright 2011 Linaro Ltd.
6  */
7
8 /dts-v1/;
9
10 #include <dt-bindings/gpio/gpio.h>
11 #include <dt-bindings/input/input.h>
12 #include <dt-bindings/interrupt-controller/irq.h>
13 #include "imx6q.dtsi"
14 #include "imx6qdl-apalis.dtsi"
15
16 / {
17         model = "Toradex Apalis iMX6Q/D Module on Apalis Evaluation Board";
18         compatible = "toradex,apalis_imx6q-eval", "toradex,apalis_imx6q",
19                      "fsl,imx6q";
20
21         aliases {
22                 i2c0 = &i2c1;
23                 i2c1 = &i2c3;
24                 i2c2 = &i2c2;
25                 rtc0 = &rtc_i2c;
26                 rtc1 = &snvs_rtc;
27         };
28
29         chosen {
30                 stdout-path = "serial0:115200n8";
31         };
32
33         gpio-keys {
34                 compatible = "gpio-keys";
35                 pinctrl-names = "default";
36                 pinctrl-0 = <&pinctrl_gpio_keys>;
37
38                 wakeup {
39                         label = "Wake-Up";
40                         gpios = <&gpio1 4 GPIO_ACTIVE_LOW>;
41                         linux,code = <KEY_WAKEUP>;
42                         debounce-interval = <10>;
43                         wakeup-source;
44                 };
45         };
46
47         reg_pcie_switch: regulator-pcie-switch {
48                 compatible = "regulator-fixed";
49                 regulator-name = "pcie_switch";
50                 regulator-min-microvolt = <1800000>;
51                 regulator-max-microvolt = <1800000>;
52                 gpio = <&gpio1 2 GPIO_ACTIVE_HIGH>;
53                 startup-delay-us = <100000>;
54                 enable-active-high;
55                 status = "okay";
56         };
57
58         reg_3v3_sw: regulator-3v3-sw {
59                 compatible = "regulator-fixed";
60                 regulator-name = "3.3V_SW";
61                 regulator-min-microvolt = <3300000>;
62                 regulator-max-microvolt = <3300000>;
63                 regulator-always-on;
64         };
65 };
66
67 &can1 {
68         xceiver-supply = <&reg_3v3_sw>;
69         status = "okay";
70 };
71
72 &can2 {
73         xceiver-supply = <&reg_3v3_sw>;
74         status = "okay";
75 };
76
77 &hdmi {
78         status = "okay";
79 };
80
81 /* I2C1_SDA/SCL on MXM3 209/211 (e.g. RTC on carrier board) */
82 &i2c1 {
83         status = "okay";
84
85         /*
86          * Touchscreen is using SODIMM 28/30, also used for PWM<B>, PWM<C>,
87          * aka pwm2, pwm3. so if you enable touchscreen, disable the pwms
88          */
89         touchscreen@4a {
90                 compatible = "atmel,maxtouch";
91                 reg = <0x4a>;
92                 interrupt-parent = <&gpio6>;
93                 interrupts = <10 IRQ_TYPE_EDGE_FALLING>;
94                 reset-gpios = <&gpio6 9 GPIO_ACTIVE_LOW>; /* SODIMM 13 */
95                 status = "disabled";
96         };
97
98         pcie-switch@58 {
99                 compatible = "plx,pex8605";
100                 reg = <0x58>;
101         };
102
103         /* M41T0M6 real time clock on carrier board */
104         rtc_i2c: rtc@68 {
105                 compatible = "st,m41t0";
106                 reg = <0x68>;
107         };
108 };
109
110 /*
111  * I2C3_SDA/SCL (CAM) on MXM3 pin 201/203 (e.g. camera sensor on carrier
112  * board)
113  */
114 &i2c3 {
115         status = "okay";
116 };
117
118 &ldb {
119         status = "okay";
120 };
121
122 &pcie {
123         pinctrl-names = "default";
124         pinctrl-0 = <&pinctrl_reset_moci>;
125         /* active-high meaning opposite of regular PERST# active-low polarity */
126         reset-gpio = <&gpio1 28 GPIO_ACTIVE_HIGH>;
127         reset-gpio-active-high;
128         vpcie-supply = <&reg_pcie_switch>;
129         status = "okay";
130 };
131
132 &pwm1 {
133         status = "okay";
134 };
135
136 &pwm2 {
137         status = "okay";
138 };
139
140 &pwm3 {
141         status = "okay";
142 };
143
144 &pwm4 {
145         status = "okay";
146 };
147
148 &reg_usb_otg_vbus {
149         status = "okay";
150 };
151
152 &reg_usb_host_vbus {
153         status = "okay";
154 };
155
156 &sata {
157         status = "okay";
158 };
159
160 &sound_spdif {
161         status = "okay";
162 };
163
164 &spdif {
165         status = "okay";
166 };
167
168 &uart1 {
169         status = "okay";
170 };
171
172 &uart2 {
173         status = "okay";
174 };
175
176 &uart4 {
177         status = "okay";
178 };
179
180 &uart5 {
181         status = "okay";
182 };
183
184 &usbh1 {
185         vbus-supply = <&reg_usb_host_vbus>;
186         status = "okay";
187 };
188
189 &usbotg {
190         vbus-supply = <&reg_usb_otg_vbus>;
191         status = "okay";
192 };
193
194 /* MMC1 */
195 &usdhc1 {
196         pinctrl-names = "default";
197         pinctrl-0 = <&pinctrl_usdhc1_4bit &pinctrl_usdhc1_8bit &pinctrl_mmc_cd>;
198         cd-gpios = <&gpio4 20 GPIO_ACTIVE_LOW>;
199         status = "okay";
200 };
201
202 /* SD1 */
203 &usdhc2 {
204         pinctrl-names = "default";
205         pinctrl-0 = <&pinctrl_usdhc2 &pinctrl_sd_cd>;
206         cd-gpios = <&gpio6 14 GPIO_ACTIVE_LOW>;
207         status = "okay";
208 };