mirror of
https://github.com/home-assistant/operating-system.git
synced 2025-08-22 11:29:20 +00:00
Compare commits
225 Commits
10.0
...
missing-ve
Author | SHA1 | Date | |
---|---|---|---|
![]() |
f97c1b7c40 | ||
![]() |
204bd8bb56 | ||
![]() |
2888ccf28e | ||
![]() |
c33fc03fd6 | ||
![]() |
d7e3a8b985 | ||
![]() |
e4e4c62834 | ||
![]() |
2e8b66d283 | ||
![]() |
54cab43ea3 | ||
![]() |
d39a767bfb | ||
![]() |
5e5462ddde | ||
![]() |
39778e882a | ||
![]() |
e1be4f3efb | ||
![]() |
ae711734bf | ||
![]() |
6d7db27f84 | ||
![]() |
8133cfead8 | ||
![]() |
91e82e40d9 | ||
![]() |
6e8568c666 | ||
![]() |
252887cc0d | ||
![]() |
4769d22b3c | ||
![]() |
28c13d7709 | ||
![]() |
9c021aa766 | ||
![]() |
a1947336a8 | ||
![]() |
9e70ebe989 | ||
![]() |
12b3d62f9e | ||
![]() |
0ec13ca335 | ||
![]() |
ae42fbf235 | ||
![]() |
c5d21da0e8 | ||
![]() |
66c0435c7c | ||
![]() |
b55e6c22c2 | ||
![]() |
aed1bb807c | ||
![]() |
e928fa498f | ||
![]() |
b56f660316 | ||
![]() |
7f2d5c1524 | ||
![]() |
f977067c18 | ||
![]() |
58accf39d7 | ||
![]() |
caf6611f7d | ||
![]() |
d7b32fd100 | ||
![]() |
81d9a90729 | ||
![]() |
d4cb408090 | ||
![]() |
3e36628c09 | ||
![]() |
56ccbf4b9e | ||
![]() |
44dc1781a5 | ||
![]() |
157144eaa5 | ||
![]() |
f946e098d6 | ||
![]() |
2a334e8c1a | ||
![]() |
7845199fa8 | ||
![]() |
01e9b7d4f6 | ||
![]() |
f407c3de66 | ||
![]() |
6206f6a428 | ||
![]() |
a669a352d5 | ||
![]() |
ff7645ddaf | ||
![]() |
30d3678c2d | ||
![]() |
ff0a4b44e0 | ||
![]() |
19ded665bd | ||
![]() |
fc3c313509 | ||
![]() |
5b927389b8 | ||
![]() |
a42ae2f25b | ||
![]() |
3e65e9a839 | ||
![]() |
ba23d68de7 | ||
![]() |
b60fe22de8 | ||
![]() |
f5d4379aed | ||
![]() |
0d3cb42e47 | ||
![]() |
1bec4e858b | ||
![]() |
8be78b1257 | ||
![]() |
29ad504667 | ||
![]() |
2cbaaf9f3b | ||
![]() |
0ebcdcb9dc | ||
![]() |
893a49a3f3 | ||
![]() |
a72c6c0322 | ||
![]() |
56d96acd1b | ||
![]() |
469b109efd | ||
![]() |
65271c797c | ||
![]() |
39e867c352 | ||
![]() |
dd21a73031 | ||
![]() |
f9251252d9 | ||
![]() |
5ea343289c | ||
![]() |
3df2749171 | ||
![]() |
7870a1d78e | ||
![]() |
8d6b4eb11b | ||
![]() |
49a487d4a2 | ||
![]() |
86b172b9c2 | ||
![]() |
53567a86e8 | ||
![]() |
8d8327801f | ||
![]() |
b7e958d498 | ||
![]() |
3e173ca77e | ||
![]() |
f8f2e61967 | ||
![]() |
26dd95cb03 | ||
![]() |
0125e32ca6 | ||
![]() |
3d7a17c59f | ||
![]() |
bf327c968a | ||
![]() |
ff1e4d2c31 | ||
![]() |
25545b609e | ||
![]() |
98da692882 | ||
![]() |
52a455c6ca | ||
![]() |
cdfde693c7 | ||
![]() |
079bf06aa7 | ||
![]() |
de2d443cda | ||
![]() |
0b115133fe | ||
![]() |
41c3b6565d | ||
![]() |
79050fb820 | ||
![]() |
e83f264e8c | ||
![]() |
516cb71df9 | ||
![]() |
76903af864 | ||
![]() |
42648b664d | ||
![]() |
d2006e9b72 | ||
![]() |
2756709f4a | ||
![]() |
a2760f1d67 | ||
![]() |
8297bc0e30 | ||
![]() |
fcf615614e | ||
![]() |
60ea200b88 | ||
![]() |
d7dccf423a | ||
![]() |
111eebfb49 | ||
![]() |
02d85d73ef | ||
![]() |
c41cf9ad17 | ||
![]() |
23237a0676 | ||
![]() |
9253b7361b | ||
![]() |
68c74db9d2 | ||
![]() |
e8da915a46 | ||
![]() |
23f857fcb4 | ||
![]() |
fd4a05d708 | ||
![]() |
eba7099adc | ||
![]() |
61f473432e | ||
![]() |
1836f04a87 | ||
![]() |
6ba07710e8 | ||
![]() |
a160c674d6 | ||
![]() |
4db2aa1a67 | ||
![]() |
ed6ef90fa1 | ||
![]() |
f0015ba645 | ||
![]() |
65a17296f5 | ||
![]() |
f967485c75 | ||
![]() |
1f7185c913 | ||
![]() |
8f3624382b | ||
![]() |
b883b91a8c | ||
![]() |
c4be219a85 | ||
![]() |
51e3d0b875 | ||
![]() |
d662cfde9e | ||
![]() |
7ae59b7023 | ||
![]() |
9f5b9f8afe | ||
![]() |
48c99c31b8 | ||
![]() |
e43594f3cd | ||
![]() |
689faa0260 | ||
![]() |
9cd3e438fa | ||
![]() |
742dea4165 | ||
![]() |
6776b23c32 | ||
![]() |
f33b3f2750 | ||
![]() |
67aa29da48 | ||
![]() |
642b8a132f | ||
![]() |
b10bf134c0 | ||
![]() |
6bcad34dae | ||
![]() |
6eb48fea7c | ||
![]() |
dc02955e31 | ||
![]() |
c9e3c496f5 | ||
![]() |
0d346f9dc5 | ||
![]() |
d9c19a8003 | ||
![]() |
47de77406e | ||
![]() |
22424e591b | ||
![]() |
276f531f35 | ||
![]() |
84659c2bf1 | ||
![]() |
ad29aee1de | ||
![]() |
e7d6d6513b | ||
![]() |
24217838e2 | ||
![]() |
9261843a27 | ||
![]() |
04449d98b5 | ||
![]() |
6b62c1e6b8 | ||
![]() |
1e67fe4b2a | ||
![]() |
0ed1ff27fb | ||
![]() |
875c8edcaf | ||
![]() |
0f955f5141 | ||
![]() |
afa8ca1714 | ||
![]() |
e7d98e9eda | ||
![]() |
cc63f37094 | ||
![]() |
6ea71953be | ||
![]() |
3710f2079e | ||
![]() |
94311130c1 | ||
![]() |
18cc4cb771 | ||
![]() |
0c5cc3d425 | ||
![]() |
6845bf43a5 | ||
![]() |
e01993fffb | ||
![]() |
bf5691d3cd | ||
![]() |
19117e98bd | ||
![]() |
5254cda720 | ||
![]() |
22cccfc781 | ||
![]() |
f179742600 | ||
![]() |
6ad36f2aab | ||
![]() |
9d45acdfba | ||
![]() |
064772d0bb | ||
![]() |
217f3d97f7 | ||
![]() |
566811ae62 | ||
![]() |
b0d113d7bb | ||
![]() |
08d4c39d6c | ||
![]() |
02ac8e90d6 | ||
![]() |
bf76a0b473 | ||
![]() |
27992e2b13 | ||
![]() |
4e1ea18251 | ||
![]() |
9d167da919 | ||
![]() |
a3471cff76 | ||
![]() |
355ec34ad1 | ||
![]() |
a44d573d3d | ||
![]() |
888b4c852d | ||
![]() |
fbcc8e1c45 | ||
![]() |
bdcf4f124a | ||
![]() |
bea888f8db | ||
![]() |
a6894512dd | ||
![]() |
0dd621d444 | ||
![]() |
f9484851a1 | ||
![]() |
03c5efcd0a | ||
![]() |
907ce276c2 | ||
![]() |
afe075ff56 | ||
![]() |
1a01e2c98f | ||
![]() |
99746aeed9 | ||
![]() |
991a2e93d9 | ||
![]() |
01548af27e | ||
![]() |
19e2869261 | ||
![]() |
b88deef758 | ||
![]() |
c7588e9350 | ||
![]() |
bdb3bd3ab1 | ||
![]() |
3686a12d11 | ||
![]() |
94fe385ef4 | ||
![]() |
f5e2919db1 | ||
![]() |
399997e83c | ||
![]() |
1edb5c8c9e | ||
![]() |
c64c5b13ab | ||
![]() |
555c229519 | ||
![]() |
4744a2f123 | ||
![]() |
9cd98003e8 |
1
.github/ISSUE_TEMPLATE/bug_report.yml
vendored
1
.github/ISSUE_TEMPLATE/bug_report.yml
vendored
@@ -40,6 +40,7 @@ body:
|
||||
- rpi4-64 (Raspberry Pi 4/400 64-bit OS)
|
||||
- tinker (ASUS Tinker Board/Tinker Board S)
|
||||
- yellow (Home Assistant Yellow)
|
||||
- green (Home Assistant Green)
|
||||
description: >
|
||||
Can be found in [Settings -> System -> Repairs -> System Information](https://my.home-assistant.io/redirect/system_health/). It is listed as the `Board` value.
|
||||
|
||||
|
95
.github/actions/bump-rpi-imager-version/action.yml
vendored
Normal file
95
.github/actions/bump-rpi-imager-version/action.yml
vendored
Normal file
@@ -0,0 +1,95 @@
|
||||
name: 'Bump RPi Imager OS version'
|
||||
description: 'Bump version of Home Assistant OS in RPi Imager'
|
||||
inputs:
|
||||
version:
|
||||
required: true
|
||||
description: "Version of Home Assistant OS to bump to."
|
||||
release-date:
|
||||
required: true
|
||||
description: "Release date as ISO 8601 date string."
|
||||
runs:
|
||||
using: "composite"
|
||||
steps:
|
||||
- shell: bash
|
||||
id: validate-input
|
||||
env:
|
||||
INPUTS_DATE: ${{ inputs.release-date }}
|
||||
run: |
|
||||
if [[ -z "$INPUTS_DATE" ]] || [[ ! "$INPUTS_DATE" =~ ^([0-9]{4})-([0-9]{2})-([0-9]{2})T([0-9]{2}):([0-9]{2}):([0-9]{2})Z$ ]]; then
|
||||
echo "::error::Argument 'release-date' must be an ISO 8601 date string."
|
||||
exit 1
|
||||
else
|
||||
echo "date=$(date --date=${INPUTS_DATE} +'%Y-%m-%d')" >> "$GITHUB_OUTPUT"
|
||||
fi
|
||||
|
||||
- shell: bash
|
||||
run: git clone --depth 1 https://github.com/home-assistant/version.git /tmp/version
|
||||
|
||||
- shell: bash
|
||||
env:
|
||||
INPUTS_VERSION: ${{ inputs.version }}
|
||||
run: |
|
||||
function bump_entry() {
|
||||
json=$1
|
||||
version=$2
|
||||
release_date=$3
|
||||
image_id=$4
|
||||
image_name=$5
|
||||
url="https://github.com/home-assistant/operating-system/releases/download/${version}/haos_${image_id}-${version}.img.xz"
|
||||
temp_image=$(mktemp --suffix=.img.xz)
|
||||
temp_out=$(mktemp)
|
||||
|
||||
curl -fsL -o "$temp_image" "$url"
|
||||
image_download_size=$(stat --printf="%s" "$temp_image")
|
||||
image_download_sha256=$(sha256sum "$temp_image" | awk '{print $1}')
|
||||
unxz "$temp_image"
|
||||
temp_unpacked="${temp_image%.*}"
|
||||
extract_size=$(stat --printf="%s" "$temp_unpacked")
|
||||
extract_sha256=$(sha256sum "$temp_unpacked" | awk '{print $1}')
|
||||
|
||||
entry_name="Home Assistant OS ${version} (${image_name})"
|
||||
|
||||
jq '
|
||||
. as $data
|
||||
| $data
|
||||
| .os_list = [
|
||||
.os_list[]
|
||||
| if .name | test("Home Assistant OS .* \\(" + $image_name + "\\)") then
|
||||
.name = "Home Assistant OS " + $version + " (" + $image_name + ")"
|
||||
| .url = $url
|
||||
| .extract_size = ($extract_size | tonumber)
|
||||
| .extract_sha256 = $extract_sha256
|
||||
| .release_date = $release_date
|
||||
| .image_download_size = ($image_download_size | tonumber)
|
||||
| .image_download_sha256 = $image_download_sha256
|
||||
else .
|
||||
end
|
||||
]' \
|
||||
--arg version "$version" \
|
||||
--arg image_name "$image_name" \
|
||||
--arg entry_name "$entry_name" \
|
||||
--arg release_date "$release_date" \
|
||||
--arg url "$url" \
|
||||
--arg image_download_size "$image_download_size" \
|
||||
--arg image_download_sha256 "$image_download_sha256" \
|
||||
--arg extract_size "$extract_size" \
|
||||
--arg extract_sha256 "$extract_sha256" \
|
||||
"$json" > "$temp_out"
|
||||
|
||||
mv "$temp_out" "$json"
|
||||
rm -rf "$temp_unpacked" "$temp_out"
|
||||
}
|
||||
|
||||
bump_entry /tmp/version/rpi-imager-haos.json "$INPUTS_VERSION" "${{ steps.validate-input.outputs.date }}" "rpi3-64" "RPi 3"
|
||||
bump_entry /tmp/version/rpi-imager-haos.json "$INPUTS_VERSION" "${{ steps.validate-input.outputs.date }}" "rpi4-64" "RPi 4/400"
|
||||
|
||||
- shell: bash
|
||||
env:
|
||||
INPUTS_VERSION: ${{ inputs.version }}
|
||||
run: |
|
||||
cd /tmp/version
|
||||
git commit -am "Bump Home Assistant OS to ${INPUTS_VERSION} for RPi Imager"
|
||||
git push
|
||||
|
||||
- shell: bash
|
||||
run: rm -rf /tmp/version
|
16
.github/label-actions.yml
vendored
16
.github/label-actions.yml
vendored
@@ -8,6 +8,7 @@ assume-fixed:
|
||||
release. You can find the latest stable release at
|
||||
https://github.com/home-assistant/operating-system/releases/latest
|
||||
close: true
|
||||
close-reason: not planned
|
||||
|
||||
core-issue:
|
||||
comment: >
|
||||
@@ -19,6 +20,19 @@ core-issue:
|
||||
repository, the issue might have been reported already. Open a new issue
|
||||
in that repository if you can't find a matching issue.
|
||||
close: true
|
||||
close-reason: not planned
|
||||
|
||||
frontend-issue:
|
||||
comment: >
|
||||
:wave: @{issue-author}, thanks for reporting an issue!
|
||||
|
||||
|
||||
It looks like this issue is related to Home Assistant Frontend. Please
|
||||
check the [Home Assistant Frontend](https://github.com/home-assistant/frontend/issues)
|
||||
repository, the issue might have been reported already. Open a new issue
|
||||
in that repository if you can't find a matching issue.
|
||||
close: true
|
||||
close-reason: not planned
|
||||
|
||||
supervisor-issue:
|
||||
comment: >
|
||||
@@ -30,6 +44,7 @@ supervisor-issue:
|
||||
repository, the issue might have been reported already. Open a new issue
|
||||
in that repository if you can't find a matching issue.
|
||||
close: true
|
||||
close-reason: not planned
|
||||
|
||||
new-feature:
|
||||
comment: >
|
||||
@@ -41,3 +56,4 @@ new-feature:
|
||||
Please check if someone already requested a similar feature, or create
|
||||
a new feature request with the "haos" tag in that forum. Thank you!
|
||||
close: true
|
||||
close-reason: not planned
|
||||
|
2
.github/release-drafter.yml
vendored
2
.github/release-drafter.yml
vendored
@@ -10,6 +10,8 @@ categories:
|
||||
label: 'board/raspberrypi'
|
||||
- title: 'Home Assistant Yellow'
|
||||
label: 'board/yellow'
|
||||
- title: 'Home Assistant Green'
|
||||
label: 'board/green'
|
||||
- title: 'Open Virtual Appliance'
|
||||
label: 'board/ova'
|
||||
- title: 'Generic x86-64'
|
||||
|
93
.github/workflows/artifacts-index.yaml
vendored
Normal file
93
.github/workflows/artifacts-index.yaml
vendored
Normal file
@@ -0,0 +1,93 @@
|
||||
name: Update artifacts index
|
||||
|
||||
on:
|
||||
# Manual run for specified version
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
version:
|
||||
description: Version of HAOS to build index for
|
||||
required: true
|
||||
type: string
|
||||
|
||||
# Called by other workflows (e.g. build.yaml)
|
||||
workflow_call:
|
||||
inputs:
|
||||
version:
|
||||
description: Version of HAOS to build index for
|
||||
required: true
|
||||
type: string
|
||||
secrets:
|
||||
R2_OS_ARTIFACTS_ID:
|
||||
required: true
|
||||
R2_OS_ARTIFACTS_KEY:
|
||||
required: true
|
||||
R2_OS_ARTIFACTS_BUCKET:
|
||||
required: true
|
||||
R2_OS_ARTIFACTS_ENDPOINT:
|
||||
required: true
|
||||
CF_ZONE:
|
||||
required: true
|
||||
CF_PURGE_TOKEN:
|
||||
required: true
|
||||
|
||||
env:
|
||||
PYTHON_VERSION: "3.10"
|
||||
|
||||
jobs:
|
||||
build-index:
|
||||
name: Build Home Assistant OS artifacts index
|
||||
runs-on: ubuntu-22.04
|
||||
steps:
|
||||
- name: Checkout source
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
persist-credentials: false
|
||||
|
||||
- name: Setup Python version ${{ env.PYTHON_VERSION }}
|
||||
uses: actions/setup-python@v4
|
||||
with:
|
||||
python-version: ${{ env.PYTHON_VERSION }}
|
||||
|
||||
- name: Install AWS CLI
|
||||
run: pip install awscli
|
||||
|
||||
- name: Create build index
|
||||
env:
|
||||
AWS_ACCESS_KEY_ID: ${{ secrets.R2_OS_ARTIFACTS_ID }}
|
||||
AWS_SECRET_ACCESS_KEY: ${{ secrets.R2_OS_ARTIFACTS_KEY }}
|
||||
run: |
|
||||
aws s3api list-objects-v2 \
|
||||
--bucket "${{ secrets.R2_OS_ARTIFACTS_BUCKET }}" \
|
||||
--endpoint-url "${{ secrets.R2_OS_ARTIFACTS_ENDPOINT }}" \
|
||||
--prefix "${{ github.event.inputs.version }}/" \
|
||||
--query 'Contents[].Key' | jq 'map(split("/")[1]) | sort' > "${{ github.event.inputs.version }}.json"
|
||||
aws s3 cp \
|
||||
"${{ github.event.inputs.version }}.json" \
|
||||
s3://${{ secrets.R2_OS_ARTIFACTS_BUCKET }}/indexes/ \
|
||||
--endpoint-url "${{ secrets.R2_OS_ARTIFACTS_ENDPOINT }}"
|
||||
|
||||
- name: Regenerate artifacts index
|
||||
env:
|
||||
AWS_ACCESS_KEY_ID: ${{ secrets.R2_OS_ARTIFACTS_ID }}
|
||||
AWS_SECRET_ACCESS_KEY: ${{ secrets.R2_OS_ARTIFACTS_KEY }}
|
||||
run: |
|
||||
aws s3api list-objects-v2 \
|
||||
--bucket "${{ secrets.R2_OS_ARTIFACTS_BUCKET }}" \
|
||||
--endpoint-url "${{ secrets.R2_OS_ARTIFACTS_ENDPOINT }}" \
|
||||
--prefix "indexes/" \
|
||||
--query 'Contents[].Key' | jq 'map(capture("indexes/(?<version>[[:digit:]].+).json").version) | sort' > .os-artifacts/index.json
|
||||
aws s3 sync \
|
||||
.os-artifacts/ \
|
||||
s3://${{ secrets.R2_OS_ARTIFACTS_BUCKET }}/ \
|
||||
--endpoint-url "${{ secrets.R2_OS_ARTIFACTS_ENDPOINT }}" \
|
||||
|
||||
- name: Flush CloudFlare cache
|
||||
run: |
|
||||
curl --silent --show-error --fail -X POST \
|
||||
"https://api.cloudflare.com/client/v4/zones/${{ secrets.CF_ZONE }}/purge_cache" \
|
||||
-H "Authorization: Bearer ${{ secrets.CF_PURGE_TOKEN }}" \
|
||||
-H "Content-Type: application/json" \
|
||||
--data '{"files": [
|
||||
"https://os-artifacts.home-assistant.io/index.html",
|
||||
"https://os-artifacts.home-assistant.io/index.json"
|
||||
] }'
|
303
.github/workflows/build.yaml
vendored
Normal file
303
.github/workflows/build.yaml
vendored
Normal file
@@ -0,0 +1,303 @@
|
||||
# Home Assistant Operating System build workflow
|
||||
|
||||
name: OS build
|
||||
|
||||
on:
|
||||
release:
|
||||
types: [published]
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
boards:
|
||||
description: 'List of boards to build (comma separated identifiers)'
|
||||
required: false
|
||||
type: string
|
||||
|
||||
env:
|
||||
PYTHON_VERSION: "3.10"
|
||||
|
||||
jobs:
|
||||
prepare:
|
||||
name: Prepare build
|
||||
runs-on: ubuntu-22.04
|
||||
permissions:
|
||||
contents: read
|
||||
pull-requests: read
|
||||
packages: write
|
||||
outputs:
|
||||
version_dev: ${{ steps.version_dev.outputs.version_dev }}
|
||||
version_main: ${{ steps.version.outputs.version_main }}
|
||||
version_full: ${{ steps.version.outputs.version_full }}
|
||||
channel: ${{ steps.channel.outputs.channel }}
|
||||
matrix: ${{ steps.generate_matrix.outputs.result }}
|
||||
build_container_image: ghcr.io/${{ github.repository_owner }}/haos-builder@${{ steps.build_haos_builder.outputs.digest }}
|
||||
steps:
|
||||
- name: Checkout source
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
persist-credentials: false
|
||||
|
||||
- name: Generate development version
|
||||
shell: bash
|
||||
id: version_dev
|
||||
if: ${{ github.event_name != 'release' }}
|
||||
run: |
|
||||
version_dev="dev$(date --utc +'%Y%m%d')"
|
||||
echo "Development version \"${version_dev}\""
|
||||
echo "version_dev=${version_dev}" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Set version suffix
|
||||
if: ${{ github.event_name != 'release' }}
|
||||
env:
|
||||
VERSION_DEV: ${{ steps.version_dev.outputs.version_dev }}
|
||||
run: |
|
||||
sed -i -E "s/(^VERSION_SUFFIX=\").*(\"$)/\1${VERSION_DEV}\2/" buildroot-external/meta
|
||||
|
||||
- name: Get version
|
||||
id: version
|
||||
run: |
|
||||
. ${GITHUB_WORKSPACE}/buildroot-external/meta
|
||||
echo "version_main=${VERSION_MAJOR}.${VERSION_MINOR}" >> $GITHUB_OUTPUT
|
||||
if [ -z "${VERSION_SUFFIX}" ]; then
|
||||
version_full="${VERSION_MAJOR}.${VERSION_MINOR}"
|
||||
else
|
||||
version_full="${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_SUFFIX}"
|
||||
fi
|
||||
echo "version_full=${version_full}" >> $GITHUB_OUTPUT
|
||||
echo "Full version number of this release is \"${version_full}\"."
|
||||
|
||||
- name: Validate version
|
||||
id: version_check
|
||||
if: ${{ github.event_name == 'release' }}
|
||||
run: |
|
||||
if [ "${{ steps.version.outputs.version_full }}" != "${{ github.event.release.tag_name }}" ]; then
|
||||
echo "Version number in Buildroot metadata does not match tag (${{ steps.version.outputs.version_full }} vs ${{ github.event.release.tag_name }})."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
- name: Get channel
|
||||
id: channel
|
||||
run: |
|
||||
if [[ "${{ github.event_name }}" == "release" ]]; then
|
||||
if [[ "${{ github.event.release.prerelease }}" == "true" ]]; then
|
||||
echo "channel=beta" >> "$GITHUB_OUTPUT"
|
||||
else
|
||||
echo "channel=stable" >> "$GITHUB_OUTPUT"
|
||||
fi
|
||||
else
|
||||
echo "channel=dev" >> "$GITHUB_OUTPUT"
|
||||
fi
|
||||
|
||||
- name: Create build matrix
|
||||
uses: actions/github-script@v6
|
||||
id: generate_matrix
|
||||
with:
|
||||
script: |
|
||||
const boards = require('./.github/workflows/matrix.json')
|
||||
if ("${{ github.event_name }}" == "release") {
|
||||
return { "board": boards }
|
||||
}
|
||||
|
||||
const boardFilter = "${{ github.event.inputs.boards }}"
|
||||
if (boardFilter == "") {
|
||||
console.log("Run full build for all boards")
|
||||
return { "board": boards }
|
||||
} else {
|
||||
console.log("Run partial build")
|
||||
const boardSet = new Set(boardFilter.split(","))
|
||||
const buildBoards = boards.filter(b => boardSet.has(b.id))
|
||||
return { "board": buildBoards }
|
||||
}
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v3.0.0
|
||||
- name: Log in to the GitHub container registry
|
||||
uses: docker/login-action@v3.0.0
|
||||
with:
|
||||
registry: ghcr.io
|
||||
username: ${{ github.repository_owner }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
- name: Build and Push
|
||||
uses: docker/build-push-action@v5.0.0
|
||||
id: build_haos_builder
|
||||
with:
|
||||
context: .
|
||||
file: Dockerfile
|
||||
tags: ghcr.io/${{ github.repository_owner }}/haos-builder
|
||||
cache-from: ghcr.io/${{ github.repository_owner }}/haos-builder:cache-${{ steps.version_main.outputs.version_main }}
|
||||
cache-to: ghcr.io/${{ github.repository_owner }}/haos-builder:cache-${{ steps.version_main.outputs.version_main }}
|
||||
push: true
|
||||
|
||||
build:
|
||||
name: Build for ${{ matrix.board.id }}
|
||||
permissions:
|
||||
contents: write # for actions/upload-release-asset to upload release asset
|
||||
needs: prepare
|
||||
strategy:
|
||||
fail-fast: ${{ github.event_name == 'release' }}
|
||||
matrix: ${{ fromJson(needs.prepare.outputs.matrix) }}
|
||||
runs-on: ubuntu-22.04
|
||||
|
||||
steps:
|
||||
- name: Checkout source
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
submodules: true
|
||||
persist-credentials: false
|
||||
|
||||
- name: Setup Python version ${{ env.PYTHON_VERSION }}
|
||||
if: ${{ github.event_name != 'release' }}
|
||||
uses: actions/setup-python@v4
|
||||
with:
|
||||
python-version: ${{ env.PYTHON_VERSION }}
|
||||
|
||||
- name: Install AWS CLI
|
||||
if: ${{ github.event_name != 'release' }}
|
||||
run: pip install awscli
|
||||
|
||||
- name: Set version suffix
|
||||
if: ${{ github.event_name != 'release' }}
|
||||
env:
|
||||
VERSION_DEV: ${{ needs.prepare.outputs.version_dev }}
|
||||
run: |
|
||||
sed -i -E "s/(^VERSION_SUFFIX=\").*(\"$)/\1${VERSION_DEV}\2/" buildroot-external/meta
|
||||
|
||||
- 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: Free space on build drive
|
||||
run: |
|
||||
# Inspired by https://github.com/easimon/maximize-build-space/blob/v7/action.yml
|
||||
sudo rm -rf /usr/local/lib/android/sdk/ndk
|
||||
sudo rm -rf /opt/hostedtoolcache/CodeQL
|
||||
# Make sure cache action can restore this lcoation
|
||||
sudo mkdir /mnt/cache
|
||||
sudo chown -R runner:runner /mnt/cache
|
||||
|
||||
- name: "Restore cache: object files"
|
||||
uses: actions/cache/restore@v3
|
||||
with:
|
||||
path: /mnt/cache/cc
|
||||
key: haos-cc-${{ matrix.board.id }}
|
||||
|
||||
- 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 "/mnt/cache:/cache" \
|
||||
${{ needs.prepare.outputs.build_container_image }} \
|
||||
make BUILDDIR=/build ${{ matrix.board.defconfig }}
|
||||
|
||||
- name: Upload artifacts
|
||||
if: ${{ github.event_name != 'release' }}
|
||||
working-directory: output/images/
|
||||
env:
|
||||
AWS_ACCESS_KEY_ID: ${{ secrets.R2_OS_ARTIFACTS_ID }}
|
||||
AWS_SECRET_ACCESS_KEY: ${{ secrets.R2_OS_ARTIFACTS_KEY }}
|
||||
run: |
|
||||
aws s3 sync \
|
||||
./ \
|
||||
s3://${{ secrets.R2_OS_ARTIFACTS_BUCKET }}/${{ needs.prepare.outputs.version_full }}/ \
|
||||
--exclude "*" \
|
||||
--include "haos_*" \
|
||||
--endpoint-url ${{ secrets.R2_OS_ARTIFACTS_ENDPOINT }}
|
||||
|
||||
- name: Upload release assets
|
||||
if: ${{ github.event_name == 'release' }}
|
||||
uses: shogo82148/actions-upload-release-asset@v1
|
||||
with:
|
||||
upload_url: ${{ github.event.release.upload_url }}
|
||||
asset_path: output/images/haos_*
|
||||
|
||||
- name: Print cache stats
|
||||
run: |
|
||||
echo "Cache size: $(du -sh /mnt/cache/cc)"
|
||||
echo "Files total: $(find /mnt/cache/cc -mindepth 1 -type f | wc -l)"
|
||||
echo "Old files: $(find /mnt/cache/cc -mindepth 1 -type f -not -anewer output/Makefile | wc -l)"
|
||||
|
||||
- name: "Save cache: object files"
|
||||
if: github.ref == 'refs/heads/dev'
|
||||
uses: actions/cache/save@v3
|
||||
with:
|
||||
path: /mnt/cache/cc
|
||||
key: haos-cc-${{ matrix.board.id }}-${{ github.run_id }}
|
||||
|
||||
- name: Upload ova image to artifacts for test job
|
||||
uses: actions/upload-artifact@v3
|
||||
if: ${{ matrix.board.id == 'ova' }}
|
||||
with:
|
||||
name: ova-image
|
||||
path: |
|
||||
output/images/haos_ova*.qcow2.xz
|
||||
|
||||
test:
|
||||
name: Test OS image
|
||||
needs: [ build, prepare ]
|
||||
uses: ./.github/workflows/test.yaml
|
||||
with:
|
||||
version: ${{ needs.prepare.outputs.version_full }}
|
||||
|
||||
update_index:
|
||||
name: Update artifacts index
|
||||
if: ${{ github.event_name != 'release' }}
|
||||
needs: [ build, prepare ]
|
||||
uses: home-assistant/operating-system/.github/workflows/artifacts-index.yaml@dev
|
||||
with:
|
||||
version: ${{ needs.prepare.outputs.version_full }}
|
||||
secrets:
|
||||
R2_OS_ARTIFACTS_ID: ${{ secrets.R2_OS_ARTIFACTS_ID }}
|
||||
R2_OS_ARTIFACTS_KEY: ${{ secrets.R2_OS_ARTIFACTS_KEY }}
|
||||
R2_OS_ARTIFACTS_BUCKET: ${{ secrets.R2_OS_ARTIFACTS_BUCKET }}
|
||||
R2_OS_ARTIFACTS_ENDPOINT: ${{ secrets.R2_OS_ARTIFACTS_ENDPOINT }}
|
||||
CF_ZONE: ${{ secrets.CF_ZONE }}
|
||||
CF_PURGE_TOKEN: ${{ secrets.CF_PURGE_TOKEN }}
|
||||
|
||||
bump_version:
|
||||
name: Bump ${{ needs.prepare.outputs.channel }} channel version
|
||||
if: ${{ github.repository == 'home-assistant/operating-system' }}
|
||||
environment: ${{ needs.prepare.outputs.channel }}
|
||||
needs: [ build, prepare ]
|
||||
runs-on: ubuntu-22.04
|
||||
|
||||
steps:
|
||||
- name: Checkout source
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
persist-credentials: false
|
||||
|
||||
- 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 ${{ needs.prepare.outputs.channel }} channel version
|
||||
uses: home-assistant/actions/helpers/version-push@master
|
||||
with:
|
||||
key: "hassos[]"
|
||||
key-description: "Home Assistant OS"
|
||||
version: ${{ needs.prepare.outputs.version_full }}
|
||||
channel: ${{ needs.prepare.outputs.channel }}
|
||||
|
||||
- name: Bump Home Assistant OS beta channel version on stable release
|
||||
if: ${{ needs.prepare.outputs.channel == 'stable' }}
|
||||
uses: home-assistant/actions/helpers/version-push@master
|
||||
with:
|
||||
key: "hassos[]"
|
||||
key-description: "Home Assistant OS"
|
||||
version: ${{ needs.prepare.outputs.version_full }}
|
||||
channel: beta
|
||||
|
||||
- name: Bump stable Home Assistant version for RPi Imager
|
||||
if: ${{ github.event_name == 'release' && needs.prepare.outputs.channel == 'stable' }}
|
||||
uses: "./.github/actions/bump-rpi-imager-version"
|
||||
with:
|
||||
version: ${{ needs.prepare.outputs.version_full }}
|
||||
release-date: ${{ github.event.release.published_at }}
|
143
.github/workflows/dev.yml
vendored
143
.github/workflows/dev.yml
vendored
@@ -1,143 +0,0 @@
|
||||
# Home Assistant Operating System build workflow
|
||||
|
||||
name: Development build
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
pull_request_target:
|
||||
types: [opened,synchronize,labeled]
|
||||
|
||||
jobs:
|
||||
prepare:
|
||||
if: ${{ github.event_name == 'workflow_dispatch' || contains(github.event.pull_request.labels.*.name, 'run-dev-build') }}
|
||||
name: Prepare build
|
||||
runs-on: [ "ubuntu-20.04" ]
|
||||
permissions:
|
||||
contents: read
|
||||
pull-requests: read
|
||||
outputs:
|
||||
version_main: ${{ steps.version_main.outputs.version_main }}
|
||||
version_dev: ${{ steps.version_dev.outputs.version_dev }}${{ steps.version_pr.outputs.version_pr }}
|
||||
matrix: ${{ steps.generate_matrix.outputs.result }}
|
||||
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 "version_dev=${version_dev}" >> $GITHUB_OUTPUT
|
||||
- name: Generate Development build version for PR
|
||||
if: ${{ github.event.pull_request }}
|
||||
shell: bash
|
||||
id: version_pr
|
||||
run: |
|
||||
version_pr=$(printf "%05d" ${{ github.event.pull_request.number }})
|
||||
echo "Development build for PR #${{ github.event.pull_request.number }}"
|
||||
echo "version_pr=${version_pr}" >> $GITHUB_OUTPUT
|
||||
- uses: actions/checkout@v3
|
||||
- name: Get Major/Minor version
|
||||
id: version_main
|
||||
run: |
|
||||
major=$(cat ${GITHUB_WORKSPACE}/buildroot-external/meta | grep VERSION_MAJOR | cut -d'=' -f2)
|
||||
build=$(cat ${GITHUB_WORKSPACE}/buildroot-external/meta | grep VERSION_BUILD | cut -d'=' -f2)
|
||||
echo "version_main=${major}.${build}" >> $GITHUB_OUTPUT
|
||||
- name: Create build matrix
|
||||
uses: actions/github-script@v6
|
||||
id: generate_matrix
|
||||
with:
|
||||
script: |
|
||||
const boards = require('./.github/workflows/matrix.json')
|
||||
|
||||
if (context.eventName == "workflow_dispatch") {
|
||||
console.log("Run full build for all boards")
|
||||
return { "board": boards }
|
||||
}
|
||||
|
||||
const labels = context.payload.pull_request.labels.map(l => l.name)
|
||||
const labelsSet = new Set(labels)
|
||||
const buildBoards = boards.filter(b => labelsSet.has(b.label))
|
||||
|
||||
return { "board": buildBoards }
|
||||
|
||||
build:
|
||||
if: ${{ github.event_name == 'workflow_dispatch' || contains(github.event.pull_request.labels.*.name, 'run-dev-build') }}
|
||||
name: Development build for ${{ matrix.board.id }}
|
||||
environment: "dev_build"
|
||||
needs: prepare
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix: ${{ fromJson(needs.prepare.outputs.matrix) }}
|
||||
runs-on: ${{ matrix.board.runner }}
|
||||
|
||||
steps:
|
||||
- name: Define git reference
|
||||
uses: actions/github-script@v6
|
||||
id: generate_gitref
|
||||
with:
|
||||
script: |
|
||||
if (context.eventName == "workflow_dispatch")
|
||||
return { "ref": context.ref }
|
||||
return { "ref": context.payload.pull_request.head.sha }
|
||||
|
||||
- name: Checkout source
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
submodules: true
|
||||
persist-credentials: false
|
||||
ref: ${{ fromJSON(steps.generate_gitref.outputs.result).ref }}
|
||||
|
||||
- name: Build container
|
||||
run: docker build -t haos-builder .
|
||||
|
||||
- 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" \
|
||||
-v "/build/output" \
|
||||
haos-builder make BUILDDIR=/build VERSION_DEV=${{ needs.prepare.outputs.version_dev }} ${{ matrix.board.defconfig }}
|
||||
|
||||
- name: Upload images
|
||||
uses: burnett01/rsync-deployments@5.2
|
||||
with:
|
||||
rsh: -q
|
||||
switches: -aW
|
||||
path: release/
|
||||
remote_path: ${{ secrets.DEV_TARGET_PATH }}/${{ needs.prepare.outputs.version_main }}.${{ needs.prepare.outputs.version_dev }}/
|
||||
remote_host: ${{ secrets.DEV_HOST }}
|
||||
remote_port: ${{ secrets.DEV_PORT }}
|
||||
remote_user: ${{ secrets.DEV_USERNAME }}
|
||||
remote_key: ${{ secrets.DEV_SSH_KEY }}
|
||||
|
||||
bump_version:
|
||||
name: Bump dev channel version
|
||||
if: ${{ github.event_name == 'workflow_dispatch' }}
|
||||
needs: [ build, prepare ]
|
||||
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 channel version to ${{ needs.prepare.outputs.version_main }}.${{ needs.prepare.outputs.version_dev }}
|
||||
uses: home-assistant/actions/helpers/version-push@master
|
||||
with:
|
||||
key: "hassos[]"
|
||||
key-description: "Home Assistant OS"
|
||||
version: ${{ needs.prepare.outputs.version_main }}.${{ needs.prepare.outputs.version_dev }}
|
||||
channel: "dev"
|
2
.github/workflows/label-actions.yml
vendored
2
.github/workflows/label-actions.yml
vendored
@@ -14,4 +14,4 @@ jobs:
|
||||
action:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: dessant/label-actions@v3.0.0
|
||||
- uses: dessant/label-actions@v3.1.0
|
||||
|
38
.github/workflows/matrix.json
vendored
38
.github/workflows/matrix.json
vendored
@@ -2,97 +2,103 @@
|
||||
{
|
||||
"id": "ova",
|
||||
"defconfig": "ova",
|
||||
"runner": "x86-64-runner",
|
||||
"architecture": "x86-64",
|
||||
"label": "board/ova"
|
||||
},
|
||||
{
|
||||
"id": "generic-x86-64",
|
||||
"defconfig": "generic_x86_64",
|
||||
"runner": "x86-64-runner",
|
||||
"architecture": "x86-64",
|
||||
"label": "board/generic-x86-64"
|
||||
},
|
||||
{
|
||||
"id": "generic-aarch64",
|
||||
"defconfig": "generic_aarch64",
|
||||
"runner": "aarch64-runner",
|
||||
"architecture": "aarch64",
|
||||
"label": "board/generic-aarch64"
|
||||
},
|
||||
{
|
||||
"id": "khadas-vim3",
|
||||
"defconfig": "khadas_vim3",
|
||||
"runner": "aarch64-runner",
|
||||
"architecture": "aarch64",
|
||||
"label": "board/khadas"
|
||||
},
|
||||
{
|
||||
"id": "odroid-c2",
|
||||
"defconfig": "odroid_c2",
|
||||
"runner": "aarch64-runner",
|
||||
"architecture": "aarch64",
|
||||
"label": "board/odroid"
|
||||
},
|
||||
{
|
||||
"id": "odroid-c4",
|
||||
"defconfig": "odroid_c4",
|
||||
"runner": "aarch64-runner",
|
||||
"architecture": "aarch64",
|
||||
"label": "board/odroid"
|
||||
},
|
||||
{
|
||||
"id": "odroid-m1",
|
||||
"defconfig": "odroid_m1",
|
||||
"runner": "aarch64-runner",
|
||||
"architecture": "aarch64",
|
||||
"label": "board/odroid"
|
||||
},
|
||||
{
|
||||
"id": "odroid-n2",
|
||||
"defconfig": "odroid_n2",
|
||||
"runner": "aarch64-runner",
|
||||
"architecture": "aarch64",
|
||||
"label": "board/odroid"
|
||||
},
|
||||
{
|
||||
"id": "odroid-xu4",
|
||||
"defconfig": "odroid_xu4",
|
||||
"runner": "aarch64-runner",
|
||||
"architecture": "aarch64",
|
||||
"label": "board/odroid"
|
||||
},
|
||||
{
|
||||
"id": "rpi2",
|
||||
"defconfig": "rpi2",
|
||||
"runner": "arm-runner",
|
||||
"architecture": "arm",
|
||||
"label": "board/raspberrypi"
|
||||
},
|
||||
{
|
||||
"id": "rpi3",
|
||||
"defconfig": "rpi3",
|
||||
"runner": "arm-runner",
|
||||
"architecture": "arm",
|
||||
"label": "board/raspberrypi"
|
||||
},
|
||||
{
|
||||
"id": "rpi3-64",
|
||||
"defconfig": "rpi3_64",
|
||||
"runner": "aarch64-runner",
|
||||
"architecture": "aarch64",
|
||||
"label": "board/raspberrypi"
|
||||
},
|
||||
{
|
||||
"id": "rpi4",
|
||||
"defconfig": "rpi4",
|
||||
"runner": "arm-runner",
|
||||
"architecture": "arm",
|
||||
"label": "board/raspberrypi"
|
||||
},
|
||||
{
|
||||
"id": "rpi4-64",
|
||||
"defconfig": "rpi4_64",
|
||||
"runner": "aarch64-runner",
|
||||
"architecture": "aarch64",
|
||||
"label": "board/raspberrypi"
|
||||
},
|
||||
{
|
||||
"id": "yellow",
|
||||
"defconfig": "yellow",
|
||||
"runner": "aarch64-runner",
|
||||
"architecture": "aarch64",
|
||||
"label": "board/yellow"
|
||||
},
|
||||
{
|
||||
"id": "green",
|
||||
"defconfig": "green",
|
||||
"architecture": "aarch64",
|
||||
"label": "board/green"
|
||||
},
|
||||
{
|
||||
"id": "tinker",
|
||||
"defconfig": "tinker",
|
||||
"runner": "arm-runner",
|
||||
"architecture": "arm",
|
||||
"label": "board/tinker"
|
||||
}
|
||||
]
|
||||
|
2
.github/workflows/pr-checks.yml
vendored
2
.github/workflows/pr-checks.yml
vendored
@@ -9,7 +9,7 @@ jobs:
|
||||
runs-on: ubuntu-22.04
|
||||
steps:
|
||||
- name: Check out code
|
||||
uses: actions/checkout@v3
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
submodules: true
|
||||
|
||||
|
176
.github/workflows/release.yml
vendored
176
.github/workflows/release.yml
vendored
@@ -1,176 +0,0 @@
|
||||
# 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 }}
|
||||
matrix: ${{ steps.generate_matrix.outputs.result }}
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- 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 "version=${major}.${build}.${tag_dev}" >> $GITHUB_OUTPUT
|
||||
else
|
||||
echo "version=${major}.${build}" >> $GITHUB_OUTPUT
|
||||
fi
|
||||
echo "version_dev=${tag_dev}" >> $GITHUB_OUTPUT
|
||||
- name: Create build matrix
|
||||
uses: actions/github-script@v6
|
||||
id: generate_matrix
|
||||
with:
|
||||
script: |
|
||||
const boards = require('./.github/workflows/matrix.json')
|
||||
return { "board": boards }
|
||||
|
||||
build:
|
||||
permissions:
|
||||
contents: write # for actions/upload-release-asset to upload release asset
|
||||
name: Release build for ${{ matrix.board.id }}
|
||||
needs: validate_release
|
||||
strategy:
|
||||
matrix: ${{ fromJson(needs.validate_release.outputs.matrix) }}
|
||||
runs-on: ${{ matrix.board.runner }}
|
||||
|
||||
steps:
|
||||
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
submodules: true
|
||||
|
||||
- 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" \
|
||||
-v "/build/output" \
|
||||
haos-builder make BUILDDIR=/build VERSION_DEV=${{ needs.validate_release.outputs.version_dev }} ${{ matrix.board.defconfig }}
|
||||
|
||||
- name: Upload disk image
|
||||
if: ${{ matrix.board.id != 'ova' }}
|
||||
uses: actions/upload-release-asset@v1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
upload_url: ${{ github.event.release.upload_url }}
|
||||
asset_path: ${{ github.workspace }}/release/haos_${{ matrix.board.id }}-${{ needs.validate_release.outputs.version }}.img.xz
|
||||
asset_name: haos_${{ matrix.board.id }}-${{ needs.validate_release.outputs.version }}.img.xz
|
||||
asset_content_type: application/x-xz
|
||||
|
||||
- name: Upload rauc update
|
||||
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.id }}-${{ needs.validate_release.outputs.version }}.raucb
|
||||
asset_name: haos_${{ matrix.board.id }}-${{ needs.validate_release.outputs.version }}.raucb
|
||||
asset_content_type: application/octet-stream
|
||||
|
||||
- name: Upload ova image
|
||||
if: ${{ matrix.board.id == 'ova' }}
|
||||
uses: actions/upload-release-asset@v1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
upload_url: ${{ github.event.release.upload_url }}
|
||||
asset_path: ${{ github.workspace }}/release/haos_${{ matrix.board.id }}-${{ needs.validate_release.outputs.version }}.ova
|
||||
asset_name: haos_${{ matrix.board.id }}-${{ needs.validate_release.outputs.version }}.ova
|
||||
asset_content_type: application/x-tar
|
||||
|
||||
- name: Upload qcow2 image
|
||||
if: ${{ matrix.board.id == 'ova' || matrix.board.id == 'generic-aarch64' }}
|
||||
uses: actions/upload-release-asset@v1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
upload_url: ${{ github.event.release.upload_url }}
|
||||
asset_path: ${{ github.workspace }}/release/haos_${{ matrix.board.id }}-${{ needs.validate_release.outputs.version }}.qcow2.xz
|
||||
asset_name: haos_${{ matrix.board.id }}-${{ needs.validate_release.outputs.version }}.qcow2.xz
|
||||
asset_content_type: application/x-xz
|
||||
|
||||
- name: Upload vdi image
|
||||
if: ${{ matrix.board.id == 'ova' }}
|
||||
uses: actions/upload-release-asset@v1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
upload_url: ${{ github.event.release.upload_url }}
|
||||
asset_path: ${{ github.workspace }}/release/haos_${{ matrix.board.id }}-${{ needs.validate_release.outputs.version }}.vdi.zip
|
||||
asset_name: haos_${{ matrix.board.id }}-${{ needs.validate_release.outputs.version }}.vdi.zip
|
||||
asset_content_type: application/zip
|
||||
|
||||
- name: Upload vhdx image
|
||||
if: ${{ matrix.board.id == 'ova' }}
|
||||
uses: actions/upload-release-asset@v1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
upload_url: ${{ github.event.release.upload_url }}
|
||||
asset_path: ${{ github.workspace }}/release/haos_${{ matrix.board.id }}-${{ needs.validate_release.outputs.version }}.vhdx.zip
|
||||
asset_name: haos_${{ matrix.board.id }}-${{ needs.validate_release.outputs.version }}.vhdx.zip
|
||||
asset_content_type: application/zip
|
||||
|
||||
- name: Upload vmdk image
|
||||
if: ${{ matrix.board.id == 'ova' || matrix.board.id == 'generic-aarch64' }}
|
||||
uses: actions/upload-release-asset@v1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
upload_url: ${{ github.event.release.upload_url }}
|
||||
asset_path: ${{ github.workspace }}/release/haos_${{ matrix.board.id }}-${{ needs.validate_release.outputs.version }}.vmdk.zip
|
||||
asset_name: haos_${{ matrix.board.id }}-${{ needs.validate_release.outputs.version }}.vmdk.zip
|
||||
asset_content_type: application/zip
|
||||
|
||||
bump_version:
|
||||
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"
|
4
.github/workflows/stale.yml
vendored
4
.github/workflows/stale.yml
vendored
@@ -3,7 +3,7 @@ name: Stale
|
||||
# yamllint disable-line rule:truthy
|
||||
on:
|
||||
schedule:
|
||||
- cron: "0 * * * *"
|
||||
- cron: "40 5 * * *"
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
@@ -19,7 +19,7 @@ jobs:
|
||||
# - No PRs marked as no-stale or pinned
|
||||
# - No issues marked as no-stale, help-wanted or pinned
|
||||
- name: 90 days stale issues & PRs policy
|
||||
uses: actions/stale@v7.0.0
|
||||
uses: actions/stale@v8.0.0
|
||||
with:
|
||||
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
days-before-stale: 90
|
||||
|
94
.github/workflows/test.yaml
vendored
Normal file
94
.github/workflows/test.yaml
vendored
Normal file
@@ -0,0 +1,94 @@
|
||||
name: Test HAOS image
|
||||
run-name: "Test HAOS ${{ inputs.version || format('(OS build #{0})', github.event.workflow_run.run_number) }}"
|
||||
|
||||
on:
|
||||
# Manual test of specified version
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
version:
|
||||
description: Version of HAOS to test
|
||||
required: true
|
||||
type: string
|
||||
|
||||
# Called by other workflows (e.g. build.yaml)
|
||||
workflow_call:
|
||||
inputs:
|
||||
use-artifact:
|
||||
# Workaround for GH weirdness: https://github.com/actions/runner/discussions/1884
|
||||
description: Download OS image using actions/download-artifact
|
||||
required: false
|
||||
type: boolean
|
||||
default: true
|
||||
|
||||
jobs:
|
||||
test:
|
||||
if: ${{ github.event_name != 'workflow_run' || github.event.workflow_run.conclusion == 'success' }}
|
||||
|
||||
env:
|
||||
NO_KVM: 1
|
||||
|
||||
name: Test in QEMU
|
||||
runs-on: ubuntu-22.04
|
||||
steps:
|
||||
- name: Checkout source
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
persist-credentials: false
|
||||
|
||||
- name: Install system dependencies
|
||||
run: |
|
||||
sudo apt update
|
||||
sudo apt install -y qemu-system-x86 ovmf
|
||||
|
||||
- name: Setup Python
|
||||
uses: actions/setup-python@v4
|
||||
with:
|
||||
python-version: 3.12
|
||||
|
||||
- name: Install Python requirements
|
||||
run:
|
||||
pip install -r tests/requirements.txt
|
||||
|
||||
- name: Download HAOS image
|
||||
if: ${{ !inputs.use-artifact }}
|
||||
run: |
|
||||
curl -sfL -o haos.qcow2.xz https://os-artifacts.home-assistant.io/${{github.event.inputs.version}}/haos_ova-${{github.event.inputs.version}}.qcow2.xz
|
||||
|
||||
- name: Get OS image artifact
|
||||
if: ${{ inputs.use-artifact }}
|
||||
uses: actions/download-artifact@v3
|
||||
with:
|
||||
name: ova-image
|
||||
|
||||
- name: Extract OS image
|
||||
run: |
|
||||
xz -dc haos*.qcow2.xz > tests/haos.qcow2
|
||||
rm haos*.qcow2.xz
|
||||
|
||||
- name: Run tests
|
||||
run: |
|
||||
./tests/run_tests.sh
|
||||
|
||||
- name: Archive logs
|
||||
uses: actions/upload-artifact@v3
|
||||
if: always()
|
||||
with:
|
||||
name: logs
|
||||
path: |
|
||||
tests/lg_logs/**
|
||||
|
||||
- name: Archive JUnit reports
|
||||
uses: actions/upload-artifact@v3
|
||||
if: always()
|
||||
with:
|
||||
name: junit_reports
|
||||
path: |
|
||||
tests/junit_reports/*.xml
|
||||
|
||||
- name: Publish test report
|
||||
uses: mikepenz/action-junit-report@v4
|
||||
if: always()
|
||||
with:
|
||||
report_paths: 'tests/junit_reports/*.xml'
|
||||
annotate_only: true
|
||||
detailed_summary: true
|
2
.gitignore
vendored
2
.gitignore
vendored
@@ -9,4 +9,4 @@ output*/
|
||||
*.pem
|
||||
|
||||
# vscode generated files
|
||||
.vscode*
|
||||
.vscode*
|
||||
|
82
.os-artifacts/index.html
Normal file
82
.os-artifacts/index.html
Normal file
@@ -0,0 +1,82 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Home Assistant OS - development builds</title>
|
||||
<link rel="shortcut icon" href="https://brands.home-assistant.io/homeassistant/icon.png">
|
||||
<style>
|
||||
body {
|
||||
font-family: 'Trebuchet MS', 'Lucida Sans Unicode', 'Lucida Grande', 'Lucida Sans', Arial, sans-serif;
|
||||
}
|
||||
|
||||
.error {
|
||||
color: maroon;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<h1>Home Assistant OS - development builds</h1>
|
||||
<select id="os-builds"></select>
|
||||
<div id="os-builds-list"></div>
|
||||
<script>
|
||||
const buildSelect = document.getElementById('os-builds');
|
||||
const osBuildsList = document.getElementById('os-builds-list');
|
||||
|
||||
const fillVersions = async () => {
|
||||
try {
|
||||
const response = await fetch('/index.json');
|
||||
if (!response.ok) {
|
||||
const p = document.createElement('p');
|
||||
p.className = "error";
|
||||
p.textContent = "Could not load version index file.";
|
||||
osBuildsList.appendChild(p);
|
||||
return;
|
||||
}
|
||||
const items = await response.json();
|
||||
items.reverse();
|
||||
|
||||
items.forEach(buildVersion => {
|
||||
buildSelect.appendChild(new Option(buildVersion, buildVersion));
|
||||
});
|
||||
|
||||
buildSelect.dispatchEvent(new Event('change'));
|
||||
} catch (error) {
|
||||
console.error('Error fetching data:', error);
|
||||
}
|
||||
}
|
||||
|
||||
buildSelect.addEventListener('change', async function() {
|
||||
osBuildsList.innerHTML = '';
|
||||
|
||||
const buildVersion = this.value;
|
||||
|
||||
try {
|
||||
const response = await fetch(`/indexes/${buildVersion}.json`);
|
||||
if (!response.ok) {
|
||||
const p = document.createElement('p');
|
||||
p.className = "error";
|
||||
p.textContent = `Could not load index file for version ${buildVersion}.`;
|
||||
osBuildsList.appendChild(p);
|
||||
return;
|
||||
}
|
||||
const images = await response.json();
|
||||
|
||||
const ul = document.createElement('ul');
|
||||
images.forEach(image => {
|
||||
const li = document.createElement('li');
|
||||
const a = document.createElement('a');
|
||||
a.href =`/${buildVersion}/${image}`;
|
||||
a.textContent = image;
|
||||
li.appendChild(a);
|
||||
ul.appendChild(li);
|
||||
});
|
||||
|
||||
osBuildsList.appendChild(ul);
|
||||
} catch (error) {
|
||||
console.error('Error fetching images:', error);
|
||||
}
|
||||
});
|
||||
|
||||
fillVersions();
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
@@ -5,27 +5,25 @@
|
||||
The following boards/devices are supported:
|
||||
|
||||
- Raspberry Pi
|
||||
- Pi 4 Model B (1 GB, 2 GB, 4 GB and 8 GB model) 64-bit (recommended)
|
||||
- Pi 4 Model B (1 GB, 2 GB, 4 GB and 8 GB model) 32-bit
|
||||
- Pi 3 Model B and B+ 64-bit (recommended)
|
||||
- Pi 3 Model B and B+ 32-bit
|
||||
- Pi 2 (not recommended)
|
||||
- Pi Zero-W (not recommended)
|
||||
- Pi (not recommended)
|
||||
- Pi 4 Model B ([1 GB](https://www.raspberrypi.com/products/raspberry-pi-4-model-b/?variant=raspberry-pi-4-model-b-1gb), [2 GB](https://www.raspberrypi.com/products/raspberry-pi-4-model-b/?variant=raspberry-pi-4-model-b-2gb), [4 GB](https://www.raspberrypi.com/products/raspberry-pi-4-model-b/?variant=raspberry-pi-4-model-b-4gb) and [8 GB](https://www.raspberrypi.com/products/raspberry-pi-4-model-b/?variant=raspberry-pi-4-model-b-8gb) model) 32-bit or 64-bit (recommended)
|
||||
- [Pi 3 Model B](https://www.raspberrypi.com/products/raspberry-pi-3-model-b/) and [B+](https://www.raspberrypi.com/products/raspberry-pi-3-model-b-plus/) 32-bit or 64-bit (recommended)
|
||||
- [Pi 2](https://www.raspberrypi.com/products/raspberry-pi-2-model-b/) (not recommended)
|
||||
- [Pi Zero-W](https://www.raspberrypi.com/products/raspberry-pi-zero-w/) (not recommended)
|
||||
- [Pi](https://www.raspberrypi.com/products/raspberry-pi-1-model-b-plus/) (not recommended)
|
||||
- Hardkernel
|
||||
- ODROID-C2
|
||||
- ODROID-C4
|
||||
- ODROID-M1
|
||||
- ODROID-N2
|
||||
- ODROID-N2+
|
||||
- ODROID-XU4
|
||||
- [ODROID-C2](https://www.hardkernel.com/shop/odroid-c2/) (discontinued)
|
||||
- [ODROID-C4](https://www.hardkernel.com/shop/odroid-c4/)
|
||||
- [ODROID-M1](https://www.hardkernel.com/shop/odroid-m1/)
|
||||
- [ODROID-N2](https://www.hardkernel.com/shop/odroid-n2/) (discontinued)
|
||||
- ODROID-N2+ [2 GB](https://www.hardkernel.com/shop/odroid-n2-with-2gbyte-ram-2/) or [4 GB](https://www.hardkernel.com/shop/odroid-n2-with-4gbyte-ram-2/)
|
||||
- [ODROID-XU4](https://www.hardkernel.com/shop/odroid-xu4-special-price/)
|
||||
- Asus
|
||||
- Tinker Board
|
||||
- [Tinker Board](https://tinker-board.asus.com/product/tinker-board.html)
|
||||
- Generic x86-64 (UEFI, not suited for virtualization)
|
||||
- Intel NUC5CPYH
|
||||
- Intel NUC6CAYH
|
||||
- Intel NUC10I3FNK2
|
||||
- Gigabyte GB-BPCE-3455
|
||||
- [Intel NUC5CPYH](https://www.intel.com/content/www/us/en/products/sku/85254/intel-nuc-kit-nuc5cpyh/specifications.html)
|
||||
- [Intel NUC6CAYH](https://www.intel.com/content/www/us/en/products/sku/95062/intel-nuc-kit-nuc6cayh/specifications.html)
|
||||
- [Intel NUC10I3FNK2](https://www.intel.com/content/www/us/en/products/sku/195503/intel-nuc-10-performance-kit-nuc10i3fnk/specifications.html)
|
||||
- [Gigabyte GB-BPCE-3455](https://www.gigabyte.com/Mini-PcBarebone/GB-BPCE-3455-rev-10/sp#sp)
|
||||
- Computers supporting x86-64 architecture and UEFI boot should generally work
|
||||
- Virtual appliance (x86_64/UEFI):
|
||||
- VMDK
|
||||
|
@@ -8,9 +8,20 @@ SD-card boot is supported via on-board bootloader (SPL) or recovery button.
|
||||
|
||||
## eMMC
|
||||
|
||||
eMMC boot is currently only supported via recovery button. eMMC boot via
|
||||
on-board bootloader will require an update of Petitboot (as of March 13 2023,
|
||||
this update hasn't been released yet.
|
||||
eMMC boot via on-board bootloader requires the latest version of Petitboot
|
||||
(spiboot 20230328). To install the latest version download the SPI boot image
|
||||
from [linuxfactory.or.kr][1] as follows:
|
||||
|
||||
1. Download `spiupdate_odroidm1_20220304.img.xz`
|
||||
2. Use balenaEtcher or another tool to flash the updater onto an SD card
|
||||
3. Download `spiboot-20230328.img`
|
||||
4. Rename the `spiboot-20230328.img` file to`spiboot.img`.
|
||||
5. Paste the `spiboot.img` file onto the FAT partition of that same SD card.
|
||||
6. Plug-in that SD card to your ODROID-M1. Petitboot will update itself, you can verify the progress on the HDMI output.
|
||||
7. If you see the version 20230328 in the top right corner, the installation was successful.
|
||||
* If you see any other version there, the installation failed.
|
||||
|
||||
Once Petitboot is updated you can flash Home Assistant OS directly onto an eMMC.
|
||||
|
||||
## NVMe
|
||||
|
||||
@@ -24,8 +35,8 @@ However, the ODROID-M1 automatically boots from internal SPI. To boot
|
||||
directly off the SD-card or eMMC you need to press the recovery button.
|
||||
|
||||
The SPI flashed U-Boot SPL tries searches for an U-Boot binary on the SD-card
|
||||
(and future releases also on the eMMC). This mechanism allows you to boot the Home
|
||||
Assistant OS U-Boot without pressing the recovery button.
|
||||
(and from eMMC with Petitboot 20230328 and later). This mechanism allows you to
|
||||
boot the Home Assistant OS U-Boot without pressing the recovery button.
|
||||
|
||||
## Console
|
||||
|
||||
@@ -35,3 +46,5 @@ The serial console's baudrate is 1500000 by default.
|
||||
The systemd startup messages will only appear on the serial console by default.
|
||||
To show the messages on the HDMI console instead, add the console manually
|
||||
to the `cmdline.txt` file on the boot partition (e.g. `console=tty0`).
|
||||
|
||||
[1]: http://ppa.linuxfactory.or.kr/images/petitboot/odroidm1/
|
||||
|
@@ -1,23 +1,24 @@
|
||||
|
||||
# Kernel Version
|
||||
|
||||
Default Kernel tree: 5.15
|
||||
Default Kernel tree: 6.1
|
||||
|
||||
| Board | Version |
|
||||
|-------|---------|
|
||||
| Open Virtual Appliance | 6.1.21 |
|
||||
| Raspberry Pi | 6.1.19 |
|
||||
| Raspberry Pi 0-W | 6.1.19 |
|
||||
| Raspberry Pi 2 | 6.1.19 |
|
||||
| Raspberry Pi 3 | 6.1.19 |
|
||||
| Raspberry Pi 4 | 6.1.19 |
|
||||
| Home Assistant Yellow | 6.1.19 |
|
||||
| Tinker Board | 6.1.21 |
|
||||
| ODROID-C2 | 6.1.21 |
|
||||
| ODROID-C4 | 6.1.21 |
|
||||
| ODROID-M1 | 6.1.21 |
|
||||
| ODROID-N2 | 6.1.21 |
|
||||
| ODROID-XU4 | 6.1.21 |
|
||||
| Generic aarch64 | 6.1.21 |
|
||||
| Generic x86-64 | 6.1.21 |
|
||||
| Khadas VIM3 | 6.1.21 |
|
||||
| Open Virtual Appliance | 6.1.60 |
|
||||
| Raspberry Pi | 6.1.58 |
|
||||
| Raspberry Pi 0-W | 6.1.58 |
|
||||
| Raspberry Pi 2 | 6.1.58 |
|
||||
| Raspberry Pi 3 | 6.1.58 |
|
||||
| Raspberry Pi 4 | 6.1.58 |
|
||||
| Home Assistant Yellow | 6.1.58 |
|
||||
| Home Assistant Green | 6.1.60 |
|
||||
| Tinker Board | 6.1.60 |
|
||||
| ODROID-C2 | 6.1.60 |
|
||||
| ODROID-C4 | 6.1.60 |
|
||||
| ODROID-M1 | 6.1.60 |
|
||||
| ODROID-N2 | 6.1.60 |
|
||||
| ODROID-XU4 | 6.1.60 |
|
||||
| Generic aarch64 | 6.1.60 |
|
||||
| Generic x86-64 | 6.1.60 |
|
||||
| Khadas VIM3 | 6.1.60 |
|
||||
|
@@ -188,6 +188,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/manpages.html
|
||||
[nm-manual]: https://networkmanager.dev/docs/api/1.40/manpages.html
|
||||
[configuration-usb]: configuration.md
|
||||
[uuid]: https://www.uuidgenerator.net/
|
||||
[uuid]: https://www.uuidgenerator.net/version4
|
||||
|
11
Makefile
11
Makefile
@@ -1,11 +1,8 @@
|
||||
BUILDDIR:=$(shell pwd)
|
||||
RELEASE_DIR = $(BUILDDIR)/release
|
||||
|
||||
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)))
|
||||
@@ -23,9 +20,6 @@ endif
|
||||
|
||||
all: $(TARGETS)
|
||||
|
||||
$(RELEASE_DIR):
|
||||
mkdir -p $(RELEASE_DIR)
|
||||
|
||||
savedefconfig:
|
||||
@echo "config $*"
|
||||
$(MAKE) -C $(BUILDROOT) O=$(O) BR2_EXTERNAL=$(BUILDROOT_EXTERNAL) "savedefconfig"
|
||||
@@ -34,10 +28,9 @@ $(TARGETS_CONFIG): %-config:
|
||||
@echo "config $*"
|
||||
$(MAKE) -C $(BUILDROOT) O=$(O) BR2_EXTERNAL=$(BUILDROOT_EXTERNAL) "$*_defconfig"
|
||||
|
||||
$(TARGETS): %: $(RELEASE_DIR) %-config
|
||||
$(TARGETS): %: %-config
|
||||
@echo "build $@"
|
||||
$(MAKE) -C $(BUILDROOT) O=$(O) BR2_EXTERNAL=$(BUILDROOT_EXTERNAL) VERSION_DEV=$(VERSION_DEV)
|
||||
cp -f $(O)/images/haos_* $(RELEASE_DIR)/
|
||||
$(MAKE) -C $(BUILDROOT) O=$(O) BR2_EXTERNAL=$(BUILDROOT_EXTERNAL)
|
||||
|
||||
# Do not clean when building for one target
|
||||
ifneq ($(words $(filter $(TARGETS),$(MAKECMDGOALS))), 1)
|
||||
|
@@ -2,7 +2,7 @@
|
||||
|
||||
Home Assistant Operating System (formerly HassOS) is a Linux based operating system optimized to host [Home Assistant](https://www.home-assistant.io) and its [Add-ons](https://www.home-assistant.io/addons/).
|
||||
|
||||
Home Assistant Operating System uses Docker as Container engine. It by default deploys the Home Assistant Supervisor as a container. Home Assistant Supervisor in turn uses the Docker container engine to control Home Assistant Core and Add-Ons in separate containers. Home Assistant Operating System is **not** based on a regular Linux distribution like Ubuntu. It is built using [Buildroot](https://buildroot.org/) and it is optimized to run Home Assistant. It targets single board compute (SBC) devices like the Raspberry Pi or ODROID but also supports x86-64 systems with UEFI.
|
||||
Home Assistant Operating System uses Docker as its container engine. By default it deploys the Home Assistant Supervisor as a container. Home Assistant Supervisor in turn uses the Docker container engine to control Home Assistant Core and Add-Ons in separate containers. Home Assistant Operating System is **not** based on a regular Linux distribution like Ubuntu. It is built using [Buildroot](https://buildroot.org/) and it is optimized to run Home Assistant. It targets single board compute (SBC) devices like the Raspberry Pi or ODROID but also supports x86-64 systems with UEFI.
|
||||
|
||||
## Features
|
||||
|
||||
@@ -55,4 +55,4 @@ The Home Assistant Operating System documentation can be found on the [Home Assi
|
||||
|
||||
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/).
|
||||
available at [https://os-artifacts.home-assistant.io/index.html](https://os-artifacts.home-assistant.io/index.html).
|
||||
|
Submodule buildroot updated: 2ccc4c3f04...2a3f23fc4b
@@ -60,7 +60,7 @@ fi
|
||||
|
||||
save_env A_TRY A_OK B_TRY B_OK ORDER MACHINE_ID
|
||||
|
||||
default_cmdline="rootwait zram.enabled=1 zram.num_devices=3 net.naming-scheme=v250 systemd.machine_id=$MACHINE_ID fsck.repair=yes $boot_condition"
|
||||
default_cmdline="rootwait zram.enabled=1 zram.num_devices=3 systemd.machine_id=$MACHINE_ID fsck.repair=yes $boot_condition"
|
||||
file_env -f ($root)/cmdline.txt cmdline
|
||||
|
||||
# root is a full HDD/partition definition in GRUB format like hd0,gpt1
|
||||
|
@@ -20,7 +20,7 @@ test -n "${BOOT_B_LEFT}" || setenv BOOT_B_LEFT 3
|
||||
test -n "${MACHINE_ID}" || setenv BOOT_CONDITION "systemd.condition-first-boot=true"
|
||||
|
||||
# HassOS bootargs
|
||||
setenv bootargs_hassos "zram.enabled=1 zram.num_devices=3 net.naming-scheme=v250 systemd.machine_id=${MACHINE_ID} fsck.repair=yes ${BOOT_CONDITION}"
|
||||
setenv bootargs_hassos "zram.enabled=1 zram.num_devices=3 systemd.machine_id=${MACHINE_ID} fsck.repair=yes ${BOOT_CONDITION}"
|
||||
|
||||
# HassOS system A/B
|
||||
setenv bootargs_a "root=PARTUUID=8d3d53e3-6d49-4c38-8349-aff6859e82fd rootfstype=squashfs ro rootwait"
|
||||
|
@@ -4289,3 +4289,7 @@ CONFIG_RCU_CPU_STALL_TIMEOUT=60
|
||||
CONFIG_FUNCTION_ERROR_INJECTION=y
|
||||
# CONFIG_RUNTIME_TESTING_MENU is not set
|
||||
CONFIG_MEMTEST=y
|
||||
CONFIG_ARMV8_DEPRECATED=y
|
||||
CONFIG_SWP_EMULATION=y
|
||||
CONFIG_CP15_BARRIER_EMULATION=y
|
||||
CONFIG_SETEND_EMULATION=y
|
||||
|
@@ -22,7 +22,7 @@ test -n "${BOOT_B_LEFT}" || setenv BOOT_B_LEFT 3
|
||||
test -n "${MACHINE_ID}" || setenv BOOT_CONDITION "systemd.condition-first-boot=true"
|
||||
|
||||
# HassOS bootargs
|
||||
setenv bootargs_hassos "zram.enabled=1 zram.num_devices=3 net.naming-scheme=v250 systemd.machine_id=${MACHINE_ID} fsck.repair=yes ${BOOT_CONDITION}"
|
||||
setenv bootargs_hassos "zram.enabled=1 zram.num_devices=3 systemd.machine_id=${MACHINE_ID} fsck.repair=yes ${BOOT_CONDITION}"
|
||||
|
||||
# HassOS system A/B
|
||||
setenv bootargs_a "root=PARTUUID=48617373-06 rootfstype=squashfs ro rootwait"
|
||||
|
@@ -22,7 +22,7 @@ test -n "${BOOT_B_LEFT}" || setenv BOOT_B_LEFT 3
|
||||
test -n "${MACHINE_ID}" || setenv BOOT_CONDITION "systemd.condition-first-boot=true"
|
||||
|
||||
# HassOS bootargs
|
||||
setenv bootargs_hassos "zram.enabled=1 zram.num_devices=3 net.naming-scheme=v250 systemd.machine_id=${MACHINE_ID} clk_ignore_unused usb-storage.quirks=0x2537:0x1066:u,0x2537:0x1068:u ${BOOT_CONDITION}"
|
||||
setenv bootargs_hassos "zram.enabled=1 zram.num_devices=3 systemd.machine_id=${MACHINE_ID} clk_ignore_unused usb-storage.quirks=0x2537:0x1066:u,0x2537:0x1068:u ${BOOT_CONDITION}"
|
||||
|
||||
# HassOS system A/B
|
||||
setenv bootargs_a "root=PARTUUID=48617373-06 rootfstype=squashfs ro rootwait"
|
||||
|
@@ -7,3 +7,5 @@ CONFIG_KEYBOARD_GPIO=y
|
||||
CONFIG_KEYBOARD_GPIO_POLLED=y
|
||||
|
||||
CONFIG_MMC_SDHCI_OF_DWCMSHC=y
|
||||
|
||||
# CONFIG_DW_WATCHDOG is not set
|
||||
|
@@ -1,5 +1,5 @@
|
||||
From d388735d551e09b00317a509859fca51776b9826 Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <d388735d551e09b00317a509859fca51776b9826.1678107917.git.stefan@agner.ch>
|
||||
Message-ID: <d388735d551e09b00317a509859fca51776b9826.1688490481.git.stefan@agner.ch>
|
||||
From: Dongjin Kim <tobetter@gmail.com>
|
||||
Date: Fri, 30 Sep 2022 07:12:35 +0200
|
||||
Subject: [PATCH] arm64: dts: rockchip: Add Hardkernel ODROID-M1 board
|
||||
@@ -451,5 +451,5 @@ index 000000000000..b3016437640b
|
||||
+ status = "okay";
|
||||
+};
|
||||
--
|
||||
2.39.2
|
||||
2.41.0
|
||||
|
||||
|
@@ -1,7 +1,7 @@
|
||||
From 24048c1753916bd983746542b16d19d2b399eeb7 Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <24048c1753916bd983746542b16d19d2b399eeb7.1678107917.git.stefan@agner.ch>
|
||||
In-Reply-To: <d388735d551e09b00317a509859fca51776b9826.1678107917.git.stefan@agner.ch>
|
||||
References: <d388735d551e09b00317a509859fca51776b9826.1678107917.git.stefan@agner.ch>
|
||||
Message-ID: <24048c1753916bd983746542b16d19d2b399eeb7.1688490481.git.stefan@agner.ch>
|
||||
In-Reply-To: <d388735d551e09b00317a509859fca51776b9826.1688490481.git.stefan@agner.ch>
|
||||
References: <d388735d551e09b00317a509859fca51776b9826.1688490481.git.stefan@agner.ch>
|
||||
From: Aurelien Jarno <aurelien@aurel32.net>
|
||||
Date: Fri, 30 Sep 2022 07:12:36 +0200
|
||||
Subject: [PATCH] arm64: dts: rockchip: add thermal support to ODROID-M1
|
||||
@@ -34,5 +34,5 @@ index b3016437640b..112c65af3f55 100644
|
||||
status = "okay";
|
||||
};
|
||||
--
|
||||
2.39.2
|
||||
2.41.0
|
||||
|
||||
|
@@ -1,7 +1,7 @@
|
||||
From 982bb2beab8e38a7c0a365770be2ad9c5221a650 Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <982bb2beab8e38a7c0a365770be2ad9c5221a650.1678107917.git.stefan@agner.ch>
|
||||
In-Reply-To: <d388735d551e09b00317a509859fca51776b9826.1678107917.git.stefan@agner.ch>
|
||||
References: <d388735d551e09b00317a509859fca51776b9826.1678107917.git.stefan@agner.ch>
|
||||
Message-ID: <982bb2beab8e38a7c0a365770be2ad9c5221a650.1688490481.git.stefan@agner.ch>
|
||||
In-Reply-To: <d388735d551e09b00317a509859fca51776b9826.1688490481.git.stefan@agner.ch>
|
||||
References: <d388735d551e09b00317a509859fca51776b9826.1688490481.git.stefan@agner.ch>
|
||||
From: Aurelien Jarno <aurelien@aurel32.net>
|
||||
Date: Fri, 30 Sep 2022 07:12:37 +0200
|
||||
Subject: [PATCH] arm64: dts: rockchip: Add NOR flash to ODROID-M1
|
||||
@@ -99,5 +99,5 @@ index 112c65af3f55..94e839c9afab 100644
|
||||
rockchip,hw-tshut-mode = <1>;
|
||||
rockchip,hw-tshut-polarity = <0>;
|
||||
--
|
||||
2.39.2
|
||||
2.41.0
|
||||
|
||||
|
@@ -1,7 +1,7 @@
|
||||
From ae25f92a09abb7dd16a9ad3b74e0c105b385f214 Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <ae25f92a09abb7dd16a9ad3b74e0c105b385f214.1678107917.git.stefan@agner.ch>
|
||||
In-Reply-To: <d388735d551e09b00317a509859fca51776b9826.1678107917.git.stefan@agner.ch>
|
||||
References: <d388735d551e09b00317a509859fca51776b9826.1678107917.git.stefan@agner.ch>
|
||||
Message-ID: <ae25f92a09abb7dd16a9ad3b74e0c105b385f214.1688490481.git.stefan@agner.ch>
|
||||
In-Reply-To: <d388735d551e09b00317a509859fca51776b9826.1688490481.git.stefan@agner.ch>
|
||||
References: <d388735d551e09b00317a509859fca51776b9826.1688490481.git.stefan@agner.ch>
|
||||
From: Aurelien Jarno <aurelien@aurel32.net>
|
||||
Date: Fri, 30 Sep 2022 07:12:38 +0200
|
||||
Subject: [PATCH] arm64: dts: rockchip: Add analog audio on ODROID-M1
|
||||
@@ -98,5 +98,5 @@ index 94e839c9afab..634c1bd80b4e 100644
|
||||
|
||||
&pmu_io_domains {
|
||||
--
|
||||
2.39.2
|
||||
2.41.0
|
||||
|
||||
|
@@ -1,7 +1,7 @@
|
||||
From 3a1be3d8719ef6335385d4e5e456371e7bf7383f Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <3a1be3d8719ef6335385d4e5e456371e7bf7383f.1678107917.git.stefan@agner.ch>
|
||||
In-Reply-To: <d388735d551e09b00317a509859fca51776b9826.1678107917.git.stefan@agner.ch>
|
||||
References: <d388735d551e09b00317a509859fca51776b9826.1678107917.git.stefan@agner.ch>
|
||||
Message-ID: <3a1be3d8719ef6335385d4e5e456371e7bf7383f.1688490481.git.stefan@agner.ch>
|
||||
In-Reply-To: <d388735d551e09b00317a509859fca51776b9826.1688490481.git.stefan@agner.ch>
|
||||
References: <d388735d551e09b00317a509859fca51776b9826.1688490481.git.stefan@agner.ch>
|
||||
From: Aurelien Jarno <aurelien@aurel32.net>
|
||||
Date: Fri, 30 Sep 2022 07:12:39 +0200
|
||||
Subject: [PATCH] arm64: dts: rockchip: Enable vop2 and hdmi tx on ODROID-M1
|
||||
@@ -93,5 +93,5 @@ index 634c1bd80b4e..126b893048fe 100644
|
||||
+ };
|
||||
+};
|
||||
--
|
||||
2.39.2
|
||||
2.41.0
|
||||
|
||||
|
@@ -1,7 +1,7 @@
|
||||
From ded87dc761951205b8b9ba8ee4081e28a850a3db Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <ded87dc761951205b8b9ba8ee4081e28a850a3db.1678107917.git.stefan@agner.ch>
|
||||
In-Reply-To: <d388735d551e09b00317a509859fca51776b9826.1678107917.git.stefan@agner.ch>
|
||||
References: <d388735d551e09b00317a509859fca51776b9826.1678107917.git.stefan@agner.ch>
|
||||
Message-ID: <ded87dc761951205b8b9ba8ee4081e28a850a3db.1688490481.git.stefan@agner.ch>
|
||||
In-Reply-To: <d388735d551e09b00317a509859fca51776b9826.1688490481.git.stefan@agner.ch>
|
||||
References: <d388735d551e09b00317a509859fca51776b9826.1688490481.git.stefan@agner.ch>
|
||||
From: Aurelien Jarno <aurelien@aurel32.net>
|
||||
Date: Fri, 30 Sep 2022 07:12:40 +0200
|
||||
Subject: [PATCH] arm64: dts: rockchip: Enable HDMI audio on ODROID-M1.
|
||||
@@ -44,5 +44,5 @@ index 126b893048fe..ac4e94d18feb 100644
|
||||
rockchip,trcm-sync-tx-only;
|
||||
status = "okay";
|
||||
--
|
||||
2.39.2
|
||||
2.41.0
|
||||
|
||||
|
@@ -1,7 +1,7 @@
|
||||
From 13438a717627cae086cc3a1126552cffa2f4bd16 Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <13438a717627cae086cc3a1126552cffa2f4bd16.1678107917.git.stefan@agner.ch>
|
||||
In-Reply-To: <d388735d551e09b00317a509859fca51776b9826.1678107917.git.stefan@agner.ch>
|
||||
References: <d388735d551e09b00317a509859fca51776b9826.1678107917.git.stefan@agner.ch>
|
||||
Message-ID: <13438a717627cae086cc3a1126552cffa2f4bd16.1688490481.git.stefan@agner.ch>
|
||||
In-Reply-To: <d388735d551e09b00317a509859fca51776b9826.1688490481.git.stefan@agner.ch>
|
||||
References: <d388735d551e09b00317a509859fca51776b9826.1688490481.git.stefan@agner.ch>
|
||||
From: Aurelien Jarno <aurelien@aurel32.net>
|
||||
Date: Fri, 30 Sep 2022 07:12:41 +0200
|
||||
Subject: [PATCH] arm64: dts: rockchip: Enable the GPU on ODROID-M1
|
||||
@@ -33,5 +33,5 @@ index ac4e94d18feb..e4b7699d3eea 100644
|
||||
avdd-0v9-supply = <&vdda0v9_image>;
|
||||
avdd-1v8-supply = <&vcca1v8_image>;
|
||||
--
|
||||
2.39.2
|
||||
2.41.0
|
||||
|
||||
|
@@ -1,7 +1,7 @@
|
||||
From 0f0a85a289b4d0fbd5c39eb5ddbb681a37ad490c Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <0f0a85a289b4d0fbd5c39eb5ddbb681a37ad490c.1678107917.git.stefan@agner.ch>
|
||||
In-Reply-To: <d388735d551e09b00317a509859fca51776b9826.1678107917.git.stefan@agner.ch>
|
||||
References: <d388735d551e09b00317a509859fca51776b9826.1678107917.git.stefan@agner.ch>
|
||||
Message-ID: <0f0a85a289b4d0fbd5c39eb5ddbb681a37ad490c.1688490481.git.stefan@agner.ch>
|
||||
In-Reply-To: <d388735d551e09b00317a509859fca51776b9826.1688490481.git.stefan@agner.ch>
|
||||
References: <d388735d551e09b00317a509859fca51776b9826.1688490481.git.stefan@agner.ch>
|
||||
From: Aurelien Jarno <aurelien@aurel32.net>
|
||||
Date: Fri, 30 Sep 2022 07:12:42 +0200
|
||||
Subject: [PATCH] arm64: dts: rockchip: Enable the USB 2.0 ports on ODROID-M1
|
||||
@@ -107,5 +107,5 @@ index e4b7699d3eea..2e4cc20bd676 100644
|
||||
assigned-clocks = <&cru DCLK_VOP0>, <&cru DCLK_VOP1>;
|
||||
assigned-clock-parents = <&pmucru PLL_HPLL>, <&cru PLL_VPLL>;
|
||||
--
|
||||
2.39.2
|
||||
2.41.0
|
||||
|
||||
|
@@ -1,7 +1,7 @@
|
||||
From d8abc451c669a8fd36b31db5cb96ec49da819124 Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <d8abc451c669a8fd36b31db5cb96ec49da819124.1678107917.git.stefan@agner.ch>
|
||||
In-Reply-To: <d388735d551e09b00317a509859fca51776b9826.1678107917.git.stefan@agner.ch>
|
||||
References: <d388735d551e09b00317a509859fca51776b9826.1678107917.git.stefan@agner.ch>
|
||||
Message-ID: <d8abc451c669a8fd36b31db5cb96ec49da819124.1688490481.git.stefan@agner.ch>
|
||||
In-Reply-To: <d388735d551e09b00317a509859fca51776b9826.1688490481.git.stefan@agner.ch>
|
||||
References: <d388735d551e09b00317a509859fca51776b9826.1688490481.git.stefan@agner.ch>
|
||||
From: Aurelien Jarno <aurelien@aurel32.net>
|
||||
Date: Fri, 30 Sep 2022 07:12:43 +0200
|
||||
Subject: [PATCH] arm64: dts: rockchip: Enable the USB 3.0 ports on ODROID-M1
|
||||
@@ -110,5 +110,5 @@ index 2e4cc20bd676..9a84a7e76d7a 100644
|
||||
status = "okay";
|
||||
};
|
||||
--
|
||||
2.39.2
|
||||
2.41.0
|
||||
|
||||
|
@@ -1,7 +1,7 @@
|
||||
From 2f6d4521403932ca22cb4dabef9033f1d52232ba Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <2f6d4521403932ca22cb4dabef9033f1d52232ba.1678107917.git.stefan@agner.ch>
|
||||
In-Reply-To: <d388735d551e09b00317a509859fca51776b9826.1678107917.git.stefan@agner.ch>
|
||||
References: <d388735d551e09b00317a509859fca51776b9826.1678107917.git.stefan@agner.ch>
|
||||
Message-ID: <2f6d4521403932ca22cb4dabef9033f1d52232ba.1688490481.git.stefan@agner.ch>
|
||||
In-Reply-To: <d388735d551e09b00317a509859fca51776b9826.1688490481.git.stefan@agner.ch>
|
||||
References: <d388735d551e09b00317a509859fca51776b9826.1688490481.git.stefan@agner.ch>
|
||||
From: Aurelien Jarno <aurelien@aurel32.net>
|
||||
Date: Fri, 30 Sep 2022 07:12:44 +0200
|
||||
Subject: [PATCH] arm64: dts: rockchip: Add SATA support to ODROID-M1
|
||||
@@ -44,5 +44,5 @@ index 9a84a7e76d7a..bd24ccf94e76 100644
|
||||
bus-width = <8>;
|
||||
max-frequency = <200000000>;
|
||||
--
|
||||
2.39.2
|
||||
2.41.0
|
||||
|
||||
|
@@ -1,7 +1,7 @@
|
||||
From 1572a9c5d9fa9f654fbc1909528ae5940ad34aa3 Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <1572a9c5d9fa9f654fbc1909528ae5940ad34aa3.1678107917.git.stefan@agner.ch>
|
||||
In-Reply-To: <d388735d551e09b00317a509859fca51776b9826.1678107917.git.stefan@agner.ch>
|
||||
References: <d388735d551e09b00317a509859fca51776b9826.1678107917.git.stefan@agner.ch>
|
||||
Message-ID: <1572a9c5d9fa9f654fbc1909528ae5940ad34aa3.1688490481.git.stefan@agner.ch>
|
||||
In-Reply-To: <d388735d551e09b00317a509859fca51776b9826.1688490481.git.stefan@agner.ch>
|
||||
References: <d388735d551e09b00317a509859fca51776b9826.1688490481.git.stefan@agner.ch>
|
||||
From: Aurelien Jarno <aurelien@aurel32.net>
|
||||
Date: Fri, 30 Sep 2022 07:12:45 +0200
|
||||
Subject: [PATCH] arm64: dts: rockchip: Add PCIEe v3 nodes to ODROID-M1
|
||||
@@ -76,5 +76,5 @@ index bd24ccf94e76..2f685c606bb9 100644
|
||||
pmic_int_l: pmic-int-l {
|
||||
rockchip,pins = <0 RK_PA3 RK_FUNC_GPIO &pcfg_pull_up>;
|
||||
--
|
||||
2.39.2
|
||||
2.41.0
|
||||
|
||||
|
@@ -1,7 +1,7 @@
|
||||
From b2eae73eeb32dd9383571de6af18fc8bd39aac3a Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <b2eae73eeb32dd9383571de6af18fc8bd39aac3a.1678107917.git.stefan@agner.ch>
|
||||
In-Reply-To: <d388735d551e09b00317a509859fca51776b9826.1678107917.git.stefan@agner.ch>
|
||||
References: <d388735d551e09b00317a509859fca51776b9826.1678107917.git.stefan@agner.ch>
|
||||
Message-ID: <b2eae73eeb32dd9383571de6af18fc8bd39aac3a.1688490481.git.stefan@agner.ch>
|
||||
In-Reply-To: <d388735d551e09b00317a509859fca51776b9826.1688490481.git.stefan@agner.ch>
|
||||
References: <d388735d551e09b00317a509859fca51776b9826.1688490481.git.stefan@agner.ch>
|
||||
From: Aurelien Jarno <aurelien@aurel32.net>
|
||||
Date: Fri, 30 Sep 2022 07:12:46 +0200
|
||||
Subject: [PATCH] arm64: dts: rockchip: Add IR receiver node to ODROID-M1
|
||||
@@ -50,5 +50,5 @@ index 2f685c606bb9..59ecf868dbd0 100644
|
||||
led_power_pin: led-power-pin {
|
||||
rockchip,pins = <0 RK_PC6 RK_FUNC_GPIO &pcfg_pull_none>;
|
||||
--
|
||||
2.39.2
|
||||
2.41.0
|
||||
|
||||
|
@@ -0,0 +1,48 @@
|
||||
From acadbae38f91965f204d6a5d49eb8b578970b818 Mon Sep 17 00:00:00 2001
|
||||
Message-ID: <acadbae38f91965f204d6a5d49eb8b578970b818.1689147150.git.stefan@agner.ch>
|
||||
From: Jonas Karlman <jonas@kwiboo.se>
|
||||
Date: Sun, 2 Jul 2023 20:47:17 +0000
|
||||
Subject: [PATCH] ata: dwc_ahci: Fix support for other platforms
|
||||
|
||||
The dwc_ahci driver use platform specific defines, place the platform
|
||||
specific code behind a ifdef CONFIG_ARCH_OMAP2PLUS to allow build and
|
||||
use of the driver on Rockchip platform.
|
||||
|
||||
Fixes: 02a4b4297901 ("drivers: block: dwc_ahci: Implement a driver for Synopsys DWC sata device")
|
||||
Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
|
||||
---
|
||||
drivers/ata/dwc_ahci.c | 4 ++++
|
||||
1 file changed, 4 insertions(+)
|
||||
|
||||
diff --git a/drivers/ata/dwc_ahci.c b/drivers/ata/dwc_ahci.c
|
||||
index 826fea71cc..1dc91e7fce 100644
|
||||
--- a/drivers/ata/dwc_ahci.c
|
||||
+++ b/drivers/ata/dwc_ahci.c
|
||||
@@ -13,7 +13,9 @@
|
||||
#include <ahci.h>
|
||||
#include <scsi.h>
|
||||
#include <sata.h>
|
||||
+#ifdef CONFIG_ARCH_OMAP2PLUS
|
||||
#include <asm/arch/sata.h>
|
||||
+#endif
|
||||
#include <asm/io.h>
|
||||
#include <generic-phy.h>
|
||||
|
||||
@@ -72,12 +74,14 @@ static int dwc_ahci_probe(struct udevice *dev)
|
||||
return ret;
|
||||
}
|
||||
|
||||
+#ifdef CONFIG_ARCH_OMAP2PLUS
|
||||
if (priv->wrapper_base) {
|
||||
u32 val = TI_SATA_IDLE_NO | TI_SATA_STANDBY_NO;
|
||||
|
||||
/* Enable SATA module, No Idle, No Standby */
|
||||
writel(val, priv->wrapper_base + TI_SATA_SYSCONFIG);
|
||||
}
|
||||
+#endif
|
||||
|
||||
return ahci_probe_scsi(dev, (ulong)priv->base);
|
||||
}
|
||||
--
|
||||
2.41.0
|
||||
|
@@ -1,68 +1,100 @@
|
||||
From 6819a79bdb3c6a63459622e894b8fea9f7f407c5 Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <6819a79bdb3c6a63459622e894b8fea9f7f407c5.1678356433.git.stefan@agner.ch>
|
||||
From: Stefan Agner <stefan@agner.ch>
|
||||
Date: Mon, 6 Mar 2023 10:35:01 +0100
|
||||
Subject: [PATCH] arm64: dts: rockchip: rk3568: Add ODROID-M1 board support
|
||||
From e52e7ff196b942c8bf8bee9e74d4f24619934a1b Mon Sep 17 00:00:00 2001
|
||||
Message-ID: <e52e7ff196b942c8bf8bee9e74d4f24619934a1b.1689147150.git.stefan@agner.ch>
|
||||
In-Reply-To: <acadbae38f91965f204d6a5d49eb8b578970b818.1689147150.git.stefan@agner.ch>
|
||||
References: <acadbae38f91965f204d6a5d49eb8b578970b818.1689147150.git.stefan@agner.ch>
|
||||
From: Jonas Karlman <jonas@kwiboo.se>
|
||||
Date: Sun, 2 Jul 2023 20:47:19 +0000
|
||||
Subject: [PATCH] board: rockchip: Add Hardkernel ODROID-M1
|
||||
|
||||
Add ODROID-M1 board support. Board device tree rk3568-odroid-m1.dts
|
||||
from v6.3-rc1.
|
||||
Hardkernel ODROID-M1 is a single board computer with a RK3568B2 SoC,
|
||||
a slightly modified version of the RK3568 SoC.
|
||||
|
||||
Signed-off-by: Stefan Agner <stefan@agner.ch>
|
||||
Features tested on a ODROID-M1 8GB v1.0 2022-06-13:
|
||||
- SD-card boot
|
||||
- eMMC boot
|
||||
- SPI Flash boot
|
||||
- PCIe/NVMe/AHCI
|
||||
- SATA port
|
||||
- USB host
|
||||
|
||||
Device tree is imported from linux v6.4.
|
||||
|
||||
Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
|
||||
---
|
||||
arch/arm/dts/Makefile | 1 +
|
||||
arch/arm/dts/rk3568-odroid-m1-u-boot.dtsi | 28 +
|
||||
arch/arm/dts/rk3568-odroid-m1-u-boot.dtsi | 46 ++
|
||||
arch/arm/dts/rk3568-odroid-m1.dts | 744 ++++++++++++++++++++++
|
||||
configs/odroid-m1_defconfig | 74 +++
|
||||
4 files changed, 847 insertions(+)
|
||||
board/rockchip/evb_rk3568/MAINTAINERS | 7 +
|
||||
configs/odroid-m1-rk3568_defconfig | 103 +++
|
||||
doc/board/rockchip/rockchip.rst | 1 +
|
||||
6 files changed, 902 insertions(+)
|
||||
create mode 100644 arch/arm/dts/rk3568-odroid-m1-u-boot.dtsi
|
||||
create mode 100644 arch/arm/dts/rk3568-odroid-m1.dts
|
||||
create mode 100644 configs/odroid-m1_defconfig
|
||||
create mode 100644 configs/odroid-m1-rk3568_defconfig
|
||||
|
||||
diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile
|
||||
index c160e884bf..7958922b32 100644
|
||||
index 480269fa60..334c1bafda 100644
|
||||
--- a/arch/arm/dts/Makefile
|
||||
+++ b/arch/arm/dts/Makefile
|
||||
@@ -166,6 +166,7 @@ dtb-$(CONFIG_ROCKCHIP_RK3399) += \
|
||||
|
||||
dtb-$(CONFIG_ROCKCHIP_RK3568) += \
|
||||
rk3568-evb.dtb \
|
||||
+ rk3568-odroid-m1.dts \
|
||||
@@ -169,6 +169,7 @@ dtb-$(CONFIG_ROCKCHIP_RK3568) += \
|
||||
rk3566-anbernic-rgxx3.dtb \
|
||||
rk3566-radxa-cm3-io.dtb \
|
||||
rk3568-evb.dtb \
|
||||
+ rk3568-odroid-m1.dtb \
|
||||
rk3568-rock-3a.dtb
|
||||
|
||||
dtb-$(CONFIG_ROCKCHIP_RK3588) += \
|
||||
diff --git a/arch/arm/dts/rk3568-odroid-m1-u-boot.dtsi b/arch/arm/dts/rk3568-odroid-m1-u-boot.dtsi
|
||||
new file mode 100644
|
||||
index 0000000000..83fa66d591
|
||||
index 0000000000..dc8ad98715
|
||||
--- /dev/null
|
||||
+++ b/arch/arm/dts/rk3568-odroid-m1-u-boot.dtsi
|
||||
@@ -0,0 +1,28 @@
|
||||
@@ -0,0 +1,46 @@
|
||||
+// SPDX-License-Identifier: GPL-2.0+
|
||||
+/*
|
||||
+ * (C) Copyright 2021 Rockchip Electronics Co., Ltd
|
||||
+ * (C) Copyright 2023 Akash Gajjar <gajjar04akash@gmail.com>
|
||||
+ */
|
||||
+
|
||||
+#include "rk356x-u-boot.dtsi"
|
||||
+
|
||||
+/ {
|
||||
+ aliases {
|
||||
+ spi0 = &sfc;
|
||||
+ };
|
||||
+
|
||||
+ chosen {
|
||||
+ stdout-path = &uart2;
|
||||
+ u-boot,spl-boot-order = "same-as-spl", &sdhci, &sdmmc0;
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&sdmmc0 {
|
||||
+ status = "okay";
|
||||
+&fspi_dual_io_pins {
|
||||
+ bootph-all;
|
||||
+};
|
||||
+
|
||||
+&sdhci {
|
||||
+ status = "okay";
|
||||
+ cap-mmc-highspeed;
|
||||
+ mmc-ddr-1_8v;
|
||||
+ mmc-hs200-1_8v;
|
||||
+ mmc-hs400-1_8v;
|
||||
+ mmc-hs400-enhanced-strobe;
|
||||
+ pinctrl-0 = <&emmc_bus8 &emmc_clk &emmc_cmd &emmc_datastrobe>;
|
||||
+};
|
||||
+
|
||||
+&sfc {
|
||||
+ bootph-pre-ram;
|
||||
+ u-boot,spl-sfc-no-dma;
|
||||
+
|
||||
+ flash@0 {
|
||||
+ bootph-pre-ram;
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&uart2 {
|
||||
+ clock-frequency = <24000000>;
|
||||
+ bootph-all;
|
||||
+ u-boot,dm-pre-reloc;
|
||||
+ clock-frequency = <24000000>;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&vcc5v0_usb_host {
|
||||
+ /* Workaround until regulator implement basic reference counter */
|
||||
+ regulator-always-on;
|
||||
+};
|
||||
diff --git a/arch/arm/dts/rk3568-odroid-m1.dts b/arch/arm/dts/rk3568-odroid-m1.dts
|
||||
new file mode 100644
|
||||
@@ -814,12 +846,30 @@ index 0000000000..59ecf868db
|
||||
+ remote-endpoint = <&hdmi_in_vp0>;
|
||||
+ };
|
||||
+};
|
||||
diff --git a/configs/odroid-m1_defconfig b/configs/odroid-m1_defconfig
|
||||
diff --git a/board/rockchip/evb_rk3568/MAINTAINERS b/board/rockchip/evb_rk3568/MAINTAINERS
|
||||
index 6b2e7c7575..a5b59da0f7 100644
|
||||
--- a/board/rockchip/evb_rk3568/MAINTAINERS
|
||||
+++ b/board/rockchip/evb_rk3568/MAINTAINERS
|
||||
@@ -7,6 +7,13 @@ F: configs/evb-rk3568_defconfig
|
||||
F: arch/arm/dts/rk3568-evb-boot.dtsi
|
||||
F: arch/arm/dts/rk3568-evb.dts
|
||||
|
||||
+ODROID-M1
|
||||
+M: Jonas Karlman <jonas@kwiboo.se>
|
||||
+S: Maintained
|
||||
+F: configs/odroid-m1-rk3568_defconfig
|
||||
+F: arch/arm/dts/rk3568-odroid-m1-u-boot.dtsi
|
||||
+F: arch/arm/dts/rk3568-odroid-m1.dts
|
||||
+
|
||||
RADXA-CM3
|
||||
M: Jagan Teki <jagan@amarulasolutions.com>
|
||||
S: Maintained
|
||||
diff --git a/configs/odroid-m1-rk3568_defconfig b/configs/odroid-m1-rk3568_defconfig
|
||||
new file mode 100644
|
||||
index 0000000000..82cceec01b
|
||||
index 0000000000..d090196219
|
||||
--- /dev/null
|
||||
+++ b/configs/odroid-m1_defconfig
|
||||
@@ -0,0 +1,74 @@
|
||||
+++ b/configs/odroid-m1-rk3568_defconfig
|
||||
@@ -0,0 +1,103 @@
|
||||
+CONFIG_ARM=y
|
||||
+CONFIG_SKIP_LOWLEVEL_INIT=y
|
||||
+CONFIG_COUNTER_FREQUENCY=24000000
|
||||
@@ -828,50 +878,61 @@ index 0000000000..82cceec01b
|
||||
+CONFIG_SPL_LIBCOMMON_SUPPORT=y
|
||||
+CONFIG_SPL_LIBGENERIC_SUPPORT=y
|
||||
+CONFIG_NR_DRAM_BANKS=2
|
||||
+CONFIG_DEFAULT_DEVICE_TREE="rk3568-odroid-m1"
|
||||
+CONFIG_ROCKCHIP_RK3568=y
|
||||
+CONFIG_SPL_ROCKCHIP_BACK_TO_BROM=y
|
||||
+CONFIG_SPL_ROCKCHIP_COMMON_BOARD=y
|
||||
+CONFIG_SPL_MMC=y
|
||||
+CONFIG_SPL_SERIAL=y
|
||||
+CONFIG_SPL_STACK_R_ADDR=0x600000
|
||||
+CONFIG_TARGET_EVB_RK3568=y
|
||||
+CONFIG_DEBUG_UART_BASE=0xFE660000
|
||||
+CONFIG_DEBUG_UART_CLOCK=24000000
|
||||
+CONFIG_SYS_LOAD_ADDR=0xc00800
|
||||
+CONFIG_DEBUG_UART=y
|
||||
+CONFIG_HAS_CUSTOM_SYS_INIT_SP_ADDR=y
|
||||
+CONFIG_CUSTOM_SYS_INIT_SP_ADDR=0xc00000
|
||||
+CONFIG_SF_DEFAULT_SPEED=24000000
|
||||
+CONFIG_SF_DEFAULT_MODE=0x1000
|
||||
+CONFIG_DEFAULT_DEVICE_TREE="rk3568-odroid-m1"
|
||||
+CONFIG_ROCKCHIP_RK3568=y
|
||||
+CONFIG_SPL_ROCKCHIP_COMMON_BOARD=y
|
||||
+CONFIG_ROCKCHIP_SPI_IMAGE=y
|
||||
+CONFIG_SPL_SERIAL=y
|
||||
+CONFIG_SPL_STACK_R_ADDR=0x600000
|
||||
+CONFIG_SPL_STACK=0x400000
|
||||
+CONFIG_DEBUG_UART_BASE=0xFE660000
|
||||
+CONFIG_DEBUG_UART_CLOCK=24000000
|
||||
+CONFIG_SPL_SPI_FLASH_SUPPORT=y
|
||||
+CONFIG_SPL_SPI=y
|
||||
+CONFIG_SYS_LOAD_ADDR=0xc00800
|
||||
+CONFIG_PCI=y
|
||||
+CONFIG_DEBUG_UART=y
|
||||
+CONFIG_AHCI=y
|
||||
+CONFIG_FIT=y
|
||||
+CONFIG_FIT_VERBOSE=y
|
||||
+CONFIG_SPL_FIT_SIGNATURE=y
|
||||
+CONFIG_SPL_LOAD_FIT=y
|
||||
+CONFIG_LEGACY_IMAGE_FORMAT=y
|
||||
+CONFIG_DEFAULT_FDT_FILE="rockchip/rk3568-odroid-m1.dtb"
|
||||
+# CONFIG_DISPLAY_CPUINFO is not set
|
||||
+CONFIG_DISPLAY_BOARDINFO_LATE=y
|
||||
+CONFIG_SPL_MAX_SIZE=0x20000
|
||||
+CONFIG_SPL_MAX_SIZE=0x40000
|
||||
+CONFIG_SPL_PAD_TO=0x7f8000
|
||||
+CONFIG_SPL_HAS_BSS_LINKER_SECTION=y
|
||||
+CONFIG_SPL_BSS_START_ADDR=0x4000000
|
||||
+CONFIG_SPL_BSS_MAX_SIZE=0x4000
|
||||
+# CONFIG_SPL_RAW_IMAGE_SUPPORT is not set
|
||||
+# CONFIG_SPL_SHARES_INIT_SP_ADDR is not set
|
||||
+CONFIG_DM_PMIC=y
|
||||
+CONFIG_PMIC_RK8XX=y
|
||||
+CONFIG_SPL_PMIC_RK8XX=y
|
||||
+CONFIG_SPL_STACK=0x400000
|
||||
+CONFIG_SPL_STACK_R=y
|
||||
+CONFIG_SPL_SPI_LOAD=y
|
||||
+CONFIG_SYS_SPI_U_BOOT_OFFS=0x100000
|
||||
+CONFIG_SPL_ATF=y
|
||||
+CONFIG_CMD_I2C=y
|
||||
+CONFIG_CMD_GPIO=y
|
||||
+CONFIG_CMD_GPT=y
|
||||
+CONFIG_CMD_I2C=y
|
||||
+CONFIG_CMD_MMC=y
|
||||
+CONFIG_CMD_PCI=y
|
||||
+CONFIG_CMD_USB=y
|
||||
+# CONFIG_CMD_SETEXPR is not set
|
||||
+CONFIG_CMD_PMIC=y
|
||||
+CONFIG_CMD_REGULATOR=y
|
||||
+# CONFIG_SPL_DOS_PARTITION is not set
|
||||
+CONFIG_SPL_OF_CONTROL=y
|
||||
+CONFIG_OF_LIVE=y
|
||||
+CONFIG_NET_RANDOM_ETHADDR=y
|
||||
+CONFIG_REGULATOR_RK8XX=y
|
||||
+CONFIG_OF_SPL_REMOVE_PROPS="clock-names interrupt-parent assigned-clocks assigned-clock-rates assigned-clock-parents"
|
||||
+CONFIG_SPL_REGMAP=y
|
||||
+CONFIG_SPL_SYSCON=y
|
||||
+CONFIG_AHCI_PCI=y
|
||||
+CONFIG_DWC_AHCI=y
|
||||
+CONFIG_SPL_CLK=y
|
||||
+CONFIG_ROCKCHIP_GPIO=y
|
||||
+CONFIG_SYS_I2C_ROCKCHIP=y
|
||||
@@ -882,18 +943,48 @@ index 0000000000..82cceec01b
|
||||
+CONFIG_MMC_SDHCI=y
|
||||
+CONFIG_MMC_SDHCI_SDMA=y
|
||||
+CONFIG_MMC_SDHCI_ROCKCHIP=y
|
||||
+CONFIG_SPI_FLASH_SFDP_SUPPORT=y
|
||||
+CONFIG_SPI_FLASH_MACRONIX=y
|
||||
+CONFIG_ETH_DESIGNWARE=y
|
||||
+CONFIG_GMAC_ROCKCHIP=y
|
||||
+CONFIG_REGULATOR_PWM=y
|
||||
+CONFIG_NVME_PCI=y
|
||||
+CONFIG_PCIE_DW_ROCKCHIP=y
|
||||
+CONFIG_PHY_ROCKCHIP_INNO_USB2=y
|
||||
+CONFIG_PHY_ROCKCHIP_NANENG_COMBOPHY=y
|
||||
+CONFIG_SPL_PINCTRL=y
|
||||
+CONFIG_DM_PMIC=y
|
||||
+CONFIG_PMIC_RK8XX=y
|
||||
+CONFIG_REGULATOR_RK8XX=y
|
||||
+CONFIG_PWM_ROCKCHIP=y
|
||||
+CONFIG_SPL_RAM=y
|
||||
+CONFIG_DM_RESET=y
|
||||
+CONFIG_SCSI=y
|
||||
+CONFIG_DM_SCSI=y
|
||||
+CONFIG_BAUDRATE=1500000
|
||||
+CONFIG_DEBUG_UART_SHIFT=2
|
||||
+CONFIG_SYS_NS16550_MEM32=y
|
||||
+CONFIG_ROCKCHIP_SFC=y
|
||||
+CONFIG_SYSRESET=y
|
||||
+# CONFIG_BINMAN_FDT is not set
|
||||
+CONFIG_USB=y
|
||||
+CONFIG_USB_XHCI_HCD=y
|
||||
+CONFIG_USB_EHCI_HCD=y
|
||||
+CONFIG_USB_EHCI_GENERIC=y
|
||||
+CONFIG_USB_OHCI_HCD=y
|
||||
+CONFIG_USB_OHCI_GENERIC=y
|
||||
+CONFIG_USB_DWC3=y
|
||||
+CONFIG_USB_DWC3_GENERIC=y
|
||||
+CONFIG_ERRNO_STR=y
|
||||
diff --git a/doc/board/rockchip/rockchip.rst b/doc/board/rockchip/rockchip.rst
|
||||
index 99376fb54c..b3de15b36a 100644
|
||||
--- a/doc/board/rockchip/rockchip.rst
|
||||
+++ b/doc/board/rockchip/rockchip.rst
|
||||
@@ -95,6 +95,7 @@ List of mainline supported Rockchip boards:
|
||||
|
||||
* rk3568
|
||||
- Rockchip Evb-RK3568 (evb-rk3568)
|
||||
+ - Hardkernel ODROID-M1 (odroid-m1-rk3568)
|
||||
|
||||
* rk3588
|
||||
- Rockchip EVB (evb-rk3588)
|
||||
--
|
||||
2.39.2
|
||||
2.41.0
|
||||
|
@@ -1,5 +1,5 @@
|
||||
|
||||
part start mmc ${devnum} hassos-bootstate mmc_env
|
||||
mmc dev ${devnum}
|
||||
|
||||
setenv loadbootstate " \
|
||||
echo 'loading env...'; \
|
||||
@@ -20,7 +20,7 @@ test -n "${BOOT_B_LEFT}" || setenv BOOT_B_LEFT 3
|
||||
test -n "${MACHINE_ID}" || setenv BOOT_CONDITION "systemd.condition-first-boot=true"
|
||||
|
||||
# HassOS bootargs
|
||||
setenv bootargs_hassos "zram.enabled=1 zram.num_devices=3 net.naming-scheme=v250 systemd.machine_id=${MACHINE_ID} fsck.repair=yes ${BOOT_CONDITION}"
|
||||
setenv bootargs_hassos "zram.enabled=1 zram.num_devices=3 systemd.machine_id=${MACHINE_ID} fsck.repair=yes ${BOOT_CONDITION}"
|
||||
|
||||
# HassOS system A/B
|
||||
setenv bootargs_a "root=PARTUUID=8d3d53e3-6d49-4c38-8349-aff6859e82fd rootfstype=squashfs ro rootwait"
|
||||
|
@@ -22,7 +22,7 @@ test -n "${BOOT_B_LEFT}" || setenv BOOT_B_LEFT 3
|
||||
test -n "${MACHINE_ID}" || setenv BOOT_CONDITION "systemd.condition-first-boot=true"
|
||||
|
||||
# HassOS bootargs
|
||||
setenv bootargs_hassos "zram.enabled=1 zram.num_devices=3 net.naming-scheme=v250 systemd.machine_id=${MACHINE_ID} fsck.repair=yes ${BOOT_CONDITION}"
|
||||
setenv bootargs_hassos "zram.enabled=1 zram.num_devices=3 systemd.machine_id=${MACHINE_ID} fsck.repair=yes ${BOOT_CONDITION}"
|
||||
|
||||
# HassOS system A/B
|
||||
setenv bootargs_a "root=PARTUUID=48617373-06 rootfstype=squashfs ro rootwait"
|
||||
|
@@ -0,0 +1 @@
|
||||
# CONFIG_S3C2410_WATCHDOG is not set
|
@@ -24,7 +24,7 @@ test -n "${BOOT_B_LEFT}" || setenv BOOT_B_LEFT 3
|
||||
test -n "${MACHINE_ID}" || setenv BOOT_CONDITION "systemd.condition-first-boot=true"
|
||||
|
||||
# HassOS bootargs
|
||||
setenv bootargs_hassos "zram.enabled=1 zram.num_devices=3 net.naming-scheme=v250 systemd.machine_id=${MACHINE_ID} fsck.repair=yes ${BOOT_CONDITION}"
|
||||
setenv bootargs_hassos "zram.enabled=1 zram.num_devices=3 systemd.machine_id=${MACHINE_ID} fsck.repair=yes ${BOOT_CONDITION}"
|
||||
|
||||
# HassOS system A/B
|
||||
setenv bootargs_a "root=PARTUUID=48617373-06 rootfstype=squashfs ro rootwait"
|
||||
|
@@ -469,15 +469,19 @@ CONFIG_VIDEO_EM28XX_V4L2=m
|
||||
CONFIG_VIDEO_EM28XX_ALSA=m
|
||||
CONFIG_VIDEO_EM28XX_DVB=m
|
||||
CONFIG_MEDIA_PCI_SUPPORT=y
|
||||
CONFIG_CEC_CORE=m
|
||||
CONFIG_CEC_PIN=y
|
||||
CONFIG_MEDIA_CEC_RC=y
|
||||
CONFIG_DRM=y
|
||||
CONFIG_DRM_PANEL_SIMPLE=m
|
||||
CONFIG_DRM_DW_HDMI_CEC=y
|
||||
CONFIG_DRM_MESON=y
|
||||
CONFIG_DRM_DW_HDMI=m
|
||||
CONFIG_DRM_DW_HDMI_I2S_AUDIO=m
|
||||
CONFIG_DRM_MESON=m
|
||||
CONFIG_DRM_MESON_DW_HDMI=m
|
||||
CONFIG_DRM_PL111=m
|
||||
CONFIG_DRM_LIMA=m
|
||||
CONFIG_DRM_PANFROST=m
|
||||
CONFIG_FB_MODE_HELPERS=y
|
||||
CONFIG_FB_EFI=y
|
||||
CONFIG_FB=y
|
||||
CONFIG_BACKLIGHT_CLASS_DEVICE=y
|
||||
CONFIG_BACKLIGHT_PWM=m
|
||||
CONFIG_SOUND=y
|
||||
|
@@ -22,7 +22,7 @@ test -n "${BOOT_B_LEFT}" || setenv BOOT_B_LEFT 3
|
||||
test -n "${MACHINE_ID}" || setenv BOOT_CONDITION "systemd.condition-first-boot=true"
|
||||
|
||||
# HassOS bootargs
|
||||
setenv bootargs_hassos "zram.enabled=1 zram.num_devices=3 net.naming-scheme=v250 systemd.machine_id=${MACHINE_ID} fsck.repair=yes ${BOOT_CONDITION}"
|
||||
setenv bootargs_hassos "zram.enabled=1 zram.num_devices=3 systemd.machine_id=${MACHINE_ID} fsck.repair=yes ${BOOT_CONDITION}"
|
||||
|
||||
# HassOS system A/B
|
||||
setenv bootargs_a "root=PARTUUID=48617373-06 rootfstype=squashfs ro rootwait"
|
||||
|
0
buildroot-external/board/nabucasa/green/cmdline.txt
Normal file
0
buildroot-external/board/nabucasa/green/cmdline.txt
Normal file
25
buildroot-external/board/nabucasa/green/hassos-hook.sh
Normal file
25
buildroot-external/board/nabucasa/green/hassos-hook.sh
Normal file
@@ -0,0 +1,25 @@
|
||||
#!/bin/bash
|
||||
# shellcheck disable=SC2155
|
||||
|
||||
function hassos_pre_image() {
|
||||
local BOOT_DATA="$(path_boot_dir)"
|
||||
local SPL_IMG="$(path_spl_img)"
|
||||
|
||||
cp "${BINARIES_DIR}/boot.scr" "${BOOT_DATA}/boot.scr"
|
||||
cp "${BINARIES_DIR}"/*.dtb "${BOOT_DATA}/"
|
||||
|
||||
cp "${BOARD_DIR}/boot-env.txt" "${BOOT_DATA}/haos-config.txt"
|
||||
cp "${BOARD_DIR}/cmdline.txt" "${BOOT_DATA}/cmdline.txt"
|
||||
|
||||
# SPL
|
||||
create_spl_image
|
||||
|
||||
dd if="${BINARIES_DIR}/idbloader.img" of="${SPL_IMG}" conv=notrunc bs=512 seek=64
|
||||
dd if="${BINARIES_DIR}/u-boot.itb" of="${SPL_IMG}" conv=notrunc bs=512 seek=16384
|
||||
}
|
||||
|
||||
|
||||
function hassos_post_image() {
|
||||
convert_disk_image_xz
|
||||
}
|
||||
|
14
buildroot-external/board/nabucasa/green/kernel.config
Normal file
14
buildroot-external/board/nabucasa/green/kernel.config
Normal file
@@ -0,0 +1,14 @@
|
||||
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
|
||||
|
||||
CONFIG_MMC_SDHCI_OF_DWCMSHC=y
|
||||
|
||||
CONFIG_REGULATOR_RK808=y
|
||||
CONFIG_REGULATOR_RK860X=y
|
||||
|
||||
# CONFIG_DW_WATCHDOG is not set
|
12
buildroot-external/board/nabucasa/green/meta
Normal file
12
buildroot-external/board/nabucasa/green/meta
Normal file
@@ -0,0 +1,12 @@
|
||||
BOARD_ID=green
|
||||
BOARD_NAME="Home Assistant Green"
|
||||
CHASSIS=embedded
|
||||
BOOTLOADER=uboot
|
||||
KERNEL_FILE=Image
|
||||
BOOT_SYS=gpt
|
||||
BOOT_SIZE=16M
|
||||
BOOT_SPL=true
|
||||
BOOT_SPL_SIZE=16M
|
||||
BOOT_ENV_SIZE=0x8000
|
||||
SUPERVISOR_MACHINE=green
|
||||
SUPERVISOR_ARCH=aarch64
|
@@ -0,0 +1,662 @@
|
||||
From b7957b94fe2649a1e8032b10ea293b106cda4532 Mon Sep 17 00:00:00 2001
|
||||
From: Zhangqun Ming <north_sea@qq.com>
|
||||
Date: Thu, 6 Jul 2023 10:04:39 +0000
|
||||
Subject: [PATCH 1/2] drivers: regulator: Supports rk860x
|
||||
|
||||
---
|
||||
drivers/regulator/Kconfig | 11 +
|
||||
drivers/regulator/Makefile | 1 +
|
||||
drivers/regulator/rk860x-regulator.c | 607 +++++++++++++++++++++++++++
|
||||
3 files changed, 619 insertions(+)
|
||||
create mode 100644 drivers/regulator/rk860x-regulator.c
|
||||
|
||||
diff --git a/drivers/regulator/Kconfig b/drivers/regulator/Kconfig
|
||||
index 070e4403c..6a3c00c24 100644
|
||||
--- a/drivers/regulator/Kconfig
|
||||
+++ b/drivers/regulator/Kconfig
|
||||
@@ -1047,6 +1047,17 @@ config REGULATOR_RK808
|
||||
through regulator interface. The device supports multiple DCDC/LDO
|
||||
outputs which can be controlled by i2c communication.
|
||||
|
||||
+config REGULATOR_RK860X
|
||||
+ tristate "Rockchip RK860X Regulator"
|
||||
+ depends on I2C
|
||||
+ select REGMAP_I2C
|
||||
+ help
|
||||
+ This driver supports Rockchip RK860X Digitally Programmable
|
||||
+ Buck Regulator. The RK860X is a step-down switching voltage
|
||||
+ regulator that delivers a digitally programmable output from an
|
||||
+ input voltage supply of 2.5V to 5.5V. The output voltage is
|
||||
+ programmed through an I2C interface.
|
||||
+
|
||||
config REGULATOR_RN5T618
|
||||
tristate "Ricoh RN5T567/618 voltage regulators"
|
||||
depends on MFD_RN5T618
|
||||
diff --git a/drivers/regulator/Makefile b/drivers/regulator/Makefile
|
||||
index 5962307e1..76a156e98 100644
|
||||
--- a/drivers/regulator/Makefile
|
||||
+++ b/drivers/regulator/Makefile
|
||||
@@ -125,6 +125,7 @@ obj-$(CONFIG_REGULATOR_PCF50633) += pcf50633-regulator.o
|
||||
obj-$(CONFIG_REGULATOR_RASPBERRYPI_TOUCHSCREEN_ATTINY) += rpi-panel-attiny-regulator.o
|
||||
obj-$(CONFIG_REGULATOR_RC5T583) += rc5t583-regulator.o
|
||||
obj-$(CONFIG_REGULATOR_RK808) += rk808-regulator.o
|
||||
+obj-$(CONFIG_REGULATOR_RK860X) += rk860x-regulator.o
|
||||
obj-$(CONFIG_REGULATOR_RN5T618) += rn5t618-regulator.o
|
||||
obj-$(CONFIG_REGULATOR_ROHM) += rohm-regulator.o
|
||||
obj-$(CONFIG_REGULATOR_RT4801) += rt4801-regulator.o
|
||||
diff --git a/drivers/regulator/rk860x-regulator.c b/drivers/regulator/rk860x-regulator.c
|
||||
new file mode 100644
|
||||
index 000000000..4596761bd
|
||||
--- /dev/null
|
||||
+++ b/drivers/regulator/rk860x-regulator.c
|
||||
@@ -0,0 +1,607 @@
|
||||
+// SPDX-License-Identifier: GPL-2.0
|
||||
+/*
|
||||
+ * Copyright (c) 2021 Fuzhou Rockchip Electronics Co., Ltd
|
||||
+ */
|
||||
+#include <linux/err.h>
|
||||
+#include <linux/gpio.h>
|
||||
+#include <linux/i2c.h>
|
||||
+#include <linux/module.h>
|
||||
+#include <linux/of_device.h>
|
||||
+#include <linux/of_gpio.h>
|
||||
+#include <linux/param.h>
|
||||
+#include <linux/platform_device.h>
|
||||
+#include <linux/regmap.h>
|
||||
+#include <linux/regulator/driver.h>
|
||||
+#include <linux/regulator/machine.h>
|
||||
+#include <linux/regulator/of_regulator.h>
|
||||
+#include <linux/slab.h>
|
||||
+
|
||||
+/* Voltage setting */
|
||||
+
|
||||
+#define RK860X_VSEL0_A 0x00
|
||||
+#define RK860X_VSEL1_A 0x01
|
||||
+#define RK860X_VSEL0_B 0x06
|
||||
+#define RK860X_VSEL1_B 0x07
|
||||
+#define RK860X_MAX_SET 0x08
|
||||
+
|
||||
+/* Control register */
|
||||
+#define RK860X_CONTROL 0x02
|
||||
+/* IC Type */
|
||||
+#define RK860X_ID1 0x03
|
||||
+/* IC mask version */
|
||||
+#define RK860X_ID2 0x04
|
||||
+/* Monitor register */
|
||||
+#define RK860X_MONITOR 0x05
|
||||
+
|
||||
+/* VSEL bit definitions */
|
||||
+#define VSEL_BUCK_EN BIT(7)
|
||||
+#define VSEL_MODE BIT(6)
|
||||
+#define VSEL_A_NSEL_MASK 0x3F
|
||||
+#define VSEL_B_NSEL_MASK 0xff
|
||||
+
|
||||
+/* Chip ID */
|
||||
+#define DIE_ID 0x0f
|
||||
+#define DIE_REV 0x0f
|
||||
+/* Control bit definitions */
|
||||
+#define CTL_OUTPUT_DISCHG BIT(7)
|
||||
+#define CTL_SLEW_MASK (0x7 << 4)
|
||||
+#define CTL_SLEW_SHIFT 4
|
||||
+#define CTL_RESET BIT(2)
|
||||
+
|
||||
+#define RK860X_NVOLTAGES_64 64
|
||||
+#define RK860X_NVOLTAGES_160 160
|
||||
+
|
||||
+/* IC Type */
|
||||
+enum {
|
||||
+ RK860X_CHIP_ID_00 = 0,
|
||||
+ RK860X_CHIP_ID_01,
|
||||
+ RK860X_CHIP_ID_02,
|
||||
+ RK860X_CHIP_ID_03,
|
||||
+};
|
||||
+
|
||||
+struct rk860x_platform_data {
|
||||
+ struct regulator_init_data *regulator;
|
||||
+ unsigned int slew_rate;
|
||||
+ /* Sleep VSEL ID */
|
||||
+ unsigned int sleep_vsel_id;
|
||||
+ int limit_volt;
|
||||
+ struct gpio_desc *vsel_gpio;
|
||||
+};
|
||||
+
|
||||
+struct rk860x_device_info {
|
||||
+ struct regmap *regmap;
|
||||
+ struct device *dev;
|
||||
+ struct regulator_desc desc;
|
||||
+ struct regulator_dev *rdev;
|
||||
+ struct regulator_init_data *regulator;
|
||||
+ /* IC Type and Rev */
|
||||
+ int chip_id;
|
||||
+ /* Voltage setting register */
|
||||
+ unsigned int vol_reg;
|
||||
+ unsigned int sleep_reg;
|
||||
+ unsigned int en_reg;
|
||||
+ unsigned int sleep_en_reg;
|
||||
+ unsigned int mode_reg;
|
||||
+ unsigned int vol_mask;
|
||||
+ unsigned int mode_mask;
|
||||
+ unsigned int slew_reg;
|
||||
+ unsigned int slew_mask;
|
||||
+ unsigned int slew_shift;
|
||||
+ /* Voltage range and step(linear) */
|
||||
+ unsigned int vsel_min;
|
||||
+ unsigned int vsel_step;
|
||||
+ unsigned int n_voltages;
|
||||
+ /* Voltage slew rate limiting */
|
||||
+ unsigned int slew_rate;
|
||||
+ struct gpio_desc *vsel_gpio;
|
||||
+ unsigned int sleep_vsel_id;
|
||||
+};
|
||||
+
|
||||
+static unsigned int rk860x_map_mode(unsigned int mode)
|
||||
+{
|
||||
+ return mode == REGULATOR_MODE_FAST ?
|
||||
+ REGULATOR_MODE_FAST : REGULATOR_MODE_NORMAL;
|
||||
+}
|
||||
+
|
||||
+static int rk860x_get_voltage(struct regulator_dev *rdev)
|
||||
+{
|
||||
+ struct rk860x_device_info *di = rdev_get_drvdata(rdev);
|
||||
+ unsigned int val;
|
||||
+ int ret;
|
||||
+
|
||||
+ ret = regmap_read(di->regmap, RK860X_MAX_SET, &val);
|
||||
+ if (ret < 0)
|
||||
+ return ret;
|
||||
+ ret = regulator_get_voltage_sel_regmap(rdev);
|
||||
+ if (ret > val)
|
||||
+ return val;
|
||||
+
|
||||
+ return ret;
|
||||
+}
|
||||
+
|
||||
+static int rk860x_set_suspend_voltage(struct regulator_dev *rdev, int uV)
|
||||
+{
|
||||
+ struct rk860x_device_info *di = rdev_get_drvdata(rdev);
|
||||
+ int ret;
|
||||
+
|
||||
+ ret = regulator_map_voltage_linear(rdev, uV, uV);
|
||||
+ if (ret < 0)
|
||||
+ return ret;
|
||||
+ ret = regmap_update_bits(di->regmap, di->sleep_reg,
|
||||
+ di->vol_mask, ret);
|
||||
+ if (ret < 0)
|
||||
+ return ret;
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static int rk860x_set_suspend_enable(struct regulator_dev *rdev)
|
||||
+{
|
||||
+ struct rk860x_device_info *di = rdev_get_drvdata(rdev);
|
||||
+
|
||||
+ return regmap_update_bits(di->regmap, di->sleep_en_reg,
|
||||
+ VSEL_BUCK_EN, VSEL_BUCK_EN);
|
||||
+}
|
||||
+
|
||||
+static int rk860x_set_suspend_disable(struct regulator_dev *rdev)
|
||||
+{
|
||||
+ struct rk860x_device_info *di = rdev_get_drvdata(rdev);
|
||||
+
|
||||
+ return regmap_update_bits(di->regmap, di->sleep_en_reg,
|
||||
+ VSEL_BUCK_EN, 0);
|
||||
+}
|
||||
+
|
||||
+static int rk860x_resume(struct regulator_dev *rdev)
|
||||
+{
|
||||
+ int ret;
|
||||
+
|
||||
+ if (!rdev->constraints->state_mem.changeable)
|
||||
+ return 0;
|
||||
+
|
||||
+ ret = rk860x_set_suspend_enable(rdev);
|
||||
+ if (ret)
|
||||
+ return ret;
|
||||
+
|
||||
+ return regulator_suspend_enable(rdev, PM_SUSPEND_MEM);
|
||||
+}
|
||||
+
|
||||
+static int rk860x_set_enable(struct regulator_dev *rdev)
|
||||
+{
|
||||
+ struct rk860x_device_info *di = rdev_get_drvdata(rdev);
|
||||
+
|
||||
+ if (di->vsel_gpio) {
|
||||
+ gpiod_set_raw_value(di->vsel_gpio, !di->sleep_vsel_id);
|
||||
+ return 0;
|
||||
+ }
|
||||
+
|
||||
+ return regmap_update_bits(di->regmap, di->en_reg,
|
||||
+ VSEL_BUCK_EN, VSEL_BUCK_EN);
|
||||
+}
|
||||
+
|
||||
+static int rk860x_set_disable(struct regulator_dev *rdev)
|
||||
+{
|
||||
+ struct rk860x_device_info *di = rdev_get_drvdata(rdev);
|
||||
+
|
||||
+ if (di->vsel_gpio) {
|
||||
+ gpiod_set_raw_value(di->vsel_gpio, di->sleep_vsel_id);
|
||||
+ return 0;
|
||||
+ }
|
||||
+
|
||||
+ return regmap_update_bits(di->regmap, di->en_reg,
|
||||
+ VSEL_BUCK_EN, 0);
|
||||
+}
|
||||
+
|
||||
+static int rk860x_is_enabled(struct regulator_dev *rdev)
|
||||
+{
|
||||
+ struct rk860x_device_info *di = rdev_get_drvdata(rdev);
|
||||
+ unsigned int val;
|
||||
+ int ret = 0;
|
||||
+
|
||||
+ if (di->vsel_gpio) {
|
||||
+ if (di->sleep_vsel_id)
|
||||
+ return !gpiod_get_raw_value(di->vsel_gpio);
|
||||
+ else
|
||||
+ return gpiod_get_raw_value(di->vsel_gpio);
|
||||
+ }
|
||||
+
|
||||
+ ret = regmap_read(di->regmap, di->en_reg, &val);
|
||||
+ if (ret < 0)
|
||||
+ return ret;
|
||||
+ if (val & VSEL_BUCK_EN)
|
||||
+ return 1;
|
||||
+ else
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static int rk860x_set_mode(struct regulator_dev *rdev, unsigned int mode)
|
||||
+{
|
||||
+ struct rk860x_device_info *di = rdev_get_drvdata(rdev);
|
||||
+
|
||||
+ switch (mode) {
|
||||
+ case REGULATOR_MODE_FAST:
|
||||
+ regmap_update_bits(di->regmap, di->mode_reg,
|
||||
+ di->mode_mask, di->mode_mask);
|
||||
+ break;
|
||||
+ case REGULATOR_MODE_NORMAL:
|
||||
+ regmap_update_bits(di->regmap, di->mode_reg, di->mode_mask, 0);
|
||||
+ break;
|
||||
+ default:
|
||||
+ return -EINVAL;
|
||||
+ }
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static unsigned int rk860x_get_mode(struct regulator_dev *rdev)
|
||||
+{
|
||||
+ struct rk860x_device_info *di = rdev_get_drvdata(rdev);
|
||||
+ unsigned int val;
|
||||
+ int ret = 0;
|
||||
+
|
||||
+ ret = regmap_read(di->regmap, di->mode_reg, &val);
|
||||
+ if (ret < 0)
|
||||
+ return ret;
|
||||
+ if (val & di->mode_mask)
|
||||
+ return REGULATOR_MODE_FAST;
|
||||
+ else
|
||||
+ return REGULATOR_MODE_NORMAL;
|
||||
+}
|
||||
+
|
||||
+static const int slew_rates[] = {
|
||||
+ 64000,
|
||||
+ 32000,
|
||||
+ 16000,
|
||||
+ 8000,
|
||||
+ 4000,
|
||||
+ 2000,
|
||||
+ 1000,
|
||||
+ 500,
|
||||
+};
|
||||
+
|
||||
+static int rk860x_set_ramp(struct regulator_dev *rdev, int ramp)
|
||||
+{
|
||||
+ struct rk860x_device_info *di = rdev_get_drvdata(rdev);
|
||||
+ int regval = -1, i;
|
||||
+ const int *slew_rate_t;
|
||||
+ int slew_rate_n;
|
||||
+
|
||||
+ slew_rate_t = slew_rates;
|
||||
+ slew_rate_n = ARRAY_SIZE(slew_rates);
|
||||
+
|
||||
+ for (i = 0; i < slew_rate_n; i++) {
|
||||
+ if (ramp <= slew_rate_t[i])
|
||||
+ regval = i;
|
||||
+ else
|
||||
+ break;
|
||||
+ }
|
||||
+
|
||||
+ if (regval < 0) {
|
||||
+ dev_err(di->dev, "unsupported ramp value %d\n", ramp);
|
||||
+ return -EINVAL;
|
||||
+ }
|
||||
+
|
||||
+ return regmap_update_bits(di->regmap, di->slew_reg,
|
||||
+ di->slew_mask, regval << di->slew_shift);
|
||||
+}
|
||||
+
|
||||
+static const struct regulator_ops rk860x_regulator_ops = {
|
||||
+ .set_voltage_sel = regulator_set_voltage_sel_regmap,
|
||||
+ .get_voltage_sel = rk860x_get_voltage,
|
||||
+ .set_voltage_time_sel = regulator_set_voltage_time_sel,
|
||||
+ .map_voltage = regulator_map_voltage_linear,
|
||||
+ .list_voltage = regulator_list_voltage_linear,
|
||||
+ .set_suspend_voltage = rk860x_set_suspend_voltage,
|
||||
+ .enable = rk860x_set_enable,
|
||||
+ .disable = rk860x_set_disable,
|
||||
+ .is_enabled = rk860x_is_enabled,
|
||||
+ .set_mode = rk860x_set_mode,
|
||||
+ .get_mode = rk860x_get_mode,
|
||||
+ .set_ramp_delay = rk860x_set_ramp,
|
||||
+ .set_suspend_enable = rk860x_set_suspend_enable,
|
||||
+ .set_suspend_disable = rk860x_set_suspend_disable,
|
||||
+ .resume = rk860x_resume,
|
||||
+};
|
||||
+
|
||||
+/* For 00,01 options:
|
||||
+ * VOUT = 0.7125V + NSELx * 12.5mV, from 0.7125 to 1.5V.
|
||||
+ * For 02,03 options:
|
||||
+ * VOUT = 0.5V + NSELx * 6.25mV, from 0.5 to 1.5V.
|
||||
+ */
|
||||
+static int rk860x_device_setup(struct rk860x_device_info *di,
|
||||
+ struct rk860x_platform_data *pdata)
|
||||
+{
|
||||
+ int ret = 0;
|
||||
+ u32 val = 0;
|
||||
+
|
||||
+ switch (di->chip_id) {
|
||||
+ case RK860X_CHIP_ID_00:
|
||||
+ case RK860X_CHIP_ID_01:
|
||||
+ di->vsel_min = 712500;
|
||||
+ di->vsel_step = 12500;
|
||||
+ di->n_voltages = RK860X_NVOLTAGES_64;
|
||||
+ di->vol_mask = VSEL_A_NSEL_MASK;
|
||||
+ if (di->sleep_vsel_id) {
|
||||
+ di->sleep_reg = RK860X_VSEL1_A;
|
||||
+ di->vol_reg = RK860X_VSEL0_A;
|
||||
+ di->mode_reg = RK860X_VSEL0_A;
|
||||
+ di->en_reg = RK860X_VSEL0_A;
|
||||
+ di->sleep_en_reg = RK860X_VSEL1_A;
|
||||
+ } else {
|
||||
+ di->sleep_reg = RK860X_VSEL0_A;
|
||||
+ di->vol_reg = RK860X_VSEL1_A;
|
||||
+ di->mode_reg = RK860X_VSEL1_A;
|
||||
+ di->en_reg = RK860X_VSEL1_A;
|
||||
+ di->sleep_en_reg = RK860X_VSEL0_A;
|
||||
+ }
|
||||
+ break;
|
||||
+ case RK860X_CHIP_ID_02:
|
||||
+ case RK860X_CHIP_ID_03:
|
||||
+ di->vsel_min = 500000;
|
||||
+ di->vsel_step = 6250;
|
||||
+ di->n_voltages = RK860X_NVOLTAGES_160;
|
||||
+ di->vol_mask = VSEL_B_NSEL_MASK;
|
||||
+ if (di->sleep_vsel_id) {
|
||||
+ di->sleep_reg = RK860X_VSEL1_B;
|
||||
+ di->vol_reg = RK860X_VSEL0_B;
|
||||
+ di->mode_reg = RK860X_VSEL0_A;
|
||||
+ di->en_reg = RK860X_VSEL0_A;
|
||||
+ di->sleep_en_reg = RK860X_VSEL1_A;
|
||||
+ } else {
|
||||
+ di->sleep_reg = RK860X_VSEL0_B;
|
||||
+ di->vol_reg = RK860X_VSEL1_B;
|
||||
+ di->mode_reg = RK860X_VSEL1_A;
|
||||
+ di->en_reg = RK860X_VSEL1_A;
|
||||
+ di->sleep_en_reg = RK860X_VSEL0_A;
|
||||
+ }
|
||||
+ break;
|
||||
+ default:
|
||||
+ dev_err(di->dev, "Chip ID %d not supported!\n", di->chip_id);
|
||||
+ return -EINVAL;
|
||||
+ }
|
||||
+
|
||||
+ di->mode_mask = VSEL_MODE;
|
||||
+ di->slew_reg = RK860X_CONTROL;
|
||||
+ di->slew_mask = CTL_SLEW_MASK;
|
||||
+ di->slew_shift = CTL_SLEW_SHIFT;
|
||||
+
|
||||
+ if (pdata->limit_volt) {
|
||||
+ if (pdata->limit_volt < di->vsel_min ||
|
||||
+ pdata->limit_volt > 1500000)
|
||||
+ pdata->limit_volt = 1500000;
|
||||
+ val = (pdata->limit_volt - di->vsel_min) / di->vsel_step;
|
||||
+ ret = regmap_write(di->regmap, RK860X_MAX_SET, val);
|
||||
+ if (ret < 0) {
|
||||
+ dev_err(di->dev, "Failed to set limit voltage!\n");
|
||||
+ return ret;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ return ret;
|
||||
+}
|
||||
+
|
||||
+static int rk860x_regulator_register(struct rk860x_device_info *di,
|
||||
+ struct regulator_config *config)
|
||||
+{
|
||||
+ struct regulator_desc *rdesc = &di->desc;
|
||||
+
|
||||
+ rdesc->name = "rk860x-reg";
|
||||
+ rdesc->supply_name = "vin";
|
||||
+ rdesc->ops = &rk860x_regulator_ops;
|
||||
+ rdesc->type = REGULATOR_VOLTAGE;
|
||||
+ rdesc->n_voltages = di->n_voltages;
|
||||
+ rdesc->enable_reg = di->en_reg;
|
||||
+ rdesc->enable_mask = VSEL_BUCK_EN;
|
||||
+ rdesc->min_uV = di->vsel_min;
|
||||
+ rdesc->uV_step = di->vsel_step;
|
||||
+ rdesc->vsel_reg = di->vol_reg;
|
||||
+ rdesc->vsel_mask = di->vol_mask;
|
||||
+ rdesc->owner = THIS_MODULE;
|
||||
+ rdesc->enable_time = 400;
|
||||
+
|
||||
+ di->rdev = devm_regulator_register(di->dev, &di->desc, config);
|
||||
+ return PTR_ERR_OR_ZERO(di->rdev);
|
||||
+}
|
||||
+
|
||||
+static const struct regmap_config rk860x_regmap_config = {
|
||||
+ .reg_bits = 8,
|
||||
+ .val_bits = 8,
|
||||
+};
|
||||
+
|
||||
+static struct rk860x_platform_data *
|
||||
+rk860x_parse_dt(struct device *dev, struct device_node *np,
|
||||
+ const struct regulator_desc *desc)
|
||||
+{
|
||||
+ struct rk860x_platform_data *pdata;
|
||||
+ int ret, flag, limit_volt;
|
||||
+ u32 tmp;
|
||||
+
|
||||
+ pdata = devm_kzalloc(dev, sizeof(*pdata), GFP_KERNEL);
|
||||
+ if (!pdata)
|
||||
+ return NULL;
|
||||
+
|
||||
+ pdata->regulator = of_get_regulator_init_data(dev, np, desc);
|
||||
+ pdata->regulator->constraints.initial_state = PM_SUSPEND_MEM;
|
||||
+
|
||||
+ if (!(of_property_read_u32(np, "limit-microvolt", &limit_volt)))
|
||||
+ pdata->limit_volt = limit_volt;
|
||||
+
|
||||
+ ret = of_property_read_u32(np, "rockchip,suspend-voltage-selector",
|
||||
+ &tmp);
|
||||
+ if (!ret)
|
||||
+ pdata->sleep_vsel_id = tmp;
|
||||
+
|
||||
+ if (pdata->sleep_vsel_id)
|
||||
+ flag = GPIOD_OUT_LOW;
|
||||
+ else
|
||||
+ flag = GPIOD_OUT_HIGH;
|
||||
+
|
||||
+ pdata->vsel_gpio = devm_gpiod_get_index_optional(dev, "vsel", 0, flag);
|
||||
+ if (IS_ERR(pdata->vsel_gpio)) {
|
||||
+ ret = PTR_ERR(pdata->vsel_gpio);
|
||||
+ dev_err(dev, "failed to get vesl gpio (%d)\n", ret);
|
||||
+ pdata->vsel_gpio = NULL;
|
||||
+ }
|
||||
+
|
||||
+ return pdata;
|
||||
+}
|
||||
+
|
||||
+static const struct of_device_id rk860x_dt_ids[] = {
|
||||
+ {
|
||||
+ .compatible = "rockchip,rk8600",
|
||||
+ .data = (void *)RK860X_CHIP_ID_00
|
||||
+ },
|
||||
+ {
|
||||
+ .compatible = "rockchip,rk8601",
|
||||
+ .data = (void *)RK860X_CHIP_ID_01
|
||||
+ },
|
||||
+ {
|
||||
+ .compatible = "rockchip,rk8602",
|
||||
+ .data = (void *)RK860X_CHIP_ID_02
|
||||
+ },
|
||||
+ {
|
||||
+ .compatible = "rockchip,rk8603",
|
||||
+ .data = (void *)RK860X_CHIP_ID_03
|
||||
+ },
|
||||
+
|
||||
+ { }
|
||||
+};
|
||||
+MODULE_DEVICE_TABLE(of, rk860x_dt_ids);
|
||||
+
|
||||
+static int rk860x_regulator_probe(struct i2c_client *client,
|
||||
+ const struct i2c_device_id *id)
|
||||
+{
|
||||
+ struct device_node *np = client->dev.of_node;
|
||||
+ struct rk860x_device_info *di;
|
||||
+ struct rk860x_platform_data *pdata;
|
||||
+ struct regulator_config config = { };
|
||||
+ unsigned int val;
|
||||
+ int ret;
|
||||
+
|
||||
+ di = devm_kzalloc(&client->dev, sizeof(*di), GFP_KERNEL);
|
||||
+ if (!di)
|
||||
+ return -ENOMEM;
|
||||
+
|
||||
+ di->desc.of_map_mode = rk860x_map_mode;
|
||||
+
|
||||
+ pdata = dev_get_platdata(&client->dev);
|
||||
+ if (!pdata)
|
||||
+ pdata = rk860x_parse_dt(&client->dev, np, &di->desc);
|
||||
+
|
||||
+ if (!pdata || !pdata->regulator) {
|
||||
+ dev_err(&client->dev, "Platform data not found!\n");
|
||||
+ return -ENODEV;
|
||||
+ }
|
||||
+
|
||||
+ di->vsel_gpio = pdata->vsel_gpio;
|
||||
+ di->sleep_vsel_id = pdata->sleep_vsel_id;
|
||||
+
|
||||
+ di->regulator = pdata->regulator;
|
||||
+ if (client->dev.of_node) {
|
||||
+ di->chip_id =
|
||||
+ (unsigned long)of_device_get_match_data(&client->dev);
|
||||
+ } else {
|
||||
+ /* if no ramp constraint set, get the pdata ramp_delay */
|
||||
+ if (!di->regulator->constraints.ramp_delay) {
|
||||
+ int slew_idx = (pdata->slew_rate & 0x7)
|
||||
+ ? pdata->slew_rate : 0;
|
||||
+
|
||||
+ di->regulator->constraints.ramp_delay =
|
||||
+ slew_rates[slew_idx];
|
||||
+ }
|
||||
+ di->chip_id = id->driver_data;
|
||||
+ }
|
||||
+
|
||||
+ di->regmap = devm_regmap_init_i2c(client, &rk860x_regmap_config);
|
||||
+ if (IS_ERR(di->regmap)) {
|
||||
+ dev_err(&client->dev, "Failed to allocate regmap!\n");
|
||||
+ return PTR_ERR(di->regmap);
|
||||
+ }
|
||||
+ di->dev = &client->dev;
|
||||
+ i2c_set_clientdata(client, di);
|
||||
+ /* Get chip ID */
|
||||
+ ret = regmap_read(di->regmap, RK860X_ID1, &val);
|
||||
+ if (ret < 0) {
|
||||
+ dev_err(&client->dev, "Failed to get chip ID!\n");
|
||||
+ return ret;
|
||||
+ }
|
||||
+
|
||||
+ switch (di->chip_id) {
|
||||
+ case RK860X_CHIP_ID_00:
|
||||
+ case RK860X_CHIP_ID_01:
|
||||
+ if ((val & DIE_ID) != 0x8) {
|
||||
+ dev_err(&client->dev, "Failed to match chip ID!\n");
|
||||
+ return -EINVAL;
|
||||
+ }
|
||||
+ break;
|
||||
+ case RK860X_CHIP_ID_02:
|
||||
+ case RK860X_CHIP_ID_03:
|
||||
+ if ((val & DIE_ID) != 0xa) {
|
||||
+ dev_err(&client->dev, "Failed to match chip ID!\n");
|
||||
+ return -EINVAL;
|
||||
+ }
|
||||
+ break;
|
||||
+ default:
|
||||
+ return -EINVAL;
|
||||
+ }
|
||||
+
|
||||
+ /* Device init */
|
||||
+ ret = rk860x_device_setup(di, pdata);
|
||||
+ if (ret < 0) {
|
||||
+ dev_err(&client->dev, "Failed to setup device!\n");
|
||||
+ return ret;
|
||||
+ }
|
||||
+ /* Register regulator */
|
||||
+ config.dev = di->dev;
|
||||
+ config.init_data = di->regulator;
|
||||
+ config.regmap = di->regmap;
|
||||
+ config.driver_data = di;
|
||||
+ config.of_node = np;
|
||||
+
|
||||
+ ret = rk860x_regulator_register(di, &config);
|
||||
+ if (ret < 0)
|
||||
+ dev_err(&client->dev, "Failed to register regulator!\n");
|
||||
+
|
||||
+ return ret;
|
||||
+}
|
||||
+
|
||||
+static void rk860x_regulator_shutdown(struct i2c_client *client)
|
||||
+{
|
||||
+ struct rk860x_device_info *di;
|
||||
+ int ret;
|
||||
+
|
||||
+ di = i2c_get_clientdata(client);
|
||||
+
|
||||
+ dev_info(di->dev, "rk860..... reset\n");
|
||||
+
|
||||
+ ret = regmap_update_bits(di->regmap, di->slew_reg,
|
||||
+ CTL_RESET, CTL_RESET);
|
||||
+
|
||||
+ if (ret < 0)
|
||||
+ dev_err(di->dev, "force rk860x_reset error! ret=%d\n", ret);
|
||||
+ else
|
||||
+ dev_info(di->dev, "force rk860x_reset ok!\n");
|
||||
+}
|
||||
+
|
||||
+static const struct i2c_device_id rk860x_id[] = {
|
||||
+ { .name = "rk8600", .driver_data = RK860X_CHIP_ID_00 },
|
||||
+ { .name = "rk8601", .driver_data = RK860X_CHIP_ID_01 },
|
||||
+ { .name = "rk8602", .driver_data = RK860X_CHIP_ID_02 },
|
||||
+ { .name = "rk8603", .driver_data = RK860X_CHIP_ID_03 },
|
||||
+ {},
|
||||
+};
|
||||
+MODULE_DEVICE_TABLE(i2c, rk860x_id);
|
||||
+
|
||||
+static struct i2c_driver rk860x_regulator_driver = {
|
||||
+ .driver = {
|
||||
+ .name = "rk860-regulator",
|
||||
+ .of_match_table = of_match_ptr(rk860x_dt_ids),
|
||||
+ },
|
||||
+ .probe = rk860x_regulator_probe,
|
||||
+ .shutdown = rk860x_regulator_shutdown,
|
||||
+ .id_table = rk860x_id,
|
||||
+};
|
||||
+
|
||||
+module_i2c_driver(rk860x_regulator_driver);
|
||||
+
|
||||
+MODULE_AUTHOR("Elaine Zhang <zhangqing@rock-chips.com>");
|
||||
+MODULE_DESCRIPTION("rk860x regulator driver");
|
||||
+MODULE_LICENSE("GPL v2");
|
||||
--
|
||||
2.25.1
|
||||
|
@@ -0,0 +1,714 @@
|
||||
From 2a76efca88402072b61e4cb83d6707400da8dfae Mon Sep 17 00:00:00 2001
|
||||
From: Zhangqun Ming <north_sea@qq.com>
|
||||
Date: Thu, 6 Jul 2023 10:05:04 +0000
|
||||
Subject: [PATCH 2/2] arm64: dts: rockchip: Add NabuCasa Green board
|
||||
|
||||
---
|
||||
arch/arm64/boot/dts/rockchip/Makefile | 1 +
|
||||
.../boot/dts/rockchip/rk3566-ha-green.dts | 685 ++++++++++++++++++
|
||||
2 files changed, 686 insertions(+)
|
||||
create mode 100644 arch/arm64/boot/dts/rockchip/rk3566-ha-green.dts
|
||||
|
||||
diff --git a/arch/arm64/boot/dts/rockchip/Makefile b/arch/arm64/boot/dts/rockchip/Makefile
|
||||
index 8c15593c0..997051975 100644
|
||||
--- a/arch/arm64/boot/dts/rockchip/Makefile
|
||||
+++ b/arch/arm64/boot/dts/rockchip/Makefile
|
||||
@@ -72,3 +72,4 @@ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3566-soquartz-cm4.dtb
|
||||
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-bpi-r2-pro.dtb
|
||||
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-evb1-v10.dtb
|
||||
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-rock-3a.dtb
|
||||
+dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3566-ha-green.dtb
|
||||
diff --git a/arch/arm64/boot/dts/rockchip/rk3566-ha-green.dts b/arch/arm64/boot/dts/rockchip/rk3566-ha-green.dts
|
||||
new file mode 100644
|
||||
index 000000000..d0830df48
|
||||
--- /dev/null
|
||||
+++ b/arch/arm64/boot/dts/rockchip/rk3566-ha-green.dts
|
||||
@@ -0,0 +1,685 @@
|
||||
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
|
||||
+/*
|
||||
+ * Copyright (c) 2023 Seeed Co., Ltd.
|
||||
+ *
|
||||
+ */
|
||||
+
|
||||
+/dts-v1/;
|
||||
+#include <dt-bindings/gpio/gpio.h>
|
||||
+#include <dt-bindings/leds/common.h>
|
||||
+#include <dt-bindings/pinctrl/rockchip.h>
|
||||
+#include <dt-bindings/soc/rockchip,vop2.h>
|
||||
+#include "rk3566.dtsi"
|
||||
+
|
||||
+/ {
|
||||
+ model = "Home Assistant Green";
|
||||
+ compatible = "rockchip,rk3566-ha-green", "rockchip,rk3566";
|
||||
+
|
||||
+ aliases {
|
||||
+ ethernet0 = &gmac1;
|
||||
+ mmc0 = &sdhci;
|
||||
+ mmc1 = &sdmmc0;
|
||||
+ };
|
||||
+
|
||||
+ chosen {
|
||||
+ stdout-path = "serial2:1500000n8";
|
||||
+ };
|
||||
+
|
||||
+ dc_12v: dc-12v-regulator {
|
||||
+ compatible = "regulator-fixed";
|
||||
+ regulator-name = "dc_12v";
|
||||
+ regulator-always-on;
|
||||
+ regulator-boot-on;
|
||||
+ regulator-min-microvolt = <12000000>;
|
||||
+ regulator-max-microvolt = <12000000>;
|
||||
+ };
|
||||
+
|
||||
+ hdmi-con {
|
||||
+ compatible = "hdmi-connector";
|
||||
+ type = "a";
|
||||
+
|
||||
+ port {
|
||||
+ hdmi_con_in: endpoint {
|
||||
+ remote-endpoint = <&hdmi_out_con>;
|
||||
+ };
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ leds {
|
||||
+ compatible = "gpio-leds";
|
||||
+
|
||||
+ led_power: led-0 {
|
||||
+ gpios = <&gpio0 RK_PB6 GPIO_ACTIVE_HIGH>;
|
||||
+ function = LED_FUNCTION_POWER;
|
||||
+ color = <LED_COLOR_ID_RED>;
|
||||
+ default-state = "keep";
|
||||
+ linux,default-trigger = "default-on";
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&led_power_pin>;
|
||||
+ };
|
||||
+ led_act: led-1 {
|
||||
+ gpios = <&gpio0 RK_PB7 GPIO_ACTIVE_HIGH>;
|
||||
+ function = LED_FUNCTION_ACTIVITY;
|
||||
+ color = <LED_COLOR_ID_GREEN>;
|
||||
+ linux,default-trigger = "activity";
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&led_act_pin>;
|
||||
+ };
|
||||
+ led_user: led-2 {
|
||||
+ gpios = <&gpio0 RK_PC5 GPIO_ACTIVE_HIGH>;
|
||||
+ function = LED_FUNCTION_HEARTBEAT;
|
||||
+ color = <LED_COLOR_ID_YELLOW>;
|
||||
+ linux,default-trigger = "heartbeat";
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&led_usr_pin>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ rk809-sound {
|
||||
+ compatible = "simple-audio-card";
|
||||
+ simple-audio-card,name = "Analog RK817";
|
||||
+ simple-audio-card,format = "i2s";
|
||||
+ simple-audio-card,mclk-fs = <256>;
|
||||
+ simple-audio-card,widgets =
|
||||
+ "Headphone", "Headphones",
|
||||
+ "Speaker", "Speaker";
|
||||
+ simple-audio-card,routing =
|
||||
+ "Headphones", "HPOL",
|
||||
+ "Headphones", "HPOR",
|
||||
+ "Speaker", "SPKO";
|
||||
+
|
||||
+ simple-audio-card,cpu {
|
||||
+ sound-dai = <&i2s1_8ch>;
|
||||
+ };
|
||||
+
|
||||
+ simple-audio-card,codec {
|
||||
+ sound-dai = <&rk809>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ vcc3v3_sys: vcc3v3-sys-regulator {
|
||||
+ compatible = "regulator-fixed";
|
||||
+ regulator-name = "vcc3v3_sys";
|
||||
+ regulator-always-on;
|
||||
+ regulator-boot-on;
|
||||
+ regulator-min-microvolt = <3300000>;
|
||||
+ regulator-max-microvolt = <3300000>;
|
||||
+ vin-supply = <&dc_12v>;
|
||||
+ };
|
||||
+
|
||||
+ vcc5v0_sys: vcc5v0-sys-regulator {
|
||||
+ compatible = "regulator-fixed";
|
||||
+ regulator-name = "vcc5v0_sys";
|
||||
+ regulator-always-on;
|
||||
+ regulator-boot-on;
|
||||
+ regulator-min-microvolt = <5000000>;
|
||||
+ regulator-max-microvolt = <5000000>;
|
||||
+ vin-supply = <&dc_12v>;
|
||||
+ };
|
||||
+
|
||||
+ vcc5v0_usb_host: vcc5v0-usb-host-regulator {
|
||||
+ compatible = "regulator-fixed";
|
||||
+ regulator-name = "vcc5v0_usb_host";
|
||||
+ enable-active-high;
|
||||
+ gpio = <&gpio0 RK_PA6 GPIO_ACTIVE_HIGH>;
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&vcc5v0_usb_host_en_pin>;
|
||||
+ regulator-min-microvolt = <5000000>;
|
||||
+ regulator-max-microvolt = <5000000>;
|
||||
+ vin-supply = <&vcc5v0_sys>;
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&cpu0 {
|
||||
+ cpu-supply = <&vdd_cpu>;
|
||||
+};
|
||||
+
|
||||
+&cpu1 {
|
||||
+ cpu-supply = <&vdd_cpu>;
|
||||
+};
|
||||
+
|
||||
+&cpu2 {
|
||||
+ cpu-supply = <&vdd_cpu>;
|
||||
+};
|
||||
+
|
||||
+&cpu3 {
|
||||
+ cpu-supply = <&vdd_cpu>;
|
||||
+};
|
||||
+
|
||||
+&gmac1 {
|
||||
+ assigned-clocks = <&cru SCLK_GMAC1_RX_TX>, <&cru SCLK_GMAC1>;
|
||||
+ assigned-clock-parents = <&cru SCLK_GMAC1_RGMII_SPEED>;
|
||||
+ assigned-clock-rates = <0>, <125000000>;
|
||||
+ clock_in_out = "output";
|
||||
+
|
||||
+ snps,reset-gpio = <&gpio4 RK_PC2 GPIO_ACTIVE_LOW>;
|
||||
+ snps,reset-active-low;
|
||||
+ /* Reset time is 20ms, 100ms for rtl8211f */
|
||||
+ snps,reset-delays-us = <0 20000 100000>;
|
||||
+
|
||||
+ phy-handle = <&rgmii_phy1>;
|
||||
+ phy-mode = "rgmii";
|
||||
+
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&gmac1m0_miim
|
||||
+ &gmac1m0_tx_bus2
|
||||
+ &gmac1m0_rx_bus2
|
||||
+ &gmac1m0_rgmii_clk
|
||||
+ &gmac1m0_rgmii_bus>;
|
||||
+ status = "okay";
|
||||
+
|
||||
+ tx_delay = <0x47>;
|
||||
+ rx_delay = <0x27>;
|
||||
+};
|
||||
+
|
||||
+&gpu {
|
||||
+ mali-supply = <&vdd_gpu>;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&hdmi {
|
||||
+ avdd-0v9-supply = <&vdda0v9_image>;
|
||||
+ avdd-1v8-supply = <&vcca1v8_image>;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&hdmi_in {
|
||||
+ hdmi_in_vp0: endpoint {
|
||||
+ remote-endpoint = <&vp0_out_hdmi>;
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&hdmi_out {
|
||||
+ hdmi_out_con: endpoint {
|
||||
+ remote-endpoint = <&hdmi_con_in>;
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&hdmi_sound {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&i2c0 {
|
||||
+ status = "okay";
|
||||
+
|
||||
+ vdd_cpu: rk8601@41 {
|
||||
+ compatible = "rockchip,rk8601";
|
||||
+ reg = <0x41>;
|
||||
+ vin-supply = <&vcc5v0_sys>;
|
||||
+ regulator-compatible = "rk860x-reg";
|
||||
+ regulator-name = "vdd_cpu";
|
||||
+ regulator-min-microvolt = <712500>;
|
||||
+ regulator-max-microvolt = <1500000>;
|
||||
+ regulator-ramp-delay = <2300>;
|
||||
+ rockchip,suspend-voltage-selector = <1>;
|
||||
+ regulator-boot-on;
|
||||
+ regulator-always-on;
|
||||
+ regulator-state-mem {
|
||||
+ regulator-off-in-suspend;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ rk809: pmic@20 {
|
||||
+ compatible = "rockchip,rk809";
|
||||
+ reg = <0x20>;
|
||||
+ interrupt-parent = <&gpio0>;
|
||||
+ interrupts = <RK_PA3 IRQ_TYPE_LEVEL_LOW>;
|
||||
+ assigned-clocks = <&cru I2S1_MCLKOUT_TX>;
|
||||
+ assigned-clock-parents = <&cru CLK_I2S1_8CH_TX>;
|
||||
+ #clock-cells = <1>;
|
||||
+ clock-names = "mclk";
|
||||
+ clocks = <&cru I2S1_MCLKOUT_TX>;
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&pmic_int_l>, <&i2s1m0_mclk>;
|
||||
+
|
||||
+ rockchip,system-power-controller;
|
||||
+ #sound-dai-cells = <0>;
|
||||
+ wakeup-source;
|
||||
+
|
||||
+ vcc1-supply = <&vcc3v3_sys>;
|
||||
+ vcc2-supply = <&vcc3v3_sys>;
|
||||
+ vcc3-supply = <&vcc3v3_sys>;
|
||||
+ vcc4-supply = <&vcc3v3_sys>;
|
||||
+ vcc5-supply = <&vcc3v3_sys>;
|
||||
+ vcc6-supply = <&vcc3v3_sys>;
|
||||
+ vcc7-supply = <&vcc3v3_sys>;
|
||||
+ vcc8-supply = <&vcc3v3_sys>;
|
||||
+ vcc9-supply = <&vcc3v3_sys>;
|
||||
+
|
||||
+ regulators {
|
||||
+ vdd_logic: DCDC_REG1 {
|
||||
+ regulator-name = "vdd_logic";
|
||||
+ regulator-always-on;
|
||||
+ regulator-boot-on;
|
||||
+ regulator-init-microvolt = <900000>;
|
||||
+ regulator-initial-mode = <0x2>;
|
||||
+ regulator-min-microvolt = <500000>;
|
||||
+ regulator-max-microvolt = <1350000>;
|
||||
+ regulator-ramp-delay = <6001>;
|
||||
+
|
||||
+ regulator-state-mem {
|
||||
+ regulator-off-in-suspend;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ vdd_gpu: DCDC_REG2 {
|
||||
+ regulator-name = "vdd_gpu";
|
||||
+ regulator-always-on;
|
||||
+ regulator-init-microvolt = <900000>;
|
||||
+ regulator-initial-mode = <0x2>;
|
||||
+ regulator-min-microvolt = <500000>;
|
||||
+ regulator-max-microvolt = <1350000>;
|
||||
+ regulator-ramp-delay = <6001>;
|
||||
+
|
||||
+ regulator-state-mem {
|
||||
+ regulator-off-in-suspend;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ vcc_ddr: DCDC_REG3 {
|
||||
+ regulator-name = "vcc_ddr";
|
||||
+ regulator-always-on;
|
||||
+ regulator-boot-on;
|
||||
+ regulator-initial-mode = <0x2>;
|
||||
+
|
||||
+ regulator-state-mem {
|
||||
+ regulator-on-in-suspend;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ vdd_npu: DCDC_REG4 {
|
||||
+ regulator-name = "vdd_npu";
|
||||
+ regulator-init-microvolt = <900000>;
|
||||
+ regulator-initial-mode = <0x2>;
|
||||
+ regulator-min-microvolt = <500000>;
|
||||
+ regulator-max-microvolt = <1350000>;
|
||||
+ regulator-ramp-delay = <6001>;
|
||||
+
|
||||
+ regulator-state-mem {
|
||||
+ regulator-off-in-suspend;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ vcc_1v8: DCDC_REG5 {
|
||||
+ regulator-name = "vcc_1v8";
|
||||
+ regulator-always-on;
|
||||
+ regulator-boot-on;
|
||||
+ regulator-min-microvolt = <1800000>;
|
||||
+ regulator-max-microvolt = <1800000>;
|
||||
+
|
||||
+ regulator-state-mem {
|
||||
+ regulator-off-in-suspend;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ vdda0v9_image: LDO_REG1 {
|
||||
+ regulator-name = "vdda0v9_image";
|
||||
+ regulator-always-on;
|
||||
+ regulator-min-microvolt = <900000>;
|
||||
+ regulator-max-microvolt = <900000>;
|
||||
+
|
||||
+ regulator-state-mem {
|
||||
+ regulator-off-in-suspend;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ vdda_0v9: LDO_REG2 {
|
||||
+ regulator-name = "vdda_0v9";
|
||||
+ regulator-always-on;
|
||||
+ regulator-boot-on;
|
||||
+ regulator-min-microvolt = <900000>;
|
||||
+ regulator-max-microvolt = <900000>;
|
||||
+
|
||||
+ regulator-state-mem {
|
||||
+ regulator-off-in-suspend;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ vdda0v9_pmu: LDO_REG3 {
|
||||
+ regulator-name = "vdda0v9_pmu";
|
||||
+ regulator-always-on;
|
||||
+ regulator-boot-on;
|
||||
+ regulator-min-microvolt = <900000>;
|
||||
+ regulator-max-microvolt = <900000>;
|
||||
+
|
||||
+ regulator-state-mem {
|
||||
+ regulator-on-in-suspend;
|
||||
+ regulator-suspend-microvolt = <900000>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ vccio_acodec: LDO_REG4 {
|
||||
+ regulator-name = "vccio_acodec";
|
||||
+ regulator-always-on;
|
||||
+ regulator-boot-on;
|
||||
+ regulator-min-microvolt = <3300000>;
|
||||
+ regulator-max-microvolt = <3300000>;
|
||||
+
|
||||
+ regulator-state-mem {
|
||||
+ regulator-off-in-suspend;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ vccio_sd: LDO_REG5 {
|
||||
+ regulator-name = "vccio_sd";
|
||||
+ regulator-min-microvolt = <1800000>;
|
||||
+ regulator-max-microvolt = <3300000>;
|
||||
+
|
||||
+ regulator-state-mem {
|
||||
+ regulator-off-in-suspend;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ vcc3v3_pmu: LDO_REG6 {
|
||||
+ regulator-name = "vcc3v3_pmu";
|
||||
+ regulator-always-on;
|
||||
+ regulator-boot-on;
|
||||
+ regulator-min-microvolt = <3300000>;
|
||||
+ regulator-max-microvolt = <3300000>;
|
||||
+
|
||||
+ regulator-state-mem {
|
||||
+ regulator-on-in-suspend;
|
||||
+ regulator-suspend-microvolt = <3300000>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ vcca_1v8: LDO_REG7 {
|
||||
+ regulator-name = "vcca_1v8";
|
||||
+ regulator-always-on;
|
||||
+ regulator-boot-on;
|
||||
+ regulator-min-microvolt = <1800000>;
|
||||
+ regulator-max-microvolt = <1800000>;
|
||||
+
|
||||
+ regulator-state-mem {
|
||||
+ regulator-off-in-suspend;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ vcca1v8_pmu: LDO_REG8 {
|
||||
+ regulator-name = "vcca1v8_pmu";
|
||||
+ regulator-always-on;
|
||||
+ regulator-boot-on;
|
||||
+ regulator-min-microvolt = <1800000>;
|
||||
+ regulator-max-microvolt = <1800000>;
|
||||
+
|
||||
+ regulator-state-mem {
|
||||
+ regulator-on-in-suspend;
|
||||
+ regulator-suspend-microvolt = <1800000>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ vcca1v8_image: LDO_REG9 {
|
||||
+ regulator-name = "vcca1v8_image";
|
||||
+ regulator-always-on;
|
||||
+ regulator-min-microvolt = <1800000>;
|
||||
+ regulator-max-microvolt = <1800000>;
|
||||
+
|
||||
+ regulator-state-mem {
|
||||
+ regulator-off-in-suspend;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ vcc_3v3: SWITCH_REG1 {
|
||||
+ regulator-name = "vcc_3v3";
|
||||
+ regulator-always-on;
|
||||
+ regulator-boot-on;
|
||||
+
|
||||
+ regulator-state-mem {
|
||||
+ regulator-off-in-suspend;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ vcc3v3_sd: SWITCH_REG2 {
|
||||
+ regulator-name = "vcc3v3_sd";
|
||||
+
|
||||
+ regulator-state-mem {
|
||||
+ regulator-off-in-suspend;
|
||||
+ };
|
||||
+ };
|
||||
+ };
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&i2c1 {
|
||||
+ clock-frequency = <400000>;
|
||||
+ status = "okay";
|
||||
+
|
||||
+ rtc: rtc@51 {
|
||||
+ compatible = "nxp,pcf8563";
|
||||
+ reg = <0x51>;
|
||||
+ #clock-cells = <0>;
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&i2s0_8ch {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&i2s1_8ch {
|
||||
+ rockchip,trcm-sync-tx-only;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&mdio1 {
|
||||
+ rgmii_phy1: ethernet-phy@0 {
|
||||
+ compatible = "ethernet-phy-ieee802.3-c22";
|
||||
+ reg = <0x0>;
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&pinctrl {
|
||||
+ fspi {
|
||||
+ fspi_dual_io_pins: fspi-dual-io-pins {
|
||||
+ rockchip,pins =
|
||||
+ /* fspi_clk */
|
||||
+ <1 RK_PD0 1 &pcfg_pull_none>,
|
||||
+ /* fspi_cs0n */
|
||||
+ <1 RK_PD3 1 &pcfg_pull_none>,
|
||||
+ /* fspi_d0 */
|
||||
+ <1 RK_PD1 1 &pcfg_pull_none>,
|
||||
+ /* fspi_d1 */
|
||||
+ <1 RK_PD2 1 &pcfg_pull_none>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ ethernet {
|
||||
+ eth_phy_rst: eth_phy_rst {
|
||||
+ rockchip,pins = <4 RK_PC2 RK_FUNC_GPIO &pcfg_pull_none>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ leds {
|
||||
+ led_power_pin: led-power-pin {
|
||||
+ rockchip,pins = <0 RK_PB6 RK_FUNC_GPIO &pcfg_pull_none>;
|
||||
+ };
|
||||
+ led_act_pin: led-act-pin {
|
||||
+ rockchip,pins = <0 RK_PB7 RK_FUNC_GPIO &pcfg_pull_none>;
|
||||
+ };
|
||||
+ led_usr_pin: led-user-pin {
|
||||
+ rockchip,pins = <0 RK_PC5 RK_FUNC_GPIO &pcfg_pull_none>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ pmic {
|
||||
+ pmic_int_l: pmic-int-l {
|
||||
+ rockchip,pins = <0 RK_PA3 RK_FUNC_GPIO &pcfg_pull_up>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ usb {
|
||||
+ vcc5v0_usb_host_en_pin: vcc5v0-usb-host-en-pin {
|
||||
+ rockchip,pins = <0 RK_PA6 RK_FUNC_GPIO &pcfg_pull_none>;
|
||||
+ };
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&pmu_io_domains {
|
||||
+ pmuio1-supply = <&vcc3v3_pmu>;
|
||||
+ pmuio2-supply = <&vcc3v3_pmu>;
|
||||
+ vccio1-supply = <&vccio_acodec>;
|
||||
+ vccio2-supply = <&vcc_1v8>;
|
||||
+ vccio3-supply = <&vccio_sd>;
|
||||
+ vccio4-supply = <&vcc_1v8>; /* float */
|
||||
+ vccio5-supply = <&vcc_1v8>;
|
||||
+ vccio6-supply = <&vcc_1v8>;
|
||||
+ vccio7-supply = <&vcc_3v3>;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&saradc {
|
||||
+ vref-supply = <&vcca_1v8>;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&sdhci {
|
||||
+ bus-width = <8>;
|
||||
+ max-frequency = <200000000>;
|
||||
+ non-removable;
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&emmc_bus8 &emmc_clk &emmc_cmd &emmc_datastrobe &emmc_rstnout>;
|
||||
+ vmmc-supply = <&vcc_3v3>;
|
||||
+ vqmmc-supply = <&vcc_1v8>;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&sdmmc0 {
|
||||
+ bus-width = <4>;
|
||||
+ cap-sd-highspeed;
|
||||
+ cd-gpios = <&gpio0 RK_PA4 GPIO_ACTIVE_LOW>;
|
||||
+ disable-wp;
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&sdmmc0_bus4 &sdmmc0_clk &sdmmc0_cmd &sdmmc0_det>;
|
||||
+ sd-uhs-sdr104;
|
||||
+ vmmc-supply = <&vcc3v3_sd>;
|
||||
+ vqmmc-supply = <&vccio_sd>;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&sfc {
|
||||
+ /* Dual I/O mode as the D2 pin conflicts with the eMMC */
|
||||
+ pinctrl-0 = <&fspi_dual_io_pins>;
|
||||
+ pinctrl-names = "default";
|
||||
+ #address-cells = <1>;
|
||||
+ #size-cells = <0>;
|
||||
+ status = "okay";
|
||||
+
|
||||
+ flash@0 {
|
||||
+ compatible = "jedec,spi-nor";
|
||||
+ reg = <0>;
|
||||
+ spi-max-frequency = <100000000>;
|
||||
+ spi-rx-bus-width = <4>;
|
||||
+ spi-tx-bus-width = <1>;
|
||||
+
|
||||
+ partitions {
|
||||
+ compatible = "fixed-partitions";
|
||||
+ #address-cells = <1>;
|
||||
+ #size-cells = <1>;
|
||||
+
|
||||
+ partition@0 {
|
||||
+ label = "SPL";
|
||||
+ reg = <0x0 0xe0000>;
|
||||
+ };
|
||||
+ partition@e0000 {
|
||||
+ label = "U-Boot Env";
|
||||
+ reg = <0xe0000 0x20000>;
|
||||
+ };
|
||||
+ partition@100000 {
|
||||
+ label = "U-Boot";
|
||||
+ reg = <0x100000 0x200000>;
|
||||
+ };
|
||||
+ partition@300000 {
|
||||
+ label = "splash";
|
||||
+ reg = <0x300000 0x100000>;
|
||||
+ };
|
||||
+ partition@400000 {
|
||||
+ label = "Filesystem";
|
||||
+ reg = <0x400000 0xc00000>;
|
||||
+ };
|
||||
+ };
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&tsadc {
|
||||
+ rockchip,hw-tshut-mode = <1>;
|
||||
+ rockchip,hw-tshut-polarity = <0>;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&uart2 {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&usb_host0_ehci {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&usb_host0_ohci {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&usb_host0_xhci {
|
||||
+ dr_mode = "host";
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&usb_host1_ehci {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&usb_host1_ohci {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&usb_host1_xhci {
|
||||
+ status = "okay";
|
||||
+ phys = <&usb2phy0_host>;
|
||||
+ phy-names = "usb2-phy";
|
||||
+ snps,dis_u2_susphy_quirk;
|
||||
+ extcon = <&usb2phy0>;
|
||||
+ maximum-speed = "high-speed";
|
||||
+};
|
||||
+
|
||||
+&usb2phy0 {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&usb2phy0_host {
|
||||
+ phy-supply = <&vcc5v0_usb_host>;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&usb2phy0_otg {
|
||||
+ phy-supply = <&vcc5v0_usb_host>;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&usb2phy1 {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&usb2phy1_host {
|
||||
+ phy-supply = <&vcc5v0_usb_host>;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&usb2phy1_otg {
|
||||
+ phy-supply = <&vcc5v0_usb_host>;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&vop {
|
||||
+ assigned-clocks = <&cru DCLK_VOP0>, <&cru DCLK_VOP1>;
|
||||
+ assigned-clock-parents = <&pmucru PLL_HPLL>, <&cru PLL_VPLL>;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&vop_mmu {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&vp0 {
|
||||
+ vp0_out_hdmi: endpoint@ROCKCHIP_VOP2_EP_HDMI0 {
|
||||
+ reg = <ROCKCHIP_VOP2_EP_HDMI0>;
|
||||
+ remote-endpoint = <&hdmi_in_vp0>;
|
||||
+ };
|
||||
+};
|
||||
--
|
||||
2.25.1
|
||||
|
@@ -0,0 +1,41 @@
|
||||
From e86272fa8063a047a55a9548400a95742f1c2d2a Mon Sep 17 00:00:00 2001
|
||||
From: Zhangqun Ming <north_sea@qq.com>
|
||||
Date: Wed, 12 Jul 2023 02:33:03 +0000
|
||||
Subject: [PATCH] drivers: mfd: rk808: set PWRON_LP_OFF_TIME 12s
|
||||
|
||||
---
|
||||
drivers/mfd/rk808.c | 1 +
|
||||
include/linux/mfd/rk808.h | 5 +++++
|
||||
2 files changed, 6 insertions(+)
|
||||
|
||||
diff --git a/drivers/mfd/rk808.c b/drivers/mfd/rk808.c
|
||||
index e00da7c7e..ae3c99809 100644
|
||||
--- a/drivers/mfd/rk808.c
|
||||
+++ b/drivers/mfd/rk808.c
|
||||
@@ -300,6 +300,7 @@ static const struct rk808_reg_data rk817_pre_init_reg[] = {
|
||||
{RK817_GPIO_INT_CFG, RK817_INT_POL_MSK, RK817_INT_POL_L},
|
||||
{RK817_SYS_CFG(1), RK817_HOTDIE_TEMP_MSK | RK817_TSD_TEMP_MSK,
|
||||
RK817_HOTDIE_105 | RK817_TSD_140},
|
||||
+ {RK817_PMIC_PWRON_KEY, RK817_PMIC_PWRON_KEY_MSK, RK817_PWRON_LP_OFF_TIME},
|
||||
};
|
||||
|
||||
static const struct rk808_reg_data rk818_pre_init_reg[] = {
|
||||
diff --git a/include/linux/mfd/rk808.h b/include/linux/mfd/rk808.h
|
||||
index 9af1f3105..d02e56e09 100644
|
||||
--- a/include/linux/mfd/rk808.h
|
||||
+++ b/include/linux/mfd/rk808.h
|
||||
@@ -644,6 +644,11 @@ enum rk809_reg_id {
|
||||
#define RK817_ON_SOURCE_REG 0xf5
|
||||
#define RK817_OFF_SOURCE_REG 0xf6
|
||||
|
||||
+#define RK817_PMIC_PWRON_KEY 0xf7
|
||||
+#define RK817_PMIC_PWRON_KEY_MSK (0x3 << 4)
|
||||
+/* 00: 6s, 01: 8s, 10: 10s, 11: 12s */
|
||||
+#define RK817_PWRON_LP_OFF_TIME (0x3 << 4)
|
||||
+
|
||||
/* INTERRUPT REGISTER */
|
||||
#define RK817_INT_STS_REG0 0xf8
|
||||
#define RK817_INT_STS_MSK_REG0 0xf9
|
||||
--
|
||||
2.25.1
|
||||
|
@@ -0,0 +1,55 @@
|
||||
From 5f1f9863bf1031e608537945fdc97e099cb9e42c Mon Sep 17 00:00:00 2001
|
||||
From: Zhangqun Ming <north_sea@qq.com>
|
||||
Date: Sat, 15 Jul 2023 08:28:16 +0000
|
||||
Subject: [PATCH] arch: arm64: dts: green: Remove spiflash partitions
|
||||
|
||||
---
|
||||
.../boot/dts/rockchip/rk3566-ha-green.dts | 31 ++-----------------
|
||||
1 file changed, 2 insertions(+), 29 deletions(-)
|
||||
|
||||
diff --git a/arch/arm64/boot/dts/rockchip/rk3566-ha-green.dts b/arch/arm64/boot/dts/rockchip/rk3566-ha-green.dts
|
||||
index d0830df48..66ef38600 100644
|
||||
--- a/arch/arm64/boot/dts/rockchip/rk3566-ha-green.dts
|
||||
+++ b/arch/arm64/boot/dts/rockchip/rk3566-ha-green.dts
|
||||
@@ -566,36 +566,9 @@ &sfc {
|
||||
flash@0 {
|
||||
compatible = "jedec,spi-nor";
|
||||
reg = <0>;
|
||||
- spi-max-frequency = <100000000>;
|
||||
- spi-rx-bus-width = <4>;
|
||||
+ spi-max-frequency = <25000000>;
|
||||
+ spi-rx-bus-width = <1>;
|
||||
spi-tx-bus-width = <1>;
|
||||
-
|
||||
- partitions {
|
||||
- compatible = "fixed-partitions";
|
||||
- #address-cells = <1>;
|
||||
- #size-cells = <1>;
|
||||
-
|
||||
- partition@0 {
|
||||
- label = "SPL";
|
||||
- reg = <0x0 0xe0000>;
|
||||
- };
|
||||
- partition@e0000 {
|
||||
- label = "U-Boot Env";
|
||||
- reg = <0xe0000 0x20000>;
|
||||
- };
|
||||
- partition@100000 {
|
||||
- label = "U-Boot";
|
||||
- reg = <0x100000 0x200000>;
|
||||
- };
|
||||
- partition@300000 {
|
||||
- label = "splash";
|
||||
- reg = <0x300000 0x100000>;
|
||||
- };
|
||||
- partition@400000 {
|
||||
- label = "Filesystem";
|
||||
- reg = <0x400000 0xc00000>;
|
||||
- };
|
||||
- };
|
||||
};
|
||||
};
|
||||
|
||||
--
|
||||
2.25.1
|
||||
|
@@ -0,0 +1,41 @@
|
||||
From 32ee0c67a53f541f42b3a953e992bac12d5375d6 Mon Sep 17 00:00:00 2001
|
||||
Message-ID: <32ee0c67a53f541f42b3a953e992bac12d5375d6.1689754249.git.stefan@agner.ch>
|
||||
In-Reply-To: <fa0e84b5fbb7b6ce0b161bfcfe495f3648d02110.1689754249.git.stefan@agner.ch>
|
||||
References: <fa0e84b5fbb7b6ce0b161bfcfe495f3648d02110.1689754249.git.stefan@agner.ch>
|
||||
From: Stefan Agner <stefan@agner.ch>
|
||||
Date: Wed, 19 Jul 2023 10:08:06 +0200
|
||||
Subject: [PATCH] Input: rk805-pwrkey: reverse polarity of pwrkey
|
||||
|
||||
The power key is low active. Reverse logic to avoid involuntary long
|
||||
press being reported to user space.
|
||||
|
||||
Signed-off-by: Stefan Agner <stefan@agner.ch>
|
||||
---
|
||||
drivers/input/misc/rk805-pwrkey.c | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/drivers/input/misc/rk805-pwrkey.c b/drivers/input/misc/rk805-pwrkey.c
|
||||
index 76873aa005b4..139419033c84 100644
|
||||
--- a/drivers/input/misc/rk805-pwrkey.c
|
||||
+++ b/drivers/input/misc/rk805-pwrkey.c
|
||||
@@ -19,7 +19,7 @@ static irqreturn_t pwrkey_fall_irq(int irq, void *_pwr)
|
||||
{
|
||||
struct input_dev *pwr = _pwr;
|
||||
|
||||
- input_report_key(pwr, KEY_POWER, 1);
|
||||
+ input_report_key(pwr, KEY_POWER, 0);
|
||||
input_sync(pwr);
|
||||
|
||||
return IRQ_HANDLED;
|
||||
@@ -29,7 +29,7 @@ static irqreturn_t pwrkey_rise_irq(int irq, void *_pwr)
|
||||
{
|
||||
struct input_dev *pwr = _pwr;
|
||||
|
||||
- input_report_key(pwr, KEY_POWER, 0);
|
||||
+ input_report_key(pwr, KEY_POWER, 1);
|
||||
input_sync(pwr);
|
||||
|
||||
return IRQ_HANDLED;
|
||||
--
|
||||
2.41.0
|
||||
|
@@ -0,0 +1,24 @@
|
||||
From 10c2c3afa62f58c4f795a0777aa8635428e3c78a Mon Sep 17 00:00:00 2001
|
||||
From: zhangcy <chengyu.zhang@seeed.cc>
|
||||
Date: Mon, 14 Aug 2023 01:27:34 +0000
|
||||
Subject: [PATCH] green: emmc use HS200 mode
|
||||
|
||||
---
|
||||
arch/arm64/boot/dts/rockchip/rk3566-ha-green.dts | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/arch/arm64/boot/dts/rockchip/rk3566-ha-green.dts b/arch/arm64/boot/dts/rockchip/rk3566-ha-green.dts
|
||||
index f742b904a..3b564950f 100644
|
||||
--- a/arch/arm64/boot/dts/rockchip/rk3566-ha-green.dts
|
||||
+++ b/arch/arm64/boot/dts/rockchip/rk3566-ha-green.dts
|
||||
@@ -533,6 +533,7 @@ &saradc {
|
||||
|
||||
&sdhci {
|
||||
bus-width = <8>;
|
||||
+ mmc-hs200-1_8v;
|
||||
max-frequency = <200000000>;
|
||||
non-removable;
|
||||
pinctrl-names = "default";
|
||||
--
|
||||
2.25.1
|
||||
|
@@ -0,0 +1,52 @@
|
||||
From 6c1abc949a978492bd9a1b30f4faaa2329d93068 Mon Sep 17 00:00:00 2001
|
||||
Message-ID: <6c1abc949a978492bd9a1b30f4faaa2329d93068.1693860223.git.stefan@agner.ch>
|
||||
In-Reply-To: <fa0e84b5fbb7b6ce0b161bfcfe495f3648d02110.1693860223.git.stefan@agner.ch>
|
||||
References: <fa0e84b5fbb7b6ce0b161bfcfe495f3648d02110.1693860223.git.stefan@agner.ch>
|
||||
From: Stefan Agner <stefan@agner.ch>
|
||||
Date: Mon, 4 Sep 2023 22:36:10 +0200
|
||||
Subject: [PATCH] arch: arm64: dts: green: Improve LED representation
|
||||
|
||||
Fix color and use labels/node names according to the LEDs functionality.
|
||||
---
|
||||
arch/arm64/boot/dts/rockchip/rk3566-ha-green.dts | 11 +++++++----
|
||||
1 file changed, 7 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/arch/arm64/boot/dts/rockchip/rk3566-ha-green.dts b/arch/arm64/boot/dts/rockchip/rk3566-ha-green.dts
|
||||
index 5be4368767a1..d4bd90b7f0d6 100644
|
||||
--- a/arch/arm64/boot/dts/rockchip/rk3566-ha-green.dts
|
||||
+++ b/arch/arm64/boot/dts/rockchip/rk3566-ha-green.dts
|
||||
@@ -48,16 +48,18 @@ hdmi_con_in: endpoint {
|
||||
leds {
|
||||
compatible = "gpio-leds";
|
||||
|
||||
- led_power: led-0 {
|
||||
+ led_power: led-power {
|
||||
+ label = "power";
|
||||
gpios = <&gpio0 RK_PB6 GPIO_ACTIVE_HIGH>;
|
||||
function = LED_FUNCTION_POWER;
|
||||
- color = <LED_COLOR_ID_RED>;
|
||||
+ color = <LED_COLOR_ID_WHITE>;
|
||||
default-state = "keep";
|
||||
linux,default-trigger = "default-on";
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&led_power_pin>;
|
||||
};
|
||||
- led_act: led-1 {
|
||||
+ led_activity: led-activity {
|
||||
+ label = "activity";
|
||||
gpios = <&gpio0 RK_PB7 GPIO_ACTIVE_HIGH>;
|
||||
function = LED_FUNCTION_ACTIVITY;
|
||||
color = <LED_COLOR_ID_GREEN>;
|
||||
@@ -65,7 +67,8 @@ led_act: led-1 {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&led_act_pin>;
|
||||
};
|
||||
- led_user: led-2 {
|
||||
+ led_user: led-user {
|
||||
+ label = "user";
|
||||
gpios = <&gpio0 RK_PC5 GPIO_ACTIVE_HIGH>;
|
||||
function = LED_FUNCTION_HEARTBEAT;
|
||||
color = <LED_COLOR_ID_YELLOW>;
|
||||
--
|
||||
2.42.0
|
||||
|
@@ -0,0 +1,836 @@
|
||||
From 2ab36c774a9f16c10a2bffeb602a9c914ffacd00 Mon Sep 17 00:00:00 2001
|
||||
Message-ID: <2ab36c774a9f16c10a2bffeb602a9c914ffacd00.1692346980.git.stefan@agner.ch>
|
||||
From: Zhangqun Ming <north_sea@qq.com>
|
||||
Date: Thu, 6 Jul 2023 10:06:35 +0000
|
||||
Subject: [PATCH 1/9] arch: arm: dts: Add NabuCasa Green board
|
||||
|
||||
---
|
||||
arch/arm/dts/Makefile | 1 +
|
||||
arch/arm/dts/rk3566-ha-green-u-boot.dtsi | 28 +
|
||||
arch/arm/dts/rk3566-ha-green.dts | 685 +++++++++++++++++++++++
|
||||
configs/green_defconfig | 74 +++
|
||||
4 files changed, 788 insertions(+)
|
||||
create mode 100644 arch/arm/dts/rk3566-ha-green-u-boot.dtsi
|
||||
create mode 100644 arch/arm/dts/rk3566-ha-green.dts
|
||||
create mode 100644 configs/green_defconfig
|
||||
|
||||
diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile
|
||||
index 480269fa60..b82ebfe371 100644
|
||||
--- a/arch/arm/dts/Makefile
|
||||
+++ b/arch/arm/dts/Makefile
|
||||
@@ -167,6 +167,7 @@ dtb-$(CONFIG_ROCKCHIP_RK3399) += \
|
||||
|
||||
dtb-$(CONFIG_ROCKCHIP_RK3568) += \
|
||||
rk3566-anbernic-rgxx3.dtb \
|
||||
+ rk3566-ha-green.dtb \
|
||||
rk3566-radxa-cm3-io.dtb \
|
||||
rk3568-evb.dtb \
|
||||
rk3568-rock-3a.dtb
|
||||
diff --git a/arch/arm/dts/rk3566-ha-green-u-boot.dtsi b/arch/arm/dts/rk3566-ha-green-u-boot.dtsi
|
||||
new file mode 100644
|
||||
index 0000000000..83fa66d591
|
||||
--- /dev/null
|
||||
+++ b/arch/arm/dts/rk3566-ha-green-u-boot.dtsi
|
||||
@@ -0,0 +1,28 @@
|
||||
+// SPDX-License-Identifier: GPL-2.0+
|
||||
+/*
|
||||
+ * (C) Copyright 2021 Rockchip Electronics Co., Ltd
|
||||
+ * (C) Copyright 2023 Akash Gajjar <gajjar04akash@gmail.com>
|
||||
+ */
|
||||
+
|
||||
+#include "rk356x-u-boot.dtsi"
|
||||
+
|
||||
+/ {
|
||||
+ chosen {
|
||||
+ stdout-path = &uart2;
|
||||
+ u-boot,spl-boot-order = "same-as-spl", &sdhci, &sdmmc0;
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&sdmmc0 {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&sdhci {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&uart2 {
|
||||
+ clock-frequency = <24000000>;
|
||||
+ bootph-all;
|
||||
+ u-boot,dm-pre-reloc;
|
||||
+};
|
||||
diff --git a/arch/arm/dts/rk3566-ha-green.dts b/arch/arm/dts/rk3566-ha-green.dts
|
||||
new file mode 100644
|
||||
index 0000000000..15d2b73433
|
||||
--- /dev/null
|
||||
+++ b/arch/arm/dts/rk3566-ha-green.dts
|
||||
@@ -0,0 +1,685 @@
|
||||
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
|
||||
+/*
|
||||
+ * Copyright (c) 2023 Seeed Co., Ltd.
|
||||
+ *
|
||||
+ */
|
||||
+
|
||||
+/dts-v1/;
|
||||
+#include <dt-bindings/gpio/gpio.h>
|
||||
+#include <dt-bindings/leds/common.h>
|
||||
+#include <dt-bindings/pinctrl/rockchip.h>
|
||||
+#include <dt-bindings/soc/rockchip,vop2.h>
|
||||
+#include "rk3566.dtsi"
|
||||
+
|
||||
+/ {
|
||||
+ model = "Home Assistant Green";
|
||||
+ compatible = "rockchip,rk3566-ha-green", "rockchip,rk3566";
|
||||
+
|
||||
+ aliases {
|
||||
+ ethernet1 = &gmac1;
|
||||
+ mmc0 = &sdhci;
|
||||
+ mmc1 = &sdmmc0;
|
||||
+ };
|
||||
+
|
||||
+ chosen {
|
||||
+ stdout-path = "serial2:1500000n8";
|
||||
+ };
|
||||
+
|
||||
+ dc_12v: dc-12v-regulator {
|
||||
+ compatible = "regulator-fixed";
|
||||
+ regulator-name = "dc_12v";
|
||||
+ regulator-always-on;
|
||||
+ regulator-boot-on;
|
||||
+ regulator-min-microvolt = <12000000>;
|
||||
+ regulator-max-microvolt = <12000000>;
|
||||
+ };
|
||||
+
|
||||
+ hdmi-con {
|
||||
+ compatible = "hdmi-connector";
|
||||
+ type = "a";
|
||||
+
|
||||
+ port {
|
||||
+ hdmi_con_in: endpoint {
|
||||
+ remote-endpoint = <&hdmi_out_con>;
|
||||
+ };
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ leds {
|
||||
+ compatible = "gpio-leds";
|
||||
+
|
||||
+ led_power: led-0 {
|
||||
+ gpios = <&gpio0 RK_PB6 GPIO_ACTIVE_HIGH>;
|
||||
+ function = LED_FUNCTION_POWER;
|
||||
+ color = <LED_COLOR_ID_RED>;
|
||||
+ default-state = "keep";
|
||||
+ linux,default-trigger = "default-on";
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&led_power_pin>;
|
||||
+ };
|
||||
+ led_act: led-1 {
|
||||
+ gpios = <&gpio0 RK_PB7 GPIO_ACTIVE_HIGH>;
|
||||
+ function = LED_FUNCTION_ACTIVITY;
|
||||
+ color = <LED_COLOR_ID_GREEN>;
|
||||
+ linux,default-trigger = "activity";
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&led_act_pin>;
|
||||
+ };
|
||||
+ led_user: led-2 {
|
||||
+ gpios = <&gpio0 RK_PC5 GPIO_ACTIVE_HIGH>;
|
||||
+ function = LED_FUNCTION_HEARTBEAT;
|
||||
+ color = <LED_COLOR_ID_YELLOW>;
|
||||
+ linux,default-trigger = "heartbeat";
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&led_usr_pin>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ rk809-sound {
|
||||
+ compatible = "simple-audio-card";
|
||||
+ simple-audio-card,name = "Analog RK817";
|
||||
+ simple-audio-card,format = "i2s";
|
||||
+ simple-audio-card,mclk-fs = <256>;
|
||||
+ simple-audio-card,widgets =
|
||||
+ "Headphone", "Headphones",
|
||||
+ "Speaker", "Speaker";
|
||||
+ simple-audio-card,routing =
|
||||
+ "Headphones", "HPOL",
|
||||
+ "Headphones", "HPOR",
|
||||
+ "Speaker", "SPKO";
|
||||
+
|
||||
+ simple-audio-card,cpu {
|
||||
+ sound-dai = <&i2s1_8ch>;
|
||||
+ };
|
||||
+
|
||||
+ simple-audio-card,codec {
|
||||
+ sound-dai = <&rk809>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ vcc3v3_sys: vcc3v3-sys-regulator {
|
||||
+ compatible = "regulator-fixed";
|
||||
+ regulator-name = "vcc3v3_sys";
|
||||
+ regulator-always-on;
|
||||
+ regulator-boot-on;
|
||||
+ regulator-min-microvolt = <3300000>;
|
||||
+ regulator-max-microvolt = <3300000>;
|
||||
+ vin-supply = <&dc_12v>;
|
||||
+ };
|
||||
+
|
||||
+ vcc5v0_sys: vcc5v0-sys-regulator {
|
||||
+ compatible = "regulator-fixed";
|
||||
+ regulator-name = "vcc5v0_sys";
|
||||
+ regulator-always-on;
|
||||
+ regulator-boot-on;
|
||||
+ regulator-min-microvolt = <5000000>;
|
||||
+ regulator-max-microvolt = <5000000>;
|
||||
+ vin-supply = <&dc_12v>;
|
||||
+ };
|
||||
+
|
||||
+ vcc5v0_usb_host: vcc5v0-usb-host-regulator {
|
||||
+ compatible = "regulator-fixed";
|
||||
+ regulator-name = "vcc5v0_usb_host";
|
||||
+ enable-active-high;
|
||||
+ gpio = <&gpio0 RK_PA6 GPIO_ACTIVE_HIGH>;
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&vcc5v0_usb_host_en_pin>;
|
||||
+ regulator-min-microvolt = <5000000>;
|
||||
+ regulator-max-microvolt = <5000000>;
|
||||
+ vin-supply = <&vcc5v0_sys>;
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&cpu0 {
|
||||
+ cpu-supply = <&vdd_cpu>;
|
||||
+};
|
||||
+
|
||||
+&cpu1 {
|
||||
+ cpu-supply = <&vdd_cpu>;
|
||||
+};
|
||||
+
|
||||
+&cpu2 {
|
||||
+ cpu-supply = <&vdd_cpu>;
|
||||
+};
|
||||
+
|
||||
+&cpu3 {
|
||||
+ cpu-supply = <&vdd_cpu>;
|
||||
+};
|
||||
+
|
||||
+&gmac1 {
|
||||
+ assigned-clocks = <&cru SCLK_GMAC1_RX_TX>, <&cru SCLK_GMAC1>;
|
||||
+ assigned-clock-parents = <&cru SCLK_GMAC1_RGMII_SPEED>;
|
||||
+ assigned-clock-rates = <0>, <125000000>;
|
||||
+ clock_in_out = "output";
|
||||
+
|
||||
+ snps,reset-gpio = <&gpio4 RK_PC2 GPIO_ACTIVE_LOW>;
|
||||
+ snps,reset-active-low;
|
||||
+ /* Reset time is 20ms, 100ms for rtl8211f */
|
||||
+ snps,reset-delays-us = <0 20000 100000>;
|
||||
+
|
||||
+ phy-handle = <&rgmii_phy1>;
|
||||
+ phy-mode = "rgmii";
|
||||
+
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&gmac1m0_miim
|
||||
+ &gmac1m0_tx_bus2
|
||||
+ &gmac1m0_rx_bus2
|
||||
+ &gmac1m0_rgmii_clk
|
||||
+ &gmac1m0_rgmii_bus>;
|
||||
+ status = "okay";
|
||||
+
|
||||
+ tx_delay = <0x47>;
|
||||
+ rx_delay = <0x27>;
|
||||
+};
|
||||
+
|
||||
+&gpu {
|
||||
+ mali-supply = <&vdd_gpu>;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&hdmi {
|
||||
+ avdd-0v9-supply = <&vdda0v9_image>;
|
||||
+ avdd-1v8-supply = <&vcca1v8_image>;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&hdmi_in {
|
||||
+ hdmi_in_vp0: endpoint {
|
||||
+ remote-endpoint = <&vp0_out_hdmi>;
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&hdmi_out {
|
||||
+ hdmi_out_con: endpoint {
|
||||
+ remote-endpoint = <&hdmi_con_in>;
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&hdmi_sound {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&i2c0 {
|
||||
+ status = "okay";
|
||||
+
|
||||
+ vdd_cpu: rk8601@41 {
|
||||
+ compatible = "rockchip,rk8601";
|
||||
+ reg = <0x41>;
|
||||
+ vin-supply = <&vcc5v0_sys>;
|
||||
+ regulator-compatible = "rk860x-reg";
|
||||
+ regulator-name = "vdd_cpu";
|
||||
+ regulator-min-microvolt = <712500>;
|
||||
+ regulator-max-microvolt = <1500000>;
|
||||
+ regulator-ramp-delay = <2300>;
|
||||
+ rockchip,suspend-voltage-selector = <1>;
|
||||
+ regulator-boot-on;
|
||||
+ regulator-always-on;
|
||||
+ regulator-state-mem {
|
||||
+ regulator-off-in-suspend;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ rk809: pmic@20 {
|
||||
+ compatible = "rockchip,rk809";
|
||||
+ reg = <0x20>;
|
||||
+ interrupt-parent = <&gpio0>;
|
||||
+ interrupts = <RK_PA3 IRQ_TYPE_LEVEL_LOW>;
|
||||
+ assigned-clocks = <&cru I2S1_MCLKOUT_TX>;
|
||||
+ assigned-clock-parents = <&cru CLK_I2S1_8CH_TX>;
|
||||
+ #clock-cells = <1>;
|
||||
+ clock-names = "mclk";
|
||||
+ clocks = <&cru I2S1_MCLKOUT_TX>;
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&pmic_int_l>, <&i2s1m0_mclk>;
|
||||
+
|
||||
+ rockchip,system-power-controller;
|
||||
+ #sound-dai-cells = <0>;
|
||||
+ wakeup-source;
|
||||
+
|
||||
+ vcc1-supply = <&vcc3v3_sys>;
|
||||
+ vcc2-supply = <&vcc3v3_sys>;
|
||||
+ vcc3-supply = <&vcc3v3_sys>;
|
||||
+ vcc4-supply = <&vcc3v3_sys>;
|
||||
+ vcc5-supply = <&vcc3v3_sys>;
|
||||
+ vcc6-supply = <&vcc3v3_sys>;
|
||||
+ vcc7-supply = <&vcc3v3_sys>;
|
||||
+ vcc8-supply = <&vcc3v3_sys>;
|
||||
+ vcc9-supply = <&vcc3v3_sys>;
|
||||
+
|
||||
+ regulators {
|
||||
+ vdd_logic: DCDC_REG1 {
|
||||
+ regulator-name = "vdd_logic";
|
||||
+ regulator-always-on;
|
||||
+ regulator-boot-on;
|
||||
+ regulator-init-microvolt = <900000>;
|
||||
+ regulator-initial-mode = <0x2>;
|
||||
+ regulator-min-microvolt = <500000>;
|
||||
+ regulator-max-microvolt = <1350000>;
|
||||
+ regulator-ramp-delay = <6001>;
|
||||
+
|
||||
+ regulator-state-mem {
|
||||
+ regulator-off-in-suspend;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ vdd_gpu: DCDC_REG2 {
|
||||
+ regulator-name = "vdd_gpu";
|
||||
+ regulator-always-on;
|
||||
+ regulator-init-microvolt = <900000>;
|
||||
+ regulator-initial-mode = <0x2>;
|
||||
+ regulator-min-microvolt = <500000>;
|
||||
+ regulator-max-microvolt = <1350000>;
|
||||
+ regulator-ramp-delay = <6001>;
|
||||
+
|
||||
+ regulator-state-mem {
|
||||
+ regulator-off-in-suspend;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ vcc_ddr: DCDC_REG3 {
|
||||
+ regulator-name = "vcc_ddr";
|
||||
+ regulator-always-on;
|
||||
+ regulator-boot-on;
|
||||
+ regulator-initial-mode = <0x2>;
|
||||
+
|
||||
+ regulator-state-mem {
|
||||
+ regulator-on-in-suspend;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ vdd_npu: DCDC_REG4 {
|
||||
+ regulator-name = "vdd_npu";
|
||||
+ regulator-init-microvolt = <900000>;
|
||||
+ regulator-initial-mode = <0x2>;
|
||||
+ regulator-min-microvolt = <500000>;
|
||||
+ regulator-max-microvolt = <1350000>;
|
||||
+ regulator-ramp-delay = <6001>;
|
||||
+
|
||||
+ regulator-state-mem {
|
||||
+ regulator-off-in-suspend;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ vcc_1v8: DCDC_REG5 {
|
||||
+ regulator-name = "vcc_1v8";
|
||||
+ regulator-always-on;
|
||||
+ regulator-boot-on;
|
||||
+ regulator-min-microvolt = <1800000>;
|
||||
+ regulator-max-microvolt = <1800000>;
|
||||
+
|
||||
+ regulator-state-mem {
|
||||
+ regulator-off-in-suspend;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ vdda0v9_image: LDO_REG1 {
|
||||
+ regulator-name = "vdda0v9_image";
|
||||
+ regulator-always-on;
|
||||
+ regulator-min-microvolt = <900000>;
|
||||
+ regulator-max-microvolt = <900000>;
|
||||
+
|
||||
+ regulator-state-mem {
|
||||
+ regulator-off-in-suspend;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ vdda_0v9: LDO_REG2 {
|
||||
+ regulator-name = "vdda_0v9";
|
||||
+ regulator-always-on;
|
||||
+ regulator-boot-on;
|
||||
+ regulator-min-microvolt = <900000>;
|
||||
+ regulator-max-microvolt = <900000>;
|
||||
+
|
||||
+ regulator-state-mem {
|
||||
+ regulator-off-in-suspend;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ vdda0v9_pmu: LDO_REG3 {
|
||||
+ regulator-name = "vdda0v9_pmu";
|
||||
+ regulator-always-on;
|
||||
+ regulator-boot-on;
|
||||
+ regulator-min-microvolt = <900000>;
|
||||
+ regulator-max-microvolt = <900000>;
|
||||
+
|
||||
+ regulator-state-mem {
|
||||
+ regulator-on-in-suspend;
|
||||
+ regulator-suspend-microvolt = <900000>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ vccio_acodec: LDO_REG4 {
|
||||
+ regulator-name = "vccio_acodec";
|
||||
+ regulator-always-on;
|
||||
+ regulator-boot-on;
|
||||
+ regulator-min-microvolt = <3300000>;
|
||||
+ regulator-max-microvolt = <3300000>;
|
||||
+
|
||||
+ regulator-state-mem {
|
||||
+ regulator-off-in-suspend;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ vccio_sd: LDO_REG5 {
|
||||
+ regulator-name = "vccio_sd";
|
||||
+ regulator-min-microvolt = <1800000>;
|
||||
+ regulator-max-microvolt = <3300000>;
|
||||
+
|
||||
+ regulator-state-mem {
|
||||
+ regulator-off-in-suspend;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ vcc3v3_pmu: LDO_REG6 {
|
||||
+ regulator-name = "vcc3v3_pmu";
|
||||
+ regulator-always-on;
|
||||
+ regulator-boot-on;
|
||||
+ regulator-min-microvolt = <3300000>;
|
||||
+ regulator-max-microvolt = <3300000>;
|
||||
+
|
||||
+ regulator-state-mem {
|
||||
+ regulator-on-in-suspend;
|
||||
+ regulator-suspend-microvolt = <3300000>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ vcca_1v8: LDO_REG7 {
|
||||
+ regulator-name = "vcca_1v8";
|
||||
+ regulator-always-on;
|
||||
+ regulator-boot-on;
|
||||
+ regulator-min-microvolt = <1800000>;
|
||||
+ regulator-max-microvolt = <1800000>;
|
||||
+
|
||||
+ regulator-state-mem {
|
||||
+ regulator-off-in-suspend;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ vcca1v8_pmu: LDO_REG8 {
|
||||
+ regulator-name = "vcca1v8_pmu";
|
||||
+ regulator-always-on;
|
||||
+ regulator-boot-on;
|
||||
+ regulator-min-microvolt = <1800000>;
|
||||
+ regulator-max-microvolt = <1800000>;
|
||||
+
|
||||
+ regulator-state-mem {
|
||||
+ regulator-on-in-suspend;
|
||||
+ regulator-suspend-microvolt = <1800000>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ vcca1v8_image: LDO_REG9 {
|
||||
+ regulator-name = "vcca1v8_image";
|
||||
+ regulator-always-on;
|
||||
+ regulator-min-microvolt = <1800000>;
|
||||
+ regulator-max-microvolt = <1800000>;
|
||||
+
|
||||
+ regulator-state-mem {
|
||||
+ regulator-off-in-suspend;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ vcc_3v3: SWITCH_REG1 {
|
||||
+ regulator-name = "vcc_3v3";
|
||||
+ regulator-always-on;
|
||||
+ regulator-boot-on;
|
||||
+
|
||||
+ regulator-state-mem {
|
||||
+ regulator-off-in-suspend;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ vcc3v3_sd: SWITCH_REG2 {
|
||||
+ regulator-name = "vcc3v3_sd";
|
||||
+
|
||||
+ regulator-state-mem {
|
||||
+ regulator-off-in-suspend;
|
||||
+ };
|
||||
+ };
|
||||
+ };
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&i2c1 {
|
||||
+ clock-frequency = <400000>;
|
||||
+ status = "okay";
|
||||
+
|
||||
+ rtc: rtc@51 {
|
||||
+ compatible = "nxp,pcf8563";
|
||||
+ reg = <0x51>;
|
||||
+ #clock-cells = <0>;
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&i2s0_8ch {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&i2s1_8ch {
|
||||
+ rockchip,trcm-sync-tx-only;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&mdio1 {
|
||||
+ rgmii_phy1: ethernet-phy@0 {
|
||||
+ compatible = "ethernet-phy-ieee802.3-c22";
|
||||
+ reg = <0x0>;
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&pinctrl {
|
||||
+ fspi {
|
||||
+ fspi_dual_io_pins: fspi-dual-io-pins {
|
||||
+ rockchip,pins =
|
||||
+ /* fspi_clk */
|
||||
+ <1 RK_PD0 1 &pcfg_pull_none>,
|
||||
+ /* fspi_cs0n */
|
||||
+ <1 RK_PD3 1 &pcfg_pull_none>,
|
||||
+ /* fspi_d0 */
|
||||
+ <1 RK_PD1 1 &pcfg_pull_none>,
|
||||
+ /* fspi_d1 */
|
||||
+ <1 RK_PD2 1 &pcfg_pull_none>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ ethernet {
|
||||
+ eth_phy_rst: eth_phy_rst {
|
||||
+ rockchip,pins = <4 RK_PC2 RK_FUNC_GPIO &pcfg_pull_none>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ leds {
|
||||
+ led_power_pin: led-power-pin {
|
||||
+ rockchip,pins = <0 RK_PB6 RK_FUNC_GPIO &pcfg_pull_none>;
|
||||
+ };
|
||||
+ led_act_pin: led-act-pin {
|
||||
+ rockchip,pins = <0 RK_PB7 RK_FUNC_GPIO &pcfg_pull_none>;
|
||||
+ };
|
||||
+ led_usr_pin: led-user-pin {
|
||||
+ rockchip,pins = <0 RK_PC5 RK_FUNC_GPIO &pcfg_pull_none>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ pmic {
|
||||
+ pmic_int_l: pmic-int-l {
|
||||
+ rockchip,pins = <0 RK_PA3 RK_FUNC_GPIO &pcfg_pull_up>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ usb {
|
||||
+ vcc5v0_usb_host_en_pin: vcc5v0-usb-host-en-pin {
|
||||
+ rockchip,pins = <0 RK_PA6 RK_FUNC_GPIO &pcfg_pull_none>;
|
||||
+ };
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&pmu_io_domains {
|
||||
+ pmuio1-supply = <&vcc3v3_pmu>;
|
||||
+ pmuio2-supply = <&vcc3v3_pmu>;
|
||||
+ vccio1-supply = <&vccio_acodec>;
|
||||
+ vccio2-supply = <&vcc_1v8>;
|
||||
+ vccio3-supply = <&vccio_sd>;
|
||||
+ vccio4-supply = <&vcc_1v8>; /* float */
|
||||
+ vccio5-supply = <&vcc_1v8>;
|
||||
+ vccio6-supply = <&vcc_1v8>;
|
||||
+ vccio7-supply = <&vcc_3v3>;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&saradc {
|
||||
+ vref-supply = <&vcca_1v8>;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&sdhci {
|
||||
+ bus-width = <8>;
|
||||
+ max-frequency = <200000000>;
|
||||
+ non-removable;
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&emmc_bus8 &emmc_clk &emmc_cmd &emmc_datastrobe &emmc_rstnout>;
|
||||
+ vmmc-supply = <&vcc_3v3>;
|
||||
+ vqmmc-supply = <&vcc_1v8>;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&sdmmc0 {
|
||||
+ bus-width = <4>;
|
||||
+ cap-sd-highspeed;
|
||||
+ cd-gpios = <&gpio0 RK_PA4 GPIO_ACTIVE_LOW>;
|
||||
+ disable-wp;
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&sdmmc0_bus4 &sdmmc0_clk &sdmmc0_cmd &sdmmc0_det>;
|
||||
+ sd-uhs-sdr104;
|
||||
+ vmmc-supply = <&vcc3v3_sd>;
|
||||
+ vqmmc-supply = <&vccio_sd>;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&sfc {
|
||||
+ /* Dual I/O mode as the D2 pin conflicts with the eMMC */
|
||||
+ pinctrl-0 = <&fspi_dual_io_pins>;
|
||||
+ pinctrl-names = "default";
|
||||
+ #address-cells = <1>;
|
||||
+ #size-cells = <0>;
|
||||
+ status = "okay";
|
||||
+
|
||||
+ flash@0 {
|
||||
+ compatible = "jedec,spi-nor";
|
||||
+ reg = <0>;
|
||||
+ spi-max-frequency = <100000000>;
|
||||
+ spi-rx-bus-width = <4>;
|
||||
+ spi-tx-bus-width = <1>;
|
||||
+
|
||||
+ partitions {
|
||||
+ compatible = "fixed-partitions";
|
||||
+ #address-cells = <1>;
|
||||
+ #size-cells = <1>;
|
||||
+
|
||||
+ partition@0 {
|
||||
+ label = "SPL";
|
||||
+ reg = <0x0 0xe0000>;
|
||||
+ };
|
||||
+ partition@e0000 {
|
||||
+ label = "U-Boot Env";
|
||||
+ reg = <0xe0000 0x20000>;
|
||||
+ };
|
||||
+ partition@100000 {
|
||||
+ label = "U-Boot";
|
||||
+ reg = <0x100000 0x200000>;
|
||||
+ };
|
||||
+ partition@300000 {
|
||||
+ label = "splash";
|
||||
+ reg = <0x300000 0x100000>;
|
||||
+ };
|
||||
+ partition@400000 {
|
||||
+ label = "Filesystem";
|
||||
+ reg = <0x400000 0xc00000>;
|
||||
+ };
|
||||
+ };
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&tsadc {
|
||||
+ rockchip,hw-tshut-mode = <1>;
|
||||
+ rockchip,hw-tshut-polarity = <0>;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&uart2 {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&usb_host0_ehci {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&usb_host0_ohci {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&usb_host0_xhci {
|
||||
+ dr_mode = "host";
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&usb_host1_ehci {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&usb_host1_ohci {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&usb_host1_xhci {
|
||||
+ status = "okay";
|
||||
+ phys = <&usb2phy0_host>;
|
||||
+ phy-names = "usb2-phy";
|
||||
+ snps,dis_u2_susphy_quirk;
|
||||
+ extcon = <&usb2phy0>;
|
||||
+ maximum-speed = "high-speed";
|
||||
+};
|
||||
+
|
||||
+&usb2phy0 {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&usb2phy0_host {
|
||||
+ phy-supply = <&vcc5v0_usb_host>;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&usb2phy0_otg {
|
||||
+ phy-supply = <&vcc5v0_usb_host>;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&usb2phy1 {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&usb2phy1_host {
|
||||
+ phy-supply = <&vcc5v0_usb_host>;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&usb2phy1_otg {
|
||||
+ phy-supply = <&vcc5v0_usb_host>;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&vop {
|
||||
+ assigned-clocks = <&cru DCLK_VOP0>, <&cru DCLK_VOP1>;
|
||||
+ assigned-clock-parents = <&pmucru PLL_HPLL>, <&cru PLL_VPLL>;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&vop_mmu {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&vp0 {
|
||||
+ vp0_out_hdmi: endpoint@ROCKCHIP_VOP2_EP_HDMI0 {
|
||||
+ reg = <ROCKCHIP_VOP2_EP_HDMI0>;
|
||||
+ remote-endpoint = <&hdmi_in_vp0>;
|
||||
+ };
|
||||
+};
|
||||
diff --git a/configs/green_defconfig b/configs/green_defconfig
|
||||
new file mode 100644
|
||||
index 0000000000..0617d308aa
|
||||
--- /dev/null
|
||||
+++ b/configs/green_defconfig
|
||||
@@ -0,0 +1,74 @@
|
||||
+CONFIG_ARM=y
|
||||
+CONFIG_SKIP_LOWLEVEL_INIT=y
|
||||
+CONFIG_COUNTER_FREQUENCY=24000000
|
||||
+CONFIG_ARCH_ROCKCHIP=y
|
||||
+CONFIG_TEXT_BASE=0x00a00000
|
||||
+CONFIG_SPL_LIBCOMMON_SUPPORT=y
|
||||
+CONFIG_SPL_LIBGENERIC_SUPPORT=y
|
||||
+CONFIG_NR_DRAM_BANKS=2
|
||||
+CONFIG_DEFAULT_DEVICE_TREE="rk3566-ha-green"
|
||||
+CONFIG_ROCKCHIP_RK3568=y
|
||||
+CONFIG_SPL_ROCKCHIP_BACK_TO_BROM=y
|
||||
+CONFIG_SPL_ROCKCHIP_COMMON_BOARD=y
|
||||
+CONFIG_SPL_MMC=y
|
||||
+CONFIG_SPL_SERIAL=y
|
||||
+CONFIG_SPL_STACK_R_ADDR=0x600000
|
||||
+CONFIG_TARGET_EVB_RK3568=y
|
||||
+CONFIG_DEBUG_UART_BASE=0xFE660000
|
||||
+CONFIG_DEBUG_UART_CLOCK=24000000
|
||||
+CONFIG_SYS_LOAD_ADDR=0xc00800
|
||||
+CONFIG_DEBUG_UART=y
|
||||
+CONFIG_HAS_CUSTOM_SYS_INIT_SP_ADDR=y
|
||||
+CONFIG_CUSTOM_SYS_INIT_SP_ADDR=0xc00000
|
||||
+CONFIG_FIT=y
|
||||
+CONFIG_FIT_VERBOSE=y
|
||||
+CONFIG_SPL_LOAD_FIT=y
|
||||
+CONFIG_DEFAULT_FDT_FILE="rockchip/rk3566-ha-green.dtb"
|
||||
+# CONFIG_DISPLAY_CPUINFO is not set
|
||||
+CONFIG_DISPLAY_BOARDINFO_LATE=y
|
||||
+CONFIG_SPL_MAX_SIZE=0x20000
|
||||
+CONFIG_SPL_PAD_TO=0x7f8000
|
||||
+CONFIG_SPL_HAS_BSS_LINKER_SECTION=y
|
||||
+CONFIG_SPL_BSS_START_ADDR=0x4000000
|
||||
+CONFIG_SPL_BSS_MAX_SIZE=0x4000
|
||||
+# CONFIG_SPL_RAW_IMAGE_SUPPORT is not set
|
||||
+# CONFIG_SPL_SHARES_INIT_SP_ADDR is not set
|
||||
+CONFIG_DM_PMIC=y
|
||||
+CONFIG_PMIC_RK8XX=y
|
||||
+CONFIG_SPL_PMIC_RK8XX=y
|
||||
+CONFIG_SPL_STACK=0x400000
|
||||
+CONFIG_SPL_STACK_R=y
|
||||
+CONFIG_SPL_ATF=y
|
||||
+CONFIG_CMD_I2C=y
|
||||
+CONFIG_CMD_GPT=y
|
||||
+CONFIG_CMD_MMC=y
|
||||
+# CONFIG_CMD_SETEXPR is not set
|
||||
+# CONFIG_SPL_DOS_PARTITION is not set
|
||||
+CONFIG_SPL_OF_CONTROL=y
|
||||
+CONFIG_OF_LIVE=y
|
||||
+CONFIG_NET_RANDOM_ETHADDR=y
|
||||
+CONFIG_REGULATOR_RK8XX=y
|
||||
+CONFIG_SPL_REGMAP=y
|
||||
+CONFIG_SPL_SYSCON=y
|
||||
+CONFIG_SPL_CLK=y
|
||||
+CONFIG_ROCKCHIP_GPIO=y
|
||||
+CONFIG_SYS_I2C_ROCKCHIP=y
|
||||
+CONFIG_MISC=y
|
||||
+CONFIG_SUPPORT_EMMC_RPMB=y
|
||||
+CONFIG_MMC_DW=y
|
||||
+CONFIG_MMC_DW_ROCKCHIP=y
|
||||
+CONFIG_MMC_SDHCI=y
|
||||
+CONFIG_MMC_SDHCI_SDMA=y
|
||||
+CONFIG_MMC_SDHCI_ROCKCHIP=y
|
||||
+CONFIG_ETH_DESIGNWARE=y
|
||||
+CONFIG_GMAC_ROCKCHIP=y
|
||||
+CONFIG_REGULATOR_PWM=y
|
||||
+CONFIG_PWM_ROCKCHIP=y
|
||||
+CONFIG_SPL_RAM=y
|
||||
+CONFIG_DM_RESET=y
|
||||
+CONFIG_BAUDRATE=1500000
|
||||
+CONFIG_DEBUG_UART_SHIFT=2
|
||||
+CONFIG_SYS_NS16550_MEM32=y
|
||||
+CONFIG_SYSRESET=y
|
||||
+# CONFIG_BINMAN_FDT is not set
|
||||
+CONFIG_ERRNO_STR=y
|
||||
--
|
||||
2.41.0
|
||||
|
@@ -0,0 +1,120 @@
|
||||
From d4f52bc53540341dcb3408a3f2d4ec8bd1fe260a Mon Sep 17 00:00:00 2001
|
||||
Message-ID: <d4f52bc53540341dcb3408a3f2d4ec8bd1fe260a.1692346980.git.stefan@agner.ch>
|
||||
In-Reply-To: <2ab36c774a9f16c10a2bffeb602a9c914ffacd00.1692346980.git.stefan@agner.ch>
|
||||
References: <2ab36c774a9f16c10a2bffeb602a9c914ffacd00.1692346980.git.stefan@agner.ch>
|
||||
From: Zhangqun Ming <north_sea@qq.com>
|
||||
Date: Fri, 14 Jul 2023 14:13:39 +0000
|
||||
Subject: [PATCH 2/9] configs: green: Support USB boot
|
||||
|
||||
---
|
||||
configs/green_defconfig | 52 ++++++++++++++++++++++++++++-------------
|
||||
1 file changed, 36 insertions(+), 16 deletions(-)
|
||||
|
||||
diff --git a/configs/green_defconfig b/configs/green_defconfig
|
||||
index 0617d308aa..14960b67d2 100644
|
||||
--- a/configs/green_defconfig
|
||||
+++ b/configs/green_defconfig
|
||||
@@ -6,48 +6,54 @@ CONFIG_TEXT_BASE=0x00a00000
|
||||
CONFIG_SPL_LIBCOMMON_SUPPORT=y
|
||||
CONFIG_SPL_LIBGENERIC_SUPPORT=y
|
||||
CONFIG_NR_DRAM_BANKS=2
|
||||
+CONFIG_HAS_CUSTOM_SYS_INIT_SP_ADDR=y
|
||||
+CONFIG_CUSTOM_SYS_INIT_SP_ADDR=0xc00000
|
||||
+CONFIG_SF_DEFAULT_SPEED=24000000
|
||||
+CONFIG_SF_DEFAULT_MODE=0x2000
|
||||
CONFIG_DEFAULT_DEVICE_TREE="rk3566-ha-green"
|
||||
CONFIG_ROCKCHIP_RK3568=y
|
||||
-CONFIG_SPL_ROCKCHIP_BACK_TO_BROM=y
|
||||
CONFIG_SPL_ROCKCHIP_COMMON_BOARD=y
|
||||
-CONFIG_SPL_MMC=y
|
||||
+CONFIG_ROCKCHIP_SPI_IMAGE=y
|
||||
CONFIG_SPL_SERIAL=y
|
||||
CONFIG_SPL_STACK_R_ADDR=0x600000
|
||||
-CONFIG_TARGET_EVB_RK3568=y
|
||||
+CONFIG_SPL_STACK=0x400000
|
||||
CONFIG_DEBUG_UART_BASE=0xFE660000
|
||||
CONFIG_DEBUG_UART_CLOCK=24000000
|
||||
+CONFIG_SPL_SPI_FLASH_SUPPORT=y
|
||||
+CONFIG_SPL_SPI=y
|
||||
CONFIG_SYS_LOAD_ADDR=0xc00800
|
||||
CONFIG_DEBUG_UART=y
|
||||
-CONFIG_HAS_CUSTOM_SYS_INIT_SP_ADDR=y
|
||||
-CONFIG_CUSTOM_SYS_INIT_SP_ADDR=0xc00000
|
||||
CONFIG_FIT=y
|
||||
CONFIG_FIT_VERBOSE=y
|
||||
+CONFIG_SPL_FIT_SIGNATURE=y
|
||||
CONFIG_SPL_LOAD_FIT=y
|
||||
+CONFIG_LEGACY_IMAGE_FORMAT=y
|
||||
CONFIG_DEFAULT_FDT_FILE="rockchip/rk3566-ha-green.dtb"
|
||||
# CONFIG_DISPLAY_CPUINFO is not set
|
||||
CONFIG_DISPLAY_BOARDINFO_LATE=y
|
||||
-CONFIG_SPL_MAX_SIZE=0x20000
|
||||
+CONFIG_SPL_MAX_SIZE=0x40000
|
||||
CONFIG_SPL_PAD_TO=0x7f8000
|
||||
CONFIG_SPL_HAS_BSS_LINKER_SECTION=y
|
||||
CONFIG_SPL_BSS_START_ADDR=0x4000000
|
||||
CONFIG_SPL_BSS_MAX_SIZE=0x4000
|
||||
# CONFIG_SPL_RAW_IMAGE_SUPPORT is not set
|
||||
# CONFIG_SPL_SHARES_INIT_SP_ADDR is not set
|
||||
-CONFIG_DM_PMIC=y
|
||||
-CONFIG_PMIC_RK8XX=y
|
||||
-CONFIG_SPL_PMIC_RK8XX=y
|
||||
-CONFIG_SPL_STACK=0x400000
|
||||
CONFIG_SPL_STACK_R=y
|
||||
+CONFIG_SPL_SPI_LOAD=y
|
||||
+CONFIG_SYS_SPI_U_BOOT_OFFS=0x60000
|
||||
CONFIG_SPL_ATF=y
|
||||
-CONFIG_CMD_I2C=y
|
||||
+CONFIG_CMD_GPIO=y
|
||||
CONFIG_CMD_GPT=y
|
||||
+CONFIG_CMD_I2C=y
|
||||
CONFIG_CMD_MMC=y
|
||||
+CONFIG_CMD_USB=y
|
||||
# CONFIG_CMD_SETEXPR is not set
|
||||
+CONFIG_CMD_PMIC=y
|
||||
+CONFIG_CMD_REGULATOR=y
|
||||
# CONFIG_SPL_DOS_PARTITION is not set
|
||||
CONFIG_SPL_OF_CONTROL=y
|
||||
CONFIG_OF_LIVE=y
|
||||
-CONFIG_NET_RANDOM_ETHADDR=y
|
||||
-CONFIG_REGULATOR_RK8XX=y
|
||||
+CONFIG_OF_SPL_REMOVE_PROPS="clock-names interrupt-parent assigned-clocks assigned-clock-rates assigned-clock-parents"
|
||||
CONFIG_SPL_REGMAP=y
|
||||
CONFIG_SPL_SYSCON=y
|
||||
CONFIG_SPL_CLK=y
|
||||
@@ -60,15 +66,29 @@ CONFIG_MMC_DW_ROCKCHIP=y
|
||||
CONFIG_MMC_SDHCI=y
|
||||
CONFIG_MMC_SDHCI_SDMA=y
|
||||
CONFIG_MMC_SDHCI_ROCKCHIP=y
|
||||
+CONFIG_SPI_FLASH_MACRONIX=y
|
||||
+CONFIG_SPI_FLASH_XTX=y
|
||||
CONFIG_ETH_DESIGNWARE=y
|
||||
CONFIG_GMAC_ROCKCHIP=y
|
||||
-CONFIG_REGULATOR_PWM=y
|
||||
+CONFIG_PHY_ROCKCHIP_INNO_USB2=y
|
||||
+CONFIG_PHY_ROCKCHIP_NANENG_COMBOPHY=y
|
||||
+CONFIG_SPL_PINCTRL=y
|
||||
+CONFIG_DM_PMIC=y
|
||||
+CONFIG_PMIC_RK8XX=y
|
||||
+CONFIG_REGULATOR_RK8XX=y
|
||||
CONFIG_PWM_ROCKCHIP=y
|
||||
CONFIG_SPL_RAM=y
|
||||
-CONFIG_DM_RESET=y
|
||||
CONFIG_BAUDRATE=1500000
|
||||
CONFIG_DEBUG_UART_SHIFT=2
|
||||
CONFIG_SYS_NS16550_MEM32=y
|
||||
+CONFIG_ROCKCHIP_SFC=y
|
||||
CONFIG_SYSRESET=y
|
||||
-# CONFIG_BINMAN_FDT is not set
|
||||
+CONFIG_USB=y
|
||||
+CONFIG_USB_XHCI_HCD=y
|
||||
+CONFIG_USB_XHCI_DWC3=y
|
||||
+CONFIG_USB_EHCI_HCD=y
|
||||
+CONFIG_USB_EHCI_GENERIC=y
|
||||
+CONFIG_USB_OHCI_HCD=y
|
||||
+CONFIG_USB_OHCI_GENERIC=y
|
||||
+CONFIG_USB_DWC3=y
|
||||
CONFIG_ERRNO_STR=y
|
||||
--
|
||||
2.41.0
|
||||
|
@@ -0,0 +1,53 @@
|
||||
From c59235f8be1bdd261e1677177c1bef1bee1025ea Mon Sep 17 00:00:00 2001
|
||||
Message-ID: <c59235f8be1bdd261e1677177c1bef1bee1025ea.1692346980.git.stefan@agner.ch>
|
||||
In-Reply-To: <2ab36c774a9f16c10a2bffeb602a9c914ffacd00.1692346980.git.stefan@agner.ch>
|
||||
References: <2ab36c774a9f16c10a2bffeb602a9c914ffacd00.1692346980.git.stefan@agner.ch>
|
||||
From: Zhangqun Ming <north_sea@qq.com>
|
||||
Date: Fri, 14 Jul 2023 14:14:10 +0000
|
||||
Subject: [PATCH 3/9] arch: arm: dts: rk3566: green: boot order
|
||||
|
||||
---
|
||||
arch/arm/dts/rk3566-ha-green-u-boot.dtsi | 6 +++++-
|
||||
arch/arm/dts/rk3566-ha-green.dts | 2 +-
|
||||
2 files changed, 6 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/arch/arm/dts/rk3566-ha-green-u-boot.dtsi b/arch/arm/dts/rk3566-ha-green-u-boot.dtsi
|
||||
index 83fa66d591..7f2ed298ce 100644
|
||||
--- a/arch/arm/dts/rk3566-ha-green-u-boot.dtsi
|
||||
+++ b/arch/arm/dts/rk3566-ha-green-u-boot.dtsi
|
||||
@@ -9,7 +9,7 @@
|
||||
/ {
|
||||
chosen {
|
||||
stdout-path = &uart2;
|
||||
- u-boot,spl-boot-order = "same-as-spl", &sdhci, &sdmmc0;
|
||||
+ u-boot,spl-boot-order = &spiflash, &sdmmc0, &sdhci;
|
||||
};
|
||||
};
|
||||
|
||||
@@ -21,6 +21,10 @@
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
+&spiflash {
|
||||
+ bootph-all;
|
||||
+};
|
||||
+
|
||||
&uart2 {
|
||||
clock-frequency = <24000000>;
|
||||
bootph-all;
|
||||
diff --git a/arch/arm/dts/rk3566-ha-green.dts b/arch/arm/dts/rk3566-ha-green.dts
|
||||
index 15d2b73433..bf0f81c3a1 100644
|
||||
--- a/arch/arm/dts/rk3566-ha-green.dts
|
||||
+++ b/arch/arm/dts/rk3566-ha-green.dts
|
||||
@@ -563,7 +563,7 @@
|
||||
#size-cells = <0>;
|
||||
status = "okay";
|
||||
|
||||
- flash@0 {
|
||||
+ spiflash: flash@0 {
|
||||
compatible = "jedec,spi-nor";
|
||||
reg = <0>;
|
||||
spi-max-frequency = <100000000>;
|
||||
--
|
||||
2.41.0
|
||||
|
@@ -0,0 +1,158 @@
|
||||
From e525d29174f335fe9aa72da8642699609631b2be Mon Sep 17 00:00:00 2001
|
||||
Message-ID: <e525d29174f335fe9aa72da8642699609631b2be.1692346980.git.stefan@agner.ch>
|
||||
In-Reply-To: <2ab36c774a9f16c10a2bffeb602a9c914ffacd00.1692346980.git.stefan@agner.ch>
|
||||
References: <2ab36c774a9f16c10a2bffeb602a9c914ffacd00.1692346980.git.stefan@agner.ch>
|
||||
From: Zhangqun Ming <north_sea@qq.com>
|
||||
Date: Sat, 15 Jul 2023 08:46:09 +0000
|
||||
Subject: [PATCH 4/9] arch: arm: dts: green: spi nor uboot
|
||||
|
||||
---
|
||||
arch/arm/dts/rk3566-ha-green-u-boot.dtsi | 88 +++++++++++++++++++++++-
|
||||
arch/arm/dts/rk3566-ha-green.dts | 4 +-
|
||||
configs/green_defconfig | 2 +
|
||||
3 files changed, 91 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/arch/arm/dts/rk3566-ha-green-u-boot.dtsi b/arch/arm/dts/rk3566-ha-green-u-boot.dtsi
|
||||
index 7f2ed298ce..fa98078fce 100644
|
||||
--- a/arch/arm/dts/rk3566-ha-green-u-boot.dtsi
|
||||
+++ b/arch/arm/dts/rk3566-ha-green-u-boot.dtsi
|
||||
@@ -13,15 +13,96 @@
|
||||
};
|
||||
};
|
||||
|
||||
+&emmc_bus8 {
|
||||
+ bootph-all;
|
||||
+};
|
||||
+
|
||||
+&emmc_clk {
|
||||
+ bootph-all;
|
||||
+};
|
||||
+
|
||||
+&emmc_cmd {
|
||||
+ bootph-all;
|
||||
+};
|
||||
+
|
||||
+&emmc_datastrobe {
|
||||
+ bootph-all;
|
||||
+};
|
||||
+
|
||||
+&fspi_pins {
|
||||
+ bootph-all;
|
||||
+};
|
||||
+
|
||||
+&pinctrl {
|
||||
+ bootph-all;
|
||||
+};
|
||||
+
|
||||
+&pcfg_pull_none {
|
||||
+ bootph-all;
|
||||
+};
|
||||
+
|
||||
+&pcfg_pull_up_drv_level_2 {
|
||||
+ bootph-all;
|
||||
+};
|
||||
+
|
||||
+&pcfg_pull_up {
|
||||
+ bootph-all;
|
||||
+};
|
||||
+
|
||||
+&sdmmc0_bus4 {
|
||||
+ bootph-all;
|
||||
+};
|
||||
+
|
||||
+&sdmmc0_clk {
|
||||
+ bootph-all;
|
||||
+};
|
||||
+
|
||||
+&sdmmc0_cmd {
|
||||
+ bootph-all;
|
||||
+};
|
||||
+
|
||||
+&sdmmc0_det {
|
||||
+ bootph-all;
|
||||
+};
|
||||
+
|
||||
&sdmmc0 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&sdhci {
|
||||
+ cap-mmc-highspeed;
|
||||
+ mmc-ddr-1_8v;
|
||||
+ mmc-hs200-1_8v;
|
||||
+ mmc-hs400-1_8v;
|
||||
+ mmc-hs400-enhanced-strobe;
|
||||
+};
|
||||
+
|
||||
+&sfc {
|
||||
+ bootph-all;
|
||||
+ u-boot,spl-sfc-no-dma;
|
||||
+ #address-cells = <1>;
|
||||
+ #size-cells = <0>;
|
||||
status = "okay";
|
||||
+
|
||||
+ spiflash: flash@0 {
|
||||
+ bootph-all;
|
||||
+ compatible = "jedec,spi-nor";
|
||||
+ reg = <0>;
|
||||
+ spi-max-frequency = <24000000>;
|
||||
+ spi-rx-bus-width = <1>;
|
||||
+ spi-tx-bus-width = <1>;
|
||||
+ };
|
||||
};
|
||||
|
||||
-&spiflash {
|
||||
+&sdmmc2 {
|
||||
+ status = "disabled";
|
||||
+};
|
||||
+
|
||||
+&uart1 {
|
||||
+ status = "disabled";
|
||||
+};
|
||||
+
|
||||
+&uart2m0_xfer {
|
||||
bootph-all;
|
||||
};
|
||||
|
||||
@@ -29,4 +110,9 @@
|
||||
clock-frequency = <24000000>;
|
||||
bootph-all;
|
||||
u-boot,dm-pre-reloc;
|
||||
+ status = "okay";
|
||||
};
|
||||
+
|
||||
+&vcc5v0_usb_host {
|
||||
+ regulator-boot-on;
|
||||
+};
|
||||
\ No newline at end of file
|
||||
diff --git a/arch/arm/dts/rk3566-ha-green.dts b/arch/arm/dts/rk3566-ha-green.dts
|
||||
index bf0f81c3a1..ea9d358099 100644
|
||||
--- a/arch/arm/dts/rk3566-ha-green.dts
|
||||
+++ b/arch/arm/dts/rk3566-ha-green.dts
|
||||
@@ -566,8 +566,8 @@
|
||||
spiflash: flash@0 {
|
||||
compatible = "jedec,spi-nor";
|
||||
reg = <0>;
|
||||
- spi-max-frequency = <100000000>;
|
||||
- spi-rx-bus-width = <4>;
|
||||
+ spi-max-frequency = <25000000>;
|
||||
+ spi-rx-bus-width = <1>;
|
||||
spi-tx-bus-width = <1>;
|
||||
|
||||
partitions {
|
||||
diff --git a/configs/green_defconfig b/configs/green_defconfig
|
||||
index 14960b67d2..5f94c06279 100644
|
||||
--- a/configs/green_defconfig
|
||||
+++ b/configs/green_defconfig
|
||||
@@ -68,6 +68,8 @@ CONFIG_MMC_SDHCI_SDMA=y
|
||||
CONFIG_MMC_SDHCI_ROCKCHIP=y
|
||||
CONFIG_SPI_FLASH_MACRONIX=y
|
||||
CONFIG_SPI_FLASH_XTX=y
|
||||
+CONFIG_SPI_FLASH_GIGADEVICE=y
|
||||
+CONFIG_SPI_FLASH_WINBOND=y
|
||||
CONFIG_ETH_DESIGNWARE=y
|
||||
CONFIG_GMAC_ROCKCHIP=y
|
||||
CONFIG_PHY_ROCKCHIP_INNO_USB2=y
|
||||
--
|
||||
2.41.0
|
||||
|
@@ -0,0 +1,211 @@
|
||||
From 0088369711a0b57b598121dad60b52de0426a180 Mon Sep 17 00:00:00 2001
|
||||
Message-ID: <0088369711a0b57b598121dad60b52de0426a180.1692346980.git.stefan@agner.ch>
|
||||
In-Reply-To: <2ab36c774a9f16c10a2bffeb602a9c914ffacd00.1692346980.git.stefan@agner.ch>
|
||||
References: <2ab36c774a9f16c10a2bffeb602a9c914ffacd00.1692346980.git.stefan@agner.ch>
|
||||
From: Stefan Agner <stefan@agner.ch>
|
||||
Date: Thu, 17 Aug 2023 17:38:13 +0200
|
||||
Subject: [PATCH 5/9] board: green: add Green board to read board specific
|
||||
EEPROM
|
||||
|
||||
Use board specific code to read serial number and MAC address from
|
||||
on-board I2C EEPROM.
|
||||
|
||||
Signed-off-by: Stefan Agner <stefan@agner.ch>
|
||||
---
|
||||
arch/arm/dts/rk3566-ha-green.dts | 7 +++
|
||||
arch/arm/mach-rockchip/rk3568/Kconfig | 7 +++
|
||||
board/nabucasa/ha-green/Kconfig | 15 +++++++
|
||||
board/nabucasa/ha-green/Makefile | 3 ++
|
||||
board/nabucasa/ha-green/ha-green.c | 65 +++++++++++++++++++++++++++
|
||||
configs/green_defconfig | 3 ++
|
||||
include/configs/ha-green.h | 11 +++++
|
||||
7 files changed, 111 insertions(+)
|
||||
create mode 100644 board/nabucasa/ha-green/Kconfig
|
||||
create mode 100644 board/nabucasa/ha-green/Makefile
|
||||
create mode 100644 board/nabucasa/ha-green/ha-green.c
|
||||
create mode 100644 include/configs/ha-green.h
|
||||
|
||||
diff --git a/arch/arm/dts/rk3566-ha-green.dts b/arch/arm/dts/rk3566-ha-green.dts
|
||||
index ea9d358099..91afadf0e6 100644
|
||||
--- a/arch/arm/dts/rk3566-ha-green.dts
|
||||
+++ b/arch/arm/dts/rk3566-ha-green.dts
|
||||
@@ -449,6 +449,13 @@
|
||||
reg = <0x51>;
|
||||
#clock-cells = <0>;
|
||||
};
|
||||
+
|
||||
+ eeprom: eeprom@50 {
|
||||
+ compatible = "atmel,24c32";
|
||||
+ reg = <0x50>;
|
||||
+ pagesize = <32>;
|
||||
+ };
|
||||
+
|
||||
};
|
||||
|
||||
&i2s0_8ch {
|
||||
diff --git a/arch/arm/mach-rockchip/rk3568/Kconfig b/arch/arm/mach-rockchip/rk3568/Kconfig
|
||||
index 94e04b79e7..5858c3921d 100644
|
||||
--- a/arch/arm/mach-rockchip/rk3568/Kconfig
|
||||
+++ b/arch/arm/mach-rockchip/rk3568/Kconfig
|
||||
@@ -17,6 +17,12 @@ config TARGET_ANBERNIC_RGXX3_RK3566
|
||||
and RG503. The correct device tree name will automatically
|
||||
be selected by the bootloader.
|
||||
|
||||
+config TARGET_NABU_CASA_HA_GREEN_RK3566
|
||||
+ bool "Nabu Casa Home Assistant Green"
|
||||
+ help
|
||||
+ Nabu Casa's Home Assistant Green single board computer with a RK3566
|
||||
+ SoC.
|
||||
+
|
||||
endchoice
|
||||
|
||||
config ROCKCHIP_BOOT_MODE_REG
|
||||
@@ -33,5 +39,6 @@ config SYS_MALLOC_F_LEN
|
||||
|
||||
source "board/rockchip/evb_rk3568/Kconfig"
|
||||
source "board/anbernic/rgxx3_rk3566/Kconfig"
|
||||
+source "board/nabucasa/ha-green/Kconfig"
|
||||
|
||||
endif
|
||||
diff --git a/board/nabucasa/ha-green/Kconfig b/board/nabucasa/ha-green/Kconfig
|
||||
new file mode 100644
|
||||
index 0000000000..863afd4363
|
||||
--- /dev/null
|
||||
+++ b/board/nabucasa/ha-green/Kconfig
|
||||
@@ -0,0 +1,15 @@
|
||||
+if TARGET_NABU_CASA_HA_GREEN_RK3566
|
||||
+
|
||||
+config SYS_BOARD
|
||||
+ default "ha-green"
|
||||
+
|
||||
+config SYS_VENDOR
|
||||
+ default "nabucasa"
|
||||
+
|
||||
+config SYS_CONFIG_NAME
|
||||
+ default "ha-green"
|
||||
+
|
||||
+config BOARD_SPECIFIC_OPTIONS # dummy
|
||||
+ def_bool y
|
||||
+
|
||||
+endif
|
||||
diff --git a/board/nabucasa/ha-green/Makefile b/board/nabucasa/ha-green/Makefile
|
||||
new file mode 100644
|
||||
index 0000000000..bf711fe8c4
|
||||
--- /dev/null
|
||||
+++ b/board/nabucasa/ha-green/Makefile
|
||||
@@ -0,0 +1,3 @@
|
||||
+# SPDX-License-Identifier: GPL-2.0+
|
||||
+
|
||||
+obj-y += ha-green.o
|
||||
diff --git a/board/nabucasa/ha-green/ha-green.c b/board/nabucasa/ha-green/ha-green.c
|
||||
new file mode 100644
|
||||
index 0000000000..b9a0c32441
|
||||
--- /dev/null
|
||||
+++ b/board/nabucasa/ha-green/ha-green.c
|
||||
@@ -0,0 +1,65 @@
|
||||
+// SPDX-License-Identifier: GPL-2.0
|
||||
+/*
|
||||
+ * Copyright 2023 Nabu Casa, Inc.
|
||||
+ * Copyright 2022 Google LLC
|
||||
+ */
|
||||
+#include <net.h>
|
||||
+#include <errno.h>
|
||||
+#include <dm/device.h>
|
||||
+#include <dm/uclass.h>
|
||||
+#include <common.h>
|
||||
+#include <dm.h>
|
||||
+#include <eeprom.h>
|
||||
+#include <env.h>
|
||||
+#include <i2c_eeprom.h>
|
||||
+#include <netdev.h>
|
||||
+
|
||||
+#define CONTENT_SIZE 44
|
||||
+#define ETHADDR_OFFSET 0X22
|
||||
+#define ETHADDR_LEN 6
|
||||
+#define SERIALNUM_OFFSET 0X10
|
||||
+#define SERIALNUM_LEN 18
|
||||
+#define VERSION_OFFSET 0X0C
|
||||
+#define VERSION_LEN 4
|
||||
+
|
||||
+int misc_init_r(void)
|
||||
+{
|
||||
+ unsigned char data[CONTENT_SIZE];
|
||||
+ unsigned char ethaddr[ETHADDR_LEN];
|
||||
+ unsigned char serialnum[SERIALNUM_LEN + 1];
|
||||
+ unsigned char version[VERSION_LEN];
|
||||
+
|
||||
+ struct udevice *dev;
|
||||
+ int ret;
|
||||
+
|
||||
+ ret = uclass_first_device_err(UCLASS_I2C_EEPROM, &dev);
|
||||
+ if (ret) {
|
||||
+ printf("UCLASS_I2C_EEPROM get error\n");
|
||||
+ return 0;
|
||||
+ }
|
||||
+
|
||||
+ ret = i2c_eeprom_read(dev, 0, data, sizeof(data));
|
||||
+ if (ret) {
|
||||
+ printf("UCLASS_I2C_EEPROM read error %d\n", ret);
|
||||
+ return 0;
|
||||
+ }
|
||||
+
|
||||
+ if (!(data[0] == 3 && data[1] == 5 && data[2] == 6 && data[3] == 6))
|
||||
+ {
|
||||
+ printf("EEPROM header not ok\n");
|
||||
+ return 0;
|
||||
+ }
|
||||
+
|
||||
+ memcpy(version , data + VERSION_OFFSET, VERSION_LEN);
|
||||
+ printf("Board revision: %c%c\n", version[2], version[3]);
|
||||
+
|
||||
+ memcpy(serialnum, data + SERIALNUM_OFFSET, SERIALNUM_LEN);
|
||||
+ serialnum[SERIALNUM_LEN] = 0;
|
||||
+ env_set("serial#", serialnum);
|
||||
+
|
||||
+ memcpy(ethaddr, data + ETHADDR_OFFSET, ETHADDR_LEN);
|
||||
+ if (is_valid_ethaddr(ethaddr))
|
||||
+ eth_env_set_enetaddr("ethaddr", ethaddr);
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
diff --git a/configs/green_defconfig b/configs/green_defconfig
|
||||
index 5f94c06279..a97391f295 100644
|
||||
--- a/configs/green_defconfig
|
||||
+++ b/configs/green_defconfig
|
||||
@@ -16,6 +16,7 @@ CONFIG_SPL_ROCKCHIP_COMMON_BOARD=y
|
||||
CONFIG_ROCKCHIP_SPI_IMAGE=y
|
||||
CONFIG_SPL_SERIAL=y
|
||||
CONFIG_SPL_STACK_R_ADDR=0x600000
|
||||
+CONFIG_TARGET_NABU_CASA_HA_GREEN_RK3566=y
|
||||
CONFIG_SPL_STACK=0x400000
|
||||
CONFIG_DEBUG_UART_BASE=0xFE660000
|
||||
CONFIG_DEBUG_UART_CLOCK=24000000
|
||||
@@ -60,6 +61,8 @@ CONFIG_SPL_CLK=y
|
||||
CONFIG_ROCKCHIP_GPIO=y
|
||||
CONFIG_SYS_I2C_ROCKCHIP=y
|
||||
CONFIG_MISC=y
|
||||
+CONFIG_I2C_EEPROM=y
|
||||
+CONFIG_SYS_I2C_EEPROM_ADDR=0x0
|
||||
CONFIG_SUPPORT_EMMC_RPMB=y
|
||||
CONFIG_MMC_DW=y
|
||||
CONFIG_MMC_DW_ROCKCHIP=y
|
||||
diff --git a/include/configs/ha-green.h b/include/configs/ha-green.h
|
||||
new file mode 100644
|
||||
index 0000000000..e42d9c8e8c
|
||||
--- /dev/null
|
||||
+++ b/include/configs/ha-green.h
|
||||
@@ -0,0 +1,11 @@
|
||||
+/* SPDX-License-Identifier: GPL-2.0+ */
|
||||
+
|
||||
+#ifndef __HA_GREEN_H
|
||||
+#define __HA_GREEN_H
|
||||
+
|
||||
+#define ROCKCHIP_DEVICE_SETTINGS \
|
||||
+ "cramfsaddr=0x0c000000\0"
|
||||
+
|
||||
+#include <configs/rk3568_common.h>
|
||||
+
|
||||
+#endif
|
||||
--
|
||||
2.41.0
|
||||
|
@@ -0,0 +1,28 @@
|
||||
From 9fd3b62354064d44fd391907f48d7800c6839c8a Mon Sep 17 00:00:00 2001
|
||||
Message-ID: <9fd3b62354064d44fd391907f48d7800c6839c8a.1692346980.git.stefan@agner.ch>
|
||||
In-Reply-To: <2ab36c774a9f16c10a2bffeb602a9c914ffacd00.1692346980.git.stefan@agner.ch>
|
||||
References: <2ab36c774a9f16c10a2bffeb602a9c914ffacd00.1692346980.git.stefan@agner.ch>
|
||||
From: syan <syan.cham@gmail.com>
|
||||
Date: Mon, 31 Jul 2023 09:39:55 +0000
|
||||
Subject: [PATCH 6/9] green: spl loader uboot order: sd-emmc-spi_nor
|
||||
|
||||
---
|
||||
arch/arm/dts/rk3566-ha-green-u-boot.dtsi | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/arch/arm/dts/rk3566-ha-green-u-boot.dtsi b/arch/arm/dts/rk3566-ha-green-u-boot.dtsi
|
||||
index fa98078fce..48d7b61513 100644
|
||||
--- a/arch/arm/dts/rk3566-ha-green-u-boot.dtsi
|
||||
+++ b/arch/arm/dts/rk3566-ha-green-u-boot.dtsi
|
||||
@@ -9,7 +9,7 @@
|
||||
/ {
|
||||
chosen {
|
||||
stdout-path = &uart2;
|
||||
- u-boot,spl-boot-order = &spiflash, &sdmmc0, &sdhci;
|
||||
+ u-boot,spl-boot-order = &sdmmc0, &sdhci, &spiflash;
|
||||
};
|
||||
};
|
||||
|
||||
--
|
||||
2.41.0
|
||||
|
@@ -0,0 +1,76 @@
|
||||
From 59eeea1cb0b1a0b254c759dceeface686aa8f24b Mon Sep 17 00:00:00 2001
|
||||
Message-ID: <59eeea1cb0b1a0b254c759dceeface686aa8f24b.1692346980.git.stefan@agner.ch>
|
||||
In-Reply-To: <2ab36c774a9f16c10a2bffeb602a9c914ffacd00.1692346980.git.stefan@agner.ch>
|
||||
References: <2ab36c774a9f16c10a2bffeb602a9c914ffacd00.1692346980.git.stefan@agner.ch>
|
||||
From: Jonas Karlman <jonas@kwiboo.se>
|
||||
Date: Fri, 28 Jul 2023 12:05:40 +0000
|
||||
Subject: [PATCH 7/9] rockchip: rk3568-rock-3a: Fix SPI Flash alias
|
||||
|
||||
The commit 64f79f88a751 ("rockchip: rk3568-rock-3a: Enable boot from SPI
|
||||
NOR flash") enabled SPI flash support by overriding the spi0 alias.
|
||||
|
||||
Correct this by adding a new spi4 alias in rk356x-u-boot.dtsi and
|
||||
SF_DEFAULT_BUS=4 and SPL_DM_SEQ_ALIAS=y in defconfig. Also enabled
|
||||
support for parsing and auto discovery of parameters, SFDP.
|
||||
|
||||
Fixes: 64f79f88a751 ("rockchip: rk3568-rock-3a: Enable boot from SPI NOR flash")
|
||||
Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
|
||||
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
|
||||
(cherry picked from commit 52f6b96d27c8aabca697ac395e86a3481f1c53b7)
|
||||
---
|
||||
arch/arm/dts/rk3568-rock-3a-u-boot.dtsi | 4 ----
|
||||
arch/arm/dts/rk356x-u-boot.dtsi | 1 +
|
||||
configs/rock-3a-rk3568_defconfig | 3 +++
|
||||
3 files changed, 4 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/arch/arm/dts/rk3568-rock-3a-u-boot.dtsi b/arch/arm/dts/rk3568-rock-3a-u-boot.dtsi
|
||||
index bbf54f888f..cb40dc31d1 100644
|
||||
--- a/arch/arm/dts/rk3568-rock-3a-u-boot.dtsi
|
||||
+++ b/arch/arm/dts/rk3568-rock-3a-u-boot.dtsi
|
||||
@@ -7,10 +7,6 @@
|
||||
#include "rk356x-u-boot.dtsi"
|
||||
|
||||
/ {
|
||||
- aliases {
|
||||
- spi0 = &sfc;
|
||||
- };
|
||||
-
|
||||
chosen {
|
||||
stdout-path = &uart2;
|
||||
};
|
||||
diff --git a/arch/arm/dts/rk356x-u-boot.dtsi b/arch/arm/dts/rk356x-u-boot.dtsi
|
||||
index c340c2bba6..e7b46bb2d4 100644
|
||||
--- a/arch/arm/dts/rk356x-u-boot.dtsi
|
||||
+++ b/arch/arm/dts/rk356x-u-boot.dtsi
|
||||
@@ -9,6 +9,7 @@
|
||||
aliases {
|
||||
mmc0 = &sdhci;
|
||||
mmc1 = &sdmmc0;
|
||||
+ spi4 = &sfc;
|
||||
};
|
||||
|
||||
chosen {
|
||||
diff --git a/configs/rock-3a-rk3568_defconfig b/configs/rock-3a-rk3568_defconfig
|
||||
index 753d03914d..92eb6b3f1c 100644
|
||||
--- a/configs/rock-3a-rk3568_defconfig
|
||||
+++ b/configs/rock-3a-rk3568_defconfig
|
||||
@@ -54,6 +54,7 @@ CONFIG_CMD_REGULATOR=y
|
||||
CONFIG_SPL_OF_CONTROL=y
|
||||
CONFIG_OF_LIVE=y
|
||||
CONFIG_OF_SPL_REMOVE_PROPS="clock-names interrupt-parent assigned-clocks assigned-clock-rates assigned-clock-parents"
|
||||
+CONFIG_SPL_DM_SEQ_ALIAS=y
|
||||
CONFIG_SPL_REGMAP=y
|
||||
CONFIG_SPL_SYSCON=y
|
||||
CONFIG_SPL_CLK=y
|
||||
@@ -66,6 +67,8 @@ CONFIG_MMC_DW_ROCKCHIP=y
|
||||
CONFIG_MMC_SDHCI=y
|
||||
CONFIG_MMC_SDHCI_SDMA=y
|
||||
CONFIG_MMC_SDHCI_ROCKCHIP=y
|
||||
+CONFIG_SF_DEFAULT_BUS=4
|
||||
+CONFIG_SPI_FLASH_SFDP_SUPPORT=y
|
||||
CONFIG_SPI_FLASH_MACRONIX=y
|
||||
CONFIG_SPI_FLASH_XTX=y
|
||||
CONFIG_ETH_DESIGNWARE=y
|
||||
--
|
||||
2.41.0
|
||||
|
@@ -0,0 +1,46 @@
|
||||
From 24c253f85e04cc09b675c41490bad0c69338c2c6 Mon Sep 17 00:00:00 2001
|
||||
Message-ID: <24c253f85e04cc09b675c41490bad0c69338c2c6.1692346980.git.stefan@agner.ch>
|
||||
In-Reply-To: <2ab36c774a9f16c10a2bffeb602a9c914ffacd00.1692346980.git.stefan@agner.ch>
|
||||
References: <2ab36c774a9f16c10a2bffeb602a9c914ffacd00.1692346980.git.stefan@agner.ch>
|
||||
From: Stefan Agner <stefan@agner.ch>
|
||||
Date: Thu, 17 Aug 2023 17:51:07 +0200
|
||||
Subject: [PATCH 8/9] green: Fix SPI Flash alias
|
||||
|
||||
Use the commonly used SPI flash bus 4. This allows to access SPI NOR
|
||||
flash from regular U-Boot as well.
|
||||
|
||||
Signed-off-by: Stefan Agner <stefan@agner.ch>
|
||||
---
|
||||
configs/green_defconfig | 7 +++++--
|
||||
1 file changed, 5 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/configs/green_defconfig b/configs/green_defconfig
|
||||
index a97391f295..71c9257d7d 100644
|
||||
--- a/configs/green_defconfig
|
||||
+++ b/configs/green_defconfig
|
||||
@@ -55,6 +55,7 @@ CONFIG_CMD_REGULATOR=y
|
||||
CONFIG_SPL_OF_CONTROL=y
|
||||
CONFIG_OF_LIVE=y
|
||||
CONFIG_OF_SPL_REMOVE_PROPS="clock-names interrupt-parent assigned-clocks assigned-clock-rates assigned-clock-parents"
|
||||
+CONFIG_SPL_DM_SEQ_ALIAS=y
|
||||
CONFIG_SPL_REGMAP=y
|
||||
CONFIG_SPL_SYSCON=y
|
||||
CONFIG_SPL_CLK=y
|
||||
@@ -69,10 +70,12 @@ CONFIG_MMC_DW_ROCKCHIP=y
|
||||
CONFIG_MMC_SDHCI=y
|
||||
CONFIG_MMC_SDHCI_SDMA=y
|
||||
CONFIG_MMC_SDHCI_ROCKCHIP=y
|
||||
-CONFIG_SPI_FLASH_MACRONIX=y
|
||||
-CONFIG_SPI_FLASH_XTX=y
|
||||
+CONFIG_SF_DEFAULT_BUS=4
|
||||
+CONFIG_SPI_FLASH_SFDP_SUPPORT=y
|
||||
CONFIG_SPI_FLASH_GIGADEVICE=y
|
||||
+CONFIG_SPI_FLASH_MACRONIX=y
|
||||
CONFIG_SPI_FLASH_WINBOND=y
|
||||
+CONFIG_SPI_FLASH_XTX=y
|
||||
CONFIG_ETH_DESIGNWARE=y
|
||||
CONFIG_GMAC_ROCKCHIP=y
|
||||
CONFIG_PHY_ROCKCHIP_INNO_USB2=y
|
||||
--
|
||||
2.41.0
|
||||
|
@@ -0,0 +1,53 @@
|
||||
From c0ee04d554802a7b7af3e6ec6b3d9b4160c75126 Mon Sep 17 00:00:00 2001
|
||||
Message-ID: <c0ee04d554802a7b7af3e6ec6b3d9b4160c75126.1692346980.git.stefan@agner.ch>
|
||||
In-Reply-To: <2ab36c774a9f16c10a2bffeb602a9c914ffacd00.1692346980.git.stefan@agner.ch>
|
||||
References: <2ab36c774a9f16c10a2bffeb602a9c914ffacd00.1692346980.git.stefan@agner.ch>
|
||||
From: Stefan Agner <stefan@agner.ch>
|
||||
Date: Fri, 18 Aug 2023 10:06:24 +0200
|
||||
Subject: [PATCH 9/9] arch: arm: dts: green: drop SPI NOR flash partitions
|
||||
|
||||
---
|
||||
arch/arm/dts/rk3566-ha-green.dts | 27 ---------------------------
|
||||
1 file changed, 27 deletions(-)
|
||||
|
||||
diff --git a/arch/arm/dts/rk3566-ha-green.dts b/arch/arm/dts/rk3566-ha-green.dts
|
||||
index 91afadf0e6..68d836911e 100644
|
||||
--- a/arch/arm/dts/rk3566-ha-green.dts
|
||||
+++ b/arch/arm/dts/rk3566-ha-green.dts
|
||||
@@ -576,33 +576,6 @@
|
||||
spi-max-frequency = <25000000>;
|
||||
spi-rx-bus-width = <1>;
|
||||
spi-tx-bus-width = <1>;
|
||||
-
|
||||
- partitions {
|
||||
- compatible = "fixed-partitions";
|
||||
- #address-cells = <1>;
|
||||
- #size-cells = <1>;
|
||||
-
|
||||
- partition@0 {
|
||||
- label = "SPL";
|
||||
- reg = <0x0 0xe0000>;
|
||||
- };
|
||||
- partition@e0000 {
|
||||
- label = "U-Boot Env";
|
||||
- reg = <0xe0000 0x20000>;
|
||||
- };
|
||||
- partition@100000 {
|
||||
- label = "U-Boot";
|
||||
- reg = <0x100000 0x200000>;
|
||||
- };
|
||||
- partition@300000 {
|
||||
- label = "splash";
|
||||
- reg = <0x300000 0x100000>;
|
||||
- };
|
||||
- partition@400000 {
|
||||
- label = "Filesystem";
|
||||
- reg = <0x400000 0xc00000>;
|
||||
- };
|
||||
- };
|
||||
};
|
||||
};
|
||||
|
||||
--
|
||||
2.41.0
|
||||
|
105
buildroot-external/board/nabucasa/green/uboot-boot.ush
Executable file
105
buildroot-external/board/nabucasa/green/uboot-boot.ush
Executable file
@@ -0,0 +1,105 @@
|
||||
if test "${devtype}" = "usb_mass_storage"; then
|
||||
setenv devtype "usb"
|
||||
fi
|
||||
echo "boot devtype: ${devtype}:${devnum}"
|
||||
|
||||
part start ${devtype} ${devnum} 6 dev_env
|
||||
${devtype} dev ${devnum}
|
||||
|
||||
setenv loadbootstate " \
|
||||
echo 'loading env...'; \
|
||||
${devtype} read ${ramdisk_addr_r} ${dev_env} 0x40; \
|
||||
env import -c ${ramdisk_addr_r} 0x8000;"
|
||||
|
||||
setenv storebootstate " \
|
||||
echo 'storing env...'; \
|
||||
env export -c -s 0x8000 ${ramdisk_addr_r} BOOT_ORDER BOOT_A_LEFT BOOT_B_LEFT MACHINE_ID; \
|
||||
${devtype} write ${ramdisk_addr_r} ${dev_env} 0x40;"
|
||||
|
||||
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
|
||||
|
||||
# Allows ConditionFirstBoot=
|
||||
test -n "${MACHINE_ID}" || setenv BOOT_CONDITION "systemd.condition-first-boot=true"
|
||||
|
||||
# HassOS bootargs
|
||||
setenv bootargs_hassos "zram.enabled=1 zram.num_devices=3 rootwait systemd.machine_id=${MACHINE_ID} fsck.repair=yes ${BOOT_CONDITION}"
|
||||
|
||||
# HassOS system A/B
|
||||
setenv bootargs_a "root=PARTUUID=8d3d53e3-6d49-4c38-8349-aff6859e82fd rootfstype=squashfs ro"
|
||||
setenv bootargs_b "root=PARTUUID=a3ec664e-32ce-4665-95ea-7ae90ce9aa20 rootfstype=squashfs ro"
|
||||
|
||||
part number ${devtype} ${devnum} hassos-boot boot_partnum
|
||||
|
||||
# Load environment from haos-config.txt
|
||||
if test -e ${devtype} ${devnum}:${boot_partnum} haos-config.txt; then
|
||||
fatload ${devtype} ${devnum}:${boot_partnum} ${ramdisk_addr_r} haos-config.txt
|
||||
env import -t ${ramdisk_addr_r} ${filesize}
|
||||
fi
|
||||
|
||||
# Load extraargs
|
||||
fileenv ${devtype} ${devnum}:${boot_partnum} ${ramdisk_addr_r} cmdline.txt cmdline
|
||||
|
||||
|
||||
# Load device tree
|
||||
ha_version="rk3566-ha-green.dtb"
|
||||
setenv fdtfile $ha_version
|
||||
echo "Loading standard device tree ${fdtfile}"
|
||||
fatload ${devtype} ${devnum}:${boot_partnum} ${fdt_addr_r} ${fdtfile}
|
||||
fdt addr ${fdt_addr_r}
|
||||
|
||||
# load dt overlays
|
||||
fdt resize 65536
|
||||
for overlay_file in ${overlays}; do
|
||||
if fatload ${devtype} ${devnum}:${boot_partnum} ${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 ${devtype} ${devnum}:${boot_partnum} ${fdt_addr_r} ${fdtfile}
|
||||
fi
|
||||
|
||||
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 ..."
|
||||
part number ${devtype} ${devnum} hassos-kernel0 kernel_partnum
|
||||
if load ${devtype} ${devnum}:${kernel_partnum} ${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 ..."
|
||||
part number ${devtype} ${devnum} hassos-kernel1 kernel_partnum
|
||||
if load ${devtype} ${devnum}:${kernel_partnum} ${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
|
||||
|
||||
echo "Starting kernel"
|
||||
booti ${kernel_addr_r} - ${fdt_addr_r}
|
||||
|
||||
echo "Boot failed, resetting..."
|
||||
reset
|
4295
buildroot-external/board/nabucasa/kernel-rockchip.config
Normal file
4295
buildroot-external/board/nabucasa/kernel-rockchip.config
Normal file
File diff suppressed because it is too large
Load Diff
@@ -9,24 +9,6 @@ CONFIG_SCSI_HPSA=y
|
||||
CONFIG_USB_XHCI_HCD=y
|
||||
CONFIG_BLK_DEV_NVME=y
|
||||
|
||||
CONFIG_IGB=y
|
||||
CONFIG_IGC=m
|
||||
|
||||
CONFIG_NET_VENDOR_ATHEROS=y
|
||||
CONFIG_ATL2=m
|
||||
CONFIG_ATL1=m
|
||||
CONFIG_ATL1C=m
|
||||
CONFIG_ATL1E=m
|
||||
CONFIG_ALX=m
|
||||
|
||||
CONFIG_NET_VENDOR_BROADCOM=y
|
||||
CONFIG_B44=m
|
||||
CONFIG_BCMGENET=m
|
||||
CONFIG_BNX2=m
|
||||
CONFIG_TIGON3=m
|
||||
CONFIG_BNX2X=m
|
||||
CONFIG_BNXT=m
|
||||
|
||||
CONFIG_WLAN_VENDOR_INTEL=y
|
||||
CONFIG_IWL4965=m
|
||||
CONFIG_IWL3945=m
|
||||
@@ -37,6 +19,11 @@ CONFIG_IWLMVM=m
|
||||
CONFIG_WLAN_VENDOR_REALTEK=y
|
||||
CONFIG_RTL_CARDS=m
|
||||
CONFIG_RTL8723BE=y
|
||||
CONFIG_RTL8723BS=y
|
||||
CONFIG_RTW88=m
|
||||
CONFIG_RTW88_8821CE=m
|
||||
|
||||
CONFIG_BCMA=m
|
||||
|
||||
CONFIG_SYSFB=y
|
||||
|
||||
@@ -51,6 +38,9 @@ CONFIG_DRM_I915_CAPTURE_ERROR=y
|
||||
CONFIG_DRM_I915_COMPRESS_ERROR=y
|
||||
CONFIG_DRM_I915_USERPTR=y
|
||||
|
||||
CONFIG_BACKLIGHT_CLASS_DEVICE=y
|
||||
CONFIG_BACKLIGHT_PWM=m
|
||||
|
||||
CONFIG_MMC=y
|
||||
CONFIG_MMC_BLOCK=y
|
||||
CONFIG_MMC_SDHCI=y
|
||||
@@ -166,5 +156,45 @@ CONFIG_SND_SOC_SOF_XTENSA=m
|
||||
CONFIG_THINKPAD_ACPI=m
|
||||
|
||||
CONFIG_SENSORS_K10TEMP=m
|
||||
CONFIG_SENSORS_CORETEMP=m
|
||||
|
||||
CONFIG_UHID=y
|
||||
|
||||
CONFIG_ITCO_WDT=y
|
||||
CONFIG_IT87_WDT=y
|
||||
|
||||
CONFIG_RAS=y
|
||||
CONFIG_EDAC=y
|
||||
CONFIG_EDAC_DECODE_MCE=m
|
||||
CONFIG_EDAC_GHES=y
|
||||
CONFIG_EDAC_AMD64=m
|
||||
CONFIG_EDAC_E752X=m
|
||||
CONFIG_EDAC_I82975X=m
|
||||
CONFIG_EDAC_I3000=m
|
||||
CONFIG_EDAC_I3200=m
|
||||
CONFIG_EDAC_IE31200=m
|
||||
CONFIG_EDAC_X38=m
|
||||
CONFIG_EDAC_I5400=m
|
||||
CONFIG_EDAC_I7CORE=m
|
||||
CONFIG_EDAC_I5100=m
|
||||
CONFIG_EDAC_I7300=m
|
||||
CONFIG_EDAC_SBRIDGE=m
|
||||
CONFIG_EDAC_SKX=m
|
||||
CONFIG_EDAC_I10NM=m
|
||||
CONFIG_EDAC_PND2=m
|
||||
CONFIG_EDAC_IGEN6=m
|
||||
|
||||
CONFIG_I2C=y
|
||||
CONFIG_I2C_BOARDINFO=y
|
||||
CONFIG_I2C_COMPAT=y
|
||||
CONFIG_I2C_CHARDEV=m
|
||||
CONFIG_I2C_MUX=m
|
||||
CONFIG_I2C_TINY_USB=m
|
||||
|
||||
CONFIG_I2C_DLN2=m
|
||||
CONFIG_SPI_DLN2=m
|
||||
CONFIG_GPIO_DLN2=m
|
||||
CONFIG_MFD_DLN2=m
|
||||
CONFIG_DLN2_ADC=m
|
||||
|
||||
CONFIG_BMP280=m
|
||||
|
@@ -60,7 +60,7 @@ fi
|
||||
|
||||
save_env A_TRY A_OK B_TRY B_OK ORDER MACHINE_ID
|
||||
|
||||
default_cmdline="rootwait zram.enabled=1 zram.num_devices=3 net.naming-scheme=v250 systemd.machine_id=$MACHINE_ID fsck.repair=yes $boot_condition"
|
||||
default_cmdline="rootwait zram.enabled=1 zram.num_devices=3 systemd.machine_id=$MACHINE_ID fsck.repair=yes $boot_condition"
|
||||
file_env -f ($root)/cmdline.txt cmdline
|
||||
|
||||
# root is a full HDD/partition definition in GRUB format like hd0,gpt1
|
||||
|
@@ -70,6 +70,19 @@ CONFIG_SND_XEN_FRONTEND=y
|
||||
CONFIG_XEN_PVCALLS_FRONTEND=m
|
||||
CONFIG_XEN_WDT=y
|
||||
|
||||
CONFIG_WLAN_VENDOR_INTEL=y
|
||||
CONFIG_IWL4965=m
|
||||
CONFIG_IWL3945=m
|
||||
CONFIG_IWLWIFI=m
|
||||
CONFIG_IWLDVM=m
|
||||
CONFIG_IWLMVM=m
|
||||
|
||||
CONFIG_WLAN_VENDOR_REALTEK=y
|
||||
CONFIG_RTL_CARDS=m
|
||||
CONFIG_RTL8723BE=y
|
||||
|
||||
CONFIG_BCMA=m
|
||||
|
||||
CONFIG_SYSFB=y
|
||||
CONFIG_SYSFB_SIMPLEFB=y
|
||||
|
||||
@@ -98,3 +111,5 @@ CONFIG_IXGBEVF=m
|
||||
CONFIG_I40EVF=m
|
||||
CONFIG_MLX5_CORE=m
|
||||
CONFIG_MLX5_CORE_EN=y
|
||||
|
||||
CONFIG_I6300ESB_WDT=y
|
||||
|
@@ -19,7 +19,7 @@ function hassos_pre_image() {
|
||||
else
|
||||
cp "${BOARD_DIR}/../cmdline.txt" "${BOOT_DATA}/cmdline.txt"
|
||||
fi
|
||||
cp "${BINARIES_DIR}"/*.dtbo "${BOOT_DATA}/overlays/"
|
||||
cp "${BINARIES_DIR}"/*.dtbo "${BOOT_DATA}/overlays/" 2>/dev/null || true
|
||||
|
||||
# EEPROM update for Raspberry Pi 4/Compute Module 4
|
||||
if grep -Eq "^BR2_PACKAGE_RPI_EEPROM=y$" "${BR2_CONFIG}"; then
|
||||
|
@@ -1,5 +1,5 @@
|
||||
From 135d886b4e5077c8fa96a5449a70d81ae9c1c3d0 Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <135d886b4e5077c8fa96a5449a70d81ae9c1c3d0.1668448794.git.stefan@agner.ch>
|
||||
From 01b4d231cbb66ca193ba422a22d25c75d21ff8ee Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <01b4d231cbb66ca193ba422a22d25c75d21ff8ee.1682350496.git.stefan@agner.ch>
|
||||
From: Pascal Vizeli <pvizeli@syshack.ch>
|
||||
Date: Tue, 10 Dec 2019 09:48:46 +0000
|
||||
Subject: [PATCH] rpi: Use CONFIG_OF_BOARD instead of CONFIG_EMBED
|
||||
@@ -79,5 +79,5 @@ index 1d356b4b2e..6f345c790b 100644
|
||||
CONFIG_SYS_RELOC_GD_ENV_ADDR=y
|
||||
CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y
|
||||
--
|
||||
2.38.1
|
||||
2.40.0
|
||||
|
||||
|
@@ -1,7 +1,7 @@
|
||||
From 191b5f4e0408e40f35379fdaab6b37a7ad93e298 Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <191b5f4e0408e40f35379fdaab6b37a7ad93e298.1668448794.git.stefan@agner.ch>
|
||||
In-Reply-To: <135d886b4e5077c8fa96a5449a70d81ae9c1c3d0.1668448794.git.stefan@agner.ch>
|
||||
References: <135d886b4e5077c8fa96a5449a70d81ae9c1c3d0.1668448794.git.stefan@agner.ch>
|
||||
From 8870872f359771effddd74bcb4c7e0a4316d99f7 Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <8870872f359771effddd74bcb4c7e0a4316d99f7.1682350496.git.stefan@agner.ch>
|
||||
In-Reply-To: <01b4d231cbb66ca193ba422a22d25c75d21ff8ee.1682350496.git.stefan@agner.ch>
|
||||
References: <01b4d231cbb66ca193ba422a22d25c75d21ff8ee.1682350496.git.stefan@agner.ch>
|
||||
From: Stefan Agner <stefan@agner.ch>
|
||||
Date: Tue, 29 Dec 2020 23:34:52 +0100
|
||||
Subject: [PATCH] rpi: add NVMe to boot order
|
||||
@@ -40,5 +40,5 @@ index cd8fe8b518..7257659932 100644
|
||||
BOOT_TARGET_PXE(func) \
|
||||
BOOT_TARGET_DHCP(func)
|
||||
--
|
||||
2.38.1
|
||||
2.40.0
|
||||
|
||||
|
@@ -1,7 +1,7 @@
|
||||
From 644bd3743aa8771ef7ecb7b7239308d6da2a5b35 Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <644bd3743aa8771ef7ecb7b7239308d6da2a5b35.1668448794.git.stefan@agner.ch>
|
||||
In-Reply-To: <135d886b4e5077c8fa96a5449a70d81ae9c1c3d0.1668448794.git.stefan@agner.ch>
|
||||
References: <135d886b4e5077c8fa96a5449a70d81ae9c1c3d0.1668448794.git.stefan@agner.ch>
|
||||
From 60afc919643d212439a63908c83523879af21032 Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <60afc919643d212439a63908c83523879af21032.1682350496.git.stefan@agner.ch>
|
||||
In-Reply-To: <01b4d231cbb66ca193ba422a22d25c75d21ff8ee.1682350496.git.stefan@agner.ch>
|
||||
References: <01b4d231cbb66ca193ba422a22d25c75d21ff8ee.1682350496.git.stefan@agner.ch>
|
||||
From: Stefan Agner <stefan@agner.ch>
|
||||
Date: Thu, 23 Sep 2021 23:43:31 +0200
|
||||
Subject: [PATCH] Revert "nvme: Correct the prps per page calculation method"
|
||||
@@ -39,5 +39,5 @@ index 6d0d3f3ca2..73db80a294 100644
|
||||
|
||||
length -= (page_size - offset);
|
||||
--
|
||||
2.38.1
|
||||
2.40.0
|
||||
|
||||
|
@@ -1,7 +1,7 @@
|
||||
From de29ca70117fb2bfafa8b5699b34e9e94560b785 Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <de29ca70117fb2bfafa8b5699b34e9e94560b785.1668448794.git.stefan@agner.ch>
|
||||
In-Reply-To: <135d886b4e5077c8fa96a5449a70d81ae9c1c3d0.1668448794.git.stefan@agner.ch>
|
||||
References: <135d886b4e5077c8fa96a5449a70d81ae9c1c3d0.1668448794.git.stefan@agner.ch>
|
||||
From cca49e815fbdcbb436f238d362b5f145471153dc Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <cca49e815fbdcbb436f238d362b5f145471153dc.1682350496.git.stefan@agner.ch>
|
||||
In-Reply-To: <01b4d231cbb66ca193ba422a22d25c75d21ff8ee.1682350496.git.stefan@agner.ch>
|
||||
References: <01b4d231cbb66ca193ba422a22d25c75d21ff8ee.1682350496.git.stefan@agner.ch>
|
||||
From: Stefan Agner <stefan@agner.ch>
|
||||
Date: Thu, 7 Oct 2021 12:02:39 +0200
|
||||
Subject: [PATCH] usb: xhci-brcm: Make driver compatible with downstream device
|
||||
@@ -29,5 +29,5 @@ index fe17924028..0c6938187b 100644
|
||||
};
|
||||
|
||||
--
|
||||
2.38.1
|
||||
2.40.0
|
||||
|
||||
|
@@ -1,7 +1,7 @@
|
||||
From ab2790f8ff78790ea8a9cb0b05cafc55648ebbc4 Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <ab2790f8ff78790ea8a9cb0b05cafc55648ebbc4.1668448794.git.stefan@agner.ch>
|
||||
In-Reply-To: <135d886b4e5077c8fa96a5449a70d81ae9c1c3d0.1668448794.git.stefan@agner.ch>
|
||||
References: <135d886b4e5077c8fa96a5449a70d81ae9c1c3d0.1668448794.git.stefan@agner.ch>
|
||||
From 11176a6ca068e0b572abbe5da8fef1d57bd40e7a Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <11176a6ca068e0b572abbe5da8fef1d57bd40e7a.1682350496.git.stefan@agner.ch>
|
||||
In-Reply-To: <01b4d231cbb66ca193ba422a22d25c75d21ff8ee.1682350496.git.stefan@agner.ch>
|
||||
References: <01b4d231cbb66ca193ba422a22d25c75d21ff8ee.1682350496.git.stefan@agner.ch>
|
||||
From: Stefan Agner <stefan@agner.ch>
|
||||
Date: Thu, 23 Sep 2021 23:52:44 +0200
|
||||
Subject: [PATCH] nvme: improve readability of nvme_setup_prps()
|
||||
@@ -45,5 +45,5 @@ index 73db80a294..751abc3cd5 100644
|
||||
prp_pool += page_size;
|
||||
}
|
||||
--
|
||||
2.38.1
|
||||
2.40.0
|
||||
|
||||
|
@@ -1,7 +1,7 @@
|
||||
From 2b508d92673738d837576301866dc234d8b008c4 Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <2b508d92673738d837576301866dc234d8b008c4.1668448794.git.stefan@agner.ch>
|
||||
In-Reply-To: <135d886b4e5077c8fa96a5449a70d81ae9c1c3d0.1668448794.git.stefan@agner.ch>
|
||||
References: <135d886b4e5077c8fa96a5449a70d81ae9c1c3d0.1668448794.git.stefan@agner.ch>
|
||||
From 3bccb6eb7f9e8e996cd50409eb96450c313953ec Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <3bccb6eb7f9e8e996cd50409eb96450c313953ec.1682350496.git.stefan@agner.ch>
|
||||
In-Reply-To: <01b4d231cbb66ca193ba422a22d25c75d21ff8ee.1682350496.git.stefan@agner.ch>
|
||||
References: <01b4d231cbb66ca193ba422a22d25c75d21ff8ee.1682350496.git.stefan@agner.ch>
|
||||
From: Stefan Agner <stefan@agner.ch>
|
||||
Date: Thu, 23 Sep 2021 23:58:35 +0200
|
||||
Subject: [PATCH] nvme: Use pointer for CPU addressed buffers
|
||||
@@ -260,5 +260,5 @@ index 2cdf8ce320..8ff823cd81 100644
|
||||
/**
|
||||
* nvme_scan_namespace - scan all namespaces attached to NVMe controllers
|
||||
--
|
||||
2.38.1
|
||||
2.40.0
|
||||
|
||||
|
@@ -1,7 +1,7 @@
|
||||
From c70926d8b8ad11b8e489e92a8ca9ca93fb201595 Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <c70926d8b8ad11b8e489e92a8ca9ca93fb201595.1668448794.git.stefan@agner.ch>
|
||||
In-Reply-To: <135d886b4e5077c8fa96a5449a70d81ae9c1c3d0.1668448794.git.stefan@agner.ch>
|
||||
References: <135d886b4e5077c8fa96a5449a70d81ae9c1c3d0.1668448794.git.stefan@agner.ch>
|
||||
From ca73fb28fa86b7de243b6713d2756dee445c5f56 Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <ca73fb28fa86b7de243b6713d2756dee445c5f56.1682350496.git.stefan@agner.ch>
|
||||
In-Reply-To: <01b4d231cbb66ca193ba422a22d25c75d21ff8ee.1682350496.git.stefan@agner.ch>
|
||||
References: <01b4d231cbb66ca193ba422a22d25c75d21ff8ee.1682350496.git.stefan@agner.ch>
|
||||
From: Stefan Agner <stefan@agner.ch>
|
||||
Date: Fri, 24 Sep 2021 00:27:39 +0200
|
||||
Subject: [PATCH] nvme: translate virtual addresses into the bus's address
|
||||
@@ -172,5 +172,5 @@ index bc1d612dde..f52103c009 100644
|
||||
+
|
||||
#endif /* __DRIVER_NVME_H__ */
|
||||
--
|
||||
2.38.1
|
||||
2.40.0
|
||||
|
||||
|
@@ -0,0 +1,50 @@
|
||||
From 89df39ccb71062a06f4548c11fba9101dfd82445 Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <89df39ccb71062a06f4548c11fba9101dfd82445.1682350496.git.stefan@agner.ch>
|
||||
In-Reply-To: <01b4d231cbb66ca193ba422a22d25c75d21ff8ee.1682350496.git.stefan@agner.ch>
|
||||
References: <01b4d231cbb66ca193ba422a22d25c75d21ff8ee.1682350496.git.stefan@agner.ch>
|
||||
From: Stefan Agner <stefan@agner.ch>
|
||||
Date: Mon, 24 Apr 2023 15:44:15 +0200
|
||||
Subject: [PATCH] Revert "pci: Check region ranges are addressable"
|
||||
|
||||
This reverts commit ec8eba8c2d4e10e77699c56918d2078210aa1339.
|
||||
|
||||
This commit seems to cause boot hangs when USB via XHCI is enabled on
|
||||
Raspberry Pi 4 32-bit. Reverting the commit fixes USB device detection
|
||||
and makes the devices boot again.
|
||||
|
||||
Signed-off-by: Stefan Agner <stefan@agner.ch>
|
||||
---
|
||||
drivers/pci/pci-uclass.c | 17 +----------------
|
||||
1 file changed, 1 insertion(+), 16 deletions(-)
|
||||
|
||||
diff --git a/drivers/pci/pci-uclass.c b/drivers/pci/pci-uclass.c
|
||||
index 9343cfc62a..ac2a8c8aa0 100644
|
||||
--- a/drivers/pci/pci-uclass.c
|
||||
+++ b/drivers/pci/pci-uclass.c
|
||||
@@ -1027,22 +1027,7 @@ static int decode_regions(struct pci_controller *hose, ofnode parent_node,
|
||||
|
||||
if (!IS_ENABLED(CONFIG_SYS_PCI_64BIT) &&
|
||||
type == PCI_REGION_MEM && upper_32_bits(pci_addr)) {
|
||||
- debug(" - pci_addr beyond the 32-bit boundary, ignoring\n");
|
||||
- continue;
|
||||
- }
|
||||
-
|
||||
- if (!IS_ENABLED(CONFIG_PHYS_64BIT) && upper_32_bits(addr)) {
|
||||
- debug(" - addr beyond the 32-bit boundary, ignoring\n");
|
||||
- continue;
|
||||
- }
|
||||
-
|
||||
- if (~((pci_addr_t)0) - pci_addr < size) {
|
||||
- debug(" - PCI range exceeds max address, ignoring\n");
|
||||
- continue;
|
||||
- }
|
||||
-
|
||||
- if (~((phys_addr_t)0) - addr < size) {
|
||||
- debug(" - phys range exceeds max address, ignoring\n");
|
||||
+ debug(" - beyond the 32-bit boundary, ignoring\n");
|
||||
continue;
|
||||
}
|
||||
|
||||
--
|
||||
2.40.0
|
||||
|
@@ -21,7 +21,7 @@ test -n "${BOOT_B_LEFT}" || setenv BOOT_B_LEFT 3
|
||||
test -n "${MACHINE_ID}" || setenv BOOT_CONDITION "systemd.condition-first-boot=true"
|
||||
|
||||
# HassOS bootargs
|
||||
setenv bootargs_hassos "zram.enabled=1 zram.num_devices=3 rootwait net.naming-scheme=v250 systemd.machine_id=${MACHINE_ID} cgroup_enable=memory fsck.repair=yes ${BOOT_CONDITION}"
|
||||
setenv bootargs_hassos "zram.enabled=1 zram.num_devices=3 rootwait systemd.machine_id=${MACHINE_ID} cgroup_enable=memory fsck.repair=yes ${BOOT_CONDITION}"
|
||||
|
||||
# HassOS system A/B
|
||||
setenv bootargs_a "root=PARTUUID=8d3d53e3-6d49-4c38-8349-aff6859e82fd rootfstype=squashfs ro"
|
||||
|
@@ -21,7 +21,7 @@ test -n "${BOOT_B_LEFT}" || setenv BOOT_B_LEFT 3
|
||||
test -n "${MACHINE_ID}" || setenv BOOT_CONDITION "systemd.condition-first-boot=true"
|
||||
|
||||
# HassOS bootargs
|
||||
setenv bootargs_hassos "zram.enabled=1 zram.num_devices=3 rootwait net.naming-scheme=v250 systemd.machine_id=${MACHINE_ID} cgroup_enable=memory fsck.repair=yes ${BOOT_CONDITION}"
|
||||
setenv bootargs_hassos "zram.enabled=1 zram.num_devices=3 rootwait systemd.machine_id=${MACHINE_ID} cgroup_enable=memory fsck.repair=yes ${BOOT_CONDITION}"
|
||||
|
||||
# HassOS system A/B
|
||||
setenv bootargs_a "root=PARTUUID=8d3d53e3-6d49-4c38-8349-aff6859e82fd rootfstype=squashfs ro"
|
||||
|
@@ -1,3 +1,5 @@
|
||||
CONFIG_CMD_NVME=y
|
||||
|
||||
# CONFIG_DOS_PARTITION is not set
|
||||
CONFIG_USB_STORAGE=y
|
||||
CONFIG_USB_FUNCTION_MASS_STORAGE=y
|
||||
@@ -6,3 +8,6 @@ CONFIG_USB_EHCI_GENERIC=y
|
||||
CONFIG_USB_OHCI_HCD=y
|
||||
|
||||
CONFIG_USB_XHCI_BRCM=y
|
||||
|
||||
CONFIG_NVME=y
|
||||
CONFIG_NVME_PCI=y
|
||||
|
@@ -10,9 +10,6 @@ arm_64bit=1
|
||||
# Enable primary UART by default
|
||||
enable_uart=1
|
||||
|
||||
# Free up full-fledged PL011 UART for J11
|
||||
dtoverlay=miniuart-bt
|
||||
|
||||
# No HDMI on Yellow, but we can't set to 16 since we need the full firmware
|
||||
# for codecs
|
||||
gpu_mem=32
|
||||
|
@@ -1,5 +1,5 @@
|
||||
From f0292972b38d512fce48384ebbb72b2da46f03bd Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <f0292972b38d512fce48384ebbb72b2da46f03bd.1677499716.git.stefan@agner.ch>
|
||||
From 808c5caa6bdefaadf7c63d9fb5c18c33dc1fe5b9 Mon Sep 17 00:00:00 2001
|
||||
Message-ID: <808c5caa6bdefaadf7c63d9fb5c18c33dc1fe5b9.1698393299.git.stefan@agner.ch>
|
||||
From: Stefan Agner <stefan@agner.ch>
|
||||
Date: Mon, 11 Apr 2022 14:47:59 +0200
|
||||
Subject: [PATCH] ARM: dts: bcm2711: Add device tree for Home Assistant Yellow
|
||||
@@ -9,28 +9,26 @@ board.
|
||||
|
||||
Signed-off-by: Stefan Agner <stefan@agner.ch>
|
||||
---
|
||||
arch/arm/boot/dts/Makefile | 3 +-
|
||||
arch/arm/boot/dts/Makefile | 1 +
|
||||
.../boot/dts/bcm2711-rpi-cm4-ha-yellow.dts | 587 ++++++++++++++++++
|
||||
arch/arm64/boot/dts/broadcom/Makefile | 1 +
|
||||
.../broadcom/bcm2711-rpi-cm4-ha-yellow.dts | 1 +
|
||||
4 files changed, 591 insertions(+), 1 deletion(-)
|
||||
4 files changed, 590 insertions(+)
|
||||
create mode 100644 arch/arm/boot/dts/bcm2711-rpi-cm4-ha-yellow.dts
|
||||
create mode 100644 arch/arm64/boot/dts/broadcom/bcm2711-rpi-cm4-ha-yellow.dts
|
||||
|
||||
diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
|
||||
index f7d8d09c0a16..3a7d6595aded 100644
|
||||
index d12432ec2554..38351b107814 100644
|
||||
--- a/arch/arm/boot/dts/Makefile
|
||||
+++ b/arch/arm/boot/dts/Makefile
|
||||
@@ -18,7 +18,8 @@ dtb-$(CONFIG_ARCH_BCM2835) += \
|
||||
@@ -18,6 +18,7 @@ dtb-$(CONFIG_ARCH_BCM2835) += \
|
||||
bcm2709-rpi-cm2.dtb \
|
||||
bcm2710-rpi-cm3.dtb \
|
||||
bcm2711-rpi-cm4.dtb \
|
||||
- bcm2711-rpi-cm4s.dtb
|
||||
+ bcm2711-rpi-cm4s.dtb \
|
||||
+ bcm2711-rpi-cm4-ha-yellow.dtb
|
||||
+ bcm2711-rpi-cm4-ha-yellow.dtb \
|
||||
bcm2711-rpi-cm4s.dtb \
|
||||
bcm2712-rpi-5-b.dtb
|
||||
|
||||
dtb-$(CONFIG_ARCH_ALPINE) += \
|
||||
alpine-db.dtb
|
||||
diff --git a/arch/arm/boot/dts/bcm2711-rpi-cm4-ha-yellow.dts b/arch/arm/boot/dts/bcm2711-rpi-cm4-ha-yellow.dts
|
||||
new file mode 100644
|
||||
index 000000000000..f92936d7cf16
|
||||
@@ -625,17 +623,17 @@ index 000000000000..f92936d7cf16
|
||||
+ };
|
||||
+};
|
||||
diff --git a/arch/arm64/boot/dts/broadcom/Makefile b/arch/arm64/boot/dts/broadcom/Makefile
|
||||
index 9b678d144085..7c1a67f7c028 100644
|
||||
index effdc7137c11..ba3e56723985 100644
|
||||
--- a/arch/arm64/boot/dts/broadcom/Makefile
|
||||
+++ b/arch/arm64/boot/dts/broadcom/Makefile
|
||||
@@ -16,6 +16,7 @@ dtb-$(CONFIG_ARCH_BCM2835) += bcm2710-rpi-3-b-plus.dtb
|
||||
@@ -15,6 +15,7 @@ dtb-$(CONFIG_ARCH_BCM2835) += bcm2710-rpi-3-b.dtb
|
||||
dtb-$(CONFIG_ARCH_BCM2835) += bcm2710-rpi-3-b-plus.dtb
|
||||
dtb-$(CONFIG_ARCH_BCM2835) += bcm2710-rpi-cm3.dtb
|
||||
dtb-$(CONFIG_ARCH_BCM2835) += bcm2711-rpi-cm4.dtb
|
||||
dtb-$(CONFIG_ARCH_BCM2835) += bcm2711-rpi-cm4s.dtb
|
||||
+dtb-$(CONFIG_ARCH_BCM2835) += bcm2711-rpi-cm4-ha-yellow.dtb
|
||||
dtb-$(CONFIG_ARCH_BCM2835) += bcm2711-rpi-cm4s.dtb
|
||||
dtb-$(CONFIG_ARCH_BCM2835) += bcm2712-rpi-5-b.dtb
|
||||
|
||||
subdir-y += bcmbca
|
||||
subdir-y += northstar2
|
||||
diff --git a/arch/arm64/boot/dts/broadcom/bcm2711-rpi-cm4-ha-yellow.dts b/arch/arm64/boot/dts/broadcom/bcm2711-rpi-cm4-ha-yellow.dts
|
||||
new file mode 100644
|
||||
index 000000000000..fdc5ec5bc956
|
||||
@@ -644,5 +642,5 @@ index 000000000000..fdc5ec5bc956
|
||||
@@ -0,0 +1 @@
|
||||
+#include "../../../../arm/boot/dts/bcm2711-rpi-cm4-ha-yellow.dts"
|
||||
--
|
||||
2.39.1
|
||||
2.42.0
|
||||
|
||||
|
@@ -1,7 +1,7 @@
|
||||
From c07db9fb0a6a9779aadc7c8cc4c83c87c83b2ad4 Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <c07db9fb0a6a9779aadc7c8cc4c83c87c83b2ad4.1677499716.git.stefan@agner.ch>
|
||||
In-Reply-To: <f0292972b38d512fce48384ebbb72b2da46f03bd.1677499716.git.stefan@agner.ch>
|
||||
References: <f0292972b38d512fce48384ebbb72b2da46f03bd.1677499716.git.stefan@agner.ch>
|
||||
From e46bcfa7e1b577be494024b05c2b310f10a037c2 Mon Sep 17 00:00:00 2001
|
||||
Message-ID: <e46bcfa7e1b577be494024b05c2b310f10a037c2.1698393299.git.stefan@agner.ch>
|
||||
In-Reply-To: <808c5caa6bdefaadf7c63d9fb5c18c33dc1fe5b9.1698393299.git.stefan@agner.ch>
|
||||
References: <808c5caa6bdefaadf7c63d9fb5c18c33dc1fe5b9.1698393299.git.stefan@agner.ch>
|
||||
From: Stefan Agner <stefan@agner.ch>
|
||||
Date: Thu, 4 Mar 2021 14:33:09 +0100
|
||||
Subject: [PATCH] ARM: dts: bcm2711: yellow: Mux UART4 for SiLabs radio module
|
||||
@@ -56,5 +56,5 @@ index f92936d7cf16..fa93ab5ca639 100644
|
||||
|
||||
uart5_pins: uart5_pins {
|
||||
--
|
||||
2.39.1
|
||||
2.42.0
|
||||
|
||||
|
@@ -1,7 +1,7 @@
|
||||
From e12a021cbc1c474580d68e3593ce86d10ffc0232 Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <e12a021cbc1c474580d68e3593ce86d10ffc0232.1677499716.git.stefan@agner.ch>
|
||||
In-Reply-To: <f0292972b38d512fce48384ebbb72b2da46f03bd.1677499716.git.stefan@agner.ch>
|
||||
References: <f0292972b38d512fce48384ebbb72b2da46f03bd.1677499716.git.stefan@agner.ch>
|
||||
From aa2d31d8148440ca6e981c9793695dea056baeff Mon Sep 17 00:00:00 2001
|
||||
Message-ID: <aa2d31d8148440ca6e981c9793695dea056baeff.1698393299.git.stefan@agner.ch>
|
||||
In-Reply-To: <808c5caa6bdefaadf7c63d9fb5c18c33dc1fe5b9.1698393299.git.stefan@agner.ch>
|
||||
References: <808c5caa6bdefaadf7c63d9fb5c18c33dc1fe5b9.1698393299.git.stefan@agner.ch>
|
||||
From: Stefan Agner <stefan@agner.ch>
|
||||
Date: Thu, 4 Mar 2021 14:44:23 +0100
|
||||
Subject: [PATCH] ARM: dts: bcm2711: yellow: Mux debug UART5
|
||||
@@ -46,5 +46,5 @@ index fa93ab5ca639..cc7e7b28ffc7 100644
|
||||
|
||||
aliases {
|
||||
--
|
||||
2.39.1
|
||||
2.42.0
|
||||
|
||||
|
@@ -1,7 +1,7 @@
|
||||
From fa80760de4f8d2cdb13167f2a480581c319a7c2d Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <fa80760de4f8d2cdb13167f2a480581c319a7c2d.1677499716.git.stefan@agner.ch>
|
||||
In-Reply-To: <f0292972b38d512fce48384ebbb72b2da46f03bd.1677499716.git.stefan@agner.ch>
|
||||
References: <f0292972b38d512fce48384ebbb72b2da46f03bd.1677499716.git.stefan@agner.ch>
|
||||
From 746ef4ac4f691fe588f8fd7947a900d616f74e5b Mon Sep 17 00:00:00 2001
|
||||
Message-ID: <746ef4ac4f691fe588f8fd7947a900d616f74e5b.1698393299.git.stefan@agner.ch>
|
||||
In-Reply-To: <808c5caa6bdefaadf7c63d9fb5c18c33dc1fe5b9.1698393299.git.stefan@agner.ch>
|
||||
References: <808c5caa6bdefaadf7c63d9fb5c18c33dc1fe5b9.1698393299.git.stefan@agner.ch>
|
||||
From: Stefan Agner <stefan@agner.ch>
|
||||
Date: Thu, 4 Mar 2021 14:48:48 +0100
|
||||
Subject: [PATCH] ARM: dts: bcm2711: yellow: Enable I2C6 by default
|
||||
@@ -31,5 +31,5 @@ index cc7e7b28ffc7..72f437f4e81a 100644
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&i2s_pins>;
|
||||
--
|
||||
2.39.1
|
||||
2.42.0
|
||||
|
||||
|
@@ -1,7 +1,7 @@
|
||||
From e83a7bddbe8981c96837b0258f07230e1a93e907 Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <e83a7bddbe8981c96837b0258f07230e1a93e907.1677499716.git.stefan@agner.ch>
|
||||
In-Reply-To: <f0292972b38d512fce48384ebbb72b2da46f03bd.1677499716.git.stefan@agner.ch>
|
||||
References: <f0292972b38d512fce48384ebbb72b2da46f03bd.1677499716.git.stefan@agner.ch>
|
||||
From da56dbf0ce913c49bde27bd9196e68a4a2c38d66 Mon Sep 17 00:00:00 2001
|
||||
Message-ID: <da56dbf0ce913c49bde27bd9196e68a4a2c38d66.1698393299.git.stefan@agner.ch>
|
||||
In-Reply-To: <808c5caa6bdefaadf7c63d9fb5c18c33dc1fe5b9.1698393299.git.stefan@agner.ch>
|
||||
References: <808c5caa6bdefaadf7c63d9fb5c18c33dc1fe5b9.1698393299.git.stefan@agner.ch>
|
||||
From: Stefan Agner <stefan@agner.ch>
|
||||
Date: Thu, 4 Mar 2021 17:19:01 +0100
|
||||
Subject: [PATCH] ARM: dts: bcm2711: yellow: add I2S audio codec
|
||||
@@ -63,5 +63,5 @@ index 72f437f4e81a..8ca65c696531 100644
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&audio_pins>;
|
||||
--
|
||||
2.39.1
|
||||
2.42.0
|
||||
|
||||
|
@@ -1,7 +1,7 @@
|
||||
From ee53448bf22dec674655ed7bdb433e401bb06e68 Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <ee53448bf22dec674655ed7bdb433e401bb06e68.1677499716.git.stefan@agner.ch>
|
||||
In-Reply-To: <f0292972b38d512fce48384ebbb72b2da46f03bd.1677499716.git.stefan@agner.ch>
|
||||
References: <f0292972b38d512fce48384ebbb72b2da46f03bd.1677499716.git.stefan@agner.ch>
|
||||
From 05d15d41fcd7b94521cb93a696ba25174627adfc Mon Sep 17 00:00:00 2001
|
||||
Message-ID: <05d15d41fcd7b94521cb93a696ba25174627adfc.1698393299.git.stefan@agner.ch>
|
||||
In-Reply-To: <808c5caa6bdefaadf7c63d9fb5c18c33dc1fe5b9.1698393299.git.stefan@agner.ch>
|
||||
References: <808c5caa6bdefaadf7c63d9fb5c18c33dc1fe5b9.1698393299.git.stefan@agner.ch>
|
||||
From: Stefan Agner <stefan@agner.ch>
|
||||
Date: Tue, 9 Mar 2021 15:02:53 +0100
|
||||
Subject: [PATCH] ARM: dts: bcm2711: yellow: enable GPIO keys
|
||||
@@ -68,5 +68,5 @@ index 8ca65c696531..dcc36efcdcb1 100644
|
||||
brcm,pins = <9 10 11>;
|
||||
brcm,function = <BCM2835_FSEL_ALT0>;
|
||||
--
|
||||
2.39.1
|
||||
2.42.0
|
||||
|
||||
|
@@ -1,7 +1,7 @@
|
||||
From 04601aebe965d7b153e548028a44b2c46159b657 Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <04601aebe965d7b153e548028a44b2c46159b657.1677499716.git.stefan@agner.ch>
|
||||
In-Reply-To: <f0292972b38d512fce48384ebbb72b2da46f03bd.1677499716.git.stefan@agner.ch>
|
||||
References: <f0292972b38d512fce48384ebbb72b2da46f03bd.1677499716.git.stefan@agner.ch>
|
||||
From bc62fb721d663f63c9b44371d875e6c52d5d6126 Mon Sep 17 00:00:00 2001
|
||||
Message-ID: <bc62fb721d663f63c9b44371d875e6c52d5d6126.1698393299.git.stefan@agner.ch>
|
||||
In-Reply-To: <808c5caa6bdefaadf7c63d9fb5c18c33dc1fe5b9.1698393299.git.stefan@agner.ch>
|
||||
References: <808c5caa6bdefaadf7c63d9fb5c18c33dc1fe5b9.1698393299.git.stefan@agner.ch>
|
||||
From: Stefan Agner <stefan@agner.ch>
|
||||
Date: Thu, 28 Oct 2021 19:38:04 +0200
|
||||
Subject: [PATCH] ARM: dts: bcm2711: yellow: add user LED
|
||||
@@ -39,5 +39,5 @@ index dcc36efcdcb1..6cdf595cdc2c 100644
|
||||
|
||||
&pwm1 {
|
||||
--
|
||||
2.39.1
|
||||
2.42.0
|
||||
|
||||
|
@@ -1,7 +1,7 @@
|
||||
From ef2877f999685caa678e34493d5dcfa1f55a28a8 Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <ef2877f999685caa678e34493d5dcfa1f55a28a8.1677499716.git.stefan@agner.ch>
|
||||
In-Reply-To: <f0292972b38d512fce48384ebbb72b2da46f03bd.1677499716.git.stefan@agner.ch>
|
||||
References: <f0292972b38d512fce48384ebbb72b2da46f03bd.1677499716.git.stefan@agner.ch>
|
||||
From 0dd0356291e2cd2921c3e20e920a8d0f7f4832c6 Mon Sep 17 00:00:00 2001
|
||||
Message-ID: <0dd0356291e2cd2921c3e20e920a8d0f7f4832c6.1698393299.git.stefan@agner.ch>
|
||||
In-Reply-To: <808c5caa6bdefaadf7c63d9fb5c18c33dc1fe5b9.1698393299.git.stefan@agner.ch>
|
||||
References: <808c5caa6bdefaadf7c63d9fb5c18c33dc1fe5b9.1698393299.git.stefan@agner.ch>
|
||||
From: Stefan Agner <stefan@agner.ch>
|
||||
Date: Fri, 12 Nov 2021 17:33:32 +0100
|
||||
Subject: [PATCH] ARM: dts: bcm2711: yellow: add NXP PCF85063A RTC
|
||||
@@ -28,5 +28,5 @@ index 6cdf595cdc2c..e867da211c9f 100644
|
||||
|
||||
&i2s {
|
||||
--
|
||||
2.39.1
|
||||
2.42.0
|
||||
|
||||
|
@@ -1,7 +1,7 @@
|
||||
From d9881c68f4263460ec2eee718ce8e2b3ed3eea9a Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <d9881c68f4263460ec2eee718ce8e2b3ed3eea9a.1677499716.git.stefan@agner.ch>
|
||||
In-Reply-To: <f0292972b38d512fce48384ebbb72b2da46f03bd.1677499716.git.stefan@agner.ch>
|
||||
References: <f0292972b38d512fce48384ebbb72b2da46f03bd.1677499716.git.stefan@agner.ch>
|
||||
From 0a2890e4584562471b2568220605bbc35604b17d Mon Sep 17 00:00:00 2001
|
||||
Message-ID: <0a2890e4584562471b2568220605bbc35604b17d.1698393299.git.stefan@agner.ch>
|
||||
In-Reply-To: <808c5caa6bdefaadf7c63d9fb5c18c33dc1fe5b9.1698393299.git.stefan@agner.ch>
|
||||
References: <808c5caa6bdefaadf7c63d9fb5c18c33dc1fe5b9.1698393299.git.stefan@agner.ch>
|
||||
From: Stefan Agner <stefan@agner.ch>
|
||||
Date: Fri, 7 Jan 2022 17:10:00 +0100
|
||||
Subject: [PATCH] ARM: dts: bcm2711: yellow: enable USB host mode by default
|
||||
@@ -35,5 +35,5 @@ index e867da211c9f..3866192a6f47 100644
|
||||
led-modes = <0x00 0x08>; /* link/activity link */
|
||||
};
|
||||
--
|
||||
2.39.1
|
||||
2.42.0
|
||||
|
||||
|
@@ -1,7 +1,7 @@
|
||||
From d5f3fd27c65fb9ce56184f49c3001f2ef86f4e88 Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <d5f3fd27c65fb9ce56184f49c3001f2ef86f4e88.1677499716.git.stefan@agner.ch>
|
||||
In-Reply-To: <f0292972b38d512fce48384ebbb72b2da46f03bd.1677499716.git.stefan@agner.ch>
|
||||
References: <f0292972b38d512fce48384ebbb72b2da46f03bd.1677499716.git.stefan@agner.ch>
|
||||
From f9291af2fba355e8ce432e5530adde568b51f9e6 Mon Sep 17 00:00:00 2001
|
||||
Message-ID: <f9291af2fba355e8ce432e5530adde568b51f9e6.1698393299.git.stefan@agner.ch>
|
||||
In-Reply-To: <808c5caa6bdefaadf7c63d9fb5c18c33dc1fe5b9.1698393299.git.stefan@agner.ch>
|
||||
References: <808c5caa6bdefaadf7c63d9fb5c18c33dc1fe5b9.1698393299.git.stefan@agner.ch>
|
||||
From: Stefan Agner <stefan@agner.ch>
|
||||
Date: Wed, 27 Apr 2022 20:36:19 +0200
|
||||
Subject: [PATCH] ARM: dts: bcm2711: yellow: use generic activity trigger for
|
||||
@@ -29,5 +29,5 @@ index 3866192a6f47..11da9ec9b828 100644
|
||||
};
|
||||
|
||||
--
|
||||
2.39.1
|
||||
2.42.0
|
||||
|
||||
|
@@ -1,7 +1,7 @@
|
||||
From 36e8909a2dbfb10fc34df9f606ff3f7f612027f3 Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <36e8909a2dbfb10fc34df9f606ff3f7f612027f3.1677499716.git.stefan@agner.ch>
|
||||
In-Reply-To: <f0292972b38d512fce48384ebbb72b2da46f03bd.1677499716.git.stefan@agner.ch>
|
||||
References: <f0292972b38d512fce48384ebbb72b2da46f03bd.1677499716.git.stefan@agner.ch>
|
||||
From cd5035e6a9105967200b46876ab35aca26cfa958 Mon Sep 17 00:00:00 2001
|
||||
Message-ID: <cd5035e6a9105967200b46876ab35aca26cfa958.1698393299.git.stefan@agner.ch>
|
||||
In-Reply-To: <808c5caa6bdefaadf7c63d9fb5c18c33dc1fe5b9.1698393299.git.stefan@agner.ch>
|
||||
References: <808c5caa6bdefaadf7c63d9fb5c18c33dc1fe5b9.1698393299.git.stefan@agner.ch>
|
||||
From: Stefan Agner <stefan@agner.ch>
|
||||
Date: Tue, 26 Jul 2022 15:53:59 +0200
|
||||
Subject: [PATCH] ARM: dts: bcm2711: yellow: use USB OTG mode by default
|
||||
@@ -28,5 +28,5 @@ index 11da9ec9b828..fa2b96e31a4f 100644
|
||||
g-rx-fifo-size = <558>;
|
||||
g-tx-fifo-size = <512 512 512 512 512 256 256>;
|
||||
--
|
||||
2.39.1
|
||||
2.42.0
|
||||
|
||||
|
@@ -1,7 +1,7 @@
|
||||
From b8640b0861e289e98af98a0f8b6861af6d2a2fd7 Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <b8640b0861e289e98af98a0f8b6861af6d2a2fd7.1677499716.git.stefan@agner.ch>
|
||||
In-Reply-To: <f0292972b38d512fce48384ebbb72b2da46f03bd.1677499716.git.stefan@agner.ch>
|
||||
References: <f0292972b38d512fce48384ebbb72b2da46f03bd.1677499716.git.stefan@agner.ch>
|
||||
From 17feb0a73ace80468b64cf52991a5b91e224a4f9 Mon Sep 17 00:00:00 2001
|
||||
Message-ID: <17feb0a73ace80468b64cf52991a5b91e224a4f9.1698393299.git.stefan@agner.ch>
|
||||
In-Reply-To: <808c5caa6bdefaadf7c63d9fb5c18c33dc1fe5b9.1698393299.git.stefan@agner.ch>
|
||||
References: <808c5caa6bdefaadf7c63d9fb5c18c33dc1fe5b9.1698393299.git.stefan@agner.ch>
|
||||
From: Stefan Agner <stefan@agner.ch>
|
||||
Date: Sat, 30 Jul 2022 11:21:31 +0200
|
||||
Subject: [PATCH] ARM: dts: bcm2711: yellow: Add LED overrides
|
||||
@@ -64,5 +64,5 @@ index fa2b96e31a4f..f7fdf8bbb395 100644
|
||||
eth_led1 = <&phy1>,"led-modes:4";
|
||||
|
||||
--
|
||||
2.39.1
|
||||
2.42.0
|
||||
|
||||
|
@@ -0,0 +1,46 @@
|
||||
From 4b9ccb624cb498b63475662c041c3efc4b230731 Mon Sep 17 00:00:00 2001
|
||||
Message-ID: <4b9ccb624cb498b63475662c041c3efc4b230731.1698393299.git.stefan@agner.ch>
|
||||
In-Reply-To: <808c5caa6bdefaadf7c63d9fb5c18c33dc1fe5b9.1698393299.git.stefan@agner.ch>
|
||||
References: <808c5caa6bdefaadf7c63d9fb5c18c33dc1fe5b9.1698393299.git.stefan@agner.ch>
|
||||
From: Stefan Agner <stefan@agner.ch>
|
||||
Date: Wed, 31 May 2023 10:57:43 +0200
|
||||
Subject: [PATCH] ARM: dts: bcm2711: yellow: use serial alias to enumerate
|
||||
ttyAMA
|
||||
|
||||
Now that the driver actually uses the index from the serial aliases,
|
||||
make sure to correctly enumerate the serial aliases.
|
||||
|
||||
Signed-off-by: Stefan Agner <stefan@agner.ch>
|
||||
---
|
||||
arch/arm/boot/dts/bcm2711-rpi-cm4-ha-yellow.dts | 8 ++------
|
||||
1 file changed, 2 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/arch/arm/boot/dts/bcm2711-rpi-cm4-ha-yellow.dts b/arch/arm/boot/dts/bcm2711-rpi-cm4-ha-yellow.dts
|
||||
index f7fdf8bbb395..b8f0bc2df062 100644
|
||||
--- a/arch/arm/boot/dts/bcm2711-rpi-cm4-ha-yellow.dts
|
||||
+++ b/arch/arm/boot/dts/bcm2711-rpi-cm4-ha-yellow.dts
|
||||
@@ -17,11 +17,6 @@ / {
|
||||
compatible = "raspberrypi,4-compute-module-ha-yellow", "raspberrypi,4-compute-module", "brcm,bcm2711";
|
||||
model = "Raspberry Pi Compute Module 4 on Home Assistant Yellow";
|
||||
|
||||
- aliases {
|
||||
- serial4 = &uart4;
|
||||
- serial5 = &uart5;
|
||||
- };
|
||||
-
|
||||
chosen {
|
||||
/* 8250 auxiliary UART instead of pl011 */
|
||||
stdout-path = "serial1:115200n8";
|
||||
@@ -324,7 +319,8 @@ chosen {
|
||||
|
||||
aliases {
|
||||
serial0 = &uart1;
|
||||
- serial1 = &uart0;
|
||||
+ serial1 = &uart4;
|
||||
+ serial2 = &uart5;
|
||||
mmc0 = &emmc2;
|
||||
mmc1 = &mmcnr;
|
||||
mmc2 = &sdhost;
|
||||
--
|
||||
2.42.0
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user