mirror of
https://github.com/home-assistant/operating-system.git
synced 2025-08-31 15:50:20 +00:00
Compare commits
315 Commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
98a9c96834 | ||
![]() |
95c9a28ed0 | ||
![]() |
e3cd6e8a82 | ||
![]() |
f25a44160a | ||
![]() |
e1236751b6 | ||
![]() |
1219e80a3d | ||
![]() |
81874b61d3 | ||
![]() |
5b478090a7 | ||
![]() |
371ab7520e | ||
![]() |
ad1befbe07 | ||
![]() |
f1beaa5669 | ||
![]() |
7da1cdf074 | ||
![]() |
a2d1cae069 | ||
![]() |
a85d1959ec | ||
![]() |
78b5aeb82d | ||
![]() |
cdf1110f42 | ||
![]() |
5a3aaa46f4 | ||
![]() |
786dd75a15 | ||
![]() |
b614ceb2ba | ||
![]() |
366087cf97 | ||
![]() |
c63968dfc0 | ||
![]() |
ba64be61b3 | ||
![]() |
2726547bf6 | ||
![]() |
ddd472896a | ||
![]() |
c1e2d655bc | ||
![]() |
79c9e208ca | ||
![]() |
fbbc0075ea | ||
![]() |
3708b2fe72 | ||
![]() |
b1df44421b | ||
![]() |
303f63c222 | ||
![]() |
53818a1325 | ||
![]() |
ed554f2a39 | ||
![]() |
ba5de20ba8 | ||
![]() |
b0674713a7 | ||
![]() |
4edc71b005 | ||
![]() |
4af2c880ed | ||
![]() |
e64e97cedf | ||
![]() |
cd5e42341d | ||
![]() |
ea5acb0950 | ||
![]() |
a16354276f | ||
![]() |
19c5d45734 | ||
![]() |
f8c8198bb9 | ||
![]() |
7a693bed46 | ||
![]() |
c3bfa2e64a | ||
![]() |
fe8332eb90 | ||
![]() |
aeda0d0503 | ||
![]() |
c4233012d0 | ||
![]() |
dcff3d3f14 | ||
![]() |
c2174a4ee4 | ||
![]() |
05778a2d32 | ||
![]() |
7729db1e11 | ||
![]() |
5b0c1754f6 | ||
![]() |
71d5c77508 | ||
![]() |
2d8ec0c8ee | ||
![]() |
5d0a61fafc | ||
![]() |
4d9b604c04 | ||
![]() |
7409be7197 | ||
![]() |
7df21c6839 | ||
![]() |
83dc7117de | ||
![]() |
b8550dec2a | ||
![]() |
e0222ec454 | ||
![]() |
e2931c35ba | ||
![]() |
364196614b | ||
![]() |
084b20e4df | ||
![]() |
263e600b51 | ||
![]() |
0f1ecf85d5 | ||
![]() |
86cee444be | ||
![]() |
fcfe074672 | ||
![]() |
cbb0e5b4b9 | ||
![]() |
57fd9a5b4b | ||
![]() |
4da0ad7da2 | ||
![]() |
54bbae3286 | ||
![]() |
8f07d16176 | ||
![]() |
5932f1212e | ||
![]() |
0139030404 | ||
![]() |
5c70c57a70 | ||
![]() |
d2c0ad8096 | ||
![]() |
92da6b64c7 | ||
![]() |
7d0ad7e662 | ||
![]() |
2801019912 | ||
![]() |
11df4745e7 | ||
![]() |
e6147184c0 | ||
![]() |
26bca2666d | ||
![]() |
7708de0c65 | ||
![]() |
739a783c8d | ||
![]() |
b1dcdea03c | ||
![]() |
d9beee93ed | ||
![]() |
33575b639e | ||
![]() |
720f604f98 | ||
![]() |
f94cb9df39 | ||
![]() |
432cb86235 | ||
![]() |
e10e3c9d7c | ||
![]() |
7552395368 | ||
![]() |
b1a2e6ee17 | ||
![]() |
70dd90adef | ||
![]() |
5d94321807 | ||
![]() |
a39046cb55 | ||
![]() |
768e16210b | ||
![]() |
3110b044eb | ||
![]() |
26748d5c9b | ||
![]() |
0c9cfde907 | ||
![]() |
4a85304427 | ||
![]() |
382e253e5a | ||
![]() |
dc41cd8b86 | ||
![]() |
9e4cf3de68 | ||
![]() |
48a9b6162a | ||
![]() |
e2b9a7fef8 | ||
![]() |
756a9feb00 | ||
![]() |
da74988378 | ||
![]() |
1828ac0bb5 | ||
![]() |
7b0f593a93 | ||
![]() |
e7e7c7a9ba | ||
![]() |
a1261f89a1 | ||
![]() |
02dff04212 | ||
![]() |
e5754a5d29 | ||
![]() |
3c5ba17b58 | ||
![]() |
925984c09f | ||
![]() |
ba8bda73fa | ||
![]() |
4a42d578fe | ||
![]() |
e98edce5d3 | ||
![]() |
42d4b5f2a2 | ||
![]() |
fdf7823887 | ||
![]() |
87319b6e29 | ||
![]() |
d284a1dee7 | ||
![]() |
a9c2eedc71 | ||
![]() |
bd52b7e97b | ||
![]() |
46ff688c20 | ||
![]() |
be584a8a00 | ||
![]() |
fd7d0253f3 | ||
![]() |
2114dd328f | ||
![]() |
e61246f5ba | ||
![]() |
2ac8222f19 | ||
![]() |
5bd466c27d | ||
![]() |
56baadc829 | ||
![]() |
91d2092938 | ||
![]() |
4310cfe916 | ||
![]() |
8994a59dfc | ||
![]() |
734323eb1e | ||
![]() |
cb495af05a | ||
![]() |
2e03490fe6 | ||
![]() |
f2106c6990 | ||
![]() |
2c20e5db3e | ||
![]() |
aaf2bf8317 | ||
![]() |
38b2eefe0d | ||
![]() |
4022d797d9 | ||
![]() |
7fba67cefe | ||
![]() |
feebc0abe9 | ||
![]() |
88aa4c7651 | ||
![]() |
d9ec603164 | ||
![]() |
afff68ca4d | ||
![]() |
dceba8bb43 | ||
![]() |
f0032a39f2 | ||
![]() |
66303c1078 | ||
![]() |
23e58009f2 | ||
![]() |
6b3440f4fd | ||
![]() |
31b9c46a79 | ||
![]() |
e8f487f96e | ||
![]() |
9bdd810e76 | ||
![]() |
99be958c4f | ||
![]() |
59d69209dc | ||
![]() |
1b7f9cd42f | ||
![]() |
a9ea934edc | ||
![]() |
f62fee2ff7 | ||
![]() |
616c406e8e | ||
![]() |
dde7a7b809 | ||
![]() |
829b5941e1 | ||
![]() |
4390fa7acd | ||
![]() |
62de5f53a8 | ||
![]() |
bf0aa61d87 | ||
![]() |
7ca62cb53a | ||
![]() |
cd87324452 | ||
![]() |
de21729578 | ||
![]() |
fc0f1e20d5 | ||
![]() |
22f5a83dcc | ||
![]() |
f509e9ce5d | ||
![]() |
381026758a | ||
![]() |
5a409ec0ec | ||
![]() |
d1cc7394b5 | ||
![]() |
b0bbe70315 | ||
![]() |
0f4016c180 | ||
![]() |
81b3bc8787 | ||
![]() |
061a6e9860 | ||
![]() |
c29f95678f | ||
![]() |
fed57ec5a3 | ||
![]() |
d9f463322b | ||
![]() |
6d75b47865 | ||
![]() |
feb045b32d | ||
![]() |
c1bd178021 | ||
![]() |
260a7c7d05 | ||
![]() |
5291fbf999 | ||
![]() |
a5949bbc0b | ||
![]() |
d17a739f48 | ||
![]() |
3c582190d6 | ||
![]() |
186107e089 | ||
![]() |
4399b28d2f | ||
![]() |
c1acccf30e | ||
![]() |
51b8836af0 | ||
![]() |
76d4485639 | ||
![]() |
abfee18363 | ||
![]() |
5d2154cc97 | ||
![]() |
24615739ea | ||
![]() |
55c9b54b13 | ||
![]() |
580e541f77 | ||
![]() |
7ed97e89a3 | ||
![]() |
1e94f9a79e | ||
![]() |
b7a7805262 | ||
![]() |
19a135edac | ||
![]() |
c99927f3c4 | ||
![]() |
f5be7693de | ||
![]() |
a4be500bf9 | ||
![]() |
cc0d4f8b62 | ||
![]() |
26c36a8caf | ||
![]() |
b5c9c9df22 | ||
![]() |
19616b05d7 | ||
![]() |
3f28023dc4 | ||
![]() |
2b34503524 | ||
![]() |
b1f6c3a87a | ||
![]() |
d065287acd | ||
![]() |
cb8b2e3f5f | ||
![]() |
1638097485 | ||
![]() |
b1c59f4f6e | ||
![]() |
5fd943c936 | ||
![]() |
e63aa1a5f4 | ||
![]() |
06a1c21b82 | ||
![]() |
8c1ff000f0 | ||
![]() |
8058392043 | ||
![]() |
6a8b69f793 | ||
![]() |
fe4468d789 | ||
![]() |
323cba6777 | ||
![]() |
ff07728fa3 | ||
![]() |
e83e6f4712 | ||
![]() |
c7ec9468c0 | ||
![]() |
b72acfa648 | ||
![]() |
74fe7d4cb8 | ||
![]() |
ce566167f2 | ||
![]() |
b211c653c7 | ||
![]() |
53dcfd3134 | ||
![]() |
eed6302ad8 | ||
![]() |
e0e270df1a | ||
![]() |
f012f09d4f | ||
![]() |
e819f05927 | ||
![]() |
e916d9f93c | ||
![]() |
d8dfa88fb8 | ||
![]() |
565c473a75 | ||
![]() |
a19870947a | ||
![]() |
bdc319d3df | ||
![]() |
8d69f395c2 | ||
![]() |
8049dfb30c | ||
![]() |
a4edece719 | ||
![]() |
762f098c14 | ||
![]() |
693507aaca | ||
![]() |
b7bbb63a26 | ||
![]() |
631c0c5d53 | ||
![]() |
55568f597f | ||
![]() |
7592143322 | ||
![]() |
008fb3fb74 | ||
![]() |
a7c237f93d | ||
![]() |
3d42d3690b | ||
![]() |
1e7cd66165 | ||
![]() |
7d187405de | ||
![]() |
66d5957310 | ||
![]() |
7ca4e90885 | ||
![]() |
7d5ebfcd31 | ||
![]() |
5af4942607 | ||
![]() |
97dffedbcd | ||
![]() |
b6b8e3b1dc | ||
![]() |
33280dc4cd | ||
![]() |
0d31ddfa43 | ||
![]() |
6bc5c3e5d0 | ||
![]() |
9582183458 | ||
![]() |
57d7059dae | ||
![]() |
50749052ae | ||
![]() |
222cfff8b8 | ||
![]() |
a504869cbb | ||
![]() |
5bb42ff43c | ||
![]() |
cbce0f2a2e | ||
![]() |
6c3bcb708f | ||
![]() |
ac407a6679 | ||
![]() |
f47b371f23 | ||
![]() |
ecfb744fe7 | ||
![]() |
511169b31b | ||
![]() |
df167910e1 | ||
![]() |
965198e8a1 | ||
![]() |
c8f6c6c2b0 | ||
![]() |
99319542b9 | ||
![]() |
2c9ce139d4 | ||
![]() |
720390862a | ||
![]() |
be3afe8b68 | ||
![]() |
bdc9909117 | ||
![]() |
54fa9899eb | ||
![]() |
c58a568f64 | ||
![]() |
ad8ee5610d | ||
![]() |
1ef4d43d4e | ||
![]() |
d40fa3beea | ||
![]() |
b03482996f | ||
![]() |
0c6888cdd0 | ||
![]() |
269246c412 | ||
![]() |
6c79ce0f98 | ||
![]() |
166537bf00 | ||
![]() |
c2ac8b5763 | ||
![]() |
a538ac2c8a | ||
![]() |
e5933c4ed4 | ||
![]() |
94432dad88 | ||
![]() |
9c8172df40 | ||
![]() |
96a8ab17c1 | ||
![]() |
f6d639f2bf | ||
![]() |
44cca729f0 | ||
![]() |
f39ee8b863 | ||
![]() |
64d3cd88a1 | ||
![]() |
084636b6cf | ||
![]() |
f7c5154bda | ||
![]() |
9bf12a8648 | ||
![]() |
cfb68c5b39 | ||
![]() |
cceb5dcf39 | ||
![]() |
582ec82f83 |
@@ -1,11 +1,3 @@
|
||||
# We don't need this folder because we map the hole folder
|
||||
buildroot/
|
||||
buildroot-external/
|
||||
buildroot-patches/
|
||||
|
||||
# Release directory gets created using build scripts
|
||||
release/
|
||||
|
||||
# Ignore hidden directories as well
|
||||
.git/
|
||||
.github/
|
||||
# Ignore everything except what we really need
|
||||
*
|
||||
!scripts/
|
||||
|
54
.github/ISSUE_TEMPLATE.md
vendored
54
.github/ISSUE_TEMPLATE.md
vendored
@@ -1,54 +0,0 @@
|
||||
<!-- READ THIS FIRST:
|
||||
- If you need additional help with this template please refer to https://www.home-assistant.io/help/reporting_issues/
|
||||
- Make sure you are running the latest version before reporting an issue: https://github.com/home-assistant/operating-system/releases
|
||||
- Do not report issues for integrations here, please refer to https://github.com/home-assistant/core/issues
|
||||
- Do not report issues for Add-Ons here, please refer to
|
||||
Official Add-ons: https://github.com/home-assistant/addons/issues
|
||||
Home Assistant Community Add-ons: https://github.com/hassio-addons/repository
|
||||
- This is for bugs only. Feature and enhancement requests should go in our community forum: https://community.home-assistant.io/c/feature-requests
|
||||
- Provide as many details as possible. Paste logs, configuration sample and code using blocks with three backticks. Do not delete text from this template!
|
||||
- Please add modifications to boot files, e.g. if you are using Raspberry Pi and did modifications in config.txt.
|
||||
-->
|
||||
|
||||
**Hardware Environment**
|
||||
<!--
|
||||
Describe the Home Assistant image you are using and the hardware environment
|
||||
-->
|
||||
- [ ] Raspberry Pi [1/2/3/4]
|
||||
- [ ] ODROID [C2/C4/N2(+)/XU4]
|
||||
- [ ] ASUS Tinker [S]
|
||||
- [ ] Generic x86-64 (like Intel NUC)
|
||||
- [ ] OVA (Open Virtualization Appliance, on Intel NUC or any other hardware, please add the Hypervisor you are using)
|
||||
|
||||
**Home Assistant OS release:**
|
||||
- [ ] Fresh installation of release x.y
|
||||
- [ ] Updated from version x.y
|
||||
- Additional information (if accessible):
|
||||
<!--
|
||||
- Home Assistant Frontend -> Configuration -> Info (use the copy button in the System Health block)
|
||||
- Or use this command: `ha info`
|
||||
-->
|
||||
|
||||
**Supervisor logs:**
|
||||
<!--
|
||||
- Home Assistant Frontend -> Supervisor -> System (Log Provider Supervisor)
|
||||
- Or use this command: ha su logs
|
||||
-->
|
||||
|
||||
**Journal logs:**
|
||||
<!--
|
||||
- Enable SSH on OS level and login, then use `journalctl`
|
||||
-->
|
||||
|
||||
**Kernel logs:**
|
||||
<!--
|
||||
- use this command: dmesg
|
||||
- Enable SSH on OS level and login, then use `dmesg`.
|
||||
-->
|
||||
|
||||
**Description of problem:**
|
||||
<!--
|
||||
- Is the problem reproducible?
|
||||
- Has this been working before (is this a regression?)
|
||||
- Has there been attempt to rule out hardware issues? (different SD card etc.)
|
||||
-->
|
107
.github/ISSUE_TEMPLATE/bug_report.yml
vendored
Normal file
107
.github/ISSUE_TEMPLATE/bug_report.yml
vendored
Normal file
@@ -0,0 +1,107 @@
|
||||
name: Bug Report Form
|
||||
description: Report an issue related to the Home Assistant Operating System.
|
||||
labels: bug
|
||||
body:
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: |
|
||||
Make sure to test with the last version of the Operating System before reporting a bug.
|
||||
If the bug appears to be a regression, make sure to check if the bug indeed disappears
|
||||
from the previous version. Use `ha os update --version x.y` command to downgrade.
|
||||
- type: textarea
|
||||
validations:
|
||||
required: true
|
||||
attributes:
|
||||
label: Describe the issue you are experiencing
|
||||
description: Provide a clear and concise description of what the bug is.
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: |
|
||||
## Environment
|
||||
- type: dropdown
|
||||
validations:
|
||||
required: true
|
||||
attributes:
|
||||
label: What operating system image do you use?
|
||||
options:
|
||||
- generic-x86-64 (Generic UEFI capable x86-64 systems)
|
||||
- generic-aarch64 (Generic UEFI capable aarch64 systems)
|
||||
- khadas-vim3 (Khadas VIM3)
|
||||
- odroid-c2 (Hardkernel ODROID-C2)
|
||||
- odroid-c4 (Hardkernel ODROID-C4)
|
||||
- odroid-n2 (Hardkernel ODROID-N2/N2+)
|
||||
- odroid-xu4 (Hardkernel ODROID-XU4)
|
||||
- ova (for Virtual Machines)
|
||||
- rpi2 (Raspberry Pi 2)
|
||||
- rpi3 (Raspberry Pi 3 32-bit OS)
|
||||
- rpi3-64 (Raspberry Pi 3 64-bit OS)
|
||||
- rpi4 (Raspberry Pi 4/400 32-bit OS)
|
||||
- rpi4-64 (Raspberry Pi 4/400 64-bit OS)
|
||||
- tinker (ASUS Tinker Board/Tinker Board S)
|
||||
- yellow (Home Assistant Yellow)
|
||||
description: >
|
||||
Can be found in the [Configuration panel -> Settings -> Info](https://my.home-assistant.io/redirect/info/). It is listed as the `Board` value.
|
||||
|
||||
[](https://my.home-assistant.io/redirect/info/)
|
||||
- type: input
|
||||
validations:
|
||||
required: true
|
||||
attributes:
|
||||
label: What version of Home Assistant Operating System is installed?
|
||||
placeholder: "6.6"
|
||||
description: >
|
||||
Can be found in the [Configuration panel -> Settings -> Info](https://my.home-assistant.io/redirect/info/). It is listed as the `Host Operating System` value.
|
||||
- type: dropdown
|
||||
validations:
|
||||
required: true
|
||||
attributes:
|
||||
label: Did you upgrade the Operating System.
|
||||
options:
|
||||
- "Yes"
|
||||
- "No"
|
||||
- type: textarea
|
||||
validations:
|
||||
required: true
|
||||
attributes:
|
||||
label: Steps to reproduce the issue
|
||||
description: |
|
||||
Please tell us exactly how to reproduce your issue.
|
||||
Provide clear and concise step by step instructions and add code snippets if needed.
|
||||
value: |
|
||||
1.
|
||||
2.
|
||||
3.
|
||||
...
|
||||
- type: textarea
|
||||
validations:
|
||||
required: true
|
||||
attributes:
|
||||
label: Anything in the Supervisor logs that might be useful for us?
|
||||
description: >
|
||||
Supervisor Logs can be found under [Configuration panel -> Add-ons, Backup & Supervisor -> System](https://my.home-assistant.io/redirect/supervisor_logs/), then choose Log Provider `Supervisor`.
|
||||
|
||||
[](https://my.home-assistant.io/redirect/supervisor_logs/)
|
||||
render: txt
|
||||
- type: textarea
|
||||
validations:
|
||||
required: true
|
||||
attributes:
|
||||
label: Anything in the Host logs that might be useful for us?
|
||||
description: >
|
||||
Supervisor Logs can be found under [Configuration panel -> Add-ons, Backup & Supervisor -> System](https://my.home-assistant.io/redirect/supervisor_logs/), then choose Log Provider `Host`.
|
||||
render: txt
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: System Health information
|
||||
description: >
|
||||
**Optional** Copy the full System Health in this text area.
|
||||
|
||||
Can be found in the [Configuration panel -> Settings -> Info](https://my.home-assistant.io/redirect/info/).
|
||||
Use the copy icon on top right and choose `For GitHub`.
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: Additional information
|
||||
description: >
|
||||
**Optional** If you have any additional information for us, use the field below.
|
||||
Please note, you can attach screenshots or screen recordings here, by
|
||||
dragging and dropping files in the field below.
|
21
.github/ISSUE_TEMPLATE/config.yml
vendored
Normal file
21
.github/ISSUE_TEMPLATE/config.yml
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
blank_issues_enabled: false
|
||||
contact_links:
|
||||
- name: Report incorrect or missing information on our documentation
|
||||
url: https://github.com/home-assistant/home-assistant.io/issues
|
||||
about: Our documentation has its own issue tracker. Please report issues with the website there.
|
||||
|
||||
- name: Report incorrect or missing information on our developer documentation
|
||||
url: https://github.com/home-assistant/developers.home-assistant/issues
|
||||
about: Our developer documentation has its own issue tracker. Please report issues with the website there.
|
||||
|
||||
- name: Request a feature for the Operating System
|
||||
url: https://community.home-assistant.io/c/feature-requests
|
||||
about: Request an new feature for the Operating System.
|
||||
|
||||
- name: I have a question or need support
|
||||
url: https://www.home-assistant.io/help
|
||||
about: We use GitHub for tracking bugs, check our website for resources on getting help.
|
||||
|
||||
- name: I'm unsure where to go?
|
||||
url: https://www.home-assistant.io/join-chat
|
||||
about: If you are unsure where to go, then joining our chat is recommended; Just ask!
|
6
.github/dependabot.yml
vendored
Normal file
6
.github/dependabot.yml
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
version: 2
|
||||
updates:
|
||||
- package-ecosystem: "github-actions"
|
||||
directory: "/"
|
||||
schedule:
|
||||
interval: "weekly"
|
32
.github/label-actions.yml
vendored
Normal file
32
.github/label-actions.yml
vendored
Normal file
@@ -0,0 +1,32 @@
|
||||
assume-fixed:
|
||||
comment: >
|
||||
:wave: @{issue-author}, thanks for reporting an issue!
|
||||
|
||||
|
||||
This issue is assumed to be fixed in the latest stable release. Please
|
||||
reopen in case you can still reproduce the issue with the latest stable
|
||||
release. You can find the latest stable release at
|
||||
https://github.com/home-assistant/operating-system/releases/latest
|
||||
close: true
|
||||
|
||||
core-issue:
|
||||
comment: >
|
||||
:wave: @{issue-author}, thanks for reporting an issue!
|
||||
|
||||
|
||||
It looks like this issue is related to Home Assistant Core. Please check
|
||||
the [Home Assistant Core](https://github.com/home-assistant/core/issues)
|
||||
repository, the issue might have been reported already. Open a new issue
|
||||
in that repository if you can't find a matching issue.
|
||||
close: true
|
||||
|
||||
supervisor-issue:
|
||||
comment: >
|
||||
:wave: @{issue-author}, thanks for reporting an issue!
|
||||
|
||||
|
||||
It looks like this issue is related to Home Assistant Supervisor. Please
|
||||
check the [Home Assistant Supervisor](https://github.com/home-assistant/supervisor/issues)
|
||||
repository, the issue might have been reported already. Open a new issue
|
||||
in that repository if you can't find a matching issue.
|
||||
close: true
|
9
.github/release-drafter.yml
vendored
9
.github/release-drafter.yml
vendored
@@ -1,3 +1,5 @@
|
||||
name-template: Home Assistant OS $NEXT_MINOR_VERSION
|
||||
version-template: "$MAJOR.$MINOR"
|
||||
categories:
|
||||
- title: 'Home Assistant Operating System'
|
||||
label: 'os'
|
||||
@@ -5,6 +7,8 @@ categories:
|
||||
label: 'build'
|
||||
- title: 'Raspberry Pi'
|
||||
label: 'board/raspberrypi'
|
||||
- title: 'Home Assistant Yellow'
|
||||
label: 'board/yellow'
|
||||
- title: 'Open Virtual Appliance'
|
||||
label: 'board/ova'
|
||||
- title: 'Generic x86-64'
|
||||
@@ -13,8 +17,11 @@ categories:
|
||||
label: 'board/odroid'
|
||||
- title: 'ASUS Tinker'
|
||||
label: 'board/tinker'
|
||||
- title: 'Khadas VIM Series'
|
||||
label: 'board/khadas'
|
||||
- title: 'Generic aarch64'
|
||||
label: 'board/generic-aarch64'
|
||||
filter-by-commitish: true
|
||||
commitish: dev
|
||||
template: |
|
||||
## Changes
|
||||
|
||||
|
17
.github/stale.yml
vendored
17
.github/stale.yml
vendored
@@ -1,17 +0,0 @@
|
||||
# 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
|
110
.github/workflows/dev.yml
vendored
110
.github/workflows/dev.yml
vendored
@@ -4,15 +4,21 @@ name: Development build
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
pull_request_target:
|
||||
types: [opened,synchronize,labeled]
|
||||
|
||||
jobs:
|
||||
version:
|
||||
|
||||
name: Generate version
|
||||
prepare:
|
||||
if: ${{ github.event_name == 'workflow_dispatch' || contains(github.event.pull_request.labels.*.name, 'run-dev-build') }}
|
||||
name: Prepare build
|
||||
runs-on: [ "ubuntu-20.04" ]
|
||||
permissions:
|
||||
contents: read
|
||||
pull-requests: read
|
||||
outputs:
|
||||
version_main: ${{ steps.version_main.outputs.version_main }}
|
||||
version_dev: ${{ steps.version_dev.outputs.version_dev }}
|
||||
version_dev: ${{ steps.version_dev.outputs.version_dev }}${{ steps.version_pr.outputs.version_pr }}
|
||||
matrix: ${{ steps.generate_matrix.outputs.result }}
|
||||
steps:
|
||||
- name: Generate Development build version
|
||||
shell: bash
|
||||
@@ -21,40 +27,65 @@ jobs:
|
||||
version_dev="dev$(date --utc +'%Y%m%d')"
|
||||
echo "Development version \"${version_dev}\""
|
||||
echo "::set-output name=version_dev::${version_dev}"
|
||||
- uses: actions/checkout@v2
|
||||
- name: Generate Development build version for PR
|
||||
if: ${{ github.event.pull_request }}
|
||||
shell: bash
|
||||
id: version_pr
|
||||
run: |
|
||||
version_pr=$(printf "%05d" ${{ github.event.pull_request.number }})
|
||||
echo "Development build for PR #${{ github.event.pull_request.number }}"
|
||||
echo "::set-output name=version_pr::${version_pr}"
|
||||
- uses: actions/checkout@v3
|
||||
- name: Get Major/Minor version
|
||||
id: version_main
|
||||
run: |
|
||||
major=$(cat ${GITHUB_WORKSPACE}/buildroot-external/meta | grep VERSION_MAJOR | cut -d'=' -f2)
|
||||
build=$(cat ${GITHUB_WORKSPACE}/buildroot-external/meta | grep VERSION_BUILD | cut -d'=' -f2)
|
||||
echo "::set-output name=version_main::${major}.${build}"
|
||||
- name: Create build matrix
|
||||
uses: actions/github-script@v6
|
||||
id: generate_matrix
|
||||
with:
|
||||
script: |
|
||||
const boards = require('./.github/workflows/matrix.json')
|
||||
|
||||
if (context.eventName == "workflow_dispatch") {
|
||||
console.log("Run full build for all boards")
|
||||
return { "board": boards }
|
||||
}
|
||||
|
||||
const labels = context.payload.pull_request.labels.map(l => l.name)
|
||||
const labelsSet = new Set(labels)
|
||||
const buildBoards = boards.filter(b => labelsSet.has(b.label))
|
||||
|
||||
return { "board": buildBoards }
|
||||
|
||||
build:
|
||||
name: Release build for ${{ matrix.board.name }}
|
||||
needs: version
|
||||
if: ${{ github.event_name == 'workflow_dispatch' || contains(github.event.pull_request.labels.*.name, 'run-dev-build') }}
|
||||
name: Development build for ${{ matrix.board.id }}
|
||||
environment: "dev_build"
|
||||
needs: prepare
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
board:
|
||||
- {"name": "ova", "output": "ova", "runner": "x86-64-runner"}
|
||||
- {"name": "generic_x86_64", "output": "generic-x86-64", "runner": "x86-64-runner"}
|
||||
- {"name": "odroid_c2", "output": "odroid-c2", "runner": "aarch64-runner"}
|
||||
- {"name": "odroid_c4", "output": "odroid-c4", "runner": "aarch64-runner"}
|
||||
- {"name": "odroid_n2", "output": "odroid-n2", "runner": "aarch64-runner"}
|
||||
- {"name": "odroid_xu4", "output": "odroid-xu4" , "runner": "aarch64-runner"}
|
||||
- {"name": "rpi", "output": "rpi", "runner": "arm-runner"}
|
||||
- {"name": "rpi0_w", "output": "rpi0-w", "runner": "arm-runner"}
|
||||
- {"name": "rpi2", "output": "rpi2", "runner": "arm-runner"}
|
||||
- {"name": "rpi3", "output": "rpi3", "runner": "arm-runner"}
|
||||
- {"name": "rpi3_64", "output": "rpi3-64", "runner": "aarch64-runner"}
|
||||
- {"name": "rpi4", "output": "rpi4", "runner": "arm-runner"}
|
||||
- {"name": "rpi4_64", "output": "rpi4-64", "runner": "aarch64-runner"}
|
||||
- {"name": "tinker", "output": "tinker", "runner": "arm-runner"}
|
||||
matrix: ${{ fromJson(needs.prepare.outputs.matrix) }}
|
||||
runs-on: ${{ matrix.board.runner }}
|
||||
|
||||
steps:
|
||||
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
|
||||
- uses: actions/checkout@v2
|
||||
- name: Define git reference
|
||||
uses: actions/github-script@v6
|
||||
id: generate_gitref
|
||||
with:
|
||||
script: |
|
||||
if (context.eventName == "workflow_dispatch")
|
||||
return { "ref": context.ref }
|
||||
return { "ref": context.payload.pull_request.head.sha }
|
||||
|
||||
- name: Checkout source
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
submodules: true
|
||||
persist-credentials: false
|
||||
ref: ${{ fromJSON(steps.generate_gitref.outputs.result).ref }}
|
||||
|
||||
- name: Build container
|
||||
run: docker build -t haos-builder .
|
||||
@@ -74,22 +105,25 @@ jobs:
|
||||
docker run --rm --privileged -v "${GITHUB_WORKSPACE}:/build" \
|
||||
-e BUILDER_UID="${BUILDER_UID}" -e BUILDER_GID="${BUILDER_GID}" \
|
||||
-v "${{ matrix.board.runner }}-build-cache:/cache" \
|
||||
haos-builder make BUILDDIR=/build VERSION_DEV=${{ needs.version.outputs.version_dev }} ${{ matrix.board.name }}
|
||||
-v "/build/output" \
|
||||
haos-builder make BUILDDIR=/build VERSION_DEV=${{ needs.prepare.outputs.version_dev }} ${{ matrix.board.defconfig }}
|
||||
|
||||
- name: Upload images
|
||||
uses: appleboy/scp-action@master
|
||||
uses: burnett01/rsync-deployments@5.2
|
||||
with:
|
||||
host: ${{ secrets.DEV_HOST }}
|
||||
username: ${{ secrets.DEV_USERNAME }}
|
||||
port: ${{ secrets.DEV_PORT }}
|
||||
key: ${{ secrets.DEV_SCP_KEY }}
|
||||
source: "release/*"
|
||||
target: ${{ secrets.DEV_TARGET_PATH }}/${{ needs.version.outputs.version_main }}.${{ needs.version.outputs.version_dev }}/
|
||||
strip_components: 1
|
||||
rsh: -q
|
||||
switches: -aW
|
||||
path: release/
|
||||
remote_path: ${{ secrets.DEV_TARGET_PATH }}/${{ needs.prepare.outputs.version_main }}.${{ needs.prepare.outputs.version_dev }}/
|
||||
remote_host: ${{ secrets.DEV_HOST }}
|
||||
remote_port: ${{ secrets.DEV_PORT }}
|
||||
remote_user: ${{ secrets.DEV_USERNAME }}
|
||||
remote_key: ${{ secrets.DEV_SSH_KEY }}
|
||||
|
||||
bump_version:
|
||||
name: Bump dev version to ${{ needs.version.outputs.version_main }}.${{ needs.version.outputs.version_dev }}
|
||||
needs: [ build, version ]
|
||||
name: Bump dev channel version
|
||||
if: ${{ github.event_name == 'workflow_dispatch' }}
|
||||
needs: [ build, prepare ]
|
||||
runs-on: [ "ubuntu-20.04" ]
|
||||
|
||||
steps:
|
||||
@@ -100,10 +134,10 @@ jobs:
|
||||
email: ${{ secrets.GIT_EMAIL }}
|
||||
token: ${{ secrets.GIT_TOKEN }}
|
||||
|
||||
- name: Bump Home Assistant OS dev version
|
||||
- name: Bump Home Assistant OS dev channel version to ${{ needs.prepare.outputs.version_main }}.${{ needs.prepare.outputs.version_dev }}
|
||||
uses: home-assistant/actions/helpers/version-push@master
|
||||
with:
|
||||
key: "hassos[]"
|
||||
key-description: "Home Assistant OS"
|
||||
version: ${{ needs.version.outputs.version_main }}.${{ needs.version.outputs.version_dev }}
|
||||
version: ${{ needs.prepare.outputs.version_main }}.${{ needs.prepare.outputs.version_dev }}
|
||||
channel: "dev"
|
||||
|
17
.github/workflows/label-actions.yml
vendored
Normal file
17
.github/workflows/label-actions.yml
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
name: 'Label Actions'
|
||||
|
||||
on:
|
||||
issues:
|
||||
types: [labeled, unlabeled]
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
issues: write
|
||||
pull-requests: write
|
||||
discussions: write
|
||||
|
||||
jobs:
|
||||
action:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: dessant/label-actions@v2
|
92
.github/workflows/matrix.json
vendored
Normal file
92
.github/workflows/matrix.json
vendored
Normal file
@@ -0,0 +1,92 @@
|
||||
[
|
||||
{
|
||||
"id": "ova",
|
||||
"defconfig": "ova",
|
||||
"runner": "x86-64-runner",
|
||||
"label": "board/ova"
|
||||
},
|
||||
{
|
||||
"id": "generic-x86-64",
|
||||
"defconfig": "generic_x86_64",
|
||||
"runner": "x86-64-runner",
|
||||
"label": "board/generic-x86-64"
|
||||
},
|
||||
{
|
||||
"id": "generic-aarch64",
|
||||
"defconfig": "generic_aarch64",
|
||||
"runner": "aarch64-runner",
|
||||
"label": "board/generic-aarch64"
|
||||
},
|
||||
{
|
||||
"id": "khadas-vim3",
|
||||
"defconfig": "khadas_vim3",
|
||||
"runner": "aarch64-runner",
|
||||
"label": "board/khadas"
|
||||
},
|
||||
{
|
||||
"id": "odroid-c2",
|
||||
"defconfig": "odroid_c2",
|
||||
"runner": "aarch64-runner",
|
||||
"label": "board/odroid"
|
||||
},
|
||||
{
|
||||
"id": "odroid-c4",
|
||||
"defconfig": "odroid_c4",
|
||||
"runner": "aarch64-runner",
|
||||
"label": "board/odroid"
|
||||
},
|
||||
{
|
||||
"id": "odroid-n2",
|
||||
"defconfig": "odroid_n2",
|
||||
"runner": "aarch64-runner",
|
||||
"label": "board/odroid"
|
||||
},
|
||||
{
|
||||
"id": "odroid-xu4",
|
||||
"defconfig": "odroid_xu4",
|
||||
"runner": "aarch64-runner",
|
||||
"label": "board/odroid"
|
||||
},
|
||||
{
|
||||
"id": "rpi2",
|
||||
"defconfig": "rpi2",
|
||||
"runner": "arm-runner",
|
||||
"label": "board/raspberrypi"
|
||||
},
|
||||
{
|
||||
"id": "rpi3",
|
||||
"defconfig": "rpi3",
|
||||
"runner": "arm-runner",
|
||||
"label": "board/raspberrypi"
|
||||
},
|
||||
{
|
||||
"id": "rpi3-64",
|
||||
"defconfig": "rpi3_64",
|
||||
"runner": "aarch64-runner",
|
||||
"label": "board/raspberrypi"
|
||||
},
|
||||
{
|
||||
"id": "rpi4",
|
||||
"defconfig": "rpi4",
|
||||
"runner": "arm-runner",
|
||||
"label": "board/raspberrypi"
|
||||
},
|
||||
{
|
||||
"id": "rpi4-64",
|
||||
"defconfig": "rpi4_64",
|
||||
"runner": "aarch64-runner",
|
||||
"label": "board/raspberrypi"
|
||||
},
|
||||
{
|
||||
"id": "yellow",
|
||||
"defconfig": "yellow",
|
||||
"runner": "aarch64-runner",
|
||||
"label": "board/yellow"
|
||||
},
|
||||
{
|
||||
"id": "tinker",
|
||||
"defconfig": "tinker",
|
||||
"runner": "arm-runner",
|
||||
"label": "board/tinker"
|
||||
}
|
||||
]
|
16
.github/workflows/pr-checks.yml
vendored
16
.github/workflows/pr-checks.yml
vendored
@@ -9,12 +9,20 @@ jobs:
|
||||
runs-on: ubuntu-20.04
|
||||
steps:
|
||||
- name: Check out code
|
||||
uses: actions/checkout@v1
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
submodules: true
|
||||
|
||||
- name: Check Dockerfile
|
||||
uses: brpaz/hadolint-action@v1.1.0
|
||||
uses: brpaz/hadolint-action@v1.5.0
|
||||
with:
|
||||
dockerfile: Dockerfile
|
||||
|
||||
- name: Check shell scripts
|
||||
uses: ludeeus/action-shellcheck@1.0.0
|
||||
uses: ludeeus/action-shellcheck@1.1.0
|
||||
with:
|
||||
ignore: "buildroot"
|
||||
ignore: buildroot buildroot-external/package/xe-guest-utilities
|
||||
|
||||
- name: Check buildroot-external packages
|
||||
run: |
|
||||
buildroot/utils/check-package --exclude PackageHeader --br2-external buildroot-external/package/*/*
|
||||
|
6
.github/workflows/release-drafter.yml
vendored
6
.github/workflows/release-drafter.yml
vendored
@@ -3,11 +3,13 @@ name: Release Drafter
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- dev
|
||||
- rel-4
|
||||
- rel-*
|
||||
|
||||
jobs:
|
||||
update_release_draft:
|
||||
permissions:
|
||||
contents: write # for release-drafter/release-drafter to create a github release
|
||||
pull-requests: read # for release-drafter/release-drafter to read PR content and labels
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: release-drafter/release-drafter@v5
|
||||
|
78
.github/workflows/release.yml
vendored
78
.github/workflows/release.yml
vendored
@@ -13,8 +13,9 @@ jobs:
|
||||
outputs:
|
||||
version: ${{ steps.version_check.outputs.version }}
|
||||
version_dev: ${{ steps.version_check.outputs.version_dev }}
|
||||
matrix: ${{ steps.generate_matrix.outputs.result }}
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/checkout@v3
|
||||
- name: Validate version
|
||||
id: version_check
|
||||
run: |
|
||||
@@ -34,32 +35,28 @@ jobs:
|
||||
echo "::set-output name=version::${major}.${build}"
|
||||
fi
|
||||
echo "::set-output name=version_dev::${tag_dev}"
|
||||
- name: Create build matrix
|
||||
uses: actions/github-script@v6
|
||||
id: generate_matrix
|
||||
with:
|
||||
script: |
|
||||
const boards = require('./.github/workflows/matrix.json')
|
||||
return { "board": boards }
|
||||
|
||||
build:
|
||||
name: Release build for ${{ matrix.board.name }}
|
||||
permissions:
|
||||
contents: write # for actions/upload-release-asset to upload release asset
|
||||
name: Release build for ${{ matrix.board.id }}
|
||||
needs: validate_release
|
||||
strategy:
|
||||
matrix:
|
||||
board:
|
||||
- {"name": "ova", "output": "ova", "runner": "x86-64-runner"}
|
||||
- {"name": "generic_x86_64", "output": "generic-x86-64", "runner": "x86-64-runner"}
|
||||
- {"name": "odroid_c2", "output": "odroid-c2", "runner": "aarch64-runner"}
|
||||
- {"name": "odroid_c4", "output": "odroid-c4", "runner": "aarch64-runner"}
|
||||
- {"name": "odroid_n2", "output": "odroid-n2", "runner": "aarch64-runner"}
|
||||
- {"name": "odroid_xu4", "output": "odroid-xu4" , "runner": "aarch64-runner"}
|
||||
- {"name": "rpi", "output": "rpi", "runner": "arm-runner"}
|
||||
- {"name": "rpi0_w", "output": "rpi0-w", "runner": "arm-runner"}
|
||||
- {"name": "rpi2", "output": "rpi2", "runner": "arm-runner"}
|
||||
- {"name": "rpi3", "output": "rpi3", "runner": "arm-runner"}
|
||||
- {"name": "rpi3_64", "output": "rpi3-64", "runner": "aarch64-runner"}
|
||||
- {"name": "rpi4", "output": "rpi4", "runner": "arm-runner"}
|
||||
- {"name": "rpi4_64", "output": "rpi4-64", "runner": "aarch64-runner"}
|
||||
- {"name": "tinker", "output": "tinker", "runner": "arm-runner"}
|
||||
matrix: ${{ fromJson(needs.validate_release.outputs.matrix) }}
|
||||
runs-on: ${{ matrix.board.runner }}
|
||||
|
||||
steps:
|
||||
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
submodules: true
|
||||
|
||||
- name: Build container
|
||||
run: docker build -t haos-builder .
|
||||
@@ -79,17 +76,18 @@ jobs:
|
||||
docker run --rm --privileged -v "${GITHUB_WORKSPACE}:/build" \
|
||||
-e BUILDER_UID="${BUILDER_UID}" -e BUILDER_GID="${BUILDER_GID}" \
|
||||
-v "${{ matrix.board.runner }}-build-cache:/cache" \
|
||||
haos-builder make BUILDDIR=/build VERSION_DEV=${{ needs.validate_release.outputs.version_dev }} ${{ matrix.board.name }}
|
||||
-v "/build/output" \
|
||||
haos-builder make BUILDDIR=/build VERSION_DEV=${{ needs.validate_release.outputs.version_dev }} ${{ matrix.board.defconfig }}
|
||||
|
||||
- name: Upload disk image
|
||||
if: ${{ matrix.board.name != 'ova' }}
|
||||
if: ${{ matrix.board.id != 'ova' }}
|
||||
uses: actions/upload-release-asset@v1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
upload_url: ${{ github.event.release.upload_url }}
|
||||
asset_path: ${{ github.workspace }}/release/haos_${{ matrix.board.output }}-${{ needs.validate_release.outputs.version }}.img.xz
|
||||
asset_name: haos_${{ matrix.board.output }}-${{ needs.validate_release.outputs.version }}.img.xz
|
||||
asset_path: ${{ github.workspace }}/release/haos_${{ matrix.board.id }}-${{ needs.validate_release.outputs.version }}.img.xz
|
||||
asset_name: haos_${{ matrix.board.id }}-${{ needs.validate_release.outputs.version }}.img.xz
|
||||
asset_content_type: application/x-xz
|
||||
|
||||
- name: Upload rauc update
|
||||
@@ -98,63 +96,63 @@ jobs:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
upload_url: ${{ github.event.release.upload_url }}
|
||||
asset_path: ${{ github.workspace }}/release/haos_${{ matrix.board.output }}-${{ needs.validate_release.outputs.version }}.raucb
|
||||
asset_name: haos_${{ matrix.board.output }}-${{ needs.validate_release.outputs.version }}.raucb
|
||||
asset_path: ${{ github.workspace }}/release/haos_${{ matrix.board.id }}-${{ needs.validate_release.outputs.version }}.raucb
|
||||
asset_name: haos_${{ matrix.board.id }}-${{ needs.validate_release.outputs.version }}.raucb
|
||||
asset_content_type: application/octet-stream
|
||||
|
||||
- name: Upload ova image
|
||||
if: ${{ matrix.board.name == 'ova' }}
|
||||
if: ${{ matrix.board.id == 'ova' }}
|
||||
uses: actions/upload-release-asset@v1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
upload_url: ${{ github.event.release.upload_url }}
|
||||
asset_path: ${{ github.workspace }}/release/haos_${{ matrix.board.output }}-${{ needs.validate_release.outputs.version }}.ova
|
||||
asset_name: haos_${{ matrix.board.output }}-${{ needs.validate_release.outputs.version }}.ova
|
||||
asset_path: ${{ github.workspace }}/release/haos_${{ matrix.board.id }}-${{ needs.validate_release.outputs.version }}.ova
|
||||
asset_name: haos_${{ matrix.board.id }}-${{ needs.validate_release.outputs.version }}.ova
|
||||
asset_content_type: application/x-tar
|
||||
|
||||
- name: Upload qcow2 image
|
||||
if: ${{ matrix.board.name == 'ova' }}
|
||||
if: ${{ matrix.board.id == 'ova' || matrix.board.id == 'generic-aarch64' }}
|
||||
uses: actions/upload-release-asset@v1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
upload_url: ${{ github.event.release.upload_url }}
|
||||
asset_path: ${{ github.workspace }}/release/haos_${{ matrix.board.output }}-${{ needs.validate_release.outputs.version }}.qcow2.xz
|
||||
asset_name: haos_${{ matrix.board.output }}-${{ needs.validate_release.outputs.version }}.qcow2.xz
|
||||
asset_path: ${{ github.workspace }}/release/haos_${{ matrix.board.id }}-${{ needs.validate_release.outputs.version }}.qcow2.xz
|
||||
asset_name: haos_${{ matrix.board.id }}-${{ needs.validate_release.outputs.version }}.qcow2.xz
|
||||
asset_content_type: application/x-xz
|
||||
|
||||
- name: Upload vdi image
|
||||
if: ${{ matrix.board.name == 'ova' }}
|
||||
if: ${{ matrix.board.id == 'ova' }}
|
||||
uses: actions/upload-release-asset@v1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
upload_url: ${{ github.event.release.upload_url }}
|
||||
asset_path: ${{ github.workspace }}/release/haos_${{ matrix.board.output }}-${{ needs.validate_release.outputs.version }}.vdi.zip
|
||||
asset_name: haos_${{ matrix.board.output }}-${{ needs.validate_release.outputs.version }}.vdi.zip
|
||||
asset_path: ${{ github.workspace }}/release/haos_${{ matrix.board.id }}-${{ needs.validate_release.outputs.version }}.vdi.zip
|
||||
asset_name: haos_${{ matrix.board.id }}-${{ needs.validate_release.outputs.version }}.vdi.zip
|
||||
asset_content_type: application/zip
|
||||
|
||||
- name: Upload vhdx image
|
||||
if: ${{ matrix.board.name == 'ova' }}
|
||||
if: ${{ matrix.board.id == 'ova' }}
|
||||
uses: actions/upload-release-asset@v1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
upload_url: ${{ github.event.release.upload_url }}
|
||||
asset_path: ${{ github.workspace }}/release/haos_${{ matrix.board.output }}-${{ needs.validate_release.outputs.version }}.vhdx.zip
|
||||
asset_name: haos_${{ matrix.board.output }}-${{ needs.validate_release.outputs.version }}.vhdx.zip
|
||||
asset_path: ${{ github.workspace }}/release/haos_${{ matrix.board.id }}-${{ needs.validate_release.outputs.version }}.vhdx.zip
|
||||
asset_name: haos_${{ matrix.board.id }}-${{ needs.validate_release.outputs.version }}.vhdx.zip
|
||||
asset_content_type: application/zip
|
||||
|
||||
- name: Upload vmdk image
|
||||
if: ${{ matrix.board.name == 'ova' }}
|
||||
if: ${{ matrix.board.id == 'ova' || matrix.board.id == 'generic-aarch64' }}
|
||||
uses: actions/upload-release-asset@v1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
upload_url: ${{ github.event.release.upload_url }}
|
||||
asset_path: ${{ github.workspace }}/release/haos_${{ matrix.board.output }}-${{ needs.validate_release.outputs.version }}.vmdk.zip
|
||||
asset_name: haos_${{ matrix.board.output }}-${{ needs.validate_release.outputs.version }}.vmdk.zip
|
||||
asset_path: ${{ github.workspace }}/release/haos_${{ matrix.board.id }}-${{ needs.validate_release.outputs.version }}.vmdk.zip
|
||||
asset_name: haos_${{ matrix.board.id }}-${{ needs.validate_release.outputs.version }}.vmdk.zip
|
||||
asset_content_type: application/zip
|
||||
|
||||
bump_version:
|
||||
|
50
.github/workflows/stale.yml
vendored
Normal file
50
.github/workflows/stale.yml
vendored
Normal file
@@ -0,0 +1,50 @@
|
||||
name: Stale
|
||||
|
||||
# yamllint disable-line rule:truthy
|
||||
on:
|
||||
schedule:
|
||||
- cron: "0 * * * *"
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
stale:
|
||||
permissions:
|
||||
issues: write # for actions/stale to close stale issues
|
||||
pull-requests: write # for actions/stale to close stale PRs
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
# The 90 day stale policy
|
||||
# Used for:
|
||||
# - Issues & PRs
|
||||
# - No PRs marked as no-stale or pinned
|
||||
# - No issues marked as no-stale, help-wanted or pinned
|
||||
- name: 90 days stale issues & PRs policy
|
||||
uses: actions/stale@v5
|
||||
with:
|
||||
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
days-before-stale: 90
|
||||
days-before-close: 7
|
||||
operations-per-run: 150
|
||||
remove-stale-when-updated: true
|
||||
stale-issue-label: "stale"
|
||||
exempt-issue-labels: "no-stale,help-wanted,pinned,enhancement"
|
||||
stale-issue-message: >
|
||||
There hasn't been any activity on this issue recently. To keep our
|
||||
backlog manageable we have to clean old issues, as many of them have
|
||||
already been resolved with the latest updates.
|
||||
|
||||
Please make sure to update to the latest Home Assistant OS version and
|
||||
check if that solves the issue. Let us know if that works for you by
|
||||
adding a comment 👍
|
||||
|
||||
This issue has now been marked as stale and will be closed if no
|
||||
further activity occurs. Thank you for your contributions.
|
||||
|
||||
stale-pr-label: "stale"
|
||||
exempt-pr-labels: "no-stale,pinned"
|
||||
stale-pr-message: >
|
||||
There hasn't been any activity on this pull request recently. This
|
||||
pull request has been automatically marked as stale because of that
|
||||
and will be closed if no further activity occurs within 7 days.
|
||||
|
||||
Thank you for your contributions.
|
1
.gitignore
vendored
1
.gitignore
vendored
@@ -1,3 +1,4 @@
|
||||
.DS_Store
|
||||
/release
|
||||
*.pem
|
||||
output*/
|
||||
|
4
.gitmodules
vendored
Normal file
4
.gitmodules
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
[submodule "buildroot"]
|
||||
path = buildroot
|
||||
url = https://github.com/home-assistant/buildroot.git
|
||||
branch = 2021.02.x-haos
|
17
Dockerfile
17
Dockerfile
@@ -1,4 +1,4 @@
|
||||
FROM debian:buster
|
||||
FROM debian:bullseye
|
||||
|
||||
# Set shell
|
||||
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
|
||||
@@ -28,19 +28,24 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||
cpio \
|
||||
file \
|
||||
git \
|
||||
graphviz \
|
||||
jq \
|
||||
make \
|
||||
ncurses-dev \
|
||||
openssh-client \
|
||||
patch \
|
||||
perl \
|
||||
python \
|
||||
python3 \
|
||||
python3-matplotlib \
|
||||
python-is-python3 \
|
||||
qemu-utils \
|
||||
rsync \
|
||||
skopeo \
|
||||
sudo \
|
||||
unzip \
|
||||
zip \
|
||||
wget \
|
||||
qemu-utils \
|
||||
openssh-client \
|
||||
vim \
|
||||
wget \
|
||||
zip \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Init entry
|
||||
|
@@ -1,12 +1,8 @@
|
||||
# Developer Documentation
|
||||
# Documentation
|
||||
|
||||
## Contents
|
||||
|
||||
- [Getting started](./getting_started_development.md) - the place for developers to begin
|
||||
- [Development](./development.md) - more details for developers
|
||||
- [Deployment](./deployment.md) - approach to git branching and releases
|
||||
- [Configuration](./configuration.md) - how users can configure HassOS
|
||||
- [Partition](./partition.md) - partition layout
|
||||
- [Configuration](./configuration.md) - how users can configure HAOS
|
||||
- [Network](./network.md) - approach to networking
|
||||
- [Bluetooth](./bluetooth.md) - approach to bluetooth
|
||||
- [Kernel](./kernel.md) - kernel versions
|
||||
|
@@ -5,26 +5,27 @@
|
||||
The following boards/devices are supported:
|
||||
|
||||
- Raspberry Pi
|
||||
- Pi 4 Model B (1 GB, 2 GB and 4 GB model) 32-bit (recommended)
|
||||
- Pi 4 Model B (1 GB, 2 GB and 4 GB model) 64-bit
|
||||
- Pi 3 Model B and B+ 32-bit (recommended)
|
||||
- Pi 3 Model B and B+ 64-bit
|
||||
- Pi 4 Model B (1 GB, 2 GB, 4 GB and 8 GB model) 64-bit (recommended)
|
||||
- Pi 4 Model B (1 GB, 2 GB, 4 GB and 8 GB model) 32-bit
|
||||
- Pi 3 Model B and B+ 64-bit (recommended)
|
||||
- Pi 3 Model B and B+ 32-bit
|
||||
- Pi 2 (not recommended)
|
||||
- Pi Zero-W (not recommended)
|
||||
- Pi (not recommended)
|
||||
- Hardkernel
|
||||
- Odroid-C2
|
||||
- Odroid-C4 (_experimental_)
|
||||
- Odroid-N2
|
||||
- Odroid-N2+
|
||||
- Odroid-C2
|
||||
- Odroid-C4
|
||||
- Odroid-XU4
|
||||
- Asus
|
||||
- Tinker Board
|
||||
- Generic x86-64 (UEFI, not suited for virtualization)
|
||||
- Intel NUC5CPYH
|
||||
- Intel NUC6CAYH
|
||||
- Intel NUC10I3FNK2
|
||||
- Gigabyte GB-BPCE-3455
|
||||
- Computers supporting x64-64 architecture and UEFI boot should generally work
|
||||
- Asus
|
||||
- Tinker Board
|
||||
- Computers supporting x86-64 architecture and UEFI boot should generally work
|
||||
- Virtual appliance (x86_64/UEFI):
|
||||
- VMDK
|
||||
- OVA ?
|
||||
@@ -39,17 +40,15 @@ Notes:
|
||||
|
||||
|Board|Build|Config|Docs|
|
||||
|-----|----|------|----|
|
||||
|Pi4B 32-bit |`make rpi4` |[rpi4](../../buildroot-external/configs/rpi4_defconfig)|[raspberrypi](./raspberrypi/)|
|
||||
|Pi4B 64-bit |`make rpi4_64` |[rpi4_64](../../buildroot-external/configs/rpi4_64_defconfig)|[raspberrypi](./raspberrypi/)|
|
||||
|Pi3B 32-bit |`make rpi3` |[rpi3](../../buildroot-external/configs/rpi3_defconfig)|[raspberrypi](./raspberrypi/)|
|
||||
|Pi3B 64-bit |`make rpi3_64` |[rpi3_64](../../buildroot-external/configs/rpi3_64_defconfig)|[raspberrypi](./raspberrypi/)|
|
||||
|Pi2 |`make rpi2` |[rpi2](../../buildroot-external/configs/rpi2_defconfig)|[raspberrypi](./raspberrypi/)|
|
||||
|Pi Zero |`make rpi0_w` |[rpi0_w](../../buildroot-external/configs/rpi0_w_defconfig)|[raspberrypi](./raspberrypi/)|
|
||||
|Pi |`make rpi` |[rpi](../../buildroot-external/configs/rpi_defconfig)|[raspberrypi](./raspberrypi/)|
|
||||
|Odroid-C2 |`make odroid_c2` |[odroid_c2](../../buildroot-external/configs/odroid_c2_defconfig)|[hardkernel](./hardkernel/)|
|
||||
|Odroid-C4 |`make odroid_c4` |[odroid_c4](../../buildroot-external/configs/odroid_c4_defconfig)|[hardkernel](./hardkernel/)|
|
||||
|Odroid-N2 |`make odroid_n2` |[odroid_n2](../../buildroot-external/configs/odroid_n2_defconfig)|[hardkernel](./hardkernel/)|
|
||||
|Odroid-XU4 |`make odroid_xu4` |[odroid_xu4](../../buildroot-external/configs/odroid_xu4_defconfig)|[hardkernel](./hardkernel/)|
|
||||
|Tinker Board |`make tinker` |[tinker](../../buildroot-external/configs/tinker_defconfig)|[asus](./asus/)|
|
||||
|Generic x86-64 |`make generic_x86_64` |[generic_x86_64](../../buildroot-external/configs/generic_x86_64_defconfig)|[generic-x86-64](./generic-x86-64/)|
|
||||
|OVA |`make ova` |[ova](../../buildroot-external/configs/ova_defconfig)|[ova](./ova/)|
|
||||
|Pi4B 64-bit |`make rpi4_64` |[rpi4_64](../../buildroot-external/configs/rpi4_64_defconfig)|[raspberrypi](./raspberrypi/)|
|
||||
|Pi4B 32-bit |`make rpi4` |[rpi4](../../buildroot-external/configs/rpi4_defconfig)|[raspberrypi](./raspberrypi/)|
|
||||
|Pi3B 64-bit |`make rpi3_64` |[rpi3_64](../../buildroot-external/configs/rpi3_64_defconfig)|[raspberrypi](./raspberrypi/)|
|
||||
|Pi3B 32-bit |`make rpi3` |[rpi3](../../buildroot-external/configs/rpi3_defconfig)|[raspberrypi](./raspberrypi/)|
|
||||
|Pi2 |`make rpi2` |[rpi2](../../buildroot-external/configs/rpi2_defconfig)|[raspberrypi](./raspberrypi/)|
|
||||
|Odroid-N2/N2+ |`make odroid_n2` |[odroid_n2](../../buildroot-external/configs/odroid_n2_defconfig)|[hardkernel](./hardkernel/)|
|
||||
|Odroid-C2 |`make odroid_c2` |[odroid_c2](../../buildroot-external/configs/odroid_c2_defconfig)|[hardkernel](./hardkernel/)|
|
||||
|Odroid-C4 |`make odroid_c4` |[odroid_c4](../../buildroot-external/configs/odroid_c4_defconfig)|[hardkernel](./hardkernel/)|
|
||||
|Odroid-XU4 |`make odroid_xu4` |[odroid_xu4](../../buildroot-external/configs/odroid_xu4_defconfig)|[hardkernel](./hardkernel/)|
|
||||
|Tinker Board |`make tinker` |[tinker](../../buildroot-external/configs/tinker_defconfig)|[asus](./asus/)|
|
||||
|Generic x86-64|`make generic_x86_64`|[generic_x86_64](../../buildroot-external/configs/generic_x86_64_defconfig)|[generic-x86-64](./generic-x86-64/)|
|
||||
|OVA |`make ova` |[ova](../../buildroot-external/configs/ova_defconfig)|[ova](./ova/)|
|
||||
|
36
Documentation/boards/generic-aarch64/README.md
Normal file
36
Documentation/boards/generic-aarch64/README.md
Normal file
@@ -0,0 +1,36 @@
|
||||
# Generic aarch64
|
||||
|
||||
## Supported Hardware
|
||||
|
||||
This board configuration aims to support most aarch64 systems with UEFI boot
|
||||
Hardware it has been tested with is listed below.
|
||||
|
||||
## Tested Hardware
|
||||
|
||||
| Device | Release Date | Support | Config |
|
||||
|-----------------------|--------------|---------|-------------|
|
||||
| QEMU | QEMU | yes | [generic_aarch64](../../../buildroot-external/configs/generic_aarch64_defconfig) |
|
||||
|
||||
|
||||
## Requirements
|
||||
|
||||
- aarch64 support
|
||||
- UEFI boot
|
||||
|
||||
## Wifi
|
||||
|
||||
WiFi is untested.
|
||||
|
||||
## Bluetooth
|
||||
|
||||
Bluetooth is untested.
|
||||
|
||||
## Installation
|
||||
|
||||
Make sure secure boot is disabled in the UEFI BIOS settings.
|
||||
|
||||
Currently there is no shiny installation method. Checklist:
|
||||
- Boot PC to live environment using PXE or USB
|
||||
- Copy or download the Home Assistant OS image into your live environment
|
||||
- unxz the image and dd to the local hard disk
|
||||
- Reboot
|
@@ -12,6 +12,7 @@ been tested with is listed below.
|
||||
|-----------------------|--------------|---------|-------------|
|
||||
| Intel NUC5CPYH | Q3 2015 | yes | [generic_x86_64](../../../buildroot-external/configs/generic_x86_64_defconfig) |
|
||||
| Intel NUC6CAYH | Q4 2016 | yes | [generic_x86_64](../../../buildroot-external/configs/generic_x86_64_defconfig) |
|
||||
| Intel NUC6CAYS | Q4 2016 | yes | [generic_x86_64](../../../buildroot-external/configs/generic_x86_64_defconfig) |
|
||||
| Intel NUC7i3DNHE | Q3 2017 | yes | [generic_x86_64](../../../buildroot-external/configs/generic_x86_64_defconfig) |
|
||||
| Intel NUC10i3FNK2 | Q4 2019 | yes | [generic_x86_64](../../../buildroot-external/configs/generic_x86_64_defconfig) |
|
||||
| Gigabyte GB-BPCE-3455 | 2017 | yes* | [generic_x86_64](../../../buildroot-external/configs/generic_x86_64_defconfig) |
|
||||
@@ -48,7 +49,7 @@ The following cards are supported:
|
||||
|
||||
## Bluetooth
|
||||
|
||||
Bluetooth is untested.
|
||||
Bluetooth integrated in Intel Wireless cards working OK, other options untested.
|
||||
|
||||
## Installation
|
||||
|
||||
|
@@ -6,16 +6,8 @@
|
||||
|---------------------|---------------|-----------------|--------------------|
|
||||
| Raspberry Pi B/B+/A+|2012/2014/2014 | not recommended | [rpi](../../../buildroot-external/configs/rpi_defconfig) |
|
||||
| Raspberry Pi 2 B |2015 | not recommended | [rpi2](../../../buildroot-external/configs/rpi2_defconfig) |
|
||||
| Raspberry Pi Zero |2015 | not recommended | [rpi](../../../buildroot-external/configs/rpi_defconfig) |
|
||||
| Raspberry Pi Zero W |2017 | not recommended | [rpi0_w](../../../buildroot-external/configs/rpi0_w_defconfig) |
|
||||
| Raspberry Pi 3 B/B+ |2016/2018 | yes | [rpi3](../../../buildroot-external/configs/rpi3_defconfig) / [rpi3_64](../../../buildroot-external/configs/rpi3_64_defconfig) |
|
||||
| Raspberry Pi 4 B |2019 | yes* | [rpi4](../../../buildroot-external/configs/rpi4_defconfig) / [rpi4_64](../../../buildroot-external/configs/rpi4_64_defconfig) |
|
||||
|
||||
\*1,2 and 4 GiB versions of the Raspberry Pi 4 B are supported. Support for the 8 GiB version is coming soon is part of #740.
|
||||
|
||||
## 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.
|
||||
| Raspberry Pi 4 B |2019 | yes | [rpi4](../../../buildroot-external/configs/rpi4_defconfig) / [rpi4_64](../../../buildroot-external/configs/rpi4_64_defconfig) |
|
||||
|
||||
## Serial console
|
||||
|
||||
|
@@ -23,6 +23,8 @@ hassos-xy.raucb
|
||||
- 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.
|
||||
|
||||
Text files that are on USB stick must have Unix (LF) end of line characters. If you create USB stick on Windows machine, be sure to use Notepad++, Visual Studio Code or any other editor, that supports different line endings. In Notepad++ LF EOL can be enabled with setting `Edit -> EOL Conversion -> Unix (LF)`.
|
||||
|
||||
You can put this USB stick into the device and it will be read on startup and files written to the correct places. You can also trigger this process later over the
|
||||
API/UI or by calling `systemctl restart hassos-config` on the host. *The USB Stick just needs to be inserted to the device during this setup process and can be disconnected afterwards.*
|
||||
|
||||
|
@@ -1,22 +0,0 @@
|
||||
# Deployment
|
||||
|
||||
We provide 3 different types of release builds:
|
||||
|
||||
- development (dev)
|
||||
- staging (beta)
|
||||
- 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 productive/staging 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`.
|
@@ -1,60 +0,0 @@
|
||||
# Development
|
||||
|
||||
## Boot system
|
||||
|
||||
`BOOT_SYS`:
|
||||
|
||||
- efi
|
||||
- hybrid
|
||||
- mbr
|
||||
|
||||
HassOS is using GPT. But to use GPT we need own the first 1024 of boot drive. Is that's not possible, you can use MBR for your device. This also work with SPLs.
|
||||
|
||||
Hybrid and SPL use both a hybrid MBR/GPT table but SPL move the GPT header 8 MB for give space to write SPL and boot images before.
|
||||
|
||||
`BOOT_SPL`:
|
||||
|
||||
- true
|
||||
- false
|
||||
|
||||
Enable SPL update handling.
|
||||
|
||||
`BOOTLOADER`:
|
||||
|
||||
- U-Boot
|
||||
- barebox
|
||||
|
||||
We support mainly U-Boot but for UEFI systems we can also use [barebox](https://barebox.org/). In the future, we hope to remove barebox with U-Boot also on UEFI.
|
||||
|
||||
`DISK_SIZE`:
|
||||
|
||||
Default 2. That is the size of end image in GB.
|
||||
|
||||
## Supervisor
|
||||
|
||||
`SUPERVISOR_MACHINE`:
|
||||
|
||||
- intel-nuc
|
||||
- odroid-c2
|
||||
- odroid-c4
|
||||
- odroid-n2
|
||||
- odroid-xu
|
||||
- qemuarm
|
||||
- qemuarm-64
|
||||
- qemux86
|
||||
- qemux86-64
|
||||
- raspberrypi
|
||||
- raspberrypi2
|
||||
- raspberrypi3
|
||||
- raspberrypi4
|
||||
- raspberrypi3-64
|
||||
- raspberrypi4-64
|
||||
- tinker
|
||||
|
||||
`SUPERVISOR_ARCH`:
|
||||
|
||||
- amd64
|
||||
- i386
|
||||
- armhf
|
||||
- armv7
|
||||
- aarch64
|
@@ -1,101 +0,0 @@
|
||||
# Getting started with HassOS development using Docker on GNU/Linux
|
||||
|
||||
First, install `docker-ce` 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:
|
||||
|
||||
```bash
|
||||
$ 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:
|
||||
|
||||
```bash
|
||||
$ 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 home-assistant/operating-system repository checkout (please adapt path names as needed), make sure your intended changes to the source tree are applied (and committed, ideally :)), and execute the `enter.sh` helper script:
|
||||
|
||||
```bash
|
||||
$ cd ~/codebase/operating-system/
|
||||
$ 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:
|
||||
|
||||
```bash
|
||||
root@somehashinhex:/build#
|
||||
root@somehashinhex:/build# make help
|
||||
[...]
|
||||
```
|
||||
|
||||
The HassOS developers provide a `Makefile` that will build HassOS images for a list of targets. For example run the command below to start building the _ova_ variant, and go make a cup of tea. Or fifteen.
|
||||
|
||||
```bash
|
||||
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:
|
||||
|
||||
```bash
|
||||
[...]
|
||||
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:
|
||||
|
||||
```bash
|
||||
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:
|
||||
|
||||
```bash
|
||||
root@fd292c061896:/build# gunzip release/hassos_ova-2.2.qcow2.gz
|
||||
root@fd292c061896:/build# ls -lh release/
|
||||
total 673M
|
||||
-rw-r--r-- 1 root root 337M Oct 10 20:25 hassos_ova-2.2.qcow2
|
||||
```
|
||||
|
||||
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 provides the "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 path names as necessary, for example if you have installed the ovmf firmware image at another location.)
|
||||
|
||||
```bash
|
||||
$ /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 additional 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.
|
@@ -1,19 +1,22 @@
|
||||
|
||||
# Kernel Version
|
||||
|
||||
Default Kernel tree: 5.10
|
||||
Default Kernel tree: 5.15
|
||||
|
||||
| Board | Version |
|
||||
|-------|---------|
|
||||
| Open Virtual Appliance | 5.10.42 |
|
||||
| Raspberry Pi | 5.10.17 |
|
||||
| Raspberry Pi 0-W | 5.10.17 |
|
||||
| Raspberry Pi 2 | 5.10.17 |
|
||||
| Raspberry Pi 3 | 5.10.17 |
|
||||
| Raspberry Pi 4 | 5.10.17 |
|
||||
| Tinker Board | 5.10.42 |
|
||||
| Odroid-C2 | 5.10.42 |
|
||||
| Odroid-C4 | 5.10.42 |
|
||||
| Odroid-N2 | 5.9.16 |
|
||||
| Odroid-XU4 | 5.10.42 |
|
||||
| Generic x86-64 | 5.10.42 |
|
||||
| Open Virtual Appliance | 5.15.72 |
|
||||
| Raspberry Pi | 5.15.61 |
|
||||
| Raspberry Pi 0-W | 5.15.61 |
|
||||
| Raspberry Pi 2 | 5.15.61 |
|
||||
| Raspberry Pi 3 | 5.15.61 |
|
||||
| Raspberry Pi 4 | 5.15.61 |
|
||||
| Home Assistant Yellow | 5.15.61 |
|
||||
| Tinker Board | 5.15.72 |
|
||||
| Odroid-C2 | 5.15.72 |
|
||||
| Odroid-C4 | 5.15.72 |
|
||||
| Odroid-N2 | 5.15.72 |
|
||||
| Odroid-XU4 | 5.15.72 |
|
||||
| Generic aarch64 | 5.15.72 |
|
||||
| Generic x86-64 | 5.15.72 |
|
||||
| Khadas VIM3 | 5.15.72 |
|
||||
|
@@ -128,6 +128,14 @@ profile using DHCP, use the following commands on the host console:
|
||||
|
||||
Home Assistant OS will recreate the default connection profile during boot.
|
||||
|
||||
### Enabling Wi-Fi
|
||||
|
||||
Wi-Fi is discouraged for reliability reasons. However, if you still prefer to use Wi-Fi, you can us the `ha network` command to set up Wi-Fi (example for a Raspberry Pi 4, check `ha network info` to check if your board supports Wi-Fi and the name of the Wi-Fi device):
|
||||
|
||||
```bash
|
||||
ha network update wlan0 --ipv4-method auto --wifi-auth wpa-psk --wifi-mode infrastructure --wifi-ssid "MY-SSID" --wifi-psk MY_PASS
|
||||
````
|
||||
|
||||
### Powersave
|
||||
|
||||
If you have trouble with powersave then apply the following changes:
|
||||
|
@@ -1,81 +0,0 @@
|
||||
# Partition
|
||||
|
||||
The partition layout is a bit different than the typical setup. We prefer GPT, if possible. With SoCs which don't support GPT, we use a hybrid GPT. For more details about this topic, please refer to the [development](development.md) documentation.
|
||||
|
||||
The system is designed to have as few write operations to the storage media as possible. This means that we only write during the OTA updates and 5-6 times per week on the overlay partition. The data partition receives the main I/O operations and for this reason is ideal for placing on a different drive.
|
||||
|
||||
A visual representation looks like this:
|
||||
|
||||
```text
|
||||
-------------------------
|
||||
| Bootloader |
|
||||
-------------------------
|
||||
| Kernel A |
|
||||
-------------------------
|
||||
| System A |
|
||||
| |
|
||||
-------------------------
|
||||
| Kernel B |
|
||||
-------------------------
|
||||
| System B |
|
||||
| |
|
||||
-------------------------
|
||||
| Bootstate |
|
||||
-------------------------
|
||||
| Overlay |
|
||||
| |
|
||||
...
|
||||
|
||||
-------------------------
|
||||
| Data |
|
||||
| |
|
||||
-------------------------
|
||||
```
|
||||
|
||||
Sometime the bootloader part can look different because there can be firmware or SPLs for boot the CPU on the SoC.
|
||||
|
||||
## Data disk
|
||||
|
||||

|
||||
|
||||
The data partition is the only partition with real I/O. It will be expanded automatically at boot to the full size of the disk.
|
||||
|
||||
|
||||
## Using datactl to move the data partition.
|
||||
|
||||
In a Home Assistant OS installation, the data is stored on the `/mnt/data` partition of the SD card. This is the only read+write partition on the SD drive. Using the `datactl` move command, this partition can be moved off of the SD card onto an externally connected drive, leaving the rest of the read-only system on the SD.
|
||||
|
||||
The storage capacity of the external drive must be larger than the storage capacity of the existing SD card.
|
||||
|
||||
The command needs to be run from the host console by either connecting a keyboard and monitor or making use of the [debug ssh access](https://developers.home-assistant.io/docs/operating-system/debugging/) over port 22222. The command will not work from within an SSH add-on container.
|
||||
|
||||
Log in as `root` to get to the Home Assistant CLI and then enter `login` to continue to the host.
|
||||
|
||||
Confirm your USB SSD/HD is connected and recognized using `fdisk -l`.
|
||||
|
||||
With the drive connected, use the following command (replacing sdx with your drive, without a partition number):
|
||||
|
||||
```sh
|
||||
$ datactl move /dev/sdx
|
||||
```
|
||||
|
||||
Enter "yes" to confirm the operation. This will prepare the disk, however, the
|
||||
actual move will be running on next reboot. This will make the first boot significantly longer than usual; please be patient. Reboot with the following command:
|
||||
```sh
|
||||
$ ha host reboot
|
||||
```
|
||||
|
||||
Once complete, the external drive
|
||||
will contain the data and will need to be plugged in to successfully boot Home
|
||||
Assistant.
|
||||
|
||||
## Check if the move was succesful.
|
||||
Within the Home Assistant interface you won't see if the move was succesful. To check this, go to your host console again (as described above) and enter:
|
||||
```sh
|
||||
$ systemctl status mnt-data.mount
|
||||
```
|
||||
If the data partition was moved to your USB drive you should see ```sh Active: active (mounted) ``` in the output. Also, it will show, which drive got mounted as /mnt/data (```sh Where ``` and ```sh what ``` section of the output)
|
||||
|
||||
|
||||
## Check Power Supply Rating
|
||||
Using an USB attached SSD can draw quite some power. For instance on Raspberry Pi 3 the official Raspberry Pi power supply (PSU) only provides 2.5A which can be too tight. Use a power supply which can at least provide 3.5A. Alternatively use a powered USB hub. Connect the Hub to one of the USB slots of your Raspberry Pi, and connect the SSD to the Hub. The power supply that came with the Hub will power the attached device(s).
|
16
Makefile
16
Makefile
@@ -12,9 +12,9 @@ TARGETS_CONFIG := $(notdir $(patsubst %_defconfig,%-config,$(wildcard $(DEFCONFI
|
||||
|
||||
# Set O variable if not already done on the command line
|
||||
ifneq ("$(origin O)", "command line")
|
||||
O := $(BUILDROOT)/output
|
||||
O := $(BUILDDIR)/output
|
||||
else
|
||||
override O := $(BUILDROOT)/$(O)
|
||||
override O := $(BUILDDIR)/$(O)
|
||||
endif
|
||||
|
||||
.NOTPARALLEL: $(TARGETS) $(TARGETS_CONFIG) all
|
||||
@@ -26,24 +26,28 @@ all: $(TARGETS)
|
||||
$(RELEASE_DIR):
|
||||
mkdir -p $(RELEASE_DIR)
|
||||
|
||||
savedefconfig:
|
||||
@echo "config $*"
|
||||
$(MAKE) -C $(BUILDROOT) O=$(O) BR2_EXTERNAL=$(BUILDROOT_EXTERNAL) "savedefconfig"
|
||||
|
||||
$(TARGETS_CONFIG): %-config:
|
||||
@echo "config $*"
|
||||
$(MAKE) -C $(BUILDROOT) BR2_EXTERNAL=$(BUILDROOT_EXTERNAL) "$*_defconfig"
|
||||
$(MAKE) -C $(BUILDROOT) O=$(O) BR2_EXTERNAL=$(BUILDROOT_EXTERNAL) "$*_defconfig"
|
||||
|
||||
$(TARGETS): %: $(RELEASE_DIR) %-config
|
||||
@echo "build $@"
|
||||
$(MAKE) -C $(BUILDROOT) BR2_EXTERNAL=$(BUILDROOT_EXTERNAL) VERSION_DEV=$(VERSION_DEV)
|
||||
$(MAKE) -C $(BUILDROOT) O=$(O) BR2_EXTERNAL=$(BUILDROOT_EXTERNAL) VERSION_DEV=$(VERSION_DEV)
|
||||
cp -f $(O)/images/haos_* $(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
|
||||
$(MAKE) -C $(BUILDROOT) O=$(O) BR2_EXTERNAL=$(BUILDROOT_EXTERNAL) clean
|
||||
endif
|
||||
@echo "finished $@"
|
||||
|
||||
clean:
|
||||
$(MAKE) -C $(BUILDROOT) BR2_EXTERNAL=$(BUILDROOT_EXTERNAL) clean
|
||||
$(MAKE) -C $(BUILDROOT) O=$(O) BR2_EXTERNAL=$(BUILDROOT_EXTERNAL) clean
|
||||
|
||||
help:
|
||||
@echo "Supported targets: $(TARGETS)"
|
||||
|
26
README.md
26
README.md
@@ -1,8 +1,8 @@
|
||||
# Home Assistant Operating System
|
||||
|
||||
Home Assistant Operating System (formerly HassOS) is an operating system optimized for hosting [Home Assistant](https://www.home-assistant.io) and its [Add-ons](https://www.home-assistant.io/addons/).
|
||||
Home Assistant Operating System (formerly HassOS) is a Linux based operating system optimized to host [Home Assistant](https://www.home-assistant.io) and its [Add-ons](https://www.home-assistant.io/addons/).
|
||||
|
||||
Home Assistant Operating System uses Docker as Container engine. It by default deploys the Home Assistant Supervisor as a container. Home Assistant Supervisor in turn uses the Docker container engine to control Home Assistant Core and Add-Ons in separate containers. Home Assistant Operating System is **not** based on a regular Linux distribution like Ubuntu. It is built using [buildroot](https://buildroot.org/) and it is optimized for running Home Assistant, especially on single board compute (SBC) devices like the Pi, ODROID, NUC and Tinker Board (see supported hardware below).
|
||||
Home Assistant Operating System uses Docker as Container engine. It by default deploys the Home Assistant Supervisor as a container. Home Assistant Supervisor in turn uses the Docker container engine to control Home Assistant Core and Add-Ons in separate containers. Home Assistant Operating System is **not** based on a regular Linux distribution like Ubuntu. It is built using [Buildroot](https://buildroot.org/) and it is optimized to run Home Assistant. It targets single board compute (SBC) devices like the Raspberry Pi or ODROID but also supports x86-64 systems with UEFI.
|
||||
|
||||
## Features
|
||||
|
||||
@@ -10,14 +10,14 @@ Home Assistant Operating System uses Docker as Container engine. It by default d
|
||||
- Minimized I/O
|
||||
- Over The Air (OTA) updates
|
||||
- Offline updates
|
||||
- Modular using Docker
|
||||
- Modular using Docker container engine
|
||||
|
||||
## Supported hardware
|
||||
|
||||
- Raspberry Pi
|
||||
- Hardkernel ODROID
|
||||
- Intel NUC
|
||||
- Asus Tinker Board
|
||||
- Generic x86-64 (e.g. Intel NUC)
|
||||
- Virtual appliances
|
||||
|
||||
See the full list and specific models [here](./Documentation/boards/README.md)
|
||||
@@ -28,11 +28,17 @@ If you just want to use Home Assistant the official [getting started guide](http
|
||||
|
||||
If you're interested in finding out more about Home Assistant Operating System and how it works read on...
|
||||
|
||||
## HassOS components
|
||||
## Development
|
||||
|
||||
If you don't have experience with embedded systems, Buildroot or the build process for Linux distributions it is recommended to read up on these topics first (e.g. [Bootlin](https://bootlin.com/docs/) has excellent resources).
|
||||
|
||||
The Home Assistant Operating System documentation can be found on the [Home Assistant Developer Docs website](https://developers.home-assistant.io/docs/operating-system).
|
||||
|
||||
### Components
|
||||
|
||||
- **Bootloader:**
|
||||
- [Barebox](https://barebox.org/) for devices that support EFI
|
||||
- [U-Boot](https://www.denx.de/wiki/U-Boot) for devices that don't support EFI
|
||||
- [Barebox](https://barebox.org/) for devices that support UEFI
|
||||
- [U-Boot](https://www.denx.de/wiki/U-Boot) for devices that don't support UEFI
|
||||
- **Operating System:**
|
||||
- [Buildroot](https://buildroot.org/) LTS Linux
|
||||
- **File Systems:**
|
||||
@@ -45,12 +51,6 @@ If you're interested in finding out more about Home Assistant Operating System a
|
||||
- **Security:**
|
||||
- [AppArmor](https://apparmor.net/) Linux kernel security module
|
||||
|
||||
If you don't have experience with these, embedded systems, buildroot or the build process for Linux distributions, then please read up on these topics. The rest of the documentation in this project is for developers and assumes you have experience with embedded systems or a strong understanding of the internal workings of operating systems.
|
||||
|
||||
## Developer Documentation
|
||||
|
||||
All developer documentation is in the [Documentation](./Documentation) directory.
|
||||
|
||||
### Development builds
|
||||
|
||||
The Development build GitHub Action Workflow is a manually triggered workflow
|
||||
|
1
buildroot
Submodule
1
buildroot
Submodule
Submodule buildroot added at 5468d36a26
@@ -1,13 +1,17 @@
|
||||
source "$BR2_EXTERNAL_HASSOS_PATH/package/hassio/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"
|
||||
source "$BR2_EXTERNAL_HASSOS_PATH/package/intel-e1000e/Config.in"
|
||||
source "$BR2_EXTERNAL_HASSOS_PATH/package/rpi-eeprom/Config.in"
|
||||
source "$BR2_EXTERNAL_HASSOS_PATH/package/rtl8812au/Config.in"
|
||||
source "$BR2_EXTERNAL_HASSOS_PATH/package/os-agent/Config.in"
|
||||
source "$BR2_EXTERNAL_HASSOS_PATH/package/udisks2/Config.in"
|
||||
source "$BR2_EXTERNAL_HASSOS_PATH/package/eq3_char_loop/Config.in"
|
||||
source "$BR2_EXTERNAL_HASSOS_PATH/package/gasket/Config.in"
|
||||
source "$BR2_EXTERNAL_HASSOS_PATH/package/generic_raw_uart/Config.in"
|
||||
source "$BR2_EXTERNAL_HASSOS_PATH/package/hardkernel-boot/Config.in"
|
||||
source "$BR2_EXTERNAL_HASSOS_PATH/package/hassio/Config.in"
|
||||
source "$BR2_EXTERNAL_HASSOS_PATH/package/khadas-boot/Config.in"
|
||||
source "$BR2_EXTERNAL_HASSOS_PATH/package/os-agent/Config.in"
|
||||
source "$BR2_EXTERNAL_HASSOS_PATH/package/pi-bluetooth/Config.in"
|
||||
source "$BR2_EXTERNAL_HASSOS_PATH/package/qemu-guest-agent/Config.in"
|
||||
source "$BR2_EXTERNAL_HASSOS_PATH/package/rpi-eeprom/Config.in"
|
||||
source "$BR2_EXTERNAL_HASSOS_PATH/package/rpi-rf-mod/Config.in"
|
||||
source "$BR2_EXTERNAL_HASSOS_PATH/package/rtl88x2bu/Config.in"
|
||||
source "$BR2_EXTERNAL_HASSOS_PATH/package/rtl8821cu/Config.in"
|
||||
source "$BR2_EXTERNAL_HASSOS_PATH/package/tempio/Config.in.host"
|
||||
source "$BR2_EXTERNAL_HASSOS_PATH/package/udisks2/Config.in"
|
||||
source "$BR2_EXTERNAL_HASSOS_PATH/package/xe-guest-utilities/Config.in"
|
||||
|
@@ -0,0 +1 @@
|
||||
console=tty1 console=ttyS0
|
81
buildroot-external/board/arm-uefi/generic-aarch64/grub.cfg
Normal file
81
buildroot-external/board/arm-uefi/generic-aarch64/grub.cfg
Normal file
@@ -0,0 +1,81 @@
|
||||
set default=99
|
||||
set timeout=1
|
||||
|
||||
set ORDER="A B"
|
||||
set A_OK=0
|
||||
set B_OK=0
|
||||
set A_TRY=0
|
||||
set B_TRY=0
|
||||
set MACHINE_ID=""
|
||||
load_env
|
||||
|
||||
# select bootable slot
|
||||
for SLOT in $ORDER; do
|
||||
if [ "$SLOT" == "A" ]; then
|
||||
INDEX=0
|
||||
OK=$A_OK
|
||||
TRY=$A_TRY
|
||||
fi
|
||||
if [ "$SLOT" == "B" ]; then
|
||||
INDEX=1
|
||||
OK=$B_OK
|
||||
TRY=$B_TRY
|
||||
fi
|
||||
if [ "$OK" -eq 1 -a "$TRY" -lt 3 ]; then
|
||||
default=$INDEX
|
||||
|
||||
# increment attempts and save back to slot
|
||||
if [ "$TRY" -eq 1 ]; then
|
||||
TRY=2
|
||||
elif [ "$TRY" -eq 2 ]; then
|
||||
TRY=3
|
||||
else
|
||||
TRY=1
|
||||
fi
|
||||
|
||||
if [ "$SLOT" == "A" ]; then
|
||||
A_TRY=$TRY
|
||||
fi
|
||||
if [ "$SLOT" == "B" ]; then
|
||||
B_TRY=$TRY
|
||||
fi
|
||||
|
||||
break
|
||||
fi
|
||||
done
|
||||
|
||||
# No bootable slot found, choose rescue...
|
||||
if [ "$default" -eq 99 ]; then
|
||||
if [ "$A_OK" -eq 1 ]; then
|
||||
default=2
|
||||
fi
|
||||
if [ "$B_OK" -eq 1 ]; then
|
||||
default=3
|
||||
fi
|
||||
fi
|
||||
|
||||
save_env A_TRY A_OK B_TRY B_OK ORDER MACHINE_ID
|
||||
|
||||
default_cmdline="rootwait zram.enabled=1 zram.num_devices=3 apparmor=1 security=apparmor systemd.machine_id=$MACHINE_ID fsck.repair=yes"
|
||||
file_env -f ($root)/cmdline.txt cmdline
|
||||
|
||||
# root is a full HDD/partition definition in GRUB format like hd0,gpt1
|
||||
# We extract the part before the comma to then append our own partition index
|
||||
# at the end. This is hacky but the best way I found
|
||||
regexp --set 1:boothd (.+),.+ ${root}
|
||||
|
||||
menuentry "Slot A (OK=$A_OK TRY=$A_TRY)" {
|
||||
linux (${boothd},gpt2)/Image root=PARTUUID=8d3d53e3-6d49-4c38-8349-aff6859e82fd $default_cmdline $cmdline rauc.slot=A
|
||||
}
|
||||
|
||||
menuentry "Slot B (OK=$B_OK TRY=$B_TRY)" {
|
||||
linux (${boothd},gpt4)/Image root=PARTUUID=a3ec664e-32ce-4665-95ea-7ae90ce9aa20 $default_cmdline $cmdline rauc.slot=B
|
||||
}
|
||||
|
||||
menuentry "Slot A (rescue shell)" {
|
||||
linux (${boothd},gpt2)/Image root=PARTUUID=8d3d53e3-6d49-4c38-8349-aff6859e82fd $default_cmdline $cmdline rauc.slot=A systemd.unit=recovery.target
|
||||
}
|
||||
|
||||
menuentry "Slot B (rescue shell)" {
|
||||
linux (${boothd},gpt4)/Image root=PARTUUID=a3ec664e-32ce-4665-95ea-7ae90ce9aa20 $default_cmdline $cmdline rauc.slot=B systemd.unit=recovery.target
|
||||
}
|
27
buildroot-external/board/arm-uefi/generic-aarch64/hassos-hook.sh
Executable file
27
buildroot-external/board/arm-uefi/generic-aarch64/hassos-hook.sh
Executable file
@@ -0,0 +1,27 @@
|
||||
#!/bin/bash
|
||||
# shellcheck disable=SC2155
|
||||
|
||||
function hassos_pre_image() {
|
||||
local BOOT_DATA="$(path_boot_dir)"
|
||||
local EFIPART_DATA="${BINARIES_DIR}/efi-part"
|
||||
|
||||
mkdir -p "${BOOT_DATA}/EFI/BOOT"
|
||||
|
||||
cp "${BOARD_DIR}/grub.cfg" "${EFIPART_DATA}/EFI/BOOT/grub.cfg"
|
||||
cp "${BOARD_DIR}/cmdline.txt" "${EFIPART_DATA}/cmdline.txt"
|
||||
grub-editenv "${EFIPART_DATA}/EFI/BOOT/grubenv" create
|
||||
|
||||
cp -r "${EFIPART_DATA}/"* "${BOOT_DATA}/"
|
||||
}
|
||||
|
||||
|
||||
function hassos_post_image() {
|
||||
convert_disk_image_virtual vmdk
|
||||
convert_disk_image_virtual qcow2
|
||||
|
||||
convert_disk_image_zip vmdk
|
||||
convert_disk_image_xz qcow2
|
||||
|
||||
convert_disk_image_xz
|
||||
}
|
||||
|
@@ -0,0 +1,20 @@
|
||||
CONFIG_EFI_STUB=y
|
||||
|
||||
CONFIG_VIRTIO=y
|
||||
CONFIG_VIRTIO_PCI=y
|
||||
CONFIG_VIRTIO_NET=y
|
||||
CONFIG_VIRTIO_BALLOON=m
|
||||
CONFIG_VIRTIO_INPUT=m
|
||||
CONFIG_VIRTIO_BLK=y
|
||||
CONFIG_VIRTIO_BLK_SCSI=y
|
||||
CONFIG_VIRTIO_CONSOLE=m
|
||||
CONFIG_VIRTIO_VSOCKETS=m
|
||||
CONFIG_VIRTIO_MMIO=y
|
||||
CONFIG_SCSI_VIRTIO=y
|
||||
CONFIG_HW_RANDOM_VIRTIO=y
|
||||
|
||||
CONFIG_NVME_CORE=y
|
||||
CONFIG_BLK_DEV_NVME=y
|
||||
CONFIG_NVME_HWMON=y
|
||||
|
||||
CONFIG_DRM_VIRTIO_GPU=m
|
10
buildroot-external/board/arm-uefi/generic-aarch64/meta
Normal file
10
buildroot-external/board/arm-uefi/generic-aarch64/meta
Normal file
@@ -0,0 +1,10 @@
|
||||
BOARD_ID=generic-aarch64
|
||||
BOARD_NAME="Generic aarch64"
|
||||
CHASSIS=embedded
|
||||
BOOTLOADER=grub
|
||||
KERNEL_FILE=Image
|
||||
BOOT_SYS=efi
|
||||
BOOT_SPL=false
|
||||
DISK_SIZE=6
|
||||
SUPERVISOR_MACHINE=qemuarm-64
|
||||
SUPERVISOR_ARCH=aarch64
|
@@ -120,7 +120,6 @@ CONFIG_CGROUP_WRITEBACK=y
|
||||
CONFIG_CGROUP_SCHED=y
|
||||
CONFIG_FAIR_GROUP_SCHED=y
|
||||
CONFIG_CFS_BANDWIDTH=y
|
||||
CONFIG_RT_GROUP_SCHED=y
|
||||
CONFIG_CGROUP_PIDS=y
|
||||
CONFIG_CGROUP_RDMA=y
|
||||
CONFIG_CGROUP_FREEZER=y
|
||||
@@ -1517,7 +1516,7 @@ CONFIG_BT_HCIBTUSB=y
|
||||
CONFIG_BT_HCIBTUSB_BCM=y
|
||||
CONFIG_BT_HCIBTUSB_RTL=y
|
||||
CONFIG_BT_HCIBTSDIO=y
|
||||
CONFIG_BT_HCIUART=y
|
||||
CONFIG_BT_HCIUART=m
|
||||
CONFIG_BT_HCIUART_SERDEV=y
|
||||
CONFIG_BT_HCIUART_H4=y
|
||||
# CONFIG_BT_HCIUART_NOKIA is not set
|
||||
@@ -1527,6 +1526,7 @@ CONFIG_BT_HCIUART_ATH3K=y
|
||||
CONFIG_BT_HCIUART_3WIRE=y
|
||||
# CONFIG_BT_HCIUART_INTEL is not set
|
||||
# CONFIG_BT_HCIUART_BCM is not set
|
||||
CONFIG_BT_HCIUART_RTL=y
|
||||
# CONFIG_BT_HCIUART_QCA is not set
|
||||
# CONFIG_BT_HCIUART_AG6XX is not set
|
||||
# CONFIG_BT_HCIUART_MRVL is not set
|
||||
@@ -1556,7 +1556,6 @@ CONFIG_CFG80211_REQUIRE_SIGNED_REGDB=y
|
||||
CONFIG_CFG80211_USE_KERNEL_REGDB_KEYS=y
|
||||
CONFIG_CFG80211_DEFAULT_PS=y
|
||||
CONFIG_CFG80211_DEBUGFS=y
|
||||
CONFIG_CFG80211_CRDA_SUPPORT=y
|
||||
CONFIG_CFG80211_WEXT=y
|
||||
CONFIG_LIB80211=y
|
||||
CONFIG_LIB80211_CRYPT_WEP=y
|
||||
@@ -2475,7 +2474,7 @@ CONFIG_SERIAL_CORE_CONSOLE=y
|
||||
# CONFIG_SERIAL_CONEXANT_DIGICOLOR is not set
|
||||
# CONFIG_SERIAL_ST_ASC is not set
|
||||
CONFIG_SERIAL_DEV_BUS=y
|
||||
# CONFIG_SERIAL_DEV_CTRL_TTYPORT is not set
|
||||
CONFIG_SERIAL_DEV_CTRL_TTYPORT=y
|
||||
# CONFIG_TTY_PRINTK is not set
|
||||
# CONFIG_HVC_DCC is not set
|
||||
# CONFIG_IPMI_HANDLER is not set
|
||||
|
@@ -3,7 +3,7 @@ BOARD_NAME="Asus TinkerBoard"
|
||||
CHASSIS=embedded
|
||||
BOOTLOADER=uboot
|
||||
KERNEL_FILE=zImage
|
||||
BOOT_SYS=hyprid
|
||||
BOOT_SYS=hybrid
|
||||
BOOT_SPL=true
|
||||
BOOT_ENV_SIZE=0x8000
|
||||
SUPERVISOR_MACHINE=tinker
|
||||
|
@@ -1,64 +0,0 @@
|
||||
From 2ae3821fd824560ef2db3c87cfbec985177911f6 Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <2ae3821fd824560ef2db3c87cfbec985177911f6.1599249626.git.stefan@agner.ch>
|
||||
From: "Miouyouyou (Myy)" <myy@miouyouyou.fr>
|
||||
Date: Mon, 5 Nov 2018 22:03:26 +0100
|
||||
Subject: [PATCH 1/2] ARM: DTS: rk3288-tinker: Setup the Bluetooth UART pins
|
||||
|
||||
The most essential being the RTS pin, which is clearly needed to
|
||||
upload the initial configuration into the Realtek Bluetooth
|
||||
chip, and make the Bluetooth chip work.
|
||||
|
||||
Now, the Bluetooth chip also needs 3 other GPIOS to be enabled.
|
||||
I'll see how I do that through the DTS file in a near future.
|
||||
|
||||
The 3 GPIOS being :
|
||||
Bluetooth Reset : <&gpio4 29 GPIO_ACTIVE_HIGH>
|
||||
Bluetooth Wake : <&gpio4 26 GPIO_ACTIVE_HIGH>
|
||||
Bluetooth Wake_Host_IRQ : <&gpio4 31 GPIO_ACTIVE_HIGH>
|
||||
|
||||
These are currently setup manually, through scripts. But it seems that
|
||||
GPIO handling through /sys entries might not be possible in the long
|
||||
term, the replacement being libgpio.
|
||||
Anyway, if you're interesting in enabling the Bluetooth GPIO by hand,
|
||||
here are the commands :
|
||||
|
||||
cd /sys/class/gpio &&
|
||||
echo 146 > export &&
|
||||
echo 149 > export &&
|
||||
echo 151 > export &&
|
||||
echo high > gpio146/direction &&
|
||||
echo high > gpio149/direction &&
|
||||
echo high > gpio151/direction
|
||||
|
||||
Resetting the chip is done like this :
|
||||
|
||||
echo "Resetting the Bluetooth chip"
|
||||
cd /sys/class/gpio/gpio149 &&
|
||||
echo 0 > value &&
|
||||
sleep 1 &&
|
||||
echo 1 > value &&
|
||||
sleep 1
|
||||
|
||||
Signed-off-by: Miouyouyou (Myy) <myy@miouyouyou.fr>
|
||||
[move change to rk3288-tinker.dtsi]
|
||||
Signed-off-by: Stefan Agner <stefan@agner.ch>
|
||||
---
|
||||
arch/arm/boot/dts/rk3288-tinker.dtsi | 2 ++
|
||||
1 file changed, 2 insertions(+)
|
||||
|
||||
diff --git a/arch/arm/boot/dts/rk3288-tinker.dtsi b/arch/arm/boot/dts/rk3288-tinker.dtsi
|
||||
index acfaa12ec239..284e7982925d 100644
|
||||
--- a/arch/arm/boot/dts/rk3288-tinker.dtsi
|
||||
+++ b/arch/arm/boot/dts/rk3288-tinker.dtsi
|
||||
@@ -492,6 +492,8 @@ &tsadc {
|
||||
};
|
||||
|
||||
&uart0 {
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&uart0_xfer>, <&uart0_cts>, <&uart0_rts>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
--
|
||||
2.28.0
|
||||
|
@@ -1,5 +1,5 @@
|
||||
From 3f3c4cd047234fb94de4d6b701d05ff0450890cf Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <3f3c4cd047234fb94de4d6b701d05ff0450890cf.1613588152.git.stefan@agner.ch>
|
||||
From ff0c5c49024da05b47d4fcc4d115761c43eef7a6 Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <ff0c5c49024da05b47d4fcc4d115761c43eef7a6.1652225232.git.stefan@agner.ch>
|
||||
From: Stefan Agner <stefan@agner.ch>
|
||||
Date: Wed, 17 Feb 2021 19:55:41 +0100
|
||||
Subject: [PATCH] Revert "ARM: dts: rockchip: use DMA channels for UARTs for
|
||||
@@ -11,10 +11,10 @@ This reverts commit 3425fe335c29310f6628faf9a7947d07f32d8962.
|
||||
1 file changed, 8 deletions(-)
|
||||
|
||||
diff --git a/arch/arm/boot/dts/rk3288.dtsi b/arch/arm/boot/dts/rk3288.dtsi
|
||||
index 8fa80facc8cd..8636d95c45e1 100644
|
||||
index 4dcdcf17c977..ff6faa82192b 100644
|
||||
--- a/arch/arm/boot/dts/rk3288.dtsi
|
||||
+++ b/arch/arm/boot/dts/rk3288.dtsi
|
||||
@@ -422,8 +422,6 @@ uart0: serial@ff180000 {
|
||||
@@ -378,8 +378,6 @@ uart0: serial@ff180000 {
|
||||
reg-io-width = <4>;
|
||||
clocks = <&cru SCLK_UART0>, <&cru PCLK_UART0>;
|
||||
clock-names = "baudclk", "apb_pclk";
|
||||
@@ -23,7 +23,7 @@ index 8fa80facc8cd..8636d95c45e1 100644
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&uart0_xfer>;
|
||||
status = "disabled";
|
||||
@@ -437,8 +435,6 @@ uart1: serial@ff190000 {
|
||||
@@ -393,8 +391,6 @@ uart1: serial@ff190000 {
|
||||
reg-io-width = <4>;
|
||||
clocks = <&cru SCLK_UART1>, <&cru PCLK_UART1>;
|
||||
clock-names = "baudclk", "apb_pclk";
|
||||
@@ -32,7 +32,7 @@ index 8fa80facc8cd..8636d95c45e1 100644
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&uart1_xfer>;
|
||||
status = "disabled";
|
||||
@@ -465,8 +461,6 @@ uart3: serial@ff1b0000 {
|
||||
@@ -421,8 +417,6 @@ uart3: serial@ff1b0000 {
|
||||
reg-io-width = <4>;
|
||||
clocks = <&cru SCLK_UART3>, <&cru PCLK_UART3>;
|
||||
clock-names = "baudclk", "apb_pclk";
|
||||
@@ -41,7 +41,7 @@ index 8fa80facc8cd..8636d95c45e1 100644
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&uart3_xfer>;
|
||||
status = "disabled";
|
||||
@@ -480,8 +474,6 @@ uart4: serial@ff1c0000 {
|
||||
@@ -436,8 +430,6 @@ uart4: serial@ff1c0000 {
|
||||
reg-io-width = <4>;
|
||||
clocks = <&cru SCLK_UART4>, <&cru PCLK_UART4>;
|
||||
clock-names = "baudclk", "apb_pclk";
|
||||
@@ -51,5 +51,5 @@ index 8fa80facc8cd..8636d95c45e1 100644
|
||||
pinctrl-0 = <&uart4_xfer>;
|
||||
status = "disabled";
|
||||
--
|
||||
2.30.1
|
||||
2.36.1
|
||||
|
||||
|
@@ -1,10 +1,10 @@
|
||||
From fc25c993bf2feb6e66d55bf03eb725ec688e47eb Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <fc25c993bf2feb6e66d55bf03eb725ec688e47eb.1599250914.git.stefan@agner.ch>
|
||||
In-Reply-To: <2ae3821fd824560ef2db3c87cfbec985177911f6.1599250914.git.stefan@agner.ch>
|
||||
References: <2ae3821fd824560ef2db3c87cfbec985177911f6.1599250914.git.stefan@agner.ch>
|
||||
From e73b4b762a0842cc75b2784e4c4267f6f4fc50c4 Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <e73b4b762a0842cc75b2784e4c4267f6f4fc50c4.1652225232.git.stefan@agner.ch>
|
||||
In-Reply-To: <ff0c5c49024da05b47d4fcc4d115761c43eef7a6.1652225232.git.stefan@agner.ch>
|
||||
References: <ff0c5c49024da05b47d4fcc4d115761c43eef7a6.1652225232.git.stefan@agner.ch>
|
||||
From: "Miouyouyou (Myy)" <myy@miouyouyou.fr>
|
||||
Date: Mon, 5 Nov 2018 22:15:14 +0100
|
||||
Subject: [PATCH 2/3] ARM: DTS: rk3288-tinker: Defining the SPI interface
|
||||
Subject: [PATCH] ARM: DTS: rk3288-tinker: Defining the SPI interface
|
||||
|
||||
Taken from, and tested by @TonyMac32 .
|
||||
|
||||
@@ -21,7 +21,7 @@ Signed-off-by: Stefan Agner <stefan@agner.ch>
|
||||
1 file changed, 19 insertions(+)
|
||||
|
||||
diff --git a/arch/arm/boot/dts/rk3288-tinker.dtsi b/arch/arm/boot/dts/rk3288-tinker.dtsi
|
||||
index 284e7982925d..d6cc66ab5bb1 100644
|
||||
index 9c1e38c54eae..cf278bcc91ad 100644
|
||||
--- a/arch/arm/boot/dts/rk3288-tinker.dtsi
|
||||
+++ b/arch/arm/boot/dts/rk3288-tinker.dtsi
|
||||
@@ -485,6 +485,25 @@ &sdio0 {
|
||||
@@ -51,5 +51,5 @@ index 284e7982925d..d6cc66ab5bb1 100644
|
||||
rockchip,hw-tshut-mode = <1>; /* tshut mode 0:CRU 1:GPIO */
|
||||
rockchip,hw-tshut-polarity = <1>; /* tshut polarity 0:LOW 1:HIGH */
|
||||
--
|
||||
2.28.0
|
||||
2.36.1
|
||||
|
||||
|
@@ -1,10 +1,10 @@
|
||||
From 3a9d71847ae869ffdb2b0818aa86a36d57d96331 Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <3a9d71847ae869ffdb2b0818aa86a36d57d96331.1599250914.git.stefan@agner.ch>
|
||||
In-Reply-To: <2ae3821fd824560ef2db3c87cfbec985177911f6.1599250914.git.stefan@agner.ch>
|
||||
References: <2ae3821fd824560ef2db3c87cfbec985177911f6.1599250914.git.stefan@agner.ch>
|
||||
From 00de5155d12a178b83961f459ddccd7fa08ec25c Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <00de5155d12a178b83961f459ddccd7fa08ec25c.1652225232.git.stefan@agner.ch>
|
||||
In-Reply-To: <ff0c5c49024da05b47d4fcc4d115761c43eef7a6.1652225232.git.stefan@agner.ch>
|
||||
References: <ff0c5c49024da05b47d4fcc4d115761c43eef7a6.1652225232.git.stefan@agner.ch>
|
||||
From: Stefan Agner <stefan@agner.ch>
|
||||
Date: Fri, 4 Sep 2020 21:57:55 +0200
|
||||
Subject: [PATCH 3/3] ARM: dts: rockchip: enable I2C1/4 on rk3288-tinker
|
||||
Subject: [PATCH] ARM: dts: rockchip: enable I2C1/4 on rk3288-tinker
|
||||
|
||||
Enable I2C devices which are accessible via 40-pin header.
|
||||
|
||||
@@ -14,7 +14,7 @@ Signed-off-by: Stefan Agner <stefan@agner.ch>
|
||||
1 file changed, 8 insertions(+)
|
||||
|
||||
diff --git a/arch/arm/boot/dts/rk3288-tinker.dtsi b/arch/arm/boot/dts/rk3288-tinker.dtsi
|
||||
index d6cc66ab5bb1..7af5818ac77c 100644
|
||||
index cf278bcc91ad..f23c6efd39d4 100644
|
||||
--- a/arch/arm/boot/dts/rk3288-tinker.dtsi
|
||||
+++ b/arch/arm/boot/dts/rk3288-tinker.dtsi
|
||||
@@ -344,10 +344,18 @@ regulator-state-mem {
|
||||
@@ -37,5 +37,5 @@ index d6cc66ab5bb1..7af5818ac77c 100644
|
||||
status = "okay";
|
||||
};
|
||||
--
|
||||
2.28.0
|
||||
2.36.1
|
||||
|
||||
|
@@ -0,0 +1,34 @@
|
||||
From e45da42e71e4f92995d5ec11679ca00b0971dbfe Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <e45da42e71e4f92995d5ec11679ca00b0971dbfe.1652225232.git.stefan@agner.ch>
|
||||
In-Reply-To: <ff0c5c49024da05b47d4fcc4d115761c43eef7a6.1652225232.git.stefan@agner.ch>
|
||||
References: <ff0c5c49024da05b47d4fcc4d115761c43eef7a6.1652225232.git.stefan@agner.ch>
|
||||
From: Myy Miouyouyou <myy@miouyouyou.fr>
|
||||
Date: Thu, 19 Oct 2017 21:24:47 +0200
|
||||
Subject: [PATCH] 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 ff6faa82192b..5061c5418d75 100644
|
||||
--- a/arch/arm/boot/dts/rk3288.dtsi
|
||||
+++ b/arch/arm/boot/dts/rk3288.dtsi
|
||||
@@ -311,7 +311,7 @@ spi2: spi@ff130000 {
|
||||
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.36.1
|
||||
|
@@ -0,0 +1,31 @@
|
||||
From e33d3ba4c34d0893d9d07b62ad4eea41d2e8bbc0 Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <e33d3ba4c34d0893d9d07b62ad4eea41d2e8bbc0.1652225232.git.stefan@agner.ch>
|
||||
In-Reply-To: <ff0c5c49024da05b47d4fcc4d115761c43eef7a6.1652225232.git.stefan@agner.ch>
|
||||
References: <ff0c5c49024da05b47d4fcc4d115761c43eef7a6.1652225232.git.stefan@agner.ch>
|
||||
From: "Miouyouyou (Myy)" <myy@miouyouyou.fr>
|
||||
Date: Mon, 5 Nov 2018 20:16:05 +0100
|
||||
Subject: [PATCH] ARM: DTSI: rk3288-tinker: Improving the CPU max voltage
|
||||
|
||||
Taken from the various patches provided by @TonyMac32 .
|
||||
|
||||
Signed-off-by: Miouyouyou (Myy) <myy@miouyouyou.fr>
|
||||
---
|
||||
arch/arm/boot/dts/rk3288-tinker.dtsi | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/arch/arm/boot/dts/rk3288-tinker.dtsi b/arch/arm/boot/dts/rk3288-tinker.dtsi
|
||||
index f23c6efd39d4..cdff130d1292 100644
|
||||
--- a/arch/arm/boot/dts/rk3288-tinker.dtsi
|
||||
+++ b/arch/arm/boot/dts/rk3288-tinker.dtsi
|
||||
@@ -186,7 +186,7 @@ vdd_cpu: DCDC_REG1 {
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
regulator-min-microvolt = <750000>;
|
||||
- regulator-max-microvolt = <1400000>;
|
||||
+ regulator-max-microvolt = <1450000>;
|
||||
regulator-name = "vdd_arm";
|
||||
regulator-ramp-delay = <6000>;
|
||||
regulator-state-mem {
|
||||
--
|
||||
2.36.1
|
||||
|
@@ -0,0 +1,119 @@
|
||||
From e073d75cd0dbfbcbbf1b46e565b326db37b75e6a Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <e073d75cd0dbfbcbbf1b46e565b326db37b75e6a.1652225232.git.stefan@agner.ch>
|
||||
In-Reply-To: <ff0c5c49024da05b47d4fcc4d115761c43eef7a6.1652225232.git.stefan@agner.ch>
|
||||
References: <ff0c5c49024da05b47d4fcc4d115761c43eef7a6.1652225232.git.stefan@agner.ch>
|
||||
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 d36991acd6df..a526927e29df 100644
|
||||
--- a/drivers/mmc/host/dw_mmc-rockchip.c
|
||||
+++ b/drivers/mmc/host/dw_mmc-rockchip.c
|
||||
@@ -12,6 +12,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"
|
||||
|
||||
@@ -330,6 +335,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;
|
||||
@@ -357,6 +422,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.36.1
|
||||
|
@@ -0,0 +1,63 @@
|
||||
From 392472dc977300a9f2a62159c105a6dfed878643 Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <392472dc977300a9f2a62159c105a6dfed878643.1652225232.git.stefan@agner.ch>
|
||||
In-Reply-To: <ff0c5c49024da05b47d4fcc4d115761c43eef7a6.1652225232.git.stefan@agner.ch>
|
||||
References: <ff0c5c49024da05b47d4fcc4d115761c43eef7a6.1652225232.git.stefan@agner.ch>
|
||||
From: Stefan Agner <stefan@agner.ch>
|
||||
Date: Tue, 10 May 2022 22:57:26 +0200
|
||||
Subject: [PATCH] ARM: dts: rockchip: Add Bluetooth to rk3288-tinker
|
||||
|
||||
Enable Bluetooth support via UART0. Use the existing bindings
|
||||
for Realtek rtl8723bs Bluetooth device.
|
||||
|
||||
Signed-off-by: Stefan Agner <stefan@agner.ch>
|
||||
---
|
||||
arch/arm/boot/dts/rk3288-tinker.dtsi | 26 ++++++++++++++++++++++++++
|
||||
1 file changed, 26 insertions(+)
|
||||
|
||||
diff --git a/arch/arm/boot/dts/rk3288-tinker.dtsi b/arch/arm/boot/dts/rk3288-tinker.dtsi
|
||||
index cdff130d1292..e904c130dedc 100644
|
||||
--- a/arch/arm/boot/dts/rk3288-tinker.dtsi
|
||||
+++ b/arch/arm/boot/dts/rk3288-tinker.dtsi
|
||||
@@ -388,6 +388,20 @@ bl_en: bl-en {
|
||||
};
|
||||
};
|
||||
|
||||
+ bluetooth {
|
||||
+ bt_enable_pin: bt-enable-pin {
|
||||
+ rockchip,pins = <4 RK_PD5 RK_FUNC_GPIO &pcfg_pull_none>;
|
||||
+ };
|
||||
+
|
||||
+ bt_device_wake_pin: bt-device-wake-pin {
|
||||
+ rockchip,pins = <4 RK_PD2 RK_FUNC_GPIO &pcfg_pull_none>;
|
||||
+ };
|
||||
+
|
||||
+ bt_host_wake_pin: bt-host-wake-pin {
|
||||
+ rockchip,pins = <4 RK_PD7 RK_FUNC_GPIO &pcfg_pull_none>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
buttons {
|
||||
pwrbtn: pwrbtn {
|
||||
rockchip,pins = <0 RK_PA5 RK_FUNC_GPIO &pcfg_pull_up>;
|
||||
@@ -520,6 +534,18 @@ &tsadc {
|
||||
|
||||
&uart0 {
|
||||
status = "okay";
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&uart0_xfer &uart0_cts &uart0_rts>;
|
||||
+ uart-has-rtscts;
|
||||
+
|
||||
+ bluetooth {
|
||||
+ compatible = "realtek,rtl8723bs-bt";
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&bt_device_wake_pin &bt_host_wake_pin &bt_enable_pin>;
|
||||
+ enable-gpios = <&gpio4 RK_PD5 GPIO_ACTIVE_HIGH>;
|
||||
+ device-wake-gpios = <&gpio4 RK_PD2 GPIO_ACTIVE_HIGH>;
|
||||
+ host-wake-gpios = <&gpio4 RK_PD7 GPIO_ACTIVE_HIGH>;
|
||||
+ };
|
||||
};
|
||||
|
||||
&uart1 {
|
||||
--
|
||||
2.36.1
|
||||
|
@@ -1,31 +0,0 @@
|
||||
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
|
||||
|
@@ -1,98 +0,0 @@
|
||||
From d5d5c53173c484a13cda62a537cbf75a5df4b0e4 Mon Sep 17 00:00:00 2001
|
||||
From: "Miouyouyou (Myy)" <myy@miouyouyou.fr>
|
||||
Date: Mon, 5 Nov 2018 21:58:56 +0100
|
||||
Subject: [PATCH] ARM: DTS: rk3288-tinker: Enabling SDIO and Wifi
|
||||
|
||||
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.
|
||||
|
||||
Signed-off-by: Miouyouyou (Myy) <myy@miouyouyou.fr>
|
||||
---
|
||||
arch/arm/boot/dts/rk3288-tinker.dts | 62 +++++++++++++++++++++++++++++++++++++
|
||||
1 file changed, 62 insertions(+)
|
||||
|
||||
diff --git a/arch/arm/boot/dts/rk3288-tinker.dts b/arch/arm/boot/dts/rk3288-tinker.dts
|
||||
index 1e43527aa..d4df13bed 100644
|
||||
--- a/arch/arm/boot/dts/rk3288-tinker.dts
|
||||
+++ b/arch/arm/boot/dts/rk3288-tinker.dts
|
||||
@@ -6,8 +6,70 @@
|
||||
/dts-v1/;
|
||||
|
||||
#include "rk3288-tinker.dtsi"
|
||||
+#include <dt-bindings/clock/rockchip,rk808.h>
|
||||
|
||||
/ {
|
||||
model = "Rockchip RK3288 Asus Tinker Board";
|
||||
compatible = "asus,rk3288-tinker", "rockchip,rk3288";
|
||||
+
|
||||
+ /* 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 28 GPIO_ACTIVE_LOW>, <&gpio4 27 GPIO_ACTIVE_LOW>;
|
||||
+ };
|
||||
+
|
||||
+ wireless-wlan {
|
||||
+ compatible = "wlan-platdata";
|
||||
+ rockchip,grf = <&grf>;
|
||||
+ sdio_vref = <1800>;
|
||||
+ status = "okay";
|
||||
+ wifi_chip_type = "8723bs";
|
||||
+ WIFI,host_wake_irq = <&gpio4 30 GPIO_ACTIVE_HIGH>;
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&io_domains {
|
||||
+ wifi-supply = <&vcc_18>;
|
||||
+};
|
||||
+
|
||||
+&pinctrl {
|
||||
+ 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>;
|
||||
+ };
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&sdio0 {
|
||||
+ bus-width = <4>;
|
||||
+ cap-sd-highspeed;
|
||||
+ cap-sdio-irq;
|
||||
+ clock-frequency = <50000000>;
|
||||
+ clock-freq-min-max = <200000 50000000>;
|
||||
+ 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;
|
||||
+ status = "okay";
|
||||
+ supports-sdio;
|
||||
};
|
||||
--
|
||||
2.16.4
|
||||
|
@@ -1,28 +0,0 @@
|
||||
From ebc29962ac27264772a4227f5abd6900cb72fa79 Mon Sep 17 00:00:00 2001
|
||||
From: "Miouyouyou (Myy)" <myy@miouyouyou.fr>
|
||||
Date: Mon, 5 Nov 2018 20:16:05 +0100
|
||||
Subject: [PATCH] ARM: DTSI: rk3288-tinker: Improving the CPU max voltage
|
||||
|
||||
Taken from the various patches provided by @TonyMac32 .
|
||||
|
||||
Signed-off-by: Miouyouyou (Myy) <myy@miouyouyou.fr>
|
||||
---
|
||||
arch/arm/boot/dts/rk3288-tinker.dtsi | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/arch/arm/boot/dts/rk3288-tinker.dtsi b/arch/arm/boot/dts/rk3288-tinker.dtsi
|
||||
index aa107ee41..3da1c830f 100644
|
||||
--- a/arch/arm/boot/dts/rk3288-tinker.dtsi
|
||||
+++ b/arch/arm/boot/dts/rk3288-tinker.dtsi
|
||||
@@ -164,7 +164,7 @@
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
regulator-min-microvolt = <750000>;
|
||||
- regulator-max-microvolt = <1400000>;
|
||||
+ regulator-max-microvolt = <1450000>;
|
||||
regulator-name = "vdd_arm";
|
||||
regulator-ramp-delay = <6000>;
|
||||
regulator-state-mem {
|
||||
--
|
||||
2.16.4
|
||||
|
@@ -1,116 +0,0 @@
|
||||
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
|
||||
|
@@ -1,5 +1,5 @@
|
||||
From 983121a741192153492a61befc0e0fc61b9f8b14 Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <983121a741192153492a61befc0e0fc61b9f8b14.1617731428.git.stefan@agner.ch>
|
||||
From 966cd1782632bc8279667955ec315e93c89495e6 Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <966cd1782632bc8279667955ec315e93c89495e6.1645627366.git.stefan@agner.ch>
|
||||
From: Pascal Vizeli <pvizeli@syshack.ch>
|
||||
Date: Fri, 24 Apr 2020 12:41:50 +0000
|
||||
Subject: [PATCH 1/2] SPL: modify load address of U-Boot
|
||||
@@ -15,23 +15,23 @@ Signed-off-by: Stefan Agner <stefan@agner.ch>
|
||||
2 files changed, 2 insertions(+)
|
||||
|
||||
diff --git a/configs/tinker-rk3288_defconfig b/configs/tinker-rk3288_defconfig
|
||||
index 8686a66d13..c3363821dd 100644
|
||||
index a9c9a122f6..b839fdb570 100644
|
||||
--- a/configs/tinker-rk3288_defconfig
|
||||
+++ b/configs/tinker-rk3288_defconfig
|
||||
@@ -88,3 +88,4 @@ CONFIG_VIDEO_ROCKCHIP=y
|
||||
@@ -92,3 +92,4 @@ CONFIG_VIDEO_ROCKCHIP=y
|
||||
CONFIG_DISPLAY_ROCKCHIP_HDMI=y
|
||||
CONFIG_CMD_DHRYSTONE=y
|
||||
CONFIG_ERRNO_STR=y
|
||||
+CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR=0x2000
|
||||
diff --git a/configs/tinker-s-rk3288_defconfig b/configs/tinker-s-rk3288_defconfig
|
||||
index 22714833cc..f5dd23577c 100644
|
||||
index f367c9370f..c52b0753ec 100644
|
||||
--- a/configs/tinker-s-rk3288_defconfig
|
||||
+++ b/configs/tinker-s-rk3288_defconfig
|
||||
@@ -90,3 +90,4 @@ CONFIG_DISPLAY_ROCKCHIP_HDMI=y
|
||||
@@ -94,3 +94,4 @@ CONFIG_DISPLAY_ROCKCHIP_HDMI=y
|
||||
CONFIG_CONSOLE_SCROLL_LINES=10
|
||||
CONFIG_CMD_DHRYSTONE=y
|
||||
CONFIG_ERRNO_STR=y
|
||||
+CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR=0x2000
|
||||
--
|
||||
2.31.1
|
||||
2.35.1
|
||||
|
||||
|
@@ -1,7 +1,7 @@
|
||||
From f9195bc5cb18f71117f6efc1c352209e62c53706 Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <f9195bc5cb18f71117f6efc1c352209e62c53706.1617731428.git.stefan@agner.ch>
|
||||
In-Reply-To: <983121a741192153492a61befc0e0fc61b9f8b14.1617731428.git.stefan@agner.ch>
|
||||
References: <983121a741192153492a61befc0e0fc61b9f8b14.1617731428.git.stefan@agner.ch>
|
||||
From 98674c65a6595e7ac554f7ec9d6f0228556756f6 Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <98674c65a6595e7ac554f7ec9d6f0228556756f6.1645627366.git.stefan@agner.ch>
|
||||
In-Reply-To: <966cd1782632bc8279667955ec315e93c89495e6.1645627366.git.stefan@agner.ch>
|
||||
References: <966cd1782632bc8279667955ec315e93c89495e6.1645627366.git.stefan@agner.ch>
|
||||
From: Pascal Vizeli <pvizeli@syshack.ch>
|
||||
Date: Fri, 24 Apr 2020 11:37:55 +0000
|
||||
Subject: [PATCH 2/2] pmic: enable LDO2 vcc33_mipi at bootup
|
||||
@@ -64,5 +64,5 @@ index f85209c649..6fa1bb0c66 100644
|
||||
+}
|
||||
+#endif
|
||||
--
|
||||
2.31.1
|
||||
2.35.1
|
||||
|
||||
|
@@ -17,7 +17,7 @@ test -n "${BOOT_A_LEFT}" || setenv BOOT_A_LEFT 3
|
||||
test -n "${BOOT_B_LEFT}" || setenv BOOT_B_LEFT 3
|
||||
|
||||
# HassOS bootargs
|
||||
setenv bootargs_hassos "zram.enabled=1 zram.num_devices=3 apparmor=1 security=apparmor systemd.machine_id=${MACHINE_ID} cgroup_enable=memory fsck.repair=yes"
|
||||
setenv bootargs_hassos "zram.enabled=1 zram.num_devices=3 apparmor=1 security=apparmor systemd.machine_id=${MACHINE_ID} fsck.repair=yes"
|
||||
|
||||
# HassOS system A/B
|
||||
setenv bootargs_a "root=PARTUUID=8d3d53e3-6d49-4c38-8349-aff6859e82fd rootfstype=squashfs ro rootwait"
|
||||
@@ -64,7 +64,7 @@ for BOOT_SLOT in "${BOOT_ORDER}"; do
|
||||
if test ${BOOT_A_LEFT} -gt 0; then
|
||||
setexpr BOOT_A_LEFT ${BOOT_A_LEFT} - 1
|
||||
echo "Trying to boot slot A, ${BOOT_A_LEFT} attempts remaining. Loading kernel ..."
|
||||
if ext4load mmc ${devnum}:2 ${kernel_addr_r} zImage; then
|
||||
if load mmc ${devnum}:2 ${kernel_addr_r} zImage; then
|
||||
setenv bootargs "${bootargs_hassos} ${bootargs_a} rauc.slot=A ${cmdline}"
|
||||
fi
|
||||
fi
|
||||
@@ -72,7 +72,7 @@ for BOOT_SLOT in "${BOOT_ORDER}"; do
|
||||
if test ${BOOT_B_LEFT} -gt 0; then
|
||||
setexpr BOOT_B_LEFT ${BOOT_B_LEFT} - 1
|
||||
echo "Trying to boot slot B, ${BOOT_B_LEFT} attempts remaining. Loading kernel ..."
|
||||
if ext4load mmc ${devnum}:4 ${kernel_addr_r} zImage; then
|
||||
if load mmc ${devnum}:4 ${kernel_addr_r} zImage; then
|
||||
setenv bootargs "${bootargs_hassos} ${bootargs_b} rauc.slot=B ${cmdline}"
|
||||
fi
|
||||
fi
|
||||
|
@@ -145,7 +145,6 @@ CONFIG_CGROUP_WRITEBACK=y
|
||||
CONFIG_CGROUP_SCHED=y
|
||||
CONFIG_FAIR_GROUP_SCHED=y
|
||||
CONFIG_CFS_BANDWIDTH=y
|
||||
CONFIG_RT_GROUP_SCHED=y
|
||||
CONFIG_CGROUP_PIDS=y
|
||||
# CONFIG_CGROUP_RDMA is not set
|
||||
CONFIG_CGROUP_FREEZER=y
|
||||
@@ -1469,7 +1468,6 @@ CONFIG_CFG80211=m
|
||||
CONFIG_CFG80211_REQUIRE_SIGNED_REGDB=y
|
||||
CONFIG_CFG80211_USE_KERNEL_REGDB_KEYS=y
|
||||
CONFIG_CFG80211_DEFAULT_PS=y
|
||||
CONFIG_CFG80211_CRDA_SUPPORT=y
|
||||
CONFIG_CFG80211_WEXT=y
|
||||
CONFIG_MAC80211=m
|
||||
CONFIG_MAC80211_HAS_RC=y
|
||||
@@ -3813,15 +3811,17 @@ CONFIG_IR_MESON=m
|
||||
# CONFIG_IR_SIR is not set
|
||||
# CONFIG_RC_XBOX_DVD is not set
|
||||
# CONFIG_IR_TOY is not set
|
||||
CONFIG_CEC_CORE=y
|
||||
CONFIG_CEC_CORE=m
|
||||
CONFIG_CEC_NOTIFIER=y
|
||||
CONFIG_CEC_PIN=y
|
||||
CONFIG_MEDIA_CEC_RC=y
|
||||
CONFIG_MEDIA_CEC_SUPPORT=y
|
||||
# CONFIG_CEC_CH7322 is not set
|
||||
# CONFIG_CEC_CROS_EC is not set
|
||||
# CONFIG_CEC_MESON_AO is not set
|
||||
# CONFIG_CEC_MESON_G12A_AO is not set
|
||||
# CONFIG_CEC_GPIO is not set
|
||||
# CONFIG_USB_PULSE8_CEC is not set
|
||||
CONFIG_CEC_MESON_AO=m
|
||||
CONFIG_CEC_MESON_G12A_AO=m
|
||||
CONFIG_CEC_GPIO=m
|
||||
CONFIG_USB_PULSE8_CEC=m
|
||||
# CONFIG_USB_RAINSHADOW_CEC is not set
|
||||
CONFIG_MEDIA_SUPPORT=y
|
||||
CONFIG_MEDIA_SUPPORT_FILTER=y
|
||||
@@ -4363,10 +4363,10 @@ CONFIG_DRM_PANEL_BRIDGE=y
|
||||
# CONFIG_DRM_ANALOGIX_ANX78XX is not set
|
||||
# CONFIG_DRM_I2C_ADV7511 is not set
|
||||
# CONFIG_DRM_CDNS_MHDP8546 is not set
|
||||
CONFIG_DRM_DW_HDMI=y
|
||||
CONFIG_DRM_DW_HDMI=m
|
||||
# CONFIG_DRM_DW_HDMI_AHB_AUDIO is not set
|
||||
CONFIG_DRM_DW_HDMI_I2S_AUDIO=y
|
||||
CONFIG_DRM_DW_HDMI_CEC=y
|
||||
# CONFIG_DRM_DW_HDMI_CEC is not set
|
||||
# end of Display Interface Bridges
|
||||
|
||||
# CONFIG_DRM_ETNAVIV is not set
|
||||
@@ -4374,8 +4374,8 @@ CONFIG_DRM_DW_HDMI_CEC=y
|
||||
# CONFIG_DRM_HISI_HIBMC is not set
|
||||
# CONFIG_DRM_HISI_KIRIN is not set
|
||||
# CONFIG_DRM_MXSFB is not set
|
||||
CONFIG_DRM_MESON=y
|
||||
CONFIG_DRM_MESON_DW_HDMI=y
|
||||
CONFIG_DRM_MESON=m
|
||||
CONFIG_DRM_MESON_DW_HDMI=m
|
||||
# CONFIG_DRM_CIRRUS_QEMU is not set
|
||||
# CONFIG_DRM_GM12U320 is not set
|
||||
# CONFIG_TINYDRM_HX8357D is not set
|
||||
|
@@ -0,0 +1 @@
|
||||
console=tty0 console=ttyAML0,115200n8
|
@@ -13,8 +13,7 @@ function hassos_pre_image() {
|
||||
mkdir -p "${BOOT_DATA}/overlays"
|
||||
cp "${BINARIES_DIR}"/*.dtbo "${BOOT_DATA}/overlays/"
|
||||
cp "${BOARD_DIR}/boot-env.txt" "${BOOT_DATA}/haos-config.txt"
|
||||
|
||||
echo "console=tty0 console=ttyAML0,115200n8" > "${BOOT_DATA}/cmdline.txt"
|
||||
cp "${BOARD_DIR}/cmdline.txt" "${BOOT_DATA}/cmdline.txt"
|
||||
|
||||
# SPL
|
||||
create_spl_image
|
||||
|
@@ -19,7 +19,7 @@ test -n "${BOOT_A_LEFT}" || setenv BOOT_A_LEFT 3
|
||||
test -n "${BOOT_B_LEFT}" || setenv BOOT_B_LEFT 3
|
||||
|
||||
# HassOS bootargs
|
||||
setenv bootargs_hassos "zram.enabled=1 zram.num_devices=3 apparmor=1 security=apparmor systemd.machine_id=${MACHINE_ID} cgroup_enable=memory fsck.repair=yes"
|
||||
setenv bootargs_hassos "zram.enabled=1 zram.num_devices=3 apparmor=1 security=apparmor systemd.machine_id=${MACHINE_ID} fsck.repair=yes"
|
||||
|
||||
# HassOS system A/B
|
||||
setenv bootargs_a "root=PARTUUID=48617373-06 rootfstype=squashfs ro rootwait"
|
||||
@@ -71,7 +71,7 @@ for BOOT_SLOT in "${BOOT_ORDER}"; do
|
||||
if test ${BOOT_A_LEFT} -gt 0; then
|
||||
setexpr BOOT_A_LEFT ${BOOT_A_LEFT} - 1
|
||||
echo "Trying to boot slot A, ${BOOT_A_LEFT} attempts remaining. Loading kernel ..."
|
||||
if ext4load mmc ${devnum}:5 ${kernel_addr_r} Image; then
|
||||
if load mmc ${devnum}:5 ${kernel_addr_r} Image; then
|
||||
setenv bootargs "${bootargs_hassos} ${bootargs_a} rauc.slot=A ${cmdline}"
|
||||
fi
|
||||
fi
|
||||
@@ -79,7 +79,7 @@ for BOOT_SLOT in "${BOOT_ORDER}"; do
|
||||
if test ${BOOT_B_LEFT} -gt 0; then
|
||||
setexpr BOOT_B_LEFT ${BOOT_B_LEFT} - 1
|
||||
echo "Trying to boot slot B, ${BOOT_B_LEFT} attempts remaining. Loading kernel ..."
|
||||
if ext4load mmc ${devnum}:7 ${kernel_addr_r} Image; then
|
||||
if load mmc ${devnum}:7 ${kernel_addr_r} Image; then
|
||||
setenv bootargs "${bootargs_hassos} ${bootargs_b} rauc.slot=B ${cmdline}"
|
||||
fi
|
||||
fi
|
||||
|
@@ -0,0 +1 @@
|
||||
console=tty0 console=ttyAML0,115200n8
|
@@ -12,8 +12,7 @@ function hassos_pre_image() {
|
||||
mkdir -p "${BOOT_DATA}/overlays"
|
||||
cp "${BINARIES_DIR}"/*.dtbo "${BOOT_DATA}/overlays/"
|
||||
cp "${BOARD_DIR}/boot-env.txt" "${BOOT_DATA}/haos-config.txt"
|
||||
|
||||
echo "console=tty0 console=ttyAML0,115200n8" > "${BOOT_DATA}/cmdline.txt"
|
||||
cp "${BOARD_DIR}/cmdline.txt" "${BOOT_DATA}/cmdline.txt"
|
||||
|
||||
# SPL
|
||||
create_spl_image
|
||||
|
@@ -19,7 +19,7 @@ test -n "${BOOT_A_LEFT}" || setenv BOOT_A_LEFT 3
|
||||
test -n "${BOOT_B_LEFT}" || setenv BOOT_B_LEFT 3
|
||||
|
||||
# HassOS bootargs
|
||||
setenv bootargs_hassos "zram.enabled=1 zram.num_devices=3 apparmor=1 security=apparmor systemd.machine_id=${MACHINE_ID} cgroup_enable=memory clk_ignore_unused usb-storage.quirks=0x2537:0x1066:u,0x2537:0x1068:u"
|
||||
setenv bootargs_hassos "zram.enabled=1 zram.num_devices=3 apparmor=1 security=apparmor systemd.machine_id=${MACHINE_ID} clk_ignore_unused usb-storage.quirks=0x2537:0x1066:u,0x2537:0x1068:u"
|
||||
|
||||
# HassOS system A/B
|
||||
setenv bootargs_a "root=PARTUUID=48617373-06 rootfstype=squashfs ro rootwait"
|
||||
@@ -71,7 +71,7 @@ for BOOT_SLOT in "${BOOT_ORDER}"; do
|
||||
if test ${BOOT_A_LEFT} -gt 0; then
|
||||
setexpr BOOT_A_LEFT ${BOOT_A_LEFT} - 1
|
||||
echo "Trying to boot slot A, ${BOOT_A_LEFT} attempts remaining. Loading kernel ..."
|
||||
if ext4load mmc ${devnum}:5 ${kernel_addr_r} Image; then
|
||||
if load mmc ${devnum}:5 ${kernel_addr_r} Image; then
|
||||
setenv bootargs "${bootargs_hassos} ${bootargs_a} rauc.slot=A ${cmdline}"
|
||||
fi
|
||||
fi
|
||||
@@ -79,7 +79,7 @@ for BOOT_SLOT in "${BOOT_ORDER}"; do
|
||||
if test ${BOOT_B_LEFT} -gt 0; then
|
||||
setexpr BOOT_B_LEFT ${BOOT_B_LEFT} - 1
|
||||
echo "Trying to boot slot B, ${BOOT_B_LEFT} attempts remaining. Loading kernel ..."
|
||||
if ext4load mmc ${devnum}:7 ${kernel_addr_r} Image; then
|
||||
if load mmc ${devnum}:7 ${kernel_addr_r} Image; then
|
||||
setenv bootargs "${bootargs_hassos} ${bootargs_b} rauc.slot=B ${cmdline}"
|
||||
fi
|
||||
fi
|
||||
|
@@ -0,0 +1 @@
|
||||
console=tty0 console=ttyAML0,115200n8
|
@@ -12,8 +12,7 @@ function hassos_pre_image() {
|
||||
mkdir -p "${BOOT_DATA}/overlays"
|
||||
cp "${BINARIES_DIR}"/*.dtbo "${BOOT_DATA}/overlays/"
|
||||
cp "${BOARD_DIR}/boot-env.txt" "${BOOT_DATA}/haos-config.txt"
|
||||
|
||||
echo "console=tty0 console=ttyAML0,115200n8" > "${BOOT_DATA}/cmdline.txt"
|
||||
cp "${BOARD_DIR}/cmdline.txt" "${BOOT_DATA}/cmdline.txt"
|
||||
|
||||
# SPL
|
||||
create_spl_image
|
||||
|
@@ -19,7 +19,7 @@ test -n "${BOOT_A_LEFT}" || setenv BOOT_A_LEFT 3
|
||||
test -n "${BOOT_B_LEFT}" || setenv BOOT_B_LEFT 3
|
||||
|
||||
# HassOS bootargs
|
||||
setenv bootargs_hassos "zram.enabled=1 zram.num_devices=3 apparmor=1 security=apparmor systemd.machine_id=${MACHINE_ID} cgroup_enable=memory fsck.repair=yes"
|
||||
setenv bootargs_hassos "zram.enabled=1 zram.num_devices=3 apparmor=1 security=apparmor systemd.machine_id=${MACHINE_ID} fsck.repair=yes"
|
||||
|
||||
# HassOS system A/B
|
||||
setenv bootargs_a "root=PARTUUID=48617373-06 rootfstype=squashfs ro rootwait"
|
||||
@@ -76,7 +76,7 @@ for BOOT_SLOT in "${BOOT_ORDER}"; do
|
||||
if test ${BOOT_A_LEFT} -gt 0; then
|
||||
setexpr BOOT_A_LEFT ${BOOT_A_LEFT} - 1
|
||||
echo "Trying to boot slot A, ${BOOT_A_LEFT} attempts remaining. Loading kernel ..."
|
||||
if ext4load mmc ${devnum}:5 ${kernel_addr_r} Image; then
|
||||
if load mmc ${devnum}:5 ${kernel_addr_r} Image; then
|
||||
setenv bootargs "${bootargs_hassos} ${bootargs_a} rauc.slot=A ${cmdline}"
|
||||
fi
|
||||
fi
|
||||
@@ -84,7 +84,7 @@ for BOOT_SLOT in "${BOOT_ORDER}"; do
|
||||
if test ${BOOT_B_LEFT} -gt 0; then
|
||||
setexpr BOOT_B_LEFT ${BOOT_B_LEFT} - 1
|
||||
echo "Trying to boot slot B, ${BOOT_B_LEFT} attempts remaining. Loading kernel ..."
|
||||
if ext4load mmc ${devnum}:7 ${kernel_addr_r} Image; then
|
||||
if load mmc ${devnum}:7 ${kernel_addr_r} Image; then
|
||||
setenv bootargs "${bootargs_hassos} ${bootargs_b} rauc.slot=B ${cmdline}"
|
||||
fi
|
||||
fi
|
||||
|
@@ -0,0 +1 @@
|
||||
console=tty1 console=ttySAC2,115200
|
@@ -11,8 +11,7 @@ function hassos_pre_image() {
|
||||
|
||||
cp "${BINARIES_DIR}/boot.scr" "${BOOT_DATA}/boot.scr"
|
||||
cp "${BINARIES_DIR}/exynos5422-odroidxu4.dtb" "${BOOT_DATA}/exynos5422-odroidxu4.dtb"
|
||||
|
||||
echo "console=tty1 console=ttySAC2,115200" > "${BOOT_DATA}/cmdline.txt"
|
||||
cp "${BOARD_DIR}/cmdline.txt" "${BOOT_DATA}/cmdline.txt"
|
||||
|
||||
# SPL
|
||||
create_spl_image
|
||||
|
@@ -0,0 +1,94 @@
|
||||
From 1fb890d987088f5b6b4c165d8d05480e15b8882e Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <1fb890d987088f5b6b4c165d8d05480e15b8882e.1662147854.git.stefan@agner.ch>
|
||||
From: memeka <mihailescu2m@gmail.com>
|
||||
Date: Fri, 18 Jan 2019 14:36:21 +1030
|
||||
Subject: [PATCH] ODROID-XU4: regulator: s2mps11: add ethernet power reset in
|
||||
shutdown function
|
||||
|
||||
Ethernet device cannot be detected on warm boot sometimes. This patch is
|
||||
to add the power reset routines for ethernet device using PMIC. Then
|
||||
ethernet device can be reset hardware-wise.
|
||||
|
||||
Change-Id: Iffbe2966da7e4679f63b91ab79241167391792df
|
||||
Signed-off-by: Brian Kim <brian.kim@hardkernel.com>
|
||||
Signed-off-by: Marian Mihailescu <mihailescu2m@gmail.com>
|
||||
---
|
||||
drivers/regulator/s2mps11.c | 55 +++++++++++++++++++++++++++++++++++++
|
||||
1 file changed, 55 insertions(+)
|
||||
|
||||
diff --git a/drivers/regulator/s2mps11.c b/drivers/regulator/s2mps11.c
|
||||
index ebc67e3ddd4f..51f128076db9 100644
|
||||
--- a/drivers/regulator/s2mps11.c
|
||||
+++ b/drivers/regulator/s2mps11.c
|
||||
@@ -1117,6 +1117,57 @@ static const struct regulator_desc s2mpu02_regulators[] = {
|
||||
regulator_desc_s2mpu02_buck7(7),
|
||||
};
|
||||
|
||||
+static int s2mps11_pmic_ethonoff(struct platform_device *pdev, bool onoff)
|
||||
+{
|
||||
+ struct sec_pmic_dev *iodev = dev_get_drvdata(pdev->dev.parent);
|
||||
+ unsigned int reg_val = 0;
|
||||
+ int ret = 0;
|
||||
+
|
||||
+ ret = regmap_read(iodev->regmap_pmic, S2MPS11_REG_L15CTRL, ®_val);
|
||||
+ if (ret) {
|
||||
+ dev_err(&pdev->dev, "failed to read S2MPS11_REG_L15CTRL value\n");
|
||||
+ return ret;
|
||||
+ }
|
||||
+
|
||||
+ ret = regmap_read(iodev->regmap_pmic, S2MPS11_REG_L17CTRL, ®_val);
|
||||
+ if (ret) {
|
||||
+ dev_err(&pdev->dev, "failed to read S2MPS11_REG_L17CTRL value\n");
|
||||
+ return ret;
|
||||
+ }
|
||||
+
|
||||
+ if (onoff) {
|
||||
+ /* ETH VDD0 ON */
|
||||
+ ret = regmap_update_bits(iodev->regmap_pmic, S2MPS11_REG_L15CTRL, 0xFF, 0x72);
|
||||
+ if (ret) {
|
||||
+ dev_err(&pdev->dev, "cannot update S2MPS11 LDO CTRL15 register\n");
|
||||
+ return ret;
|
||||
+ }
|
||||
+
|
||||
+ /* ETH VDD1 ON */
|
||||
+ ret = regmap_update_bits(iodev->regmap_pmic, S2MPS11_REG_L17CTRL, 0xFF, 0x72);
|
||||
+ if (ret) {
|
||||
+ dev_err(&pdev->dev, "cannot update S2MPS11 LDO CTRL17 register\n");
|
||||
+ return ret;
|
||||
+ }
|
||||
+ } else {
|
||||
+ /* ETH VDD0 OFF */
|
||||
+ ret = regmap_update_bits(iodev->regmap_pmic, S2MPS11_REG_L15CTRL, 0x3F, 0x00);
|
||||
+ if (ret) {
|
||||
+ dev_err(&pdev->dev, "cannot update S2MPS11 LDO CTRL15 register\n");
|
||||
+ return ret;
|
||||
+ }
|
||||
+
|
||||
+ /* ETH VDD1 OFF */
|
||||
+ ret = regmap_update_bits(iodev->regmap_pmic, S2MPS11_REG_L17CTRL, 0x3F, 0x00);
|
||||
+ if (ret) {
|
||||
+ dev_err(&pdev->dev, "cannot update S2MPS11 LDO CTRL17 register\n");
|
||||
+ return ret;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ return ret;
|
||||
+}
|
||||
+
|
||||
static int s2mps11_pmic_probe(struct platform_device *pdev)
|
||||
{
|
||||
struct sec_pmic_dev *iodev = dev_get_drvdata(pdev->dev.parent);
|
||||
@@ -1219,6 +1270,10 @@ static int s2mps11_pmic_probe(struct platform_device *pdev)
|
||||
}
|
||||
}
|
||||
|
||||
+ dev_info(&pdev->dev, "Resetting Ethernet\n");
|
||||
+ s2mps11_pmic_ethonoff(pdev, false);
|
||||
+ mdelay(10);
|
||||
+ s2mps11_pmic_ethonoff(pdev, true);
|
||||
out:
|
||||
kfree(rdata);
|
||||
|
||||
--
|
||||
2.37.2
|
||||
|
@@ -21,7 +21,7 @@ test -n "${BOOT_A_LEFT}" || setenv BOOT_A_LEFT 3
|
||||
test -n "${BOOT_B_LEFT}" || setenv BOOT_B_LEFT 3
|
||||
|
||||
# HassOS bootargs
|
||||
setenv bootargs_hassos "zram.enabled=1 zram.num_devices=3 apparmor=1 security=apparmor systemd.machine_id=${MACHINE_ID} cgroup_enable=memory fsck.repair=yes"
|
||||
setenv bootargs_hassos "zram.enabled=1 zram.num_devices=3 apparmor=1 security=apparmor systemd.machine_id=${MACHINE_ID} fsck.repair=yes"
|
||||
|
||||
# HassOS system A/B
|
||||
setenv bootargs_a "root=PARTUUID=48617373-06 rootfstype=squashfs ro rootwait"
|
||||
@@ -51,7 +51,7 @@ for BOOT_SLOT in "${BOOT_ORDER}"; do
|
||||
if test ${BOOT_A_LEFT} -gt 0; then
|
||||
setexpr BOOT_A_LEFT ${BOOT_A_LEFT} - 1
|
||||
echo "Trying to boot slot A, ${BOOT_A_LEFT} attempts remaining. Loading kernel ..."
|
||||
if ext4load mmc ${devnum}:5 ${kernel_addr_r} zImage; then
|
||||
if load mmc ${devnum}:5 ${kernel_addr_r} zImage; then
|
||||
setenv bootargs "${bootargs_hassos} ${bootargs_a} rauc.slot=A ${cmdline}"
|
||||
fi
|
||||
fi
|
||||
@@ -59,7 +59,7 @@ for BOOT_SLOT in "${BOOT_ORDER}"; do
|
||||
if test ${BOOT_B_LEFT} -gt 0; then
|
||||
setexpr BOOT_B_LEFT ${BOOT_B_LEFT} - 1
|
||||
echo "Trying to boot slot B, ${BOOT_B_LEFT} attempts remaining. Loading kernel ..."
|
||||
if ext4load mmc ${devnum}:7 ${kernel_addr_r} zImage; then
|
||||
if load mmc ${devnum}:7 ${kernel_addr_r} zImage; then
|
||||
setenv bootargs "${bootargs_hassos} ${bootargs_b} rauc.slot=B ${cmdline}"
|
||||
fi
|
||||
fi
|
||||
|
@@ -0,0 +1,40 @@
|
||||
From ff269d57d23c2edee262e14c6cf4116bc16d8019 Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <ff269d57d23c2edee262e14c6cf4116bc16d8019.1663008544.git.stefan@agner.ch>
|
||||
From: Stefan Agner <stefan@agner.ch>
|
||||
Date: Mon, 11 Jan 2021 11:20:48 +0100
|
||||
Subject: [PATCH] arm64: dts: meson: g12b: add power button support
|
||||
|
||||
Add power button support on J2 pin 11 (GPIOX_3 on the SoC side). The
|
||||
GPIO is low active, e.g. when connecting with pin 9 (GND) a power
|
||||
button press is triggered.
|
||||
|
||||
Signed-off-by: Stefan Agner <stefan@agner.ch>
|
||||
---
|
||||
arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi | 11 +++++++++++
|
||||
1 file changed, 11 insertions(+)
|
||||
|
||||
diff --git a/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi
|
||||
index d33e54b5e196..5f0f036b1265 100644
|
||||
--- a/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi
|
||||
+++ b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi
|
||||
@@ -39,6 +39,17 @@ emmc_pwrseq: emmc-pwrseq {
|
||||
reset-gpios = <&gpio BOOT_12 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
|
||||
+ gpio-keys-polled {
|
||||
+ compatible = "gpio-keys-polled";
|
||||
+ poll-interval = <100>;
|
||||
+
|
||||
+ power-button {
|
||||
+ label = "power";
|
||||
+ linux,code = <KEY_POWER>;
|
||||
+ gpios = <&gpio GPIOX_3 GPIO_ACTIVE_LOW>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
leds {
|
||||
compatible = "gpio-leds";
|
||||
|
||||
--
|
||||
2.37.3
|
||||
|
@@ -0,0 +1,42 @@
|
||||
From b4024d399bb13d46cd1a5d3be3793669b3d80e97 Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <b4024d399bb13d46cd1a5d3be3793669b3d80e97.1663008544.git.stefan@agner.ch>
|
||||
In-Reply-To: <ff269d57d23c2edee262e14c6cf4116bc16d8019.1663008544.git.stefan@agner.ch>
|
||||
References: <ff269d57d23c2edee262e14c6cf4116bc16d8019.1663008544.git.stefan@agner.ch>
|
||||
From: Stefan Agner <stefan@agner.ch>
|
||||
Date: Mon, 11 Jan 2021 11:38:54 +0100
|
||||
Subject: [PATCH] arm64: dts: meson: g12b: add GPIO fan support
|
||||
|
||||
Add simple GPIO fan node to support a fan on GPIO J8. Unfortunately the
|
||||
pad used to control the fan does not support real PWM, hence the RPM
|
||||
cannot be modulated.
|
||||
|
||||
Signed-off-by: Stefan Agner <stefan@agner.ch>
|
||||
---
|
||||
arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi | 11 +++++++++++
|
||||
1 file changed, 11 insertions(+)
|
||||
|
||||
diff --git a/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi
|
||||
index 5f0f036b1265..36dbd2666015 100644
|
||||
--- a/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi
|
||||
+++ b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi
|
||||
@@ -39,6 +39,17 @@ emmc_pwrseq: emmc-pwrseq {
|
||||
reset-gpios = <&gpio BOOT_12 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
|
||||
+ /*
|
||||
+ * 5V 80x80x10.8mm cooling fan from Hardkernel shop.
|
||||
+ */
|
||||
+ fan0: gpio-fan {
|
||||
+ #cooling-cells = <2>;
|
||||
+ compatible = "gpio-fan";
|
||||
+ gpio-fan,speed-map = <0 0 1600 1>;
|
||||
+ gpios = <&gpio_ao GPIOAO_10 GPIO_ACTIVE_HIGH>;
|
||||
+ status = "okay";
|
||||
+ };
|
||||
+
|
||||
gpio-keys-polled {
|
||||
compatible = "gpio-keys-polled";
|
||||
poll-interval = <100>;
|
||||
--
|
||||
2.37.3
|
||||
|
@@ -0,0 +1,73 @@
|
||||
From 9f82b2c1cdbdd172e7e7bfdccc88be3257fd4c91 Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <9f82b2c1cdbdd172e7e7bfdccc88be3257fd4c91.1663008544.git.stefan@agner.ch>
|
||||
In-Reply-To: <ff269d57d23c2edee262e14c6cf4116bc16d8019.1663008544.git.stefan@agner.ch>
|
||||
References: <ff269d57d23c2edee262e14c6cf4116bc16d8019.1663008544.git.stefan@agner.ch>
|
||||
From: Stefan Agner <stefan@agner.ch>
|
||||
Date: Mon, 11 Jan 2021 15:53:55 +0100
|
||||
Subject: [PATCH] arm64: dts: meson: g12b: odroid-n2: add fan as cooling device
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Add the GPIO fan as a cooling device for the CPU thermal zone. Since we
|
||||
have only full fan speed available with this, set the tripping point to
|
||||
65°C which is the highest tripping point which Hardkernel used in their
|
||||
downstream kernel.
|
||||
|
||||
Signed-off-by: Stefan Agner <stefan@agner.ch>
|
||||
---
|
||||
.../dts/amlogic/meson-g12b-odroid-n2.dtsi | 38 +++++++++++++++++++
|
||||
1 file changed, 38 insertions(+)
|
||||
|
||||
diff --git a/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi
|
||||
index 36dbd2666015..5ca75696bd5c 100644
|
||||
--- a/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi
|
||||
+++ b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi
|
||||
@@ -388,6 +388,44 @@ &clkc_audio {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
+&cpu_thermal {
|
||||
+ trips {
|
||||
+ cpu_warm: cpu_warm {
|
||||
+ hysteresis = <5000>;
|
||||
+ temperature = <65000>;
|
||||
+ type = "active";
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ cooling-maps {
|
||||
+ map0 {
|
||||
+ cooling-device =
|
||||
+ <&fan0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
|
||||
+ trip = <&cpu_warm>;
|
||||
+ };
|
||||
+ map1 {
|
||||
+ trip = <&cpu_passive>;
|
||||
+ cooling-device = <&cpu0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
|
||||
+ <&cpu1 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
|
||||
+ <&cpu100 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
|
||||
+ <&cpu101 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
|
||||
+ <&cpu102 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
|
||||
+ <&cpu103 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
|
||||
+ <&fan0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
|
||||
+ };
|
||||
+ map2 {
|
||||
+ trip = <&cpu_hot>;
|
||||
+ cooling-device = <&cpu0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
|
||||
+ <&cpu1 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
|
||||
+ <&cpu100 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
|
||||
+ <&cpu101 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
|
||||
+ <&cpu102 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
|
||||
+ <&cpu103 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
|
||||
+ <&fan0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
|
||||
+ };
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
&cpu0 {
|
||||
cpu-supply = <&vddcpu_b>;
|
||||
operating-points-v2 = <&cpu_opp_table_0>;
|
||||
--
|
||||
2.37.3
|
||||
|
@@ -0,0 +1,44 @@
|
||||
From 025e89230336ccea12ff89195231dd0c03cd3eec Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <025e89230336ccea12ff89195231dd0c03cd3eec.1663008544.git.stefan@agner.ch>
|
||||
In-Reply-To: <ff269d57d23c2edee262e14c6cf4116bc16d8019.1663008544.git.stefan@agner.ch>
|
||||
References: <ff269d57d23c2edee262e14c6cf4116bc16d8019.1663008544.git.stefan@agner.ch>
|
||||
From: Hyeonki Hong <hhk7734@gmail.com>
|
||||
Date: Fri, 27 Mar 2020 17:05:22 +0900
|
||||
Subject: [PATCH] arm64: dts: meson: add uart_A node
|
||||
|
||||
The UART_A is available through J3 pin 8/10 and documented to be
|
||||
available as UART by default.
|
||||
|
||||
Signed-off-by: Stefan Agner <stefan@agner.ch>
|
||||
---
|
||||
arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi | 7 +++++++
|
||||
1 file changed, 7 insertions(+)
|
||||
|
||||
diff --git a/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi
|
||||
index 5ca75696bd5c..738eb0339333 100644
|
||||
--- a/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi
|
||||
+++ b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi
|
||||
@@ -12,6 +12,7 @@
|
||||
/ {
|
||||
aliases {
|
||||
serial0 = &uart_AO;
|
||||
+ serial1 = &uart_A;
|
||||
ethernet0 = ðmac;
|
||||
rtc0 = &rtc;
|
||||
rtc1 = &vrtc;
|
||||
@@ -728,6 +729,12 @@ &toddr_c {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
+&uart_A {
|
||||
+ status = "okay";
|
||||
+ pinctrl-0 = <&uart_a_pins>;
|
||||
+ pinctrl-names = "default";
|
||||
+};
|
||||
+
|
||||
&uart_AO {
|
||||
status = "okay";
|
||||
pinctrl-0 = <&uart_ao_a_pins>;
|
||||
--
|
||||
2.37.3
|
||||
|
@@ -0,0 +1,37 @@
|
||||
From 96909bf9c466f99cdb5fdd45e82379198063c06d Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <96909bf9c466f99cdb5fdd45e82379198063c06d.1663008544.git.stefan@agner.ch>
|
||||
In-Reply-To: <ff269d57d23c2edee262e14c6cf4116bc16d8019.1663008544.git.stefan@agner.ch>
|
||||
References: <ff269d57d23c2edee262e14c6cf4116bc16d8019.1663008544.git.stefan@agner.ch>
|
||||
From: Stefan Agner <stefan@agner.ch>
|
||||
Date: Thu, 29 Apr 2021 21:32:43 +0200
|
||||
Subject: [PATCH] arm64: dts: meson: add i2c2 node to ODROID N2/N2+
|
||||
|
||||
The J2 connectors pinout documents "I2C.SDA0/SCL0" on pin 3 and 5, which
|
||||
are connected to GPIOX_17/18. This GPIO allow to mux I2C to the second
|
||||
I2C instance. Enable i2c2 and use the appropriate pinmux.
|
||||
|
||||
Signed-off-by: Stefan Agner <stefan@agner.ch>
|
||||
---
|
||||
arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi | 6 ++++++
|
||||
1 file changed, 6 insertions(+)
|
||||
|
||||
diff --git a/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi
|
||||
index 738eb0339333..2e9fefc20b19 100644
|
||||
--- a/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi
|
||||
+++ b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi
|
||||
@@ -586,6 +586,12 @@ &ir {
|
||||
linux,rc-map-name = "rc-odroid";
|
||||
};
|
||||
|
||||
+&i2c2 {
|
||||
+ status = "okay";
|
||||
+ pinctrl-0 = <&i2c2_sda_x_pins>, <&i2c2_sck_x_pins>;
|
||||
+ pinctrl-names = "default";
|
||||
+};
|
||||
+
|
||||
&i2c3 {
|
||||
status = "okay";
|
||||
pinctrl-0 = <&i2c3_sda_a_pins>, <&i2c3_sck_a_pins>;
|
||||
--
|
||||
2.37.3
|
||||
|
@@ -0,0 +1,43 @@
|
||||
From 23fae187ce1f409811c4f3b293d78e53cc750def Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <23fae187ce1f409811c4f3b293d78e53cc750def.1663008544.git.stefan@agner.ch>
|
||||
In-Reply-To: <ff269d57d23c2edee262e14c6cf4116bc16d8019.1663008544.git.stefan@agner.ch>
|
||||
References: <ff269d57d23c2edee262e14c6cf4116bc16d8019.1663008544.git.stefan@agner.ch>
|
||||
From: Hyeonki Hong <hhk7734@gmail.com>
|
||||
Date: Tue, 1 Mar 2022 21:51:50 +0100
|
||||
Subject: [PATCH] ODROID-C4: arm64/dts: add uart_A node
|
||||
|
||||
---
|
||||
arch/arm64/boot/dts/amlogic/meson-sm1-odroid.dtsi | 9 ++++++++-
|
||||
1 file changed, 8 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/arch/arm64/boot/dts/amlogic/meson-sm1-odroid.dtsi b/arch/arm64/boot/dts/amlogic/meson-sm1-odroid.dtsi
|
||||
index 76ad052fbf0c..690e4823a9d0 100644
|
||||
--- a/arch/arm64/boot/dts/amlogic/meson-sm1-odroid.dtsi
|
||||
+++ b/arch/arm64/boot/dts/amlogic/meson-sm1-odroid.dtsi
|
||||
@@ -10,8 +10,9 @@
|
||||
|
||||
/ {
|
||||
aliases {
|
||||
- serial0 = &uart_AO;
|
||||
ethernet0 = ðmac;
|
||||
+ serial0 = &uart_AO;
|
||||
+ serial1 = &uart_A;
|
||||
};
|
||||
|
||||
chosen {
|
||||
@@ -436,6 +437,12 @@ &tohdmitx {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
+&uart_A {
|
||||
+ status = "okay";
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&uart_a_pins>;
|
||||
+};
|
||||
+
|
||||
&uart_AO {
|
||||
status = "okay";
|
||||
pinctrl-0 = <&uart_ao_a_pins>;
|
||||
--
|
||||
2.37.3
|
||||
|
@@ -0,0 +1,86 @@
|
||||
From ba8dc083b2bdd7fb24efccada671ef5650143a91 Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <ba8dc083b2bdd7fb24efccada671ef5650143a91.1663008544.git.stefan@agner.ch>
|
||||
In-Reply-To: <ff269d57d23c2edee262e14c6cf4116bc16d8019.1663008544.git.stefan@agner.ch>
|
||||
References: <ff269d57d23c2edee262e14c6cf4116bc16d8019.1663008544.git.stefan@agner.ch>
|
||||
From: Hyeonki Hong <hhk7734@gmail.com>
|
||||
Date: Tue, 1 Mar 2022 21:53:32 +0100
|
||||
Subject: [PATCH] ODROID-C4: arm64/dts: add i2c2, i2c3 node
|
||||
|
||||
---
|
||||
.../boot/dts/amlogic/meson-sm1-odroid.dtsi | 53 +++++++++++++++++++
|
||||
1 file changed, 53 insertions(+)
|
||||
|
||||
diff --git a/arch/arm64/boot/dts/amlogic/meson-sm1-odroid.dtsi b/arch/arm64/boot/dts/amlogic/meson-sm1-odroid.dtsi
|
||||
index 690e4823a9d0..85637c1c846b 100644
|
||||
--- a/arch/arm64/boot/dts/amlogic/meson-sm1-odroid.dtsi
|
||||
+++ b/arch/arm64/boot/dts/amlogic/meson-sm1-odroid.dtsi
|
||||
@@ -11,6 +11,8 @@
|
||||
/ {
|
||||
aliases {
|
||||
ethernet0 = ðmac;
|
||||
+ i2c0 = &i2c2;
|
||||
+ i2c1 = &i2c3;
|
||||
serial0 = &uart_AO;
|
||||
serial1 = &uart_A;
|
||||
};
|
||||
@@ -373,6 +375,57 @@ &ir {
|
||||
pinctrl-names = "default";
|
||||
};
|
||||
|
||||
+&i2c2 {
|
||||
+ status = "okay";
|
||||
+
|
||||
+ /*
|
||||
+ * 40 Pin Header : SDA(GPIOX.17->3 Pin)
|
||||
+ * SCL(GPIOX.18->5 Pin)
|
||||
+ */
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&i2c2_master_pins1>;
|
||||
+
|
||||
+ /* default 400k */
|
||||
+ clock-frequency = <400000>;
|
||||
+};
|
||||
+
|
||||
+&i2c3 {
|
||||
+ /* default i2c clock-frequency is 100Khz */
|
||||
+ status = "okay";
|
||||
+
|
||||
+ /*
|
||||
+ * 40 Pin Header : SDA(GPIOA.14->27 Pin)
|
||||
+ * SCL(GPIOA.15->28 Pin)
|
||||
+ */
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&i2c3_master_pins2>;
|
||||
+
|
||||
+ /* default 100k */
|
||||
+ clock-frequency = <100000>;
|
||||
+};
|
||||
+
|
||||
+&periphs_pinctrl {
|
||||
+ i2c2_master_pins1: i2c2-master-pins1 {
|
||||
+ mux {
|
||||
+ groups = "i2c2_sda_x",
|
||||
+ "i2c2_sck_x";
|
||||
+ function = "i2c2";
|
||||
+ bias-pull-up;
|
||||
+ drive-strength-microamp = <3000>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ i2c3_master_pins2: i2c3-master-pins2 {
|
||||
+ mux {
|
||||
+ groups = "i2c3_sda_a",
|
||||
+ "i2c3_sck_a";
|
||||
+ function = "i2c3";
|
||||
+ bias-pull-up;
|
||||
+ drive-strength-microamp = <3000>;
|
||||
+ };
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
&pwm_AO_cd {
|
||||
pinctrl-0 = <&pwm_ao_d_e_pins>;
|
||||
pinctrl-names = "default";
|
||||
--
|
||||
2.37.3
|
||||
|
@@ -1,53 +0,0 @@
|
||||
From cdfb8eea4103e537898073dc3f7bf8f75cec5efb Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <cdfb8eea4103e537898073dc3f7bf8f75cec5efb.1619725559.git.stefan@agner.ch>
|
||||
From: Christian Hewitt <christianshewitt@gmail.com>
|
||||
Date: Mon, 11 Jan 2021 13:58:31 +0000
|
||||
Subject: [PATCH 1/8] arm64: dts: meson: add i2c3/rtc nodes and rtc aliases to
|
||||
ODROID-N2 dtsi
|
||||
|
||||
Enable the onboard pcf8563 rtc hardware on ODROID N2/N2+ boards via the
|
||||
common dtsi. Also add aliases to ensure vrtc does not claim /dev/rtc0.
|
||||
|
||||
Signed-off-by: Christian Hewitt <christianshewitt@gmail.com>
|
||||
Reviewed-by: Neil Armstrong <narmstrong@baylibre.com>
|
||||
Signed-off-by: Kevin Hilman <khilman@baylibre.com>
|
||||
Link: https://lore.kernel.org/r/20210111135831.2218-1-christianshewitt@gmail.com
|
||||
---
|
||||
.../boot/dts/amlogic/meson-g12b-odroid-n2.dtsi | 14 ++++++++++++++
|
||||
1 file changed, 14 insertions(+)
|
||||
|
||||
diff --git a/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi
|
||||
index 39a09661c5f6..b78be3e6974d 100644
|
||||
--- a/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi
|
||||
+++ b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi
|
||||
@@ -13,6 +13,8 @@ / {
|
||||
aliases {
|
||||
serial0 = &uart_AO;
|
||||
ethernet0 = ðmac;
|
||||
+ rtc0 = &rtc;
|
||||
+ rtc1 = &vrtc;
|
||||
};
|
||||
|
||||
dioo2133: audio-amplifier-0 {
|
||||
@@ -478,6 +480,18 @@ &ir {
|
||||
linux,rc-map-name = "rc-odroid";
|
||||
};
|
||||
|
||||
+&i2c3 {
|
||||
+ status = "okay";
|
||||
+ pinctrl-0 = <&i2c3_sda_a_pins>, <&i2c3_sck_a_pins>;
|
||||
+ pinctrl-names = "default";
|
||||
+
|
||||
+ rtc: rtc@51 {
|
||||
+ compatible = "nxp,pcf8563";
|
||||
+ reg = <0x51>;
|
||||
+ wakeup-source;
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
&pwm_ab {
|
||||
pinctrl-0 = <&pwm_a_e_pins>;
|
||||
pinctrl-names = "default";
|
||||
--
|
||||
2.31.1
|
||||
|
@@ -1,37 +0,0 @@
|
||||
From 8b2ab165b2ed529f74b242159648893d53272c24 Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <8b2ab165b2ed529f74b242159648893d53272c24.1619725559.git.stefan@agner.ch>
|
||||
In-Reply-To: <cdfb8eea4103e537898073dc3f7bf8f75cec5efb.1619725559.git.stefan@agner.ch>
|
||||
References: <cdfb8eea4103e537898073dc3f7bf8f75cec5efb.1619725559.git.stefan@agner.ch>
|
||||
From: Hyeonki Hong <hhk7734@gmail.com>
|
||||
Date: Wed, 7 Apr 2021 04:26:08 +0000
|
||||
Subject: [PATCH 2/8] arm64: dts: meson: add saradc node to ODROID N2/N2+
|
||||
|
||||
Add the meson saradc node to the ODROID N2/N2+ common dtsi.
|
||||
|
||||
Signed-off-by: Hyeonki Hong <hhk7734@gmail.com>
|
||||
Signed-off-by: Christian Hewitt <christianshewitt@gmail.com>
|
||||
Signed-off-by: Kevin Hilman <khilman@baylibre.com>
|
||||
Link: https://lore.kernel.org/r/20210407042609.9736-3-christianshewitt@gmail.com
|
||||
---
|
||||
arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi | 5 +++++
|
||||
1 file changed, 5 insertions(+)
|
||||
|
||||
diff --git a/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi
|
||||
index b78be3e6974d..8a5e132c4b79 100644
|
||||
--- a/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi
|
||||
+++ b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi
|
||||
@@ -508,6 +508,11 @@ &pwm_AO_cd {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
+&saradc {
|
||||
+ status = "okay";
|
||||
+ vref-supply = <&vddao_1v8>;
|
||||
+};
|
||||
+
|
||||
/* SD card */
|
||||
&sd_emmc_b {
|
||||
status = "okay";
|
||||
--
|
||||
2.31.1
|
||||
|
@@ -1,78 +0,0 @@
|
||||
From 602012d9081be7a54d2d6cee59035ae019dd3bb4 Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <602012d9081be7a54d2d6cee59035ae019dd3bb4.1619725559.git.stefan@agner.ch>
|
||||
In-Reply-To: <cdfb8eea4103e537898073dc3f7bf8f75cec5efb.1619725559.git.stefan@agner.ch>
|
||||
References: <cdfb8eea4103e537898073dc3f7bf8f75cec5efb.1619725559.git.stefan@agner.ch>
|
||||
From: Hyeonki Hong <hhk7734@gmail.com>
|
||||
Date: Wed, 7 Apr 2021 04:26:09 +0000
|
||||
Subject: [PATCH 3/8] arm64: dts: meson: add GPIO line names to ODROID N2/N2+
|
||||
|
||||
Add GPIO line-name identifiers to the ODROID N2/N2+ common dtsi.
|
||||
|
||||
Signed-off-by: Hyeonki Hong <hhk7734@gmail.com>
|
||||
Signed-off-by: Christian Hewitt <christianshewitt@gmail.com>
|
||||
Reviewed-by: Neil Armstrong <narmstrong@baylibre.com>
|
||||
Signed-off-by: Kevin Hilman <khilman@baylibre.com>
|
||||
Link: https://lore.kernel.org/r/20210407042609.9736-4-christianshewitt@gmail.com
|
||||
---
|
||||
.../dts/amlogic/meson-g12b-odroid-n2.dtsi | 45 +++++++++++++++++++
|
||||
1 file changed, 45 insertions(+)
|
||||
|
||||
diff --git a/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi
|
||||
index 8a5e132c4b79..41b2f9c96b5f 100644
|
||||
--- a/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi
|
||||
+++ b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi
|
||||
@@ -446,6 +446,51 @@ &frddr_c {
|
||||
};
|
||||
|
||||
&gpio {
|
||||
+ gpio-line-names =
|
||||
+ /* GPIOZ */
|
||||
+ "", "", "", "", "", "", "", "",
|
||||
+ "", "", "", "", "", "", "", "",
|
||||
+ /* GPIOH */
|
||||
+ "", "", "", "", "", "", "", "",
|
||||
+ "",
|
||||
+ /* BOOT */
|
||||
+ "", "", "", "", "", "", "", "",
|
||||
+ "", "", "", "", "", "", "", "",
|
||||
+ /* GPIOC */
|
||||
+ "", "", "", "", "", "", "", "",
|
||||
+ /* GPIOA */
|
||||
+ "PIN_44", /* GPIOA_0 */
|
||||
+ "PIN_46", /* GPIOA_1 */
|
||||
+ "PIN_45", /* GPIOA_2 */
|
||||
+ "PIN_47", /* GPIOA_3 */
|
||||
+ "PIN_26", /* GPIOA_4 */
|
||||
+ "", "", "", "", "", "",
|
||||
+ "PIN_42", /* GPIOA_11 */
|
||||
+ "PIN_32", /* GPIOA_12 */
|
||||
+ "PIN_7", /* GPIOA_13 */
|
||||
+ "PIN_27", /* GPIOA_14 */
|
||||
+ "PIN_28", /* GPIOA_15 */
|
||||
+ /* GPIOX */
|
||||
+ "PIN_16", /* GPIOX_0 */
|
||||
+ "PIN_18", /* GPIOX_1 */
|
||||
+ "PIN_22", /* GPIOX_2 */
|
||||
+ "PIN_11", /* GPIOX_3 */
|
||||
+ "PIN_13", /* GPIOX_4 */
|
||||
+ "PIN_33", /* GPIOX_5 */
|
||||
+ "PIN_35", /* GPIOX_6 */
|
||||
+ "PIN_15", /* GPIOX_7 */
|
||||
+ "PIN_19", /* GPIOX_8 */
|
||||
+ "PIN_21", /* GPIOX_9 */
|
||||
+ "PIN_24", /* GPIOX_10 */
|
||||
+ "PIN_23", /* GPIOX_11 */
|
||||
+ "PIN_8", /* GPIOX_12 */
|
||||
+ "PIN_10", /* GPIOX_13 */
|
||||
+ "PIN_29", /* GPIOX_14 */
|
||||
+ "PIN_31", /* GPIOX_15 */
|
||||
+ "PIN_12", /* GPIOX_16 */
|
||||
+ "PIN_3", /* GPIOX_17 */
|
||||
+ "PIN_5", /* GPIOX_18 */
|
||||
+ "PIN_36"; /* GPIOX_19 */
|
||||
/*
|
||||
* WARNING: The USB Hub on the Odroid-N2 needs a reset signal
|
||||
* to be turned high in order to be detected by the USB Controller
|
||||
--
|
||||
2.31.1
|
||||
|
@@ -1,42 +0,0 @@
|
||||
From 0a70fbc9a556737d3f70a1a194ba7be280b007c5 Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <0a70fbc9a556737d3f70a1a194ba7be280b007c5.1619725559.git.stefan@agner.ch>
|
||||
In-Reply-To: <cdfb8eea4103e537898073dc3f7bf8f75cec5efb.1619725559.git.stefan@agner.ch>
|
||||
References: <cdfb8eea4103e537898073dc3f7bf8f75cec5efb.1619725559.git.stefan@agner.ch>
|
||||
From: Stefan Agner <stefan@agner.ch>
|
||||
Date: Mon, 11 Jan 2021 11:20:48 +0100
|
||||
Subject: [PATCH 4/8] arm64: dts: meson: g12b: add power button support
|
||||
|
||||
Add power button support on J2 pin 11 (GPIOX_3 on the SoC side). The
|
||||
GPIO is low active, e.g. when connecting with pin 9 (GND) a power
|
||||
button press is triggered.
|
||||
|
||||
Signed-off-by: Stefan Agner <stefan@agner.ch>
|
||||
---
|
||||
arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi | 11 +++++++++++
|
||||
1 file changed, 11 insertions(+)
|
||||
|
||||
diff --git a/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi
|
||||
index 41b2f9c96b5f..4b6bb7e74e25 100644
|
||||
--- a/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi
|
||||
+++ b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi
|
||||
@@ -39,6 +39,17 @@ emmc_pwrseq: emmc-pwrseq {
|
||||
reset-gpios = <&gpio BOOT_12 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
|
||||
+ gpio-keys-polled {
|
||||
+ compatible = "gpio-keys-polled";
|
||||
+ poll-interval = <100>;
|
||||
+
|
||||
+ power-button {
|
||||
+ label = "power";
|
||||
+ linux,code = <KEY_POWER>;
|
||||
+ gpios = <&gpio GPIOX_3 GPIO_ACTIVE_LOW>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
leds {
|
||||
compatible = "gpio-leds";
|
||||
|
||||
--
|
||||
2.31.1
|
||||
|
@@ -1,42 +0,0 @@
|
||||
From 8a4a640d1b8dea977795de3f49b6ea3a791e401a Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <8a4a640d1b8dea977795de3f49b6ea3a791e401a.1619725559.git.stefan@agner.ch>
|
||||
In-Reply-To: <cdfb8eea4103e537898073dc3f7bf8f75cec5efb.1619725559.git.stefan@agner.ch>
|
||||
References: <cdfb8eea4103e537898073dc3f7bf8f75cec5efb.1619725559.git.stefan@agner.ch>
|
||||
From: Stefan Agner <stefan@agner.ch>
|
||||
Date: Mon, 11 Jan 2021 11:38:54 +0100
|
||||
Subject: [PATCH 5/8] arm64: dts: meson: g12b: add GPIO fan support
|
||||
|
||||
Add simple GPIO fan node to support a fan on GPIO J8. Unfortunately the
|
||||
pad used to control the fan does not support real PWM, hence the RPM
|
||||
cannot be modulated.
|
||||
|
||||
Signed-off-by: Stefan Agner <stefan@agner.ch>
|
||||
---
|
||||
arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi | 11 +++++++++++
|
||||
1 file changed, 11 insertions(+)
|
||||
|
||||
diff --git a/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi
|
||||
index 4b6bb7e74e25..e8a3ede698b5 100644
|
||||
--- a/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi
|
||||
+++ b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi
|
||||
@@ -39,6 +39,17 @@ emmc_pwrseq: emmc-pwrseq {
|
||||
reset-gpios = <&gpio BOOT_12 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
|
||||
+ /*
|
||||
+ * 5V 80x80x10.8mm cooling fan from Hardkernel shop.
|
||||
+ */
|
||||
+ fan0: gpio-fan {
|
||||
+ #cooling-cells = <2>;
|
||||
+ compatible = "gpio-fan";
|
||||
+ gpio-fan,speed-map = <0 0 1600 1>;
|
||||
+ gpios = <&gpio_ao GPIOAO_10 GPIO_ACTIVE_HIGH>;
|
||||
+ status = "okay";
|
||||
+ };
|
||||
+
|
||||
gpio-keys-polled {
|
||||
compatible = "gpio-keys-polled";
|
||||
poll-interval = <100>;
|
||||
--
|
||||
2.31.1
|
||||
|
@@ -1,74 +0,0 @@
|
||||
From eee30c74e72b6092b5e30c4744a4f1d7d9526403 Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <eee30c74e72b6092b5e30c4744a4f1d7d9526403.1619725559.git.stefan@agner.ch>
|
||||
In-Reply-To: <cdfb8eea4103e537898073dc3f7bf8f75cec5efb.1619725559.git.stefan@agner.ch>
|
||||
References: <cdfb8eea4103e537898073dc3f7bf8f75cec5efb.1619725559.git.stefan@agner.ch>
|
||||
From: Stefan Agner <stefan@agner.ch>
|
||||
Date: Mon, 11 Jan 2021 15:53:55 +0100
|
||||
Subject: [PATCH 6/8] arm64: dts: meson: g12b: odroid-n2: add fan as cooling
|
||||
device
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Add the GPIO fan as a cooling device for the CPU thermal zone. Since we
|
||||
have only full fan speed available with this, set the tripping point to
|
||||
65°C which is the highest tripping point which Hardkernel used in their
|
||||
downstream kernel.
|
||||
|
||||
Signed-off-by: Stefan Agner <stefan@agner.ch>
|
||||
---
|
||||
.../dts/amlogic/meson-g12b-odroid-n2.dtsi | 38 +++++++++++++++++++
|
||||
1 file changed, 38 insertions(+)
|
||||
|
||||
diff --git a/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi
|
||||
index e8a3ede698b5..dd345c6aa4b5 100644
|
||||
--- a/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi
|
||||
+++ b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi
|
||||
@@ -388,6 +388,44 @@ &clkc_audio {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
+&cpu_thermal {
|
||||
+ trips {
|
||||
+ cpu_warm: cpu_warm {
|
||||
+ hysteresis = <5000>;
|
||||
+ temperature = <65000>;
|
||||
+ type = "active";
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ cooling-maps {
|
||||
+ map0 {
|
||||
+ cooling-device =
|
||||
+ <&fan0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
|
||||
+ trip = <&cpu_warm>;
|
||||
+ };
|
||||
+ map1 {
|
||||
+ trip = <&cpu_passive>;
|
||||
+ cooling-device = <&cpu0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
|
||||
+ <&cpu1 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
|
||||
+ <&cpu100 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
|
||||
+ <&cpu101 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
|
||||
+ <&cpu102 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
|
||||
+ <&cpu103 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
|
||||
+ <&fan0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
|
||||
+ };
|
||||
+ map2 {
|
||||
+ trip = <&cpu_hot>;
|
||||
+ cooling-device = <&cpu0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
|
||||
+ <&cpu1 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
|
||||
+ <&cpu100 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
|
||||
+ <&cpu101 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
|
||||
+ <&cpu102 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
|
||||
+ <&cpu103 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
|
||||
+ <&fan0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
|
||||
+ };
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
&cpu0 {
|
||||
cpu-supply = <&vddcpu_b>;
|
||||
operating-points-v2 = <&cpu_opp_table_0>;
|
||||
--
|
||||
2.31.1
|
||||
|
@@ -1,44 +0,0 @@
|
||||
From b10ae8fd3bef195eda4a30bc5f3995ca13b6cffd Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <b10ae8fd3bef195eda4a30bc5f3995ca13b6cffd.1619725559.git.stefan@agner.ch>
|
||||
In-Reply-To: <cdfb8eea4103e537898073dc3f7bf8f75cec5efb.1619725559.git.stefan@agner.ch>
|
||||
References: <cdfb8eea4103e537898073dc3f7bf8f75cec5efb.1619725559.git.stefan@agner.ch>
|
||||
From: Hyeonki Hong <hhk7734@gmail.com>
|
||||
Date: Fri, 27 Mar 2020 17:05:22 +0900
|
||||
Subject: [PATCH 7/8] arm64: dts: meson: add uart_A node
|
||||
|
||||
The UART_A is available through J3 pin 8/10 and documented to be
|
||||
available as UART by default.
|
||||
|
||||
Signed-off-by: Stefan Agner <stefan@agner.ch>
|
||||
---
|
||||
arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi | 7 +++++++
|
||||
1 file changed, 7 insertions(+)
|
||||
|
||||
diff --git a/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi
|
||||
index dd345c6aa4b5..cec346178e3d 100644
|
||||
--- a/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi
|
||||
+++ b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi
|
||||
@@ -12,6 +12,7 @@
|
||||
/ {
|
||||
aliases {
|
||||
serial0 = &uart_AO;
|
||||
+ serial1 = &uart_A;
|
||||
ethernet0 = ðmac;
|
||||
rtc0 = &rtc;
|
||||
rtc1 = &vrtc;
|
||||
@@ -728,6 +729,12 @@ &toddr_c {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
+&uart_A {
|
||||
+ status = "okay";
|
||||
+ pinctrl-0 = <&uart_a_pins>;
|
||||
+ pinctrl-names = "default";
|
||||
+};
|
||||
+
|
||||
&uart_AO {
|
||||
status = "okay";
|
||||
pinctrl-0 = <&uart_ao_a_pins>;
|
||||
--
|
||||
2.31.1
|
||||
|
@@ -1,37 +0,0 @@
|
||||
From aea42d4a9a307438bf7099aee38daedac2bd5044 Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <aea42d4a9a307438bf7099aee38daedac2bd5044.1619725559.git.stefan@agner.ch>
|
||||
In-Reply-To: <cdfb8eea4103e537898073dc3f7bf8f75cec5efb.1619725559.git.stefan@agner.ch>
|
||||
References: <cdfb8eea4103e537898073dc3f7bf8f75cec5efb.1619725559.git.stefan@agner.ch>
|
||||
From: Stefan Agner <stefan@agner.ch>
|
||||
Date: Thu, 29 Apr 2021 21:32:43 +0200
|
||||
Subject: [PATCH 8/8] arm64: dts: meson: add i2c2 node to ODROID N2/N2+
|
||||
|
||||
The J2 connectors pinout documents "I2C.SDA0/SCL0" on pin 3 and 5, which
|
||||
are connected to GPIOX_17/18. This GPIO allow to mux I2C to the second
|
||||
I2C instance. Enable i2c2 and use the appropriate pinmux.
|
||||
|
||||
Signed-off-by: Stefan Agner <stefan@agner.ch>
|
||||
---
|
||||
arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi | 6 ++++++
|
||||
1 file changed, 6 insertions(+)
|
||||
|
||||
diff --git a/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi
|
||||
index cec346178e3d..f1c3356c78a0 100644
|
||||
--- a/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi
|
||||
+++ b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi
|
||||
@@ -586,6 +586,12 @@ &ir {
|
||||
linux,rc-map-name = "rc-odroid";
|
||||
};
|
||||
|
||||
+&i2c2 {
|
||||
+ status = "okay";
|
||||
+ pinctrl-0 = <&i2c2_sda_x_pins>, <&i2c2_sck_x_pins>;
|
||||
+ pinctrl-names = "default";
|
||||
+};
|
||||
+
|
||||
&i2c3 {
|
||||
status = "okay";
|
||||
pinctrl-0 = <&i2c3_sda_a_pins>, <&i2c3_sck_a_pins>;
|
||||
--
|
||||
2.31.1
|
||||
|
File diff suppressed because it is too large
Load Diff
@@ -1,38 +0,0 @@
|
||||
From a189f6229a9462ae2fc406b1e45286d2eea32b40 Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <a189f6229a9462ae2fc406b1e45286d2eea32b40.1622055679.git.stefan@agner.ch>
|
||||
In-Reply-To: <0955f7e64f302c5c331b90fd07fc48dfb677eab5.1622055679.git.stefan@agner.ch>
|
||||
References: <0955f7e64f302c5c331b90fd07fc48dfb677eab5.1622055679.git.stefan@agner.ch>
|
||||
From: Christian Hewitt <christianshewitt@gmail.com>
|
||||
Date: Tue, 15 Sep 2020 17:24:31 +0200
|
||||
Subject: [PATCH 02/11] dt-bindings: arm: amlogic: add support for the
|
||||
ODROID-N2+
|
||||
|
||||
HardKernel ODROID-N2+ uses a revised Amlogic S922X v2 chip that supports
|
||||
higher cpu clock speeds than the original ODROID-N2.
|
||||
|
||||
Signed-off-by: Christian Hewitt <christianshewitt@gmail.com>
|
||||
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
|
||||
Signed-off-by: Kevin Hilman <khilman@baylibre.com>
|
||||
Acked-by: Rob Herring <robh@kernel.org>
|
||||
Acked-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
|
||||
Link: https://lore.kernel.org/r/20200915152432.30616-3-narmstrong@baylibre.com
|
||||
(cherry picked from commit 88ba71cdc5497390350c87e68ce35688e88be3e8)
|
||||
---
|
||||
Documentation/devicetree/bindings/arm/amlogic.yaml | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/Documentation/devicetree/bindings/arm/amlogic.yaml b/Documentation/devicetree/bindings/arm/amlogic.yaml
|
||||
index 5eba9f48823e..12ba8d074370 100644
|
||||
--- a/Documentation/devicetree/bindings/arm/amlogic.yaml
|
||||
+++ b/Documentation/devicetree/bindings/arm/amlogic.yaml
|
||||
@@ -153,6 +153,7 @@ properties:
|
||||
- azw,gtking
|
||||
- azw,gtking-pro
|
||||
- hardkernel,odroid-n2
|
||||
+ - hardkernel,odroid-n2-plus
|
||||
- khadas,vim3
|
||||
- ugoos,am6
|
||||
- const: amlogic,s922x
|
||||
--
|
||||
2.31.1
|
||||
|
@@ -1,79 +0,0 @@
|
||||
From 2f09401241a0f2348d3e30617e89a00c1dc45895 Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <2f09401241a0f2348d3e30617e89a00c1dc45895.1622055679.git.stefan@agner.ch>
|
||||
In-Reply-To: <0955f7e64f302c5c331b90fd07fc48dfb677eab5.1622055679.git.stefan@agner.ch>
|
||||
References: <0955f7e64f302c5c331b90fd07fc48dfb677eab5.1622055679.git.stefan@agner.ch>
|
||||
From: Christian Hewitt <christianshewitt@gmail.com>
|
||||
Date: Tue, 15 Sep 2020 17:24:32 +0200
|
||||
Subject: [PATCH 03/11] arm64: dts: meson: add support for the ODROID-N2+
|
||||
|
||||
HardKernel ODROID-N2+ uses an Amlogic S922X rev. C chip capable of higher
|
||||
clock speeds than the original ODROID-N2.
|
||||
|
||||
The rev. C support a slighly higher VDDCPU_A & VDDCPU_B voltages and supports
|
||||
the same OPPs as the Amlogic A311D SoC from the same G12B family.
|
||||
|
||||
Suggested-by: Dongjin Kim <tobetter@hardkernel.com>
|
||||
Signed-off-by: Christian Hewitt <christianshewitt@gmail.com>
|
||||
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
|
||||
Signed-off-by: Kevin Hilman <khilman@baylibre.com>
|
||||
Acked-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
|
||||
Link: https://lore.kernel.org/r/20200915152432.30616-4-narmstrong@baylibre.com
|
||||
(cherry picked from commit 98d24896ee117b1f0969405476c943e9307e30d4)
|
||||
---
|
||||
arch/arm64/boot/dts/amlogic/Makefile | 1 +
|
||||
.../dts/amlogic/meson-g12b-odroid-n2-plus.dts | 31 +++++++++++++++++++
|
||||
2 files changed, 32 insertions(+)
|
||||
create mode 100644 arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2-plus.dts
|
||||
|
||||
diff --git a/arch/arm64/boot/dts/amlogic/Makefile b/arch/arm64/boot/dts/amlogic/Makefile
|
||||
index 4e2239ffcaa5..b0b3d6791499 100644
|
||||
--- a/arch/arm64/boot/dts/amlogic/Makefile
|
||||
+++ b/arch/arm64/boot/dts/amlogic/Makefile
|
||||
@@ -8,6 +8,7 @@ dtb-$(CONFIG_ARCH_MESON) += meson-g12b-gtking-pro.dtb
|
||||
dtb-$(CONFIG_ARCH_MESON) += meson-g12b-a311d-khadas-vim3.dtb
|
||||
dtb-$(CONFIG_ARCH_MESON) += meson-g12b-s922x-khadas-vim3.dtb
|
||||
dtb-$(CONFIG_ARCH_MESON) += meson-g12b-odroid-n2.dtb
|
||||
+dtb-$(CONFIG_ARCH_MESON) += meson-g12b-odroid-n2-plus.dtb
|
||||
dtb-$(CONFIG_ARCH_MESON) += meson-g12b-ugoos-am6.dtb
|
||||
dtb-$(CONFIG_ARCH_MESON) += meson-gxbb-kii-pro.dtb
|
||||
dtb-$(CONFIG_ARCH_MESON) += meson-gxbb-nanopi-k2.dtb
|
||||
diff --git a/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2-plus.dts b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2-plus.dts
|
||||
new file mode 100644
|
||||
index 000000000000..5de2815ba99d
|
||||
--- /dev/null
|
||||
+++ b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2-plus.dts
|
||||
@@ -0,0 +1,31 @@
|
||||
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
|
||||
+/*
|
||||
+ * Copyright (c) 2019 BayLibre, SAS
|
||||
+ * Author: Neil Armstrong <narmstrong@baylibre.com>
|
||||
+ */
|
||||
+
|
||||
+/dts-v1/;
|
||||
+
|
||||
+/* The Amlogic S922X Rev. C supports the same OPPs as the A311D variant */
|
||||
+#include "meson-g12b-a311d.dtsi"
|
||||
+#include "meson-g12b-odroid-n2.dtsi"
|
||||
+
|
||||
+/ {
|
||||
+ compatible = "hardkernel,odroid-n2-plus", "amlogic,s922x", "amlogic,g12b";
|
||||
+ model = "Hardkernel ODROID-N2Plus";
|
||||
+};
|
||||
+
|
||||
+&vddcpu_a {
|
||||
+ regulator-min-microvolt = <680000>;
|
||||
+ regulator-max-microvolt = <1040000>;
|
||||
+
|
||||
+ pwms = <&pwm_AO_cd 1 1500 0>;
|
||||
+};
|
||||
+
|
||||
+&vddcpu_b {
|
||||
+ regulator-min-microvolt = <680000>;
|
||||
+ regulator-max-microvolt = <1040000>;
|
||||
+
|
||||
+ pwms = <&pwm_AO_cd 1 1500 0>;
|
||||
+};
|
||||
+
|
||||
--
|
||||
2.31.1
|
||||
|
@@ -1,55 +0,0 @@
|
||||
From 7dba042e7863dc61ec74c0759493264e48d32df2 Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <7dba042e7863dc61ec74c0759493264e48d32df2.1622055679.git.stefan@agner.ch>
|
||||
In-Reply-To: <0955f7e64f302c5c331b90fd07fc48dfb677eab5.1622055679.git.stefan@agner.ch>
|
||||
References: <0955f7e64f302c5c331b90fd07fc48dfb677eab5.1622055679.git.stefan@agner.ch>
|
||||
From: Christian Hewitt <christianshewitt@gmail.com>
|
||||
Date: Mon, 11 Jan 2021 13:58:31 +0000
|
||||
Subject: [PATCH 04/11] arm64: dts: meson: add i2c3/rtc nodes and rtc aliases
|
||||
to ODROID-N2 dtsi
|
||||
|
||||
Enable the onboard pcf8563 rtc hardware on ODROID N2/N2+ boards via the
|
||||
common dtsi. Also add aliases to ensure vrtc does not claim /dev/rtc0.
|
||||
|
||||
Signed-off-by: Christian Hewitt <christianshewitt@gmail.com>
|
||||
Reviewed-by: Neil Armstrong <narmstrong@baylibre.com>
|
||||
Signed-off-by: Kevin Hilman <khilman@baylibre.com>
|
||||
Link: https://lore.kernel.org/r/20210111135831.2218-1-christianshewitt@gmail.com
|
||||
---
|
||||
.../boot/dts/amlogic/meson-g12b-odroid-n2.dtsi | 14 ++++++++++++++
|
||||
1 file changed, 14 insertions(+)
|
||||
|
||||
diff --git a/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi
|
||||
index 6982632ae646..5927c4493f5a 100644
|
||||
--- a/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi
|
||||
+++ b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi
|
||||
@@ -13,6 +13,8 @@ / {
|
||||
aliases {
|
||||
serial0 = &uart_AO;
|
||||
ethernet0 = ðmac;
|
||||
+ rtc0 = &rtc;
|
||||
+ rtc1 = &vrtc;
|
||||
};
|
||||
|
||||
dioo2133: audio-amplifier-0 {
|
||||
@@ -478,6 +480,18 @@ &ir {
|
||||
linux,rc-map-name = "rc-odroid";
|
||||
};
|
||||
|
||||
+&i2c3 {
|
||||
+ status = "okay";
|
||||
+ pinctrl-0 = <&i2c3_sda_a_pins>, <&i2c3_sck_a_pins>;
|
||||
+ pinctrl-names = "default";
|
||||
+
|
||||
+ rtc: rtc@51 {
|
||||
+ compatible = "nxp,pcf8563";
|
||||
+ reg = <0x51>;
|
||||
+ wakeup-source;
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
&pwm_ab {
|
||||
pinctrl-0 = <&pwm_a_e_pins>;
|
||||
pinctrl-names = "default";
|
||||
--
|
||||
2.31.1
|
||||
|
@@ -1,37 +0,0 @@
|
||||
From 3f2aecc668b172e0c91bf1bfdc78ee18a6bb6645 Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <3f2aecc668b172e0c91bf1bfdc78ee18a6bb6645.1622055679.git.stefan@agner.ch>
|
||||
In-Reply-To: <0955f7e64f302c5c331b90fd07fc48dfb677eab5.1622055679.git.stefan@agner.ch>
|
||||
References: <0955f7e64f302c5c331b90fd07fc48dfb677eab5.1622055679.git.stefan@agner.ch>
|
||||
From: Hyeonki Hong <hhk7734@gmail.com>
|
||||
Date: Wed, 7 Apr 2021 04:26:08 +0000
|
||||
Subject: [PATCH 05/11] arm64: dts: meson: add saradc node to ODROID N2/N2+
|
||||
|
||||
Add the meson saradc node to the ODROID N2/N2+ common dtsi.
|
||||
|
||||
Signed-off-by: Hyeonki Hong <hhk7734@gmail.com>
|
||||
Signed-off-by: Christian Hewitt <christianshewitt@gmail.com>
|
||||
Signed-off-by: Kevin Hilman <khilman@baylibre.com>
|
||||
Link: https://lore.kernel.org/r/20210407042609.9736-3-christianshewitt@gmail.com
|
||||
---
|
||||
arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi | 5 +++++
|
||||
1 file changed, 5 insertions(+)
|
||||
|
||||
diff --git a/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi
|
||||
index 5927c4493f5a..194a437b4e3f 100644
|
||||
--- a/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi
|
||||
+++ b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi
|
||||
@@ -508,6 +508,11 @@ &pwm_AO_cd {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
+&saradc {
|
||||
+ status = "okay";
|
||||
+ vref-supply = <&vddao_1v8>;
|
||||
+};
|
||||
+
|
||||
/* SD card */
|
||||
&sd_emmc_b {
|
||||
status = "okay";
|
||||
--
|
||||
2.31.1
|
||||
|
@@ -1,78 +0,0 @@
|
||||
From d13c62fab2c91cacda74a9001ea6a6c7d8a9af39 Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <d13c62fab2c91cacda74a9001ea6a6c7d8a9af39.1622055679.git.stefan@agner.ch>
|
||||
In-Reply-To: <0955f7e64f302c5c331b90fd07fc48dfb677eab5.1622055679.git.stefan@agner.ch>
|
||||
References: <0955f7e64f302c5c331b90fd07fc48dfb677eab5.1622055679.git.stefan@agner.ch>
|
||||
From: Hyeonki Hong <hhk7734@gmail.com>
|
||||
Date: Wed, 7 Apr 2021 04:26:09 +0000
|
||||
Subject: [PATCH 06/11] arm64: dts: meson: add GPIO line names to ODROID N2/N2+
|
||||
|
||||
Add GPIO line-name identifiers to the ODROID N2/N2+ common dtsi.
|
||||
|
||||
Signed-off-by: Hyeonki Hong <hhk7734@gmail.com>
|
||||
Signed-off-by: Christian Hewitt <christianshewitt@gmail.com>
|
||||
Reviewed-by: Neil Armstrong <narmstrong@baylibre.com>
|
||||
Signed-off-by: Kevin Hilman <khilman@baylibre.com>
|
||||
Link: https://lore.kernel.org/r/20210407042609.9736-4-christianshewitt@gmail.com
|
||||
---
|
||||
.../dts/amlogic/meson-g12b-odroid-n2.dtsi | 45 +++++++++++++++++++
|
||||
1 file changed, 45 insertions(+)
|
||||
|
||||
diff --git a/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi
|
||||
index 194a437b4e3f..fe85aa6da460 100644
|
||||
--- a/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi
|
||||
+++ b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi
|
||||
@@ -446,6 +446,51 @@ &frddr_c {
|
||||
};
|
||||
|
||||
&gpio {
|
||||
+ gpio-line-names =
|
||||
+ /* GPIOZ */
|
||||
+ "", "", "", "", "", "", "", "",
|
||||
+ "", "", "", "", "", "", "", "",
|
||||
+ /* GPIOH */
|
||||
+ "", "", "", "", "", "", "", "",
|
||||
+ "",
|
||||
+ /* BOOT */
|
||||
+ "", "", "", "", "", "", "", "",
|
||||
+ "", "", "", "", "", "", "", "",
|
||||
+ /* GPIOC */
|
||||
+ "", "", "", "", "", "", "", "",
|
||||
+ /* GPIOA */
|
||||
+ "PIN_44", /* GPIOA_0 */
|
||||
+ "PIN_46", /* GPIOA_1 */
|
||||
+ "PIN_45", /* GPIOA_2 */
|
||||
+ "PIN_47", /* GPIOA_3 */
|
||||
+ "PIN_26", /* GPIOA_4 */
|
||||
+ "", "", "", "", "", "",
|
||||
+ "PIN_42", /* GPIOA_11 */
|
||||
+ "PIN_32", /* GPIOA_12 */
|
||||
+ "PIN_7", /* GPIOA_13 */
|
||||
+ "PIN_27", /* GPIOA_14 */
|
||||
+ "PIN_28", /* GPIOA_15 */
|
||||
+ /* GPIOX */
|
||||
+ "PIN_16", /* GPIOX_0 */
|
||||
+ "PIN_18", /* GPIOX_1 */
|
||||
+ "PIN_22", /* GPIOX_2 */
|
||||
+ "PIN_11", /* GPIOX_3 */
|
||||
+ "PIN_13", /* GPIOX_4 */
|
||||
+ "PIN_33", /* GPIOX_5 */
|
||||
+ "PIN_35", /* GPIOX_6 */
|
||||
+ "PIN_15", /* GPIOX_7 */
|
||||
+ "PIN_19", /* GPIOX_8 */
|
||||
+ "PIN_21", /* GPIOX_9 */
|
||||
+ "PIN_24", /* GPIOX_10 */
|
||||
+ "PIN_23", /* GPIOX_11 */
|
||||
+ "PIN_8", /* GPIOX_12 */
|
||||
+ "PIN_10", /* GPIOX_13 */
|
||||
+ "PIN_29", /* GPIOX_14 */
|
||||
+ "PIN_31", /* GPIOX_15 */
|
||||
+ "PIN_12", /* GPIOX_16 */
|
||||
+ "PIN_3", /* GPIOX_17 */
|
||||
+ "PIN_5", /* GPIOX_18 */
|
||||
+ "PIN_36"; /* GPIOX_19 */
|
||||
/*
|
||||
* WARNING: The USB Hub on the Odroid-N2 needs a reset signal
|
||||
* to be turned high in order to be detected by the USB Controller
|
||||
--
|
||||
2.31.1
|
||||
|
@@ -1,42 +0,0 @@
|
||||
From 25cd545d370b67f5e5e19d93484d378571526da2 Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <25cd545d370b67f5e5e19d93484d378571526da2.1622055679.git.stefan@agner.ch>
|
||||
In-Reply-To: <0955f7e64f302c5c331b90fd07fc48dfb677eab5.1622055679.git.stefan@agner.ch>
|
||||
References: <0955f7e64f302c5c331b90fd07fc48dfb677eab5.1622055679.git.stefan@agner.ch>
|
||||
From: Stefan Agner <stefan@agner.ch>
|
||||
Date: Mon, 11 Jan 2021 11:20:48 +0100
|
||||
Subject: [PATCH 07/11] arm64: dts: meson: g12b: add power button support
|
||||
|
||||
Add power button support on J2 pin 11 (GPIOX_3 on the SoC side). The
|
||||
GPIO is low active, e.g. when connecting with pin 9 (GND) a power
|
||||
button press is triggered.
|
||||
|
||||
Signed-off-by: Stefan Agner <stefan@agner.ch>
|
||||
---
|
||||
arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi | 11 +++++++++++
|
||||
1 file changed, 11 insertions(+)
|
||||
|
||||
diff --git a/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi
|
||||
index fe85aa6da460..9b1541ee2273 100644
|
||||
--- a/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi
|
||||
+++ b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi
|
||||
@@ -39,6 +39,17 @@ emmc_pwrseq: emmc-pwrseq {
|
||||
reset-gpios = <&gpio BOOT_12 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
|
||||
+ gpio-keys-polled {
|
||||
+ compatible = "gpio-keys-polled";
|
||||
+ poll-interval = <100>;
|
||||
+
|
||||
+ power-button {
|
||||
+ label = "power";
|
||||
+ linux,code = <KEY_POWER>;
|
||||
+ gpios = <&gpio GPIOX_3 GPIO_ACTIVE_LOW>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
leds {
|
||||
compatible = "gpio-leds";
|
||||
|
||||
--
|
||||
2.31.1
|
||||
|
@@ -1,42 +0,0 @@
|
||||
From b94a0698f21a2d8f6623b69fc17fe9491bc22a9b Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <b94a0698f21a2d8f6623b69fc17fe9491bc22a9b.1622055679.git.stefan@agner.ch>
|
||||
In-Reply-To: <0955f7e64f302c5c331b90fd07fc48dfb677eab5.1622055679.git.stefan@agner.ch>
|
||||
References: <0955f7e64f302c5c331b90fd07fc48dfb677eab5.1622055679.git.stefan@agner.ch>
|
||||
From: Stefan Agner <stefan@agner.ch>
|
||||
Date: Mon, 11 Jan 2021 11:38:54 +0100
|
||||
Subject: [PATCH 08/11] arm64: dts: meson: g12b: add GPIO fan support
|
||||
|
||||
Add simple GPIO fan node to support a fan on GPIO J8. Unfortunately the
|
||||
pad used to control the fan does not support real PWM, hence the RPM
|
||||
cannot be modulated.
|
||||
|
||||
Signed-off-by: Stefan Agner <stefan@agner.ch>
|
||||
---
|
||||
arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi | 11 +++++++++++
|
||||
1 file changed, 11 insertions(+)
|
||||
|
||||
diff --git a/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi
|
||||
index 9b1541ee2273..8ad7c3ee1aa3 100644
|
||||
--- a/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi
|
||||
+++ b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi
|
||||
@@ -39,6 +39,17 @@ emmc_pwrseq: emmc-pwrseq {
|
||||
reset-gpios = <&gpio BOOT_12 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
|
||||
+ /*
|
||||
+ * 5V 80x80x10.8mm cooling fan from Hardkernel shop.
|
||||
+ */
|
||||
+ fan0: gpio-fan {
|
||||
+ #cooling-cells = <2>;
|
||||
+ compatible = "gpio-fan";
|
||||
+ gpio-fan,speed-map = <0 0 1600 1>;
|
||||
+ gpios = <&gpio_ao GPIOAO_10 GPIO_ACTIVE_HIGH>;
|
||||
+ status = "okay";
|
||||
+ };
|
||||
+
|
||||
gpio-keys-polled {
|
||||
compatible = "gpio-keys-polled";
|
||||
poll-interval = <100>;
|
||||
--
|
||||
2.31.1
|
||||
|
@@ -1,74 +0,0 @@
|
||||
From 4d9f93dbdc93e83ba8ddf01893b3c29cd11a87f9 Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <4d9f93dbdc93e83ba8ddf01893b3c29cd11a87f9.1622055679.git.stefan@agner.ch>
|
||||
In-Reply-To: <0955f7e64f302c5c331b90fd07fc48dfb677eab5.1622055679.git.stefan@agner.ch>
|
||||
References: <0955f7e64f302c5c331b90fd07fc48dfb677eab5.1622055679.git.stefan@agner.ch>
|
||||
From: Stefan Agner <stefan@agner.ch>
|
||||
Date: Mon, 11 Jan 2021 15:53:55 +0100
|
||||
Subject: [PATCH 09/11] arm64: dts: meson: g12b: odroid-n2: add fan as cooling
|
||||
device
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Add the GPIO fan as a cooling device for the CPU thermal zone. Since we
|
||||
have only full fan speed available with this, set the tripping point to
|
||||
65°C which is the highest tripping point which Hardkernel used in their
|
||||
downstream kernel.
|
||||
|
||||
Signed-off-by: Stefan Agner <stefan@agner.ch>
|
||||
---
|
||||
.../dts/amlogic/meson-g12b-odroid-n2.dtsi | 38 +++++++++++++++++++
|
||||
1 file changed, 38 insertions(+)
|
||||
|
||||
diff --git a/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi
|
||||
index 8ad7c3ee1aa3..c4052293ea0d 100644
|
||||
--- a/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi
|
||||
+++ b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi
|
||||
@@ -388,6 +388,44 @@ &clkc_audio {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
+&cpu_thermal {
|
||||
+ trips {
|
||||
+ cpu_warm: cpu_warm {
|
||||
+ hysteresis = <5000>;
|
||||
+ temperature = <65000>;
|
||||
+ type = "active";
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ cooling-maps {
|
||||
+ map0 {
|
||||
+ cooling-device =
|
||||
+ <&fan0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
|
||||
+ trip = <&cpu_warm>;
|
||||
+ };
|
||||
+ map1 {
|
||||
+ trip = <&cpu_passive>;
|
||||
+ cooling-device = <&cpu0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
|
||||
+ <&cpu1 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
|
||||
+ <&cpu100 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
|
||||
+ <&cpu101 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
|
||||
+ <&cpu102 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
|
||||
+ <&cpu103 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
|
||||
+ <&fan0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
|
||||
+ };
|
||||
+ map2 {
|
||||
+ trip = <&cpu_hot>;
|
||||
+ cooling-device = <&cpu0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
|
||||
+ <&cpu1 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
|
||||
+ <&cpu100 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
|
||||
+ <&cpu101 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
|
||||
+ <&cpu102 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
|
||||
+ <&cpu103 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
|
||||
+ <&fan0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
|
||||
+ };
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
&cpu0 {
|
||||
cpu-supply = <&vddcpu_b>;
|
||||
operating-points-v2 = <&cpu_opp_table_0>;
|
||||
--
|
||||
2.31.1
|
||||
|
@@ -1,44 +0,0 @@
|
||||
From 1eeec94aa6dd6f9900e6213025916eb85f6b3b62 Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <1eeec94aa6dd6f9900e6213025916eb85f6b3b62.1622055679.git.stefan@agner.ch>
|
||||
In-Reply-To: <0955f7e64f302c5c331b90fd07fc48dfb677eab5.1622055679.git.stefan@agner.ch>
|
||||
References: <0955f7e64f302c5c331b90fd07fc48dfb677eab5.1622055679.git.stefan@agner.ch>
|
||||
From: Hyeonki Hong <hhk7734@gmail.com>
|
||||
Date: Fri, 27 Mar 2020 17:05:22 +0900
|
||||
Subject: [PATCH 10/11] arm64: dts: meson: add uart_A node
|
||||
|
||||
The UART_A is available through J3 pin 8/10 and documented to be
|
||||
available as UART by default.
|
||||
|
||||
Signed-off-by: Stefan Agner <stefan@agner.ch>
|
||||
---
|
||||
arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi | 7 +++++++
|
||||
1 file changed, 7 insertions(+)
|
||||
|
||||
diff --git a/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi
|
||||
index c4052293ea0d..38a996ed3e19 100644
|
||||
--- a/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi
|
||||
+++ b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi
|
||||
@@ -12,6 +12,7 @@
|
||||
/ {
|
||||
aliases {
|
||||
serial0 = &uart_AO;
|
||||
+ serial1 = &uart_A;
|
||||
ethernet0 = ðmac;
|
||||
rtc0 = &rtc;
|
||||
rtc1 = &vrtc;
|
||||
@@ -728,6 +729,12 @@ &toddr_c {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
+&uart_A {
|
||||
+ status = "okay";
|
||||
+ pinctrl-0 = <&uart_a_pins>;
|
||||
+ pinctrl-names = "default";
|
||||
+};
|
||||
+
|
||||
&uart_AO {
|
||||
status = "okay";
|
||||
pinctrl-0 = <&uart_ao_a_pins>;
|
||||
--
|
||||
2.31.1
|
||||
|
@@ -1,37 +0,0 @@
|
||||
From 400fce2e1eaab6d04f542eaa0fe3b53fb9d79d82 Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <400fce2e1eaab6d04f542eaa0fe3b53fb9d79d82.1622055679.git.stefan@agner.ch>
|
||||
In-Reply-To: <0955f7e64f302c5c331b90fd07fc48dfb677eab5.1622055679.git.stefan@agner.ch>
|
||||
References: <0955f7e64f302c5c331b90fd07fc48dfb677eab5.1622055679.git.stefan@agner.ch>
|
||||
From: Stefan Agner <stefan@agner.ch>
|
||||
Date: Thu, 29 Apr 2021 21:32:43 +0200
|
||||
Subject: [PATCH 11/11] arm64: dts: meson: add i2c2 node to ODROID N2/N2+
|
||||
|
||||
The J2 connectors pinout documents "I2C.SDA0/SCL0" on pin 3 and 5, which
|
||||
are connected to GPIOX_17/18. This GPIO allow to mux I2C to the second
|
||||
I2C instance. Enable i2c2 and use the appropriate pinmux.
|
||||
|
||||
Signed-off-by: Stefan Agner <stefan@agner.ch>
|
||||
---
|
||||
arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi | 6 ++++++
|
||||
1 file changed, 6 insertions(+)
|
||||
|
||||
diff --git a/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi
|
||||
index 38a996ed3e19..45a8998c4a3a 100644
|
||||
--- a/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi
|
||||
+++ b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi
|
||||
@@ -586,6 +586,12 @@ &ir {
|
||||
linux,rc-map-name = "rc-odroid";
|
||||
};
|
||||
|
||||
+&i2c2 {
|
||||
+ status = "okay";
|
||||
+ pinctrl-0 = <&i2c2_sda_x_pins>, <&i2c2_sck_x_pins>;
|
||||
+ pinctrl-names = "default";
|
||||
+};
|
||||
+
|
||||
&i2c3 {
|
||||
status = "okay";
|
||||
pinctrl-0 = <&i2c3_sda_a_pins>, <&i2c3_sck_a_pins>;
|
||||
--
|
||||
2.31.1
|
||||
|
@@ -1,41 +0,0 @@
|
||||
From ca89096189299862a7b2b3123d96fc8bfbe74ce3 Mon Sep 17 00:00:00 2001
|
||||
From: Hyeonki Hong <hhk7734@gmail.com>
|
||||
Date: Tue, 14 Apr 2020 14:15:25 +0900
|
||||
Subject: [PATCH 13/74] ODROID-C4: arm64/dts: add uart_A node
|
||||
|
||||
Change-Id: Ib66a03da2fcf39fc459c20c9f98b1baca34dcf5b
|
||||
---
|
||||
arch/arm64/boot/dts/amlogic/meson-sm1-odroid-c4.dts | 9 ++++++++-
|
||||
1 file changed, 8 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/arch/arm64/boot/dts/amlogic/meson-sm1-odroid-c4.dts b/arch/arm64/boot/dts/amlogic/meson-sm1-odroid-c4.dts
|
||||
index 1b749bd340ce..e5d73598c131 100644
|
||||
--- a/arch/arm64/boot/dts/amlogic/meson-sm1-odroid-c4.dts
|
||||
+++ b/arch/arm64/boot/dts/amlogic/meson-sm1-odroid-c4.dts
|
||||
@@ -14,8 +14,9 @@ / {
|
||||
model = "Hardkernel ODROID-C4";
|
||||
|
||||
aliases {
|
||||
- serial0 = &uart_AO;
|
||||
ethernet0 = ðmac;
|
||||
+ serial0 = &uart_AO;
|
||||
+ serial1 = &uart_A;
|
||||
};
|
||||
|
||||
chosen {
|
||||
@@ -385,6 +386,12 @@ &sd_emmc_c {
|
||||
vqmmc-supply = <&flash_1v8>;
|
||||
};
|
||||
|
||||
+&uart_A {
|
||||
+ status = "okay";
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&uart_a_pins>;
|
||||
+};
|
||||
+
|
||||
&uart_AO {
|
||||
status = "okay";
|
||||
pinctrl-0 = <&uart_ao_a_pins>;
|
||||
--
|
||||
2.25.1
|
||||
|
@@ -1,85 +0,0 @@
|
||||
From 400645dd70ae5a0efbbce35067c8674d380ed2a7 Mon Sep 17 00:00:00 2001
|
||||
From: Hyeonki Hong <hhk7734@gmail.com>
|
||||
Date: Wed, 13 May 2020 10:37:28 +0900
|
||||
Subject: [PATCH 21/74] ODROID-C4: arm64/dts: add i2c2, i2c3 node
|
||||
|
||||
Change-Id: Id75f935111744ff6945791deefef20f897dc98ac
|
||||
(cherry picked from commit 3f4b2ffd0905946175c478baa65361695e78e0de)
|
||||
---
|
||||
.../boot/dts/amlogic/meson-sm1-odroid-c4.dts | 53 +++++++++++++++++++
|
||||
1 file changed, 53 insertions(+)
|
||||
|
||||
diff --git a/arch/arm64/boot/dts/amlogic/meson-sm1-odroid-c4.dts b/arch/arm64/boot/dts/amlogic/meson-sm1-odroid-c4.dts
|
||||
index 831053aa6dff..5988dc5f34d0 100644
|
||||
--- a/arch/arm64/boot/dts/amlogic/meson-sm1-odroid-c4.dts
|
||||
+++ b/arch/arm64/boot/dts/amlogic/meson-sm1-odroid-c4.dts
|
||||
@@ -16,6 +16,8 @@ / {
|
||||
|
||||
aliases {
|
||||
ethernet0 = ðmac;
|
||||
+ i2c0 = &i2c2;
|
||||
+ i2c1 = &i2c3;
|
||||
serial0 = &uart_AO;
|
||||
serial1 = &uart_A;
|
||||
spi0 = &spicc0;
|
||||
@@ -434,6 +436,57 @@ &ir {
|
||||
linux,rc-map-name = "rc-odroid";
|
||||
};
|
||||
|
||||
+&i2c2 {
|
||||
+ status = "okay";
|
||||
+
|
||||
+ /*
|
||||
+ * 40 Pin Header : SDA(GPIOX.17->3 Pin)
|
||||
+ * SCL(GPIOX.18->5 Pin)
|
||||
+ */
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&i2c2_master_pins1>;
|
||||
+
|
||||
+ /* default 400k */
|
||||
+ clock-frequency = <400000>;
|
||||
+};
|
||||
+
|
||||
+&i2c3 {
|
||||
+ /* default i2c clock-frequency is 100Khz */
|
||||
+ status = "okay";
|
||||
+
|
||||
+ /*
|
||||
+ * 40 Pin Header : SDA(GPIOA.14->27 Pin)
|
||||
+ * SCL(GPIOA.15->28 Pin)
|
||||
+ */
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&i2c3_master_pins2>;
|
||||
+
|
||||
+ /* default 100k */
|
||||
+ clock-frequency = <100000>;
|
||||
+};
|
||||
+
|
||||
+&periphs_pinctrl {
|
||||
+ i2c2_master_pins1: i2c2-master-pins1 {
|
||||
+ mux {
|
||||
+ groups = "i2c2_sda_x",
|
||||
+ "i2c2_sck_x";
|
||||
+ function = "i2c2";
|
||||
+ bias-pull-up;
|
||||
+ drive-strength-microamp = <3000>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ i2c3_master_pins2: i2c3-master-pins2 {
|
||||
+ mux {
|
||||
+ groups = "i2c3_sda_a",
|
||||
+ "i2c3_sck_a";
|
||||
+ function = "i2c3";
|
||||
+ bias-pull-up;
|
||||
+ drive-strength-microamp = <3000>;
|
||||
+ };
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
&pwm_AO_cd {
|
||||
pinctrl-0 = <&pwm_ao_d_e_pins>;
|
||||
pinctrl-names = "default";
|
||||
--
|
||||
2.25.1
|
||||
|
@@ -1,5 +1,5 @@
|
||||
From 8511fa06c13a9761e53ed72fe7111f5c3e3514a0 Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <8511fa06c13a9761e53ed72fe7111f5c3e3514a0.1617731946.git.stefan@agner.ch>
|
||||
From 5d2feca5947f84259bae41730ce54231578b37be Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <5d2feca5947f84259bae41730ce54231578b37be.1645627508.git.stefan@agner.ch>
|
||||
From: Neil Armstrong <narmstrong@baylibre.com>
|
||||
Date: Mon, 2 Sep 2019 15:42:04 +0200
|
||||
Subject: [PATCH] HACK: mmc: meson-gx: limit to 24MHz
|
||||
@@ -23,5 +23,5 @@ index fcf4f03d1e..6ded4b619b 100644
|
||||
cfg->name = dev->name;
|
||||
|
||||
--
|
||||
2.31.1
|
||||
2.35.1
|
||||
|
||||
|
@@ -1,38 +0,0 @@
|
||||
From e194459c7459a1c6f9d1183e05186d164f0c6715 Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <e194459c7459a1c6f9d1183e05186d164f0c6715.1617807077.git.stefan@agner.ch>
|
||||
In-Reply-To: <8511fa06c13a9761e53ed72fe7111f5c3e3514a0.1617807077.git.stefan@agner.ch>
|
||||
References: <8511fa06c13a9761e53ed72fe7111f5c3e3514a0.1617807077.git.stefan@agner.ch>
|
||||
From: Stefan Agner <stefan@agner.ch>
|
||||
Date: Thu, 1 Apr 2021 14:33:57 +0200
|
||||
Subject: [PATCH 2/2] arm64: dts: meson: odroidc2: readd PHY reset properties
|
||||
|
||||
The sync of the device tree and dt-bindings from Linux v5.6-rc2
|
||||
11a48a5a18c6 ("Linux 5.6-rc2") causes Ethernet to break on some
|
||||
ODROID-C2. The PHY seems to need proper reset timing to be functional
|
||||
in U-Boot and Linux afterwards. Readd the old PHY reset bindings for
|
||||
dwmac until we support the new bindings in the PHY node.
|
||||
|
||||
Fixes: dd5f2351e99a ("arm64: dts: meson: sync dt and bindings from v5.6-rc2")
|
||||
Signed-off-by: Stefan Agner <stefan@agner.ch>
|
||||
---
|
||||
arch/arm/dts/meson-gxbb-odroidc2.dts | 4 ++++
|
||||
1 file changed, 4 insertions(+)
|
||||
|
||||
diff --git a/arch/arm/dts/meson-gxbb-odroidc2.dts b/arch/arm/dts/meson-gxbb-odroidc2.dts
|
||||
index 70fcfb7b06..8b80bbc90b 100644
|
||||
--- a/arch/arm/dts/meson-gxbb-odroidc2.dts
|
||||
+++ b/arch/arm/dts/meson-gxbb-odroidc2.dts
|
||||
@@ -188,6 +188,10 @@
|
||||
phy-handle = <ð_phy0>;
|
||||
phy-mode = "rgmii";
|
||||
|
||||
+ snps,reset-gpio = <&gpio GPIOZ_14 0>;
|
||||
+ snps,reset-delays-us = <0 10000 1000000>;
|
||||
+ snps,reset-active-low;
|
||||
+
|
||||
amlogic,tx-delay-ns = <2>;
|
||||
|
||||
mdio {
|
||||
--
|
||||
2.31.1
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user