forked from armbian/build
-
Notifications
You must be signed in to change notification settings - Fork 13
/
zz-mkspi-kernel-rockchip64-edge.patch
228 lines (210 loc) · 5.12 KB
/
zz-mkspi-kernel-rockchip64-edge.patch
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
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
diff --git a/arch/arm64/boot/dts/rockchip/rk3328-roc-cc.dts b/arch/arm64/boot/dts/rockchip/rk3328-roc-cc.dts
index 17926efa341..251fb06cd6e 100755
--- a/arch/arm64/boot/dts/rockchip/rk3328-roc-cc.dts
+++ b/arch/arm64/boot/dts/rockchip/rk3328-roc-cc.dts
@@ -8,7 +8,7 @@
#include "rk3328.dtsi"
/ {
- model = "Firefly roc-rk3328-cc";
+ model = "Makerbase mkspi";
compatible = "firefly,roc-rk3328-cc", "rockchip,rk3328";
aliases {
@@ -76,21 +76,23 @@ vcc_sd: sdmmc-regulator {
vcc_sdio: sdmmcio-regulator {
compatible = "regulator-gpio";
- gpios = <&grf_gpio 0 GPIO_ACTIVE_HIGH>;
- states = <1800000 0x1>,
- <3300000 0x0>;
+ gpios = <&gpio2 RK_PC4 GPIO_ACTIVE_HIGH>;
+ pinctrl-0 = <&sdio_vcc_pin>;
+ pinctrl-names = "default";
+ states = <1800000 0x0>,
+ <3300000 0x1>;
regulator-name = "vcc_sdio";
regulator-type = "voltage";
regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <3300000>;
regulator-always-on;
- vin-supply = <&vcc_sys>;
+ vin-supply = <&vcc_io>;
};
vcc_host1_5v: vcc_otg_5v: vcc-host1-5v-regulator {
compatible = "regulator-fixed";
enable-active-high;
- gpio = <&gpio1 RK_PD2 GPIO_ACTIVE_HIGH>;
+ gpio = <&gpio0 RK_PA2 GPIO_ACTIVE_HIGH>;
pinctrl-names = "default";
pinctrl-0 = <&usb20_host_drv>;
regulator-name = "vcc_host1_5v";
@@ -135,21 +137,18 @@ user_led: led-1 {
};
};
- ir-receiver {
- compatible = "gpio-ir-receiver";
- gpios = <&gpio2 RK_PA2 GPIO_ACTIVE_LOW>;
- pinctrl-0 = <&ir_int>;
- pinctrl-names = "default";
- };
-
};
&analog_sound {
- status = "okay";
+ status = "disabled";
};
&codec {
- status = "okay";
+ status = "disabled";
+};
+
+&gmac2phy {
+ status = "okay";
};
&dfi {
@@ -209,7 +208,7 @@ &gmac2io {
snps,txpbl = <0x4>;
tx_delay = <0x24>;
rx_delay = <0x18>;
- status = "okay";
+ status = "disabled";
};
&gpu {
@@ -338,11 +337,11 @@ regulator-state-mem {
};
&i2s0 {
- status = "okay";
+ status = "disabled";
};
&i2s1 {
- status = "okay";
+ status = "disabled";
};
&io_domains {
@@ -351,7 +350,7 @@ &io_domains {
vccio1-supply = <&vcc_io>;
vccio2-supply = <&vcc18_emmc>;
vccio3-supply = <&vcc_sdio>;
- vccio4-supply = <&vcc_18>;
+ vccio4-supply = <&vcc_io>;
vccio5-supply = <&vcc_io>;
vccio6-supply = <&vcc_io>;
pmuio-supply = <&vcc_io>;
@@ -359,23 +358,44 @@ &io_domains {
&pinctrl {
- ir {
- ir_int: ir-int {
- rockchip,pins = <2 RK_PA2 RK_FUNC_GPIO &pcfg_pull_none>;
- };
- };
-
pmic {
pmic_int_l: pmic-int-l {
- rockchip,pins = <1 RK_PD0 RK_FUNC_GPIO &pcfg_pull_up>;
+ rockchip,pins = <2 RK_PA6 RK_FUNC_GPIO &pcfg_pull_up>;
};
};
usb2 {
usb20_host_drv: usb20-host-drv {
- rockchip,pins = <1 RK_PD2 RK_FUNC_GPIO &pcfg_pull_none>;
+ rockchip,pins = <0 RK_PA2 RK_FUNC_GPIO &pcfg_pull_none>;
+ };
+ };
+
+ sd {
+ sdio_vcc_pin: sdio-vcc-pin {
+ rockchip,pins = <2 RK_PC4 RK_FUNC_GPIO &pcfg_pull_up>;
};
};
+
+ touchscreen {
+ pinctrl_tsc2046_pendown: pinctrl_tsc2046_pendown {
+ rockchip,pins = <1 RK_PC6 RK_FUNC_GPIO &pcfg_pull_up>;
+ };
+ pinctrl_tsc2046_cs: pinctrl_tsc2046_cs {
+ rockchip,pins = <3 RK_PA7 RK_FUNC_GPIO &pcfg_pull_up>;
+ };
+ };
+
+ lcd {
+ pinctrl_st7796_cs: pinctrl_st7796_cs {
+ rockchip,pins = <3 RK_PB0 RK_FUNC_GPIO &pcfg_pull_up>;
+ };
+ };
+
+ spi0_cs2 {
+ pinctrl_spi0_cs2: pinctrl_spi0_cs2 {
+ rockchip,pins = <1 RK_PC2 RK_FUNC_GPIO &pcfg_pull_up>;
+ };
+ };
};
&sdmmc {
@@ -424,10 +444,72 @@ &u2phy_otg {
status = "okay";
};
+&uart0 {
+ pinctrl-0 = <&uart0_xfer &uart0_cts>;
+ status = "okay";
+};
+
&uart2 {
status = "okay";
};
+&spi0 {
+ max-freq = <48000000>;
+ cs-gpios = <&gpio3 RK_PB0 GPIO_ACTIVE_LOW>,<&gpio3 RK_PA7 GPIO_ACTIVE_LOW>,<&gpio1 RK_PC2 GPIO_ACTIVE_LOW>;
+ pinctrl-0 = <&spi0m2_clk &spi0m2_tx &spi0m2_rx>;
+ status = "okay";
+
+ spi_for_lcd@0 {
+ compatible ="ilitek,st7796";
+ pinctrl-names ="default";
+ pinctrl-0 = <&pinctrl_st7796_cs>;
+ reg = <0>;
+ spi-max-frequency = <24000000>;
+ bgr;
+ fps = <20>;
+ rotate = <270>;
+ buswidth = <8>;
+ dc-gpios = <&gpio3 RK_PA6 GPIO_ACTIVE_HIGH>; /* gpio3 A6 */
+ reset-gpios = <&gpio3 RK_PA4 GPIO_ACTIVE_LOW>; /* gpio3 A4 */
+ led-gpios = <&gpio3 RK_PA5 GPIO_ACTIVE_HIGH>; /* gpio3 A5 */
+ status = "okay";
+ };
+
+ spi_for_touch@1 {
+ reg = <1>;
+ compatible = "ti,tsc2046";
+ pinctrl-names ="default";
+ pinctrl-0 = <&pinctrl_tsc2046_pendown &pinctrl_tsc2046_cs>;
+ ti,x-max = /bits/ 16 <3776>;
+ ti,x-min = /bits/ 16 <164>;
+ ti,y-min = /bits/ 16 <201>;
+ ti,y-max = /bits/ 16 <3919>;
+ ti,x-plate-ohms = /bits/ 16 <40>;
+ ti,pressure-max = /bits/ 16 <255>;
+ //touchscreen-fuzz-x = <16>;
+ //touchscreen-fuzz-y = <16>;
+ //touchscreen-fuzz-pressure = <10>;
+ ti,swap-xy = <1>;
+ touchscreen-inverted-y = <1>;
+ interrupt-parent = <&gpio1>;
+ interrupts = <22 0>;
+ spi-max-frequency = <2000000>;
+ pendown-gpio = <&gpio1 RK_PC6 0>;
+ vcc-supply = <&vcc_io>;
+ wakeup-source;
+ status = "okay";
+ };
+
+ spi_for_cs2@2 {
+ reg = <2>;
+ compatible ="armbian,spi-dev";
+ pinctrl-names ="default";
+ pinctrl-0 = <&pinctrl_spi0_cs2>;
+ spi-max-frequency = <5000000>;
+ status = "okay";
+ };
+};
+
&usb20_otg {
dr_mode = "host";
status = "okay";