mirror of
https://github.com/home-assistant/operating-system.git
synced 2025-08-30 23:30:20 +00:00
Compare commits
223 Commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
cb0fa11eeb | ||
![]() |
89c4d57b18 | ||
![]() |
a66f3380e3 | ||
![]() |
288f4a0082 | ||
![]() |
622cbb806d | ||
![]() |
5c8a0307fb | ||
![]() |
51e80cb7bc | ||
![]() |
9e921ed9ad | ||
![]() |
56730adf48 | ||
![]() |
22aa316483 | ||
![]() |
d60272b79a | ||
![]() |
068a57763c | ||
![]() |
6810659f9b | ||
![]() |
8020671ca6 | ||
![]() |
0f57b55b4c | ||
![]() |
c7909de767 | ||
![]() |
c1c6a6ce21 | ||
![]() |
111018b911 | ||
![]() |
40b4d5ca2e | ||
![]() |
25d1f5d7d1 | ||
![]() |
d6a86c29f9 | ||
![]() |
2d3119ef22 | ||
![]() |
9dd269d766 | ||
![]() |
3c6897e2cd | ||
![]() |
7afe867fd5 | ||
![]() |
779dc0bcb8 | ||
![]() |
70d6252eae | ||
![]() |
9ed200a70e | ||
![]() |
be2cfd7622 | ||
![]() |
367fc1561b | ||
![]() |
5ac85a4c45 | ||
![]() |
3d793dc7ef | ||
![]() |
b76d55283d | ||
![]() |
422bf2d1e1 | ||
![]() |
33e0ccb9ce | ||
![]() |
f86fcbd609 | ||
![]() |
99a4d4ea75 | ||
![]() |
0b1c349a8f | ||
![]() |
2a910b0e45 | ||
![]() |
05ba57e006 | ||
![]() |
56e0d941d0 | ||
![]() |
2d9540117f | ||
![]() |
5cae40c396 | ||
![]() |
ae0aeb84f5 | ||
![]() |
c9d091c1b3 | ||
![]() |
a52f7ae02c | ||
![]() |
366bb0e495 | ||
![]() |
aff28ce60e | ||
![]() |
40a705bbd3 | ||
![]() |
1e1d10570c | ||
![]() |
fe1083822d | ||
![]() |
b4710290b6 | ||
![]() |
bb7964ff02 | ||
![]() |
7f934b4470 | ||
![]() |
0eef6473ba | ||
![]() |
9c6cb6e1f0 | ||
![]() |
98ce2bec4a | ||
![]() |
1d6ab42f88 | ||
![]() |
dde7f1d073 | ||
![]() |
ef25289a6d | ||
![]() |
82db02756c | ||
![]() |
905aa21e8c | ||
![]() |
ab19c8c6cf | ||
![]() |
fdd8c246dd | ||
![]() |
23fb6b8dd3 | ||
![]() |
45abe203f5 | ||
![]() |
86cabd3d1a | ||
![]() |
8fe1d2ddbe | ||
![]() |
a15671a530 | ||
![]() |
6f512527aa | ||
![]() |
7e702a2ab2 | ||
![]() |
37d2f13e49 | ||
![]() |
0a2fdf47b3 | ||
![]() |
55f8704523 | ||
![]() |
19c03729f3 | ||
![]() |
66e5ea3b4b | ||
![]() |
28e3b109b7 | ||
![]() |
a5256fb2d0 | ||
![]() |
f358f322da | ||
![]() |
b77d633382 | ||
![]() |
cd022e6d5e | ||
![]() |
27e6aa60fd | ||
![]() |
dc795cfc51 | ||
![]() |
4d2229e50b | ||
![]() |
82a40de894 | ||
![]() |
5c17e0974b | ||
![]() |
9db5dc7ab8 | ||
![]() |
9ba4dd5524 | ||
![]() |
32b037af32 | ||
![]() |
c2c05312a0 | ||
![]() |
b91c432fa8 | ||
![]() |
023d0b27f5 | ||
![]() |
57ffd6444b | ||
![]() |
8bbc330407 | ||
![]() |
76853d1171 | ||
![]() |
0daf748c97 | ||
![]() |
8aabf65bb7 | ||
![]() |
825ef58f85 | ||
![]() |
614ff50394 | ||
![]() |
907857985a | ||
![]() |
846512a283 | ||
![]() |
e646650a7e | ||
![]() |
038f1b4bd6 | ||
![]() |
d7c09e15b9 | ||
![]() |
2c3c066ea0 | ||
![]() |
184eb9e048 | ||
![]() |
ce1f07126f | ||
![]() |
0188f24a0d | ||
![]() |
581de22a06 | ||
![]() |
9764273894 | ||
![]() |
cc53ad4fd6 | ||
![]() |
142e7df6cf | ||
![]() |
4d6991fd45 | ||
![]() |
98ab22c119 | ||
![]() |
381d2aa8f7 | ||
![]() |
594c24eab7 | ||
![]() |
be2a64f4d2 | ||
![]() |
51bd8bd0e5 | ||
![]() |
4fa3329d59 | ||
![]() |
7959113c97 | ||
![]() |
cd385be81f | ||
![]() |
8ed6bc2e31 | ||
![]() |
68e63d15e5 | ||
![]() |
89c31bb967 | ||
![]() |
e3120df5d0 | ||
![]() |
59b687f0db | ||
![]() |
cee0123105 | ||
![]() |
22aede0278 | ||
![]() |
dadc82ae37 | ||
![]() |
26af1dd907 | ||
![]() |
c515dd19f2 | ||
![]() |
a39b8576e8 | ||
![]() |
a4d8e8492f | ||
![]() |
323f415fa8 | ||
![]() |
4255425b93 | ||
![]() |
7c70e3ef84 | ||
![]() |
d42f80c65e | ||
![]() |
c3cc81249b | ||
![]() |
d8273af0ad | ||
![]() |
a6bdf2c1c9 | ||
![]() |
14bb885ce9 | ||
![]() |
e5eefc9978 | ||
![]() |
6001c34091 | ||
![]() |
17d0cdf823 | ||
![]() |
8aceb287de | ||
![]() |
e42835f163 | ||
![]() |
1a8f9ca2e3 | ||
![]() |
162084082e | ||
![]() |
c2098e1cf4 | ||
![]() |
22c668b500 | ||
![]() |
6672046b6f | ||
![]() |
78b456d05c | ||
![]() |
2cc78abe56 | ||
![]() |
46bb12844f | ||
![]() |
1537d02408 | ||
![]() |
a66591166f | ||
![]() |
7443c45001 | ||
![]() |
a4f5670cd8 | ||
![]() |
c9c5f1b3e9 | ||
![]() |
b4c9f2fce2 | ||
![]() |
c48184cf91 | ||
![]() |
681fe1421a | ||
![]() |
acc293b662 | ||
![]() |
3a67e2e8c4 | ||
![]() |
8682d8af78 | ||
![]() |
b82707ff9a | ||
![]() |
525dcfedfb | ||
![]() |
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 | ||
![]() |
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 |
@@ -3,5 +3,9 @@ buildroot/
|
||||
buildroot-external/
|
||||
buildroot-patches/
|
||||
|
||||
# Ignore too
|
||||
# Release directory gets created using build scripts
|
||||
release/
|
||||
|
||||
# Ignore hidden directories as well
|
||||
.git/
|
||||
.github/
|
||||
|
40
.github/ISSUE_TEMPLATE.md
vendored
40
.github/ISSUE_TEMPLATE.md
vendored
@@ -1,34 +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/core/releases
|
||||
- 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 an add-on, make an issue in its repository.
|
||||
- If you are using Raspberry Pi overlays in config.txt and your system doesn't work anymore please report this to the Raspberry Pi kernel project.
|
||||
|
||||
- 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 -> Configuration -> Info
|
||||
- Or use this command: hass --version
|
||||
Describe the Home Assistant image you are using and the hardware environment
|
||||
-->
|
||||
- [ ] Raspberry Pi [1/2/3/4]
|
||||
- [ ] ODROID [C2/C4/N2(+)/XU4]
|
||||
- [ ] ASUS Tinker [S]
|
||||
- [ ] Generic x86-64 (like Intel NUC)
|
||||
- [ ] OVA (Open Virtualization Appliance, on Intel NUC or any other hardware, please add the Hypervisor you are using)
|
||||
|
||||
**Home Assistant OS release:**
|
||||
- [ ] Fresh installation of release x.y
|
||||
- [ ] Updated from version x.y
|
||||
- Additional information (if accessible):
|
||||
<!--
|
||||
- Home Assistant Frontend -> Configuration -> Info (use the copy button in the System Health block)
|
||||
- Or use this command: `ha info`
|
||||
-->
|
||||
|
||||
**Supervisor logs:**
|
||||
<!--
|
||||
- Frontend -> Supervisor -> 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 hardware issues? (different SD card etc.)
|
||||
-->
|
||||
|
16
.github/release-drafter.yml
vendored
16
.github/release-drafter.yml
vendored
@@ -1,16 +1,20 @@
|
||||
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'
|
||||
label: 'board/intel-nuc'
|
||||
- title: 'Hardkernel'
|
||||
label: 'board/hardkernel'
|
||||
- title: 'Generic x86-64'
|
||||
label: 'board/generic-x86-64'
|
||||
- title: 'Hardkernel ODROID'
|
||||
label: 'board/odroid'
|
||||
- title: 'ASUS Tinker'
|
||||
label: 'board/tinker'
|
||||
filter-by-commitish: true
|
||||
commitish: dev
|
||||
template: |
|
||||
## Changes
|
||||
|
||||
|
109
.github/workflows/dev.yml
vendored
Normal file
109
.github/workflows/dev.yml
vendored
Normal file
@@ -0,0 +1,109 @@
|
||||
# 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": "generic_x86_64", "output": "generic-x86-64", "runner": "x86-64-runner"}
|
||||
- {"name": "odroid_c2", "output": "odroid-c2", "runner": "aarch64-runner"}
|
||||
- {"name": "odroid_c4", "output": "odroid-c4", "runner": "aarch64-runner"}
|
||||
- {"name": "odroid_n2", "output": "odroid-n2", "runner": "aarch64-runner"}
|
||||
- {"name": "odroid_xu4", "output": "odroid-xu4" , "runner": "aarch64-runner"}
|
||||
- {"name": "rpi", "output": "rpi", "runner": "arm-runner"}
|
||||
- {"name": "rpi0_w", "output": "rpi0-w", "runner": "arm-runner"}
|
||||
- {"name": "rpi2", "output": "rpi2", "runner": "arm-runner"}
|
||||
- {"name": "rpi3", "output": "rpi3", "runner": "arm-runner"}
|
||||
- {"name": "rpi3_64", "output": "rpi3-64", "runner": "aarch64-runner"}
|
||||
- {"name": "rpi4", "output": "rpi4", "runner": "arm-runner"}
|
||||
- {"name": "rpi4_64", "output": "rpi4-64", "runner": "aarch64-runner"}
|
||||
- {"name": "tinker", "output": "tinker", "runner": "arm-runner"}
|
||||
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 BUILDDIR=/build 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
|
||||
|
||||
bump_version:
|
||||
name: Bump dev version to ${{ needs.version.outputs.version_main }}.${{ needs.version.outputs.version_dev }}
|
||||
needs: [ build, version ]
|
||||
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.version.outputs.version_main }}.${{ needs.version.outputs.version_dev }}
|
||||
channel: "dev"
|
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 }}
|
179
.github/workflows/release.yml
vendored
Normal file
179
.github/workflows/release.yml
vendored
Normal file
@@ -0,0 +1,179 @@
|
||||
# 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 }}
|
||||
version_dev: ${{ steps.version_check.outputs.version_dev }}
|
||||
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)
|
||||
tag_major=$(echo "${{ github.event.release.tag_name }}" | cut -d '.' -f 1)
|
||||
tag_build=$(echo "${{ github.event.release.tag_name }}" | cut -d '.' -f 2)
|
||||
tag_dev=$(echo "${{ github.event.release.tag_name }}" | cut -d '.' -f 3)
|
||||
if [ "${major}.${build}" != "${tag_major}.${tag_build}" ]; then
|
||||
echo "Version number in Buildroot metadata is does not match tag (${major}.${build} vs ${{ github.event.release.tag_name }})."
|
||||
exit 1
|
||||
fi
|
||||
if [ "" != "${tag_dev}" ]; then
|
||||
echo "Note: Release build with custom dev part: ${tag_dev}."
|
||||
echo "::set-output name=version::${major}.${build}.${tag_dev}"
|
||||
else
|
||||
echo "::set-output name=version::${major}.${build}"
|
||||
fi
|
||||
echo "::set-output name=version_dev::${tag_dev}"
|
||||
|
||||
build:
|
||||
name: Release build for ${{ matrix.board.name }}
|
||||
needs: validate_release
|
||||
strategy:
|
||||
matrix:
|
||||
board:
|
||||
- {"name": "ova", "output": "ova", "runner": "x86-64-runner"}
|
||||
- {"name": "generic_x86_64", "output": "generic-x86-64", "runner": "x86-64-runner"}
|
||||
- {"name": "odroid_c2", "output": "odroid-c2", "runner": "aarch64-runner"}
|
||||
- {"name": "odroid_c4", "output": "odroid-c4", "runner": "aarch64-runner"}
|
||||
- {"name": "odroid_n2", "output": "odroid-n2", "runner": "aarch64-runner"}
|
||||
- {"name": "odroid_xu4", "output": "odroid-xu4" , "runner": "aarch64-runner"}
|
||||
- {"name": "rpi", "output": "rpi", "runner": "arm-runner"}
|
||||
- {"name": "rpi0_w", "output": "rpi0-w", "runner": "arm-runner"}
|
||||
- {"name": "rpi2", "output": "rpi2", "runner": "arm-runner"}
|
||||
- {"name": "rpi3", "output": "rpi3", "runner": "arm-runner"}
|
||||
- {"name": "rpi3_64", "output": "rpi3-64", "runner": "aarch64-runner"}
|
||||
- {"name": "rpi4", "output": "rpi4", "runner": "arm-runner"}
|
||||
- {"name": "rpi4_64", "output": "rpi4-64", "runner": "aarch64-runner"}
|
||||
- {"name": "tinker", "output": "tinker", "runner": "arm-runner"}
|
||||
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 BUILDDIR=/build VERSION_DEV=${{ needs.validate_release.outputs.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/haos_${{ matrix.board.output }}-${{ needs.validate_release.outputs.version }}.img.xz
|
||||
asset_name: haos_${{ matrix.board.output }}-${{ needs.validate_release.outputs.version }}.img.xz
|
||||
asset_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/haos_${{ matrix.board.output }}-${{ needs.validate_release.outputs.version }}.raucb
|
||||
asset_name: haos_${{ 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/haos_${{ matrix.board.output }}-${{ needs.validate_release.outputs.version }}.ova
|
||||
asset_name: haos_${{ 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/haos_${{ matrix.board.output }}-${{ needs.validate_release.outputs.version }}.qcow2.xz
|
||||
asset_name: haos_${{ matrix.board.output }}-${{ needs.validate_release.outputs.version }}.qcow2.xz
|
||||
asset_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/haos_${{ matrix.board.output }}-${{ needs.validate_release.outputs.version }}.vdi.zip
|
||||
asset_name: haos_${{ matrix.board.output }}-${{ needs.validate_release.outputs.version }}.vdi.zip
|
||||
asset_content_type: application/zip
|
||||
|
||||
- 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/haos_${{ matrix.board.output }}-${{ needs.validate_release.outputs.version }}.vhdx.zip
|
||||
asset_name: haos_${{ matrix.board.output }}-${{ needs.validate_release.outputs.version }}.vhdx.zip
|
||||
asset_content_type: application/zip
|
||||
|
||||
- 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/haos_${{ matrix.board.output }}-${{ needs.validate_release.outputs.version }}.vmdk.zip
|
||||
asset_name: haos_${{ matrix.board.output }}-${{ needs.validate_release.outputs.version }}.vmdk.zip
|
||||
asset_content_type: application/zip
|
||||
|
||||
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 beta version
|
||||
uses: home-assistant/actions/helpers/version-push@master
|
||||
with:
|
||||
key: "hassos[]"
|
||||
key-description: "Home Assistant OS"
|
||||
version: ${{ needs.validate_release.outputs.version }}
|
||||
channel: "beta"
|
1
.gitignore
vendored
1
.gitignore
vendored
@@ -1,2 +1,3 @@
|
||||
.DS_Store
|
||||
/release
|
||||
*.pem
|
||||
|
@@ -36,8 +36,11 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||
rsync \
|
||||
sudo \
|
||||
unzip \
|
||||
zip \
|
||||
wget \
|
||||
qemu-utils \
|
||||
openssh-client \
|
||||
vim \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Init entry
|
||||
|
@@ -14,14 +14,15 @@ The following boards/devices are supported:
|
||||
- Pi (not recommended)
|
||||
- Hardkernel
|
||||
- Odroid-C2
|
||||
- Odroid-C4 (_experimental_)
|
||||
- Odroid-N2
|
||||
- Odroid-XU4
|
||||
- Intel NUC
|
||||
- Generic x86-64 (UEFI, not suited for virtualization)
|
||||
- Intel NUC5CPYH
|
||||
- Intel NUC6CAYH
|
||||
- Intel NUC10I3FNK2
|
||||
- Gigabyte GB-BPCE-3455
|
||||
- Others recent Intel NUC computers are likely to work too, only those listed above have been tested.
|
||||
- Computers supporting x64-64 architecture and UEFI boot should generally work
|
||||
- Asus
|
||||
- Tinker Board
|
||||
- Virtual appliance (x86_64/UEFI):
|
||||
@@ -38,16 +39,17 @@ Notes:
|
||||
|
||||
|Board|Build|Config|Docs|
|
||||
|-----|----|------|----|
|
||||
|Pi4B 32-bit |`make rpi4` |[rpi4](../../buildroot-external/configs/rpi4_defconfig)|[raspberrypi](./raspberrypi/)|
|
||||
|Pi4B 64-bit |`make rpi4_64` |[rpi4_64](../../buildroot-external/configs/rpi4_64_defconfig)|[raspberrypi](./raspberrypi/)|
|
||||
|Pi3B 32-bit |`make rpi3` |[rpi3](../../buildroot-external/configs/rpi3_defconfig)|[raspberrypi](./raspberrypi/)|
|
||||
|Pi3B 64-bit |`make rpi3_64` |[rpi3_64](../../buildroot-external/configs/rpi3_64_defconfig)|[raspberrypi](./raspberrypi/)|
|
||||
|Pi2 |`make rpi2` |[rpi2](../../buildroot-external/configs/rpi2_defconfig)|[raspberrypi](./raspberrypi/)|
|
||||
|Pi Zero |`make rpi0_w` |[rpi0_w](../../buildroot-external/configs/rpi0_w_defconfig)|[raspberrypi](./raspberrypi/)|
|
||||
|Pi |`make rpi` |[rpi](../../buildroot-external/configs/rpi_defconfig)|[raspberrypi](./raspberrypi/)|
|
||||
|Odroid-C2 |`make odroid_c2` |[odroid_c2](../../buildroot-external/configs/odroid_c2_defconfig)|[hardkernel](./hardkernel/)|
|
||||
|Odroid-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/)|
|
||||
|Tinker Board|`make tinker` |[tinker](../../buildroot-external/configs/tinker_defconfig)|[asus](./asus/)|
|
||||
|OVA |`make ova` |[ova](../../buildroot-external/configs/ova_defconfig)|[ova](./ova/)|
|
||||
|Pi4B 32-bit |`make rpi4` |[rpi4](../../buildroot-external/configs/rpi4_defconfig)|[raspberrypi](./raspberrypi/)|
|
||||
|Pi4B 64-bit |`make rpi4_64` |[rpi4_64](../../buildroot-external/configs/rpi4_64_defconfig)|[raspberrypi](./raspberrypi/)|
|
||||
|Pi3B 32-bit |`make rpi3` |[rpi3](../../buildroot-external/configs/rpi3_defconfig)|[raspberrypi](./raspberrypi/)|
|
||||
|Pi3B 64-bit |`make rpi3_64` |[rpi3_64](../../buildroot-external/configs/rpi3_64_defconfig)|[raspberrypi](./raspberrypi/)|
|
||||
|Pi2 |`make rpi2` |[rpi2](../../buildroot-external/configs/rpi2_defconfig)|[raspberrypi](./raspberrypi/)|
|
||||
|Pi Zero |`make rpi0_w` |[rpi0_w](../../buildroot-external/configs/rpi0_w_defconfig)|[raspberrypi](./raspberrypi/)|
|
||||
|Pi |`make rpi` |[rpi](../../buildroot-external/configs/rpi_defconfig)|[raspberrypi](./raspberrypi/)|
|
||||
|Odroid-C2 |`make odroid_c2` |[odroid_c2](../../buildroot-external/configs/odroid_c2_defconfig)|[hardkernel](./hardkernel/)|
|
||||
|Odroid-C4 |`make odroid_c4` |[odroid_c4](../../buildroot-external/configs/odroid_c4_defconfig)|[hardkernel](./hardkernel/)|
|
||||
|Odroid-N2 |`make odroid_n2` |[odroid_n2](../../buildroot-external/configs/odroid_n2_defconfig)|[hardkernel](./hardkernel/)|
|
||||
|Odroid-XU4 |`make odroid_xu4` |[odroid_xu4](../../buildroot-external/configs/odroid_xu4_defconfig)|[hardkernel](./hardkernel/)|
|
||||
|Tinker Board |`make tinker` |[tinker](../../buildroot-external/configs/tinker_defconfig)|[asus](./asus/)|
|
||||
|Generic x86-64 |`make generic_x86_64` |[generic_x86_64](../../buildroot-external/configs/generic_x86_64_defconfig)|[generic-x86-64](./generic-x86-64/)|
|
||||
|OVA |`make ova` |[ova](../../buildroot-external/configs/ova_defconfig)|[ova](./ova/)|
|
||||
|
61
Documentation/boards/generic-x86-64/README.md
Normal file
61
Documentation/boards/generic-x86-64/README.md
Normal file
@@ -0,0 +1,61 @@
|
||||
# Generic x86-64
|
||||
|
||||
## Supported Hardware
|
||||
|
||||
This board configuration aims to support most x86-64 systems with UEFI boot. The
|
||||
main aim is to support Intel NUC mini PCs and similar systems. Hardware it has
|
||||
been tested with is listed below.
|
||||
|
||||
## Tested Hardware
|
||||
|
||||
| Device | Release Date | Support | Config |
|
||||
|-----------------------|--------------|---------|-------------|
|
||||
| Intel NUC5CPYH | Q3 2015 | yes | [generic_x86_64](../../../buildroot-external/configs/generic_x86_64_defconfig) |
|
||||
| Intel NUC6CAYH | Q4 2016 | yes | [generic_x86_64](../../../buildroot-external/configs/generic_x86_64_defconfig) |
|
||||
| Intel NUC7i3DNHE | Q3 2017 | yes | [generic_x86_64](../../../buildroot-external/configs/generic_x86_64_defconfig) |
|
||||
| Intel NUC10i3FNK2 | Q4 2019 | yes | [generic_x86_64](../../../buildroot-external/configs/generic_x86_64_defconfig) |
|
||||
| Gigabyte GB-BPCE-3455 | 2017 | yes* | [generic_x86_64](../../../buildroot-external/configs/generic_x86_64_defconfig) |
|
||||
|
||||
\* needs 'nomodeset' in cmdline.txt if you want a console
|
||||
|
||||
|
||||
## Requirements
|
||||
|
||||
- x86-64 support
|
||||
- UEFI boot
|
||||
- SATA/AHCI or eMMC storage
|
||||
- Supported NIC:
|
||||
- Intel Gigabit NIC (e1000, igb - via Linux mainline)
|
||||
- Intel PCIe Gigabit NIC (e1000e - via out-of-tree module in *buildroot-external/package/intel-e1000e*)
|
||||
- Realtek Gigabit NIC (r8169)
|
||||
- Intel Wireless Wifi 802.11ac (iwlwifi, see below)
|
||||
|
||||
## Wifi
|
||||
|
||||
The following cards are supported:
|
||||
|
||||
- Intel Wireless 3160
|
||||
- Intel Wireless 7260
|
||||
- Intel Wireless 7265
|
||||
- Intel Wireless-AC 3165
|
||||
- Intel Wireless-AC 3168
|
||||
- Intel Wireless-AC 8260
|
||||
- Intel Wireless-AC 8265
|
||||
- Intel Wireless-AC 9260
|
||||
- Intel Wireless-AC 9461
|
||||
- Intel Wireless-AC 9462
|
||||
- Intel Wireless-AC 9560
|
||||
|
||||
## Bluetooth
|
||||
|
||||
Bluetooth is untested.
|
||||
|
||||
## Installation
|
||||
|
||||
Make sure secure boot is disabled in the UEFI BIOS settings.
|
||||
|
||||
Currently there is no shiny installation method. Checklist:
|
||||
- Boot PC to live environment using PXE or USB
|
||||
- Copy or download the Home Assistant OS image into your live environment
|
||||
- unxz the image and dd to the local hard disk
|
||||
- Reboot
|
@@ -2,10 +2,25 @@
|
||||
|
||||
## 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.
|
||||
|
||||
## Connectivity devices
|
||||
|
||||
### Wi-Fi
|
||||
|
||||
The following devices have been tested on Home Assistant OS 5.8:
|
||||
|
||||
- [Bluetooth Module 2](https://www.hardkernel.com/shop/bluetooth-module-2/)
|
||||
- [WiFi Module 3](https://www.hardkernel.com/shop/wifi-module-3/)
|
||||
|
||||
The [WiFi Module 5A](https://www.hardkernel.com/shop/wifi-module-5a/) is not
|
||||
recommended as there is no upstream driver support available. The driver
|
||||
currently compatible with recent Linux kernel version seems to have issues
|
||||
connecting to 5GHz networks.
|
||||
|
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).
|
@@ -12,3 +12,7 @@ eg. `console=ttyAML0,115200n8 console=tty0`
|
||||
## GPIO
|
||||
|
||||
Refer to [the odroid wiki](https://wiki.odroid.com/odroid-n2/hardware/expansion_connectors).
|
||||
At this point not all functionality is supported by the upstream kernel used
|
||||
by Home Assistant OS.
|
||||
|
||||
The GPIO on pin 11 is used as a low active power button input.
|
||||
|
@@ -1,56 +0,0 @@
|
||||
# Intel NUC
|
||||
|
||||
## Supported Hardware
|
||||
|
||||
This board configuration supports the Intel NUC mini PCs and compatibles. It should work for most recent NUC computers and, because this is a UEFI based image, it should in fact work with for any x86-64 based computer with UEFI. Hardware it has been tested with is listed below.
|
||||
|
||||
## Tested Hardware
|
||||
|
||||
| Device | Release Date | Support | Config |
|
||||
|-----------------------|--------------|---------|-------------|
|
||||
| Intel NUC5CPYH | Q3 2015 | yes | [intel_nuc](../../../buildroot-external/configs/intel_nuc_defconfig) |
|
||||
| Intel NUC6CAYH | Q4 2016 | yes | [intel_nuc](../../../buildroot-external/configs/intel_nuc_defconfig) |
|
||||
| Intel NUC10i3FNK2 | Q4 2019 | yes | [intel_nuc](../../../buildroot-external/configs/intel_nuc_defconfig) |
|
||||
| Gigabyte GB-BPCE-3455 | 2017 | yes* | [intel_nuc](../../../buildroot-external/configs/intel_nuc_defconfig) |
|
||||
|
||||
\* needs 'nomodeset' in cmdline.txt if you want a console
|
||||
|
||||
|
||||
## Requirements
|
||||
|
||||
- x86-64 support
|
||||
- UEFI boot
|
||||
- SATA/AHCI storage
|
||||
- Supported NIC:
|
||||
- Intel Gigabit NIC (e1000, igb - via Linux mainline)
|
||||
- Intel PCIe Gigabit NIC (e1000e - via out-of-tree module in *buildroot-external/package/intel-e1000e*)
|
||||
- Realtek Gigabit NIC (r8169)
|
||||
- Intel Wireless Wifi 802.11ac (iwlwifi, see below)
|
||||
|
||||
## Wifi
|
||||
|
||||
The following cards are supported:
|
||||
|
||||
- Intel Wireless 3160
|
||||
- Intel Wireless 7260
|
||||
- Intel Wireless 7265
|
||||
- Intel Wireless-AC 3165
|
||||
- Intel Wireless-AC 3168
|
||||
- Intel Wireless-AC 8260
|
||||
- Intel Wireless-AC 8265
|
||||
- Intel Wireless-AC 9260
|
||||
- Intel Wireless-AC 9461
|
||||
- Intel Wireless-AC 9462
|
||||
- Intel Wireless-AC 9560
|
||||
|
||||
## Bluetooth
|
||||
|
||||
Bluetooth is untested.
|
||||
|
||||
## Installation
|
||||
|
||||
Currently there is no shiny installation method. Checklist:
|
||||
- Boot PC to live-environment using PXE or USB
|
||||
- Copy or download the hassos image into your live environment
|
||||
- zcat the image to local harddisk
|
||||
- Reboot
|
@@ -37,9 +37,11 @@ USB mass storage boot is available on Raspberry Pi 4 (64-bit only), 3B, 3B+, 3A+
|
||||
|
||||
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 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.
|
||||
* If install still fails, then your SSD likely needs quirks enabled to work correctly (see [Finding the VID and PID of your USB SSD](https://www.raspberrypi.org/forums/viewtopic.php?t=245931)). Once you find your adapter's ID, add the quirks parameter in `cmdline.txt`.
|
||||
|
||||
For more information see [RaspberryPi](https://www.raspberrypi.org/documentation/hardware/raspberrypi/bootmodes/msd.md).
|
||||
|
||||
@@ -53,4 +55,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
|
||||
|
@@ -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
|
||||
|
@@ -32,7 +32,7 @@ $ sudo systemctl --no-pager status docker -n0
|
||||
Now, change your working directory to your home-assistant/operating-system repository checkout (please adapt path names as needed), make sure your intended changes to the source tree are applied (and committed, ideally :)), and execute the `enter.sh` helper script:
|
||||
|
||||
```bash
|
||||
$ cd ~/codebase/hassos/
|
||||
$ cd ~/codebase/operating-system/
|
||||
$ sudo scripts/enter.sh
|
||||
Sending build context to Docker daemon 30.48MB
|
||||
Step 1/6 : FROM ubuntu:18.04
|
||||
|
@@ -1,18 +1,19 @@
|
||||
|
||||
# Kernel Version
|
||||
|
||||
Default Kernel tree: 5.4
|
||||
Default Kernel tree: 5.10
|
||||
|
||||
| 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.10.42 |
|
||||
| Raspberry Pi | 5.10.17 |
|
||||
| Raspberry Pi 0-W | 5.10.17 |
|
||||
| Raspberry Pi 2 | 5.10.17 |
|
||||
| Raspberry Pi 3 | 5.10.17 |
|
||||
| Raspberry Pi 4 | 5.10.17 |
|
||||
| Tinker Board | 5.10.42 |
|
||||
| Odroid-C2 | 5.10.42 |
|
||||
| Odroid-C4 | 5.10.42 |
|
||||
| Odroid-N2 | 5.9.16 |
|
||||
| Odroid-XU4 | 5.10.42 |
|
||||
| Generic x86-64 | 5.10.42 |
|
||||
|
@@ -4,23 +4,49 @@ Home Assistant Operating System uses NetworkManager to control the host network.
|
||||
|
||||
## Configure network
|
||||
|
||||
Only a manual configuration using NetworkManager connection files is supported. Without a configuration file, the device will use DHCP by default. These network connection files can be placed on a USB drive and imported to the host as described in [Configuration][configuration-usb].
|
||||
By default the device will be in DHCP state.
|
||||
|
||||
## Configuration examples
|
||||
Basic network settings can be set through the Supervisor frontend in the System
|
||||
tab. Advanced configurations such as VLAN are also available through the
|
||||
`ha network` CLI command.
|
||||
|
||||
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:
|
||||
To restore the default configuration the `ha network` CLI command can be used as
|
||||
well:
|
||||
|
||||
```
|
||||
ha network update default --ipv4-method auto
|
||||
```
|
||||
|
||||
If more advanced network settings are required network connection files can be
|
||||
placed on a USB drive and imported to the host as described in
|
||||
[Configuration][configuration-usb].
|
||||
|
||||
## Manual Network Configuration
|
||||
|
||||
If the frontend or `ha network` CLI cannot meet your use case, it is still
|
||||
possible to configure the underlying NetworkManager manually.
|
||||
|
||||
You can read the [NetworkManager manual][nm-manual] or find many configuration
|
||||
examples across the internet. Note that changes to `NetworkManager.conf` are
|
||||
not supported currently, only connection keyfiles are supported. 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:
|
||||
A preinstalled connection profile for wired network is active by default:
|
||||
|
||||
```ini
|
||||
[connection]
|
||||
id=my-network
|
||||
id=Home Assistant OS default
|
||||
uuid=f62bf7c2-e565-49ff-bbfc-a4cf791e6add
|
||||
type=802-3-ethernet
|
||||
llmnr=2
|
||||
mdns=2
|
||||
|
||||
[ipv4]
|
||||
method=auto
|
||||
@@ -37,6 +63,8 @@ method=auto
|
||||
id=my-network
|
||||
uuid=d55162b4-6152-4310-9312-8f4c54d86afa
|
||||
type=802-3-ethernet
|
||||
llmnr=2
|
||||
mdns=2
|
||||
|
||||
[ipv4]
|
||||
method=auto
|
||||
@@ -90,14 +118,16 @@ For `address`, the value before the semicolon is the IP address and subnet prefi
|
||||
|
||||
### Reset network
|
||||
|
||||
If you want to reset the network configuration back to the default DHCP settings, use the following commands on the host:
|
||||
If you want to reset the network configuration back to the default connection
|
||||
profile using DHCP, use the following commands on the host console:
|
||||
|
||||
```bash
|
||||
# rm /etc/NetworkManager/system-connections/*
|
||||
# cp /usr/share/system-connections/* /etc/NetworkManager/system-connections/
|
||||
# nmcli con reload
|
||||
# rm -r /mnt/overlay/etc/NetworkManager/system-connections
|
||||
# reboot
|
||||
```
|
||||
|
||||
Home Assistant OS will recreate the default connection profile during boot.
|
||||
|
||||
### Powersave
|
||||
|
||||
If you have trouble with powersave then apply the following changes:
|
||||
@@ -110,7 +140,7 @@ powersave=0
|
||||
|
||||
## Using `nmcli` to set a static IPv4 address
|
||||
|
||||
Log into the the HassOS base system via a console:
|
||||
Log into the the Home Assistant OS base system via a console:
|
||||
|
||||
```bash
|
||||
Welcome to Home Assistant
|
||||
@@ -121,13 +151,13 @@ homeassistant login:
|
||||
|
||||
From there you use the `nmcli` configuration tool.
|
||||
|
||||
- `# nmcli con show` will list the "HassOS default" connection in use.
|
||||
- `# nmcli con show "HassOS default"` will list all the properties of the connection.
|
||||
- `# nmcli con show` will list the "Home Assistant OS default" connection in use.
|
||||
- `# nmcli con show "Home Assistant OS default"` will list all the properties of the connection.
|
||||
|
||||
To start editing the configuration setting for "HassOS default":
|
||||
To start editing the configuration setting for "Home Assistant OS default":
|
||||
|
||||
```bash
|
||||
# nmcli con edit "HassOS default"
|
||||
# nmcli con edit "Home Assistant OS default"
|
||||
```
|
||||
|
||||
To add your static IP address (select 'yes' for manual method);
|
||||
@@ -150,6 +180,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/NetworkManager.conf.html
|
||||
[nm-manual]: https://developer.gnome.org/NetworkManager/stable/manpages.html
|
||||
[configuration-usb]: configuration.md
|
||||
[uuid]: https://www.uuidgenerator.net/
|
||||
|
@@ -34,7 +34,9 @@ A visual representation looks like this:
|
||||
|
||||
Sometime the bootloader part can look different because there can be firmware or SPLs for boot the CPU on the SoC.
|
||||
|
||||
## Data
|
||||
## Data disk
|
||||
|
||||

|
||||
|
||||
The data partition is the only partition with real I/O. It will be expanded automatically at boot to the full size of the disk.
|
||||
|
||||
@@ -51,10 +53,29 @@ Log in as `root` to get to the Home Assistant CLI and then enter `login` to cont
|
||||
|
||||
Confirm your USB SSD/HD is connected and recognized using `fdisk -l`.
|
||||
|
||||
Make sure the drive has no partition named `hassos-data` (or no partition at all). With the drive, use the below command (again, replacing XXX with your drive)
|
||||
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
|
||||
```
|
||||
|
||||
Hit any key to continue, and then the move will happen after the next reboot. Once complete, the external drive will be owned and used by the system.
|
||||
Enter "yes" to confirm the operation. This will prepare the disk, however, the
|
||||
actual move will be running on next reboot. This will make the first boot significantly longer than usual; please be patient. Reboot with the following command:
|
||||
```sh
|
||||
$ ha host reboot
|
||||
```
|
||||
|
||||
Once complete, the external drive
|
||||
will contain the data and will need to be plugged in to successfully boot Home
|
||||
Assistant.
|
||||
|
||||
## Check if the move was succesful.
|
||||
Within the Home Assistant interface you won't see if the move was succesful. To check this, go to your host console again (as described above) and enter:
|
||||
```sh
|
||||
$ systemctl status mnt-data.mount
|
||||
```
|
||||
If the data partition was moved to your USB drive you should see ```sh Active: active (mounted) ``` in the output. Also, it will show, which drive got mounted as /mnt/data (```sh Where ``` and ```sh what ``` section of the output)
|
||||
|
||||
|
||||
## Check Power Supply Rating
|
||||
Using an USB attached SSD can draw quite some power. For instance on Raspberry Pi 3 the official Raspberry Pi power supply (PSU) only provides 2.5A which can be too tight. Use a power supply which can at least provide 3.5A. Alternatively use a powered USB hub. Connect the Hub to one of the USB slots of your Raspberry Pi, and connect the SSD to the Hub. The power supply that came with the Hub will power the attached device(s).
|
||||
|
BIN
Documentation/usb-disk.png
Normal file
BIN
Documentation/usb-disk.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 67 KiB |
13
Makefile
13
Makefile
@@ -1,8 +1,11 @@
|
||||
RELEASE_DIR = /build/release
|
||||
BUILDDIR:=$(shell pwd)
|
||||
RELEASE_DIR = $(BUILDDIR)/release
|
||||
|
||||
BUILDROOT=/build/buildroot
|
||||
BUILDROOT_EXTERNAL=/build/buildroot-external
|
||||
BUILDROOT=$(BUILDDIR)/buildroot
|
||||
BUILDROOT_EXTERNAL=$(BUILDDIR)/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)))
|
||||
@@ -29,8 +32,8 @@ $(TARGETS_CONFIG): %-config:
|
||||
|
||||
$(TARGETS): %: $(RELEASE_DIR) %-config
|
||||
@echo "build $@"
|
||||
$(MAKE) -C $(BUILDROOT) BR2_EXTERNAL=$(BUILDROOT_EXTERNAL)
|
||||
cp -f $(O)/images/hassos_* $(RELEASE_DIR)/
|
||||
$(MAKE) -C $(BUILDROOT) BR2_EXTERNAL=$(BUILDROOT_EXTERNAL) VERSION_DEV=$(VERSION_DEV)
|
||||
cp -f $(O)/images/haos_* $(RELEASE_DIR)/
|
||||
|
||||
# Do not clean when building for one target
|
||||
ifneq ($(words $(filter $(TARGETS),$(MAKECMDGOALS))), 1)
|
||||
|
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,13 @@
|
||||
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"
|
||||
source "$BR2_EXTERNAL_HASSOS_PATH/package/os-agent/Config.in"
|
||||
source "$BR2_EXTERNAL_HASSOS_PATH/package/udisks2/Config.in"
|
||||
source "$BR2_EXTERNAL_HASSOS_PATH/package/eq3_char_loop/Config.in"
|
||||
source "$BR2_EXTERNAL_HASSOS_PATH/package/generic_raw_uart/Config.in"
|
||||
source "$BR2_EXTERNAL_HASSOS_PATH/package/rpi-rf-mod/Config.in"
|
||||
|
@@ -10,6 +10,10 @@ function hassos_pre_image() {
|
||||
"${BINARIES_DIR}/rk3288-tinker.dtb" \
|
||||
"${BINARIES_DIR}/rk3288-tinker-s.dtb"
|
||||
|
||||
mkdir -p "${BOOT_DATA}/overlays"
|
||||
cp "${BINARIES_DIR}"/*.dtbo "${BOOT_DATA}/overlays/"
|
||||
cp "${BOARD_DIR}/boot-env.txt" "${BOOT_DATA}/haos-config.txt"
|
||||
|
||||
echo "console=tty1" > "${BOOT_DATA}/cmdline.txt"
|
||||
|
||||
# SPL
|
||||
@@ -21,5 +25,5 @@ function hassos_pre_image() {
|
||||
|
||||
|
||||
function hassos_post_image() {
|
||||
convert_disk_image_gz
|
||||
convert_disk_image_xz
|
||||
}
|
||||
|
2
buildroot-external/board/asus/tinker/boot-env.txt
Normal file
2
buildroot-external/board/asus/tinker/boot-env.txt
Normal file
@@ -0,0 +1,2 @@
|
||||
# Uncomment this to enable GPIO support for RPI-RF-MOD/HM-MOD-RPI-PCB
|
||||
#overlays=rpi-rf-mod
|
@@ -2109,7 +2109,7 @@ CONFIG_ATH10K_USB=m
|
||||
# CONFIG_ATH10K_TRACING is not set
|
||||
CONFIG_WCN36XX=m
|
||||
# CONFIG_WCN36XX_DEBUGFS is not set
|
||||
CONFIG_RTL8188EU=m
|
||||
# CONFIG_ATH11K is not set
|
||||
CONFIG_WLAN_VENDOR_ATMEL=y
|
||||
CONFIG_AT76C50X_USB=m
|
||||
CONFIG_WLAN_VENDOR_BROADCOM=y
|
||||
@@ -2130,50 +2130,14 @@ CONFIG_HOSTAP=y
|
||||
CONFIG_HOSTAP_FIRMWARE=y
|
||||
CONFIG_HOSTAP_FIRMWARE_NVRAM=y
|
||||
# CONFIG_P54_COMMON is not set
|
||||
CONFIG_WLAN_VENDOR_MARVELL=y
|
||||
CONFIG_LIBERTAS=m
|
||||
CONFIG_LIBERTAS_USB=m
|
||||
CONFIG_LIBERTAS_SDIO=m
|
||||
CONFIG_LIBERTAS_SPI=m
|
||||
# CONFIG_LIBERTAS_DEBUG is not set
|
||||
# CONFIG_LIBERTAS_MESH is not set
|
||||
CONFIG_LIBERTAS_THINFIRM=y
|
||||
# CONFIG_LIBERTAS_THINFIRM_DEBUG is not set
|
||||
CONFIG_LIBERTAS_THINFIRM_USB=m
|
||||
CONFIG_MWIFIEX=y
|
||||
CONFIG_MWIFIEX_SDIO=y
|
||||
CONFIG_MWIFIEX_USB=m
|
||||
CONFIG_WLAN_VENDOR_MEDIATEK=y
|
||||
CONFIG_MT7601U=m
|
||||
CONFIG_MT76_CORE=m
|
||||
CONFIG_MT76_LEDS=y
|
||||
CONFIG_MT76_USB=m
|
||||
CONFIG_MT76x2_COMMON=m
|
||||
CONFIG_MT76x0U=m
|
||||
CONFIG_MT76x2U=m
|
||||
CONFIG_WLAN_VENDOR_RALINK=y
|
||||
CONFIG_RT2X00=y
|
||||
CONFIG_RT2500USB=y
|
||||
CONFIG_RT73USB=y
|
||||
CONFIG_RT2800USB=y
|
||||
CONFIG_RT2800USB_RT33XX=y
|
||||
CONFIG_RT2800USB_RT35XX=y
|
||||
CONFIG_RT2800USB_RT3573=y
|
||||
CONFIG_RT2800USB_RT53XX=y
|
||||
CONFIG_RT2800USB_RT55XX=y
|
||||
CONFIG_RT2800USB_UNKNOWN=y
|
||||
CONFIG_RT2800_LIB=y
|
||||
CONFIG_RT2X00_LIB_USB=y
|
||||
CONFIG_RT2X00_LIB=y
|
||||
CONFIG_RT2X00_LIB_FIRMWARE=y
|
||||
CONFIG_RT2X00_LIB_CRYPTO=y
|
||||
CONFIG_RT2X00_LIB_LEDS=y
|
||||
# CONFIG_RT2X00_LIB_DEBUGFS is not set
|
||||
# CONFIG_RT2X00_DEBUG is not set
|
||||
# CONFIG_WLAN_VENDOR_MARVELL is not set
|
||||
# CONFIG_WLAN_VENDOR_MEDIATEK is not set
|
||||
# CONFIG_WLAN_VENDOR_MICROCHIP is not set
|
||||
# CONFIG_WLAN_VENDOR_RALINK is not set
|
||||
CONFIG_WLAN_VENDOR_REALTEK=y
|
||||
CONFIG_RTL8187=m
|
||||
CONFIG_RTL8187_LEDS=y
|
||||
CONFIG_RTL_CARDS=m
|
||||
CONFIG_RTL_CARDS=y
|
||||
CONFIG_RTL8192CU=m
|
||||
CONFIG_RTLWIFI=m
|
||||
CONFIG_RTLWIFI_USB=m
|
||||
@@ -2183,9 +2147,9 @@ CONFIG_RTL8XXXU=y
|
||||
# CONFIG_RTL8XXXU_UNTESTED is not set
|
||||
CONFIG_WLAN_VENDOR_RSI=y
|
||||
# CONFIG_RSI_91X is not set
|
||||
CONFIG_WLAN_VENDOR_ST=y
|
||||
# CONFIG_WLAN_VENDOR_ST is not set
|
||||
# CONFIG_CW1200 is not set
|
||||
CONFIG_WLAN_VENDOR_TI=y
|
||||
# CONFIG_WLAN_VENDOR_TI is not set
|
||||
# CONFIG_WL1251 is not set
|
||||
# CONFIG_WL12XX is not set
|
||||
# CONFIG_WL18XX is not set
|
||||
|
@@ -0,0 +1,55 @@
|
||||
From 3f3c4cd047234fb94de4d6b701d05ff0450890cf Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <3f3c4cd047234fb94de4d6b701d05ff0450890cf.1613588152.git.stefan@agner.ch>
|
||||
From: Stefan Agner <stefan@agner.ch>
|
||||
Date: Wed, 17 Feb 2021 19:55:41 +0100
|
||||
Subject: [PATCH] Revert "ARM: dts: rockchip: use DMA channels for UARTs for
|
||||
RK3288"
|
||||
|
||||
This reverts commit 3425fe335c29310f6628faf9a7947d07f32d8962.
|
||||
---
|
||||
arch/arm/boot/dts/rk3288.dtsi | 8 --------
|
||||
1 file changed, 8 deletions(-)
|
||||
|
||||
diff --git a/arch/arm/boot/dts/rk3288.dtsi b/arch/arm/boot/dts/rk3288.dtsi
|
||||
index 8fa80facc8cd..8636d95c45e1 100644
|
||||
--- a/arch/arm/boot/dts/rk3288.dtsi
|
||||
+++ b/arch/arm/boot/dts/rk3288.dtsi
|
||||
@@ -422,8 +422,6 @@ uart0: serial@ff180000 {
|
||||
reg-io-width = <4>;
|
||||
clocks = <&cru SCLK_UART0>, <&cru PCLK_UART0>;
|
||||
clock-names = "baudclk", "apb_pclk";
|
||||
- dmas = <&dmac_peri 1>, <&dmac_peri 2>;
|
||||
- dma-names = "tx", "rx";
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&uart0_xfer>;
|
||||
status = "disabled";
|
||||
@@ -437,8 +435,6 @@ uart1: serial@ff190000 {
|
||||
reg-io-width = <4>;
|
||||
clocks = <&cru SCLK_UART1>, <&cru PCLK_UART1>;
|
||||
clock-names = "baudclk", "apb_pclk";
|
||||
- dmas = <&dmac_peri 3>, <&dmac_peri 4>;
|
||||
- dma-names = "tx", "rx";
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&uart1_xfer>;
|
||||
status = "disabled";
|
||||
@@ -465,8 +461,6 @@ uart3: serial@ff1b0000 {
|
||||
reg-io-width = <4>;
|
||||
clocks = <&cru SCLK_UART3>, <&cru PCLK_UART3>;
|
||||
clock-names = "baudclk", "apb_pclk";
|
||||
- dmas = <&dmac_peri 7>, <&dmac_peri 8>;
|
||||
- dma-names = "tx", "rx";
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&uart3_xfer>;
|
||||
status = "disabled";
|
||||
@@ -480,8 +474,6 @@ uart4: serial@ff1c0000 {
|
||||
reg-io-width = <4>;
|
||||
clocks = <&cru SCLK_UART4>, <&cru PCLK_UART4>;
|
||||
clock-names = "baudclk", "apb_pclk";
|
||||
- dmas = <&dmac_peri 9>, <&dmac_peri 10>;
|
||||
- dma-names = "tx", "rx";
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&uart4_xfer>;
|
||||
status = "disabled";
|
||||
--
|
||||
2.30.1
|
||||
|
@@ -1,27 +0,0 @@
|
||||
From ac220d592aa38b9b717d36f7bb93f7be5a08f6b3 Mon Sep 17 00:00:00 2001
|
||||
From: Myy Miouyouyou <myy@miouyouyou.fr>
|
||||
Date: Thu, 19 Oct 2017 21:43:51 +0200
|
||||
Subject: [PATCH 14/28] ARM: DTSI: rk3288.dtsi: Adding missing EDP power domain
|
||||
|
||||
Imported from Rockchip 4.4 kernel patches.
|
||||
|
||||
Signed-off-by: Myy Miouyouyou <myy@miouyouyou.fr>
|
||||
---
|
||||
arch/arm/boot/dts/rk3288.dtsi | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/arch/arm/boot/dts/rk3288.dtsi b/arch/arm/boot/dts/rk3288.dtsi
|
||||
index 14ef8202..10ecebb4 100644
|
||||
--- a/arch/arm/boot/dts/rk3288.dtsi
|
||||
+++ b/arch/arm/boot/dts/rk3288.dtsi
|
||||
@@ -1105,6 +1105,7 @@
|
||||
interrupts = <GIC_SPI 98 IRQ_TYPE_LEVEL_HIGH>;
|
||||
clocks = <&cru SCLK_EDP>, <&cru PCLK_EDP_CTRL>;
|
||||
clock-names = "dp", "pclk";
|
||||
+ power-domains = <&power RK3288_PD_VIO>;
|
||||
phys = <&edp_phy>;
|
||||
phy-names = "dp";
|
||||
resets = <&cru SRST_EDP>;
|
||||
--
|
||||
2.11.0
|
||||
|
@@ -1,28 +0,0 @@
|
||||
From c5af6798c9a411b3f550f463182a4b4904a21ec2 Mon Sep 17 00:00:00 2001
|
||||
From: Myy Miouyouyou <myy@miouyouyou.fr>
|
||||
Date: Thu, 19 Oct 2017 21:51:14 +0200
|
||||
Subject: [PATCH 16/28] ARM: DTSI: rk3288.dtsi: Adding missing VOPB registers
|
||||
|
||||
Imported from @wzyy2 patches... I think...
|
||||
|
||||
Signed-off-by: Myy Miouyouyou <myy@miouyouyou.fr>
|
||||
---
|
||||
arch/arm/boot/dts/rk3288.dtsi | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/arch/arm/boot/dts/rk3288.dtsi b/arch/arm/boot/dts/rk3288.dtsi
|
||||
index 455446f6..125f8835 100644
|
||||
--- a/arch/arm/boot/dts/rk3288.dtsi
|
||||
+++ b/arch/arm/boot/dts/rk3288.dtsi
|
||||
@@ -987,7 +987,7 @@
|
||||
|
||||
vopb: vop@ff930000 {
|
||||
compatible = "rockchip,rk3288-vop";
|
||||
- reg = <0x0 0xff930000 0x0 0x19c>;
|
||||
+ reg = <0x0 0xff930000 0x0 0x19c>, <0x0 0xff931000 0x0 0x1000>;
|
||||
interrupts = <GIC_SPI 15 IRQ_TYPE_LEVEL_HIGH>;
|
||||
clocks = <&cru ACLK_VOP0>, <&cru DCLK_VOP0>, <&cru HCLK_VOP0>;
|
||||
clock-names = "aclk_vop", "dclk_vop", "hclk_vop";
|
||||
--
|
||||
2.11.0
|
||||
|
@@ -1,31 +0,0 @@
|
||||
From a0602b2724893de7ac9b4190a7a6bb66458da2d5 Mon Sep 17 00:00:00 2001
|
||||
From: Myy Miouyouyou <myy@miouyouyou.fr>
|
||||
Date: Thu, 19 Oct 2017 21:54:37 +0200
|
||||
Subject: [PATCH 17/28] ARM: DTSI: rk3288.dtsi: Fixed the SPDIF node address
|
||||
|
||||
Now, the typo is only in the name of the node itself, not in the
|
||||
actual registers addresses definition.
|
||||
|
||||
Still, this ought to be fixed one day !
|
||||
|
||||
Signed-off-by: Myy Miouyouyou <myy@miouyouyou.fr>
|
||||
---
|
||||
arch/arm/boot/dts/rk3288.dtsi | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/arch/arm/boot/dts/rk3288.dtsi b/arch/arm/boot/dts/rk3288.dtsi
|
||||
index 125f8835..e5d3d3c9 100644
|
||||
--- a/arch/arm/boot/dts/rk3288.dtsi
|
||||
+++ b/arch/arm/boot/dts/rk3288.dtsi
|
||||
@@ -922,7 +922,7 @@
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
- spdif: sound@ff88b0000 {
|
||||
+ spdif: sound@ff8b0000 {
|
||||
compatible = "rockchip,rk3288-spdif", "rockchip,rk3066-spdif";
|
||||
reg = <0x0 0xff8b0000 0x0 0x10000>;
|
||||
#sound-dai-cells = <0>;
|
||||
--
|
||||
2.11.0
|
||||
|
@@ -0,0 +1,98 @@
|
||||
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
|
||||
|
@@ -18,7 +18,7 @@ index aa107ee41..3da1c830f 100644
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
regulator-min-microvolt = <750000>;
|
||||
- regulator-max-microvolt = <1350000>;
|
||||
- regulator-max-microvolt = <1400000>;
|
||||
+ regulator-max-microvolt = <1450000>;
|
||||
regulator-name = "vdd_arm";
|
||||
regulator-ramp-delay = <6000>;
|
||||
|
@@ -1,31 +0,0 @@
|
||||
From 3dacea70a8e434008f5b1f119a7f7da9aebc772c Mon Sep 17 00:00:00 2001
|
||||
From: "Miouyouyou (Myy)" <myy@miouyouyou.fr>
|
||||
Date: Mon, 5 Nov 2018 20:18:58 +0100
|
||||
Subject: [PATCH] ARM: DTSI: rk3288-tinker: Setting up the SD regulators
|
||||
|
||||
Some are needed and some are not. Playing with these parameters is
|
||||
required to get reboot working on these boards.
|
||||
|
||||
I still can't believe that these boards can't soft reset correctly.
|
||||
|
||||
Signed-off-by: Miouyouyou (Myy) <myy@miouyouyou.fr>
|
||||
---
|
||||
arch/arm/boot/dts/rk3288-tinker.dtsi | 2 ++
|
||||
1 file changed, 2 insertions(+)
|
||||
|
||||
diff --git a/arch/arm/boot/dts/rk3288-tinker.dtsi b/arch/arm/boot/dts/rk3288-tinker.dtsi
|
||||
index 3da1c830f..dd1090728 100644
|
||||
--- a/arch/arm/boot/dts/rk3288-tinker.dtsi
|
||||
+++ b/arch/arm/boot/dts/rk3288-tinker.dtsi
|
||||
@@ -254,7 +254,8 @@
|
||||
};
|
||||
|
||||
vccio_sd: LDO_REG5 {
|
||||
+ regulator-always-on;
|
||||
regulator-boot-on;
|
||||
regulator-min-microvolt = <1800000>;
|
||||
regulator-max-microvolt = <3300000>;
|
||||
regulator-name = "vccio_sd";
|
||||
--
|
||||
2.16.4
|
||||
|
@@ -1,33 +0,0 @@
|
||||
From 487db7cefc9861fdaf30579c378a98f0360690ae Mon Sep 17 00:00:00 2001
|
||||
From: "Miouyouyou (Myy)" <myy@miouyouyou.fr>
|
||||
Date: Mon, 5 Nov 2018 20:27:14 +0100
|
||||
Subject: [PATCH] ARM: DTSI: rk3288-tinker: Defining SDMMC properties
|
||||
|
||||
I never knew if these properties were required to fix the dreaded
|
||||
reboot issue...
|
||||
|
||||
Signed-off-by: Miouyouyou (Myy) <myy@miouyouyou.fr>
|
||||
---
|
||||
arch/arm/boot/dts/rk3288-tinker.dtsi | 5 +++++
|
||||
1 file changed, 5 insertions(+)
|
||||
|
||||
diff --git a/arch/arm/boot/dts/rk3288-tinker.dtsi b/arch/arm/boot/dts/rk3288-tinker.dtsi
|
||||
index dd1090728..8edd6f681 100644
|
||||
--- a/arch/arm/boot/dts/rk3288-tinker.dtsi
|
||||
+++ b/arch/arm/boot/dts/rk3288-tinker.dtsi
|
||||
@@ -436,7 +436,12 @@
|
||||
disable-wp; /* wp not hooked up */
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&sdmmc_clk &sdmmc_cmd &sdmmc_cd &sdmmc_bus4>;
|
||||
+ sd-uhs-sdr12;
|
||||
+ sd-uhs-sdr25;
|
||||
+ sd-uhs-sdr50;
|
||||
+ sd-uhs-sdr104;
|
||||
status = "okay";
|
||||
+ supports-sd;
|
||||
vmmc-supply = <&vcc33_sd>;
|
||||
vqmmc-supply = <&vccio_sd>;
|
||||
};
|
||||
--
|
||||
2.16.4
|
||||
|
@@ -1,48 +0,0 @@
|
||||
From d3d3fe433d9038dcd1a98f4d6711c0777ed06703 Mon Sep 17 00:00:00 2001
|
||||
From: "Miouyouyou (Myy)" <myy@miouyouyou.fr>
|
||||
Date: Mon, 25 Jun 2018 17:08:32 +0200
|
||||
Subject: [PATCH 26/26] ARM: DTSI: rk3288: Set the VPU MMU power domains
|
||||
|
||||
Without that, the auto-activation of the VPU hardware IOMMU fails
|
||||
when enabling the hardware, before the "probe" phase of its device
|
||||
driver.
|
||||
|
||||
Basically, when loading a "of_platform" device driver targeting
|
||||
the VPU devices, you'll get these errors without this patch :
|
||||
|
||||
[12753.996950] rk_iommu ff9c0440.iommu: Error during raw reset. MMU_DTE_ADDR is not functioning
|
||||
[12754.007483] rk_iommu ff9c0440.iommu: Disable stall request timed out, status: 0xffffffff
|
||||
[12754.026652] rk_iommu ff9c0440.iommu: Disable paging request timed out, status: 0xffffffff
|
||||
[12754.045975] rk_iommu ff9c0440.iommu: Disable stall request timed out, status: 0xffffffff
|
||||
|
||||
When using this patch, the errors disappear.
|
||||
|
||||
This seems to be due to the IOMMU device sharing the same power domain
|
||||
than the device.
|
||||
When loading an "of_platform" driver, the kernel logic seems to try
|
||||
enabling the associated IOMMU device before letting the driver handles
|
||||
anything with the actual VPU hardware.
|
||||
It appears that setting the power domain of the VPU IOMMU nodes let the
|
||||
IOMMU driver enable the IOMMU shared power domain, and make the IOMMU
|
||||
device useable.
|
||||
|
||||
Signed-off-by: Miouyouyou (Myy) <myy@miouyouyou.fr>
|
||||
---
|
||||
arch/arm/boot/dts/rk3288.dtsi | 2 ++
|
||||
1 file changed, 2 insertions(+)
|
||||
|
||||
diff --git a/arch/arm/boot/dts/rk3288.dtsi b/arch/arm/boot/dts/rk3288.dtsi
|
||||
index 45ec4e89..46e1b8e2 100644
|
||||
--- a/arch/arm/boot/dts/rk3288.dtsi
|
||||
+++ b/arch/arm/boot/dts/rk3288.dtsi
|
||||
@@ -1262,6 +1263,7 @@
|
||||
interrupt-names = "hevc_mmu";
|
||||
clocks = <&cru ACLK_HEVC>, <&cru HCLK_HEVC>;
|
||||
clock-names = "aclk", "iface";
|
||||
+ power-domains = <&power RK3288_PD_HEVC>;
|
||||
#iommu-cells = <0>;
|
||||
status = "disabled";
|
||||
};
|
||||
--
|
||||
2.16.4
|
||||
|
@@ -1,46 +0,0 @@
|
||||
From 4ab4f88649468dada5d609e1a6f8a71a7d5610c9 Mon Sep 17 00:00:00 2001
|
||||
From: "Miouyouyou (Myy)" <myy@miouyouyou.fr>
|
||||
Date: Sat, 29 Sep 2018 02:48:59 +0200
|
||||
Subject: [PATCH 4/6] dts: rk3288: support for dedicating npll to a vop
|
||||
|
||||
This patch is taken from Urja Rannikko ( @urjaman ) patchset here :
|
||||
https://github.com/urjaman/arch-c201/blob/master/linux-c201/0020-RK3288-HDMI-clock-hacks-combined.patch
|
||||
https://www.spinics.net/lists/arm-kernel/msg673156.html
|
||||
|
||||
The original description was :
|
||||
|
||||
Add the VOP DCLKs to the assigned clocks list so their
|
||||
parents can be set in the dts include files for
|
||||
devices that do dedicate npll to a vop.
|
||||
|
||||
https://www.spinics.net/lists/arm-kernel/msg673162.html
|
||||
|
||||
Signed-off-by: Miouyouyou (Myy) <myy@miouyouyou.fr>
|
||||
---
|
||||
arch/arm/boot/dts/rk3288.dtsi | 6 ++++--
|
||||
1 file changed, 4 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/arch/arm/boot/dts/rk3288.dtsi b/arch/arm/boot/dts/rk3288.dtsi
|
||||
index d23c7fa55..ff04aab5e 100644
|
||||
--- a/arch/arm/boot/dts/rk3288.dtsi
|
||||
+++ b/arch/arm/boot/dts/rk3288.dtsi
|
||||
@@ -867,12 +867,14 @@
|
||||
rockchip,grf = <&grf>;
|
||||
#clock-cells = <1>;
|
||||
#reset-cells = <1>;
|
||||
- assigned-clocks = <&cru PLL_GPLL>, <&cru PLL_CPLL>,
|
||||
+ assigned-clocks = <&cru DCLK_VOP0>, <&cru DCLK_VOP1>,
|
||||
+ <&cru PLL_GPLL>, <&cru PLL_CPLL>,
|
||||
<&cru PLL_NPLL>, <&cru ACLK_CPU>,
|
||||
<&cru HCLK_CPU>, <&cru PCLK_CPU>,
|
||||
<&cru ACLK_PERI>, <&cru HCLK_PERI>,
|
||||
<&cru PCLK_PERI>;
|
||||
- assigned-clock-rates = <594000000>, <400000000>,
|
||||
+ assigned-clock-rates = <0>, <0>,
|
||||
+ <594000000>, <400000000>,
|
||||
<500000000>, <300000000>,
|
||||
<150000000>, <75000000>,
|
||||
<300000000>, <150000000>,
|
||||
--
|
||||
2.16.4
|
||||
|
@@ -1,50 +0,0 @@
|
||||
From e0c5a419cf5464cd02996431afa98e3b22dc6801 Mon Sep 17 00:00:00 2001
|
||||
From: Myy <myy@miouyouyou.fr>
|
||||
Date: Mon, 17 Jul 2017 23:14:48 +0000
|
||||
Subject: [PATCH] clk: rockchip: add all known operating points to the allowed
|
||||
CPU freqs
|
||||
|
||||
Patch from Willy Tarreau
|
||||
|
||||
Original commit message :
|
||||
At least 1920 MHz runs stable on the MiQi even on openssl speed -multi 4,
|
||||
which is by far the most intensive workload, and 1992/2016 work fine on
|
||||
the CS-008 until it starts to heat too much. So add all of them so that
|
||||
the device tree can simply manipulate them.
|
||||
|
||||
Signed-off-by: Myy <myy@miouyouyou.fr>
|
||||
---
|
||||
drivers/clk/rockchip/clk-rk3288.c | 17 +++++++++++++++++
|
||||
1 file changed, 17 insertions(+)
|
||||
|
||||
diff --git a/drivers/clk/rockchip/clk-rk3288.c b/drivers/clk/rockchip/clk-rk3288.c
|
||||
index 753c649..fd2058f 100644
|
||||
--- a/drivers/clk/rockchip/clk-rk3288.c
|
||||
+++ b/drivers/clk/rockchip/clk-rk3288.c
|
||||
@@ -145,6 +145,23 @@ static struct rockchip_pll_rate_table rk3288_pll_rates[] = {
|
||||
}
|
||||
|
||||
static struct rockchip_cpuclk_rate_table rk3288_cpuclk_rates[] __initdata = {
|
||||
+ RK3288_CPUCLK_RATE(2208000000U, 1, 3, 1, 3, 3),
|
||||
+ RK3288_CPUCLK_RATE(2184000000U, 1, 3, 1, 3, 3),
|
||||
+ RK3288_CPUCLK_RATE(2160000000U, 1, 3, 1, 3, 3),
|
||||
+ RK3288_CPUCLK_RATE(2136000000, 1, 3, 1, 3, 3),
|
||||
+ RK3288_CPUCLK_RATE(2112000000, 1, 3, 1, 3, 3),
|
||||
+ RK3288_CPUCLK_RATE(2088000000, 1, 3, 1, 3, 3),
|
||||
+ RK3288_CPUCLK_RATE(2064000000, 1, 3, 1, 3, 3),
|
||||
+ RK3288_CPUCLK_RATE(2040000000, 1, 3, 1, 3, 3),
|
||||
+ RK3288_CPUCLK_RATE(2016000000, 1, 3, 1, 3, 3),
|
||||
+ RK3288_CPUCLK_RATE(1992000000, 1, 3, 1, 3, 3),
|
||||
+ RK3288_CPUCLK_RATE(1968000000, 1, 3, 1, 3, 3),
|
||||
+ RK3288_CPUCLK_RATE(1944000000, 1, 3, 1, 3, 3),
|
||||
+ RK3288_CPUCLK_RATE(1920000000, 1, 3, 1, 3, 3),
|
||||
+ RK3288_CPUCLK_RATE(1896000000, 1, 3, 1, 3, 3),
|
||||
+ RK3288_CPUCLK_RATE(1872000000, 1, 3, 1, 3, 3),
|
||||
+ RK3288_CPUCLK_RATE(1848000000, 1, 3, 1, 3, 3),
|
||||
+ RK3288_CPUCLK_RATE(1824000000, 1, 3, 1, 3, 3),
|
||||
RK3288_CPUCLK_RATE(1800000000, 1, 3, 1, 3, 3),
|
||||
RK3288_CPUCLK_RATE(1704000000, 1, 3, 1, 3, 3),
|
||||
RK3288_CPUCLK_RATE(1608000000, 1, 3, 1, 3, 3),
|
||||
--
|
||||
2.10.2
|
||||
|
@@ -1,74 +0,0 @@
|
||||
From e7b60b10cf3fd2f4374ab26c314383121c27fe82 Mon Sep 17 00:00:00 2001
|
||||
From: "Miouyouyou (Myy)" <myy@miouyouyou.fr>
|
||||
Date: Tue, 22 Jan 2019 21:24:37 +0100
|
||||
Subject: [PATCH] soc: rockchip: power-domain: export idle request for RKMPP
|
||||
|
||||
This function, and the added header, are required by the RKMPP driver,
|
||||
provided by Randy Li. However, I can't attest that the provided code
|
||||
is correct.
|
||||
|
||||
Signed-off-by: Miouyouyou (Myy) <myy@miouyouyou.fr>
|
||||
---
|
||||
drivers/soc/rockchip/pm_domains.c | 23 +++++++++++++++++++++++
|
||||
include/soc/rockchip/pm_domains.h | 15 +++++++++++++++
|
||||
2 files changed, 38 insertions(+)
|
||||
create mode 100644 include/soc/rockchip/pm_domains.h
|
||||
|
||||
diff --git a/drivers/soc/rockchip/pm_domains.c b/drivers/soc/rockchip/pm_domains.c
|
||||
index 847c7c482..3e2e252cb 100644
|
||||
--- a/drivers/soc/rockchip/pm_domains.c
|
||||
+++ b/drivers/soc/rockchip/pm_domains.c
|
||||
@@ -199,6 +199,29 @@ static int rockchip_pmu_set_idle_request(struct rockchip_pm_domain *pd,
|
||||
return 0;
|
||||
}
|
||||
|
||||
+int rockchip_pmu_idle_request(struct device *dev, bool idle)
|
||||
+{
|
||||
+ struct generic_pm_domain *genpd;
|
||||
+ struct rockchip_pm_domain *pd;
|
||||
+ int ret;
|
||||
+
|
||||
+ if (IS_ERR_OR_NULL(dev))
|
||||
+ return -EINVAL;
|
||||
+
|
||||
+ if (IS_ERR_OR_NULL(dev->pm_domain))
|
||||
+ return -EINVAL;
|
||||
+
|
||||
+ genpd = pd_to_genpd(dev->pm_domain);
|
||||
+ pd = to_rockchip_pd(genpd);
|
||||
+
|
||||
+ mutex_lock(&pd->pmu->mutex);
|
||||
+ ret = rockchip_pmu_set_idle_request(pd, idle);
|
||||
+ mutex_unlock(&pd->pmu->mutex);
|
||||
+
|
||||
+ return ret;
|
||||
+}
|
||||
+EXPORT_SYMBOL(rockchip_pmu_idle_request);
|
||||
+
|
||||
static int rockchip_pmu_save_qos(struct rockchip_pm_domain *pd)
|
||||
{
|
||||
int i;
|
||||
diff --git a/include/soc/rockchip/pm_domains.h b/include/soc/rockchip/pm_domains.h
|
||||
new file mode 100644
|
||||
index 000000000..720b3314e
|
||||
--- /dev/null
|
||||
+++ b/include/soc/rockchip/pm_domains.h
|
||||
@@ -0,0 +1,15 @@
|
||||
+/*
|
||||
+ * pm_domain.h - Definitions and headers related to device power domains.
|
||||
+ *
|
||||
+ * Copyright (C) 2017 Randy Li <ayaka@soulik.info>.
|
||||
+ *
|
||||
+ * This file is released under the GPLv2.
|
||||
+ */
|
||||
+
|
||||
+#ifndef _LINUX_ROCKCHIP_PM_H
|
||||
+#define _LINUX_ROCKCHIP_PM_H
|
||||
+#include <linux/device.h>
|
||||
+
|
||||
+int rockchip_pmu_idle_request(struct device *dev, bool idle);
|
||||
+
|
||||
+#endif /* _LINUX_ROCKCHIP_PM_H */
|
||||
--
|
||||
2.16.4
|
||||
|
@@ -1,101 +0,0 @@
|
||||
FROM: Solidhal <hal@halemmerich.com>
|
||||
|
||||
This patch reverses commit 2b721118b7821107757eb1d37af4b60e877b27e7, as can bee seen here:
|
||||
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=2b721118b7821107757eb1d37af4b60e877b27e7
|
||||
|
||||
This commit caused issues on veyron speedy with ath9k and dwc2 drivers. Any ath9k device (ar9271)
|
||||
would intermittently work, most of the time ending in errors as can bee seen here:
|
||||
https://github.com/SolidHal/PrawnOS/issues/38
|
||||
This commit fixes that issue.
|
||||
This is only a temporary work around while a permenant fix is found, as this commit seems to only cause issues
|
||||
with dwc2
|
||||
|
||||
diff --git a/drivers/net/wireless/ath/ath9k/hif_usb.c b/drivers/net/wireless/ath/ath9k/hif_usb.c
|
||||
--- b/drivers/net/wireless/ath/ath9k/hif_usb.c
|
||||
+++ a/drivers/net/wireless/ath/ath9k/hif_usb.c
|
||||
@@ -115,10 +115,10 @@
|
||||
cmd->skb = skb;
|
||||
cmd->hif_dev = hif_dev;
|
||||
|
||||
+ usb_fill_bulk_urb(urb, hif_dev->udev,
|
||||
+ usb_sndbulkpipe(hif_dev->udev, USB_REG_OUT_PIPE),
|
||||
- usb_fill_int_urb(urb, hif_dev->udev,
|
||||
- usb_sndintpipe(hif_dev->udev, USB_REG_OUT_PIPE),
|
||||
skb->data, skb->len,
|
||||
+ hif_usb_regout_cb, cmd);
|
||||
- hif_usb_regout_cb, cmd, 1);
|
||||
|
||||
usb_anchor_urb(urb, &hif_dev->regout_submitted);
|
||||
ret = usb_submit_urb(urb, GFP_KERNEL);
|
||||
@@ -735,11 +735,11 @@
|
||||
|
||||
rx_buf->skb = nskb;
|
||||
|
||||
+ usb_fill_bulk_urb(urb, hif_dev->udev,
|
||||
+ usb_rcvbulkpipe(hif_dev->udev,
|
||||
- usb_fill_int_urb(urb, hif_dev->udev,
|
||||
- usb_rcvintpipe(hif_dev->udev,
|
||||
USB_REG_IN_PIPE),
|
||||
nskb->data, MAX_REG_IN_BUF_SIZE,
|
||||
+ ath9k_hif_usb_reg_in_cb, nskb);
|
||||
- ath9k_hif_usb_reg_in_cb, rx_buf, 1);
|
||||
}
|
||||
|
||||
resubmit:
|
||||
@@ -909,11 +909,11 @@
|
||||
rx_buf->hif_dev = hif_dev;
|
||||
rx_buf->skb = skb;
|
||||
|
||||
+ usb_fill_bulk_urb(urb, hif_dev->udev,
|
||||
+ usb_rcvbulkpipe(hif_dev->udev,
|
||||
- usb_fill_int_urb(urb, hif_dev->udev,
|
||||
- usb_rcvintpipe(hif_dev->udev,
|
||||
USB_REG_IN_PIPE),
|
||||
skb->data, MAX_REG_IN_BUF_SIZE,
|
||||
+ ath9k_hif_usb_reg_in_cb, skb);
|
||||
- ath9k_hif_usb_reg_in_cb, rx_buf, 1);
|
||||
|
||||
/* Anchor URB */
|
||||
usb_anchor_urb(urb, &hif_dev->reg_in_submitted);
|
||||
@@ -1031,7 +1031,9 @@
|
||||
|
||||
static int ath9k_hif_usb_dev_init(struct hif_device_usb *hif_dev)
|
||||
{
|
||||
+ struct usb_host_interface *alt = &hif_dev->interface->altsetting[0];
|
||||
+ struct usb_endpoint_descriptor *endp;
|
||||
+ int ret, idx;
|
||||
- int ret;
|
||||
|
||||
ret = ath9k_hif_usb_download_fw(hif_dev);
|
||||
if (ret) {
|
||||
@@ -1041,6 +1043,20 @@
|
||||
return ret;
|
||||
}
|
||||
|
||||
+ /* On downloading the firmware to the target, the USB descriptor of EP4
|
||||
+ * is 'patched' to change the type of the endpoint to Bulk. This will
|
||||
+ * bring down CPU usage during the scan period.
|
||||
+ */
|
||||
+ for (idx = 0; idx < alt->desc.bNumEndpoints; idx++) {
|
||||
+ endp = &alt->endpoint[idx].desc;
|
||||
+ if ((endp->bmAttributes & USB_ENDPOINT_XFERTYPE_MASK)
|
||||
+ == USB_ENDPOINT_XFER_INT) {
|
||||
+ endp->bmAttributes &= ~USB_ENDPOINT_XFERTYPE_MASK;
|
||||
+ endp->bmAttributes |= USB_ENDPOINT_XFER_BULK;
|
||||
+ endp->bInterval = 0;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
/* Alloc URBs */
|
||||
ret = ath9k_hif_usb_alloc_urbs(hif_dev);
|
||||
if (ret) {
|
||||
@@ -1252,7 +1268,7 @@
|
||||
if (!buf)
|
||||
return;
|
||||
|
||||
+ ret = usb_bulk_msg(udev, usb_sndbulkpipe(udev, USB_REG_OUT_PIPE),
|
||||
- ret = usb_interrupt_msg(udev, usb_sndintpipe(udev, USB_REG_OUT_PIPE),
|
||||
buf, 4, NULL, USB_MSG_TIMEOUT);
|
||||
if (ret)
|
||||
dev_err(&udev->dev, "ath9k_htc: USB reboot failed\n");
|
||||
|
@@ -1,178 +0,0 @@
|
||||
From e03d074b8ec00718337e7373e991912f6b6f9a52 Mon Sep 17 00:00:00 2001
|
||||
From: "Miouyouyou (Myy)" <myy@miouyouyou.fr>
|
||||
Date: Mon, 5 Nov 2018 19:53:43 +0100
|
||||
Subject: [PATCH] clk: rockchip: rk3288: Support for dedicating NPLL to a VOP
|
||||
|
||||
This patch is taken from Urja Rannikko ( @urjaman ) patchset here :
|
||||
https://github.com/urjaman/arch-c201/blob/master/linux-c201/0020-RK3288-HDMI-clock-hacks-combined.patch
|
||||
https://www.spinics.net/lists/arm-kernel/msg673156.html
|
||||
|
||||
I'm not really sure what this does exactly. It basically sets the
|
||||
parent clock of the newly added clocks, if the newly added property
|
||||
"rockchip,npll-for-vop" is detected and set.
|
||||
|
||||
I have no clear idea how HDMI Neuronal PLL (and PLL in general) work,
|
||||
so I cannot comment on what it's doing and if it's a good idea in
|
||||
general.
|
||||
|
||||
Now, I still have to test if that patch does anything useful on
|
||||
RK3288 boards. If it doesn't, I might just throw it away on next
|
||||
versions.
|
||||
|
||||
Signed-off-by: Miouyouyou (Myy) <myy@miouyouyou.fr>
|
||||
---
|
||||
drivers/clk/rockchip/clk-rk3288.c | 68 ++++++++++++++++++++++++++++++++-------
|
||||
drivers/clk/rockchip/clk.h | 3 ++
|
||||
2 files changed, 59 insertions(+), 12 deletions(-)
|
||||
|
||||
diff --git a/drivers/clk/rockchip/clk-rk3288.c b/drivers/clk/rockchip/clk-rk3288.c
|
||||
index 13b38cb89..0d8b99b6b 100644
|
||||
--- a/drivers/clk/rockchip/clk-rk3288.c
|
||||
+++ b/drivers/clk/rockchip/clk-rk3288.c
|
||||
@@ -215,10 +215,13 @@ PNAME(mux_ddrphy_p) = { "dpll_ddr", "gpll_ddr" };
|
||||
PNAME(mux_aclk_cpu_src_p) = { "cpll_aclk_cpu", "gpll_aclk_cpu" };
|
||||
|
||||
PNAME(mux_pll_src_cpll_gpll_p) = { "cpll", "gpll" };
|
||||
-PNAME(mux_pll_src_npll_cpll_gpll_p) = { "npll", "cpll", "gpll" };
|
||||
-PNAME(mux_pll_src_cpll_gpll_npll_p) = { "cpll", "gpll", "npll" };
|
||||
+PNAME_ED(mux_pll_src_npll_cpll_gpll_p) = { "npll", "cpll", "gpll" };
|
||||
+
|
||||
+PNAME_ED(mux_pll_src_cgn_pll_nonvop_p) = { "cpll", "gpll", "npll" };
|
||||
+PNAME_ED(mux_pll_src_cgn_pll_vop0_p) = { "cpll", "gpll", "npll" };
|
||||
+PNAME_ED(mux_pll_src_cgn_pll_vop1_p) = { "cpll", "gpll", "npll" };
|
||||
PNAME(mux_pll_src_cpll_gpll_usb480m_p) = { "cpll", "gpll", "unstable:usbphy480m_src" };
|
||||
-PNAME(mux_pll_src_cpll_gll_usb_npll_p) = { "cpll", "gpll", "unstable:usbphy480m_src", "npll" };
|
||||
+PNAME_ED(mux_pll_src_cpll_gll_usb_npll_p) = { "cpll", "gpll", "usbphy480m_src", "npll" };
|
||||
|
||||
PNAME(mux_mmc_src_p) = { "cpll", "gpll", "xin24m", "xin24m" };
|
||||
PNAME(mux_i2s_pre_p) = { "i2s_src", "i2s_frac", "ext_i2s", "xin12m" };
|
||||
@@ -464,24 +467,24 @@ static struct rockchip_clk_branch rk3288_clk_branches[] __initdata = {
|
||||
RK3288_CLKSEL_CON(30), 14, 2, MFLAGS, 8, 5, DFLAGS,
|
||||
RK3288_CLKGATE_CON(3), 4, GFLAGS),
|
||||
|
||||
- COMPOSITE(DCLK_VOP0, "dclk_vop0", mux_pll_src_cpll_gpll_npll_p, 0,
|
||||
+ COMPOSITE(DCLK_VOP0, "dclk_vop0", mux_pll_src_cgn_pll_vop0_p, 0,
|
||||
RK3288_CLKSEL_CON(27), 0, 2, MFLAGS, 8, 8, DFLAGS,
|
||||
RK3288_CLKGATE_CON(3), 1, GFLAGS),
|
||||
- COMPOSITE(DCLK_VOP1, "dclk_vop1", mux_pll_src_cpll_gpll_npll_p, 0,
|
||||
+ COMPOSITE(DCLK_VOP1, "dclk_vop1", mux_pll_src_cgn_pll_vop1_p, 0,
|
||||
RK3288_CLKSEL_CON(29), 6, 2, MFLAGS, 8, 8, DFLAGS,
|
||||
RK3288_CLKGATE_CON(3), 3, GFLAGS),
|
||||
|
||||
COMPOSITE_NODIV(SCLK_EDP_24M, "sclk_edp_24m", mux_edp_24m_p, 0,
|
||||
RK3288_CLKSEL_CON(28), 15, 1, MFLAGS,
|
||||
RK3288_CLKGATE_CON(3), 12, GFLAGS),
|
||||
- COMPOSITE(SCLK_EDP, "sclk_edp", mux_pll_src_cpll_gpll_npll_p, 0,
|
||||
+ COMPOSITE(SCLK_EDP, "sclk_edp", mux_pll_src_cgn_pll_nonvop_p, 0,
|
||||
RK3288_CLKSEL_CON(28), 6, 2, MFLAGS, 0, 6, DFLAGS,
|
||||
RK3288_CLKGATE_CON(3), 13, GFLAGS),
|
||||
|
||||
- COMPOSITE(SCLK_ISP, "sclk_isp", mux_pll_src_cpll_gpll_npll_p, 0,
|
||||
+ COMPOSITE(SCLK_ISP, "sclk_isp", mux_pll_src_cgn_pll_nonvop_p, 0,
|
||||
RK3288_CLKSEL_CON(6), 6, 2, MFLAGS, 0, 6, DFLAGS,
|
||||
RK3288_CLKGATE_CON(3), 14, GFLAGS),
|
||||
- COMPOSITE(SCLK_ISP_JPE, "sclk_isp_jpe", mux_pll_src_cpll_gpll_npll_p, 0,
|
||||
+ COMPOSITE(SCLK_ISP_JPE, "sclk_isp_jpe", mux_pll_src_cgn_pll_nonvop_p, 0,
|
||||
RK3288_CLKSEL_CON(6), 14, 2, MFLAGS, 8, 6, DFLAGS,
|
||||
RK3288_CLKGATE_CON(3), 15, GFLAGS),
|
||||
|
||||
@@ -490,16 +493,16 @@ static struct rockchip_clk_branch rk3288_clk_branches[] __initdata = {
|
||||
GATE(SCLK_HDMI_CEC, "sclk_hdmi_cec", "xin32k", 0,
|
||||
RK3288_CLKGATE_CON(5), 11, GFLAGS),
|
||||
|
||||
- COMPOSITE(ACLK_HEVC, "aclk_hevc", mux_pll_src_cpll_gpll_npll_p, 0,
|
||||
+ COMPOSITE(ACLK_HEVC, "aclk_hevc", mux_pll_src_cgn_pll_nonvop_p, 0,
|
||||
RK3288_CLKSEL_CON(39), 14, 2, MFLAGS, 8, 5, DFLAGS,
|
||||
RK3288_CLKGATE_CON(13), 13, GFLAGS),
|
||||
DIV(HCLK_HEVC, "hclk_hevc", "aclk_hevc", 0,
|
||||
RK3288_CLKSEL_CON(40), 12, 2, DFLAGS),
|
||||
|
||||
- COMPOSITE(SCLK_HEVC_CABAC, "sclk_hevc_cabac", mux_pll_src_cpll_gpll_npll_p, 0,
|
||||
+ COMPOSITE(SCLK_HEVC_CABAC, "sclk_hevc_cabac", mux_pll_src_cgn_pll_nonvop_p, 0,
|
||||
RK3288_CLKSEL_CON(42), 6, 2, MFLAGS, 0, 5, DFLAGS,
|
||||
RK3288_CLKGATE_CON(13), 14, GFLAGS),
|
||||
- COMPOSITE(SCLK_HEVC_CORE, "sclk_hevc_core", mux_pll_src_cpll_gpll_npll_p, 0,
|
||||
+ COMPOSITE(SCLK_HEVC_CORE, "sclk_hevc_core", mux_pll_src_cgn_pll_nonvop_p, 0,
|
||||
RK3288_CLKSEL_CON(42), 14, 2, MFLAGS, 8, 5, DFLAGS,
|
||||
RK3288_CLKGATE_CON(13), 15, GFLAGS),
|
||||
|
||||
@@ -573,7 +576,7 @@ static struct rockchip_clk_branch rk3288_clk_branches[] __initdata = {
|
||||
COMPOSITE(0, "sclk_tspout", mux_tspout_p, 0,
|
||||
RK3288_CLKSEL_CON(35), 14, 2, MFLAGS, 8, 5, DFLAGS,
|
||||
RK3288_CLKGATE_CON(4), 11, GFLAGS),
|
||||
- COMPOSITE(0, "sclk_tsp", mux_pll_src_cpll_gpll_npll_p, 0,
|
||||
+ COMPOSITE(0, "sclk_tsp", mux_pll_src_cgn_pll_nonvop_p, 0,
|
||||
RK3288_CLKSEL_CON(35), 6, 2, MFLAGS, 0, 5, DFLAGS,
|
||||
RK3288_CLKGATE_CON(4), 10, GFLAGS),
|
||||
|
||||
@@ -933,5 +936,6 @@ static void __init rk3288_clk_init(struct device_node *np)
|
||||
{
|
||||
struct rockchip_clk_provider *ctx;
|
||||
+ s32 npll_vop = -1;
|
||||
|
||||
rk3288_cru_base = of_iomap(np, 0);
|
||||
if (!rk3288_cru_base) {
|
||||
@@ -940,6 +944,46 @@ static void __init rk3288_clk_init(struct device_node *np)
|
||||
return;
|
||||
}
|
||||
|
||||
+ if (!of_property_read_s32(np, "rockchip,npll-for-vop", &npll_vop)) {
|
||||
+ if ((npll_vop < -1) || (npll_vop > 1)) {
|
||||
+ pr_warn("%s: invalid VOP to dedicate NPLL to: %d\n",
|
||||
+ __func__, npll_vop);
|
||||
+ } else if (npll_vop >= 0) {
|
||||
+ unsigned int vop_clk_id;
|
||||
+ const char ** npll_names;
|
||||
+ const char ** non_npll_names;
|
||||
+ int i;
|
||||
+
|
||||
+ /* Firstly, not-VOP needs to not use npll */
|
||||
+ mux_pll_src_npll_cpll_gpll_p[0] = "dummy_npll";
|
||||
+ mux_pll_src_cgn_pll_nonvop_p[2] = "dummy_npll";
|
||||
+ mux_pll_src_cpll_gll_usb_npll_p[3] = "dummy_npll";
|
||||
+
|
||||
+ /* Then the npll VOP needs to only use npll, and the other one not use npll. */
|
||||
+ if (npll_vop) {
|
||||
+ vop_clk_id = DCLK_VOP1;
|
||||
+ npll_names = mux_pll_src_cgn_pll_vop1_p;
|
||||
+ non_npll_names = mux_pll_src_cgn_pll_vop0_p;
|
||||
+ } else {
|
||||
+ vop_clk_id = DCLK_VOP0;
|
||||
+ npll_names = mux_pll_src_cgn_pll_vop0_p;
|
||||
+ non_npll_names = mux_pll_src_cgn_pll_vop1_p;
|
||||
+ }
|
||||
+ npll_names[0] = "dummy_cpll";
|
||||
+ npll_names[1] = "dummy_gpll";
|
||||
+ non_npll_names[2] = "dummy_npll";
|
||||
+
|
||||
+ /* Lastly the npll-dedicated-VOP needs to be able to control npll. */
|
||||
+ for (i = 0; i < ARRAY_SIZE(rk3288_clk_branches); i++) {
|
||||
+ if (rk3288_clk_branches[i].id == vop_clk_id) {
|
||||
+ rk3288_clk_branches[i].flags |= CLK_SET_RATE_PARENT;
|
||||
+ break;
|
||||
+ }
|
||||
+ }
|
||||
+ pr_debug("%s: npll dedicated for VOP %d\n", __func__, npll_vop);
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
ctx = rockchip_clk_init(np, rk3288_cru_base, CLK_NR_CLKS);
|
||||
if (IS_ERR(ctx)) {
|
||||
pr_err("%s: rockchip clk init failed\n", __func__);
|
||||
diff --git a/drivers/clk/rockchip/clk.h b/drivers/clk/rockchip/clk.h
|
||||
index 6b53fff4c..dbda9d281 100644
|
||||
--- a/drivers/clk/rockchip/clk.h
|
||||
+++ b/drivers/clk/rockchip/clk.h
|
||||
@@ -382,6 +382,9 @@ struct clk *rockchip_clk_register_muxgrf(const char *name,
|
||||
|
||||
#define PNAME(x) static const char *const x[] __initconst
|
||||
|
||||
+/* For when you want to be able to modify the pointers. */
|
||||
+#define PNAME_ED(x) static const char * x[] __initdata
|
||||
+
|
||||
enum rockchip_clk_branch_type {
|
||||
branch_composite,
|
||||
branch_mux,
|
||||
--
|
||||
2.16.4
|
||||
|
@@ -1,434 +0,0 @@
|
||||
From 6c86916e81fa18394d9b57b4af44f9948e100e96 Mon Sep 17 00:00:00 2001
|
||||
From: "Miouyouyou (Myy)" <myy@miouyouyou.fr>
|
||||
Date: Sat, 29 Sep 2018 03:02:10 +0200
|
||||
Subject: [PATCH 6/6] drm: dw_hdmi-rockchip: better clock selection logic and
|
||||
dts-based rate list
|
||||
|
||||
This patch is taken from Urja Rannikko ( @urjaman ) patchset here :
|
||||
https://github.com/urjaman/arch-c201/blob/master/linux-c201/0020-RK3288-HDMI-clock-hacks-combined.patch
|
||||
https://www.spinics.net/lists/arm-kernel/msg673156.html
|
||||
|
||||
The original description was :
|
||||
This contains traces of the following commits from the ChromeOS 3.14
|
||||
tree, which improve RF/EMI performance and detach the clock selection
|
||||
logic from the HDMI PHY configurations, plus support for configuring
|
||||
the allowed clock rates via device tree as they are dependent on
|
||||
PLL configuration and maybe even the PCB layout and other hardware things,
|
||||
eg. interference to wifi or such (EMI).
|
||||
|
||||
Rates that were allowed previous to this patch are added as the fallback
|
||||
list if no dts configuration exists.
|
||||
|
||||
CHROMIUM: drm: rockchip/dw_hdmi-rockchip: Adjust rockchip_mpll_cfg for 146.25
|
||||
CHROMIUM: drm: rockchip/dw_hdmi-rockchip: expand the informal mpll config
|
||||
CHROMIUM: drm: rockchip/dw_hdmi-rockchip: add slop to more tables
|
||||
CHROMIUM: drm: rockchip/dw_hdmi-rockchip: redo rockchip hdmi to allow slop
|
||||
CHROMIUM: drm: rockchip/dw_hdmi-rockchip: Use auto-generated tables
|
||||
CHROMIUM: drm: rockchip/dw_hdmi-rockchip: Fixup the clock to be what we expect
|
||||
CHROMIUM: drm/rockchip: hdmi: adjust cklvl & txlvl for RF/EMI
|
||||
CHROMIUM: drm: rockchip/dw_hdmi-rockchip: Set cur_ctr to 0 always
|
||||
CHROMIUM: drm: rockchip/dw_hdmi-rockchip: Decrease slop
|
||||
|
||||
https://www.spinics.net/lists/arm-kernel/msg673163.html
|
||||
|
||||
This is the patch that takes into account the new property
|
||||
"rockchip,hdmi-rates-hz" that allows the definition of the HDMI
|
||||
frequencies in the DTS file.
|
||||
This also change a lot of HDMI frequencies definition, so that
|
||||
*will* require some extensive testing.
|
||||
|
||||
Still, if it works fine, this should make tinkering the HDMI
|
||||
frequencies easier, in case you have a very special HDMI screen.
|
||||
|
||||
Signed-off-by: Miouyouyou (Myy) <myy@miouyouyou.fr>
|
||||
---
|
||||
diff --git a/drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c b/drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c
|
||||
index cdc304d4c..91c7dc07b 100644
|
||||
--- a/drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c
|
||||
+++ b/drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c
|
||||
@@ -73,122 +73,141 @@ struct rockchip_hdmi {
|
||||
struct clk *grf_clk;
|
||||
struct dw_hdmi *hdmi;
|
||||
struct phy *phy;
|
||||
+ u32* rates;
|
||||
+ u32 rates_cnt;
|
||||
};
|
||||
|
||||
+#define CLK_SLOP(clk) ((clk) / 1000)
|
||||
+#define CLK_PLUS_SLOP(clk) ((clk) + CLK_SLOP(clk))
|
||||
+
|
||||
#define to_rockchip_hdmi(x) container_of(x, struct rockchip_hdmi, x)
|
||||
|
||||
+/* These were the rates allowed by the driver before rates list in device tree,
|
||||
+ * so keep them around as a fallback */
|
||||
+static const u32 dw_hdmi_fallback_rates[] = {
|
||||
+ 27000000,
|
||||
+ 36000000,
|
||||
+ 40000000,
|
||||
+ 54000000,
|
||||
+ 65000000,
|
||||
+ 66000000,
|
||||
+ 74250000,
|
||||
+ 83500000,
|
||||
+ 106500000,
|
||||
+ 108000000,
|
||||
+ 146250000,
|
||||
+ 148500000
|
||||
+};
|
||||
+
|
||||
static const struct dw_hdmi_mpll_config rockchip_mpll_cfg[] = {
|
||||
{
|
||||
- 27000000, {
|
||||
- { 0x00b3, 0x0000},
|
||||
- { 0x2153, 0x0000},
|
||||
- { 0x40f3, 0x0000}
|
||||
+ 30666000, {
|
||||
+ { 0x00b3, 0x0000 },
|
||||
+ { 0x2153, 0x0000 },
|
||||
+ { 0x40f3, 0x0000 },
|
||||
+ },
|
||||
+ }, {
|
||||
+ 36800000, {
|
||||
+ { 0x00b3, 0x0000 },
|
||||
+ { 0x2153, 0x0000 },
|
||||
+ { 0x40a2, 0x0001 },
|
||||
},
|
||||
- }, {
|
||||
- 36000000, {
|
||||
- { 0x00b3, 0x0000},
|
||||
- { 0x2153, 0x0000},
|
||||
- { 0x40f3, 0x0000}
|
||||
+ }, {
|
||||
+ 46000000, {
|
||||
+ { 0x00b3, 0x0000 },
|
||||
+ { 0x2142, 0x0001 },
|
||||
+ { 0x40a2, 0x0001 },
|
||||
},
|
||||
- }, {
|
||||
- 40000000, {
|
||||
- { 0x00b3, 0x0000},
|
||||
- { 0x2153, 0x0000},
|
||||
- { 0x40f3, 0x0000}
|
||||
+ }, {
|
||||
+ 61333000, {
|
||||
+ { 0x0072, 0x0001 },
|
||||
+ { 0x2142, 0x0001 },
|
||||
+ { 0x40a2, 0x0001 },
|
||||
},
|
||||
- }, {
|
||||
- 54000000, {
|
||||
- { 0x0072, 0x0001},
|
||||
- { 0x2142, 0x0001},
|
||||
- { 0x40a2, 0x0001},
|
||||
+ }, {
|
||||
+ 73600000, {
|
||||
+ { 0x0072, 0x0001 },
|
||||
+ { 0x2142, 0x0001 },
|
||||
+ { 0x4061, 0x0002 },
|
||||
},
|
||||
- }, {
|
||||
- 65000000, {
|
||||
- { 0x0072, 0x0001},
|
||||
- { 0x2142, 0x0001},
|
||||
- { 0x40a2, 0x0001},
|
||||
+ }, {
|
||||
+ 92000000, {
|
||||
+ { 0x0072, 0x0001 },
|
||||
+ { 0x2145, 0x0002 },
|
||||
+ { 0x4061, 0x0002 },
|
||||
},
|
||||
- }, {
|
||||
- 66000000, {
|
||||
- { 0x013e, 0x0003},
|
||||
- { 0x217e, 0x0002},
|
||||
- { 0x4061, 0x0002}
|
||||
+ }, {
|
||||
+ 122666000, {
|
||||
+ { 0x0051, 0x0002 },
|
||||
+ { 0x2145, 0x0002 },
|
||||
+ { 0x4061, 0x0002 },
|
||||
},
|
||||
- }, {
|
||||
- 74250000, {
|
||||
- { 0x0072, 0x0001},
|
||||
- { 0x2145, 0x0002},
|
||||
- { 0x4061, 0x0002}
|
||||
+ }, {
|
||||
+ 147200000, {
|
||||
+ { 0x0051, 0x0002 },
|
||||
+ { 0x2145, 0x0002 },
|
||||
+ { 0x4064, 0x0003 },
|
||||
},
|
||||
- }, {
|
||||
- 83500000, {
|
||||
- { 0x0072, 0x0001},
|
||||
+ }, {
|
||||
+ 184000000, {
|
||||
+ { 0x0051, 0x0002 },
|
||||
+ { 0x214c, 0x0003 },
|
||||
+ { 0x4064, 0x0003 },
|
||||
},
|
||||
- }, {
|
||||
- 108000000, {
|
||||
- { 0x0051, 0x0002},
|
||||
- { 0x2145, 0x0002},
|
||||
- { 0x4061, 0x0002}
|
||||
+ }, {
|
||||
+ 226666000, {
|
||||
+ { 0x0040, 0x0003 },
|
||||
+ { 0x214c, 0x0003 },
|
||||
+ { 0x4064, 0x0003 },
|
||||
},
|
||||
- }, {
|
||||
- 106500000, {
|
||||
- { 0x0051, 0x0002},
|
||||
- { 0x2145, 0x0002},
|
||||
- { 0x4061, 0x0002}
|
||||
+ }, {
|
||||
+ 272000000, {
|
||||
+ { 0x0040, 0x0003 },
|
||||
+ { 0x214c, 0x0003 },
|
||||
+ { 0x5a64, 0x0003 },
|
||||
},
|
||||
- }, {
|
||||
- 146250000, {
|
||||
- { 0x0051, 0x0002},
|
||||
- { 0x2145, 0x0002},
|
||||
- { 0x4061, 0x0002}
|
||||
+ }, {
|
||||
+ 340000000, {
|
||||
+ { 0x0040, 0x0003 },
|
||||
+ { 0x3b4c, 0x0003 },
|
||||
+ { 0x5a64, 0x0003 },
|
||||
},
|
||||
- }, {
|
||||
- 148500000, {
|
||||
- { 0x0051, 0x0003},
|
||||
- { 0x214c, 0x0003},
|
||||
- { 0x4064, 0x0003}
|
||||
+ }, {
|
||||
+ 600000000, {
|
||||
+ { 0x1a40, 0x0003 },
|
||||
+ { 0x3b4c, 0x0003 },
|
||||
+ { 0x5a64, 0x0003 },
|
||||
},
|
||||
- }, {
|
||||
+ }, {
|
||||
~0UL, {
|
||||
- { 0x00a0, 0x000a },
|
||||
- { 0x2001, 0x000f },
|
||||
- { 0x4002, 0x000f },
|
||||
+ { 0x0000, 0x0000 },
|
||||
+ { 0x0000, 0x0000 },
|
||||
+ { 0x0000, 0x0000 },
|
||||
},
|
||||
}
|
||||
};
|
||||
|
||||
static const struct dw_hdmi_curr_ctrl rockchip_cur_ctr[] = {
|
||||
- /* pixelclk bpp8 bpp10 bpp12 */
|
||||
+ /* pixelclk bpp8 bpp10 bpp12 */
|
||||
{
|
||||
- 40000000, { 0x0018, 0x0018, 0x0018 },
|
||||
- }, {
|
||||
- 65000000, { 0x0028, 0x0028, 0x0028 },
|
||||
- }, {
|
||||
- 66000000, { 0x0038, 0x0038, 0x0038 },
|
||||
- }, {
|
||||
- 74250000, { 0x0028, 0x0038, 0x0038 },
|
||||
- }, {
|
||||
- 83500000, { 0x0028, 0x0038, 0x0038 },
|
||||
- }, {
|
||||
- 146250000, { 0x0038, 0x0038, 0x0038 },
|
||||
- }, {
|
||||
- 148500000, { 0x0000, 0x0038, 0x0038 },
|
||||
- }, {
|
||||
- ~0UL, { 0x0000, 0x0000, 0x0000},
|
||||
- }
|
||||
+ 600000000, { 0x0000, 0x0000, 0x0000 },
|
||||
+ }, {
|
||||
+ ~0UL, { 0x0000, 0x0000, 0x0000 },
|
||||
+ },
|
||||
};
|
||||
|
||||
static const struct dw_hdmi_phy_config rockchip_phy_config[] = {
|
||||
/*pixelclk symbol term vlev*/
|
||||
- { 74250000, 0x8009, 0x0004, 0x0272},
|
||||
- { 148500000, 0x802b, 0x0004, 0x028d},
|
||||
- { 297000000, 0x8039, 0x0005, 0x028d},
|
||||
- { ~0UL, 0x0000, 0x0000, 0x0000}
|
||||
+ { CLK_PLUS_SLOP(74250000), 0x8009, 0x0004, 0x0272},
|
||||
+ { CLK_PLUS_SLOP(165000000), 0x802b, 0x0004, 0x0209},
|
||||
+ { CLK_PLUS_SLOP(297000000), 0x8039, 0x0005, 0x028d},
|
||||
+ { ~0UL, 0x0000, 0x0000, 0x0000}
|
||||
};
|
||||
|
||||
static int rockchip_hdmi_parse_dt(struct rockchip_hdmi *hdmi)
|
||||
{
|
||||
struct device_node *np = hdmi->dev->of_node;
|
||||
+ int rates_cnt;
|
||||
|
||||
hdmi->regmap = syscon_regmap_lookup_by_phandle(np, "rockchip,grf");
|
||||
if (IS_ERR(hdmi->regmap)) {
|
||||
@@ -216,26 +235,55 @@ static int rockchip_hdmi_parse_dt(struct rockchip_hdmi *hdmi)
|
||||
return PTR_ERR(hdmi->grf_clk);
|
||||
}
|
||||
|
||||
+ if ((rates_cnt = of_property_count_u32_elems(np, "rockchip,hdmi-rates-hz")) > 0) {
|
||||
+ int rv;
|
||||
+ u32 *rates = devm_kmalloc_array(hdmi->dev, rates_cnt, sizeof(u32), GFP_KERNEL);
|
||||
+ if (!rates)
|
||||
+ return -ENOMEM;
|
||||
+ rv = of_property_read_u32_array(np, "rockchip,hdmi-rates-hz", rates, rates_cnt);
|
||||
+ if (rv)
|
||||
+ return rv;
|
||||
+ hdmi->rates = rates;
|
||||
+ hdmi->rates_cnt = rates_cnt;
|
||||
+ } else {
|
||||
+ rates_cnt = ARRAY_SIZE(dw_hdmi_fallback_rates);
|
||||
+ hdmi->rates = devm_kmalloc_array(hdmi->dev, rates_cnt, sizeof(u32), GFP_KERNEL);
|
||||
+ if (!hdmi->rates)
|
||||
+ return -ENOMEM;
|
||||
+ memcpy(hdmi->rates, dw_hdmi_fallback_rates, rates_cnt * sizeof(u32));
|
||||
+ hdmi->rates_cnt = rates_cnt;
|
||||
+ }
|
||||
+
|
||||
+
|
||||
return 0;
|
||||
}
|
||||
|
||||
static enum drm_mode_status
|
||||
-dw_hdmi_rockchip_mode_valid(struct drm_connector *connector,
|
||||
+dw_hdmi_rockchip_encoder_mode_valid(struct drm_encoder *encoder,
|
||||
const struct drm_display_mode *mode)
|
||||
{
|
||||
- const struct dw_hdmi_mpll_config *mpll_cfg = rockchip_mpll_cfg;
|
||||
+ struct rockchip_hdmi *hdmi = to_rockchip_hdmi(encoder);
|
||||
int pclk = mode->clock * 1000;
|
||||
- bool valid = false;
|
||||
+ int num_rates = hdmi->rates_cnt;
|
||||
int i;
|
||||
|
||||
- for (i = 0; mpll_cfg[i].mpixelclock != (~0UL); i++) {
|
||||
- if (pclk == mpll_cfg[i].mpixelclock) {
|
||||
- valid = true;
|
||||
- break;
|
||||
- }
|
||||
+ /*
|
||||
+ * Pixel clocks we support are always < 2GHz and so fit in an
|
||||
+ * int. We should make sure source rate does too so we don't get
|
||||
+ * overflow when we multiply by 1000.
|
||||
+ */
|
||||
+ if (mode->clock > INT_MAX / 1000)
|
||||
+ return MODE_BAD;
|
||||
+
|
||||
+ for (i = 0; i < num_rates; i++) {
|
||||
+ int slop = CLK_SLOP(pclk);
|
||||
+
|
||||
+ if ((pclk >= hdmi->rates[i] - slop) &&
|
||||
+ (pclk <= hdmi->rates[i] + slop))
|
||||
+ return MODE_OK;
|
||||
}
|
||||
|
||||
- return (valid) ? MODE_OK : MODE_BAD;
|
||||
+ return MODE_BAD;
|
||||
}
|
||||
|
||||
static const struct drm_encoder_funcs dw_hdmi_rockchip_encoder_funcs = {
|
||||
@@ -251,7 +299,39 @@ dw_hdmi_rockchip_encoder_mode_fixup(struct drm_encoder *encoder,
|
||||
const struct drm_display_mode *mode,
|
||||
struct drm_display_mode *adj_mode)
|
||||
{
|
||||
- return true;
|
||||
+ struct rockchip_hdmi *hdmi = to_rockchip_hdmi(encoder);
|
||||
+ int pclk = adj_mode->clock * 1000;
|
||||
+ int best_diff = INT_MAX;
|
||||
+ int best_clock = 0;
|
||||
+ int slop;
|
||||
+ int i;
|
||||
+
|
||||
+ /* Pick the best clock */
|
||||
+ for (i = 0; i < hdmi->rates_cnt; i++) {
|
||||
+ int diff = hdmi->rates[i] - pclk;
|
||||
+
|
||||
+ if (diff < 0)
|
||||
+ diff = -diff;
|
||||
+ if (diff < best_diff) {
|
||||
+ best_diff = diff;
|
||||
+ best_clock = hdmi->rates[i];
|
||||
+
|
||||
+ /* Bail early if we're exact */
|
||||
+ if (best_diff == 0)
|
||||
+ return true;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ /* Double check that it's OK */
|
||||
+ slop = CLK_SLOP(pclk);
|
||||
+ if ((pclk >= best_clock - slop) && (pclk <= best_clock + slop)) {
|
||||
+ adj_mode->clock = DIV_ROUND_UP(best_clock, 1000);
|
||||
+ return true;
|
||||
+ }
|
||||
+
|
||||
+ /* Shoudn't be here; we should have said rate wasn't valid */
|
||||
+ dev_warn(hdmi->dev, "tried to set invalid rate %d\n", adj_mode->clock);
|
||||
+ return false;
|
||||
}
|
||||
|
||||
static void dw_hdmi_rockchip_encoder_mode_set(struct drm_encoder *encoder,
|
||||
@@ -307,6 +387,7 @@ dw_hdmi_rockchip_encoder_atomic_check(struct drm_encoder *encoder,
|
||||
}
|
||||
|
||||
static const struct drm_encoder_helper_funcs dw_hdmi_rockchip_encoder_helper_funcs = {
|
||||
+ .mode_valid = dw_hdmi_rockchip_encoder_mode_valid,
|
||||
.mode_fixup = dw_hdmi_rockchip_encoder_mode_fixup,
|
||||
.mode_set = dw_hdmi_rockchip_encoder_mode_set,
|
||||
.enable = dw_hdmi_rockchip_encoder_enable,
|
||||
@@ -406,7 +487,6 @@ static struct rockchip_hdmi_chip_data rk3228_chip_data = {
|
||||
};
|
||||
|
||||
static const struct dw_hdmi_plat_data rk3228_hdmi_drv_data = {
|
||||
- .mode_valid = dw_hdmi_rockchip_mode_valid,
|
||||
.mpll_cfg = rockchip_mpll_cfg,
|
||||
.cur_ctr = rockchip_cur_ctr,
|
||||
.phy_config = rockchip_phy_config,
|
||||
@@ -423,7 +503,6 @@ static struct rockchip_hdmi_chip_data rk3288_chip_data = {
|
||||
};
|
||||
|
||||
static const struct dw_hdmi_plat_data rk3288_hdmi_drv_data = {
|
||||
- .mode_valid = dw_hdmi_rockchip_mode_valid,
|
||||
.mpll_cfg = rockchip_mpll_cfg,
|
||||
.cur_ctr = rockchip_cur_ctr,
|
||||
.phy_config = rockchip_phy_config,
|
||||
@@ -443,7 +522,6 @@ static struct rockchip_hdmi_chip_data rk3328_chip_data = {
|
||||
};
|
||||
|
||||
static const struct dw_hdmi_plat_data rk3328_hdmi_drv_data = {
|
||||
- .mode_valid = dw_hdmi_rockchip_mode_valid,
|
||||
.mpll_cfg = rockchip_mpll_cfg,
|
||||
.cur_ctr = rockchip_cur_ctr,
|
||||
.phy_config = rockchip_phy_config,
|
||||
@@ -460,7 +538,6 @@ static struct rockchip_hdmi_chip_data rk3399_chip_data = {
|
||||
};
|
||||
|
||||
static const struct dw_hdmi_plat_data rk3399_hdmi_drv_data = {
|
||||
- .mode_valid = dw_hdmi_rockchip_mode_valid,
|
||||
.mpll_cfg = rockchip_mpll_cfg,
|
||||
.cur_ctr = rockchip_cur_ctr,
|
||||
.phy_config = rockchip_phy_config,
|
||||
@@ -558,6 +635,7 @@ static int dw_hdmi_rockchip_bind(struct device *dev, struct device *master,
|
||||
*/
|
||||
if (IS_ERR(hdmi->hdmi)) {
|
||||
ret = PTR_ERR(hdmi->hdmi);
|
||||
+ devm_kfree(hdmi->dev, hdmi->rates);
|
||||
drm_encoder_cleanup(encoder);
|
||||
clk_disable_unprepare(hdmi->vpll_clk);
|
||||
}
|
||||
@@ -570,6 +648,7 @@ static void dw_hdmi_rockchip_unbind(struct device *dev, struct device *master,
|
||||
{
|
||||
struct rockchip_hdmi *hdmi = dev_get_drvdata(dev);
|
||||
|
||||
+ devm_kfree(hdmi->dev, hdmi->rates);
|
||||
dw_hdmi_unbind(hdmi->hdmi);
|
||||
clk_disable_unprepare(hdmi->vpll_clk);
|
||||
}
|
@@ -1,22 +0,0 @@
|
||||
From d4d128324b8f8a9f5c441203d94703e41fa07df3 Mon Sep 17 00:00:00 2001
|
||||
From: "Miouyouyou (Myy)" <myy@miouyouyou.fr>
|
||||
Date: Mon, 5 Nov 2018 19:57:56 +0100
|
||||
Subject: [PATCH] spi: Added support for Tinkerboard's SPI interface
|
||||
|
||||
Imported from ARMbian
|
||||
|
||||
Signed-off-by: Miouyouyou (Myy) <myy@miouyouyou.fr>
|
||||
---
|
||||
|
||||
diff --git a/drivers/spi/spidev.c b/drivers/spi/spidev.c
|
||||
index 255786f2e..3a3f2e6fd 100644
|
||||
--- a/drivers/spi/spidev.c
|
||||
+++ b/drivers/spi/spidev.c
|
||||
@@ -665,6 +665,7 @@ static const struct of_device_id spidev_dt_ids[] = {
|
||||
{ .compatible = "lwn,bk4" },
|
||||
{ .compatible = "dh,dhcom-board" },
|
||||
{ .compatible = "menlo,m53cpld" },
|
||||
+ { .compatible = "rockchip,spi_tinker" },
|
||||
{},
|
||||
};
|
||||
MODULE_DEVICE_TABLE(of, spidev_dt_ids);
|
@@ -1,395 +0,0 @@
|
||||
diff --git a/arch/arm/boot/dts/rk3288-tinker.dtsi b/arch/arm/boot/dts/rk3288-tinker.dtsi
|
||||
index e5b7ef1a5..f88c913ff 100644
|
||||
--- a/arch/arm/boot/dts/rk3288-tinker.dtsi
|
||||
+++ b/arch/arm/boot/dts/rk3288-tinker.dtsi
|
||||
@@ -544,3 +544,6 @@
|
||||
&wdt {
|
||||
status = "okay";
|
||||
};
|
||||
+&gpiomem {
|
||||
+ status = "okay";
|
||||
+};
|
||||
diff --git a/arch/arm/boot/dts/rk3288.dtsi b/arch/arm/boot/dts/rk3288.dtsi
|
||||
index f3ca55496..14bbcb192 100644
|
||||
--- a/arch/arm/boot/dts/rk3288.dtsi
|
||||
+++ b/arch/arm/boot/dts/rk3288.dtsi
|
||||
@@ -1418,6 +1418,12 @@
|
||||
interrupts = <GIC_PPI 9 0xf04>;
|
||||
};
|
||||
|
||||
+ gpiomem: rk3288-gpiomem@ff750000 {
|
||||
+ compatible = "rockchip,rk3288-gpiomem";
|
||||
+ reg = <0x0 0xff750000 0x0 0x1000>;
|
||||
+ status = "disabled";
|
||||
+ };
|
||||
+
|
||||
pinctrl: pinctrl {
|
||||
compatible = "rockchip,rk3288-pinctrl";
|
||||
rockchip,grf = <&grf>;
|
||||
|
||||
diff --git a/drivers/char/Kconfig b/drivers/char/Kconfig
|
||||
index 3143db5..9c18b74 100644
|
||||
--- a/drivers/char/Kconfig
|
||||
+++ b/drivers/char/Kconfig
|
||||
@@ -5,6 +5,7 @@
|
||||
menu "Character devices"
|
||||
|
||||
source "drivers/tty/Kconfig"
|
||||
+source "drivers/char/rockchip/Kconfig"
|
||||
|
||||
config DEVMEM
|
||||
bool "/dev/mem virtual device support"
|
||||
diff --git a/drivers/char/Makefile b/drivers/char/Makefile
|
||||
index d8a7579..290cb32 100644
|
||||
--- a/drivers/char/Makefile
|
||||
+++ b/drivers/char/Makefile
|
||||
@@ -51,6 +51,8 @@ obj-$(CONFIG_PS3_FLASH) += ps3flash.o
|
||||
obj-$(CONFIG_JS_RTC) += js-rtc.o
|
||||
js-rtc-y = rtc.o
|
||||
|
||||
+obj-$(CONFIG_ARCH_ROCKCHIP) += rockchip/
|
||||
+
|
||||
obj-$(CONFIG_XILLYBUS) += xillybus/
|
||||
obj-$(CONFIG_POWERNV_OP_PANEL) += powernv-op-panel.o
|
||||
obj-$(CONFIG_ADI) += adi.o
|
||||
diff --git a/drivers/char/rockchip/Kconfig b/drivers/char/rockchip/Kconfig
|
||||
new file mode 100644
|
||||
index 0000000..6e97486
|
||||
--- /dev/null
|
||||
+++ b/drivers/char/rockchip/Kconfig
|
||||
@@ -0,0 +1,16 @@
|
||||
+#
|
||||
+# Broadcom char driver config
|
||||
+#
|
||||
+
|
||||
+menuconfig RK_CHAR_DRIVERS
|
||||
+ bool "Rockchip Char Drivers"
|
||||
+ help
|
||||
+ Rockchip's char drivers
|
||||
+
|
||||
+config RK3288_DEVGPIOMEM
|
||||
+ tristate "/dev/gpiomem rootless GPIO access via mmap() on the RK3288"
|
||||
+ default y
|
||||
+ help
|
||||
+ Provides users with root-free access to the GPIO registers
|
||||
+ on the 3288. Calling mmap(/dev/gpiomem) will map the GPIO
|
||||
+ register page to the user's pointer.
|
||||
\ No newline at end of file
|
||||
diff --git a/drivers/char/rockchip/Makefile b/drivers/char/rockchip/Makefile
|
||||
new file mode 100644
|
||||
index 0000000..2287ec2
|
||||
--- /dev/null
|
||||
+++ b/drivers/char/rockchip/Makefile
|
||||
@@ -0,0 +1 @@
|
||||
+obj-$(CONFIG_RK3288_DEVGPIOMEM)+= rk3288-gpiomem.o
|
||||
\ No newline at end of file
|
||||
diff --git a/drivers/char/rockchip/rk3288-gpiomem.c b/drivers/char/rockchip/rk3288-gpiomem.c
|
||||
new file mode 100644
|
||||
index 0000000..984471c
|
||||
--- /dev/null
|
||||
+++ b/drivers/char/rockchip/rk3288-gpiomem.c
|
||||
@@ -0,0 +1,303 @@
|
||||
+/**
|
||||
+ * GPIO memory device driver
|
||||
+ *
|
||||
+ * Creates a chardev /dev/gpiomem which will provide user access to
|
||||
+ * the rk3288's GPIO registers when it is mmap()'d.
|
||||
+ * No longer need root for user GPIO access, but without relaxing permissions
|
||||
+ * on /dev/mem.
|
||||
+ *
|
||||
+ * Written by Luke Wren <luke@raspberrypi.org>
|
||||
+ * Copyright (c) 2015, Raspberry Pi (Trading) Ltd.
|
||||
+ *
|
||||
+ * Redistribution and use in source and binary forms, with or without
|
||||
+ * modification, are permitted provided that the following conditions
|
||||
+ * are met:
|
||||
+ * 1. Redistributions of source code must retain the above copyright
|
||||
+ * notice, this list of conditions, and the following disclaimer,
|
||||
+ * without modification.
|
||||
+ * 2. Redistributions in binary form must reproduce the above copyright
|
||||
+ * notice, this list of conditions and the following disclaimer in the
|
||||
+ * documentation and/or other materials provided with the distribution.
|
||||
+ * 3. The names of the above-listed copyright holders may not be used
|
||||
+ * to endorse or promote products derived from this software without
|
||||
+ * specific prior written permission.
|
||||
+ *
|
||||
+ * ALTERNATIVELY, this software may be distributed under the terms of the
|
||||
+ * GNU General Public License ("GPL") version 2, as published by the Free
|
||||
+ * Software Foundation.
|
||||
+ *
|
||||
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
|
||||
+ * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
|
||||
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
|
||||
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
||||
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
+ */
|
||||
+
|
||||
+#include <linux/kernel.h>
|
||||
+#include <linux/module.h>
|
||||
+#include <linux/of.h>
|
||||
+#include <linux/platform_device.h>
|
||||
+#include <linux/mm.h>
|
||||
+#include <linux/slab.h>
|
||||
+#include <linux/cdev.h>
|
||||
+#include <linux/pagemap.h>
|
||||
+#include <linux/io.h>
|
||||
+
|
||||
+#define DEVICE_NAME "rk3288-gpiomem"
|
||||
+#define DRIVER_NAME "gpiomem-rk3288"
|
||||
+#define DEVICE_MINOR 0
|
||||
+
|
||||
+struct rk3288_gpiomem_instance {
|
||||
+ unsigned long gpio_regs_phys;
|
||||
+ struct device *dev;
|
||||
+};
|
||||
+
|
||||
+static struct cdev rk3288_gpiomem_cdev;
|
||||
+static dev_t rk3288_gpiomem_devid;
|
||||
+static struct class *rk3288_gpiomem_class;
|
||||
+static struct device *rk3288_gpiomem_dev;
|
||||
+static struct rk3288_gpiomem_instance *inst;
|
||||
+
|
||||
+
|
||||
+/****************************************************************************
|
||||
+*
|
||||
+* GPIO mem chardev file ops
|
||||
+*
|
||||
+***************************************************************************/
|
||||
+
|
||||
+static int rk3288_gpiomem_open(struct inode *inode, struct file *file)
|
||||
+{
|
||||
+ int dev = iminor(inode);
|
||||
+ int ret = 0;
|
||||
+
|
||||
+ if (dev != DEVICE_MINOR) {
|
||||
+ dev_err(inst->dev, "Unknown minor device: %d", dev);
|
||||
+ ret = -ENXIO;
|
||||
+ }
|
||||
+ return ret;
|
||||
+}
|
||||
+
|
||||
+static int rk3288_gpiomem_release(struct inode *inode, struct file *file)
|
||||
+{
|
||||
+ int dev = iminor(inode);
|
||||
+ int ret = 0;
|
||||
+
|
||||
+ if (dev != DEVICE_MINOR) {
|
||||
+ dev_err(inst->dev, "Unknown minor device %d", dev);
|
||||
+ ret = -ENXIO;
|
||||
+ }
|
||||
+ return ret;
|
||||
+}
|
||||
+
|
||||
+static const struct vm_operations_struct rk3288_gpiomem_vm_ops = {
|
||||
+#ifdef CONFIG_HAVE_IOREMAP_PROT
|
||||
+ .access = generic_access_phys
|
||||
+#endif
|
||||
+};
|
||||
+static int address_is_allowed(unsigned long pfn, unsigned long size)
|
||||
+{
|
||||
+ unsigned long address = pfn << PAGE_SHIFT;
|
||||
+
|
||||
+ dev_info(inst->dev, "address_is_allowed.pfn: 0x%08lx", address);
|
||||
+
|
||||
+ switch(address) {
|
||||
+
|
||||
+ case 0xff750000:
|
||||
+ case 0xff760000:
|
||||
+ case 0xff780000:
|
||||
+ case 0xff790000:
|
||||
+ case 0xff7a0000:
|
||||
+ case 0xff7b0000:
|
||||
+ case 0xff7c0000:
|
||||
+ case 0xff7d0000:
|
||||
+ case 0xff7e0000:
|
||||
+ case 0xff7f0000:
|
||||
+ case 0xff7f2000:
|
||||
+ case 0xff770000:
|
||||
+ case 0xff730000:
|
||||
+ case 0xff680000:
|
||||
+ dev_info(inst->dev, "address_is_allowed.return 1");
|
||||
+ return 1;
|
||||
+ break;
|
||||
+ default :
|
||||
+ dev_info(inst->dev, "address_is_allowed.return 0");
|
||||
+ return 0;
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+static int rk3288_gpiomem_mmap(struct file *file, struct vm_area_struct *vma)
|
||||
+{
|
||||
+
|
||||
+ size_t size;
|
||||
+
|
||||
+ size = vma->vm_end - vma->vm_start;
|
||||
+
|
||||
+
|
||||
+ if (!address_is_allowed(vma->vm_pgoff, size))
|
||||
+ return -EPERM;
|
||||
+
|
||||
+ vma->vm_page_prot = phys_mem_access_prot(file, vma->vm_pgoff,
|
||||
+ size,
|
||||
+ vma->vm_page_prot);
|
||||
+
|
||||
+ vma->vm_ops = &rk3288_gpiomem_vm_ops;
|
||||
+
|
||||
+ /* Remap-pfn-range will mark the range VM_IO */
|
||||
+ if (remap_pfn_range(vma,
|
||||
+ vma->vm_start,
|
||||
+ vma->vm_pgoff,
|
||||
+ size,
|
||||
+ vma->vm_page_prot)) {
|
||||
+ return -EAGAIN;
|
||||
+ }
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static const struct file_operations
|
||||
+rk3288_gpiomem_fops = {
|
||||
+ .owner = THIS_MODULE,
|
||||
+ .open = rk3288_gpiomem_open,
|
||||
+ .release = rk3288_gpiomem_release,
|
||||
+ .mmap = rk3288_gpiomem_mmap,
|
||||
+};
|
||||
+
|
||||
+static int rk3288_gpiomem_dev_uevent(struct device *dev, struct kobj_uevent_env *env)
|
||||
+{
|
||||
+ add_uevent_var(env, "DEVMODE=%#o", 0666);
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+ /****************************************************************************
|
||||
+*
|
||||
+* Probe and remove functions
|
||||
+*
|
||||
+***************************************************************************/
|
||||
+
|
||||
+
|
||||
+static int rk3288_gpiomem_probe(struct platform_device *pdev)
|
||||
+{
|
||||
+ int err;
|
||||
+ void *ptr_err;
|
||||
+ struct device *dev = &pdev->dev;
|
||||
+ struct resource *ioresource;
|
||||
+
|
||||
+ /* Allocate buffers and instance data */
|
||||
+
|
||||
+ inst = kzalloc(sizeof(struct rk3288_gpiomem_instance), GFP_KERNEL);
|
||||
+
|
||||
+ if (!inst) {
|
||||
+ err = -ENOMEM;
|
||||
+ goto failed_inst_alloc;
|
||||
+ }
|
||||
+
|
||||
+ inst->dev = dev;
|
||||
+
|
||||
+ ioresource = platform_get_resource(pdev, IORESOURCE_MEM, 0);
|
||||
+ if (ioresource) {
|
||||
+ inst->gpio_regs_phys = ioresource->start;
|
||||
+ } else {
|
||||
+ dev_err(inst->dev, "failed to get IO resource");
|
||||
+ err = -ENOENT;
|
||||
+ goto failed_get_resource;
|
||||
+ }
|
||||
+
|
||||
+ /* Create character device entries */
|
||||
+
|
||||
+ err = alloc_chrdev_region(&rk3288_gpiomem_devid,
|
||||
+ DEVICE_MINOR, 1, DEVICE_NAME);
|
||||
+ if (err != 0) {
|
||||
+ dev_err(inst->dev, "unable to allocate device number");
|
||||
+ goto failed_alloc_chrdev;
|
||||
+ }
|
||||
+ cdev_init(&rk3288_gpiomem_cdev, &rk3288_gpiomem_fops);
|
||||
+ rk3288_gpiomem_cdev.owner = THIS_MODULE;
|
||||
+ err = cdev_add(&rk3288_gpiomem_cdev, rk3288_gpiomem_devid, 1);
|
||||
+ if (err != 0) {
|
||||
+ dev_err(inst->dev, "unable to register device");
|
||||
+ goto failed_cdev_add;
|
||||
+ }
|
||||
+
|
||||
+ /* Create sysfs entries */
|
||||
+
|
||||
+ rk3288_gpiomem_class = class_create(THIS_MODULE, DEVICE_NAME);
|
||||
+ ptr_err = rk3288_gpiomem_class;
|
||||
+ if (IS_ERR(ptr_err))
|
||||
+ goto failed_class_create;
|
||||
+ rk3288_gpiomem_class->dev_uevent = rk3288_gpiomem_dev_uevent;
|
||||
+ rk3288_gpiomem_dev = device_create(rk3288_gpiomem_class, NULL,
|
||||
+ rk3288_gpiomem_devid, NULL,
|
||||
+ "gpiomem");
|
||||
+ ptr_err = rk3288_gpiomem_dev;
|
||||
+ if (IS_ERR(ptr_err))
|
||||
+ goto failed_device_create;
|
||||
+
|
||||
+ dev_info(inst->dev, "Initialised: Registers at 0x%08lx",
|
||||
+ inst->gpio_regs_phys);
|
||||
+
|
||||
+ return 0;
|
||||
+
|
||||
+failed_device_create:
|
||||
+ class_destroy(rk3288_gpiomem_class);
|
||||
+failed_class_create:
|
||||
+ cdev_del(&rk3288_gpiomem_cdev);
|
||||
+ err = PTR_ERR(ptr_err);
|
||||
+failed_cdev_add:
|
||||
+ unregister_chrdev_region(rk3288_gpiomem_devid, 1);
|
||||
+failed_alloc_chrdev:
|
||||
+failed_get_resource:
|
||||
+ kfree(inst);
|
||||
+failed_inst_alloc:
|
||||
+ dev_err(inst->dev, "could not load rk3288_gpiomem");
|
||||
+ return err;
|
||||
+}
|
||||
+
|
||||
+static int rk3288_gpiomem_remove(struct platform_device *pdev)
|
||||
+{
|
||||
+ struct device *dev = inst->dev;
|
||||
+
|
||||
+ kfree(inst);
|
||||
+ device_destroy(rk3288_gpiomem_class, rk3288_gpiomem_devid);
|
||||
+ class_destroy(rk3288_gpiomem_class);
|
||||
+ cdev_del(&rk3288_gpiomem_cdev);
|
||||
+ unregister_chrdev_region(rk3288_gpiomem_devid, 1);
|
||||
+
|
||||
+ dev_info(dev, "GPIO mem driver removed - OK");
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+ /****************************************************************************
|
||||
+*
|
||||
+* Register the driver with device tree
|
||||
+*
|
||||
+***************************************************************************/
|
||||
+
|
||||
+static const struct of_device_id rk3288_gpiomem_of_match[] = {
|
||||
+ {.compatible = "rockchip,rk3288-gpiomem",},
|
||||
+ { /* sentinel */ },
|
||||
+};
|
||||
+
|
||||
+MODULE_DEVICE_TABLE(of, rk3288_gpiomem_of_match);
|
||||
+
|
||||
+static struct platform_driver rk3288_gpiomem_driver = {
|
||||
+ .probe = rk3288_gpiomem_probe,
|
||||
+ .remove = rk3288_gpiomem_remove,
|
||||
+ .driver = {
|
||||
+ .name = DRIVER_NAME,
|
||||
+ .owner = THIS_MODULE,
|
||||
+ .of_match_table = rk3288_gpiomem_of_match,
|
||||
+ },
|
||||
+};
|
||||
+
|
||||
+module_platform_driver(rk3288_gpiomem_driver);
|
||||
+
|
||||
+MODULE_ALIAS("platform:gpiomem-rk3288");
|
||||
+MODULE_LICENSE("GPL");
|
||||
+MODULE_DESCRIPTION("gpiomem driver for accessing GPIO from userspace");
|
||||
+MODULE_AUTHOR("Luke Wren <luke@raspberrypi.org>");
|
||||
\ No newline at end of file
|
@@ -1,32 +0,0 @@
|
||||
diff --git a/arch/arm/boot/dts/rk3288.dtsi b/arch/arm/boot/dts/rk3288.dtsi
|
||||
index bc3601a..37ae378 100644
|
||||
--- a/arch/arm/boot/dts/rk3288.dtsi
|
||||
+++ b/arch/arm/boot/dts/rk3288.dtsi
|
||||
@@ -467,13 +467,6 @@
|
||||
};
|
||||
|
||||
thermal-zones {
|
||||
- reserve_thermal: reserve_thermal {
|
||||
- polling-delay-passive = <1000>; /* milliseconds */
|
||||
- polling-delay = <5000>; /* milliseconds */
|
||||
-
|
||||
- thermal-sensors = <&tsadc 0>;
|
||||
- };
|
||||
-
|
||||
cpu_thermal: cpu_thermal {
|
||||
polling-delay-passive = <100>; /* milliseconds */
|
||||
polling-delay = <5000>; /* milliseconds */
|
||||
@@ -539,6 +532,13 @@
|
||||
};
|
||||
};
|
||||
};
|
||||
+
|
||||
+ reserve_thermal: reserve_thermal {
|
||||
+ polling-delay-passive = <1000>; /* milliseconds */
|
||||
+ polling-delay = <5000>; /* milliseconds */
|
||||
+
|
||||
+ thermal-sensors = <&tsadc 0>;
|
||||
+ };
|
||||
};
|
||||
|
||||
tsadc: tsadc@ff280000 {
|
@@ -1,80 +0,0 @@
|
||||
diff --git a/arch/arm/boot/dts/rk3288.dtsi b/arch/arm/boot/dts/rk3288.dtsi
|
||||
index 58bd91539..9c0dac199 100644
|
||||
--- a/arch/arm/boot/dts/rk3288.dtsi
|
||||
+++ b/arch/arm/boot/dts/rk3288.dtsi
|
||||
@@ -153,6 +153,75 @@
|
||||
opp-hz = /bits/ 64 <1608000000>;
|
||||
opp-microvolt = <1350000>;
|
||||
};
|
||||
+ opp@1704000000 {
|
||||
+ opp-hz = /bits/ 64 <1704000000>;
|
||||
+ opp-microvolt = <1350000>;
|
||||
+ };
|
||||
+ opp@1800000000 {
|
||||
+ opp-hz = /bits/ 64 <1800000000>;
|
||||
+ opp-microvolt = <1400000>;
|
||||
+ };
|
||||
+ /* boot-only frequencies below */
|
||||
+ opp@1896000000 {
|
||||
+ opp-hz = /bits/ 64 <1896000000>;
|
||||
+ opp-microvolt = <1425000>;
|
||||
+ turbo-mode;
|
||||
+ };
|
||||
+ opp@1920000000 {
|
||||
+ opp-hz = /bits/ 64 <1920000000>;
|
||||
+ opp-microvolt = <1425000>;
|
||||
+ turbo-mode;
|
||||
+ };
|
||||
+ opp@1992000000 {
|
||||
+ opp-hz = /bits/ 64 <1992000000>;
|
||||
+ opp-microvolt = <1450000>;
|
||||
+ turbo-mode;
|
||||
+ };
|
||||
+ opp@2016000000 {
|
||||
+ opp-hz = /bits/ 64 <2016000000>;
|
||||
+ opp-microvolt = <1475000>;
|
||||
+ turbo-mode;
|
||||
+ };
|
||||
+ opp@2040000000 {
|
||||
+ opp-hz = /bits/ 64 <2040000000>;
|
||||
+ opp-microvolt = <1475000>;
|
||||
+ turbo-mode;
|
||||
+ };
|
||||
+ opp@2064000000 {
|
||||
+ opp-hz = /bits/ 64 <2064000000>;
|
||||
+ opp-microvolt = <1475000>;
|
||||
+ turbo-mode;
|
||||
+ };
|
||||
+ opp@2088000000 {
|
||||
+ opp-hz = /bits/ 64 <2088000000>;
|
||||
+ opp-microvolt = <1500000>;
|
||||
+ turbo-mode;
|
||||
+ };
|
||||
+ opp@2112000000 {
|
||||
+ opp-hz = /bits/ 64 <2112000000>;
|
||||
+ opp-microvolt = <1500000>;
|
||||
+ turbo-mode;
|
||||
+ };
|
||||
+ opp@2136000000 {
|
||||
+ opp-hz = /bits/ 64 <2136000000>;
|
||||
+ opp-microvolt = <1500000>;
|
||||
+ turbo-mode;
|
||||
+ };
|
||||
+ opp@2160000000 {
|
||||
+ opp-hz = /bits/ 64 <2160000000>;
|
||||
+ opp-microvolt = <1500000>;
|
||||
+ turbo-mode;
|
||||
+ };
|
||||
+ opp@2184000000 {
|
||||
+ opp-hz = /bits/ 64 <2184000000>;
|
||||
+ opp-microvolt = <1500000>;
|
||||
+ turbo-mode;
|
||||
+ };
|
||||
+ opp@2208000000 {
|
||||
+ opp-hz = /bits/ 64 <2208000000>;
|
||||
+ opp-microvolt = <1500000>;
|
||||
+ turbo-mode;
|
||||
+ };
|
||||
};
|
||||
|
||||
amba {
|
@@ -1,23 +0,0 @@
|
||||
diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c
|
||||
index a907d7b06..ec71996c7 100644
|
||||
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c
|
||||
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c
|
||||
@@ -619,13 +619,17 @@ BRCMF_FW_DEF(4354, "brcmfmac4354-sdio");
|
||||
BRCMF_FW_DEF(4356, "brcmfmac4356-sdio");
|
||||
BRCMF_FW_DEF(4373, "brcmfmac4373-sdio");
|
||||
|
||||
+/* AMPAK */
|
||||
+BRCMF_FW_DEF(AP6330, "brcmfmac-ap6330-sdio");
|
||||
+
|
||||
static const struct brcmf_firmware_mapping brcmf_sdio_fwnames[] = {
|
||||
BRCMF_FW_ENTRY(BRCM_CC_43143_CHIP_ID, 0xFFFFFFFF, 43143),
|
||||
BRCMF_FW_ENTRY(BRCM_CC_43241_CHIP_ID, 0x0000001F, 43241B0),
|
||||
BRCMF_FW_ENTRY(BRCM_CC_43241_CHIP_ID, 0x00000020, 43241B4),
|
||||
BRCMF_FW_ENTRY(BRCM_CC_43241_CHIP_ID, 0xFFFFFFC0, 43241B5),
|
||||
BRCMF_FW_ENTRY(BRCM_CC_4329_CHIP_ID, 0xFFFFFFFF, 4329),
|
||||
- BRCMF_FW_ENTRY(BRCM_CC_4330_CHIP_ID, 0xFFFFFFFF, 4330),
|
||||
+ BRCMF_FW_ENTRY(BRCM_CC_4330_CHIP_ID, 0xFFFFFFEF, 4330),
|
||||
+ BRCMF_FW_ENTRY(BRCM_CC_4330_CHIP_ID, 0x10, AP6330),
|
||||
BRCMF_FW_ENTRY(BRCM_CC_4334_CHIP_ID, 0xFFFFFFFF, 4334),
|
||||
BRCMF_FW_ENTRY(BRCM_CC_43340_CHIP_ID, 0xFFFFFFFF, 43340),
|
||||
BRCMF_FW_ENTRY(BRCM_CC_43341_CHIP_ID, 0xFFFFFFFF, 43340),
|
@@ -1,13 +0,0 @@
|
||||
diff --git a/arch/arm/boot/dts/rk3288-tinker.dtsi b/arch/arm/boot/dts/rk3288-tinker.dtsi
|
||||
index 01be2bca9..5439e29e0 100644
|
||||
--- a/arch/arm/boot/dts/rk3288-tinker.dtsi
|
||||
+++ b/arch/arm/boot/dts/rk3288-tinker.dtsi
|
||||
@@ -64,7 +64,7 @@
|
||||
sound {
|
||||
compatible = "simple-audio-card";
|
||||
simple-audio-card,format = "i2s";
|
||||
- simple-audio-card,name = "rockchip,tinker-codec";
|
||||
+ simple-audio-card,name = "DW-I2S-HDMI";
|
||||
simple-audio-card,mclk-fs = <512>;
|
||||
|
||||
simple-audio-card,codec {
|
@@ -1,19 +0,0 @@
|
||||
diff --git a/drivers/mmc/core/core.c b/drivers/mmc/core/core.c
|
||||
index 5bd58b95d..48ebe081f 100644
|
||||
--- a/drivers/mmc/core/core.c
|
||||
+++ b/drivers/mmc/core/core.c
|
||||
@@ -1684,6 +1684,14 @@ void mmc_power_off(struct mmc_host *host)
|
||||
if (host->ios.power_mode == MMC_POWER_OFF)
|
||||
return;
|
||||
|
||||
+ mmc_set_initial_signal_voltage(host);
|
||||
+
|
||||
+ /*
|
||||
+ * This delay should be sufficient to allow the power supply
|
||||
+ * to reach the minimum voltage.
|
||||
+ */
|
||||
+ mmc_delay(host->ios.power_delay_ms);
|
||||
+
|
||||
mmc_pwrseq_power_off(host);
|
||||
|
||||
host->ios.clock = 0;
|
@@ -1,22 +0,0 @@
|
||||
diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
|
||||
index a98dee2ae..d3cef7033 100644
|
||||
--- a/arch/arm/boot/dts/Makefile
|
||||
+++ b/arch/arm/boot/dts/Makefile
|
||||
@@ -916,17 +916,7 @@ dtb-$(CONFIG_ARCH_ROCKCHIP) += \
|
||||
rk3288-rock2-square.dtb \
|
||||
rk3288-tinker.dtb \
|
||||
rk3288-tinker-s.dtb \
|
||||
- rk3288-veyron-brain.dtb \
|
||||
- rk3288-veyron-fievel.dtb \
|
||||
- rk3288-veyron-jaq.dtb \
|
||||
- rk3288-veyron-jerry.dtb \
|
||||
- rk3288-veyron-mickey.dtb \
|
||||
- rk3288-veyron-mighty.dtb \
|
||||
- rk3288-veyron-minnie.dtb \
|
||||
- rk3288-veyron-pinky.dtb \
|
||||
- rk3288-veyron-speedy.dtb \
|
||||
- rk3288-veyron-tiger.dtb \
|
||||
rk3288-vyasa.dtb
|
||||
dtb-$(CONFIG_ARCH_S3C24XX) += \
|
||||
s3c2416-smdk2416.dtb
|
||||
dtb-$(CONFIG_ARCH_S3C64XX) += \
|
@@ -1,8 +1,8 @@
|
||||
From cd1aac268ff58eea28153bbabfb33abc2df52b1f Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <cd1aac268ff58eea28153bbabfb33abc2df52b1f.1602103621.git.stefan@agner.ch>
|
||||
From 983121a741192153492a61befc0e0fc61b9f8b14 Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <983121a741192153492a61befc0e0fc61b9f8b14.1617731428.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
|
||||
Subject: [PATCH 1/2] 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.
|
||||
@@ -15,7 +15,7 @@ Signed-off-by: Stefan Agner <stefan@agner.ch>
|
||||
2 files changed, 2 insertions(+)
|
||||
|
||||
diff --git a/configs/tinker-rk3288_defconfig b/configs/tinker-rk3288_defconfig
|
||||
index d459c7f50d..e0682ed479 100644
|
||||
index 8686a66d13..c3363821dd 100644
|
||||
--- a/configs/tinker-rk3288_defconfig
|
||||
+++ b/configs/tinker-rk3288_defconfig
|
||||
@@ -88,3 +88,4 @@ CONFIG_VIDEO_ROCKCHIP=y
|
||||
@@ -24,7 +24,7 @@ index d459c7f50d..e0682ed479 100644
|
||||
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
|
||||
index 22714833cc..f5dd23577c 100644
|
||||
--- a/configs/tinker-s-rk3288_defconfig
|
||||
+++ b/configs/tinker-s-rk3288_defconfig
|
||||
@@ -90,3 +90,4 @@ CONFIG_DISPLAY_ROCKCHIP_HDMI=y
|
||||
@@ -33,5 +33,5 @@ index 68411d863b..1a285baf73 100644
|
||||
CONFIG_ERRNO_STR=y
|
||||
+CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR=0x2000
|
||||
--
|
||||
2.28.0
|
||||
2.31.1
|
||||
|
||||
|
@@ -0,0 +1,68 @@
|
||||
From f9195bc5cb18f71117f6efc1c352209e62c53706 Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <f9195bc5cb18f71117f6efc1c352209e62c53706.1617731428.git.stefan@agner.ch>
|
||||
In-Reply-To: <983121a741192153492a61befc0e0fc61b9f8b14.1617731428.git.stefan@agner.ch>
|
||||
References: <983121a741192153492a61befc0e0fc61b9f8b14.1617731428.git.stefan@agner.ch>
|
||||
From: Pascal Vizeli <pvizeli@syshack.ch>
|
||||
Date: Fri, 24 Apr 2020 11:37:55 +0000
|
||||
Subject: [PATCH 2/2] pmic: enable LDO2 vcc33_mipi at bootup
|
||||
|
||||
Signed-off-by: Pascal Vizeli <pvizeli@syshack.ch>
|
||||
---
|
||||
board/rockchip/tinker_rk3288/tinker-rk3288.c | 37 ++++++++++++++++++++
|
||||
1 file changed, 37 insertions(+)
|
||||
|
||||
diff --git a/board/rockchip/tinker_rk3288/tinker-rk3288.c b/board/rockchip/tinker_rk3288/tinker-rk3288.c
|
||||
index f85209c649..6fa1bb0c66 100644
|
||||
--- a/board/rockchip/tinker_rk3288/tinker-rk3288.c
|
||||
+++ b/board/rockchip/tinker_rk3288/tinker-rk3288.c
|
||||
@@ -13,6 +13,7 @@
|
||||
#include <netdev.h>
|
||||
#include <asm/arch-rockchip/bootrom.h>
|
||||
#include <asm/io.h>
|
||||
+#include <power/regulator.h>
|
||||
|
||||
static int get_ethaddr_from_eeprom(u8 *addr)
|
||||
{
|
||||
@@ -48,3 +49,39 @@ int mmc_get_env_dev(void)
|
||||
|
||||
return 1;
|
||||
}
|
||||
+
|
||||
+
|
||||
+#ifdef CONFIG_DM_PMIC
|
||||
+static int rockchip_set_regulator_on(const char *name, uint uv)
|
||||
+{
|
||||
+ struct udevice *dev;
|
||||
+ int ret;
|
||||
+
|
||||
+ ret = regulator_get_by_platname(name, &dev);
|
||||
+ if (ret) {
|
||||
+ debug("%s: Cannot find regulator %s\n", __func__, name);
|
||||
+ return ret;
|
||||
+ }
|
||||
+ ret = regulator_set_value(dev, uv);
|
||||
+ if (ret) {
|
||||
+ debug("%s: Cannot set regulator %s\n", __func__, name);
|
||||
+ return ret;
|
||||
+ }
|
||||
+ ret = regulator_set_enable(dev, 1);
|
||||
+ if (ret) {
|
||||
+ debug("%s: Cannot enable regulator %s\n", __func__, name);
|
||||
+ return ret;
|
||||
+ }
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+int power_init_board(void)
|
||||
+{
|
||||
+ int ret = rockchip_set_regulator_on("vcc33_mipi", 3300000);
|
||||
+ if (ret)
|
||||
+ return ret;
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+#endif
|
||||
--
|
||||
2.31.1
|
||||
|
@@ -1,55 +0,0 @@
|
||||
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
|
||||
|
@@ -1,34 +0,0 @@
|
||||
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,68 +0,0 @@
|
||||
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 4/4] pmic: enable LDO2 vcc33_mipi at bootup
|
||||
|
||||
Signed-off-by: Pascal Vizeli <pvizeli@syshack.ch>
|
||||
---
|
||||
board/rockchip/tinker_rk3288/tinker-rk3288.c | 37 ++++++++++++++++++++
|
||||
1 file changed, 37 insertions(+)
|
||||
|
||||
diff --git a/board/rockchip/tinker_rk3288/tinker-rk3288.c b/board/rockchip/tinker_rk3288/tinker-rk3288.c
|
||||
index f85209c649..6fa1bb0c66 100644
|
||||
--- a/board/rockchip/tinker_rk3288/tinker-rk3288.c
|
||||
+++ b/board/rockchip/tinker_rk3288/tinker-rk3288.c
|
||||
@@ -13,6 +13,7 @@
|
||||
#include <netdev.h>
|
||||
#include <asm/arch-rockchip/bootrom.h>
|
||||
#include <asm/io.h>
|
||||
+#include <power/regulator.h>
|
||||
|
||||
static int get_ethaddr_from_eeprom(u8 *addr)
|
||||
{
|
||||
@@ -48,3 +49,39 @@ int mmc_get_env_dev(void)
|
||||
|
||||
return 1;
|
||||
}
|
||||
+
|
||||
+
|
||||
+#ifdef CONFIG_DM_PMIC
|
||||
+static int rockchip_set_regulator_on(const char *name, uint uv)
|
||||
+{
|
||||
+ struct udevice *dev;
|
||||
+ int ret;
|
||||
+
|
||||
+ ret = regulator_get_by_platname(name, &dev);
|
||||
+ if (ret) {
|
||||
+ debug("%s: Cannot find regulator %s\n", __func__, name);
|
||||
+ return ret;
|
||||
+ }
|
||||
+ ret = regulator_set_value(dev, uv);
|
||||
+ if (ret) {
|
||||
+ debug("%s: Cannot set regulator %s\n", __func__, name);
|
||||
+ return ret;
|
||||
+ }
|
||||
+ ret = regulator_set_enable(dev, 1);
|
||||
+ if (ret) {
|
||||
+ debug("%s: Cannot enable regulator %s\n", __func__, name);
|
||||
+ return ret;
|
||||
+ }
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+int power_init_board(void)
|
||||
+{
|
||||
+ int ret = rockchip_set_regulator_on("vcc33_mipi", 3300000);
|
||||
+ if (ret)
|
||||
+ return ret;
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+#endif
|
||||
--
|
||||
2.28.0
|
||||
|
@@ -17,20 +17,43 @@ 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"
|
||||
setenv bootargs_b "root=PARTUUID=a3ec664e-32ce-4665-95ea-7ae90ce9aa20 rootfstype=squashfs ro rootwait"
|
||||
|
||||
# Load environment from haos-config.txt
|
||||
if test -e mmc ${devnum}:1 haos-config.txt; then
|
||||
fatload mmc ${devnum}:1 ${ramdisk_addr_r} haos-config.txt
|
||||
env import -t ${ramdisk_addr_r} ${filesize}
|
||||
fi
|
||||
|
||||
# Load extraargs
|
||||
fileenv mmc ${devnum}:1 ${ramdisk_addr_r} cmdline.txt cmdline
|
||||
|
||||
# Load device tree
|
||||
if test "$devnum" = "0"; then
|
||||
fatload mmc ${devnum}:1 ${fdt_addr_r} rk3288-tinker-s.dtb
|
||||
setenv fdtfile "rk3288-tinker-s.dtb"
|
||||
else
|
||||
fatload mmc ${devnum}:1 ${fdt_addr_r} rk3288-tinker.dtb
|
||||
setenv fdtfile "rk3288-tinker.dtb"
|
||||
fi
|
||||
|
||||
echo "Loading standard device tree ${fdtfile}"
|
||||
fatload mmc ${devnum}:1 ${fdt_addr_r} ${fdtfile}
|
||||
fdt addr ${fdt_addr_r}
|
||||
|
||||
# load dt overlays
|
||||
fdt resize 65536
|
||||
for overlay_file in ${overlays}; do
|
||||
if fatload mmc ${devnum}:1 ${ramdisk_addr_r} overlays/${overlay_file}.dtbo; then
|
||||
echo "Applying kernel provided DT overlay ${overlay_file}.dtbo"
|
||||
fdt apply ${ramdisk_addr_r} || setenv overlay_error "true"
|
||||
fi
|
||||
done
|
||||
if test "${overlay_error}" = "true"; then
|
||||
echo "Error applying DT overlays, restoring original DT"
|
||||
fatload mmc ${devnum}:1 ${fdt_addr_r} ${fdtfile}
|
||||
fi
|
||||
|
||||
setenv bootargs
|
||||
@@ -40,16 +63,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
|
||||
@@ -64,10 +89,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
|
||||
|
@@ -1,2 +1,3 @@
|
||||
# CONFIG_USB_STORAGE is not set
|
||||
# CONFIG_DOS_PARTITION is not set
|
||||
CONFIG_OF_LIBFDT_OVERLAY=y
|
||||
|
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,2 @@
|
||||
# Uncomment this to enable GPIO support for RPI-RF-MOD/HM-MOD-RPI-PCB
|
||||
#overlays=rpi-rf-mod
|
@@ -10,6 +10,10 @@ function hassos_pre_image() {
|
||||
cp "${BINARIES_DIR}/boot.scr" "${BOOT_DATA}/boot.scr"
|
||||
cp "${BINARIES_DIR}/meson-gxbb-odroidc2.dtb" "${BOOT_DATA}/meson-gxbb-odroidc2.dtb"
|
||||
|
||||
mkdir -p "${BOOT_DATA}/overlays"
|
||||
cp "${BINARIES_DIR}"/*.dtbo "${BOOT_DATA}/overlays/"
|
||||
cp "${BOARD_DIR}/boot-env.txt" "${BOOT_DATA}/haos-config.txt"
|
||||
|
||||
echo "console=tty0 console=ttyAML0,115200n8" > "${BOOT_DATA}/cmdline.txt"
|
||||
|
||||
# SPL
|
||||
@@ -22,6 +26,6 @@ function hassos_pre_image() {
|
||||
|
||||
|
||||
function hassos_post_image() {
|
||||
convert_disk_image_gz
|
||||
convert_disk_image_xz
|
||||
}
|
||||
|
||||
|
@@ -19,17 +19,39 @@ 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 environment from haos-config.txt
|
||||
if test -e mmc ${devnum}:1 haos-config.txt; then
|
||||
fatload mmc ${devnum}:1 ${ramdisk_addr_r} haos-config.txt
|
||||
env import -t ${ramdisk_addr_r} ${filesize}
|
||||
fi
|
||||
|
||||
# Load extraargs
|
||||
fileenv mmc ${devnum}:1 ${ramdisk_addr_r} cmdline.txt cmdline
|
||||
fatload mmc ${devnum}:1 ${fdt_addr_r} meson-gxbb-odroidc2.dtb
|
||||
|
||||
# Load device tree
|
||||
setenv fdtfile "meson-gxbb-odroidc2.dtb"
|
||||
echo "Loading standard device tree ${fdtfile}"
|
||||
fatload mmc ${devnum}:1 ${fdt_addr_r} ${fdtfile}
|
||||
fdt addr ${fdt_addr_r}
|
||||
|
||||
# load dt overlays
|
||||
fdt resize 65536
|
||||
for overlay_file in ${overlays}; do
|
||||
if fatload mmc ${devnum}:1 ${ramdisk_addr_r} overlays/${overlay_file}.dtbo; then
|
||||
echo "Applying kernel provided DT overlay ${overlay_file}.dtbo"
|
||||
fdt apply ${ramdisk_addr_r} || setenv overlay_error "true"
|
||||
fi
|
||||
done
|
||||
if test "${overlay_error}" = "true"; then
|
||||
echo "Error applying DT overlays, restoring original DT"
|
||||
fatload mmc ${devnum}:1 ${fdt_addr_r} ${fdtfile}
|
||||
fi
|
||||
|
||||
# logical volumes get numbered after physical ones.
|
||||
# 1. boot
|
||||
@@ -48,16 +70,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 +96,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
|
||||
|
@@ -0,0 +1,2 @@
|
||||
# Uncomment this to enable GPIO support for RPI-RF-MOD/HM-MOD-RPI-PCB
|
||||
#overlays=rpi-rf-mod
|
27
buildroot-external/board/hardkernel/odroid-c4/hassos-hook.sh
Executable file
27
buildroot-external/board/hardkernel/odroid-c4/hassos-hook.sh
Executable file
@@ -0,0 +1,27 @@
|
||||
#!/bin/bash
|
||||
# shellcheck disable=SC2155
|
||||
|
||||
function hassos_pre_image() {
|
||||
local BOOT_DATA="$(path_boot_dir)"
|
||||
local 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"
|
||||
|
||||
mkdir -p "${BOOT_DATA}/overlays"
|
||||
cp "${BINARIES_DIR}"/*.dtbo "${BOOT_DATA}/overlays/"
|
||||
cp "${BOARD_DIR}/boot-env.txt" "${BOOT_DATA}/haos-config.txt"
|
||||
|
||||
echo "console=tty0 console=ttyAML0,115200n8" > "${BOOT_DATA}/cmdline.txt"
|
||||
|
||||
# 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
|
104
buildroot-external/board/hardkernel/odroid-c4/uboot-boot.ush
Normal file
104
buildroot-external/board/hardkernel/odroid-c4/uboot-boot.ush
Normal file
@@ -0,0 +1,104 @@
|
||||
|
||||
###########################################
|
||||
|
||||
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 environment from haos-config.txt
|
||||
if test -e mmc ${devnum}:1 haos-config.txt; then
|
||||
fatload mmc ${devnum}:1 ${ramdisk_addr_r} haos-config.txt
|
||||
env import -t ${ramdisk_addr_r} ${filesize}
|
||||
fi
|
||||
|
||||
# Load extraargs
|
||||
fileenv mmc ${devnum}:1 ${ramdisk_addr_r} cmdline.txt cmdline
|
||||
|
||||
# Load device tree
|
||||
setenv fdtfile "meson-sm1-odroid-c4.dtb"
|
||||
echo "Loading standard device tree ${fdtfile}"
|
||||
fatload mmc ${devnum}:1 ${fdt_addr_r} ${fdtfile}
|
||||
fdt addr ${fdt_addr_r}
|
||||
|
||||
# load dt overlays
|
||||
fdt resize 65536
|
||||
for overlay_file in ${overlays}; do
|
||||
if fatload mmc ${devnum}:1 ${ramdisk_addr_r} overlays/${overlay_file}.dtbo; then
|
||||
echo "Applying kernel provided DT overlay ${overlay_file}.dtbo"
|
||||
fdt apply ${ramdisk_addr_r} || setenv overlay_error "true"
|
||||
fi
|
||||
done
|
||||
if test "${overlay_error}" = "true"; then
|
||||
echo "Error applying DT overlays, restoring original DT"
|
||||
fatload mmc ${devnum}:1 ${fdt_addr_r} ${fdtfile}
|
||||
fi
|
||||
|
||||
# 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
|
@@ -0,0 +1,2 @@
|
||||
# Uncomment this to enable GPIO support for RPI-RF-MOD/HM-MOD-RPI-PCB
|
||||
#overlays=rpi-rf-mod
|
@@ -9,6 +9,10 @@ function hassos_pre_image() {
|
||||
cp "${BINARIES_DIR}/boot.scr" "${BOOT_DATA}/boot.scr"
|
||||
cp "${BINARIES_DIR}"/*.dtb "${BOOT_DATA}/"
|
||||
|
||||
mkdir -p "${BOOT_DATA}/overlays"
|
||||
cp "${BINARIES_DIR}"/*.dtbo "${BOOT_DATA}/overlays/"
|
||||
cp "${BOARD_DIR}/boot-env.txt" "${BOOT_DATA}/haos-config.txt"
|
||||
|
||||
echo "console=tty0 console=ttyAML0,115200n8" > "${BOOT_DATA}/cmdline.txt"
|
||||
|
||||
# SPL
|
||||
@@ -19,6 +23,6 @@ function hassos_pre_image() {
|
||||
|
||||
|
||||
function hassos_post_image() {
|
||||
convert_disk_image_gz
|
||||
convert_disk_image_xz
|
||||
}
|
||||
|
||||
|
@@ -0,0 +1,7 @@
|
||||
CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE=y
|
||||
|
||||
CONFIG_THERMAL_GOV_BANG_BANG=y
|
||||
CONFIG_SENSORS_GPIO_FAN=y
|
||||
|
||||
CONFIG_KEYBOARD_GPIO=y
|
||||
CONFIG_KEYBOARD_GPIO_POLLED=y
|
@@ -19,20 +19,43 @@ 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 environment from haos-config.txt
|
||||
if test -e mmc ${devnum}:1 haos-config.txt; then
|
||||
fatload mmc ${devnum}:1 ${ramdisk_addr_r} haos-config.txt
|
||||
env import -t ${ramdisk_addr_r} ${filesize}
|
||||
fi
|
||||
|
||||
# Load extraargs
|
||||
fileenv mmc ${devnum}:1 ${ramdisk_addr_r} cmdline.txt cmdline
|
||||
if test "${board_rev}" = "c"; then
|
||||
fatload mmc ${devnum}:1 ${fdt_addr_r} meson-g12b-odroid-n2-plus.dtb
|
||||
|
||||
# Load device tree
|
||||
if test "${soc_rev}" = "c"; then
|
||||
setenv fdtfile "meson-g12b-odroid-n2-plus.dtb"
|
||||
else
|
||||
fatload mmc ${devnum}:1 ${fdt_addr_r} meson-g12b-odroid-n2.dtb
|
||||
setenv fdtfile "meson-g12b-odroid-n2.dtb"
|
||||
fi
|
||||
|
||||
echo "Loading standard device tree ${fdtfile}"
|
||||
fatload mmc ${devnum}:1 ${fdt_addr_r} ${fdtfile}
|
||||
fdt addr ${fdt_addr_r}
|
||||
|
||||
# load dt overlays
|
||||
fdt resize 65536
|
||||
for overlay_file in ${overlays}; do
|
||||
if fatload mmc ${devnum}:1 ${ramdisk_addr_r} overlays/${overlay_file}.dtbo; then
|
||||
echo "Applying kernel provided DT overlay ${overlay_file}.dtbo"
|
||||
fdt apply ${ramdisk_addr_r} || setenv overlay_error "true"
|
||||
fi
|
||||
done
|
||||
if test "${overlay_error}" = "true"; then
|
||||
echo "Error applying DT overlays, restoring original DT"
|
||||
fatload mmc ${devnum}:1 ${fdt_addr_r} ${fdtfile}
|
||||
fi
|
||||
|
||||
# logical volumes get numbered after physical ones.
|
||||
@@ -52,16 +75,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 +101,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
|
||||
|
@@ -2,3 +2,4 @@ CONFIG_DOS_PARTITION=y
|
||||
# CONFIG_EFI_PARTITION is not set
|
||||
# CONFIG_USB_STORAGE is not set
|
||||
CONFIG_DISPLAY_BOARDINFO=y
|
||||
CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y
|
||||
|
@@ -26,5 +26,5 @@ function hassos_pre_image() {
|
||||
|
||||
|
||||
function hassos_post_image() {
|
||||
convert_disk_image_gz
|
||||
convert_disk_image_xz
|
||||
}
|
||||
|
@@ -0,0 +1,61 @@
|
||||
From d6b82edb420c7df4fa8bb0924dae2476beb649a2 Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <d6b82edb420c7df4fa8bb0924dae2476beb649a2.1622398359.git.stefan@agner.ch>
|
||||
From: "charles.park" <charles.park@hardkernel.com>
|
||||
Date: Fri, 1 Jun 2018 18:12:01 +0900
|
||||
Subject: [PATCH] ODROID-XU4: Update hack avoiding the invalid temperature by
|
||||
TMU broken
|
||||
|
||||
Change-Id: I6092834427950a50746535458e99bf7089212044
|
||||
---
|
||||
drivers/thermal/thermal_helpers.c | 28 ++++++++++++++++++++++++++++
|
||||
1 file changed, 28 insertions(+)
|
||||
|
||||
diff --git a/drivers/thermal/thermal_helpers.c b/drivers/thermal/thermal_helpers.c
|
||||
index c94bc824e5d3..2880126c5861 100644
|
||||
--- a/drivers/thermal/thermal_helpers.c
|
||||
+++ b/drivers/thermal/thermal_helpers.c
|
||||
@@ -75,6 +75,10 @@ EXPORT_SYMBOL(get_thermal_instance);
|
||||
*
|
||||
* Return: On success returns 0, an error code otherwise
|
||||
*/
|
||||
+
|
||||
+#define CRITICAL_TEMP 120000
|
||||
+int thermal_zone_data[4] = { 0, };
|
||||
+
|
||||
int thermal_zone_get_temp(struct thermal_zone_device *tz, int *temp)
|
||||
{
|
||||
int ret = -EINVAL;
|
||||
@@ -108,6 +112,30 @@ int thermal_zone_get_temp(struct thermal_zone_device *tz, int *temp)
|
||||
*temp = tz->emul_temperature;
|
||||
}
|
||||
|
||||
+ /* save thermal_zone data */
|
||||
+ if (!ret)
|
||||
+ thermal_zone_data[tz->id] = *temp;
|
||||
+ /*
|
||||
+ * This case is that the thermal sensor is broken.
|
||||
+ * That's not real temperature. Set the fake temperature value in order to
|
||||
+ * avoid reaching the ciritical temperature.
|
||||
+ */
|
||||
+ if ((thermal_zone_data[tz->id] > CRITICAL_TEMP) && (tz->id != 4)) {
|
||||
+ int i, broken_sensor = 0, correct_temp = 0;
|
||||
+ for (i = 0; i < 4; i++) {
|
||||
+ if ((thermal_zone_data[i] <= CRITICAL_TEMP) &&
|
||||
+ (correct_temp <= thermal_zone_data[i]))
|
||||
+ correct_temp = thermal_zone_data[i];
|
||||
+ if (thermal_zone_data[i] > CRITICAL_TEMP)
|
||||
+ broken_sensor++;
|
||||
+ }
|
||||
+ /*
|
||||
+ * if all thermal sensor broken then critical temperature data send
|
||||
+ * for system poweroff.
|
||||
+ */
|
||||
+ *temp = (broken_sensor == 4) ? CRITICAL_TEMP : correct_temp;
|
||||
+ }
|
||||
+
|
||||
mutex_unlock(&tz->lock);
|
||||
exit:
|
||||
return ret;
|
||||
--
|
||||
2.31.1
|
||||
|
@@ -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,124 +0,0 @@
|
||||
From f6fce2e974fe091fd233301bd7c127ca18304039 Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <f6fce2e974fe091fd233301bd7c127ca18304039.1603303549.git.stefan@agner.ch>
|
||||
From: Jerome Brunet <jbrunet@baylibre.com>
|
||||
Date: Mon, 19 Oct 2020 19:07:02 +0200
|
||||
Subject: [PATCH] usb: cdc-acm: fix cooldown mechanism
|
||||
|
||||
Commit a4e7279cd1d1 ("cdc-acm: introduce a cool down") is causing
|
||||
regression if there is some USB error, such as -EPROTO.
|
||||
|
||||
This has been reported on some samples of the Odroid-N2 using the Combee II
|
||||
Zibgee USB dongle.
|
||||
|
||||
> struct acm *acm = container_of(work, struct acm, work)
|
||||
|
||||
is incorrect in case of a delayed work and causes warnings, usually from
|
||||
the workqueue:
|
||||
|
||||
> WARNING: CPU: 0 PID: 0 at kernel/workqueue.c:1474 __queue_work+0x480/0x528.
|
||||
|
||||
When this happens, USB eventually stops working completely after a while.
|
||||
Also the ACM_ERROR_DELAY bit is never set, so the cooldown mechanism
|
||||
previously introduced cannot be triggered and acm_submit_read_urb() is
|
||||
never called.
|
||||
|
||||
This changes makes the cdc-acm driver use a single delayed work, fixing the
|
||||
pointer arithmetic in acm_softint() and set the ACM_ERROR_DELAY when the
|
||||
cooldown mechanism appear to be needed.
|
||||
|
||||
Fixes: a4e7279cd1d1 ("cdc-acm: introduce a cool down")
|
||||
Reported-by: Pascal Vizeli <pascal.vizeli@nabucasa.com>
|
||||
Cc: Oliver Neukum <oneukum@suse.com>
|
||||
Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
|
||||
---
|
||||
drivers/usb/class/cdc-acm.c | 12 +++++-------
|
||||
drivers/usb/class/cdc-acm.h | 3 +--
|
||||
2 files changed, 6 insertions(+), 9 deletions(-)
|
||||
|
||||
diff --git a/drivers/usb/class/cdc-acm.c b/drivers/usb/class/cdc-acm.c
|
||||
index 7f6f3ab5b8a6..8f087499196a 100644
|
||||
--- a/drivers/usb/class/cdc-acm.c
|
||||
+++ b/drivers/usb/class/cdc-acm.c
|
||||
@@ -507,6 +507,7 @@ static void acm_read_bulk_callback(struct urb *urb)
|
||||
"%s - cooling babbling device\n", __func__);
|
||||
usb_mark_last_busy(acm->dev);
|
||||
set_bit(rb->index, &acm->urbs_in_error_delay);
|
||||
+ set_bit(ACM_ERROR_DELAY, &acm->flags);
|
||||
cooldown = true;
|
||||
break;
|
||||
default:
|
||||
@@ -532,7 +533,7 @@ static void acm_read_bulk_callback(struct urb *urb)
|
||||
|
||||
if (stopped || stalled || cooldown) {
|
||||
if (stalled)
|
||||
- schedule_work(&acm->work);
|
||||
+ schedule_delayed_work(&acm->dwork, 0);
|
||||
else if (cooldown)
|
||||
schedule_delayed_work(&acm->dwork, HZ / 2);
|
||||
return;
|
||||
@@ -562,13 +563,13 @@ static void acm_write_bulk(struct urb *urb)
|
||||
acm_write_done(acm, wb);
|
||||
spin_unlock_irqrestore(&acm->write_lock, flags);
|
||||
set_bit(EVENT_TTY_WAKEUP, &acm->flags);
|
||||
- schedule_work(&acm->work);
|
||||
+ schedule_delayed_work(&acm->dwork, 0);
|
||||
}
|
||||
|
||||
static void acm_softint(struct work_struct *work)
|
||||
{
|
||||
int i;
|
||||
- struct acm *acm = container_of(work, struct acm, work);
|
||||
+ struct acm *acm = container_of(work, struct acm, dwork.work);
|
||||
|
||||
if (test_bit(EVENT_RX_STALL, &acm->flags)) {
|
||||
smp_mb(); /* against acm_suspend() */
|
||||
@@ -584,7 +585,7 @@ static void acm_softint(struct work_struct *work)
|
||||
if (test_and_clear_bit(ACM_ERROR_DELAY, &acm->flags)) {
|
||||
for (i = 0; i < acm->rx_buflimit; i++)
|
||||
if (test_and_clear_bit(i, &acm->urbs_in_error_delay))
|
||||
- acm_submit_read_urb(acm, i, GFP_NOIO);
|
||||
+ acm_submit_read_urb(acm, i, GFP_KERNEL);
|
||||
}
|
||||
|
||||
if (test_and_clear_bit(EVENT_TTY_WAKEUP, &acm->flags))
|
||||
@@ -1352,7 +1353,6 @@ static int acm_probe(struct usb_interface *intf,
|
||||
acm->ctrlsize = ctrlsize;
|
||||
acm->readsize = readsize;
|
||||
acm->rx_buflimit = num_rx_buf;
|
||||
- INIT_WORK(&acm->work, acm_softint);
|
||||
INIT_DELAYED_WORK(&acm->dwork, acm_softint);
|
||||
init_waitqueue_head(&acm->wioctl);
|
||||
spin_lock_init(&acm->write_lock);
|
||||
@@ -1562,7 +1562,6 @@ static void acm_disconnect(struct usb_interface *intf)
|
||||
}
|
||||
|
||||
acm_kill_urbs(acm);
|
||||
- cancel_work_sync(&acm->work);
|
||||
cancel_delayed_work_sync(&acm->dwork);
|
||||
|
||||
tty_unregister_device(acm_tty_driver, acm->minor);
|
||||
@@ -1605,7 +1604,6 @@ static int acm_suspend(struct usb_interface *intf, pm_message_t message)
|
||||
return 0;
|
||||
|
||||
acm_kill_urbs(acm);
|
||||
- cancel_work_sync(&acm->work);
|
||||
cancel_delayed_work_sync(&acm->dwork);
|
||||
acm->urbs_in_error_delay = 0;
|
||||
|
||||
diff --git a/drivers/usb/class/cdc-acm.h b/drivers/usb/class/cdc-acm.h
|
||||
index cd5e9d8ab237..b95ff769072e 100644
|
||||
--- a/drivers/usb/class/cdc-acm.h
|
||||
+++ b/drivers/usb/class/cdc-acm.h
|
||||
@@ -112,8 +112,7 @@ struct acm {
|
||||
# define ACM_ERROR_DELAY 3
|
||||
unsigned long urbs_in_error_delay; /* these need to be restarted after a delay */
|
||||
struct usb_cdc_line_coding line; /* bits, stop, parity */
|
||||
- struct work_struct work; /* work queue entry for various purposes*/
|
||||
- struct delayed_work dwork; /* for cool downs needed in error recovery */
|
||||
+ struct delayed_work dwork; /* work queue entry for various purposes */
|
||||
unsigned int ctrlin; /* input control lines (DCD, DSR, RI, break, overruns) */
|
||||
unsigned int ctrlout; /* output control lines (DTR, RTS) */
|
||||
struct async_icount iocount; /* counters for control line changes */
|
||||
--
|
||||
2.28.0
|
||||
|
@@ -1,31 +0,0 @@
|
||||
From 4b9d9159ed5a79ceac5b831012b3cb44cce2516c Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <4b9d9159ed5a79ceac5b831012b3cb44cce2516c.1602360581.git.stefan@agner.ch>
|
||||
In-Reply-To: <d35db3d5f943fea569dde8e83f15565254643385.1602360581.git.stefan@agner.ch>
|
||||
References: <d35db3d5f943fea569dde8e83f15565254643385.1602360581.git.stefan@agner.ch>
|
||||
From: Christian Hewitt <christianshewitt@gmail.com>
|
||||
Date: Sun, 19 Jul 2020 14:10:33 +0000
|
||||
Subject: [PATCH 2/4] 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 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.28.0
|
||||
|
@@ -1,97 +0,0 @@
|
||||
From 81b5af6c3ce3e0f312be0897bec0b3c942e2ce97 Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <81b5af6c3ce3e0f312be0897bec0b3c942e2ce97.1602360581.git.stefan@agner.ch>
|
||||
In-Reply-To: <d35db3d5f943fea569dde8e83f15565254643385.1602360581.git.stefan@agner.ch>
|
||||
References: <d35db3d5f943fea569dde8e83f15565254643385.1602360581.git.stefan@agner.ch>
|
||||
From: Christian Hewitt <christianshewitt@gmail.com>
|
||||
Date: Sun, 19 Jul 2020 14:10:34 +0000
|
||||
Subject: [PATCH 3/4] 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.
|
||||
|
||||
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>
|
||||
---
|
||||
arch/arm64/boot/dts/amlogic/Makefile | 1 +
|
||||
.../dts/amlogic/meson-g12b-odroid-n2-plus.dts | 53 +++++++++++++++++++
|
||||
2 files changed, 54 insertions(+)
|
||||
create mode 100644 arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2-plus.dts
|
||||
|
||||
diff --git a/arch/arm64/boot/dts/amlogic/Makefile b/arch/arm64/boot/dts/amlogic/Makefile
|
||||
index 4e2239ffcaa5..b0b3d6791499 100644
|
||||
--- a/arch/arm64/boot/dts/amlogic/Makefile
|
||||
+++ b/arch/arm64/boot/dts/amlogic/Makefile
|
||||
@@ -8,6 +8,7 @@ dtb-$(CONFIG_ARCH_MESON) += meson-g12b-gtking-pro.dtb
|
||||
dtb-$(CONFIG_ARCH_MESON) += meson-g12b-a311d-khadas-vim3.dtb
|
||||
dtb-$(CONFIG_ARCH_MESON) += meson-g12b-s922x-khadas-vim3.dtb
|
||||
dtb-$(CONFIG_ARCH_MESON) += meson-g12b-odroid-n2.dtb
|
||||
+dtb-$(CONFIG_ARCH_MESON) += meson-g12b-odroid-n2-plus.dtb
|
||||
dtb-$(CONFIG_ARCH_MESON) += meson-g12b-ugoos-am6.dtb
|
||||
dtb-$(CONFIG_ARCH_MESON) += meson-gxbb-kii-pro.dtb
|
||||
dtb-$(CONFIG_ARCH_MESON) += meson-gxbb-nanopi-k2.dtb
|
||||
diff --git a/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2-plus.dts b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2-plus.dts
|
||||
new file mode 100644
|
||||
index 000000000000..4ebb448d233f
|
||||
--- /dev/null
|
||||
+++ b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2-plus.dts
|
||||
@@ -0,0 +1,53 @@
|
||||
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
|
||||
+/*
|
||||
+ * Copyright (c) 2019 BayLibre, SAS
|
||||
+ * Author: Neil Armstrong <narmstrong@baylibre.com>
|
||||
+ */
|
||||
+
|
||||
+/dts-v1/;
|
||||
+
|
||||
+#include "meson-g12b-odroid-n2.dtsi"
|
||||
+
|
||||
+/ {
|
||||
+ compatible = "hardkernel,odroid-n2-plus", "amlogic,s922x", "amlogic,g12b";
|
||||
+ model = "Hardkernel ODROID-N2+";
|
||||
+};
|
||||
+
|
||||
+&vddcpu_a {
|
||||
+ regulator-min-microvolt = <680000>;
|
||||
+ regulator-max-microvolt = <1040000>;
|
||||
+
|
||||
+ pwms = <&pwm_ab 0 1500 0>;
|
||||
+};
|
||||
+
|
||||
+&vddcpu_b {
|
||||
+ regulator-min-microvolt = <680000>;
|
||||
+ regulator-max-microvolt = <1040000>;
|
||||
+
|
||||
+ 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.28.0
|
||||
|
@@ -1,38 +0,0 @@
|
||||
From 6a7c42785788faa862aeb7902cb2b3b08f033ca0 Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <6a7c42785788faa862aeb7902cb2b3b08f033ca0.1602360581.git.stefan@agner.ch>
|
||||
In-Reply-To: <d35db3d5f943fea569dde8e83f15565254643385.1602360581.git.stefan@agner.ch>
|
||||
References: <d35db3d5f943fea569dde8e83f15565254643385.1602360581.git.stefan@agner.ch>
|
||||
From: Stefan Agner <stefan@agner.ch>
|
||||
Date: Thu, 27 Aug 2020 23:29:57 +0200
|
||||
Subject: [PATCH 4/4] 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 9803d44bb157..9a6722a1dc19 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
|
||||
|
@@ -0,0 +1,53 @@
|
||||
From cdfb8eea4103e537898073dc3f7bf8f75cec5efb Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <cdfb8eea4103e537898073dc3f7bf8f75cec5efb.1619725559.git.stefan@agner.ch>
|
||||
From: Christian Hewitt <christianshewitt@gmail.com>
|
||||
Date: Mon, 11 Jan 2021 13:58:31 +0000
|
||||
Subject: [PATCH 1/8] arm64: dts: meson: add i2c3/rtc nodes and rtc aliases to
|
||||
ODROID-N2 dtsi
|
||||
|
||||
Enable the onboard pcf8563 rtc hardware on ODROID N2/N2+ boards via the
|
||||
common dtsi. Also add aliases to ensure vrtc does not claim /dev/rtc0.
|
||||
|
||||
Signed-off-by: Christian Hewitt <christianshewitt@gmail.com>
|
||||
Reviewed-by: Neil Armstrong <narmstrong@baylibre.com>
|
||||
Signed-off-by: Kevin Hilman <khilman@baylibre.com>
|
||||
Link: https://lore.kernel.org/r/20210111135831.2218-1-christianshewitt@gmail.com
|
||||
---
|
||||
.../boot/dts/amlogic/meson-g12b-odroid-n2.dtsi | 14 ++++++++++++++
|
||||
1 file changed, 14 insertions(+)
|
||||
|
||||
diff --git a/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi
|
||||
index 39a09661c5f6..b78be3e6974d 100644
|
||||
--- a/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi
|
||||
+++ b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi
|
||||
@@ -13,6 +13,8 @@ / {
|
||||
aliases {
|
||||
serial0 = &uart_AO;
|
||||
ethernet0 = ðmac;
|
||||
+ rtc0 = &rtc;
|
||||
+ rtc1 = &vrtc;
|
||||
};
|
||||
|
||||
dioo2133: audio-amplifier-0 {
|
||||
@@ -478,6 +480,18 @@ &ir {
|
||||
linux,rc-map-name = "rc-odroid";
|
||||
};
|
||||
|
||||
+&i2c3 {
|
||||
+ status = "okay";
|
||||
+ pinctrl-0 = <&i2c3_sda_a_pins>, <&i2c3_sck_a_pins>;
|
||||
+ pinctrl-names = "default";
|
||||
+
|
||||
+ rtc: rtc@51 {
|
||||
+ compatible = "nxp,pcf8563";
|
||||
+ reg = <0x51>;
|
||||
+ wakeup-source;
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
&pwm_ab {
|
||||
pinctrl-0 = <&pwm_a_e_pins>;
|
||||
pinctrl-names = "default";
|
||||
--
|
||||
2.31.1
|
||||
|
@@ -0,0 +1,37 @@
|
||||
From 8b2ab165b2ed529f74b242159648893d53272c24 Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <8b2ab165b2ed529f74b242159648893d53272c24.1619725559.git.stefan@agner.ch>
|
||||
In-Reply-To: <cdfb8eea4103e537898073dc3f7bf8f75cec5efb.1619725559.git.stefan@agner.ch>
|
||||
References: <cdfb8eea4103e537898073dc3f7bf8f75cec5efb.1619725559.git.stefan@agner.ch>
|
||||
From: Hyeonki Hong <hhk7734@gmail.com>
|
||||
Date: Wed, 7 Apr 2021 04:26:08 +0000
|
||||
Subject: [PATCH 2/8] arm64: dts: meson: add saradc node to ODROID N2/N2+
|
||||
|
||||
Add the meson saradc node to the ODROID N2/N2+ common dtsi.
|
||||
|
||||
Signed-off-by: Hyeonki Hong <hhk7734@gmail.com>
|
||||
Signed-off-by: Christian Hewitt <christianshewitt@gmail.com>
|
||||
Signed-off-by: Kevin Hilman <khilman@baylibre.com>
|
||||
Link: https://lore.kernel.org/r/20210407042609.9736-3-christianshewitt@gmail.com
|
||||
---
|
||||
arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi | 5 +++++
|
||||
1 file changed, 5 insertions(+)
|
||||
|
||||
diff --git a/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi
|
||||
index b78be3e6974d..8a5e132c4b79 100644
|
||||
--- a/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi
|
||||
+++ b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi
|
||||
@@ -508,6 +508,11 @@ &pwm_AO_cd {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
+&saradc {
|
||||
+ status = "okay";
|
||||
+ vref-supply = <&vddao_1v8>;
|
||||
+};
|
||||
+
|
||||
/* SD card */
|
||||
&sd_emmc_b {
|
||||
status = "okay";
|
||||
--
|
||||
2.31.1
|
||||
|
@@ -0,0 +1,78 @@
|
||||
From 602012d9081be7a54d2d6cee59035ae019dd3bb4 Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <602012d9081be7a54d2d6cee59035ae019dd3bb4.1619725559.git.stefan@agner.ch>
|
||||
In-Reply-To: <cdfb8eea4103e537898073dc3f7bf8f75cec5efb.1619725559.git.stefan@agner.ch>
|
||||
References: <cdfb8eea4103e537898073dc3f7bf8f75cec5efb.1619725559.git.stefan@agner.ch>
|
||||
From: Hyeonki Hong <hhk7734@gmail.com>
|
||||
Date: Wed, 7 Apr 2021 04:26:09 +0000
|
||||
Subject: [PATCH 3/8] arm64: dts: meson: add GPIO line names to ODROID N2/N2+
|
||||
|
||||
Add GPIO line-name identifiers to the ODROID N2/N2+ common dtsi.
|
||||
|
||||
Signed-off-by: Hyeonki Hong <hhk7734@gmail.com>
|
||||
Signed-off-by: Christian Hewitt <christianshewitt@gmail.com>
|
||||
Reviewed-by: Neil Armstrong <narmstrong@baylibre.com>
|
||||
Signed-off-by: Kevin Hilman <khilman@baylibre.com>
|
||||
Link: https://lore.kernel.org/r/20210407042609.9736-4-christianshewitt@gmail.com
|
||||
---
|
||||
.../dts/amlogic/meson-g12b-odroid-n2.dtsi | 45 +++++++++++++++++++
|
||||
1 file changed, 45 insertions(+)
|
||||
|
||||
diff --git a/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi
|
||||
index 8a5e132c4b79..41b2f9c96b5f 100644
|
||||
--- a/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi
|
||||
+++ b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi
|
||||
@@ -446,6 +446,51 @@ &frddr_c {
|
||||
};
|
||||
|
||||
&gpio {
|
||||
+ gpio-line-names =
|
||||
+ /* GPIOZ */
|
||||
+ "", "", "", "", "", "", "", "",
|
||||
+ "", "", "", "", "", "", "", "",
|
||||
+ /* GPIOH */
|
||||
+ "", "", "", "", "", "", "", "",
|
||||
+ "",
|
||||
+ /* BOOT */
|
||||
+ "", "", "", "", "", "", "", "",
|
||||
+ "", "", "", "", "", "", "", "",
|
||||
+ /* GPIOC */
|
||||
+ "", "", "", "", "", "", "", "",
|
||||
+ /* GPIOA */
|
||||
+ "PIN_44", /* GPIOA_0 */
|
||||
+ "PIN_46", /* GPIOA_1 */
|
||||
+ "PIN_45", /* GPIOA_2 */
|
||||
+ "PIN_47", /* GPIOA_3 */
|
||||
+ "PIN_26", /* GPIOA_4 */
|
||||
+ "", "", "", "", "", "",
|
||||
+ "PIN_42", /* GPIOA_11 */
|
||||
+ "PIN_32", /* GPIOA_12 */
|
||||
+ "PIN_7", /* GPIOA_13 */
|
||||
+ "PIN_27", /* GPIOA_14 */
|
||||
+ "PIN_28", /* GPIOA_15 */
|
||||
+ /* GPIOX */
|
||||
+ "PIN_16", /* GPIOX_0 */
|
||||
+ "PIN_18", /* GPIOX_1 */
|
||||
+ "PIN_22", /* GPIOX_2 */
|
||||
+ "PIN_11", /* GPIOX_3 */
|
||||
+ "PIN_13", /* GPIOX_4 */
|
||||
+ "PIN_33", /* GPIOX_5 */
|
||||
+ "PIN_35", /* GPIOX_6 */
|
||||
+ "PIN_15", /* GPIOX_7 */
|
||||
+ "PIN_19", /* GPIOX_8 */
|
||||
+ "PIN_21", /* GPIOX_9 */
|
||||
+ "PIN_24", /* GPIOX_10 */
|
||||
+ "PIN_23", /* GPIOX_11 */
|
||||
+ "PIN_8", /* GPIOX_12 */
|
||||
+ "PIN_10", /* GPIOX_13 */
|
||||
+ "PIN_29", /* GPIOX_14 */
|
||||
+ "PIN_31", /* GPIOX_15 */
|
||||
+ "PIN_12", /* GPIOX_16 */
|
||||
+ "PIN_3", /* GPIOX_17 */
|
||||
+ "PIN_5", /* GPIOX_18 */
|
||||
+ "PIN_36"; /* GPIOX_19 */
|
||||
/*
|
||||
* WARNING: The USB Hub on the Odroid-N2 needs a reset signal
|
||||
* to be turned high in order to be detected by the USB Controller
|
||||
--
|
||||
2.31.1
|
||||
|
@@ -0,0 +1,42 @@
|
||||
From 0a70fbc9a556737d3f70a1a194ba7be280b007c5 Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <0a70fbc9a556737d3f70a1a194ba7be280b007c5.1619725559.git.stefan@agner.ch>
|
||||
In-Reply-To: <cdfb8eea4103e537898073dc3f7bf8f75cec5efb.1619725559.git.stefan@agner.ch>
|
||||
References: <cdfb8eea4103e537898073dc3f7bf8f75cec5efb.1619725559.git.stefan@agner.ch>
|
||||
From: Stefan Agner <stefan@agner.ch>
|
||||
Date: Mon, 11 Jan 2021 11:20:48 +0100
|
||||
Subject: [PATCH 4/8] arm64: dts: meson: g12b: add power button support
|
||||
|
||||
Add power button support on J2 pin 11 (GPIOX_3 on the SoC side). The
|
||||
GPIO is low active, e.g. when connecting with pin 9 (GND) a power
|
||||
button press is triggered.
|
||||
|
||||
Signed-off-by: Stefan Agner <stefan@agner.ch>
|
||||
---
|
||||
arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi | 11 +++++++++++
|
||||
1 file changed, 11 insertions(+)
|
||||
|
||||
diff --git a/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi
|
||||
index 41b2f9c96b5f..4b6bb7e74e25 100644
|
||||
--- a/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi
|
||||
+++ b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi
|
||||
@@ -39,6 +39,17 @@ emmc_pwrseq: emmc-pwrseq {
|
||||
reset-gpios = <&gpio BOOT_12 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
|
||||
+ gpio-keys-polled {
|
||||
+ compatible = "gpio-keys-polled";
|
||||
+ poll-interval = <100>;
|
||||
+
|
||||
+ power-button {
|
||||
+ label = "power";
|
||||
+ linux,code = <KEY_POWER>;
|
||||
+ gpios = <&gpio GPIOX_3 GPIO_ACTIVE_LOW>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
leds {
|
||||
compatible = "gpio-leds";
|
||||
|
||||
--
|
||||
2.31.1
|
||||
|
@@ -0,0 +1,42 @@
|
||||
From 8a4a640d1b8dea977795de3f49b6ea3a791e401a Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <8a4a640d1b8dea977795de3f49b6ea3a791e401a.1619725559.git.stefan@agner.ch>
|
||||
In-Reply-To: <cdfb8eea4103e537898073dc3f7bf8f75cec5efb.1619725559.git.stefan@agner.ch>
|
||||
References: <cdfb8eea4103e537898073dc3f7bf8f75cec5efb.1619725559.git.stefan@agner.ch>
|
||||
From: Stefan Agner <stefan@agner.ch>
|
||||
Date: Mon, 11 Jan 2021 11:38:54 +0100
|
||||
Subject: [PATCH 5/8] arm64: dts: meson: g12b: add GPIO fan support
|
||||
|
||||
Add simple GPIO fan node to support a fan on GPIO J8. Unfortunately the
|
||||
pad used to control the fan does not support real PWM, hence the RPM
|
||||
cannot be modulated.
|
||||
|
||||
Signed-off-by: Stefan Agner <stefan@agner.ch>
|
||||
---
|
||||
arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi | 11 +++++++++++
|
||||
1 file changed, 11 insertions(+)
|
||||
|
||||
diff --git a/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi
|
||||
index 4b6bb7e74e25..e8a3ede698b5 100644
|
||||
--- a/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi
|
||||
+++ b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi
|
||||
@@ -39,6 +39,17 @@ emmc_pwrseq: emmc-pwrseq {
|
||||
reset-gpios = <&gpio BOOT_12 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
|
||||
+ /*
|
||||
+ * 5V 80x80x10.8mm cooling fan from Hardkernel shop.
|
||||
+ */
|
||||
+ fan0: gpio-fan {
|
||||
+ #cooling-cells = <2>;
|
||||
+ compatible = "gpio-fan";
|
||||
+ gpio-fan,speed-map = <0 0 1600 1>;
|
||||
+ gpios = <&gpio_ao GPIOAO_10 GPIO_ACTIVE_HIGH>;
|
||||
+ status = "okay";
|
||||
+ };
|
||||
+
|
||||
gpio-keys-polled {
|
||||
compatible = "gpio-keys-polled";
|
||||
poll-interval = <100>;
|
||||
--
|
||||
2.31.1
|
||||
|
@@ -0,0 +1,74 @@
|
||||
From eee30c74e72b6092b5e30c4744a4f1d7d9526403 Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <eee30c74e72b6092b5e30c4744a4f1d7d9526403.1619725559.git.stefan@agner.ch>
|
||||
In-Reply-To: <cdfb8eea4103e537898073dc3f7bf8f75cec5efb.1619725559.git.stefan@agner.ch>
|
||||
References: <cdfb8eea4103e537898073dc3f7bf8f75cec5efb.1619725559.git.stefan@agner.ch>
|
||||
From: Stefan Agner <stefan@agner.ch>
|
||||
Date: Mon, 11 Jan 2021 15:53:55 +0100
|
||||
Subject: [PATCH 6/8] arm64: dts: meson: g12b: odroid-n2: add fan as cooling
|
||||
device
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Add the GPIO fan as a cooling device for the CPU thermal zone. Since we
|
||||
have only full fan speed available with this, set the tripping point to
|
||||
65°C which is the highest tripping point which Hardkernel used in their
|
||||
downstream kernel.
|
||||
|
||||
Signed-off-by: Stefan Agner <stefan@agner.ch>
|
||||
---
|
||||
.../dts/amlogic/meson-g12b-odroid-n2.dtsi | 38 +++++++++++++++++++
|
||||
1 file changed, 38 insertions(+)
|
||||
|
||||
diff --git a/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi
|
||||
index e8a3ede698b5..dd345c6aa4b5 100644
|
||||
--- a/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi
|
||||
+++ b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi
|
||||
@@ -388,6 +388,44 @@ &clkc_audio {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
+&cpu_thermal {
|
||||
+ trips {
|
||||
+ cpu_warm: cpu_warm {
|
||||
+ hysteresis = <5000>;
|
||||
+ temperature = <65000>;
|
||||
+ type = "active";
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ cooling-maps {
|
||||
+ map0 {
|
||||
+ cooling-device =
|
||||
+ <&fan0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
|
||||
+ trip = <&cpu_warm>;
|
||||
+ };
|
||||
+ map1 {
|
||||
+ trip = <&cpu_passive>;
|
||||
+ cooling-device = <&cpu0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
|
||||
+ <&cpu1 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
|
||||
+ <&cpu100 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
|
||||
+ <&cpu101 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
|
||||
+ <&cpu102 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
|
||||
+ <&cpu103 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
|
||||
+ <&fan0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
|
||||
+ };
|
||||
+ map2 {
|
||||
+ trip = <&cpu_hot>;
|
||||
+ cooling-device = <&cpu0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
|
||||
+ <&cpu1 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
|
||||
+ <&cpu100 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
|
||||
+ <&cpu101 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
|
||||
+ <&cpu102 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
|
||||
+ <&cpu103 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
|
||||
+ <&fan0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
|
||||
+ };
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
&cpu0 {
|
||||
cpu-supply = <&vddcpu_b>;
|
||||
operating-points-v2 = <&cpu_opp_table_0>;
|
||||
--
|
||||
2.31.1
|
||||
|
@@ -0,0 +1,44 @@
|
||||
From b10ae8fd3bef195eda4a30bc5f3995ca13b6cffd Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <b10ae8fd3bef195eda4a30bc5f3995ca13b6cffd.1619725559.git.stefan@agner.ch>
|
||||
In-Reply-To: <cdfb8eea4103e537898073dc3f7bf8f75cec5efb.1619725559.git.stefan@agner.ch>
|
||||
References: <cdfb8eea4103e537898073dc3f7bf8f75cec5efb.1619725559.git.stefan@agner.ch>
|
||||
From: Hyeonki Hong <hhk7734@gmail.com>
|
||||
Date: Fri, 27 Mar 2020 17:05:22 +0900
|
||||
Subject: [PATCH 7/8] arm64: dts: meson: add uart_A node
|
||||
|
||||
The UART_A is available through J3 pin 8/10 and documented to be
|
||||
available as UART by default.
|
||||
|
||||
Signed-off-by: Stefan Agner <stefan@agner.ch>
|
||||
---
|
||||
arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi | 7 +++++++
|
||||
1 file changed, 7 insertions(+)
|
||||
|
||||
diff --git a/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi
|
||||
index dd345c6aa4b5..cec346178e3d 100644
|
||||
--- a/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi
|
||||
+++ b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi
|
||||
@@ -12,6 +12,7 @@
|
||||
/ {
|
||||
aliases {
|
||||
serial0 = &uart_AO;
|
||||
+ serial1 = &uart_A;
|
||||
ethernet0 = ðmac;
|
||||
rtc0 = &rtc;
|
||||
rtc1 = &vrtc;
|
||||
@@ -728,6 +729,12 @@ &toddr_c {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
+&uart_A {
|
||||
+ status = "okay";
|
||||
+ pinctrl-0 = <&uart_a_pins>;
|
||||
+ pinctrl-names = "default";
|
||||
+};
|
||||
+
|
||||
&uart_AO {
|
||||
status = "okay";
|
||||
pinctrl-0 = <&uart_ao_a_pins>;
|
||||
--
|
||||
2.31.1
|
||||
|
@@ -0,0 +1,37 @@
|
||||
From aea42d4a9a307438bf7099aee38daedac2bd5044 Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <aea42d4a9a307438bf7099aee38daedac2bd5044.1619725559.git.stefan@agner.ch>
|
||||
In-Reply-To: <cdfb8eea4103e537898073dc3f7bf8f75cec5efb.1619725559.git.stefan@agner.ch>
|
||||
References: <cdfb8eea4103e537898073dc3f7bf8f75cec5efb.1619725559.git.stefan@agner.ch>
|
||||
From: Stefan Agner <stefan@agner.ch>
|
||||
Date: Thu, 29 Apr 2021 21:32:43 +0200
|
||||
Subject: [PATCH 8/8] arm64: dts: meson: add i2c2 node to ODROID N2/N2+
|
||||
|
||||
The J2 connectors pinout documents "I2C.SDA0/SCL0" on pin 3 and 5, which
|
||||
are connected to GPIOX_17/18. This GPIO allow to mux I2C to the second
|
||||
I2C instance. Enable i2c2 and use the appropriate pinmux.
|
||||
|
||||
Signed-off-by: Stefan Agner <stefan@agner.ch>
|
||||
---
|
||||
arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi | 6 ++++++
|
||||
1 file changed, 6 insertions(+)
|
||||
|
||||
diff --git a/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi
|
||||
index cec346178e3d..f1c3356c78a0 100644
|
||||
--- a/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi
|
||||
+++ b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi
|
||||
@@ -586,6 +586,12 @@ &ir {
|
||||
linux,rc-map-name = "rc-odroid";
|
||||
};
|
||||
|
||||
+&i2c2 {
|
||||
+ status = "okay";
|
||||
+ pinctrl-0 = <&i2c2_sda_x_pins>, <&i2c2_sck_x_pins>;
|
||||
+ pinctrl-names = "default";
|
||||
+};
|
||||
+
|
||||
&i2c3 {
|
||||
status = "okay";
|
||||
pinctrl-0 = <&i2c3_sda_a_pins>, <&i2c3_sck_a_pins>;
|
||||
--
|
||||
2.31.1
|
||||
|
@@ -1,30 +1,33 @@
|
||||
From d35db3d5f943fea569dde8e83f15565254643385 Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <d35db3d5f943fea569dde8e83f15565254643385.1602360581.git.stefan@agner.ch>
|
||||
From 0955f7e64f302c5c331b90fd07fc48dfb677eab5 Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <0955f7e64f302c5c331b90fd07fc48dfb677eab5.1622055679.git.stefan@agner.ch>
|
||||
From: Christian Hewitt <christianshewitt@gmail.com>
|
||||
Date: Sun, 19 Jul 2020 14:10:32 +0000
|
||||
Subject: [PATCH 1/4] arm64: dts: meson: convert ODROID-N2 to dtsi
|
||||
Date: Tue, 15 Sep 2020 17:24:30 +0200
|
||||
Subject: [PATCH 01/11] 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
|
||||
(cherry picked from commit ef599f5f3e10bf1979d8ece29fd7fa511fedd59d)
|
||||
---
|
||||
.../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>
|
||||
@@ -650,17 +653,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>
|
||||
@@ -1065,7 +1067,7 @@ index 000000000000..e5bc132ce7d5
|
||||
+
|
||||
+&ext_mdio {
|
||||
+ external_phy: ethernet-phy@0 {
|
||||
+ /* Realtek RTL8211F (0x001cc916) */
|
||||
+ /* Realtek RTL8211F (0x001cc916) */
|
||||
+ reg = <0>;
|
||||
+ max-speed = <1000>;
|
||||
+
|
||||
@@ -1281,5 +1283,5 @@ index 000000000000..e5bc132ce7d5
|
||||
+ phy-supply = <&hub_5v>;
|
||||
+};
|
||||
--
|
||||
2.28.0
|
||||
2.31.1
|
||||
|
@@ -0,0 +1,38 @@
|
||||
From a189f6229a9462ae2fc406b1e45286d2eea32b40 Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <a189f6229a9462ae2fc406b1e45286d2eea32b40.1622055679.git.stefan@agner.ch>
|
||||
In-Reply-To: <0955f7e64f302c5c331b90fd07fc48dfb677eab5.1622055679.git.stefan@agner.ch>
|
||||
References: <0955f7e64f302c5c331b90fd07fc48dfb677eab5.1622055679.git.stefan@agner.ch>
|
||||
From: Christian Hewitt <christianshewitt@gmail.com>
|
||||
Date: Tue, 15 Sep 2020 17:24:31 +0200
|
||||
Subject: [PATCH 02/11] dt-bindings: arm: amlogic: add support for the
|
||||
ODROID-N2+
|
||||
|
||||
HardKernel ODROID-N2+ uses a revised Amlogic S922X v2 chip that supports
|
||||
higher cpu clock speeds than the original ODROID-N2.
|
||||
|
||||
Signed-off-by: Christian Hewitt <christianshewitt@gmail.com>
|
||||
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
|
||||
Signed-off-by: Kevin Hilman <khilman@baylibre.com>
|
||||
Acked-by: Rob Herring <robh@kernel.org>
|
||||
Acked-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
|
||||
Link: https://lore.kernel.org/r/20200915152432.30616-3-narmstrong@baylibre.com
|
||||
(cherry picked from commit 88ba71cdc5497390350c87e68ce35688e88be3e8)
|
||||
---
|
||||
Documentation/devicetree/bindings/arm/amlogic.yaml | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/Documentation/devicetree/bindings/arm/amlogic.yaml b/Documentation/devicetree/bindings/arm/amlogic.yaml
|
||||
index 5eba9f48823e..12ba8d074370 100644
|
||||
--- a/Documentation/devicetree/bindings/arm/amlogic.yaml
|
||||
+++ b/Documentation/devicetree/bindings/arm/amlogic.yaml
|
||||
@@ -153,6 +153,7 @@ properties:
|
||||
- azw,gtking
|
||||
- azw,gtking-pro
|
||||
- hardkernel,odroid-n2
|
||||
+ - hardkernel,odroid-n2-plus
|
||||
- khadas,vim3
|
||||
- ugoos,am6
|
||||
- const: amlogic,s922x
|
||||
--
|
||||
2.31.1
|
||||
|
@@ -0,0 +1,79 @@
|
||||
From 2f09401241a0f2348d3e30617e89a00c1dc45895 Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <2f09401241a0f2348d3e30617e89a00c1dc45895.1622055679.git.stefan@agner.ch>
|
||||
In-Reply-To: <0955f7e64f302c5c331b90fd07fc48dfb677eab5.1622055679.git.stefan@agner.ch>
|
||||
References: <0955f7e64f302c5c331b90fd07fc48dfb677eab5.1622055679.git.stefan@agner.ch>
|
||||
From: Christian Hewitt <christianshewitt@gmail.com>
|
||||
Date: Tue, 15 Sep 2020 17:24:32 +0200
|
||||
Subject: [PATCH 03/11] arm64: dts: meson: add support for the ODROID-N2+
|
||||
|
||||
HardKernel ODROID-N2+ uses an Amlogic S922X rev. C chip capable of higher
|
||||
clock speeds than the original ODROID-N2.
|
||||
|
||||
The rev. C support a slighly higher VDDCPU_A & VDDCPU_B voltages and supports
|
||||
the same OPPs as the Amlogic A311D SoC from the same G12B family.
|
||||
|
||||
Suggested-by: Dongjin Kim <tobetter@hardkernel.com>
|
||||
Signed-off-by: Christian Hewitt <christianshewitt@gmail.com>
|
||||
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
|
||||
Signed-off-by: Kevin Hilman <khilman@baylibre.com>
|
||||
Acked-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
|
||||
Link: https://lore.kernel.org/r/20200915152432.30616-4-narmstrong@baylibre.com
|
||||
(cherry picked from commit 98d24896ee117b1f0969405476c943e9307e30d4)
|
||||
---
|
||||
arch/arm64/boot/dts/amlogic/Makefile | 1 +
|
||||
.../dts/amlogic/meson-g12b-odroid-n2-plus.dts | 31 +++++++++++++++++++
|
||||
2 files changed, 32 insertions(+)
|
||||
create mode 100644 arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2-plus.dts
|
||||
|
||||
diff --git a/arch/arm64/boot/dts/amlogic/Makefile b/arch/arm64/boot/dts/amlogic/Makefile
|
||||
index 4e2239ffcaa5..b0b3d6791499 100644
|
||||
--- a/arch/arm64/boot/dts/amlogic/Makefile
|
||||
+++ b/arch/arm64/boot/dts/amlogic/Makefile
|
||||
@@ -8,6 +8,7 @@ dtb-$(CONFIG_ARCH_MESON) += meson-g12b-gtking-pro.dtb
|
||||
dtb-$(CONFIG_ARCH_MESON) += meson-g12b-a311d-khadas-vim3.dtb
|
||||
dtb-$(CONFIG_ARCH_MESON) += meson-g12b-s922x-khadas-vim3.dtb
|
||||
dtb-$(CONFIG_ARCH_MESON) += meson-g12b-odroid-n2.dtb
|
||||
+dtb-$(CONFIG_ARCH_MESON) += meson-g12b-odroid-n2-plus.dtb
|
||||
dtb-$(CONFIG_ARCH_MESON) += meson-g12b-ugoos-am6.dtb
|
||||
dtb-$(CONFIG_ARCH_MESON) += meson-gxbb-kii-pro.dtb
|
||||
dtb-$(CONFIG_ARCH_MESON) += meson-gxbb-nanopi-k2.dtb
|
||||
diff --git a/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2-plus.dts b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2-plus.dts
|
||||
new file mode 100644
|
||||
index 000000000000..5de2815ba99d
|
||||
--- /dev/null
|
||||
+++ b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2-plus.dts
|
||||
@@ -0,0 +1,31 @@
|
||||
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
|
||||
+/*
|
||||
+ * Copyright (c) 2019 BayLibre, SAS
|
||||
+ * Author: Neil Armstrong <narmstrong@baylibre.com>
|
||||
+ */
|
||||
+
|
||||
+/dts-v1/;
|
||||
+
|
||||
+/* The Amlogic S922X Rev. C supports the same OPPs as the A311D variant */
|
||||
+#include "meson-g12b-a311d.dtsi"
|
||||
+#include "meson-g12b-odroid-n2.dtsi"
|
||||
+
|
||||
+/ {
|
||||
+ compatible = "hardkernel,odroid-n2-plus", "amlogic,s922x", "amlogic,g12b";
|
||||
+ model = "Hardkernel ODROID-N2Plus";
|
||||
+};
|
||||
+
|
||||
+&vddcpu_a {
|
||||
+ regulator-min-microvolt = <680000>;
|
||||
+ regulator-max-microvolt = <1040000>;
|
||||
+
|
||||
+ pwms = <&pwm_AO_cd 1 1500 0>;
|
||||
+};
|
||||
+
|
||||
+&vddcpu_b {
|
||||
+ regulator-min-microvolt = <680000>;
|
||||
+ regulator-max-microvolt = <1040000>;
|
||||
+
|
||||
+ pwms = <&pwm_AO_cd 1 1500 0>;
|
||||
+};
|
||||
+
|
||||
--
|
||||
2.31.1
|
||||
|
@@ -0,0 +1,55 @@
|
||||
From 7dba042e7863dc61ec74c0759493264e48d32df2 Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <7dba042e7863dc61ec74c0759493264e48d32df2.1622055679.git.stefan@agner.ch>
|
||||
In-Reply-To: <0955f7e64f302c5c331b90fd07fc48dfb677eab5.1622055679.git.stefan@agner.ch>
|
||||
References: <0955f7e64f302c5c331b90fd07fc48dfb677eab5.1622055679.git.stefan@agner.ch>
|
||||
From: Christian Hewitt <christianshewitt@gmail.com>
|
||||
Date: Mon, 11 Jan 2021 13:58:31 +0000
|
||||
Subject: [PATCH 04/11] arm64: dts: meson: add i2c3/rtc nodes and rtc aliases
|
||||
to ODROID-N2 dtsi
|
||||
|
||||
Enable the onboard pcf8563 rtc hardware on ODROID N2/N2+ boards via the
|
||||
common dtsi. Also add aliases to ensure vrtc does not claim /dev/rtc0.
|
||||
|
||||
Signed-off-by: Christian Hewitt <christianshewitt@gmail.com>
|
||||
Reviewed-by: Neil Armstrong <narmstrong@baylibre.com>
|
||||
Signed-off-by: Kevin Hilman <khilman@baylibre.com>
|
||||
Link: https://lore.kernel.org/r/20210111135831.2218-1-christianshewitt@gmail.com
|
||||
---
|
||||
.../boot/dts/amlogic/meson-g12b-odroid-n2.dtsi | 14 ++++++++++++++
|
||||
1 file changed, 14 insertions(+)
|
||||
|
||||
diff --git a/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi
|
||||
index 6982632ae646..5927c4493f5a 100644
|
||||
--- a/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi
|
||||
+++ b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi
|
||||
@@ -13,6 +13,8 @@ / {
|
||||
aliases {
|
||||
serial0 = &uart_AO;
|
||||
ethernet0 = ðmac;
|
||||
+ rtc0 = &rtc;
|
||||
+ rtc1 = &vrtc;
|
||||
};
|
||||
|
||||
dioo2133: audio-amplifier-0 {
|
||||
@@ -478,6 +480,18 @@ &ir {
|
||||
linux,rc-map-name = "rc-odroid";
|
||||
};
|
||||
|
||||
+&i2c3 {
|
||||
+ status = "okay";
|
||||
+ pinctrl-0 = <&i2c3_sda_a_pins>, <&i2c3_sck_a_pins>;
|
||||
+ pinctrl-names = "default";
|
||||
+
|
||||
+ rtc: rtc@51 {
|
||||
+ compatible = "nxp,pcf8563";
|
||||
+ reg = <0x51>;
|
||||
+ wakeup-source;
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
&pwm_ab {
|
||||
pinctrl-0 = <&pwm_a_e_pins>;
|
||||
pinctrl-names = "default";
|
||||
--
|
||||
2.31.1
|
||||
|
@@ -0,0 +1,37 @@
|
||||
From 3f2aecc668b172e0c91bf1bfdc78ee18a6bb6645 Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <3f2aecc668b172e0c91bf1bfdc78ee18a6bb6645.1622055679.git.stefan@agner.ch>
|
||||
In-Reply-To: <0955f7e64f302c5c331b90fd07fc48dfb677eab5.1622055679.git.stefan@agner.ch>
|
||||
References: <0955f7e64f302c5c331b90fd07fc48dfb677eab5.1622055679.git.stefan@agner.ch>
|
||||
From: Hyeonki Hong <hhk7734@gmail.com>
|
||||
Date: Wed, 7 Apr 2021 04:26:08 +0000
|
||||
Subject: [PATCH 05/11] arm64: dts: meson: add saradc node to ODROID N2/N2+
|
||||
|
||||
Add the meson saradc node to the ODROID N2/N2+ common dtsi.
|
||||
|
||||
Signed-off-by: Hyeonki Hong <hhk7734@gmail.com>
|
||||
Signed-off-by: Christian Hewitt <christianshewitt@gmail.com>
|
||||
Signed-off-by: Kevin Hilman <khilman@baylibre.com>
|
||||
Link: https://lore.kernel.org/r/20210407042609.9736-3-christianshewitt@gmail.com
|
||||
---
|
||||
arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi | 5 +++++
|
||||
1 file changed, 5 insertions(+)
|
||||
|
||||
diff --git a/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi
|
||||
index 5927c4493f5a..194a437b4e3f 100644
|
||||
--- a/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi
|
||||
+++ b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi
|
||||
@@ -508,6 +508,11 @@ &pwm_AO_cd {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
+&saradc {
|
||||
+ status = "okay";
|
||||
+ vref-supply = <&vddao_1v8>;
|
||||
+};
|
||||
+
|
||||
/* SD card */
|
||||
&sd_emmc_b {
|
||||
status = "okay";
|
||||
--
|
||||
2.31.1
|
||||
|
@@ -0,0 +1,78 @@
|
||||
From d13c62fab2c91cacda74a9001ea6a6c7d8a9af39 Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <d13c62fab2c91cacda74a9001ea6a6c7d8a9af39.1622055679.git.stefan@agner.ch>
|
||||
In-Reply-To: <0955f7e64f302c5c331b90fd07fc48dfb677eab5.1622055679.git.stefan@agner.ch>
|
||||
References: <0955f7e64f302c5c331b90fd07fc48dfb677eab5.1622055679.git.stefan@agner.ch>
|
||||
From: Hyeonki Hong <hhk7734@gmail.com>
|
||||
Date: Wed, 7 Apr 2021 04:26:09 +0000
|
||||
Subject: [PATCH 06/11] arm64: dts: meson: add GPIO line names to ODROID N2/N2+
|
||||
|
||||
Add GPIO line-name identifiers to the ODROID N2/N2+ common dtsi.
|
||||
|
||||
Signed-off-by: Hyeonki Hong <hhk7734@gmail.com>
|
||||
Signed-off-by: Christian Hewitt <christianshewitt@gmail.com>
|
||||
Reviewed-by: Neil Armstrong <narmstrong@baylibre.com>
|
||||
Signed-off-by: Kevin Hilman <khilman@baylibre.com>
|
||||
Link: https://lore.kernel.org/r/20210407042609.9736-4-christianshewitt@gmail.com
|
||||
---
|
||||
.../dts/amlogic/meson-g12b-odroid-n2.dtsi | 45 +++++++++++++++++++
|
||||
1 file changed, 45 insertions(+)
|
||||
|
||||
diff --git a/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi
|
||||
index 194a437b4e3f..fe85aa6da460 100644
|
||||
--- a/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi
|
||||
+++ b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi
|
||||
@@ -446,6 +446,51 @@ &frddr_c {
|
||||
};
|
||||
|
||||
&gpio {
|
||||
+ gpio-line-names =
|
||||
+ /* GPIOZ */
|
||||
+ "", "", "", "", "", "", "", "",
|
||||
+ "", "", "", "", "", "", "", "",
|
||||
+ /* GPIOH */
|
||||
+ "", "", "", "", "", "", "", "",
|
||||
+ "",
|
||||
+ /* BOOT */
|
||||
+ "", "", "", "", "", "", "", "",
|
||||
+ "", "", "", "", "", "", "", "",
|
||||
+ /* GPIOC */
|
||||
+ "", "", "", "", "", "", "", "",
|
||||
+ /* GPIOA */
|
||||
+ "PIN_44", /* GPIOA_0 */
|
||||
+ "PIN_46", /* GPIOA_1 */
|
||||
+ "PIN_45", /* GPIOA_2 */
|
||||
+ "PIN_47", /* GPIOA_3 */
|
||||
+ "PIN_26", /* GPIOA_4 */
|
||||
+ "", "", "", "", "", "",
|
||||
+ "PIN_42", /* GPIOA_11 */
|
||||
+ "PIN_32", /* GPIOA_12 */
|
||||
+ "PIN_7", /* GPIOA_13 */
|
||||
+ "PIN_27", /* GPIOA_14 */
|
||||
+ "PIN_28", /* GPIOA_15 */
|
||||
+ /* GPIOX */
|
||||
+ "PIN_16", /* GPIOX_0 */
|
||||
+ "PIN_18", /* GPIOX_1 */
|
||||
+ "PIN_22", /* GPIOX_2 */
|
||||
+ "PIN_11", /* GPIOX_3 */
|
||||
+ "PIN_13", /* GPIOX_4 */
|
||||
+ "PIN_33", /* GPIOX_5 */
|
||||
+ "PIN_35", /* GPIOX_6 */
|
||||
+ "PIN_15", /* GPIOX_7 */
|
||||
+ "PIN_19", /* GPIOX_8 */
|
||||
+ "PIN_21", /* GPIOX_9 */
|
||||
+ "PIN_24", /* GPIOX_10 */
|
||||
+ "PIN_23", /* GPIOX_11 */
|
||||
+ "PIN_8", /* GPIOX_12 */
|
||||
+ "PIN_10", /* GPIOX_13 */
|
||||
+ "PIN_29", /* GPIOX_14 */
|
||||
+ "PIN_31", /* GPIOX_15 */
|
||||
+ "PIN_12", /* GPIOX_16 */
|
||||
+ "PIN_3", /* GPIOX_17 */
|
||||
+ "PIN_5", /* GPIOX_18 */
|
||||
+ "PIN_36"; /* GPIOX_19 */
|
||||
/*
|
||||
* WARNING: The USB Hub on the Odroid-N2 needs a reset signal
|
||||
* to be turned high in order to be detected by the USB Controller
|
||||
--
|
||||
2.31.1
|
||||
|
@@ -0,0 +1,42 @@
|
||||
From 25cd545d370b67f5e5e19d93484d378571526da2 Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <25cd545d370b67f5e5e19d93484d378571526da2.1622055679.git.stefan@agner.ch>
|
||||
In-Reply-To: <0955f7e64f302c5c331b90fd07fc48dfb677eab5.1622055679.git.stefan@agner.ch>
|
||||
References: <0955f7e64f302c5c331b90fd07fc48dfb677eab5.1622055679.git.stefan@agner.ch>
|
||||
From: Stefan Agner <stefan@agner.ch>
|
||||
Date: Mon, 11 Jan 2021 11:20:48 +0100
|
||||
Subject: [PATCH 07/11] arm64: dts: meson: g12b: add power button support
|
||||
|
||||
Add power button support on J2 pin 11 (GPIOX_3 on the SoC side). The
|
||||
GPIO is low active, e.g. when connecting with pin 9 (GND) a power
|
||||
button press is triggered.
|
||||
|
||||
Signed-off-by: Stefan Agner <stefan@agner.ch>
|
||||
---
|
||||
arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi | 11 +++++++++++
|
||||
1 file changed, 11 insertions(+)
|
||||
|
||||
diff --git a/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi
|
||||
index fe85aa6da460..9b1541ee2273 100644
|
||||
--- a/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi
|
||||
+++ b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi
|
||||
@@ -39,6 +39,17 @@ emmc_pwrseq: emmc-pwrseq {
|
||||
reset-gpios = <&gpio BOOT_12 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
|
||||
+ gpio-keys-polled {
|
||||
+ compatible = "gpio-keys-polled";
|
||||
+ poll-interval = <100>;
|
||||
+
|
||||
+ power-button {
|
||||
+ label = "power";
|
||||
+ linux,code = <KEY_POWER>;
|
||||
+ gpios = <&gpio GPIOX_3 GPIO_ACTIVE_LOW>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
leds {
|
||||
compatible = "gpio-leds";
|
||||
|
||||
--
|
||||
2.31.1
|
||||
|
@@ -0,0 +1,42 @@
|
||||
From b94a0698f21a2d8f6623b69fc17fe9491bc22a9b Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <b94a0698f21a2d8f6623b69fc17fe9491bc22a9b.1622055679.git.stefan@agner.ch>
|
||||
In-Reply-To: <0955f7e64f302c5c331b90fd07fc48dfb677eab5.1622055679.git.stefan@agner.ch>
|
||||
References: <0955f7e64f302c5c331b90fd07fc48dfb677eab5.1622055679.git.stefan@agner.ch>
|
||||
From: Stefan Agner <stefan@agner.ch>
|
||||
Date: Mon, 11 Jan 2021 11:38:54 +0100
|
||||
Subject: [PATCH 08/11] arm64: dts: meson: g12b: add GPIO fan support
|
||||
|
||||
Add simple GPIO fan node to support a fan on GPIO J8. Unfortunately the
|
||||
pad used to control the fan does not support real PWM, hence the RPM
|
||||
cannot be modulated.
|
||||
|
||||
Signed-off-by: Stefan Agner <stefan@agner.ch>
|
||||
---
|
||||
arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi | 11 +++++++++++
|
||||
1 file changed, 11 insertions(+)
|
||||
|
||||
diff --git a/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi
|
||||
index 9b1541ee2273..8ad7c3ee1aa3 100644
|
||||
--- a/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi
|
||||
+++ b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi
|
||||
@@ -39,6 +39,17 @@ emmc_pwrseq: emmc-pwrseq {
|
||||
reset-gpios = <&gpio BOOT_12 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
|
||||
+ /*
|
||||
+ * 5V 80x80x10.8mm cooling fan from Hardkernel shop.
|
||||
+ */
|
||||
+ fan0: gpio-fan {
|
||||
+ #cooling-cells = <2>;
|
||||
+ compatible = "gpio-fan";
|
||||
+ gpio-fan,speed-map = <0 0 1600 1>;
|
||||
+ gpios = <&gpio_ao GPIOAO_10 GPIO_ACTIVE_HIGH>;
|
||||
+ status = "okay";
|
||||
+ };
|
||||
+
|
||||
gpio-keys-polled {
|
||||
compatible = "gpio-keys-polled";
|
||||
poll-interval = <100>;
|
||||
--
|
||||
2.31.1
|
||||
|
@@ -0,0 +1,74 @@
|
||||
From 4d9f93dbdc93e83ba8ddf01893b3c29cd11a87f9 Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <4d9f93dbdc93e83ba8ddf01893b3c29cd11a87f9.1622055679.git.stefan@agner.ch>
|
||||
In-Reply-To: <0955f7e64f302c5c331b90fd07fc48dfb677eab5.1622055679.git.stefan@agner.ch>
|
||||
References: <0955f7e64f302c5c331b90fd07fc48dfb677eab5.1622055679.git.stefan@agner.ch>
|
||||
From: Stefan Agner <stefan@agner.ch>
|
||||
Date: Mon, 11 Jan 2021 15:53:55 +0100
|
||||
Subject: [PATCH 09/11] arm64: dts: meson: g12b: odroid-n2: add fan as cooling
|
||||
device
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Add the GPIO fan as a cooling device for the CPU thermal zone. Since we
|
||||
have only full fan speed available with this, set the tripping point to
|
||||
65°C which is the highest tripping point which Hardkernel used in their
|
||||
downstream kernel.
|
||||
|
||||
Signed-off-by: Stefan Agner <stefan@agner.ch>
|
||||
---
|
||||
.../dts/amlogic/meson-g12b-odroid-n2.dtsi | 38 +++++++++++++++++++
|
||||
1 file changed, 38 insertions(+)
|
||||
|
||||
diff --git a/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi
|
||||
index 8ad7c3ee1aa3..c4052293ea0d 100644
|
||||
--- a/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi
|
||||
+++ b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi
|
||||
@@ -388,6 +388,44 @@ &clkc_audio {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
+&cpu_thermal {
|
||||
+ trips {
|
||||
+ cpu_warm: cpu_warm {
|
||||
+ hysteresis = <5000>;
|
||||
+ temperature = <65000>;
|
||||
+ type = "active";
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ cooling-maps {
|
||||
+ map0 {
|
||||
+ cooling-device =
|
||||
+ <&fan0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
|
||||
+ trip = <&cpu_warm>;
|
||||
+ };
|
||||
+ map1 {
|
||||
+ trip = <&cpu_passive>;
|
||||
+ cooling-device = <&cpu0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
|
||||
+ <&cpu1 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
|
||||
+ <&cpu100 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
|
||||
+ <&cpu101 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
|
||||
+ <&cpu102 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
|
||||
+ <&cpu103 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
|
||||
+ <&fan0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
|
||||
+ };
|
||||
+ map2 {
|
||||
+ trip = <&cpu_hot>;
|
||||
+ cooling-device = <&cpu0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
|
||||
+ <&cpu1 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
|
||||
+ <&cpu100 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
|
||||
+ <&cpu101 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
|
||||
+ <&cpu102 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
|
||||
+ <&cpu103 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
|
||||
+ <&fan0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
|
||||
+ };
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
&cpu0 {
|
||||
cpu-supply = <&vddcpu_b>;
|
||||
operating-points-v2 = <&cpu_opp_table_0>;
|
||||
--
|
||||
2.31.1
|
||||
|
@@ -0,0 +1,44 @@
|
||||
From 1eeec94aa6dd6f9900e6213025916eb85f6b3b62 Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <1eeec94aa6dd6f9900e6213025916eb85f6b3b62.1622055679.git.stefan@agner.ch>
|
||||
In-Reply-To: <0955f7e64f302c5c331b90fd07fc48dfb677eab5.1622055679.git.stefan@agner.ch>
|
||||
References: <0955f7e64f302c5c331b90fd07fc48dfb677eab5.1622055679.git.stefan@agner.ch>
|
||||
From: Hyeonki Hong <hhk7734@gmail.com>
|
||||
Date: Fri, 27 Mar 2020 17:05:22 +0900
|
||||
Subject: [PATCH 10/11] arm64: dts: meson: add uart_A node
|
||||
|
||||
The UART_A is available through J3 pin 8/10 and documented to be
|
||||
available as UART by default.
|
||||
|
||||
Signed-off-by: Stefan Agner <stefan@agner.ch>
|
||||
---
|
||||
arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi | 7 +++++++
|
||||
1 file changed, 7 insertions(+)
|
||||
|
||||
diff --git a/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi
|
||||
index c4052293ea0d..38a996ed3e19 100644
|
||||
--- a/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi
|
||||
+++ b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi
|
||||
@@ -12,6 +12,7 @@
|
||||
/ {
|
||||
aliases {
|
||||
serial0 = &uart_AO;
|
||||
+ serial1 = &uart_A;
|
||||
ethernet0 = ðmac;
|
||||
rtc0 = &rtc;
|
||||
rtc1 = &vrtc;
|
||||
@@ -728,6 +729,12 @@ &toddr_c {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
+&uart_A {
|
||||
+ status = "okay";
|
||||
+ pinctrl-0 = <&uart_a_pins>;
|
||||
+ pinctrl-names = "default";
|
||||
+};
|
||||
+
|
||||
&uart_AO {
|
||||
status = "okay";
|
||||
pinctrl-0 = <&uart_ao_a_pins>;
|
||||
--
|
||||
2.31.1
|
||||
|
@@ -0,0 +1,37 @@
|
||||
From 400fce2e1eaab6d04f542eaa0fe3b53fb9d79d82 Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <400fce2e1eaab6d04f542eaa0fe3b53fb9d79d82.1622055679.git.stefan@agner.ch>
|
||||
In-Reply-To: <0955f7e64f302c5c331b90fd07fc48dfb677eab5.1622055679.git.stefan@agner.ch>
|
||||
References: <0955f7e64f302c5c331b90fd07fc48dfb677eab5.1622055679.git.stefan@agner.ch>
|
||||
From: Stefan Agner <stefan@agner.ch>
|
||||
Date: Thu, 29 Apr 2021 21:32:43 +0200
|
||||
Subject: [PATCH 11/11] arm64: dts: meson: add i2c2 node to ODROID N2/N2+
|
||||
|
||||
The J2 connectors pinout documents "I2C.SDA0/SCL0" on pin 3 and 5, which
|
||||
are connected to GPIOX_17/18. This GPIO allow to mux I2C to the second
|
||||
I2C instance. Enable i2c2 and use the appropriate pinmux.
|
||||
|
||||
Signed-off-by: Stefan Agner <stefan@agner.ch>
|
||||
---
|
||||
arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi | 6 ++++++
|
||||
1 file changed, 6 insertions(+)
|
||||
|
||||
diff --git a/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi
|
||||
index 38a996ed3e19..45a8998c4a3a 100644
|
||||
--- a/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi
|
||||
+++ b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi
|
||||
@@ -586,6 +586,12 @@ &ir {
|
||||
linux,rc-map-name = "rc-odroid";
|
||||
};
|
||||
|
||||
+&i2c2 {
|
||||
+ status = "okay";
|
||||
+ pinctrl-0 = <&i2c2_sda_x_pins>, <&i2c2_sck_x_pins>;
|
||||
+ pinctrl-names = "default";
|
||||
+};
|
||||
+
|
||||
&i2c3 {
|
||||
status = "okay";
|
||||
pinctrl-0 = <&i2c3_sda_a_pins>, <&i2c3_sck_a_pins>;
|
||||
--
|
||||
2.31.1
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user