mirror of
https://github.com/home-assistant/operating-system.git
synced 2025-11-03 07:58:32 +00:00
Compare commits
240 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e648285fca | ||
|
|
3cf1b78d55 | ||
|
|
4dd3b8bc0d | ||
|
|
918c14fce0 | ||
|
|
d56344414b | ||
|
|
6b51d5a8ab | ||
|
|
5c2b6bd6e3 | ||
|
|
103ddb150b | ||
|
|
0e7310e8db | ||
|
|
b4d587e53b | ||
|
|
01923727d0 | ||
|
|
8cc42b3adb | ||
|
|
fe25d03b09 | ||
|
|
e0f435bae1 | ||
|
|
810de4efdb | ||
|
|
5f41501292 | ||
|
|
45d6d287e8 | ||
|
|
14ddf8800e | ||
|
|
33cc77eff0 | ||
|
|
1bdccc83d9 | ||
|
|
a0f63549f4 | ||
|
|
f679638a9c | ||
|
|
ac3017fc15 | ||
|
|
c98e1557bb | ||
|
|
4ffe277bcb | ||
|
|
e1c1f052dc | ||
|
|
6d5c41c682 | ||
|
|
9e78409db8 | ||
|
|
f649995a08 | ||
|
|
6bbf0b382c | ||
|
|
abfe9da03e | ||
|
|
81275e7189 | ||
|
|
9b81e50e19 | ||
|
|
17d0cdf823 | ||
|
|
8aceb287de | ||
|
|
e42835f163 | ||
|
|
1a8f9ca2e3 | ||
|
|
162084082e | ||
|
|
c2098e1cf4 | ||
|
|
22c668b500 | ||
|
|
6672046b6f | ||
|
|
78b456d05c | ||
|
|
2cc78abe56 | ||
|
|
46bb12844f | ||
|
|
1537d02408 | ||
|
|
a66591166f | ||
|
|
7443c45001 | ||
|
|
a4f5670cd8 | ||
|
|
c9c5f1b3e9 | ||
|
|
b4c9f2fce2 | ||
|
|
c48184cf91 | ||
|
|
681fe1421a | ||
|
|
acc293b662 | ||
|
|
3a67e2e8c4 | ||
|
|
8682d8af78 | ||
|
|
22a7f43875 | ||
|
|
b82707ff9a | ||
|
|
525dcfedfb | ||
|
|
fa88a04722 | ||
|
|
18cc261e35 | ||
|
|
bda9c3d715 | ||
|
|
4cbbeeb7dc | ||
|
|
beaad9ac9b | ||
|
|
bf1eaf44d5 | ||
|
|
c94f7933ef | ||
|
|
01475a8c45 | ||
|
|
9436661958 | ||
|
|
e88ae15272 | ||
|
|
1fa53bc3dc | ||
|
|
1a6dcbbf5b | ||
|
|
4be3dee0b4 | ||
|
|
5756969be9 | ||
|
|
8442d2ccfa | ||
|
|
300986f129 | ||
|
|
08cbbe8988 | ||
|
|
827c97f0ca | ||
|
|
3f5b28a0b4 | ||
|
|
7c25f7c187 | ||
|
|
52e21c9ccf | ||
|
|
8d448a130c | ||
|
|
39debca9fc | ||
|
|
29e92f4231 | ||
|
|
0797bccc36 | ||
|
|
e8c2bacae6 | ||
|
|
80f02b8ab6 | ||
|
|
a0871be6c0 | ||
|
|
25a0dd3082 | ||
|
|
50d304d7f3 | ||
|
|
021b2c0357 | ||
|
|
a48888a2df | ||
|
|
f922c14f15 | ||
|
|
92541b7280 | ||
|
|
f5ff224358 | ||
|
|
6bc6300149 | ||
|
|
fe9fc1cbd2 | ||
|
|
4f28a284be | ||
|
|
094208492e | ||
|
|
ce95fdccd3 | ||
|
|
2c335a4dd9 | ||
|
|
1a99d07cae | ||
|
|
58d4b79376 | ||
|
|
0b52271b3a | ||
|
|
503117d8bf | ||
|
|
c92b4b54be | ||
|
|
5e44dcc681 | ||
|
|
2d257bd671 | ||
|
|
8ed04ed73c | ||
|
|
737a6f18c3 | ||
|
|
ac942b8ed9 | ||
|
|
a8bad54efc | ||
|
|
481a79eb28 | ||
|
|
8cd7dfe822 | ||
|
|
2416c6c26c | ||
|
|
4eb0cd6460 | ||
|
|
e43747c2e9 | ||
|
|
5f8aeb1c6d | ||
|
|
c152fdeba0 | ||
|
|
dcfb296dcf | ||
|
|
fdcb94f0d8 | ||
|
|
5f0a8fe627 | ||
|
|
0495ba25ad | ||
|
|
fa242e32d7 | ||
|
|
fc3b098170 | ||
|
|
2b0fff31a3 | ||
|
|
dade3adf80 | ||
|
|
b4fad03613 | ||
|
|
59b8636bc8 | ||
|
|
3337cd0f79 | ||
|
|
0c7cd8023e | ||
|
|
5583a16219 | ||
|
|
502ef82b80 | ||
|
|
1708ed11b4 | ||
|
|
59b9d82a55 | ||
|
|
39babd5368 | ||
|
|
2595dd815b | ||
|
|
d1577a6a65 | ||
|
|
f219f239d8 | ||
|
|
ebc93692f5 | ||
|
|
3af31c2265 | ||
|
|
639cd41ccf | ||
|
|
f4f6908c80 | ||
|
|
31fc13cf03 | ||
|
|
ec1561661b | ||
|
|
9b3e5357c5 | ||
|
|
272430a58c | ||
|
|
1537e14dfc | ||
|
|
d204cbda7f | ||
|
|
22f7777099 | ||
|
|
813030bb4c | ||
|
|
31bb38ffd4 | ||
|
|
b6cfe04422 | ||
|
|
0ae67991d1 | ||
|
|
f892334077 | ||
|
|
2e2f6e893b | ||
|
|
a2a4cf8668 | ||
|
|
b8cf3face0 | ||
|
|
1c991c229d | ||
|
|
a3c5e670ef | ||
|
|
ffc75a5053 | ||
|
|
4d6246be4d | ||
|
|
c6a1e668f4 | ||
|
|
b19f83d74d | ||
|
|
7b14ed775b | ||
|
|
a877e0c3dd | ||
|
|
265cb08e79 | ||
|
|
1be8e44cde | ||
|
|
c473aca701 | ||
|
|
f93f8e34b3 | ||
|
|
fa53c7bc99 | ||
|
|
1f4bd67f7e | ||
|
|
0c427d0dee | ||
|
|
701e4f78aa | ||
|
|
cd5cb880ea | ||
|
|
cf033ec49d | ||
|
|
0ec506470a | ||
|
|
606da02461 | ||
|
|
e49f8fe630 | ||
|
|
02836524ce | ||
|
|
50176a0e3b | ||
|
|
06e7ee7efb | ||
|
|
e08bbd7047 | ||
|
|
653bcbe3ae | ||
|
|
3700516097 | ||
|
|
3fe09a4e6a | ||
|
|
3329912511 | ||
|
|
2b8dc1c913 | ||
|
|
9f7a846d6b | ||
|
|
466225806e | ||
|
|
8e42ad5536 | ||
|
|
39e78a1014 | ||
|
|
cc4a6ebf96 | ||
|
|
4a3837374f | ||
|
|
f70067c570 | ||
|
|
24b6463fbb | ||
|
|
78152db78f | ||
|
|
985f3b8e3d | ||
|
|
245dc7603f | ||
|
|
53bbc43ff3 | ||
|
|
ad6ac0a770 | ||
|
|
de67752a46 | ||
|
|
a5eb7ffc8e | ||
|
|
b09e5b5688 | ||
|
|
a4c65b3fd1 | ||
|
|
ec6f7978b5 | ||
|
|
c9033551f2 | ||
|
|
375e688938 | ||
|
|
9d6b3a1d0b | ||
|
|
43e4bc81d3 | ||
|
|
4bcba322ff | ||
|
|
0991cc1c25 | ||
|
|
83cbc37422 | ||
|
|
0909462d51 | ||
|
|
27fc2de146 | ||
|
|
be7228c7e6 | ||
|
|
e51b1bd9eb | ||
|
|
2706b4d866 | ||
|
|
83af2731a8 | ||
|
|
f66fbda032 | ||
|
|
d215e81fb1 | ||
|
|
afe39c279b | ||
|
|
ee13d1fb45 | ||
|
|
917f022614 | ||
|
|
fc68bce7d9 | ||
|
|
0363ddab37 | ||
|
|
f18345a6c4 | ||
|
|
8b13cfd902 | ||
|
|
16313059d9 | ||
|
|
deb072cb76 | ||
|
|
b206787520 | ||
|
|
0db61e85b0 | ||
|
|
c3fba76142 | ||
|
|
7fc9c7d03b | ||
|
|
70c41b5690 | ||
|
|
68522d2062 | ||
|
|
3c469e6f27 | ||
|
|
bbbaff117a | ||
|
|
6c58a94a4d | ||
|
|
2b89de39e3 | ||
|
|
1ca4275698 | ||
|
|
647a461a74 |
40
.github/ISSUE_TEMPLATE.md
vendored
40
.github/ISSUE_TEMPLATE.md
vendored
@@ -1,32 +1,54 @@
|
||||
<!-- 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/home-assistant/releases
|
||||
- Do not report issues for components here, plaese refer to https://github.com/home-assistant/home-assistant/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 into the backticks. Do not delete any text from this template!
|
||||
- If you have a problem with a Add-on, make a issue on there repository.
|
||||
- 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.
|
||||
-->
|
||||
|
||||
**HassOS release with the issue:**
|
||||
**Hardware Environment**
|
||||
<!--
|
||||
- Frontend -> Developer tools -> Info
|
||||
- Or use this command: hass --version
|
||||
Describe the Homme Assistant image you are using and the hardare environemnt
|
||||
-->
|
||||
- [ ] Raspberry Pi [1/2/3/4]
|
||||
- [ ] ODROID [C2/C4/N2(+)/XU4]
|
||||
- [ ] ASUS Tinker [S]
|
||||
- [ ] Intel NUC (or compatible)
|
||||
- [ ] OVA (Open Virtualization Applicance, 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:**
|
||||
<!--
|
||||
- Frontend -> Hass.io -> System
|
||||
- Home Assistant Frontend -> Supervisor -> System (Log Provider Supervisor)
|
||||
- Or use this command: ha su logs
|
||||
-->
|
||||
|
||||
**Journal logs:**
|
||||
<!--
|
||||
- use this command: journalctl
|
||||
- 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 harware issues? (different SD card etc.)
|
||||
-->
|
||||
|
||||
10
.github/release-drafter.yml
vendored
10
.github/release-drafter.yml
vendored
@@ -1,16 +1,18 @@
|
||||
categories:
|
||||
- title: 'HassOS Core'
|
||||
- title: 'Home Assistant Operating System'
|
||||
label: 'os'
|
||||
- title: 'Build'
|
||||
- title: 'Build System'
|
||||
label: 'build'
|
||||
- title: 'Raspberry Pi'
|
||||
label: 'board/raspberrypi'
|
||||
- title: 'Open Virtual Appliance'
|
||||
label: 'board/ova'
|
||||
- title: 'Intel-Nuc'
|
||||
- title: 'Intel NUC'
|
||||
label: 'board/intel-nuc'
|
||||
- title: 'Hardkernel'
|
||||
- title: 'Hardkernel ODROID'
|
||||
label: 'board/hardkernel'
|
||||
- title: 'ASUS Tinker'
|
||||
label: 'board/tinker'
|
||||
template: |
|
||||
## Changes
|
||||
|
||||
|
||||
89
.github/workflows/dev.yml
vendored
Normal file
89
.github/workflows/dev.yml
vendored
Normal file
@@ -0,0 +1,89 @@
|
||||
# Home Assistant Operating System build workflow
|
||||
|
||||
name: Development build
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
version:
|
||||
|
||||
name: Generate version
|
||||
runs-on: [ "ubuntu-20.04" ]
|
||||
outputs:
|
||||
version_main: ${{ steps.version_main.outputs.version_main }}
|
||||
version_dev: ${{ steps.version_dev.outputs.version_dev }}
|
||||
steps:
|
||||
- name: Generate Development build version
|
||||
shell: bash
|
||||
id: version_dev
|
||||
run: |
|
||||
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: 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}"
|
||||
|
||||
build:
|
||||
name: Release build for ${{ matrix.board.name }}
|
||||
needs: version
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
board:
|
||||
- {"name": "ova", "output": "ova", "runner": "x86-64-runner"}
|
||||
- {"name": "intel_nuc", "output": "intel-nuc", "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"}
|
||||
runs-on: ${{ matrix.board.runner }}
|
||||
|
||||
steps:
|
||||
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- name: Build container
|
||||
run: docker build -t haos-builder .
|
||||
|
||||
- name: 'Add release PKI certs'
|
||||
env:
|
||||
RAUC_CERTIFICATE: ${{ secrets.RAUC_CERTIFICATE }}
|
||||
RAUC_PRIVATE_KEY: ${{ secrets.RAUC_PRIVATE_KEY }}
|
||||
run: |
|
||||
echo -e "-----BEGIN CERTIFICATE-----\n${RAUC_CERTIFICATE}\n-----END CERTIFICATE-----" > cert.pem
|
||||
echo -e "-----BEGIN PRIVATE KEY-----\n${RAUC_PRIVATE_KEY}\n-----END PRIVATE KEY-----" > key.pem
|
||||
|
||||
- name: Build
|
||||
run: |
|
||||
BUILDER_UID="$(id -u)"
|
||||
BUILDER_GID="$(id -g)"
|
||||
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 VERSION_DEV=${{ needs.version.outputs.version_dev }} ${{ matrix.board.name }}
|
||||
|
||||
- name: Upload images
|
||||
uses: appleboy/scp-action@master
|
||||
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
|
||||
|
||||
20
.github/workflows/pr-checks.yml
vendored
Normal file
20
.github/workflows/pr-checks.yml
vendored
Normal file
@@ -0,0 +1,20 @@
|
||||
# Home Assistant Operating System pull-request checks
|
||||
|
||||
name: PR checks
|
||||
|
||||
on: [pull_request]
|
||||
|
||||
jobs:
|
||||
linters:
|
||||
runs-on: ubuntu-20.04
|
||||
steps:
|
||||
- name: Check out code
|
||||
uses: actions/checkout@v1
|
||||
- name: Check Dockerfile
|
||||
uses: brpaz/hadolint-action@v1.1.0
|
||||
with:
|
||||
dockerfile: Dockerfile
|
||||
- name: Check shell scripts
|
||||
uses: ludeeus/action-shellcheck@1.0.0
|
||||
with:
|
||||
ignore: "buildroot"
|
||||
15
.github/workflows/release-drafter.yml
vendored
Normal file
15
.github/workflows/release-drafter.yml
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
name: Release Drafter
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- dev
|
||||
- rel-4
|
||||
|
||||
jobs:
|
||||
update_release_draft:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: release-drafter/release-drafter@v5
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
169
.github/workflows/release.yml
vendored
Normal file
169
.github/workflows/release.yml
vendored
Normal file
@@ -0,0 +1,169 @@
|
||||
# Home Assistant Operating System release build workflow
|
||||
|
||||
name: Release build
|
||||
|
||||
on:
|
||||
release:
|
||||
types: [published]
|
||||
|
||||
jobs:
|
||||
validate_release:
|
||||
name: Validate release
|
||||
runs-on: [ "ubuntu-20.04" ]
|
||||
outputs:
|
||||
version: ${{ steps.version_check.outputs.version }}
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Validate version
|
||||
id: version_check
|
||||
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)
|
||||
if [ "${major}.${build}" != "${{ github.event.release.tag_name }}" ]; then
|
||||
echo "Version number in Buildroot metadata is does not match tag (${major}.${build} vs ${{ github.event.release.tag_name }})."
|
||||
exit 1
|
||||
fi
|
||||
echo "::set-output name=version::${major}.${build}"
|
||||
|
||||
build:
|
||||
name: Release build for ${{ matrix.board.name }}
|
||||
needs: validate_release
|
||||
strategy:
|
||||
matrix:
|
||||
board:
|
||||
- {"name": "ova", "output": "ova", "runner": "x86-64-runner"}
|
||||
- {"name": "intel_nuc", "output": "intel-nuc", "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"}
|
||||
runs-on: ${{ matrix.board.runner }}
|
||||
|
||||
steps:
|
||||
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- name: Build container
|
||||
run: docker build -t haos-builder .
|
||||
|
||||
- name: 'Add release PKI certs'
|
||||
env:
|
||||
RAUC_CERTIFICATE: ${{ secrets.RAUC_CERTIFICATE }}
|
||||
RAUC_PRIVATE_KEY: ${{ secrets.RAUC_PRIVATE_KEY }}
|
||||
run: |
|
||||
echo -e "-----BEGIN CERTIFICATE-----\n${RAUC_CERTIFICATE}\n-----END CERTIFICATE-----" > cert.pem
|
||||
echo -e "-----BEGIN PRIVATE KEY-----\n${RAUC_PRIVATE_KEY}\n-----END PRIVATE KEY-----" > key.pem
|
||||
|
||||
- name: Build
|
||||
run: |
|
||||
BUILDER_UID="$(id -u)"
|
||||
BUILDER_GID="$(id -g)"
|
||||
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 VERSION_DEV="" ${{ matrix.board.name }}
|
||||
|
||||
- name: Upload disk image
|
||||
if: ${{ matrix.board.name != '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/hassos_${{ matrix.board.output }}-${{ needs.validate_release.outputs.version }}.img.xz
|
||||
asset_name: hassos_${{ matrix.board.output }}-${{ needs.validate_release.outputs.version }}.img.xz
|
||||
asset_content_type: application/x-xz
|
||||
|
||||
- name: Upload rauc update
|
||||
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/hassos_${{ matrix.board.output }}-${{ needs.validate_release.outputs.version }}.raucb
|
||||
asset_name: hassos_${{ matrix.board.output }}-${{ needs.validate_release.outputs.version }}.raucb
|
||||
asset_content_type: application/octet-stream
|
||||
|
||||
- name: Upload ova image
|
||||
if: ${{ matrix.board.name == '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/hassos_${{ matrix.board.output }}-${{ needs.validate_release.outputs.version }}.ova
|
||||
asset_name: hassos_${{ matrix.board.output }}-${{ needs.validate_release.outputs.version }}.ova
|
||||
asset_content_type: application/x-tar
|
||||
|
||||
- name: Upload qcow2 image
|
||||
if: ${{ matrix.board.name == '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/hassos_${{ matrix.board.output }}-${{ needs.validate_release.outputs.version }}.qcow2.xz
|
||||
asset_name: hassos_${{ matrix.board.output }}-${{ needs.validate_release.outputs.version }}.qcow2.xz
|
||||
asset_content_type: application/x-xz
|
||||
|
||||
- name: Upload vdi image
|
||||
if: ${{ matrix.board.name == '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/hassos_${{ matrix.board.output }}-${{ needs.validate_release.outputs.version }}.vdi.xz
|
||||
asset_name: hassos_${{ matrix.board.output }}-${{ needs.validate_release.outputs.version }}.vdi.xz
|
||||
asset_content_type: application/x-xz
|
||||
|
||||
- name: Upload vhdx image
|
||||
if: ${{ matrix.board.name == '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/hassos_${{ matrix.board.output }}-${{ needs.validate_release.outputs.version }}.vhdx.xz
|
||||
asset_name: hassos_${{ matrix.board.output }}-${{ needs.validate_release.outputs.version }}.vhdx.xz
|
||||
asset_content_type: application/x-xz
|
||||
|
||||
- name: Upload vmdk image
|
||||
if: ${{ matrix.board.name == '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/hassos_${{ matrix.board.output }}-${{ needs.validate_release.outputs.version }}.vmdk.xz
|
||||
asset_name: hassos_${{ matrix.board.output }}-${{ needs.validate_release.outputs.version }}.vmdk.xz
|
||||
asset_content_type: application/x-xz
|
||||
|
||||
bump_version:
|
||||
name: Bump dev version to ${{ needs.validate_release.outputs.version }}
|
||||
needs: [ build, validate_release ]
|
||||
runs-on: [ "ubuntu-20.04" ]
|
||||
|
||||
steps:
|
||||
- name: Initialize git
|
||||
uses: home-assistant/actions/helpers/git-init@master
|
||||
with:
|
||||
name: ${{ secrets.GIT_NAME }}
|
||||
email: ${{ secrets.GIT_EMAIL }}
|
||||
token: ${{ secrets.GIT_TOKEN }}
|
||||
|
||||
- name: Bump Home Assistant OS dev version
|
||||
uses: home-assistant/actions/helpers/version-push@master
|
||||
with:
|
||||
key: "hassos[]"
|
||||
key-description: "Home Assistant OS"
|
||||
version: ${{ needs.validate_release.outputs.version }}
|
||||
channel: "dev"
|
||||
1
.gitignore
vendored
1
.gitignore
vendored
@@ -1,2 +1,3 @@
|
||||
.DS_Store
|
||||
/release
|
||||
*.pem
|
||||
|
||||
@@ -38,6 +38,8 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||
unzip \
|
||||
wget \
|
||||
qemu-utils \
|
||||
openssh-client \
|
||||
vim \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Init entry
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
## Contents
|
||||
|
||||
- [Getting started](./getting_started_development.md) - the place for developers to begin
|
||||
- [Development](./getting_started_development.md) - more deatils for developers
|
||||
- [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
|
||||
|
||||
@@ -14,6 +14,7 @@ The following boards/devices are supported:
|
||||
- Pi (not recommended)
|
||||
- Hardkernel
|
||||
- Odroid-C2
|
||||
- Odroid-C4 (_experimental_)
|
||||
- Odroid-N2
|
||||
- Odroid-XU4
|
||||
- Intel NUC
|
||||
@@ -46,6 +47,7 @@ Notes:
|
||||
|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/)|
|
||||
|NUC |`make intel_nuc` |[intel_nuc](../../buildroot-external/configs/intel_nuc_defconfig)|[intel](./intel/)|
|
||||
|
||||
@@ -5,16 +5,26 @@
|
||||
| Device | Release Date | Support | Config |
|
||||
|----------------|---------------|---------|----------|
|
||||
| Tinker RK3288 | April 2017 | yes | [tinker](../../../buildroot-external/configs/tinker_defconfig) |
|
||||
| Tinker S RK3288| January 2018 | yes? | [tinker](../../../buildroot-external/configs/tinker_defconfig)? |
|
||||
| Tinker S RK3288| January 2018 | yes | [tinker](../../../buildroot-external/configs/tinker_defconfig) |
|
||||
| Tinker Edge T | November 2019 | no? | |
|
||||
| Tinker Edge R | November 2019 | no? | |
|
||||
|
||||
(? is the Tinker S supported?)
|
||||
<!--
|
||||
## eMMC
|
||||
|
||||
eMMC support is provided transparently. Just flash the image to the eMMC by connecting your Tinker Board S to your PC via Micro-USB.
|
||||
-->
|
||||
eMMC support is provided with the same image. Just flash the image to the eMMC by connecting your Tinker Board S to your PC via Micro-USB. Refer to the Tinkerboard documentation how-to flash using Micro-USB and UMS.
|
||||
|
||||
The Home Assistant OS provided U-Boot does support UMS as well,
|
||||
however manual intervention is necessary:
|
||||
|
||||
1. Set the jumper between Micro-USB and HDMI the maskrom mode
|
||||
2. Insert SD card and connect the board via Micro-USB to your PC
|
||||
3. Continusly press Ctrl+C to interrupt boot
|
||||
4. Set the jumper back to the park position
|
||||
5. Start UMS using:
|
||||
```
|
||||
ums 0 mmc 0
|
||||
```
|
||||
6. A mass storage device should appear. Flash Home Assistant OS to it.
|
||||
|
||||
## Serial console
|
||||
|
||||
|
||||
@@ -2,10 +2,11 @@
|
||||
|
||||
## Supported Hardware
|
||||
|
||||
| Device | Release Date | Support | Config |
|
||||
|----------------|---------------|---------|-----------|
|
||||
| ODROID-XU4 | 2015 | yes | [odroid_xu4](../../../buildroot-external/configs/odroid_xu4_defconfig)|
|
||||
| ODROID-C2 | 2016 | yes | [odroid_c2](../../../buildroot-external/configs/odroid_c2_defconfig) |
|
||||
| ODROID-N2 | 2019 | yes | [odroid_n2](../../../buildroot-external/configs/odroid_n2_defconfig) |
|
||||
| Device | Release Date | Support | Config |
|
||||
|----------------|---------------|--------------|-----------|
|
||||
| ODROID-XU4 | 2015 | yes | [odroid_xu4](../../../buildroot-external/configs/odroid_xu4_defconfig)|
|
||||
| ODROID-C2 | 2016 | yes | [odroid_c2](../../../buildroot-external/configs/odroid_c2_defconfig) |
|
||||
| ODROID-C4 | 2020 | experimental | [odroid_c4](../../../buildroot-external/configs/odroid_c4_defconfig) |
|
||||
| ODROID-N2 | 2019 | yes | [odroid_n2](../../../buildroot-external/configs/odroid_n2_defconfig) |
|
||||
|
||||
See separate documentation for each board.
|
||||
|
||||
16
Documentation/boards/hardkernel/odroid-c4.md
Normal file
16
Documentation/boards/hardkernel/odroid-c4.md
Normal file
@@ -0,0 +1,16 @@
|
||||
# Odroid-C4
|
||||
|
||||
## Experimental
|
||||
|
||||
Odroid-C4 support is based heavily on the Odroid-C2 and N2 configurations. Given the similarity of the SoCs, as well as the comparable level of support in the Linux kernel, the C4 should hopefully present few surprises. However, Home Assistant support should be regarded as experimental.
|
||||
|
||||
Please also refer to the documentation pages for the [Odroid-C2](./odroid-c2.md) and [Odroid-N2](./odroid-n2.md), as some of that information may apply to the C4 as well.
|
||||
|
||||
Common C4 issues that have been specifically tested and appear to be working:
|
||||
- boot from SD
|
||||
- boot from eMMC
|
||||
- MAC address obtained from eFuse
|
||||
|
||||
## GPIO
|
||||
|
||||
Refer to [the odroid wiki](https://wiki.odroid.com/odroid-c4/hardware/expansion_connectors).
|
||||
@@ -33,8 +33,13 @@ i2c-bcm2708
|
||||
|
||||
## USB Boot
|
||||
|
||||
USB mass storage boot is available on Raspberry Pi 3B, 3B+, 3A+, and 2B v1.2.
|
||||
To enable USB boot, add `program_usb_boot_mode=1` into `config.txt`. Note that this **permanently** alters the one-time programmable memory of the device.
|
||||
USB mass storage boot is available on Raspberry Pi 4 (64-bit only), 3B, 3B+, 3A+, and 2B v1.2.
|
||||
|
||||
For Raspberry 3B, 3A+ and 2B v1.2, to enable USB boot, add `program_usb_boot_mode=1` into `config.txt`. Note that this **permanently** alters the one-time programmable memory of the device.
|
||||
|
||||
For Raspberry 4, make sure to update the bootloader to a stable release
|
||||
supporting USB mass storage boot (see
|
||||
[bcm2711_bootloader_config.md](https://www.raspberrypi.org/documentation/hardware/raspberrypi/bcm2711_bootloader_config.md#usbmassstorageboot). If no SD card is used add `sd_poll_once=on` to `dtparam` in `config.txt` (comma separated). This gets rid of `mmc0: timeout waiting for hardware interrupt` kernel errors.
|
||||
|
||||
For more information see [RaspberryPi](https://www.raspberrypi.org/documentation/hardware/raspberrypi/bootmodes/msd.md).
|
||||
|
||||
@@ -48,4 +53,4 @@ For more information see [RaspberryPi](https://www.raspberrypi.org/documentation
|
||||
|
||||
If you don't need bluetooth, disabled it with add `dtoverlay=pi3-disable-bt` into `config.txt`.
|
||||
|
||||
[config]: ../configuration.md#automatic
|
||||
[config]: ../../configuration.md#automatic
|
||||
|
||||
@@ -59,4 +59,4 @@ FallbackNTP=0.pool.ntp.org 1.pool.ntp.org 2.pool.ntp.org 3.pool.ntp.org
|
||||
[systemd-modules]: https://www.freedesktop.org/software/systemd/man/modules-load.d.html
|
||||
[network.md]: network.md
|
||||
[hassos-release]: https://github.com/home-assistant/hassos/releases/
|
||||
[debug-homeassistant]: https://developers.home-assistant.io/docs/en/hassio_debugging.html
|
||||
[debug-homeassistant]: https://developers.home-assistant.io/docs/operating-system/debugging
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
|
||||
We provide 3 different types of release builds:
|
||||
|
||||
- development (beta/dev)
|
||||
- staging (rc)
|
||||
- development (dev)
|
||||
- staging (beta)
|
||||
- production (stable)
|
||||
|
||||
## Versioning
|
||||
@@ -15,7 +15,7 @@ The development number they will be bump for the stable release version and the
|
||||
|
||||
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 release, we create a new branch `rel-{MAJOR}`. They will be used for the whole cycle of this 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
|
||||
|
||||
|
||||
@@ -36,6 +36,7 @@ Default 2. That is the size of end image in GB.
|
||||
|
||||
- intel-nuc
|
||||
- odroid-c2
|
||||
- odroid-c4
|
||||
- odroid-n2
|
||||
- odroid-xu
|
||||
- qemuarm
|
||||
|
||||
@@ -5,14 +5,15 @@ Default Kernel tree: 5.4
|
||||
|
||||
| Board | Version |
|
||||
|-------|---------|
|
||||
| Open Virtual Appliance | 5.4.63 |
|
||||
| Raspberry Pi | 4.19.127 |
|
||||
| Raspberry Pi 0-W | 4.19.127 |
|
||||
| Raspberry Pi 2 | 4.19.127 |
|
||||
| Raspberry Pi 3 | 4.19.127 |
|
||||
| Raspberry Pi 4 | 4.19.127 |
|
||||
| Tinker Board | 5.4.63 |
|
||||
| Odroid-C2 | 5.7.19 |
|
||||
| Odroid-N2 | 5.7.19 |
|
||||
| Odroid-XU4 | 5.7.19 |
|
||||
| Intel NUC | 5.4.63 |
|
||||
| Open Virtual Appliance | 5.4.86 |
|
||||
| Raspberry Pi | 5.4.79 |
|
||||
| Raspberry Pi 0-W | 5.4.79 |
|
||||
| Raspberry Pi 2 | 5.4.79 |
|
||||
| Raspberry Pi 3 | 5.4.79 |
|
||||
| Raspberry Pi 4 | 5.4.79 |
|
||||
| Tinker Board | 5.4.86 |
|
||||
| Odroid-C2 | 5.9.16 |
|
||||
| Odroid-C4 | 5.9.16 |
|
||||
| Odroid-N2 | 5.9.16 |
|
||||
| Odroid-XU4 | 5.9.16 |
|
||||
| Intel NUC | 5.4.86 |
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# Network
|
||||
|
||||
HassOS uses NetworkManager to control the host network.
|
||||
Home Assistant Operating System uses NetworkManager to control the host network.
|
||||
|
||||
## Configure network
|
||||
|
||||
@@ -10,6 +10,8 @@ Only a manual configuration using NetworkManager connection files is supported.
|
||||
|
||||
You can read the [NetworkManager manual][nm-manual] or find many configuration examples across the internet. Keep in mind that the system is read-only. If you don't want the IP address to change on every boot, you should modify the UUID property to a generic [UUID4][uuid]. Inside the `\CONFIG\network\` directory on the USB drive or SD card, create a file called `my-network` and add the appropriate contents below:
|
||||
|
||||
**NOTE: Please make sure to save this file with UNIX line endings (LF, and not Windows' default CRLF endings). You can do this using Notepad these days!**
|
||||
|
||||
### Default
|
||||
|
||||
A preinstalled connection profile is provided by default:
|
||||
@@ -148,6 +150,6 @@ If you now view the default connection `cat /etc/NetworkManager/system-connectio
|
||||
|
||||
Doing a `nmcli con reload` does not always work, so restart the virtual machine or the physical system.
|
||||
|
||||
[nm-manual]: https://developer.gnome.org/NetworkManager/stable/nm-settings.html
|
||||
[nm-manual]: https://developer.gnome.org/NetworkManager/stable/NetworkManager.conf.html
|
||||
[configuration-usb]: configuration.md
|
||||
[uuid]: https://www.uuidgenerator.net/
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
# Partition
|
||||
|
||||
The partition layout is a bit different than for regular setups. We prefer GPT, if possible. With SoCs which don't support GPT, we use the hybrid GPT. For more details about this topic, please refer to the [development](development.mnd) documentation.
|
||||
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 less as possible write operations on the storage media. Which means that we have basically only write during the OTA update and 5-6 times per week on the overlay part. The data partition is having I/O. This is the reason which is should be run on a different drive.
|
||||
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:
|
||||
|
||||
@@ -36,12 +36,28 @@ Sometime the bootloader part can look different because there can be firmware or
|
||||
|
||||
## Data
|
||||
|
||||
The data partition is the only partition with real I/O. It will be expanded automatic on boot time to the full size of the 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.
|
||||
|
||||
This partition can be offloaded to a different drive with the utility:
|
||||
|
||||
## 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/xxx
|
||||
$ datactl move /dev/sdx
|
||||
```
|
||||
|
||||
On next boot, the partition will be moved to the new drive. The drive needs to be bigger as the old one and we own the full new drive.
|
||||
Enter "yes" to confirm the operation. This will prepare the disk, however, the
|
||||
actual move will be running on next reboot. Once complete, the external drive
|
||||
will contain the data and will need to be plugged in to successfully boot Home
|
||||
Assistant OS.
|
||||
|
||||
13
Makefile
13
Makefile
@@ -3,10 +3,19 @@ RELEASE_DIR = /build/release
|
||||
BUILDROOT=/build/buildroot
|
||||
BUILDROOT_EXTERNAL=/build/buildroot-external
|
||||
DEFCONFIG_DIR = $(BUILDROOT_EXTERNAL)/configs
|
||||
VERSION_DATE := $(shell date --utc +'%Y%m%d')
|
||||
VERSION_DEV := "dev$(VERSION_DATE)"
|
||||
|
||||
TARGETS := $(notdir $(patsubst %_defconfig,%,$(wildcard $(DEFCONFIG_DIR)/*_defconfig)))
|
||||
TARGETS_CONFIG := $(notdir $(patsubst %_defconfig,%-config,$(wildcard $(DEFCONFIG_DIR)/*_defconfig)))
|
||||
|
||||
# Set O variable if not already done on the command line
|
||||
ifneq ("$(origin O)", "command line")
|
||||
O := $(BUILDROOT)/output
|
||||
else
|
||||
override O := $(BUILDROOT)/$(O)
|
||||
endif
|
||||
|
||||
.NOTPARALLEL: $(TARGETS) $(TARGETS_CONFIG) all
|
||||
|
||||
.PHONY: $(TARGETS) $(TARGETS_CONFIG) all clean help
|
||||
@@ -22,8 +31,8 @@ $(TARGETS_CONFIG): %-config:
|
||||
|
||||
$(TARGETS): %: $(RELEASE_DIR) %-config
|
||||
@echo "build $@"
|
||||
$(MAKE) -C $(BUILDROOT) BR2_EXTERNAL=$(BUILDROOT_EXTERNAL)
|
||||
cp -f $(BUILDROOT)/output/images/hassos_* $(RELEASE_DIR)/
|
||||
$(MAKE) -C $(BUILDROOT) BR2_EXTERNAL=$(BUILDROOT_EXTERNAL) VERSION_DEV=$(VERSION_DEV)
|
||||
cp -f $(O)/images/hassos_* $(RELEASE_DIR)/
|
||||
|
||||
# Do not clean when building for one target
|
||||
ifneq ($(words $(filter $(TARGETS),$(MAKECMDGOALS))), 1)
|
||||
|
||||
10
README.md
10
README.md
@@ -20,7 +20,7 @@ Home Assistant Operating System uses Docker as Container engine. It by default d
|
||||
- Asus Tinker Board
|
||||
- Virtual appliances
|
||||
|
||||
See full list and specific models [here](./Documentation/boards/README.md)
|
||||
See the full list and specific models [here](./Documentation/boards/README.md)
|
||||
|
||||
## Getting Started
|
||||
|
||||
@@ -45,8 +45,14 @@ 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 of embedded systems or a strong understanding of the internal workings of operating systems.
|
||||
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
|
||||
which creates Home Assistant OS development builds. The development builds are
|
||||
available at [os-builds.home-assistant.io](https://os-builds.home-assistant.io/).
|
||||
|
||||
@@ -1,53 +0,0 @@
|
||||
# https://dev.azure.com/home-assistant
|
||||
|
||||
trigger:
|
||||
batch: true
|
||||
branches:
|
||||
include:
|
||||
- dev
|
||||
pr:
|
||||
- dev
|
||||
|
||||
variables:
|
||||
- name: versionHadolint
|
||||
value: 'v1.17.2'
|
||||
- name: versionShellCheck
|
||||
value: 'v0.7.0'
|
||||
|
||||
jobs:
|
||||
|
||||
- job: 'Hadolint'
|
||||
pool:
|
||||
vmImage: 'ubuntu-16.04'
|
||||
steps:
|
||||
- script: |
|
||||
sudo docker pull hadolint/hadolint:$(versionHadolint)
|
||||
displayName: 'Install Hadolint'
|
||||
- script: |
|
||||
sudo docker run --rm -i \
|
||||
-v $(pwd)/.hadolint.yaml:/.hadolint.yaml:ro \
|
||||
hadolint/hadolint:$(versionHadolint) < Dockerfile
|
||||
displayName: 'Run Hadolint'
|
||||
|
||||
|
||||
- job: 'ShellCheck'
|
||||
pool:
|
||||
vmImage: 'ubuntu-16.04'
|
||||
steps:
|
||||
- script: |
|
||||
sudo docker pull koalaman/shellcheck:$(versionShellCheck)
|
||||
displayName: 'Install ShellCheck'
|
||||
- script: |
|
||||
set -e
|
||||
|
||||
# Check build script
|
||||
sudo docker run --rm -i \
|
||||
-v $(pwd):/mnt:ro koalaman/shellcheck:$(versionShellCheck) \
|
||||
scripts/*.sh \
|
||||
buildroot-external/scripts/*.sh \
|
||||
buildroot-external/board/**/*.sh \
|
||||
buildroot-external/ota/rauc-hook \
|
||||
buildroot-external/rootfs-overlay/usr/bin/* \
|
||||
buildroot-external/rootfs-overlay/usr/sbin/* \
|
||||
buildroot-external/rootfs-overlay/usr/libexec/* \
|
||||
displayName: 'Run ShellCheck'
|
||||
@@ -1,95 +0,0 @@
|
||||
# https://dev.azure.com/home-assistant
|
||||
|
||||
trigger:
|
||||
batch: true
|
||||
tags:
|
||||
include:
|
||||
- '*'
|
||||
exclude:
|
||||
- untagged*
|
||||
pr: none
|
||||
|
||||
variables:
|
||||
- name: versionGHR
|
||||
value: 'v0.13.0'
|
||||
- group: github
|
||||
- group: rauc
|
||||
|
||||
jobs:
|
||||
|
||||
- job: 'VersionValidate'
|
||||
condition: startsWith(variables['Build.SourceBranch'], 'refs/tags')
|
||||
pool:
|
||||
vmImage: 'ubuntu-latest'
|
||||
steps:
|
||||
- script: |
|
||||
. buildroot-external/meta
|
||||
|
||||
if [ "${VERSION_MAJOR}.${VERSION_BUILD}" != "$(Build.SourceBranchName)" ]; then
|
||||
exit 1
|
||||
fi
|
||||
displayName: 'Check version of branch/tag'
|
||||
|
||||
|
||||
- job: 'Release'
|
||||
dependsOn:
|
||||
- 'VersionValidate'
|
||||
timeoutInMinutes: 240
|
||||
pool:
|
||||
name: 'Buildroot'
|
||||
strategy:
|
||||
maxParallel: 1
|
||||
matrix:
|
||||
OpenVirtualAppliance:
|
||||
board: 'ova'
|
||||
IntelNuc:
|
||||
board: 'intel_nuc'
|
||||
OdroidC2:
|
||||
board: 'odroid_c2'
|
||||
OdroidN2:
|
||||
board: 'odroid_n2'
|
||||
OdroidXU4:
|
||||
board: 'odroid_xu4'
|
||||
RaspberryPi:
|
||||
board: 'rpi'
|
||||
RaspberryPi0-W:
|
||||
board: 'rpi0_w'
|
||||
RaspberryPi2:
|
||||
board: 'rpi2'
|
||||
RaspberryPi3:
|
||||
board: 'rpi3'
|
||||
RaspberryPi3-64:
|
||||
board: 'rpi3_64'
|
||||
RaspberryPi4:
|
||||
board: 'rpi4'
|
||||
RaspberryPi4-64:
|
||||
board: 'rpi4_64'
|
||||
AsusTinker:
|
||||
board: 'tinker'
|
||||
workspace:
|
||||
clean: 'all'
|
||||
steps:
|
||||
- script: |
|
||||
echo -e "-----BEGIN CERTIFICATE-----\n$(releaseCertificate)\n-----END CERTIFICATE-----" > cert.pem
|
||||
echo -e "-----BEGIN PRIVATE KEY-----\n$(releaseKey)\n-----END PRIVATE KEY-----" > key.pem
|
||||
displayName: 'Add release PKI certs'
|
||||
- script: |
|
||||
sudo docker build -t hassos:azure .
|
||||
displayName: 'Build container for HassOS'
|
||||
- script: |
|
||||
curl -SsL https://github.com/tcnksm/ghr/releases/download/$(versionGHR)/ghr_$(versionGHR)_linux_amd64.tar.gz | tar xzf -
|
||||
cp ghr_$(versionGHR)_linux_amd64/ghr .
|
||||
rm -rf ghr_$(versionGHR)_linux_amd64
|
||||
displayName: 'Install GHR'
|
||||
- script: |
|
||||
BUILDER_UID="$(id -u)"
|
||||
BUILDER_GID="$(id -g)"
|
||||
|
||||
sudo docker run --rm --privileged -v "$(pwd):/build" \
|
||||
-e BUILDER_UID="${BUILDER_UID}" -e BUILDER_GID="${BUILDER_GID}" \
|
||||
-v "/mnt/build-cache:/cache" \
|
||||
hassos:azure make $(board)
|
||||
displayName: 'Build $(board)'
|
||||
- script: |
|
||||
./ghr -t $(githubToken) -replace $(Build.SourceBranchName) release/
|
||||
displayName: 'Upload $(board)'
|
||||
@@ -1,8 +1,8 @@
|
||||
source "$BR2_EXTERNAL_HASSOS_PATH/package/hassio/Config.in"
|
||||
source "$BR2_EXTERNAL_HASSOS_PATH/package/libapparmor/Config.in"
|
||||
source "$BR2_EXTERNAL_HASSOS_PATH/package/apparmor/Config.in"
|
||||
source "$BR2_EXTERNAL_HASSOS_PATH/package/bluetooth-bcm43xx/Config.in"
|
||||
source "$BR2_EXTERNAL_HASSOS_PATH/package/bluetooth-rtl8723/Config.in"
|
||||
source "$BR2_EXTERNAL_HASSOS_PATH/package/hardkernel-boot/Config.in"
|
||||
source "$BR2_EXTERNAL_HASSOS_PATH/package/qemu-guest-agent/Config.in"
|
||||
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"
|
||||
|
||||
@@ -7,23 +7,19 @@ function hassos_pre_image() {
|
||||
|
||||
cp -t "${BOOT_DATA}" \
|
||||
"${BINARIES_DIR}/boot.scr" \
|
||||
"${BINARIES_DIR}/rk3288-tinker.dtb"
|
||||
"${BINARIES_DIR}/rk3288-tinker.dtb" \
|
||||
"${BINARIES_DIR}/rk3288-tinker-s.dtb"
|
||||
|
||||
echo "console=tty1" > "${BOOT_DATA}/cmdline.txt"
|
||||
|
||||
# Create boot binary
|
||||
rm -f "${BINARIES_DIR}/idbloader.img"
|
||||
mkimage -n rk3288 -T rksd -d "${BINARIES_DIR}/u-boot-tpl.bin" "${BINARIES_DIR}/idbloader.img"
|
||||
cat "${BINARIES_DIR}/u-boot-spl.bin" >> "${BINARIES_DIR}/idbloader.img"
|
||||
|
||||
# SPL
|
||||
create_spl_image
|
||||
|
||||
dd if="${BINARIES_DIR}/idbloader.img" of="${SPL_IMG}" conv=notrunc bs=512 seek=64
|
||||
dd if="${BINARIES_DIR}/u-boot-dtb.img" of="${SPL_IMG}" conv=notrunc bs=512 seek=12288
|
||||
dd if="${BINARIES_DIR}/u-boot-dtb.img" of="${SPL_IMG}" conv=notrunc bs=512 seek=8192
|
||||
}
|
||||
|
||||
|
||||
function hassos_post_image() {
|
||||
convert_disk_image_gz
|
||||
convert_disk_image_xz
|
||||
}
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
From 2c2e60256f2cbb2fce50a6317f85b1500efd1a6c Mon Sep 17 00:00:00 2001
|
||||
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] ARM: DTS: rk3288-tinker: Setup the Bluetooth UART pins
|
||||
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
|
||||
@@ -39,24 +40,25 @@ 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.dts | 6 ++++++
|
||||
1 file changed, 6 insertions(+)
|
||||
arch/arm/boot/dts/rk3288-tinker.dtsi | 2 ++
|
||||
1 file changed, 2 insertions(+)
|
||||
|
||||
diff --git a/arch/arm/boot/dts/rk3288-tinker.dts b/arch/arm/boot/dts/rk3288-tinker.dts
|
||||
index d4df13bed..b92e59c1e 100644
|
||||
--- a/arch/arm/boot/dts/rk3288-tinker.dts
|
||||
+++ b/arch/arm/boot/dts/rk3288-tinker.dts
|
||||
@@ -73,3 +73,9 @@
|
||||
status = "okay";
|
||||
supports-sdio;
|
||||
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 {
|
||||
|
||||
&uart0 {
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&uart0_xfer>, <&uart0_cts>, <&uart0_rts>;
|
||||
+};
|
||||
+
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
--
|
||||
2.16.4
|
||||
2.28.0
|
||||
|
||||
@@ -0,0 +1,55 @@
|
||||
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: "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
|
||||
|
||||
Taken from, and tested by @TonyMac32 .
|
||||
|
||||
Well, the original one was tested by him but I had to adapt the
|
||||
registers definitions to the new 64-bits LPAE-compliant syntax.
|
||||
|
||||
Therefore that *might* break, along with a few other patches.
|
||||
|
||||
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 | 19 +++++++++++++++++++
|
||||
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
|
||||
--- a/arch/arm/boot/dts/rk3288-tinker.dtsi
|
||||
+++ b/arch/arm/boot/dts/rk3288-tinker.dtsi
|
||||
@@ -485,6 +485,25 @@ &sdio0 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
+&spi2 {
|
||||
+ max-freq = <50000000>;
|
||||
+ status = "okay";
|
||||
+
|
||||
+ spidev@0 {
|
||||
+ compatible = "rockchip,spi_tinker";
|
||||
+ reg = <0x0 0>;
|
||||
+ spi-max-frequency = <50000000>;
|
||||
+ spi-cpha = <1>;
|
||||
+ };
|
||||
+
|
||||
+ spidev@1 {
|
||||
+ compatible = "rockchip,spi_tinker";
|
||||
+ reg = <0x1>;
|
||||
+ spi-max-frequency = <50000000>;
|
||||
+ spi-cpha = <1>;
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
&tsadc {
|
||||
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
|
||||
|
||||
@@ -0,0 +1,41 @@
|
||||
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: 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
|
||||
|
||||
Enable I2C devices which are accessible via 40-pin header.
|
||||
|
||||
Signed-off-by: Stefan Agner <stefan@agner.ch>
|
||||
---
|
||||
arch/arm/boot/dts/rk3288-tinker.dtsi | 8 ++++++++
|
||||
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
|
||||
--- a/arch/arm/boot/dts/rk3288-tinker.dtsi
|
||||
+++ b/arch/arm/boot/dts/rk3288-tinker.dtsi
|
||||
@@ -344,10 +344,18 @@ regulator-state-mem {
|
||||
};
|
||||
};
|
||||
|
||||
+&i2c1 {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
&i2c2 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
+&i2c4 {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
&i2c5 {
|
||||
status = "okay";
|
||||
};
|
||||
--
|
||||
2.28.0
|
||||
|
||||
@@ -1,74 +0,0 @@
|
||||
Patches act8846 regulator providing the proper reset handle and exploit
|
||||
the SIPC bit in GLB_POWER_OFF register. Mainly used to reset some rockchip
|
||||
boards.
|
||||
|
||||
Origin: <https://patchwork.kernel.org/patch/6409521/>
|
||||
|
||||
diff --git a/drivers/regulator/act8865-regulator.c b/drivers/regulator/act8865-regulator.c
|
||||
index 2ff73d7..836d10b 100644
|
||||
--- a/drivers/regulator/act8865-regulator.c
|
||||
+++ b/drivers/regulator/act8865-regulator.c
|
||||
@@ -27,6 +27,7 @@
|
||||
#include <linux/regulator/of_regulator.h>
|
||||
#include <linux/regmap.h>
|
||||
#include <dt-bindings/regulator/active-semi,8865-regulator.h>
|
||||
+#include <linux/reboot.h>
|
||||
|
||||
/*
|
||||
* ACT8600 Global Register Map.
|
||||
@@ -133,6 +134,8 @@
|
||||
#define ACT8865_VOLTAGE_NUM 64
|
||||
#define ACT8600_SUDCDC_VOLTAGE_NUM 255
|
||||
|
||||
+#define ACT8846_SIPC_MASK 0x01
|
||||
+
|
||||
struct act8865 {
|
||||
struct regmap *regmap;
|
||||
int off_reg;
|
||||
@@ -402,6 +405,22 @@ static void act8865_power_off(void)
|
||||
while (1);
|
||||
}
|
||||
|
||||
+static int act8846_power_cycle(struct notifier_block *this,
|
||||
+ unsigned long code, void *unused)
|
||||
+{
|
||||
+ struct act8865 *act8846;
|
||||
+
|
||||
+ act8846 = i2c_get_clientdata(act8865_i2c_client);
|
||||
+ regmap_write(act8846->regmap, ACT8846_GLB_OFF_CTRL, ACT8846_SIPC_MASK);
|
||||
+
|
||||
+ return NOTIFY_DONE;
|
||||
+}
|
||||
+
|
||||
+static struct notifier_block act8846_restart_handler = {
|
||||
+ .notifier_call = act8846_power_cycle,
|
||||
+ .priority = 129,
|
||||
+};
|
||||
+
|
||||
static int act8865_pmic_probe(struct i2c_client *client,
|
||||
const struct i2c_device_id *i2c_id)
|
||||
{
|
||||
@@ -484,6 +503,8 @@ static int act8865_pmic_probe(struct i2c_client *client,
|
||||
}
|
||||
|
||||
if (of_device_is_system_power_controller(dev->of_node)) {
|
||||
+ int ret;
|
||||
+
|
||||
if (!pm_power_off && (off_reg > 0)) {
|
||||
act8865_i2c_client = client;
|
||||
act8865->off_reg = off_reg;
|
||||
@@ -492,6 +513,14 @@ static int act8865_pmic_probe(struct i2c_client *client,
|
||||
} else {
|
||||
dev_err(dev, "Failed to set poweroff capability, already defined\n");
|
||||
}
|
||||
+
|
||||
+ if (type == ACT8846) {
|
||||
+ act8865_i2c_client = client;
|
||||
+ ret = register_restart_handler(&act8846_restart_handler);
|
||||
+ if (ret)
|
||||
+ pr_err("%s: cannot register restart handler, %d\n",
|
||||
+ __func__, ret);
|
||||
+ }
|
||||
}
|
||||
|
||||
/* Finally register devices */
|
||||
@@ -1,35 +0,0 @@
|
||||
From 604ea7fc311af2b3a41e7fe3b4fbde0ee03dfb9c Mon Sep 17 00:00:00 2001
|
||||
From: Myy Miouyouyou <myy@miouyouyou.fr>
|
||||
Date: Thu, 19 Oct 2017 21:09:50 +0200
|
||||
Subject: [PATCH 04/28] dts: rk3288: miqi: Enabling the Mali GPU node
|
||||
|
||||
Why is the MiQi the only one left without a working mali GPU node ?
|
||||
|
||||
Seriously, is there a rk3288 chipset WITHOUT a mali GPU ? Couldn't
|
||||
they enable it once in the DTSI, instead of defining it as "disabled"
|
||||
and enabling it in every DTS file ?
|
||||
|
||||
Signed-off-by: Myy Miouyouyou <myy@miouyouyou.fr>
|
||||
---
|
||||
arch/arm/boot/dts/rk3288-miqi.dts | 5 +++++
|
||||
1 file changed, 5 insertions(+)
|
||||
|
||||
diff --git a/arch/arm/boot/dts/rk3288-miqi.dts b/arch/arm/boot/dts/rk3288-miqi.dts
|
||||
index 4d923aa6..3cd60674 100644
|
||||
--- a/arch/arm/boot/dts/rk3288-miqi.dts
|
||||
+++ b/arch/arm/boot/dts/rk3288-miqi.dts
|
||||
@@ -149,6 +149,11 @@
|
||||
status = "ok";
|
||||
};
|
||||
|
||||
+&gpu {
|
||||
+ mali-supply = <&vdd_gpu>;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
&hdmi {
|
||||
ddc-i2c-bus = <&i2c5>;
|
||||
status = "okay";
|
||||
--
|
||||
2.11.0
|
||||
|
||||
@@ -1,45 +0,0 @@
|
||||
From 89e5763110ca77d68a4be00cd97a638adc2401d5 Mon Sep 17 00:00:00 2001
|
||||
From: Willy Tarreau <w@1wt.eu>
|
||||
Date: Tue, 2 Aug 2016 08:31:00 +0200
|
||||
Subject: [PATCH 05/28] ARM: dts: rockchip: fix the regulator's voltage range
|
||||
on MiQi board
|
||||
|
||||
The board declared too narrow a voltage range for the CPU and GPU
|
||||
regulators, preventing it from using the full CPU frequency range.
|
||||
The regulators support 712500 to 1500000 microvolts.
|
||||
|
||||
Signed-off-by: Willy Tarreau <w@1wt.eu>
|
||||
(cherry picked from commit 95330e63a9295a2632cee8cce5db80677f01857a)
|
||||
---
|
||||
arch/arm/boot/dts/rk3288-miqi.dts | 8 ++++----
|
||||
1 file changed, 4 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/arch/arm/boot/dts/rk3288-miqi.dts b/arch/arm/boot/dts/rk3288-miqi.dts
|
||||
index 3cd60674..a1c3cdaa 100644
|
||||
--- a/arch/arm/boot/dts/rk3288-miqi.dts
|
||||
+++ b/arch/arm/boot/dts/rk3288-miqi.dts
|
||||
@@ -168,8 +168,8 @@
|
||||
fcs,suspend-voltage-selector = <1>;
|
||||
reg = <0x40>;
|
||||
regulator-name = "vdd_cpu";
|
||||
- regulator-min-microvolt = <850000>;
|
||||
- regulator-max-microvolt = <1350000>;
|
||||
+ regulator-min-microvolt = <712500>;
|
||||
+ regulator-max-microvolt = <1500000>;
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
regulator-enable-ramp-delay = <300>;
|
||||
@@ -182,8 +182,8 @@
|
||||
fcs,suspend-voltage-selector = <1>;
|
||||
reg = <0x41>;
|
||||
regulator-name = "vdd_gpu";
|
||||
- regulator-min-microvolt = <850000>;
|
||||
- regulator-max-microvolt = <1350000>;
|
||||
+ regulator-min-microvolt = <712500>;
|
||||
+ regulator-max-microvolt = <1500000>;
|
||||
regulator-always-on;
|
||||
vin-supply = <&vcc_sys>;
|
||||
};
|
||||
--
|
||||
2.11.0
|
||||
|
||||
@@ -1,46 +0,0 @@
|
||||
From c27e445527e949f3ef46d5326066196969c17d23 Mon Sep 17 00:00:00 2001
|
||||
From: Myy <myy@miouyouyou.fr>
|
||||
Date: Sun, 12 Mar 2017 19:43:15 +0000
|
||||
Subject: [PATCH 06/28] ARM: dts: rockchip: add the MiQi board's fan definition
|
||||
|
||||
The MiQi board is sold with an enclosure in which a fan is connected
|
||||
to the second LED output, and configured by default in "heartbeat"
|
||||
mode so that it rotates slowly and increases when the CPU load
|
||||
increases, ensuring appropriate cooling by default. This LED output
|
||||
is called "Fan" in the original kernel and connected to GPIO18
|
||||
(gpiochip 0, pin 18). Here we called it "miqi:green:fan" to stay
|
||||
consistent with the kernel's naming conventions.
|
||||
|
||||
It's worth noting that without this patch the fan doesn't work at
|
||||
all, risking to make the board overheat.
|
||||
|
||||
Fixes: 162718c (v4.7)
|
||||
Cc: Heiko Stuebner <heiko@sntech.de>
|
||||
Signed-off-by: Willy Tarreau <w@1wt.eu>
|
||||
|
||||
Signed-off-by: Myy <myy@miouyouyou.fr>
|
||||
---
|
||||
arch/arm/boot/dts/rk3288-miqi.dts | 7 +++++++
|
||||
1 file changed, 7 insertions(+)
|
||||
|
||||
diff --git a/arch/arm/boot/dts/rk3288-miqi.dts b/arch/arm/boot/dts/rk3288-miqi.dts
|
||||
index a1c3cdaa..0e383595 100644
|
||||
--- a/arch/arm/boot/dts/rk3288-miqi.dts
|
||||
+++ b/arch/arm/boot/dts/rk3288-miqi.dts
|
||||
@@ -67,6 +67,13 @@
|
||||
leds {
|
||||
compatible = "gpio-leds";
|
||||
|
||||
+ fan {
|
||||
+ gpios = <&gpio0 RK_PC2 GPIO_ACTIVE_HIGH>;
|
||||
+ label = "miqi:green:fan";
|
||||
+ linux,default-trigger = "heartbeat";
|
||||
+ };
|
||||
+
|
||||
+
|
||||
work {
|
||||
gpios = <&gpio7 RK_PA2 GPIO_ACTIVE_HIGH>;
|
||||
label = "miqi:green:user";
|
||||
--
|
||||
2.11.0
|
||||
|
||||
@@ -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,53 +0,0 @@
|
||||
From a72e0749acad92df7b854e38e97e1dc7b4799abe Mon Sep 17 00:00:00 2001
|
||||
From: "Miouyouyou (Myy)" <myy@miouyouyou.fr>
|
||||
Date: Mon, 5 Nov 2018 22:11:24 +0100
|
||||
Subject: [PATCH] ARM: DTS: rk3288-tinker: Defined the I2C interfaces
|
||||
|
||||
And all the hardware behind.
|
||||
|
||||
Taken from @TonyMac32, Butchered by @Miouyouyou .
|
||||
|
||||
Signed-off-by: Miouyouyou (Myy) <myy@miouyouyou.fr>
|
||||
---
|
||||
arch/arm/boot/dts/rk3288-tinker.dts | 25 +++++++++++++++++++++++++
|
||||
1 file changed, 25 insertions(+)
|
||||
|
||||
diff --git a/arch/arm/boot/dts/rk3288-tinker.dts b/arch/arm/boot/dts/rk3288-tinker.dts
|
||||
index b92e59c1e..96d05fc6b 100644
|
||||
--- a/arch/arm/boot/dts/rk3288-tinker.dts
|
||||
+++ b/arch/arm/boot/dts/rk3288-tinker.dts
|
||||
@@ -40,6 +40,31 @@
|
||||
};
|
||||
};
|
||||
|
||||
+&i2c1 {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&i2c2 {
|
||||
+ afc0:af-controller@0 {
|
||||
+ status = "okay";
|
||||
+ compatible = "silicon touch,vm149C-v4l2-i2c-subdev";
|
||||
+ reg = <0x0 0x0c>;
|
||||
+ };
|
||||
+
|
||||
+ eeprom:m24c08@50 {
|
||||
+ compatible = "at,24c08";
|
||||
+ reg = <0x50>;
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&i2c3 {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&i2c4 {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
&io_domains {
|
||||
wifi-supply = <&vcc_18>;
|
||||
};
|
||||
--
|
||||
2.16.4
|
||||
|
||||
@@ -1,50 +0,0 @@
|
||||
From b24b8f83e150811ad54ee2a4843e44cd1421fafa Mon Sep 17 00:00:00 2001
|
||||
From: "Miouyouyou (Myy)" <myy@miouyouyou.fr>
|
||||
Date: Mon, 5 Nov 2018 22:15:14 +0100
|
||||
Subject: [PATCH] ARM: DTS: rk3288-tinker: Defining the SPI interface
|
||||
|
||||
Taken from, and tested by @TonyMac32 .
|
||||
|
||||
Well, the original one was tested by him but I had to adapt the
|
||||
registers definitions to the new 64-bits LPAE-compliant syntax.
|
||||
|
||||
Therefore that *might* break, along with a few other patches.
|
||||
|
||||
Signed-off-by: Miouyouyou (Myy) <myy@miouyouyou.fr>
|
||||
---
|
||||
arch/arm/boot/dts/rk3288-tinker.dts | 19 +++++++++++++++++++
|
||||
1 file changed, 19 insertions(+)
|
||||
|
||||
diff --git a/arch/arm/boot/dts/rk3288-tinker.dts b/arch/arm/boot/dts/rk3288-tinker.dts
|
||||
index 96d05fc6b..17bfea298 100644
|
||||
--- a/arch/arm/boot/dts/rk3288-tinker.dts
|
||||
+++ b/arch/arm/boot/dts/rk3288-tinker.dts
|
||||
@@ -99,6 +99,25 @@
|
||||
supports-sdio;
|
||||
};
|
||||
|
||||
+&spi2 {
|
||||
+ max-freq = <50000000>;
|
||||
+ status = "okay";
|
||||
+
|
||||
+ spidev@0 {
|
||||
+ compatible = "rockchip,spi_tinker";
|
||||
+ reg = <0x0 0>;
|
||||
+ spi-max-frequency = <50000000>;
|
||||
+ spi-cpha = <1>;
|
||||
+ };
|
||||
+
|
||||
+ spidev@1 {
|
||||
+ compatible = "rockchip,spi_tinker";
|
||||
+ reg = <0x1>;
|
||||
+ spi-max-frequency = <50000000>;
|
||||
+ spi-cpha = <1>;
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
&uart0 {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&uart0_xfer>, <&uart0_cts>, <&uart0_rts>;
|
||||
--
|
||||
2.16.4
|
||||
|
||||
@@ -1,32 +0,0 @@
|
||||
From 9177b30ab083dbda2bede3b3d61ef71ad4b1ffe0 Mon Sep 17 00:00:00 2001
|
||||
From: "Miouyouyou (Myy)" <myy@miouyouyou.fr>
|
||||
Date: Thu, 1 Nov 2018 21:31:26 +0100
|
||||
Subject: [PATCH 2/2] arm: dts: veyron: Added a flag to disable cache flush
|
||||
during reset
|
||||
|
||||
Flushing the MMC cache of ASUS Chromebooks during initialization or
|
||||
"recovery" generates 10 minutes hangup, according to @SolidHal.
|
||||
|
||||
This is an adaptation of @SolidHal, in order to pinpoint the fix to
|
||||
Veyron Chromebooks, and avoiding issues other RK3288 boards.
|
||||
|
||||
Signed-off-by: Miouyouyou (Myy) <myy@miouyouyou.fr>
|
||||
---
|
||||
arch/arm/boot/dts/rk3288-veyron.dtsi | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/arch/arm/boot/dts/rk3288-veyron.dtsi b/arch/arm/boot/dts/rk3288-veyron.dtsi
|
||||
index 2075120cf..fa4951fd7 100644
|
||||
--- a/arch/arm/boot/dts/rk3288-veyron.dtsi
|
||||
+++ b/arch/arm/boot/dts/rk3288-veyron.dtsi
|
||||
@@ -123,6 +123,7 @@
|
||||
mmc-hs200-1_8v;
|
||||
mmc-pwrseq = <&emmc_pwrseq>;
|
||||
non-removable;
|
||||
+ no-recovery-cache-flush;
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&emmc_clk &emmc_cmd &emmc_bus8>;
|
||||
};
|
||||
--
|
||||
2.16.4
|
||||
|
||||
@@ -1,25 +0,0 @@
|
||||
diff --git a/arch/arm/boot/dts/rk3288-tinker.dtsi b/arch/arm/boot/dts/rk3288-tinker.dtsi
|
||||
index f88c913ff..7f04ccbdf 100644
|
||||
--- a/arch/arm/boot/dts/rk3288-tinker.dtsi
|
||||
+++ b/arch/arm/boot/dts/rk3288-tinker.dtsi
|
||||
@@ -547,3 +547,20 @@
|
||||
&gpiomem {
|
||||
status = "okay";
|
||||
};
|
||||
+
|
||||
+&emmc {
|
||||
+ bus-width = <8>;
|
||||
+ cap-mmc-highspeed;
|
||||
+ non-removable;
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&emmc_clk &emmc_cmd &emmc_pwr &emmc_bus8>;
|
||||
+ max-frequency = <150000000>;
|
||||
+ mmc-hs200-1_8v;
|
||||
+ mmc-ddr-1_8v;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&hdmi {
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&hdmi_cec_c0>;
|
||||
+};
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,13 +0,0 @@
|
||||
diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
|
||||
index 37a3de760..6bcfceede 100644
|
||||
--- a/arch/arm/boot/dts/Makefile
|
||||
+++ b/arch/arm/boot/dts/Makefile
|
||||
@@ -832,6 +832,7 @@ dtb-$(CONFIG_ARCH_ROCKCHIP) += \
|
||||
rk3188-radxarock.dtb \
|
||||
rk3228-evb.dtb \
|
||||
rk3229-evb.dtb \
|
||||
+ rk3288-xt-q8l-v10.dtb \
|
||||
rk3229-xms6.dtb \
|
||||
rk3288-evb-act8846.dtb \
|
||||
rk3288-evb-rk808.dtb \
|
||||
|
||||
@@ -1,103 +0,0 @@
|
||||
diff --git a/drivers/media/rc/keymaps/rc-xt-q8l-v10.c b/drivers/media/rc/keymaps/rc-xt-q8l-v10.c
|
||||
index e69de29..19c7d9e 100644
|
||||
--- /dev/null
|
||||
+++ b/drivers/media/rc/keymaps/rc-xt-q8l-v10.c
|
||||
@@ -0,0 +1,76 @@
|
||||
+// SPDX-License-Identifier: GPL-2.0+
|
||||
+// rc-xt-q8l-v10.c - Keytable for xt-q8l-v10 tv box remote controller
|
||||
+//
|
||||
+// keymap imported from ir-keymaps.c
|
||||
+//
|
||||
+// Copyright (c) 2018 Paolo Sabatino
|
||||
+
|
||||
+#include <media/rc-map.h>
|
||||
+#include <linux/module.h>
|
||||
+
|
||||
+/*
|
||||
+
|
||||
+*/
|
||||
+
|
||||
+static struct rc_map_table xt_q8l_v10[] = {
|
||||
+
|
||||
+ { 0xcc1d11, KEY_ENTER },
|
||||
+ { 0xcc1d00, KEY_POWER },
|
||||
+ { 0xcc1d15, KEY_PLAYPAUSE },
|
||||
+ { 0xcc1d16, KEY_STOP },
|
||||
+ { 0xcc1d06, KEY_PREVIOUSSONG },
|
||||
+ { 0xcc1d0a, KEY_NEXTSONG },
|
||||
+ { 0xcc1d41, KEY_1 },
|
||||
+ { 0xcc1d45, KEY_2 },
|
||||
+ { 0xcc1d4d, KEY_3 },
|
||||
+ { 0xcc1d42, KEY_4 },
|
||||
+ { 0xcc1d46, KEY_5 },
|
||||
+ { 0xcc1d4e, KEY_6 },
|
||||
+ { 0xcc1d43, KEY_7 },
|
||||
+ { 0xcc1d47, KEY_8 },
|
||||
+ { 0xcc1d4f, KEY_9 },
|
||||
+ { 0xcc1d49, KEY_0 },
|
||||
+ { 0xcc1d4a, KEY_BACKSPACE },
|
||||
+ { 0xcc1d48, KEY_F6 },
|
||||
+ { 0xcc1d03, KEY_HOME },
|
||||
+ { 0xcc1d0f, KEY_BACK },
|
||||
+ { 0xcc1d40, KEY_MENU },
|
||||
+ { 0xcc1d4c, KEY_TEXT },
|
||||
+ { 0xcc1d10, KEY_LEFT },
|
||||
+ { 0xcc1d12, KEY_RIGHT },
|
||||
+ { 0xcc1d44, KEY_DOWN },
|
||||
+ { 0xcc1d07, KEY_UP },
|
||||
+ { 0xcc1d02, KEY_VOLUMEDOWN },
|
||||
+ { 0xcc1d0c, KEY_MUTE },
|
||||
+ { 0xcc1d0e, KEY_VOLUMEUP },
|
||||
+ { 0xcc1d01, KEY_F1 },
|
||||
+ { 0xcc1d05, KEY_F2 },
|
||||
+ { 0xcc1d09, KEY_F3 },
|
||||
+ { 0xcc1d0d, KEY_F4 },
|
||||
+
|
||||
+};
|
||||
+
|
||||
+static struct rc_map_list xt_q8l_v10_map = {
|
||||
+ .map = {
|
||||
+ .scan = xt_q8l_v10,
|
||||
+ .size = ARRAY_SIZE(xt_q8l_v10),
|
||||
+ .rc_proto = RC_PROTO_NEC, /* Legacy IR type */
|
||||
+ .name = RC_MAP_XT_Q8L_V10,
|
||||
+ }
|
||||
+};
|
||||
+
|
||||
+static int __init init_rc_map_xt_q8l_v10(void)
|
||||
+{
|
||||
+ return rc_map_register(&xt_q8l_v10_map);
|
||||
+}
|
||||
+
|
||||
+static void __exit exit_rc_map_xt_q8l_v10(void)
|
||||
+{
|
||||
+ rc_map_unregister(&xt_q8l_v10_map);
|
||||
+}
|
||||
+
|
||||
+module_init(init_rc_map_xt_q8l_v10)
|
||||
+module_exit(exit_rc_map_xt_q8l_v10)
|
||||
+
|
||||
+MODULE_LICENSE("GPL");
|
||||
+MODULE_AUTHOR("Paolo Sabatino");
|
||||
diff --git a/include/media/rc-map.h b/include/media/rc-map.h
|
||||
index d621acadf..ad7abdb97 100644
|
||||
--- a/include/media/rc-map.h
|
||||
+++ b/include/media/rc-map.h
|
||||
@@ -278,6 +278,7 @@ struct rc_map *rc_map_get(const char *name);
|
||||
#define RC_MAP_WINFAST_USBII_DELUXE "rc-winfast-usbii-deluxe"
|
||||
#define RC_MAP_SU3000 "rc-su3000"
|
||||
#define RC_MAP_XBOX_DVD "rc-xbox-dvd"
|
||||
+#define RC_MAP_XT_Q8L_V10 "rc-xt-q8l-v10"
|
||||
#define RC_MAP_X96MAX "rc-x96max"
|
||||
|
||||
/*
|
||||
diff --git a/drivers/media/rc/keymaps/Makefile b/drivers/media/rc/keymaps/Makefile
|
||||
index 5b1399af6..ec9ce1206 100644
|
||||
--- a/drivers/media/rc/keymaps/Makefile
|
||||
+++ b/drivers/media/rc/keymaps/Makefile
|
||||
@@ -117,4 +117,5 @@ obj-$(CONFIG_RC_MAP) += rc-adstech-dvb-t-pci.o \
|
||||
rc-winfast-usbii-deluxe.o \
|
||||
rc-su3000.o \
|
||||
rc-xbox-dvd.o \
|
||||
+ rc-xt-q8l-v10.o \
|
||||
rc-x96max.o \
|
||||
@@ -0,0 +1,37 @@
|
||||
From cd1aac268ff58eea28153bbabfb33abc2df52b1f Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <cd1aac268ff58eea28153bbabfb33abc2df52b1f.1602103621.git.stefan@agner.ch>
|
||||
From: Pascal Vizeli <pvizeli@syshack.ch>
|
||||
Date: Fri, 24 Apr 2020 12:41:50 +0000
|
||||
Subject: [PATCH 1/4] SPL: modify load address of U-Boot
|
||||
|
||||
Default load address of U-Boot is at sector 16384, which is where HAOS
|
||||
has its first partition. Use 0x2000 (8192) instead.
|
||||
|
||||
Signed-off-by: Pascal Vizeli <pvizeli@syshack.ch>
|
||||
Signed-off-by: Stefan Agner <stefan@agner.ch>
|
||||
---
|
||||
configs/tinker-rk3288_defconfig | 1 +
|
||||
configs/tinker-s-rk3288_defconfig | 1 +
|
||||
2 files changed, 2 insertions(+)
|
||||
|
||||
diff --git a/configs/tinker-rk3288_defconfig b/configs/tinker-rk3288_defconfig
|
||||
index d459c7f50d..e0682ed479 100644
|
||||
--- a/configs/tinker-rk3288_defconfig
|
||||
+++ b/configs/tinker-rk3288_defconfig
|
||||
@@ -88,3 +88,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 68411d863b..1a285baf73 100644
|
||||
--- a/configs/tinker-s-rk3288_defconfig
|
||||
+++ b/configs/tinker-s-rk3288_defconfig
|
||||
@@ -90,3 +90,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.28.0
|
||||
|
||||
@@ -1,23 +0,0 @@
|
||||
From 17735a28503d90db2a7173816861750f475580ea Mon Sep 17 00:00:00 2001
|
||||
From: Pascal Vizeli <pvizeli@syshack.ch>
|
||||
Date: Fri, 24 Apr 2020 12:41:50 +0000
|
||||
Subject: [PATCH 1/1] TLP: Modify entrypoint for u-boot
|
||||
|
||||
Signed-off-by: Pascal Vizeli <pvizeli@syshack.ch>
|
||||
---
|
||||
configs/tinker-rk3288_defconfig | 2 ++
|
||||
1 file changed, 2 insertions(+)
|
||||
|
||||
diff --git a/configs/tinker-rk3288_defconfig b/configs/tinker-rk3288_defconfig
|
||||
index 83c3450839..648a7904be 100644
|
||||
--- a/configs/tinker-rk3288_defconfig
|
||||
+++ b/configs/tinker-rk3288_defconfig
|
||||
@@ -84,3 +84,5 @@ CONFIG_USB_ETHER_ASIX=y
|
||||
CONFIG_USB_ETHER_SMSC95XX=y
|
||||
CONFIG_CMD_DHRYSTONE=y
|
||||
CONFIG_ERRNO_STR=y
|
||||
+CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR=0x3000
|
||||
+
|
||||
--
|
||||
2.17.1
|
||||
|
||||
@@ -0,0 +1,55 @@
|
||||
From d49ad12ee89d0d64f1f594bcad7de0e4f9631add Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <d49ad12ee89d0d64f1f594bcad7de0e4f9631add.1602103621.git.stefan@agner.ch>
|
||||
In-Reply-To: <cd1aac268ff58eea28153bbabfb33abc2df52b1f.1602103621.git.stefan@agner.ch>
|
||||
References: <cd1aac268ff58eea28153bbabfb33abc2df52b1f.1602103621.git.stefan@agner.ch>
|
||||
From: Stefan Agner <stefan@agner.ch>
|
||||
Date: Fri, 4 Sep 2020 15:40:55 +0200
|
||||
Subject: [PATCH 2/4] rockchip: dts: tinker: move i2c node to shared device
|
||||
tree
|
||||
|
||||
The I2C EEPROM is present on Tinker Board S as well. Move the i2c node
|
||||
to the shared, U-Boot specific rk3288-tinker-u-boot.dtsi device tree.
|
||||
|
||||
Cc: Jonas Karlman <jonas@kwiboo.se>
|
||||
Signed-off-by: Stefan Agner <stefan@agner.ch>
|
||||
---
|
||||
arch/arm/dts/rk3288-tinker-u-boot.dtsi | 7 +++++++
|
||||
arch/arm/dts/rk3288-tinker.dts | 7 -------
|
||||
2 files changed, 7 insertions(+), 7 deletions(-)
|
||||
|
||||
diff --git a/arch/arm/dts/rk3288-tinker-u-boot.dtsi b/arch/arm/dts/rk3288-tinker-u-boot.dtsi
|
||||
index 732aa4f91f..3d169906fd 100644
|
||||
--- a/arch/arm/dts/rk3288-tinker-u-boot.dtsi
|
||||
+++ b/arch/arm/dts/rk3288-tinker-u-boot.dtsi
|
||||
@@ -17,6 +17,13 @@
|
||||
rockchip,sdram-params = <0x20d266a4 0x5b6 2 533000000 6 9 0>;
|
||||
};
|
||||
|
||||
+&i2c2 {
|
||||
+ m24c08@50 {
|
||||
+ compatible = "at,24c08", "i2c-eeprom";
|
||||
+ reg = <0x50>;
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
&pinctrl {
|
||||
u-boot,dm-pre-reloc;
|
||||
};
|
||||
diff --git a/arch/arm/dts/rk3288-tinker.dts b/arch/arm/dts/rk3288-tinker.dts
|
||||
index 4b8405fd82..338670123b 100644
|
||||
--- a/arch/arm/dts/rk3288-tinker.dts
|
||||
+++ b/arch/arm/dts/rk3288-tinker.dts
|
||||
@@ -35,10 +35,3 @@
|
||||
vbus-supply = <&vcc5v0_host>;
|
||||
status = "okay";
|
||||
};
|
||||
-
|
||||
-&i2c2 {
|
||||
- m24c08@50 {
|
||||
- compatible = "at,24c08", "i2c-eeprom";
|
||||
- reg = <0x50>;
|
||||
- };
|
||||
-};
|
||||
--
|
||||
2.28.0
|
||||
|
||||
@@ -0,0 +1,34 @@
|
||||
From 07a02625ba95f68ba670b4c1cc98567acb390195 Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <07a02625ba95f68ba670b4c1cc98567acb390195.1602103621.git.stefan@agner.ch>
|
||||
In-Reply-To: <cd1aac268ff58eea28153bbabfb33abc2df52b1f.1602103621.git.stefan@agner.ch>
|
||||
References: <cd1aac268ff58eea28153bbabfb33abc2df52b1f.1602103621.git.stefan@agner.ch>
|
||||
From: Stefan Agner <stefan@agner.ch>
|
||||
Date: Fri, 4 Sep 2020 15:44:38 +0200
|
||||
Subject: [PATCH 3/4] rockchip: dts: tinker: remove unnecessary node
|
||||
|
||||
The property reg-shift with the same value is present in the base
|
||||
device tree already. Remove unnecessary node from rk3288-tinker.dts.
|
||||
|
||||
Signed-off-by: Stefan Agner <stefan@agner.ch>
|
||||
---
|
||||
arch/arm/dts/rk3288-tinker.dts | 4 ----
|
||||
1 file changed, 4 deletions(-)
|
||||
|
||||
diff --git a/arch/arm/dts/rk3288-tinker.dts b/arch/arm/dts/rk3288-tinker.dts
|
||||
index 338670123b..8b1848c310 100644
|
||||
--- a/arch/arm/dts/rk3288-tinker.dts
|
||||
+++ b/arch/arm/dts/rk3288-tinker.dts
|
||||
@@ -27,10 +27,6 @@
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
-&uart2 {
|
||||
- reg-shift = <2>;
|
||||
-};
|
||||
-
|
||||
&usb_host1 {
|
||||
vbus-supply = <&vcc5v0_host>;
|
||||
status = "okay";
|
||||
--
|
||||
2.28.0
|
||||
|
||||
@@ -1,7 +1,10 @@
|
||||
From 4147d34a63f74f78a8ff9a3dcf2f4c9cd8d6be3a Mon Sep 17 00:00:00 2001
|
||||
From 549d98c233b2a8b7cd4b0d4eb9652ad60a8a0f75 Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <549d98c233b2a8b7cd4b0d4eb9652ad60a8a0f75.1602103621.git.stefan@agner.ch>
|
||||
In-Reply-To: <cd1aac268ff58eea28153bbabfb33abc2df52b1f.1602103621.git.stefan@agner.ch>
|
||||
References: <cd1aac268ff58eea28153bbabfb33abc2df52b1f.1602103621.git.stefan@agner.ch>
|
||||
From: Pascal Vizeli <pvizeli@syshack.ch>
|
||||
Date: Fri, 24 Apr 2020 11:37:55 +0000
|
||||
Subject: [PATCH 1/1] pmic: enable LDO2 vcc33_mipi at bootup
|
||||
Subject: [PATCH 4/4] pmic: enable LDO2 vcc33_mipi at bootup
|
||||
|
||||
Signed-off-by: Pascal Vizeli <pvizeli@syshack.ch>
|
||||
---
|
||||
@@ -9,10 +12,10 @@ Signed-off-by: Pascal Vizeli <pvizeli@syshack.ch>
|
||||
1 file changed, 37 insertions(+)
|
||||
|
||||
diff --git a/board/rockchip/tinker_rk3288/tinker-rk3288.c b/board/rockchip/tinker_rk3288/tinker-rk3288.c
|
||||
index 7af39e10cd..f12409933d 100644
|
||||
index f85209c649..6fa1bb0c66 100644
|
||||
--- a/board/rockchip/tinker_rk3288/tinker-rk3288.c
|
||||
+++ b/board/rockchip/tinker_rk3288/tinker-rk3288.c
|
||||
@@ -12,6 +12,7 @@
|
||||
@@ -13,6 +13,7 @@
|
||||
#include <netdev.h>
|
||||
#include <asm/arch-rockchip/bootrom.h>
|
||||
#include <asm/io.h>
|
||||
@@ -20,7 +23,7 @@ index 7af39e10cd..f12409933d 100644
|
||||
|
||||
static int get_ethaddr_from_eeprom(u8 *addr)
|
||||
{
|
||||
@@ -47,3 +48,39 @@ int mmc_get_env_dev(void)
|
||||
@@ -48,3 +49,39 @@ int mmc_get_env_dev(void)
|
||||
|
||||
return 1;
|
||||
}
|
||||
@@ -61,5 +64,5 @@ index 7af39e10cd..f12409933d 100644
|
||||
+}
|
||||
+#endif
|
||||
--
|
||||
2.17.1
|
||||
2.28.0
|
||||
|
||||
@@ -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"
|
||||
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"
|
||||
|
||||
# HassOS system A/B
|
||||
setenv bootargs_a "root=PARTUUID=8d3d53e3-6d49-4c38-8349-aff6859e82fd rootfstype=squashfs ro rootwait"
|
||||
@@ -27,7 +27,11 @@ setenv bootargs_b "root=PARTUUID=a3ec664e-32ce-4665-95ea-7ae90ce9aa20 rootfstype
|
||||
fileenv mmc ${devnum}:1 ${ramdisk_addr_r} cmdline.txt cmdline
|
||||
|
||||
# Load device tree
|
||||
fatload mmc ${devnum}:1 ${fdt_addr_r} rk3288-tinker.dtb
|
||||
if test "$devnum" = "0"; then
|
||||
fatload mmc ${devnum}:1 ${fdt_addr_r} rk3288-tinker-s.dtb
|
||||
else
|
||||
fatload mmc ${devnum}:1 ${fdt_addr_r} rk3288-tinker.dtb
|
||||
fi
|
||||
|
||||
setenv bootargs
|
||||
for BOOT_SLOT in "${BOOT_ORDER}"; do
|
||||
@@ -36,16 +40,18 @@ for BOOT_SLOT in "${BOOT_ORDER}"; do
|
||||
elif test "x${BOOT_SLOT}" = "xA"; then
|
||||
if test ${BOOT_A_LEFT} -gt 0; then
|
||||
setexpr BOOT_A_LEFT ${BOOT_A_LEFT} - 1
|
||||
echo "Found valid slot A, ${BOOT_A_LEFT} attempts remaining"
|
||||
setenv load_kernel "ext4load mmc ${devnum}:2 ${kernel_addr_r} zImage"
|
||||
setenv bootargs "${bootargs_hassos} ${bootargs_a} rauc.slot=A ${cmdline}"
|
||||
echo "Trying to boot slot A, ${BOOT_A_LEFT} attempts remaining. Loading kernel ..."
|
||||
if ext4load mmc ${devnum}:2 ${kernel_addr_r} zImage; then
|
||||
setenv bootargs "${bootargs_hassos} ${bootargs_a} rauc.slot=A ${cmdline}"
|
||||
fi
|
||||
fi
|
||||
elif test "x${BOOT_SLOT}" = "xB"; then
|
||||
if test ${BOOT_B_LEFT} -gt 0; then
|
||||
setexpr BOOT_B_LEFT ${BOOT_B_LEFT} - 1
|
||||
echo "Found valid slot B, ${BOOT_B_LEFT} attempts remaining"
|
||||
setenv load_kernel "ext4load mmc ${devnum}:4 ${kernel_addr_r} zImage"
|
||||
setenv bootargs "${bootargs_hassos} ${bootargs_b} rauc.slot=B ${cmdline}"
|
||||
echo "Trying to boot slot B, ${BOOT_B_LEFT} attempts remaining. Loading kernel ..."
|
||||
if ext4load mmc ${devnum}:4 ${kernel_addr_r} zImage; then
|
||||
setenv bootargs "${bootargs_hassos} ${bootargs_b} rauc.slot=B ${cmdline}"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
done
|
||||
@@ -60,10 +66,8 @@ else
|
||||
reset
|
||||
fi
|
||||
|
||||
echo "Loading kernel"
|
||||
run load_kernel
|
||||
echo " Starting kernel"
|
||||
echo "Starting kernel"
|
||||
bootz ${kernel_addr_r} - ${fdt_addr_r}
|
||||
|
||||
echo "Fails on boot"
|
||||
echo "Boot failed, resetting..."
|
||||
reset
|
||||
|
||||
@@ -1253,7 +1253,7 @@ 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 is not set
|
||||
CONFIG_CFG80211_WEXT=y
|
||||
CONFIG_MAC80211=m
|
||||
CONFIG_MAC80211_HAS_RC=y
|
||||
CONFIG_MAC80211_RC_MINSTREL=y
|
||||
@@ -4954,7 +4954,7 @@ CONFIG_RTC_DRV_RK808=m
|
||||
# CONFIG_RTC_DRV_PCF8523 is not set
|
||||
# CONFIG_RTC_DRV_PCF85063 is not set
|
||||
# CONFIG_RTC_DRV_PCF85363 is not set
|
||||
# CONFIG_RTC_DRV_PCF8563 is not set
|
||||
CONFIG_RTC_DRV_PCF8563=y
|
||||
# CONFIG_RTC_DRV_PCF8583 is not set
|
||||
# CONFIG_RTC_DRV_M41T80 is not set
|
||||
# CONFIG_RTC_DRV_BQ32K is not set
|
||||
|
||||
@@ -22,6 +22,6 @@ function hassos_pre_image() {
|
||||
|
||||
|
||||
function hassos_post_image() {
|
||||
convert_disk_image_gz
|
||||
convert_disk_image_xz
|
||||
}
|
||||
|
||||
|
||||
@@ -19,14 +19,12 @@ 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"
|
||||
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"
|
||||
|
||||
# HassOS system A/B
|
||||
setenv bootargs_a "root=PARTUUID=48617373-06 rootfstype=squashfs ro rootwait"
|
||||
setenv bootargs_b "root=PARTUUID=48617373-08 rootfstype=squashfs ro rootwait"
|
||||
|
||||
usb start
|
||||
|
||||
# Load extraargs
|
||||
fileenv mmc ${devnum}:1 ${ramdisk_addr_r} cmdline.txt cmdline
|
||||
fatload mmc ${devnum}:1 ${fdt_addr_r} meson-gxbb-odroidc2.dtb
|
||||
@@ -48,16 +46,18 @@ for BOOT_SLOT in "${BOOT_ORDER}"; do
|
||||
elif test "x${BOOT_SLOT}" = "xA"; then
|
||||
if test ${BOOT_A_LEFT} -gt 0; then
|
||||
setexpr BOOT_A_LEFT ${BOOT_A_LEFT} - 1
|
||||
echo "Found valid slot A, ${BOOT_A_LEFT} attempts remaining"
|
||||
setenv load_kernel "ext4load mmc ${devnum}:5 ${kernel_addr_r} Image"
|
||||
setenv bootargs "${bootargs_hassos} ${bootargs_a} rauc.slot=A ${cmdline}"
|
||||
echo "Trying to boot slot A, ${BOOT_A_LEFT} attempts remaining. Loading kernel ..."
|
||||
if ext4load mmc ${devnum}:5 ${kernel_addr_r} Image; then
|
||||
setenv bootargs "${bootargs_hassos} ${bootargs_a} rauc.slot=A ${cmdline}"
|
||||
fi
|
||||
fi
|
||||
elif test "x${BOOT_SLOT}" = "xB"; then
|
||||
if test ${BOOT_B_LEFT} -gt 0; then
|
||||
setexpr BOOT_B_LEFT ${BOOT_B_LEFT} - 1
|
||||
echo "Found valid slot B, ${BOOT_B_LEFT} attempts remaining"
|
||||
setenv load_kernel "ext4load mmc ${devnum}:7 ${kernel_addr_r} Image"
|
||||
setenv bootargs "${bootargs_hassos} ${bootargs_b} rauc.slot=B ${cmdline}"
|
||||
echo "Trying to boot slot B, ${BOOT_B_LEFT} attempts remaining. Loading kernel ..."
|
||||
if ext4load mmc ${devnum}:7 ${kernel_addr_r} Image; then
|
||||
setenv bootargs "${bootargs_hassos} ${bootargs_b} rauc.slot=B ${cmdline}"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
done
|
||||
@@ -72,12 +72,9 @@ else
|
||||
reset
|
||||
fi
|
||||
|
||||
echo "Loading kernel"
|
||||
run load_kernel
|
||||
echo " Starting kernel"
|
||||
printenv load_kernel
|
||||
printenv bootargs
|
||||
echo "Starting kernel"
|
||||
booti ${kernel_addr_r} - ${fdt_addr_r}
|
||||
|
||||
echo "Fails on boot"
|
||||
echo "Boot failed, resetting..."
|
||||
reset
|
||||
|
||||
23
buildroot-external/board/hardkernel/odroid-c4/hassos-hook.sh
Executable file
23
buildroot-external/board/hardkernel/odroid-c4/hassos-hook.sh
Executable file
@@ -0,0 +1,23 @@
|
||||
#!/bin/bash
|
||||
# shellcheck disable=SC2155
|
||||
|
||||
function hassos_pre_image() {
|
||||
local BOOT_DATA="$(path_boot_dir)"
|
||||
local UBOOT_SM1="${BINARIES_DIR}/u-boot.sm1"
|
||||
local SPL_IMG="$(path_spl_img)"
|
||||
|
||||
cp "${BINARIES_DIR}/boot.scr" "${BOOT_DATA}/boot.scr"
|
||||
cp "${BINARIES_DIR}/meson-sm1-odroid-c4.dtb" "${BOOT_DATA}/meson-sm1-odroid-c4.dtb"
|
||||
|
||||
echo "console=tty0 console=ttyAML0,115200n8" > "${BOOT_DATA}/cmdline.txt"
|
||||
|
||||
# SPL
|
||||
create_spl_image
|
||||
|
||||
dd if="${UBOOT_SM1}" of="${SPL_IMG}" conv=notrunc bs=512 seek=1
|
||||
}
|
||||
|
||||
|
||||
function hassos_post_image() {
|
||||
convert_disk_image_xz
|
||||
}
|
||||
10
buildroot-external/board/hardkernel/odroid-c4/meta
Normal file
10
buildroot-external/board/hardkernel/odroid-c4/meta
Normal file
@@ -0,0 +1,10 @@
|
||||
BOARD_ID=odroid-c4
|
||||
BOARD_NAME="Hardkernel Odroid-C4"
|
||||
CHASSIS=embedded
|
||||
BOOTLOADER=uboot
|
||||
KERNEL_FILE=Image
|
||||
BOOT_SYS=mbr
|
||||
BOOT_SPL=true
|
||||
BOOT_ENV_SIZE=0x2000
|
||||
SUPERVISOR_MACHINE=odroid-c4
|
||||
SUPERVISOR_ARCH=aarch64
|
||||
80
buildroot-external/board/hardkernel/odroid-c4/uboot-boot.ush
Normal file
80
buildroot-external/board/hardkernel/odroid-c4/uboot-boot.ush
Normal file
@@ -0,0 +1,80 @@
|
||||
|
||||
###########################################
|
||||
|
||||
part start mmc ${devnum} 9 mmc_env
|
||||
mmc dev ${devnum}
|
||||
setenv loadbootstate " \
|
||||
echo 'loading env...'; \
|
||||
mmc read ${ramdisk_addr_r} ${mmc_env} 0x10; \
|
||||
env import -c ${ramdisk_addr_r} 0x2000;"
|
||||
|
||||
setenv storebootstate " \
|
||||
echo 'storing env...'; \
|
||||
env export -c -s 0x2000 ${ramdisk_addr_r} BOOT_ORDER BOOT_A_LEFT BOOT_B_LEFT MACHINE_ID; \
|
||||
mmc write ${ramdisk_addr_r} ${mmc_env} 0x10;"
|
||||
|
||||
run loadbootstate
|
||||
test -n "${BOOT_ORDER}" || setenv BOOT_ORDER "A B"
|
||||
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"
|
||||
|
||||
# HassOS system A/B
|
||||
setenv bootargs_a "root=PARTUUID=48617373-06 rootfstype=squashfs ro rootwait"
|
||||
setenv bootargs_b "root=PARTUUID=48617373-08 rootfstype=squashfs ro rootwait"
|
||||
|
||||
# Load extraargs
|
||||
fileenv mmc ${devnum}:1 ${ramdisk_addr_r} cmdline.txt cmdline
|
||||
fatload mmc ${devnum}:1 ${fdt_addr_r} meson-sm1-odroid-c4.dtb
|
||||
|
||||
# logical volumes get numbered after physical ones.
|
||||
# 1. boot
|
||||
# 2. Extended partition
|
||||
# 3. Overlay
|
||||
# 4. Data
|
||||
# 5. KernelA
|
||||
# 6. SystemA
|
||||
# 7. KernelB
|
||||
# 8. SystemB
|
||||
# 9. BootInfo
|
||||
setenv bootargs
|
||||
for BOOT_SLOT in "${BOOT_ORDER}"; do
|
||||
if test "x${bootargs}" != "x"; then
|
||||
# skip remaining slots
|
||||
elif test "x${BOOT_SLOT}" = "xA"; then
|
||||
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
|
||||
setenv bootargs "${bootargs_hassos} ${bootargs_a} rauc.slot=A ${cmdline}"
|
||||
fi
|
||||
fi
|
||||
elif test "x${BOOT_SLOT}" = "xB"; then
|
||||
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
|
||||
setenv bootargs "${bootargs_hassos} ${bootargs_b} rauc.slot=B ${cmdline}"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
done
|
||||
|
||||
if test -n "${bootargs}"; then
|
||||
run storebootstate
|
||||
else
|
||||
echo "No valid slot found, resetting tries to 3"
|
||||
setenv BOOT_A_LEFT 3
|
||||
setenv BOOT_B_LEFT 3
|
||||
run storebootstate
|
||||
reset
|
||||
fi
|
||||
|
||||
printenv bootargs
|
||||
echo "Starting kernel"
|
||||
booti ${kernel_addr_r} - ${fdt_addr_r}
|
||||
|
||||
echo "Boot failed, resetting..."
|
||||
reset
|
||||
@@ -0,0 +1,4 @@
|
||||
CONFIG_DOS_PARTITION=y
|
||||
# CONFIG_EFI_PARTITION is not set
|
||||
# CONFIG_USB_STORAGE is not set
|
||||
CONFIG_DISPLAY_BOARDINFO=y
|
||||
@@ -19,6 +19,6 @@ function hassos_pre_image() {
|
||||
|
||||
|
||||
function hassos_post_image() {
|
||||
convert_disk_image_gz
|
||||
convert_disk_image_xz
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE=y
|
||||
@@ -19,14 +19,12 @@ 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"
|
||||
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"
|
||||
|
||||
# HassOS system A/B
|
||||
setenv bootargs_a "root=PARTUUID=48617373-06 rootfstype=squashfs ro rootwait"
|
||||
setenv bootargs_b "root=PARTUUID=48617373-08 rootfstype=squashfs ro rootwait"
|
||||
|
||||
usb start
|
||||
|
||||
# Load extraargs
|
||||
fileenv mmc ${devnum}:1 ${ramdisk_addr_r} cmdline.txt cmdline
|
||||
if test "${board_rev}" = "c"; then
|
||||
@@ -52,16 +50,18 @@ for BOOT_SLOT in "${BOOT_ORDER}"; do
|
||||
elif test "x${BOOT_SLOT}" = "xA"; then
|
||||
if test ${BOOT_A_LEFT} -gt 0; then
|
||||
setexpr BOOT_A_LEFT ${BOOT_A_LEFT} - 1
|
||||
echo "Found valid slot A, ${BOOT_A_LEFT} attempts remaining"
|
||||
setenv load_kernel "ext4load mmc ${devnum}:5 ${kernel_addr_r} Image"
|
||||
setenv bootargs "${bootargs_hassos} ${bootargs_a} rauc.slot=A ${cmdline}"
|
||||
echo "Trying to boot slot A, ${BOOT_A_LEFT} attempts remaining. Loading kernel ..."
|
||||
if ext4load mmc ${devnum}:5 ${kernel_addr_r} Image; then
|
||||
setenv bootargs "${bootargs_hassos} ${bootargs_a} rauc.slot=A ${cmdline}"
|
||||
fi
|
||||
fi
|
||||
elif test "x${BOOT_SLOT}" = "xB"; then
|
||||
if test ${BOOT_B_LEFT} -gt 0; then
|
||||
setexpr BOOT_B_LEFT ${BOOT_B_LEFT} - 1
|
||||
echo "Found valid slot B, ${BOOT_B_LEFT} attempts remaining"
|
||||
setenv load_kernel "ext4load mmc ${devnum}:7 ${kernel_addr_r} Image"
|
||||
setenv bootargs "${bootargs_hassos} ${bootargs_b} rauc.slot=B ${cmdline}"
|
||||
echo "Trying to boot slot B, ${BOOT_B_LEFT} attempts remaining. Loading kernel ..."
|
||||
if ext4load mmc ${devnum}:7 ${kernel_addr_r} Image; then
|
||||
setenv bootargs "${bootargs_hassos} ${bootargs_b} rauc.slot=B ${cmdline}"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
done
|
||||
@@ -76,12 +76,9 @@ else
|
||||
reset
|
||||
fi
|
||||
|
||||
echo "Loading kernel"
|
||||
run load_kernel
|
||||
echo " Starting kernel"
|
||||
printenv load_kernel
|
||||
printenv bootargs
|
||||
echo "Starting kernel"
|
||||
booti ${kernel_addr_r} - ${fdt_addr_r}
|
||||
|
||||
echo "Fails on boot"
|
||||
echo "Boot failed, resetting..."
|
||||
reset
|
||||
|
||||
@@ -26,5 +26,5 @@ function hassos_pre_image() {
|
||||
|
||||
|
||||
function hassos_post_image() {
|
||||
convert_disk_image_gz
|
||||
convert_disk_image_xz
|
||||
}
|
||||
|
||||
@@ -21,14 +21,12 @@ 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"
|
||||
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"
|
||||
|
||||
# HassOS system A/B
|
||||
setenv bootargs_a "root=PARTUUID=48617373-06 rootfstype=squashfs ro rootwait"
|
||||
setenv bootargs_b "root=PARTUUID=48617373-08 rootfstype=squashfs ro rootwait"
|
||||
|
||||
#usb start
|
||||
|
||||
# Load extraargs
|
||||
fileenv mmc ${devnum}:1 ${ramdisk_addr_r} cmdline.txt cmdline
|
||||
fatload mmc ${devnum}:1 ${fdt_addr_r} exynos5422-odroidxu4.dtb
|
||||
@@ -52,16 +50,18 @@ for BOOT_SLOT in "${BOOT_ORDER}"; do
|
||||
elif test "x${BOOT_SLOT}" = "xA"; then
|
||||
if test ${BOOT_A_LEFT} -gt 0; then
|
||||
setexpr BOOT_A_LEFT ${BOOT_A_LEFT} - 1
|
||||
echo "Found valid slot A, ${BOOT_A_LEFT} attempts remaining"
|
||||
setenv load_kernel "ext4load mmc ${devnum}:5 ${kernel_addr_r} zImage"
|
||||
setenv bootargs "${bootargs_hassos} ${bootargs_a} rauc.slot=A ${cmdline}"
|
||||
echo "Trying to boot slot A, ${BOOT_A_LEFT} attempts remaining. Loading kernel ..."
|
||||
if ext4load mmc ${devnum}:5 ${kernel_addr_r} zImage; then
|
||||
setenv bootargs "${bootargs_hassos} ${bootargs_a} rauc.slot=A ${cmdline}"
|
||||
fi
|
||||
fi
|
||||
elif test "x${BOOT_SLOT}" = "xB"; then
|
||||
if test ${BOOT_B_LEFT} -gt 0; then
|
||||
setexpr BOOT_B_LEFT ${BOOT_B_LEFT} - 1
|
||||
echo "Found valid slot B, ${BOOT_B_LEFT} attempts remaining"
|
||||
setenv load_kernel "ext4load mmc ${devnum}:7 ${kernel_addr_r} zImage"
|
||||
setenv bootargs "${bootargs_hassos} ${bootargs_b} rauc.slot=B ${cmdline}"
|
||||
echo "Trying to boot slot B, ${BOOT_B_LEFT} attempts remaining. Loading kernel ..."
|
||||
if ext4load mmc ${devnum}:7 ${kernel_addr_r} zImage; then
|
||||
setenv bootargs "${bootargs_hassos} ${bootargs_b} rauc.slot=B ${cmdline}"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
done
|
||||
@@ -76,13 +76,9 @@ else
|
||||
reset
|
||||
fi
|
||||
|
||||
echo "Loading kernel"
|
||||
run load_kernel
|
||||
echo " Starting kernel"
|
||||
printenv load_kernel
|
||||
printenv bootargs
|
||||
dmc ${ddr_freq}
|
||||
echo "Starting kernel"
|
||||
bootz ${kernel_addr_r} - ${fdt_addr_r}
|
||||
|
||||
echo "Fails on boot"
|
||||
echo "Boot failed, resetting..."
|
||||
reset
|
||||
|
||||
@@ -1,43 +0,0 @@
|
||||
From e2b93751cfd0722801b65b4603b588ab9df4c12b Mon Sep 17 00:00:00 2001
|
||||
From: Jerome Brunet <jbrunet@baylibre.com>
|
||||
Date: Tue, 21 Apr 2020 18:39:30 +0200
|
||||
Subject: [PATCH 2/8] arm64: defconfig: enable meson gx audio as module
|
||||
|
||||
Enable the module config for the Amlogic GX audio card.
|
||||
This module will imply the internal components usually associated
|
||||
with it to make a functional sound card on these platforms.
|
||||
|
||||
Also enable the simple amplifier module which often used on the
|
||||
output stage of those cards.
|
||||
|
||||
Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
|
||||
Signed-off-by: Kevin Hilman <khilman@baylibre.com>
|
||||
Tested-by: Christian Hewitt <christianshewitt@gmail.com>
|
||||
Link: https://lore.kernel.org/r/20200421163935.775935-2-jbrunet@baylibre.com
|
||||
---
|
||||
arch/arm64/configs/defconfig | 2 ++
|
||||
1 file changed, 2 insertions(+)
|
||||
|
||||
diff --git a/arch/arm64/configs/defconfig b/arch/arm64/configs/defconfig
|
||||
index 03d0189f7d68..ceb60ee9c340 100644
|
||||
--- a/arch/arm64/configs/defconfig
|
||||
+++ b/arch/arm64/configs/defconfig
|
||||
@@ -644,6 +644,7 @@ CONFIG_SND_HDA_CODEC_HDMI=m
|
||||
CONFIG_SND_SOC=y
|
||||
CONFIG_SND_BCM2835_SOC_I2S=m
|
||||
CONFIG_SND_MESON_AXG_SOUND_CARD=m
|
||||
+CONFIG_SND_MESON_GX_SOUND_CARD=m
|
||||
CONFIG_SND_SOC_SDM845=m
|
||||
CONFIG_SND_SOC_ROCKCHIP=m
|
||||
CONFIG_SND_SOC_ROCKCHIP_SPDIF=m
|
||||
@@ -656,6 +657,7 @@ CONFIG_SND_SOC_AK4613=m
|
||||
CONFIG_SND_SOC_ES7134=m
|
||||
CONFIG_SND_SOC_ES7241=m
|
||||
CONFIG_SND_SOC_PCM3168A_I2C=m
|
||||
+CONFIG_SND_SOC_SIMPLE_AMPLIFIER=m
|
||||
CONFIG_SND_SOC_TAS571X=m
|
||||
CONFIG_SND_SOC_WCD934X=m
|
||||
CONFIG_SND_SOC_WSA881X=m
|
||||
--
|
||||
2.17.1
|
||||
|
||||
@@ -1,32 +1,32 @@
|
||||
From 9443f2cd21a8ebd08f0fb64f5b3a8ccb6cd77d8e Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <9443f2cd21a8ebd08f0fb64f5b3a8ccb6cd77d8e.1596660075.git.stefan@agner.ch>
|
||||
In-Reply-To: <f72fc1866396fed30036e0f06007c15217e47f22.1596660075.git.stefan@agner.ch>
|
||||
References: <f72fc1866396fed30036e0f06007c15217e47f22.1596660075.git.stefan@agner.ch>
|
||||
From 9d2a2b44e67b0ef49e534c097e8b5e3e1173b033 Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <9d2a2b44e67b0ef49e534c097e8b5e3e1173b033.1606829302.git.stefan@agner.ch>
|
||||
From: Christian Hewitt <christianshewitt@gmail.com>
|
||||
Date: Sun, 19 Jul 2020 14:10:32 +0000
|
||||
Subject: [PATCH 08/10] arm64: dts: meson: convert ODROID-N2 to dtsi
|
||||
Date: Tue, 15 Sep 2020 17:24:30 +0200
|
||||
Subject: [PATCH 1/7] arm64: dts: meson: convert ODROID-N2 to dtsi
|
||||
|
||||
Convert the current ODROID-N2 dts into a common dtsi in preparation
|
||||
for adding ODROID-N2+ support.
|
||||
|
||||
Signed-off-by: Christian Hewitt <christianshewitt@gmail.com>
|
||||
[rebased ontop of sound patches]
|
||||
Signed-off-by: Stefan Agner <stefan@agner.ch>
|
||||
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
|
||||
Signed-off-by: Kevin Hilman <khilman@baylibre.com>
|
||||
Acked-by: Neil Armstrong <narmstrong@baylibre.com>
|
||||
Acked-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
|
||||
Link: https://lore.kernel.org/r/20200915152432.30616-2-narmstrong@baylibre.com
|
||||
---
|
||||
.../boot/dts/amlogic/meson-g12b-odroid-n2.dts | 619 +----------------
|
||||
.../dts/amlogic/meson-g12b-odroid-n2.dtsi | 626 ++++++++++++++++++
|
||||
2 files changed, 627 insertions(+), 618 deletions(-)
|
||||
.../boot/dts/amlogic/meson-g12b-odroid-n2.dts | 618 +----------------
|
||||
.../dts/amlogic/meson-g12b-odroid-n2.dtsi | 625 ++++++++++++++++++
|
||||
2 files changed, 626 insertions(+), 617 deletions(-)
|
||||
create mode 100644 arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi
|
||||
|
||||
diff --git a/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dts b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dts
|
||||
index 34fffa6d859d..5fd51a87ae9b 100644
|
||||
index 34fffa6d859d..a198a91259ec 100644
|
||||
--- a/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dts
|
||||
+++ b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dts
|
||||
@@ -6,626 +6,9 @@
|
||||
|
||||
@@ -7,625 +7,9 @@
|
||||
/dts-v1/;
|
||||
|
||||
-#include "meson-g12b-s922x.dtsi"
|
||||
#include "meson-g12b-s922x.dtsi"
|
||||
-#include <dt-bindings/input/input.h>
|
||||
-#include <dt-bindings/gpio/meson-g12a-gpio.h>
|
||||
-#include <dt-bindings/sound/meson-g12a-toacodec.h>
|
||||
@@ -652,17 +652,16 @@ index 34fffa6d859d..5fd51a87ae9b 100644
|
||||
};
|
||||
diff --git a/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi
|
||||
new file mode 100644
|
||||
index 000000000000..e5bc132ce7d5
|
||||
index 000000000000..6982632ae646
|
||||
--- /dev/null
|
||||
+++ b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi
|
||||
@@ -0,0 +1,626 @@
|
||||
@@ -0,0 +1,625 @@
|
||||
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
|
||||
+/*
|
||||
+ * Copyright (c) 2019 BayLibre, SAS
|
||||
+ * Author: Neil Armstrong <narmstrong@baylibre.com>
|
||||
+ */
|
||||
+
|
||||
+#include "meson-g12b-s922x.dtsi"
|
||||
+#include <dt-bindings/input/input.h>
|
||||
+#include <dt-bindings/gpio/meson-g12a-gpio.h>
|
||||
+#include <dt-bindings/sound/meson-g12a-toacodec.h>
|
||||
@@ -1067,7 +1066,7 @@ index 000000000000..e5bc132ce7d5
|
||||
+
|
||||
+&ext_mdio {
|
||||
+ external_phy: ethernet-phy@0 {
|
||||
+ /* Realtek RTL8211F (0x001cc916) */
|
||||
+ /* Realtek RTL8211F (0x001cc916) */
|
||||
+ reg = <0>;
|
||||
+ max-speed = <1000>;
|
||||
+
|
||||
@@ -1283,5 +1282,5 @@ index 000000000000..e5bc132ce7d5
|
||||
+ phy-supply = <&hub_5v>;
|
||||
+};
|
||||
--
|
||||
2.27.0
|
||||
2.29.2
|
||||
|
||||
@@ -1,28 +0,0 @@
|
||||
From 821b8ac21b1675910423ee69d37cb1977b8f271e Mon Sep 17 00:00:00 2001
|
||||
From: Jerome Brunet <jbrunet@baylibre.com>
|
||||
Date: Mon, 30 Mar 2020 17:39:04 +0200
|
||||
Subject: [PATCH 3/8] ASoC: meson: imply acodec glue on axg sound card
|
||||
|
||||
When axg card driver support is enabled, lets enable the related
|
||||
internal DAC glue by default.
|
||||
|
||||
Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
|
||||
---
|
||||
sound/soc/meson/Kconfig | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/sound/soc/meson/Kconfig b/sound/soc/meson/Kconfig
|
||||
index 8b6295283989..363dc3b1bbe4 100644
|
||||
--- a/sound/soc/meson/Kconfig
|
||||
+++ b/sound/soc/meson/Kconfig
|
||||
@@ -68,6 +68,7 @@ config SND_MESON_AXG_SOUND_CARD
|
||||
imply SND_MESON_AXG_SPDIFOUT
|
||||
imply SND_MESON_AXG_SPDIFIN
|
||||
imply SND_MESON_AXG_PDM
|
||||
+ imply SND_MESON_G12A_TOACODEC
|
||||
imply SND_MESON_G12A_TOHDMITX if DRM_MESON_DW_HDMI
|
||||
help
|
||||
Select Y or M to add support for the AXG SoC sound card
|
||||
--
|
||||
2.17.1
|
||||
|
||||
@@ -0,0 +1,36 @@
|
||||
From 258f03fa4fd897a61b5861df1f809e234711dd49 Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <258f03fa4fd897a61b5861df1f809e234711dd49.1606829302.git.stefan@agner.ch>
|
||||
In-Reply-To: <9d2a2b44e67b0ef49e534c097e8b5e3e1173b033.1606829302.git.stefan@agner.ch>
|
||||
References: <9d2a2b44e67b0ef49e534c097e8b5e3e1173b033.1606829302.git.stefan@agner.ch>
|
||||
From: Christian Hewitt <christianshewitt@gmail.com>
|
||||
Date: Tue, 15 Sep 2020 17:24:31 +0200
|
||||
Subject: [PATCH 2/7] 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
|
||||
---
|
||||
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.29.2
|
||||
|
||||
@@ -1,47 +0,0 @@
|
||||
From 60164df03c6314d8f5f3afef56b0bf97962ec9ee Mon Sep 17 00:00:00 2001
|
||||
From: Jerome Brunet <jbrunet@baylibre.com>
|
||||
Date: Mon, 24 Feb 2020 14:35:17 +0100
|
||||
Subject: [PATCH 4/8] ASoC: meson: gx-card: fix sound-dai dt schema
|
||||
|
||||
There is a fair amount of warnings when running 'make dtbs_check' with
|
||||
amlogic,gx-sound-card.yaml.
|
||||
|
||||
Ex:
|
||||
arch/arm64/boot/dts/amlogic/meson-gxm-q200.dt.yaml: sound: dai-link-0:sound-dai:0:1: missing phandle tag in 0
|
||||
arch/arm64/boot/dts/amlogic/meson-gxm-q200.dt.yaml: sound: dai-link-0:sound-dai:0:2: missing phandle tag in 0
|
||||
arch/arm64/boot/dts/amlogic/meson-gxm-q200.dt.yaml: sound: dai-link-0:sound-dai:0: [66, 0, 0] is too long
|
||||
|
||||
The reason is that the sound-dai phandle provided has cells, and in such
|
||||
case the schema should use 'phandle-array' instead of 'phandle'.
|
||||
|
||||
Fixes: fd00366b8e41 ("ASoC: meson: gx: add sound card dt-binding documentation")
|
||||
Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
|
||||
---
|
||||
.../devicetree/bindings/sound/amlogic,gx-sound-card.yaml | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/Documentation/devicetree/bindings/sound/amlogic,gx-sound-card.yaml b/Documentation/devicetree/bindings/sound/amlogic,gx-sound-card.yaml
|
||||
index fb374c659be1..a48222e8cd08 100644
|
||||
--- a/Documentation/devicetree/bindings/sound/amlogic,gx-sound-card.yaml
|
||||
+++ b/Documentation/devicetree/bindings/sound/amlogic,gx-sound-card.yaml
|
||||
@@ -57,7 +57,7 @@ patternProperties:
|
||||
rate
|
||||
|
||||
sound-dai:
|
||||
- $ref: /schemas/types.yaml#/definitions/phandle
|
||||
+ $ref: /schemas/types.yaml#/definitions/phandle-array
|
||||
description: phandle of the CPU DAI
|
||||
|
||||
patternProperties:
|
||||
@@ -71,7 +71,7 @@ patternProperties:
|
||||
|
||||
properties:
|
||||
sound-dai:
|
||||
- $ref: /schemas/types.yaml#/definitions/phandle
|
||||
+ $ref: /schemas/types.yaml#/definitions/phandle-array
|
||||
description: phandle of the codec DAI
|
||||
|
||||
required:
|
||||
--
|
||||
2.17.1
|
||||
|
||||
@@ -1,31 +1,34 @@
|
||||
From 188bc924b34b7d845324eb2e0e7493a9eaeb2cb5 Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <188bc924b34b7d845324eb2e0e7493a9eaeb2cb5.1595882680.git.stefan@agner.ch>
|
||||
In-Reply-To: <d83d79b085486a605462fa91e3c6746e4ff0b263.1595882680.git.stefan@agner.ch>
|
||||
References: <d83d79b085486a605462fa91e3c6746e4ff0b263.1595882680.git.stefan@agner.ch>
|
||||
From 6cfaddae585e5a87c5253c932b8d58e153159f6b Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <6cfaddae585e5a87c5253c932b8d58e153159f6b.1606829302.git.stefan@agner.ch>
|
||||
In-Reply-To: <9d2a2b44e67b0ef49e534c097e8b5e3e1173b033.1606829302.git.stefan@agner.ch>
|
||||
References: <9d2a2b44e67b0ef49e534c097e8b5e3e1173b033.1606829302.git.stefan@agner.ch>
|
||||
From: Christian Hewitt <christianshewitt@gmail.com>
|
||||
Date: Sun, 19 Jul 2020 14:10:34 +0000
|
||||
Subject: [PATCH 10/10] arm64: dts: meson: add support for the ODROID-N2+
|
||||
Date: Tue, 15 Sep 2020 17:24:32 +0200
|
||||
Subject: [PATCH 3/7] 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. Hardkernel supports the big cpu
|
||||
cluster at 2.4GHz and the little cpu cluster at 2.0GHz. Opp points and
|
||||
regulator changess are from the HardKernel Linux kernel sources.
|
||||
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>
|
||||
[Integrated Neil Armstrong's feedback from mailing list]
|
||||
Signed-off-by: Stefan Agner <stefan@agner.ch>
|
||||
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
|
||||
---
|
||||
arch/arm64/boot/dts/amlogic/Makefile | 1 +
|
||||
.../dts/amlogic/meson-g12b-odroid-n2-plus.dts | 53 +++++++++++++++++++
|
||||
2 files changed, 54 insertions(+)
|
||||
.../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 eef0045320f2..7524cf9680f5 100644
|
||||
index 4e2239ffcaa5..b0b3d6791499 100644
|
||||
--- a/arch/arm64/boot/dts/amlogic/Makefile
|
||||
+++ b/arch/arm64/boot/dts/amlogic/Makefile
|
||||
@@ -6,6 +6,7 @@ dtb-$(CONFIG_ARCH_MESON) += meson-g12a-x96-max.dtb
|
||||
@@ -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
|
||||
@@ -35,10 +38,10 @@ index eef0045320f2..7524cf9680f5 100644
|
||||
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..4ebb448d233f
|
||||
index 000000000000..5de2815ba99d
|
||||
--- /dev/null
|
||||
+++ b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2-plus.dts
|
||||
@@ -0,0 +1,53 @@
|
||||
@@ -0,0 +1,31 @@
|
||||
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
|
||||
+/*
|
||||
+ * Copyright (c) 2019 BayLibre, SAS
|
||||
@@ -47,18 +50,20 @@ index 000000000000..4ebb448d233f
|
||||
+
|
||||
+/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-N2+";
|
||||
+ model = "Hardkernel ODROID-N2Plus";
|
||||
+};
|
||||
+
|
||||
+&vddcpu_a {
|
||||
+ regulator-min-microvolt = <680000>;
|
||||
+ regulator-max-microvolt = <1040000>;
|
||||
+
|
||||
+ pwms = <&pwm_ab 0 1500 0>;
|
||||
+ pwms = <&pwm_AO_cd 1 1500 0>;
|
||||
+};
|
||||
+
|
||||
+&vddcpu_b {
|
||||
@@ -68,30 +73,6 @@ index 000000000000..4ebb448d233f
|
||||
+ pwms = <&pwm_AO_cd 1 1500 0>;
|
||||
+};
|
||||
+
|
||||
+&cpu_opp_table_0 {
|
||||
+ opp-1908000000 {
|
||||
+ opp-hz = /bits/ 64 <1908000000>;
|
||||
+ opp-microvolt = <1030000>;
|
||||
+ };
|
||||
+
|
||||
+ opp-2016000000 {
|
||||
+ opp-hz = /bits/ 64 <2016000000>;
|
||||
+ opp-microvolt = <1040000>;
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&cpub_opp_table_1 {
|
||||
+ opp-2304000000 {
|
||||
+ opp-hz = /bits/ 64 <2304000000>;
|
||||
+ opp-microvolt = <1030000>;
|
||||
+ };
|
||||
+
|
||||
+ opp-2400000000 {
|
||||
+ opp-hz = /bits/ 64 <2400000000>;
|
||||
+ opp-microvolt = <1040000>;
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
--
|
||||
2.27.0
|
||||
2.29.2
|
||||
|
||||
@@ -1,39 +0,0 @@
|
||||
From e128dd1ca079c5ee558ab100387d9f81bd4f3980 Mon Sep 17 00:00:00 2001
|
||||
From: Jerome Brunet <jbrunet@baylibre.com>
|
||||
Date: Thu, 7 May 2020 00:16:55 +0200
|
||||
Subject: [PATCH 5/8] arm64: dts: meson: g12: add internal DAC
|
||||
|
||||
add internal audio DAC support on the g12 and sm1 SoC family
|
||||
|
||||
Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
|
||||
Signed-off-by: Kevin Hilman <khilman@baylibre.com>
|
||||
Link: https://lore.kernel.org/r/20200506221656.477379-7-jbrunet@baylibre.com
|
||||
---
|
||||
arch/arm64/boot/dts/amlogic/meson-g12-common.dtsi | 11 +++++++++++
|
||||
1 file changed, 11 insertions(+)
|
||||
|
||||
diff --git a/arch/arm64/boot/dts/amlogic/meson-g12-common.dtsi b/arch/arm64/boot/dts/amlogic/meson-g12-common.dtsi
|
||||
index c0aef7d69117..593a006f4b7b 100644
|
||||
--- a/arch/arm64/boot/dts/amlogic/meson-g12-common.dtsi
|
||||
+++ b/arch/arm64/boot/dts/amlogic/meson-g12-common.dtsi
|
||||
@@ -250,6 +250,17 @@
|
||||
};
|
||||
};
|
||||
|
||||
+ acodec: audio-controller@32000 {
|
||||
+ compatible = "amlogic,t9015";
|
||||
+ reg = <0x0 0x32000 0x0 0x14>;
|
||||
+ #sound-dai-cells = <0>;
|
||||
+ sound-name-prefix = "ACODEC";
|
||||
+ clocks = <&clkc CLKID_AUDIO_CODEC>;
|
||||
+ clock-names = "pclk";
|
||||
+ resets = <&reset RESET_AUDIO_CODEC>;
|
||||
+ status = "disabled";
|
||||
+ };
|
||||
+
|
||||
periphs: bus@34400 {
|
||||
compatible = "simple-bus";
|
||||
reg = <0x0 0x34400 0x0 0x400>;
|
||||
--
|
||||
2.17.1
|
||||
|
||||
@@ -0,0 +1,42 @@
|
||||
From 47f804dc970e2b1f71f1f032a0da2ef3b8315be0 Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <47f804dc970e2b1f71f1f032a0da2ef3b8315be0.1606829302.git.stefan@agner.ch>
|
||||
In-Reply-To: <9d2a2b44e67b0ef49e534c097e8b5e3e1173b033.1606829302.git.stefan@agner.ch>
|
||||
References: <9d2a2b44e67b0ef49e534c097e8b5e3e1173b033.1606829302.git.stefan@agner.ch>
|
||||
From: Jerome Brunet <jbrunet@baylibre.com>
|
||||
Date: Fri, 23 Oct 2020 11:41:39 +0200
|
||||
Subject: [PATCH 4/7] arm64: dts: meson: odroid-n2 plus: fix vddcpu_a pwm
|
||||
|
||||
On the odroid N2 plus, cpufreq is not available due to an error on the cpu
|
||||
regulators. vddcpu a and b get the same PWM. The one provided to vddcpu A
|
||||
is incorrect. Because vddcpu B PWM is busy the regulator cannot register:
|
||||
|
||||
> pwm-regulator regulator-vddcpu-b: Failed to get PWM: -16
|
||||
|
||||
Like on the odroid n2, use PWM A out of GPIOE_2 for vddcpu A to fix the
|
||||
problem
|
||||
|
||||
Fixes: 98d24896ee11 ("arm64: dts: meson: add support for the ODROID-N2+")
|
||||
Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
|
||||
Acked-by: Neil Armstrong <narmstrong@baylibre.com>
|
||||
Signed-off-by: Kevin Hilman <khilman@baylibre.com>
|
||||
Link: https://lore.kernel.org/r/20201023094139.809379-1-jbrunet@baylibre.com
|
||||
---
|
||||
arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2-plus.dts | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
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
|
||||
index 5de2815ba99d..ce1198ad34e4 100644
|
||||
--- a/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2-plus.dts
|
||||
+++ b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2-plus.dts
|
||||
@@ -19,7 +19,7 @@ &vddcpu_a {
|
||||
regulator-min-microvolt = <680000>;
|
||||
regulator-max-microvolt = <1040000>;
|
||||
|
||||
- pwms = <&pwm_AO_cd 1 1500 0>;
|
||||
+ pwms = <&pwm_ab 0 1500 0>;
|
||||
};
|
||||
|
||||
&vddcpu_b {
|
||||
--
|
||||
2.29.2
|
||||
|
||||
@@ -0,0 +1,52 @@
|
||||
From 2c15ad491233a80d61c811a944b86067e2e74686 Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <2c15ad491233a80d61c811a944b86067e2e74686.1606829302.git.stefan@agner.ch>
|
||||
In-Reply-To: <9d2a2b44e67b0ef49e534c097e8b5e3e1173b033.1606829302.git.stefan@agner.ch>
|
||||
References: <9d2a2b44e67b0ef49e534c097e8b5e3e1173b033.1606829302.git.stefan@agner.ch>
|
||||
From: Stefan Agner <stefan@agner.ch>
|
||||
Date: Mon, 16 Nov 2020 23:11:02 +0100
|
||||
Subject: [PATCH 5/7] arm64: dts: meson: add RTC to ODROID-N2 boards
|
||||
|
||||
All ODROID-N2 boards come with a NXP PCF8563TS RTC connected to I2C bus
|
||||
3. This is the RTC which is connected to the on-board RTC backup battery.
|
||||
Use it as primary RTC.
|
||||
|
||||
Signed-off-by: Stefan Agner <stefan@agner.ch>
|
||||
---
|
||||
.../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..40390feba053 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 = &board_rtc;
|
||||
+ rtc1 = &vrtc;
|
||||
};
|
||||
|
||||
dioo2133: audio-amplifier-0 {
|
||||
@@ -471,6 +473,18 @@ hdmi_tx_tmds_out: endpoint {
|
||||
};
|
||||
};
|
||||
|
||||
+&i2c3 {
|
||||
+ status = "okay";
|
||||
+ pinctrl-0 = <&i2c3_sda_a_pins>, <&i2c3_sck_a_pins>;
|
||||
+ pinctrl-names = "default";
|
||||
+ clock-frequency = <400000>;
|
||||
+
|
||||
+ board_rtc: rtc@51 {
|
||||
+ compatible = "nxp,pcf8563";
|
||||
+ reg = <0x51>;
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
&ir {
|
||||
status = "okay";
|
||||
pinctrl-0 = <&remote_input_ao_pins>;
|
||||
--
|
||||
2.29.2
|
||||
|
||||
@@ -1,39 +0,0 @@
|
||||
From 5ea4085da165fd3f3aa211cb3664dd166d0d5fd7 Mon Sep 17 00:00:00 2001
|
||||
From: Jerome Brunet <jbrunet@baylibre.com>
|
||||
Date: Thu, 7 May 2020 00:16:56 +0200
|
||||
Subject: [PATCH 6/8] arm64: dts: meson: g12: add internal DAC glue
|
||||
|
||||
add the internal DAC glue support on the g12 and sm1 family
|
||||
This glue connects the different TDM interfaces of the SoC to
|
||||
the internal audio DAC codec.
|
||||
|
||||
Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
|
||||
Signed-off-by: Kevin Hilman <khilman@baylibre.com>
|
||||
Link: https://lore.kernel.org/r/20200506221656.477379-8-jbrunet@baylibre.com
|
||||
---
|
||||
arch/arm64/boot/dts/amlogic/meson-g12.dtsi | 9 +++++++++
|
||||
1 file changed, 9 insertions(+)
|
||||
|
||||
diff --git a/arch/arm64/boot/dts/amlogic/meson-g12.dtsi b/arch/arm64/boot/dts/amlogic/meson-g12.dtsi
|
||||
index 55d39020ec72..0d14409f509c 100644
|
||||
--- a/arch/arm64/boot/dts/amlogic/meson-g12.dtsi
|
||||
+++ b/arch/arm64/boot/dts/amlogic/meson-g12.dtsi
|
||||
@@ -343,6 +343,15 @@
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
+ toacodec: audio-controller@740 {
|
||||
+ compatible = "amlogic,g12a-toacodec";
|
||||
+ reg = <0x0 0x740 0x0 0x4>;
|
||||
+ #sound-dai-cells = <1>;
|
||||
+ sound-name-prefix = "TOACODEC";
|
||||
+ resets = <&clkc_audio AUD_RESET_TOACODEC>;
|
||||
+ status = "disabled";
|
||||
+ };
|
||||
+
|
||||
tohdmitx: audio-controller@744 {
|
||||
compatible = "amlogic,g12a-tohdmitx";
|
||||
reg = <0x0 0x744 0x0 0x4>;
|
||||
--
|
||||
2.17.1
|
||||
|
||||
@@ -1,123 +0,0 @@
|
||||
From 15b3cef2ea75c4d81cb067264be1cf49c49f81b1 Mon Sep 17 00:00:00 2001
|
||||
From: Jerome Brunet <jbrunet@baylibre.com>
|
||||
Date: Mon, 15 Jun 2020 15:38:44 +0200
|
||||
Subject: [PATCH 7/8] arm64: dts: meson-g12b: odroid-n2: enable audio loopback
|
||||
|
||||
Add capture pcm interfaces and loopback routes to the odroid-n2
|
||||
|
||||
Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
|
||||
---
|
||||
.../boot/dts/amlogic/meson-g12b-odroid-n2.dts | 65 +++++++++++++++++--
|
||||
1 file changed, 61 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dts b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dts
|
||||
index 169ea283d4ee..d4421ad164bd 100644
|
||||
--- a/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dts
|
||||
+++ b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dts
|
||||
@@ -209,11 +209,28 @@
|
||||
sound {
|
||||
compatible = "amlogic,axg-sound-card";
|
||||
model = "G12B-ODROID-N2";
|
||||
- audio-aux-devs = <&tdmout_b>;
|
||||
+ audio-aux-devs = <&tdmout_b>, <&tdmin_a>, <&tdmin_b>,
|
||||
+ <&tdmin_c>, <&tdmin_lb>;
|
||||
audio-routing = "TDMOUT_B IN 0", "FRDDR_A OUT 1",
|
||||
"TDMOUT_B IN 1", "FRDDR_B OUT 1",
|
||||
"TDMOUT_B IN 2", "FRDDR_C OUT 1",
|
||||
- "TDM_B Playback", "TDMOUT_B OUT";
|
||||
+ "TDM_B Playback", "TDMOUT_B OUT",
|
||||
+ "TDMIN_A IN 4", "TDM_B Loopback",
|
||||
+ "TDMIN_B IN 4", "TDM_B Loopback",
|
||||
+ "TDMIN_C IN 4", "TDM_B Loopback",
|
||||
+ "TDMIN_LB IN 1", "TDM_B Loopback",
|
||||
+ "TODDR_A IN 0", "TDMIN_A OUT",
|
||||
+ "TODDR_B IN 0", "TDMIN_A OUT",
|
||||
+ "TODDR_C IN 0", "TDMIN_A OUT",
|
||||
+ "TODDR_A IN 1", "TDMIN_B OUT",
|
||||
+ "TODDR_B IN 1", "TDMIN_B OUT",
|
||||
+ "TODDR_C IN 1", "TDMIN_B OUT",
|
||||
+ "TODDR_A IN 2", "TDMIN_C OUT",
|
||||
+ "TODDR_B IN 2", "TDMIN_C OUT",
|
||||
+ "TODDR_C IN 2", "TDMIN_C OUT",
|
||||
+ "TODDR_A IN 6", "TDMIN_LB OUT",
|
||||
+ "TODDR_B IN 6", "TDMIN_LB OUT",
|
||||
+ "TODDR_C IN 6", "TDMIN_LB OUT";
|
||||
|
||||
assigned-clocks = <&clkc CLKID_MPLL2>,
|
||||
<&clkc CLKID_MPLL0>,
|
||||
@@ -236,8 +253,20 @@
|
||||
sound-dai = <&frddr_c>;
|
||||
};
|
||||
|
||||
- /* 8ch hdmi interface */
|
||||
dai-link-3 {
|
||||
+ sound-dai = <&toddr_a>;
|
||||
+ };
|
||||
+
|
||||
+ dai-link-4 {
|
||||
+ sound-dai = <&toddr_b>;
|
||||
+ };
|
||||
+
|
||||
+ dai-link-5 {
|
||||
+ sound-dai = <&toddr_c>;
|
||||
+ };
|
||||
+
|
||||
+ /* 8ch hdmi interface */
|
||||
+ dai-link-6 {
|
||||
sound-dai = <&tdmif_b>;
|
||||
dai-format = "i2s";
|
||||
dai-tdm-slot-tx-mask-0 = <1 1>;
|
||||
@@ -252,7 +281,7 @@
|
||||
};
|
||||
|
||||
/* hdmi glue */
|
||||
- dai-link-4 {
|
||||
+ dai-link-7 {
|
||||
sound-dai = <&tohdmitx TOHDMITX_I2S_OUT>;
|
||||
|
||||
codec {
|
||||
@@ -476,6 +505,22 @@
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
+&tdmin_a {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&tdmin_b {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&tdmin_c {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&tdmin_lb {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
&tdmout_b {
|
||||
status = "okay";
|
||||
};
|
||||
@@ -484,6 +529,18 @@
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
+&toddr_a {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&toddr_b {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&toddr_c {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
&uart_AO {
|
||||
status = "okay";
|
||||
pinctrl-0 = <&uart_ao_a_pins>;
|
||||
--
|
||||
2.17.1
|
||||
|
||||
@@ -0,0 +1,41 @@
|
||||
From 35d2de7b27bc3f4bc2d977fb6b7671d9ba889496 Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <35d2de7b27bc3f4bc2d977fb6b7671d9ba889496.1606829302.git.stefan@agner.ch>
|
||||
In-Reply-To: <9d2a2b44e67b0ef49e534c097e8b5e3e1173b033.1606829302.git.stefan@agner.ch>
|
||||
References: <9d2a2b44e67b0ef49e534c097e8b5e3e1173b033.1606829302.git.stefan@agner.ch>
|
||||
From: Stefan Agner <stefan@agner.ch>
|
||||
Date: Tue, 1 Dec 2020 00:32:23 +0100
|
||||
Subject: [PATCH 6/7] arm64: dts: meson: g12b: odroid-n2: fix PHY deassert
|
||||
timing requirements
|
||||
|
||||
According to the datasheet (Rev. 1.9) the RTL8211F requires at least
|
||||
72ms "for internal circuits settling time" before accessing the PHY
|
||||
egisters. This fixes an issue where the Ethernet link doesn't come up
|
||||
when using ip link set down/up:
|
||||
[ 29.360965] meson8b-dwmac ff3f0000.ethernet eth0: Link is Down
|
||||
[ 34.569012] meson8b-dwmac ff3f0000.ethernet eth0: PHY [0.0:00] driver [RTL8211F Gigabit Ethernet] (irq=31)
|
||||
[ 34.676732] meson8b-dwmac ff3f0000.ethernet: Failed to reset the dma
|
||||
[ 34.678874] meson8b-dwmac ff3f0000.ethernet eth0: stmmac_hw_setup: DMA engine initialization failed
|
||||
[ 34.687850] meson8b-dwmac ff3f0000.ethernet eth0: stmmac_open: Hw setup failed
|
||||
|
||||
Fixes: 658e4129bb81 ("arm64: dts: meson: g12b: odroid-n2: add the Ethernet PHY reset line")
|
||||
Signed-off-by: Stefan Agner <stefan@agner.ch>
|
||||
---
|
||||
arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
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 40390feba053..445d90d25aa3 100644
|
||||
--- a/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi
|
||||
+++ b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi
|
||||
@@ -415,7 +415,7 @@ external_phy: ethernet-phy@0 {
|
||||
max-speed = <1000>;
|
||||
|
||||
reset-assert-us = <10000>;
|
||||
- reset-deassert-us = <30000>;
|
||||
+ reset-deassert-us = <80000>;
|
||||
reset-gpios = <&gpio GPIOZ_15 (GPIO_ACTIVE_LOW | GPIO_OPEN_DRAIN)>;
|
||||
|
||||
interrupt-parent = <&gpio_intc>;
|
||||
--
|
||||
2.29.2
|
||||
|
||||
@@ -0,0 +1,152 @@
|
||||
From 40e8e7e28c44993e352195b359c4d4540bfb2105 Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <40e8e7e28c44993e352195b359c4d4540bfb2105.1606829302.git.stefan@agner.ch>
|
||||
In-Reply-To: <9d2a2b44e67b0ef49e534c097e8b5e3e1173b033.1606829302.git.stefan@agner.ch>
|
||||
References: <9d2a2b44e67b0ef49e534c097e8b5e3e1173b033.1606829302.git.stefan@agner.ch>
|
||||
From: Stefan Agner <stefan@agner.ch>
|
||||
Date: Tue, 1 Dec 2020 00:32:23 +0100
|
||||
Subject: [PATCH 7/7] arm64: dts: meson: fix PHY deassert timing requirements
|
||||
|
||||
According to the datasheet (Rev. 1.9) the RTL8211F requires at least
|
||||
72ms "for internal circuits settling time" before accessing the PHY
|
||||
egisters. This fixes an issue seen on ODROID-C2 where the Ethernet
|
||||
link doesn't come up when using ip link set down/up:
|
||||
[ 6630.714855] meson8b-dwmac c9410000.ethernet eth0: Link is Down
|
||||
[ 6630.785775] meson8b-dwmac c9410000.ethernet eth0: PHY [stmmac-0:00] driver [RTL8211F Gigabit Ethernet] (irq=36)
|
||||
[ 6630.893071] meson8b-dwmac c9410000.ethernet: Failed to reset the dma
|
||||
[ 6630.893800] meson8b-dwmac c9410000.ethernet eth0: stmmac_hw_setup: DMA engine initialization failed
|
||||
[ 6630.902835] meson8b-dwmac c9410000.ethernet eth0: stmmac_open: Hw setup failed
|
||||
|
||||
Fixes: f29cabf240ed ("arm64: dts: meson: use the generic Ethernet PHY reset GPIO bindings")
|
||||
Signed-off-by: Stefan Agner <stefan@agner.ch>
|
||||
---
|
||||
arch/arm64/boot/dts/amlogic/meson-gxbb-nanopi-k2.dts | 2 +-
|
||||
arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts | 2 +-
|
||||
arch/arm64/boot/dts/amlogic/meson-gxbb-vega-s95.dtsi | 2 +-
|
||||
arch/arm64/boot/dts/amlogic/meson-gxbb-wetek.dtsi | 2 +-
|
||||
arch/arm64/boot/dts/amlogic/meson-gxl-s905d-p230.dts | 2 +-
|
||||
arch/arm64/boot/dts/amlogic/meson-gxm-khadas-vim2.dts | 2 +-
|
||||
arch/arm64/boot/dts/amlogic/meson-gxm-nexbox-a1.dts | 2 +-
|
||||
arch/arm64/boot/dts/amlogic/meson-gxm-q200.dts | 2 +-
|
||||
arch/arm64/boot/dts/amlogic/meson-gxm-rbox-pro.dts | 2 +-
|
||||
9 files changed, 9 insertions(+), 9 deletions(-)
|
||||
|
||||
diff --git a/arch/arm64/boot/dts/amlogic/meson-gxbb-nanopi-k2.dts b/arch/arm64/boot/dts/amlogic/meson-gxbb-nanopi-k2.dts
|
||||
index 7be3e354093b..de27beafe9db 100644
|
||||
--- a/arch/arm64/boot/dts/amlogic/meson-gxbb-nanopi-k2.dts
|
||||
+++ b/arch/arm64/boot/dts/amlogic/meson-gxbb-nanopi-k2.dts
|
||||
@@ -165,7 +165,7 @@ eth_phy0: ethernet-phy@0 {
|
||||
reg = <0>;
|
||||
|
||||
reset-assert-us = <10000>;
|
||||
- reset-deassert-us = <30000>;
|
||||
+ reset-deassert-us = <80000>;
|
||||
reset-gpios = <&gpio GPIOZ_14 GPIO_ACTIVE_LOW>;
|
||||
|
||||
interrupt-parent = <&gpio_intc>;
|
||||
diff --git a/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts b/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts
|
||||
index 70fcfb7b0683..50de1d01e565 100644
|
||||
--- a/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts
|
||||
+++ b/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts
|
||||
@@ -200,7 +200,7 @@ eth_phy0: ethernet-phy@0 {
|
||||
reg = <0>;
|
||||
|
||||
reset-assert-us = <10000>;
|
||||
- reset-deassert-us = <30000>;
|
||||
+ reset-deassert-us = <80000>;
|
||||
reset-gpios = <&gpio GPIOZ_14 GPIO_ACTIVE_LOW>;
|
||||
|
||||
interrupt-parent = <&gpio_intc>;
|
||||
diff --git a/arch/arm64/boot/dts/amlogic/meson-gxbb-vega-s95.dtsi b/arch/arm64/boot/dts/amlogic/meson-gxbb-vega-s95.dtsi
|
||||
index 222ee8069cfa..9b0b81f191f1 100644
|
||||
--- a/arch/arm64/boot/dts/amlogic/meson-gxbb-vega-s95.dtsi
|
||||
+++ b/arch/arm64/boot/dts/amlogic/meson-gxbb-vega-s95.dtsi
|
||||
@@ -126,7 +126,7 @@ eth_phy0: ethernet-phy@0 {
|
||||
reg = <0>;
|
||||
|
||||
reset-assert-us = <10000>;
|
||||
- reset-deassert-us = <30000>;
|
||||
+ reset-deassert-us = <80000>;
|
||||
reset-gpios = <&gpio GPIOZ_14 GPIO_ACTIVE_LOW>;
|
||||
|
||||
interrupt-parent = <&gpio_intc>;
|
||||
diff --git a/arch/arm64/boot/dts/amlogic/meson-gxbb-wetek.dtsi b/arch/arm64/boot/dts/amlogic/meson-gxbb-wetek.dtsi
|
||||
index ad812854a107..a350fee1264d 100644
|
||||
--- a/arch/arm64/boot/dts/amlogic/meson-gxbb-wetek.dtsi
|
||||
+++ b/arch/arm64/boot/dts/amlogic/meson-gxbb-wetek.dtsi
|
||||
@@ -147,7 +147,7 @@ eth_phy0: ethernet-phy@0 {
|
||||
reg = <0>;
|
||||
|
||||
reset-assert-us = <10000>;
|
||||
- reset-deassert-us = <30000>;
|
||||
+ reset-deassert-us = <80000>;
|
||||
reset-gpios = <&gpio GPIOZ_14 GPIO_ACTIVE_LOW>;
|
||||
|
||||
interrupt-parent = <&gpio_intc>;
|
||||
diff --git a/arch/arm64/boot/dts/amlogic/meson-gxl-s905d-p230.dts b/arch/arm64/boot/dts/amlogic/meson-gxl-s905d-p230.dts
|
||||
index b08c4537f260..b2ab05c22090 100644
|
||||
--- a/arch/arm64/boot/dts/amlogic/meson-gxl-s905d-p230.dts
|
||||
+++ b/arch/arm64/boot/dts/amlogic/meson-gxl-s905d-p230.dts
|
||||
@@ -82,7 +82,7 @@ external_phy: ethernet-phy@0 {
|
||||
|
||||
/* External PHY reset is shared with internal PHY Led signal */
|
||||
reset-assert-us = <10000>;
|
||||
- reset-deassert-us = <30000>;
|
||||
+ reset-deassert-us = <80000>;
|
||||
reset-gpios = <&gpio GPIOZ_14 GPIO_ACTIVE_LOW>;
|
||||
|
||||
interrupt-parent = <&gpio_intc>;
|
||||
diff --git a/arch/arm64/boot/dts/amlogic/meson-gxm-khadas-vim2.dts b/arch/arm64/boot/dts/amlogic/meson-gxm-khadas-vim2.dts
|
||||
index bff8ec2c1c70..e38d9e50caa7 100644
|
||||
--- a/arch/arm64/boot/dts/amlogic/meson-gxm-khadas-vim2.dts
|
||||
+++ b/arch/arm64/boot/dts/amlogic/meson-gxm-khadas-vim2.dts
|
||||
@@ -194,7 +194,7 @@ external_phy: ethernet-phy@0 {
|
||||
reg = <0>;
|
||||
|
||||
reset-assert-us = <10000>;
|
||||
- reset-deassert-us = <30000>;
|
||||
+ reset-deassert-us = <80000>;
|
||||
reset-gpios = <&gpio GPIOZ_14 GPIO_ACTIVE_LOW>;
|
||||
|
||||
interrupt-parent = <&gpio_intc>;
|
||||
diff --git a/arch/arm64/boot/dts/amlogic/meson-gxm-nexbox-a1.dts b/arch/arm64/boot/dts/amlogic/meson-gxm-nexbox-a1.dts
|
||||
index 83eca3af44ce..dfa7a37a1281 100644
|
||||
--- a/arch/arm64/boot/dts/amlogic/meson-gxm-nexbox-a1.dts
|
||||
+++ b/arch/arm64/boot/dts/amlogic/meson-gxm-nexbox-a1.dts
|
||||
@@ -112,7 +112,7 @@ external_phy: ethernet-phy@0 {
|
||||
max-speed = <1000>;
|
||||
|
||||
reset-assert-us = <10000>;
|
||||
- reset-deassert-us = <30000>;
|
||||
+ reset-deassert-us = <80000>;
|
||||
reset-gpios = <&gpio GPIOZ_14 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
};
|
||||
diff --git a/arch/arm64/boot/dts/amlogic/meson-gxm-q200.dts b/arch/arm64/boot/dts/amlogic/meson-gxm-q200.dts
|
||||
index ea45ae0c71b7..8edbfe040805 100644
|
||||
--- a/arch/arm64/boot/dts/amlogic/meson-gxm-q200.dts
|
||||
+++ b/arch/arm64/boot/dts/amlogic/meson-gxm-q200.dts
|
||||
@@ -64,7 +64,7 @@ external_phy: ethernet-phy@0 {
|
||||
|
||||
/* External PHY reset is shared with internal PHY Led signal */
|
||||
reset-assert-us = <10000>;
|
||||
- reset-deassert-us = <30000>;
|
||||
+ reset-deassert-us = <80000>;
|
||||
reset-gpios = <&gpio GPIOZ_14 GPIO_ACTIVE_LOW>;
|
||||
|
||||
interrupt-parent = <&gpio_intc>;
|
||||
diff --git a/arch/arm64/boot/dts/amlogic/meson-gxm-rbox-pro.dts b/arch/arm64/boot/dts/amlogic/meson-gxm-rbox-pro.dts
|
||||
index c89c9f846fb1..dde7cfe12cff 100644
|
||||
--- a/arch/arm64/boot/dts/amlogic/meson-gxm-rbox-pro.dts
|
||||
+++ b/arch/arm64/boot/dts/amlogic/meson-gxm-rbox-pro.dts
|
||||
@@ -114,7 +114,7 @@ external_phy: ethernet-phy@0 {
|
||||
max-speed = <1000>;
|
||||
|
||||
reset-assert-us = <10000>;
|
||||
- reset-deassert-us = <30000>;
|
||||
+ reset-deassert-us = <80000>;
|
||||
reset-gpios = <&gpio GPIOZ_14 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
};
|
||||
--
|
||||
2.29.2
|
||||
|
||||
@@ -1,168 +0,0 @@
|
||||
From 978cc250574b7f1ab45f494cc2a094e3c9fd1fa4 Mon Sep 17 00:00:00 2001
|
||||
From: Jerome Brunet <jbrunet@baylibre.com>
|
||||
Date: Mon, 15 Jun 2020 16:34:37 +0200
|
||||
Subject: [PATCH 8/8] arm64: dts: meson: odroid-n2: add jack audio output
|
||||
support
|
||||
|
||||
Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
|
||||
---
|
||||
.../boot/dts/amlogic/meson-g12b-odroid-n2.dts | 79 +++++++++++++++++--
|
||||
1 file changed, 74 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dts b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dts
|
||||
index d4421ad164bd..34fffa6d859d 100644
|
||||
--- a/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dts
|
||||
+++ b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dts
|
||||
@@ -9,6 +9,7 @@
|
||||
#include "meson-g12b-s922x.dtsi"
|
||||
#include <dt-bindings/input/input.h>
|
||||
#include <dt-bindings/gpio/meson-g12a-gpio.h>
|
||||
+#include <dt-bindings/sound/meson-g12a-toacodec.h>
|
||||
#include <dt-bindings/sound/meson-g12a-tohdmitx.h>
|
||||
|
||||
/ {
|
||||
@@ -20,6 +21,14 @@
|
||||
ethernet0 = ðmac;
|
||||
};
|
||||
|
||||
+ dioo2133: audio-amplifier-0 {
|
||||
+ compatible = "simple-audio-amplifier";
|
||||
+ enable-gpios = <&gpio_ao GPIOAO_2 GPIO_ACTIVE_HIGH>;
|
||||
+ VCC-supply = <&vcc_5v>;
|
||||
+ sound-name-prefix = "U19";
|
||||
+ status = "okay";
|
||||
+ };
|
||||
+
|
||||
chosen {
|
||||
stdout-path = "serial0:115200n8";
|
||||
};
|
||||
@@ -209,16 +218,26 @@
|
||||
sound {
|
||||
compatible = "amlogic,axg-sound-card";
|
||||
model = "G12B-ODROID-N2";
|
||||
- audio-aux-devs = <&tdmout_b>, <&tdmin_a>, <&tdmin_b>,
|
||||
- <&tdmin_c>, <&tdmin_lb>;
|
||||
+ audio-widgets = "Line", "Lineout";
|
||||
+ audio-aux-devs = <&tdmout_b>, <&tdmout_c>, <&tdmin_a>,
|
||||
+ <&tdmin_b>, <&tdmin_c>, <&tdmin_lb>,
|
||||
+ <&dioo2133>;
|
||||
audio-routing = "TDMOUT_B IN 0", "FRDDR_A OUT 1",
|
||||
"TDMOUT_B IN 1", "FRDDR_B OUT 1",
|
||||
"TDMOUT_B IN 2", "FRDDR_C OUT 1",
|
||||
"TDM_B Playback", "TDMOUT_B OUT",
|
||||
+ "TDMOUT_C IN 0", "FRDDR_A OUT 2",
|
||||
+ "TDMOUT_C IN 1", "FRDDR_B OUT 2",
|
||||
+ "TDMOUT_C IN 2", "FRDDR_C OUT 2",
|
||||
+ "TDM_C Playback", "TDMOUT_C OUT",
|
||||
"TDMIN_A IN 4", "TDM_B Loopback",
|
||||
"TDMIN_B IN 4", "TDM_B Loopback",
|
||||
"TDMIN_C IN 4", "TDM_B Loopback",
|
||||
"TDMIN_LB IN 1", "TDM_B Loopback",
|
||||
+ "TDMIN_A IN 5", "TDM_C Loopback",
|
||||
+ "TDMIN_B IN 5", "TDM_C Loopback",
|
||||
+ "TDMIN_C IN 5", "TDM_C Loopback",
|
||||
+ "TDMIN_LB IN 2", "TDM_C Loopback",
|
||||
"TODDR_A IN 0", "TDMIN_A OUT",
|
||||
"TODDR_B IN 0", "TDMIN_A OUT",
|
||||
"TODDR_C IN 0", "TDMIN_A OUT",
|
||||
@@ -230,7 +249,11 @@
|
||||
"TODDR_C IN 2", "TDMIN_C OUT",
|
||||
"TODDR_A IN 6", "TDMIN_LB OUT",
|
||||
"TODDR_B IN 6", "TDMIN_LB OUT",
|
||||
- "TODDR_C IN 6", "TDMIN_LB OUT";
|
||||
+ "TODDR_C IN 6", "TDMIN_LB OUT",
|
||||
+ "U19 INL", "ACODEC LOLP",
|
||||
+ "U19 INR", "ACODEC LORP",
|
||||
+ "Lineout", "U19 OUTL",
|
||||
+ "Lineout", "U19 OUTR";
|
||||
|
||||
assigned-clocks = <&clkc CLKID_MPLL2>,
|
||||
<&clkc CLKID_MPLL0>,
|
||||
@@ -275,22 +298,56 @@
|
||||
dai-tdm-slot-tx-mask-3 = <1 1>;
|
||||
mclk-fs = <256>;
|
||||
|
||||
- codec {
|
||||
+ codec-0 {
|
||||
sound-dai = <&tohdmitx TOHDMITX_I2S_IN_B>;
|
||||
};
|
||||
+
|
||||
+ codec-1 {
|
||||
+ sound-dai = <&toacodec TOACODEC_IN_B>;
|
||||
+ };
|
||||
};
|
||||
|
||||
- /* hdmi glue */
|
||||
+ /* i2s jack output interface */
|
||||
dai-link-7 {
|
||||
+ sound-dai = <&tdmif_c>;
|
||||
+ dai-format = "i2s";
|
||||
+ dai-tdm-slot-tx-mask-0 = <1 1>;
|
||||
+ mclk-fs = <256>;
|
||||
+
|
||||
+ codec-0 {
|
||||
+ sound-dai = <&tohdmitx TOHDMITX_I2S_IN_C>;
|
||||
+ };
|
||||
+
|
||||
+ codec-1 {
|
||||
+ sound-dai = <&toacodec TOACODEC_IN_C>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ /* hdmi glue */
|
||||
+ dai-link-8 {
|
||||
sound-dai = <&tohdmitx TOHDMITX_I2S_OUT>;
|
||||
|
||||
codec {
|
||||
sound-dai = <&hdmi_tx>;
|
||||
};
|
||||
};
|
||||
+
|
||||
+ /* acodec glue */
|
||||
+ dai-link-9 {
|
||||
+ sound-dai = <&toacodec TOACODEC_OUT>;
|
||||
+
|
||||
+ codec {
|
||||
+ sound-dai = <&acodec>;
|
||||
+ };
|
||||
+ };
|
||||
};
|
||||
};
|
||||
|
||||
+&acodec {
|
||||
+ AVDD-supply = <&vddao_1v8>;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
&arb {
|
||||
status = "okay";
|
||||
};
|
||||
@@ -505,6 +562,10 @@
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
+&tdmif_c {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
&tdmin_a {
|
||||
status = "okay";
|
||||
};
|
||||
@@ -525,6 +586,14 @@
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
+&tdmout_c {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&toacodec {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
&tohdmitx {
|
||||
status = "okay";
|
||||
};
|
||||
--
|
||||
2.17.1
|
||||
|
||||
@@ -1,32 +0,0 @@
|
||||
From 54d8ae2ae7a10dab6998b2d4ac507aec96c6f1da Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <54d8ae2ae7a10dab6998b2d4ac507aec96c6f1da.1595882680.git.stefan@agner.ch>
|
||||
In-Reply-To: <d83d79b085486a605462fa91e3c6746e4ff0b263.1595882680.git.stefan@agner.ch>
|
||||
References: <d83d79b085486a605462fa91e3c6746e4ff0b263.1595882680.git.stefan@agner.ch>
|
||||
From: Christian Hewitt <christianshewitt@gmail.com>
|
||||
Date: Sun, 19 Jul 2020 14:10:33 +0000
|
||||
Subject: [PATCH 09/10] 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>
|
||||
---
|
||||
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 f74aba48cec1..915ef4f355ad 100644
|
||||
--- a/Documentation/devicetree/bindings/arm/amlogic.yaml
|
||||
+++ b/Documentation/devicetree/bindings/arm/amlogic.yaml
|
||||
@@ -149,6 +149,7 @@ properties:
|
||||
items:
|
||||
- enum:
|
||||
- hardkernel,odroid-n2
|
||||
+ - hardkernel,odroid-n2-plus
|
||||
- khadas,vim3
|
||||
- ugoos,am6
|
||||
- const: amlogic,s922x
|
||||
--
|
||||
2.27.0
|
||||
|
||||
@@ -1,38 +0,0 @@
|
||||
From c33df0ebe8be16b56741ce7f873221ab9087a0a6 Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <c33df0ebe8be16b56741ce7f873221ab9087a0a6.1598564789.git.stefan@agner.ch>
|
||||
In-Reply-To: <f72fc1866396fed30036e0f06007c15217e47f22.1598564789.git.stefan@agner.ch>
|
||||
References: <f72fc1866396fed30036e0f06007c15217e47f22.1598564789.git.stefan@agner.ch>
|
||||
From: Stefan Agner <stefan@agner.ch>
|
||||
Date: Thu, 27 Aug 2020 23:29:57 +0200
|
||||
Subject: [PATCH 11/11] clk: meson: g12a: mark fclk_div2 as critical
|
||||
|
||||
On Amlogic Meson G12b platform, similar to fclk_div3, the fclk_div2
|
||||
seems to be necessary for the system to operate correctly as well.
|
||||
|
||||
Typically, the clock also gets chosen by the eMMC peripheral. This
|
||||
probably masked the problem so far. However, when booting from a SD
|
||||
card the clock seems to get disabled which leads to a system freeze.
|
||||
|
||||
Let's mark this clock as critical, fixing boot from SD card on G12b
|
||||
platforms.
|
||||
|
||||
Signed-off-by: Stefan Agner <stefan@agner.ch>
|
||||
---
|
||||
drivers/clk/meson/g12a.c | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/drivers/clk/meson/g12a.c b/drivers/clk/meson/g12a.c
|
||||
index fad616cac01e..2214b974f748 100644
|
||||
--- a/drivers/clk/meson/g12a.c
|
||||
+++ b/drivers/clk/meson/g12a.c
|
||||
@@ -298,6 +298,7 @@ static struct clk_regmap g12a_fclk_div2 = {
|
||||
&g12a_fclk_div2_div.hw
|
||||
},
|
||||
.num_parents = 1,
|
||||
+ .flags = CLK_IS_CRITICAL,
|
||||
},
|
||||
};
|
||||
|
||||
--
|
||||
2.28.0
|
||||
|
||||
@@ -1,24 +1,22 @@
|
||||
From fb41bcaf0e61e78bc40addb1312040a2bc6a69b7 Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <fb41bcaf0e61e78bc40addb1312040a2bc6a69b7.1598875349.git.stefan@agner.ch>
|
||||
In-Reply-To: <c12338d22649e46aed12ebe60d897112f045fda9.1598875349.git.stefan@agner.ch>
|
||||
References: <c12338d22649e46aed12ebe60d897112f045fda9.1598875349.git.stefan@agner.ch>
|
||||
From f9877c2895d6c05710a828d0cd46d9f25626b070 Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <f9877c2895d6c05710a828d0cd46d9f25626b070.1609421746.git.stefan@agner.ch>
|
||||
From: Stefan Agner <stefan@agner.ch>
|
||||
Date: Mon, 31 Aug 2020 13:40:18 +0200
|
||||
Subject: [PATCH 2/4] ARM: meson: isolate loading of socinfo
|
||||
Subject: [PATCH 1/4] ARM: meson: isolate loading of socinfo
|
||||
|
||||
Move loading of socinfo into a separate function so the value can be
|
||||
reused later.
|
||||
|
||||
Signed-off-by: Stefan Agner <stefan@agner.ch>
|
||||
---
|
||||
arch/arm/mach-meson/board-info.c | 20 ++++++++++++++++++--
|
||||
1 file changed, 18 insertions(+), 2 deletions(-)
|
||||
arch/arm/mach-meson/board-info.c | 14 +++++++++++++-
|
||||
1 file changed, 13 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/arch/arm/mach-meson/board-info.c b/arch/arm/mach-meson/board-info.c
|
||||
index 0d3b40a249..e305d60dca 100644
|
||||
index 3abb27e03b..c585b12ca5 100644
|
||||
--- a/arch/arm/mach-meson/board-info.c
|
||||
+++ b/arch/arm/mach-meson/board-info.c
|
||||
@@ -123,12 +123,16 @@ static void print_board_model(void)
|
||||
@@ -126,7 +126,7 @@ static void print_board_model(void)
|
||||
printf("Model: %s\n", model ? model : "Unknown");
|
||||
}
|
||||
|
||||
@@ -27,17 +25,7 @@ index 0d3b40a249..e305d60dca 100644
|
||||
{
|
||||
struct regmap *regmap;
|
||||
int nodeoffset, ret;
|
||||
ofnode node;
|
||||
- unsigned int socinfo;
|
||||
+ static unsigned int socinfo = 0;
|
||||
+
|
||||
+ /* Empty socinfo is invalid, so !socinfo is successfully initialized */
|
||||
+ if (socinfo)
|
||||
+ return socinfo;
|
||||
|
||||
/* find the offset of compatible node */
|
||||
nodeoffset = fdt_node_offset_by_compatible(gd->fdt_blob, -1,
|
||||
@@ -155,8 +159,20 @@ int show_board_info(void)
|
||||
@@ -158,8 +158,20 @@ int show_board_info(void)
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -59,5 +47,5 @@ index 0d3b40a249..e305d60dca 100644
|
||||
socinfo_to_soc_id(socinfo),
|
||||
socinfo_to_package_id(socinfo),
|
||||
--
|
||||
2.28.0
|
||||
2.30.0
|
||||
|
||||
@@ -1,55 +0,0 @@
|
||||
From b93c598b1acfe59ffac342d114483af8a45a78ac Mon Sep 17 00:00:00 2001
|
||||
From: Pascal Vizeli <pvizeli@syshack.ch>
|
||||
Date: Sat, 1 Feb 2020 20:55:39 +0000
|
||||
Subject: [PATCH 1/1] Amlogic w400: read ethaddr from efuse
|
||||
|
||||
Signed-off-by: Pascal Vizeli <pvizeli@syshack.ch>
|
||||
---
|
||||
board/amlogic/w400/w400.c | 25 ++++++++++++++++++++++++-
|
||||
1 file changed, 24 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/board/amlogic/w400/w400.c b/board/amlogic/w400/w400.c
|
||||
index e60dc3a622..d4028c6a39 100644
|
||||
--- a/board/amlogic/w400/w400.c
|
||||
+++ b/board/amlogic/w400/w400.c
|
||||
@@ -6,13 +6,36 @@
|
||||
|
||||
#include <common.h>
|
||||
#include <dm.h>
|
||||
-#include <env_internal.h>
|
||||
+#include <env.h>
|
||||
#include <asm/io.h>
|
||||
+#include <asm/arch/sm.h>
|
||||
#include <asm/arch/eth.h>
|
||||
|
||||
+#define EFUSE_MAC_OFFSET 20
|
||||
+#define EFUSE_MAC_SIZE 12
|
||||
+
|
||||
int misc_init_r(void)
|
||||
{
|
||||
+ u8 mac_addr[6];
|
||||
+ char efuse_mac_addr[EFUSE_MAC_SIZE], buff[3];
|
||||
+ ssize_t len;
|
||||
+
|
||||
meson_eth_init(PHY_INTERFACE_MODE_RGMII, 0);
|
||||
|
||||
+ if (!eth_env_get_enetaddr("ethaddr", mac_addr)) {
|
||||
+ len = meson_sm_read_efuse(EFUSE_MAC_OFFSET,
|
||||
+ efuse_mac_addr, EFUSE_MAC_SIZE);
|
||||
+ if (len != EFUSE_MAC_SIZE)
|
||||
+ return 0;
|
||||
+
|
||||
+ for (int i = 0; i < 6; i++){
|
||||
+ buff[0] = efuse_mac_addr[i * 2];
|
||||
+ buff[1] = efuse_mac_addr[i * 2 + 1];
|
||||
+ mac_addr[i] = simple_strtoul(buff, NULL, 16);
|
||||
+ }
|
||||
+ if(is_valid_ethaddr(mac_addr))
|
||||
+ eth_env_set_enetaddr("ethaddr", mac_addr);
|
||||
+ }
|
||||
+
|
||||
return 0;
|
||||
}
|
||||
--
|
||||
2.17.1
|
||||
|
||||
@@ -1,17 +1,17 @@
|
||||
From 15ce807d420324bc209772b843d4004619e0cdaf Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <15ce807d420324bc209772b843d4004619e0cdaf.1598875349.git.stefan@agner.ch>
|
||||
In-Reply-To: <c12338d22649e46aed12ebe60d897112f045fda9.1598875349.git.stefan@agner.ch>
|
||||
References: <c12338d22649e46aed12ebe60d897112f045fda9.1598875349.git.stefan@agner.ch>
|
||||
From 31e32295dc261032d7f5540a0b7f79a4f5a5b807 Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <31e32295dc261032d7f5540a0b7f79a4f5a5b807.1609421746.git.stefan@agner.ch>
|
||||
In-Reply-To: <f9877c2895d6c05710a828d0cd46d9f25626b070.1609421746.git.stefan@agner.ch>
|
||||
References: <f9877c2895d6c05710a828d0cd46d9f25626b070.1609421746.git.stefan@agner.ch>
|
||||
From: Pascal Vizeli <pvizeli@syshack.ch>
|
||||
Date: Tue, 4 Aug 2020 13:50:57 +0000
|
||||
Subject: [PATCH 3/4] meson: Add board_rev to env
|
||||
Subject: [PATCH 2/4] meson: Add board_rev to env
|
||||
|
||||
Signed-off-by: Pascal Vizeli <pvizeli@syshack.ch>
|
||||
Signed-off-by: Stefan Agner <stefan@agner.ch>
|
||||
---
|
||||
arch/arm/include/asm/arch-meson/boot.h | 4 ++++
|
||||
arch/arm/mach-meson/board-info.c | 12 ++++++++++++
|
||||
board/amlogic/w400/w400.c | 5 +++++
|
||||
board/amlogic/odroid-n2/odroid-n2.c | 5 +++++
|
||||
3 files changed, 21 insertions(+)
|
||||
|
||||
diff --git a/arch/arm/include/asm/arch-meson/boot.h b/arch/arm/include/asm/arch-meson/boot.h
|
||||
@@ -35,10 +35,10 @@ index a90fe55081..c67d12d06c 100644
|
||||
+
|
||||
#endif /* __MESON_BOOT_H__ */
|
||||
diff --git a/arch/arm/mach-meson/board-info.c b/arch/arm/mach-meson/board-info.c
|
||||
index e305d60dca..3c40d6cd27 100644
|
||||
index c585b12ca5..9dbb997281 100644
|
||||
--- a/arch/arm/mach-meson/board-info.c
|
||||
+++ b/arch/arm/mach-meson/board-info.c
|
||||
@@ -183,3 +183,15 @@ int show_board_info(void)
|
||||
@@ -182,3 +182,15 @@ int show_board_info(void)
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -54,11 +54,11 @@ index e305d60dca..3c40d6cd27 100644
|
||||
+ /* Write SoC info */
|
||||
+ return snprintf(buff, buff_len, "%x", socinfo_to_minor(socinfo));
|
||||
+}
|
||||
diff --git a/board/amlogic/w400/w400.c b/board/amlogic/w400/w400.c
|
||||
index d74aab899a..cb2e5edf5e 100644
|
||||
--- a/board/amlogic/w400/w400.c
|
||||
+++ b/board/amlogic/w400/w400.c
|
||||
@@ -10,6 +10,7 @@
|
||||
diff --git a/board/amlogic/odroid-n2/odroid-n2.c b/board/amlogic/odroid-n2/odroid-n2.c
|
||||
index caf7fd6810..c2a191ba6a 100644
|
||||
--- a/board/amlogic/odroid-n2/odroid-n2.c
|
||||
+++ b/board/amlogic/odroid-n2/odroid-n2.c
|
||||
@@ -12,6 +12,7 @@
|
||||
#include <asm/io.h>
|
||||
#include <asm/arch/sm.h>
|
||||
#include <asm/arch/eth.h>
|
||||
@@ -66,17 +66,17 @@ index d74aab899a..cb2e5edf5e 100644
|
||||
|
||||
#define EFUSE_MAC_OFFSET 20
|
||||
#define EFUSE_MAC_SIZE 12
|
||||
@@ -20,6 +21,10 @@ int misc_init_r(void)
|
||||
char efuse_mac_addr[EFUSE_MAC_SIZE], buff[3];
|
||||
@@ -23,6 +24,10 @@ int misc_init_r(void)
|
||||
char efuse_mac_addr[EFUSE_MAC_SIZE], tmp[3];
|
||||
ssize_t len;
|
||||
|
||||
+ if (meson_get_soc_rev(buff, sizeof(buff))) {
|
||||
+ env_set("board_rev", buff);
|
||||
+ if (meson_get_soc_rev(tmp, sizeof(tmp)) > 0) {
|
||||
+ env_set("board_rev", tmp);
|
||||
+ }
|
||||
+
|
||||
meson_eth_init(PHY_INTERFACE_MODE_RGMII, 0);
|
||||
|
||||
if (!eth_env_get_enetaddr("ethaddr", mac_addr)) {
|
||||
--
|
||||
2.28.0
|
||||
2.30.0
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
From 01ba1339ffd095b146b9d9d772aea6f2b3594a06 Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <01ba1339ffd095b146b9d9d772aea6f2b3594a06.1609421746.git.stefan@agner.ch>
|
||||
In-Reply-To: <f9877c2895d6c05710a828d0cd46d9f25626b070.1609421746.git.stefan@agner.ch>
|
||||
References: <f9877c2895d6c05710a828d0cd46d9f25626b070.1609421746.git.stefan@agner.ch>
|
||||
From: Neil Armstrong <narmstrong@baylibre.com>
|
||||
Date: Mon, 2 Sep 2019 15:42:04 +0200
|
||||
Subject: [PATCH 3/4] HACK: mmc: meson-gx: limit to 24MHz
|
||||
|
||||
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
|
||||
---
|
||||
drivers/mmc/meson_gx_mmc.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/drivers/mmc/meson_gx_mmc.c b/drivers/mmc/meson_gx_mmc.c
|
||||
index 719dd1e5e5..dd3dd7c08c 100644
|
||||
--- a/drivers/mmc/meson_gx_mmc.c
|
||||
+++ b/drivers/mmc/meson_gx_mmc.c
|
||||
@@ -265,7 +265,7 @@ static int meson_mmc_probe(struct udevice *dev)
|
||||
cfg->host_caps = MMC_MODE_8BIT | MMC_MODE_4BIT |
|
||||
MMC_MODE_HS_52MHz | MMC_MODE_HS;
|
||||
cfg->f_min = DIV_ROUND_UP(SD_EMMC_CLKSRC_24M, CLK_MAX_DIV);
|
||||
- cfg->f_max = 100000000; /* 100 MHz */
|
||||
+ cfg->f_max = SD_EMMC_CLKSRC_24M;
|
||||
cfg->b_max = 511; /* max 512 - 1 blocks */
|
||||
cfg->name = dev->name;
|
||||
|
||||
--
|
||||
2.30.0
|
||||
|
||||
@@ -0,0 +1,43 @@
|
||||
From 26e152c0929702a9dfca4a8967601b59de77a57d Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <26e152c0929702a9dfca4a8967601b59de77a57d.1609421746.git.stefan@agner.ch>
|
||||
In-Reply-To: <f9877c2895d6c05710a828d0cd46d9f25626b070.1609421746.git.stefan@agner.ch>
|
||||
References: <f9877c2895d6c05710a828d0cd46d9f25626b070.1609421746.git.stefan@agner.ch>
|
||||
From: Neil Armstrong <narmstrong@baylibre.com>
|
||||
Date: Mon, 14 Dec 2020 19:39:07 +0100
|
||||
Subject: [PATCH 4/4] pinctrl: meson: fix bit manipulation of pin bias
|
||||
configuration
|
||||
|
||||
This fixes the wrong usage of clrsetbits_le32(), badly setting the set argument.
|
||||
|
||||
Fixes: c4c726c26b ("pinctrl: meson: add pinconf support")
|
||||
Reported-by: Anton Arapov <arapov@gmail.com>
|
||||
Reported-by: Otto Meier <gf435@gmx.net>
|
||||
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
|
||||
(cherry picked from commit 5ccd5d2cc98224108ae9fb09593a862c9caa5e80)
|
||||
---
|
||||
drivers/pinctrl/meson/pinctrl-meson.c | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/drivers/pinctrl/meson/pinctrl-meson.c b/drivers/pinctrl/meson/pinctrl-meson.c
|
||||
index d4539b02d8..5065b62436 100644
|
||||
--- a/drivers/pinctrl/meson/pinctrl-meson.c
|
||||
+++ b/drivers/pinctrl/meson/pinctrl-meson.c
|
||||
@@ -216,13 +216,13 @@ static int meson_pinconf_bias_set(struct udevice *dev, unsigned int pin,
|
||||
}
|
||||
|
||||
/* othewise, enable the bias and select level */
|
||||
- clrsetbits_le32(priv->reg_pullen + reg, BIT(bit), 1);
|
||||
+ clrsetbits_le32(priv->reg_pullen + reg, BIT(bit), BIT(bit));
|
||||
ret = meson_gpio_calc_reg_and_bit(dev, offset, REG_PULL, ®, &bit);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
clrsetbits_le32(priv->reg_pull + reg, BIT(bit),
|
||||
- param == PIN_CONFIG_BIAS_PULL_UP);
|
||||
+ (param == PIN_CONFIG_BIAS_PULL_UP ? BIT(bit) : 0));
|
||||
|
||||
return 0;
|
||||
}
|
||||
--
|
||||
2.30.0
|
||||
|
||||
@@ -15,6 +15,6 @@ function hassos_pre_image() {
|
||||
|
||||
|
||||
function hassos_post_image() {
|
||||
convert_disk_image_gz
|
||||
convert_disk_image_xz
|
||||
}
|
||||
|
||||
|
||||
@@ -16,12 +16,9 @@ CONFIG_DRM_I915_CAPTURE_ERROR=y
|
||||
CONFIG_DRM_I915_COMPRESS_ERROR=y
|
||||
CONFIG_DRM_I915_USERPTR=y
|
||||
|
||||
CONFIG_SND_HDA=y
|
||||
CONFIG_SND_HDA_CORE=y
|
||||
CONFIG_SND_HDA_GENERIC=y
|
||||
CONFIG_SND_HDA_INTEL=m
|
||||
CONFIG_SND_HDA_I915=m
|
||||
CONFIG_SND_HDA_CODEC_REALTEK=m
|
||||
CONFIG_SND_HDA_CODEC_ANALOG=m
|
||||
CONFIG_SND_HDA_CODEC_VIA=m
|
||||
CONFIG_SND_HDA_CODEC_HDMI=m
|
||||
CONFIG_MMC=y
|
||||
CONFIG_MMC_BLOCK=y
|
||||
CONFIG_MMC_SDHCI=y
|
||||
CONFIG_MMC_SDHCI_ACPI=y
|
||||
CONFIG_MMC_SDHCI_PCI=y
|
||||
CONFIG_X86_INTEL_LPSS=y
|
||||
|
||||
@@ -22,18 +22,18 @@ function hassos_post_image() {
|
||||
# Virtual Disk images
|
||||
convert_disk_image_virtual
|
||||
|
||||
convert_disk_image_gz vmdk
|
||||
convert_disk_image_gz vhdx
|
||||
convert_disk_image_gz vdi
|
||||
convert_disk_image_gz qcow2
|
||||
convert_disk_image_xz vmdk
|
||||
convert_disk_image_xz vhdx
|
||||
convert_disk_image_xz vdi
|
||||
convert_disk_image_xz qcow2
|
||||
|
||||
# OVA
|
||||
mkdir -p "${OVA_DATA}"
|
||||
rm -f "${HDD_OVA}"
|
||||
|
||||
cp -a ${BOARD_DIR}/home-assistant.ovf "${OVA_DATA}/home-assistant.ovf"
|
||||
cp -a "${BOARD_DIR}/home-assistant.ovf" "${OVA_DATA}/home-assistant.ovf"
|
||||
qemu-img convert -O vmdk -o subformat=streamOptimized "${HDD_IMG}" "${OVA_DATA}/home-assistant.vmdk"
|
||||
(cd "${OVA_DATA}"; sha256sum --tag home-assistant.* >home-assistant.mf)
|
||||
(cd "${OVA_DATA}" || exit 1; sha256sum --tag home-assistant.* >home-assistant.mf)
|
||||
tar -C "${OVA_DATA}" --owner=root --group=root -cf "${HDD_OVA}" home-assistant.ovf home-assistant.vmdk home-assistant.mf
|
||||
|
||||
# Cleanup
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
</References>
|
||||
<DiskSection>
|
||||
<Info>List of the virtual disks used in the package</Info>
|
||||
<Disk ovf:capacity="6442450944" ovf:diskId="vmdisk1" ovf:fileRef="file1" ovf:format="http://www.vmware.com/interfaces/specifications/vmdk.html#streamOptimized" ovf:boot="True" vbox:uuid="5f042839-c478-43d9-9eb0-fd8a902146ec"/>
|
||||
<Disk ovf:capacity="34359738368" ovf:diskId="vmdisk1" ovf:fileRef="file1" ovf:format="http://www.vmware.com/interfaces/specifications/vmdk.html#streamOptimized" ovf:boot="True" vbox:uuid="5f042839-c478-43d9-9eb0-fd8a902146ec"/>
|
||||
</DiskSection>
|
||||
<NetworkSection>
|
||||
<Info>Logical networks used in the package</Info>
|
||||
@@ -18,8 +18,8 @@
|
||||
<Name>Home Assistant</Name>
|
||||
<ProductSection>
|
||||
<Info>Meta-information about the installed software</Info>
|
||||
<Product>Operating-System</Product>
|
||||
<ProductUrl>https://home-assistant.io</ProductUrl>
|
||||
<Product>Home Assistant Operating System</Product>
|
||||
<ProductUrl>https://www.home-assistant.io</ProductUrl>
|
||||
</ProductSection>
|
||||
<OperatingSystemSection ovf:id="100" vmw:osType="other4xLinux64Guest">
|
||||
<Info>The kind of installed guest operating system</Info>
|
||||
@@ -89,6 +89,13 @@
|
||||
<rasd:ResourceSubType>E1000</rasd:ResourceSubType>
|
||||
<rasd:ResourceType>10</rasd:ResourceType>
|
||||
</Item>
|
||||
<Item ovf:required="false">
|
||||
<rasd:AutomaticAllocation>true</rasd:AutomaticAllocation>
|
||||
<rasd:ElementName>Audio</rasd:ElementName>
|
||||
<rasd:InstanceID>11</rasd:InstanceID>
|
||||
<rasd:ResourceSubType>vmware.soundcard.hdaudio</rasd:ResourceSubType>
|
||||
<rasd:ResourceType>1</rasd:ResourceType>
|
||||
</Item>
|
||||
<vmw:Config ovf:required="false" vmw:key="firmware" vmw:value="efi"/>
|
||||
<vmw:ExtraConfig ovf:required="false" vmw:key="cpuid.coresPerSocket" vmw:value="2"/>
|
||||
<vmw:ExtraConfig ovf:required="false" vmw:key="svga.present" vmw:value="TRUE"/>
|
||||
@@ -121,11 +128,11 @@
|
||||
</Controllers>
|
||||
</USB>
|
||||
<Network>
|
||||
<Adapter slot="0" enabled="true" type="82540EM">
|
||||
<Adapter slot="0" enabled="true" type="virtio">
|
||||
<BridgedInterface />
|
||||
</Adapter>
|
||||
</Network>
|
||||
<AudioAdapter driver="Null" enabled="false"/>
|
||||
<AudioAdapter controller="HDA" enabled="true"/>
|
||||
<RTC localOrUTC="UTC"/>
|
||||
</Hardware>
|
||||
<StorageControllers>
|
||||
|
||||
@@ -20,6 +20,11 @@ CONFIG_VIRTIO_MMIO=y
|
||||
CONFIG_SCSI_VIRTIO=y
|
||||
CONFIG_HW_RANDOM_VIRTIO=y
|
||||
|
||||
CONFIG_FUSION=y
|
||||
CONFIG_FUSION_SPI=y
|
||||
CONFIG_FUSION_SAS=y
|
||||
CONFIG_FUSION_MAX_SGE=128
|
||||
|
||||
CONFIG_SCSI_LOWLEVEL=y
|
||||
CONFIG_USB_XHCI_HCD=y
|
||||
CONFIG_BLK_DEV_NVME=y
|
||||
@@ -37,4 +42,10 @@ CONFIG_HYPERV_KEYBOARD=m
|
||||
CONFIG_HYPERV_STORAGE=y
|
||||
CONFIG_HYPERV_NET=y
|
||||
CONFIG_HYPERV_VSOCKETS=m
|
||||
CONFIG_PCI_HYPERV=m
|
||||
CONFIG_PCI_HYPERV_INTERFACE=m
|
||||
CONFIG_FB_HYPERV=y
|
||||
|
||||
CONFIG_IGBVF=m
|
||||
CONFIG_IXGBEVF=m
|
||||
CONFIG_I40EVF=m
|
||||
|
||||
@@ -5,6 +5,6 @@ BOOTLOADER=barebox
|
||||
KERNEL_FILE=bzImage
|
||||
BOOT_SYS=efi
|
||||
BOOT_SPL=false
|
||||
DISK_SIZE=6
|
||||
DISK_SIZE=32
|
||||
SUPERVISOR_MACHINE=qemux86-64
|
||||
SUPERVISOR_ARCH=amd64
|
||||
|
||||
@@ -1,12 +1,18 @@
|
||||
From 405590bdb7ae434798010458e810c415e4e99db4 Mon Sep 17 00:00:00 2001
|
||||
From 4e9abe7945370765a9e8e88b01a7ef5f266bf7fd Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <4e9abe7945370765a9e8e88b01a7ef5f266bf7fd.1606682453.git.stefan@agner.ch>
|
||||
From: Steffen Trumtrar <s.trumtrar@pengutronix.de>
|
||||
Date: Fri, 30 Jun 2017 16:53:34 +0200
|
||||
Subject: barebox-state: get devicetree from file
|
||||
Subject: [PATCH dt-utils 1/3] barebox-state: get devicetree from file
|
||||
|
||||
Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de>
|
||||
---
|
||||
src/barebox-state.c | 30 ++++++++++++++++++++++--------
|
||||
src/barebox-state.h | 2 +-
|
||||
src/keystore-blob.c | 2 +-
|
||||
3 files changed, 24 insertions(+), 10 deletions(-)
|
||||
|
||||
diff --git a/src/barebox-state.c b/src/barebox-state.c
|
||||
index e68b8cb..3622e76 100644
|
||||
index f8b8df6..76f9c41 100644
|
||||
--- a/src/barebox-state.c
|
||||
+++ b/src/barebox-state.c
|
||||
@@ -308,7 +308,7 @@ static int state_set_var(struct state *state, const char *var, const char *val)
|
||||
@@ -16,11 +22,11 @@ index e68b8cb..3622e76 100644
|
||||
-struct state *state_get(const char *name, bool readonly, bool auth)
|
||||
+struct state *state_get(const char *name, const char *filename, bool readonly, bool auth)
|
||||
{
|
||||
struct device_node *root, *node, *partition_node;
|
||||
struct device_node *root, *node;
|
||||
char *path;
|
||||
@@ -320,11 +320,19 @@ struct state *state_get(const char *name, bool readonly, bool auth)
|
||||
off_t offset;
|
||||
size_t size;
|
||||
@@ -317,11 +317,19 @@ struct state *state_get(const char *name, bool readonly, bool auth)
|
||||
const char *backend_type = NULL;
|
||||
struct state_variable *v;
|
||||
|
||||
- root = of_read_proc_devicetree();
|
||||
- if (IS_ERR(root)) {
|
||||
@@ -43,7 +49,7 @@ index e68b8cb..3622e76 100644
|
||||
}
|
||||
|
||||
of_set_root_node(root);
|
||||
@@ -387,6 +395,7 @@ static struct option long_options[] = {
|
||||
@@ -372,6 +380,7 @@ static struct option long_options[] = {
|
||||
{"get", required_argument, 0, 'g' },
|
||||
{"set", required_argument, 0, 's' },
|
||||
{"name", required_argument, 0, 'n' },
|
||||
@@ -51,7 +57,7 @@ index e68b8cb..3622e76 100644
|
||||
{"dump", no_argument, 0, 'd' },
|
||||
{"dump-shell", no_argument, 0, OPT_DUMP_SHELL },
|
||||
{"verbose", no_argument, 0, 'v' },
|
||||
@@ -402,6 +411,7 @@ static void usage(char *name)
|
||||
@@ -387,6 +396,7 @@ static void usage(char *name)
|
||||
"-g, --get <variable> get the value of a variable\n"
|
||||
"-s, --set <variable>=<value> set the value of a variable\n"
|
||||
"-n, --name <name> specify the state to use (default=\"state\"). Multiple states are allowed.\n"
|
||||
@@ -59,7 +65,7 @@ index e68b8cb..3622e76 100644
|
||||
"-d, --dump dump the state\n"
|
||||
"--dump-shell dump the state suitable for shell sourcing\n"
|
||||
"-v, --verbose increase verbosity\n"
|
||||
@@ -439,12 +449,13 @@ int main(int argc, char *argv[])
|
||||
@@ -424,12 +434,13 @@ int main(int argc, char *argv[])
|
||||
bool readonly = true;
|
||||
int pr_level = 5;
|
||||
int auth = 1;
|
||||
@@ -74,7 +80,7 @@ index e68b8cb..3622e76 100644
|
||||
if (c < 0)
|
||||
break;
|
||||
switch (c) {
|
||||
@@ -490,6 +501,9 @@ int main(int argc, char *argv[])
|
||||
@@ -475,6 +486,9 @@ int main(int argc, char *argv[])
|
||||
++nr_states;
|
||||
break;
|
||||
}
|
||||
@@ -84,7 +90,7 @@ index e68b8cb..3622e76 100644
|
||||
case ':':
|
||||
case '?':
|
||||
default:
|
||||
@@ -530,7 +544,7 @@ int main(int argc, char *argv[])
|
||||
@@ -515,7 +529,7 @@ int main(int argc, char *argv[])
|
||||
}
|
||||
|
||||
list_for_each_entry(state, &state_list.list, list) {
|
||||
@@ -120,4 +126,5 @@ index 028dd8b..4572431 100644
|
||||
return PTR_ERR(tmp);
|
||||
state = tmp;
|
||||
--
|
||||
cgit v0.10.2
|
||||
2.29.2
|
||||
|
||||
@@ -1,15 +1,21 @@
|
||||
From 26148417fab419a0c7f301fb8f2be015324d5374 Mon Sep 17 00:00:00 2001
|
||||
From 4eb260d97419349320aa688866b4cf1eb177df70 Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <4eb260d97419349320aa688866b4cf1eb177df70.1606682453.git.stefan@agner.ch>
|
||||
In-Reply-To: <4e9abe7945370765a9e8e88b01a7ef5f266bf7fd.1606682453.git.stefan@agner.ch>
|
||||
References: <4e9abe7945370765a9e8e88b01a7ef5f266bf7fd.1606682453.git.stefan@agner.ch>
|
||||
From: Steffen Trumtrar <s.trumtrar@pengutronix.de>
|
||||
Date: Fri, 30 Jun 2017 16:53:17 +0200
|
||||
Subject: libdt: support finding devices by partuuid
|
||||
Subject: [PATCH dt-utils 2/3] libdt: support finding devices by partuuid
|
||||
|
||||
Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de>
|
||||
---
|
||||
src/libdt.c | 12 ++++++++++++
|
||||
1 file changed, 12 insertions(+)
|
||||
|
||||
diff --git a/src/libdt.c b/src/libdt.c
|
||||
index 3adeed2..2bc6cc1 100644
|
||||
index 4638678..b52f80c 100644
|
||||
--- a/src/libdt.c
|
||||
+++ b/src/libdt.c
|
||||
@@ -2393,6 +2393,18 @@ int of_get_devicepath(struct device_node *partition_node, char **devpath, off_t
|
||||
@@ -2416,6 +2416,18 @@ int of_get_devicepath(struct device_node *partition_node, char **devpath, off_t
|
||||
*/
|
||||
node = partition_node->parent;
|
||||
|
||||
@@ -29,5 +35,5 @@ index 3adeed2..2bc6cc1 100644
|
||||
* Respect flash "partitions" subnode. Use parent of parent in this
|
||||
* case.
|
||||
--
|
||||
cgit v0.10.2
|
||||
2.29.2
|
||||
|
||||
@@ -0,0 +1,52 @@
|
||||
From 665603ecadb8385dd6c18840d3b0120859a00369 Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <665603ecadb8385dd6c18840d3b0120859a00369.1606682453.git.stefan@agner.ch>
|
||||
In-Reply-To: <4e9abe7945370765a9e8e88b01a7ef5f266bf7fd.1606682453.git.stefan@agner.ch>
|
||||
References: <4e9abe7945370765a9e8e88b01a7ef5f266bf7fd.1606682453.git.stefan@agner.ch>
|
||||
From: Stefan Agner <stefan@agner.ch>
|
||||
Date: Fri, 13 Nov 2020 10:39:03 +0100
|
||||
Subject: [PATCH dt-utils 3/3] state: use /run to store lockfile
|
||||
|
||||
The current location /var/lock is considered legacy (at least by
|
||||
systemd). Just use /run to store the lockfile and append the usual .lock
|
||||
suffix.
|
||||
|
||||
Signed-off-by: Stefan Agner <stefan@agner.ch>
|
||||
---
|
||||
src/barebox-state.c | 8 +++++---
|
||||
1 file changed, 5 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/src/barebox-state.c b/src/barebox-state.c
|
||||
index 76f9c41..53e5eb6 100644
|
||||
--- a/src/barebox-state.c
|
||||
+++ b/src/barebox-state.c
|
||||
@@ -38,6 +38,8 @@
|
||||
#include <dt/dt.h>
|
||||
#include <state.h>
|
||||
|
||||
+#define BAREBOX_STATE_LOCKFILE "/run/barebox-state.lock"
|
||||
+
|
||||
struct state_variable;
|
||||
|
||||
static int __state_uint8_set(struct state_variable *var, const char *val);
|
||||
@@ -515,15 +517,15 @@ int main(int argc, char *argv[])
|
||||
++nr_states;
|
||||
}
|
||||
|
||||
- lock_fd = open("/var/lock/barebox-state", O_CREAT | O_RDWR, 0600);
|
||||
+ lock_fd = open(BAREBOX_STATE_LOCKFILE, O_CREAT | O_RDWR, 0600);
|
||||
if (lock_fd < 0) {
|
||||
- pr_err("Failed to open lock-file /var/lock/barebox-state\n");
|
||||
+ pr_err("Failed to open lock-file " BAREBOX_STATE_LOCKFILE "\n");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
ret = flock(lock_fd, LOCK_EX);
|
||||
if (ret < 0) {
|
||||
- pr_err("Failed to lock /var/lock/barebox-state: %m\n");
|
||||
+ pr_err("Failed to lock " BAREBOX_STATE_LOCKFILE ": %m\n");
|
||||
close(lock_fd);
|
||||
exit(1);
|
||||
}
|
||||
--
|
||||
2.29.2
|
||||
|
||||
@@ -9,6 +9,9 @@ kernel=u-boot.bin
|
||||
# uncomment for aarch64 bit support
|
||||
#arm_64bit=1
|
||||
|
||||
# uncomment to enable primary UART console
|
||||
#enable_uart=1
|
||||
|
||||
# uncomment if you get no picture on HDMI for a default "safe" mode
|
||||
#hdmi_safe=1
|
||||
|
||||
@@ -46,8 +49,8 @@ kernel=u-boot.bin
|
||||
# uncomment for composite PAL
|
||||
#sdtv_mode=2
|
||||
|
||||
#uncomment to overclock the arm. 700 MHz is the default.
|
||||
#arm_freq=800
|
||||
# Uncomment to disable continous SD-card poll (for USB SSD)
|
||||
#dtparam=sd_poll_once=on
|
||||
|
||||
# Uncomment some or all of these to enable the optional hardware interfaces
|
||||
#dtparam=i2c_arm=on
|
||||
|
||||
@@ -14,7 +14,7 @@ function hassos_pre_image() {
|
||||
# Firmware
|
||||
if [[ "${BOARD_ID}" =~ "rpi4" ]]; then
|
||||
cp "${BINARIES_DIR}/rpi-firmware/fixup.dat" "${BOOT_DATA}/fixup4.dat"
|
||||
cp "${BINARIES_DIR}/rpi-firmware/start.elf" "${BOOT_DATA}/start4.elf"
|
||||
cp "${BINARIES_DIR}/rpi-firmware/start.elf" "${BOOT_DATA}/start4.elf"
|
||||
else
|
||||
cp -t "${BOOT_DATA}" \
|
||||
"${BINARIES_DIR}/rpi-firmware/fixup.dat" \
|
||||
@@ -22,6 +22,12 @@ function hassos_pre_image() {
|
||||
"${BINARIES_DIR}/rpi-firmware/bootcode.bin"
|
||||
fi
|
||||
|
||||
# EEPROM update for Raspberry Pi 4/Compute Module 4
|
||||
if grep -Eq "^BR2_PACKAGE_RPI_EEPROM=y$" "${BR2_CONFIG}"; then
|
||||
cp "${BINARIES_DIR}/rpi-eeprom/pieeprom.sig" "${BOOT_DATA}/pieeprom.sig"
|
||||
cp "${BINARIES_DIR}/rpi-eeprom/pieeprom.upd" "${BOOT_DATA}/pieeprom.upd"
|
||||
fi
|
||||
|
||||
# Set cmd options
|
||||
echo "dwc_otg.lpm_enable=0 console=tty1" > "${BOOT_DATA}/cmdline.txt"
|
||||
|
||||
@@ -33,6 +39,6 @@ function hassos_pre_image() {
|
||||
|
||||
|
||||
function hassos_post_image() {
|
||||
convert_disk_image_gz
|
||||
convert_disk_image_xz
|
||||
}
|
||||
|
||||
|
||||
3
buildroot-external/board/raspberrypi/kernel.config
Normal file
3
buildroot-external/board/raspberrypi/kernel.config
Normal file
@@ -0,0 +1,3 @@
|
||||
# CONFIG_AUTOFS4_FS is not set
|
||||
# CONFIG_AUTOFS_FS is not set
|
||||
# CONFIG_PGTABLE_MAPPING is not set
|
||||
@@ -1,50 +0,0 @@
|
||||
From d6fc5f89ac905cb3efc9c61ce79dbfad5d91883b Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <d6fc5f89ac905cb3efc9c61ce79dbfad5d91883b.1597690408.git.stefan@agner.ch>
|
||||
From: Chung-Hsien Hsu <stanley.hsu@cypress.com>
|
||||
Date: Wed, 15 Aug 2018 05:32:39 -0500
|
||||
Subject: [PATCH] brcmfmac: add FT-based AKMs in brcmf_set_key_mgmt() for FT
|
||||
support
|
||||
|
||||
Add WLAN_AKM_SUITE_FT_8021X and WLAN_AKM_SUITE_FT_PSK in
|
||||
brcmf_set_key_mgmt() for FT support.
|
||||
|
||||
Signed-off-by: Chung-Hsien Hsu <stanley.hsu@cypress.com>
|
||||
Signed-off-by: Chi-Hsien Lin <chi-hsien.lin@cypress.com>
|
||||
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
|
||||
---
|
||||
drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c | 6 ++++++
|
||||
.../net/wireless/broadcom/brcm80211/include/brcmu_wifi.h | 1 +
|
||||
2 files changed, 7 insertions(+)
|
||||
|
||||
diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
|
||||
index 71b7e5c19434..c312626c0a27 100644
|
||||
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
|
||||
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
|
||||
@@ -1649,6 +1649,12 @@ brcmf_set_key_mgmt(struct net_device *ndev, struct cfg80211_connect_params *sme)
|
||||
case WLAN_AKM_SUITE_PSK:
|
||||
val = WPA2_AUTH_PSK;
|
||||
break;
|
||||
+ case WLAN_AKM_SUITE_FT_8021X:
|
||||
+ val = WPA2_AUTH_UNSPECIFIED | WPA2_AUTH_FT;
|
||||
+ break;
|
||||
+ case WLAN_AKM_SUITE_FT_PSK:
|
||||
+ val = WPA2_AUTH_PSK | WPA2_AUTH_FT;
|
||||
+ break;
|
||||
default:
|
||||
brcmf_err("invalid cipher group (%d)\n",
|
||||
sme->crypto.cipher_group);
|
||||
diff --git a/drivers/net/wireless/broadcom/brcm80211/include/brcmu_wifi.h b/drivers/net/wireless/broadcom/brcm80211/include/brcmu_wifi.h
|
||||
index 75b2a0438cfa..dddebaa60352 100644
|
||||
--- a/drivers/net/wireless/broadcom/brcm80211/include/brcmu_wifi.h
|
||||
+++ b/drivers/net/wireless/broadcom/brcm80211/include/brcmu_wifi.h
|
||||
@@ -239,6 +239,7 @@ static inline bool ac_bitmap_tst(u8 bitmap, int prec)
|
||||
#define WPA2_AUTH_RESERVED4 0x0400
|
||||
#define WPA2_AUTH_RESERVED5 0x0800
|
||||
#define WPA2_AUTH_1X_SHA256 0x1000 /* 1X with SHA256 key derivation */
|
||||
+#define WPA2_AUTH_FT 0x4000 /* Fast BSS Transition */
|
||||
#define WPA2_AUTH_PSK_SHA256 0x8000 /* PSK with SHA256 key derivation */
|
||||
|
||||
#define DOT11_DEFAULT_RTS_LEN 2347
|
||||
--
|
||||
2.28.0
|
||||
|
||||
@@ -0,0 +1,87 @@
|
||||
From 3651b4af52d63d4e37f40c7a6d0809b0a6c9dd73 Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <3651b4af52d63d4e37f40c7a6d0809b0a6c9dd73.1609281882.git.stefan@agner.ch>
|
||||
From: Florian Fainelli <f.fainelli@gmail.com>
|
||||
Date: Mon, 15 Jun 2020 10:40:41 +0200
|
||||
Subject: [PATCH 1/8] dt-bindings: arm: bcm: Convert BCM2835 firmware binding
|
||||
to YAML
|
||||
|
||||
Convert the Raspberry Pi BCM2835 firmware binding document to YAML.
|
||||
Verified with dt_binding_check and dtbs_check.
|
||||
|
||||
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
|
||||
Tested-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
|
||||
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
|
||||
Link: https://lore.kernel.org/r/5bc0b9be8544b07300fccab4d4f26e5e5d8e62b2.1592210452.git-series.maxime@cerno.tech
|
||||
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
|
||||
(cherry picked from commit d4c708c032df3d95de297232e20041737e99d126)
|
||||
---
|
||||
.../arm/bcm/raspberrypi,bcm2835-firmware.txt | 14 --------
|
||||
.../arm/bcm/raspberrypi,bcm2835-firmware.yaml | 35 +++++++++++++++++++
|
||||
2 files changed, 35 insertions(+), 14 deletions(-)
|
||||
delete mode 100644 Documentation/devicetree/bindings/arm/bcm/raspberrypi,bcm2835-firmware.txt
|
||||
create mode 100644 Documentation/devicetree/bindings/arm/bcm/raspberrypi,bcm2835-firmware.yaml
|
||||
|
||||
diff --git a/Documentation/devicetree/bindings/arm/bcm/raspberrypi,bcm2835-firmware.txt b/Documentation/devicetree/bindings/arm/bcm/raspberrypi,bcm2835-firmware.txt
|
||||
deleted file mode 100644
|
||||
index 6824b3180ffb..000000000000
|
||||
--- a/Documentation/devicetree/bindings/arm/bcm/raspberrypi,bcm2835-firmware.txt
|
||||
+++ /dev/null
|
||||
@@ -1,14 +0,0 @@
|
||||
-Raspberry Pi VideoCore firmware driver
|
||||
-
|
||||
-Required properties:
|
||||
-
|
||||
-- compatible: Should be "raspberrypi,bcm2835-firmware"
|
||||
-- mboxes: Phandle to the firmware device's Mailbox.
|
||||
- (See: ../mailbox/mailbox.txt for more information)
|
||||
-
|
||||
-Example:
|
||||
-
|
||||
-firmware {
|
||||
- compatible = "raspberrypi,bcm2835-firmware";
|
||||
- mboxes = <&mailbox>;
|
||||
-};
|
||||
diff --git a/Documentation/devicetree/bindings/arm/bcm/raspberrypi,bcm2835-firmware.yaml b/Documentation/devicetree/bindings/arm/bcm/raspberrypi,bcm2835-firmware.yaml
|
||||
new file mode 100644
|
||||
index 000000000000..cec540c052b6
|
||||
--- /dev/null
|
||||
+++ b/Documentation/devicetree/bindings/arm/bcm/raspberrypi,bcm2835-firmware.yaml
|
||||
@@ -0,0 +1,35 @@
|
||||
+# SPDX-License-Identifier: GPL-2.0
|
||||
+%YAML 1.2
|
||||
+---
|
||||
+$id: http://devicetree.org/schemas/arm/bcm/raspberrypi,bcm2835-firmware.yaml#
|
||||
+$schema: http://devicetree.org/meta-schemas/core.yaml#
|
||||
+
|
||||
+title: Raspberry Pi VideoCore firmware driver
|
||||
+
|
||||
+maintainers:
|
||||
+ - Eric Anholt <eric@anholt.net>
|
||||
+ - Stefan Wahren <wahrenst@gmx.net>
|
||||
+
|
||||
+properties:
|
||||
+ compatible:
|
||||
+ items:
|
||||
+ - const: raspberrypi,bcm2835-firmware
|
||||
+ - const: simple-bus
|
||||
+
|
||||
+ mboxes:
|
||||
+ $ref: '/schemas/types.yaml#/definitions/phandle'
|
||||
+ description: |
|
||||
+ Phandle to the firmware device's Mailbox.
|
||||
+ (See: ../mailbox/mailbox.txt for more information)
|
||||
+
|
||||
+required:
|
||||
+ - compatible
|
||||
+ - mboxes
|
||||
+
|
||||
+examples:
|
||||
+ - |
|
||||
+ firmware {
|
||||
+ compatible = "raspberrypi,bcm2835-firmware", "simple-bus";
|
||||
+ mboxes = <&mailbox>;
|
||||
+ };
|
||||
+...
|
||||
--
|
||||
2.29.2
|
||||
|
||||
@@ -0,0 +1,71 @@
|
||||
From 3ad7fb9329eabd1d7f692f612742ca5ac38854a5 Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <3ad7fb9329eabd1d7f692f612742ca5ac38854a5.1609281882.git.stefan@agner.ch>
|
||||
In-Reply-To: <3651b4af52d63d4e37f40c7a6d0809b0a6c9dd73.1609281882.git.stefan@agner.ch>
|
||||
References: <3651b4af52d63d4e37f40c7a6d0809b0a6c9dd73.1609281882.git.stefan@agner.ch>
|
||||
From: Maxime Ripard <maxime@cerno.tech>
|
||||
Date: Mon, 15 Jun 2020 10:40:42 +0200
|
||||
Subject: [PATCH 2/8] dt-bindings: clock: Add a binding for the RPi Firmware
|
||||
clocks
|
||||
|
||||
The firmware running on the RPi VideoCore can be used to discover and
|
||||
change the various clocks running in the BCM2711. Since devices will
|
||||
need to use them through the DT, let's add a pretty simple binding.
|
||||
|
||||
Cc: Michael Turquette <mturquette@baylibre.com>
|
||||
Cc: linux-clk@vger.kernel.org
|
||||
Cc: devicetree@vger.kernel.org
|
||||
Reviewed-by: Stephen Boyd <sboyd@kernel.org>
|
||||
Reviewed-by: Rob Herring <robh+dt@kernel.org>
|
||||
Tested-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
|
||||
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
|
||||
Link: https://lore.kernel.org/r/f6105207e7ef5a5ea8d7a1774faf989d341a25f5.1592210452.git-series.maxime@cerno.tech
|
||||
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
|
||||
(cherry picked from commit 74a0caa5ef1c25905c4409b350ed9a8e0d9a3b74)
|
||||
---
|
||||
.../arm/bcm/raspberrypi,bcm2835-firmware.yaml | 24 +++++++++++++++++++
|
||||
1 file changed, 24 insertions(+)
|
||||
|
||||
diff --git a/Documentation/devicetree/bindings/arm/bcm/raspberrypi,bcm2835-firmware.yaml b/Documentation/devicetree/bindings/arm/bcm/raspberrypi,bcm2835-firmware.yaml
|
||||
index cec540c052b6..b48ed875eb8e 100644
|
||||
--- a/Documentation/devicetree/bindings/arm/bcm/raspberrypi,bcm2835-firmware.yaml
|
||||
+++ b/Documentation/devicetree/bindings/arm/bcm/raspberrypi,bcm2835-firmware.yaml
|
||||
@@ -22,6 +22,25 @@ properties:
|
||||
Phandle to the firmware device's Mailbox.
|
||||
(See: ../mailbox/mailbox.txt for more information)
|
||||
|
||||
+ clocks:
|
||||
+ type: object
|
||||
+
|
||||
+ properties:
|
||||
+ compatible:
|
||||
+ const: raspberrypi,firmware-clocks
|
||||
+
|
||||
+ "#clock-cells":
|
||||
+ const: 1
|
||||
+ description: >
|
||||
+ The argument is the ID of the clocks contained by the
|
||||
+ firmware messages.
|
||||
+
|
||||
+ required:
|
||||
+ - compatible
|
||||
+ - "#clock-cells"
|
||||
+
|
||||
+ additionalProperties: false
|
||||
+
|
||||
required:
|
||||
- compatible
|
||||
- mboxes
|
||||
@@ -31,5 +50,10 @@ examples:
|
||||
firmware {
|
||||
compatible = "raspberrypi,bcm2835-firmware", "simple-bus";
|
||||
mboxes = <&mailbox>;
|
||||
+
|
||||
+ firmware_clocks: clocks {
|
||||
+ compatible = "raspberrypi,firmware-clocks";
|
||||
+ #clock-cells = <1>;
|
||||
+ };
|
||||
};
|
||||
...
|
||||
--
|
||||
2.29.2
|
||||
|
||||
@@ -0,0 +1,50 @@
|
||||
From 305aeb868929695699e04e26dd590e64ad3c42dd Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <305aeb868929695699e04e26dd590e64ad3c42dd.1609281882.git.stefan@agner.ch>
|
||||
In-Reply-To: <3651b4af52d63d4e37f40c7a6d0809b0a6c9dd73.1609281882.git.stefan@agner.ch>
|
||||
References: <3651b4af52d63d4e37f40c7a6d0809b0a6c9dd73.1609281882.git.stefan@agner.ch>
|
||||
From: Maxime Ripard <maxime@cerno.tech>
|
||||
Date: Fri, 26 Jun 2020 13:54:33 +0200
|
||||
Subject: [PATCH 3/8] dt-bindings: arm: bcm: Add a select to the RPI Firmware
|
||||
binding
|
||||
|
||||
The RaspberryPi firmware binding uses two compatible, include simple-bus.
|
||||
The select statement generated by default will thus select any node that
|
||||
has simple-bus, not all of them being the raspberrypi firmware node.
|
||||
|
||||
This results in warnings being wrongfully reported. Let's add a custom
|
||||
select statement to fix that.
|
||||
|
||||
Fixes: d4c708c032df ("dt-bindings: arm: bcm: Convert BCM2835 firmware binding to YAML")
|
||||
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
|
||||
Link: https://lore.kernel.org/r/20200626115433.125735-1-maxime@cerno.tech
|
||||
Acked-by: Florian Fainelli <f.fainelli@gmail.com>
|
||||
Acked-by: Rob Herring <robh@kernel.org>
|
||||
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
|
||||
(cherry picked from commit 2a08a9232ba2e6103843870e68edae8e381eb02a)
|
||||
---
|
||||
.../bindings/arm/bcm/raspberrypi,bcm2835-firmware.yaml | 9 +++++++++
|
||||
1 file changed, 9 insertions(+)
|
||||
|
||||
diff --git a/Documentation/devicetree/bindings/arm/bcm/raspberrypi,bcm2835-firmware.yaml b/Documentation/devicetree/bindings/arm/bcm/raspberrypi,bcm2835-firmware.yaml
|
||||
index b48ed875eb8e..17e4f20c8d39 100644
|
||||
--- a/Documentation/devicetree/bindings/arm/bcm/raspberrypi,bcm2835-firmware.yaml
|
||||
+++ b/Documentation/devicetree/bindings/arm/bcm/raspberrypi,bcm2835-firmware.yaml
|
||||
@@ -10,6 +10,15 @@ maintainers:
|
||||
- Eric Anholt <eric@anholt.net>
|
||||
- Stefan Wahren <wahrenst@gmx.net>
|
||||
|
||||
+select:
|
||||
+ properties:
|
||||
+ compatible:
|
||||
+ contains:
|
||||
+ const: raspberrypi,bcm2835-firmware
|
||||
+
|
||||
+ required:
|
||||
+ - compatible
|
||||
+
|
||||
properties:
|
||||
compatible:
|
||||
items:
|
||||
--
|
||||
2.29.2
|
||||
|
||||
@@ -0,0 +1,83 @@
|
||||
From 33743cfcff296b1011e46168ecab185a00e0f00d Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <33743cfcff296b1011e46168ecab185a00e0f00d.1609281882.git.stefan@agner.ch>
|
||||
In-Reply-To: <3651b4af52d63d4e37f40c7a6d0809b0a6c9dd73.1609281882.git.stefan@agner.ch>
|
||||
References: <3651b4af52d63d4e37f40c7a6d0809b0a6c9dd73.1609281882.git.stefan@agner.ch>
|
||||
From: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
|
||||
Date: Mon, 29 Jun 2020 18:18:37 +0200
|
||||
Subject: [PATCH 4/8] dt-bindings: reset: Add a binding for the RPi Firmware
|
||||
reset controller
|
||||
|
||||
The firmware running on the RPi VideoCore can be used to reset and
|
||||
initialize HW controlled by the firmware.
|
||||
|
||||
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
|
||||
Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
|
||||
Link: https://lore.kernel.org/r/20200629161845.6021-2-nsaenzjulienne@suse.de
|
||||
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
||||
(cherry picked from commit 242841992ae6f22bd761add2f380b2ef3271ba9a)
|
||||
---
|
||||
.../arm/bcm/raspberrypi,bcm2835-firmware.yaml | 21 +++++++++++++++++++
|
||||
.../reset/raspberrypi,firmware-reset.h | 13 ++++++++++++
|
||||
2 files changed, 34 insertions(+)
|
||||
create mode 100644 include/dt-bindings/reset/raspberrypi,firmware-reset.h
|
||||
|
||||
diff --git a/Documentation/devicetree/bindings/arm/bcm/raspberrypi,bcm2835-firmware.yaml b/Documentation/devicetree/bindings/arm/bcm/raspberrypi,bcm2835-firmware.yaml
|
||||
index 17e4f20c8d39..c78499a41c72 100644
|
||||
--- a/Documentation/devicetree/bindings/arm/bcm/raspberrypi,bcm2835-firmware.yaml
|
||||
+++ b/Documentation/devicetree/bindings/arm/bcm/raspberrypi,bcm2835-firmware.yaml
|
||||
@@ -48,6 +48,22 @@ properties:
|
||||
- compatible
|
||||
- "#clock-cells"
|
||||
|
||||
+ reset:
|
||||
+ type: object
|
||||
+
|
||||
+ properties:
|
||||
+ compatible:
|
||||
+ const: raspberrypi,firmware-reset
|
||||
+
|
||||
+ "#reset-cells":
|
||||
+ const: 1
|
||||
+ description: >
|
||||
+ The argument is the ID of the firmware reset line to affect.
|
||||
+
|
||||
+ required:
|
||||
+ - compatible
|
||||
+ - "#reset-cells"
|
||||
+
|
||||
additionalProperties: false
|
||||
|
||||
required:
|
||||
@@ -64,5 +80,10 @@ examples:
|
||||
compatible = "raspberrypi,firmware-clocks";
|
||||
#clock-cells = <1>;
|
||||
};
|
||||
+
|
||||
+ reset: reset {
|
||||
+ compatible = "raspberrypi,firmware-reset";
|
||||
+ #reset-cells = <1>;
|
||||
+ };
|
||||
};
|
||||
...
|
||||
diff --git a/include/dt-bindings/reset/raspberrypi,firmware-reset.h b/include/dt-bindings/reset/raspberrypi,firmware-reset.h
|
||||
new file mode 100644
|
||||
index 000000000000..1a4f4c792723
|
||||
--- /dev/null
|
||||
+++ b/include/dt-bindings/reset/raspberrypi,firmware-reset.h
|
||||
@@ -0,0 +1,13 @@
|
||||
+/* SPDX-License-Identifier: GPL-2.0 */
|
||||
+/*
|
||||
+ * Copyright (c) 2020 Nicolas Saenz Julienne
|
||||
+ * Author: Nicolas Saenz Julienne <nsaenzjulienne@suse.com>
|
||||
+ */
|
||||
+
|
||||
+#ifndef _DT_BINDINGS_RASPBERRYPI_FIRMWARE_RESET_H
|
||||
+#define _DT_BINDINGS_RASPBERRYPI_FIRMWARE_RESET_H
|
||||
+
|
||||
+#define RASPBERRYPI_FIRMWARE_RESET_ID_USB 0
|
||||
+#define RASPBERRYPI_FIRMWARE_RESET_NUM_IDS 1
|
||||
+
|
||||
+#endif
|
||||
--
|
||||
2.29.2
|
||||
|
||||
@@ -0,0 +1,73 @@
|
||||
From a97dba6bf04aa09279a7c5b4aec6e4520e354fbd Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <a97dba6bf04aa09279a7c5b4aec6e4520e354fbd.1609281882.git.stefan@agner.ch>
|
||||
In-Reply-To: <3651b4af52d63d4e37f40c7a6d0809b0a6c9dd73.1609281882.git.stefan@agner.ch>
|
||||
References: <3651b4af52d63d4e37f40c7a6d0809b0a6c9dd73.1609281882.git.stefan@agner.ch>
|
||||
From: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
|
||||
Date: Mon, 29 Jun 2020 18:18:39 +0200
|
||||
Subject: [PATCH 5/8] ARM: dts: bcm2711: Add firmware usb reset node
|
||||
|
||||
Now that the reset driver exposing Raspberry Pi 4's firmware based USB
|
||||
reset routine is available, let's add the device tree node exposing it.
|
||||
|
||||
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
|
||||
Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
|
||||
Link: https://lore.kernel.org/r/20200629161845.6021-4-nsaenzjulienne@suse.de
|
||||
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
||||
(cherry picked from commit b03300db06bed1997a1eecc4c26f3a2895c57726)
|
||||
---
|
||||
arch/arm/boot/dts/bcm2711-rpi-4-b.dts | 5 +++++
|
||||
arch/arm/boot/dts/bcm2711-rpi-400.dts | 5 +++++
|
||||
arch/arm/boot/dts/bcm2711-rpi-cm4.dts | 5 +++++
|
||||
3 files changed, 15 insertions(+)
|
||||
|
||||
diff --git a/arch/arm/boot/dts/bcm2711-rpi-4-b.dts b/arch/arm/boot/dts/bcm2711-rpi-4-b.dts
|
||||
index 21b20e334b1a..d77d61d41bbc 100644
|
||||
--- a/arch/arm/boot/dts/bcm2711-rpi-4-b.dts
|
||||
+++ b/arch/arm/boot/dts/bcm2711-rpi-4-b.dts
|
||||
@@ -72,6 +72,11 @@
|
||||
"SD_OC_N";
|
||||
status = "okay";
|
||||
};
|
||||
+
|
||||
+ reset: reset {
|
||||
+ compatible = "raspberrypi,firmware-reset";
|
||||
+ #reset-cells = <1>;
|
||||
+ };
|
||||
};
|
||||
|
||||
&gpio {
|
||||
diff --git a/arch/arm/boot/dts/bcm2711-rpi-400.dts b/arch/arm/boot/dts/bcm2711-rpi-400.dts
|
||||
index afd1ca215518..3a1eb65f7075 100644
|
||||
--- a/arch/arm/boot/dts/bcm2711-rpi-400.dts
|
||||
+++ b/arch/arm/boot/dts/bcm2711-rpi-400.dts
|
||||
@@ -72,6 +72,11 @@
|
||||
"SD_OC_N";
|
||||
status = "okay";
|
||||
};
|
||||
+
|
||||
+ reset: reset {
|
||||
+ compatible = "raspberrypi,firmware-reset";
|
||||
+ #reset-cells = <1>;
|
||||
+ };
|
||||
};
|
||||
|
||||
&gpio {
|
||||
diff --git a/arch/arm/boot/dts/bcm2711-rpi-cm4.dts b/arch/arm/boot/dts/bcm2711-rpi-cm4.dts
|
||||
index 3ff0be02cb34..7f0a621a47f5 100644
|
||||
--- a/arch/arm/boot/dts/bcm2711-rpi-cm4.dts
|
||||
+++ b/arch/arm/boot/dts/bcm2711-rpi-cm4.dts
|
||||
@@ -84,6 +84,11 @@
|
||||
output-low;
|
||||
};
|
||||
};
|
||||
+
|
||||
+ reset: reset {
|
||||
+ compatible = "raspberrypi,firmware-reset";
|
||||
+ #reset-cells = <1>;
|
||||
+ };
|
||||
};
|
||||
|
||||
&pwm1 {
|
||||
--
|
||||
2.29.2
|
||||
|
||||
@@ -0,0 +1,127 @@
|
||||
From c19d86704ffaa9fbe830aaa2a4015259928abf70 Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <c19d86704ffaa9fbe830aaa2a4015259928abf70.1609281882.git.stefan@agner.ch>
|
||||
In-Reply-To: <3651b4af52d63d4e37f40c7a6d0809b0a6c9dd73.1609281882.git.stefan@agner.ch>
|
||||
References: <3651b4af52d63d4e37f40c7a6d0809b0a6c9dd73.1609281882.git.stefan@agner.ch>
|
||||
From: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
|
||||
Date: Mon, 29 Jun 2020 18:18:40 +0200
|
||||
Subject: [PATCH 6/8] ARM: dts: bcm2711: Add reset controller to xHCI node
|
||||
|
||||
The chip is hardwired to the board's PCIe bus and needs to be properly
|
||||
setup trough a firmware routine after a PCI fundamental reset. Pass the
|
||||
reset controller phandle that takes care of triggering the
|
||||
initialization to the relevant PCI device.
|
||||
|
||||
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
|
||||
Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
|
||||
Link: https://lore.kernel.org/r/20200629161845.6021-5-nsaenzjulienne@suse.de
|
||||
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
||||
(cherry picked from commit 258f92d2f840b6ea62c0b33f04eb4d9270935bba)
|
||||
---
|
||||
arch/arm/boot/dts/bcm2711-rpi-4-b.dts | 17 +++++++++++++++++
|
||||
arch/arm/boot/dts/bcm2711-rpi-400.dts | 17 +++++++++++++++++
|
||||
arch/arm/boot/dts/bcm2711-rpi-cm4.dts | 12 ++++++++++++
|
||||
3 files changed, 46 insertions(+)
|
||||
|
||||
diff --git a/arch/arm/boot/dts/bcm2711-rpi-4-b.dts b/arch/arm/boot/dts/bcm2711-rpi-4-b.dts
|
||||
index d77d61d41bbc..513cae21e64c 100644
|
||||
--- a/arch/arm/boot/dts/bcm2711-rpi-4-b.dts
|
||||
+++ b/arch/arm/boot/dts/bcm2711-rpi-4-b.dts
|
||||
@@ -3,6 +3,8 @@
|
||||
#include "bcm2711.dtsi"
|
||||
#include "bcm2835-rpi.dtsi"
|
||||
|
||||
+#include <dt-bindings/reset/raspberrypi,firmware-reset.h>
|
||||
+
|
||||
/ {
|
||||
compatible = "raspberrypi,4-model-b", "brcm,bcm2711";
|
||||
model = "Raspberry Pi 4 Model B";
|
||||
@@ -195,6 +197,21 @@
|
||||
};
|
||||
};
|
||||
|
||||
+&pcie0 {
|
||||
+ pci@1,0 {
|
||||
+ #address-cells = <3>;
|
||||
+ #size-cells = <2>;
|
||||
+ ranges;
|
||||
+
|
||||
+ reg = <0 0 0 0 0>;
|
||||
+
|
||||
+ usb@1,0 {
|
||||
+ reg = <0x10000 0 0 0 0>;
|
||||
+ resets = <&reset RASPBERRYPI_FIRMWARE_RESET_ID_USB>;
|
||||
+ };
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
/* uart0 communicates with the BT module */
|
||||
&uart0 {
|
||||
pinctrl-names = "default";
|
||||
diff --git a/arch/arm/boot/dts/bcm2711-rpi-400.dts b/arch/arm/boot/dts/bcm2711-rpi-400.dts
|
||||
index 3a1eb65f7075..c122aebd4d5e 100644
|
||||
--- a/arch/arm/boot/dts/bcm2711-rpi-400.dts
|
||||
+++ b/arch/arm/boot/dts/bcm2711-rpi-400.dts
|
||||
@@ -3,6 +3,8 @@
|
||||
#include "bcm2711.dtsi"
|
||||
#include "bcm2835-rpi.dtsi"
|
||||
|
||||
+#include <dt-bindings/reset/raspberrypi,firmware-reset.h>
|
||||
+
|
||||
/ {
|
||||
compatible = "raspberrypi,400", "brcm,bcm2711";
|
||||
model = "Raspberry Pi 400";
|
||||
@@ -195,6 +197,21 @@
|
||||
};
|
||||
};
|
||||
|
||||
+&pcie0 {
|
||||
+ pci@1,0 {
|
||||
+ #address-cells = <3>;
|
||||
+ #size-cells = <2>;
|
||||
+ ranges;
|
||||
+
|
||||
+ reg = <0 0 0 0 0>;
|
||||
+
|
||||
+ usb@1,0 {
|
||||
+ reg = <0x10000 0 0 0 0>;
|
||||
+ resets = <&reset RASPBERRYPI_FIRMWARE_RESET_ID_USB>;
|
||||
+ };
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
/* uart0 communicates with the BT module */
|
||||
&uart0 {
|
||||
pinctrl-names = "default";
|
||||
diff --git a/arch/arm/boot/dts/bcm2711-rpi-cm4.dts b/arch/arm/boot/dts/bcm2711-rpi-cm4.dts
|
||||
index 7f0a621a47f5..5eda5d096bfb 100644
|
||||
--- a/arch/arm/boot/dts/bcm2711-rpi-cm4.dts
|
||||
+++ b/arch/arm/boot/dts/bcm2711-rpi-cm4.dts
|
||||
@@ -3,6 +3,8 @@
|
||||
#include "bcm2711.dtsi"
|
||||
#include "bcm2835-rpi.dtsi"
|
||||
|
||||
+#include <dt-bindings/reset/raspberrypi,firmware-reset.h>
|
||||
+
|
||||
/ {
|
||||
compatible = "raspberrypi,4-compute-module", "brcm,bcm2711";
|
||||
model = "Raspberry Pi Compute Module 4";
|
||||
@@ -134,6 +136,16 @@
|
||||
};
|
||||
};
|
||||
|
||||
+&pcie0 {
|
||||
+ pci@1,0 {
|
||||
+ #address-cells = <3>;
|
||||
+ #size-cells = <2>;
|
||||
+ ranges;
|
||||
+
|
||||
+ reg = <0 0 0 0 0>;
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
/* uart0 communicates with the BT module */
|
||||
&uart0 {
|
||||
pinctrl-names = "default";
|
||||
--
|
||||
2.29.2
|
||||
|
||||
@@ -0,0 +1,233 @@
|
||||
From 189ef4e3aabe995021fdfb3ff9bfb3f9ffa5fae4 Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <189ef4e3aabe995021fdfb3ff9bfb3f9ffa5fae4.1609281882.git.stefan@agner.ch>
|
||||
In-Reply-To: <3651b4af52d63d4e37f40c7a6d0809b0a6c9dd73.1609281882.git.stefan@agner.ch>
|
||||
References: <3651b4af52d63d4e37f40c7a6d0809b0a6c9dd73.1609281882.git.stefan@agner.ch>
|
||||
From: Arnd Bergmann <arnd@arndb.de>
|
||||
Date: Fri, 13 Nov 2020 15:59:32 +0100
|
||||
Subject: [PATCH 7/8] arch: pgtable: define MAX_POSSIBLE_PHYSMEM_BITS where
|
||||
needed
|
||||
|
||||
Stefan Agner reported a bug when using zsram on 32-bit Arm machines
|
||||
with RAM above the 4GB address boundary:
|
||||
|
||||
Unable to handle kernel NULL pointer dereference at virtual address 00000000
|
||||
pgd = a27bd01c
|
||||
[00000000] *pgd=236a0003, *pmd=1ffa64003
|
||||
Internal error: Oops: 207 [#1] SMP ARM
|
||||
Modules linked in: mdio_bcm_unimac(+) brcmfmac cfg80211 brcmutil raspberrypi_hwmon hci_uart crc32_arm_ce bcm2711_thermal phy_generic genet
|
||||
CPU: 0 PID: 123 Comm: mkfs.ext4 Not tainted 5.9.6 #1
|
||||
Hardware name: BCM2711
|
||||
PC is at zs_map_object+0x94/0x338
|
||||
LR is at zram_bvec_rw.constprop.0+0x330/0xa64
|
||||
pc : [<c0602b38>] lr : [<c0bda6a0>] psr: 60000013
|
||||
sp : e376bbe0 ip : 00000000 fp : c1e2921c
|
||||
r10: 00000002 r9 : c1dda730 r8 : 00000000
|
||||
r7 : e8ff7a00 r6 : 00000000 r5 : 02f9ffa0 r4 : e3710000
|
||||
r3 : 000fdffe r2 : c1e0ce80 r1 : ebf979a0 r0 : 00000000
|
||||
Flags: nZCv IRQs on FIQs on Mode SVC_32 ISA ARM Segment user
|
||||
Control: 30c5383d Table: 235c2a80 DAC: fffffffd
|
||||
Process mkfs.ext4 (pid: 123, stack limit = 0x495a22e6)
|
||||
Stack: (0xe376bbe0 to 0xe376c000)
|
||||
|
||||
As it turns out, zsram needs to know the maximum memory size, which
|
||||
is defined in MAX_PHYSMEM_BITS when CONFIG_SPARSEMEM is set, or in
|
||||
MAX_POSSIBLE_PHYSMEM_BITS on the x86 architecture.
|
||||
|
||||
The same problem will be hit on all 32-bit architectures that have a
|
||||
physical address space larger than 4GB and happen to not enable sparsemem
|
||||
and include asm/sparsemem.h from asm/pgtable.h.
|
||||
|
||||
After the initial discussion, I suggested just always defining
|
||||
MAX_POSSIBLE_PHYSMEM_BITS whenever CONFIG_PHYS_ADDR_T_64BIT is
|
||||
set, or provoking a build error otherwise. This addresses all
|
||||
configurations that can currently have this runtime bug, but
|
||||
leaves all other configurations unchanged.
|
||||
|
||||
I looked up the possible number of bits in source code and
|
||||
datasheets, here is what I found:
|
||||
|
||||
- on ARC, CONFIG_ARC_HAS_PAE40 controls whether 32 or 40 bits are used
|
||||
- on ARM, CONFIG_LPAE enables 40 bit addressing, without it we never
|
||||
support more than 32 bits, even though supersections in theory allow
|
||||
up to 40 bits as well.
|
||||
- on MIPS, some MIPS32r1 or later chips support 36 bits, and MIPS32r5
|
||||
XPA supports up to 60 bits in theory, but 40 bits are more than
|
||||
anyone will ever ship
|
||||
- On PowerPC, there are three different implementations of 36 bit
|
||||
addressing, but 32-bit is used without CONFIG_PTE_64BIT
|
||||
- On RISC-V, the normal page table format can support 34 bit
|
||||
addressing. There is no highmem support on RISC-V, so anything
|
||||
above 2GB is unused, but it might be useful to eventually support
|
||||
CONFIG_ZRAM for high pages.
|
||||
|
||||
Fixes: 61989a80fb3a ("staging: zsmalloc: zsmalloc memory allocation library")
|
||||
Fixes: 02390b87a945 ("mm/zsmalloc: Prepare to variable MAX_PHYSMEM_BITS")
|
||||
Cc: Stefan Agner <stefan@agner.ch>
|
||||
Cc: Mike Rapoport <rppt@kernel.org>
|
||||
Cc: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
|
||||
Cc: Nitin Gupta <ngupta@vflare.org>
|
||||
Cc: Minchan Kim <minchan@kernel.org>
|
||||
Cc: Vineet Gupta <vgupta@synopsys.com>
|
||||
Cc: linux-snps-arc@lists.infradead.org
|
||||
Cc: Russell King <linux@armlinux.org.uk>
|
||||
Cc: linux-arm-kernel@lists.infradead.org
|
||||
Cc: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
|
||||
Cc: linux-mips@vger.kernel.org
|
||||
Cc: Michael Ellerman <mpe@ellerman.id.au>
|
||||
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
|
||||
Cc: Paul Mackerras <paulus@samba.org>
|
||||
Cc: linuxppc-dev@lists.ozlabs.org
|
||||
Cc: Paul Walmsley <paul.walmsley@sifive.com>
|
||||
Cc: Palmer Dabbelt <palmer@dabbelt.com>
|
||||
Cc: Albert Ou <aou@eecs.berkeley.edu>
|
||||
Cc: linux-riscv@lists.infradead.org
|
||||
Link: https://lore.kernel.org/linux-mm/bdfa44bf1c570b05d6c70898e2bbb0acf234ecdf.1604762181.git.stefan@agner.ch/
|
||||
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
|
||||
---
|
||||
arch/arc/include/asm/pgtable.h | 2 ++
|
||||
arch/arm/include/asm/pgtable-2level.h | 2 ++
|
||||
arch/arm/include/asm/pgtable-3level.h | 2 ++
|
||||
arch/mips/include/asm/pgtable-32.h | 3 +++
|
||||
arch/powerpc/include/asm/book3s/32/pgtable.h | 2 ++
|
||||
arch/powerpc/include/asm/nohash/32/pgtable.h | 2 ++
|
||||
arch/riscv/include/asm/pgtable-32.h | 2 ++
|
||||
include/asm-generic/pgtable.h | 13 +++++++++++++
|
||||
8 files changed, 28 insertions(+)
|
||||
|
||||
diff --git a/arch/arc/include/asm/pgtable.h b/arch/arc/include/asm/pgtable.h
|
||||
index 7addd0301c51..6bdcf9b495b8 100644
|
||||
--- a/arch/arc/include/asm/pgtable.h
|
||||
+++ b/arch/arc/include/asm/pgtable.h
|
||||
@@ -135,8 +135,10 @@
|
||||
|
||||
#ifdef CONFIG_ARC_HAS_PAE40
|
||||
#define PTE_BITS_NON_RWX_IN_PD1 (0xff00000000 | PAGE_MASK | _PAGE_CACHEABLE)
|
||||
+#define MAX_POSSIBLE_PHYSMEM_BITS 40
|
||||
#else
|
||||
#define PTE_BITS_NON_RWX_IN_PD1 (PAGE_MASK | _PAGE_CACHEABLE)
|
||||
+#define MAX_POSSIBLE_PHYSMEM_BITS 32
|
||||
#endif
|
||||
|
||||
/**************************************************************************
|
||||
diff --git a/arch/arm/include/asm/pgtable-2level.h b/arch/arm/include/asm/pgtable-2level.h
|
||||
index 51beec41d48c..50b51ac91fcb 100644
|
||||
--- a/arch/arm/include/asm/pgtable-2level.h
|
||||
+++ b/arch/arm/include/asm/pgtable-2level.h
|
||||
@@ -75,6 +75,8 @@
|
||||
#define PTE_HWTABLE_OFF (PTE_HWTABLE_PTRS * sizeof(pte_t))
|
||||
#define PTE_HWTABLE_SIZE (PTRS_PER_PTE * sizeof(u32))
|
||||
|
||||
+#define MAX_POSSIBLE_PHYSMEM_BITS 32
|
||||
+
|
||||
/*
|
||||
* PMD_SHIFT determines the size of the area a second-level page table can map
|
||||
* PGDIR_SHIFT determines what a third-level page table entry can map
|
||||
diff --git a/arch/arm/include/asm/pgtable-3level.h b/arch/arm/include/asm/pgtable-3level.h
|
||||
index 5b18295021a0..8006a56cc2ce 100644
|
||||
--- a/arch/arm/include/asm/pgtable-3level.h
|
||||
+++ b/arch/arm/include/asm/pgtable-3level.h
|
||||
@@ -25,6 +25,8 @@
|
||||
#define PTE_HWTABLE_OFF (0)
|
||||
#define PTE_HWTABLE_SIZE (PTRS_PER_PTE * sizeof(u64))
|
||||
|
||||
+#define MAX_POSSIBLE_PHYSMEM_BITS 40
|
||||
+
|
||||
/*
|
||||
* PGDIR_SHIFT determines the size a top-level page table entry can map.
|
||||
*/
|
||||
diff --git a/arch/mips/include/asm/pgtable-32.h b/arch/mips/include/asm/pgtable-32.h
|
||||
index ba967148b016..2604fab8a92d 100644
|
||||
--- a/arch/mips/include/asm/pgtable-32.h
|
||||
+++ b/arch/mips/include/asm/pgtable-32.h
|
||||
@@ -155,6 +155,7 @@ static inline void pmd_clear(pmd_t *pmdp)
|
||||
|
||||
#if defined(CONFIG_XPA)
|
||||
|
||||
+#define MAX_POSSIBLE_PHYSMEM_BITS 40
|
||||
#define pte_pfn(x) (((unsigned long)((x).pte_high >> _PFN_SHIFT)) | (unsigned long)((x).pte_low << _PAGE_PRESENT_SHIFT))
|
||||
static inline pte_t
|
||||
pfn_pte(unsigned long pfn, pgprot_t prot)
|
||||
@@ -170,6 +171,7 @@ pfn_pte(unsigned long pfn, pgprot_t prot)
|
||||
|
||||
#elif defined(CONFIG_PHYS_ADDR_T_64BIT) && defined(CONFIG_CPU_MIPS32)
|
||||
|
||||
+#define MAX_POSSIBLE_PHYSMEM_BITS 36
|
||||
#define pte_pfn(x) ((unsigned long)((x).pte_high >> 6))
|
||||
|
||||
static inline pte_t pfn_pte(unsigned long pfn, pgprot_t prot)
|
||||
@@ -184,6 +186,7 @@ static inline pte_t pfn_pte(unsigned long pfn, pgprot_t prot)
|
||||
|
||||
#else
|
||||
|
||||
+#define MAX_POSSIBLE_PHYSMEM_BITS 32
|
||||
#ifdef CONFIG_CPU_VR41XX
|
||||
#define pte_pfn(x) ((unsigned long)((x).pte >> (PAGE_SHIFT + 2)))
|
||||
#define pfn_pte(pfn, prot) __pte(((pfn) << (PAGE_SHIFT + 2)) | pgprot_val(prot))
|
||||
diff --git a/arch/powerpc/include/asm/book3s/32/pgtable.h b/arch/powerpc/include/asm/book3s/32/pgtable.h
|
||||
index 0796533d37dd..7b6349be621a 100644
|
||||
--- a/arch/powerpc/include/asm/book3s/32/pgtable.h
|
||||
+++ b/arch/powerpc/include/asm/book3s/32/pgtable.h
|
||||
@@ -37,8 +37,10 @@ static inline bool pte_user(pte_t pte)
|
||||
*/
|
||||
#ifdef CONFIG_PTE_64BIT
|
||||
#define PTE_RPN_MASK (~((1ULL << PTE_RPN_SHIFT) - 1))
|
||||
+#define MAX_POSSIBLE_PHYSMEM_BITS 36
|
||||
#else
|
||||
#define PTE_RPN_MASK (~((1UL << PTE_RPN_SHIFT) - 1))
|
||||
+#define MAX_POSSIBLE_PHYSMEM_BITS 32
|
||||
#endif
|
||||
|
||||
/*
|
||||
diff --git a/arch/powerpc/include/asm/nohash/32/pgtable.h b/arch/powerpc/include/asm/nohash/32/pgtable.h
|
||||
index 552b96eef0c8..3d32d7103ec8 100644
|
||||
--- a/arch/powerpc/include/asm/nohash/32/pgtable.h
|
||||
+++ b/arch/powerpc/include/asm/nohash/32/pgtable.h
|
||||
@@ -148,8 +148,10 @@ int map_kernel_page(unsigned long va, phys_addr_t pa, pgprot_t prot);
|
||||
*/
|
||||
#if defined(CONFIG_PPC32) && defined(CONFIG_PTE_64BIT)
|
||||
#define PTE_RPN_MASK (~((1ULL << PTE_RPN_SHIFT) - 1))
|
||||
+#define MAX_POSSIBLE_PHYSMEM_BITS 36
|
||||
#else
|
||||
#define PTE_RPN_MASK (~((1UL << PTE_RPN_SHIFT) - 1))
|
||||
+#define MAX_POSSIBLE_PHYSMEM_BITS 32
|
||||
#endif
|
||||
|
||||
/*
|
||||
diff --git a/arch/riscv/include/asm/pgtable-32.h b/arch/riscv/include/asm/pgtable-32.h
|
||||
index b0ab66e5fdb1..5b2e79e5bfa5 100644
|
||||
--- a/arch/riscv/include/asm/pgtable-32.h
|
||||
+++ b/arch/riscv/include/asm/pgtable-32.h
|
||||
@@ -14,4 +14,6 @@
|
||||
#define PGDIR_SIZE (_AC(1, UL) << PGDIR_SHIFT)
|
||||
#define PGDIR_MASK (~(PGDIR_SIZE - 1))
|
||||
|
||||
+#define MAX_POSSIBLE_PHYSMEM_BITS 34
|
||||
+
|
||||
#endif /* _ASM_RISCV_PGTABLE_32_H */
|
||||
diff --git a/include/asm-generic/pgtable.h b/include/asm-generic/pgtable.h
|
||||
index 6fd08cf04add..7a8c43dee873 100644
|
||||
--- a/include/asm-generic/pgtable.h
|
||||
+++ b/include/asm-generic/pgtable.h
|
||||
@@ -1163,6 +1163,19 @@ static inline bool arch_has_pfn_modify_check(void)
|
||||
#define io_remap_pfn_range remap_pfn_range
|
||||
#endif
|
||||
|
||||
+#if !defined(MAX_POSSIBLE_PHYSMEM_BITS) && !defined(CONFIG_64BIT)
|
||||
+#ifdef CONFIG_PHYS_ADDR_T_64BIT
|
||||
+/*
|
||||
+ * ZSMALLOC needs to know the highest PFN on 32-bit architectures
|
||||
+ * with physical address space extension, but falls back to
|
||||
+ * BITS_PER_LONG otherwise.
|
||||
+ */
|
||||
+#error Missing MAX_POSSIBLE_PHYSMEM_BITS definition
|
||||
+#else
|
||||
+#define MAX_POSSIBLE_PHYSMEM_BITS 32
|
||||
+#endif
|
||||
+#endif
|
||||
+
|
||||
#ifndef has_transparent_hugepage
|
||||
#ifdef CONFIG_TRANSPARENT_HUGEPAGE
|
||||
#define has_transparent_hugepage() 1
|
||||
--
|
||||
2.29.2
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user