summaryrefslogtreecommitdiff
path: root/arch/arm64/boot/dts/rockchip/px30-firefly-jd4-core-mb.dts
blob: d03e6aef54dc07f1011b6c574f4790829c517aaa (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
/*
 * Copyright (c) 2019 Fuzhou Rockchip Electronics Co., Ltd
 */

/dts-v1/;
#include <dt-bindings/input/input.h>
#include <dt-bindings/leds/common.h>
#include "px30-firefly-jd4-core.dtsi"

/ {
	compatible = "firefly,px30-jd4-core-mb", "firefly,px30-jd4-core",
		   "rockchip,px30";
	model = "Firefly Core-PX30-JD4 on MB-JD4-PX30 baseboard";

	aliases {
		ethernet0 = &gmac;
		mmc0 = &sdmmc;
		mmc1 = &sdio;
		mmc2 = &emmc;
	};

	chosen {
		stdout-path = "serial2:115200n8";
	};

	dc_12v: dc-12v-regulator {
		compatible = "regulator-fixed";
		regulator-name = "dc_12v";
		regulator-always-on;
		regulator-boot-on;
		regulator-min-microvolt = <12000000>;
		regulator-max-microvolt = <12000000>;
	};

	adc-keys {
		compatible = "adc-keys";
		io-channels = <&saradc 2>;
		io-channel-names = "buttons";
		keyup-threshold-microvolt = <1500000>;
		poll-interval = <100>;

		button-recovery {
			label = "Recovery";
			linux,code = <KEY_VENDOR>;
			press-threshold-microvolt = <18000>;
		};
	};

	leds {
		compatible = "gpio-leds";
		pinctrl-names = "default";
		pinctrl-0 = <&blue_led>, <&green_led>;

		blue-led {
			color = <LED_COLOR_ID_BLUE>;
			default-state = "on";
			function = LED_FUNCTION_HEARTBEAT;
			gpios = <&gpio1 RK_PB5 GPIO_ACTIVE_HIGH>;
			label = "px30-mb-jd4:blue:work";
			linux,default-trigger = "heartbeat";
		};

		green-led {
			color = <LED_COLOR_ID_GREEN>;
			default-state = "on";
			function = LED_FUNCTION_POWER;
			gpios = <&gpio1 RK_PB4 GPIO_ACTIVE_HIGH>;
			label = "px30-mb-jd4:blue:diy";
			linux,default-trigger = "default-on";
		};
	};

	sdio_pwrseq: sdio-pwrseq {
		compatible = "mmc-pwrseq-simple";
		pinctrl-names = "default";
		pinctrl-0 = <&wifi_enable_h>;

		/*
		 * On the module itself this is one of these (depending
		 * on the actual card populated):
		 * - SDIO_RESET_L_WL_REG_ON
		 * - PDN (power down when low)
		 */
		reset-gpios = <&gpio0 RK_PA2 GPIO_ACTIVE_LOW>; /* GPIO3_A4 */
	};

	vcc5v0_baseboard: vcc5v0-baseboard-regulator {
		compatible = "regulator-fixed";
		regulator-name = "vcc5v0_baseboard";
		regulator-always-on;
		regulator-boot-on;
		regulator-min-microvolt = <5000000>;
		regulator-max-microvolt = <5000000>;
		vin-supply = <&dc_12v>;
	};
};

&gmac {
	clock_in_out = "output";
	phy-supply = <&vcc_rmii>;
	snps,reset-gpio = <&gpio2 13 GPIO_ACTIVE_LOW>;
	snps,reset-active-low;
	snps,reset-delays-us = <0 50000 50000>;
	status = "okay";
};

&pinctrl {
	leds {
		blue_led: blue-led {
			rockchip,pins = <1 RK_PB5 RK_FUNC_GPIO &pcfg_pull_none>;
		};

		green_led: green-led {
			rockchip,pins = <1 RK_PB4 RK_FUNC_GPIO &pcfg_pull_none>;
		};
	};

	sdio-pwrseq {
		wifi_enable_h: wifi-enable-h {
			rockchip,pins =
				<0 RK_PA2 RK_FUNC_GPIO &pcfg_pull_none>;
		};
	};
};

&sdmmc {
	bus-width = <4>;
	cap-mmc-highspeed;
	cap-sd-highspeed;
	card-detect-delay = <800>;
	sd-uhs-sdr12;
	sd-uhs-sdr25;
	sd-uhs-sdr50;
	sd-uhs-sdr104;
	vmmc-supply = <&vcc_sd>;
	vqmmc-supply = <&vccio_sd>;
	status = "okay";
};

&sdio {
	bus-width = <4>;
	cap-sd-highspeed;
	keep-power-in-suspend;
	non-removable;
	mmc-pwrseq = <&sdio_pwrseq>;
	sd-uhs-sdr104;
	status = "okay";
};

&u2phy {
	status = "okay";

	u2phy_host: host-port {
		status = "okay";
	};

	u2phy_otg: otg-port {
		status = "okay";
	};
};

&uart2 {
	pinctrl-names = "default";
	pinctrl-0 = <&uart2m1_xfer>;
	status = "okay";
};

&usb20_otg {
	status = "okay";
};

&usb_host0_ehci {
	status = "okay";
};

&usb_host0_ohci {
	status = "okay";
};