Loading...
1/*
2 * Device tree file for Phytec PCM-947 carrier board
3 * Copyright (C) 2017 PHYTEC Messtechnik GmbH
4 * Author: Wadim Egorov <w.egorov@phytec.de>
5 *
6 * This file is dual-licensed: you can use it either under the terms
7 * of the GPL or the X11 license, at your option. Note that this dual
8 * licensing only applies to this file, and not this project as a
9 * whole.
10 *
11 * a) This file is free software; you can redistribute it and/or
12 * modify it under the terms of the GNU General Public License as
13 * published by the Free Software Foundation; either version 2 of the
14 * License, or (at your option) any later version.
15 *
16 * This file is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU General Public License for more details.
20 *
21 * Or, alternatively,
22 *
23 * b) Permission is hereby granted, free of charge, to any person
24 * obtaining a copy of this software and associated documentation
25 * files (the "Software"), to deal in the Software without
26 * restriction, including without limitation the rights to use,
27 * copy, modify, merge, publish, distribute, sublicense, and/or
28 * sell copies of the Software, and to permit persons to whom the
29 * Software is furnished to do so, subject to the following
30 * conditions:
31 *
32 * The above copyright notice and this permission notice shall be
33 * included in all copies or substantial portions of the Software.
34 *
35 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
36 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
37 * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
38 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
39 * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
40 * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
41 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
42 * OTHER DEALINGS IN THE SOFTWARE.
43 */
44
45/dts-v1/;
46
47#include <dt-bindings/input/input.h>
48#include <dt-bindings/leds/leds-pca9532.h>
49#include "rk3288-phycore-som.dtsi"
50
51/ {
52 model = "Phytec RK3288 PCM-947";
53 compatible = "phytec,rk3288-pcm-947", "phytec,rk3288-phycore-som", "rockchip,rk3288";
54
55 user_buttons: user-buttons {
56 compatible = "gpio-keys";
57 pinctrl-names = "default";
58 pinctrl-0 = <&user_button_pins>;
59
60 button@0 {
61 label = "home";
62 linux,code = <KEY_HOME>;
63 gpios = <&gpio8 0 GPIO_ACTIVE_HIGH>;
64 wakeup-source;
65 };
66
67 button@1 {
68 label = "menu";
69 linux,code = <KEY_MENU>;
70 gpios = <&gpio8 3 GPIO_ACTIVE_HIGH>;
71 wakeup-source;
72 };
73 };
74
75 vcc_host0_5v: usb-host0-regulator {
76 compatible = "regulator-fixed";
77 gpio = <&gpio2 13 GPIO_ACTIVE_HIGH>;
78 pinctrl-names = "default";
79 pinctrl-0 = <&host0_vbus_drv>;
80 regulator-name = "vcc_host0_5v";
81 regulator-min-microvolt = <5000000>;
82 regulator-max-microvolt = <5000000>;
83 regulator-always-on;
84 vin-supply = <&vdd_in_otg_out>;
85 };
86
87 vcc_host1_5v: usb-host1-regulator {
88 compatible = "regulator-fixed";
89 gpio = <&gpio2 0 GPIO_ACTIVE_HIGH>;
90 pinctrl-names = "default";
91 pinctrl-0 = <&host1_vbus_drv>;
92 regulator-name = "vcc_host1_5v";
93 regulator-min-microvolt = <5000000>;
94 regulator-max-microvolt = <5000000>;
95 regulator-always-on;
96 vin-supply = <&vdd_in_otg_out>;
97 };
98
99 vcc_otg_5v: usb-otg-regulator {
100 compatible = "regulator-fixed";
101 gpio = <&gpio2 12 GPIO_ACTIVE_HIGH>;
102 pinctrl-names = "default";
103 pinctrl-0 = <&otg_vbus_drv>;
104 regulator-name = "vcc_otg_5v";
105 regulator-min-microvolt = <5000000>;
106 regulator-max-microvolt = <5000000>;
107 regulator-always-on;
108 vin-supply = <&vdd_in_otg_out>;
109 };
110};
111
112&gmac {
113 status = "okay";
114};
115
116&hdmi {
117 status = "okay";
118};
119
120&i2c1 {
121 status = "okay";
122
123 touchscreen@44 {
124 compatible = "st,stmpe811";
125 reg = <0x44>;
126 };
127
128 adc@64 {
129 compatible = "maxim,max1037";
130 reg = <0x64>;
131 };
132
133 i2c_rtc: rtc@68 {
134 compatible = "rv4162";
135 reg = <0x68>;
136 pinctrl-names = "default";
137 pinctrl-0 = <&i2c_rtc_int>;
138 interrupt-parent = <&gpio5>;
139 interrupts = <10 0>;
140 };
141};
142
143&i2c3 {
144 status = "okay";
145
146 i2c_eeprom_cb: eeprom@51 {
147 compatible = "atmel,24c32";
148 reg = <0x51>;
149 pagesize = <32>;
150 };
151};
152
153&i2c4 {
154 status = "okay";
155
156 /* PCA9533 - 4-bit LED dimmer */
157 leddim: leddimmer@62 {
158 compatible = "nxp,pca9533";
159 reg = <0x62>;
160
161 led1 {
162 label = "red:user1";
163 linux,default-trigger = "none";
164 type = <PCA9532_TYPE_LED>;
165 };
166
167 led2 {
168 label = "green:user2";
169 linux,default-trigger = "none";
170 type = <PCA9532_TYPE_LED>;
171 };
172
173 led3 {
174 label = "blue:user3";
175 linux,default-trigger = "none";
176 type = <PCA9532_TYPE_LED>;
177 };
178
179 led4 {
180 label = "red:user4";
181 linux,default-trigger = "none";
182 type = <PCA9532_TYPE_LED>;
183 };
184 };
185};
186
187&i2c5 {
188 status = "okay";
189};
190
191&pinctrl {
192 pcfg_pull_up_drv_12ma: pcfg-pull-up-drv-12ma {
193 bias-pull-up;
194 drive-strength = <12>;
195 };
196
197 buttons {
198 user_button_pins: user-button-pins {
199 /* button 1 */
200 rockchip,pins = <8 3 RK_FUNC_GPIO &pcfg_pull_up>,
201 /* button 2 */
202 <8 0 RK_FUNC_GPIO &pcfg_pull_up>;
203 };
204 };
205
206 rv4162 {
207 i2c_rtc_int: i2c-rtc-int {
208 rockchip,pins = <5 10 RK_FUNC_GPIO &pcfg_pull_up>;
209 };
210 };
211
212 sdmmc {
213 /*
214 * Default drive strength isn't enough to achieve even
215 * high-speed mode on pcm-947 board so bump up to 12 mA.
216 */
217 sdmmc_bus4: sdmmc-bus4 {
218 rockchip,pins = <6 16 RK_FUNC_1 &pcfg_pull_up_drv_12ma>,
219 <6 17 RK_FUNC_1 &pcfg_pull_up_drv_12ma>,
220 <6 18 RK_FUNC_1 &pcfg_pull_up_drv_12ma>,
221 <6 19 RK_FUNC_1 &pcfg_pull_up_drv_12ma>;
222 };
223
224 sdmmc_clk: sdmmc-clk {
225 rockchip,pins = <6 20 RK_FUNC_1 &pcfg_pull_none_12ma>;
226 };
227
228 sdmmc_cmd: sdmmc-cmd {
229 rockchip,pins = <6 21 RK_FUNC_1 &pcfg_pull_up_drv_12ma>;
230 };
231
232 sdmmc_pwr: sdmmc-pwr {
233 rockchip,pins = <7 11 RK_FUNC_GPIO &pcfg_pull_none>;
234 };
235 };
236
237 touchscreen {
238 ts_irq_pin: ts-irq-pin {
239 rockchip,pins = <5 15 RK_FUNC_GPIO &pcfg_pull_none>;
240 };
241 };
242
243 usb_host {
244 host0_vbus_drv: host0-vbus-drv {
245 rockchip,pins = <2 13 RK_FUNC_GPIO &pcfg_pull_none>;
246 };
247
248 host1_vbus_drv: host1-vbus-drv {
249 rockchip,pins = <2 0 RK_FUNC_GPIO &pcfg_pull_none>;
250 };
251 };
252
253 usb_otg {
254 otg_vbus_drv: otg-vbus-drv {
255 rockchip,pins = <2 12 RK_FUNC_GPIO &pcfg_pull_none>;
256 };
257 };
258};
259
260&sdmmc {
261 bus-width = <4>;
262 cap-mmc-highspeed;
263 cap-sd-highspeed;
264 card-detect-delay = <200>;
265 disable-wp;
266 pinctrl-names = "default";
267 pinctrl-0 = <&sdmmc_clk &sdmmc_cmd &sdmmc_cd &sdmmc_bus4>;
268 sd-uhs-sdr12;
269 sd-uhs-sdr25;
270 sd-uhs-sdr50;
271 sd-uhs-sdr104;
272 vmmc-supply = <&vdd_sd>;
273 vqmmc-supply = <&vdd_io_sd>;
274 status = "okay";
275};
276
277&uart0 {
278 pinctrl-names = "default";
279 pinctrl-0 = <&uart0_xfer &uart0_cts &uart0_rts>;
280 status = "okay";
281};
282
283&uart2 {
284 status = "okay";
285};
286
287&usbphy {
288 status = "okay";
289};
290
291&usb_host0_ehci {
292 status = "okay";
293};
294
295&usb_host1 {
296 status = "okay";
297};
298
299&usb_otg {
300 status = "okay";
301};
1// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
2/*
3 * Device tree file for Phytec PCM-947 carrier board
4 * Copyright (C) 2017 PHYTEC Messtechnik GmbH
5 * Author: Wadim Egorov <w.egorov@phytec.de>
6 */
7
8/dts-v1/;
9
10#include <dt-bindings/input/input.h>
11#include <dt-bindings/leds/leds-pca9532.h>
12#include "rk3288-phycore-som.dtsi"
13
14/ {
15 model = "Phytec RK3288 PCM-947";
16 compatible = "phytec,rk3288-pcm-947", "phytec,rk3288-phycore-som", "rockchip,rk3288";
17
18 user_buttons: user-buttons {
19 compatible = "gpio-keys";
20 pinctrl-names = "default";
21 pinctrl-0 = <&user_button_pins>;
22
23 button-0 {
24 label = "home";
25 linux,code = <KEY_HOME>;
26 gpios = <&gpio8 0 GPIO_ACTIVE_HIGH>;
27 wakeup-source;
28 };
29
30 button-1 {
31 label = "menu";
32 linux,code = <KEY_MENU>;
33 gpios = <&gpio8 3 GPIO_ACTIVE_HIGH>;
34 wakeup-source;
35 };
36 };
37
38 vcc_host0_5v: usb-host0-regulator {
39 compatible = "regulator-fixed";
40 gpio = <&gpio2 13 GPIO_ACTIVE_HIGH>;
41 pinctrl-names = "default";
42 pinctrl-0 = <&host0_vbus_drv>;
43 regulator-name = "vcc_host0_5v";
44 regulator-min-microvolt = <5000000>;
45 regulator-max-microvolt = <5000000>;
46 regulator-always-on;
47 vin-supply = <&vdd_in_otg_out>;
48 };
49
50 vcc_host1_5v: usb-host1-regulator {
51 compatible = "regulator-fixed";
52 gpio = <&gpio2 0 GPIO_ACTIVE_HIGH>;
53 pinctrl-names = "default";
54 pinctrl-0 = <&host1_vbus_drv>;
55 regulator-name = "vcc_host1_5v";
56 regulator-min-microvolt = <5000000>;
57 regulator-max-microvolt = <5000000>;
58 regulator-always-on;
59 vin-supply = <&vdd_in_otg_out>;
60 };
61
62 vcc_otg_5v: usb-otg-regulator {
63 compatible = "regulator-fixed";
64 gpio = <&gpio2 12 GPIO_ACTIVE_HIGH>;
65 pinctrl-names = "default";
66 pinctrl-0 = <&otg_vbus_drv>;
67 regulator-name = "vcc_otg_5v";
68 regulator-min-microvolt = <5000000>;
69 regulator-max-microvolt = <5000000>;
70 regulator-always-on;
71 vin-supply = <&vdd_in_otg_out>;
72 };
73};
74
75&gmac {
76 status = "okay";
77};
78
79&hdmi {
80 status = "okay";
81};
82
83&i2c1 {
84 status = "okay";
85
86 touchscreen@44 {
87 compatible = "st,stmpe811";
88 reg = <0x44>;
89 };
90
91 adc@64 {
92 compatible = "maxim,max1037";
93 reg = <0x64>;
94 };
95
96 i2c_rtc: rtc@68 {
97 compatible = "rv4162";
98 reg = <0x68>;
99 pinctrl-names = "default";
100 pinctrl-0 = <&i2c_rtc_int>;
101 interrupt-parent = <&gpio5>;
102 interrupts = <10 0>;
103 };
104};
105
106&i2c3 {
107 status = "okay";
108
109 i2c_eeprom_cb: eeprom@51 {
110 compatible = "atmel,24c32";
111 reg = <0x51>;
112 pagesize = <32>;
113 };
114};
115
116&i2c4 {
117 status = "okay";
118
119 /* PCA9533 - 4-bit LED dimmer */
120 leddim: leddimmer@62 {
121 compatible = "nxp,pca9533";
122 reg = <0x62>;
123
124 led1 {
125 label = "red:user1";
126 linux,default-trigger = "none";
127 type = <PCA9532_TYPE_LED>;
128 };
129
130 led2 {
131 label = "green:user2";
132 linux,default-trigger = "none";
133 type = <PCA9532_TYPE_LED>;
134 };
135
136 led3 {
137 label = "blue:user3";
138 linux,default-trigger = "none";
139 type = <PCA9532_TYPE_LED>;
140 };
141
142 led4 {
143 label = "red:user4";
144 linux,default-trigger = "none";
145 type = <PCA9532_TYPE_LED>;
146 };
147 };
148};
149
150&i2c5 {
151 status = "okay";
152};
153
154&pinctrl {
155 pcfg_pull_up_drv_12ma: pcfg-pull-up-drv-12ma {
156 bias-pull-up;
157 drive-strength = <12>;
158 };
159
160 buttons {
161 user_button_pins: user-button-pins {
162 /* button 1 */
163 rockchip,pins = <8 RK_PA3 RK_FUNC_GPIO &pcfg_pull_up>,
164 /* button 2 */
165 <8 RK_PA0 RK_FUNC_GPIO &pcfg_pull_up>;
166 };
167 };
168
169 rv4162 {
170 i2c_rtc_int: i2c-rtc-int {
171 rockchip,pins = <5 RK_PB2 RK_FUNC_GPIO &pcfg_pull_up>;
172 };
173 };
174
175 sdmmc {
176 /*
177 * Default drive strength isn't enough to achieve even
178 * high-speed mode on pcm-947 board so bump up to 12 mA.
179 */
180 sdmmc_bus4: sdmmc-bus4 {
181 rockchip,pins = <6 RK_PC0 1 &pcfg_pull_up_drv_12ma>,
182 <6 RK_PC1 1 &pcfg_pull_up_drv_12ma>,
183 <6 RK_PC2 1 &pcfg_pull_up_drv_12ma>,
184 <6 RK_PC3 1 &pcfg_pull_up_drv_12ma>;
185 };
186
187 sdmmc_clk: sdmmc-clk {
188 rockchip,pins = <6 RK_PC4 1 &pcfg_pull_none_12ma>;
189 };
190
191 sdmmc_cmd: sdmmc-cmd {
192 rockchip,pins = <6 RK_PC5 1 &pcfg_pull_up_drv_12ma>;
193 };
194
195 sdmmc_pwr: sdmmc-pwr {
196 rockchip,pins = <7 RK_PB3 RK_FUNC_GPIO &pcfg_pull_none>;
197 };
198 };
199
200 touchscreen {
201 ts_irq_pin: ts-irq-pin {
202 rockchip,pins = <5 RK_PB7 RK_FUNC_GPIO &pcfg_pull_none>;
203 };
204 };
205
206 usb_host {
207 host0_vbus_drv: host0-vbus-drv {
208 rockchip,pins = <2 RK_PB5 RK_FUNC_GPIO &pcfg_pull_none>;
209 };
210
211 host1_vbus_drv: host1-vbus-drv {
212 rockchip,pins = <2 RK_PA0 RK_FUNC_GPIO &pcfg_pull_none>;
213 };
214 };
215
216 usb_otg {
217 otg_vbus_drv: otg-vbus-drv {
218 rockchip,pins = <2 RK_PB4 RK_FUNC_GPIO &pcfg_pull_none>;
219 };
220 };
221};
222
223&sdmmc {
224 bus-width = <4>;
225 cap-mmc-highspeed;
226 cap-sd-highspeed;
227 card-detect-delay = <200>;
228 disable-wp;
229 pinctrl-names = "default";
230 pinctrl-0 = <&sdmmc_clk &sdmmc_cmd &sdmmc_cd &sdmmc_bus4>;
231 sd-uhs-sdr12;
232 sd-uhs-sdr25;
233 sd-uhs-sdr50;
234 sd-uhs-sdr104;
235 vmmc-supply = <&vdd_sd>;
236 vqmmc-supply = <&vdd_io_sd>;
237 status = "okay";
238};
239
240&uart0 {
241 pinctrl-names = "default";
242 pinctrl-0 = <&uart0_xfer &uart0_cts &uart0_rts>;
243 status = "okay";
244};
245
246&uart2 {
247 status = "okay";
248};
249
250&usbphy {
251 status = "okay";
252};
253
254&usb_host0_ehci {
255 status = "okay";
256};
257
258&usb_host1 {
259 status = "okay";
260};
261
262&usb_otg {
263 status = "okay";
264};