Debian Codegraph @

scripts/dtc/include-prefixes/arm64/rockchip/px30-firefly-jd4-core-mb.dts

raw
1 // SPDX-License-Identifier: (GPL-2.0+ OR MIT)
2 /*
3 * Copyright (c) 2019 Fuzhou Rockchip Electronics Co., Ltd
4 */
5
6 /dts-v1/;
7 #include <dt-bindings/input/input.h>
8 #include <dt-bindings/leds/common.h>
9 #include "px30-firefly-jd4-core.dtsi"
10
11 / {
12 compatible = "firefly,px30-jd4-core-mb", "firefly,px30-jd4-core",
13 "rockchip,px30";
14 model = "Firefly Core-PX30-JD4 on MB-JD4-PX30 baseboard";
15
16 aliases {
17 ethernet0 = &gmac;
18 mmc0 = &sdmmc;
19 mmc1 = &sdio;
20 mmc2 = &emmc;
21 };
22
23 chosen {
24 stdout-path = "serial2:115200n8";
25 };
26
27 dc_12v: regulator-dc-12v {
28 compatible = "regulator-fixed";
29 regulator-name = "dc_12v";
30 regulator-always-on;
31 regulator-boot-on;
32 regulator-min-microvolt = <12000000>;
33 regulator-max-microvolt = <12000000>;
34 };
35
36 adc-keys {
37 compatible = "adc-keys";
38 io-channels = <&saradc 2>;
39 io-channel-names = "buttons";
40 keyup-threshold-microvolt = <1500000>;
41 poll-interval = <100>;
42
43 button-recovery {
44 label = "Recovery";
45 linux,code = <KEY_VENDOR>;
46 press-threshold-microvolt = <18000>;
47 };
48 };
49
50 leds {
51 compatible = "gpio-leds";
52 pinctrl-names = "default";
53 pinctrl-0 = <&blue_led>, <&green_led>;
54
55 blue-led {
56 color = <LED_COLOR_ID_BLUE>;
57 default-state = "on";
58 function = LED_FUNCTION_HEARTBEAT;
59 gpios = <&gpio1 RK_PB5 GPIO_ACTIVE_HIGH>;
60 label = "px30-mb-jd4:blue:work";
61 linux,default-trigger = "heartbeat";
62 };
63
64 green-led {
65 color = <LED_COLOR_ID_GREEN>;
66 default-state = "on";
67 function = LED_FUNCTION_POWER;
68 gpios = <&gpio1 RK_PB4 GPIO_ACTIVE_HIGH>;
69 label = "px30-mb-jd4:blue:diy";
70 linux,default-trigger = "default-on";
71 };
72 };
73
74 sdio_pwrseq: sdio-pwrseq {
75 compatible = "mmc-pwrseq-simple";
76 pinctrl-names = "default";
77 pinctrl-0 = <&wifi_enable_h>;
78
79 /*
80 * On the module itself this is one of these (depending
81 * on the actual card populated):
82 * - SDIO_RESET_L_WL_REG_ON
83 * - PDN (power down when low)
84 */
85 reset-gpios = <&gpio0 RK_PA2 GPIO_ACTIVE_LOW>; /* GPIO3_A4 */
86 };
87
88 vcc5v0_baseboard: regulator-vcc5v0-baseboard {
89 compatible = "regulator-fixed";
90 regulator-name = "vcc5v0_baseboard";
91 regulator-always-on;
92 regulator-boot-on;
93 regulator-min-microvolt = <5000000>;
94 regulator-max-microvolt = <5000000>;
95 vin-supply = <&dc_12v>;
96 };
97 };
98
99 &gmac {
100 clock_in_out = "output";
101 phy-supply = <&vcc_rmii>;
102 snps,reset-gpio = <&gpio2 13 GPIO_ACTIVE_LOW>;
103 snps,reset-active-low;
104 snps,reset-delays-us = <0 50000 50000>;
105 status = "okay";
106 };
107
108 &pinctrl {
109 leds {
110 blue_led: blue-led {
111 rockchip,pins = <1 RK_PB5 RK_FUNC_GPIO &pcfg_pull_none>;
112 };
113
114 green_led: green-led {
115 rockchip,pins = <1 RK_PB4 RK_FUNC_GPIO &pcfg_pull_none>;
116 };
117 };
118
119 sdio-pwrseq {
120 wifi_enable_h: wifi-enable-h {
121 rockchip,pins =
122 <0 RK_PA2 RK_FUNC_GPIO &pcfg_pull_none>;
123 };
124 };
125 };
126
127 &sdmmc {
128 bus-width = <4>;
129 cap-mmc-highspeed;
130 cap-sd-highspeed;
131 card-detect-delay = <800>;
132 sd-uhs-sdr12;
133 sd-uhs-sdr25;
134 sd-uhs-sdr50;
135 sd-uhs-sdr104;
136 vmmc-supply = <&vcc_sd>;
137 vqmmc-supply = <&vccio_sd>;
138 status = "okay";
139 };
140
141 &sdio {
142 bus-width = <4>;
143 cap-sd-highspeed;
144 keep-power-in-suspend;
145 non-removable;
146 mmc-pwrseq = <&sdio_pwrseq>;
147 sd-uhs-sdr104;
148 status = "okay";
149 };
150
151 &u2phy {
152 status = "okay";
153
154 u2phy_host: host-port {
155 status = "okay";
156 };
157
158 u2phy_otg: otg-port {
159 status = "okay";
160 };
161 };
162
163 &uart2 {
164 pinctrl-names = "default";
165 pinctrl-0 = <&uart2m1_xfer>;
166 status = "okay";
167 };
168
169 &usb20_otg {
170 status = "okay";
171 };
172
173 &usb_host0_ehci {
174 status = "okay";
175 };
176
177 &usb_host0_ohci {
178 status = "okay";
179 };