mirror of
https://github.com/home-assistant/operating-system.git
synced 2025-08-22 11:29:20 +00:00
Compare commits
37 Commits
missing-ve
...
7.6
Author | SHA1 | Date | |
---|---|---|---|
![]() |
2596b6ab3f | ||
![]() |
5b7d1a60df | ||
![]() |
d73087bdea | ||
![]() |
aaa55848de | ||
![]() |
bd8c6cad40 | ||
![]() |
f189a8bce7 | ||
![]() |
3e689001c4 | ||
![]() |
4b2cb7d680 | ||
![]() |
31b83f301b | ||
![]() |
7bb4d86809 | ||
![]() |
058fcf5b1a | ||
![]() |
1cb597675f | ||
![]() |
6e616833a4 | ||
![]() |
d6e1bb2db4 | ||
![]() |
94266e652c | ||
![]() |
4616806dbf | ||
![]() |
10a4710248 | ||
![]() |
fc507a61ab | ||
![]() |
0719bd1c4d | ||
![]() |
faedfa8571 | ||
![]() |
60d1a5bb31 | ||
![]() |
93b4997989 | ||
![]() |
372d604f7c | ||
![]() |
bf274e7634 | ||
![]() |
4529d91e86 | ||
![]() |
0d52944262 | ||
![]() |
7b54b565c5 | ||
![]() |
2a255728e3 | ||
![]() |
70f1a57a62 | ||
![]() |
33ce44a8c2 | ||
![]() |
783307cf63 | ||
![]() |
3ffdc0fbf4 | ||
![]() |
783df55c0d | ||
![]() |
a6e0e02033 | ||
![]() |
caee84c471 | ||
![]() |
d78743309a | ||
![]() |
b84e6da15f |
@@ -1,3 +1,12 @@
|
||||
# Ignore everything except what we really need
|
||||
*
|
||||
!scripts/
|
||||
# We don't need this folder because we map the hole folder
|
||||
buildroot/
|
||||
buildroot-external/
|
||||
buildroot-patches/
|
||||
|
||||
# Output/Release directory gets created using build scripts
|
||||
output*/
|
||||
release/
|
||||
|
||||
# Ignore hidden directories as well
|
||||
.git/
|
||||
.github/
|
||||
|
24
.github/ISSUE_TEMPLATE/bug_report.yml
vendored
24
.github/ISSUE_TEMPLATE/bug_report.yml
vendored
@@ -25,11 +25,9 @@ body:
|
||||
label: What operating system image do you use?
|
||||
options:
|
||||
- generic-x86-64 (Generic UEFI capable x86-64 systems)
|
||||
- generic-aarch64 (Generic UEFI capable aarch64 systems)
|
||||
- khadas-vim3 (Khadas VIM3)
|
||||
- odroid-c2 (Hardkernel ODROID-C2)
|
||||
- odroid-c4 (Hardkernel ODROID-C4)
|
||||
- odroid-m1 (Hardkernel ODROID-M1)
|
||||
- odroid-n2 (Hardkernel ODROID-N2/N2+)
|
||||
- odroid-xu4 (Hardkernel ODROID-XU4)
|
||||
- ova (for Virtual Machines)
|
||||
@@ -39,12 +37,10 @@ body:
|
||||
- rpi4 (Raspberry Pi 4/400 32-bit OS)
|
||||
- rpi4-64 (Raspberry Pi 4/400 64-bit OS)
|
||||
- tinker (ASUS Tinker Board/Tinker Board S)
|
||||
- yellow (Home Assistant Yellow)
|
||||
- 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.
|
||||
Can be found in the [Configuration panel -> Info](https://my.home-assistant.io/redirect/info/). It is listed as the `Board` value.
|
||||
|
||||
[](https://my.home-assistant.io/redirect/system_health/)
|
||||
[](https://my.home-assistant.io/redirect/info/)
|
||||
- type: input
|
||||
validations:
|
||||
required: true
|
||||
@@ -52,7 +48,7 @@ body:
|
||||
label: What version of Home Assistant Operating System is installed?
|
||||
placeholder: "6.6"
|
||||
description: >
|
||||
Can be found in [Settings -> System -> Repairs -> System Information (top right menu)](https://my.home-assistant.io/redirect/system_health/). It is listed as the `Host Operating System` value.
|
||||
Can be found in the [Configuration panel -> Info](https://my.home-assistant.io/redirect/info/). It is listed as the `Host Operating System` value.
|
||||
- type: dropdown
|
||||
validations:
|
||||
required: true
|
||||
@@ -80,8 +76,7 @@ body:
|
||||
attributes:
|
||||
label: Anything in the Supervisor logs that might be useful for us?
|
||||
description: >
|
||||
Supervisor Logs can be found in [Settings -> System -> Logs](https://my.home-assistant.io/redirect/logs/)
|
||||
then choose `Supervisor` in the top right.
|
||||
Supervisor Logs can be found under [Supervisor -> System](https://my.home-assistant.io/redirect/supervisor_logs/), then choose Log Provider `Supervisor`.
|
||||
|
||||
[](https://my.home-assistant.io/redirect/supervisor_logs/)
|
||||
render: txt
|
||||
@@ -91,19 +86,16 @@ body:
|
||||
attributes:
|
||||
label: Anything in the Host logs that might be useful for us?
|
||||
description: >
|
||||
Host Logs can be found in [Settings -> System -> Logs](https://my.home-assistant.io/redirect/logs/)
|
||||
then choose `Host` in the top right.
|
||||
Supervisor Logs can be found under [Supervisor -> System](https://my.home-assistant.io/redirect/supervisor_logs/), then choose Log Provider `Host`.
|
||||
render: txt
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: System information
|
||||
label: System Health information
|
||||
description: >
|
||||
**Optional** Copy the full System Health in this text area.
|
||||
|
||||
System information can be found in [Settings -> System -> Repairs -> System Information (top right menu)](https://my.home-assistant.io/redirect/system_health/),
|
||||
Click the copy button at the bottom of the pop-up and paste it here.
|
||||
|
||||
[](https://my.home-assistant.io/redirect/system_health/)
|
||||
Can be found in the [Configuration panel -> Info](https://my.home-assistant.io/redirect/info/).
|
||||
Use the copy icon on top right and choose `For GitHub`.
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: Additional information
|
||||
|
2
.github/ISSUE_TEMPLATE/config.yml
vendored
2
.github/ISSUE_TEMPLATE/config.yml
vendored
@@ -5,7 +5,7 @@ contact_links:
|
||||
about: Our documentation has its own issue tracker. Please report issues with the website there.
|
||||
|
||||
- name: Report incorrect or missing information on our developer documentation
|
||||
url: https://github.com/home-assistant/developers.home-assistant/issues
|
||||
url: https://github.com/home-assistant/developers.home-assistant.io/issues
|
||||
about: Our developer documentation has its own issue tracker. Please report issues with the website there.
|
||||
|
||||
- name: Request a feature for the Operating System
|
||||
|
@@ -1,95 +0,0 @@
|
||||
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
|
6
.github/dependabot.yml
vendored
6
.github/dependabot.yml
vendored
@@ -1,6 +0,0 @@
|
||||
version: 2
|
||||
updates:
|
||||
- package-ecosystem: "github-actions"
|
||||
directory: "/"
|
||||
schedule:
|
||||
interval: "weekly"
|
27
.github/label-actions.yml
vendored
27
.github/label-actions.yml
vendored
@@ -8,7 +8,6 @@ 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: >
|
||||
@@ -20,19 +19,6 @@ 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: >
|
||||
@@ -44,16 +30,3 @@ 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: >
|
||||
:wave: @{issue-author}, thanks for your input!
|
||||
|
||||
We use this issue tracker to track issues of currently supported features.
|
||||
Your request appears to request a new feature. We track potential new
|
||||
features in the [Feature Request section of our Community Forum](https://community.home-assistant.io/c/feature-requests/13).
|
||||
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
|
||||
|
15
.github/release-drafter.yml
vendored
15
.github/release-drafter.yml
vendored
@@ -1,6 +1,3 @@
|
||||
name-template: Home Assistant OS $RESOLVED_VERSION
|
||||
tag-template: $RESOLVED_VERSION
|
||||
version-template: "$MAJOR.$MINOR"
|
||||
categories:
|
||||
- title: 'Home Assistant Operating System'
|
||||
label: 'os'
|
||||
@@ -8,10 +5,6 @@ categories:
|
||||
label: 'build'
|
||||
- title: 'Raspberry Pi'
|
||||
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'
|
||||
@@ -22,15 +15,9 @@ categories:
|
||||
label: 'board/tinker'
|
||||
- title: 'Khadas VIM Series'
|
||||
label: 'board/khadas'
|
||||
- title: 'Generic aarch64'
|
||||
label: 'board/generic-aarch64'
|
||||
filter-by-commitish: true
|
||||
commitish: dev
|
||||
template: |
|
||||
## Changes
|
||||
|
||||
$CHANGES
|
||||
version-resolver:
|
||||
major:
|
||||
labels:
|
||||
- 'major'
|
||||
default: minor
|
||||
|
93
.github/workflows/artifacts-index.yaml
vendored
93
.github/workflows/artifacts-index.yaml
vendored
@@ -1,93 +0,0 @@
|
||||
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
303
.github/workflows/build.yaml
vendored
@@ -1,303 +0,0 @@
|
||||
# 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
Normal file
143
.github/workflows/dev.yml
vendored
Normal file
@@ -0,0 +1,143 @@
|
||||
# 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" ]
|
||||
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 "::set-output name=version_dev::${version_dev}"
|
||||
- name: Generate Development build version for PR
|
||||
if: ${{ github.event.pull_request }}
|
||||
shell: bash
|
||||
id: version_pr
|
||||
run: |
|
||||
version_pr=$(printf "%05d" ${{ github.event.pull_request.number }})
|
||||
echo "Development build for PR #${{ github.event.pull_request.number }}"
|
||||
echo "::set-output name=version_pr::${version_pr}"
|
||||
- uses: actions/checkout@v2
|
||||
- name: Get Major/Minor version
|
||||
id: version_main
|
||||
run: |
|
||||
major=$(cat ${GITHUB_WORKSPACE}/buildroot-external/meta | grep VERSION_MAJOR | cut -d'=' -f2)
|
||||
build=$(cat ${GITHUB_WORKSPACE}/buildroot-external/meta | grep VERSION_BUILD | cut -d'=' -f2)
|
||||
echo "::set-output name=version_main::${major}.${build}"
|
||||
- name: Create build matrix
|
||||
uses: actions/github-script@v4
|
||||
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@v4
|
||||
id: generate_gitref
|
||||
with:
|
||||
script: |
|
||||
if (context.eventName == "workflow_dispatch")
|
||||
return { "ref": context.ref }
|
||||
return { "ref": context.payload.pull_request.head.sha }
|
||||
|
||||
# Make sure directories of potentially removed submodules are cleaned correctly
|
||||
- name: Cleanup git submodules
|
||||
run: find . -name .git -type f -exec rm {} \;
|
||||
|
||||
- name: Checkout source
|
||||
uses: actions/checkout@v2
|
||||
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" \
|
||||
haos-builder make BUILDDIR=/build VERSION_DEV=${{ needs.prepare.outputs.version_dev }} ${{ matrix.board.defconfig }}
|
||||
|
||||
- name: Upload images
|
||||
uses: burnett01/rsync-deployments@4.1
|
||||
with:
|
||||
rsh: -q
|
||||
switches: -aW --ignore-existing
|
||||
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.1.0
|
||||
- uses: dessant/label-actions@v2
|
||||
|
50
.github/workflows/matrix.json
vendored
50
.github/workflows/matrix.json
vendored
@@ -2,103 +2,79 @@
|
||||
{
|
||||
"id": "ova",
|
||||
"defconfig": "ova",
|
||||
"architecture": "x86-64",
|
||||
"runner": "x86-64-runner",
|
||||
"label": "board/ova"
|
||||
},
|
||||
{
|
||||
"id": "generic-x86-64",
|
||||
"defconfig": "generic_x86_64",
|
||||
"architecture": "x86-64",
|
||||
"runner": "x86-64-runner",
|
||||
"label": "board/generic-x86-64"
|
||||
},
|
||||
{
|
||||
"id": "generic-aarch64",
|
||||
"defconfig": "generic_aarch64",
|
||||
"architecture": "aarch64",
|
||||
"label": "board/generic-aarch64"
|
||||
},
|
||||
{
|
||||
"id": "khadas-vim3",
|
||||
"defconfig": "khadas_vim3",
|
||||
"architecture": "aarch64",
|
||||
"runner": "aarch64-runner",
|
||||
"label": "board/khadas"
|
||||
},
|
||||
{
|
||||
"id": "odroid-c2",
|
||||
"defconfig": "odroid_c2",
|
||||
"architecture": "aarch64",
|
||||
"runner": "aarch64-runner",
|
||||
"label": "board/odroid"
|
||||
},
|
||||
{
|
||||
"id": "odroid-c4",
|
||||
"defconfig": "odroid_c4",
|
||||
"architecture": "aarch64",
|
||||
"label": "board/odroid"
|
||||
},
|
||||
{
|
||||
"id": "odroid-m1",
|
||||
"defconfig": "odroid_m1",
|
||||
"architecture": "aarch64",
|
||||
"runner": "aarch64-runner",
|
||||
"label": "board/odroid"
|
||||
},
|
||||
{
|
||||
"id": "odroid-n2",
|
||||
"defconfig": "odroid_n2",
|
||||
"architecture": "aarch64",
|
||||
"runner": "aarch64-runner",
|
||||
"label": "board/odroid"
|
||||
},
|
||||
{
|
||||
"id": "odroid-xu4",
|
||||
"defconfig": "odroid_xu4",
|
||||
"architecture": "aarch64",
|
||||
"runner": "aarch64-runner",
|
||||
"label": "board/odroid"
|
||||
},
|
||||
{
|
||||
"id": "rpi2",
|
||||
"defconfig": "rpi2",
|
||||
"architecture": "arm",
|
||||
"runner": "arm-runner",
|
||||
"label": "board/raspberrypi"
|
||||
},
|
||||
{
|
||||
"id": "rpi3",
|
||||
"defconfig": "rpi3",
|
||||
"architecture": "arm",
|
||||
"runner": "arm-runner",
|
||||
"label": "board/raspberrypi"
|
||||
},
|
||||
{
|
||||
"id": "rpi3-64",
|
||||
"defconfig": "rpi3_64",
|
||||
"architecture": "aarch64",
|
||||
"runner": "aarch64-runner",
|
||||
"label": "board/raspberrypi"
|
||||
},
|
||||
{
|
||||
"id": "rpi4",
|
||||
"defconfig": "rpi4",
|
||||
"architecture": "arm",
|
||||
"runner": "arm-runner",
|
||||
"label": "board/raspberrypi"
|
||||
},
|
||||
{
|
||||
"id": "rpi4-64",
|
||||
"defconfig": "rpi4_64",
|
||||
"architecture": "aarch64",
|
||||
"runner": "aarch64-runner",
|
||||
"label": "board/raspberrypi"
|
||||
},
|
||||
{
|
||||
"id": "yellow",
|
||||
"defconfig": "yellow",
|
||||
"architecture": "aarch64",
|
||||
"label": "board/yellow"
|
||||
},
|
||||
{
|
||||
"id": "green",
|
||||
"defconfig": "green",
|
||||
"architecture": "aarch64",
|
||||
"label": "board/green"
|
||||
},
|
||||
{
|
||||
"id": "tinker",
|
||||
"defconfig": "tinker",
|
||||
"architecture": "arm",
|
||||
"runner": "arm-runner",
|
||||
"label": "board/tinker"
|
||||
}
|
||||
]
|
||||
|
10
.github/workflows/pr-checks.yml
vendored
10
.github/workflows/pr-checks.yml
vendored
@@ -6,22 +6,22 @@ on: [pull_request]
|
||||
|
||||
jobs:
|
||||
linters:
|
||||
runs-on: ubuntu-22.04
|
||||
runs-on: ubuntu-20.04
|
||||
steps:
|
||||
- name: Check out code
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
submodules: true
|
||||
|
||||
- name: Check Dockerfile
|
||||
uses: brpaz/hadolint-action@v1.5.0
|
||||
uses: brpaz/hadolint-action@v1.1.0
|
||||
with:
|
||||
dockerfile: Dockerfile
|
||||
|
||||
- name: Check shell scripts
|
||||
uses: ludeeus/action-shellcheck@2.0.0
|
||||
uses: ludeeus/action-shellcheck@1.1.0
|
||||
with:
|
||||
ignore: buildroot
|
||||
ignore: buildroot buildroot-external/package/xe-guest-utilities
|
||||
|
||||
- name: Check buildroot-external packages
|
||||
run: |
|
||||
|
5
.github/workflows/release-drafter.yml
vendored
5
.github/workflows/release-drafter.yml
vendored
@@ -4,13 +4,10 @@ on:
|
||||
push:
|
||||
branches:
|
||||
- dev
|
||||
- rel-*
|
||||
- rel-4
|
||||
|
||||
jobs:
|
||||
update_release_draft:
|
||||
permissions:
|
||||
contents: write # for release-drafter/release-drafter to create a github release
|
||||
pull-requests: read # for release-drafter/release-drafter to read PR content and labels
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: release-drafter/release-drafter@v5
|
||||
|
184
.github/workflows/release.yml
vendored
Normal file
184
.github/workflows/release.yml
vendored
Normal file
@@ -0,0 +1,184 @@
|
||||
# Home Assistant Operating System release build workflow
|
||||
|
||||
name: Release build
|
||||
|
||||
on:
|
||||
release:
|
||||
types: [published]
|
||||
|
||||
jobs:
|
||||
validate_release:
|
||||
name: Validate release
|
||||
runs-on: [ "ubuntu-20.04" ]
|
||||
outputs:
|
||||
version: ${{ steps.version_check.outputs.version }}
|
||||
version_dev: ${{ steps.version_check.outputs.version_dev }}
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Validate version
|
||||
id: version_check
|
||||
run: |
|
||||
major=$(cat ${GITHUB_WORKSPACE}/buildroot-external/meta | grep VERSION_MAJOR | cut -d'=' -f2)
|
||||
build=$(cat ${GITHUB_WORKSPACE}/buildroot-external/meta | grep VERSION_BUILD | cut -d'=' -f2)
|
||||
tag_major=$(echo "${{ github.event.release.tag_name }}" | cut -d '.' -f 1)
|
||||
tag_build=$(echo "${{ github.event.release.tag_name }}" | cut -d '.' -f 2)
|
||||
tag_dev=$(echo "${{ github.event.release.tag_name }}" | cut -d '.' -f 3)
|
||||
if [ "${major}.${build}" != "${tag_major}.${tag_build}" ]; then
|
||||
echo "Version number in Buildroot metadata is does not match tag (${major}.${build} vs ${{ github.event.release.tag_name }})."
|
||||
exit 1
|
||||
fi
|
||||
if [ "" != "${tag_dev}" ]; then
|
||||
echo "Note: Release build with custom dev part: ${tag_dev}."
|
||||
echo "::set-output name=version::${major}.${build}.${tag_dev}"
|
||||
else
|
||||
echo "::set-output name=version::${major}.${build}"
|
||||
fi
|
||||
echo "::set-output name=version_dev::${tag_dev}"
|
||||
|
||||
build:
|
||||
name: Release build for ${{ matrix.board.name }}
|
||||
needs: validate_release
|
||||
strategy:
|
||||
matrix:
|
||||
board:
|
||||
- {"name": "ova", "output": "ova", "runner": "x86-64-runner"}
|
||||
- {"name": "generic_x86_64", "output": "generic-x86-64", "runner": "x86-64-runner"}
|
||||
- {"name": "khadas_vim3", "output": "khadas-vim3", "runner": "aarch64-runner"}
|
||||
- {"name": "odroid_c2", "output": "odroid-c2", "runner": "aarch64-runner"}
|
||||
- {"name": "odroid_c4", "output": "odroid-c4", "runner": "aarch64-runner"}
|
||||
- {"name": "odroid_n2", "output": "odroid-n2", "runner": "aarch64-runner"}
|
||||
- {"name": "odroid_xu4", "output": "odroid-xu4" , "runner": "aarch64-runner"}
|
||||
- {"name": "rpi2", "output": "rpi2", "runner": "arm-runner"}
|
||||
- {"name": "rpi3", "output": "rpi3", "runner": "arm-runner"}
|
||||
- {"name": "rpi3_64", "output": "rpi3-64", "runner": "aarch64-runner"}
|
||||
- {"name": "rpi4", "output": "rpi4", "runner": "arm-runner"}
|
||||
- {"name": "rpi4_64", "output": "rpi4-64", "runner": "aarch64-runner"}
|
||||
- {"name": "tinker", "output": "tinker", "runner": "arm-runner"}
|
||||
runs-on: ${{ matrix.board.runner }}
|
||||
|
||||
steps:
|
||||
# Make sure directories of potentially removed submodules are cleaned correctly
|
||||
- name: Cleanup git submodules
|
||||
run: find . -name .git -type f -exec rm {} \;
|
||||
|
||||
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
|
||||
- uses: actions/checkout@v2
|
||||
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" \
|
||||
haos-builder make BUILDDIR=/build VERSION_DEV=${{ needs.validate_release.outputs.version_dev }} ${{ matrix.board.name }}
|
||||
|
||||
- name: Upload disk image
|
||||
if: ${{ matrix.board.name != 'ova' }}
|
||||
uses: actions/upload-release-asset@v1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
upload_url: ${{ github.event.release.upload_url }}
|
||||
asset_path: ${{ github.workspace }}/release/haos_${{ matrix.board.output }}-${{ needs.validate_release.outputs.version }}.img.xz
|
||||
asset_name: haos_${{ matrix.board.output }}-${{ needs.validate_release.outputs.version }}.img.xz
|
||||
asset_content_type: application/x-xz
|
||||
|
||||
- name: Upload rauc update
|
||||
uses: actions/upload-release-asset@v1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
upload_url: ${{ github.event.release.upload_url }}
|
||||
asset_path: ${{ github.workspace }}/release/haos_${{ matrix.board.output }}-${{ needs.validate_release.outputs.version }}.raucb
|
||||
asset_name: haos_${{ matrix.board.output }}-${{ needs.validate_release.outputs.version }}.raucb
|
||||
asset_content_type: application/octet-stream
|
||||
|
||||
- name: Upload ova image
|
||||
if: ${{ matrix.board.name == 'ova' }}
|
||||
uses: actions/upload-release-asset@v1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
upload_url: ${{ github.event.release.upload_url }}
|
||||
asset_path: ${{ github.workspace }}/release/haos_${{ matrix.board.output }}-${{ needs.validate_release.outputs.version }}.ova
|
||||
asset_name: haos_${{ matrix.board.output }}-${{ needs.validate_release.outputs.version }}.ova
|
||||
asset_content_type: application/x-tar
|
||||
|
||||
- name: Upload qcow2 image
|
||||
if: ${{ matrix.board.name == 'ova' }}
|
||||
uses: actions/upload-release-asset@v1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
upload_url: ${{ github.event.release.upload_url }}
|
||||
asset_path: ${{ github.workspace }}/release/haos_${{ matrix.board.output }}-${{ needs.validate_release.outputs.version }}.qcow2.xz
|
||||
asset_name: haos_${{ matrix.board.output }}-${{ needs.validate_release.outputs.version }}.qcow2.xz
|
||||
asset_content_type: application/x-xz
|
||||
|
||||
- name: Upload vdi image
|
||||
if: ${{ matrix.board.name == 'ova' }}
|
||||
uses: actions/upload-release-asset@v1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
upload_url: ${{ github.event.release.upload_url }}
|
||||
asset_path: ${{ github.workspace }}/release/haos_${{ matrix.board.output }}-${{ needs.validate_release.outputs.version }}.vdi.zip
|
||||
asset_name: haos_${{ matrix.board.output }}-${{ needs.validate_release.outputs.version }}.vdi.zip
|
||||
asset_content_type: application/zip
|
||||
|
||||
- name: Upload vhdx image
|
||||
if: ${{ matrix.board.name == 'ova' }}
|
||||
uses: actions/upload-release-asset@v1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
upload_url: ${{ github.event.release.upload_url }}
|
||||
asset_path: ${{ github.workspace }}/release/haos_${{ matrix.board.output }}-${{ needs.validate_release.outputs.version }}.vhdx.zip
|
||||
asset_name: haos_${{ matrix.board.output }}-${{ needs.validate_release.outputs.version }}.vhdx.zip
|
||||
asset_content_type: application/zip
|
||||
|
||||
- name: Upload vmdk image
|
||||
if: ${{ matrix.board.name == 'ova' }}
|
||||
uses: actions/upload-release-asset@v1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
upload_url: ${{ github.event.release.upload_url }}
|
||||
asset_path: ${{ github.workspace }}/release/haos_${{ matrix.board.output }}-${{ needs.validate_release.outputs.version }}.vmdk.zip
|
||||
asset_name: haos_${{ matrix.board.output }}-${{ needs.validate_release.outputs.version }}.vmdk.zip
|
||||
asset_content_type: application/zip
|
||||
|
||||
bump_version:
|
||||
name: Bump dev version to ${{ needs.validate_release.outputs.version }}
|
||||
needs: [ build, validate_release ]
|
||||
runs-on: [ "ubuntu-20.04" ]
|
||||
|
||||
steps:
|
||||
- name: Initialize git
|
||||
uses: home-assistant/actions/helpers/git-init@master
|
||||
with:
|
||||
name: ${{ secrets.GIT_NAME }}
|
||||
email: ${{ secrets.GIT_EMAIL }}
|
||||
token: ${{ secrets.GIT_TOKEN }}
|
||||
|
||||
- name: Bump Home Assistant OS beta version
|
||||
uses: home-assistant/actions/helpers/version-push@master
|
||||
with:
|
||||
key: "hassos[]"
|
||||
key-description: "Home Assistant OS"
|
||||
version: ${{ needs.validate_release.outputs.version }}
|
||||
channel: "beta"
|
7
.github/workflows/stale.yml
vendored
7
.github/workflows/stale.yml
vendored
@@ -3,14 +3,11 @@ name: Stale
|
||||
# yamllint disable-line rule:truthy
|
||||
on:
|
||||
schedule:
|
||||
- cron: "40 5 * * *"
|
||||
- cron: "0 * * * *"
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
stale:
|
||||
permissions:
|
||||
issues: write # for actions/stale to close stale issues
|
||||
pull-requests: write # for actions/stale to close stale PRs
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
# The 90 day stale policy
|
||||
@@ -19,7 +16,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@v8.0.0
|
||||
uses: actions/stale@v4
|
||||
with:
|
||||
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
days-before-stale: 90
|
||||
|
94
.github/workflows/test.yaml
vendored
94
.github/workflows/test.yaml
vendored
@@ -1,94 +0,0 @@
|
||||
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
|
10
.gitignore
vendored
10
.gitignore
vendored
@@ -1,12 +1,4 @@
|
||||
# OS generated files
|
||||
.DS_Store
|
||||
|
||||
# Build output dirs
|
||||
/release
|
||||
output*/
|
||||
|
||||
# Certificates
|
||||
*.pem
|
||||
|
||||
# vscode generated files
|
||||
.vscode*
|
||||
output*/
|
||||
|
2
.gitmodules
vendored
2
.gitmodules
vendored
@@ -1,4 +1,4 @@
|
||||
[submodule "buildroot"]
|
||||
path = buildroot
|
||||
url = https://github.com/home-assistant/buildroot.git
|
||||
branch = 2022.02.x-haos
|
||||
branch = 2021.02.x-haos
|
||||
|
@@ -1,82 +0,0 @@
|
||||
<!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>
|
17
Dockerfile
17
Dockerfile
@@ -28,24 +28,27 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||
cpio \
|
||||
file \
|
||||
git \
|
||||
graphviz \
|
||||
jq \
|
||||
make \
|
||||
ncurses-dev \
|
||||
openssh-client \
|
||||
patch \
|
||||
perl \
|
||||
python3 \
|
||||
python3-matplotlib \
|
||||
python-is-python3 \
|
||||
qemu-utils \
|
||||
graphviz \
|
||||
rsync \
|
||||
skopeo \
|
||||
sudo \
|
||||
unzip \
|
||||
vim \
|
||||
wget \
|
||||
zip \
|
||||
wget \
|
||||
qemu-utils \
|
||||
openssh-client \
|
||||
vim \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||
skopeo \
|
||||
jq \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Init entry
|
||||
|
@@ -5,26 +5,26 @@
|
||||
The following boards/devices are supported:
|
||||
|
||||
- Raspberry Pi
|
||||
- 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)
|
||||
- Pi 4 Model B (1 GB, 2 GB and 4 GB model) 32-bit
|
||||
- Pi 4 Model B (1 GB, 2 GB and 4 GB model) 64-bit (recommended)
|
||||
- Pi 3 Model B and B+ 32-bit
|
||||
- Pi 3 Model B and B+ 64-bit (recommended)
|
||||
- Pi 2 (not recommended)
|
||||
- Pi Zero-W (not recommended)
|
||||
- Pi (not recommended)
|
||||
- Hardkernel
|
||||
- [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](https://tinker-board.asus.com/product/tinker-board.html)
|
||||
- Odroid-C2
|
||||
- Odroid-C4 (_experimental_)
|
||||
- Odroid-N2
|
||||
- Odroid-XU4
|
||||
- Generic x86-64 (UEFI, not suited for virtualization)
|
||||
- [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)
|
||||
- Intel NUC5CPYH
|
||||
- Intel NUC6CAYH
|
||||
- Intel NUC10I3FNK2
|
||||
- Gigabyte GB-BPCE-3455
|
||||
- Computers supporting x86-64 architecture and UEFI boot should generally work
|
||||
- Asus
|
||||
- Tinker Board
|
||||
- Virtual appliance (x86_64/UEFI):
|
||||
- VMDK
|
||||
- OVA ?
|
||||
@@ -39,16 +39,17 @@ Notes:
|
||||
|
||||
|Board|Build|Config|Docs|
|
||||
|-----|----|------|----|
|
||||
|Pi4B 64-bit |`make rpi4_64` |[rpi4_64](../../buildroot-external/configs/rpi4_64_defconfig)|[raspberrypi](./raspberrypi/)|
|
||||
|Pi4B 32-bit |`make rpi4` |[rpi4](../../buildroot-external/configs/rpi4_defconfig)|[raspberrypi](./raspberrypi/)|
|
||||
|Pi3B 64-bit |`make rpi3_64` |[rpi3_64](../../buildroot-external/configs/rpi3_64_defconfig)|[raspberrypi](./raspberrypi/)|
|
||||
|Pi3B 32-bit |`make rpi3` |[rpi3](../../buildroot-external/configs/rpi3_defconfig)|[raspberrypi](./raspberrypi/)|
|
||||
|Pi2 |`make rpi2` |[rpi2](../../buildroot-external/configs/rpi2_defconfig)|[raspberrypi](./raspberrypi/)|
|
||||
|ODROID-C2 |`make odroid_c2` |[odroid_c2](../../buildroot-external/configs/odroid_c2_defconfig)|[hardkernel](./hardkernel/)|
|
||||
|ODROID-C4 |`make odroid_c4` |[odroid_c4](../../buildroot-external/configs/odroid_c4_defconfig)|[hardkernel](./hardkernel/)|
|
||||
|ODROID-M1 |`make odroid_m1` |[odroid_m1](../../buildroot-external/configs/odroid_m1_defconfig)|[hardkernel](./hardkernel/)|
|
||||
|ODROID-N2/N2+ |`make odroid_n2` |[odroid_n2](../../buildroot-external/configs/odroid_n2_defconfig)|[hardkernel](./hardkernel/)|
|
||||
|ODROID-XU4 |`make odroid_xu4` |[odroid_xu4](../../buildroot-external/configs/odroid_xu4_defconfig)|[hardkernel](./hardkernel/)|
|
||||
|Tinker Board |`make tinker` |[tinker](../../buildroot-external/configs/tinker_defconfig)|[asus](./asus/)|
|
||||
|Generic x86-64|`make generic_x86_64`|[generic_x86_64](../../buildroot-external/configs/generic_x86_64_defconfig)|[generic-x86-64](./generic-x86-64/)|
|
||||
|OVA |`make ova` |[ova](../../buildroot-external/configs/ova_defconfig)|[ova](./ova/)|
|
||||
|Pi4B 32-bit |`make rpi4` |[rpi4](../../buildroot-external/configs/rpi4_defconfig)|[raspberrypi](./raspberrypi/)|
|
||||
|Pi4B 64-bit |`make rpi4_64` |[rpi4_64](../../buildroot-external/configs/rpi4_64_defconfig)|[raspberrypi](./raspberrypi/)|
|
||||
|Pi3B 32-bit |`make rpi3` |[rpi3](../../buildroot-external/configs/rpi3_defconfig)|[raspberrypi](./raspberrypi/)|
|
||||
|Pi3B 64-bit |`make rpi3_64` |[rpi3_64](../../buildroot-external/configs/rpi3_64_defconfig)|[raspberrypi](./raspberrypi/)|
|
||||
|Pi2 |`make rpi2` |[rpi2](../../buildroot-external/configs/rpi2_defconfig)|[raspberrypi](./raspberrypi/)|
|
||||
|Pi Zero |`make rpi0_w` |[rpi0_w](../../buildroot-external/configs/rpi0_w_defconfig)|[raspberrypi](./raspberrypi/)|
|
||||
|Pi |`make rpi` |[rpi](../../buildroot-external/configs/rpi_defconfig)|[raspberrypi](./raspberrypi/)|
|
||||
|Odroid-C2 |`make odroid_c2` |[odroid_c2](../../buildroot-external/configs/odroid_c2_defconfig)|[hardkernel](./hardkernel/)|
|
||||
|Odroid-C4 |`make odroid_c4` |[odroid_c4](../../buildroot-external/configs/odroid_c4_defconfig)|[hardkernel](./hardkernel/)|
|
||||
|Odroid-N2 |`make odroid_n2` |[odroid_n2](../../buildroot-external/configs/odroid_n2_defconfig)|[hardkernel](./hardkernel/)|
|
||||
|Odroid-XU4 |`make odroid_xu4` |[odroid_xu4](../../buildroot-external/configs/odroid_xu4_defconfig)|[hardkernel](./hardkernel/)|
|
||||
|Tinker Board |`make tinker` |[tinker](../../buildroot-external/configs/tinker_defconfig)|[asus](./asus/)|
|
||||
|Generic x86-64 |`make generic_x86_64` |[generic_x86_64](../../buildroot-external/configs/generic_x86_64_defconfig)|[generic-x86-64](./generic-x86-64/)|
|
||||
|OVA |`make ova` |[ova](../../buildroot-external/configs/ova_defconfig)|[ova](./ova/)|
|
||||
|
@@ -1,36 +0,0 @@
|
||||
# Generic aarch64
|
||||
|
||||
## Supported Hardware
|
||||
|
||||
This board configuration aims to support most aarch64 systems with UEFI boot
|
||||
Hardware it has been tested with is listed below.
|
||||
|
||||
## Tested Hardware
|
||||
|
||||
| Device | Release Date | Support | Config |
|
||||
|-----------------------|--------------|---------|-------------|
|
||||
| QEMU | QEMU | yes | [generic_aarch64](../../../buildroot-external/configs/generic_aarch64_defconfig) |
|
||||
|
||||
|
||||
## Requirements
|
||||
|
||||
- aarch64 support
|
||||
- UEFI boot
|
||||
|
||||
## Wifi
|
||||
|
||||
WiFi is untested.
|
||||
|
||||
## Bluetooth
|
||||
|
||||
Bluetooth is untested.
|
||||
|
||||
## Installation
|
||||
|
||||
Make sure secure boot is disabled in the UEFI BIOS settings.
|
||||
|
||||
Currently there is no shiny installation method. Checklist:
|
||||
- Boot PC to live environment using PXE or USB
|
||||
- Copy or download the Home Assistant OS image into your live environment
|
||||
- unxz the image and dd to the local hard disk
|
||||
- Reboot
|
@@ -12,7 +12,6 @@ been tested with is listed below.
|
||||
|-----------------------|--------------|---------|-------------|
|
||||
| Intel NUC5CPYH | Q3 2015 | yes | [generic_x86_64](../../../buildroot-external/configs/generic_x86_64_defconfig) |
|
||||
| Intel NUC6CAYH | Q4 2016 | yes | [generic_x86_64](../../../buildroot-external/configs/generic_x86_64_defconfig) |
|
||||
| Intel NUC6CAYS | Q4 2016 | yes | [generic_x86_64](../../../buildroot-external/configs/generic_x86_64_defconfig) |
|
||||
| Intel NUC7i3DNHE | Q3 2017 | yes | [generic_x86_64](../../../buildroot-external/configs/generic_x86_64_defconfig) |
|
||||
| Intel NUC10i3FNK2 | Q4 2019 | yes | [generic_x86_64](../../../buildroot-external/configs/generic_x86_64_defconfig) |
|
||||
| Gigabyte GB-BPCE-3455 | 2017 | yes* | [generic_x86_64](../../../buildroot-external/configs/generic_x86_64_defconfig) |
|
||||
@@ -49,7 +48,7 @@ The following cards are supported:
|
||||
|
||||
## Bluetooth
|
||||
|
||||
Bluetooth integrated in Intel Wireless cards working OK, other options untested.
|
||||
Bluetooth is untested.
|
||||
|
||||
## Installation
|
||||
|
||||
|
@@ -4,11 +4,10 @@
|
||||
|
||||
| Device | Release Date | Support | Config |
|
||||
|----------------|---------------|--------------|-----------|
|
||||
| ODROID-C2 | 2016 | yes | [odroid_c2](../../../buildroot-external/configs/odroid_c2_defconfig) |
|
||||
| ODROID-C4 | 2020 | yes | [odroid_c4](../../../buildroot-external/configs/odroid_c4_defconfig) |
|
||||
| ODROID-M1 | 2022 | yes | [odroid_m1](../../../buildroot-external/configs/odroid_m1_defconfig) |
|
||||
| ODROID-N2 | 2019 | yes | [odroid_n2](../../../buildroot-external/configs/odroid_n2_defconfig) |
|
||||
| ODROID-XU4 | 2015 | yes | [odroid_xu4](../../../buildroot-external/configs/odroid_xu4_defconfig)|
|
||||
| ODROID-C2 | 2016 | yes | [odroid_c2](../../../buildroot-external/configs/odroid_c2_defconfig) |
|
||||
| ODROID-C4 | 2020 | experimental | [odroid_c4](../../../buildroot-external/configs/odroid_c4_defconfig) |
|
||||
| ODROID-N2 | 2019 | yes | [odroid_n2](../../../buildroot-external/configs/odroid_n2_defconfig) |
|
||||
|
||||
See separate documentation for each board.
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
# ODROID-C2
|
||||
# Odroid-C2
|
||||
|
||||
## eMMC
|
||||
|
||||
|
@@ -1,10 +1,10 @@
|
||||
# ODROID-C4
|
||||
# Odroid-C4
|
||||
|
||||
## Experimental
|
||||
|
||||
ODROID-C4 support is based heavily on the Odroid-C2 and N2 configurations. Given the similarity of the SoCs, as well as the comparable level of support in the Linux kernel, the C4 should hopefully present few surprises. However, Home Assistant support should be regarded as experimental.
|
||||
Odroid-C4 support is based heavily on the Odroid-C2 and N2 configurations. Given the similarity of the SoCs, as well as the comparable level of support in the Linux kernel, the C4 should hopefully present few surprises. However, Home Assistant support should be regarded as experimental.
|
||||
|
||||
Please also refer to the documentation pages for the [ODROID-C2](./odroid-c2.md) and [Odroid-N2](./odroid-n2.md), as some of that information may apply to the C4 as well.
|
||||
Please also refer to the documentation pages for the [Odroid-C2](./odroid-c2.md) and [Odroid-N2](./odroid-n2.md), as some of that information may apply to the C4 as well.
|
||||
|
||||
Common C4 issues that have been specifically tested and appear to be working:
|
||||
- boot from SD
|
||||
|
@@ -1,50 +0,0 @@
|
||||
# ODROID-M1
|
||||
|
||||
Home Assistant OS 10 and newer support the ODROID-M1 board.
|
||||
|
||||
## SD-card
|
||||
|
||||
SD-card boot is supported via on-board bootloader (SPL) or recovery button.
|
||||
|
||||
## eMMC
|
||||
|
||||
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
|
||||
|
||||
Booting directly from NVMe is not supported. The NVMe card can be used as a data disk.
|
||||
|
||||
## Technical notes on boot flow
|
||||
|
||||
The Home Assistant OS image is bootable by the SoC directly. This means that no help
|
||||
from the Hardkernel provided and pre-installed bootloader Petitboot is necessary.
|
||||
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 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
|
||||
|
||||
By default, console access is available on the serial header (CON1) and on HDMI.
|
||||
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,4 +1,4 @@
|
||||
# ODROID-N2
|
||||
# Odroid-N2
|
||||
|
||||
## eMMC
|
||||
|
||||
|
@@ -6,8 +6,16 @@
|
||||
|---------------------|---------------|-----------------|--------------------|
|
||||
| Raspberry Pi B/B+/A+|2012/2014/2014 | not recommended | [rpi](../../../buildroot-external/configs/rpi_defconfig) |
|
||||
| Raspberry Pi 2 B |2015 | not recommended | [rpi2](../../../buildroot-external/configs/rpi2_defconfig) |
|
||||
| Raspberry Pi Zero |2015 | not recommended | [rpi](../../../buildroot-external/configs/rpi_defconfig) |
|
||||
| Raspberry Pi Zero W |2017 | not recommended | [rpi0_w](../../../buildroot-external/configs/rpi0_w_defconfig) |
|
||||
| Raspberry Pi 3 B/B+ |2016/2018 | yes | [rpi3](../../../buildroot-external/configs/rpi3_defconfig) / [rpi3_64](../../../buildroot-external/configs/rpi3_64_defconfig) |
|
||||
| Raspberry Pi 4 B |2019 | yes | [rpi4](../../../buildroot-external/configs/rpi4_defconfig) / [rpi4_64](../../../buildroot-external/configs/rpi4_64_defconfig) |
|
||||
| Raspberry Pi 4 B |2019 | yes* | [rpi4](../../../buildroot-external/configs/rpi4_defconfig) / [rpi4_64](../../../buildroot-external/configs/rpi4_64_defconfig) |
|
||||
|
||||
\*1,2 and 4 GiB versions of the Raspberry Pi 4 B are supported. Support for the 8 GiB version is coming soon is part of #740.
|
||||
|
||||
## Limitation 64bit
|
||||
|
||||
The 64bit version is under development by RPi-Team. It work very nice but it could have some impacts. Actual we see that the SDcard access with ext4 are a bit slower than on 32bit.
|
||||
|
||||
## Serial console
|
||||
|
||||
|
@@ -23,9 +23,8 @@ hassos-xy.raucb
|
||||
- The `timesyncd.conf` file allow you to set different NTP servers. HassOS won't boot without correct working time servers!
|
||||
- The `hassos-*.raucb` file is a firmware OTA update which will be installed. These can be found on on the [release][hassos-release] page.
|
||||
|
||||
Text files that are on USB stick must have Unix (LF) end of line characters. If you create USB stick on Windows machine, be sure to use Notepad++, Visual Studio Code or any other editor, that supports different line endings. In Notepad++ LF EOL can be enabled with setting `Edit -> EOL Conversion -> Unix (LF)`.
|
||||
|
||||
You can put this USB stick into the device and it will be read on startup and files written to the correct places. You can also trigger this process later using `ha os import` from the CLI or by calling `systemctl restart hassos-config` on the OS shell. *The USB Stick just needs to be inserted to the device during this setup process and can be removed afterwards.*
|
||||
You can put this USB stick into the device and it will be read on startup and files written to the correct places. You can also trigger this process later over the
|
||||
API/UI or by calling `systemctl restart hassos-config` on the host. *The USB Stick just needs to be inserted to the device during this setup process and can be disconnected afterwards.*
|
||||
|
||||
## Local
|
||||
|
||||
@@ -53,7 +52,7 @@ Our default NTP configuration look like:
|
||||
|
||||
```
|
||||
[Time]
|
||||
NTP=time.cloudflare.com
|
||||
NTP=time1.google.com time2.google.com time3.google.com
|
||||
FallbackNTP=0.pool.ntp.org 1.pool.ntp.org 2.pool.ntp.org 3.pool.ntp.org
|
||||
```
|
||||
|
||||
|
@@ -1,24 +1,18 @@
|
||||
|
||||
# Kernel Version
|
||||
|
||||
Default Kernel tree: 6.1
|
||||
Default Kernel tree: 5.10
|
||||
|
||||
| Board | Version |
|
||||
|-------|---------|
|
||||
| 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 |
|
||||
| Open Virtual Appliance | 5.10.108 |
|
||||
| Raspberry Pi 0-W | 5.10.103 |
|
||||
| Raspberry Pi 2 | 5.10.103 |
|
||||
| Raspberry Pi 3 | 5.10.103 |
|
||||
| Raspberry Pi 4 | 5.10.103 |
|
||||
| Tinker Board | 5.10.108 |
|
||||
| Odroid-C2 | 5.10.108 |
|
||||
| Odroid-C4 | 5.10.108 |
|
||||
| Odroid-N2 | 5.10.108 |
|
||||
| Odroid-XU4 | 5.10.108 |
|
||||
| Generic x86-64 | 5.10.108 |
|
||||
|
@@ -128,14 +128,6 @@ profile using DHCP, use the following commands on the host console:
|
||||
|
||||
Home Assistant OS will recreate the default connection profile during boot.
|
||||
|
||||
### Enabling Wi-Fi
|
||||
|
||||
Wi-Fi is discouraged for reliability reasons. However, if you still prefer to use Wi-Fi, you can us the `ha network` command to set up Wi-Fi (example for a Raspberry Pi 4, check `ha network info` to check if your board supports Wi-Fi and the name of the Wi-Fi device):
|
||||
|
||||
```bash
|
||||
ha network update wlan0 --ipv4-method auto --wifi-auth wpa-psk --wifi-mode infrastructure --wifi-ssid "MY-SSID" --wifi-psk MY_PASS
|
||||
````
|
||||
|
||||
### Powersave
|
||||
|
||||
If you have trouble with powersave then apply the following changes:
|
||||
@@ -188,6 +180,6 @@ If you now view the default connection `cat /etc/NetworkManager/system-connectio
|
||||
|
||||
Doing a `nmcli con reload` does not always work, so restart the virtual machine or the physical system.
|
||||
|
||||
[nm-manual]: https://networkmanager.dev/docs/api/1.40/manpages.html
|
||||
[nm-manual]: https://developer.gnome.org/NetworkManager/stable/manpages.html
|
||||
[configuration-usb]: configuration.md
|
||||
[uuid]: https://www.uuidgenerator.net/version4
|
||||
[uuid]: https://www.uuidgenerator.net/
|
||||
|
13
Makefile
13
Makefile
@@ -1,8 +1,11 @@
|
||||
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)))
|
||||
@@ -20,17 +23,17 @@ endif
|
||||
|
||||
all: $(TARGETS)
|
||||
|
||||
savedefconfig:
|
||||
@echo "config $*"
|
||||
$(MAKE) -C $(BUILDROOT) O=$(O) BR2_EXTERNAL=$(BUILDROOT_EXTERNAL) "savedefconfig"
|
||||
$(RELEASE_DIR):
|
||||
mkdir -p $(RELEASE_DIR)
|
||||
|
||||
$(TARGETS_CONFIG): %-config:
|
||||
@echo "config $*"
|
||||
$(MAKE) -C $(BUILDROOT) O=$(O) BR2_EXTERNAL=$(BUILDROOT_EXTERNAL) "$*_defconfig"
|
||||
|
||||
$(TARGETS): %: %-config
|
||||
$(TARGETS): %: $(RELEASE_DIR) %-config
|
||||
@echo "build $@"
|
||||
$(MAKE) -C $(BUILDROOT) O=$(O) BR2_EXTERNAL=$(BUILDROOT_EXTERNAL)
|
||||
$(MAKE) -C $(BUILDROOT) O=$(O) BR2_EXTERNAL=$(BUILDROOT_EXTERNAL) VERSION_DEV=$(VERSION_DEV)
|
||||
cp -f $(O)/images/haos_* $(RELEASE_DIR)/
|
||||
|
||||
# Do not clean when building for one target
|
||||
ifneq ($(words $(filter $(TARGETS),$(MAKECMDGOALS))), 1)
|
||||
|
@@ -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 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.
|
||||
Home Assistant Operating System uses Docker as Container engine. It by default deploys the Home Assistant Supervisor as a container. Home Assistant Supervisor in turn uses the Docker container engine to control Home Assistant Core and Add-Ons in separate containers. Home Assistant Operating System is **not** based on a regular Linux distribution like Ubuntu. It is built using [Buildroot](https://buildroot.org/) and it is optimized to run Home Assistant. It targets single board compute (SBC) devices like the Raspberry Pi or ODROID but also supports x86-64 systems with UEFI.
|
||||
|
||||
## Features
|
||||
|
||||
@@ -16,8 +16,8 @@ Home Assistant Operating System uses Docker as its container engine. By default
|
||||
|
||||
- Raspberry Pi
|
||||
- Hardkernel ODROID
|
||||
- Intel NUC
|
||||
- Asus Tinker Board
|
||||
- Generic x86-64 (e.g. Intel NUC)
|
||||
- Virtual appliances
|
||||
|
||||
See the full list and specific models [here](./Documentation/boards/README.md)
|
||||
@@ -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 [https://os-artifacts.home-assistant.io/index.html](https://os-artifacts.home-assistant.io/index.html).
|
||||
available at [os-builds.home-assistant.io](https://os-builds.home-assistant.io/).
|
||||
|
Submodule buildroot updated: 2a3f23fc4b...8d88bd9a35
@@ -1,18 +1,14 @@
|
||||
source "$BR2_EXTERNAL_HASSOS_PATH/package/bluetooth-rtl8723/Config.in"
|
||||
source "$BR2_EXTERNAL_HASSOS_PATH/package/eq3_char_loop/Config.in"
|
||||
source "$BR2_EXTERNAL_HASSOS_PATH/package/gasket/Config.in"
|
||||
source "$BR2_EXTERNAL_HASSOS_PATH/package/generic_raw_uart/Config.in"
|
||||
source "$BR2_EXTERNAL_HASSOS_PATH/package/hardkernel-boot/Config.in"
|
||||
source "$BR2_EXTERNAL_HASSOS_PATH/package/hassio/Config.in"
|
||||
source "$BR2_EXTERNAL_HASSOS_PATH/package/bluetooth-bcm43xx/Config.in"
|
||||
source "$BR2_EXTERNAL_HASSOS_PATH/package/bluetooth-rtl8723/Config.in"
|
||||
source "$BR2_EXTERNAL_HASSOS_PATH/package/hardkernel-boot/Config.in"
|
||||
source "$BR2_EXTERNAL_HASSOS_PATH/package/khadas-boot/Config.in"
|
||||
source "$BR2_EXTERNAL_HASSOS_PATH/package/os-agent/Config.in"
|
||||
source "$BR2_EXTERNAL_HASSOS_PATH/package/pi-bluetooth/Config.in"
|
||||
source "$BR2_EXTERNAL_HASSOS_PATH/package/qemu-guest-agent/Config.in"
|
||||
source "$BR2_EXTERNAL_HASSOS_PATH/package/lxd-guest-agent/Config.in"
|
||||
source "$BR2_EXTERNAL_HASSOS_PATH/package/rockchip-blobs/Config.in"
|
||||
source "$BR2_EXTERNAL_HASSOS_PATH/package/intel-e1000e/Config.in"
|
||||
source "$BR2_EXTERNAL_HASSOS_PATH/package/rpi-eeprom/Config.in"
|
||||
source "$BR2_EXTERNAL_HASSOS_PATH/package/rpi-rf-mod/Config.in"
|
||||
source "$BR2_EXTERNAL_HASSOS_PATH/package/rtl88x2bu/Config.in"
|
||||
source "$BR2_EXTERNAL_HASSOS_PATH/package/tempio/Config.in.host"
|
||||
source "$BR2_EXTERNAL_HASSOS_PATH/package/os-agent/Config.in"
|
||||
source "$BR2_EXTERNAL_HASSOS_PATH/package/udisks2/Config.in"
|
||||
source "$BR2_EXTERNAL_HASSOS_PATH/package/eq3_char_loop/Config.in"
|
||||
source "$BR2_EXTERNAL_HASSOS_PATH/package/generic_raw_uart/Config.in"
|
||||
source "$BR2_EXTERNAL_HASSOS_PATH/package/rpi-rf-mod/Config.in"
|
||||
source "$BR2_EXTERNAL_HASSOS_PATH/package/xe-guest-utilities/Config.in"
|
||||
|
@@ -1 +0,0 @@
|
||||
console=tty1 console=ttyS0
|
@@ -1,85 +0,0 @@
|
||||
set default=99
|
||||
set timeout=1
|
||||
|
||||
set ORDER="A B"
|
||||
set A_OK=0
|
||||
set B_OK=0
|
||||
set A_TRY=0
|
||||
set B_TRY=0
|
||||
set MACHINE_ID=""
|
||||
load_env
|
||||
|
||||
# select bootable slot
|
||||
for SLOT in $ORDER; do
|
||||
if [ "$SLOT" == "A" ]; then
|
||||
INDEX=0
|
||||
OK=$A_OK
|
||||
TRY=$A_TRY
|
||||
fi
|
||||
if [ "$SLOT" == "B" ]; then
|
||||
INDEX=1
|
||||
OK=$B_OK
|
||||
TRY=$B_TRY
|
||||
fi
|
||||
if [ "$OK" -eq 1 -a "$TRY" -lt 3 ]; then
|
||||
default=$INDEX
|
||||
|
||||
# increment attempts and save back to slot
|
||||
if [ "$TRY" -eq 1 ]; then
|
||||
TRY=2
|
||||
elif [ "$TRY" -eq 2 ]; then
|
||||
TRY=3
|
||||
else
|
||||
TRY=1
|
||||
fi
|
||||
|
||||
if [ "$SLOT" == "A" ]; then
|
||||
A_TRY=$TRY
|
||||
fi
|
||||
if [ "$SLOT" == "B" ]; then
|
||||
B_TRY=$TRY
|
||||
fi
|
||||
|
||||
break
|
||||
fi
|
||||
done
|
||||
|
||||
# No bootable slot found, choose rescue...
|
||||
if [ "$default" -eq 99 ]; then
|
||||
if [ "$A_OK" -eq 1 ]; then
|
||||
default=2
|
||||
fi
|
||||
if [ "$B_OK" -eq 1 ]; then
|
||||
default=3
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ "$MACHINE_ID" == "" ]; then
|
||||
boot_condition="systemd.condition-first-boot=true"
|
||||
fi
|
||||
|
||||
save_env A_TRY A_OK B_TRY B_OK ORDER MACHINE_ID
|
||||
|
||||
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
|
||||
# We extract the part before the comma to then append our own partition index
|
||||
# at the end. This is hacky but the best way I found
|
||||
regexp --set 1:boothd (.+),.+ ${root}
|
||||
|
||||
menuentry "Slot A (OK=$A_OK TRY=$A_TRY)" {
|
||||
linux (${boothd},gpt2)/Image root=PARTUUID=8d3d53e3-6d49-4c38-8349-aff6859e82fd $default_cmdline $cmdline rauc.slot=A
|
||||
}
|
||||
|
||||
menuentry "Slot B (OK=$B_OK TRY=$B_TRY)" {
|
||||
linux (${boothd},gpt4)/Image root=PARTUUID=a3ec664e-32ce-4665-95ea-7ae90ce9aa20 $default_cmdline $cmdline rauc.slot=B
|
||||
}
|
||||
|
||||
menuentry "Slot A (rescue shell)" {
|
||||
linux (${boothd},gpt2)/Image root=PARTUUID=8d3d53e3-6d49-4c38-8349-aff6859e82fd $default_cmdline $cmdline rauc.slot=A systemd.unit=recovery.target
|
||||
}
|
||||
|
||||
menuentry "Slot B (rescue shell)" {
|
||||
linux (${boothd},gpt4)/Image root=PARTUUID=a3ec664e-32ce-4665-95ea-7ae90ce9aa20 $default_cmdline $cmdline rauc.slot=B systemd.unit=recovery.target
|
||||
}
|
@@ -1,27 +0,0 @@
|
||||
#!/bin/bash
|
||||
# shellcheck disable=SC2155
|
||||
|
||||
function hassos_pre_image() {
|
||||
local BOOT_DATA="$(path_boot_dir)"
|
||||
local EFIPART_DATA="${BINARIES_DIR}/efi-part"
|
||||
|
||||
mkdir -p "${BOOT_DATA}/EFI/BOOT"
|
||||
|
||||
cp "${BOARD_DIR}/grub.cfg" "${EFIPART_DATA}/EFI/BOOT/grub.cfg"
|
||||
cp "${BOARD_DIR}/cmdline.txt" "${EFIPART_DATA}/cmdline.txt"
|
||||
grub-editenv "${EFIPART_DATA}/EFI/BOOT/grubenv" create
|
||||
|
||||
cp -r "${EFIPART_DATA}/"* "${BOOT_DATA}/"
|
||||
}
|
||||
|
||||
|
||||
function hassos_post_image() {
|
||||
convert_disk_image_virtual vmdk
|
||||
convert_disk_image_virtual qcow2
|
||||
|
||||
convert_disk_image_zip vmdk
|
||||
convert_disk_image_xz qcow2
|
||||
|
||||
convert_disk_image_xz
|
||||
}
|
||||
|
@@ -1,32 +0,0 @@
|
||||
CONFIG_EFI_STUB=y
|
||||
|
||||
CONFIG_VIRTIO=y
|
||||
CONFIG_VIRTIO_PCI=y
|
||||
CONFIG_VIRTIO_NET=y
|
||||
CONFIG_VIRTIO_BALLOON=m
|
||||
CONFIG_VIRTIO_INPUT=m
|
||||
CONFIG_VIRTIO_BLK=y
|
||||
CONFIG_VIRTIO_BLK_SCSI=y
|
||||
CONFIG_VIRTIO_CONSOLE=m
|
||||
CONFIG_VIRTIO_VSOCKETS=m
|
||||
CONFIG_VIRTIO_MMIO=y
|
||||
CONFIG_SCSI_VIRTIO=y
|
||||
CONFIG_HW_RANDOM_VIRTIO=y
|
||||
|
||||
CONFIG_NVME_CORE=y
|
||||
CONFIG_BLK_DEV_NVME=y
|
||||
CONFIG_NVME_HWMON=y
|
||||
|
||||
CONFIG_DRM_VIRTIO_GPU=m
|
||||
|
||||
CONFIG_HYPERVISOR_GUEST=y
|
||||
CONFIG_HYPERV=y
|
||||
CONFIG_HYPERV_UTILS=m
|
||||
CONFIG_HYPERV_BALLOON=m
|
||||
CONFIG_HYPERV_KEYBOARD=m
|
||||
CONFIG_HYPERV_STORAGE=y
|
||||
CONFIG_HYPERV_NET=y
|
||||
CONFIG_HYPERV_VSOCKETS=m
|
||||
CONFIG_PCI_HYPERV=m
|
||||
CONFIG_PCI_HYPERV_INTERFACE=m
|
||||
CONFIG_FB_HYPERV=y
|
@@ -1,11 +0,0 @@
|
||||
BOARD_ID=generic-aarch64
|
||||
BOARD_NAME="Generic aarch64"
|
||||
CHASSIS=embedded
|
||||
BOOTLOADER=grub
|
||||
KERNEL_FILE=Image
|
||||
BOOT_SYS=efi
|
||||
BOOT_SIZE=32M
|
||||
BOOT_SPL=false
|
||||
DISK_SIZE=6
|
||||
SUPERVISOR_MACHINE=qemuarm-64
|
||||
SUPERVISOR_ARCH=aarch64
|
@@ -120,6 +120,7 @@ CONFIG_CGROUP_WRITEBACK=y
|
||||
CONFIG_CGROUP_SCHED=y
|
||||
CONFIG_FAIR_GROUP_SCHED=y
|
||||
CONFIG_CFS_BANDWIDTH=y
|
||||
CONFIG_RT_GROUP_SCHED=y
|
||||
CONFIG_CGROUP_PIDS=y
|
||||
CONFIG_CGROUP_RDMA=y
|
||||
CONFIG_CGROUP_FREEZER=y
|
||||
@@ -1516,7 +1517,7 @@ CONFIG_BT_HCIBTUSB=y
|
||||
CONFIG_BT_HCIBTUSB_BCM=y
|
||||
CONFIG_BT_HCIBTUSB_RTL=y
|
||||
CONFIG_BT_HCIBTSDIO=y
|
||||
CONFIG_BT_HCIUART=m
|
||||
CONFIG_BT_HCIUART=y
|
||||
CONFIG_BT_HCIUART_SERDEV=y
|
||||
CONFIG_BT_HCIUART_H4=y
|
||||
# CONFIG_BT_HCIUART_NOKIA is not set
|
||||
@@ -1526,7 +1527,6 @@ CONFIG_BT_HCIUART_ATH3K=y
|
||||
CONFIG_BT_HCIUART_3WIRE=y
|
||||
# CONFIG_BT_HCIUART_INTEL is not set
|
||||
# CONFIG_BT_HCIUART_BCM is not set
|
||||
CONFIG_BT_HCIUART_RTL=y
|
||||
# CONFIG_BT_HCIUART_QCA is not set
|
||||
# CONFIG_BT_HCIUART_AG6XX is not set
|
||||
# CONFIG_BT_HCIUART_MRVL is not set
|
||||
@@ -2474,7 +2474,7 @@ CONFIG_SERIAL_CORE_CONSOLE=y
|
||||
# CONFIG_SERIAL_CONEXANT_DIGICOLOR is not set
|
||||
# CONFIG_SERIAL_ST_ASC is not set
|
||||
CONFIG_SERIAL_DEV_BUS=y
|
||||
CONFIG_SERIAL_DEV_CTRL_TTYPORT=y
|
||||
# CONFIG_SERIAL_DEV_CTRL_TTYPORT is not set
|
||||
# CONFIG_TTY_PRINTK is not set
|
||||
# CONFIG_HVC_DCC is not set
|
||||
# CONFIG_IPMI_HANDLER is not set
|
||||
|
@@ -4,9 +4,7 @@ CHASSIS=embedded
|
||||
BOOTLOADER=uboot
|
||||
KERNEL_FILE=zImage
|
||||
BOOT_SYS=hybrid
|
||||
BOOT_SIZE=24M
|
||||
BOOT_SPL=true
|
||||
BOOT_SPL_SIZE=8M
|
||||
BOOT_ENV_SIZE=0x8000
|
||||
SUPERVISOR_MACHINE=tinker
|
||||
SUPERVISOR_ARCH=armv7
|
||||
|
@@ -0,0 +1,64 @@
|
||||
From 2ae3821fd824560ef2db3c87cfbec985177911f6 Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <2ae3821fd824560ef2db3c87cfbec985177911f6.1599249626.git.stefan@agner.ch>
|
||||
From: "Miouyouyou (Myy)" <myy@miouyouyou.fr>
|
||||
Date: Mon, 5 Nov 2018 22:03:26 +0100
|
||||
Subject: [PATCH 1/2] ARM: DTS: rk3288-tinker: Setup the Bluetooth UART pins
|
||||
|
||||
The most essential being the RTS pin, which is clearly needed to
|
||||
upload the initial configuration into the Realtek Bluetooth
|
||||
chip, and make the Bluetooth chip work.
|
||||
|
||||
Now, the Bluetooth chip also needs 3 other GPIOS to be enabled.
|
||||
I'll see how I do that through the DTS file in a near future.
|
||||
|
||||
The 3 GPIOS being :
|
||||
Bluetooth Reset : <&gpio4 29 GPIO_ACTIVE_HIGH>
|
||||
Bluetooth Wake : <&gpio4 26 GPIO_ACTIVE_HIGH>
|
||||
Bluetooth Wake_Host_IRQ : <&gpio4 31 GPIO_ACTIVE_HIGH>
|
||||
|
||||
These are currently setup manually, through scripts. But it seems that
|
||||
GPIO handling through /sys entries might not be possible in the long
|
||||
term, the replacement being libgpio.
|
||||
Anyway, if you're interesting in enabling the Bluetooth GPIO by hand,
|
||||
here are the commands :
|
||||
|
||||
cd /sys/class/gpio &&
|
||||
echo 146 > export &&
|
||||
echo 149 > export &&
|
||||
echo 151 > export &&
|
||||
echo high > gpio146/direction &&
|
||||
echo high > gpio149/direction &&
|
||||
echo high > gpio151/direction
|
||||
|
||||
Resetting the chip is done like this :
|
||||
|
||||
echo "Resetting the Bluetooth chip"
|
||||
cd /sys/class/gpio/gpio149 &&
|
||||
echo 0 > value &&
|
||||
sleep 1 &&
|
||||
echo 1 > value &&
|
||||
sleep 1
|
||||
|
||||
Signed-off-by: Miouyouyou (Myy) <myy@miouyouyou.fr>
|
||||
[move change to rk3288-tinker.dtsi]
|
||||
Signed-off-by: Stefan Agner <stefan@agner.ch>
|
||||
---
|
||||
arch/arm/boot/dts/rk3288-tinker.dtsi | 2 ++
|
||||
1 file changed, 2 insertions(+)
|
||||
|
||||
diff --git a/arch/arm/boot/dts/rk3288-tinker.dtsi b/arch/arm/boot/dts/rk3288-tinker.dtsi
|
||||
index acfaa12ec239..284e7982925d 100644
|
||||
--- a/arch/arm/boot/dts/rk3288-tinker.dtsi
|
||||
+++ b/arch/arm/boot/dts/rk3288-tinker.dtsi
|
||||
@@ -492,6 +492,8 @@ &tsadc {
|
||||
};
|
||||
|
||||
&uart0 {
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&uart0_xfer>, <&uart0_cts>, <&uart0_rts>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
--
|
||||
2.28.0
|
||||
|
@@ -1,5 +1,5 @@
|
||||
From 3553f8a938dbb498aa1846a37ea343b7f53739da Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <3553f8a938dbb498aa1846a37ea343b7f53739da.1676488094.git.stefan@agner.ch>
|
||||
From 3f3c4cd047234fb94de4d6b701d05ff0450890cf Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <3f3c4cd047234fb94de4d6b701d05ff0450890cf.1613588152.git.stefan@agner.ch>
|
||||
From: Stefan Agner <stefan@agner.ch>
|
||||
Date: Wed, 17 Feb 2021 19:55:41 +0100
|
||||
Subject: [PATCH] Revert "ARM: dts: rockchip: use DMA channels for UARTs for
|
||||
@@ -11,10 +11,10 @@ This reverts commit 3425fe335c29310f6628faf9a7947d07f32d8962.
|
||||
1 file changed, 8 deletions(-)
|
||||
|
||||
diff --git a/arch/arm/boot/dts/rk3288.dtsi b/arch/arm/boot/dts/rk3288.dtsi
|
||||
index 487b0e03d4b4..1569b1824c89 100644
|
||||
index 8fa80facc8cd..8636d95c45e1 100644
|
||||
--- a/arch/arm/boot/dts/rk3288.dtsi
|
||||
+++ b/arch/arm/boot/dts/rk3288.dtsi
|
||||
@@ -378,8 +378,6 @@ uart0: serial@ff180000 {
|
||||
@@ -422,8 +422,6 @@ uart0: serial@ff180000 {
|
||||
reg-io-width = <4>;
|
||||
clocks = <&cru SCLK_UART0>, <&cru PCLK_UART0>;
|
||||
clock-names = "baudclk", "apb_pclk";
|
||||
@@ -23,7 +23,7 @@ index 487b0e03d4b4..1569b1824c89 100644
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&uart0_xfer>;
|
||||
status = "disabled";
|
||||
@@ -393,8 +391,6 @@ uart1: serial@ff190000 {
|
||||
@@ -437,8 +435,6 @@ uart1: serial@ff190000 {
|
||||
reg-io-width = <4>;
|
||||
clocks = <&cru SCLK_UART1>, <&cru PCLK_UART1>;
|
||||
clock-names = "baudclk", "apb_pclk";
|
||||
@@ -32,7 +32,7 @@ index 487b0e03d4b4..1569b1824c89 100644
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&uart1_xfer>;
|
||||
status = "disabled";
|
||||
@@ -421,8 +417,6 @@ uart3: serial@ff1b0000 {
|
||||
@@ -465,8 +461,6 @@ uart3: serial@ff1b0000 {
|
||||
reg-io-width = <4>;
|
||||
clocks = <&cru SCLK_UART3>, <&cru PCLK_UART3>;
|
||||
clock-names = "baudclk", "apb_pclk";
|
||||
@@ -41,7 +41,7 @@ index 487b0e03d4b4..1569b1824c89 100644
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&uart3_xfer>;
|
||||
status = "disabled";
|
||||
@@ -436,8 +430,6 @@ uart4: serial@ff1c0000 {
|
||||
@@ -480,8 +474,6 @@ uart4: serial@ff1c0000 {
|
||||
reg-io-width = <4>;
|
||||
clocks = <&cru SCLK_UART4>, <&cru PCLK_UART4>;
|
||||
clock-names = "baudclk", "apb_pclk";
|
||||
@@ -51,5 +51,5 @@ index 487b0e03d4b4..1569b1824c89 100644
|
||||
pinctrl-0 = <&uart4_xfer>;
|
||||
status = "disabled";
|
||||
--
|
||||
2.39.1
|
||||
2.30.1
|
||||
|
||||
|
@@ -1,10 +1,10 @@
|
||||
From 695638c05c0bb6f7bcc65e172dd132b3aa280b47 Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <695638c05c0bb6f7bcc65e172dd132b3aa280b47.1676488094.git.stefan@agner.ch>
|
||||
In-Reply-To: <3553f8a938dbb498aa1846a37ea343b7f53739da.1676488094.git.stefan@agner.ch>
|
||||
References: <3553f8a938dbb498aa1846a37ea343b7f53739da.1676488094.git.stefan@agner.ch>
|
||||
From fc25c993bf2feb6e66d55bf03eb725ec688e47eb Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <fc25c993bf2feb6e66d55bf03eb725ec688e47eb.1599250914.git.stefan@agner.ch>
|
||||
In-Reply-To: <2ae3821fd824560ef2db3c87cfbec985177911f6.1599250914.git.stefan@agner.ch>
|
||||
References: <2ae3821fd824560ef2db3c87cfbec985177911f6.1599250914.git.stefan@agner.ch>
|
||||
From: "Miouyouyou (Myy)" <myy@miouyouyou.fr>
|
||||
Date: Mon, 5 Nov 2018 22:15:14 +0100
|
||||
Subject: [PATCH] ARM: DTS: rk3288-tinker: Defining the SPI interface
|
||||
Subject: [PATCH 2/3] ARM: DTS: rk3288-tinker: Defining the SPI interface
|
||||
|
||||
Taken from, and tested by @TonyMac32 .
|
||||
|
||||
@@ -21,10 +21,10 @@ Signed-off-by: Stefan Agner <stefan@agner.ch>
|
||||
1 file changed, 19 insertions(+)
|
||||
|
||||
diff --git a/arch/arm/boot/dts/rk3288-tinker.dtsi b/arch/arm/boot/dts/rk3288-tinker.dtsi
|
||||
index 09618bb7d872..30430d2e64b9 100644
|
||||
index 284e7982925d..d6cc66ab5bb1 100644
|
||||
--- a/arch/arm/boot/dts/rk3288-tinker.dtsi
|
||||
+++ b/arch/arm/boot/dts/rk3288-tinker.dtsi
|
||||
@@ -483,6 +483,25 @@ &sdio0 {
|
||||
@@ -485,6 +485,25 @@ &sdio0 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
@@ -51,5 +51,5 @@ index 09618bb7d872..30430d2e64b9 100644
|
||||
rockchip,hw-tshut-mode = <1>; /* tshut mode 0:CRU 1:GPIO */
|
||||
rockchip,hw-tshut-polarity = <1>; /* tshut polarity 0:LOW 1:HIGH */
|
||||
--
|
||||
2.39.1
|
||||
2.28.0
|
||||
|
||||
|
@@ -1,10 +1,10 @@
|
||||
From d04122215cb56b57458e05b475e41744b8126533 Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <d04122215cb56b57458e05b475e41744b8126533.1676488094.git.stefan@agner.ch>
|
||||
In-Reply-To: <3553f8a938dbb498aa1846a37ea343b7f53739da.1676488094.git.stefan@agner.ch>
|
||||
References: <3553f8a938dbb498aa1846a37ea343b7f53739da.1676488094.git.stefan@agner.ch>
|
||||
From 3a9d71847ae869ffdb2b0818aa86a36d57d96331 Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <3a9d71847ae869ffdb2b0818aa86a36d57d96331.1599250914.git.stefan@agner.ch>
|
||||
In-Reply-To: <2ae3821fd824560ef2db3c87cfbec985177911f6.1599250914.git.stefan@agner.ch>
|
||||
References: <2ae3821fd824560ef2db3c87cfbec985177911f6.1599250914.git.stefan@agner.ch>
|
||||
From: Stefan Agner <stefan@agner.ch>
|
||||
Date: Fri, 4 Sep 2020 21:57:55 +0200
|
||||
Subject: [PATCH] ARM: dts: rockchip: enable I2C1/4 on rk3288-tinker
|
||||
Subject: [PATCH 3/3] ARM: dts: rockchip: enable I2C1/4 on rk3288-tinker
|
||||
|
||||
Enable I2C devices which are accessible via 40-pin header.
|
||||
|
||||
@@ -14,10 +14,10 @@ Signed-off-by: Stefan Agner <stefan@agner.ch>
|
||||
1 file changed, 8 insertions(+)
|
||||
|
||||
diff --git a/arch/arm/boot/dts/rk3288-tinker.dtsi b/arch/arm/boot/dts/rk3288-tinker.dtsi
|
||||
index 30430d2e64b9..395afc2b2283 100644
|
||||
index d6cc66ab5bb1..7af5818ac77c 100644
|
||||
--- a/arch/arm/boot/dts/rk3288-tinker.dtsi
|
||||
+++ b/arch/arm/boot/dts/rk3288-tinker.dtsi
|
||||
@@ -342,10 +342,18 @@ regulator-state-mem {
|
||||
@@ -344,10 +344,18 @@ regulator-state-mem {
|
||||
};
|
||||
};
|
||||
|
||||
@@ -37,5 +37,5 @@ index 30430d2e64b9..395afc2b2283 100644
|
||||
status = "okay";
|
||||
};
|
||||
--
|
||||
2.39.1
|
||||
2.28.0
|
||||
|
||||
|
@@ -1,63 +0,0 @@
|
||||
From 479e2acb95c09b15382b3766391294790ebd200b Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <479e2acb95c09b15382b3766391294790ebd200b.1676488094.git.stefan@agner.ch>
|
||||
In-Reply-To: <3553f8a938dbb498aa1846a37ea343b7f53739da.1676488094.git.stefan@agner.ch>
|
||||
References: <3553f8a938dbb498aa1846a37ea343b7f53739da.1676488094.git.stefan@agner.ch>
|
||||
From: Stefan Agner <stefan@agner.ch>
|
||||
Date: Tue, 10 May 2022 22:57:26 +0200
|
||||
Subject: [PATCH] ARM: dts: rockchip: Add Bluetooth to rk3288-tinker
|
||||
|
||||
Enable Bluetooth support via UART0. Use the existing bindings
|
||||
for Realtek rtl8723bs Bluetooth device.
|
||||
|
||||
Signed-off-by: Stefan Agner <stefan@agner.ch>
|
||||
---
|
||||
arch/arm/boot/dts/rk3288-tinker.dtsi | 26 ++++++++++++++++++++++++++
|
||||
1 file changed, 26 insertions(+)
|
||||
|
||||
diff --git a/arch/arm/boot/dts/rk3288-tinker.dtsi b/arch/arm/boot/dts/rk3288-tinker.dtsi
|
||||
index c7e79e594720..5d261fae6e72 100644
|
||||
--- a/arch/arm/boot/dts/rk3288-tinker.dtsi
|
||||
+++ b/arch/arm/boot/dts/rk3288-tinker.dtsi
|
||||
@@ -386,6 +386,20 @@ bl_en: bl-en {
|
||||
};
|
||||
};
|
||||
|
||||
+ bluetooth {
|
||||
+ bt_enable_pin: bt-enable-pin {
|
||||
+ rockchip,pins = <4 RK_PD5 RK_FUNC_GPIO &pcfg_pull_none>;
|
||||
+ };
|
||||
+
|
||||
+ bt_device_wake_pin: bt-device-wake-pin {
|
||||
+ rockchip,pins = <4 RK_PD2 RK_FUNC_GPIO &pcfg_pull_none>;
|
||||
+ };
|
||||
+
|
||||
+ bt_host_wake_pin: bt-host-wake-pin {
|
||||
+ rockchip,pins = <4 RK_PD7 RK_FUNC_GPIO &pcfg_pull_none>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
buttons {
|
||||
pwrbtn: pwrbtn {
|
||||
rockchip,pins = <0 RK_PA5 RK_FUNC_GPIO &pcfg_pull_up>;
|
||||
@@ -518,6 +532,18 @@ &tsadc {
|
||||
|
||||
&uart0 {
|
||||
status = "okay";
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&uart0_xfer &uart0_cts &uart0_rts>;
|
||||
+ uart-has-rtscts;
|
||||
+
|
||||
+ bluetooth {
|
||||
+ compatible = "realtek,rtl8723bs-bt";
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&bt_device_wake_pin &bt_host_wake_pin &bt_enable_pin>;
|
||||
+ enable-gpios = <&gpio4 RK_PD5 GPIO_ACTIVE_HIGH>;
|
||||
+ device-wake-gpios = <&gpio4 RK_PD2 GPIO_ACTIVE_HIGH>;
|
||||
+ host-wake-gpios = <&gpio4 RK_PD7 GPIO_ACTIVE_HIGH>;
|
||||
+ };
|
||||
};
|
||||
|
||||
&uart1 {
|
||||
--
|
||||
2.39.1
|
||||
|
@@ -1,10 +1,7 @@
|
||||
From 7d37754f29c379c5066c6abf38c8d01d654b1613 Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <7d37754f29c379c5066c6abf38c8d01d654b1613.1676488094.git.stefan@agner.ch>
|
||||
In-Reply-To: <3553f8a938dbb498aa1846a37ea343b7f53739da.1676488094.git.stefan@agner.ch>
|
||||
References: <3553f8a938dbb498aa1846a37ea343b7f53739da.1676488094.git.stefan@agner.ch>
|
||||
From 062488e4b8fd552c01e1104b3bc91a6f7ffe6c41 Mon Sep 17 00:00:00 2001
|
||||
From: Myy Miouyouyou <myy@miouyouyou.fr>
|
||||
Date: Thu, 19 Oct 2017 21:24:47 +0200
|
||||
Subject: [PATCH] RK3288: DTSI: rk3288.dtsi: Add missing SPI2 pinctrl
|
||||
Subject: [PATCH 10/28] RK3288: DTSI: rk3288.dtsi: Add missing SPI2 pinctrl
|
||||
|
||||
The spi2_cs1 pin reference is missing in the spi2 first pin control
|
||||
definition.
|
||||
@@ -17,10 +14,10 @@ Signed-off-by: Myy Miouyouyou <myy@miouyouyou.fr>
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/arch/arm/boot/dts/rk3288.dtsi b/arch/arm/boot/dts/rk3288.dtsi
|
||||
index 1569b1824c89..478fd1bb85df 100644
|
||||
index 5b789528..9ed532cc 100644
|
||||
--- a/arch/arm/boot/dts/rk3288.dtsi
|
||||
+++ b/arch/arm/boot/dts/rk3288.dtsi
|
||||
@@ -311,7 +311,7 @@ spi2: spi@ff130000 {
|
||||
@@ -334,7 +334,7 @@
|
||||
dma-names = "tx", "rx";
|
||||
interrupts = <GIC_SPI 46 IRQ_TYPE_LEVEL_HIGH>;
|
||||
pinctrl-names = "default";
|
||||
@@ -30,5 +27,5 @@ index 1569b1824c89..478fd1bb85df 100644
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
--
|
||||
2.39.1
|
||||
2.11.0
|
||||
|
@@ -0,0 +1,98 @@
|
||||
From d5d5c53173c484a13cda62a537cbf75a5df4b0e4 Mon Sep 17 00:00:00 2001
|
||||
From: "Miouyouyou (Myy)" <myy@miouyouyou.fr>
|
||||
Date: Mon, 5 Nov 2018 21:58:56 +0100
|
||||
Subject: [PATCH] ARM: DTS: rk3288-tinker: Enabling SDIO and Wifi
|
||||
|
||||
Adding the appropriate nodes in order to exploit the WiFi capabilities
|
||||
of the board.
|
||||
Since these capabilities are provided through SDIO, and the SDIO
|
||||
nodes were not defined, these were added too.
|
||||
|
||||
These seems to depend on each other so they are added in one big
|
||||
patch.
|
||||
|
||||
Split if necessary.
|
||||
|
||||
Signed-off-by: Miouyouyou (Myy) <myy@miouyouyou.fr>
|
||||
---
|
||||
arch/arm/boot/dts/rk3288-tinker.dts | 62 +++++++++++++++++++++++++++++++++++++
|
||||
1 file changed, 62 insertions(+)
|
||||
|
||||
diff --git a/arch/arm/boot/dts/rk3288-tinker.dts b/arch/arm/boot/dts/rk3288-tinker.dts
|
||||
index 1e43527aa..d4df13bed 100644
|
||||
--- a/arch/arm/boot/dts/rk3288-tinker.dts
|
||||
+++ b/arch/arm/boot/dts/rk3288-tinker.dts
|
||||
@@ -6,8 +6,70 @@
|
||||
/dts-v1/;
|
||||
|
||||
#include "rk3288-tinker.dtsi"
|
||||
+#include <dt-bindings/clock/rockchip,rk808.h>
|
||||
|
||||
/ {
|
||||
model = "Rockchip RK3288 Asus Tinker Board";
|
||||
compatible = "asus,rk3288-tinker", "rockchip,rk3288";
|
||||
+
|
||||
+ /* This is essential to get SDIO devices working.
|
||||
+ The Wifi depends on SDIO ! */
|
||||
+ sdio_pwrseq: sdio-pwrseq {
|
||||
+ compatible = "mmc-pwrseq-simple";
|
||||
+ clocks = <&rk808 RK808_CLKOUT1>;
|
||||
+ clock-names = "ext_clock";
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&chip_enable_h>, <&wifi_enable_h>;
|
||||
+
|
||||
+ /*
|
||||
+ * On the module itself this is one of these (depending
|
||||
+ * on the actual card populated):
|
||||
+ * - SDIO_RESET_L_WL_REG_ON
|
||||
+ * - PDN (power down when low)
|
||||
+ */
|
||||
+ reset-gpios = <&gpio4 28 GPIO_ACTIVE_LOW>, <&gpio4 27 GPIO_ACTIVE_LOW>;
|
||||
+ };
|
||||
+
|
||||
+ wireless-wlan {
|
||||
+ compatible = "wlan-platdata";
|
||||
+ rockchip,grf = <&grf>;
|
||||
+ sdio_vref = <1800>;
|
||||
+ status = "okay";
|
||||
+ wifi_chip_type = "8723bs";
|
||||
+ WIFI,host_wake_irq = <&gpio4 30 GPIO_ACTIVE_HIGH>;
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&io_domains {
|
||||
+ wifi-supply = <&vcc_18>;
|
||||
+};
|
||||
+
|
||||
+&pinctrl {
|
||||
+ sdio-pwrseq {
|
||||
+ wifi_enable_h: wifienable-h {
|
||||
+ rockchip,pins = <4 28 RK_FUNC_GPIO &pcfg_pull_none>;
|
||||
+ };
|
||||
+
|
||||
+ chip_enable_h: chip-enable-h {
|
||||
+ rockchip,pins = <4 27 RK_FUNC_GPIO &pcfg_pull_none>;
|
||||
+ };
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&sdio0 {
|
||||
+ bus-width = <4>;
|
||||
+ cap-sd-highspeed;
|
||||
+ cap-sdio-irq;
|
||||
+ clock-frequency = <50000000>;
|
||||
+ clock-freq-min-max = <200000 50000000>;
|
||||
+ disable-wp;
|
||||
+ keep-power-in-suspend;
|
||||
+ mmc-pwrseq = <&sdio_pwrseq>;
|
||||
+ non-removable;
|
||||
+ num-slots = <1>;
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&sdio0_bus4 &sdio0_cmd &sdio0_clk>;
|
||||
+ sd-uhs-sdr104;
|
||||
+ status = "okay";
|
||||
+ supports-sdio;
|
||||
};
|
||||
--
|
||||
2.16.4
|
||||
|
@@ -1,7 +1,4 @@
|
||||
From 05fde1d1dbbe7805a58a8c445b8fb19e0df59826 Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <05fde1d1dbbe7805a58a8c445b8fb19e0df59826.1676488094.git.stefan@agner.ch>
|
||||
In-Reply-To: <3553f8a938dbb498aa1846a37ea343b7f53739da.1676488094.git.stefan@agner.ch>
|
||||
References: <3553f8a938dbb498aa1846a37ea343b7f53739da.1676488094.git.stefan@agner.ch>
|
||||
From ebc29962ac27264772a4227f5abd6900cb72fa79 Mon Sep 17 00:00:00 2001
|
||||
From: "Miouyouyou (Myy)" <myy@miouyouyou.fr>
|
||||
Date: Mon, 5 Nov 2018 20:16:05 +0100
|
||||
Subject: [PATCH] ARM: DTSI: rk3288-tinker: Improving the CPU max voltage
|
||||
@@ -14,10 +11,10 @@ Signed-off-by: Miouyouyou (Myy) <myy@miouyouyou.fr>
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/arch/arm/boot/dts/rk3288-tinker.dtsi b/arch/arm/boot/dts/rk3288-tinker.dtsi
|
||||
index 395afc2b2283..c7e79e594720 100644
|
||||
index aa107ee41..3da1c830f 100644
|
||||
--- a/arch/arm/boot/dts/rk3288-tinker.dtsi
|
||||
+++ b/arch/arm/boot/dts/rk3288-tinker.dtsi
|
||||
@@ -184,7 +184,7 @@ vdd_cpu: DCDC_REG1 {
|
||||
@@ -164,7 +164,7 @@
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
regulator-min-microvolt = <750000>;
|
||||
@@ -27,5 +24,5 @@ index 395afc2b2283..c7e79e594720 100644
|
||||
regulator-ramp-delay = <6000>;
|
||||
regulator-state-mem {
|
||||
--
|
||||
2.39.1
|
||||
2.16.4
|
||||
|
@@ -1,7 +1,4 @@
|
||||
From 940d61e1e04929166d5a2bcbc1934aa931952ca5 Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <940d61e1e04929166d5a2bcbc1934aa931952ca5.1676488094.git.stefan@agner.ch>
|
||||
In-Reply-To: <3553f8a938dbb498aa1846a37ea343b7f53739da.1676488094.git.stefan@agner.ch>
|
||||
References: <3553f8a938dbb498aa1846a37ea343b7f53739da.1676488094.git.stefan@agner.ch>
|
||||
From 302cd9b8a9f1f8a7735fabea3b9a7645dc40f9cc Mon Sep 17 00:00:00 2001
|
||||
From: Myy Miouyouyou <myy@miouyouyou.fr>
|
||||
Date: Sun, 7 Jan 2018 01:52:44 +0100
|
||||
Subject: [PATCH] drivers: mmc: dw-mci-rockchip: Handle ASUS Tinkerboard reboot
|
||||
@@ -20,14 +17,14 @@ similar effects with eMMC hardware.
|
||||
|
||||
Signed-off-by: Myy Miouyouyou <myy@miouyouyou.fr>
|
||||
---
|
||||
drivers/mmc/host/dw_mmc-rockchip.c | 66 ++++++++++++++++++++++++++++++
|
||||
drivers/mmc/host/dw_mmc-rockchip.c | 66 ++++++++++++++++++++++++++++++++++++++
|
||||
1 file changed, 66 insertions(+)
|
||||
|
||||
diff --git a/drivers/mmc/host/dw_mmc-rockchip.c b/drivers/mmc/host/dw_mmc-rockchip.c
|
||||
index 2a99f15f527f..181718374429 100644
|
||||
index a3f1c2b30..7eac1f221 100644
|
||||
--- a/drivers/mmc/host/dw_mmc-rockchip.c
|
||||
+++ b/drivers/mmc/host/dw_mmc-rockchip.c
|
||||
@@ -12,6 +12,11 @@
|
||||
@@ -16,6 +16,11 @@
|
||||
#include <linux/pm_runtime.h>
|
||||
#include <linux/slab.h>
|
||||
|
||||
@@ -39,7 +36,7 @@ index 2a99f15f527f..181718374429 100644
|
||||
#include "dw_mmc.h"
|
||||
#include "dw_mmc-pltfm.h"
|
||||
|
||||
@@ -340,6 +345,66 @@ static const struct of_device_id dw_mci_rockchip_match[] = {
|
||||
@@ -334,6 +339,66 @@ static const struct of_device_id dw_mci_rockchip_match[] = {
|
||||
};
|
||||
MODULE_DEVICE_TABLE(of, dw_mci_rockchip_match);
|
||||
|
||||
@@ -106,7 +103,7 @@ index 2a99f15f527f..181718374429 100644
|
||||
static int dw_mci_rockchip_probe(struct platform_device *pdev)
|
||||
{
|
||||
const struct dw_mci_drv_data *drv_data;
|
||||
@@ -367,6 +432,7 @@ static int dw_mci_rockchip_probe(struct platform_device *pdev)
|
||||
@@ -361,6 +426,7 @@ static int dw_mci_rockchip_probe(struct platform_device *pdev)
|
||||
}
|
||||
|
||||
pm_runtime_put_autosuspend(&pdev->dev);
|
||||
@@ -115,5 +112,5 @@ index 2a99f15f527f..181718374429 100644
|
||||
return 0;
|
||||
}
|
||||
--
|
||||
2.39.1
|
||||
2.14.1
|
||||
|
@@ -1,5 +1,5 @@
|
||||
From 966cd1782632bc8279667955ec315e93c89495e6 Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <966cd1782632bc8279667955ec315e93c89495e6.1645627366.git.stefan@agner.ch>
|
||||
From e18419a214ba872d14462354886148f976312e3c Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <e18419a214ba872d14462354886148f976312e3c.1632758899.git.stefan@agner.ch>
|
||||
From: Pascal Vizeli <pvizeli@syshack.ch>
|
||||
Date: Fri, 24 Apr 2020 12:41:50 +0000
|
||||
Subject: [PATCH 1/2] SPL: modify load address of U-Boot
|
||||
@@ -15,23 +15,23 @@ Signed-off-by: Stefan Agner <stefan@agner.ch>
|
||||
2 files changed, 2 insertions(+)
|
||||
|
||||
diff --git a/configs/tinker-rk3288_defconfig b/configs/tinker-rk3288_defconfig
|
||||
index a9c9a122f6..b839fdb570 100644
|
||||
index 3ac314ab89..67ca98c383 100644
|
||||
--- a/configs/tinker-rk3288_defconfig
|
||||
+++ b/configs/tinker-rk3288_defconfig
|
||||
@@ -92,3 +92,4 @@ CONFIG_VIDEO_ROCKCHIP=y
|
||||
@@ -88,3 +88,4 @@ CONFIG_VIDEO_ROCKCHIP=y
|
||||
CONFIG_DISPLAY_ROCKCHIP_HDMI=y
|
||||
CONFIG_CMD_DHRYSTONE=y
|
||||
CONFIG_ERRNO_STR=y
|
||||
+CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR=0x2000
|
||||
diff --git a/configs/tinker-s-rk3288_defconfig b/configs/tinker-s-rk3288_defconfig
|
||||
index f367c9370f..c52b0753ec 100644
|
||||
index 35e84b7088..93cfe4f094 100644
|
||||
--- a/configs/tinker-s-rk3288_defconfig
|
||||
+++ b/configs/tinker-s-rk3288_defconfig
|
||||
@@ -94,3 +94,4 @@ CONFIG_DISPLAY_ROCKCHIP_HDMI=y
|
||||
@@ -90,3 +90,4 @@ CONFIG_DISPLAY_ROCKCHIP_HDMI=y
|
||||
CONFIG_CONSOLE_SCROLL_LINES=10
|
||||
CONFIG_CMD_DHRYSTONE=y
|
||||
CONFIG_ERRNO_STR=y
|
||||
+CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR=0x2000
|
||||
--
|
||||
2.35.1
|
||||
2.33.0
|
||||
|
||||
|
@@ -1,7 +1,7 @@
|
||||
From 98674c65a6595e7ac554f7ec9d6f0228556756f6 Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <98674c65a6595e7ac554f7ec9d6f0228556756f6.1645627366.git.stefan@agner.ch>
|
||||
In-Reply-To: <966cd1782632bc8279667955ec315e93c89495e6.1645627366.git.stefan@agner.ch>
|
||||
References: <966cd1782632bc8279667955ec315e93c89495e6.1645627366.git.stefan@agner.ch>
|
||||
From 4c09e7741c219ef28be912e97a986b6402290c9b Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <4c09e7741c219ef28be912e97a986b6402290c9b.1632758899.git.stefan@agner.ch>
|
||||
In-Reply-To: <e18419a214ba872d14462354886148f976312e3c.1632758899.git.stefan@agner.ch>
|
||||
References: <e18419a214ba872d14462354886148f976312e3c.1632758899.git.stefan@agner.ch>
|
||||
From: Pascal Vizeli <pvizeli@syshack.ch>
|
||||
Date: Fri, 24 Apr 2020 11:37:55 +0000
|
||||
Subject: [PATCH 2/2] pmic: enable LDO2 vcc33_mipi at bootup
|
||||
@@ -64,5 +64,5 @@ index f85209c649..6fa1bb0c66 100644
|
||||
+}
|
||||
+#endif
|
||||
--
|
||||
2.35.1
|
||||
2.33.0
|
||||
|
||||
|
@@ -16,11 +16,8 @@ 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 systemd.machine_id=${MACHINE_ID} fsck.repair=yes ${BOOT_CONDITION}"
|
||||
setenv bootargs_hassos "zram.enabled=1 zram.num_devices=3 apparmor=1 security=apparmor systemd.machine_id=${MACHINE_ID} cgroup_enable=memory fsck.repair=yes"
|
||||
|
||||
# HassOS system A/B
|
||||
setenv bootargs_a "root=PARTUUID=8d3d53e3-6d49-4c38-8349-aff6859e82fd rootfstype=squashfs ro rootwait"
|
||||
|
@@ -145,6 +145,7 @@ CONFIG_CGROUP_WRITEBACK=y
|
||||
CONFIG_CGROUP_SCHED=y
|
||||
CONFIG_FAIR_GROUP_SCHED=y
|
||||
CONFIG_CFS_BANDWIDTH=y
|
||||
CONFIG_RT_GROUP_SCHED=y
|
||||
CONFIG_CGROUP_PIDS=y
|
||||
# CONFIG_CGROUP_RDMA is not set
|
||||
CONFIG_CGROUP_FREEZER=y
|
||||
@@ -1616,6 +1617,8 @@ CONFIG_PREVENT_FIRMWARE_BUILD=y
|
||||
CONFIG_FW_LOADER=y
|
||||
CONFIG_FW_LOADER_PAGED_BUF=y
|
||||
CONFIG_EXTRA_FIRMWARE=""
|
||||
CONFIG_FW_LOADER_USER_HELPER=y
|
||||
CONFIG_FW_LOADER_USER_HELPER_FALLBACK=y
|
||||
# CONFIG_FW_LOADER_COMPRESS is not set
|
||||
CONFIG_FW_CACHE=y
|
||||
# end of Firmware loader
|
||||
|
File diff suppressed because it is too large
Load Diff
@@ -1,12 +1,10 @@
|
||||
BOARD_ID=odroid-c2
|
||||
BOARD_NAME="Hardkernel ODROID-C2"
|
||||
BOARD_NAME="Hardkernel Odroid-C2"
|
||||
CHASSIS=embedded
|
||||
BOOTLOADER=uboot
|
||||
KERNEL_FILE=Image
|
||||
BOOT_SYS=mbr
|
||||
BOOT_SIZE=24M
|
||||
BOOT_SPL=true
|
||||
BOOT_SPL_SIZE=8M
|
||||
BOOT_ENV_SIZE=0x2000
|
||||
SUPERVISOR_MACHINE=odroid-c2
|
||||
SUPERVISOR_ARCH=aarch64
|
||||
|
@@ -18,11 +18,8 @@ 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 systemd.machine_id=${MACHINE_ID} fsck.repair=yes ${BOOT_CONDITION}"
|
||||
setenv bootargs_hassos "zram.enabled=1 zram.num_devices=3 apparmor=1 security=apparmor systemd.machine_id=${MACHINE_ID} cgroup_enable=memory fsck.repair=yes"
|
||||
|
||||
# HassOS system A/B
|
||||
setenv bootargs_a "root=PARTUUID=48617373-06 rootfstype=squashfs ro rootwait"
|
||||
|
@@ -1,12 +1,10 @@
|
||||
BOARD_ID=odroid-c4
|
||||
BOARD_NAME="Hardkernel ODROID-C4"
|
||||
BOARD_NAME="Hardkernel Odroid-C4"
|
||||
CHASSIS=embedded
|
||||
BOOTLOADER=uboot
|
||||
KERNEL_FILE=Image
|
||||
BOOT_SYS=mbr
|
||||
BOOT_SIZE=24M
|
||||
BOOT_SPL=true
|
||||
BOOT_SPL_SIZE=8M
|
||||
BOOT_ENV_SIZE=0x2000
|
||||
SUPERVISOR_MACHINE=odroid-c4
|
||||
SUPERVISOR_ARCH=aarch64
|
||||
|
@@ -18,11 +18,8 @@ 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 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 apparmor=1 security=apparmor systemd.machine_id=${MACHINE_ID} cgroup_enable=memory clk_ignore_unused usb-storage.quirks=0x2537:0x1066:u,0x2537:0x1068:u"
|
||||
|
||||
# HassOS system A/B
|
||||
setenv bootargs_a "root=PARTUUID=48617373-06 rootfstype=squashfs ro rootwait"
|
||||
|
@@ -1,25 +0,0 @@
|
||||
#!/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
|
||||
}
|
||||
|
@@ -1,11 +0,0 @@
|
||||
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_DW_WATCHDOG is not set
|
@@ -1,12 +0,0 @@
|
||||
BOARD_ID=odroid-m1
|
||||
BOARD_NAME="Hardkernel ODROID-M1"
|
||||
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=odroid-m1
|
||||
SUPERVISOR_ARCH=aarch64
|
@@ -1,455 +0,0 @@
|
||||
From d388735d551e09b00317a509859fca51776b9826 Mon Sep 17 00:00:00 2001
|
||||
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
|
||||
|
||||
This patch is to add a device tree for new board Hardkernel ODROID-M1
|
||||
based on Rockchip RK3568, includes basic peripherals -
|
||||
uart/eMMC/uSD/i2c and on-board ethernet.
|
||||
|
||||
Signed-off-by: Dongjin Kim <tobetter@gmail.com>
|
||||
[aurelien@aurel32.net: addressed issues from initial review]
|
||||
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
|
||||
Tested-by: Dan Johansen <strit@manjaro.org>
|
||||
Link: https://lore.kernel.org/r/20220930051246.391614-3-aurelien@aurel32.net
|
||||
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
|
||||
---
|
||||
arch/arm64/boot/dts/rockchip/Makefile | 1 +
|
||||
.../boot/dts/rockchip/rk3568-odroid-m1.dts | 414 ++++++++++++++++++
|
||||
2 files changed, 415 insertions(+)
|
||||
create mode 100644 arch/arm64/boot/dts/rockchip/rk3568-odroid-m1.dts
|
||||
|
||||
diff --git a/arch/arm64/boot/dts/rockchip/Makefile b/arch/arm64/boot/dts/rockchip/Makefile
|
||||
index 8c15593c0ca4..5dc1607b3ecf 100644
|
||||
--- a/arch/arm64/boot/dts/rockchip/Makefile
|
||||
+++ b/arch/arm64/boot/dts/rockchip/Makefile
|
||||
@@ -71,4 +71,5 @@ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3566-roc-pc.dtb
|
||||
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-odroid-m1.dtb
|
||||
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-rock-3a.dtb
|
||||
diff --git a/arch/arm64/boot/dts/rockchip/rk3568-odroid-m1.dts b/arch/arm64/boot/dts/rockchip/rk3568-odroid-m1.dts
|
||||
new file mode 100644
|
||||
index 000000000000..b3016437640b
|
||||
--- /dev/null
|
||||
+++ b/arch/arm64/boot/dts/rockchip/rk3568-odroid-m1.dts
|
||||
@@ -0,0 +1,414 @@
|
||||
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
|
||||
+/*
|
||||
+ * Copyright (c) 2022 Hardkernel Co., Ltd.
|
||||
+ *
|
||||
+ */
|
||||
+
|
||||
+/dts-v1/;
|
||||
+#include <dt-bindings/gpio/gpio.h>
|
||||
+#include <dt-bindings/leds/common.h>
|
||||
+#include <dt-bindings/pinctrl/rockchip.h>
|
||||
+#include "rk3568.dtsi"
|
||||
+
|
||||
+/ {
|
||||
+ model = "Hardkernel ODROID-M1";
|
||||
+ compatible = "rockchip,rk3568-odroid-m1", "rockchip,rk3568";
|
||||
+
|
||||
+ aliases {
|
||||
+ ethernet0 = &gmac0;
|
||||
+ i2c0 = &i2c3;
|
||||
+ i2c3 = &i2c0;
|
||||
+ mmc0 = &sdhci;
|
||||
+ mmc1 = &sdmmc0;
|
||||
+ serial0 = &uart1;
|
||||
+ serial1 = &uart0;
|
||||
+ };
|
||||
+
|
||||
+ 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>;
|
||||
+ };
|
||||
+
|
||||
+ leds {
|
||||
+ compatible = "gpio-leds";
|
||||
+
|
||||
+ led_power: led-0 {
|
||||
+ gpios = <&gpio0 RK_PC6 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_work: led-1 {
|
||||
+ gpios = <&gpio0 RK_PB7 GPIO_ACTIVE_HIGH>;
|
||||
+ function = LED_FUNCTION_HEARTBEAT;
|
||||
+ color = <LED_COLOR_ID_BLUE>;
|
||||
+ linux,default-trigger = "heartbeat";
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&led_work_pin>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ 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>;
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&cpu0 {
|
||||
+ cpu-supply = <&vdd_cpu>;
|
||||
+};
|
||||
+
|
||||
+&cpu1 {
|
||||
+ cpu-supply = <&vdd_cpu>;
|
||||
+};
|
||||
+
|
||||
+&cpu2 {
|
||||
+ cpu-supply = <&vdd_cpu>;
|
||||
+};
|
||||
+
|
||||
+&cpu3 {
|
||||
+ cpu-supply = <&vdd_cpu>;
|
||||
+};
|
||||
+
|
||||
+&gmac0 {
|
||||
+ assigned-clocks = <&cru SCLK_GMAC0_RX_TX>, <&cru SCLK_GMAC0>;
|
||||
+ assigned-clock-parents = <&cru SCLK_GMAC0_RGMII_SPEED>;
|
||||
+ assigned-clock-rates = <0>, <125000000>;
|
||||
+ clock_in_out = "output";
|
||||
+ phy-handle = <&rgmii_phy0>;
|
||||
+ phy-mode = "rgmii";
|
||||
+ phy-supply = <&vcc3v3_sys>;
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&gmac0_miim
|
||||
+ &gmac0_tx_bus2
|
||||
+ &gmac0_rx_bus2
|
||||
+ &gmac0_rgmii_clk
|
||||
+ &gmac0_rgmii_bus>;
|
||||
+ status = "okay";
|
||||
+
|
||||
+ tx_delay = <0x4f>;
|
||||
+ rx_delay = <0x2d>;
|
||||
+};
|
||||
+
|
||||
+&i2c0 {
|
||||
+ status = "okay";
|
||||
+
|
||||
+ vdd_cpu: regulator@1c {
|
||||
+ compatible = "tcs,tcs4525";
|
||||
+ reg = <0x1c>;
|
||||
+ fcs,suspend-voltage-selector = <1>;
|
||||
+ regulator-name = "vdd_cpu";
|
||||
+ regulator-always-on;
|
||||
+ regulator-boot-on;
|
||||
+ regulator-min-microvolt = <800000>;
|
||||
+ regulator-max-microvolt = <1150000>;
|
||||
+ regulator-ramp-delay = <2300>;
|
||||
+ vin-supply = <&vcc3v3_sys>;
|
||||
+
|
||||
+ 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>;
|
||||
+ #clock-cells = <1>;
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&pmic_int_l>;
|
||||
+ rockchip,system-power-controller;
|
||||
+ 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>;
|
||||
+ wakeup-source;
|
||||
+
|
||||
+ 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;
|
||||
+ };
|
||||
+ };
|
||||
+ };
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&mdio0 {
|
||||
+ rgmii_phy0: ethernet-phy@0 {
|
||||
+ compatible = "ethernet-phy-ieee802.3-c22";
|
||||
+ reg = <0x0>;
|
||||
+ reset-assert-us = <20000>;
|
||||
+ reset-deassert-us = <100000>;
|
||||
+ reset-gpios = <&gpio3 RK_PB7 GPIO_ACTIVE_LOW>;
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&pinctrl {
|
||||
+ leds {
|
||||
+ led_power_pin: led-power-pin {
|
||||
+ rockchip,pins = <0 RK_PC6 RK_FUNC_GPIO &pcfg_pull_none>;
|
||||
+ };
|
||||
+ led_work_pin: led-work-pin {
|
||||
+ rockchip,pins = <0 RK_PB7 RK_FUNC_GPIO &pcfg_pull_none>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ pmic {
|
||||
+ pmic_int_l: pmic-int-l {
|
||||
+ rockchip,pins = <0 RK_PA3 RK_FUNC_GPIO &pcfg_pull_up>;
|
||||
+ };
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&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>;
|
||||
+ vccio5-supply = <&vcc_3v3>;
|
||||
+ vccio6-supply = <&vcc_3v3>;
|
||||
+ 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-sdr50;
|
||||
+ vmmc-supply = <&vcc3v3_sd>;
|
||||
+ vqmmc-supply = <&vccio_sd>;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&uart2 {
|
||||
+ status = "okay";
|
||||
+};
|
||||
--
|
||||
2.41.0
|
||||
|
@@ -1,38 +0,0 @@
|
||||
From 24048c1753916bd983746542b16d19d2b399eeb7 Mon Sep 17 00:00:00 2001
|
||||
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
|
||||
|
||||
Add the thermal nodes for the ODROID-M1.
|
||||
|
||||
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
|
||||
Tested-by: Dan Johansen <strit@manjaro.org>
|
||||
Link: https://lore.kernel.org/r/20220930051246.391614-4-aurelien@aurel32.net
|
||||
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
|
||||
---
|
||||
arch/arm64/boot/dts/rockchip/rk3568-odroid-m1.dts | 6 ++++++
|
||||
1 file changed, 6 insertions(+)
|
||||
|
||||
diff --git a/arch/arm64/boot/dts/rockchip/rk3568-odroid-m1.dts b/arch/arm64/boot/dts/rockchip/rk3568-odroid-m1.dts
|
||||
index b3016437640b..112c65af3f55 100644
|
||||
--- a/arch/arm64/boot/dts/rockchip/rk3568-odroid-m1.dts
|
||||
+++ b/arch/arm64/boot/dts/rockchip/rk3568-odroid-m1.dts
|
||||
@@ -409,6 +409,12 @@ &sdmmc0 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
+&tsadc {
|
||||
+ rockchip,hw-tshut-mode = <1>;
|
||||
+ rockchip,hw-tshut-polarity = <0>;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
&uart2 {
|
||||
status = "okay";
|
||||
};
|
||||
--
|
||||
2.41.0
|
||||
|
@@ -1,103 +0,0 @@
|
||||
From 982bb2beab8e38a7c0a365770be2ad9c5221a650 Mon Sep 17 00:00:00 2001
|
||||
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
|
||||
|
||||
Enable the Rockchip Serial Flash Controller for the ODROID-M1 and add
|
||||
the corresponding SPI NOR flash entry. The SFC is used in dual I/O mode
|
||||
and not quad I/O mode, as the FSPI_D2 pin is shared with the EMMC_RSTn
|
||||
pin.
|
||||
|
||||
The partitions addresses and sizes are taken from the ODROID-M1
|
||||
Partition Table page on the ODROID wiki.
|
||||
|
||||
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
|
||||
Tested-by: Dan Johansen <strit@manjaro.org>
|
||||
Link: https://lore.kernel.org/r/20220930051246.391614-5-aurelien@aurel32.net
|
||||
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
|
||||
---
|
||||
.../boot/dts/rockchip/rk3568-odroid-m1.dts | 58 +++++++++++++++++++
|
||||
1 file changed, 58 insertions(+)
|
||||
|
||||
diff --git a/arch/arm64/boot/dts/rockchip/rk3568-odroid-m1.dts b/arch/arm64/boot/dts/rockchip/rk3568-odroid-m1.dts
|
||||
index 112c65af3f55..94e839c9afab 100644
|
||||
--- a/arch/arm64/boot/dts/rockchip/rk3568-odroid-m1.dts
|
||||
+++ b/arch/arm64/boot/dts/rockchip/rk3568-odroid-m1.dts
|
||||
@@ -351,6 +351,20 @@ rgmii_phy0: ethernet-phy@0 {
|
||||
};
|
||||
|
||||
&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>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
leds {
|
||||
led_power_pin: led-power-pin {
|
||||
rockchip,pins = <0 RK_PC6 RK_FUNC_GPIO &pcfg_pull_none>;
|
||||
@@ -409,6 +423,50 @@ &sdmmc0 {
|
||||
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 = <2>;
|
||||
+ 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>;
|
||||
--
|
||||
2.41.0
|
||||
|
@@ -1,102 +0,0 @@
|
||||
From ae25f92a09abb7dd16a9ad3b74e0c105b385f214 Mon Sep 17 00:00:00 2001
|
||||
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
|
||||
|
||||
On the ODROID-M1, the I2S1 TDM controller is connected to the rk809
|
||||
codec in I2S mode. It is used to provide a stereo headphones output and
|
||||
a mono speaker output. A GPIO with an external pullup is used as an
|
||||
headphone detection input.
|
||||
|
||||
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
|
||||
Tested-by: Dan Johansen <strit@manjaro.org>
|
||||
Link: https://lore.kernel.org/r/20220930051246.391614-6-aurelien@aurel32.net
|
||||
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
|
||||
---
|
||||
.../boot/dts/rockchip/rk3568-odroid-m1.dts | 43 ++++++++++++++++++-
|
||||
1 file changed, 42 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/arch/arm64/boot/dts/rockchip/rk3568-odroid-m1.dts b/arch/arm64/boot/dts/rockchip/rk3568-odroid-m1.dts
|
||||
index 94e839c9afab..634c1bd80b4e 100644
|
||||
--- a/arch/arm64/boot/dts/rockchip/rk3568-odroid-m1.dts
|
||||
+++ b/arch/arm64/boot/dts/rockchip/rk3568-odroid-m1.dts
|
||||
@@ -59,6 +59,31 @@ led_work: led-1 {
|
||||
};
|
||||
};
|
||||
|
||||
+ rk809-sound {
|
||||
+ compatible = "simple-audio-card";
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&hp_det_pin>;
|
||||
+ simple-audio-card,name = "Analog RK817";
|
||||
+ simple-audio-card,format = "i2s";
|
||||
+ simple-audio-card,hp-det-gpio = <&gpio0 RK_PB0 GPIO_ACTIVE_HIGH>;
|
||||
+ 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";
|
||||
@@ -131,10 +156,15 @@ rk809: pmic@20 {
|
||||
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>;
|
||||
+ pinctrl-0 = <&pmic_int_l>, <&i2s1m0_mclk>;
|
||||
rockchip,system-power-controller;
|
||||
+ #sound-dai-cells = <0>;
|
||||
vcc1-supply = <&vcc3v3_sys>;
|
||||
vcc2-supply = <&vcc3v3_sys>;
|
||||
vcc3-supply = <&vcc3v3_sys>;
|
||||
@@ -340,6 +370,11 @@ regulator-state-mem {
|
||||
};
|
||||
};
|
||||
|
||||
+&i2s1_8ch {
|
||||
+ rockchip,trcm-sync-tx-only;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
&mdio0 {
|
||||
rgmii_phy0: ethernet-phy@0 {
|
||||
compatible = "ethernet-phy-ieee802.3-c22";
|
||||
@@ -379,6 +414,12 @@ pmic_int_l: pmic-int-l {
|
||||
rockchip,pins = <0 RK_PA3 RK_FUNC_GPIO &pcfg_pull_up>;
|
||||
};
|
||||
};
|
||||
+
|
||||
+ rk809 {
|
||||
+ hp_det_pin: hp-det-pin {
|
||||
+ rockchip,pins = <0 RK_PB0 RK_FUNC_GPIO &pcfg_pull_none>;
|
||||
+ };
|
||||
+ };
|
||||
};
|
||||
|
||||
&pmu_io_domains {
|
||||
--
|
||||
2.41.0
|
||||
|
@@ -1,97 +0,0 @@
|
||||
From 3a1be3d8719ef6335385d4e5e456371e7bf7383f Mon Sep 17 00:00:00 2001
|
||||
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
|
||||
|
||||
Enable the RK356x Video Output Processor (VOP) 2 on ODROID M1.
|
||||
|
||||
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
|
||||
Tested-by: Dan Johansen <strit@manjaro.org>
|
||||
Link: https://lore.kernel.org/r/20220930051246.391614-7-aurelien@aurel32.net
|
||||
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
|
||||
---
|
||||
.../boot/dts/rockchip/rk3568-odroid-m1.dts | 47 +++++++++++++++++++
|
||||
1 file changed, 47 insertions(+)
|
||||
|
||||
diff --git a/arch/arm64/boot/dts/rockchip/rk3568-odroid-m1.dts b/arch/arm64/boot/dts/rockchip/rk3568-odroid-m1.dts
|
||||
index 634c1bd80b4e..126b893048fe 100644
|
||||
--- a/arch/arm64/boot/dts/rockchip/rk3568-odroid-m1.dts
|
||||
+++ b/arch/arm64/boot/dts/rockchip/rk3568-odroid-m1.dts
|
||||
@@ -8,6 +8,7 @@
|
||||
#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 "rk3568.dtsi"
|
||||
|
||||
/ {
|
||||
@@ -37,6 +38,17 @@ dc_12v: dc-12v-regulator {
|
||||
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";
|
||||
|
||||
@@ -131,6 +143,24 @@ &gmac0_rgmii_clk
|
||||
rx_delay = <0x2d>;
|
||||
};
|
||||
|
||||
+&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>;
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
&i2c0 {
|
||||
status = "okay";
|
||||
|
||||
@@ -517,3 +547,20 @@ &tsadc {
|
||||
&uart2 {
|
||||
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.41.0
|
||||
|
@@ -1,48 +0,0 @@
|
||||
From ded87dc761951205b8b9ba8ee4081e28a850a3db Mon Sep 17 00:00:00 2001
|
||||
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.
|
||||
|
||||
This enables the i2s0 controller and the hdmi-sound node on the
|
||||
ODROID-M1.
|
||||
|
||||
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
|
||||
Tested-by: Dan Johansen <strit@manjaro.org>
|
||||
Link: https://lore.kernel.org/r/20220930051246.391614-8-aurelien@aurel32.net
|
||||
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
|
||||
---
|
||||
arch/arm64/boot/dts/rockchip/rk3568-odroid-m1.dts | 8 ++++++++
|
||||
1 file changed, 8 insertions(+)
|
||||
|
||||
diff --git a/arch/arm64/boot/dts/rockchip/rk3568-odroid-m1.dts b/arch/arm64/boot/dts/rockchip/rk3568-odroid-m1.dts
|
||||
index 126b893048fe..ac4e94d18feb 100644
|
||||
--- a/arch/arm64/boot/dts/rockchip/rk3568-odroid-m1.dts
|
||||
+++ b/arch/arm64/boot/dts/rockchip/rk3568-odroid-m1.dts
|
||||
@@ -161,6 +161,10 @@ hdmi_out_con: endpoint {
|
||||
};
|
||||
};
|
||||
|
||||
+&hdmi_sound {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
&i2c0 {
|
||||
status = "okay";
|
||||
|
||||
@@ -400,6 +404,10 @@ regulator-state-mem {
|
||||
};
|
||||
};
|
||||
|
||||
+&i2s0_8ch {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
&i2s1_8ch {
|
||||
rockchip,trcm-sync-tx-only;
|
||||
status = "okay";
|
||||
--
|
||||
2.41.0
|
||||
|
@@ -1,37 +0,0 @@
|
||||
From 13438a717627cae086cc3a1126552cffa2f4bd16 Mon Sep 17 00:00:00 2001
|
||||
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
|
||||
|
||||
Enable the GPU core on the Rockchip RK3568 ODROID-M1.
|
||||
|
||||
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
|
||||
Tested-by: Dan Johansen <strit@manjaro.org>
|
||||
Link: https://lore.kernel.org/r/20220930051246.391614-9-aurelien@aurel32.net
|
||||
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
|
||||
---
|
||||
arch/arm64/boot/dts/rockchip/rk3568-odroid-m1.dts | 5 +++++
|
||||
1 file changed, 5 insertions(+)
|
||||
|
||||
diff --git a/arch/arm64/boot/dts/rockchip/rk3568-odroid-m1.dts b/arch/arm64/boot/dts/rockchip/rk3568-odroid-m1.dts
|
||||
index ac4e94d18feb..e4b7699d3eea 100644
|
||||
--- a/arch/arm64/boot/dts/rockchip/rk3568-odroid-m1.dts
|
||||
+++ b/arch/arm64/boot/dts/rockchip/rk3568-odroid-m1.dts
|
||||
@@ -143,6 +143,11 @@ &gmac0_rgmii_clk
|
||||
rx_delay = <0x2d>;
|
||||
};
|
||||
|
||||
+&gpu {
|
||||
+ mali-supply = <&vdd_gpu>;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
&hdmi {
|
||||
avdd-0v9-supply = <&vdda0v9_image>;
|
||||
avdd-1v8-supply = <&vcca1v8_image>;
|
||||
--
|
||||
2.41.0
|
||||
|
@@ -1,111 +0,0 @@
|
||||
From 0f0a85a289b4d0fbd5c39eb5ddbb681a37ad490c Mon Sep 17 00:00:00 2001
|
||||
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
|
||||
|
||||
The Rockchip RK3568 has two USB OHCI/EHCI controllers connected to a PHY
|
||||
providing one host-only port and one OTG port. On the ODROID-M1, they
|
||||
are both used in host mode. The USB ports are powered by a DC/DC
|
||||
converter providing 5V and named VCC5V0_SYS on the schematics, followed
|
||||
by a power switch.
|
||||
|
||||
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
|
||||
Tested-by: Dan Johansen <strit@manjaro.org>
|
||||
Link: https://lore.kernel.org/r/20220930051246.391614-10-aurelien@aurel32.net
|
||||
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
|
||||
---
|
||||
.../boot/dts/rockchip/rk3568-odroid-m1.dts | 61 +++++++++++++++++++
|
||||
1 file changed, 61 insertions(+)
|
||||
|
||||
diff --git a/arch/arm64/boot/dts/rockchip/rk3568-odroid-m1.dts b/arch/arm64/boot/dts/rockchip/rk3568-odroid-m1.dts
|
||||
index e4b7699d3eea..2e4cc20bd676 100644
|
||||
--- a/arch/arm64/boot/dts/rockchip/rk3568-odroid-m1.dts
|
||||
+++ b/arch/arm64/boot/dts/rockchip/rk3568-odroid-m1.dts
|
||||
@@ -105,6 +105,28 @@ vcc3v3_sys: vcc3v3-sys-regulator {
|
||||
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 {
|
||||
@@ -463,6 +485,15 @@ hp_det_pin: hp-det-pin {
|
||||
rockchip,pins = <0 RK_PB0 RK_FUNC_GPIO &pcfg_pull_none>;
|
||||
};
|
||||
};
|
||||
+
|
||||
+ usb {
|
||||
+ vcc5v0_usb_host_en_pin: vcc5v0-usb-host-en-pin {
|
||||
+ rockchip,pins = <0 RK_PA6 RK_FUNC_GPIO &pcfg_pull_none>;
|
||||
+ };
|
||||
+ vcc5v0_usb_otg_en_pin: vcc5v0-usb-otg-en-pin {
|
||||
+ rockchip,pins = <0 RK_PA5 RK_FUNC_GPIO &pcfg_pull_none>;
|
||||
+ };
|
||||
+ };
|
||||
};
|
||||
|
||||
&pmu_io_domains {
|
||||
@@ -561,6 +592,36 @@ &uart2 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
+&usb_host0_ehci {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&usb_host0_ohci {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&usb_host1_ehci {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&usb_host1_ohci {
|
||||
+ 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>;
|
||||
--
|
||||
2.41.0
|
||||
|
@@ -1,114 +0,0 @@
|
||||
From d8abc451c669a8fd36b31db5cb96ec49da819124 Mon Sep 17 00:00:00 2001
|
||||
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
|
||||
|
||||
The Rockchip RK3568 has two USB XHCI controllers. The USB 2.0 signals
|
||||
are connected to a PHY providing one host-only port and one OTG port.
|
||||
The USB 3.0 signals are connected to two USB3.0/PCIE/SATA combo PHY.
|
||||
|
||||
The ODROID M1 has 2 type A USB 3.0 connectors, with the USB 3.0 signals
|
||||
connected to the two combo PHYs. For the USB 2.0 signals, one connector
|
||||
is connected to the host-only PHY and uses the same power switch as the
|
||||
USB 2.0 ports. The other connector has its own power switch and is
|
||||
connected to the OTG PHY, which is also connected to a device only
|
||||
micro-USB connector. The purpose of this micro-USB connector is for
|
||||
firmware update using the Rockusb vendor specific USB class. Therefore
|
||||
it does not make sense to enable this port on Linux, and the PHY is
|
||||
forced to host mode.
|
||||
|
||||
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
|
||||
Tested-by: Dan Johansen <strit@manjaro.org>
|
||||
Link: https://lore.kernel.org/r/20220930051246.391614-11-aurelien@aurel32.net
|
||||
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
|
||||
---
|
||||
.../boot/dts/rockchip/rk3568-odroid-m1.dts | 49 ++++++++++++++++++-
|
||||
1 file changed, 48 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/arch/arm64/boot/dts/rockchip/rk3568-odroid-m1.dts b/arch/arm64/boot/dts/rockchip/rk3568-odroid-m1.dts
|
||||
index 2e4cc20bd676..9a84a7e76d7a 100644
|
||||
--- a/arch/arm64/boot/dts/rockchip/rk3568-odroid-m1.dts
|
||||
+++ b/arch/arm64/boot/dts/rockchip/rk3568-odroid-m1.dts
|
||||
@@ -127,6 +127,30 @@ vcc5v0_usb_host: vcc5v0-usb-host-regulator {
|
||||
regulator-max-microvolt = <5000000>;
|
||||
vin-supply = <&vcc5v0_sys>;
|
||||
};
|
||||
+
|
||||
+ vcc5v0_usb_otg: vcc5v0-usb-otg-regulator {
|
||||
+ compatible = "regulator-fixed";
|
||||
+ regulator-name = "vcc5v0_usb_otg";
|
||||
+ enable-active-high;
|
||||
+ gpio = <&gpio0 RK_PA5 GPIO_ACTIVE_HIGH>;
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&vcc5v0_usb_otg_en_pin>;
|
||||
+ regulator-min-microvolt = <5000000>;
|
||||
+ regulator-max-microvolt = <5000000>;
|
||||
+ vin-supply = <&vcc5v0_sys>;
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&combphy0 {
|
||||
+ /* Used for USB3 */
|
||||
+ phy-supply = <&vcc5v0_usb_host>;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&combphy1 {
|
||||
+ /* Used for USB3 */
|
||||
+ phy-supply = <&vcc5v0_usb_otg>;
|
||||
+ status = "okay";
|
||||
};
|
||||
|
||||
&cpu0 {
|
||||
@@ -490,7 +514,7 @@ usb {
|
||||
vcc5v0_usb_host_en_pin: vcc5v0-usb-host-en-pin {
|
||||
rockchip,pins = <0 RK_PA6 RK_FUNC_GPIO &pcfg_pull_none>;
|
||||
};
|
||||
- vcc5v0_usb_otg_en_pin: vcc5v0-usb-otg-en-pin {
|
||||
+ vcc5v0_usb_otg_en_pin: vcc5v0-usb-dr-en-pin {
|
||||
rockchip,pins = <0 RK_PA5 RK_FUNC_GPIO &pcfg_pull_none>;
|
||||
};
|
||||
};
|
||||
@@ -600,6 +624,11 @@ &usb_host0_ohci {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
+&usb_host0_xhci {
|
||||
+ dr_mode = "host";
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
&usb_host1_ehci {
|
||||
status = "okay";
|
||||
};
|
||||
@@ -608,6 +637,24 @@ &usb_host1_ohci {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
+&usb_host1_xhci {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&usb2phy0 {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&usb2phy0_host {
|
||||
+ phy-supply = <&vcc5v0_usb_host>;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&usb2phy0_otg {
|
||||
+ phy-supply = <&vcc5v0_usb_otg>;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
&usb2phy1 {
|
||||
status = "okay";
|
||||
};
|
||||
--
|
||||
2.41.0
|
||||
|
@@ -1,48 +0,0 @@
|
||||
From 2f6d4521403932ca22cb4dabef9033f1d52232ba Mon Sep 17 00:00:00 2001
|
||||
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
|
||||
|
||||
Enable the Combo PHY and SATA nodes in ODROID-M1.
|
||||
|
||||
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
|
||||
Tested-by: Dan Johansen <strit@manjaro.org>
|
||||
Link: https://lore.kernel.org/r/20220930051246.391614-12-aurelien@aurel32.net
|
||||
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
|
||||
---
|
||||
arch/arm64/boot/dts/rockchip/rk3568-odroid-m1.dts | 9 +++++++++
|
||||
1 file changed, 9 insertions(+)
|
||||
|
||||
diff --git a/arch/arm64/boot/dts/rockchip/rk3568-odroid-m1.dts b/arch/arm64/boot/dts/rockchip/rk3568-odroid-m1.dts
|
||||
index 9a84a7e76d7a..bd24ccf94e76 100644
|
||||
--- a/arch/arm64/boot/dts/rockchip/rk3568-odroid-m1.dts
|
||||
+++ b/arch/arm64/boot/dts/rockchip/rk3568-odroid-m1.dts
|
||||
@@ -153,6 +153,11 @@ &combphy1 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
+&combphy2 {
|
||||
+ /* used for SATA */
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
&cpu0 {
|
||||
cpu-supply = <&vdd_cpu>;
|
||||
};
|
||||
@@ -538,6 +543,10 @@ &saradc {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
+&sata2 {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
&sdhci {
|
||||
bus-width = <8>;
|
||||
max-frequency = <200000000>;
|
||||
--
|
||||
2.41.0
|
||||
|
@@ -1,80 +0,0 @@
|
||||
From 1572a9c5d9fa9f654fbc1909528ae5940ad34aa3 Mon Sep 17 00:00:00 2001
|
||||
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
|
||||
|
||||
Add nodes to ODROID-M1 to support PCIe v3 on the M2 slot.
|
||||
|
||||
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
|
||||
Tested-by: Dan Johansen <strit@manjaro.org>
|
||||
Link: https://lore.kernel.org/r/20220930051246.391614-13-aurelien@aurel32.net
|
||||
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
|
||||
---
|
||||
.../boot/dts/rockchip/rk3568-odroid-m1.dts | 34 +++++++++++++++++++
|
||||
1 file changed, 34 insertions(+)
|
||||
|
||||
diff --git a/arch/arm64/boot/dts/rockchip/rk3568-odroid-m1.dts b/arch/arm64/boot/dts/rockchip/rk3568-odroid-m1.dts
|
||||
index bd24ccf94e76..2f685c606bb9 100644
|
||||
--- a/arch/arm64/boot/dts/rockchip/rk3568-odroid-m1.dts
|
||||
+++ b/arch/arm64/boot/dts/rockchip/rk3568-odroid-m1.dts
|
||||
@@ -96,6 +96,19 @@ simple-audio-card,codec {
|
||||
};
|
||||
};
|
||||
|
||||
+ vcc3v3_pcie: vcc3v3-pcie-regulator {
|
||||
+ compatible = "regulator-fixed";
|
||||
+ regulator-name = "vcc3v3_pcie";
|
||||
+ enable-active-high;
|
||||
+ gpio = <&gpio4 RK_PA7 GPIO_ACTIVE_HIGH>;
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&vcc3v3_pcie_en_pin>;
|
||||
+ regulator-min-microvolt = <3300000>;
|
||||
+ regulator-max-microvolt = <3300000>;
|
||||
+ startup-delay-us = <5000>;
|
||||
+ vin-supply = <&vcc3v3_sys>;
|
||||
+ };
|
||||
+
|
||||
vcc3v3_sys: vcc3v3-sys-regulator {
|
||||
compatible = "regulator-fixed";
|
||||
regulator-name = "vcc3v3_sys";
|
||||
@@ -479,6 +492,18 @@ rgmii_phy0: ethernet-phy@0 {
|
||||
};
|
||||
};
|
||||
|
||||
+&pcie30phy {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&pcie3x2 {
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&pcie_reset_pin>;
|
||||
+ reset-gpios = <&gpio2 RK_PD6 GPIO_ACTIVE_HIGH>;
|
||||
+ vpcie3v3-supply = <&vcc3v3_pcie>;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
&pinctrl {
|
||||
fspi {
|
||||
fspi_dual_io_pins: fspi-dual-io-pins {
|
||||
@@ -503,6 +528,15 @@ led_work_pin: led-work-pin {
|
||||
};
|
||||
};
|
||||
|
||||
+ pcie {
|
||||
+ pcie_reset_pin: pcie-reset-pin {
|
||||
+ rockchip,pins = <2 RK_PD6 RK_FUNC_GPIO &pcfg_pull_none>;
|
||||
+ };
|
||||
+ vcc3v3_pcie_en_pin: vcc3v3-pcie-en-pin {
|
||||
+ rockchip,pins = <4 RK_PA7 RK_FUNC_GPIO &pcfg_pull_none>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
pmic {
|
||||
pmic_int_l: pmic-int-l {
|
||||
rockchip,pins = <0 RK_PA3 RK_FUNC_GPIO &pcfg_pull_up>;
|
||||
--
|
||||
2.41.0
|
||||
|
@@ -1,54 +0,0 @@
|
||||
From b2eae73eeb32dd9383571de6af18fc8bd39aac3a Mon Sep 17 00:00:00 2001
|
||||
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
|
||||
|
||||
Add the infrared receiver and its associated pinctrl entry. Note that
|
||||
there is an external pullup to VCC3V3_SYS.
|
||||
|
||||
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
|
||||
Tested-by: Dan Johansen <strit@manjaro.org>
|
||||
Link: https://lore.kernel.org/r/20220930051246.391614-14-aurelien@aurel32.net
|
||||
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
|
||||
---
|
||||
arch/arm64/boot/dts/rockchip/rk3568-odroid-m1.dts | 14 ++++++++++++++
|
||||
1 file changed, 14 insertions(+)
|
||||
|
||||
diff --git a/arch/arm64/boot/dts/rockchip/rk3568-odroid-m1.dts b/arch/arm64/boot/dts/rockchip/rk3568-odroid-m1.dts
|
||||
index 2f685c606bb9..59ecf868dbd0 100644
|
||||
--- a/arch/arm64/boot/dts/rockchip/rk3568-odroid-m1.dts
|
||||
+++ b/arch/arm64/boot/dts/rockchip/rk3568-odroid-m1.dts
|
||||
@@ -49,6 +49,13 @@ hdmi_con_in: endpoint {
|
||||
};
|
||||
};
|
||||
|
||||
+ ir-receiver {
|
||||
+ compatible = "gpio-ir-receiver";
|
||||
+ gpios = <&gpio0 RK_PC2 GPIO_ACTIVE_LOW>;
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&ir_receiver_pin>;
|
||||
+ };
|
||||
+
|
||||
leds {
|
||||
compatible = "gpio-leds";
|
||||
|
||||
@@ -519,6 +526,13 @@ fspi_dual_io_pins: fspi-dual-io-pins {
|
||||
};
|
||||
};
|
||||
|
||||
+ ir-receiver {
|
||||
+ ir_receiver_pin: ir-receiver-pin {
|
||||
+ /* external pullup to VCC3V3_SYS */
|
||||
+ rockchip,pins = <0 RK_PC2 RK_FUNC_GPIO &pcfg_pull_none>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
leds {
|
||||
led_power_pin: led-power-pin {
|
||||
rockchip,pins = <0 RK_PC6 RK_FUNC_GPIO &pcfg_pull_none>;
|
||||
--
|
||||
2.41.0
|
||||
|
@@ -1,48 +0,0 @@
|
||||
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,990 +0,0 @@
|
||||
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
|
||||
|
||||
Hardkernel ODROID-M1 is a single board computer with a RK3568B2 SoC,
|
||||
a slightly modified version of the RK3568 SoC.
|
||||
|
||||
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 | 46 ++
|
||||
arch/arm/dts/rk3568-odroid-m1.dts | 744 ++++++++++++++++++++++
|
||||
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-rk3568_defconfig
|
||||
|
||||
diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile
|
||||
index 480269fa60..334c1bafda 100644
|
||||
--- a/arch/arm/dts/Makefile
|
||||
+++ b/arch/arm/dts/Makefile
|
||||
@@ -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..dc8ad98715
|
||||
--- /dev/null
|
||||
+++ b/arch/arm/dts/rk3568-odroid-m1-u-boot.dtsi
|
||||
@@ -0,0 +1,46 @@
|
||||
+// SPDX-License-Identifier: GPL-2.0+
|
||||
+
|
||||
+#include "rk356x-u-boot.dtsi"
|
||||
+
|
||||
+/ {
|
||||
+ aliases {
|
||||
+ spi0 = &sfc;
|
||||
+ };
|
||||
+
|
||||
+ chosen {
|
||||
+ stdout-path = &uart2;
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&fspi_dual_io_pins {
|
||||
+ bootph-all;
|
||||
+};
|
||||
+
|
||||
+&sdhci {
|
||||
+ 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 {
|
||||
+ bootph-all;
|
||||
+ 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
|
||||
index 0000000000..59ecf868db
|
||||
--- /dev/null
|
||||
+++ b/arch/arm/dts/rk3568-odroid-m1.dts
|
||||
@@ -0,0 +1,744 @@
|
||||
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
|
||||
+/*
|
||||
+ * Copyright (c) 2022 Hardkernel 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 "rk3568.dtsi"
|
||||
+
|
||||
+/ {
|
||||
+ model = "Hardkernel ODROID-M1";
|
||||
+ compatible = "rockchip,rk3568-odroid-m1", "rockchip,rk3568";
|
||||
+
|
||||
+ aliases {
|
||||
+ ethernet0 = &gmac0;
|
||||
+ i2c0 = &i2c3;
|
||||
+ i2c3 = &i2c0;
|
||||
+ mmc0 = &sdhci;
|
||||
+ mmc1 = &sdmmc0;
|
||||
+ serial0 = &uart1;
|
||||
+ serial1 = &uart0;
|
||||
+ };
|
||||
+
|
||||
+ 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>;
|
||||
+ };
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ ir-receiver {
|
||||
+ compatible = "gpio-ir-receiver";
|
||||
+ gpios = <&gpio0 RK_PC2 GPIO_ACTIVE_LOW>;
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&ir_receiver_pin>;
|
||||
+ };
|
||||
+
|
||||
+ leds {
|
||||
+ compatible = "gpio-leds";
|
||||
+
|
||||
+ led_power: led-0 {
|
||||
+ gpios = <&gpio0 RK_PC6 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_work: led-1 {
|
||||
+ gpios = <&gpio0 RK_PB7 GPIO_ACTIVE_HIGH>;
|
||||
+ function = LED_FUNCTION_HEARTBEAT;
|
||||
+ color = <LED_COLOR_ID_BLUE>;
|
||||
+ linux,default-trigger = "heartbeat";
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&led_work_pin>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ rk809-sound {
|
||||
+ compatible = "simple-audio-card";
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&hp_det_pin>;
|
||||
+ simple-audio-card,name = "Analog RK817";
|
||||
+ simple-audio-card,format = "i2s";
|
||||
+ simple-audio-card,hp-det-gpio = <&gpio0 RK_PB0 GPIO_ACTIVE_HIGH>;
|
||||
+ 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_pcie: vcc3v3-pcie-regulator {
|
||||
+ compatible = "regulator-fixed";
|
||||
+ regulator-name = "vcc3v3_pcie";
|
||||
+ enable-active-high;
|
||||
+ gpio = <&gpio4 RK_PA7 GPIO_ACTIVE_HIGH>;
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&vcc3v3_pcie_en_pin>;
|
||||
+ regulator-min-microvolt = <3300000>;
|
||||
+ regulator-max-microvolt = <3300000>;
|
||||
+ startup-delay-us = <5000>;
|
||||
+ vin-supply = <&vcc3v3_sys>;
|
||||
+ };
|
||||
+
|
||||
+ 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>;
|
||||
+ };
|
||||
+
|
||||
+ vcc5v0_usb_otg: vcc5v0-usb-otg-regulator {
|
||||
+ compatible = "regulator-fixed";
|
||||
+ regulator-name = "vcc5v0_usb_otg";
|
||||
+ enable-active-high;
|
||||
+ gpio = <&gpio0 RK_PA5 GPIO_ACTIVE_HIGH>;
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&vcc5v0_usb_otg_en_pin>;
|
||||
+ regulator-min-microvolt = <5000000>;
|
||||
+ regulator-max-microvolt = <5000000>;
|
||||
+ vin-supply = <&vcc5v0_sys>;
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&combphy0 {
|
||||
+ /* Used for USB3 */
|
||||
+ phy-supply = <&vcc5v0_usb_host>;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&combphy1 {
|
||||
+ /* Used for USB3 */
|
||||
+ phy-supply = <&vcc5v0_usb_otg>;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&combphy2 {
|
||||
+ /* used for SATA */
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&cpu0 {
|
||||
+ cpu-supply = <&vdd_cpu>;
|
||||
+};
|
||||
+
|
||||
+&cpu1 {
|
||||
+ cpu-supply = <&vdd_cpu>;
|
||||
+};
|
||||
+
|
||||
+&cpu2 {
|
||||
+ cpu-supply = <&vdd_cpu>;
|
||||
+};
|
||||
+
|
||||
+&cpu3 {
|
||||
+ cpu-supply = <&vdd_cpu>;
|
||||
+};
|
||||
+
|
||||
+&gmac0 {
|
||||
+ assigned-clocks = <&cru SCLK_GMAC0_RX_TX>, <&cru SCLK_GMAC0>;
|
||||
+ assigned-clock-parents = <&cru SCLK_GMAC0_RGMII_SPEED>;
|
||||
+ assigned-clock-rates = <0>, <125000000>;
|
||||
+ clock_in_out = "output";
|
||||
+ phy-handle = <&rgmii_phy0>;
|
||||
+ phy-mode = "rgmii";
|
||||
+ phy-supply = <&vcc3v3_sys>;
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&gmac0_miim
|
||||
+ &gmac0_tx_bus2
|
||||
+ &gmac0_rx_bus2
|
||||
+ &gmac0_rgmii_clk
|
||||
+ &gmac0_rgmii_bus>;
|
||||
+ status = "okay";
|
||||
+
|
||||
+ tx_delay = <0x4f>;
|
||||
+ rx_delay = <0x2d>;
|
||||
+};
|
||||
+
|
||||
+&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: regulator@1c {
|
||||
+ compatible = "tcs,tcs4525";
|
||||
+ reg = <0x1c>;
|
||||
+ fcs,suspend-voltage-selector = <1>;
|
||||
+ regulator-name = "vdd_cpu";
|
||||
+ regulator-always-on;
|
||||
+ regulator-boot-on;
|
||||
+ regulator-min-microvolt = <800000>;
|
||||
+ regulator-max-microvolt = <1150000>;
|
||||
+ regulator-ramp-delay = <2300>;
|
||||
+ vin-supply = <&vcc3v3_sys>;
|
||||
+
|
||||
+ 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>;
|
||||
+ 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>;
|
||||
+ wakeup-source;
|
||||
+
|
||||
+ 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;
|
||||
+ };
|
||||
+ };
|
||||
+ };
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&i2s0_8ch {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&i2s1_8ch {
|
||||
+ rockchip,trcm-sync-tx-only;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&mdio0 {
|
||||
+ rgmii_phy0: ethernet-phy@0 {
|
||||
+ compatible = "ethernet-phy-ieee802.3-c22";
|
||||
+ reg = <0x0>;
|
||||
+ reset-assert-us = <20000>;
|
||||
+ reset-deassert-us = <100000>;
|
||||
+ reset-gpios = <&gpio3 RK_PB7 GPIO_ACTIVE_LOW>;
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&pcie30phy {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&pcie3x2 {
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&pcie_reset_pin>;
|
||||
+ reset-gpios = <&gpio2 RK_PD6 GPIO_ACTIVE_HIGH>;
|
||||
+ vpcie3v3-supply = <&vcc3v3_pcie>;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&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>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ ir-receiver {
|
||||
+ ir_receiver_pin: ir-receiver-pin {
|
||||
+ /* external pullup to VCC3V3_SYS */
|
||||
+ rockchip,pins = <0 RK_PC2 RK_FUNC_GPIO &pcfg_pull_none>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ leds {
|
||||
+ led_power_pin: led-power-pin {
|
||||
+ rockchip,pins = <0 RK_PC6 RK_FUNC_GPIO &pcfg_pull_none>;
|
||||
+ };
|
||||
+ led_work_pin: led-work-pin {
|
||||
+ rockchip,pins = <0 RK_PB7 RK_FUNC_GPIO &pcfg_pull_none>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ pcie {
|
||||
+ pcie_reset_pin: pcie-reset-pin {
|
||||
+ rockchip,pins = <2 RK_PD6 RK_FUNC_GPIO &pcfg_pull_none>;
|
||||
+ };
|
||||
+ vcc3v3_pcie_en_pin: vcc3v3-pcie-en-pin {
|
||||
+ rockchip,pins = <4 RK_PA7 RK_FUNC_GPIO &pcfg_pull_none>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ pmic {
|
||||
+ pmic_int_l: pmic-int-l {
|
||||
+ rockchip,pins = <0 RK_PA3 RK_FUNC_GPIO &pcfg_pull_up>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ rk809 {
|
||||
+ hp_det_pin: hp-det-pin {
|
||||
+ rockchip,pins = <0 RK_PB0 RK_FUNC_GPIO &pcfg_pull_none>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ usb {
|
||||
+ vcc5v0_usb_host_en_pin: vcc5v0-usb-host-en-pin {
|
||||
+ rockchip,pins = <0 RK_PA6 RK_FUNC_GPIO &pcfg_pull_none>;
|
||||
+ };
|
||||
+ vcc5v0_usb_otg_en_pin: vcc5v0-usb-dr-en-pin {
|
||||
+ rockchip,pins = <0 RK_PA5 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>;
|
||||
+ vccio5-supply = <&vcc_3v3>;
|
||||
+ vccio6-supply = <&vcc_3v3>;
|
||||
+ vccio7-supply = <&vcc_3v3>;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&saradc {
|
||||
+ vref-supply = <&vcca_1v8>;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&sata2 {
|
||||
+ 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-sdr50;
|
||||
+ 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 = <2>;
|
||||
+ 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";
|
||||
+};
|
||||
+
|
||||
+&usb2phy0 {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&usb2phy0_host {
|
||||
+ phy-supply = <&vcc5v0_usb_host>;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&usb2phy0_otg {
|
||||
+ phy-supply = <&vcc5v0_usb_otg>;
|
||||
+ 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/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..d090196219
|
||||
--- /dev/null
|
||||
+++ b/configs/odroid-m1-rk3568_defconfig
|
||||
@@ -0,0 +1,103 @@
|
||||
+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_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=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_SPL_STACK_R=y
|
||||
+CONFIG_SPL_SPI_LOAD=y
|
||||
+CONFIG_SYS_SPI_U_BOOT_OFFS=0x100000
|
||||
+CONFIG_SPL_ATF=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_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
|
||||
+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_SPI_FLASH_SFDP_SUPPORT=y
|
||||
+CONFIG_SPI_FLASH_MACRONIX=y
|
||||
+CONFIG_ETH_DESIGNWARE=y
|
||||
+CONFIG_GMAC_ROCKCHIP=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_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_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.41.0
|
||||
|
@@ -1,98 +0,0 @@
|
||||
part start mmc ${devnum} hassos-bootstate mmc_env
|
||||
mmc dev ${devnum}
|
||||
|
||||
setenv loadbootstate " \
|
||||
echo 'loading env...'; \
|
||||
mmc read ${ramdisk_addr_r} ${mmc_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; \
|
||||
mmc write ${ramdisk_addr_r} ${mmc_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 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"
|
||||
setenv bootargs_b "root=PARTUUID=a3ec664e-32ce-4665-95ea-7ae90ce9aa20 rootfstype=squashfs ro rootwait"
|
||||
|
||||
part number mmc ${devnum} hassos-boot boot_partnum
|
||||
|
||||
# Load environment from haos-config.txt
|
||||
if test -e mmc ${devnum}:${boot_partnum} haos-config.txt; then
|
||||
fatload mmc ${devnum}:${boot_partnum} ${ramdisk_addr_r} haos-config.txt
|
||||
env import -t ${ramdisk_addr_r} ${filesize}
|
||||
fi
|
||||
|
||||
# Load extraargs
|
||||
fileenv mmc ${devnum}:${boot_partnum} ${ramdisk_addr_r} cmdline.txt cmdline
|
||||
|
||||
# Load device tree
|
||||
setenv fdtfile rk3568-odroid-m1.dtb
|
||||
echo "Loading standard device tree ${fdtfile}"
|
||||
fatload mmc ${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 mmc ${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 mmc ${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 mmc ${devnum} hassos-kernel0 kernel_partnum
|
||||
if load mmc ${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 mmc ${devnum} hassos-kernel1 kernel_partnum
|
||||
if load mmc ${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
|
@@ -1,5 +0,0 @@
|
||||
CONFIG_DOS_PARTITION=y
|
||||
# CONFIG_EFI_PARTITION is not set
|
||||
# CONFIG_USB_STORAGE is not set
|
||||
CONFIG_DISPLAY_BOARDINFO=y
|
||||
CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y
|
@@ -1,12 +1,10 @@
|
||||
BOARD_ID=odroid-n2
|
||||
BOARD_NAME="Hardkernel ODROID-N2"
|
||||
BOARD_NAME="Hardkernel Odroid-N2"
|
||||
CHASSIS=embedded
|
||||
BOOTLOADER=uboot
|
||||
KERNEL_FILE=Image
|
||||
BOOT_SYS=mbr
|
||||
BOOT_SIZE=24M
|
||||
BOOT_SPL=true
|
||||
BOOT_SPL_SIZE=8M
|
||||
BOOT_ENV_SIZE=0x2000
|
||||
SUPERVISOR_MACHINE=odroid-n2
|
||||
SUPERVISOR_ARCH=aarch64
|
||||
|
@@ -18,11 +18,8 @@ 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 systemd.machine_id=${MACHINE_ID} fsck.repair=yes ${BOOT_CONDITION}"
|
||||
setenv bootargs_hassos "zram.enabled=1 zram.num_devices=3 apparmor=1 security=apparmor systemd.machine_id=${MACHINE_ID} cgroup_enable=memory fsck.repair=yes"
|
||||
|
||||
# HassOS system A/B
|
||||
setenv bootargs_a "root=PARTUUID=48617373-06 rootfstype=squashfs ro rootwait"
|
||||
|
@@ -1 +0,0 @@
|
||||
# CONFIG_S3C2410_WATCHDOG is not set
|
@@ -1,12 +1,10 @@
|
||||
BOARD_ID=odroid-xu4
|
||||
BOARD_NAME="Hardkernel ODROID-XU4"
|
||||
BOARD_NAME="Hardkernel Odroid-XU4"
|
||||
CHASSIS=embedded
|
||||
BOOTLOADER=uboot
|
||||
KERNEL_FILE=zImage
|
||||
BOOT_SYS=mbr
|
||||
BOOT_SIZE=24M
|
||||
BOOT_SPL=true
|
||||
BOOT_SPL_SIZE=8M
|
||||
BOOT_ENV_SIZE=0x4000
|
||||
SUPERVISOR_MACHINE=odroid-xu
|
||||
SUPERVISOR_ARCH=armv7
|
||||
|
@@ -1,94 +0,0 @@
|
||||
From e7d59e0444170873e945a0675ed1565a65c99e17 Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <e7d59e0444170873e945a0675ed1565a65c99e17.1676489173.git.stefan@agner.ch>
|
||||
From: memeka <mihailescu2m@gmail.com>
|
||||
Date: Fri, 18 Jan 2019 14:36:21 +1030
|
||||
Subject: [PATCH] ODROID-XU4: regulator: s2mps11: add ethernet power reset in
|
||||
shutdown function
|
||||
|
||||
Ethernet device cannot be detected on warm boot sometimes. This patch is
|
||||
to add the power reset routines for ethernet device using PMIC. Then
|
||||
ethernet device can be reset hardware-wise.
|
||||
|
||||
Change-Id: Iffbe2966da7e4679f63b91ab79241167391792df
|
||||
Signed-off-by: Brian Kim <brian.kim@hardkernel.com>
|
||||
Signed-off-by: Marian Mihailescu <mihailescu2m@gmail.com>
|
||||
---
|
||||
drivers/regulator/s2mps11.c | 55 +++++++++++++++++++++++++++++++++++++
|
||||
1 file changed, 55 insertions(+)
|
||||
|
||||
diff --git a/drivers/regulator/s2mps11.c b/drivers/regulator/s2mps11.c
|
||||
index ebc67e3ddd4f..51f128076db9 100644
|
||||
--- a/drivers/regulator/s2mps11.c
|
||||
+++ b/drivers/regulator/s2mps11.c
|
||||
@@ -1117,6 +1117,57 @@ static const struct regulator_desc s2mpu02_regulators[] = {
|
||||
regulator_desc_s2mpu02_buck7(7),
|
||||
};
|
||||
|
||||
+static int s2mps11_pmic_ethonoff(struct platform_device *pdev, bool onoff)
|
||||
+{
|
||||
+ struct sec_pmic_dev *iodev = dev_get_drvdata(pdev->dev.parent);
|
||||
+ unsigned int reg_val = 0;
|
||||
+ int ret = 0;
|
||||
+
|
||||
+ ret = regmap_read(iodev->regmap_pmic, S2MPS11_REG_L15CTRL, ®_val);
|
||||
+ if (ret) {
|
||||
+ dev_err(&pdev->dev, "failed to read S2MPS11_REG_L15CTRL value\n");
|
||||
+ return ret;
|
||||
+ }
|
||||
+
|
||||
+ ret = regmap_read(iodev->regmap_pmic, S2MPS11_REG_L17CTRL, ®_val);
|
||||
+ if (ret) {
|
||||
+ dev_err(&pdev->dev, "failed to read S2MPS11_REG_L17CTRL value\n");
|
||||
+ return ret;
|
||||
+ }
|
||||
+
|
||||
+ if (onoff) {
|
||||
+ /* ETH VDD0 ON */
|
||||
+ ret = regmap_update_bits(iodev->regmap_pmic, S2MPS11_REG_L15CTRL, 0xFF, 0x72);
|
||||
+ if (ret) {
|
||||
+ dev_err(&pdev->dev, "cannot update S2MPS11 LDO CTRL15 register\n");
|
||||
+ return ret;
|
||||
+ }
|
||||
+
|
||||
+ /* ETH VDD1 ON */
|
||||
+ ret = regmap_update_bits(iodev->regmap_pmic, S2MPS11_REG_L17CTRL, 0xFF, 0x72);
|
||||
+ if (ret) {
|
||||
+ dev_err(&pdev->dev, "cannot update S2MPS11 LDO CTRL17 register\n");
|
||||
+ return ret;
|
||||
+ }
|
||||
+ } else {
|
||||
+ /* ETH VDD0 OFF */
|
||||
+ ret = regmap_update_bits(iodev->regmap_pmic, S2MPS11_REG_L15CTRL, 0x3F, 0x00);
|
||||
+ if (ret) {
|
||||
+ dev_err(&pdev->dev, "cannot update S2MPS11 LDO CTRL15 register\n");
|
||||
+ return ret;
|
||||
+ }
|
||||
+
|
||||
+ /* ETH VDD1 OFF */
|
||||
+ ret = regmap_update_bits(iodev->regmap_pmic, S2MPS11_REG_L17CTRL, 0x3F, 0x00);
|
||||
+ if (ret) {
|
||||
+ dev_err(&pdev->dev, "cannot update S2MPS11 LDO CTRL17 register\n");
|
||||
+ return ret;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ return ret;
|
||||
+}
|
||||
+
|
||||
static int s2mps11_pmic_probe(struct platform_device *pdev)
|
||||
{
|
||||
struct sec_pmic_dev *iodev = dev_get_drvdata(pdev->dev.parent);
|
||||
@@ -1219,6 +1270,10 @@ static int s2mps11_pmic_probe(struct platform_device *pdev)
|
||||
}
|
||||
}
|
||||
|
||||
+ dev_info(&pdev->dev, "Resetting Ethernet\n");
|
||||
+ s2mps11_pmic_ethonoff(pdev, false);
|
||||
+ mdelay(10);
|
||||
+ s2mps11_pmic_ethonoff(pdev, true);
|
||||
out:
|
||||
kfree(rdata);
|
||||
|
||||
--
|
||||
2.39.1
|
||||
|
@@ -1,30 +0,0 @@
|
||||
From 24252c65cfea76c5724044381bafb587a9fecd6a Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <24252c65cfea76c5724044381bafb587a9fecd6a.1676446297.git.stefan@agner.ch>
|
||||
From: Stefan Agner <stefan@agner.ch>
|
||||
Date: Wed, 15 Feb 2023 08:30:41 +0100
|
||||
Subject: [PATCH] samsung: common: ignore if CROS EC is not supported
|
||||
|
||||
If the CROS device class is not compiled in, uclass returns not
|
||||
supported. Ignore this case as well.
|
||||
|
||||
Signed-off-by: Stefan Agner <stefan@agner.ch>
|
||||
---
|
||||
board/samsung/common/board.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/board/samsung/common/board.c b/board/samsung/common/board.c
|
||||
index 16ce5cb892..663d7ca991 100644
|
||||
--- a/board/samsung/common/board.c
|
||||
+++ b/board/samsung/common/board.c
|
||||
@@ -223,7 +223,7 @@ int board_late_init(void)
|
||||
char mmcbootdev_str[16];
|
||||
|
||||
ret = uclass_first_device_err(UCLASS_CROS_EC, &dev);
|
||||
- if (ret && ret != -ENODEV) {
|
||||
+ if (ret && ret != -ENODEV && ret != -EPFNOSUPPORT) {
|
||||
/* Force console on */
|
||||
gd->flags &= ~GD_FLG_SILENT;
|
||||
|
||||
--
|
||||
2.39.1
|
||||
|
@@ -20,11 +20,8 @@ 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 systemd.machine_id=${MACHINE_ID} fsck.repair=yes ${BOOT_CONDITION}"
|
||||
setenv bootargs_hassos "zram.enabled=1 zram.num_devices=3 apparmor=1 security=apparmor systemd.machine_id=${MACHINE_ID} cgroup_enable=memory fsck.repair=yes"
|
||||
|
||||
# HassOS system A/B
|
||||
setenv bootargs_a "root=PARTUUID=48617373-06 rootfstype=squashfs ro rootwait"
|
||||
|
@@ -0,0 +1,53 @@
|
||||
From c7825747afd8bb975dc918f28e4afe8058a518f3 Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <c7825747afd8bb975dc918f28e4afe8058a518f3.1642331593.git.stefan@agner.ch>
|
||||
From: Christian Hewitt <christianshewitt@gmail.com>
|
||||
Date: Mon, 11 Jan 2021 13:58:31 +0000
|
||||
Subject: [PATCH 01/10] arm64: dts: meson: add i2c3/rtc nodes and rtc aliases
|
||||
to ODROID-N2 dtsi
|
||||
|
||||
Enable the onboard pcf8563 rtc hardware on ODROID N2/N2+ boards via the
|
||||
common dtsi. Also add aliases to ensure vrtc does not claim /dev/rtc0.
|
||||
|
||||
Signed-off-by: Christian Hewitt <christianshewitt@gmail.com>
|
||||
Reviewed-by: Neil Armstrong <narmstrong@baylibre.com>
|
||||
Signed-off-by: Kevin Hilman <khilman@baylibre.com>
|
||||
Link: https://lore.kernel.org/r/20210111135831.2218-1-christianshewitt@gmail.com
|
||||
---
|
||||
.../boot/dts/amlogic/meson-g12b-odroid-n2.dtsi | 14 ++++++++++++++
|
||||
1 file changed, 14 insertions(+)
|
||||
|
||||
diff --git a/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi
|
||||
index 39a09661c5f6..b78be3e6974d 100644
|
||||
--- a/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi
|
||||
+++ b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi
|
||||
@@ -13,6 +13,8 @@ / {
|
||||
aliases {
|
||||
serial0 = &uart_AO;
|
||||
ethernet0 = ðmac;
|
||||
+ rtc0 = &rtc;
|
||||
+ rtc1 = &vrtc;
|
||||
};
|
||||
|
||||
dioo2133: audio-amplifier-0 {
|
||||
@@ -478,6 +480,18 @@ &ir {
|
||||
linux,rc-map-name = "rc-odroid";
|
||||
};
|
||||
|
||||
+&i2c3 {
|
||||
+ status = "okay";
|
||||
+ pinctrl-0 = <&i2c3_sda_a_pins>, <&i2c3_sck_a_pins>;
|
||||
+ pinctrl-names = "default";
|
||||
+
|
||||
+ rtc: rtc@51 {
|
||||
+ compatible = "nxp,pcf8563";
|
||||
+ reg = <0x51>;
|
||||
+ wakeup-source;
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
&pwm_ab {
|
||||
pinctrl-0 = <&pwm_a_e_pins>;
|
||||
pinctrl-names = "default";
|
||||
--
|
||||
2.34.1
|
||||
|
@@ -0,0 +1,37 @@
|
||||
From ec3b1240b428c5652ccb7fdadad217a2ff8ab4db Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <ec3b1240b428c5652ccb7fdadad217a2ff8ab4db.1642331593.git.stefan@agner.ch>
|
||||
In-Reply-To: <c7825747afd8bb975dc918f28e4afe8058a518f3.1642331593.git.stefan@agner.ch>
|
||||
References: <c7825747afd8bb975dc918f28e4afe8058a518f3.1642331593.git.stefan@agner.ch>
|
||||
From: Hyeonki Hong <hhk7734@gmail.com>
|
||||
Date: Wed, 7 Apr 2021 04:26:08 +0000
|
||||
Subject: [PATCH 02/10] arm64: dts: meson: add saradc node to ODROID N2/N2+
|
||||
|
||||
Add the meson saradc node to the ODROID N2/N2+ common dtsi.
|
||||
|
||||
Signed-off-by: Hyeonki Hong <hhk7734@gmail.com>
|
||||
Signed-off-by: Christian Hewitt <christianshewitt@gmail.com>
|
||||
Signed-off-by: Kevin Hilman <khilman@baylibre.com>
|
||||
Link: https://lore.kernel.org/r/20210407042609.9736-3-christianshewitt@gmail.com
|
||||
---
|
||||
arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi | 5 +++++
|
||||
1 file changed, 5 insertions(+)
|
||||
|
||||
diff --git a/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi
|
||||
index b78be3e6974d..8a5e132c4b79 100644
|
||||
--- a/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi
|
||||
+++ b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi
|
||||
@@ -508,6 +508,11 @@ &pwm_AO_cd {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
+&saradc {
|
||||
+ status = "okay";
|
||||
+ vref-supply = <&vddao_1v8>;
|
||||
+};
|
||||
+
|
||||
/* SD card */
|
||||
&sd_emmc_b {
|
||||
status = "okay";
|
||||
--
|
||||
2.34.1
|
||||
|
@@ -0,0 +1,78 @@
|
||||
From 5ca49a58577f7e9e6f8e0b1cb7c97e756a0e921f Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <5ca49a58577f7e9e6f8e0b1cb7c97e756a0e921f.1642331593.git.stefan@agner.ch>
|
||||
In-Reply-To: <c7825747afd8bb975dc918f28e4afe8058a518f3.1642331593.git.stefan@agner.ch>
|
||||
References: <c7825747afd8bb975dc918f28e4afe8058a518f3.1642331593.git.stefan@agner.ch>
|
||||
From: Hyeonki Hong <hhk7734@gmail.com>
|
||||
Date: Wed, 7 Apr 2021 04:26:09 +0000
|
||||
Subject: [PATCH 03/10] arm64: dts: meson: add GPIO line names to ODROID N2/N2+
|
||||
|
||||
Add GPIO line-name identifiers to the ODROID N2/N2+ common dtsi.
|
||||
|
||||
Signed-off-by: Hyeonki Hong <hhk7734@gmail.com>
|
||||
Signed-off-by: Christian Hewitt <christianshewitt@gmail.com>
|
||||
Reviewed-by: Neil Armstrong <narmstrong@baylibre.com>
|
||||
Signed-off-by: Kevin Hilman <khilman@baylibre.com>
|
||||
Link: https://lore.kernel.org/r/20210407042609.9736-4-christianshewitt@gmail.com
|
||||
---
|
||||
.../dts/amlogic/meson-g12b-odroid-n2.dtsi | 45 +++++++++++++++++++
|
||||
1 file changed, 45 insertions(+)
|
||||
|
||||
diff --git a/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi
|
||||
index 8a5e132c4b79..41b2f9c96b5f 100644
|
||||
--- a/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi
|
||||
+++ b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi
|
||||
@@ -446,6 +446,51 @@ &frddr_c {
|
||||
};
|
||||
|
||||
&gpio {
|
||||
+ gpio-line-names =
|
||||
+ /* GPIOZ */
|
||||
+ "", "", "", "", "", "", "", "",
|
||||
+ "", "", "", "", "", "", "", "",
|
||||
+ /* GPIOH */
|
||||
+ "", "", "", "", "", "", "", "",
|
||||
+ "",
|
||||
+ /* BOOT */
|
||||
+ "", "", "", "", "", "", "", "",
|
||||
+ "", "", "", "", "", "", "", "",
|
||||
+ /* GPIOC */
|
||||
+ "", "", "", "", "", "", "", "",
|
||||
+ /* GPIOA */
|
||||
+ "PIN_44", /* GPIOA_0 */
|
||||
+ "PIN_46", /* GPIOA_1 */
|
||||
+ "PIN_45", /* GPIOA_2 */
|
||||
+ "PIN_47", /* GPIOA_3 */
|
||||
+ "PIN_26", /* GPIOA_4 */
|
||||
+ "", "", "", "", "", "",
|
||||
+ "PIN_42", /* GPIOA_11 */
|
||||
+ "PIN_32", /* GPIOA_12 */
|
||||
+ "PIN_7", /* GPIOA_13 */
|
||||
+ "PIN_27", /* GPIOA_14 */
|
||||
+ "PIN_28", /* GPIOA_15 */
|
||||
+ /* GPIOX */
|
||||
+ "PIN_16", /* GPIOX_0 */
|
||||
+ "PIN_18", /* GPIOX_1 */
|
||||
+ "PIN_22", /* GPIOX_2 */
|
||||
+ "PIN_11", /* GPIOX_3 */
|
||||
+ "PIN_13", /* GPIOX_4 */
|
||||
+ "PIN_33", /* GPIOX_5 */
|
||||
+ "PIN_35", /* GPIOX_6 */
|
||||
+ "PIN_15", /* GPIOX_7 */
|
||||
+ "PIN_19", /* GPIOX_8 */
|
||||
+ "PIN_21", /* GPIOX_9 */
|
||||
+ "PIN_24", /* GPIOX_10 */
|
||||
+ "PIN_23", /* GPIOX_11 */
|
||||
+ "PIN_8", /* GPIOX_12 */
|
||||
+ "PIN_10", /* GPIOX_13 */
|
||||
+ "PIN_29", /* GPIOX_14 */
|
||||
+ "PIN_31", /* GPIOX_15 */
|
||||
+ "PIN_12", /* GPIOX_16 */
|
||||
+ "PIN_3", /* GPIOX_17 */
|
||||
+ "PIN_5", /* GPIOX_18 */
|
||||
+ "PIN_36"; /* GPIOX_19 */
|
||||
/*
|
||||
* WARNING: The USB Hub on the Odroid-N2 needs a reset signal
|
||||
* to be turned high in order to be detected by the USB Controller
|
||||
--
|
||||
2.34.1
|
||||
|
@@ -1,8 +1,10 @@
|
||||
From 86f6a398d2c080f92d51048ededf45efbe3a96d4 Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <86f6a398d2c080f92d51048ededf45efbe3a96d4.1676488652.git.stefan@agner.ch>
|
||||
From 70e65f906389f7236fe9ad8e1c05dedac0d1988b Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <70e65f906389f7236fe9ad8e1c05dedac0d1988b.1642331593.git.stefan@agner.ch>
|
||||
In-Reply-To: <c7825747afd8bb975dc918f28e4afe8058a518f3.1642331593.git.stefan@agner.ch>
|
||||
References: <c7825747afd8bb975dc918f28e4afe8058a518f3.1642331593.git.stefan@agner.ch>
|
||||
From: Stefan Agner <stefan@agner.ch>
|
||||
Date: Mon, 11 Jan 2021 11:20:48 +0100
|
||||
Subject: [PATCH] arm64: dts: meson: g12b: add power button support
|
||||
Subject: [PATCH 04/10] arm64: dts: meson: g12b: add power button support
|
||||
|
||||
Add power button support on J2 pin 11 (GPIOX_3 on the SoC side). The
|
||||
GPIO is low active, e.g. when connecting with pin 9 (GND) a power
|
||||
@@ -14,7 +16,7 @@ Signed-off-by: Stefan Agner <stefan@agner.ch>
|
||||
1 file changed, 11 insertions(+)
|
||||
|
||||
diff --git a/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi
|
||||
index fd3fa82e4c33..06bdba57b04c 100644
|
||||
index 41b2f9c96b5f..4b6bb7e74e25 100644
|
||||
--- a/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi
|
||||
+++ b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi
|
||||
@@ -39,6 +39,17 @@ emmc_pwrseq: emmc-pwrseq {
|
||||
@@ -36,5 +38,5 @@ index fd3fa82e4c33..06bdba57b04c 100644
|
||||
compatible = "gpio-leds";
|
||||
|
||||
--
|
||||
2.39.1
|
||||
2.34.1
|
||||
|
@@ -1,10 +1,10 @@
|
||||
From e269c47ef68371dbed1ff5919a67fcc385d8c6da Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <e269c47ef68371dbed1ff5919a67fcc385d8c6da.1676488652.git.stefan@agner.ch>
|
||||
In-Reply-To: <86f6a398d2c080f92d51048ededf45efbe3a96d4.1676488652.git.stefan@agner.ch>
|
||||
References: <86f6a398d2c080f92d51048ededf45efbe3a96d4.1676488652.git.stefan@agner.ch>
|
||||
From 86d9151effff69d2a8fc2027a31dd60bd8c6eb05 Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <86d9151effff69d2a8fc2027a31dd60bd8c6eb05.1642331593.git.stefan@agner.ch>
|
||||
In-Reply-To: <c7825747afd8bb975dc918f28e4afe8058a518f3.1642331593.git.stefan@agner.ch>
|
||||
References: <c7825747afd8bb975dc918f28e4afe8058a518f3.1642331593.git.stefan@agner.ch>
|
||||
From: Stefan Agner <stefan@agner.ch>
|
||||
Date: Mon, 11 Jan 2021 11:38:54 +0100
|
||||
Subject: [PATCH] arm64: dts: meson: g12b: add GPIO fan support
|
||||
Subject: [PATCH 05/10] arm64: dts: meson: g12b: add GPIO fan support
|
||||
|
||||
Add simple GPIO fan node to support a fan on GPIO J8. Unfortunately the
|
||||
pad used to control the fan does not support real PWM, hence the RPM
|
||||
@@ -16,7 +16,7 @@ Signed-off-by: Stefan Agner <stefan@agner.ch>
|
||||
1 file changed, 11 insertions(+)
|
||||
|
||||
diff --git a/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi
|
||||
index 06bdba57b04c..bcf6d8eacd6e 100644
|
||||
index 4b6bb7e74e25..e8a3ede698b5 100644
|
||||
--- a/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi
|
||||
+++ b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi
|
||||
@@ -39,6 +39,17 @@ emmc_pwrseq: emmc-pwrseq {
|
||||
@@ -38,5 +38,5 @@ index 06bdba57b04c..bcf6d8eacd6e 100644
|
||||
compatible = "gpio-keys-polled";
|
||||
poll-interval = <100>;
|
||||
--
|
||||
2.39.1
|
||||
2.34.1
|
||||
|
@@ -1,43 +0,0 @@
|
||||
From d6b1ddfb5816b887470452920d273661e361632d Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <d6b1ddfb5816b887470452920d273661e361632d.1676488652.git.stefan@agner.ch>
|
||||
In-Reply-To: <86f6a398d2c080f92d51048ededf45efbe3a96d4.1676488652.git.stefan@agner.ch>
|
||||
References: <86f6a398d2c080f92d51048ededf45efbe3a96d4.1676488652.git.stefan@agner.ch>
|
||||
From: Hyeonki Hong <hhk7734@gmail.com>
|
||||
Date: Tue, 1 Mar 2022 21:51:50 +0100
|
||||
Subject: [PATCH] ODROID-C4: arm64/dts: add uart_A node
|
||||
|
||||
---
|
||||
arch/arm64/boot/dts/amlogic/meson-sm1-odroid.dtsi | 9 ++++++++-
|
||||
1 file changed, 8 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/arch/arm64/boot/dts/amlogic/meson-sm1-odroid.dtsi b/arch/arm64/boot/dts/amlogic/meson-sm1-odroid.dtsi
|
||||
index ddb1b345397f..49b88c1e11cd 100644
|
||||
--- a/arch/arm64/boot/dts/amlogic/meson-sm1-odroid.dtsi
|
||||
+++ b/arch/arm64/boot/dts/amlogic/meson-sm1-odroid.dtsi
|
||||
@@ -10,8 +10,9 @@
|
||||
|
||||
/ {
|
||||
aliases {
|
||||
- serial0 = &uart_AO;
|
||||
ethernet0 = ðmac;
|
||||
+ serial0 = &uart_AO;
|
||||
+ serial1 = &uart_A;
|
||||
};
|
||||
|
||||
chosen {
|
||||
@@ -450,6 +451,12 @@ &tohdmitx {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
+&uart_A {
|
||||
+ status = "okay";
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&uart_a_pins>;
|
||||
+};
|
||||
+
|
||||
&uart_AO {
|
||||
status = "okay";
|
||||
pinctrl-0 = <&uart_ao_a_pins>;
|
||||
--
|
||||
2.39.1
|
||||
|
@@ -1,10 +1,11 @@
|
||||
From 8c3e65cf09d62797a2fe50234f30f33f6e4eda44 Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <8c3e65cf09d62797a2fe50234f30f33f6e4eda44.1676488652.git.stefan@agner.ch>
|
||||
In-Reply-To: <86f6a398d2c080f92d51048ededf45efbe3a96d4.1676488652.git.stefan@agner.ch>
|
||||
References: <86f6a398d2c080f92d51048ededf45efbe3a96d4.1676488652.git.stefan@agner.ch>
|
||||
From f1120f132dbdf2e7f7acf328de55bbdce877d882 Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <f1120f132dbdf2e7f7acf328de55bbdce877d882.1642331593.git.stefan@agner.ch>
|
||||
In-Reply-To: <c7825747afd8bb975dc918f28e4afe8058a518f3.1642331593.git.stefan@agner.ch>
|
||||
References: <c7825747afd8bb975dc918f28e4afe8058a518f3.1642331593.git.stefan@agner.ch>
|
||||
From: Stefan Agner <stefan@agner.ch>
|
||||
Date: Mon, 11 Jan 2021 15:53:55 +0100
|
||||
Subject: [PATCH] arm64: dts: meson: g12b: odroid-n2: add fan as cooling device
|
||||
Subject: [PATCH 06/10] arm64: dts: meson: g12b: odroid-n2: add fan as cooling
|
||||
device
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
@@ -20,10 +21,10 @@ Signed-off-by: Stefan Agner <stefan@agner.ch>
|
||||
1 file changed, 38 insertions(+)
|
||||
|
||||
diff --git a/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi
|
||||
index bcf6d8eacd6e..6dcf990e0efc 100644
|
||||
index e8a3ede698b5..dd345c6aa4b5 100644
|
||||
--- a/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi
|
||||
+++ b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi
|
||||
@@ -390,6 +390,44 @@ &clkc_audio {
|
||||
@@ -388,6 +388,44 @@ &clkc_audio {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
@@ -69,5 +70,5 @@ index bcf6d8eacd6e..6dcf990e0efc 100644
|
||||
cpu-supply = <&vddcpu_b>;
|
||||
operating-points-v2 = <&cpu_opp_table_0>;
|
||||
--
|
||||
2.39.1
|
||||
2.34.1
|
||||
|
@@ -1,10 +1,10 @@
|
||||
From 433c5a06b1195e2e689f8d260ec471caca2fa1b6 Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <433c5a06b1195e2e689f8d260ec471caca2fa1b6.1676488652.git.stefan@agner.ch>
|
||||
In-Reply-To: <86f6a398d2c080f92d51048ededf45efbe3a96d4.1676488652.git.stefan@agner.ch>
|
||||
References: <86f6a398d2c080f92d51048ededf45efbe3a96d4.1676488652.git.stefan@agner.ch>
|
||||
From dcaf2dc71dd62487eb37561682934414a5795e0e Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <dcaf2dc71dd62487eb37561682934414a5795e0e.1642331593.git.stefan@agner.ch>
|
||||
In-Reply-To: <c7825747afd8bb975dc918f28e4afe8058a518f3.1642331593.git.stefan@agner.ch>
|
||||
References: <c7825747afd8bb975dc918f28e4afe8058a518f3.1642331593.git.stefan@agner.ch>
|
||||
From: Hyeonki Hong <hhk7734@gmail.com>
|
||||
Date: Fri, 27 Mar 2020 17:05:22 +0900
|
||||
Subject: [PATCH] arm64: dts: meson: add uart_A node
|
||||
Subject: [PATCH 07/10] arm64: dts: meson: add uart_A node
|
||||
|
||||
The UART_A is available through J3 pin 8/10 and documented to be
|
||||
available as UART by default.
|
||||
@@ -15,7 +15,7 @@ Signed-off-by: Stefan Agner <stefan@agner.ch>
|
||||
1 file changed, 7 insertions(+)
|
||||
|
||||
diff --git a/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi
|
||||
index 6dcf990e0efc..7eaaced7893b 100644
|
||||
index dd345c6aa4b5..cec346178e3d 100644
|
||||
--- a/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi
|
||||
+++ b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi
|
||||
@@ -12,6 +12,7 @@
|
||||
@@ -26,7 +26,7 @@ index 6dcf990e0efc..7eaaced7893b 100644
|
||||
ethernet0 = ðmac;
|
||||
rtc0 = &rtc;
|
||||
rtc1 = &vrtc;
|
||||
@@ -730,6 +731,12 @@ &toddr_c {
|
||||
@@ -728,6 +729,12 @@ &toddr_c {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
@@ -40,5 +40,5 @@ index 6dcf990e0efc..7eaaced7893b 100644
|
||||
status = "okay";
|
||||
pinctrl-0 = <&uart_ao_a_pins>;
|
||||
--
|
||||
2.39.1
|
||||
2.34.1
|
||||
|
@@ -1,48 +0,0 @@
|
||||
From 8263e17f170296c28d3a781d5b05e59778fe4a27 Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <8263e17f170296c28d3a781d5b05e59778fe4a27.1676488652.git.stefan@agner.ch>
|
||||
In-Reply-To: <86f6a398d2c080f92d51048ededf45efbe3a96d4.1676488652.git.stefan@agner.ch>
|
||||
References: <86f6a398d2c080f92d51048ededf45efbe3a96d4.1676488652.git.stefan@agner.ch>
|
||||
From: Stefan Agner <stefan@agner.ch>
|
||||
Date: Wed, 15 Feb 2023 20:15:07 +0100
|
||||
Subject: [PATCH] arm64: dts: amlogic: add uartA/uartC to ODROID-C2
|
||||
|
||||
Signed-off-by: Stefan Agner <stefan@agner.ch>
|
||||
---
|
||||
.../arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts | 14 ++++++++++++++
|
||||
1 file changed, 14 insertions(+)
|
||||
|
||||
diff --git a/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts b/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts
|
||||
index 201596247fd9..b2cb12fb46fd 100644
|
||||
--- a/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts
|
||||
+++ b/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts
|
||||
@@ -17,6 +17,8 @@ / {
|
||||
|
||||
aliases {
|
||||
serial0 = &uart_AO;
|
||||
+ serial1 = &uart_A;
|
||||
+ serial2 = &uart_C;
|
||||
ethernet0 = ðmac;
|
||||
};
|
||||
|
||||
@@ -399,6 +401,18 @@ &uart_AO {
|
||||
pinctrl-names = "default";
|
||||
};
|
||||
|
||||
+&uart_A {
|
||||
+ status = "disabled";
|
||||
+ pinctrl-0 = <&uart_a_pins>;
|
||||
+ pinctrl-names = "default";
|
||||
+};
|
||||
+
|
||||
+&uart_C {
|
||||
+ status = "disabled";
|
||||
+ pinctrl-0 = <&uart_c_pins>;
|
||||
+ pinctrl-names = "default";
|
||||
+};
|
||||
+
|
||||
&usb0_phy {
|
||||
status = "disabled";
|
||||
phy-supply = <&usb_otg_pwr>;
|
||||
--
|
||||
2.39.1
|
||||
|
@@ -1,10 +1,10 @@
|
||||
From 00129576fb656015b66958f4d7370ee7e2d990e2 Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <00129576fb656015b66958f4d7370ee7e2d990e2.1676488652.git.stefan@agner.ch>
|
||||
In-Reply-To: <86f6a398d2c080f92d51048ededf45efbe3a96d4.1676488652.git.stefan@agner.ch>
|
||||
References: <86f6a398d2c080f92d51048ededf45efbe3a96d4.1676488652.git.stefan@agner.ch>
|
||||
From d5d2d8b9eb93eab85af12f1844975903a7c5a879 Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <d5d2d8b9eb93eab85af12f1844975903a7c5a879.1642331593.git.stefan@agner.ch>
|
||||
In-Reply-To: <c7825747afd8bb975dc918f28e4afe8058a518f3.1642331593.git.stefan@agner.ch>
|
||||
References: <c7825747afd8bb975dc918f28e4afe8058a518f3.1642331593.git.stefan@agner.ch>
|
||||
From: Stefan Agner <stefan@agner.ch>
|
||||
Date: Thu, 29 Apr 2021 21:32:43 +0200
|
||||
Subject: [PATCH] arm64: dts: meson: add i2c2 node to ODROID N2/N2+
|
||||
Subject: [PATCH 08/10] arm64: dts: meson: add i2c2 node to ODROID N2/N2+
|
||||
|
||||
The J2 connectors pinout documents "I2C.SDA0/SCL0" on pin 3 and 5, which
|
||||
are connected to GPIOX_17/18. This GPIO allow to mux I2C to the second
|
||||
@@ -16,10 +16,10 @@ Signed-off-by: Stefan Agner <stefan@agner.ch>
|
||||
1 file changed, 6 insertions(+)
|
||||
|
||||
diff --git a/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi
|
||||
index 7eaaced7893b..8d183253389c 100644
|
||||
index cec346178e3d..f1c3356c78a0 100644
|
||||
--- a/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi
|
||||
+++ b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi
|
||||
@@ -588,6 +588,12 @@ &ir {
|
||||
@@ -586,6 +586,12 @@ &ir {
|
||||
linux,rc-map-name = "rc-odroid";
|
||||
};
|
||||
|
||||
@@ -33,5 +33,5 @@ index 7eaaced7893b..8d183253389c 100644
|
||||
status = "okay";
|
||||
pinctrl-0 = <&i2c3_sda_a_pins>, <&i2c3_sck_a_pins>;
|
||||
--
|
||||
2.39.1
|
||||
2.34.1
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user