mirror of
https://github.com/home-assistant/operating-system.git
synced 2025-08-22 03:19:21 +00:00
Compare commits
583 Commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
876d980e34 | ||
![]() |
f0a7e49f6e | ||
![]() |
1588a637f2 | ||
![]() |
44231da988 | ||
![]() |
2bb3fe98cc | ||
![]() |
8311173dda | ||
![]() |
4cae16e2be | ||
![]() |
bf82e354c6 | ||
![]() |
132b7fc1c3 | ||
![]() |
d9b070869c | ||
![]() |
1359572e89 | ||
![]() |
a3b5a59ac4 | ||
![]() |
9e6eab3e70 | ||
![]() |
9aadf66660 | ||
![]() |
834754d9e1 | ||
![]() |
24ed7fc1dc | ||
![]() |
d7089fda37 | ||
![]() |
3fc7e6785a | ||
![]() |
9a44c6af38 | ||
![]() |
9fe6f984fa | ||
![]() |
532f5911f1 | ||
![]() |
2ee438889a | ||
![]() |
63eaea73dc | ||
![]() |
d3e9c3633e | ||
![]() |
8d6a34f8f0 | ||
![]() |
60e283ea2a | ||
![]() |
46db76e303 | ||
![]() |
ffd477a78a | ||
![]() |
2c8295aa20 | ||
![]() |
fc11e52ce1 | ||
![]() |
7a698bb14f | ||
![]() |
d2d1138a8c | ||
![]() |
c7506245b1 | ||
![]() |
7ddf6f4a53 | ||
![]() |
a38f074910 | ||
![]() |
2ff3b5099d | ||
![]() |
f75e1a5bce | ||
![]() |
dc2396d30d | ||
![]() |
2353ee33c7 | ||
![]() |
6e5a53c48f | ||
![]() |
acc0758a5b | ||
![]() |
ed1574306a | ||
![]() |
62e768157b | ||
![]() |
3e692df840 | ||
![]() |
f5a1d4ba10 | ||
![]() |
33c9de7a6e | ||
![]() |
0291dfaa64 | ||
![]() |
1b08cb5d04 | ||
![]() |
07b6c85dba | ||
![]() |
fc5c8399cf | ||
![]() |
fe3260e325 | ||
![]() |
646e790d33 | ||
![]() |
10d27c9d89 | ||
![]() |
f1ac227790 | ||
![]() |
8b6e4e7315 | ||
![]() |
816177fcc4 | ||
![]() |
cf546b4a6d | ||
![]() |
5fed213740 | ||
![]() |
6590adaf88 | ||
![]() |
095df415e1 | ||
![]() |
c9a2c1058f | ||
![]() |
1d82911ba5 | ||
![]() |
40d186b4d6 | ||
![]() |
f86f7a7f8d | ||
![]() |
d77a093067 | ||
![]() |
2e3e518982 | ||
![]() |
c12ae11ed7 | ||
![]() |
956badb2fd | ||
![]() |
e71400cd5c | ||
![]() |
6668d77b93 | ||
![]() |
629f13f3d9 | ||
![]() |
dfe261a715 | ||
![]() |
756a0c9b13 | ||
![]() |
49948b577e | ||
![]() |
61516914ce | ||
![]() |
c424b295b1 | ||
![]() |
c37d0ecd76 | ||
![]() |
abf9a3b7c3 | ||
![]() |
c87ac63e9b | ||
![]() |
28d262eecd | ||
![]() |
d1d3593d65 | ||
![]() |
9f06ffbbd5 | ||
![]() |
b963b1a587 | ||
![]() |
998c8365c0 | ||
![]() |
70e43c02fb | ||
![]() |
fed40532c1 | ||
![]() |
08fac89fb0 | ||
![]() |
e7da2e0779 | ||
![]() |
3d999f8936 | ||
![]() |
b26d4bbb40 | ||
![]() |
8c691e8e56 | ||
![]() |
14d91e094a | ||
![]() |
2f40d76b6f | ||
![]() |
219e9ca1ef | ||
![]() |
f3f9bd9697 | ||
![]() |
2e205cafd3 | ||
![]() |
4d7e0977ac | ||
![]() |
0f93fcc477 | ||
![]() |
fa6f7ac74d | ||
![]() |
2caaf89186 | ||
![]() |
5a612922f3 | ||
![]() |
ee4b3a101e | ||
![]() |
efc61a57d9 | ||
![]() |
20afea35d9 | ||
![]() |
db8127c253 | ||
![]() |
e03ea97133 | ||
![]() |
3d858e3bb6 | ||
![]() |
a0cba05830 | ||
![]() |
868935f8a0 | ||
![]() |
6581ec4028 | ||
![]() |
41d3f59002 | ||
![]() |
bb201fb842 | ||
![]() |
a55aaf7f38 | ||
![]() |
edcca58e38 | ||
![]() |
d1c2715402 | ||
![]() |
1febb31647 | ||
![]() |
d5e6cc78d5 | ||
![]() |
e8d14bdc60 | ||
![]() |
5f1fadad29 | ||
![]() |
5c38357ba6 | ||
![]() |
27aa12911d | ||
![]() |
c662ef86d7 | ||
![]() |
450a8295f7 | ||
![]() |
a13e7ad3e1 | ||
![]() |
3077b9423d | ||
![]() |
6204b3d165 | ||
![]() |
1624e26447 | ||
![]() |
cec027a6e6 | ||
![]() |
d347532c96 | ||
![]() |
d9c2347e7c | ||
![]() |
2e7c93428d | ||
![]() |
4455e9a907 | ||
![]() |
5d16ac24c3 | ||
![]() |
f715486c58 | ||
![]() |
7c77a692ce | ||
![]() |
ac5121f067 | ||
![]() |
e34b01755e | ||
![]() |
5971ee1a46 | ||
![]() |
6bda70a451 | ||
![]() |
9a9e2cc5df | ||
![]() |
3dbe3e9ea7 | ||
![]() |
3ad7dc3714 | ||
![]() |
1a3bcf6486 | ||
![]() |
6ddbfabfae | ||
![]() |
c72e61e542 | ||
![]() |
f8081d7829 | ||
![]() |
27c25da90d | ||
![]() |
d47e169bd5 | ||
![]() |
6510cf9619 | ||
![]() |
1419e72dbc | ||
![]() |
30448dbc5a | ||
![]() |
85c82c4479 | ||
![]() |
e21f59111c | ||
![]() |
543075222e | ||
![]() |
7439de3d25 | ||
![]() |
c9f4879780 | ||
![]() |
60cf077e48 | ||
![]() |
06e65b5734 | ||
![]() |
ac70f1bfac | ||
![]() |
1fc912eaf9 | ||
![]() |
83a0981113 | ||
![]() |
79dc34c531 | ||
![]() |
6ca35fb1af | ||
![]() |
e273883077 | ||
![]() |
0fb9102e69 | ||
![]() |
9a4027e9d4 | ||
![]() |
5e82060124 | ||
![]() |
d861ecae6f | ||
![]() |
061ab0ed8a | ||
![]() |
722f27d3c8 | ||
![]() |
57ec2bb25c | ||
![]() |
f0c38a20bc | ||
![]() |
267b61405d | ||
![]() |
98b14be0f6 | ||
![]() |
fa20ccdd94 | ||
![]() |
454964877d | ||
![]() |
16fcb84886 | ||
![]() |
1d40ffd4f9 | ||
![]() |
a21871f4af | ||
![]() |
ba01ed951b | ||
![]() |
7308bad953 | ||
![]() |
9415e2c5d0 | ||
![]() |
2703ec31b9 | ||
![]() |
8cd0ca2cfe | ||
![]() |
c317941767 | ||
![]() |
d1cf8e0016 | ||
![]() |
188fbc340e | ||
![]() |
5e8f910714 | ||
![]() |
30b599acc6 | ||
![]() |
7b4be3b4f7 | ||
![]() |
662eda3c3b | ||
![]() |
aad41225f4 | ||
![]() |
d697c4bc8e | ||
![]() |
2a2e97ddf9 | ||
![]() |
32fe415515 | ||
![]() |
292e4b3515 | ||
![]() |
1a337ab937 | ||
![]() |
43828c2555 | ||
![]() |
73a875c263 | ||
![]() |
c270ac5c9a | ||
![]() |
d677e2d5b2 | ||
![]() |
2d44748080 | ||
![]() |
b959d9c805 | ||
![]() |
5e9ba3bb7a | ||
![]() |
3d91ac2374 | ||
![]() |
b0f95fcaec | ||
![]() |
fffa24ed1e | ||
![]() |
07bec45d8a | ||
![]() |
5835b6a683 | ||
![]() |
e858c774d2 | ||
![]() |
4aa07960d8 | ||
![]() |
5fc32d2eb7 | ||
![]() |
2be8aecfbd | ||
![]() |
e0e87141c6 | ||
![]() |
76553bf984 | ||
![]() |
96e7e57fc4 | ||
![]() |
26d427ef1d | ||
![]() |
f7eb215016 | ||
![]() |
8810b0409c | ||
![]() |
5adc9d0080 | ||
![]() |
59dba51f38 | ||
![]() |
f711123582 | ||
![]() |
3cbe6c9816 | ||
![]() |
a5aaf01042 | ||
![]() |
934b276a3c | ||
![]() |
615daddbf6 | ||
![]() |
9bc61e6318 | ||
![]() |
42c2f88588 | ||
![]() |
2107a6b64d | ||
![]() |
75e721e77e | ||
![]() |
fd707ba270 | ||
![]() |
76fad70ebe | ||
![]() |
d6ad746fda | ||
![]() |
60c9013535 | ||
![]() |
ae0a2fe264 | ||
![]() |
bc3cc20629 | ||
![]() |
d94095a565 | ||
![]() |
8ed63a9aab | ||
![]() |
27a94565ea | ||
![]() |
d46e2a808f | ||
![]() |
50bc0451d0 | ||
![]() |
5ff51846e2 | ||
![]() |
4411307353 | ||
![]() |
a9bbc7babe | ||
![]() |
80f5fe0722 | ||
![]() |
519acca46d | ||
![]() |
566641bf8a | ||
![]() |
18640da277 | ||
![]() |
5351b542ff | ||
![]() |
033e153d49 | ||
![]() |
ad898040ac | ||
![]() |
9e29a12f95 | ||
![]() |
0ab78a97c7 | ||
![]() |
43c423243a | ||
![]() |
19488834e4 | ||
![]() |
dc35208efe | ||
![]() |
2435ca9065 | ||
![]() |
404efdee52 | ||
![]() |
cbd9b45adc | ||
![]() |
56992c6a77 | ||
![]() |
47bb76acec | ||
![]() |
caf708e14a | ||
![]() |
809abbfde2 | ||
![]() |
a2363d9a27 | ||
![]() |
5cdf66c2c8 | ||
![]() |
a7fa7efbf9 | ||
![]() |
976e9b0bce | ||
![]() |
960e11dc4f | ||
![]() |
2291e8599e | ||
![]() |
bcb9c3fa1f | ||
![]() |
b827a90a35 | ||
![]() |
921dd693dd | ||
![]() |
005cbc0b89 | ||
![]() |
482e6f7a7b | ||
![]() |
b83bfc5910 | ||
![]() |
c475daf889 | ||
![]() |
dac76b1632 | ||
![]() |
faa371191f | ||
![]() |
8cde7f9192 | ||
![]() |
1112a10509 | ||
![]() |
ad9f21fdfb | ||
![]() |
55cc60fc8e | ||
![]() |
075799aaa8 | ||
![]() |
3733a07bac | ||
![]() |
eb553bec07 | ||
![]() |
e7e2dc2aad | ||
![]() |
352072cc5a | ||
![]() |
5d90fa9e20 | ||
![]() |
54389be443 | ||
![]() |
ae8dec9f72 | ||
![]() |
064ee9ef84 | ||
![]() |
21e3a30012 | ||
![]() |
8d86fa9ec9 | ||
![]() |
1ead97f64a | ||
![]() |
703f0168bf | ||
![]() |
7cea5a829f | ||
![]() |
0bc81f78ec | ||
![]() |
331336a2d4 | ||
![]() |
8086b55acd | ||
![]() |
2a0d551667 | ||
![]() |
61b0b333f0 | ||
![]() |
dc0f6367cb | ||
![]() |
486161f2d8 | ||
![]() |
9441f6b16e | ||
![]() |
514c59796f | ||
![]() |
ebf84216e9 | ||
![]() |
74ff13e25e | ||
![]() |
9b170812d6 | ||
![]() |
3b45011982 | ||
![]() |
8e1af1313b | ||
![]() |
0f8010bc90 | ||
![]() |
7006a5fd64 | ||
![]() |
170ed2db00 | ||
![]() |
ef40d38b12 | ||
![]() |
d144f72868 | ||
![]() |
11088580c5 | ||
![]() |
5c8f8bea48 | ||
![]() |
8bb3732934 | ||
![]() |
86f88aae0a | ||
![]() |
10e310d8b5 | ||
![]() |
6467f343cd | ||
![]() |
e20249676a | ||
![]() |
518df77e05 | ||
![]() |
202b267d09 | ||
![]() |
5ad184f943 | ||
![]() |
6ab6cd7ff4 | ||
![]() |
a2c6107685 | ||
![]() |
5f24bd5574 | ||
![]() |
ef61756566 | ||
![]() |
7a3d3ae502 | ||
![]() |
4346220e27 | ||
![]() |
12b5731e20 | ||
![]() |
72a3aec55b | ||
![]() |
9ef96373a9 | ||
![]() |
bbe4c47574 | ||
![]() |
1dc2392f15 | ||
![]() |
c5e85a625f | ||
![]() |
fbb45e1544 | ||
![]() |
48500a6c6e | ||
![]() |
ae58be25ad | ||
![]() |
42087b40c5 | ||
![]() |
e4b99ea7c0 | ||
![]() |
233e097cc4 | ||
![]() |
e093875e66 | ||
![]() |
312766e962 | ||
![]() |
e3ceea2058 | ||
![]() |
49edc087b0 | ||
![]() |
75cd510283 | ||
![]() |
3847d13b1a | ||
![]() |
eaab4a7a86 | ||
![]() |
d5953e13be | ||
![]() |
ac2a1883a2 | ||
![]() |
85c9aa4191 | ||
![]() |
a7b16cd051 | ||
![]() |
d7129fb57c | ||
![]() |
1254c6162c | ||
![]() |
95a2844265 | ||
![]() |
5ce7331001 | ||
![]() |
7cffb1f45b | ||
![]() |
a0551d8010 | ||
![]() |
38c1df36c0 | ||
![]() |
5526dbb2f7 | ||
![]() |
fd56d6544c | ||
![]() |
d2ba03164b | ||
![]() |
c6d0fef0b4 | ||
![]() |
0671e3f71c | ||
![]() |
14833a110f | ||
![]() |
988d4ebecf | ||
![]() |
bf59b7744d | ||
![]() |
4a80c7fcd0 | ||
![]() |
6c58eb1615 | ||
![]() |
46d6dba859 | ||
![]() |
12393e083d | ||
![]() |
3700d744b4 | ||
![]() |
7e665a7b42 | ||
![]() |
c860229130 | ||
![]() |
32ab05bd2e | ||
![]() |
8792d37402 | ||
![]() |
414b59ac4a | ||
![]() |
f8fa170e2a | ||
![]() |
11b1946cd7 | ||
![]() |
7d4b424d2f | ||
![]() |
6aa8e61d88 | ||
![]() |
d536e3d7a7 | ||
![]() |
2614ffce40 | ||
![]() |
dde6d8f806 | ||
![]() |
8dd8816e4e | ||
![]() |
f739aed8de | ||
![]() |
f6a916001d | ||
![]() |
23a58b23b5 | ||
![]() |
d3e3e36a6e | ||
![]() |
af23b6199e | ||
![]() |
80079930c5 | ||
![]() |
ca50a86768 | ||
![]() |
6e9326d11b | ||
![]() |
b731b422fe | ||
![]() |
27cd425f5b | ||
![]() |
42f1c4bf01 | ||
![]() |
b3943870dc | ||
![]() |
4b4e22c355 | ||
![]() |
7675cc61fb | ||
![]() |
11b1867c73 | ||
![]() |
5cd03d19dd | ||
![]() |
26d7a4cb23 | ||
![]() |
cc80265997 | ||
![]() |
8434f3ee55 | ||
![]() |
ddde16216c | ||
![]() |
3e8499ecbf | ||
![]() |
42dc915436 | ||
![]() |
17ca2ccf0a | ||
![]() |
1e30f5120c | ||
![]() |
e30e15dc53 | ||
![]() |
3aaadf3f5f | ||
![]() |
161c8624e0 | ||
![]() |
56afd74720 | ||
![]() |
ed5a5033dd | ||
![]() |
2abbbbd1fa | ||
![]() |
fa44e0a7fd | ||
![]() |
1a3d063fec | ||
![]() |
49df049f2c | ||
![]() |
c657f6f3e7 | ||
![]() |
0a43cbdb05 | ||
![]() |
45274411e7 | ||
![]() |
d5ff3596b1 | ||
![]() |
95f82aa75d | ||
![]() |
fc4de4f02a | ||
![]() |
eae3659909 | ||
![]() |
6a05718235 | ||
![]() |
5055236725 | ||
![]() |
ac40e97670 | ||
![]() |
b9816f097d | ||
![]() |
73ac253a0f | ||
![]() |
dd3935a786 | ||
![]() |
f1461081f5 | ||
![]() |
fa79721f3d | ||
![]() |
9f6a339ec7 | ||
![]() |
fb235891e9 | ||
![]() |
d6f5c337e1 | ||
![]() |
63453e0a3f | ||
![]() |
76a4376a96 | ||
![]() |
ffbef150ca | ||
![]() |
acd76288de | ||
![]() |
bdf55189d9 | ||
![]() |
b2211540ea | ||
![]() |
e4e134f474 | ||
![]() |
cc8f77c5d6 | ||
![]() |
7ec8a232d1 | ||
![]() |
a426046bcc | ||
![]() |
f9f8b91b31 | ||
![]() |
ac8ebea80c | ||
![]() |
c13d403c8d | ||
![]() |
b785eafb4e | ||
![]() |
9d595d8bef | ||
![]() |
a57864c199 | ||
![]() |
96a5f891ba | ||
![]() |
2bf10f8a5c | ||
![]() |
c9f3212642 | ||
![]() |
35835e1e58 | ||
![]() |
3896d4c096 | ||
![]() |
d993c48917 | ||
![]() |
2afef71117 | ||
![]() |
e5ac0b674b | ||
![]() |
445d6b2bf9 | ||
![]() |
d647590d98 | ||
![]() |
9ec32eda85 | ||
![]() |
3c21a8c486 | ||
![]() |
5fa9e77ee3 | ||
![]() |
90104942d7 | ||
![]() |
c503592a56 | ||
![]() |
68dddf0ad7 | ||
![]() |
2401c7b0f8 | ||
![]() |
db446f4656 | ||
![]() |
d8b808c8b3 | ||
![]() |
50e0149d37 | ||
![]() |
42f195e91c | ||
![]() |
8d7608d6c8 | ||
![]() |
1da33cd3d6 | ||
![]() |
a64321a585 | ||
![]() |
145ebfbda1 | ||
![]() |
89f7b657bf | ||
![]() |
cb80bb725c | ||
![]() |
e866e0738f | ||
![]() |
9a16185a85 | ||
![]() |
24082ba3a6 | ||
![]() |
b13086072c | ||
![]() |
7db3226a8e | ||
![]() |
8df611eaf1 | ||
![]() |
d0297886dd | ||
![]() |
7c80363623 | ||
![]() |
073fefb5d5 | ||
![]() |
d784ba8c36 | ||
![]() |
9e141e782f | ||
![]() |
0638bac388 | ||
![]() |
50cc88832d | ||
![]() |
e6acda91c7 | ||
![]() |
304dd74b94 | ||
![]() |
8bb2746659 | ||
![]() |
648360e9c7 | ||
![]() |
82942ec94f | ||
![]() |
fe16b125f3 | ||
![]() |
0fd4576e5d | ||
![]() |
6f420eb85c | ||
![]() |
3a0c9ef68d | ||
![]() |
fc34f1a9ac | ||
![]() |
b5dcec8053 | ||
![]() |
bbde697cdc | ||
![]() |
9c60fed15b | ||
![]() |
f427eef157 | ||
![]() |
357ceeebe4 | ||
![]() |
5d0401a528 | ||
![]() |
3b7aed4cb2 | ||
![]() |
116c451ffb | ||
![]() |
1102d20e89 | ||
![]() |
6b3919beeb | ||
![]() |
bbdca42623 | ||
![]() |
e6c9a97ce8 | ||
![]() |
f79646b782 | ||
![]() |
7882d2a63f | ||
![]() |
21093354e4 | ||
![]() |
bb72e0ab1e | ||
![]() |
ae544607cc | ||
![]() |
3ef47f12d7 | ||
![]() |
44cde8a23d | ||
![]() |
21e6fcbe4a | ||
![]() |
2be580880d | ||
![]() |
0a65fd2e09 | ||
![]() |
dd81e7b6a7 | ||
![]() |
7bd1b4fc72 | ||
![]() |
9f42e7ed24 | ||
![]() |
b80efb9a4e | ||
![]() |
6e3beec383 | ||
![]() |
fb1941c7d0 | ||
![]() |
d3f0f1fbcf | ||
![]() |
9a06af6396 | ||
![]() |
cc28238d42 | ||
![]() |
ff6e0f297a | ||
![]() |
8ebff931c0 | ||
![]() |
6ddc73e51c | ||
![]() |
8ef36c928f | ||
![]() |
f81e54a124 | ||
![]() |
f7276c3fc8 | ||
![]() |
ef3c600f3e | ||
![]() |
b4b9c578be | ||
![]() |
e3645e22df | ||
![]() |
a940b5c084 | ||
![]() |
45dfd904d1 | ||
![]() |
8e37f9af9d | ||
![]() |
cb5c9d1121 | ||
![]() |
e3d4eb3a3b | ||
![]() |
da4c7f4e6a | ||
![]() |
d446511f5d | ||
![]() |
d554f395d0 | ||
![]() |
2e5538f7d6 | ||
![]() |
101ca67333 | ||
![]() |
625a0650fa | ||
![]() |
5e2573b9f2 | ||
![]() |
673b1a33ba | ||
![]() |
346464f55c | ||
![]() |
79a25ab4ae | ||
![]() |
0c25f11028 | ||
![]() |
7698f7f60d | ||
![]() |
9a39a222ca | ||
![]() |
8123c124f8 | ||
![]() |
9600025ead | ||
![]() |
cbcf9fbe3b | ||
![]() |
55d1d73cd6 | ||
![]() |
3599b68c97 | ||
![]() |
3db2bf37be | ||
![]() |
a676448313 | ||
![]() |
c9e5eafb17 | ||
![]() |
280f1a819c | ||
![]() |
9a039eddc5 | ||
![]() |
ec8a11051a | ||
![]() |
ff74eb2b93 | ||
![]() |
097eea4872 | ||
![]() |
d7fa6930c9 | ||
![]() |
4dc7bfbd2d | ||
![]() |
5b3eb8cc7e | ||
![]() |
3a5d2de705 | ||
![]() |
4577d01a46 | ||
![]() |
07daad0d4b | ||
![]() |
b1fa1f55d7 | ||
![]() |
010b028571 |
@@ -1,3 +1,7 @@
|
||||
buildroot
|
||||
buildroot-external
|
||||
buildroot-patches
|
||||
# We don't need this folder because we map the hole folder
|
||||
buildroot/
|
||||
buildroot-external/
|
||||
buildroot-patches/
|
||||
|
||||
# Ignore too
|
||||
release/
|
||||
|
3
.gitattributes
vendored
3
.gitattributes
vendored
@@ -1,3 +0,0 @@
|
||||
# Ensure Docker script files uses LF to support Docker for Windows.
|
||||
# Ensure "git config --global core.autocrlf input" before you clone
|
||||
* text eol=lf
|
13
.github/move.yml
vendored
13
.github/move.yml
vendored
@@ -1,13 +0,0 @@
|
||||
# Configuration for move-issues - https://github.com/dessant/move-issues
|
||||
|
||||
# Delete the command comment. Ignored when the comment also contains other content
|
||||
deleteCommand: true
|
||||
# Close the source issue after moving
|
||||
closeSourceIssue: true
|
||||
# Lock the source issue after moving
|
||||
lockSourceIssue: false
|
||||
# Set custom aliases for targets
|
||||
# aliases:
|
||||
# r: repo
|
||||
# or: owner/repo
|
||||
|
17
.github/release-drafter.yml
vendored
Normal file
17
.github/release-drafter.yml
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
categories:
|
||||
- title: 'HassOS Core'
|
||||
label: 'os'
|
||||
- title: 'Build'
|
||||
label: 'build'
|
||||
- title: 'Raspberry Pi'
|
||||
label: 'board/raspberrypi'
|
||||
- title: 'Open Virtual Appliance'
|
||||
label: 'board/ova'
|
||||
- title: 'Intel-Nuc'
|
||||
label: 'board/intel-nuc'
|
||||
- title: 'Hardkernel'
|
||||
label: 'board/hardkernel'
|
||||
template: |
|
||||
## Changes
|
||||
|
||||
$CHANGES
|
17
.github/stale.yml
vendored
Normal file
17
.github/stale.yml
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
# Number of days of inactivity before an issue becomes stale
|
||||
daysUntilStale: 60
|
||||
# Number of days of inactivity before a stale issue is closed
|
||||
daysUntilClose: 7
|
||||
# Issues with these labels will never be considered stale
|
||||
exemptLabels:
|
||||
- pinned
|
||||
- security
|
||||
# Label to use when marking an issue as stale
|
||||
staleLabel: wontfix
|
||||
# Comment to post when marking an issue as stale. Set to `false` to disable
|
||||
markComment: >
|
||||
This issue has been automatically marked as stale because it has not had
|
||||
recent activity. It will be closed if no further activity occurs. Thank you
|
||||
for your contributions.
|
||||
# Comment to post when closing a stale issue. Set to `false` to disable
|
||||
closeComment: false
|
3
.gitignore
vendored
3
.gitignore
vendored
@@ -1 +1,2 @@
|
||||
buildroot/ccache
|
||||
/release
|
||||
*.pem
|
||||
|
2
.hadolint.yaml
Normal file
2
.hadolint.yaml
Normal file
@@ -0,0 +1,2 @@
|
||||
ignored:
|
||||
- DL3008
|
18
Dockerfile
18
Dockerfile
@@ -1,21 +1,25 @@
|
||||
FROM ubuntu:16.04
|
||||
FROM ubuntu:18.04
|
||||
|
||||
# Set shell
|
||||
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
|
||||
|
||||
# Docker
|
||||
RUN apt-get update && apt-get install -y \
|
||||
RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||
apt-transport-https \
|
||||
ca-certificates \
|
||||
curl \
|
||||
gpg-agent \
|
||||
software-properties-common \
|
||||
&& rm -rf /var/lib/apt/lists/* \
|
||||
&& curl -fsSL https://download.docker.com/linux/ubuntu/gpg | apt-key add - \
|
||||
&& add-apt-repository "deb https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" \
|
||||
&& apt-get update && apt-get install -y docker-ce \
|
||||
&& apt-get update && apt-get install -y --no-install-recommends \
|
||||
docker-ce \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Build Tools
|
||||
RUN apt-get update && apt-get install -y \
|
||||
wget patch vim cpio python unzip rsync bc bzip2 ncurses-dev \
|
||||
git make g++ file perl bash binutils locales qemu-utils \
|
||||
RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||
wget patch vim cpio python unzip rsync bc bzip2 ncurses-dev sudo \
|
||||
git make g++ file perl bash binutils locales qemu-utils bison flex \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Init entry
|
||||
|
12
Documentation/bluetooth.md
Normal file
12
Documentation/bluetooth.md
Normal file
@@ -0,0 +1,12 @@
|
||||
# Bluetooth
|
||||
|
||||
We support `bluetoothctl` on host. Later we want also support Bluetooth trought UI.
|
||||
All pairs and settings are persistent over reboots and updates.
|
||||
|
||||
If you want setup Bluetooth on host, use the `bluetoothctl` utility.
|
||||
|
||||
## Scan devices
|
||||
|
||||
```
|
||||
[bluetooth]# scan on
|
||||
```
|
50
Documentation/boards/nuc.md
Normal file
50
Documentation/boards/nuc.md
Normal file
@@ -0,0 +1,50 @@
|
||||
# Intel NUC
|
||||
|
||||
This board configuration supports the Intel NUC mini PCs and compatibles.
|
||||
Probably most recent computers will work.
|
||||
|
||||
Requirements:
|
||||
- x86-64 support
|
||||
- UEFI boot
|
||||
- SATA/AHCI storage
|
||||
- Supported NIC:
|
||||
- Intel Gigabit NIC (e1000, e1000e, igb)
|
||||
- Realtek Gigabit NIC (r8169)
|
||||
- Intel Wireless Wifi 802.11ac (iwlwifi, see below)
|
||||
|
||||
## Tested Hardware
|
||||
|
||||
| Device | Quirks |
|
||||
|--------|-----------|
|
||||
| Intel NUC5CPYH | |
|
||||
| Gigabyte GB-BPCE-3455 | needs 'nomodeset' in cmdline.txt if you want a console |
|
||||
|
||||
|
||||
## Wifi
|
||||
|
||||
The following cards are supported:
|
||||
|
||||
- Intel Wireless 3160
|
||||
- Intel Wireless 7260
|
||||
- Intel Wireless 7265
|
||||
- Intel Wireless-AC 3165
|
||||
- Intel Wireless-AC 3168
|
||||
- Intel Wireless-AC 8260
|
||||
- Intel Wireless-AC 8265
|
||||
- Intel Wireless-AC 9260
|
||||
- Intel Wireless-AC 9461
|
||||
- Intel Wireless-AC 9462
|
||||
- Intel Wireless-AC 9560
|
||||
|
||||
## Bluetooth
|
||||
|
||||
Bluetooth is untested.
|
||||
|
||||
## Installation
|
||||
|
||||
Currently there is no shiny installation method. Checklist:
|
||||
- Boot PC to live-environment using PXE or USB
|
||||
- Copy or download the hassos image into your live environment
|
||||
- zcat the image to local harddisk
|
||||
- Reboot
|
||||
|
22
Documentation/boards/odroid-c2.md
Normal file
22
Documentation/boards/odroid-c2.md
Normal file
@@ -0,0 +1,22 @@
|
||||
# Odroid-C2
|
||||
|
||||
## eMMC
|
||||
|
||||
eMMC support is provided transparently. Just flash the image to the eMMC board as you would an SD card.
|
||||
|
||||
## Console
|
||||
|
||||
By default, console access is granted over the serial header and over HDMI. Certain startup messages will only appear on the serial console by default. To show the messages on the HDMI console instead, swap the order of the two consoles in the `cmdline.txt` file on the boot partition. You can also delete the AML0 console if you don't plan on using the serial adapter.
|
||||
eg. `console=ttyAML0,115200n8 console=tty0`
|
||||
|
||||
## USB
|
||||
|
||||
A long-standing kernel bug currently results in some odd behavior. To use the USB, a device must be plugged into one of the USB ports at hard boot. If all devices are removed from the USB ports, the USB will cease to function until a reboot.
|
||||
|
||||
### OTG
|
||||
|
||||
The OTG USB is untested.
|
||||
|
||||
## GPIO
|
||||
|
||||
Refer to [the odroid wiki](https://wiki.odroid.com/odroid-c2/hardware/expansion_connectors).
|
27
Documentation/boards/odroid-xu4.md
Normal file
27
Documentation/boards/odroid-xu4.md
Normal file
@@ -0,0 +1,27 @@
|
||||
# Odroid-XU4
|
||||
|
||||
## eMMC
|
||||
|
||||
The Odroid XU4 has a hidden boot sector that is only visible on the Odroid itself (can't be written by a card reader). There are a couple possibilities:
|
||||
1) If the eMMC already had a working image before flashing HassOS:
|
||||
* It will be booting to uBoot (but no further).
|
||||
* If you have the serial adapter, you should be able to enter `distro_bootcmd` at the uboot prompt to continue booting.
|
||||
* If not, flash the HassOS image to an SD card and boot off that temporarily (while the eMMC is also plugged in).
|
||||
* Once booted, login at the prompts and then enter `dd if=/dev/mmcblk0 of=/dev/mmcblk0boot0 bs=512 skip=63 seek=62 count=1440` at the linux prompt.
|
||||
* Reboot with eMMC (don't forget to flip the boot switch to eMMC)
|
||||
2) Clean/wiped/corruped boot sector:
|
||||
* You'll need to follow [Hardkernel's instructions](https://forum.odroid.com/viewtopic.php?f=53&t=6173) to get a working boot sector. Then flash HassOS and follow instructions above.
|
||||
* Alternatively, you can try flash HassOS to both an SD and eMMC, then boot off the SD with the eMMC also plugged in, then run `dd if=/dev/mmcblk1 of=/dev/mmcblk0boot0 bs=512 skip=1 seek=0 count=16381` at the Linux prompt. Note that this is untested, but in theory should work..
|
||||
|
||||
If you are getting permissions issues when using the dd command, try disabling RO:
|
||||
`echo 0 > /sys/block/mmcblk0boot0/force_ro`
|
||||
to re-enable after running dd:
|
||||
`echo 1 > /sys/block/mmcblk0boot0/force_ro`
|
||||
## Console
|
||||
|
||||
By default, console access is granted over the serial header and over HDMI. Certain startup messages will only appear on the serial console by default. To show the messages on the HDMI console instead, swap the order of the two consoles in the `cmdline.txt` file on the boot partition. You can also delete the SAC2 console if you don't plan on using the serial adapter.
|
||||
eg. `console=tty1 console=ttySAC2,115200`
|
||||
|
||||
## GPIO
|
||||
|
||||
Refer to [the odroid wiki](https://wiki.odroid.com/odroid-xu4/hardware/expansion_connectors).
|
18
Documentation/boards/ova.md
Normal file
18
Documentation/boards/ova.md
Normal file
@@ -0,0 +1,18 @@
|
||||
# Virtual Machine
|
||||
|
||||
Using this VMDK in a virtual machine requires the following:
|
||||
|
||||
- Operating system: Other 4.x or later Linux (64-bit)
|
||||
- Enabled support for UEFI boot
|
||||
- SATA disk controller
|
||||
- Minimal of 1GB RAM
|
||||
- At least 2x vCPU
|
||||
- An assigned network
|
||||
|
||||
# OVA (Open Virtual Appliance)
|
||||
|
||||
Currently, we only publish a VMDK virtual disk, due to issues with our previous OVA distribution. We are currently investigating our options to bring back the OVA distribution. However, the VMDK works on the following hypervisors:
|
||||
|
||||
- HyperV
|
||||
- VirtualBox
|
||||
- VMware
|
49
Documentation/boards/raspberrypi.md
Normal file
49
Documentation/boards/raspberrypi.md
Normal file
@@ -0,0 +1,49 @@
|
||||
# Raspberry PI
|
||||
|
||||
Supported Hardware:
|
||||
|
||||
| Device | Board |
|
||||
|--------|-----------|
|
||||
| Raspberry Pi A+/B/B+| rpi |
|
||||
| Raspberry Pi Zero | rpi |
|
||||
| Raspberry Pi Zero W | rpi0-w |
|
||||
| Raspberry Pi 2 B | rpi2 |
|
||||
| Raspberry Pi 3 B/B+ | rpi3 / rpi3-64 |
|
||||
| Raspberry Pi 4 B | rpi4 / rpi4-64 |
|
||||
|
||||
## Limitation 64bit
|
||||
|
||||
The 64bit version is under development by RPi-Team. It work very nice but it could have some impacts. Actual we see that the SDcard access with ext4 are a bit slower than on 32bit.
|
||||
|
||||
## Serial console
|
||||
|
||||
For access to terminal over serial console, add `console=ttyAMA0,115200` to `cmdline.txt` and `enable_uart=1`, `dtoverlay=pi3-disable-bt` into `config.txt`. GPIO pins are: 6 = GND / 8 = UART TXD / 10 = UART RXD.
|
||||
|
||||
## I2C
|
||||
|
||||
Add `dtparam=i2c1=on` and `dtparam=i2c_arm=on` to `config.txt`. After that we create a module file on host with [config usb stick][config] or direct into `/etc/modules-load.d`.
|
||||
|
||||
rpi-i2c.conf:
|
||||
```
|
||||
i2c-dev
|
||||
i2c-bcm2708
|
||||
```
|
||||
|
||||
## USB Boot
|
||||
|
||||
USB mass storage boot is available on Raspberry Pi 3B, 3B+, 3A+, and 2B v1.2.
|
||||
To enable USB boot, add `program_usb_boot_mode=1` into `config.txt`. Note that this **permanently** alters the one-time programmable memory of the device.
|
||||
|
||||
For more information see [RaspberryPi](https://www.raspberrypi.org/documentation/hardware/raspberrypi/bootmodes/msd.md).
|
||||
|
||||
### Caveats
|
||||
|
||||
* All bootable SD cards must be removed.
|
||||
* Boot time can be significantly longer with USB. This is due to the boot process first attempting to boot from SD card, failing, and resorting to USB.
|
||||
* Many USB drives simply do not work for boot. This is likely due to minimal driver support in uboot and will not be fixed. If you can't get it to boot on one drive, try a different brand/model. SanDisk Cruzer drives seem to have a higher rate of issues.
|
||||
|
||||
## Tweaks
|
||||
|
||||
If you don't need bluetooth, disabled it with add `dtoverlay=pi3-disable-bt` into `config.txt`.
|
||||
|
||||
[config]: ../configuration.md#automatic
|
17
Documentation/boards/tinker.md
Normal file
17
Documentation/boards/tinker.md
Normal file
@@ -0,0 +1,17 @@
|
||||
# Tinker Board
|
||||
|
||||
Supported Hardware:
|
||||
|
||||
| Device | Board |
|
||||
|--------|-----------|
|
||||
| Tinker RK3288 | tinker |
|
||||
| Tinker S RK3288 | tinker |
|
||||
|
||||
## eMMC
|
||||
|
||||
eMMC support is provided transparently. Just flash the image to the eMMC by connecting your Tinker Board S to your PC via Micro-USB.
|
||||
|
||||
## Serial console
|
||||
|
||||
To access the terminal over serial console, add `console=ttyS2,115200` to `cmdline.txt`. GPIO pins are: 34 = GND / 32 = UART TXD / 33 = UART RXD.
|
||||
|
21
Documentation/build.md
Normal file
21
Documentation/build.md
Normal file
@@ -0,0 +1,21 @@
|
||||
# Building
|
||||
|
||||
Running `sudo ./enter.sh` will get you into the build Docker container.
|
||||
`make -C /build/buildroot BR2_EXTERNAL=/build/buildroot-external xy_defconfig`
|
||||
|
||||
## Scripts
|
||||
|
||||
|
||||
|
||||
## Helpers
|
||||
|
||||
- `make -C /build/buildroot BR2_EXTERNAL=/build/buildroot-external xy_defconfig`
|
||||
- `make -C /build/buildroot BR2_EXTERNAL=/build/buildroot-external menuconfig`
|
||||
- `make -C /build/buildroot BR2_EXTERNAL=/build/buildroot-external linux-menuconfig`
|
||||
- `make -C /build/buildroot BR2_EXTERNAL=/build/buildroot-external barebox-menuconfig`
|
||||
- `make -C /build/buildroot BR2_EXTERNAL=/build/buildroot-external busybox-menuconfig`
|
||||
|
||||
- `make -C /build/buildroot BR2_EXTERNAL=/build/buildroot-external savedefconfig`
|
||||
- `make -C /build/buildroot BR2_EXTERNAL=/build/buildroot-external linux-update-defconfig`
|
||||
- `make -C /build/buildroot BR2_EXTERNAL=/build/buildroot-external barebox-update-defconfig`
|
||||
- `make -C /build/buildroot BR2_EXTERNAL=/build/buildroot-external busybox-update-config`
|
60
Documentation/configuration.md
Normal file
60
Documentation/configuration.md
Normal file
@@ -0,0 +1,60 @@
|
||||
# Configuration
|
||||
|
||||
## Automatic
|
||||
|
||||
You can use an USB drive with HassOS to configure network options, SSH access to the host and to install updates.
|
||||
Format a USB stick with FAT32/EXT4/NTFS and name it `CONFIG`. Alternative you can create a `CONFIG` folder inside boot partition. Use the following directory structure within the USB drive:
|
||||
|
||||
```text
|
||||
network/
|
||||
modules/
|
||||
modprobe/
|
||||
udev/
|
||||
authorized_keys
|
||||
timesyncd.conf
|
||||
hassos-xy.raucb
|
||||
```
|
||||
|
||||
- The `network` folder can contain any kind of NetworkManager connection files. For more information see [Network][network.md].
|
||||
- The `modules` folder is for modules-load configuration files.
|
||||
- The `modprobe` folder is for modules configuration files (/etc/modprobe.d)
|
||||
- The `udev` folder is for udev rules files.
|
||||
- The `authorized_keys` file activates debug SSH access on port `22222`. See [Debugging Home Assistant][debug-homeassistant].
|
||||
- The `timesyncd.conf` file allow you to set different NTP servers. HassOS won't boot without correct working time servers!
|
||||
- The `hassos-*.raucb` file is a firmware OTA update which will be installed. These can be found on on the [release][hassos-release] page.
|
||||
|
||||
You can put this USB stick into the device and it will be read on startup. You can also trigger this process later over the
|
||||
API/UI or by calling `systemctl restart hassos-config` on the host.
|
||||
|
||||
## Local
|
||||
|
||||
### Bootargs
|
||||
|
||||
You can edit or create a `cmdline.txt` in your boot partition. That will be read from the bootloader.
|
||||
|
||||
### Kernel-Module
|
||||
|
||||
The kernel module folder `/etc/modules-load.d` is persistent and you can add your configuration files there. See [Systemd modules load][systemd-modules]. You can add the modules configuration files in `/etc/modprobe.d` that is also persistent.
|
||||
|
||||
### Udev rules
|
||||
|
||||
The udev rules folder `/etc/udev/rules.d` is persistent and you can add your configuration files there.
|
||||
|
||||
### Network
|
||||
|
||||
You can manual add, edit or remove connections configurations from `/etc/NetworkManager/system-connections`.
|
||||
|
||||
### NTP
|
||||
|
||||
You can manual edit the systemd timesync file on `/etc/systemd/timesyncd.conf`.
|
||||
Our default ntp configuration look like:
|
||||
```
|
||||
[Time]
|
||||
NTP=time1.google.com time2.google.com time3.google.com
|
||||
FallbackNTP=0.pool.ntp.org 1.pool.ntp.org 2.pool.ntp.org 3.pool.ntp.org
|
||||
```
|
||||
|
||||
[systemd-modules]: https://www.freedesktop.org/software/systemd/man/modules-load.d.html
|
||||
[network.md]: network.md
|
||||
[hassos-release]: https://github.com/home-assistant/hassos/releases/
|
||||
[debug-homeassistant]: https://developers.home-assistant.io/docs/en/hassio_debugging.html
|
22
Documentation/deployment.md
Normal file
22
Documentation/deployment.md
Normal file
@@ -0,0 +1,22 @@
|
||||
# Deployment
|
||||
|
||||
We provide 3 different types of release builds:
|
||||
|
||||
- development (beta/dev)
|
||||
- staging (rc)
|
||||
- production (stable)
|
||||
|
||||
## Versioning
|
||||
|
||||
The format of version is *MAJOR.BUILD*. Everytime we create a new release with same userland, we bump the build number.
|
||||
The development number they will be bump for the stable release version and the development version go to next major number.
|
||||
|
||||
## Git branch/Tag
|
||||
|
||||
The branch `dev` ist the actual development branch and from there we never make a release. The `master` branch contains the development version and from there we build a beta release.
|
||||
|
||||
If we create a new staging/productive release, we create a new branch `rel-{MAJOR}`. They will be used for the whole cycle of this release.
|
||||
|
||||
## Upload release files
|
||||
|
||||
We use [ghr](https://github.com/tcnksm/ghr) to upload files to our repository. A binary version is available inside `scripts`.
|
24
Documentation/development.md
Normal file
24
Documentation/development.md
Normal file
@@ -0,0 +1,24 @@
|
||||
# Development
|
||||
|
||||
## Boot system
|
||||
|
||||
`BOOT_SYS`:
|
||||
- efi
|
||||
- hyprid
|
||||
- spl
|
||||
- mbr
|
||||
|
||||
HassOS is basicly used GPT. But for use GPT we need own the first 1024 of
|
||||
boot drive. Is that not possible, you can use MBR for your device, they work also with SPLs.
|
||||
|
||||
Hyprid and SPL use both a hyprid MBR/GPT table but SPL move the GPT header 8MB for give space to write SPL and boot images before.
|
||||
|
||||
`BOOTLOADER`:
|
||||
- uboot
|
||||
- barebox
|
||||
|
||||
We support mainly uboot but for uefi system we can also use barebox. In future we hope to remove barebox with uboot also on uefi.
|
||||
|
||||
`DISK_SIZE`:
|
||||
Default 2. That is the size of end image in GB.
|
||||
|
106
Documentation/getting_started_development.md
Normal file
106
Documentation/getting_started_development.md
Normal file
@@ -0,0 +1,106 @@
|
||||
Getting started with Hassos development using Docker on GNU/Linux
|
||||
=================================================================
|
||||
|
||||
First, install **docker** for your distribution - I'd advise to use your distro's provided packages, since that will make sure permissions et al. are sanely set up for what you are about to run. You're also expected to have your current user properly set up in in your sudoers policy, so that this account may elevate to root and execute arbitrary commands as UID 0 (this is required, since at some point during the build process, a new loopback device-backed filesystem image will be mounted inside a docker container - which requires a "privileged" container to run, which can only be done as root).
|
||||
|
||||
Next, make sure the docker daemon is running:
|
||||
|
||||
```
|
||||
$ sudo systemctl status docker
|
||||
● docker.service - Docker Application Container Engine
|
||||
Loaded: loaded (/usr/lib/systemd/system/docker.service; disabled; vendor preset: disabled)
|
||||
Active: inactive (dead)
|
||||
Docs: https://docs.docker.com
|
||||
```
|
||||
|
||||
My desktop distro doesn't start newly installed services by default, which means I'll have to manually fire up the `docker` service:
|
||||
|
||||
```
|
||||
$ sudo systemctl start docker
|
||||
$ sudo systemctl --no-pager status docker -n0
|
||||
● docker.service - Docker Application Container Engine
|
||||
Loaded: loaded (/usr/lib/systemd/system/docker.service; disabled; vendor preset: disabled)
|
||||
Active: active (running) since Wed 2018-10-10 21:08:23 CEST; 25s ago
|
||||
Docs: https://docs.docker.com
|
||||
Main PID: 1531 (dockerd)
|
||||
Tasks: 27 (limit: 4915)
|
||||
Memory: 163.4M
|
||||
CGroup: /system.slice/docker.service
|
||||
├─1531 /usr/bin/dockerd -H fd://
|
||||
└─1539 docker-containerd --config /var/run/docker/containerd/containerd.toml
|
||||
```
|
||||
|
||||
Now, change your working directory to your hassos repo checkout (please adapt pathnames as needed), make sure your intended changes to the source tree are applied (and committed, ideally :)), and execute the `enter.sh` helper script:
|
||||
|
||||
```
|
||||
$ cd ~/codebase/hassos/
|
||||
$ sudo scripts/enter.sh
|
||||
Sending build context to Docker daemon 30.48MB
|
||||
Step 1/6 : FROM ubuntu:18.04
|
||||
[...]
|
||||
---> 4dc25a21556b
|
||||
Successfully built 4dc25a21556b
|
||||
Successfully tagged hassbuildroot:latest
|
||||
```
|
||||
|
||||
Note that the current iteration of `enter.sh` will try to load the **overlayfs** kernel module, which is not strictly required for docker's operation, as far as I can tell. It's OK if loading that module fails; the shell script will continue executing. If everything works out, you will find yourself in an interactive login shell inside your docker container/build environment, where you can peek around:
|
||||
|
||||
```
|
||||
root@somehashinhex:/build#
|
||||
root@somehashinhex:/build# make help
|
||||
[...]
|
||||
```
|
||||
|
||||
The _hassos_ developers provide a Makefile that will build hassos images for a (rather long!) list of targets. For example run the command below to start building the _ova_ variant, and go make a cup of tea. Or fifteen.
|
||||
|
||||
```
|
||||
root@0db6f7079872:/build# make ova
|
||||
[...]
|
||||
```
|
||||
|
||||
That will result in a single VMDK image file at the very end of the build process. This image file is a compressed block device dump with a proper GPT partition table, prepared to ship into any OVA-compatible hypervisor's innards. For me, the end of the **ova** build steps looks like this:
|
||||
|
||||
```
|
||||
[...]
|
||||
2097152+0 records out
|
||||
1073741824 bytes (1.1 GB, 1.0 GiB) copied, 12.2145 s, 87.9 MB/s
|
||||
make: Leaving directory '/build/buildroot'
|
||||
make: Entering directory '/build/buildroot'
|
||||
rm -rf /build/buildroot/output/target /build/buildroot/output/images /build/buildroot/output/host \
|
||||
/build/buildroot/output/build /build/buildroot/output/staging \
|
||||
/build/buildroot/output/legal-info /build/buildroot/output/graphs
|
||||
make: Leaving directory '/build/buildroot'
|
||||
```
|
||||
|
||||
The artifacts you just built are placed in the `target/` subdirectory:
|
||||
|
||||
```
|
||||
root@fd292c061896:/build# ls -lh release/
|
||||
total 141M
|
||||
-rw-r--r-- 1 root root 141M Oct 10 20:22 hassos_ova-2.2.vmdk.gz
|
||||
```
|
||||
|
||||
In order to be able to use this image file with the **qemu** hypervisor, you'll need to unpack it, and convert it to an image format that qemu can work with. Conveniently, the _hassos_ buildenv already provides all the tools we need for this conversion:
|
||||
|
||||
```
|
||||
root@fd292c061896:/build# gunzip release/hassos_ova-2.2.vmdk.gz
|
||||
root@fd292c061896:/build# qemu-img convert -O qcow2 release/hassos_ova-2.2.vmdk release/hassos_ova-2.2.qcow2
|
||||
root@fd292c061896:/build# ls -lh release/
|
||||
total 673M
|
||||
-rw-r--r-- 1 root root 337M Oct 10 20:25 hassos_ova-2.2.qcow2
|
||||
-rw-r--r-- 1 root root 337M Oct 10 20:22 hassos_ova-2.2.vmdk
|
||||
```
|
||||
|
||||
Now, exit the docker container's environment, and find the build artifacts in the `releases/` directory beneath your repository checkout dir. (The generated files will be owned by _root_; make sure to `chown` them to your user account, if needed.)
|
||||
|
||||
From there, qemu can try to boot it. Since the generated image assumes UEFI support in the host/hypervisor, this is slightly more tricky than with "classic"(/legacy) MBR-based images. On the *Debian* host I use to run my qemu virtual machine on, you'll need to install the **ovmf** package, which is described as providing "UEFI firmware for 64-bit x86 virtual machines". That package will install a _TianoCore_-derived qemu UEFI image build at `/usr/share/OVMF/OVMF_CODE.fd`, which we'll use with qemu to boot the generated qcow2 image. (Please adapt pathnames as necessary, for example if you have installed the ovmf firmware image at another location.)
|
||||
|
||||
```
|
||||
$ /usr/bin/qemu-system-x86_64 -enable-kvm -name hassos_ova -smp 2 -m 1024 -drive file=release/hassos_ova-2.2.qcow2,index=0,media=disk,if=ide,cache=none,format=qcow2 -drive file=/usr/share/ovmf/x64/OVMF_CODE.fd,if=pflash,format=raw,readonly=on
|
||||
```
|
||||
|
||||
This should pop up qemu's SDL frontend, displaying _hassos_' VT/CLI environment. Specifying addtional options and flags to qemu for network access, keyboard layout et al. are left as an exercise for the reader.
|
||||
|
||||
After the boot process has finished, you can log in to _hassos_ without a password, providing *root* as the username. From there, executing `login` on the *ha>* shell prompt will yield a root shell in the host OS.
|
||||
|
||||
Happy hacking! :)
|
11
Documentation/kernel.md
Normal file
11
Documentation/kernel.md
Normal file
@@ -0,0 +1,11 @@
|
||||
|
||||
# Kernel Version
|
||||
|
||||
| Board | Version |
|
||||
|-------|---------|
|
||||
| Open Virtual Applicance | 4.19.115 |
|
||||
| Raspberry Pi | 4.19.106 |
|
||||
| Tinker Board | 4.19.115 |
|
||||
| Odroid-C2 | 4.19.72 |
|
||||
| Odroid-XU4 | 4.19.72 |
|
||||
| Intel NUC | 4.19.115 |
|
144
Documentation/network.md
Normal file
144
Documentation/network.md
Normal file
@@ -0,0 +1,144 @@
|
||||
# Network
|
||||
|
||||
HassOS uses NetworkManager to control the host network. In future releases, you will be able to set up the configuration using the API/UI. Currently only a manual configuration using NetworkManager connection files is supported. Without a configuration file, the device will use DHCP by default. These network connection files can be placed on a USB drive and imported to the host as described in [Configuration][configuration-usb].
|
||||
|
||||
## Configuration Examples
|
||||
|
||||
You can read the [Official Manual][keyfile] or find many configuration examples across the internet. The system is read-only, if you don't want the IP address to change on every boot, you should set the UUID property with a generic [UUID4][uuid]. Inside `\CONFIG\network\` on the USB or SD, create a file called `my-network` and add the appropriate contents below:
|
||||
|
||||
### Default
|
||||
|
||||
We have a preinstalled connection profile:
|
||||
|
||||
```ini
|
||||
[connection]
|
||||
id=my-network
|
||||
uuid=f62bf7c2-e565-49ff-bbfc-a4cf791e6add
|
||||
type=802-3-ethernet
|
||||
|
||||
[ipv4]
|
||||
method=auto
|
||||
|
||||
[ipv6]
|
||||
addr-gen-mode=stable-privacy
|
||||
method=auto
|
||||
```
|
||||
|
||||
### LAN
|
||||
|
||||
```ini
|
||||
[connection]
|
||||
id=my-network
|
||||
uuid=d55162b4-6152-4310-9312-8f4c54d86afa
|
||||
type=802-3-ethernet
|
||||
|
||||
[ipv4]
|
||||
method=auto
|
||||
|
||||
[ipv6]
|
||||
addr-gen-mode=stable-privacy
|
||||
method=auto
|
||||
```
|
||||
|
||||
### Wireless WPA/PSK
|
||||
|
||||
```ini
|
||||
[connection]
|
||||
id=my-network
|
||||
uuid=72111c67-4a5d-4d5c-925e-f8ee26efb3c3
|
||||
type=802-11-wireless
|
||||
|
||||
[802-11-wireless]
|
||||
mode=infrastructure
|
||||
ssid=MY_SSID
|
||||
# Uncomment below if your SSID is not broadcasted
|
||||
#hidden=true
|
||||
|
||||
[802-11-wireless-security]
|
||||
auth-alg=open
|
||||
key-mgmt=wpa-psk
|
||||
psk=MY_WLAN_SECRET_KEY
|
||||
|
||||
[ipv4]
|
||||
method=auto
|
||||
|
||||
[ipv6]
|
||||
addr-gen-mode=stable-privacy
|
||||
method=auto
|
||||
```
|
||||
|
||||
### Static IP
|
||||
|
||||
Replace the following configuration:
|
||||
|
||||
```ini
|
||||
[ipv4]
|
||||
method=manual
|
||||
address=192.168.1.111/24,192.168.1.1
|
||||
dns=8.8.8.8;8.8.4.4;
|
||||
```
|
||||
For address, the value before the comma is the IP address and subnet prefix bitlength; the second value is the IP address of the gateway.
|
||||
|
||||
## Tips
|
||||
|
||||
### Reset network
|
||||
|
||||
If you want to reset the network configuration back to the default DHCP settings, use the following commands on the host:
|
||||
|
||||
```bash
|
||||
$ rm /etc/NetworkManager/system-connections/*
|
||||
$ cp /usr/share/system-connections/* /etc/NetworkManager/system-connections/
|
||||
$ nmcli con reload
|
||||
```
|
||||
|
||||
### Powersave
|
||||
|
||||
If you have trouble with powersave you can do following:
|
||||
|
||||
```ini
|
||||
[wifi]
|
||||
# Values are 0 (use default), 1 (ignore/don't touch), 2 (disable) or 3 (enable).
|
||||
powersave=0
|
||||
```
|
||||
## Using nmcli to set a static IPV4 address
|
||||
|
||||
Log into the HASSOS base system via a console:
|
||||
|
||||
```
|
||||
Welcome to Home Assistant
|
||||
homeassistant login:
|
||||
```
|
||||
Login as `root` (no password needed)
|
||||
|
||||
At the `ha >` prompt, type `login` (as instructed).
|
||||
|
||||
From here you will use the `nmcli` configuration tool.
|
||||
|
||||
`# nmcli connection show` will list the “HassOS default” connection in use.
|
||||
|
||||
`# nmcli con show "HassOS default"` will list all the properties of the connection.
|
||||
|
||||
`# nmcli con edit "HassOS default"` will put you in a position to edit the connection.
|
||||
|
||||
`nmcli> print ipv4` will show you the ipv4 properties of this connection.
|
||||
|
||||
To add your static IP address (select 'yes' for manual method);
|
||||
```
|
||||
nmcli> set ipv4.addresses 192.168.100.10/24
|
||||
Do you also want to set 'ipv4.method' to 'manual'? [yes]:
|
||||
```
|
||||
In addition I have found it is wise to set the dns server and the local gateway. For most home routers these will be the same address. If you are using Pi-Hole you can set the dns to that.
|
||||
```
|
||||
nmcli> set ipv4.dns 192.168.100.1
|
||||
nmcli> set ipv4.gateway 192.168.100.1
|
||||
nmcli> save
|
||||
nmcli> quit
|
||||
```
|
||||
|
||||
If you now view the default connection `cat /etc/NetworkManager/system-connections/default` you should see the method is manual and the address is set.
|
||||
|
||||
Doing a `nmcli con reload` does not always work so restart the VM.
|
||||
|
||||
[keyfile]: https://developer.gnome.org/NetworkManager/stable/nm-settings.html
|
||||
[configuration-usb]: configuration.md
|
||||
[uuid]: https://www.uuidgenerator.net/
|
43
Makefile
Normal file
43
Makefile
Normal file
@@ -0,0 +1,43 @@
|
||||
RELEASE_DIR = /build/release
|
||||
|
||||
BUILDROOT=/build/buildroot
|
||||
BUILDROOT_EXTERNAL=/build/buildroot-external
|
||||
DEFCONFIG_DIR = $(BUILDROOT_EXTERNAL)/configs
|
||||
|
||||
TARGETS := $(notdir $(patsubst %_defconfig,%,$(wildcard $(DEFCONFIG_DIR)/*_defconfig)))
|
||||
TARGETS_CONFIG := $(notdir $(patsubst %_defconfig,%-config,$(wildcard $(DEFCONFIG_DIR)/*_defconfig)))
|
||||
|
||||
.NOTPARALLEL: $(TARGETS) $(TARGETS_CONFIG) all
|
||||
|
||||
.PHONY: $(TARGETS) $(TARGETS_CONFIG) all clean help
|
||||
|
||||
all: $(TARGETS)
|
||||
|
||||
$(RELEASE_DIR):
|
||||
mkdir -p $(RELEASE_DIR)
|
||||
|
||||
$(TARGETS_CONFIG): %-config:
|
||||
@echo "config $*"
|
||||
$(MAKE) -C $(BUILDROOT) BR2_EXTERNAL=$(BUILDROOT_EXTERNAL) "$*_defconfig"
|
||||
|
||||
$(TARGETS): %: $(RELEASE_DIR) %-config
|
||||
@echo "build $@"
|
||||
$(MAKE) -C $(BUILDROOT) BR2_EXTERNAL=$(BUILDROOT_EXTERNAL)
|
||||
cp -f $(BUILDROOT)/output/images/hassos_* $(RELEASE_DIR)/
|
||||
|
||||
# Do not clean when building for one target
|
||||
ifneq ($(words $(filter $(TARGETS),$(MAKECMDGOALS))), 1)
|
||||
@echo "clean $@"
|
||||
$(MAKE) -C $(BUILDROOT) BR2_EXTERNAL=$(BUILDROOT_EXTERNAL) clean
|
||||
endif
|
||||
@echo "finished $@"
|
||||
|
||||
clean:
|
||||
$(MAKE) -C $(BUILDROOT) BR2_EXTERNAL=$(BUILDROOT_EXTERNAL) clean
|
||||
|
||||
help:
|
||||
@echo "Supported targets: $(TARGETS)"
|
||||
@echo "Run 'make <target>' to build a target image."
|
||||
@echo "Run 'make all' to build all target images."
|
||||
@echo "Run 'make clean' to clean the build output."
|
||||
@echo "Run 'make <target>-config' to configure buildroot for a target."
|
53
README.md
53
README.md
@@ -1,58 +1,15 @@
|
||||
# WORK IN PROGRESS!
|
||||
[](https://dev.azure.com/home-assistant/Hass.io/_build/latest?definitionId=13&branchName=dev)
|
||||
|
||||
# Hass.io OS
|
||||
# HassOS
|
||||
Hass.io OS based on [buildroot](https://buildroot.org/). It's a hypervisor for Docker and supports various kind of IoT hardware. It is also available as virtual appliance. The whole system is optimized for embedded system and security. You can update the system simple with OTA updates or offline updates.
|
||||
|
||||
## Focus
|
||||
|
||||
- Linux kernel 4.15
|
||||
- Barebox as bootloader
|
||||
- Barebox as bootloader on EFI
|
||||
- U-Boot as bootloader on IoT
|
||||
- RAUC for OTA updates
|
||||
- SquashFS LZ4 as filesystem
|
||||
- Docker 17.12.1
|
||||
- Docker 18.09.0
|
||||
- AppArmor protected
|
||||
- ZRAM LZ4 for /tmp, /var, swap
|
||||
- Run every supervisor
|
||||
|
||||
## Schemas
|
||||

|
||||
|
||||
## Configuration
|
||||
|
||||
Create a USB stick with a partition named "hassio-config". This partition can include follow files:
|
||||
|
||||
- network-* (NetworkManager keyfiles)
|
||||
- known_hosts (SSH)
|
||||
- hassio-os-*.ota (Firmware updates)
|
||||
|
||||
# Customize
|
||||
|
||||
## Supervisor/Cli
|
||||
|
||||
Provide a file with the name `hassio.json` in your data partition and the following structure:
|
||||
|
||||
```json
|
||||
{
|
||||
"supervisor": "repo/image",
|
||||
"supervisor_args": "optional / custom docker arguments",
|
||||
"cli": "repo/image",
|
||||
"cli_args": "optional / custom docker arguments"
|
||||
}
|
||||
```
|
||||
|
||||
# Building
|
||||
Running `sudo ./enter.sh` will get you into the build Docker container.
|
||||
`make -C /build/buildroot BR2_EXTERNAL=/build/buildroot-external xy_defconfig`
|
||||
|
||||
From outside the Docker container, while it is still running you can use `./getimage.sh` to get the output image.
|
||||
|
||||
## Helpers
|
||||
|
||||
- `make -C /build/buildroot BR2_EXTERNAL=/build/buildroot-external defconfig BR2_DEFCONFIG=/build/buildroot-external/configs/xy_defconfig`
|
||||
- `make -C /build/buildroot BR2_EXTERNAL=/build/buildroot-external menuconfig`
|
||||
- `make -C /build/buildroot BR2_EXTERNAL=/build/buildroot-external linux-menuconfig`
|
||||
- `make -C /build/buildroot BR2_EXTERNAL=/build/buildroot-external barebox-menuconfig`
|
||||
|
||||
- `make -C /build/buildroot BR2_EXTERNAL=/build/buildroot-external savedefconfig BR2_DEFCONFIG=/build/buildroot-external/configs/xy_defconfig`
|
||||
- `make -C /build/buildroot BR2_EXTERNAL=/build/buildroot-external linux-update-defconfig`
|
||||
- `make -C /build/buildroot BR2_EXTERNAL=/build/buildroot-external barebox-update-defconfig`
|
||||
|
49
azure-pipelines-ci.yml
Normal file
49
azure-pipelines-ci.yml
Normal file
@@ -0,0 +1,49 @@
|
||||
# https://dev.azure.com/home-assistant
|
||||
|
||||
trigger:
|
||||
batch: true
|
||||
branches:
|
||||
include:
|
||||
- dev
|
||||
pr:
|
||||
- dev
|
||||
|
||||
variables:
|
||||
- name: versionHadolint
|
||||
value: 'v1.16.3'
|
||||
- name: versionShellCheck
|
||||
value: 'v0.6.0'
|
||||
|
||||
jobs:
|
||||
|
||||
- job: 'Hadolint'
|
||||
pool:
|
||||
vmImage: 'ubuntu-16.04'
|
||||
steps:
|
||||
- script: |
|
||||
sudo docker pull hadolint/hadolint:$(versionHadolint)
|
||||
displayName: 'Install Hadolint'
|
||||
- script: |
|
||||
sudo docker run --rm -i \
|
||||
-v $(pwd)/.hadolint.yaml:/.hadolint.yaml:ro \
|
||||
hadolint/hadolint:$(versionHadolint) < Dockerfile
|
||||
displayName: 'Run Hadolint'
|
||||
|
||||
|
||||
- job: 'ShellCheck'
|
||||
pool:
|
||||
vmImage: 'ubuntu-16.04'
|
||||
steps:
|
||||
- script: |
|
||||
sudo docker pull koalaman/shellcheck:$(versionShellCheck)
|
||||
displayName: 'Install ShellCheck'
|
||||
- script: |
|
||||
sudo docker run --rm -i \
|
||||
-v $(pwd):/mnt:ro koalaman/shellcheck:$(versionShellCheck) \
|
||||
scripts/*.sh \
|
||||
buildroot-external/scripts/*.sh \
|
||||
buildroot-external/board/**/*.sh \
|
||||
buildroot-external/rootfs-overlay/usr/sbin/* \
|
||||
buildroot-external/rootfs-overlay/usr/libexec/* \
|
||||
buildroot-external/rootfs-overlay/usr/lib/rauc/*
|
||||
displayName: 'Run ShellCheck'
|
93
azure-pipelines-release.yml
Normal file
93
azure-pipelines-release.yml
Normal file
@@ -0,0 +1,93 @@
|
||||
# https://dev.azure.com/home-assistant
|
||||
|
||||
trigger:
|
||||
batch: true
|
||||
tags:
|
||||
include:
|
||||
- '*'
|
||||
exclude:
|
||||
- untagged*
|
||||
pr: none
|
||||
|
||||
variables:
|
||||
- name: versionGHR
|
||||
value: 'v0.12.1'
|
||||
- group: github
|
||||
- group: rauc
|
||||
|
||||
jobs:
|
||||
|
||||
- job: 'VersionValidate'
|
||||
condition: startsWith(variables['Build.SourceBranch'], 'refs/tags')
|
||||
pool:
|
||||
vmImage: 'ubuntu-latest'
|
||||
steps:
|
||||
- script: |
|
||||
. buildroot-external/meta
|
||||
|
||||
if [ "${VERSION_MAJOR}.${VERSION_BUILD}" != "$(Build.SourceBranchName)" ]; then
|
||||
exit 1
|
||||
fi
|
||||
displayName: 'Check version of branch/tag'
|
||||
|
||||
|
||||
- job: 'Release'
|
||||
dependsOn:
|
||||
- 'VersionValidate'
|
||||
timeoutInMinutes: 240
|
||||
pool:
|
||||
name: 'Buildroot'
|
||||
strategy:
|
||||
maxParallel: 1
|
||||
matrix:
|
||||
OpenVirtualAppliance:
|
||||
board: 'ova'
|
||||
IntelNuc:
|
||||
board: 'intel_nuc'
|
||||
OdroidC2:
|
||||
board: 'odroid_c2'
|
||||
OdroidXU4:
|
||||
board: 'odroid_xu4'
|
||||
RaspberryPi:
|
||||
board: 'rpi'
|
||||
RaspberryPi0-W:
|
||||
board: 'rpi0_w'
|
||||
RaspberryPi2:
|
||||
board: 'rpi2'
|
||||
RaspberryPi3:
|
||||
board: 'rpi3'
|
||||
RaspberryPi3-64:
|
||||
board: 'rpi3_64'
|
||||
RaspberryPi4:
|
||||
board: 'rpi4'
|
||||
RaspberryPi4-64:
|
||||
board: 'rpi4_64'
|
||||
AsusTinker:
|
||||
board: 'tinker'
|
||||
workspace:
|
||||
clean: 'all'
|
||||
steps:
|
||||
- script: |
|
||||
echo -e "-----BEGIN CERTIFICATE-----\n$(releaseCertificate)\n-----END CERTIFICATE-----" > cert.pem
|
||||
echo -e "-----BEGIN PRIVATE KEY-----\n$(releaseKey)\n-----END PRIVATE KEY-----" > key.pem
|
||||
displayName: 'Add release PKI certs'
|
||||
- script: |
|
||||
sudo docker build -t hassos:azure .
|
||||
displayName: 'Build container for HassOS'
|
||||
- script: |
|
||||
curl -SsL https://github.com/tcnksm/ghr/releases/download/$(versionGHR)/ghr_$(versionGHR)_linux_amd64.tar.gz | tar xzf -
|
||||
cp ghr_$(versionGHR)_linux_amd64/ghr .
|
||||
rm -rf ghr_$(versionGHR)_linux_amd64
|
||||
displayName: 'Install GHR'
|
||||
- script: |
|
||||
BUILDER_UID="$(id -u)"
|
||||
BUILDER_GID="$(id -g)"
|
||||
|
||||
sudo docker run --rm --privileged -v "$(pwd):/build" \
|
||||
-e BUILDER_UID="${BUILDER_UID}" -e BUILDER_GID="${BUILDER_GID}" \
|
||||
-v "/mnt/build-cache:/cache" \
|
||||
hassos:azure make $(board)
|
||||
displayName: 'Build $(board)'
|
||||
- script: |
|
||||
./ghr -t $(githubToken) -replace $(Build.SourceBranchName) release/
|
||||
displayName: 'Upload $(board)'
|
@@ -1,4 +1,7 @@
|
||||
source "$BR2_EXTERNAL_HASSIO_PATH/package/mingetty/Config.in"
|
||||
source "$BR2_EXTERNAL_HASSIO_PATH/package/hassio/Config.in"
|
||||
source "$BR2_EXTERNAL_HASSIO_PATH/package/libapparmor/Config.in"
|
||||
source "$BR2_EXTERNAL_HASSIO_PATH/package/apparmor/Config.in"
|
||||
source "$BR2_EXTERNAL_HASSOS_PATH/package/hassos/Config.in"
|
||||
source "$BR2_EXTERNAL_HASSOS_PATH/package/libapparmor/Config.in"
|
||||
source "$BR2_EXTERNAL_HASSOS_PATH/package/apparmor/Config.in"
|
||||
source "$BR2_EXTERNAL_HASSOS_PATH/package/bluetooth-bcm43xx/Config.in"
|
||||
source "$BR2_EXTERNAL_HASSOS_PATH/package/bluetooth-rtl8723/Config.in"
|
||||
source "$BR2_EXTERNAL_HASSOS_PATH/package/hardkernel-boot/Config.in"
|
||||
source "$BR2_EXTERNAL_HASSOS_PATH/package/qemu-guest-agent/Config.in"
|
||||
|
@@ -1,75 +0,0 @@
|
||||
#include <tunables/global>
|
||||
|
||||
profile hassio-supervisor flags=(attach_disconnected,mediate_deleted) {
|
||||
#include <abstractions/base>
|
||||
#include <abstractions/python>
|
||||
|
||||
network,
|
||||
deny network raw,
|
||||
|
||||
signal (send) set=(kill,term),
|
||||
|
||||
/bin/busybox ix,
|
||||
/usr/bin/python{,3,3.[0-9]} ix,
|
||||
/usr/bin/git cx,
|
||||
/usr/bin/socat cx,
|
||||
/usr/bin/gdbus cx,
|
||||
|
||||
deny /proc/** wl,
|
||||
deny /root/** wl,
|
||||
deny /sys/** wl,
|
||||
|
||||
/** r,
|
||||
/tmp/** rw,
|
||||
/data/** rw,
|
||||
/{,var/}run/docker.sock rw,
|
||||
|
||||
capability net_bind_service,
|
||||
|
||||
profile /usr/bin/socat flags=(attach_disconnected,mediate_deleted) {
|
||||
#include <abstractions/base>
|
||||
|
||||
network inet udp,
|
||||
network inet tcp,
|
||||
|
||||
deny network raw,
|
||||
deny network packet,
|
||||
|
||||
signal (receive) set=(kill,term),
|
||||
capability net_bind_service,
|
||||
|
||||
/lib/* mr,
|
||||
/usr/bin/socat mr,
|
||||
}
|
||||
|
||||
profile /usr/bin/gdbus flags=(attach_disconnected,mediate_deleted) {
|
||||
#include <abstractions/base>
|
||||
#include <abstractions/dbus>
|
||||
|
||||
unix (send, receive) type=stream,
|
||||
|
||||
/usr/bin/gdbus mr,
|
||||
/lib/* mr,
|
||||
/{,var/}run/dbus/system_bus_socket rw,
|
||||
}
|
||||
|
||||
profile /usr/bin/git flags=(attach_disconnected,mediate_deleted) {
|
||||
#include <abstractions/base>
|
||||
|
||||
network,
|
||||
deny network raw,
|
||||
|
||||
/bin/busybox ix,
|
||||
/usr/bin/git mr,
|
||||
/usr/libexec/git-core/* ix,
|
||||
|
||||
deny /data/homeassistant rw,
|
||||
deny /data/ssl rw,
|
||||
|
||||
/** r,
|
||||
/lib/* mr,
|
||||
/data/addons/** lrw,
|
||||
|
||||
capability dac_override,
|
||||
}
|
||||
}
|
@@ -1,24 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
export PATH=/env/bin
|
||||
|
||||
global linux.bootargs.base
|
||||
global linux.bootargs.dyn.root
|
||||
|
||||
# Init board specific stuff
|
||||
[ -e /env/config-board ] && /env/config-board
|
||||
|
||||
# Autostart
|
||||
for i in /env/init/*; do
|
||||
. $i
|
||||
done
|
||||
|
||||
echo "- Hit m for menu or wait for autoboot -"
|
||||
timeout -a 1 -s -v key
|
||||
|
||||
# Run menu
|
||||
if [ "${key}" != "m" ]; then
|
||||
boot
|
||||
fi
|
||||
|
||||
menutree
|
@@ -1,3 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
global linux.bootargs.zram="zram.enabled=1 zram.num_devices=3"
|
@@ -1,3 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
boot system0
|
@@ -1,3 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
boot system1
|
@@ -1 +0,0 @@
|
||||
Hass.io OS boot Menu:
|
@@ -1 +0,0 @@
|
||||
system0 system1
|
28
buildroot-external/board/asus/hassos-hook.sh
Executable file
28
buildroot-external/board/asus/hassos-hook.sh
Executable file
@@ -0,0 +1,28 @@
|
||||
#!/bin/bash
|
||||
# shellcheck disable=SC2155
|
||||
|
||||
function hassos_pre_image() {
|
||||
local BOOT_DATA="$(path_boot_dir)"
|
||||
local SPL_IMG="$(path_spl_img)"
|
||||
|
||||
cp -t "${BOOT_DATA}" \
|
||||
"${BINARIES_DIR}/boot.scr" \
|
||||
"${BINARIES_DIR}/rk3288-tinker.dtb"
|
||||
|
||||
echo "console=tty1" > "${BOOT_DATA}/cmdline.txt"
|
||||
|
||||
# Create boot binary
|
||||
rm -f "${BINARIES_DIR}/u-boot-spl-dtb.img"
|
||||
mkimage -n rk3288 -T rksd -d "${BINARIES_DIR}/u-boot-spl-dtb.bin" "${BINARIES_DIR}/u-boot-spl-dtb.img"
|
||||
cat "${BINARIES_DIR}/u-boot-dtb.bin" >> "${BINARIES_DIR}/u-boot-spl-dtb.img"
|
||||
|
||||
# SPL
|
||||
create_spl_image
|
||||
|
||||
dd if="${BINARIES_DIR}/u-boot-spl-dtb.img" of="${SPL_IMG}" conv=notrunc bs=512 seek=64
|
||||
}
|
||||
|
||||
|
||||
function hassos_post_image() {
|
||||
convert_disk_image_gz
|
||||
}
|
6405
buildroot-external/board/asus/tinker/kernel.config
Normal file
6405
buildroot-external/board/asus/tinker/kernel.config
Normal file
File diff suppressed because it is too large
Load Diff
7
buildroot-external/board/asus/tinker/meta
Normal file
7
buildroot-external/board/asus/tinker/meta
Normal file
@@ -0,0 +1,7 @@
|
||||
BOARD_ID=tinker
|
||||
BOARD_NAME="Asus TinkerBoard"
|
||||
CHASSIS=embedded
|
||||
BOOTLOADER=uboot
|
||||
KERNEL_FILE=zImage
|
||||
BOOT_SYS=spl
|
||||
BOOT_ENV_SIZE=0x8000
|
5
buildroot-external/board/asus/tinker/patches/README.md
Normal file
5
buildroot-external/board/asus/tinker/patches/README.md
Normal file
@@ -0,0 +1,5 @@
|
||||
## Kernel
|
||||
https://github.com/armbian/build/tree/master/patch/kernel/rockchip-next
|
||||
|
||||
## u-boot
|
||||
https://github.com/armbian/build/tree/master/patch/u-boot/u-boot-rockchip/board_tinkerboard
|
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,122 @@
|
||||
From 7ba71967a2678e119bcd819ac92d08bd038e1879 Mon Sep 17 00:00:00 2001
|
||||
From: Myy <myy@miouyouyou.fr>
|
||||
Date: Mon, 17 Jul 2017 18:34:33 +0000
|
||||
Subject: [PATCH 5/5] Mali midgard r19p0 fixes for 4.13 kernels
|
||||
|
||||
Mostly due to DMA structure members renamed, and some signatures
|
||||
modifications done during the development of Linux 4.11.
|
||||
|
||||
* mm, fs: reduce fault, page_mkwrite, and pfn_mkwrite to take only vmf
|
||||
11bac80004499ea59f361ef2a5516c84b6eab675
|
||||
v4.11-rc1
|
||||
|
||||
* sched/headers: Move task->mm handling methods to <linux/sched/mm.h>
|
||||
68e21be2916b359fd8afb536c1911dc014cfd03e
|
||||
v4.11-rc1
|
||||
|
||||
* sched/headers: Move task-stack related APIs from <linux/sched.h> to
|
||||
<linux/sched/task_stack.h>
|
||||
f3ac60671954c8d413532627b1be13a76f394c49
|
||||
v4.11-rc1
|
||||
|
||||
* dma-fence: Introduce drm_fence_set_error() helper
|
||||
a009e975da5c7d42a7f5eaadc54946eb5f76c9af
|
||||
v4.11-rc1
|
||||
|
||||
Signed-off-by: Myy <myy@miouyouyou.fr>
|
||||
---
|
||||
drivers/gpu/arm/midgard/mali_kbase.h | 4 ++++
|
||||
drivers/gpu/arm/midgard/mali_kbase_fence.h | 4 ++++
|
||||
drivers/gpu/arm/midgard/mali_kbase_mem_linux.c | 6 ++++++
|
||||
drivers/gpu/arm/midgard/mali_kbase_sync_file.c | 12 ++++++++++++
|
||||
4 files changed, 26 insertions(+)
|
||||
|
||||
diff --git a/drivers/gpu/arm/midgard/mali_kbase.h b/drivers/gpu/arm/midgard/mali_kbase.h
|
||||
index d77f186..5ee47c4 100644
|
||||
--- a/drivers/gpu/arm/midgard/mali_kbase.h
|
||||
+++ b/drivers/gpu/arm/midgard/mali_kbase.h
|
||||
@@ -35,6 +35,10 @@
|
||||
#include <linux/mutex.h>
|
||||
#include <linux/rwsem.h>
|
||||
#include <linux/sched.h>
|
||||
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 11, 0)
|
||||
+#include <linux/sched/task_stack.h>
|
||||
+#include <linux/sched/mm.h>
|
||||
+#endif
|
||||
#include <linux/slab.h>
|
||||
#include <linux/spinlock.h>
|
||||
#include <linux/vmalloc.h>
|
||||
diff --git a/drivers/gpu/arm/midgard/mali_kbase_fence.h b/drivers/gpu/arm/midgard/mali_kbase_fence.h
|
||||
index 8d39299..3c2e3a9 100644
|
||||
--- a/drivers/gpu/arm/midgard/mali_kbase_fence.h
|
||||
+++ b/drivers/gpu/arm/midgard/mali_kbase_fence.h
|
||||
@@ -134,7 +134,11 @@ static inline bool kbase_fence_out_is_ours(struct kbase_jd_atom *katom)
|
||||
static inline int kbase_fence_out_signal(struct kbase_jd_atom *katom,
|
||||
int status)
|
||||
{
|
||||
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(4, 11, 0))
|
||||
katom->dma_fence.fence->status = status;
|
||||
+#else
|
||||
+ katom->dma_fence.fence->error = status;
|
||||
+#endif
|
||||
return dma_fence_signal(katom->dma_fence.fence);
|
||||
}
|
||||
|
||||
diff --git a/drivers/gpu/arm/midgard/mali_kbase_mem_linux.c b/drivers/gpu/arm/midgard/mali_kbase_mem_linux.c
|
||||
index b1f2c46..896aa35 100644
|
||||
--- a/drivers/gpu/arm/midgard/mali_kbase_mem_linux.c
|
||||
+++ b/drivers/gpu/arm/midgard/mali_kbase_mem_linux.c
|
||||
@@ -1788,8 +1788,14 @@ static void kbase_cpu_vm_close(struct vm_area_struct *vma)
|
||||
KBASE_EXPORT_TEST_API(kbase_cpu_vm_close);
|
||||
|
||||
|
||||
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(4, 11, 0))
|
||||
static int kbase_cpu_vm_fault(struct vm_area_struct *vma, struct vm_fault *vmf)
|
||||
{
|
||||
+#else
|
||||
+static int kbase_cpu_vm_fault(struct vm_fault *vmf)
|
||||
+{
|
||||
+ struct vm_area_struct *vma = vmf->vma;
|
||||
+#endif
|
||||
struct kbase_cpu_mapping *map = vma->vm_private_data;
|
||||
pgoff_t rel_pgoff;
|
||||
size_t i;
|
||||
diff --git a/drivers/gpu/arm/midgard/mali_kbase_sync_file.c b/drivers/gpu/arm/midgard/mali_kbase_sync_file.c
|
||||
index 4e1621c..d84a54e 100644
|
||||
--- a/drivers/gpu/arm/midgard/mali_kbase_sync_file.c
|
||||
+++ b/drivers/gpu/arm/midgard/mali_kbase_sync_file.c
|
||||
@@ -161,8 +161,13 @@ static void kbase_fence_wait_callback(struct dma_fence *fence,
|
||||
struct kbase_context *kctx = katom->kctx;
|
||||
|
||||
/* Cancel atom if fence is erroneous */
|
||||
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(4, 11, 0))
|
||||
if (dma_fence_is_signaled(kcb->fence) && kcb->fence->status < 0)
|
||||
katom->event_code = BASE_JD_EVENT_JOB_CANCELLED;
|
||||
+#else
|
||||
+ if (dma_fence_is_signaled(kcb->fence) && kcb->fence->error < 0)
|
||||
+ katom->event_code = BASE_JD_EVENT_JOB_CANCELLED;
|
||||
+#endif
|
||||
|
||||
if (kbase_fence_dep_count_dec_and_test(katom)) {
|
||||
/* We take responsibility of handling this */
|
||||
@@ -273,10 +278,17 @@ static void kbase_sync_fence_info_get(struct dma_fence *fence,
|
||||
* 1 : signaled
|
||||
*/
|
||||
if (dma_fence_is_signaled(fence)) {
|
||||
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(4, 11, 0))
|
||||
if (fence->status < 0)
|
||||
info->status = fence->status; /* signaled with error */
|
||||
else
|
||||
info->status = 1; /* signaled with success */
|
||||
+#else
|
||||
+ if (fence->error < 0)
|
||||
+ info->status = fence->error; /* signaled with error */
|
||||
+ else
|
||||
+ info->status = 1; /* signaled with success */
|
||||
+#endif
|
||||
} else {
|
||||
info->status = 0; /* still active (unsignaled) */
|
||||
}
|
||||
--
|
||||
2.10.2
|
||||
|
@@ -0,0 +1,36 @@
|
||||
From f76c9c58669a3bba0456191431be558ab8054f50 Mon Sep 17 00:00:00 2001
|
||||
From: Myy <myy@miouyouyou.fr>
|
||||
Date: Mon, 17 Jul 2017 11:43:00 +0000
|
||||
Subject: [PATCH 3/5] Using the new header on 4.12 kernels for copy_*_user
|
||||
|
||||
These changes are due to :
|
||||
* generic ...copy_..._user primitives
|
||||
d597580d373774b1bdab84b3d26ff0b55162b916
|
||||
Version : 4.12-rc1
|
||||
|
||||
Signed-off-by: Myy <myy@miouyouyou.fr>
|
||||
---
|
||||
drivers/base/ump/src/linux/ump_kernel_linux.c | 7 ++++++-
|
||||
1 file changed, 6 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/drivers/base/ump/src/linux/ump_kernel_linux.c b/drivers/base/ump/src/linux/ump_kernel_linux.c
|
||||
index d6c3c53..bb3a7f0 100644
|
||||
--- a/drivers/base/ump/src/linux/ump_kernel_linux.c
|
||||
+++ b/drivers/base/ump/src/linux/ump_kernel_linux.c
|
||||
@@ -20,7 +20,12 @@
|
||||
#include <linux/ump-ioctl.h>
|
||||
#include <linux/ump.h>
|
||||
|
||||
-#include <asm/uaccess.h> /* copy_*_user */
|
||||
+#include <linux/version.h>
|
||||
+#if LINUX_VERSION_CODE < KERNEL_VERSION(4,12,0)
|
||||
+#include <asm/uaccess.h> /* copy_*_user */
|
||||
+#else
|
||||
+#include <linux/uaccess.h> /* copy_*_user */
|
||||
+#endif
|
||||
#include <linux/compat.h>
|
||||
#include <linux/module.h> /* kernel module definitions */
|
||||
#include <linux/fs.h> /* file system operations */
|
||||
--
|
||||
2.10.2
|
||||
|
@@ -0,0 +1,46 @@
|
||||
From 63c110cdebc2c692964e1250c6f74f9e8c47c85d Mon Sep 17 00:00:00 2001
|
||||
From: Myy <myy@miouyouyou.fr>
|
||||
Date: Tue, 10 Jan 2017 04:28:48 +0000
|
||||
Subject: [PATCH 4/5] Adapt get_user_pages calls to use the new calling
|
||||
procedure
|
||||
|
||||
These changes are due to this commit:
|
||||
mm: replace get_user_pages_remote() write/force parameters with gup_flags
|
||||
9beae1ea89305a9667ceaab6d0bf46a045ad71e7
|
||||
Kernel: 4.9.0-rc
|
||||
|
||||
Signed-off-by: Myy <myy@miouyouyou.fr>
|
||||
---
|
||||
drivers/base/ump/src/linux/ump_kernel_linux_mem.c | 8 ++++++++
|
||||
1 file changed, 8 insertions(+)
|
||||
|
||||
diff --git a/drivers/base/ump/src/linux/ump_kernel_linux_mem.c b/drivers/base/ump/src/linux/ump_kernel_linux_mem.c
|
||||
index 9186dd0..def4c0e 100644
|
||||
--- a/drivers/base/ump/src/linux/ump_kernel_linux_mem.c
|
||||
+++ b/drivers/base/ump/src/linux/ump_kernel_linux_mem.c
|
||||
@@ -35,6 +35,10 @@
|
||||
#include <ump_arch.h>
|
||||
#include <common/ump_kernel_priv.h>
|
||||
|
||||
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,5,0))
|
||||
+#include <linux/pfn_t.h>
|
||||
+#endif
|
||||
+
|
||||
static void umpp_vm_close(struct vm_area_struct *vma)
|
||||
{
|
||||
umpp_cpu_mapping * mapping;
|
||||
@@ -222,7 +226,11 @@ int umpp_linux_mmap(struct file * filp, struct vm_area_struct * vma)
|
||||
paddr = alloc->block_array[block_idx].addr;
|
||||
}
|
||||
|
||||
+#if (LINUX_VERSION_CODE <= KERNEL_VERSION(4,4,0))
|
||||
err = vm_insert_mixed(vma, vma->vm_start + (i << PAGE_SHIFT), paddr >> PAGE_SHIFT);
|
||||
+#else
|
||||
+ err = vm_insert_mixed(vma, vma->vm_start + (i << PAGE_SHIFT), __pfn_to_pfn_t(paddr >> PAGE_SHIFT, PFN_DEV));
|
||||
+#endif
|
||||
paddr += PAGE_SIZE;
|
||||
}
|
||||
|
||||
--
|
||||
2.10.2
|
||||
|
@@ -0,0 +1,40 @@
|
||||
From 7c27055687c595e9f9eca484314f4fe3866a4260 Mon Sep 17 00:00:00 2001
|
||||
From: Myy <myy@miouyouyou.fr>
|
||||
Date: Tue, 18 Jul 2017 17:35:16 +0000
|
||||
Subject: [PATCH 2/2] Don't be TOO severe when looking for the IRQ names
|
||||
|
||||
Using strncmp with an all caps result in the driver being unable to
|
||||
initialize itself when using the mainlined RK3288 DTS files, since they
|
||||
define the IRQ names as "job", "mmu" and "gpu" instead of "JOB", "MMU"
|
||||
and "GPU".
|
||||
|
||||
strncmp calls have been replaced by strncasecmp calls in order to
|
||||
avoid such issue.
|
||||
|
||||
Signed-off-by: Myy <myy@miouyouyou.fr>
|
||||
---
|
||||
drivers/gpu/arm/midgard/mali_kbase_core_linux.c | 6 +++---
|
||||
1 file changed, 3 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/drivers/gpu/arm/midgard/mali_kbase_core_linux.c b/drivers/gpu/arm/midgard/mali_kbase_core_linux.c
|
||||
index 0cccb0b..9cc65d2 100644
|
||||
--- a/drivers/gpu/arm/midgard/mali_kbase_core_linux.c
|
||||
+++ b/drivers/gpu/arm/midgard/mali_kbase_core_linux.c
|
||||
@@ -938,11 +938,11 @@ static int assign_irqs(struct platform_device *pdev)
|
||||
}
|
||||
|
||||
#ifdef CONFIG_OF
|
||||
- if (!strncmp(irq_res->name, "JOB", 4)) {
|
||||
+ if (!strncasecmp(irq_res->name, "JOB", 4)) {
|
||||
irqtag = JOB_IRQ_TAG;
|
||||
- } else if (!strncmp(irq_res->name, "MMU", 4)) {
|
||||
+ } else if (!strncasecmp(irq_res->name, "MMU", 4)) {
|
||||
irqtag = MMU_IRQ_TAG;
|
||||
- } else if (!strncmp(irq_res->name, "GPU", 4)) {
|
||||
+ } else if (!strncasecmp(irq_res->name, "GPU", 4)) {
|
||||
irqtag = GPU_IRQ_TAG;
|
||||
} else {
|
||||
dev_err(&pdev->dev, "Invalid irq res name: '%s'\n",
|
||||
--
|
||||
2.10.2
|
||||
|
@@ -0,0 +1,42 @@
|
||||
From ef7689887c31d2b1336e14f2c089185e8f60a9f1 Mon Sep 17 00:00:00 2001
|
||||
From: Myy <myy@miouyouyou.fr>
|
||||
Date: Mon, 7 Aug 2017 19:22:39 +0000
|
||||
Subject: [PATCH] Added the new "compatible" list, mainly used by Rockchip
|
||||
|
||||
Because, you know, all the Mali Midgard GPU used to define the GPU
|
||||
using the 'compatible = "arm,mali-midgard"' property, which worked fine.
|
||||
|
||||
But it was removed.
|
||||
|
||||
They replaced the "arm,mali-midgard" node by "arm,mali-tXXX" where XXX
|
||||
is the GPU series, and added "arm,rk3288-mali" which is used by nothing.
|
||||
|
||||
Which broke the Mali Midgard GPL kernel driver.
|
||||
|
||||
This patch fixes this issue.
|
||||
|
||||
Signed-off-by: Myy <myy@miouyouyou.fr>
|
||||
---
|
||||
drivers/gpu/arm/midgard/mali_kbase_core_linux.c | 6 ++++++
|
||||
1 file changed, 6 insertions(+)
|
||||
|
||||
diff --git a/drivers/gpu/arm/midgard/mali_kbase_core_linux.c b/drivers/gpu/arm/midgard/mali_kbase_core_linux.c
|
||||
index 27dcd9c1..cc4932a4 100644
|
||||
--- a/drivers/gpu/arm/midgard/mali_kbase_core_linux.c
|
||||
+++ b/drivers/gpu/arm/midgard/mali_kbase_core_linux.c
|
||||
@@ -4742,6 +4742,12 @@ static const struct dev_pm_ops kbase_pm_ops = {
|
||||
static const struct of_device_id kbase_dt_ids[] = {
|
||||
{ .compatible = "arm,malit6xx" },
|
||||
{ .compatible = "arm,mali-midgard" },
|
||||
+ { .compatible = "arm,mali-t720" },
|
||||
+ { .compatible = "arm,mali-t760" },
|
||||
+ { .compatible = "arm,mali-t820" },
|
||||
+ { .compatible = "arm,mali-t830" },
|
||||
+ { .compatible = "arm,mali-t860" },
|
||||
+ { .compatible = "arm,mali-t880" },
|
||||
{ /* sentinel */ }
|
||||
};
|
||||
MODULE_DEVICE_TABLE(of, kbase_dt_ids);
|
||||
--
|
||||
2.13.0
|
||||
|
@@ -0,0 +1,98 @@
|
||||
From ee7f0a678fff8316ec0be973f1b3780a63f50942 Mon Sep 17 00:00:00 2001
|
||||
From: Myy Miouyouyou <myy@miouyouyou.fr>
|
||||
Date: Mon, 11 Dec 2017 21:04:56 +0100
|
||||
Subject: [PATCH] gpu: arm: Midgard: setup_timer() -> timer_setup()
|
||||
|
||||
This patch is due the changes provoked by series of commit ending
|
||||
at 513ae785c63c30741e46f43960213d4ae5382ec0, and removing the
|
||||
setup_timer macros.
|
||||
The previous patches replaced made sure that timers were all set
|
||||
up with setup_timer and replaced setup_timer calls by timer_setup
|
||||
calls.
|
||||
|
||||
This changed was introduced in the 4.15-rc1.
|
||||
|
||||
Signed-off-by: Myy Miouyouyou <myy@miouyouyou.fr>
|
||||
---
|
||||
drivers/gpu/arm/midgard/mali_kbase.h | 2 +-
|
||||
drivers/gpu/arm/midgard/mali_kbase_context.c | 4 ++--
|
||||
drivers/gpu/arm/midgard/mali_kbase_softjobs.c | 4 ++--
|
||||
drivers/gpu/arm/midgard/mali_kbase_tlstream.c | 6 ++----
|
||||
4 files changed, 7 insertions(+), 9 deletions(-)
|
||||
|
||||
diff --git a/drivers/gpu/arm/midgard/mali_kbase.h b/drivers/gpu/arm/midgard/mali_kbase.h
|
||||
index a4ceab9e0..27bde3b71 100644
|
||||
--- a/drivers/gpu/arm/midgard/mali_kbase.h
|
||||
+++ b/drivers/gpu/arm/midgard/mali_kbase.h
|
||||
@@ -213,7 +213,7 @@ int kbase_soft_event_update(struct kbase_context *kctx,
|
||||
|
||||
bool kbase_replay_process(struct kbase_jd_atom *katom);
|
||||
|
||||
-void kbasep_soft_job_timeout_worker(unsigned long data);
|
||||
+void kbasep_soft_job_timeout_worker(struct timer_list *t);
|
||||
void kbasep_complete_triggered_soft_events(struct kbase_context *kctx, u64 evt);
|
||||
|
||||
/* api used internally for register access. Contains validation and tracing */
|
||||
diff --git a/drivers/gpu/arm/midgard/mali_kbase_context.c b/drivers/gpu/arm/midgard/mali_kbase_context.c
|
||||
index f43db48fd..589df768c 100644
|
||||
--- a/drivers/gpu/arm/midgard/mali_kbase_context.c
|
||||
+++ b/drivers/gpu/arm/midgard/mali_kbase_context.c
|
||||
@@ -165,9 +165,9 @@ kbase_create_context(struct kbase_device *kbdev, bool is_compat)
|
||||
|
||||
mutex_init(&kctx->vinstr_cli_lock);
|
||||
|
||||
- setup_timer(&kctx->soft_job_timeout,
|
||||
+ timer_setup(&kctx->soft_job_timeout,
|
||||
kbasep_soft_job_timeout_worker,
|
||||
- (uintptr_t)kctx);
|
||||
+ 0);
|
||||
|
||||
return kctx;
|
||||
|
||||
diff --git a/drivers/gpu/arm/midgard/mali_kbase_softjobs.c b/drivers/gpu/arm/midgard/mali_kbase_softjobs.c
|
||||
index 127ada07f..019edf562 100644
|
||||
--- a/drivers/gpu/arm/midgard/mali_kbase_softjobs.c
|
||||
+++ b/drivers/gpu/arm/midgard/mali_kbase_softjobs.c
|
||||
@@ -370,9 +370,9 @@ static void kbase_fence_debug_timeout(struct kbase_jd_atom *katom)
|
||||
}
|
||||
#endif /* CONFIG_MALI_FENCE_DEBUG */
|
||||
|
||||
-void kbasep_soft_job_timeout_worker(unsigned long data)
|
||||
+void kbasep_soft_job_timeout_worker(struct timer_list *t)
|
||||
{
|
||||
- struct kbase_context *kctx = (struct kbase_context *)data;
|
||||
+ struct kbase_context *kctx = from_timer(kctx, t, soft_job_timeout);
|
||||
u32 timeout_ms = (u32)atomic_read(
|
||||
&kctx->kbdev->js_data.soft_job_timeout_ms);
|
||||
struct timer_list *timer = &kctx->soft_job_timeout;
|
||||
diff --git a/drivers/gpu/arm/midgard/mali_kbase_tlstream.c b/drivers/gpu/arm/midgard/mali_kbase_tlstream.c
|
||||
index d01aa23b2..11d8b59c7 100644
|
||||
--- a/drivers/gpu/arm/midgard/mali_kbase_tlstream.c
|
||||
+++ b/drivers/gpu/arm/midgard/mali_kbase_tlstream.c
|
||||
@@ -1042,13 +1042,11 @@ static void kbasep_tlstream_flush_stream(enum tl_stream_type stype)
|
||||
* Timer is executed periodically to check if any of the stream contains
|
||||
* buffer ready to be submitted to user space.
|
||||
*/
|
||||
-static void kbasep_tlstream_autoflush_timer_callback(unsigned long data)
|
||||
+static void kbasep_tlstream_autoflush_timer_callback(struct timer_list *unused)
|
||||
{
|
||||
enum tl_stream_type stype;
|
||||
int rcode;
|
||||
|
||||
- CSTD_UNUSED(data);
|
||||
-
|
||||
for (stype = 0; stype < TL_STREAM_TYPE_COUNT; stype++) {
|
||||
struct tl_stream *stream = tl_stream[stype];
|
||||
unsigned long flags;
|
||||
@@ -1371,7 +1369,7 @@ int kbase_tlstream_init(void)
|
||||
|
||||
/* Initialize autoflush timer. */
|
||||
atomic_set(&autoflush_timer_active, 0);
|
||||
- setup_timer(&autoflush_timer,
|
||||
+ timer_setup(&autoflush_timer,
|
||||
kbasep_tlstream_autoflush_timer_callback,
|
||||
0);
|
||||
|
||||
--
|
||||
2.14.1
|
||||
|
@@ -0,0 +1,35 @@
|
||||
From 44a5ba2e969adfb64c84f294c16490194988dcc7 Mon Sep 17 00:00:00 2001
|
||||
From: Myy Miouyouyou <myy@miouyouyou.fr>
|
||||
Date: Sun, 24 Dec 2017 19:30:12 +0100
|
||||
Subject: [PATCH] drivers: gpu: Arm: Midgard: Replace ACCESS_ONCE by READ_ONCE
|
||||
|
||||
The ACCESS_ONCE macro has now been removed in the 4.15.0-rc4,
|
||||
and every ACCESS_ONCE call has been replaced by either READ_ONCE or
|
||||
WRITE_ONCE calls.
|
||||
Since the Midgard GPU drivers are not mainlined, the change
|
||||
needs to be applied manually.
|
||||
|
||||
See commit b899a850431e2dd0943205a63a68573f3e312d0d and its parents,
|
||||
for more informations.
|
||||
|
||||
Signed-off-by: Myy Miouyouyou <myy@miouyouyou.fr>
|
||||
---
|
||||
drivers/gpu/arm/midgard/mali_kbase_mem.h | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/drivers/gpu/arm/midgard/mali_kbase_mem.h b/drivers/gpu/arm/midgard/mali_kbase_mem.h
|
||||
index e9a8d5dd6..eac685699 100644
|
||||
--- a/drivers/gpu/arm/midgard/mali_kbase_mem.h
|
||||
+++ b/drivers/gpu/arm/midgard/mali_kbase_mem.h
|
||||
@@ -591,7 +591,7 @@ void kbase_mem_pool_free_pages(struct kbase_mem_pool *pool, size_t nr_pages,
|
||||
*/
|
||||
static inline size_t kbase_mem_pool_size(struct kbase_mem_pool *pool)
|
||||
{
|
||||
- return ACCESS_ONCE(pool->cur_size);
|
||||
+ return READ_ONCE(pool->cur_size);
|
||||
}
|
||||
|
||||
/**
|
||||
--
|
||||
2.14.1
|
||||
|
@@ -0,0 +1,32 @@
|
||||
From 47e8aad9419ff8843a373c3e5aa2c9d261d8cd07 Mon Sep 17 00:00:00 2001
|
||||
From: Myy Miouyouyou <myy@miouyouyou.fr>
|
||||
Date: Mon, 23 Apr 2018 20:54:13 +0200
|
||||
Subject: [PATCH] gpu: arm: midgard: Remove sys_close references
|
||||
|
||||
sys_close is now replaced by ksys_close in an effort to remove
|
||||
in-kernel system calls references.
|
||||
|
||||
See 2ca2a09d6215fd9621aa3e2db7cc9428a61f2911 and
|
||||
https://lkml.org/lkml/2018/3/25/93 for more details.
|
||||
|
||||
Signed-off-by: Myy Miouyouyou <myy@miouyouyou.fr>
|
||||
---
|
||||
drivers/gpu/arm/midgard/mali_kbase_sync.h | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/drivers/gpu/arm/midgard/mali_kbase_sync.h b/drivers/gpu/arm/midgard/mali_kbase_sync.h
|
||||
index de72147d..33b58059 100644
|
||||
--- a/drivers/gpu/arm/midgard/mali_kbase_sync.h
|
||||
+++ b/drivers/gpu/arm/midgard/mali_kbase_sync.h
|
||||
@@ -156,7 +156,7 @@ void kbase_sync_fence_out_remove(struct kbase_jd_atom *katom);
|
||||
*/
|
||||
static inline void kbase_sync_fence_close_fd(int fd)
|
||||
{
|
||||
- sys_close(fd);
|
||||
+ ksys_close(fd);
|
||||
}
|
||||
|
||||
/**
|
||||
--
|
||||
2.14.1
|
||||
|
@@ -0,0 +1,34 @@
|
||||
From 9812105eb6220863af05fc72591118f0a48e1c4e Mon Sep 17 00:00:00 2001
|
||||
From: Myy Miouyouyou <myy@miouyouyou.fr>
|
||||
Date: Mon, 21 May 2018 22:32:59 +0200
|
||||
Subject: [PATCH] GPU: ARM: Midgard: Adapt to the new mmap call checks.
|
||||
|
||||
Now, I don't know if this driver is just one of these "buggy" drivers
|
||||
Linus is talking about, or if this is just standard GPU procedure.
|
||||
|
||||
Anyway, this patch is due to this change by Linus Torvalds :
|
||||
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=be83bbf806822b1b89e0a0f23cd87cddc409e429
|
||||
|
||||
And the fix is inspired by :
|
||||
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=76ef6b28ea4f81c3d511866a9b31392caa833126
|
||||
|
||||
Signed-off-by: Myy Miouyouyou <myy@miouyouyou.fr>
|
||||
---
|
||||
drivers/gpu/arm/midgard/mali_kbase_core_linux.c | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/drivers/gpu/arm/midgard/mali_kbase_core_linux.c b/drivers/gpu/arm/midgard/mali_kbase_core_linux.c
|
||||
index cc4932a4ead7..89b4cca27cf1 100644
|
||||
--- a/drivers/gpu/arm/midgard/mali_kbase_core_linux.c
|
||||
+++ b/drivers/gpu/arm/midgard/mali_kbase_core_linux.c
|
||||
@@ -1087,6 +1087,7 @@ static int kbase_open(struct inode *inode, struct file *filp)
|
||||
|
||||
init_waitqueue_head(&kctx->event_queue);
|
||||
filp->private_data = kctx;
|
||||
+ filp->f_mode |= FMODE_UNSIGNED_OFFSET;
|
||||
kctx->filp = filp;
|
||||
|
||||
if (kbdev->infinite_cache_active_default)
|
||||
--
|
||||
2.17.0
|
||||
|
@@ -0,0 +1,76 @@
|
||||
From 9bf91a052d8ceddfd5808547a51e167fb7463754 Mon Sep 17 00:00:00 2001
|
||||
From: "Miouyouyou (Myy)" <myy@miouyouyou.fr>
|
||||
Date: Wed, 18 Jul 2018 19:59:21 +0200
|
||||
Subject: [PATCH] GPU: Mali: Midgard: remove rcu_read_lock references
|
||||
|
||||
This patch is actually based on @mihailescu2m patch.
|
||||
This removes references to rcu_read_lock when acquiring the OPP table,
|
||||
as it is useless since.
|
||||
See :
|
||||
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/drivers/base/power/opp/core.c?id=5b650b388844f26c61c70564865598836d05dcb3
|
||||
|
||||
The current rcu_read_lock actually generates some issues with recent
|
||||
kernels.
|
||||
See here :
|
||||
https://community.arm.com/graphics/f/discussions/9207/midgard-r20p0-kernel-drivers-errors
|
||||
|
||||
The patch has been recreated since it does not apply directly on r19p0
|
||||
sources (I guess the affected line numbers slightly differ...).
|
||||
|
||||
@mihailescu2m patch for the Mali Midgard r20p0 kernel driver can be
|
||||
acquired here :
|
||||
https://github.com/mihailescu2m/linux/commit/bbe73c3c1143e5991bdcaee3afaecf5c31af0647
|
||||
|
||||
Signed-off-by: Miouyouyou (Myy) <myy@miouyouyou.fr>
|
||||
---
|
||||
drivers/gpu/arm/midgard/backend/gpu/mali_kbase_devfreq.c | 7 +------
|
||||
1 file changed, 1 insertion(+), 6 deletions(-)
|
||||
|
||||
diff --git a/drivers/gpu/arm/midgard/backend/gpu/mali_kbase_devfreq.c b/drivers/gpu/arm/midgard/backend/gpu/mali_kbase_devfreq.c
|
||||
index e280322e..bf69d897 100644
|
||||
--- a/drivers/gpu/arm/midgard/backend/gpu/mali_kbase_devfreq.c
|
||||
+++ b/drivers/gpu/arm/midgard/backend/gpu/mali_kbase_devfreq.c
|
||||
@@ -87,10 +87,9 @@ kbase_devfreq_target(struct device *dev, unsigned long *target_freq, u32 flags)
|
||||
|
||||
freq = *target_freq;
|
||||
|
||||
- rcu_read_lock();
|
||||
opp = devfreq_recommended_opp(dev, &freq, flags);
|
||||
voltage = dev_pm_opp_get_voltage(opp);
|
||||
- rcu_read_unlock();
|
||||
+
|
||||
if (IS_ERR_OR_NULL(opp)) {
|
||||
dev_err(dev, "Failed to get opp (%ld)\n", PTR_ERR(opp));
|
||||
return PTR_ERR(opp);
|
||||
@@ -186,20 +185,17 @@ static int kbase_devfreq_init_freq_table(struct kbase_device *kbdev,
|
||||
unsigned long freq;
|
||||
struct dev_pm_opp *opp;
|
||||
|
||||
- rcu_read_lock();
|
||||
count = dev_pm_opp_get_opp_count(kbdev->dev);
|
||||
if (count < 0) {
|
||||
rcu_read_unlock();
|
||||
return count;
|
||||
}
|
||||
- rcu_read_unlock();
|
||||
|
||||
dp->freq_table = kmalloc_array(count, sizeof(dp->freq_table[0]),
|
||||
GFP_KERNEL);
|
||||
if (!dp->freq_table)
|
||||
return -ENOMEM;
|
||||
|
||||
- rcu_read_lock();
|
||||
for (i = 0, freq = ULONG_MAX; i < count; i++, freq--) {
|
||||
opp = dev_pm_opp_find_freq_floor(kbdev->dev, &freq);
|
||||
if (IS_ERR(opp))
|
||||
@@ -207,7 +203,6 @@ static int kbase_devfreq_init_freq_table(struct kbase_device *kbdev,
|
||||
|
||||
dp->freq_table[i] = freq;
|
||||
}
|
||||
- rcu_read_unlock();
|
||||
|
||||
if (count != i)
|
||||
dev_warn(kbdev->dev, "Unable to enumerate all OPPs (%d!=%d\n",
|
||||
--
|
||||
2.16.4
|
||||
|
@@ -0,0 +1,74 @@
|
||||
Patches act8846 regulator providing the proper reset handle and exploit
|
||||
the SIPC bit in GLB_POWER_OFF register. Mainly used to reset some rockchip
|
||||
boards.
|
||||
|
||||
Origin: <https://patchwork.kernel.org/patch/6409521/>
|
||||
|
||||
diff --git a/drivers/regulator/act8865-regulator.c b/drivers/regulator/act8865-regulator.c
|
||||
index 2ff73d7..836d10b 100644
|
||||
--- a/drivers/regulator/act8865-regulator.c
|
||||
+++ b/drivers/regulator/act8865-regulator.c
|
||||
@@ -27,6 +27,7 @@
|
||||
#include <linux/of_device.h>
|
||||
#include <linux/regulator/of_regulator.h>
|
||||
#include <linux/regmap.h>
|
||||
+#include <linux/reboot.h>
|
||||
|
||||
/*
|
||||
* ACT8600 Global Register Map.
|
||||
@@ -133,6 +134,8 @@
|
||||
#define ACT8865_VOLTAGE_NUM 64
|
||||
#define ACT8600_SUDCDC_VOLTAGE_NUM 255
|
||||
|
||||
+#define ACT8846_SIPC_MASK 0x01
|
||||
+
|
||||
struct act8865 {
|
||||
struct regmap *regmap;
|
||||
int off_reg;
|
||||
@@ -402,6 +405,22 @@ static void act8865_power_off(void)
|
||||
while (1);
|
||||
}
|
||||
|
||||
+static int act8846_power_cycle(struct notifier_block *this,
|
||||
+ unsigned long code, void *unused)
|
||||
+{
|
||||
+ struct act8865 *act8846;
|
||||
+
|
||||
+ act8846 = i2c_get_clientdata(act8865_i2c_client);
|
||||
+ regmap_write(act8846->regmap, ACT8846_GLB_OFF_CTRL, ACT8846_SIPC_MASK);
|
||||
+
|
||||
+ return NOTIFY_DONE;
|
||||
+}
|
||||
+
|
||||
+static struct notifier_block act8846_restart_handler = {
|
||||
+ .notifier_call = act8846_power_cycle,
|
||||
+ .priority = 129,
|
||||
+};
|
||||
+
|
||||
static int act8865_pmic_probe(struct i2c_client *client,
|
||||
const struct i2c_device_id *i2c_id)
|
||||
{
|
||||
@@ -484,6 +503,8 @@ static int act8865_pmic_probe(struct i2c_client *client,
|
||||
}
|
||||
|
||||
if (of_device_is_system_power_controller(dev->of_node)) {
|
||||
+ int ret;
|
||||
+
|
||||
if (!pm_power_off && (off_reg > 0)) {
|
||||
act8865_i2c_client = client;
|
||||
act8865->off_reg = off_reg;
|
||||
@@ -492,6 +513,14 @@ static int act8865_pmic_probe(struct i2c_client *client,
|
||||
} else {
|
||||
dev_err(dev, "Failed to set poweroff capability, already defined\n");
|
||||
}
|
||||
+
|
||||
+ if (type == ACT8846) {
|
||||
+ act8865_i2c_client = client;
|
||||
+ ret = register_restart_handler(&act8846_restart_handler);
|
||||
+ if (ret)
|
||||
+ pr_err("%s: cannot register restart handler, %d\n",
|
||||
+ __func__, ret);
|
||||
+ }
|
||||
}
|
||||
|
||||
/* Finally register devices */
|
@@ -0,0 +1,39 @@
|
||||
From fe85565d9ed8212cbda2148d4731418a36a8d088 Mon Sep 17 00:00:00 2001
|
||||
From: Myy Miouyouyou <myy@miouyouyou.fr>
|
||||
Date: Mon, 11 Dec 2017 21:53:28 +0100
|
||||
Subject: [PATCH 1/3] drivers: Integrating Mali Midgard video and gpu drivers.
|
||||
|
||||
I'm dropping the UMP drivers. They are not maintained.
|
||||
|
||||
Signed-off-by: Myy Miouyouyou <myy@miouyouyou.fr>
|
||||
---
|
||||
drivers/gpu/Makefile | 2 +-
|
||||
drivers/video/Kconfig | 1 +
|
||||
2 files changed, 2 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/drivers/gpu/Makefile b/drivers/gpu/Makefile
|
||||
index e9ed439a5..66386b42a 100644
|
||||
--- a/drivers/gpu/Makefile
|
||||
+++ b/drivers/gpu/Makefile
|
||||
@@ -2,5 +2,5 @@
|
||||
# taken to initialize them in the correct order. Link order is the only way
|
||||
# to ensure this currently.
|
||||
obj-$(CONFIG_TEGRA_HOST1X) += host1x/
|
||||
-obj-y += drm/ vga/
|
||||
+obj-y += drm/ vga/ arm/
|
||||
obj-$(CONFIG_IMX_IPUV3_CORE) += ipu-v3/
|
||||
diff --git a/drivers/video/Kconfig b/drivers/video/Kconfig
|
||||
index 3c20af999..041e15f2c 100644
|
||||
--- a/drivers/video/Kconfig
|
||||
+++ b/drivers/video/Kconfig
|
||||
@@ -17,6 +17,7 @@ source "drivers/gpu/vga/Kconfig"
|
||||
|
||||
source "drivers/gpu/host1x/Kconfig"
|
||||
source "drivers/gpu/ipu-v3/Kconfig"
|
||||
+source "drivers/gpu/arm/midgard/Kconfig"
|
||||
|
||||
source "drivers/gpu/drm/Kconfig"
|
||||
|
||||
--
|
||||
2.14.1
|
||||
|
@@ -0,0 +1,50 @@
|
||||
From e0c5a419cf5464cd02996431afa98e3b22dc6801 Mon Sep 17 00:00:00 2001
|
||||
From: Myy <myy@miouyouyou.fr>
|
||||
Date: Mon, 17 Jul 2017 23:14:48 +0000
|
||||
Subject: [PATCH] clk: rockchip: add all known operating points to the allowed
|
||||
CPU freqs
|
||||
|
||||
Patch from Willy Tarreau
|
||||
|
||||
Original commit message :
|
||||
At least 1920 MHz runs stable on the MiQi even on openssl speed -multi 4,
|
||||
which is by far the most intensive workload, and 1992/2016 work fine on
|
||||
the CS-008 until it starts to heat too much. So add all of them so that
|
||||
the device tree can simply manipulate them.
|
||||
|
||||
Signed-off-by: Myy <myy@miouyouyou.fr>
|
||||
---
|
||||
drivers/clk/rockchip/clk-rk3288.c | 17 +++++++++++++++++
|
||||
1 file changed, 17 insertions(+)
|
||||
|
||||
diff --git a/drivers/clk/rockchip/clk-rk3288.c b/drivers/clk/rockchip/clk-rk3288.c
|
||||
index 753c649..fd2058f 100644
|
||||
--- a/drivers/clk/rockchip/clk-rk3288.c
|
||||
+++ b/drivers/clk/rockchip/clk-rk3288.c
|
||||
@@ -145,6 +145,23 @@ static struct rockchip_pll_rate_table rk3288_pll_rates[] = {
|
||||
}
|
||||
|
||||
static struct rockchip_cpuclk_rate_table rk3288_cpuclk_rates[] __initdata = {
|
||||
+ RK3288_CPUCLK_RATE(2208000000U, 1, 3, 1, 3, 3),
|
||||
+ RK3288_CPUCLK_RATE(2184000000U, 1, 3, 1, 3, 3),
|
||||
+ RK3288_CPUCLK_RATE(2160000000U, 1, 3, 1, 3, 3),
|
||||
+ RK3288_CPUCLK_RATE(2136000000, 1, 3, 1, 3, 3),
|
||||
+ RK3288_CPUCLK_RATE(2112000000, 1, 3, 1, 3, 3),
|
||||
+ RK3288_CPUCLK_RATE(2088000000, 1, 3, 1, 3, 3),
|
||||
+ RK3288_CPUCLK_RATE(2064000000, 1, 3, 1, 3, 3),
|
||||
+ RK3288_CPUCLK_RATE(2040000000, 1, 3, 1, 3, 3),
|
||||
+ RK3288_CPUCLK_RATE(2016000000, 1, 3, 1, 3, 3),
|
||||
+ RK3288_CPUCLK_RATE(1992000000, 1, 3, 1, 3, 3),
|
||||
+ RK3288_CPUCLK_RATE(1968000000, 1, 3, 1, 3, 3),
|
||||
+ RK3288_CPUCLK_RATE(1944000000, 1, 3, 1, 3, 3),
|
||||
+ RK3288_CPUCLK_RATE(1920000000, 1, 3, 1, 3, 3),
|
||||
+ RK3288_CPUCLK_RATE(1896000000, 1, 3, 1, 3, 3),
|
||||
+ RK3288_CPUCLK_RATE(1872000000, 1, 3, 1, 3, 3),
|
||||
+ RK3288_CPUCLK_RATE(1848000000, 1, 3, 1, 3, 3),
|
||||
+ RK3288_CPUCLK_RATE(1824000000, 1, 3, 1, 3, 3),
|
||||
RK3288_CPUCLK_RATE(1800000000, 1, 3, 1, 3, 3),
|
||||
RK3288_CPUCLK_RATE(1704000000, 1, 3, 1, 3, 3),
|
||||
RK3288_CPUCLK_RATE(1608000000, 1, 3, 1, 3, 3),
|
||||
--
|
||||
2.10.2
|
||||
|
@@ -0,0 +1,30 @@
|
||||
From 239a5e3016b7f676bc3f56ea509ed172bf954001 Mon Sep 17 00:00:00 2001
|
||||
From: Myy <myy@miouyouyou.fr>
|
||||
Date: Sat, 22 Jul 2017 04:07:36 +0000
|
||||
Subject: [PATCH] Remove the dependency to the clk_mali symbol.
|
||||
|
||||
Inspired by @wzzy2 patch
|
||||
|
||||
https://github.com/rockchip-linux/rockchip_forwardports/commit/359865c617129fe5fcc5530f4a88abcfaa6a5cb4
|
||||
|
||||
Signed-off-by: Myy <myy@miouyouyou.fr>
|
||||
---
|
||||
drivers/gpu/arm/midgard/mali_kbase_core_linux.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/drivers/gpu/arm/midgard/mali_kbase_core_linux.c b/drivers/gpu/arm/midgard/mali_kbase_core_linux.c
|
||||
index 9cc65d2..27dcd9c 100644
|
||||
--- a/drivers/gpu/arm/midgard/mali_kbase_core_linux.c
|
||||
+++ b/drivers/gpu/arm/midgard/mali_kbase_core_linux.c
|
||||
@@ -3793,7 +3793,7 @@ static int power_control_init(struct platform_device *pdev)
|
||||
}
|
||||
#endif /* LINUX_VERSION_CODE >= 3, 12, 0 */
|
||||
|
||||
- kbdev->clock = clk_get(kbdev->dev, "clk_mali");
|
||||
+ kbdev->clock = of_clk_get(kbdev->dev->of_node, 0);
|
||||
if (IS_ERR_OR_NULL(kbdev->clock)) {
|
||||
err = PTR_ERR(kbdev->clock);
|
||||
kbdev->clock = NULL;
|
||||
--
|
||||
2.10.2
|
||||
|
@@ -0,0 +1,157 @@
|
||||
From bf9b932f6ae506baf5b79c8407089448ed77fc56 Mon Sep 17 00:00:00 2001
|
||||
From: Myy Miouyouyou <myy@miouyouyou.fr>
|
||||
Date: Sun, 17 Dec 2017 16:15:03 +0100
|
||||
Subject: [PATCH] ASUS Tinkerboard: Stupid reboot patch
|
||||
|
||||
This patch is ugly as shit and will be reworked when possible.
|
||||
|
||||
Meanwhile, this fixes an issue with the ASUS Tinkerboard which
|
||||
cannot reboot correctly. The issue is that the MMC hardware is
|
||||
shutdown during the reboot phase and is not powered again after
|
||||
the power cycle, leading to a dead board awaiting a hard power
|
||||
cycle.
|
||||
|
||||
Signed-off-by: Myy Miouyouyou <myy@miouyouyou.fr>
|
||||
---
|
||||
drivers/mmc/host/dw_mmc-rockchip.c | 24 ++++++++++++++++++++++++
|
||||
drivers/mmc/host/dw_mmc.c | 28 ++++++++++++++++++++++++++++
|
||||
include/linux/reboot.h | 2 ++
|
||||
kernel/reboot.c | 1 +
|
||||
4 files changed, 55 insertions(+)
|
||||
|
||||
diff --git a/drivers/mmc/host/dw_mmc-rockchip.c b/drivers/mmc/host/dw_mmc-rockchip.c
|
||||
index a3f1c2b30..52c13733f 100644
|
||||
--- a/drivers/mmc/host/dw_mmc-rockchip.c
|
||||
+++ b/drivers/mmc/host/dw_mmc-rockchip.c
|
||||
@@ -14,10 +14,12 @@
|
||||
#include <linux/of_address.h>
|
||||
#include <linux/mmc/slot-gpio.h>
|
||||
#include <linux/pm_runtime.h>
|
||||
+#include <linux/regulator/consumer.h> // Stupid Tinkerboard Hack
|
||||
#include <linux/slab.h>
|
||||
|
||||
#include "dw_mmc.h"
|
||||
#include "dw_mmc-pltfm.h"
|
||||
+#include "../core/core.h" // Stupid Tinkerboard Hack
|
||||
|
||||
#define RK3288_CLKGEN_DIV 2
|
||||
|
||||
@@ -365,6 +367,27 @@ static int dw_mci_rockchip_probe(struct platform_device *pdev)
|
||||
return 0;
|
||||
}
|
||||
|
||||
+/* Stupid Tinkerboard Hack */
|
||||
+static void dw_mci_rockchip_platfm_shutdown(struct platform_device *pdev)
|
||||
+{
|
||||
+ struct dw_mci *host = platform_get_drvdata(pdev);
|
||||
+ struct mmc_host *mmc = host->slot->mmc;
|
||||
+ int ret;
|
||||
+
|
||||
+ if(of_machine_is_compatible("asus,rk3288-tinker")){
|
||||
+
|
||||
+ mmc_power_off(mmc);
|
||||
+
|
||||
+ mdelay(20);
|
||||
+
|
||||
+ if (!IS_ERR(mmc->supply.vmmc))
|
||||
+ ret = regulator_enable(mmc->supply.vmmc);
|
||||
+
|
||||
+ if (!IS_ERR(mmc->supply.vqmmc))
|
||||
+ regulator_set_voltage(mmc->supply.vqmmc, 3000000, 3300000);
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
static int dw_mci_rockchip_remove(struct platform_device *pdev)
|
||||
{
|
||||
pm_runtime_get_sync(&pdev->dev);
|
||||
@@ -385,6 +408,7 @@ static const struct dev_pm_ops dw_mci_rockchip_dev_pm_ops = {
|
||||
static struct platform_driver dw_mci_rockchip_pltfm_driver = {
|
||||
.probe = dw_mci_rockchip_probe,
|
||||
.remove = dw_mci_rockchip_remove,
|
||||
+ .shutdown = dw_mci_rockchip_platfm_shutdown, // Stupid Tinkerboard Hack
|
||||
.driver = {
|
||||
.name = "dwmmc_rockchip",
|
||||
.of_match_table = dw_mci_rockchip_match,
|
||||
diff --git a/drivers/mmc/host/dw_mmc.c b/drivers/mmc/host/dw_mmc.c
|
||||
index 0aa39975f..70f7ce21b 100644
|
||||
--- a/drivers/mmc/host/dw_mmc.c
|
||||
+++ b/drivers/mmc/host/dw_mmc.c
|
||||
@@ -39,8 +39,10 @@
|
||||
#include <linux/of.h>
|
||||
#include <linux/of_gpio.h>
|
||||
#include <linux/mmc/slot-gpio.h>
|
||||
+#include <linux/reboot.h> // Stupid Tinkerboard Hack
|
||||
|
||||
#include "dw_mmc.h"
|
||||
+#include "../core/core.h" // Stupid Tinkerboard Hack
|
||||
|
||||
/* Common flag combinations */
|
||||
#define DW_MCI_DATA_ERROR_FLAGS (SDMMC_INT_DRTO | SDMMC_INT_DCRC | \
|
||||
@@ -2778,6 +2780,29 @@ static irqreturn_t dw_mci_interrupt(int irq, void *dev_id)
|
||||
return IRQ_HANDLED;
|
||||
}
|
||||
|
||||
+/* Stupid Tinkerboard Hack */
|
||||
+struct dw_mci *mSdhost;
|
||||
+void setmmcEmergency() {
|
||||
+ struct mmc_host *mmc;
|
||||
+ int ret;
|
||||
+
|
||||
+ printk(KERN_ERR "Emergency route taken.\n");
|
||||
+ if (of_machine_is_compatible("asus,rk3288-tinker")) {
|
||||
+ mmc = mSdhost->slot->mmc;
|
||||
+
|
||||
+ mmc_power_off(mmc);
|
||||
+
|
||||
+ mdelay(20);
|
||||
+
|
||||
+ if (!IS_ERR(mmc->supply.vmmc))
|
||||
+ ret = regulator_enable(mmc->supply.vmmc);
|
||||
+
|
||||
+ if (!IS_ERR(mmc->supply.vqmmc))
|
||||
+ regulator_set_voltage(mmc->supply.vqmmc, 3000000, 3300000);
|
||||
+ }
|
||||
+}
|
||||
+EXPORT_SYMBOL(setmmcEmergency);
|
||||
+
|
||||
static int dw_mci_init_slot(struct dw_mci *host)
|
||||
{
|
||||
struct mmc_host *mmc;
|
||||
@@ -2809,6 +2834,9 @@ static int dw_mci_init_slot(struct dw_mci *host)
|
||||
mmc->f_max = freq[1];
|
||||
}
|
||||
|
||||
+ /* Stupid Tinkerboard Hack */
|
||||
+ if (of_find_property(host->dev->of_node, "supports-sd", NULL))
|
||||
+ mSdhost = host;
|
||||
/*if there are external regulators, get them*/
|
||||
ret = mmc_regulator_get_supply(mmc);
|
||||
if (ret)
|
||||
diff --git a/include/linux/reboot.h b/include/linux/reboot.h
|
||||
index e63799a6e..057d3ce0c 100644
|
||||
--- a/include/linux/reboot.h
|
||||
+++ b/include/linux/reboot.h
|
||||
@@ -77,6 +77,8 @@ extern char poweroff_cmd[POWEROFF_CMD_PATH_LEN];
|
||||
|
||||
extern void orderly_poweroff(bool force);
|
||||
extern void orderly_reboot(void);
|
||||
+/* Stupid Tinkerboard Hack */
|
||||
+extern void setmmcEmergency(void);
|
||||
|
||||
/*
|
||||
* Emergency restart, callable from an interrupt handler.
|
||||
diff --git a/kernel/reboot.c b/kernel/reboot.c
|
||||
index e4ced883d..c8e678ce6 100644
|
||||
--- a/kernel/reboot.c
|
||||
+++ b/kernel/reboot.c
|
||||
@@ -61,6 +61,7 @@ void (*pm_power_off_prepare)(void);
|
||||
void emergency_restart(void)
|
||||
{
|
||||
kmsg_dump(KMSG_DUMP_EMERG);
|
||||
+ setmmcEmergency(); // Stupid Tinkerboard Hack
|
||||
machine_emergency_restart();
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(emergency_restart);
|
||||
--
|
||||
2.14.1
|
||||
|
@@ -0,0 +1,116 @@
|
||||
From 302cd9b8a9f1f8a7735fabea3b9a7645dc40f9cc Mon Sep 17 00:00:00 2001
|
||||
From: Myy Miouyouyou <myy@miouyouyou.fr>
|
||||
Date: Sun, 7 Jan 2018 01:52:44 +0100
|
||||
Subject: [PATCH] drivers: mmc: dw-mci-rockchip: Handle ASUS Tinkerboard reboot
|
||||
|
||||
On ASUS Tinkerboard systems, if the SDMMC hardware is shutdown before
|
||||
rebooting, the system will be dead, as the SDMMC is the only way to
|
||||
boot anything, and the hardware doesn't power up the SDMMC hardware
|
||||
automatically when rebooting.
|
||||
|
||||
So, when using an ASUS Tinkerboard system, a new reboot handler is
|
||||
installed. This reboot handler takes care of powering the SDMMC
|
||||
hardware again before restarting the system, resolving the issue.
|
||||
|
||||
The code was inspired by the pwrseq_emmc.c, which seems to overcome
|
||||
similar effects with eMMC hardware.
|
||||
|
||||
Signed-off-by: Myy Miouyouyou <myy@miouyouyou.fr>
|
||||
---
|
||||
drivers/mmc/host/dw_mmc-rockchip.c | 66 ++++++++++++++++++++++++++++++++++++++
|
||||
1 file changed, 66 insertions(+)
|
||||
|
||||
diff --git a/drivers/mmc/host/dw_mmc-rockchip.c b/drivers/mmc/host/dw_mmc-rockchip.c
|
||||
index a3f1c2b30..7eac1f221 100644
|
||||
--- a/drivers/mmc/host/dw_mmc-rockchip.c
|
||||
+++ b/drivers/mmc/host/dw_mmc-rockchip.c
|
||||
@@ -16,6 +16,11 @@
|
||||
#include <linux/pm_runtime.h>
|
||||
#include <linux/slab.h>
|
||||
|
||||
+#include <linux/regulator/consumer.h>
|
||||
+#include <linux/reboot.h>
|
||||
+#include <linux/delay.h>
|
||||
+#include "../core/core.h"
|
||||
+
|
||||
#include "dw_mmc.h"
|
||||
#include "dw_mmc-pltfm.h"
|
||||
|
||||
@@ -334,6 +339,66 @@ static const struct of_device_id dw_mci_rockchip_match[] = {
|
||||
};
|
||||
MODULE_DEVICE_TABLE(of, dw_mci_rockchip_match);
|
||||
|
||||
+struct dw_mci_rockchip_broken_boards_data {
|
||||
+ struct notifier_block reset_nb;
|
||||
+ struct platform_device *pdev;
|
||||
+};
|
||||
+
|
||||
+/* This reboot handler handles cases where disabling the SDMMC on
|
||||
+ * reboot will cause the hardware to be unable to start correctly
|
||||
+ * after rebooting.
|
||||
+ *
|
||||
+ * This happens with Tinkerboard systems...
|
||||
+ */
|
||||
+static int dw_mci_rockchip_broken_boards_reset_nb(
|
||||
+ struct notifier_block *this,
|
||||
+ unsigned long mode, void *cmd)
|
||||
+{
|
||||
+ struct dw_mci_rockchip_broken_boards_data const *data =
|
||||
+ container_of(this,
|
||||
+ struct dw_mci_rockchip_broken_boards_data,
|
||||
+ reset_nb);
|
||||
+ struct dw_mci *host = platform_get_drvdata(data->pdev);
|
||||
+ struct mmc_host *mmc = host->slot->mmc;
|
||||
+
|
||||
+ printk(KERN_ERR "Meow.\n");
|
||||
+
|
||||
+ mmc_power_off(mmc);
|
||||
+
|
||||
+ mdelay(20);
|
||||
+
|
||||
+ if (!IS_ERR(mmc->supply.vmmc))
|
||||
+ regulator_enable(mmc->supply.vmmc);
|
||||
+
|
||||
+ if (!IS_ERR(mmc->supply.vqmmc))
|
||||
+ regulator_set_voltage(mmc->supply.vqmmc, 3000000, 3300000);
|
||||
+
|
||||
+ printk(KERN_ERR "woeM.\n");
|
||||
+
|
||||
+ return NOTIFY_DONE;
|
||||
+}
|
||||
+
|
||||
+static void dw_mci_rockchip_register_broken_boards_reboot_handler(
|
||||
+ struct platform_device *pdev)
|
||||
+{
|
||||
+ struct dw_mci_rockchip_broken_boards_data *data;
|
||||
+
|
||||
+ if (!of_machine_is_compatible("asus,rk3288-tinker"))
|
||||
+ return;
|
||||
+
|
||||
+ data = devm_kzalloc(&pdev->dev, sizeof(*data), GFP_KERNEL);
|
||||
+
|
||||
+ if (!data)
|
||||
+ return;
|
||||
+
|
||||
+ data->reset_nb.notifier_call =
|
||||
+ dw_mci_rockchip_broken_boards_reset_nb;
|
||||
+ data->reset_nb.priority = 255;
|
||||
+ register_restart_handler(&data->reset_nb);
|
||||
+
|
||||
+ data->pdev = pdev;
|
||||
+}
|
||||
+
|
||||
static int dw_mci_rockchip_probe(struct platform_device *pdev)
|
||||
{
|
||||
const struct dw_mci_drv_data *drv_data;
|
||||
@@ -361,6 +426,7 @@ static int dw_mci_rockchip_probe(struct platform_device *pdev)
|
||||
}
|
||||
|
||||
pm_runtime_put_autosuspend(&pdev->dev);
|
||||
+ dw_mci_rockchip_register_broken_boards_reboot_handler(pdev);
|
||||
|
||||
return 0;
|
||||
}
|
||||
--
|
||||
2.14.1
|
||||
|
@@ -0,0 +1,82 @@
|
||||
From 4ffe79de7272234408a9179aa4c403ee1b67a362 Mon Sep 17 00:00:00 2001
|
||||
From: Myy Miouyouyou <myy@miouyouyou.fr>
|
||||
Date: Thu, 7 Dec 2017 21:27:52 +0100
|
||||
Subject: [PATCH] soc: rockchip: power-domain: export idle request
|
||||
|
||||
We need to put the power status of HEVC/RKVDEC IP into IDLE
|
||||
unless we can't reset that IP or the SoC would crash down.
|
||||
rockchip_pmu_idle_request(dev, true)---> enter idle
|
||||
rockchip_pmu_idle_request(dev, false)---> exit idle
|
||||
|
||||
Only the video codec drivers of rockchip platform would
|
||||
request this patch currently.
|
||||
|
||||
I am not sure whether it is necessary to add a new function
|
||||
at generic power domain. I want someone give me some advises
|
||||
here.
|
||||
|
||||
Signed-off-by: Myy Miouyouyou <myy@miouyouyou.fr>
|
||||
---
|
||||
drivers/soc/rockchip/pm_domains.c | 23 +++++++++++++++++++++++
|
||||
include/linux/rockchip_pmu.h | 15 +++++++++++++++
|
||||
2 files changed, 38 insertions(+)
|
||||
create mode 100644 include/linux/rockchip_pmu.h
|
||||
|
||||
diff --git a/drivers/soc/rockchip/pm_domains.c b/drivers/soc/rockchip/pm_domains.c
|
||||
index 40b75748..0006ed53 100644
|
||||
--- a/drivers/soc/rockchip/pm_domains.c
|
||||
+++ b/drivers/soc/rockchip/pm_domains.c
|
||||
@@ -180,6 +180,29 @@ static int rockchip_pmu_set_idle_request(struct rockchip_pm_domain *pd,
|
||||
return 0;
|
||||
}
|
||||
|
||||
+int rockchip_pmu_idle_request(struct device *dev, bool idle)
|
||||
+{
|
||||
+ struct generic_pm_domain *genpd;
|
||||
+ struct rockchip_pm_domain *pd;
|
||||
+ int ret;
|
||||
+
|
||||
+ if (IS_ERR_OR_NULL(dev))
|
||||
+ return -EINVAL;
|
||||
+
|
||||
+ if (IS_ERR_OR_NULL(dev->pm_domain))
|
||||
+ return -EINVAL;
|
||||
+
|
||||
+ genpd = pd_to_genpd(dev->pm_domain);
|
||||
+ pd = to_rockchip_pd(genpd);
|
||||
+
|
||||
+ mutex_lock(&pd->pmu->mutex);
|
||||
+ ret = rockchip_pmu_set_idle_request(pd, idle);
|
||||
+ mutex_unlock(&pd->pmu->mutex);
|
||||
+
|
||||
+ return ret;
|
||||
+}
|
||||
+EXPORT_SYMBOL(rockchip_pmu_idle_request);
|
||||
+
|
||||
static int rockchip_pmu_save_qos(struct rockchip_pm_domain *pd)
|
||||
{
|
||||
int i;
|
||||
diff --git a/include/linux/rockchip_pmu.h b/include/linux/rockchip_pmu.h
|
||||
new file mode 100644
|
||||
index 00000000..720b3314
|
||||
--- /dev/null
|
||||
+++ b/include/linux/rockchip_pmu.h
|
||||
@@ -0,0 +1,15 @@
|
||||
+/*
|
||||
+ * pm_domain.h - Definitions and headers related to device power domains.
|
||||
+ *
|
||||
+ * Copyright (C) 2017 Randy Li <ayaka@soulik.info>.
|
||||
+ *
|
||||
+ * This file is released under the GPLv2.
|
||||
+ */
|
||||
+
|
||||
+#ifndef _LINUX_ROCKCHIP_PM_H
|
||||
+#define _LINUX_ROCKCHIP_PM_H
|
||||
+#include <linux/device.h>
|
||||
+
|
||||
+int rockchip_pmu_idle_request(struct device *dev, bool idle);
|
||||
+
|
||||
+#endif /* _LINUX_ROCKCHIP_PM_H */
|
||||
--
|
||||
2.14.1
|
||||
|
@@ -0,0 +1,228 @@
|
||||
From bc16cd0aa3cdaaff27b9bf2d3282ccfff81d8784 Mon Sep 17 00:00:00 2001
|
||||
From: "Miouyouyou (Myy)" <myy@miouyouyou.fr>
|
||||
Date: Sat, 29 Sep 2018 02:56:32 +0200
|
||||
Subject: [PATCH 5/6] drivers: clk-rk3288: support for dedicating NPLL to a VOP
|
||||
|
||||
This patch is taken from Urja Rannikko ( @urjaman ) patchset here :
|
||||
https://github.com/urjaman/arch-c201/blob/master/linux-c201/0020-RK3288-HDMI-clock-hacks-combined.patch
|
||||
https://www.spinics.net/lists/arm-kernel/msg673156.html
|
||||
|
||||
I'm not really sure what this does exactly. It basically sets the
|
||||
parent clock of the newly added clocks, if the newly added property
|
||||
"rockchip,npll-for-vop" is detected and set.
|
||||
|
||||
I have no clear idea how HDMI Neuronal PLL (and PLL in general) work,
|
||||
so I cannot comment on what it's doing and if it's a good idea in
|
||||
general.
|
||||
|
||||
The only thing I know from this patchset is that it works and have
|
||||
resolved some purple line issue at the left of my HDMI screen, when
|
||||
connected to MiQi or Tinkerboard devices.
|
||||
|
||||
Signed-off-by: Miouyouyou (Myy) <myy@miouyouyou.fr>
|
||||
---
|
||||
drivers/clk/rockchip/clk-rk3288.c | 98 ++++++++++++++++++++++++++++++++-------
|
||||
drivers/clk/rockchip/clk.h | 3 ++
|
||||
2 files changed, 85 insertions(+), 16 deletions(-)
|
||||
|
||||
diff --git a/drivers/clk/rockchip/clk-rk3288.c b/drivers/clk/rockchip/clk-rk3288.c
|
||||
index fd2058f7d..b5b56169d 100644
|
||||
--- a/drivers/clk/rockchip/clk-rk3288.c
|
||||
+++ b/drivers/clk/rockchip/clk-rk3288.c
|
||||
@@ -83,22 +83,43 @@ static struct rockchip_pll_rate_table rk3288_pll_rates[] = {
|
||||
RK3066_PLL_RATE( 768000000, 1, 64, 2),
|
||||
RK3066_PLL_RATE( 742500000, 8, 495, 2),
|
||||
RK3066_PLL_RATE( 696000000, 1, 58, 2),
|
||||
+ RK3066_PLL_RATE_NB(621000000, 1, 207, 8, 1),
|
||||
RK3066_PLL_RATE( 600000000, 1, 50, 2),
|
||||
RK3066_PLL_RATE_NB(594000000, 1, 198, 8, 1),
|
||||
RK3066_PLL_RATE( 552000000, 1, 46, 2),
|
||||
RK3066_PLL_RATE( 504000000, 1, 84, 4),
|
||||
RK3066_PLL_RATE( 500000000, 3, 125, 2),
|
||||
RK3066_PLL_RATE( 456000000, 1, 76, 4),
|
||||
+ RK3066_PLL_RATE( 428000000, 1, 107, 6),
|
||||
RK3066_PLL_RATE( 408000000, 1, 68, 4),
|
||||
RK3066_PLL_RATE( 400000000, 3, 100, 2),
|
||||
+ RK3066_PLL_RATE_NB( 394000000, 1, 197, 12, 1),
|
||||
RK3066_PLL_RATE( 384000000, 2, 128, 4),
|
||||
RK3066_PLL_RATE( 360000000, 1, 60, 4),
|
||||
+ RK3066_PLL_RATE_NB( 356000000, 1, 178, 12, 1),
|
||||
+ RK3066_PLL_RATE_NB( 324000000, 1, 189, 14, 1),
|
||||
RK3066_PLL_RATE( 312000000, 1, 52, 4),
|
||||
- RK3066_PLL_RATE( 300000000, 1, 50, 4),
|
||||
- RK3066_PLL_RATE( 297000000, 2, 198, 8),
|
||||
+ RK3066_PLL_RATE_NB( 308000000, 1, 154, 12, 1),
|
||||
+ RK3066_PLL_RATE_NB( 303000000, 1, 202, 16, 1),
|
||||
+ RK3066_PLL_RATE( 300000000, 1, 75, 6),
|
||||
+ RK3066_PLL_RATE_NB( 297750000, 2, 397, 16, 1),
|
||||
+ RK3066_PLL_RATE_NB( 293250000, 2, 391, 16, 1),
|
||||
+ RK3066_PLL_RATE_NB( 292500000, 1, 195, 16, 1),
|
||||
+ RK3066_PLL_RATE( 273600000, 1, 114, 10),
|
||||
+ RK3066_PLL_RATE_NB( 273000000, 1, 182, 16, 1),
|
||||
+ RK3066_PLL_RATE_NB( 270000000, 1, 180, 16, 1),
|
||||
+ RK3066_PLL_RATE_NB( 266250000, 2, 355, 16, 1),
|
||||
+ RK3066_PLL_RATE_NB( 256500000, 1, 171, 16, 1),
|
||||
RK3066_PLL_RATE( 252000000, 1, 84, 8),
|
||||
- RK3066_PLL_RATE( 216000000, 1, 72, 8),
|
||||
- RK3066_PLL_RATE( 148500000, 2, 99, 8),
|
||||
+ RK3066_PLL_RATE_NB( 250500000, 1, 167, 16, 1),
|
||||
+ RK3066_PLL_RATE_NB( 243428571, 1, 142, 14, 1),
|
||||
+ RK3066_PLL_RATE( 238000000, 1, 119, 12),
|
||||
+ RK3066_PLL_RATE_NB( 219750000, 2, 293, 16, 1),
|
||||
+ RK3066_PLL_RATE_NB( 216000000, 1, 144, 16, 1),
|
||||
+ RK3066_PLL_RATE_NB( 213000000, 1, 142, 16, 1),
|
||||
+ RK3066_PLL_RATE( 195428571, 1, 114, 14),
|
||||
+ RK3066_PLL_RATE( 160000000, 1, 80, 12),
|
||||
+ RK3066_PLL_RATE( 157500000, 1, 105, 16),
|
||||
RK3066_PLL_RATE( 126000000, 1, 84, 16),
|
||||
RK3066_PLL_RATE( 48000000, 1, 64, 32),
|
||||
{ /* sentinel */ },
|
||||
@@ -194,10 +215,14 @@ PNAME(mux_ddrphy_p) = { "dpll_ddr", "gpll_ddr" };
|
||||
PNAME(mux_aclk_cpu_src_p) = { "cpll_aclk_cpu", "gpll_aclk_cpu" };
|
||||
|
||||
PNAME(mux_pll_src_cpll_gpll_p) = { "cpll", "gpll" };
|
||||
-PNAME(mux_pll_src_npll_cpll_gpll_p) = { "npll", "cpll", "gpll" };
|
||||
-PNAME(mux_pll_src_cpll_gpll_npll_p) = { "cpll", "gpll", "npll" };
|
||||
+PNAME_ED(mux_pll_src_npll_cpll_gpll_p) = { "npll", "cpll", "gpll" };
|
||||
+
|
||||
+PNAME_ED(mux_pll_src_cgn_pll_nonvop_p) = { "cpll", "gpll", "npll" };
|
||||
+PNAME_ED(mux_pll_src_cgn_pll_vop0_p) = { "cpll", "gpll", "npll" };
|
||||
+PNAME_ED(mux_pll_src_cgn_pll_vop1_p) = { "cpll", "gpll", "npll" };
|
||||
+
|
||||
PNAME(mux_pll_src_cpll_gpll_usb480m_p) = { "cpll", "gpll", "usbphy480m_src" };
|
||||
-PNAME(mux_pll_src_cpll_gll_usb_npll_p) = { "cpll", "gpll", "usbphy480m_src", "npll" };
|
||||
+PNAME_ED(mux_pll_src_cpll_gll_usb_npll_p) = { "cpll", "gpll", "usbphy480m_src", "npll" };
|
||||
|
||||
PNAME(mux_mmc_src_p) = { "cpll", "gpll", "xin24m", "xin24m" };
|
||||
PNAME(mux_i2s_pre_p) = { "i2s_src", "i2s_frac", "ext_i2s", "xin12m" };
|
||||
@@ -443,24 +468,24 @@ static struct rockchip_clk_branch rk3288_clk_branches[] __initdata = {
|
||||
RK3288_CLKSEL_CON(30), 14, 2, MFLAGS, 8, 5, DFLAGS,
|
||||
RK3288_CLKGATE_CON(3), 4, GFLAGS),
|
||||
|
||||
- COMPOSITE(DCLK_VOP0, "dclk_vop0", mux_pll_src_cpll_gpll_npll_p, 0,
|
||||
+ COMPOSITE(DCLK_VOP0, "dclk_vop0", mux_pll_src_cgn_pll_vop0_p, 0,
|
||||
RK3288_CLKSEL_CON(27), 0, 2, MFLAGS, 8, 8, DFLAGS,
|
||||
RK3288_CLKGATE_CON(3), 1, GFLAGS),
|
||||
- COMPOSITE(DCLK_VOP1, "dclk_vop1", mux_pll_src_cpll_gpll_npll_p, 0,
|
||||
+ COMPOSITE(DCLK_VOP1, "dclk_vop1", mux_pll_src_cgn_pll_vop1_p, 0,
|
||||
RK3288_CLKSEL_CON(29), 6, 2, MFLAGS, 8, 8, DFLAGS,
|
||||
RK3288_CLKGATE_CON(3), 3, GFLAGS),
|
||||
|
||||
COMPOSITE_NODIV(SCLK_EDP_24M, "sclk_edp_24m", mux_edp_24m_p, 0,
|
||||
RK3288_CLKSEL_CON(28), 15, 1, MFLAGS,
|
||||
RK3288_CLKGATE_CON(3), 12, GFLAGS),
|
||||
- COMPOSITE(SCLK_EDP, "sclk_edp", mux_pll_src_cpll_gpll_npll_p, 0,
|
||||
+ COMPOSITE(SCLK_EDP, "sclk_edp", mux_pll_src_cgn_pll_nonvop_p, 0,
|
||||
RK3288_CLKSEL_CON(28), 6, 2, MFLAGS, 0, 6, DFLAGS,
|
||||
RK3288_CLKGATE_CON(3), 13, GFLAGS),
|
||||
|
||||
- COMPOSITE(SCLK_ISP, "sclk_isp", mux_pll_src_cpll_gpll_npll_p, 0,
|
||||
+ COMPOSITE(SCLK_ISP, "sclk_isp", mux_pll_src_cgn_pll_nonvop_p, 0,
|
||||
RK3288_CLKSEL_CON(6), 6, 2, MFLAGS, 0, 6, DFLAGS,
|
||||
RK3288_CLKGATE_CON(3), 14, GFLAGS),
|
||||
- COMPOSITE(SCLK_ISP_JPE, "sclk_isp_jpe", mux_pll_src_cpll_gpll_npll_p, 0,
|
||||
+ COMPOSITE(SCLK_ISP_JPE, "sclk_isp_jpe", mux_pll_src_cgn_pll_nonvop_p, 0,
|
||||
RK3288_CLKSEL_CON(6), 14, 2, MFLAGS, 8, 6, DFLAGS,
|
||||
RK3288_CLKGATE_CON(3), 15, GFLAGS),
|
||||
|
||||
@@ -469,16 +494,16 @@ static struct rockchip_clk_branch rk3288_clk_branches[] __initdata = {
|
||||
GATE(SCLK_HDMI_CEC, "sclk_hdmi_cec", "xin32k", 0,
|
||||
RK3288_CLKGATE_CON(5), 11, GFLAGS),
|
||||
|
||||
- COMPOSITE(ACLK_HEVC, "aclk_hevc", mux_pll_src_cpll_gpll_npll_p, 0,
|
||||
+ COMPOSITE(ACLK_HEVC, "aclk_hevc", mux_pll_src_cgn_pll_nonvop_p, 0,
|
||||
RK3288_CLKSEL_CON(39), 14, 2, MFLAGS, 8, 5, DFLAGS,
|
||||
RK3288_CLKGATE_CON(13), 13, GFLAGS),
|
||||
DIV(HCLK_HEVC, "hclk_hevc", "aclk_hevc", 0,
|
||||
RK3288_CLKSEL_CON(40), 12, 2, DFLAGS),
|
||||
|
||||
- COMPOSITE(SCLK_HEVC_CABAC, "sclk_hevc_cabac", mux_pll_src_cpll_gpll_npll_p, 0,
|
||||
+ COMPOSITE(SCLK_HEVC_CABAC, "sclk_hevc_cabac", mux_pll_src_cgn_pll_nonvop_p, 0,
|
||||
RK3288_CLKSEL_CON(42), 6, 2, MFLAGS, 0, 5, DFLAGS,
|
||||
RK3288_CLKGATE_CON(13), 14, GFLAGS),
|
||||
- COMPOSITE(SCLK_HEVC_CORE, "sclk_hevc_core", mux_pll_src_cpll_gpll_npll_p, 0,
|
||||
+ COMPOSITE(SCLK_HEVC_CORE, "sclk_hevc_core", mux_pll_src_cgn_pll_nonvop_p, 0,
|
||||
RK3288_CLKSEL_CON(42), 14, 2, MFLAGS, 8, 5, DFLAGS,
|
||||
RK3288_CLKGATE_CON(13), 15, GFLAGS),
|
||||
|
||||
@@ -552,7 +577,7 @@ static struct rockchip_clk_branch rk3288_clk_branches[] __initdata = {
|
||||
COMPOSITE(0, "sclk_tspout", mux_tspout_p, 0,
|
||||
RK3288_CLKSEL_CON(35), 14, 2, MFLAGS, 8, 5, DFLAGS,
|
||||
RK3288_CLKGATE_CON(4), 11, GFLAGS),
|
||||
- COMPOSITE(0, "sclk_tsp", mux_pll_src_cpll_gpll_npll_p, 0,
|
||||
+ COMPOSITE(0, "sclk_tsp", mux_pll_src_cgn_pll_nonvop_p, 0,
|
||||
RK3288_CLKSEL_CON(35), 6, 2, MFLAGS, 0, 5, DFLAGS,
|
||||
RK3288_CLKGATE_CON(4), 10, GFLAGS),
|
||||
|
||||
@@ -912,6 +937,7 @@ static void __init rk3288_clk_init(struct device_node *np)
|
||||
{
|
||||
struct rockchip_clk_provider *ctx;
|
||||
struct clk *clk;
|
||||
+ s32 npll_vop = -1;
|
||||
|
||||
rk3288_cru_base = of_iomap(np, 0);
|
||||
if (!rk3288_cru_base) {
|
||||
@@ -919,6 +945,46 @@ static void __init rk3288_clk_init(struct device_node *np)
|
||||
return;
|
||||
}
|
||||
|
||||
+ if (!of_property_read_s32(np, "rockchip,npll-for-vop", &npll_vop)) {
|
||||
+ if ((npll_vop < -1) || (npll_vop > 1)) {
|
||||
+ pr_warn("%s: invalid VOP to dedicate NPLL to: %d\n",
|
||||
+ __func__, npll_vop);
|
||||
+ } else if (npll_vop >= 0) {
|
||||
+ unsigned int vop_clk_id;
|
||||
+ const char ** npll_names;
|
||||
+ const char ** non_npll_names;
|
||||
+ int i;
|
||||
+
|
||||
+ /* Firstly, not-VOP needs to not use npll */
|
||||
+ mux_pll_src_npll_cpll_gpll_p[0] = "dummy_npll";
|
||||
+ mux_pll_src_cgn_pll_nonvop_p[2] = "dummy_npll";
|
||||
+ mux_pll_src_cpll_gll_usb_npll_p[3] = "dummy_npll";
|
||||
+
|
||||
+ /* Then the npll VOP needs to only use npll, and the other one not use npll. */
|
||||
+ if (npll_vop) {
|
||||
+ vop_clk_id = DCLK_VOP1;
|
||||
+ npll_names = mux_pll_src_cgn_pll_vop1_p;
|
||||
+ non_npll_names = mux_pll_src_cgn_pll_vop0_p;
|
||||
+ } else {
|
||||
+ vop_clk_id = DCLK_VOP0;
|
||||
+ npll_names = mux_pll_src_cgn_pll_vop0_p;
|
||||
+ non_npll_names = mux_pll_src_cgn_pll_vop1_p;
|
||||
+ }
|
||||
+ npll_names[0] = "dummy_cpll";
|
||||
+ npll_names[1] = "dummy_gpll";
|
||||
+ non_npll_names[2] = "dummy_npll";
|
||||
+
|
||||
+ /* Lastly the npll-dedicated-VOP needs to be able to control npll. */
|
||||
+ for (i = 0; i < ARRAY_SIZE(rk3288_clk_branches); i++) {
|
||||
+ if (rk3288_clk_branches[i].id == vop_clk_id) {
|
||||
+ rk3288_clk_branches[i].flags |= CLK_SET_RATE_PARENT;
|
||||
+ break;
|
||||
+ }
|
||||
+ }
|
||||
+ pr_debug("%s: npll dedicated for VOP %d\n", __func__, npll_vop);
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
ctx = rockchip_clk_init(np, rk3288_cru_base, CLK_NR_CLKS);
|
||||
if (IS_ERR(ctx)) {
|
||||
pr_err("%s: rockchip clk init failed\n", __func__);
|
||||
diff --git a/drivers/clk/rockchip/clk.h b/drivers/clk/rockchip/clk.h
|
||||
index 6b53fff4c..dbda9d281 100644
|
||||
--- a/drivers/clk/rockchip/clk.h
|
||||
+++ b/drivers/clk/rockchip/clk.h
|
||||
@@ -382,6 +382,9 @@ struct clk *rockchip_clk_register_muxgrf(const char *name,
|
||||
|
||||
#define PNAME(x) static const char *const x[] __initconst
|
||||
|
||||
+/* For when you want to be able to modify the pointers. */
|
||||
+#define PNAME_ED(x) static const char * x[] __initdata
|
||||
+
|
||||
enum rockchip_clk_branch_type {
|
||||
branch_composite,
|
||||
branch_mux,
|
||||
--
|
||||
2.16.4
|
||||
|
@@ -0,0 +1,424 @@
|
||||
From 6c86916e81fa18394d9b57b4af44f9948e100e96 Mon Sep 17 00:00:00 2001
|
||||
From: "Miouyouyou (Myy)" <myy@miouyouyou.fr>
|
||||
Date: Sat, 29 Sep 2018 03:02:10 +0200
|
||||
Subject: [PATCH 6/6] drm: dw_hdmi-rockchip: better clock selection logic and
|
||||
dts-based rate list
|
||||
|
||||
This patch is taken from Urja Rannikko ( @urjaman ) patchset here :
|
||||
https://github.com/urjaman/arch-c201/blob/master/linux-c201/0020-RK3288-HDMI-clock-hacks-combined.patch
|
||||
https://www.spinics.net/lists/arm-kernel/msg673156.html
|
||||
|
||||
The original description was :
|
||||
This contains traces of the following commits from the ChromeOS 3.14
|
||||
tree, which improve RF/EMI performance and detach the clock selection
|
||||
logic from the HDMI PHY configurations, plus support for configuring
|
||||
the allowed clock rates via device tree as they are dependent on
|
||||
PLL configuration and maybe even the PCB layout and other hardware things,
|
||||
eg. interference to wifi or such (EMI).
|
||||
|
||||
Rates that were allowed previous to this patch are added as the fallback
|
||||
list if no dts configuration exists.
|
||||
|
||||
CHROMIUM: drm: rockchip/dw_hdmi-rockchip: Adjust rockchip_mpll_cfg for 146.25
|
||||
CHROMIUM: drm: rockchip/dw_hdmi-rockchip: expand the informal mpll config
|
||||
CHROMIUM: drm: rockchip/dw_hdmi-rockchip: add slop to more tables
|
||||
CHROMIUM: drm: rockchip/dw_hdmi-rockchip: redo rockchip hdmi to allow slop
|
||||
CHROMIUM: drm: rockchip/dw_hdmi-rockchip: Use auto-generated tables
|
||||
CHROMIUM: drm: rockchip/dw_hdmi-rockchip: Fixup the clock to be what we expect
|
||||
CHROMIUM: drm/rockchip: hdmi: adjust cklvl & txlvl for RF/EMI
|
||||
CHROMIUM: drm: rockchip/dw_hdmi-rockchip: Set cur_ctr to 0 always
|
||||
CHROMIUM: drm: rockchip/dw_hdmi-rockchip: Decrease slop
|
||||
|
||||
https://www.spinics.net/lists/arm-kernel/msg673163.html
|
||||
|
||||
This is the patch that takes into account the new property
|
||||
"rockchip,hdmi-rates-hz" that allows the definition of the HDMI
|
||||
frequencies in the DTS file.
|
||||
This also change a lot of HDMI frequencies definition, so that
|
||||
*will* require some extensive testing.
|
||||
|
||||
Still, if it works fine, this should make tinkering the HDMI
|
||||
frequencies easier, in case you have a very special HDMI screen.
|
||||
|
||||
Signed-off-by: Miouyouyou (Myy) <myy@miouyouyou.fr>
|
||||
---
|
||||
drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c | 269 ++++++++++++++++++----------
|
||||
1 file changed, 175 insertions(+), 94 deletions(-)
|
||||
|
||||
diff --git a/drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c b/drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c
|
||||
index 11309a2a4..740b0aeea 100644
|
||||
--- a/drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c
|
||||
+++ b/drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c
|
||||
@@ -49,122 +49,141 @@ struct rockchip_hdmi {
|
||||
struct clk *vpll_clk;
|
||||
struct clk *grf_clk;
|
||||
struct dw_hdmi *hdmi;
|
||||
+ u32* rates;
|
||||
+ u32 rates_cnt;
|
||||
};
|
||||
|
||||
+#define CLK_SLOP(clk) ((clk) / 1000)
|
||||
+#define CLK_PLUS_SLOP(clk) ((clk) + CLK_SLOP(clk))
|
||||
+
|
||||
#define to_rockchip_hdmi(x) container_of(x, struct rockchip_hdmi, x)
|
||||
|
||||
+/* These were the rates allowed by the driver before rates list in device tree,
|
||||
+ * so keep them around as a fallback */
|
||||
+static const u32 dw_hdmi_fallback_rates[] = {
|
||||
+ 27000000,
|
||||
+ 36000000,
|
||||
+ 40000000,
|
||||
+ 54000000,
|
||||
+ 65000000,
|
||||
+ 66000000,
|
||||
+ 74250000,
|
||||
+ 83500000,
|
||||
+ 106500000,
|
||||
+ 108000000,
|
||||
+ 146250000,
|
||||
+ 148500000
|
||||
+};
|
||||
+
|
||||
static const struct dw_hdmi_mpll_config rockchip_mpll_cfg[] = {
|
||||
{
|
||||
- 27000000, {
|
||||
- { 0x00b3, 0x0000},
|
||||
- { 0x2153, 0x0000},
|
||||
- { 0x40f3, 0x0000}
|
||||
+ 30666000, {
|
||||
+ { 0x00b3, 0x0000 },
|
||||
+ { 0x2153, 0x0000 },
|
||||
+ { 0x40f3, 0x0000 },
|
||||
+ },
|
||||
+ }, {
|
||||
+ 36800000, {
|
||||
+ { 0x00b3, 0x0000 },
|
||||
+ { 0x2153, 0x0000 },
|
||||
+ { 0x40a2, 0x0001 },
|
||||
},
|
||||
- }, {
|
||||
- 36000000, {
|
||||
- { 0x00b3, 0x0000},
|
||||
- { 0x2153, 0x0000},
|
||||
- { 0x40f3, 0x0000}
|
||||
+ }, {
|
||||
+ 46000000, {
|
||||
+ { 0x00b3, 0x0000 },
|
||||
+ { 0x2142, 0x0001 },
|
||||
+ { 0x40a2, 0x0001 },
|
||||
},
|
||||
- }, {
|
||||
- 40000000, {
|
||||
- { 0x00b3, 0x0000},
|
||||
- { 0x2153, 0x0000},
|
||||
- { 0x40f3, 0x0000}
|
||||
+ }, {
|
||||
+ 61333000, {
|
||||
+ { 0x0072, 0x0001 },
|
||||
+ { 0x2142, 0x0001 },
|
||||
+ { 0x40a2, 0x0001 },
|
||||
},
|
||||
- }, {
|
||||
- 54000000, {
|
||||
- { 0x0072, 0x0001},
|
||||
- { 0x2142, 0x0001},
|
||||
- { 0x40a2, 0x0001},
|
||||
+ }, {
|
||||
+ 73600000, {
|
||||
+ { 0x0072, 0x0001 },
|
||||
+ { 0x2142, 0x0001 },
|
||||
+ { 0x4061, 0x0002 },
|
||||
},
|
||||
- }, {
|
||||
- 65000000, {
|
||||
- { 0x0072, 0x0001},
|
||||
- { 0x2142, 0x0001},
|
||||
- { 0x40a2, 0x0001},
|
||||
+ }, {
|
||||
+ 92000000, {
|
||||
+ { 0x0072, 0x0001 },
|
||||
+ { 0x2145, 0x0002 },
|
||||
+ { 0x4061, 0x0002 },
|
||||
},
|
||||
- }, {
|
||||
- 66000000, {
|
||||
- { 0x013e, 0x0003},
|
||||
- { 0x217e, 0x0002},
|
||||
- { 0x4061, 0x0002}
|
||||
+ }, {
|
||||
+ 122666000, {
|
||||
+ { 0x0051, 0x0002 },
|
||||
+ { 0x2145, 0x0002 },
|
||||
+ { 0x4061, 0x0002 },
|
||||
},
|
||||
- }, {
|
||||
- 74250000, {
|
||||
- { 0x0072, 0x0001},
|
||||
- { 0x2145, 0x0002},
|
||||
- { 0x4061, 0x0002}
|
||||
+ }, {
|
||||
+ 147200000, {
|
||||
+ { 0x0051, 0x0002 },
|
||||
+ { 0x2145, 0x0002 },
|
||||
+ { 0x4064, 0x0003 },
|
||||
},
|
||||
- }, {
|
||||
- 83500000, {
|
||||
- { 0x0072, 0x0001},
|
||||
+ }, {
|
||||
+ 184000000, {
|
||||
+ { 0x0051, 0x0002 },
|
||||
+ { 0x214c, 0x0003 },
|
||||
+ { 0x4064, 0x0003 },
|
||||
},
|
||||
- }, {
|
||||
- 108000000, {
|
||||
- { 0x0051, 0x0002},
|
||||
- { 0x2145, 0x0002},
|
||||
- { 0x4061, 0x0002}
|
||||
+ }, {
|
||||
+ 226666000, {
|
||||
+ { 0x0040, 0x0003 },
|
||||
+ { 0x214c, 0x0003 },
|
||||
+ { 0x4064, 0x0003 },
|
||||
},
|
||||
- }, {
|
||||
- 106500000, {
|
||||
- { 0x0051, 0x0002},
|
||||
- { 0x2145, 0x0002},
|
||||
- { 0x4061, 0x0002}
|
||||
+ }, {
|
||||
+ 272000000, {
|
||||
+ { 0x0040, 0x0003 },
|
||||
+ { 0x214c, 0x0003 },
|
||||
+ { 0x5a64, 0x0003 },
|
||||
},
|
||||
- }, {
|
||||
- 146250000, {
|
||||
- { 0x0051, 0x0002},
|
||||
- { 0x2145, 0x0002},
|
||||
- { 0x4061, 0x0002}
|
||||
+ }, {
|
||||
+ 340000000, {
|
||||
+ { 0x0040, 0x0003 },
|
||||
+ { 0x3b4c, 0x0003 },
|
||||
+ { 0x5a64, 0x0003 },
|
||||
},
|
||||
- }, {
|
||||
- 148500000, {
|
||||
- { 0x0051, 0x0003},
|
||||
- { 0x214c, 0x0003},
|
||||
- { 0x4064, 0x0003}
|
||||
+ }, {
|
||||
+ 600000000, {
|
||||
+ { 0x1a40, 0x0003 },
|
||||
+ { 0x3b4c, 0x0003 },
|
||||
+ { 0x5a64, 0x0003 },
|
||||
},
|
||||
- }, {
|
||||
+ }, {
|
||||
~0UL, {
|
||||
- { 0x00a0, 0x000a },
|
||||
- { 0x2001, 0x000f },
|
||||
- { 0x4002, 0x000f },
|
||||
+ { 0x0000, 0x0000 },
|
||||
+ { 0x0000, 0x0000 },
|
||||
+ { 0x0000, 0x0000 },
|
||||
},
|
||||
}
|
||||
};
|
||||
|
||||
static const struct dw_hdmi_curr_ctrl rockchip_cur_ctr[] = {
|
||||
- /* pixelclk bpp8 bpp10 bpp12 */
|
||||
+ /* pixelclk bpp8 bpp10 bpp12 */
|
||||
{
|
||||
- 40000000, { 0x0018, 0x0018, 0x0018 },
|
||||
- }, {
|
||||
- 65000000, { 0x0028, 0x0028, 0x0028 },
|
||||
- }, {
|
||||
- 66000000, { 0x0038, 0x0038, 0x0038 },
|
||||
- }, {
|
||||
- 74250000, { 0x0028, 0x0038, 0x0038 },
|
||||
- }, {
|
||||
- 83500000, { 0x0028, 0x0038, 0x0038 },
|
||||
- }, {
|
||||
- 146250000, { 0x0038, 0x0038, 0x0038 },
|
||||
- }, {
|
||||
- 148500000, { 0x0000, 0x0038, 0x0038 },
|
||||
- }, {
|
||||
- ~0UL, { 0x0000, 0x0000, 0x0000},
|
||||
- }
|
||||
+ 600000000, { 0x0000, 0x0000, 0x0000 },
|
||||
+ }, {
|
||||
+ ~0UL, { 0x0000, 0x0000, 0x0000 },
|
||||
+ },
|
||||
};
|
||||
|
||||
static const struct dw_hdmi_phy_config rockchip_phy_config[] = {
|
||||
/*pixelclk symbol term vlev*/
|
||||
- { 74250000, 0x8009, 0x0004, 0x0272},
|
||||
- { 148500000, 0x802b, 0x0004, 0x028d},
|
||||
- { 297000000, 0x8039, 0x0005, 0x028d},
|
||||
- { ~0UL, 0x0000, 0x0000, 0x0000}
|
||||
+ { CLK_PLUS_SLOP(74250000), 0x8009, 0x0004, 0x0272},
|
||||
+ { CLK_PLUS_SLOP(165000000), 0x802b, 0x0004, 0x0209},
|
||||
+ { CLK_PLUS_SLOP(297000000), 0x8039, 0x0005, 0x028d},
|
||||
+ { ~0UL, 0x0000, 0x0000, 0x0000}
|
||||
};
|
||||
|
||||
static int rockchip_hdmi_parse_dt(struct rockchip_hdmi *hdmi)
|
||||
{
|
||||
struct device_node *np = hdmi->dev->of_node;
|
||||
+ int rates_cnt;
|
||||
|
||||
hdmi->regmap = syscon_regmap_lookup_by_phandle(np, "rockchip,grf");
|
||||
if (IS_ERR(hdmi->regmap)) {
|
||||
@@ -192,26 +211,55 @@ static int rockchip_hdmi_parse_dt(struct rockchip_hdmi *hdmi)
|
||||
return PTR_ERR(hdmi->grf_clk);
|
||||
}
|
||||
|
||||
+ if ((rates_cnt = of_property_count_u32_elems(np, "rockchip,hdmi-rates-hz")) > 0) {
|
||||
+ int rv;
|
||||
+ u32 *rates = devm_kmalloc_array(hdmi->dev, rates_cnt, sizeof(u32), GFP_KERNEL);
|
||||
+ if (!rates)
|
||||
+ return -ENOMEM;
|
||||
+ rv = of_property_read_u32_array(np, "rockchip,hdmi-rates-hz", rates, rates_cnt);
|
||||
+ if (rv)
|
||||
+ return rv;
|
||||
+ hdmi->rates = rates;
|
||||
+ hdmi->rates_cnt = rates_cnt;
|
||||
+ } else {
|
||||
+ rates_cnt = ARRAY_SIZE(dw_hdmi_fallback_rates);
|
||||
+ hdmi->rates = devm_kmalloc_array(hdmi->dev, rates_cnt, sizeof(u32), GFP_KERNEL);
|
||||
+ if (!hdmi->rates)
|
||||
+ return -ENOMEM;
|
||||
+ memcpy(hdmi->rates, dw_hdmi_fallback_rates, rates_cnt * sizeof(u32));
|
||||
+ hdmi->rates_cnt = rates_cnt;
|
||||
+ }
|
||||
+
|
||||
+
|
||||
return 0;
|
||||
}
|
||||
|
||||
static enum drm_mode_status
|
||||
-dw_hdmi_rockchip_mode_valid(struct drm_connector *connector,
|
||||
+dw_hdmi_rockchip_encoder_mode_valid(struct drm_encoder *encoder,
|
||||
const struct drm_display_mode *mode)
|
||||
{
|
||||
- const struct dw_hdmi_mpll_config *mpll_cfg = rockchip_mpll_cfg;
|
||||
+ struct rockchip_hdmi *hdmi = to_rockchip_hdmi(encoder);
|
||||
int pclk = mode->clock * 1000;
|
||||
- bool valid = false;
|
||||
+ int num_rates = hdmi->rates_cnt;
|
||||
int i;
|
||||
|
||||
- for (i = 0; mpll_cfg[i].mpixelclock != (~0UL); i++) {
|
||||
- if (pclk == mpll_cfg[i].mpixelclock) {
|
||||
- valid = true;
|
||||
- break;
|
||||
- }
|
||||
+ /*
|
||||
+ * Pixel clocks we support are always < 2GHz and so fit in an
|
||||
+ * int. We should make sure source rate does too so we don't get
|
||||
+ * overflow when we multiply by 1000.
|
||||
+ */
|
||||
+ if (mode->clock > INT_MAX / 1000)
|
||||
+ return MODE_BAD;
|
||||
+
|
||||
+ for (i = 0; i < num_rates; i++) {
|
||||
+ int slop = CLK_SLOP(pclk);
|
||||
+
|
||||
+ if ((pclk >= hdmi->rates[i] - slop) &&
|
||||
+ (pclk <= hdmi->rates[i] + slop))
|
||||
+ return MODE_OK;
|
||||
}
|
||||
|
||||
- return (valid) ? MODE_OK : MODE_BAD;
|
||||
+ return MODE_BAD;
|
||||
}
|
||||
|
||||
static const struct drm_encoder_funcs dw_hdmi_rockchip_encoder_funcs = {
|
||||
@@ -227,7 +275,39 @@ dw_hdmi_rockchip_encoder_mode_fixup(struct drm_encoder *encoder,
|
||||
const struct drm_display_mode *mode,
|
||||
struct drm_display_mode *adj_mode)
|
||||
{
|
||||
- return true;
|
||||
+ struct rockchip_hdmi *hdmi = to_rockchip_hdmi(encoder);
|
||||
+ int pclk = adj_mode->clock * 1000;
|
||||
+ int best_diff = INT_MAX;
|
||||
+ int best_clock = 0;
|
||||
+ int slop;
|
||||
+ int i;
|
||||
+
|
||||
+ /* Pick the best clock */
|
||||
+ for (i = 0; i < hdmi->rates_cnt; i++) {
|
||||
+ int diff = hdmi->rates[i] - pclk;
|
||||
+
|
||||
+ if (diff < 0)
|
||||
+ diff = -diff;
|
||||
+ if (diff < best_diff) {
|
||||
+ best_diff = diff;
|
||||
+ best_clock = hdmi->rates[i];
|
||||
+
|
||||
+ /* Bail early if we're exact */
|
||||
+ if (best_diff == 0)
|
||||
+ return true;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ /* Double check that it's OK */
|
||||
+ slop = CLK_SLOP(pclk);
|
||||
+ if ((pclk >= best_clock - slop) && (pclk <= best_clock + slop)) {
|
||||
+ adj_mode->clock = DIV_ROUND_UP(best_clock, 1000);
|
||||
+ return true;
|
||||
+ }
|
||||
+
|
||||
+ /* Shoudn't be here; we should have said rate wasn't valid */
|
||||
+ dev_warn(hdmi->dev, "tried to set invalid rate %d\n", adj_mode->clock);
|
||||
+ return false;
|
||||
}
|
||||
|
||||
static void dw_hdmi_rockchip_encoder_mode_set(struct drm_encoder *encoder,
|
||||
@@ -280,6 +360,7 @@ dw_hdmi_rockchip_encoder_atomic_check(struct drm_encoder *encoder,
|
||||
}
|
||||
|
||||
static const struct drm_encoder_helper_funcs dw_hdmi_rockchip_encoder_helper_funcs = {
|
||||
+ .mode_valid = dw_hdmi_rockchip_encoder_mode_valid,
|
||||
.mode_fixup = dw_hdmi_rockchip_encoder_mode_fixup,
|
||||
.mode_set = dw_hdmi_rockchip_encoder_mode_set,
|
||||
.enable = dw_hdmi_rockchip_encoder_enable,
|
||||
@@ -294,7 +375,6 @@ static struct rockchip_hdmi_chip_data rk3288_chip_data = {
|
||||
};
|
||||
|
||||
static const struct dw_hdmi_plat_data rk3288_hdmi_drv_data = {
|
||||
- .mode_valid = dw_hdmi_rockchip_mode_valid,
|
||||
.mpll_cfg = rockchip_mpll_cfg,
|
||||
.cur_ctr = rockchip_cur_ctr,
|
||||
.phy_config = rockchip_phy_config,
|
||||
@@ -308,7 +388,6 @@ static struct rockchip_hdmi_chip_data rk3399_chip_data = {
|
||||
};
|
||||
|
||||
static const struct dw_hdmi_plat_data rk3399_hdmi_drv_data = {
|
||||
- .mode_valid = dw_hdmi_rockchip_mode_valid,
|
||||
.mpll_cfg = rockchip_mpll_cfg,
|
||||
.cur_ctr = rockchip_cur_ctr,
|
||||
.phy_config = rockchip_phy_config,
|
||||
@@ -387,6 +466,7 @@ static int dw_hdmi_rockchip_bind(struct device *dev, struct device *master,
|
||||
*/
|
||||
if (IS_ERR(hdmi->hdmi)) {
|
||||
ret = PTR_ERR(hdmi->hdmi);
|
||||
+ devm_kfree(hdmi->dev, hdmi->rates);
|
||||
drm_encoder_cleanup(encoder);
|
||||
clk_disable_unprepare(hdmi->vpll_clk);
|
||||
}
|
||||
@@ -399,6 +479,7 @@ static void dw_hdmi_rockchip_unbind(struct device *dev, struct device *master,
|
||||
{
|
||||
struct rockchip_hdmi *hdmi = dev_get_drvdata(dev);
|
||||
|
||||
+ devm_kfree(hdmi->dev, hdmi->rates);
|
||||
dw_hdmi_unbind(hdmi->hdmi);
|
||||
clk_disable_unprepare(hdmi->vpll_clk);
|
||||
}
|
||||
--
|
||||
2.16.4
|
||||
|
@@ -0,0 +1,63 @@
|
||||
From 1680a655127a62e74cbcfb84782e04a9c55dcf81 Mon Sep 17 00:00:00 2001
|
||||
From: Shunqian Zheng <zhengsq@rock-chips.com>
|
||||
Date: Wed, 5 Sep 2018 19:00:09 -0300
|
||||
Subject: [PATCH 3/6] media: Add JPEG_RAW format
|
||||
|
||||
Add V4L2_PIX_FMT_JPEG_RAW format that does not contain
|
||||
JPEG header in the output frame.
|
||||
|
||||
Signed-off-by: Shunqian Zheng <zhengsq@rock-chips.com>
|
||||
Signed-off-by: Ezequiel Garcia <ezequiel@collabora.com>
|
||||
---
|
||||
Documentation/media/uapi/v4l/pixfmt-compressed.rst | 9 +++++++++
|
||||
drivers/media/v4l2-core/v4l2-ioctl.c | 1 +
|
||||
include/uapi/linux/videodev2.h | 1 +
|
||||
3 files changed, 11 insertions(+)
|
||||
|
||||
diff --git a/Documentation/media/uapi/v4l/pixfmt-compressed.rst b/Documentation/media/uapi/v4l/pixfmt-compressed.rst
|
||||
index d382e7a5..4dffe400 100644
|
||||
--- a/Documentation/media/uapi/v4l/pixfmt-compressed.rst
|
||||
+++ b/Documentation/media/uapi/v4l/pixfmt-compressed.rst
|
||||
@@ -23,6 +23,15 @@ Compressed Formats
|
||||
- 'JPEG'
|
||||
- TBD. See also :ref:`VIDIOC_G_JPEGCOMP <VIDIOC_G_JPEGCOMP>`,
|
||||
:ref:`VIDIOC_S_JPEGCOMP <VIDIOC_G_JPEGCOMP>`.
|
||||
+ * .. _V4L2-PIX-FMT-JPEG-RAW:
|
||||
+
|
||||
+ - ``V4L2_PIX_FMT_JPEG_RAW``
|
||||
+ - 'Raw JPEG'
|
||||
+ - Raw JPEG bitstream, containing a compressed payload. This format
|
||||
+ contains an image scan, i.e. without any metadata or headers.
|
||||
+ The user is expected to set the needed metadata such as
|
||||
+ quantization and entropy encoding tables, via ``V4L2_CID_JPEG``
|
||||
+ controls, see :ref:`jpeg-control-id`.
|
||||
* .. _V4L2-PIX-FMT-MPEG:
|
||||
|
||||
- ``V4L2_PIX_FMT_MPEG``
|
||||
diff --git a/drivers/media/v4l2-core/v4l2-ioctl.c b/drivers/media/v4l2-core/v4l2-ioctl.c
|
||||
index 54afc9c7..0dcd95f4 100644
|
||||
--- a/drivers/media/v4l2-core/v4l2-ioctl.c
|
||||
+++ b/drivers/media/v4l2-core/v4l2-ioctl.c
|
||||
@@ -1301,6 +1301,7 @@ static void v4l_fill_fmtdesc(struct v4l2_fmtdesc *fmt)
|
||||
/* Max description length mask: descr = "0123456789012345678901234567890" */
|
||||
case V4L2_PIX_FMT_MJPEG: descr = "Motion-JPEG"; break;
|
||||
case V4L2_PIX_FMT_JPEG: descr = "JFIF JPEG"; break;
|
||||
+ case V4L2_PIX_FMT_JPEG_RAW: descr = "Raw JPEG"; break;
|
||||
case V4L2_PIX_FMT_DV: descr = "1394"; break;
|
||||
case V4L2_PIX_FMT_MPEG: descr = "MPEG-1/2/4"; break;
|
||||
case V4L2_PIX_FMT_H264: descr = "H.264"; break;
|
||||
diff --git a/include/uapi/linux/videodev2.h b/include/uapi/linux/videodev2.h
|
||||
index 5d1a3685..f271048c 100644
|
||||
--- a/include/uapi/linux/videodev2.h
|
||||
+++ b/include/uapi/linux/videodev2.h
|
||||
@@ -627,6 +627,7 @@ struct v4l2_pix_format {
|
||||
/* compressed formats */
|
||||
#define V4L2_PIX_FMT_MJPEG v4l2_fourcc('M', 'J', 'P', 'G') /* Motion-JPEG */
|
||||
#define V4L2_PIX_FMT_JPEG v4l2_fourcc('J', 'P', 'E', 'G') /* JFIF JPEG */
|
||||
+#define V4L2_PIX_FMT_JPEG_RAW v4l2_fourcc('J', 'P', 'G', 'R') /* JFIF JPEG RAW without headers */
|
||||
#define V4L2_PIX_FMT_DV v4l2_fourcc('d', 'v', 's', 'd') /* 1394 */
|
||||
#define V4L2_PIX_FMT_MPEG v4l2_fourcc('M', 'P', 'E', 'G') /* MPEG-1/2/4 Multiplexed */
|
||||
#define V4L2_PIX_FMT_H264 v4l2_fourcc('H', '2', '6', '4') /* H264 with start codes */
|
||||
--
|
||||
2.16.4
|
||||
|
@@ -0,0 +1,153 @@
|
||||
From 82da876c36ccc7791d5b20e7ee8b50379f7b19aa Mon Sep 17 00:00:00 2001
|
||||
From: Shunqian Zheng <zhengsq@rock-chips.com>
|
||||
Date: Wed, 5 Sep 2018 19:00:10 -0300
|
||||
Subject: [PATCH 4/6] media: Add controls for JPEG quantization tables
|
||||
|
||||
Add V4L2_CID_JPEG_QUANTIZATION compound control to allow userspace
|
||||
configure the JPEG quantization tables.
|
||||
|
||||
Signed-off-by: Shunqian Zheng <zhengsq@rock-chips.com>
|
||||
Signed-off-by: Ezequiel Garcia <ezequiel@collabora.com>
|
||||
---
|
||||
Documentation/media/uapi/v4l/extended-controls.rst | 31 ++++++++++++++++++++++
|
||||
Documentation/media/videodev2.h.rst.exceptions | 1 +
|
||||
drivers/media/v4l2-core/v4l2-ctrls.c | 10 +++++++
|
||||
include/uapi/linux/v4l2-controls.h | 12 +++++++++
|
||||
include/uapi/linux/videodev2.h | 1 +
|
||||
5 files changed, 55 insertions(+)
|
||||
|
||||
diff --git a/Documentation/media/uapi/v4l/extended-controls.rst b/Documentation/media/uapi/v4l/extended-controls.rst
|
||||
index 9f7312bf..1335d27d 100644
|
||||
--- a/Documentation/media/uapi/v4l/extended-controls.rst
|
||||
+++ b/Documentation/media/uapi/v4l/extended-controls.rst
|
||||
@@ -3354,7 +3354,38 @@ JPEG Control IDs
|
||||
Specify which JPEG markers are included in compressed stream. This
|
||||
control is valid only for encoders.
|
||||
|
||||
+.. _jpeg-quant-tables-control:
|
||||
|
||||
+``V4L2_CID_JPEG_QUANTIZATION (struct)``
|
||||
+ Specifies the luma and chroma quantization matrices for encoding
|
||||
+ or decoding a V4L2_PIX_FMT_JPEG_RAW format buffer. The :ref:`itu-t81`
|
||||
+ specification allows 8-bit quantization coefficients for
|
||||
+ baseline profile images, and 8-bit or 16-bit for extended profile
|
||||
+ images. Supporting or not 16-bit precision coefficients is driver-specific.
|
||||
+ Coefficients must be set in JPEG zigzag scan order.
|
||||
+
|
||||
+
|
||||
+.. c:type:: struct v4l2_ctrl_jpeg_quantization
|
||||
+
|
||||
+.. cssclass:: longtable
|
||||
+
|
||||
+.. flat-table:: struct v4l2_ctrl_jpeg_quantization
|
||||
+ :header-rows: 0
|
||||
+ :stub-columns: 0
|
||||
+ :widths: 1 1 2
|
||||
+
|
||||
+ * - __u8
|
||||
+ - ``precision``
|
||||
+ - Specifies the coefficient precision. User shall set 0
|
||||
+ for 8-bit, and 1 for 16-bit.
|
||||
+
|
||||
+ * - __u16
|
||||
+ - ``luma_quantization_matrix[64]``
|
||||
+ - Sets the luma quantization table.
|
||||
+
|
||||
+ * - __u16
|
||||
+ - ``chroma_quantization_matrix[64]``
|
||||
+ - Sets the chroma quantization table.
|
||||
|
||||
.. flat-table::
|
||||
:header-rows: 0
|
||||
diff --git a/Documentation/media/videodev2.h.rst.exceptions b/Documentation/media/videodev2.h.rst.exceptions
|
||||
index ca9f0edc..a0a38e92 100644
|
||||
--- a/Documentation/media/videodev2.h.rst.exceptions
|
||||
+++ b/Documentation/media/videodev2.h.rst.exceptions
|
||||
@@ -129,6 +129,7 @@ replace symbol V4L2_CTRL_TYPE_STRING :c:type:`v4l2_ctrl_type`
|
||||
replace symbol V4L2_CTRL_TYPE_U16 :c:type:`v4l2_ctrl_type`
|
||||
replace symbol V4L2_CTRL_TYPE_U32 :c:type:`v4l2_ctrl_type`
|
||||
replace symbol V4L2_CTRL_TYPE_U8 :c:type:`v4l2_ctrl_type`
|
||||
+replace symbol V4L2_CTRL_TYPE_JPEG_QUANTIZATION :c:type:`v4l2_ctrl_type`
|
||||
|
||||
# V4L2 capability defines
|
||||
replace define V4L2_CAP_VIDEO_CAPTURE device-capabilities
|
||||
diff --git a/drivers/media/v4l2-core/v4l2-ctrls.c b/drivers/media/v4l2-core/v4l2-ctrls.c
|
||||
index 599c1cbf..305bd7a9 100644
|
||||
--- a/drivers/media/v4l2-core/v4l2-ctrls.c
|
||||
+++ b/drivers/media/v4l2-core/v4l2-ctrls.c
|
||||
@@ -999,6 +999,7 @@ const char *v4l2_ctrl_get_name(u32 id)
|
||||
case V4L2_CID_JPEG_RESTART_INTERVAL: return "Restart Interval";
|
||||
case V4L2_CID_JPEG_COMPRESSION_QUALITY: return "Compression Quality";
|
||||
case V4L2_CID_JPEG_ACTIVE_MARKER: return "Active Markers";
|
||||
+ case V4L2_CID_JPEG_QUANTIZATION: return "JPEG Quantization Tables";
|
||||
|
||||
/* Image source controls */
|
||||
/* Keep the order of the 'case's the same as in v4l2-controls.h! */
|
||||
@@ -1286,6 +1287,9 @@ void v4l2_ctrl_fill(u32 id, const char **name, enum v4l2_ctrl_type *type,
|
||||
case V4L2_CID_DETECT_MD_REGION_GRID:
|
||||
*type = V4L2_CTRL_TYPE_U8;
|
||||
break;
|
||||
+ case V4L2_CID_JPEG_QUANTIZATION:
|
||||
+ *type = V4L2_CTRL_TYPE_JPEG_QUANTIZATION;
|
||||
+ break;
|
||||
case V4L2_CID_DETECT_MD_THRESHOLD_GRID:
|
||||
*type = V4L2_CTRL_TYPE_U16;
|
||||
break;
|
||||
@@ -1612,6 +1616,9 @@ static int std_validate(const struct v4l2_ctrl *ctrl, u32 idx,
|
||||
return -ERANGE;
|
||||
return 0;
|
||||
|
||||
+ case V4L2_CTRL_TYPE_JPEG_QUANTIZATION:
|
||||
+ return 0;
|
||||
+
|
||||
default:
|
||||
return -EINVAL;
|
||||
}
|
||||
@@ -2133,6 +2140,9 @@ static struct v4l2_ctrl *v4l2_ctrl_new(struct v4l2_ctrl_handler *hdl,
|
||||
case V4L2_CTRL_TYPE_U32:
|
||||
elem_size = sizeof(u32);
|
||||
break;
|
||||
+ case V4L2_CTRL_TYPE_JPEG_QUANTIZATION:
|
||||
+ elem_size = sizeof(struct v4l2_ctrl_jpeg_quantization);
|
||||
+ break;
|
||||
default:
|
||||
if (type < V4L2_CTRL_COMPOUND_TYPES)
|
||||
elem_size = sizeof(s32);
|
||||
diff --git a/include/uapi/linux/v4l2-controls.h b/include/uapi/linux/v4l2-controls.h
|
||||
index e4ee10ee..856b3325 100644
|
||||
--- a/include/uapi/linux/v4l2-controls.h
|
||||
+++ b/include/uapi/linux/v4l2-controls.h
|
||||
@@ -987,6 +987,18 @@ enum v4l2_jpeg_chroma_subsampling {
|
||||
#define V4L2_JPEG_ACTIVE_MARKER_DQT (1 << 17)
|
||||
#define V4L2_JPEG_ACTIVE_MARKER_DHT (1 << 18)
|
||||
|
||||
+#define V4L2_CID_JPEG_QUANTIZATION (V4L2_CID_JPEG_CLASS_BASE + 5)
|
||||
+struct v4l2_ctrl_jpeg_quantization {
|
||||
+ /* ITU-T.81 specifies two quantization coefficient precisions:
|
||||
+ * 8-bit for baseline profile,
|
||||
+ * 8-bit or 16-bit for extended profile.
|
||||
+ *
|
||||
+ * User shall set "precision" to 0 for 8-bit and 1 for 16-bit.
|
||||
+ */
|
||||
+ __u8 precision;
|
||||
+ __u16 luma_quantization_matrix[64];
|
||||
+ __u16 chroma_quantization_matrix[64];
|
||||
+};
|
||||
|
||||
/* Image source controls */
|
||||
#define V4L2_CID_IMAGE_SOURCE_CLASS_BASE (V4L2_CTRL_CLASS_IMAGE_SOURCE | 0x900)
|
||||
diff --git a/include/uapi/linux/videodev2.h b/include/uapi/linux/videodev2.h
|
||||
index f271048c..e998d074 100644
|
||||
--- a/include/uapi/linux/videodev2.h
|
||||
+++ b/include/uapi/linux/videodev2.h
|
||||
@@ -1630,6 +1630,7 @@ enum v4l2_ctrl_type {
|
||||
V4L2_CTRL_TYPE_U8 = 0x0100,
|
||||
V4L2_CTRL_TYPE_U16 = 0x0101,
|
||||
V4L2_CTRL_TYPE_U32 = 0x0102,
|
||||
+ V4L2_CTRL_TYPE_JPEG_QUANTIZATION = 0x0103,
|
||||
};
|
||||
|
||||
/* Used in the VIDIOC_QUERYCTRL ioctl for querying controls */
|
||||
--
|
||||
2.16.4
|
||||
|
@@ -0,0 +1,35 @@
|
||||
From 604ea7fc311af2b3a41e7fe3b4fbde0ee03dfb9c Mon Sep 17 00:00:00 2001
|
||||
From: Myy Miouyouyou <myy@miouyouyou.fr>
|
||||
Date: Thu, 19 Oct 2017 21:09:50 +0200
|
||||
Subject: [PATCH 04/28] dts: rk3288: miqi: Enabling the Mali GPU node
|
||||
|
||||
Why is the MiQi the only one left without a working mali GPU node ?
|
||||
|
||||
Seriously, is there a rk3288 chipset WITHOUT a mali GPU ? Couldn't
|
||||
they enable it once in the DTSI, instead of defining it as "disabled"
|
||||
and enabling it in every DTS file ?
|
||||
|
||||
Signed-off-by: Myy Miouyouyou <myy@miouyouyou.fr>
|
||||
---
|
||||
arch/arm/boot/dts/rk3288-miqi.dts | 5 +++++
|
||||
1 file changed, 5 insertions(+)
|
||||
|
||||
diff --git a/arch/arm/boot/dts/rk3288-miqi.dts b/arch/arm/boot/dts/rk3288-miqi.dts
|
||||
index 4d923aa6..3cd60674 100644
|
||||
--- a/arch/arm/boot/dts/rk3288-miqi.dts
|
||||
+++ b/arch/arm/boot/dts/rk3288-miqi.dts
|
||||
@@ -149,6 +149,11 @@
|
||||
status = "ok";
|
||||
};
|
||||
|
||||
+&gpu {
|
||||
+ mali-supply = <&vdd_gpu>;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
&hdmi {
|
||||
ddc-i2c-bus = <&i2c5>;
|
||||
status = "okay";
|
||||
--
|
||||
2.11.0
|
||||
|
@@ -0,0 +1,45 @@
|
||||
From 89e5763110ca77d68a4be00cd97a638adc2401d5 Mon Sep 17 00:00:00 2001
|
||||
From: Willy Tarreau <w@1wt.eu>
|
||||
Date: Tue, 2 Aug 2016 08:31:00 +0200
|
||||
Subject: [PATCH 05/28] ARM: dts: rockchip: fix the regulator's voltage range
|
||||
on MiQi board
|
||||
|
||||
The board declared too narrow a voltage range for the CPU and GPU
|
||||
regulators, preventing it from using the full CPU frequency range.
|
||||
The regulators support 712500 to 1500000 microvolts.
|
||||
|
||||
Signed-off-by: Willy Tarreau <w@1wt.eu>
|
||||
(cherry picked from commit 95330e63a9295a2632cee8cce5db80677f01857a)
|
||||
---
|
||||
arch/arm/boot/dts/rk3288-miqi.dts | 8 ++++----
|
||||
1 file changed, 4 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/arch/arm/boot/dts/rk3288-miqi.dts b/arch/arm/boot/dts/rk3288-miqi.dts
|
||||
index 3cd60674..a1c3cdaa 100644
|
||||
--- a/arch/arm/boot/dts/rk3288-miqi.dts
|
||||
+++ b/arch/arm/boot/dts/rk3288-miqi.dts
|
||||
@@ -168,8 +168,8 @@
|
||||
fcs,suspend-voltage-selector = <1>;
|
||||
reg = <0x40>;
|
||||
regulator-name = "vdd_cpu";
|
||||
- regulator-min-microvolt = <850000>;
|
||||
- regulator-max-microvolt = <1350000>;
|
||||
+ regulator-min-microvolt = <712500>;
|
||||
+ regulator-max-microvolt = <1500000>;
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
regulator-enable-ramp-delay = <300>;
|
||||
@@ -182,8 +182,8 @@
|
||||
fcs,suspend-voltage-selector = <1>;
|
||||
reg = <0x41>;
|
||||
regulator-name = "vdd_gpu";
|
||||
- regulator-min-microvolt = <850000>;
|
||||
- regulator-max-microvolt = <1350000>;
|
||||
+ regulator-min-microvolt = <712500>;
|
||||
+ regulator-max-microvolt = <1500000>;
|
||||
regulator-always-on;
|
||||
vin-supply = <&vcc_sys>;
|
||||
};
|
||||
--
|
||||
2.11.0
|
||||
|
@@ -0,0 +1,46 @@
|
||||
From c27e445527e949f3ef46d5326066196969c17d23 Mon Sep 17 00:00:00 2001
|
||||
From: Myy <myy@miouyouyou.fr>
|
||||
Date: Sun, 12 Mar 2017 19:43:15 +0000
|
||||
Subject: [PATCH 06/28] ARM: dts: rockchip: add the MiQi board's fan definition
|
||||
|
||||
The MiQi board is sold with an enclosure in which a fan is connected
|
||||
to the second LED output, and configured by default in "heartbeat"
|
||||
mode so that it rotates slowly and increases when the CPU load
|
||||
increases, ensuring appropriate cooling by default. This LED output
|
||||
is called "Fan" in the original kernel and connected to GPIO18
|
||||
(gpiochip 0, pin 18). Here we called it "miqi:green:fan" to stay
|
||||
consistent with the kernel's naming conventions.
|
||||
|
||||
It's worth noting that without this patch the fan doesn't work at
|
||||
all, risking to make the board overheat.
|
||||
|
||||
Fixes: 162718c (v4.7)
|
||||
Cc: Heiko Stuebner <heiko@sntech.de>
|
||||
Signed-off-by: Willy Tarreau <w@1wt.eu>
|
||||
|
||||
Signed-off-by: Myy <myy@miouyouyou.fr>
|
||||
---
|
||||
arch/arm/boot/dts/rk3288-miqi.dts | 7 +++++++
|
||||
1 file changed, 7 insertions(+)
|
||||
|
||||
diff --git a/arch/arm/boot/dts/rk3288-miqi.dts b/arch/arm/boot/dts/rk3288-miqi.dts
|
||||
index a1c3cdaa..0e383595 100644
|
||||
--- a/arch/arm/boot/dts/rk3288-miqi.dts
|
||||
+++ b/arch/arm/boot/dts/rk3288-miqi.dts
|
||||
@@ -67,6 +67,13 @@
|
||||
leds {
|
||||
compatible = "gpio-leds";
|
||||
|
||||
+ fan {
|
||||
+ gpios = <&gpio0 RK_PC2 GPIO_ACTIVE_HIGH>;
|
||||
+ label = "miqi:green:fan";
|
||||
+ linux,default-trigger = "heartbeat";
|
||||
+ };
|
||||
+
|
||||
+
|
||||
work {
|
||||
gpios = <&gpio7 RK_PA2 GPIO_ACTIVE_HIGH>;
|
||||
label = "miqi:green:user";
|
||||
--
|
||||
2.11.0
|
||||
|
@@ -0,0 +1,41 @@
|
||||
From e7e092be197c51b4d222a3b4e6638318067b7e6a Mon Sep 17 00:00:00 2001
|
||||
From: Willy Tarreau <w@1wt.eu>
|
||||
Date: Tue, 2 Aug 2016 08:20:53 +0200
|
||||
Subject: [PATCH 07/28] ARM: dts: rockchip: add support for 1800 MHz operation
|
||||
on MiQi board
|
||||
|
||||
This board happily supports 1800 MHz operations (and even more), so
|
||||
let's enable it.
|
||||
|
||||
Signed-off-by: Willy Tarreau <w@1wt.eu>
|
||||
(cherry picked from commit a0b82a29e7873a81f49ac5f50be3df1c7d312a14)
|
||||
---
|
||||
arch/arm/boot/dts/rk3288-miqi.dts | 12 ++++++++++++
|
||||
1 file changed, 12 insertions(+)
|
||||
|
||||
diff --git a/arch/arm/boot/dts/rk3288-miqi.dts b/arch/arm/boot/dts/rk3288-miqi.dts
|
||||
index 0e383595..80603a3d 100644
|
||||
--- a/arch/arm/boot/dts/rk3288-miqi.dts
|
||||
+++ b/arch/arm/boot/dts/rk3288-miqi.dts
|
||||
@@ -126,6 +126,18 @@
|
||||
|
||||
&cpu0 {
|
||||
cpu0-supply = <&vdd_cpu>;
|
||||
+ operating-points = <
|
||||
+ /* KHz uV */
|
||||
+ 1800000 1400000
|
||||
+ 1704000 1350000
|
||||
+ 1608000 1300000
|
||||
+ 1512000 1250000
|
||||
+ 1416000 1200000
|
||||
+ 1200000 1100000
|
||||
+ 1008000 1050000
|
||||
+ 816000 1000000
|
||||
+ 600000 900000
|
||||
+ >;
|
||||
};
|
||||
|
||||
&emmc {
|
||||
--
|
||||
2.11.0
|
||||
|
@@ -0,0 +1,170 @@
|
||||
From de9dcd5ecab0686022eee243464f35d2c7a34c97 Mon Sep 17 00:00:00 2001
|
||||
From: Myy <myy@miouyouyou.fr>
|
||||
Date: Mon, 16 Jan 2017 12:44:56 +0000
|
||||
Subject: [PATCH 08/28] Readapt: ARM: dts: rockchip: miqi: add turbo-mode
|
||||
operating points
|
||||
|
||||
Readaptation of Willy Tarreau patch.
|
||||
|
||||
Here's the original commit message:
|
||||
|
||||
By switching to opp-v2 we can declare "turbo-mode" operating points
|
||||
which are only enabled when /sys/devices/system/cpu/cpufreq/boost is
|
||||
set. It is convenient because it allows to boot, set a safe powersave
|
||||
governor, enable boost, limit scaling_max_freq to a safe value, then
|
||||
change the governor to performance or ondemand, and the frequency can
|
||||
then be manually adjusted by only touching scaling_max_freq.
|
||||
|
||||
New values are 1896, 1920, 1992, 2016, 2040 MHz, 2064, 2088, 2112,
|
||||
2136, 2160, 2184, 2208. MiQi boards work fine up to 2112 with a very
|
||||
good power supply (5.2V/3A real) and a strong heatsink. Higher
|
||||
frequencies may randomly work. At least 1992 is rock solid for hours
|
||||
using "openssl speed -multi 4". The other ones have only been tested
|
||||
for a few minutes. Frequencies of 1896 and 1920 MHz use 1.425V.
|
||||
1992 MHz uses 1.45V. 2016, 2040 and 2064 use 1.475V. 2088 and above
|
||||
use 1.500V. 2160, 2184 and 2208 cause the lowest frequency to be
|
||||
picked. It's obvious that it's a sign issue somewhere in the kernel
|
||||
but this one was not found yet.
|
||||
|
||||
Signed-off-by: Myy <myy@miouyouyou.fr>
|
||||
---
|
||||
arch/arm/boot/dts/rk3288-miqi.dts | 120 +++++++++++++++++++++++++++++++++-----
|
||||
1 file changed, 107 insertions(+), 13 deletions(-)
|
||||
|
||||
diff --git a/arch/arm/boot/dts/rk3288-miqi.dts b/arch/arm/boot/dts/rk3288-miqi.dts
|
||||
index 80603a3d..d7fde483 100644
|
||||
--- a/arch/arm/boot/dts/rk3288-miqi.dts
|
||||
+++ b/arch/arm/boot/dts/rk3288-miqi.dts
|
||||
@@ -122,22 +122,116 @@
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
};
|
||||
-};
|
||||
|
||||
+
|
||||
+ cpu0_opp_table: opp_table0 {
|
||||
+ compatible = "operating-points-v2";
|
||||
+ opp-shared;
|
||||
+
|
||||
+ opp@600000000 {
|
||||
+ opp-hz = /bits/ 64 <600000000>;
|
||||
+ opp-microvolt = <900000>;
|
||||
+ };
|
||||
+ opp@816000000 {
|
||||
+ opp-hz = /bits/ 64 <816000000>;
|
||||
+ opp-microvolt = <1000000>;
|
||||
+ };
|
||||
+ opp@1008000000 {
|
||||
+ opp-hz = /bits/ 64 <1008000000>;
|
||||
+ opp-microvolt = <1050000>;
|
||||
+ };
|
||||
+ opp@1200000000 {
|
||||
+ opp-hz = /bits/ 64 <1200000000>;
|
||||
+ opp-microvolt = <1100000>;
|
||||
+ };
|
||||
+ opp@1416000000 {
|
||||
+ opp-hz = /bits/ 64 <1416000000>;
|
||||
+ opp-microvolt = <1200000>;
|
||||
+ };
|
||||
+ opp@1512000000 {
|
||||
+ opp-hz = /bits/ 64 <1512000000>;
|
||||
+ opp-microvolt = <1250000>;
|
||||
+ };
|
||||
+ opp@1608000000 {
|
||||
+ opp-hz = /bits/ 64 <1608000000>;
|
||||
+ opp-microvolt = <1300000>;
|
||||
+ };
|
||||
+ opp@1704000000 {
|
||||
+ opp-hz = /bits/ 64 <1704000000>;
|
||||
+ opp-microvolt = <1350000>;
|
||||
+ };
|
||||
+ opp@1800000000 {
|
||||
+ opp-hz = /bits/ 64 <1800000000>;
|
||||
+ opp-microvolt = <1400000>;
|
||||
+ };
|
||||
+ /* boot-only frequencies below */
|
||||
+ opp@1896000000 {
|
||||
+ opp-hz = /bits/ 64 <1896000000>;
|
||||
+ opp-microvolt = <1425000>;
|
||||
+ turbo-mode;
|
||||
+ };
|
||||
+ opp@1920000000 {
|
||||
+ opp-hz = /bits/ 64 <1920000000>;
|
||||
+ opp-microvolt = <1425000>;
|
||||
+ turbo-mode;
|
||||
+ };
|
||||
+ opp@1992000000 {
|
||||
+ opp-hz = /bits/ 64 <1992000000>;
|
||||
+ opp-microvolt = <1450000>;
|
||||
+ turbo-mode;
|
||||
+ };
|
||||
+ opp@2016000000 {
|
||||
+ opp-hz = /bits/ 64 <2016000000>;
|
||||
+ opp-microvolt = <1475000>;
|
||||
+ turbo-mode;
|
||||
+ };
|
||||
+ opp@2040000000 {
|
||||
+ opp-hz = /bits/ 64 <2040000000>;
|
||||
+ opp-microvolt = <1475000>;
|
||||
+ turbo-mode;
|
||||
+ };
|
||||
+ opp@2064000000 {
|
||||
+ opp-hz = /bits/ 64 <2064000000>;
|
||||
+ opp-microvolt = <1475000>;
|
||||
+ turbo-mode;
|
||||
+ };
|
||||
+ opp@2088000000 {
|
||||
+ opp-hz = /bits/ 64 <2088000000>;
|
||||
+ opp-microvolt = <1500000>;
|
||||
+ turbo-mode;
|
||||
+ };
|
||||
+ opp@2112000000 {
|
||||
+ opp-hz = /bits/ 64 <2112000000>;
|
||||
+ opp-microvolt = <1500000>;
|
||||
+ turbo-mode;
|
||||
+ };
|
||||
+ opp@2136000000 {
|
||||
+ opp-hz = /bits/ 64 <2136000000>;
|
||||
+ opp-microvolt = <1500000>;
|
||||
+ turbo-mode;
|
||||
+ };
|
||||
+ opp@2160000000 {
|
||||
+ opp-hz = /bits/ 64 <2160000000>;
|
||||
+ opp-microvolt = <1500000>;
|
||||
+ turbo-mode;
|
||||
+ };
|
||||
+ opp@2184000000 {
|
||||
+ opp-hz = /bits/ 64 <2184000000>;
|
||||
+ opp-microvolt = <1500000>;
|
||||
+ turbo-mode;
|
||||
+ };
|
||||
+ opp@2208000000 {
|
||||
+ opp-hz = /bits/ 64 <2208000000>;
|
||||
+ opp-microvolt = <1500000>;
|
||||
+ turbo-mode;
|
||||
+ };
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
&cpu0 {
|
||||
cpu0-supply = <&vdd_cpu>;
|
||||
- operating-points = <
|
||||
- /* KHz uV */
|
||||
- 1800000 1400000
|
||||
- 1704000 1350000
|
||||
- 1608000 1300000
|
||||
- 1512000 1250000
|
||||
- 1416000 1200000
|
||||
- 1200000 1100000
|
||||
- 1008000 1050000
|
||||
- 816000 1000000
|
||||
- 600000 900000
|
||||
- >;
|
||||
+
|
||||
+ operating-points-v2 = <&cpu0_opp_table>;
|
||||
};
|
||||
|
||||
&emmc {
|
||||
--
|
||||
2.11.0
|
||||
|
@@ -0,0 +1,61 @@
|
||||
From 771bcfe1735e42650b763e52a042a9fd98b2fa5b Mon Sep 17 00:00:00 2001
|
||||
From: Myy Miouyouyou <myy@miouyouyou.fr>
|
||||
Date: Thu, 19 Oct 2017 21:20:43 +0200
|
||||
Subject: [PATCH 09/28] ARM: DTSI: rk3288.dtsi: Missing GRF handles
|
||||
|
||||
Add missing GRF handles.
|
||||
|
||||
This patch is taken from the patches provided by the ARMbian team.
|
||||
|
||||
Signed-off-by: Myy Miouyouyou <myy@miouyouyou.fr>
|
||||
---
|
||||
arch/arm/boot/dts/rk3288.dtsi | 5 +++++
|
||||
1 file changed, 5 insertions(+)
|
||||
|
||||
diff --git a/arch/arm/boot/dts/rk3288.dtsi b/arch/arm/boot/dts/rk3288.dtsi
|
||||
index 356ed1e6..5b789528 100644
|
||||
--- a/arch/arm/boot/dts/rk3288.dtsi
|
||||
+++ b/arch/arm/boot/dts/rk3288.dtsi
|
||||
@@ -547,6 +547,7 @@
|
||||
pinctrl-2 = <&otp_gpio>;
|
||||
#thermal-sensor-cells = <1>;
|
||||
rockchip,hw-tshut-temp = <95000>;
|
||||
+ rockchip,grf = <&grf>;
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
@@ -655,6 +656,7 @@
|
||||
pinctrl-0 = <&pwm0_pin>;
|
||||
clocks = <&cru PCLK_PWM>;
|
||||
clock-names = "pwm";
|
||||
+ rockchip,grf = <&grf>;
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
@@ -666,6 +668,7 @@
|
||||
pinctrl-0 = <&pwm1_pin>;
|
||||
clocks = <&cru PCLK_PWM>;
|
||||
clock-names = "pwm";
|
||||
+ rockchip,grf = <&grf>;
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
@@ -677,6 +680,7 @@
|
||||
pinctrl-0 = <&pwm2_pin>;
|
||||
clocks = <&cru PCLK_PWM>;
|
||||
clock-names = "pwm";
|
||||
+ rockchip,grf = <&grf>;
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
@@ -688,6 +692,7 @@
|
||||
pinctrl-0 = <&pwm3_pin>;
|
||||
clocks = <&cru PCLK_PWM>;
|
||||
clock-names = "pwm";
|
||||
+ rockchip,grf = <&grf>;
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
--
|
||||
2.11.0
|
||||
|
@@ -0,0 +1,31 @@
|
||||
From 062488e4b8fd552c01e1104b3bc91a6f7ffe6c41 Mon Sep 17 00:00:00 2001
|
||||
From: Myy Miouyouyou <myy@miouyouyou.fr>
|
||||
Date: Thu, 19 Oct 2017 21:24:47 +0200
|
||||
Subject: [PATCH 10/28] RK3288: DTSI: rk3288.dtsi: Add missing SPI2 pinctrl
|
||||
|
||||
The spi2_cs1 pin reference is missing in the spi2 first pin control
|
||||
definition.
|
||||
|
||||
This patch is taken from the patches provided by the ARMbian team.
|
||||
|
||||
Signed-off-by: Myy Miouyouyou <myy@miouyouyou.fr>
|
||||
---
|
||||
arch/arm/boot/dts/rk3288.dtsi | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/arch/arm/boot/dts/rk3288.dtsi b/arch/arm/boot/dts/rk3288.dtsi
|
||||
index 5b789528..9ed532cc 100644
|
||||
--- a/arch/arm/boot/dts/rk3288.dtsi
|
||||
+++ b/arch/arm/boot/dts/rk3288.dtsi
|
||||
@@ -334,7 +334,7 @@
|
||||
dma-names = "tx", "rx";
|
||||
interrupts = <GIC_SPI 46 IRQ_TYPE_LEVEL_HIGH>;
|
||||
pinctrl-names = "default";
|
||||
- pinctrl-0 = <&spi2_clk &spi2_tx &spi2_rx &spi2_cs0>;
|
||||
+ pinctrl-0 = <&spi2_clk &spi2_tx &spi2_rx &spi2_cs0 &spi2_cs1>;
|
||||
reg = <0x0 0xff130000 0x0 0x1000>;
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
--
|
||||
2.11.0
|
||||
|
@@ -0,0 +1,27 @@
|
||||
From af8d73ec0df1dde1e2fe1674c5708d4c30385ba9 Mon Sep 17 00:00:00 2001
|
||||
From: Myy <myy@miouyouyou.fr>
|
||||
Date: Mon, 5 Jun 2017 12:37:17 +0000
|
||||
Subject: [PATCH 11/28] Added support for Tinkerboard's SPI interface
|
||||
|
||||
Imported from ARMbian
|
||||
|
||||
Signed-off-by: Myy <myy@miouyouyou.fr>
|
||||
---
|
||||
drivers/spi/spidev.c | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/drivers/spi/spidev.c b/drivers/spi/spidev.c
|
||||
index cda10719..a6287475 100644
|
||||
--- a/drivers/spi/spidev.c
|
||||
+++ b/drivers/spi/spidev.c
|
||||
@@ -669,6 +669,7 @@ static const struct of_device_id spidev_dt_ids[] = {
|
||||
{ .compatible = "lineartechnology,ltc2488" },
|
||||
{ .compatible = "ge,achc" },
|
||||
{ .compatible = "semtech,sx1301" },
|
||||
+ { .compatible = "rockchip,spi_tinker" },
|
||||
{},
|
||||
};
|
||||
MODULE_DEVICE_TABLE(of, spidev_dt_ids);
|
||||
--
|
||||
2.11.0
|
||||
|
@@ -0,0 +1,56 @@
|
||||
From 7af8d2bf732cb3baab7d926ed8a7e061e7a09ad9 Mon Sep 17 00:00:00 2001
|
||||
From: Myy Miouyouyou <myy@miouyouyou.fr>
|
||||
Date: Thu, 19 Oct 2017 21:39:00 +0200
|
||||
Subject: [PATCH 13/28] ARM: DTSI: rk3288.dtsi: Adding cells addresses and
|
||||
sizes of MMC nodes
|
||||
|
||||
Imported from the Rockchip 4.4 patches.
|
||||
|
||||
Signed-off-by: Myy Miouyouyou <myy@miouyouyou.fr>
|
||||
---
|
||||
arch/arm/boot/dts/rk3288.dtsi | 8 ++++++++
|
||||
1 file changed, 8 insertions(+)
|
||||
|
||||
diff --git a/arch/arm/boot/dts/rk3288.dtsi b/arch/arm/boot/dts/rk3288.dtsi
|
||||
index be985f02..14ef8202 100644
|
||||
--- a/arch/arm/boot/dts/rk3288.dtsi
|
||||
+++ b/arch/arm/boot/dts/rk3288.dtsi
|
||||
@@ -236,6 +236,8 @@
|
||||
clock-names = "biu", "ciu", "ciu-drive", "ciu-sample";
|
||||
fifo-depth = <0x100>;
|
||||
interrupts = <GIC_SPI 32 IRQ_TYPE_LEVEL_HIGH>;
|
||||
+ #address-cells = <1>;
|
||||
+ #size-cells = <0>;
|
||||
reg = <0x0 0xff0c0000 0x0 0x4000>;
|
||||
resets = <&cru SRST_MMC0>;
|
||||
reset-names = "reset";
|
||||
@@ -250,6 +252,8 @@
|
||||
clock-names = "biu", "ciu", "ciu-drive", "ciu-sample";
|
||||
fifo-depth = <0x100>;
|
||||
interrupts = <GIC_SPI 33 IRQ_TYPE_LEVEL_HIGH>;
|
||||
+ #address-cells = <1>;
|
||||
+ #size-cells = <0>;
|
||||
reg = <0x0 0xff0d0000 0x0 0x4000>;
|
||||
resets = <&cru SRST_SDIO0>;
|
||||
reset-names = "reset";
|
||||
@@ -264,6 +268,8 @@
|
||||
clock-names = "biu", "ciu", "ciu-drive", "ciu-sample";
|
||||
fifo-depth = <0x100>;
|
||||
interrupts = <GIC_SPI 34 IRQ_TYPE_LEVEL_HIGH>;
|
||||
+ #address-cells = <1>;
|
||||
+ #size-cells = <0>;
|
||||
reg = <0x0 0xff0e0000 0x0 0x4000>;
|
||||
resets = <&cru SRST_SDIO1>;
|
||||
reset-names = "reset";
|
||||
@@ -278,6 +284,8 @@
|
||||
clock-names = "biu", "ciu", "ciu-drive", "ciu-sample";
|
||||
fifo-depth = <0x100>;
|
||||
interrupts = <GIC_SPI 35 IRQ_TYPE_LEVEL_HIGH>;
|
||||
+ #address-cells = <1>;
|
||||
+ #size-cells = <0>;
|
||||
reg = <0x0 0xff0f0000 0x0 0x4000>;
|
||||
resets = <&cru SRST_EMMC>;
|
||||
reset-names = "reset";
|
||||
--
|
||||
2.11.0
|
||||
|
@@ -0,0 +1,27 @@
|
||||
From ac220d592aa38b9b717d36f7bb93f7be5a08f6b3 Mon Sep 17 00:00:00 2001
|
||||
From: Myy Miouyouyou <myy@miouyouyou.fr>
|
||||
Date: Thu, 19 Oct 2017 21:43:51 +0200
|
||||
Subject: [PATCH 14/28] ARM: DTSI: rk3288.dtsi: Adding missing EDP power domain
|
||||
|
||||
Imported from Rockchip 4.4 kernel patches.
|
||||
|
||||
Signed-off-by: Myy Miouyouyou <myy@miouyouyou.fr>
|
||||
---
|
||||
arch/arm/boot/dts/rk3288.dtsi | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/arch/arm/boot/dts/rk3288.dtsi b/arch/arm/boot/dts/rk3288.dtsi
|
||||
index 14ef8202..10ecebb4 100644
|
||||
--- a/arch/arm/boot/dts/rk3288.dtsi
|
||||
+++ b/arch/arm/boot/dts/rk3288.dtsi
|
||||
@@ -1105,6 +1105,7 @@
|
||||
interrupts = <GIC_SPI 98 IRQ_TYPE_LEVEL_HIGH>;
|
||||
clocks = <&cru SCLK_EDP>, <&cru PCLK_EDP_CTRL>;
|
||||
clock-names = "dp", "pclk";
|
||||
+ power-domains = <&power RK3288_PD_VIO>;
|
||||
phys = <&edp_phy>;
|
||||
phy-names = "dp";
|
||||
resets = <&cru SRST_EDP>;
|
||||
--
|
||||
2.11.0
|
||||
|
@@ -0,0 +1,28 @@
|
||||
From c5af6798c9a411b3f550f463182a4b4904a21ec2 Mon Sep 17 00:00:00 2001
|
||||
From: Myy Miouyouyou <myy@miouyouyou.fr>
|
||||
Date: Thu, 19 Oct 2017 21:51:14 +0200
|
||||
Subject: [PATCH 16/28] ARM: DTSI: rk3288.dtsi: Adding missing VOPB registers
|
||||
|
||||
Imported from @wzyy2 patches... I think...
|
||||
|
||||
Signed-off-by: Myy Miouyouyou <myy@miouyouyou.fr>
|
||||
---
|
||||
arch/arm/boot/dts/rk3288.dtsi | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/arch/arm/boot/dts/rk3288.dtsi b/arch/arm/boot/dts/rk3288.dtsi
|
||||
index 455446f6..125f8835 100644
|
||||
--- a/arch/arm/boot/dts/rk3288.dtsi
|
||||
+++ b/arch/arm/boot/dts/rk3288.dtsi
|
||||
@@ -987,7 +987,7 @@
|
||||
|
||||
vopb: vop@ff930000 {
|
||||
compatible = "rockchip,rk3288-vop";
|
||||
- reg = <0x0 0xff930000 0x0 0x19c>;
|
||||
+ reg = <0x0 0xff930000 0x0 0x19c>, <0x0 0xff931000 0x0 0x1000>;
|
||||
interrupts = <GIC_SPI 15 IRQ_TYPE_LEVEL_HIGH>;
|
||||
clocks = <&cru ACLK_VOP0>, <&cru DCLK_VOP0>, <&cru HCLK_VOP0>;
|
||||
clock-names = "aclk_vop", "dclk_vop", "hclk_vop";
|
||||
--
|
||||
2.11.0
|
||||
|
@@ -0,0 +1,31 @@
|
||||
From a0602b2724893de7ac9b4190a7a6bb66458da2d5 Mon Sep 17 00:00:00 2001
|
||||
From: Myy Miouyouyou <myy@miouyouyou.fr>
|
||||
Date: Thu, 19 Oct 2017 21:54:37 +0200
|
||||
Subject: [PATCH 17/28] ARM: DTSI: rk3288.dtsi: Fixed the SPDIF node address
|
||||
|
||||
Now, the typo is only in the name of the node itself, not in the
|
||||
actual registers addresses definition.
|
||||
|
||||
Still, this ought to be fixed one day !
|
||||
|
||||
Signed-off-by: Myy Miouyouyou <myy@miouyouyou.fr>
|
||||
---
|
||||
arch/arm/boot/dts/rk3288.dtsi | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/arch/arm/boot/dts/rk3288.dtsi b/arch/arm/boot/dts/rk3288.dtsi
|
||||
index 125f8835..e5d3d3c9 100644
|
||||
--- a/arch/arm/boot/dts/rk3288.dtsi
|
||||
+++ b/arch/arm/boot/dts/rk3288.dtsi
|
||||
@@ -922,7 +922,7 @@
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
- spdif: sound@ff88b0000 {
|
||||
+ spdif: sound@ff8b0000 {
|
||||
compatible = "rockchip,rk3288-spdif", "rockchip,rk3066-spdif";
|
||||
reg = <0x0 0xff8b0000 0x0 0x10000>;
|
||||
#sound-dai-cells = <0>;
|
||||
--
|
||||
2.11.0
|
||||
|
@@ -0,0 +1,165 @@
|
||||
From 2715f4a9ab5c169c546029a61eebb0bde6619b0e Mon Sep 17 00:00:00 2001
|
||||
From: Myy Miouyouyou <myy@miouyouyou.fr>
|
||||
Date: Thu, 19 Oct 2017 22:12:48 +0200
|
||||
Subject: [PATCH 18/28] ARM: DTS: rk3288-tinker.dts: Enabling SDIO, Wireless
|
||||
and Bluetooth
|
||||
|
||||
Adding the appropriate nodes in order to exploit the WiFi capabilities
|
||||
of the board.
|
||||
Since these capabilities are provided through SDIO, and the SDIO
|
||||
nodes were not defined, these were added too.
|
||||
|
||||
These seems to depend on each other so they are added in one big
|
||||
patch.
|
||||
|
||||
Split if necessary.
|
||||
|
||||
Bluetooth and uart0 (AKA Bluetooth UART) definitions were also added
|
||||
in order to deal with all the wireless techs in one patch.
|
||||
|
||||
Signed-off-by: Myy Miouyouyou <myy@miouyouyou.fr>
|
||||
---
|
||||
arch/arm/boot/dts/rk3288-tinker.dts | 82 ++++++++++++++++++++++++++++++++++++-
|
||||
1 file changed, 81 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/arch/arm/boot/dts/rk3288-tinker.dts b/arch/arm/boot/dts/rk3288-tinker.dts
|
||||
index 346b0d8b..c552fd95 100644
|
||||
--- a/arch/arm/boot/dts/rk3288-tinker.dts
|
||||
+++ b/arch/arm/boot/dts/rk3288-tinker.dts
|
||||
@@ -44,6 +44,7 @@
|
||||
|
||||
#include "rk3288.dtsi"
|
||||
#include <dt-bindings/input/input.h>
|
||||
+#include <dt-bindings/clock/rockchip,rk808.h>
|
||||
|
||||
/ {
|
||||
model = "Rockchip RK3288 Tinker Board";
|
||||
@@ -114,6 +115,24 @@
|
||||
};
|
||||
};
|
||||
|
||||
+ /* This is essential to get SDIO devices working.
|
||||
+ The Wifi depends on SDIO ! */
|
||||
+ sdio_pwrseq: sdio-pwrseq {
|
||||
+ compatible = "mmc-pwrseq-simple";
|
||||
+ clocks = <&rk808 RK808_CLKOUT1>;
|
||||
+ clock-names = "ext_clock";
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&chip_enable_h>, <&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 = <&gpio4 RK_PD4 GPIO_ACTIVE_LOW>, <&gpio4 RK_PD3 GPIO_ACTIVE_LOW>;
|
||||
+ };
|
||||
+
|
||||
vcc_sys: vsys-regulator {
|
||||
compatible = "regulator-fixed";
|
||||
regulator-name = "vcc_sys";
|
||||
@@ -134,6 +153,28 @@
|
||||
startup-delay-us = <100000>;
|
||||
vin-supply = <&vcc_io>;
|
||||
};
|
||||
+
|
||||
+ wireless-wlan {
|
||||
+ compatible = "wlan-platdata";
|
||||
+ rockchip,grf = <&grf>;
|
||||
+ wifi_chip_type = "8723bs";
|
||||
+ sdio_vref = <1800>;
|
||||
+ WIFI,host_wake_irq = <&gpio4 30 GPIO_ACTIVE_HIGH>;
|
||||
+ status = "okay";
|
||||
+ };
|
||||
+
|
||||
+ wireless-bluetooth {
|
||||
+ compatible = "bluetooth-platdata";
|
||||
+ uart_rts_gpios = <&gpio4 19 GPIO_ACTIVE_LOW>;
|
||||
+ pinctrl-names = "default","rts_gpio";
|
||||
+ pinctrl-0 = <&uart0_rts>;
|
||||
+ pinctrl-1 = <&uart0_gpios>;
|
||||
+ BT,reset_gpio = <&gpio4 29 GPIO_ACTIVE_HIGH>;
|
||||
+ BT,wake_gpio = <&gpio4 26 GPIO_ACTIVE_HIGH>;
|
||||
+ BT,wake_host_irq = <&gpio4 31 GPIO_ACTIVE_HIGH>;
|
||||
+ status = "okay";
|
||||
+ };
|
||||
+
|
||||
};
|
||||
|
||||
&cpu0 {
|
||||
@@ -373,10 +414,30 @@
|
||||
|
||||
&io_domains {
|
||||
status = "okay";
|
||||
-
|
||||
+ rockchip,grf = <&grf>;
|
||||
+ wifi-supply = <&vcc_18>;
|
||||
sdcard-supply = <&vccio_sd>;
|
||||
};
|
||||
|
||||
+&sdio0 {
|
||||
+ status = "okay";
|
||||
+ clock-frequency = <50000000>;
|
||||
+ clock-freq-min-max = <200000 50000000>;
|
||||
+ bus-width = <4>;
|
||||
+ cap-sd-highspeed;
|
||||
+ cap-sdio-irq;
|
||||
+ disable-wp;
|
||||
+ keep-power-in-suspend;
|
||||
+ mmc-pwrseq = <&sdio_pwrseq>;
|
||||
+ non-removable;
|
||||
+ num-slots = <1>;
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&sdio0_bus4 &sdio0_cmd &sdio0_clk>;
|
||||
+ sd-uhs-sdr104;
|
||||
+ supports-sdio;
|
||||
+
|
||||
+};
|
||||
+
|
||||
&pinctrl {
|
||||
pcfg_pull_none_drv_8ma: pcfg-pull-none-drv-8ma {
|
||||
drive-strength = <8>;
|
||||
@@ -422,6 +483,16 @@
|
||||
};
|
||||
};
|
||||
|
||||
+ sdio-pwrseq {
|
||||
+ wifi_enable_h: wifienable-h {
|
||||
+ rockchip,pins = <4 28 RK_FUNC_GPIO &pcfg_pull_none>;
|
||||
+ };
|
||||
+
|
||||
+ chip_enable_h: chip-enable-h {
|
||||
+ rockchip,pins = <4 27 RK_FUNC_GPIO &pcfg_pull_none>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
sdmmc {
|
||||
sdmmc_bus4: sdmmc-bus4 {
|
||||
rockchip,pins = <6 16 RK_FUNC_1 &pcfg_pull_up_drv_8ma>,
|
||||
@@ -453,6 +524,13 @@
|
||||
rockchip,pins = <7 8 RK_FUNC_GPIO &pcfg_pull_none>;
|
||||
};
|
||||
};
|
||||
+
|
||||
+ wireless-bluetooth {
|
||||
+ uart0_gpios: uart0-gpios {
|
||||
+ rockchip,pins = <4 19 RK_FUNC_GPIO &pcfg_pull_none>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
};
|
||||
|
||||
&pwm0 {
|
||||
@@ -485,6 +563,8 @@
|
||||
|
||||
&uart0 {
|
||||
status = "okay";
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&uart0_xfer>, <&uart0_cts>;
|
||||
};
|
||||
|
||||
&uart1 {
|
||||
--
|
||||
2.11.0
|
||||
|
@@ -0,0 +1,30 @@
|
||||
diff --git a/arch/arm/boot/dts/rk3288-tinker.dts b/arch/arm/boot/dts/rk3288-tinker.dts
|
||||
index 07b4af4..7755426 100644
|
||||
--- a/arch/arm/boot/dts/rk3288-tinker.dts
|
||||
+++ b/arch/arm/boot/dts/rk3288-tinker.dts
|
||||
@@ -162,7 +162,7 @@
|
||||
WIFI,host_wake_irq = <&gpio4 30 GPIO_ACTIVE_HIGH>;
|
||||
status = "okay";
|
||||
};
|
||||
-
|
||||
+/*
|
||||
wireless-bluetooth {
|
||||
compatible = "bluetooth-platdata";
|
||||
uart_rts_gpios = <&gpio4 19 GPIO_ACTIVE_LOW>;
|
||||
@@ -174,6 +174,7 @@
|
||||
BT,wake_host_irq = <&gpio4 31 GPIO_ACTIVE_HIGH>;
|
||||
status = "okay";
|
||||
};
|
||||
+*/
|
||||
|
||||
};
|
||||
|
||||
@@ -620,7 +621,7 @@
|
||||
&uart0 {
|
||||
status = "okay";
|
||||
pinctrl-names = "default";
|
||||
- pinctrl-0 = <&uart0_xfer>, <&uart0_cts>;
|
||||
+ pinctrl-0 = <&uart0_xfer>, <&uart0_cts>, <&uart0_rts>;
|
||||
};
|
||||
|
||||
&uart1 {
|
@@ -0,0 +1,29 @@
|
||||
From d4775f623b25009039a8ef3f28332033c7766ecc Mon Sep 17 00:00:00 2001
|
||||
From: Myy Miouyouyou <myy@miouyouyou.fr>
|
||||
Date: Thu, 19 Oct 2017 22:20:33 +0200
|
||||
Subject: [PATCH 19/28] ARM: DTS: rk3288-tinker.dts: Improving the CPU max
|
||||
voltage
|
||||
|
||||
Taken from the various patches provided by @TonyMac32 .
|
||||
|
||||
Signed-off-by: Myy Miouyouyou <myy@miouyouyou.fr>
|
||||
---
|
||||
arch/arm/boot/dts/rk3288-tinker.dts | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/arch/arm/boot/dts/rk3288-tinker.dts b/arch/arm/boot/dts/rk3288-tinker.dts
|
||||
index c552fd95..4ce94698 100644
|
||||
--- a/arch/arm/boot/dts/rk3288-tinker.dts
|
||||
+++ b/arch/arm/boot/dts/rk3288-tinker.dts
|
||||
@@ -243,7 +243,7 @@
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
regulator-min-microvolt = <750000>;
|
||||
- regulator-max-microvolt = <1350000>;
|
||||
+ regulator-max-microvolt = <1450000>;
|
||||
regulator-name = "vdd_arm";
|
||||
regulator-ramp-delay = <6000>;
|
||||
regulator-state-mem {
|
||||
--
|
||||
2.11.0
|
||||
|
@@ -0,0 +1,40 @@
|
||||
From 39e50ab508d8104a733771a8681908a66a300edd Mon Sep 17 00:00:00 2001
|
||||
From: Myy Miouyouyou <myy@miouyouyou.fr>
|
||||
Date: Thu, 19 Oct 2017 22:25:03 +0200
|
||||
Subject: [PATCH 20/28] ARM: DTS: rk3288-tinker.dts: Setting up the SD
|
||||
regulators
|
||||
|
||||
Some are needed and some are not. Playing with these parameters is
|
||||
required to get reboot working on these boards.
|
||||
|
||||
I still can't believe that these boards can't soft reset correctly.
|
||||
|
||||
Signed-off-by: Myy Miouyouyou <myy@miouyouyou.fr>
|
||||
---
|
||||
arch/arm/boot/dts/rk3288-tinker.dts | 3 ++-
|
||||
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/arch/arm/boot/dts/rk3288-tinker.dts b/arch/arm/boot/dts/rk3288-tinker.dts
|
||||
index 4ce94698..90c1a251 100644
|
||||
--- a/arch/arm/boot/dts/rk3288-tinker.dts
|
||||
+++ b/arch/arm/boot/dts/rk3288-tinker.dts
|
||||
@@ -333,6 +333,8 @@
|
||||
};
|
||||
|
||||
vccio_sd: LDO_REG5 {
|
||||
+ regulator-always-on;
|
||||
+ regulator-boot-on;
|
||||
regulator-min-microvolt = <1800000>;
|
||||
regulator-max-microvolt = <3300000>;
|
||||
regulator-name = "vccio_sd";
|
||||
@@ -379,7 +381,6 @@
|
||||
};
|
||||
|
||||
vcc33_sd: SWITCH_REG1 {
|
||||
- regulator-always-on;
|
||||
regulator-boot-on;
|
||||
regulator-name = "vcc33_sd";
|
||||
regulator-state-mem {
|
||||
--
|
||||
2.11.0
|
||||
|
@@ -0,0 +1,53 @@
|
||||
From b0a552add28bf4590b979abb3530b14b6811eec1 Mon Sep 17 00:00:00 2001
|
||||
From: Myy Miouyouyou <myy@miouyouyou.fr>
|
||||
Date: Thu, 19 Oct 2017 22:33:39 +0200
|
||||
Subject: [PATCH 21/28] ARM: DTS: rk3288-tinker.dts: Defined the I2C interfaces
|
||||
|
||||
And all the hardware behind.
|
||||
|
||||
Taken from, and tested by @TonyMac32 .
|
||||
|
||||
Signed-off-by: Myy Miouyouyou <myy@miouyouyou.fr>
|
||||
---
|
||||
arch/arm/boot/dts/rk3288-tinker.dts | 23 +++++++++++++++++++++++
|
||||
1 file changed, 23 insertions(+)
|
||||
|
||||
diff --git a/arch/arm/boot/dts/rk3288-tinker.dts b/arch/arm/boot/dts/rk3288-tinker.dts
|
||||
index 90c1a251..67a3ce6f 100644
|
||||
--- a/arch/arm/boot/dts/rk3288-tinker.dts
|
||||
+++ b/arch/arm/boot/dts/rk3288-tinker.dts
|
||||
@@ -400,8 +400,31 @@
|
||||
};
|
||||
};
|
||||
|
||||
+&i2c1 {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
&i2c2 {
|
||||
status = "okay";
|
||||
+
|
||||
+ afc0:af-controller@0 {
|
||||
+ status = "okay";
|
||||
+ compatible = "silicon touch,vm149C-v4l2-i2c-subdev";
|
||||
+ reg = <0x0c>;
|
||||
+ };
|
||||
+
|
||||
+ eeprom:m24c08@50 {
|
||||
+ compatible = "at,24c08";
|
||||
+ reg = <0x50>;
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&i2c3 {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&i2c4 {
|
||||
+ status = "okay";
|
||||
};
|
||||
|
||||
&i2c5 {
|
||||
--
|
||||
2.11.0
|
||||
|
@@ -0,0 +1,35 @@
|
||||
From 8ca607f3fe77c80a3367d8363703d5dc1d6781d4 Mon Sep 17 00:00:00 2001
|
||||
From: Myy Miouyouyou <myy@miouyouyou.fr>
|
||||
Date: Thu, 19 Oct 2017 22:36:02 +0200
|
||||
Subject: [PATCH 22/28] ARM: DTS: rk3288-tinker.dts: Add the MIPI DSI node
|
||||
|
||||
Taken from, and tested by @TonyMac32 .
|
||||
|
||||
Signed-off-by: Myy Miouyouyou <myy@miouyouyou.fr>
|
||||
---
|
||||
arch/arm/boot/dts/rk3288-tinker.dts | 9 +++++++++
|
||||
1 file changed, 9 insertions(+)
|
||||
|
||||
diff --git a/arch/arm/boot/dts/rk3288-tinker.dts b/arch/arm/boot/dts/rk3288-tinker.dts
|
||||
index 67a3ce6f..6f4c0843 100644
|
||||
--- a/arch/arm/boot/dts/rk3288-tinker.dts
|
||||
+++ b/arch/arm/boot/dts/rk3288-tinker.dts
|
||||
@@ -443,6 +443,15 @@
|
||||
sdcard-supply = <&vccio_sd>;
|
||||
};
|
||||
|
||||
+&mipi_dsi {
|
||||
+ status = "okay";
|
||||
+ mipi_panel: mipi-panel {
|
||||
+ compatible ="asus,tc358762";
|
||||
+ reg = <0x0 0>;
|
||||
+ status = "okay";
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
&sdio0 {
|
||||
status = "okay";
|
||||
clock-frequency = <50000000>;
|
||||
--
|
||||
2.11.0
|
||||
|
@@ -0,0 +1,33 @@
|
||||
From 58d72a1cc693c4c08391487476d0cd6d167a57cf Mon Sep 17 00:00:00 2001
|
||||
From: Myy Miouyouyou <myy@miouyouyou.fr>
|
||||
Date: Thu, 19 Oct 2017 22:48:36 +0200
|
||||
Subject: [PATCH 24/28] ARM: DTS: rk3288-tinker.dts: Defining SDMMC properties
|
||||
|
||||
I never knew if these properties were required to fix the dreaded
|
||||
reboot issue...
|
||||
|
||||
Signed-off-by: Myy Miouyouyou <myy@miouyouyou.fr>
|
||||
---
|
||||
arch/arm/boot/dts/rk3288-tinker.dts | 5 +++++
|
||||
1 file changed, 5 insertions(+)
|
||||
|
||||
diff --git a/arch/arm/boot/dts/rk3288-tinker.dts b/arch/arm/boot/dts/rk3288-tinker.dts
|
||||
index f4b4525c..a0663425 100644
|
||||
--- a/arch/arm/boot/dts/rk3288-tinker.dts
|
||||
+++ b/arch/arm/boot/dts/rk3288-tinker.dts
|
||||
@@ -601,7 +601,12 @@
|
||||
disable-wp; /* wp not hooked up */
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&sdmmc_clk &sdmmc_cmd &sdmmc_cd &sdmmc_bus4>;
|
||||
+ sd-uhs-sdr12;
|
||||
+ sd-uhs-sdr25;
|
||||
+ sd-uhs-sdr50;
|
||||
+ sd-uhs-sdr104;
|
||||
status = "okay";
|
||||
+ supports-sd;
|
||||
vmmc-supply = <&vcc33_sd>;
|
||||
vqmmc-supply = <&vccio_sd>;
|
||||
};
|
||||
--
|
||||
2.11.0
|
||||
|
@@ -0,0 +1,107 @@
|
||||
From f4480cb8198085607c15e523b49aa21bc38cf62c Mon Sep 17 00:00:00 2001
|
||||
From: Myy Miouyouyou <myy@miouyouyou.fr>
|
||||
Date: Tue, 21 Nov 2017 21:47:33 +0100
|
||||
Subject: [PATCH 1/5] ARM: DTSI: rk3288.dtsi: Define the VPU services
|
||||
|
||||
Still, you will need appropriate drivers to use them.
|
||||
|
||||
Contrary to the previous versions of this patch, these services are :
|
||||
* NOT enabled by default;
|
||||
* MUST be activated in each individual DTS;
|
||||
|
||||
I currently do not own enough RK3288 boards to ensure that the
|
||||
VPU and HEVC MMU + services can be activated without issues.
|
||||
|
||||
Still this patch does not generate issues like the previous one AND
|
||||
still enable these services on boot, when activated properly in
|
||||
individual DTS files.
|
||||
|
||||
Signed-off-by: Myy Miouyouyou <myy@miouyouyou.fr>
|
||||
---
|
||||
arch/arm/boot/dts/rk3288.dtsi | 63 +++++++++++++++++++++++++++++++++++++++++++
|
||||
1 file changed, 63 insertions(+)
|
||||
|
||||
diff --git a/arch/arm/boot/dts/rk3288.dtsi b/arch/arm/boot/dts/rk3288.dtsi
|
||||
index 30b04257..bc3601ac 100644
|
||||
--- a/arch/arm/boot/dts/rk3288.dtsi
|
||||
+++ b/arch/arm/boot/dts/rk3288.dtsi
|
||||
@@ -1182,6 +1182,27 @@
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
+ vpu_service: vpu-service@ff9a0000 {
|
||||
+ compatible = "rockchip,vpu_service";
|
||||
+ reg = <0x0 0xff9a0000 0x0 0x800>;
|
||||
+ interrupts =
|
||||
+ <GIC_SPI 9 IRQ_TYPE_LEVEL_HIGH>,
|
||||
+ <GIC_SPI 10 IRQ_TYPE_LEVEL_HIGH>;
|
||||
+ interrupt-names = "irq_enc", "irq_dec";
|
||||
+ clocks = <&cru ACLK_VCODEC>, <&cru HCLK_VCODEC>;
|
||||
+ clock-names = "aclk_vcodec", "hclk_vcodec";
|
||||
+ power-domains = <&power RK3288_PD_VIDEO>;
|
||||
+ rockchip,grf = <&grf>;
|
||||
+ resets = <&cru SRST_VCODEC_AXI>, <&cru SRST_VCODEC_AHB>;
|
||||
+ reset-names = "video_a", "video_h";
|
||||
+ iommus = <&vpu_mmu>;
|
||||
+ iommu_enabled = <1>;
|
||||
+ dev_mode = <0>;
|
||||
+ status = "disabled";
|
||||
+ /* 0 means ion, 1 means drm */
|
||||
+ allocator = <1>;
|
||||
+ };
|
||||
+
|
||||
hevc_mmu: iommu@ff9c0440 {
|
||||
compatible = "rockchip,iommu";
|
||||
reg = <0x0 0xff9c0440 0x0 0x40>, <0x0 0xff9c0480 0x0 0x40>;
|
||||
@@ -1191,6 +1212,48 @@
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
+ hevc_service: hevc-service@ff9c0000 {
|
||||
+ compatible = "rockchip,hevc_service";
|
||||
+ reg = <0x0 0xff9c0000 0x0 0x400>;
|
||||
+ interrupts = <GIC_SPI 12 IRQ_TYPE_LEVEL_HIGH>;
|
||||
+ interrupt-names = "irq_dec";
|
||||
+ clocks =
|
||||
+ <&cru ACLK_HEVC>,
|
||||
+ <&cru HCLK_HEVC>,
|
||||
+ <&cru SCLK_HEVC_CORE>,
|
||||
+ <&cru SCLK_HEVC_CABAC>;
|
||||
+ clock-names =
|
||||
+ "aclk_vcodec",
|
||||
+ "hclk_vcodec",
|
||||
+ "clk_core",
|
||||
+ "clk_cabac";
|
||||
+ /*
|
||||
+ * The 4K hevc would also work well with 500/125/300/300,
|
||||
+ * no more err irq and reset request.
|
||||
+ */
|
||||
+ assigned-clocks =
|
||||
+ <&cru ACLK_HEVC>,
|
||||
+ <&cru HCLK_HEVC>,
|
||||
+ <&cru SCLK_HEVC_CORE>,
|
||||
+ <&cru SCLK_HEVC_CABAC>;
|
||||
+ assigned-clock-rates =
|
||||
+ <400000000>,
|
||||
+ <100000000>,
|
||||
+ <300000000>,
|
||||
+ <300000000>;
|
||||
+
|
||||
+ resets = <&cru SRST_HEVC>;
|
||||
+ reset-names = "video";
|
||||
+ power-domains = <&power RK3288_PD_HEVC>;
|
||||
+ rockchip,grf = <&grf>;
|
||||
+ dev_mode = <1>;
|
||||
+ iommus = <&hevc_mmu>;
|
||||
+ iommu_enabled = <1>;
|
||||
+ status = "disabled";
|
||||
+ /* 0 means ion, 1 means drm */
|
||||
+ allocator = <1>;
|
||||
+ };
|
||||
+
|
||||
gpu: gpu@ffa30000 {
|
||||
compatible = "rockchip,rk3288-mali", "arm,mali-t760";
|
||||
reg = <0x0 0xffa30000 0x0 0x10000>;
|
||||
--
|
||||
2.14.1
|
||||
|
@@ -0,0 +1,57 @@
|
||||
From 647d6012849191e9909a8acb0fc9ae5df1afc747 Mon Sep 17 00:00:00 2001
|
||||
From: Myy Miouyouyou <myy@miouyouyou.fr>
|
||||
Date: Tue, 21 Nov 2017 21:51:31 +0100
|
||||
Subject: [PATCH 2/5] ARM: DTS: rk3288-miqi.dts: Enable the Video encoding MMU
|
||||
and services
|
||||
|
||||
Enable the :
|
||||
* VPU MMU;
|
||||
* VPU service;
|
||||
* HEVC MMU;
|
||||
* HEVC service;
|
||||
on MiQi devices.
|
||||
|
||||
Signed-off-by: Myy Miouyouyou <myy@miouyouyou.fr>
|
||||
---
|
||||
arch/arm/boot/dts/rk3288-miqi.dts | 18 +++++++++++++++++-
|
||||
1 file changed, 17 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/arch/arm/boot/dts/rk3288-miqi.dts b/arch/arm/boot/dts/rk3288-miqi.dts
|
||||
index d7fde483..dd785c70 100644
|
||||
--- a/arch/arm/boot/dts/rk3288-miqi.dts
|
||||
+++ b/arch/arm/boot/dts/rk3288-miqi.dts
|
||||
@@ -124,7 +124,7 @@
|
||||
};
|
||||
|
||||
|
||||
- cpu0_opp_table: opp_table0 {
|
||||
+ cpu0_opp_table: opp_table {
|
||||
compatible = "operating-points-v2";
|
||||
opp-shared;
|
||||
|
||||
@@ -575,6 +575,22 @@
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
+&vpu_mmu {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&vpu_service {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&hevc_mmu {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&hevc_service {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
&wdt {
|
||||
status = "okay";
|
||||
};
|
||||
--
|
||||
2.14.1
|
||||
|
@@ -0,0 +1,48 @@
|
||||
From 092c26ead2eb4035a57217f8705c9deed3bfb927 Mon Sep 17 00:00:00 2001
|
||||
From: Myy Miouyouyou <myy@miouyouyou.fr>
|
||||
Date: Tue, 21 Nov 2017 21:54:22 +0100
|
||||
Subject: [PATCH 3/5] ARM: DTS: rk3288-tinker: Enable the Video encoding MMU
|
||||
and services
|
||||
|
||||
Enable the :
|
||||
* VPU MMU;
|
||||
* VPU Service;
|
||||
* HEVC MMU;
|
||||
* HEVC Service;
|
||||
for ASUS Tinkerboard devices.
|
||||
|
||||
Signed-off-by: Myy Miouyouyou <myy@miouyouyou.fr>
|
||||
---
|
||||
arch/arm/boot/dts/rk3288-tinker.dts | 16 ++++++++++++++++
|
||||
1 file changed, 16 insertions(+)
|
||||
|
||||
diff --git a/arch/arm/boot/dts/rk3288-tinker.dts b/arch/arm/boot/dts/rk3288-tinker.dts
|
||||
index a0663425..07b4af4f 100644
|
||||
--- a/arch/arm/boot/dts/rk3288-tinker.dts
|
||||
+++ b/arch/arm/boot/dts/rk3288-tinker.dts
|
||||
@@ -671,6 +671,22 @@
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
+&vpu_mmu {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&vpu_service {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&hevc_mmu {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&hevc_service {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
&wdt {
|
||||
status = "okay";
|
||||
};
|
||||
--
|
||||
2.14.1
|
||||
|
@@ -0,0 +1,49 @@
|
||||
From 2769b0e656d849c5d652c75db71ce0faff1c0551 Mon Sep 17 00:00:00 2001
|
||||
From: Myy Miouyouyou <myy@miouyouyou.fr>
|
||||
Date: Tue, 21 Nov 2017 21:56:45 +0100
|
||||
Subject: [PATCH 4/5] ARM: DTSI: rk3288-firefly: Enable the Video encoding MMU
|
||||
and services
|
||||
|
||||
Enable the :
|
||||
* VPU MMU;
|
||||
* VPU Service;
|
||||
* HEVC MMU;
|
||||
* HEVC Service;
|
||||
for RK3288 Firefly devices.
|
||||
|
||||
Signed-off-by: Myy Miouyouyou <myy@miouyouyou.fr>
|
||||
---
|
||||
arch/arm/boot/dts/rk3288-firefly.dtsi | 17 +++++++++++++++++
|
||||
1 file changed, 17 insertions(+)
|
||||
|
||||
diff --git a/arch/arm/boot/dts/rk3288-firefly.dtsi b/arch/arm/boot/dts/rk3288-firefly.dtsi
|
||||
index b9e6f3a9..9961acce 100644
|
||||
--- a/arch/arm/boot/dts/rk3288-firefly.dtsi
|
||||
+++ b/arch/arm/boot/dts/rk3288-firefly.dtsi
|
||||
@@ -606,6 +606,23 @@
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
+&vpu_mmu {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&vpu_service {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&hevc_mmu {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&hevc_service {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
&wdt {
|
||||
status = "okay";
|
||||
};
|
||||
+
|
||||
--
|
||||
2.14.1
|
||||
|
@@ -0,0 +1,48 @@
|
||||
From 4766516bcbf023813ad883c2d61c422316770d12 Mon Sep 17 00:00:00 2001
|
||||
From: Myy Miouyouyou <myy@miouyouyou.fr>
|
||||
Date: Tue, 21 Nov 2017 21:58:22 +0100
|
||||
Subject: [PATCH 5/5] ARM: DTSI: rk3288-veyron: Enable the Video encoding MMU
|
||||
and services
|
||||
|
||||
Enable the :
|
||||
* VPU MMU;
|
||||
* VPU Service;
|
||||
* HEVC MMU;
|
||||
* HEVC Service;
|
||||
for RK3288 Chromebook laptops.
|
||||
|
||||
Signed-off-by: Myy Miouyouyou <myy@miouyouyou.fr>
|
||||
---
|
||||
arch/arm/boot/dts/rk3288-veyron.dtsi | 16 ++++++++++++++++
|
||||
1 file changed, 16 insertions(+)
|
||||
|
||||
diff --git a/arch/arm/boot/dts/rk3288-veyron.dtsi b/arch/arm/boot/dts/rk3288-veyron.dtsi
|
||||
index 6e5bd897..517b9242 100644
|
||||
--- a/arch/arm/boot/dts/rk3288-veyron.dtsi
|
||||
+++ b/arch/arm/boot/dts/rk3288-veyron.dtsi
|
||||
@@ -450,6 +450,22 @@
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
+&vpu_mmu {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&vpu_service {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&hevc_mmu {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&hevc_service {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
&wdt {
|
||||
status = "okay";
|
||||
};
|
||||
--
|
||||
2.14.1
|
||||
|
@@ -0,0 +1,39 @@
|
||||
From 29ef524e8890bbfd24602a61e14234259df92349 Mon Sep 17 00:00:00 2001
|
||||
From: "Miouyouyou (Myy)" <myy@miouyouyou.fr>
|
||||
Date: Mon, 25 Jun 2018 17:05:37 +0200
|
||||
Subject: [PATCH 25/26] ARM: DTSI: rk3288: Renamed the VPU services clocks
|
||||
|
||||
In order to conform to the naming scheme used in the whole DTSI.
|
||||
|
||||
Signed-off-by: Miouyouyou (Myy) <myy@miouyouyou.fr>
|
||||
---
|
||||
arch/arm/boot/dts/rk3288.dtsi | 6 +++---
|
||||
1 file changed, 3 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/arch/arm/boot/dts/rk3288.dtsi b/arch/arm/boot/dts/rk3288.dtsi
|
||||
index 796609e3..45ec4e89 100644
|
||||
--- a/arch/arm/boot/dts/rk3288.dtsi
|
||||
+++ b/arch/arm/boot/dts/rk3288.dtsi
|
||||
@@ -1242,7 +1242,7 @@
|
||||
<GIC_SPI 10 IRQ_TYPE_LEVEL_HIGH>;
|
||||
interrupt-names = "irq_enc", "irq_dec";
|
||||
clocks = <&cru ACLK_VCODEC>, <&cru HCLK_VCODEC>;
|
||||
- clock-names = "aclk_vcodec", "hclk_vcodec";
|
||||
+ clock-names = "aclk", "iface";
|
||||
power-domains = <&power RK3288_PD_VIDEO>;
|
||||
rockchip,grf = <&grf>;
|
||||
resets = <&cru SRST_VCODEC_AXI>, <&cru SRST_VCODEC_AHB>;
|
||||
@@ -1277,8 +1277,8 @@
|
||||
<&cru SCLK_HEVC_CORE>,
|
||||
<&cru SCLK_HEVC_CABAC>;
|
||||
clock-names =
|
||||
- "aclk_vcodec",
|
||||
- "hclk_vcodec",
|
||||
+ "aclk",
|
||||
+ "iface",
|
||||
"clk_core",
|
||||
"clk_cabac";
|
||||
/*
|
||||
--
|
||||
2.16.4
|
||||
|
@@ -0,0 +1,56 @@
|
||||
From d3d3fe433d9038dcd1a98f4d6711c0777ed06703 Mon Sep 17 00:00:00 2001
|
||||
From: "Miouyouyou (Myy)" <myy@miouyouyou.fr>
|
||||
Date: Mon, 25 Jun 2018 17:08:32 +0200
|
||||
Subject: [PATCH 26/26] ARM: DTSI: rk3288: Set the VPU MMU power domains
|
||||
|
||||
Without that, the auto-activation of the VPU hardware IOMMU fails
|
||||
when enabling the hardware, before the "probe" phase of its device
|
||||
driver.
|
||||
|
||||
Basically, when loading a "of_platform" device driver targeting
|
||||
the VPU devices, you'll get these errors without this patch :
|
||||
|
||||
[12753.996950] rk_iommu ff9c0440.iommu: Error during raw reset. MMU_DTE_ADDR is not functioning
|
||||
[12754.007483] rk_iommu ff9c0440.iommu: Disable stall request timed out, status: 0xffffffff
|
||||
[12754.026652] rk_iommu ff9c0440.iommu: Disable paging request timed out, status: 0xffffffff
|
||||
[12754.045975] rk_iommu ff9c0440.iommu: Disable stall request timed out, status: 0xffffffff
|
||||
|
||||
When using this patch, the errors disappear.
|
||||
|
||||
This seems to be due to the IOMMU device sharing the same power domain
|
||||
than the device.
|
||||
When loading an "of_platform" driver, the kernel logic seems to try
|
||||
enabling the associated IOMMU device before letting the driver handles
|
||||
anything with the actual VPU hardware.
|
||||
It appears that setting the power domain of the VPU IOMMU nodes let the
|
||||
IOMMU driver enable the IOMMU shared power domain, and make the IOMMU
|
||||
device useable.
|
||||
|
||||
Signed-off-by: Miouyouyou (Myy) <myy@miouyouyou.fr>
|
||||
---
|
||||
arch/arm/boot/dts/rk3288.dtsi | 2 ++
|
||||
1 file changed, 2 insertions(+)
|
||||
|
||||
diff --git a/arch/arm/boot/dts/rk3288.dtsi b/arch/arm/boot/dts/rk3288.dtsi
|
||||
index 45ec4e89..46e1b8e2 100644
|
||||
--- a/arch/arm/boot/dts/rk3288.dtsi
|
||||
+++ b/arch/arm/boot/dts/rk3288.dtsi
|
||||
@@ -1230,6 +1230,7 @@
|
||||
interrupt-names = "vpu_mmu";
|
||||
clocks = <&cru ACLK_VCODEC>, <&cru HCLK_VCODEC>;
|
||||
clock-names = "aclk", "iface";
|
||||
+ power-domains = <&power RK3288_PD_VIDEO>;
|
||||
#iommu-cells = <0>;
|
||||
status = "disabled";
|
||||
};
|
||||
@@ -1262,6 +1263,7 @@
|
||||
interrupt-names = "hevc_mmu";
|
||||
clocks = <&cru ACLK_HEVC>, <&cru HCLK_HEVC>;
|
||||
clock-names = "aclk", "iface";
|
||||
+ power-domains = <&power RK3288_PD_HEVC>;
|
||||
#iommu-cells = <0>;
|
||||
status = "disabled";
|
||||
};
|
||||
--
|
||||
2.16.4
|
||||
|
@@ -0,0 +1,43 @@
|
||||
From 7f8607ba9a20f8ddb5c24559d9b875af762d4717 Mon Sep 17 00:00:00 2001
|
||||
From: "Miouyouyou (Myy)" <myy@miouyouyou.fr>
|
||||
Date: Tue, 11 Sep 2018 02:55:55 +0200
|
||||
Subject: [PATCH] ARM: dtsi: The VPU service as defined in the V4L2 driver
|
||||
|
||||
Let's try the V4L2 road.
|
||||
They've got a lot of things ready, like an entire H264
|
||||
movie with the V4L2 data of *every frame*.
|
||||
|
||||
That might help in this endless endeavour.
|
||||
|
||||
Signed-off-by: Miouyouyou (Myy) <myy@miouyouyou.fr>
|
||||
---
|
||||
arch/arm/boot/dts/rk3288.dtsi | 13 ++++++++++++-
|
||||
1 file changed, 12 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/arch/arm/boot/dts/rk3288.dtsi b/arch/arm/boot/dts/rk3288.dtsi
|
||||
index 72c36af6..d23c7fa5 100644
|
||||
--- a/arch/arm/boot/dts/rk3288.dtsi
|
||||
+++ b/arch/arm/boot/dts/rk3288.dtsi
|
||||
@@ -1246,7 +1246,18 @@
|
||||
clock-names = "aclk", "iface";
|
||||
power-domains = <&power RK3288_PD_VIDEO>;
|
||||
#iommu-cells = <0>;
|
||||
- status = "disabled";
|
||||
+ };
|
||||
+
|
||||
+ vpu: video-codec@ff9a0000 {
|
||||
+ clocks = <&cru ACLK_VCODEC>, <&cru HCLK_VCODEC>;
|
||||
+ clock-names = "aclk", "hclk";
|
||||
+ compatible = "rockchip,rk3288-vpu";
|
||||
+ interrupts = <GIC_SPI 9 IRQ_TYPE_LEVEL_HIGH>,
|
||||
+ <GIC_SPI 10 IRQ_TYPE_LEVEL_HIGH>;
|
||||
+ interrupt-names = "vepu", "vdpu";
|
||||
+ iommus = <&vpu_mmu>;
|
||||
+ power-domains = <&power RK3288_PD_VIDEO>;
|
||||
+ reg = <0x0 0xff9a0000 0x0 0x800>;
|
||||
};
|
||||
|
||||
hevc_mmu: iommu@ff9c0440 {
|
||||
--
|
||||
2.16.4
|
||||
|
@@ -0,0 +1,32 @@
|
||||
diff --git a/arch/arm/boot/dts/rk3288.dtsi b/arch/arm/boot/dts/rk3288.dtsi
|
||||
index bc3601a..37ae378 100644
|
||||
--- a/arch/arm/boot/dts/rk3288.dtsi
|
||||
+++ b/arch/arm/boot/dts/rk3288.dtsi
|
||||
@@ -467,13 +467,6 @@
|
||||
};
|
||||
|
||||
thermal-zones {
|
||||
- reserve_thermal: reserve_thermal {
|
||||
- polling-delay-passive = <1000>; /* milliseconds */
|
||||
- polling-delay = <5000>; /* milliseconds */
|
||||
-
|
||||
- thermal-sensors = <&tsadc 0>;
|
||||
- };
|
||||
-
|
||||
cpu_thermal: cpu_thermal {
|
||||
polling-delay-passive = <100>; /* milliseconds */
|
||||
polling-delay = <5000>; /* milliseconds */
|
||||
@@ -539,6 +532,13 @@
|
||||
};
|
||||
};
|
||||
};
|
||||
+
|
||||
+ reserve_thermal: reserve_thermal {
|
||||
+ polling-delay-passive = <1000>; /* milliseconds */
|
||||
+ polling-delay = <5000>; /* milliseconds */
|
||||
+
|
||||
+ thermal-sensors = <&tsadc 0>;
|
||||
+ };
|
||||
};
|
||||
|
||||
tsadc: tsadc@ff280000 {
|
@@ -0,0 +1,45 @@
|
||||
diff --git a/arch/arm/boot/dts/rk3288-tinker.dts b/arch/arm/boot/dts/rk3288-tinker.dts
|
||||
index 2601316da..08ec7aa4b 100644
|
||||
--- a/arch/arm/boot/dts/rk3288-tinker.dts
|
||||
+++ b/arch/arm/boot/dts/rk3288-tinker.dts
|
||||
@@ -210,8 +210,8 @@
|
||||
vdd_cpu: DCDC_REG1 {
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
- regulator-min-microvolt = <750000>;
|
||||
- regulator-max-microvolt = <1450000>;
|
||||
+ regulator-min-microvolt = <712500>;
|
||||
+ regulator-max-microvolt = <1500000>;
|
||||
regulator-name = "vdd_arm";
|
||||
regulator-ramp-delay = <6000>;
|
||||
regulator-state-mem {
|
||||
@@ -222,8 +222,8 @@
|
||||
vdd_gpu: DCDC_REG2 {
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
- regulator-min-microvolt = <850000>;
|
||||
- regulator-max-microvolt = <1250000>;
|
||||
+ regulator-min-microvolt = <712500>;
|
||||
+ regulator-max-microvolt = <1500000>;
|
||||
regulator-name = "vdd_gpu";
|
||||
regulator-ramp-delay = <6000>;
|
||||
regulator-state-mem {
|
||||
diff --git a/arch/arm/boot/dts/rk3288.dtsi b/arch/arm/boot/dts/rk3288.dtsi
|
||||
index 22bcaaa29..2fcd46098 100644
|
||||
--- a/arch/arm/boot/dts/rk3288.dtsi
|
||||
+++ b/arch/arm/boot/dts/rk3288.dtsi
|
||||
@@ -149,6 +149,14 @@
|
||||
opp-hz = /bits/ 64 <1608000000>;
|
||||
opp-microvolt = <1350000>;
|
||||
};
|
||||
+ opp@1704000000 {
|
||||
+ opp-hz = /bits/ 64 <1704000000>;
|
||||
+ opp-microvolt = <1350000>;
|
||||
+ };
|
||||
+ opp@1800000000 {
|
||||
+ opp-hz = /bits/ 64 <1800000000>;
|
||||
+ opp-microvolt = <1400000>;
|
||||
+ };
|
||||
};
|
||||
|
||||
amba {
|
@@ -0,0 +1,19 @@
|
||||
diff --git a/sound/usb/card.c b/sound/usb/card.c
|
||||
index 2bfe4e80a..cea93aaf5 100644
|
||||
--- a/sound/usb/card.c
|
||||
+++ b/sound/usb/card.c
|
||||
@@ -382,6 +382,14 @@ static void usb_audio_make_shortname(struct usb_device *dev,
|
||||
}
|
||||
|
||||
strim(card->shortname);
|
||||
+
|
||||
+ /* Tinker Board ALC4040 CODEC */
|
||||
+
|
||||
+ if(USB_ID_VENDOR(chip->usb_id) == 0x0bda &&
|
||||
+ USB_ID_PRODUCT(chip->usb_id) == 0x481a) {
|
||||
+ strlcat(card->shortname, " OnBoard", sizeof(card->shortname));
|
||||
+ }
|
||||
+
|
||||
}
|
||||
|
||||
static void usb_audio_make_longname(struct usb_device *dev,
|
@@ -0,0 +1,31 @@
|
||||
diff --git a/arch/arm/boot/dts/rk3288.dtsi b/arch/arm/boot/dts/rk3288.dtsi
|
||||
index 0840ffb3..5393f2cd 100644
|
||||
--- a/arch/arm/boot/dts/rk3288.dtsi
|
||||
+++ b/arch/arm/boot/dts/rk3288.dtsi
|
||||
@@ -894,6 +894,8 @@
|
||||
reg = <0x320>;
|
||||
clocks = <&cru SCLK_OTGPHY0>;
|
||||
clock-names = "phyclk";
|
||||
+ resets = <&cru SRST_USBOTG_PHY>;
|
||||
+ reset-names = "phy-reset";
|
||||
#clock-cells = <0>;
|
||||
};
|
||||
|
||||
@@ -902,6 +904,8 @@
|
||||
reg = <0x334>;
|
||||
clocks = <&cru SCLK_OTGPHY1>;
|
||||
clock-names = "phyclk";
|
||||
+ resets = <&cru SRST_USBHOST0_PHY>;
|
||||
+ reset-names = "phy-reset";
|
||||
#clock-cells = <0>;
|
||||
};
|
||||
|
||||
@@ -910,6 +914,8 @@
|
||||
reg = <0x348>;
|
||||
clocks = <&cru SCLK_OTGPHY2>;
|
||||
clock-names = "phyclk";
|
||||
+ resets = <&cru SRST_USBHOST1_PHY>;
|
||||
+ reset-names = "phy-reset";
|
||||
#clock-cells = <0>;
|
||||
};
|
||||
};
|
@@ -0,0 +1,68 @@
|
||||
diff --git a/drivers/usb/dwc2/core.h b/drivers/usb/dwc2/core.h
|
||||
index cc9c93af..3ff41d87 100644
|
||||
--- a/drivers/usb/dwc2/core.h
|
||||
+++ b/drivers/usb/dwc2/core.h
|
||||
@@ -1021,6 +1021,7 @@ struct dwc2_hsotg {
|
||||
u16 frame_number;
|
||||
|
||||
struct phy *phy;
|
||||
+ struct work_struct phy_rst_work;
|
||||
struct usb_phy *uphy;
|
||||
struct dwc2_hsotg_plat *plat;
|
||||
struct regulator_bulk_data supplies[DWC2_NUM_SUPPLIES];
|
||||
diff --git a/drivers/usb/dwc2/core_intr.c b/drivers/usb/dwc2/core_intr.c
|
||||
index 19ae2595..f1270bf1 100644
|
||||
--- a/drivers/usb/dwc2/core_intr.c
|
||||
+++ b/drivers/usb/dwc2/core_intr.c
|
||||
@@ -396,6 +396,7 @@ static void dwc2_wakeup_from_lpm_l1(struct dwc2_hsotg *hsotg)
|
||||
static void dwc2_handle_wakeup_detected_intr(struct dwc2_hsotg *hsotg)
|
||||
{
|
||||
int ret;
|
||||
+ struct device_node *np = hsotg->dev->of_node;
|
||||
|
||||
/* Clear interrupt */
|
||||
dwc2_writel(hsotg, GINTSTS_WKUPINT, GINTSTS);
|
||||
@@ -435,6 +436,16 @@ static void dwc2_handle_wakeup_detected_intr(struct dwc2_hsotg *hsotg)
|
||||
/* Restart the Phy Clock */
|
||||
pcgcctl &= ~PCGCTL_STOPPCLK;
|
||||
dwc2_writel(hsotg, pcgcctl, PCGCTL);
|
||||
+
|
||||
+ /*
|
||||
+ * It is a quirk in Rockchip RK3288, causing by
|
||||
+ * a hardware bug. This will propagate out and
|
||||
+ * eventually we'll re-enumerate the device.
|
||||
+ * Not great but the best we can do.
|
||||
+ */
|
||||
+ if (of_device_is_compatible(np, "rockchip,rk3288-usb"))
|
||||
+ schedule_work(&hsotg->phy_rst_work);
|
||||
+
|
||||
mod_timer(&hsotg->wkp_timer,
|
||||
jiffies + msecs_to_jiffies(71));
|
||||
} else {
|
||||
diff --git a/drivers/usb/dwc2/platform.c b/drivers/usb/dwc2/platform.c
|
||||
index 57764289..748763bd 100644
|
||||
--- a/drivers/usb/dwc2/platform.c
|
||||
+++ b/drivers/usb/dwc2/platform.c
|
||||
@@ -208,6 +208,14 @@ int dwc2_lowlevel_hw_disable(struct dwc2_hsotg *hsotg)
|
||||
return ret;
|
||||
}
|
||||
|
||||
+/* Only used to reset usb phy at interrupter runtime */
|
||||
+static void dwc2_reset_phy_work(struct work_struct *data)
|
||||
+{
|
||||
+ struct dwc2_hsotg *hsotg = container_of(data, struct dwc2_hsotg,
|
||||
+ phy_rst_work);
|
||||
+ phy_reset(hsotg->phy);
|
||||
+}
|
||||
+
|
||||
static int dwc2_lowlevel_hw_init(struct dwc2_hsotg *hsotg)
|
||||
{
|
||||
int i, ret;
|
||||
@@ -252,6 +260,7 @@ static int dwc2_lowlevel_hw_init(struct dwc2_hsotg *hsotg)
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
+ INIT_WORK(&hsotg->phy_rst_work, dwc2_reset_phy_work);
|
||||
|
||||
if (!hsotg->phy) {
|
||||
hsotg->uphy = devm_usb_get_phy(hsotg->dev, USB_PHY_TYPE_USB2);
|
@@ -0,0 +1,25 @@
|
||||
diff --git a/arch/arm/boot/dts/rk3288-tinker.dts b/arch/arm/boot/dts/rk3288-tinker.dts
|
||||
index 77554262..57cce114 100644
|
||||
--- a/arch/arm/boot/dts/rk3288-tinker.dts
|
||||
+++ b/arch/arm/boot/dts/rk3288-tinker.dts
|
||||
@@ -612,6 +612,20 @@
|
||||
vqmmc-supply = <&vccio_sd>;
|
||||
};
|
||||
|
||||
+&emmc {
|
||||
+ bus-width = <8>;
|
||||
+ cap-mmc-highspeed;
|
||||
+ disable-wp;
|
||||
+ non-removable;
|
||||
+ num-slots = <1>;
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&emmc_clk &emmc_cmd &emmc_pwr &emmc_bus8>;
|
||||
+ max-frequency = <150000000>;
|
||||
+ mmc-hs200-1_8v;
|
||||
+ mmc-ddr-1_8v;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
&tsadc {
|
||||
rockchip,hw-tshut-mode = <1>; /* tshut mode 0:CRU 1:GPIO */
|
||||
rockchip,hw-tshut-polarity = <1>; /* tshut polarity 0:LOW 1:HIGH */
|
@@ -0,0 +1,665 @@
|
||||
diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
|
||||
index 2d0b2f4c4..d5c9022e7 100644
|
||||
--- a/arch/arm/boot/dts/Makefile
|
||||
+++ b/arch/arm/boot/dts/Makefile
|
||||
@@ -859,6 +859,7 @@ dtb-$(CONFIG_ARCH_ROCKCHIP) += \
|
||||
rk3288-firefly-beta.dtb \
|
||||
rk3288-firefly.dtb \
|
||||
rk3288-firefly-reload.dtb \
|
||||
+ rk3288-miniarm.dtb \
|
||||
rk3288-miqi.dtb \
|
||||
rk3288-phycore-rdk.dtb \
|
||||
rk3288-popmetal.dtb \
|
||||
diff --git a/arch/arm/boot/dts/rk3288-miniarm.dts b/arch/arm/boot/dts/rk3288-miniarm.dts
|
||||
new file mode 100644
|
||||
index 000000000..d0961c35d
|
||||
--- /dev/null
|
||||
+++ b/arch/arm/boot/dts/rk3288-miniarm.dts
|
||||
@@ -0,0 +1,647 @@
|
||||
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
|
||||
+/*
|
||||
+ * Copyright (c) 2017 Fuzhou Rockchip Electronics Co., Ltd.
|
||||
+ */
|
||||
+
|
||||
+/dts-v1/;
|
||||
+
|
||||
+#include "rk3288.dtsi"
|
||||
+#include <dt-bindings/input/input.h>
|
||||
+#include <dt-bindings/clock/rockchip,rk808.h>
|
||||
+
|
||||
+/ {
|
||||
+ model = "Rockchip RK3288 Tinker Board";
|
||||
+ compatible = "asus,rk3288-tinker", "rockchip,rk3288";
|
||||
+
|
||||
+ chosen {
|
||||
+ stdout-path = "serial2:115200n8";
|
||||
+ };
|
||||
+
|
||||
+ memory {
|
||||
+ reg = <0x0 0x0 0x0 0x80000000>;
|
||||
+ device_type = "memory";
|
||||
+ };
|
||||
+
|
||||
+ ext_gmac: external-gmac-clock {
|
||||
+ compatible = "fixed-clock";
|
||||
+ #clock-cells = <0>;
|
||||
+ clock-frequency = <125000000>;
|
||||
+ clock-output-names = "ext_gmac";
|
||||
+ };
|
||||
+
|
||||
+ gpio-keys {
|
||||
+ compatible = "gpio-keys";
|
||||
+ #address-cells = <1>;
|
||||
+ #size-cells = <0>;
|
||||
+ autorepeat;
|
||||
+
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&pwrbtn>;
|
||||
+
|
||||
+ button@0 {
|
||||
+ gpios = <&gpio0 RK_PA5 GPIO_ACTIVE_LOW>;
|
||||
+ linux,code = <KEY_POWER>;
|
||||
+ label = "GPIO Key Power";
|
||||
+ linux,input-type = <1>;
|
||||
+ wakeup-source;
|
||||
+ debounce-interval = <100>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ gpio-leds {
|
||||
+ compatible = "gpio-leds";
|
||||
+
|
||||
+ act-led {
|
||||
+ gpios=<&gpio1 RK_PD0 GPIO_ACTIVE_HIGH>;
|
||||
+ linux,default-trigger="mmc0";
|
||||
+ };
|
||||
+
|
||||
+ heartbeat-led {
|
||||
+ gpios=<&gpio1 RK_PD1 GPIO_ACTIVE_HIGH>;
|
||||
+ linux,default-trigger="heartbeat";
|
||||
+ };
|
||||
+
|
||||
+ pwr-led {
|
||||
+ gpios = <&gpio0 RK_PA3 GPIO_ACTIVE_HIGH>;
|
||||
+ linux,default-trigger = "default-on";
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ sound {
|
||||
+ compatible = "simple-audio-card";
|
||||
+ simple-audio-card,format = "i2s";
|
||||
+ simple-audio-card,name = "rockchip,tinker-codec";
|
||||
+ simple-audio-card,mclk-fs = <512>;
|
||||
+
|
||||
+ simple-audio-card,codec {
|
||||
+ sound-dai = <&hdmi>;
|
||||
+ };
|
||||
+
|
||||
+ simple-audio-card,cpu {
|
||||
+ sound-dai = <&i2s>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ /* This is essential to get SDIO devices working.
|
||||
+ The Wifi depends on SDIO ! */
|
||||
+ sdio_pwrseq: sdio-pwrseq {
|
||||
+ compatible = "mmc-pwrseq-simple";
|
||||
+ clocks = <&rk808 RK808_CLKOUT1>;
|
||||
+ clock-names = "ext_clock";
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&chip_enable_h>, <&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 = <&gpio4 RK_PD4 GPIO_ACTIVE_LOW>, <&gpio4 RK_PD3 GPIO_ACTIVE_LOW>;
|
||||
+ };
|
||||
+
|
||||
+ vcc_sys: vsys-regulator {
|
||||
+ compatible = "regulator-fixed";
|
||||
+ regulator-name = "vcc_sys";
|
||||
+ regulator-min-microvolt = <5000000>;
|
||||
+ regulator-max-microvolt = <5000000>;
|
||||
+ regulator-always-on;
|
||||
+ regulator-boot-on;
|
||||
+ };
|
||||
+
|
||||
+ vcc_sd: sdmmc-regulator {
|
||||
+ compatible = "regulator-fixed";
|
||||
+ gpio = <&gpio7 11 GPIO_ACTIVE_LOW>;
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&sdmmc_pwr>;
|
||||
+ regulator-name = "vcc_sd";
|
||||
+ regulator-min-microvolt = <3300000>;
|
||||
+ regulator-max-microvolt = <3300000>;
|
||||
+ startup-delay-us = <100000>;
|
||||
+ vin-supply = <&vcc_io>;
|
||||
+ };
|
||||
+
|
||||
+ wireless-wlan {
|
||||
+ compatible = "wlan-platdata";
|
||||
+ rockchip,grf = <&grf>;
|
||||
+ wifi_chip_type = "8723bs";
|
||||
+ sdio_vref = <1800>;
|
||||
+ WIFI,host_wake_irq = <&gpio4 30 GPIO_ACTIVE_HIGH>;
|
||||
+ status = "okay";
|
||||
+ };
|
||||
+/*
|
||||
+ wireless-bluetooth {
|
||||
+ compatible = "bluetooth-platdata";
|
||||
+ uart_rts_gpios = <&gpio4 19 GPIO_ACTIVE_LOW>;
|
||||
+ pinctrl-names = "default","rts_gpio";
|
||||
+ pinctrl-0 = <&uart0_rts>;
|
||||
+ pinctrl-1 = <&uart0_gpios>;
|
||||
+ BT,reset_gpio = <&gpio4 29 GPIO_ACTIVE_HIGH>;
|
||||
+ BT,wake_gpio = <&gpio4 26 GPIO_ACTIVE_HIGH>;
|
||||
+ BT,wake_host_irq = <&gpio4 31 GPIO_ACTIVE_HIGH>;
|
||||
+ status = "okay";
|
||||
+ };
|
||||
+*/
|
||||
+
|
||||
+};
|
||||
+
|
||||
+&cpu0 {
|
||||
+ cpu0-supply = <&vdd_cpu>;
|
||||
+};
|
||||
+
|
||||
+&gmac {
|
||||
+ assigned-clocks = <&cru SCLK_MAC>;
|
||||
+ assigned-clock-parents = <&ext_gmac>;
|
||||
+ clock_in_out = "input";
|
||||
+ phy-mode = "rgmii";
|
||||
+ phy-supply = <&vcc33_lan>;
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&rgmii_pins>;
|
||||
+ snps,reset-gpio = <&gpio4 7 0>;
|
||||
+ snps,reset-active-low;
|
||||
+ snps,reset-delays-us = <0 10000 1000000>;
|
||||
+ tx_delay = <0x30>;
|
||||
+ rx_delay = <0x10>;
|
||||
+ status = "ok";
|
||||
+};
|
||||
+
|
||||
+&gpu {
|
||||
+ mali-supply = <&vdd_gpu>;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&hdmi {
|
||||
+ ddc-i2c-bus = <&i2c5>;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&i2c0 {
|
||||
+ clock-frequency = <400000>;
|
||||
+ status = "okay";
|
||||
+
|
||||
+ rk808: pmic@1b {
|
||||
+ compatible = "rockchip,rk808";
|
||||
+ reg = <0x1b>;
|
||||
+ interrupt-parent = <&gpio0>;
|
||||
+ interrupts = <4 IRQ_TYPE_LEVEL_LOW>;
|
||||
+ #clock-cells = <1>;
|
||||
+ clock-output-names = "xin32k", "rk808-clkout2";
|
||||
+ dvs-gpios = <&gpio0 11 GPIO_ACTIVE_HIGH>,
|
||||
+ <&gpio0 12 GPIO_ACTIVE_HIGH>;
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&pmic_int &global_pwroff &dvs_1 &dvs_2>;
|
||||
+ rockchip,system-power-controller;
|
||||
+ wakeup-source;
|
||||
+
|
||||
+ vcc1-supply = <&vcc_sys>;
|
||||
+ vcc2-supply = <&vcc_sys>;
|
||||
+ vcc3-supply = <&vcc_sys>;
|
||||
+ vcc4-supply = <&vcc_sys>;
|
||||
+ vcc6-supply = <&vcc_sys>;
|
||||
+ vcc7-supply = <&vcc_sys>;
|
||||
+ vcc8-supply = <&vcc_io>;
|
||||
+ vcc9-supply = <&vcc_io>;
|
||||
+ vcc10-supply = <&vcc_io>;
|
||||
+ vcc11-supply = <&vcc_sys>;
|
||||
+ vcc12-supply = <&vcc_io>;
|
||||
+ vddio-supply = <&vcc_io>;
|
||||
+
|
||||
+ regulators {
|
||||
+ vdd_cpu: DCDC_REG1 {
|
||||
+ regulator-always-on;
|
||||
+ regulator-boot-on;
|
||||
+ regulator-min-microvolt = <712500>;
|
||||
+ regulator-max-microvolt = <1500000>;
|
||||
+ regulator-name = "vdd_arm";
|
||||
+ regulator-ramp-delay = <6000>;
|
||||
+ regulator-state-mem {
|
||||
+ regulator-off-in-suspend;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ vdd_gpu: DCDC_REG2 {
|
||||
+ regulator-always-on;
|
||||
+ regulator-boot-on;
|
||||
+ regulator-min-microvolt = <712500>;
|
||||
+ regulator-max-microvolt = <1500000>;
|
||||
+ regulator-name = "vdd_gpu";
|
||||
+ regulator-ramp-delay = <6000>;
|
||||
+ regulator-state-mem {
|
||||
+ regulator-on-in-suspend;
|
||||
+ regulator-suspend-microvolt = <1000000>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ vcc_ddr: DCDC_REG3 {
|
||||
+ regulator-always-on;
|
||||
+ regulator-boot-on;
|
||||
+ regulator-name = "vcc_ddr";
|
||||
+ regulator-state-mem {
|
||||
+ regulator-on-in-suspend;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ vcc_io: DCDC_REG4 {
|
||||
+ regulator-always-on;
|
||||
+ regulator-boot-on;
|
||||
+ regulator-min-microvolt = <3300000>;
|
||||
+ regulator-max-microvolt = <3300000>;
|
||||
+ regulator-name = "vcc_io";
|
||||
+ regulator-state-mem {
|
||||
+ regulator-on-in-suspend;
|
||||
+ regulator-suspend-microvolt = <3300000>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ vcc18_ldo1: LDO_REG1 {
|
||||
+ regulator-always-on;
|
||||
+ regulator-boot-on;
|
||||
+ regulator-min-microvolt = <1800000>;
|
||||
+ regulator-max-microvolt = <1800000>;
|
||||
+ regulator-name = "vcc18_ldo1";
|
||||
+ regulator-state-mem {
|
||||
+ regulator-on-in-suspend;
|
||||
+ regulator-suspend-microvolt = <1800000>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ vcc33_mipi: LDO_REG2 {
|
||||
+ regulator-always-on;
|
||||
+ regulator-boot-on;
|
||||
+ regulator-min-microvolt = <3300000>;
|
||||
+ regulator-max-microvolt = <3300000>;
|
||||
+ regulator-name = "vcc33_mipi";
|
||||
+ regulator-state-mem {
|
||||
+ regulator-off-in-suspend;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ vdd_10: LDO_REG3 {
|
||||
+ regulator-always-on;
|
||||
+ regulator-boot-on;
|
||||
+ regulator-min-microvolt = <1000000>;
|
||||
+ regulator-max-microvolt = <1000000>;
|
||||
+ regulator-name = "vdd_10";
|
||||
+ regulator-state-mem {
|
||||
+ regulator-on-in-suspend;
|
||||
+ regulator-suspend-microvolt = <1000000>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ vcc18_codec: LDO_REG4 {
|
||||
+ regulator-always-on;
|
||||
+ regulator-boot-on;
|
||||
+ regulator-min-microvolt = <1800000>;
|
||||
+ regulator-max-microvolt = <1800000>;
|
||||
+ regulator-name = "vcc18_codec";
|
||||
+ regulator-state-mem {
|
||||
+ regulator-on-in-suspend;
|
||||
+ regulator-suspend-microvolt = <1800000>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ vccio_sd: LDO_REG5 {
|
||||
+ regulator-always-on;
|
||||
+ regulator-boot-on;
|
||||
+ regulator-min-microvolt = <1800000>;
|
||||
+ regulator-max-microvolt = <3300000>;
|
||||
+ regulator-name = "vccio_sd";
|
||||
+ regulator-state-mem {
|
||||
+ regulator-on-in-suspend;
|
||||
+ regulator-suspend-microvolt = <3300000>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ vdd10_lcd: LDO_REG6 {
|
||||
+ regulator-always-on;
|
||||
+ regulator-boot-on;
|
||||
+ regulator-min-microvolt = <1000000>;
|
||||
+ regulator-max-microvolt = <1000000>;
|
||||
+ regulator-name = "vdd10_lcd";
|
||||
+ regulator-state-mem {
|
||||
+ regulator-on-in-suspend;
|
||||
+ regulator-suspend-microvolt = <1000000>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ vcc_18: LDO_REG7 {
|
||||
+ regulator-always-on;
|
||||
+ regulator-boot-on;
|
||||
+ regulator-min-microvolt = <1800000>;
|
||||
+ regulator-max-microvolt = <1800000>;
|
||||
+ regulator-name = "vcc_18";
|
||||
+ regulator-state-mem {
|
||||
+ regulator-on-in-suspend;
|
||||
+ regulator-suspend-microvolt = <1800000>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ vcc18_lcd: LDO_REG8 {
|
||||
+ regulator-always-on;
|
||||
+ regulator-boot-on;
|
||||
+ regulator-min-microvolt = <1800000>;
|
||||
+ regulator-max-microvolt = <1800000>;
|
||||
+ regulator-name = "vcc18_lcd";
|
||||
+ regulator-state-mem {
|
||||
+ regulator-on-in-suspend;
|
||||
+ regulator-suspend-microvolt = <1800000>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ vcc33_sd: SWITCH_REG1 {
|
||||
+ regulator-boot-on;
|
||||
+ regulator-name = "vcc33_sd";
|
||||
+ regulator-state-mem {
|
||||
+ regulator-on-in-suspend;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ vcc33_lan: SWITCH_REG2 {
|
||||
+ regulator-always-on;
|
||||
+ regulator-boot-on;
|
||||
+ regulator-name = "vcc33_lan";
|
||||
+ regulator-state-mem {
|
||||
+ regulator-on-in-suspend;
|
||||
+ };
|
||||
+ };
|
||||
+ };
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&i2c1 {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&i2c2 {
|
||||
+ status = "okay";
|
||||
+
|
||||
+ afc0:af-controller@0 {
|
||||
+ status = "okay";
|
||||
+ compatible = "silicon touch,vm149C-v4l2-i2c-subdev";
|
||||
+ reg = <0x0c>;
|
||||
+ };
|
||||
+
|
||||
+ eeprom:m24c08@50 {
|
||||
+ compatible = "at,24c08";
|
||||
+ reg = <0x50>;
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&i2c3 {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&i2c4 {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&i2c5 {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&i2s {
|
||||
+ #sound-dai-cells = <0>;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&io_domains {
|
||||
+ status = "okay";
|
||||
+ rockchip,grf = <&grf>;
|
||||
+ wifi-supply = <&vcc_18>;
|
||||
+ sdcard-supply = <&vccio_sd>;
|
||||
+};
|
||||
+
|
||||
+&sdio0 {
|
||||
+ status = "okay";
|
||||
+ clock-frequency = <50000000>;
|
||||
+ clock-freq-min-max = <200000 50000000>;
|
||||
+ bus-width = <4>;
|
||||
+ cap-sd-highspeed;
|
||||
+ cap-sdio-irq;
|
||||
+ disable-wp;
|
||||
+ keep-power-in-suspend;
|
||||
+ mmc-pwrseq = <&sdio_pwrseq>;
|
||||
+ non-removable;
|
||||
+ num-slots = <1>;
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&sdio0_bus4 &sdio0_cmd &sdio0_clk>;
|
||||
+ sd-uhs-sdr104;
|
||||
+ supports-sdio;
|
||||
+
|
||||
+};
|
||||
+
|
||||
+&pinctrl {
|
||||
+ pcfg_pull_none_drv_8ma: pcfg-pull-none-drv-8ma {
|
||||
+ drive-strength = <8>;
|
||||
+ };
|
||||
+
|
||||
+ pcfg_pull_up_drv_8ma: pcfg-pull-up-drv-8ma {
|
||||
+ bias-pull-up;
|
||||
+ drive-strength = <8>;
|
||||
+ };
|
||||
+
|
||||
+ backlight {
|
||||
+ bl_en: bl-en {
|
||||
+ rockchip,pins = <7 2 RK_FUNC_GPIO &pcfg_pull_none>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ buttons {
|
||||
+ pwrbtn: pwrbtn {
|
||||
+ rockchip,pins = <0 5 RK_FUNC_GPIO &pcfg_pull_up>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ eth_phy {
|
||||
+ eth_phy_pwr: eth-phy-pwr {
|
||||
+ rockchip,pins = <0 6 RK_FUNC_GPIO &pcfg_pull_none>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ pmic {
|
||||
+ pmic_int: pmic-int {
|
||||
+ rockchip,pins = <RK_GPIO0 4 RK_FUNC_GPIO \
|
||||
+ &pcfg_pull_up>;
|
||||
+ };
|
||||
+
|
||||
+ dvs_1: dvs-1 {
|
||||
+ rockchip,pins = <RK_GPIO0 11 RK_FUNC_GPIO \
|
||||
+ &pcfg_pull_down>;
|
||||
+ };
|
||||
+
|
||||
+ dvs_2: dvs-2 {
|
||||
+ rockchip,pins = <RK_GPIO0 12 RK_FUNC_GPIO \
|
||||
+ &pcfg_pull_down>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ sdio-pwrseq {
|
||||
+ wifi_enable_h: wifienable-h {
|
||||
+ rockchip,pins = <4 28 RK_FUNC_GPIO &pcfg_pull_none>;
|
||||
+ };
|
||||
+
|
||||
+ chip_enable_h: chip-enable-h {
|
||||
+ rockchip,pins = <4 27 RK_FUNC_GPIO &pcfg_pull_none>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ sdmmc {
|
||||
+ sdmmc_bus4: sdmmc-bus4 {
|
||||
+ rockchip,pins = <6 16 RK_FUNC_1 &pcfg_pull_up_drv_8ma>,
|
||||
+ <6 17 RK_FUNC_1 &pcfg_pull_up_drv_8ma>,
|
||||
+ <6 18 RK_FUNC_1 &pcfg_pull_up_drv_8ma>,
|
||||
+ <6 19 RK_FUNC_1 &pcfg_pull_up_drv_8ma>;
|
||||
+ };
|
||||
+
|
||||
+ sdmmc_clk: sdmmc-clk {
|
||||
+ rockchip,pins = <6 20 RK_FUNC_1 \
|
||||
+ &pcfg_pull_none_drv_8ma>;
|
||||
+ };
|
||||
+
|
||||
+ sdmmc_cmd: sdmmc-cmd {
|
||||
+ rockchip,pins = <6 21 RK_FUNC_1 &pcfg_pull_up_drv_8ma>;
|
||||
+ };
|
||||
+
|
||||
+ sdmmc_pwr: sdmmc-pwr {
|
||||
+ rockchip,pins = <7 11 RK_FUNC_GPIO &pcfg_pull_none>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ usb {
|
||||
+ host_vbus_drv: host-vbus-drv {
|
||||
+ rockchip,pins = <0 14 RK_FUNC_GPIO &pcfg_pull_none>;
|
||||
+ };
|
||||
+
|
||||
+ pwr_3g: pwr-3g {
|
||||
+ rockchip,pins = <7 8 RK_FUNC_GPIO &pcfg_pull_none>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ wireless-bluetooth {
|
||||
+ uart0_gpios: uart0-gpios {
|
||||
+ rockchip,pins = <4 19 RK_FUNC_GPIO &pcfg_pull_none>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+};
|
||||
+
|
||||
+&pwm0 {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&saradc {
|
||||
+ vref-supply = <&vcc18_ldo1>;
|
||||
+ status ="okay";
|
||||
+};
|
||||
+
|
||||
+&sdmmc {
|
||||
+ bus-width = <4>;
|
||||
+ cap-mmc-highspeed;
|
||||
+ cap-sd-highspeed;
|
||||
+ card-detect-delay = <200>;
|
||||
+ disable-wp; /* wp not hooked up */
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&sdmmc_clk &sdmmc_cmd &sdmmc_cd &sdmmc_bus4>;
|
||||
+ sd-uhs-sdr12;
|
||||
+ sd-uhs-sdr25;
|
||||
+ sd-uhs-sdr50;
|
||||
+ sd-uhs-sdr104;
|
||||
+ status = "okay";
|
||||
+ supports-sd;
|
||||
+ vmmc-supply = <&vcc33_sd>;
|
||||
+ vqmmc-supply = <&vccio_sd>;
|
||||
+};
|
||||
+
|
||||
+&emmc {
|
||||
+ bus-width = <8>;
|
||||
+ cap-mmc-highspeed;
|
||||
+ disable-wp;
|
||||
+ non-removable;
|
||||
+ num-slots = <1>;
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&emmc_clk &emmc_cmd &emmc_pwr &emmc_bus8>;
|
||||
+ max-frequency = <150000000>;
|
||||
+ mmc-hs200-1_8v;
|
||||
+ mmc-ddr-1_8v;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&tsadc {
|
||||
+ rockchip,hw-tshut-mode = <1>; /* tshut mode 0:CRU 1:GPIO */
|
||||
+ rockchip,hw-tshut-polarity = <1>; /* tshut polarity 0:LOW 1:HIGH */
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&uart0 {
|
||||
+ status = "okay";
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&uart0_xfer>, <&uart0_cts>, <&uart0_rts>;
|
||||
+};
|
||||
+
|
||||
+&uart1 {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&uart2 {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&uart3 {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&uart4 {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&usbphy {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&usb_host0_ehci {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&usb_host1 {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&usb_otg {
|
||||
+ status= "okay";
|
||||
+};
|
||||
+
|
||||
+&vopb {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&vopb_mmu {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&vopl {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&vopl_mmu {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&vpu_mmu {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&vpu_service {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&hevc_mmu {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&hevc_service {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&wdt {
|
||||
+ status = "okay";
|
||||
+};
|
@@ -0,0 +1,23 @@
|
||||
diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c
|
||||
index a907d7b06..ec71996c7 100644
|
||||
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c
|
||||
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c
|
||||
@@ -619,13 +619,17 @@ BRCMF_FW_DEF(4354, "brcmfmac4354-sdio");
|
||||
BRCMF_FW_DEF(4356, "brcmfmac4356-sdio");
|
||||
BRCMF_FW_DEF(4373, "brcmfmac4373-sdio");
|
||||
|
||||
+/* AMPAK */
|
||||
+BRCMF_FW_DEF(AP6330, "brcmfmac-ap6330-sdio");
|
||||
+
|
||||
static const struct brcmf_firmware_mapping brcmf_sdio_fwnames[] = {
|
||||
BRCMF_FW_ENTRY(BRCM_CC_43143_CHIP_ID, 0xFFFFFFFF, 43143),
|
||||
BRCMF_FW_ENTRY(BRCM_CC_43241_CHIP_ID, 0x0000001F, 43241B0),
|
||||
BRCMF_FW_ENTRY(BRCM_CC_43241_CHIP_ID, 0x00000020, 43241B4),
|
||||
BRCMF_FW_ENTRY(BRCM_CC_43241_CHIP_ID, 0xFFFFFFC0, 43241B5),
|
||||
BRCMF_FW_ENTRY(BRCM_CC_4329_CHIP_ID, 0xFFFFFFFF, 4329),
|
||||
- BRCMF_FW_ENTRY(BRCM_CC_4330_CHIP_ID, 0xFFFFFFFF, 4330),
|
||||
+ BRCMF_FW_ENTRY(BRCM_CC_4330_CHIP_ID, 0xFFFFFFEF, 4330),
|
||||
+ BRCMF_FW_ENTRY(BRCM_CC_4330_CHIP_ID, 0x10, AP6330),
|
||||
BRCMF_FW_ENTRY(BRCM_CC_4334_CHIP_ID, 0xFFFFFFFF, 4334),
|
||||
BRCMF_FW_ENTRY(BRCM_CC_43340_CHIP_ID, 0xFFFFFFFF, 43340),
|
||||
BRCMF_FW_ENTRY(BRCM_CC_43341_CHIP_ID, 0xFFFFFFFF, 43340),
|
@@ -0,0 +1,13 @@
|
||||
diff --git a/arch/arm/boot/dts/rk3288-tinker.dts b/arch/arm/boot/dts/rk3288-tinker.dts
|
||||
index 958c0f3bf..59b8d8eac 100644
|
||||
--- a/arch/arm/boot/dts/rk3288-tinker.dts
|
||||
+++ b/arch/arm/boot/dts/rk3288-tinker.dts
|
||||
@@ -70,7 +70,7 @@
|
||||
sound {
|
||||
compatible = "simple-audio-card";
|
||||
simple-audio-card,format = "i2s";
|
||||
- simple-audio-card,name = "rockchip,tinker-codec";
|
||||
+ simple-audio-card,name = "DW-I2S-HDMI";
|
||||
simple-audio-card,mclk-fs = <512>;
|
||||
|
||||
simple-audio-card,codec {
|
@@ -0,0 +1,27 @@
|
||||
diff --git a/arch/arm64/mm/dma-mapping.c b/arch/arm64/mm/dma-mapping.c
|
||||
index 3216e09..21bce28
|
||||
--- a/arch/arm64/mm/dma-mapping.c
|
||||
+++ b/arch/arm64/mm/dma-mapping.c
|
||||
@@ -44,7 +44,7 @@ static pgprot_t __get_dma_pgprot(unsigned long attrs, pgprot_t prot,
|
||||
|
||||
static struct gen_pool *atomic_pool;
|
||||
|
||||
-#define DEFAULT_DMA_COHERENT_POOL_SIZE SZ_256K
|
||||
+#define DEFAULT_DMA_COHERENT_POOL_SIZE SZ_2M
|
||||
static size_t atomic_pool_size __initdata = DEFAULT_DMA_COHERENT_POOL_SIZE;
|
||||
|
||||
static int __init early_coherent_pool(char *p)
|
||||
|
||||
diff --git a/arch/arm/mm/dma-mapping.c b/arch/arm/mm/dma-mapping.c
|
||||
index ada8eb2..8df220f
|
||||
--- a/arch/arm/mm/dma-mapping.c
|
||||
+++ b/arch/arm/mm/dma-mapping.c
|
||||
@@ -381,7 +381,7 @@ static void __dma_free_remap(void *cpu_addr, size_t size)
|
||||
VM_ARM_DMA_CONSISTENT | VM_USERMAP);
|
||||
}
|
||||
|
||||
-#define DEFAULT_DMA_COHERENT_POOL_SIZE SZ_256K
|
||||
+#define DEFAULT_DMA_COHERENT_POOL_SIZE SZ_2M
|
||||
static struct gen_pool *atomic_pool __ro_after_init;
|
||||
|
||||
static size_t atomic_pool_size __initdata = DEFAULT_DMA_COHERENT_POOL_SIZE;
|
@@ -0,0 +1,24 @@
|
||||
diff --git a/drivers/net/wireless/Kconfig b/drivers/net/wireless/Kconfig
|
||||
index 95cdb48fad061..db9ee74578012 100644
|
||||
--- a/drivers/net/wireless/Kconfig
|
||||
+++ b/drivers/net/wireless/Kconfig
|
||||
@@ -32,6 +32,7 @@ config WIRELESS_WDS
|
||||
|
||||
source "drivers/net/wireless/admtek/Kconfig"
|
||||
source "drivers/net/wireless/ath/Kconfig"
|
||||
+source "drivers/net/wireless/rtl8188eu/Kconfig"
|
||||
source "drivers/net/wireless/atmel/Kconfig"
|
||||
source "drivers/net/wireless/broadcom/Kconfig"
|
||||
source "drivers/net/wireless/cisco/Kconfig"
|
||||
diff --git a/drivers/net/wireless/Makefile b/drivers/net/wireless/Makefile
|
||||
index edeb51f6fa551..2c4d8522929bf 100644
|
||||
--- a/drivers/net/wireless/Makefile
|
||||
+++ b/drivers/net/wireless/Makefile
|
||||
@@ -5,6 +5,7 @@
|
||||
|
||||
obj-$(CONFIG_WLAN_VENDOR_ADMTEK) += admtek/
|
||||
obj-$(CONFIG_WLAN_VENDOR_ATH) += ath/
|
||||
+obj-$(CONFIG_RTL8188EU) += rtl8188eu/
|
||||
obj-$(CONFIG_WLAN_VENDOR_ATMEL) += atmel/
|
||||
obj-$(CONFIG_WLAN_VENDOR_BROADCOM) += broadcom/
|
||||
obj-$(CONFIG_WLAN_VENDOR_CISCO) += cisco/
|
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,972 @@
|
||||
--- /dev/null
|
||||
+++ b/arch/arm/boot/dts/rk3288-xt-q8l-v10.dts 2018-12-06 21:46:51.493688015 +0000
|
||||
@@ -0,0 +1,969 @@
|
||||
+/*
|
||||
+ * Copyright (c) 2014, 2015 FUKAUMI Naoki <naobsd@gmail.com>
|
||||
+ * 2018 Paolo Sabatino <paolo.sabatino@gm**l.com>
|
||||
+ *
|
||||
+ * This file is dual-licensed: you can use it either under the terms
|
||||
+ * of the GPL or the X11 license, at your option. Note that this dual
|
||||
+ * licensing only applies to this file, and not this project as a
|
||||
+ * whole.
|
||||
+ *
|
||||
+ * a) This file is free software; you can redistribute it and/or
|
||||
+ * modify it under the terms of the GNU General Public License as
|
||||
+ * published by the Free Software Foundation; either version 2 of the
|
||||
+ * License, or (at your option) any later version.
|
||||
+ *
|
||||
+ * This file is distributed in the hope that it will be useful,
|
||||
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
+ * GNU General Public License for more details.
|
||||
+ *
|
||||
+ * Or, alternatively,
|
||||
+ *
|
||||
+ * b) Permission is hereby granted, free of charge, to any person
|
||||
+ * obtaining a copy of this software and associated documentation
|
||||
+ * files (the "Software"), to deal in the Software without
|
||||
+ * restriction, including without limitation the rights to use,
|
||||
+ * copy, modify, merge, publish, distribute, sublicense, and/or
|
||||
+ * sell copies of the Software, and to permit persons to whom the
|
||||
+ * Software is furnished to do so, subject to the following
|
||||
+ * conditions:
|
||||
+ *
|
||||
+ * The above copyright notice and this permission notice shall be
|
||||
+ * included in all copies or substantial portions of the Software.
|
||||
+ *
|
||||
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
|
||||
+ * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
|
||||
+ * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
+ * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||
+ * OTHER DEALINGS IN THE SOFTWARE.
|
||||
+ */
|
||||
+
|
||||
+/dts-v1/;
|
||||
+
|
||||
+#include "rk3288.dtsi"
|
||||
+#include <dt-bindings/input/input.h>
|
||||
+
|
||||
+/ {
|
||||
+ model = "XT-Q8L-V10-RK3288";
|
||||
+ compatible = "generic,xt-q8l-v10-rk3288", "rockchip,rk3288";
|
||||
+
|
||||
+ memory {
|
||||
+ reg = <0x0 0x0 0x0 0x80000000>;
|
||||
+ device_type = "memory";
|
||||
+ };
|
||||
+
|
||||
+ cpu0_opp_table: opp_table {
|
||||
+ compatible = "operating-points-v2";
|
||||
+ opp-shared;
|
||||
+
|
||||
+ opp@600000000 {
|
||||
+ opp-hz = /bits/ 64 <600000000>;
|
||||
+ opp-microvolt = <900000>;
|
||||
+ };
|
||||
+ opp@816000000 {
|
||||
+ opp-hz = /bits/ 64 <816000000>;
|
||||
+ opp-microvolt = <1000000>;
|
||||
+ };
|
||||
+ opp@1008000000 {
|
||||
+ opp-hz = /bits/ 64 <1008000000>;
|
||||
+ opp-microvolt = <1050000>;
|
||||
+ };
|
||||
+ opp@1200000000 {
|
||||
+ opp-hz = /bits/ 64 <1200000000>;
|
||||
+ opp-microvolt = <1100000>;
|
||||
+ };
|
||||
+ opp@1416000000 {
|
||||
+ opp-hz = /bits/ 64 <1416000000>;
|
||||
+ opp-microvolt = <1200000>;
|
||||
+ };
|
||||
+ opp@1512000000 {
|
||||
+ opp-hz = /bits/ 64 <1512000000>;
|
||||
+ opp-microvolt = <1250000>;
|
||||
+ };
|
||||
+ opp@1608000000 {
|
||||
+ opp-hz = /bits/ 64 <1608000000>;
|
||||
+ opp-microvolt = <1300000>;
|
||||
+ };
|
||||
+ /*
|
||||
+ opp@1704000000 {
|
||||
+ opp-hz = /bits/ 64 <1704000000>;
|
||||
+ opp-microvolt = <1350000>;
|
||||
+ };
|
||||
+ opp@1800000000 {
|
||||
+ opp-hz = /bits/ 64 <1800000000>;
|
||||
+ opp-microvolt = <1400000>;
|
||||
+ };
|
||||
+ */
|
||||
+ };
|
||||
+
|
||||
+ /*
|
||||
+ * Peripheral from original q8 device tree, currently no references
|
||||
+ * for drivers in linux kernel.
|
||||
+ rockchip-hsadc@ff080000 {
|
||||
+ compatible = "rockchip-hsadc";
|
||||
+ reg = <0xff080000 0x4000>;
|
||||
+ interrupts = <0x0 0x1f 0x4>;
|
||||
+ #address-cells = <0x1>;
|
||||
+ #size-cells = <0x0>;
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <0x9a>;
|
||||
+ clocks = <0x79 0x7 0x8 0x39>;
|
||||
+ clock-names = "hclk_hsadc", "clk_hsadc_out", "clk_hsadc_ext";
|
||||
+ dmas = <0x9b 0x0>;
|
||||
+ dma-names = "data";
|
||||
+ status = "disabled";
|
||||
+ };
|
||||
+ */
|
||||
+
|
||||
+ ext_gmac: external-gmac-clock {
|
||||
+ compatible = "fixed-clock";
|
||||
+ #clock-cells = <0>;
|
||||
+ clock-frequency = <125000000>;
|
||||
+ clock-output-names = "ext_gmac";
|
||||
+ };
|
||||
+
|
||||
+ /*
|
||||
+ * Handle the IR receiver using the gpio-ir-receiver kernel module.
|
||||
+ * This works flawlessy, the original xt-q8l-v10 remote uses a NEC
|
||||
+ * protocol and the keymap rc-xt-q8l-v10 has to be compiled in the
|
||||
+ * kernel for the remote to work as an input device
|
||||
+ */
|
||||
+ ir: ir-receiver {
|
||||
+ compatible = "gpio-ir-receiver";
|
||||
+ gpios = <&gpio7 RK_PA0 GPIO_ACTIVE_LOW>;
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&ir_int>;
|
||||
+ linux,rc-map-name = "rc-xt-q8l-v10";
|
||||
+ wakeup-source;
|
||||
+ };
|
||||
+
|
||||
+ keys: gpio-keys {
|
||||
+ compatible = "gpio-keys";
|
||||
+ #address-cells = <1>;
|
||||
+ #size-cells = <0>;
|
||||
+
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&pwr_key>;
|
||||
+
|
||||
+ button@0 {
|
||||
+ gpio-key,wakeup = <1>;
|
||||
+ gpios = <&gpio0 5 GPIO_ACTIVE_HIGH>;
|
||||
+ label = "GPIO Power";
|
||||
+ linux,code = <KEY_POWER>;
|
||||
+ wakeup-source;
|
||||
+ debounce-interval = <100>;
|
||||
+ };
|
||||
+
|
||||
+ };
|
||||
+
|
||||
+ leds {
|
||||
+ compatible = "gpio-leds";
|
||||
+
|
||||
+ power {
|
||||
+ /*
|
||||
+ Power led is active high, but we set it here active low
|
||||
+ so while there is mass storage access it turns red and
|
||||
+ when it is idle is blue
|
||||
+ */
|
||||
+ gpios = <&gpio7 2 GPIO_ACTIVE_LOW>;
|
||||
+ label = "power";
|
||||
+ linux,default-trigger = "mmc0";
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&power_led>;
|
||||
+ };
|
||||
+
|
||||
+ };
|
||||
+
|
||||
+ vcc_sys: vsys-regulator {
|
||||
+ compatible = "regulator-fixed";
|
||||
+ regulator-name = "vcc_sys";
|
||||
+ regulator-min-microvolt = <5000000>;
|
||||
+ regulator-max-microvolt = <5000000>;
|
||||
+ regulator-always-on;
|
||||
+ regulator-boot-on;
|
||||
+ };
|
||||
+
|
||||
+ vcc_sd: sdmmc-regulator {
|
||||
+ compatible = "regulator-fixed";
|
||||
+ gpio = <&gpio7 11 GPIO_ACTIVE_LOW>;
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&sdmmc_pwr>;
|
||||
+ regulator-name = "vcc_sd";
|
||||
+ regulator-min-microvolt = <3300000>;
|
||||
+ regulator-max-microvolt = <3300000>;
|
||||
+ startup-delay-us = <100000>;
|
||||
+ vin-supply = <&vcc_io>;
|
||||
+ };
|
||||
+
|
||||
+ vcc_flash: flash-regulator {
|
||||
+ compatible = "regulator-fixed";
|
||||
+ regulator-name = "vcc_flash";
|
||||
+ regulator-min-microvolt = <1800000>;
|
||||
+ regulator-max-microvolt = <1800000>;
|
||||
+ vin-supply = <&vcc_io>;
|
||||
+ };
|
||||
+
|
||||
+ vcc_host_5v: usb-host-regulator {
|
||||
+ compatible = "regulator-fixed";
|
||||
+ gpio = <&gpio0 14 GPIO_ACTIVE_HIGH>;
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&host_vbus_drv>;
|
||||
+ regulator-name = "vcc_host_5v";
|
||||
+ regulator-min-microvolt = <5000000>;
|
||||
+ regulator-max-microvolt = <5000000>;
|
||||
+ regulator-always-on;
|
||||
+ enable-active-high;
|
||||
+// startup-delay-us = <1000>;
|
||||
+ vin-supply = <&vcc_sys>;
|
||||
+ };
|
||||
+
|
||||
+
|
||||
+ vcc_otg_5v: usb-otg-regulator {
|
||||
+ compatible = "regulator-fixed";
|
||||
+ enable-active-high;
|
||||
+ gpio = <&gpio0 12 GPIO_ACTIVE_HIGH>;
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&otg_vbus_drv>;
|
||||
+ regulator-name = "vcc_otg_5v";
|
||||
+ regulator-min-microvolt = <5000000>;
|
||||
+ regulator-max-microvolt = <5000000>;
|
||||
+// startup-delay-us = <1000>;
|
||||
+ regulator-always-on;
|
||||
+ vin-supply = <&vcc_sys>;
|
||||
+ };
|
||||
+
|
||||
+ /*
|
||||
+ * Required power sequence to properly enable the wireless/bluetooth
|
||||
+ * module connected to sdio0
|
||||
+ */
|
||||
+ sdio0_pwrseq: sdio0_pwrseq {
|
||||
+ compatible = "mmc-pwrseq-simple";
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&wifi_enable_h>, <&bt_enable_h>;
|
||||
+ reset-gpios = <&gpio4 28 GPIO_ACTIVE_LOW>, <&gpio4 29 GPIO_ACTIVE_LOW>;
|
||||
+ post-power-on-delay-ms = <100>;
|
||||
+ };
|
||||
+
|
||||
+ /*
|
||||
+ * Sound taken from tinkerboard device tree, adapted to q8.
|
||||
+ */
|
||||
+ soundcard-hdmi {
|
||||
+ compatible = "simple-audio-card";
|
||||
+ simple-audio-card,format = "i2s";
|
||||
+ simple-audio-card,name = "DW-I2S-HDMI";
|
||||
+ simple-audio-card,mclk-fs = <512>;
|
||||
+
|
||||
+ simple-audio-card,codec {
|
||||
+ sound-dai = <&hdmi>;
|
||||
+ };
|
||||
+
|
||||
+ simple-audio-card,cpu {
|
||||
+ sound-dai = <&i2s>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ soundcard-spdif {
|
||||
+ compatible = "simple-audio-card";
|
||||
+ simple-audio-card,name = "SPDIF";
|
||||
+ simple-audio-card,dai-link@1 {
|
||||
+
|
||||
+ cpu {
|
||||
+ sound-dai = <&spdif>;
|
||||
+ };
|
||||
+
|
||||
+ codec {
|
||||
+ sound-dai = <&spdif_out>;
|
||||
+ };
|
||||
+
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ spdif_out: spdif-out {
|
||||
+ compatible = "linux,spdif-dit";
|
||||
+ #sound-dai-cells = <0>;
|
||||
+ };
|
||||
+
|
||||
+};
|
||||
+
|
||||
+
|
||||
+&io_domains {
|
||||
+ status = "okay";
|
||||
+
|
||||
+ audio-supply = <&vcca_33>;
|
||||
+ bb-supply = <&vcc_io>;
|
||||
+ dvp-supply = <&vcc_18>;
|
||||
+ flash0-supply = <&vcc_flash>;
|
||||
+ flash1-supply = <&vcc_lan>;
|
||||
+ gpio30-supply = <&vcc_io>;
|
||||
+ gpio1830-supply = <&vcc_io>;
|
||||
+ lcdc-supply = <&vcc_io>;
|
||||
+ sdcard-supply = <&vccio_sd>;
|
||||
+ wifi-supply = <&vcc_18>;
|
||||
+};
|
||||
+
|
||||
+&cpu0 {
|
||||
+ cpu0-supply = <&vdd_cpu>;
|
||||
+ operating-points-v2 = <&cpu0_opp_table>;
|
||||
+ /delete-node/operating-points;
|
||||
+};
|
||||
+
|
||||
+&cpu1 {
|
||||
+ operating-points-v2 = <&cpu0_opp_table>;
|
||||
+ /delete-node/operating-points;
|
||||
+};
|
||||
+
|
||||
+&cpu2 {
|
||||
+ operating-points-v2 = <&cpu0_opp_table>;
|
||||
+ /delete-node/operating-points;
|
||||
+};
|
||||
+
|
||||
+&cpu3 {
|
||||
+ operating-points-v2 = <&cpu0_opp_table>;
|
||||
+ /delete-node/operating-points;
|
||||
+};
|
||||
+
|
||||
+&gmac {
|
||||
+ assigned-clocks = <&cru SCLK_MAC>;
|
||||
+ assigned-clock-parents = <&ext_gmac>;
|
||||
+ clock_in_out = "input";
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&rgmii_pins>, <&phy_rst>, <&phy_pmeb>, <&phy_int>;
|
||||
+ phy-supply = <&vcc_lan>;
|
||||
+ phy-mode = "rgmii";
|
||||
+ snps,reset-active-low;
|
||||
+ snps,reset-delays-us = <0 10000 1000000>;
|
||||
+ snps,reset-gpio = <&gpio4 8 GPIO_ACTIVE_LOW>;
|
||||
+ tx_delay = <0x30>;
|
||||
+ rx_delay = <0x10>;
|
||||
+ status = "ok";
|
||||
+};
|
||||
+
|
||||
+&hdmi {
|
||||
+ ddc-i2c-bus = <&i2c5>;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&gpu {
|
||||
+ mali-supply = <&vdd_gpu>;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&i2c0 {
|
||||
+ clock-frequency = <400000>;
|
||||
+ status = "okay";
|
||||
+
|
||||
+ vdd_cpu: syr827@40 {
|
||||
+ compatible = "silergy,syr827";
|
||||
+ fcs,suspend-voltage-selector = <1>;
|
||||
+ reg = <0x40>;
|
||||
+ regulator-name = "vdd_cpu";
|
||||
+ regulator-min-microvolt = <850000>;
|
||||
+ regulator-max-microvolt = <1350000>;
|
||||
+ regulator-ramp-delay = <8000>;
|
||||
+ regulator-always-on;
|
||||
+ regulator-boot-on;
|
||||
+ vin-supply = <&vcc_sys>;
|
||||
+ };
|
||||
+
|
||||
+ vdd_gpu: syr828@41 {
|
||||
+ compatible = "silergy,syr828";
|
||||
+ fcs,suspend-voltage-selector = <1>;
|
||||
+ reg = <0x41>;
|
||||
+ regulator-name = "vdd_gpu";
|
||||
+ regulator-min-microvolt = <850000>;
|
||||
+ regulator-max-microvolt = <1350000>;
|
||||
+ regulator-ramp-delay = <8000>;
|
||||
+ regulator-always-on;
|
||||
+ vin-supply = <&vcc_sys>;
|
||||
+ };
|
||||
+
|
||||
+ hym8563: hym8563@51 {
|
||||
+ compatible = "haoyu,hym8563";
|
||||
+ reg = <0x51>;
|
||||
+ #clock-cells = <0>;
|
||||
+ clock-frequency = <32768>;
|
||||
+ clock-output-names = "xin32k";
|
||||
+ interrupt-parent = <&gpio0>;
|
||||
+ interrupts = <4 IRQ_TYPE_EDGE_FALLING>;
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&rtc_int>;
|
||||
+ };
|
||||
+
|
||||
+ act8846: act8846@5a {
|
||||
+ compatible = "active-semi,act8846";
|
||||
+ reg = <0x5a>;
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&pmic_vsel>;
|
||||
+ system-power-controller;
|
||||
+
|
||||
+ vp1-supply = <&vcc_sys>;
|
||||
+ vp2-supply = <&vcc_sys>;
|
||||
+ vp3-supply = <&vcc_sys>;
|
||||
+ vp4-supply = <&vcc_sys>;
|
||||
+ inl1-supply = <&vcc_sys>;
|
||||
+ inl2-supply = <&vcc_sys>;
|
||||
+ inl3-supply = <&vcc_20>;
|
||||
+ wakeup-source;
|
||||
+
|
||||
+ regulators {
|
||||
+
|
||||
+ /*
|
||||
+ * Regulator controlling DDR memory - always on
|
||||
+ */
|
||||
+ vcc_ddr: REG1 {
|
||||
+ regulator-name = "vcc_ddr";
|
||||
+ regulator-min-microvolt = <1200000>;
|
||||
+ regulator-max-microvolt = <1200000>;
|
||||
+ regulator-always-on;
|
||||
+ };
|
||||
+
|
||||
+ /*
|
||||
+ * Regulator controlling various IO functions of the rk3288.
|
||||
+ * Always on
|
||||
+ */
|
||||
+ vcc_io: REG2 {
|
||||
+ regulator-name = "vcc_io";
|
||||
+ regulator-min-microvolt = <3300000>;
|
||||
+ regulator-max-microvolt = <3300000>;
|
||||
+ regulator-always-on;
|
||||
+ };
|
||||
+
|
||||
+ /*
|
||||
+ * Regulator controlling various board logic.
|
||||
+ * Always on.
|
||||
+ * rk3288 electrical datasheet says it should have variable
|
||||
+ * voltage depending upon dvfs
|
||||
+ */
|
||||
+ vdd_log: REG3 {
|
||||
+ regulator-name = "vdd_log";
|
||||
+ regulator-min-microvolt = <1100000>;
|
||||
+ regulator-max-microvolt = <1100000>;
|
||||
+ regulator-always-on;
|
||||
+ };
|
||||
+
|
||||
+ /*
|
||||
+ * No reference for this on electrical datasheet. Maybe this
|
||||
+ * is vcc_18? Maybe this is vcc18_flash on electrical datasheet.
|
||||
+ * So far we disable it.
|
||||
+ */
|
||||
+ vcc_20: REG4 {
|
||||
+ regulator-name = "vcc_20";
|
||||
+ regulator-min-microvolt = <2000000>;
|
||||
+ regulator-max-microvolt = <2000000>;
|
||||
+ regulator-always-on;
|
||||
+ };
|
||||
+
|
||||
+ /*
|
||||
+ * This regulator controls SDIO. Electrical datasheet says
|
||||
+ * this regulator can be operated between 1.8 and 3.3 volts
|
||||
+ */
|
||||
+ vccio_sd: REG5 {
|
||||
+ regulator-name = "vccio_sd";
|
||||
+ regulator-min-microvolt = <1800000>;
|
||||
+ regulator-max-microvolt = <3300000>;
|
||||
+ regulator-always-on;
|
||||
+ };
|
||||
+
|
||||
+ /*
|
||||
+ * Controlling HDMI and LCD controller on rk3288. 1.0 volts
|
||||
+ * by reference
|
||||
+ */
|
||||
+ vdd10_lcd: REG6 {
|
||||
+ regulator-name = "vdd10_lcd";
|
||||
+ regulator-min-microvolt = <1000000>;
|
||||
+ regulator-max-microvolt = <1000000>;
|
||||
+ regulator-always-on;
|
||||
+ };
|
||||
+
|
||||
+ /*
|
||||
+ * From the rk3288 electrical datasheet, this regulator powers
|
||||
+ * the rk1000 chip, which is absent in our device, but it
|
||||
+ * is also supplying bluetooth, so we enable it.
|
||||
+ */
|
||||
+ vcca_18: REG7 {
|
||||
+ regulator-name = "vcca_18";
|
||||
+ regulator-min-microvolt = <1800000>;
|
||||
+ regulator-max-microvolt = <1800000>;
|
||||
+ regulator-always-on;
|
||||
+ };
|
||||
+
|
||||
+ /*
|
||||
+ * This regulator controls, among other things, the SPDIF
|
||||
+ * interface, so we enable it
|
||||
+ */
|
||||
+ vcca_33: REG8 {
|
||||
+ regulator-name = "vcca_33";
|
||||
+ regulator-min-microvolt = <3300000>;
|
||||
+ regulator-max-microvolt = <3300000>;
|
||||
+ regulator-always-on; // Turn this on to get SPDIF!
|
||||
+ };
|
||||
+
|
||||
+ /*
|
||||
+ * LAN regulator
|
||||
+ */
|
||||
+ vcc_lan: REG9 {
|
||||
+ regulator-name = "vcc_lan";
|
||||
+ regulator-min-microvolt = <3300000>;
|
||||
+ regulator-max-microvolt = <3300000>;
|
||||
+ };
|
||||
+
|
||||
+ /*
|
||||
+ * Regulator controlling PMU, USB PHY and rk3288 PLLs.
|
||||
+ * 1.0 volts by reference
|
||||
+ */
|
||||
+ vdd_10: REG10 {
|
||||
+ regulator-name = "vdd_10";
|
||||
+ regulator-min-microvolt = <1000000>;
|
||||
+ regulator-max-microvolt = <1000000>;
|
||||
+ regulator-always-on;
|
||||
+ };
|
||||
+
|
||||
+ /*
|
||||
+ * Regulator controlling Wifi over SDIO, SARADC and USB PHY.
|
||||
+ * Better turn this on
|
||||
+ */
|
||||
+ vccio_wl: vcc_18: REG11 {
|
||||
+ regulator-name = "vcc_18";
|
||||
+ regulator-min-microvolt = <1800000>;
|
||||
+ regulator-max-microvolt = <1800000>;
|
||||
+ regulator-always-on;
|
||||
+ };
|
||||
+
|
||||
+ /*
|
||||
+ * Not clear: apparently this controls HDMI and LCD controller
|
||||
+ * on rk3368 devices.
|
||||
+ * 1.8 volts by reference
|
||||
+ */
|
||||
+ vcc18_lcd: REG12 {
|
||||
+ regulator-name = "vcc18_lcd";
|
||||
+ regulator-min-microvolt = <1800000>;
|
||||
+ regulator-max-microvolt = <1800000>;
|
||||
+ regulator-always-on;
|
||||
+ };
|
||||
+ };
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&i2c1 {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&i2c2 {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&i2c4 {
|
||||
+
|
||||
+ /*
|
||||
+ * Here should go the RK1000 audio codec parts, but seems that
|
||||
+ * there is no driver in linux kernel at the moment, so we can't
|
||||
+ * describe it.
|
||||
+ * Also, most important, there is no RK1000 on our board :)
|
||||
+ * Datasheet is available here:
|
||||
+ * http://dl.radxa.com/rock/docs/hw/ds/RK1000-S%20DATASHEET%20V14.pdf
|
||||
+ */
|
||||
+ status = "okay";
|
||||
+
|
||||
+};
|
||||
+
|
||||
+&i2c5 {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&pinctrl {
|
||||
+
|
||||
+ /*
|
||||
+ These two lines here, these must be commented out! Otherwise for some reason the kernel
|
||||
+ does not see the boot device anymore and will stay stuck in initramfs!
|
||||
+ On the contrary, these are required by u-boot to keep the power holding so the device does not
|
||||
+ automatically turns off after a small timeout
|
||||
+ */
|
||||
+ /*pinctrl-names = "default";*/
|
||||
+ /*pinctrl-0 = <&pwr_hold>;*/
|
||||
+
|
||||
+ pcfg_output_high: pcfg-output-high {
|
||||
+ output-high;
|
||||
+ };
|
||||
+
|
||||
+ pcfg_output_low: pcfg-output-low {
|
||||
+ output-low;
|
||||
+ };
|
||||
+
|
||||
+ pcfg_wl: pcfg-wl {
|
||||
+ bias-pull-up;
|
||||
+ drive-strength = <8>;
|
||||
+ };
|
||||
+
|
||||
+ pcfg_pull_up_drv_8ma: pcfg-pull-up-drv-8ma {
|
||||
+ bias-pull-up;
|
||||
+ drive-strength = <8>;
|
||||
+ };
|
||||
+
|
||||
+ pcfg_pull_none_8ma: pcfg-pull-none-8ma {
|
||||
+ bias-disable;
|
||||
+ drive-strength = <8>;
|
||||
+ };
|
||||
+
|
||||
+ pcfg_wl_clk: pcfg-wl-clk {
|
||||
+ bias-disable;
|
||||
+ drive-strength = <12>;
|
||||
+ };
|
||||
+
|
||||
+ pcfg_wl_int: pcfg-wl-int {
|
||||
+ bias-pull-up;
|
||||
+ };
|
||||
+
|
||||
+ act8846 {
|
||||
+
|
||||
+ /*
|
||||
+ * Original q8 device tree says:
|
||||
+ * - gpio0 11 HIGH -> power hold
|
||||
+ * - gpio7 1 LOW -> possibly pmic-vsel, we don't care
|
||||
+ */
|
||||
+ pmic_vsel: pmic-vsel {
|
||||
+ rockchip,pins = <7 1 RK_FUNC_GPIO &pcfg_output_low>;
|
||||
+ };
|
||||
+
|
||||
+ pwr_hold: pwr-hold {
|
||||
+ rockchip,pins = <0 11 RK_FUNC_GPIO &pcfg_pull_up>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ gmac {
|
||||
+ phy_int: phy-int {
|
||||
+ rockchip,pins = <0 9 RK_FUNC_GPIO &pcfg_pull_up>;
|
||||
+ };
|
||||
+
|
||||
+ phy_pmeb: phy-pmeb {
|
||||
+ rockchip,pins = <0 8 RK_FUNC_GPIO &pcfg_pull_up>;
|
||||
+ };
|
||||
+
|
||||
+ phy_rst: phy-rst {
|
||||
+ rockchip,pins = <4 8 RK_FUNC_GPIO &pcfg_output_high>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ hym8563 {
|
||||
+ rtc_int: rtc-int {
|
||||
+ rockchip,pins = <0 4 RK_FUNC_GPIO &pcfg_pull_up>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ keys {
|
||||
+ pwr_key: pwr-key {
|
||||
+ rockchip,pins = <0 5 RK_FUNC_GPIO &pcfg_pull_none>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ leds {
|
||||
+ power_led: power-led {
|
||||
+ rockchip,pins = <7 2 RK_FUNC_GPIO &pcfg_pull_none>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ ir {
|
||||
+ ir_int: ir-int {
|
||||
+ rockchip,pins = <7 0 RK_FUNC_GPIO &pcfg_pull_up>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ sdmmc {
|
||||
+
|
||||
+ /*
|
||||
+ * Copied from firefly board definition to give more drive to
|
||||
+ * the sdmmc pins. The Q8 seems to be quite able to drive
|
||||
+ * ultra high speed uSD cards, so we give a bit more energy
|
||||
+ * to the gpio pins
|
||||
+ */
|
||||
+ sdmmc_bus4: sdmmc-bus4 {
|
||||
+ rockchip,pins = <6 16 RK_FUNC_1 &pcfg_pull_up_drv_8ma>,
|
||||
+ <6 17 RK_FUNC_1 &pcfg_pull_up_drv_8ma>,
|
||||
+ <6 18 RK_FUNC_1 &pcfg_pull_up_drv_8ma>,
|
||||
+ <6 19 RK_FUNC_1 &pcfg_pull_up_drv_8ma>;
|
||||
+ };
|
||||
+
|
||||
+ sdmmc_clk: sdmmc-clk {
|
||||
+ rockchip,pins = <6 20 RK_FUNC_1 &pcfg_pull_none_8ma>;
|
||||
+ };
|
||||
+
|
||||
+ sdmmc_cmd: sdmmc-cmd {
|
||||
+ rockchip,pins = <6 21 RK_FUNC_1 &pcfg_pull_up_drv_8ma>;
|
||||
+ };
|
||||
+
|
||||
+ sdmmc_pwr: sdmmc-pwr {
|
||||
+ rockchip,pins = <7 11 RK_FUNC_GPIO &pcfg_pull_none>;
|
||||
+ };
|
||||
+
|
||||
+ };
|
||||
+
|
||||
+ usb_host1 {
|
||||
+ host_vbus_drv: host-vbus-drv {
|
||||
+ rockchip,pins = <0 14 RK_FUNC_GPIO &pcfg_pull_none>;
|
||||
+ };
|
||||
+
|
||||
+ };
|
||||
+
|
||||
+ usb_otg {
|
||||
+ otg_vbus_drv: otg-vbus-drv {
|
||||
+ rockchip,pins = <0 12 RK_FUNC_GPIO &pcfg_pull_none>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ sdio0 {
|
||||
+ wifi_enable_h: wifienable-h {
|
||||
+ rockchip,pins = <4 28 RK_FUNC_GPIO &pcfg_output_high>;
|
||||
+ };
|
||||
+
|
||||
+ bt_enable_h: bt-enable-h {
|
||||
+ rockchip,pins = <4 27 RK_FUNC_GPIO &pcfg_output_high>;
|
||||
+ };
|
||||
+
|
||||
+ };
|
||||
+
|
||||
+
|
||||
+ wireless-bluetooth {
|
||||
+ uart0_gpios: uart0-gpios {
|
||||
+ rockchip,pins = <4 19 RK_FUNC_GPIO &pcfg_pull_none>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+};
|
||||
+
|
||||
+&saradc {
|
||||
+ vref-supply = <&vcc_18>;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&emmc {
|
||||
+
|
||||
+ /*
|
||||
+ * eMMC seems to be 52Mhz device on q8 devices, so set it here
|
||||
+ * vmmc-supply and vqmmc-supply are removed because they hang
|
||||
+ * u-boot >= v2018.03
|
||||
+ * From the original q8l firmware and eMMC datasheet it also should
|
||||
+ * support DDR highspeed mode, but using mmc-ddr-3_3v or mmc-ddr-1_8v
|
||||
+ * properties are not working
|
||||
+ */
|
||||
+ clock-frequency = <50000000>;
|
||||
+
|
||||
+ broken-cd;
|
||||
+ bus-width = <8>;
|
||||
+ cap-mmc-highspeed;
|
||||
+ disable-wp;
|
||||
+ non-removable;
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&emmc_clk>, <&emmc_cmd>, <&emmc_pwr>, <&emmc_bus8>;
|
||||
+
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&sdmmc {
|
||||
+ supports-sd;
|
||||
+
|
||||
+ bus-width = <4>;
|
||||
+ cap-mmc-highspeed;
|
||||
+ cap-sd-highspeed;
|
||||
+ card-detect-delay = <200>;
|
||||
+ disable-wp;
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&sdmmc_clk>, <&sdmmc_cmd>, <&sdmmc_cd>, <&sdmmc_bus4>;
|
||||
+ vmmc-supply = <&vcc_sd>;
|
||||
+ vqmmc-supply = <&vccio_sd>;
|
||||
+ sd-uhs-sdr12;
|
||||
+ sd-uhs-sdr25;
|
||||
+ sd-uhs-sdr50;
|
||||
+ sd-uhs-sdr104;
|
||||
+ sd-uhs-ddr50;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&sdio0 {
|
||||
+ #address-cells = <1>;
|
||||
+ #size-cells = <0>;
|
||||
+
|
||||
+ bus-width = <4>;
|
||||
+ mmc-pwrseq = <&sdio0_pwrseq>;
|
||||
+
|
||||
+ vmmc-supply = <&vcc_io>;
|
||||
+ vqmmc-supply = <&vcc_18>; // This must be the same as in io_domains,
|
||||
+ // otherwise the mmc1 device won't be detected properly
|
||||
+
|
||||
+// clock-frequency = <50000000>;
|
||||
+// max-frequency = <50000000>;
|
||||
+
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&sdio0_bus4>, <&sdio0_cmd>, <&sdio0_clk>, <&sdio0_int>;
|
||||
+
|
||||
+ cap-sdio-irq;
|
||||
+ no-mmc;
|
||||
+ no-sd;
|
||||
+ cap-sd-highspeed; // required, otherwise does not work!
|
||||
+ supports-sdio;
|
||||
+ non-removable;
|
||||
+
|
||||
+ keep-power-in-suspend;
|
||||
+ disable-wp;
|
||||
+
|
||||
+
|
||||
+ status = "okay";
|
||||
+
|
||||
+ brcmf: bcrmf@1 {
|
||||
+ reg = <1>;
|
||||
+ compatible = "brcm,bcm4329-fmac";
|
||||
+ interrupt-parent = <&gpio4>;
|
||||
+ interrupts = <30 IRQ_TYPE_LEVEL_LOW>;
|
||||
+ interrupt-names = "host-wake";
|
||||
+ status = "okay";
|
||||
+ };
|
||||
+
|
||||
+ //sd-uhs-sdr104; // required to be disabled, otherwise the device get
|
||||
+ // detected, but there is no communication
|
||||
+
|
||||
+};
|
||||
+
|
||||
+&spi0 {
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&spi0_clk>, <&spi0_cs0>, <&spi0_tx>, <&spi0_rx>, <&spi0_cs1>;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&tsadc {
|
||||
+ rockchip,hw-tshut-mode = <0>;
|
||||
+ rockchip,hw-tshut-polarity = <0>;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+/*
|
||||
+ * These dmas described here for uarts are present in original q8 board
|
||||
+ * dts, so I replicate them here because documentation says that serial
|
||||
+ * ports can have dmas.
|
||||
+ * note:
|
||||
+ * - uart0 is the serial port connected to the bluetooth module
|
||||
+ * - uart2 is the onboard serial port
|
||||
+ *
|
||||
+ * As ok kernel 4.19 DMA for serial ports is disabled because it makes
|
||||
+ * the ports unusable
|
||||
+ *
|
||||
+ */
|
||||
+&uart0 {
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&uart0_xfer>, <&uart0_cts>, <&uart0_rts>;
|
||||
+ //dmas = <&dmac_peri 1 &dmac_peri 2>;
|
||||
+ //dma-names = "tx", "rx";
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&uart1 {
|
||||
+ //dmas = <&dmac_peri 3 &dmac_peri 4>;
|
||||
+ //dma-names = "tx", "rx";
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&uart2 {
|
||||
+ //dmas = <&dmac_bus_s 4 &dmac_bus_s 5>;
|
||||
+ //dma-names = "tx", "rx";
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&uart3 {
|
||||
+ //dmas = <&dmac_peri 7 &dmac_peri 8>;
|
||||
+ //dma-names = "tx", "rx";
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&uart4 {
|
||||
+ //dmas = <&dmac_peri 9 &dmac_peri 10>;
|
||||
+ //dma-names = "tx", "rx";
|
||||
+ status = "disabled";
|
||||
+};
|
||||
+
|
||||
+/*
|
||||
+ * Here usbphy* should have their proper reset lines described in rk3288.dtsi
|
||||
+ * Describing resets for usb phy is important because otherwise the USB
|
||||
+ * port gets stuck in case it goes into autosuspend: plugging any device
|
||||
+ * when the port is autosuspended will actually kill the port itself and
|
||||
+ * require a power cycle.
|
||||
+ * This is required for the usbphy1 phy, nonetheless it is a good idea to
|
||||
+ * specify the proper resources for all the phys though.
|
||||
+ * The reference patch which works in conjuction with the reset lines:
|
||||
+ * https://patchwork.kernel.org/patch/9469811/
|
||||
+ *
|
||||
+ */
|
||||
+&usbphy {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&usbphy0 {
|
||||
+ vbus-supply = <&vcc_otg_5v>;
|
||||
+};
|
||||
+
|
||||
+&usbphy2 {
|
||||
+ vbus-supply = <&vcc_host_5v>;
|
||||
+};
|
||||
+
|
||||
+&usb_host0_ehci {
|
||||
+ dr_mode = "host";
|
||||
+ reg = <0x0 0xff500000 0x0 0x20000>;
|
||||
+ status = "disable";
|
||||
+};
|
||||
+
|
||||
+&usb_host1 {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&usb_otg {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+/*
|
||||
+ * Enable VPU services and complete the relative IOMMU configurations
|
||||
+ */
|
||||
+&vopb {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&vopb_mmu {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&vopl {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&vopl_mmu {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&vpu_mmu {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&vpu_service {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&hevc_mmu {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&hevc_service {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&wdt {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+// i2s bus is present on q8 device, enable it
|
||||
+&i2s {
|
||||
+ #sound-dai-cells = <0>;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+// spdif is present on q8 device, enable it
|
||||
+&spdif {
|
||||
+ status = "okay";
|
||||
+};
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user