mirror of
https://github.com/home-assistant/operating-system.git
synced 2025-08-31 07:40:19 +00:00
Compare commits
375 Commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
ba5c46b822 | ||
![]() |
032eda4b59 | ||
![]() |
3d3f657fda | ||
![]() |
ee71753836 | ||
![]() |
ea47d13dfd | ||
![]() |
ca30c0c338 | ||
![]() |
635e648a0a | ||
![]() |
cf49bda43a | ||
![]() |
3f1223e4b4 | ||
![]() |
8e8b0c6231 | ||
![]() |
076f8ad8d1 | ||
![]() |
62c3dade5a | ||
![]() |
07c77a6d57 | ||
![]() |
482f6b6439 | ||
![]() |
de7d88e1b5 | ||
![]() |
60b6d064b2 | ||
![]() |
ca07152290 | ||
![]() |
34cf81b2e1 | ||
![]() |
9599917773 | ||
![]() |
b05fed4bad | ||
![]() |
e43d4cd632 | ||
![]() |
f9c29ef209 | ||
![]() |
743c770326 | ||
![]() |
4cecfaac18 | ||
![]() |
69d2f633c5 | ||
![]() |
aa752d7e87 | ||
![]() |
d59f59769c | ||
![]() |
24307c6302 | ||
![]() |
33b08f6dc0 | ||
![]() |
8d66357370 | ||
![]() |
d6d3097111 | ||
![]() |
915f5464c0 | ||
![]() |
0db7013427 | ||
![]() |
75b09cc42e | ||
![]() |
269e97cd1c | ||
![]() |
5c2408c023 | ||
![]() |
5fdcf8b218 | ||
![]() |
e369da7f5e | ||
![]() |
d72e038506 | ||
![]() |
158ec0c3c2 | ||
![]() |
2e378fd0dd | ||
![]() |
4873cc649e | ||
![]() |
9824cff052 | ||
![]() |
b72d175754 | ||
![]() |
230f95761f | ||
![]() |
1976d6bb8a | ||
![]() |
99ad9600ca | ||
![]() |
b1a51fd3e7 | ||
![]() |
397e0d0ed1 | ||
![]() |
7f6f15647a | ||
![]() |
2acaa52cb4 | ||
![]() |
2daa519c25 | ||
![]() |
d893c2e7b9 | ||
![]() |
311e183ce1 | ||
![]() |
5881c90e04 | ||
![]() |
70f090078e | ||
![]() |
a2accd3129 | ||
![]() |
3316967f87 | ||
![]() |
0e1727aa58 | ||
![]() |
654edc5a94 | ||
![]() |
335bf2d909 | ||
![]() |
cbf4a5cf27 | ||
![]() |
cd5fe135c2 | ||
![]() |
adb00e56a0 | ||
![]() |
c6adf07603 | ||
![]() |
aa3fc4766d | ||
![]() |
eca61d10a7 | ||
![]() |
b9ba103e07 | ||
![]() |
9bbe4509c6 | ||
![]() |
c751537fb7 | ||
![]() |
05c6e627e8 | ||
![]() |
561e73a4e9 | ||
![]() |
276d14fb7d | ||
![]() |
ae7b0dce54 | ||
![]() |
685530f9e1 | ||
![]() |
00723f2115 | ||
![]() |
5e5aaa21fd | ||
![]() |
9c554805b9 | ||
![]() |
34fffa63f1 | ||
![]() |
600eb5e208 | ||
![]() |
43797b2316 | ||
![]() |
c32e8be826 | ||
![]() |
09e7757300 | ||
![]() |
72725fd386 | ||
![]() |
367acbd884 | ||
![]() |
4413c6de74 | ||
![]() |
ea841dc751 | ||
![]() |
384fdabbfd | ||
![]() |
d56553c3da | ||
![]() |
ae853f2b28 | ||
![]() |
2a9df42e50 | ||
![]() |
252067ed2f | ||
![]() |
426156dc29 | ||
![]() |
1190f89571 | ||
![]() |
0174732265 | ||
![]() |
d4542ceb1e | ||
![]() |
0b2eea1abd | ||
![]() |
e67efbb118 | ||
![]() |
04e721b36f | ||
![]() |
3bb6442117 | ||
![]() |
2b3e806e56 | ||
![]() |
a034fc9997 | ||
![]() |
4861cc58ce | ||
![]() |
3160b59730 | ||
![]() |
032af2f56d | ||
![]() |
035e3884d8 | ||
![]() |
ce3c80641b | ||
![]() |
4eda8a1ff3 | ||
![]() |
b410b70814 | ||
![]() |
eca72c9898 | ||
![]() |
71974edfd7 | ||
![]() |
613604ea74 | ||
![]() |
6c62029a74 | ||
![]() |
a5209dc400 | ||
![]() |
1118335b1c | ||
![]() |
f96163f04e | ||
![]() |
b0dbbf963c | ||
![]() |
a38bf6e75a | ||
![]() |
0d892dbf23 | ||
![]() |
a403b790f7 | ||
![]() |
43aa64bb86 | ||
![]() |
ba17e542c5 | ||
![]() |
73dedf35de | ||
![]() |
96c622b36f | ||
![]() |
698f2bb7d4 | ||
![]() |
be39da4855 | ||
![]() |
b14d0223c2 | ||
![]() |
fcfd951f2b | ||
![]() |
fcefb1e515 | ||
![]() |
3070b52a3e | ||
![]() |
37639fc3ff | ||
![]() |
770bcb62a0 | ||
![]() |
b3530d1ce1 | ||
![]() |
ba9d1bac1e | ||
![]() |
db184bf5d3 | ||
![]() |
15a80bb405 | ||
![]() |
f0b5be41fe | ||
![]() |
517abe0ea9 | ||
![]() |
ca90fa515d | ||
![]() |
6605b1511f | ||
![]() |
f8b24f4b70 | ||
![]() |
ada03f6736 | ||
![]() |
04e679798a | ||
![]() |
6a49aa1c2b | ||
![]() |
34b7bbd68d | ||
![]() |
c0d8e14c2a | ||
![]() |
c017b43456 | ||
![]() |
98f13d9282 | ||
![]() |
5ef1e83197 | ||
![]() |
4df2ab6013 | ||
![]() |
45c62716cb | ||
![]() |
48f3045854 | ||
![]() |
3281cbd365 | ||
![]() |
5a6678147e | ||
![]() |
0c2b5aff65 | ||
![]() |
9dca4fc837 | ||
![]() |
fff08c6101 | ||
![]() |
1022053aef | ||
![]() |
0629c58d31 | ||
![]() |
bc2afe33b0 | ||
![]() |
2c963fcd05 | ||
![]() |
d4a403b640 | ||
![]() |
89cb68f7b7 | ||
![]() |
c371e45144 | ||
![]() |
2e7e039899 | ||
![]() |
c6e01d3468 | ||
![]() |
5336e17a06 | ||
![]() |
a017fae49d | ||
![]() |
96d59c2a40 | ||
![]() |
1f23c3ac72 | ||
![]() |
3f26a61d9a | ||
![]() |
6a728d916f | ||
![]() |
7f0ab07752 | ||
![]() |
7d7a52732d | ||
![]() |
2d6f692a4c | ||
![]() |
279a4c4db1 | ||
![]() |
a65db13c9e | ||
![]() |
a592fc9866 | ||
![]() |
66c1b016c9 | ||
![]() |
f9a3bccf7b | ||
![]() |
1c95022184 | ||
![]() |
d4deca66b2 | ||
![]() |
1c2ef541ea | ||
![]() |
55d84758a2 | ||
![]() |
82010866b1 | ||
![]() |
294ad6cd58 | ||
![]() |
bfdedbffe6 | ||
![]() |
d409e328be | ||
![]() |
a6ae25da06 | ||
![]() |
bc1266a44b | ||
![]() |
c1eb0ac4cd | ||
![]() |
9939422d10 | ||
![]() |
51cf310472 | ||
![]() |
f38a31eee3 | ||
![]() |
e388662422 | ||
![]() |
0258ef641d | ||
![]() |
bf29dd3971 | ||
![]() |
7314ce1963 | ||
![]() |
70d69d3518 | ||
![]() |
574c883207 | ||
![]() |
5812ed014e | ||
![]() |
13e4578b7a | ||
![]() |
d6a700565e | ||
![]() |
d9d8c96c70 | ||
![]() |
329caf6c1c | ||
![]() |
27ee3ef98f | ||
![]() |
63967cf6c0 | ||
![]() |
a874bb5fb5 | ||
![]() |
dc4ee61809 | ||
![]() |
febc4473d3 | ||
![]() |
7b379e648c | ||
![]() |
e4bff62923 | ||
![]() |
3839e43428 | ||
![]() |
9e8cccdf82 | ||
![]() |
f87032c302 | ||
![]() |
30aa775450 | ||
![]() |
308fccd7b1 | ||
![]() |
6e7bbdbe63 | ||
![]() |
4c9a4aadc8 | ||
![]() |
d340e79bea | ||
![]() |
09cf67cb73 | ||
![]() |
0ef7c459ca | ||
![]() |
bf9795f70b | ||
![]() |
712dcf9f74 | ||
![]() |
c42dba1623 | ||
![]() |
d44d271c28 | ||
![]() |
501b4bd9f4 | ||
![]() |
2fd14442c7 | ||
![]() |
4efd038805 | ||
![]() |
3e1adf8325 | ||
![]() |
60e4d1a3cd | ||
![]() |
a13089516e | ||
![]() |
2e3e518982 | ||
![]() |
c12ae11ed7 | ||
![]() |
956badb2fd | ||
![]() |
e71400cd5c | ||
![]() |
6668d77b93 | ||
![]() |
629f13f3d9 | ||
![]() |
dfe261a715 | ||
![]() |
756a0c9b13 | ||
![]() |
49948b577e | ||
![]() |
61516914ce | ||
![]() |
c424b295b1 | ||
![]() |
c37d0ecd76 | ||
![]() |
37615a135b | ||
![]() |
abf9a3b7c3 | ||
![]() |
c87ac63e9b | ||
![]() |
28d262eecd | ||
![]() |
d1d3593d65 | ||
![]() |
9f06ffbbd5 | ||
![]() |
b963b1a587 | ||
![]() |
998c8365c0 | ||
![]() |
70e43c02fb | ||
![]() |
fed40532c1 | ||
![]() |
08fac89fb0 | ||
![]() |
e7da2e0779 | ||
![]() |
3d999f8936 | ||
![]() |
b26d4bbb40 | ||
![]() |
e5734a9024 | ||
![]() |
8c691e8e56 | ||
![]() |
14d91e094a | ||
![]() |
2f40d76b6f | ||
![]() |
219e9ca1ef | ||
![]() |
f3f9bd9697 | ||
![]() |
2e205cafd3 | ||
![]() |
4d7e0977ac | ||
![]() |
0f93fcc477 | ||
![]() |
fa6f7ac74d | ||
![]() |
081f7124d7 | ||
![]() |
2caaf89186 | ||
![]() |
5a612922f3 | ||
![]() |
9f584f2c6a | ||
![]() |
ee4b3a101e | ||
![]() |
a04fa47883 | ||
![]() |
efc61a57d9 | ||
![]() |
1e627fed34 | ||
![]() |
20afea35d9 | ||
![]() |
db8127c253 | ||
![]() |
e03ea97133 | ||
![]() |
3d858e3bb6 | ||
![]() |
a0cba05830 | ||
![]() |
868935f8a0 | ||
![]() |
6581ec4028 | ||
![]() |
41d3f59002 | ||
![]() |
bb201fb842 | ||
![]() |
a55aaf7f38 | ||
![]() |
edcca58e38 | ||
![]() |
d1c2715402 | ||
![]() |
1febb31647 | ||
![]() |
d5e6cc78d5 | ||
![]() |
e8d14bdc60 | ||
![]() |
5f1fadad29 | ||
![]() |
5c38357ba6 | ||
![]() |
27aa12911d | ||
![]() |
c662ef86d7 | ||
![]() |
450a8295f7 | ||
![]() |
a13e7ad3e1 | ||
![]() |
3077b9423d | ||
![]() |
6204b3d165 | ||
![]() |
1624e26447 | ||
![]() |
cec027a6e6 | ||
![]() |
d347532c96 | ||
![]() |
d9c2347e7c | ||
![]() |
2e7c93428d | ||
![]() |
4455e9a907 | ||
![]() |
5d16ac24c3 | ||
![]() |
f715486c58 | ||
![]() |
7c77a692ce | ||
![]() |
ac5121f067 | ||
![]() |
e34b01755e | ||
![]() |
5971ee1a46 | ||
![]() |
6bda70a451 | ||
![]() |
9a9e2cc5df | ||
![]() |
3dbe3e9ea7 | ||
![]() |
3ad7dc3714 | ||
![]() |
1a3bcf6486 | ||
![]() |
6ddbfabfae | ||
![]() |
c72e61e542 | ||
![]() |
f8081d7829 | ||
![]() |
27c25da90d | ||
![]() |
d47e169bd5 | ||
![]() |
6510cf9619 | ||
![]() |
1419e72dbc | ||
![]() |
30448dbc5a | ||
![]() |
85c82c4479 | ||
![]() |
e21f59111c | ||
![]() |
543075222e | ||
![]() |
661b39565f | ||
![]() |
7439de3d25 | ||
![]() |
c9f4879780 | ||
![]() |
60cf077e48 | ||
![]() |
06e65b5734 | ||
![]() |
ac70f1bfac | ||
![]() |
1fc912eaf9 | ||
![]() |
83a0981113 | ||
![]() |
79dc34c531 | ||
![]() |
6ca35fb1af | ||
![]() |
e273883077 | ||
![]() |
0fb9102e69 | ||
![]() |
9a4027e9d4 | ||
![]() |
5e82060124 | ||
![]() |
d861ecae6f | ||
![]() |
061ab0ed8a | ||
![]() |
722f27d3c8 | ||
![]() |
57ec2bb25c | ||
![]() |
f0c38a20bc | ||
![]() |
267b61405d | ||
![]() |
98b14be0f6 | ||
![]() |
fa20ccdd94 | ||
![]() |
454964877d | ||
![]() |
16fcb84886 | ||
![]() |
1d40ffd4f9 | ||
![]() |
a21871f4af | ||
![]() |
ba01ed951b | ||
![]() |
7308bad953 | ||
![]() |
9415e2c5d0 | ||
![]() |
aa392e78a6 | ||
![]() |
2703ec31b9 | ||
![]() |
8cd0ca2cfe | ||
![]() |
c317941767 | ||
![]() |
d1cf8e0016 | ||
![]() |
188fbc340e | ||
![]() |
5e8f910714 | ||
![]() |
30b599acc6 | ||
![]() |
7b4be3b4f7 | ||
![]() |
662eda3c3b | ||
![]() |
aad41225f4 | ||
![]() |
d697c4bc8e | ||
![]() |
2a2e97ddf9 | ||
![]() |
32fe415515 | ||
![]() |
292e4b3515 | ||
![]() |
1a337ab937 | ||
![]() |
43828c2555 | ||
![]() |
73a875c263 | ||
![]() |
c270ac5c9a |
32
.github/ISSUE_TEMPLATE.md
vendored
Normal file
32
.github/ISSUE_TEMPLATE.md
vendored
Normal file
@@ -0,0 +1,32 @@
|
||||
<!-- READ THIS FIRST:
|
||||
- If you need additional help with this template please refer to https://www.home-assistant.io/help/reporting_issues/
|
||||
- Make sure you are running the latest version before reporting an issue: https://github.com/home-assistant/home-assistant/releases
|
||||
- Do not report issues for components here, plaese refer to https://github.com/home-assistant/home-assistant/issues
|
||||
- This is for bugs only. Feature and enhancement requests should go in our community forum: https://community.home-assistant.io/c/feature-requests
|
||||
- Provide as many details as possible. Paste logs, configuration sample and code into the backticks. Do not delete any text from this template!
|
||||
- If you have a problem with a Add-on, make a issue on there repository.
|
||||
-->
|
||||
|
||||
**HassOS release with the issue:**
|
||||
<!--
|
||||
- Frontend -> Developer tools -> Info
|
||||
- Or use this command: hass --version
|
||||
-->
|
||||
|
||||
**Supervisor logs:**
|
||||
<!--
|
||||
- Frontend -> Hass.io -> System
|
||||
- Or use this command: ha su logs
|
||||
-->
|
||||
|
||||
**Journal logs:**
|
||||
<!--
|
||||
- use this command: journalctl
|
||||
-->
|
||||
|
||||
**Kernel logs:**
|
||||
<!--
|
||||
- use this command: dmesg
|
||||
-->
|
||||
|
||||
**Description of problem:**
|
17
.github/release-drafter.yml
vendored
Normal file
17
.github/release-drafter.yml
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
categories:
|
||||
- title: 'HassOS Core'
|
||||
label: 'os'
|
||||
- title: 'Build'
|
||||
label: 'build'
|
||||
- title: 'Raspberry Pi'
|
||||
label: 'board/raspberrypi'
|
||||
- title: 'Open Virtual Appliance'
|
||||
label: 'board/ova'
|
||||
- title: 'Intel-Nuc'
|
||||
label: 'board/intel-nuc'
|
||||
- title: 'Hardkernel'
|
||||
label: 'board/hardkernel'
|
||||
template: |
|
||||
## Changes
|
||||
|
||||
$CHANGES
|
17
.github/stale.yml
vendored
Normal file
17
.github/stale.yml
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
# Number of days of inactivity before an issue becomes stale
|
||||
daysUntilStale: 60
|
||||
# Number of days of inactivity before a stale issue is closed
|
||||
daysUntilClose: 7
|
||||
# Issues with these labels will never be considered stale
|
||||
exemptLabels:
|
||||
- pinned
|
||||
- security
|
||||
# Label to use when marking an issue as stale
|
||||
staleLabel: wontfix
|
||||
# Comment to post when marking an issue as stale. Set to `false` to disable
|
||||
markComment: >
|
||||
This issue has been automatically marked as stale because it has not had
|
||||
recent activity. It will be closed if no further activity occurs. Thank you
|
||||
for your contributions.
|
||||
# Comment to post when closing a stale issue. Set to `false` to disable
|
||||
closeComment: false
|
2
.hadolint.yaml
Normal file
2
.hadolint.yaml
Normal file
@@ -0,0 +1,2 @@
|
||||
ignored:
|
||||
- DL3008
|
25
.travis.yml
25
.travis.yml
@@ -1,25 +0,0 @@
|
||||
language: bash
|
||||
|
||||
sudo: required
|
||||
service: docker
|
||||
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
- docker-ce
|
||||
|
||||
before_install:
|
||||
- shopt -s globstar
|
||||
- docker pull koalaman/shellcheck
|
||||
|
||||
script:
|
||||
- docker run -v $(pwd):/mnt koalaman/shellcheck scripts/*.sh
|
||||
- docker run -v $(pwd):/mnt koalaman/shellcheck buildroot-external/scripts/*.sh
|
||||
- docker run -v $(pwd):/mnt koalaman/shellcheck buildroot-external/scripts/*.sh
|
||||
- docker run -v $(pwd):/mnt koalaman/shellcheck buildroot-external/board/**/*.sh
|
||||
- docker run -v $(pwd):/mnt koalaman/shellcheck buildroot-external/rootfs-overlay/usr/sbin/*
|
||||
- docker run -v $(pwd):/mnt koalaman/shellcheck buildroot-external/rootfs-overlay/usr/libexec/*
|
||||
- docker run -v $(pwd):/mnt koalaman/shellcheck buildroot-external/rootfs-overlay/usr/lib/rauc/*
|
||||
|
||||
matrix:
|
||||
fast_finish: true
|
42
Dockerfile
42
Dockerfile
@@ -1,21 +1,43 @@
|
||||
FROM ubuntu:18.04
|
||||
FROM debian:buster
|
||||
|
||||
# Set shell
|
||||
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
|
||||
|
||||
# Docker
|
||||
RUN apt-get update && apt-get install -y \
|
||||
RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||
apt-transport-https \
|
||||
ca-certificates \
|
||||
curl \
|
||||
gpg-agent \
|
||||
gpg \
|
||||
dirmngr \
|
||||
software-properties-common \
|
||||
&& rm -rf /var/lib/apt/lists/* \
|
||||
&& curl -fsSL https://download.docker.com/linux/ubuntu/gpg | apt-key add - \
|
||||
&& add-apt-repository "deb https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" \
|
||||
&& apt-get update && apt-get install -y docker-ce \
|
||||
&& curl -fsSL https://download.docker.com/linux/debian/gpg | apt-key add - \
|
||||
&& add-apt-repository "deb https://download.docker.com/linux/debian $(lsb_release -cs) stable" \
|
||||
&& apt-get update && apt-get install -y --no-install-recommends \
|
||||
docker-ce \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Build Tools
|
||||
RUN apt-get update && apt-get install -y \
|
||||
wget patch vim cpio python unzip rsync bc bzip2 ncurses-dev \
|
||||
git make g++ file perl bash binutils locales qemu-utils bison flex \
|
||||
# Build tools
|
||||
RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||
bash \
|
||||
bc \
|
||||
binutils \
|
||||
build-essential \
|
||||
bzip2 \
|
||||
cpio \
|
||||
file \
|
||||
git \
|
||||
make \
|
||||
ncurses-dev \
|
||||
patch \
|
||||
perl \
|
||||
python \
|
||||
rsync \
|
||||
sudo \
|
||||
unzip \
|
||||
wget \
|
||||
qemu-utils \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Init entry
|
||||
|
13
Documentation/README.md
Normal file
13
Documentation/README.md
Normal file
@@ -0,0 +1,13 @@
|
||||
# Developer Documentation
|
||||
|
||||
## Contents
|
||||
|
||||
- [Getting started](./getting_started_development.md) - the place for developers to begin
|
||||
- [Development](./getting_started_development.md) - more deatils for developers
|
||||
- [Deployment](./deployment.md) - approach to git branching and releases
|
||||
- [Configuration](./configuration.md) - how users can configure HassOS
|
||||
- [Partition](./partition.md) - partition layout
|
||||
- [Network](./network.md) - approach to networking
|
||||
- [Bluetooth](./bluetooth.md) - approach to bluetooth
|
||||
- [Kernel](./kernel.md) - kernel versions
|
||||
- [Boards](./boards/README.md) - board specific documentation
|
@@ -1,9 +1,9 @@
|
||||
# Bluetooth
|
||||
|
||||
We support `bluetoothctl` on host. Later we want also support Bluetooth trought UI.
|
||||
We support `bluetoothctl` on the host. Later we want to support Bluetooth through the UI.
|
||||
All pairs and settings are persistent over reboots and updates.
|
||||
|
||||
If you want setup Bluetooth on host, use the `bluetoothctl` utility.
|
||||
If you want to setup Bluetooth on the host, use the `bluetoothctl` utility.
|
||||
|
||||
## Scan devices
|
||||
|
||||
|
53
Documentation/boards/README.md
Normal file
53
Documentation/boards/README.md
Normal file
@@ -0,0 +1,53 @@
|
||||
# Boards
|
||||
|
||||
## Overview
|
||||
|
||||
The following boards/devices are supported:
|
||||
|
||||
- Raspberry Pi
|
||||
- Pi 4 Model B (1 GB, 2 GB and 4 GB model) 32-bit (recommended)
|
||||
- Pi 4 Model B (1 GB, 2 GB and 4 GB model) 64-bit
|
||||
- Pi 3 Model B and B+ 32-bit (recommended)
|
||||
- Pi 3 Model B and B+ 64-bit
|
||||
- Pi 2 (not recommended)
|
||||
- Pi Zero-W (not recommended)
|
||||
- Pi (not recommended)
|
||||
- Hardkernel
|
||||
- Odroid-C2
|
||||
- Odroid-N2
|
||||
- Odroid-XU4
|
||||
- Intel NUC
|
||||
- Intel NUC5CPYH
|
||||
- Intel NUC6CAYH
|
||||
- Intel NUC10I3FNK2
|
||||
- Gigabyte GB-BPCE-3455
|
||||
- Others recent Intel NUC computers are likely to work too, only those listed above have been tested.
|
||||
- Asus
|
||||
- Tinker Board
|
||||
- Virtual appliance (x86_64/UEFI):
|
||||
- VMDK
|
||||
- OVA ?
|
||||
- VHDX ?
|
||||
- VDI ?
|
||||
- QCOW2 ?
|
||||
|
||||
Notes:
|
||||
- see ? above: are these currently supported? see ova documentation which explains issues with previous OVA distribution)
|
||||
|
||||
## Board specifics
|
||||
|
||||
|Board|Build|Config|Docs|
|
||||
|-----|----|------|----|
|
||||
|Pi4B 32-bit |`make rpi4` |[rpi4](../../buildroot-external/configs/rpi4_defconfig)|[raspberrypi](./raspberrypi/)|
|
||||
|Pi4B 64-bit |`make rpi4_64` |[rpi4_64](../../buildroot-external/configs/rpi4_64_defconfig)|[raspberrypi](./raspberrypi/)|
|
||||
|Pi3B 32-bit |`make rpi3` |[rpi3](../../buildroot-external/configs/rpi3_defconfig)|[raspberrypi](./raspberrypi/)|
|
||||
|Pi3B 64-bit |`make rpi3_64` |[rpi3_64](../../buildroot-external/configs/rpi3_64_defconfig)|[raspberrypi](./raspberrypi/)|
|
||||
|Pi2 |`make rpi2` |[rpi2](../../buildroot-external/configs/rpi2_defconfig)|[raspberrypi](./raspberrypi/)|
|
||||
|Pi Zero |`make rpi0_w` |[rpi0_w](../../buildroot-external/configs/rpi0_w_defconfig)|[raspberrypi](./raspberrypi/)|
|
||||
|Pi |`make rpi` |[rpi](../../buildroot-external/configs/rpi_defconfig)|[raspberrypi](./raspberrypi/)|
|
||||
|Odroid-C2 |`make odroid_c2` |[odroid_c2](../../buildroot-external/configs/odroid_c2_defconfig)|[hardkernel](./hardkernel/)|
|
||||
|Odroid-N2 |`make odroid_n2` |[odroid_n2](../../buildroot-external/configs/odroid_n2_defconfig)|[hardkernel](./hardkernel/)|
|
||||
|Odroid-XU4 |`make odroid_xu4`|[odroid_xu4](../../buildroot-external/configs/odroid_xu4_defconfig)|[hardkernel](./hardkernel/)|
|
||||
|NUC |`make intel_nuc` |[intel_nuc](../../buildroot-external/configs/intel_nuc_defconfig)|[intel](./intel/)|
|
||||
|Tinker Board|`make tinker` |[tinker](../../buildroot-external/configs/tinker_defconfig)|[asus](./asus/)|
|
||||
|OVA |`make ova` |[ova](../../buildroot-external/configs/ova_defconfig)|[ova](./ova/)|
|
21
Documentation/boards/asus/README.md
Normal file
21
Documentation/boards/asus/README.md
Normal file
@@ -0,0 +1,21 @@
|
||||
# Tinker Board
|
||||
|
||||
## Supported Hardware
|
||||
|
||||
| Device | Release Date | Support | Config |
|
||||
|----------------|---------------|---------|----------|
|
||||
| Tinker RK3288 | April 2017 | yes | [tinker](../../../buildroot-external/configs/tinker_defconfig) |
|
||||
| Tinker S RK3288| January 2018 | yes? | [tinker](../../../buildroot-external/configs/tinker_defconfig)? |
|
||||
| Tinker Edge T | November 2019 | no? | |
|
||||
| Tinker Edge R | November 2019 | no? | |
|
||||
|
||||
(? is the Tinker S supported?)
|
||||
<!--
|
||||
## eMMC
|
||||
|
||||
eMMC support is provided transparently. Just flash the image to the eMMC by connecting your Tinker Board S to your PC via Micro-USB.
|
||||
-->
|
||||
|
||||
## Serial console
|
||||
|
||||
To access the terminal over serial console, add `console=ttyS2,115200` to `cmdline.txt`. GPIO pins are: 34 = GND / 32 = UART TXD / 33 = UART RXD.
|
11
Documentation/boards/hardkernel/README.md
Normal file
11
Documentation/boards/hardkernel/README.md
Normal file
@@ -0,0 +1,11 @@
|
||||
# ODROID
|
||||
|
||||
## Supported Hardware
|
||||
|
||||
| Device | Release Date | Support | Config |
|
||||
|----------------|---------------|---------|-----------|
|
||||
| ODROID-XU4 | 2015 | yes | [odroid_xu4](../../../buildroot-external/configs/odroid_xu4_defconfig)|
|
||||
| ODROID-C2 | 2016 | yes | [odroid_c2](../../../buildroot-external/configs/odroid_c2_defconfig) |
|
||||
| ODROID-N2 | 2019 | yes | [odroid_n2](../../../buildroot-external/configs/odroid_n2_defconfig) |
|
||||
|
||||
See separate documentation for each board.
|
14
Documentation/boards/hardkernel/odroid-n2.md
Normal file
14
Documentation/boards/hardkernel/odroid-n2.md
Normal file
@@ -0,0 +1,14 @@
|
||||
# Odroid-N2
|
||||
|
||||
## eMMC
|
||||
|
||||
eMMC support is provided transparently. Just flash the image to the eMMC board as you would an SD card.
|
||||
|
||||
## Console
|
||||
|
||||
By default, console access is granted over the serial header and over HDMI. Certain startup messages will only appear on the serial console by default. To show the messages on the HDMI console instead, swap the order of the two consoles in the `cmdline.txt` file on the boot partition. You can also delete the AML0 console if you don't plan on using the serial adapter.
|
||||
eg. `console=ttyAML0,115200n8 console=tty0`
|
||||
|
||||
## GPIO
|
||||
|
||||
Refer to [the odroid wiki](https://wiki.odroid.com/odroid-n2/hardware/expansion_connectors).
|
29
Documentation/boards/hardkernel/odroid-xu4.md
Normal file
29
Documentation/boards/hardkernel/odroid-xu4.md
Normal file
@@ -0,0 +1,29 @@
|
||||
# ODROID-XU4
|
||||
|
||||
## eMMC
|
||||
|
||||
The ODROID XU4 uses the eMMC boot partition to boot from. Typically eMMC readers can't write to this eMMC boot partition. There are a couple of possibilities:
|
||||
|
||||
1. **Working** e.g. the eMMC already had a working image before flashing HassOS:
|
||||
- It will be booting to U-Boot (but no further).
|
||||
- If you have the serial adapter, you should be able to enter `distro_bootcmd` at the uboot prompt to continue booting.
|
||||
- If not, flash the HassOS image to an SD card and boot off that temporarily (while the eMMC is also plugged in).
|
||||
- Once booted, login at the prompts and then enter `dd if=/dev/mmcblk0 of=/dev/mmcblk0boot0 bs=512 skip=63 seek=62 count=1440` at the linux prompt.
|
||||
- Reboot with eMMC (don't forget to flip the boot switch to eMMC)
|
||||
2. **Not Working** e.g. a clean/wiped/corruped eMMC boot partition:
|
||||
- You'll need to follow [Hardkernel's instructions](https://forum.odroid.com/viewtopic.php?f=53&t=6173) to get a working boot sector. Then flash HassOS and follow instructions above.
|
||||
- Alternatively, you can try flash HassOS to both an SD and eMMC, then boot off the SD with the eMMC also plugged in, then run `dd if=/dev/mmcblk1 of=/dev/mmcblk0boot0 bs=512 skip=1 seek=0 count=16381` at the Linux prompt. Note that this is untested, but in theory should work..
|
||||
|
||||
If you are getting permissions issues when using the dd command, try disabling RO:
|
||||
`echo 0 > /sys/block/mmcblk0boot0/force_ro`
|
||||
to re-enable after running dd:
|
||||
`echo 1 > /sys/block/mmcblk0boot0/force_ro`
|
||||
|
||||
## Console
|
||||
|
||||
By default, console access is granted over the serial header and over HDMI. Certain startup messages will only appear on the serial console by default. To show the messages on the HDMI console instead, swap the order of the two consoles in the `cmdline.txt` file on the boot partition. You can also delete the SAC2 console if you don't plan on using the serial adapter.
|
||||
eg. `console=tty1 console=ttySAC2,115200`
|
||||
|
||||
## GPIO
|
||||
|
||||
Refer to [the odroid wiki](https://wiki.odroid.com/odroid-xu4/hardware/expansion_connectors).
|
56
Documentation/boards/intel/README.md
Normal file
56
Documentation/boards/intel/README.md
Normal file
@@ -0,0 +1,56 @@
|
||||
# Intel NUC
|
||||
|
||||
## Supported Hardware
|
||||
|
||||
This board configuration supports the Intel NUC mini PCs and compatibles. It should work for most recent NUC computers and, because this is a UEFI based image, it should in fact work with for any x86-64 based computer with UEFI. Hardware it has been tested with is listed below.
|
||||
|
||||
## Tested Hardware
|
||||
|
||||
| Device | Release Date | Support | Config |
|
||||
|-----------------------|--------------|---------|-------------|
|
||||
| Intel NUC5CPYH | Q3 2015 | yes | [intel_nuc](../../../buildroot-external/configs/intel_nuc_defconfig) |
|
||||
| Intel NUC6CAYH | Q4 2016 | yes | [intel_nuc](../../../buildroot-external/configs/intel_nuc_defconfig) |
|
||||
| Intel NUC10i3FNK2 | Q4 2019 | yes | [intel_nuc](../../../buildroot-external/configs/intel_nuc_defconfig) |
|
||||
| Gigabyte GB-BPCE-3455 | 2017 | yes* | [intel_nuc](../../../buildroot-external/configs/intel_nuc_defconfig) |
|
||||
|
||||
\* needs 'nomodeset' in cmdline.txt if you want a console
|
||||
|
||||
|
||||
## Requirements
|
||||
|
||||
- x86-64 support
|
||||
- UEFI boot
|
||||
- SATA/AHCI storage
|
||||
- Supported NIC:
|
||||
- Intel Gigabit NIC (e1000, igb - via Linux mainline)
|
||||
- Intel PCIe Gigabit NIC (e1000e - via out-of-tree module in *buildroot-external/package/intel-e1000e*)
|
||||
- Realtek Gigabit NIC (r8169)
|
||||
- Intel Wireless Wifi 802.11ac (iwlwifi, see below)
|
||||
|
||||
## Wifi
|
||||
|
||||
The following cards are supported:
|
||||
|
||||
- Intel Wireless 3160
|
||||
- Intel Wireless 7260
|
||||
- Intel Wireless 7265
|
||||
- Intel Wireless-AC 3165
|
||||
- Intel Wireless-AC 3168
|
||||
- Intel Wireless-AC 8260
|
||||
- Intel Wireless-AC 8265
|
||||
- Intel Wireless-AC 9260
|
||||
- Intel Wireless-AC 9461
|
||||
- Intel Wireless-AC 9462
|
||||
- Intel Wireless-AC 9560
|
||||
|
||||
## Bluetooth
|
||||
|
||||
Bluetooth is untested.
|
||||
|
||||
## Installation
|
||||
|
||||
Currently there is no shiny installation method. Checklist:
|
||||
- Boot PC to live-environment using PXE or USB
|
||||
- Copy or download the hassos image into your live environment
|
||||
- zcat the image to local harddisk
|
||||
- Reboot
|
@@ -1,50 +0,0 @@
|
||||
# Intel NUC
|
||||
|
||||
This board configuration supports the Intel NUC mini PCs and compatibles.
|
||||
Probably most recent computers will work.
|
||||
|
||||
Requirements:
|
||||
- x86-64 support
|
||||
- UEFI boot
|
||||
- SATA/AHCI storage
|
||||
- Supported NIC:
|
||||
- Intel Gigabit NIC (e1000, e1000e, igb)
|
||||
- Realtek Gigabit NIC (r8169)
|
||||
- Intel Wireless Wifi 802.11ac (iwlwifi, see below)
|
||||
|
||||
## Tested Hardware
|
||||
|
||||
| Device | Quirks |
|
||||
|--------|-----------|
|
||||
| Intel NUC5CPYH | |
|
||||
| Gigabyte GB-BPCE-3455 | needs 'nomodeset' in cmdline.txt if you want a console |
|
||||
|
||||
|
||||
## Wifi
|
||||
|
||||
The following cards are supported:
|
||||
|
||||
- Intel Wireless 3160
|
||||
- Intel Wireless 7260
|
||||
- Intel Wireless 7265
|
||||
- Intel Wireless-AC 3165
|
||||
- Intel Wireless-AC 3168
|
||||
- Intel Wireless-AC 8260
|
||||
- Intel Wireless-AC 8265
|
||||
- Intel Wireless-AC 9260
|
||||
- Intel Wireless-AC 9461
|
||||
- Intel Wireless-AC 9462
|
||||
- Intel Wireless-AC 9560
|
||||
|
||||
## Bluetooth
|
||||
|
||||
Bluetooth is untested.
|
||||
|
||||
## Installation
|
||||
|
||||
Currently there is no shiny installation method. Checklist:
|
||||
- Boot PC to live-environment using PXE or USB
|
||||
- Copy or download the hassos image into your live environment
|
||||
- zcat the image to local harddisk
|
||||
- Reboot
|
||||
|
@@ -1,20 +0,0 @@
|
||||
# Raspberry PI
|
||||
|
||||
Supported Hardware:
|
||||
|
||||
| Device | Board |
|
||||
|--------|-----------|
|
||||
| Orange Pi Prime | opi-prime |
|
||||
|
||||
## Serial console
|
||||
|
||||
The serial port on the Orange Pi Prime is a 3 pin header located between the
|
||||
power and reset buttons. The pins are labelled away from the board edge. Flow
|
||||
control must be disabled in order to send data. The serial specs are 3.3V TTL,
|
||||
115200,8,n,1
|
||||
|
||||
## I2C
|
||||
|
||||
Add `dtparam=i2c0=on` to `cmdline.txt`
|
||||
|
||||
[config]: ../configuration.md#automatic
|
@@ -1,16 +0,0 @@
|
||||
# OVA
|
||||
|
||||
OVA stands for Open Virtual Appliance. Currently we had remove the ova files and publish a vmdk virtual disk,
|
||||
until we have better OVF template to generate our OVA. This VMDK work with (maybe you need convert the disk):
|
||||
- HyperV
|
||||
- VirtualBox
|
||||
- VMware
|
||||
|
||||
## Virtual Machine
|
||||
|
||||
You can use this vmdk in a virtual machine with follow requirements:
|
||||
- OS: Linux 64bit
|
||||
- UEFI boot
|
||||
- min. 1GB RAM
|
||||
- 2x vcpu
|
||||
- 1x Network
|
22
Documentation/boards/ova/README.md
Normal file
22
Documentation/boards/ova/README.md
Normal file
@@ -0,0 +1,22 @@
|
||||
# Virtual Machine
|
||||
|
||||
## Supported Hypervisors
|
||||
|
||||
| Hypervisor | Vendor | Support | Config |
|
||||
|---------------------|-----------|-----------------|--------------------|
|
||||
| HyperV | Microsoft | yes, via VMDK | [ova](../../../buildroot-external/configs/ova_defconfig) |
|
||||
| VirtualBox | Oracle | yes, via VMDK | [ova](../../../buildroot-external/configs/ova_defconfig) |
|
||||
| VMware | VMware | yes, via VMDK | [ova](../../../buildroot-external/configs/ova_defconfig) |
|
||||
|
||||
Currently we only publish a VMDK virtual disk due to issues with our previous OVA distribution. We are investigating our options to bring back the OVA distribution, however, the VMDK works for the hypervisors listed above.
|
||||
|
||||
## Requirements
|
||||
|
||||
Using this VMDK in a virtual machine requires the following:
|
||||
|
||||
- Operating system: Other 4.x or later Linux (64-bit)
|
||||
- Enabled support for UEFI boot
|
||||
- SATA disk controller
|
||||
- Minimal of 1GB RAM
|
||||
- At least 2x vCPU
|
||||
- An assigned network
|
@@ -1,35 +0,0 @@
|
||||
# Raspberry PI
|
||||
|
||||
Supported Hardware:
|
||||
|
||||
| Device | Board |
|
||||
|--------|-----------|
|
||||
| Raspberry Pi A+/B/B+| rpi |
|
||||
| Raspberry Pi Zero | rpi |
|
||||
| Raspberry Pi Zero W | rpi0-w |
|
||||
| Raspberry Pi 2 B | rpi2 |
|
||||
| Raspberry Pi 3 B/B+ | rpi3 / rpi3-64 |
|
||||
|
||||
## 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
|
||||
|
||||
For access to terminal over serial console, add `console=ttyAMA0,115200` to `cmdline.txt` and `enable_uart=1`, `dtoverlay=pi3-disable-bt` into `config.txt`. GPIO pins are: 6 = GND / 8 = UART TXD / 10 = UART RXD.
|
||||
|
||||
## I2C
|
||||
|
||||
Add `dtparam=i2c1=on` and `dtparam=i2c_arm=on` to `config.txt`. After that we create a module file on host with [config usb stick][config] or direct into `/etc/modules-load.d`.
|
||||
|
||||
rpi-i2c.conf:
|
||||
```
|
||||
i2c-dev
|
||||
i2c-bcm2708
|
||||
```
|
||||
|
||||
## Tweaks
|
||||
|
||||
If you don't need bluetooth, disabled it with add `dtoverlay=pi3-disable-bt` into `config.txt`.
|
||||
|
||||
[config]: ../configuration.md#automatic
|
51
Documentation/boards/raspberrypi/README.md
Normal file
51
Documentation/boards/raspberrypi/README.md
Normal file
@@ -0,0 +1,51 @@
|
||||
# Raspberry PI
|
||||
|
||||
## Supported Hardware
|
||||
|
||||
| Device | Release Date | Support | Config |
|
||||
|---------------------|---------------|-----------------|--------------------|
|
||||
| Raspberry Pi B/B+/A+|2012/2014/2014 | not recommended | [rpi](../../../buildroot-external/configs/rpi_defconfig) |
|
||||
| Raspberry Pi 2 B |2015 | not recommended | [rpi2](../../../buildroot-external/configs/rpi2_defconfig) |
|
||||
| Raspberry Pi Zero |2015 | not recommended | [rpi](../../../buildroot-external/configs/rpi_defconfig) |
|
||||
| Raspberry Pi Zero W |2017 | not recommended | [rpi0_w](../../../buildroot-external/configs/rpi0_w_defconfig) |
|
||||
| Raspberry Pi 3 B/B+ |2016/2018 | yes | [rpi3](../../../buildroot-external/configs/rpi3_defconfig) / [rpi3_64](../../../buildroot-external/configs/rpi3_64_defconfig) |
|
||||
| Raspberry Pi 4 B |2019 | yes* | [rpi4](../../../buildroot-external/configs/rpi4_defconfig) / [rpi4_64](../../../buildroot-external/configs/rpi4_64_defconfig) |
|
||||
|
||||
\*1,2 and 4 GiB versions of the Raspberry Pi 4 B are supported. Support for the 8 GiB version is coming soon is part of #740.
|
||||
|
||||
## Limitation 64bit
|
||||
|
||||
The 64bit version is under development by RPi-Team. It work very nice but it could have some impacts. Actual we see that the SDcard access with ext4 are a bit slower than on 32bit.
|
||||
|
||||
## Serial console
|
||||
|
||||
For access to terminal over serial console, add `console=ttyAMA0,115200` to `cmdline.txt` and `enable_uart=1`, `dtoverlay=pi3-disable-bt` into `config.txt`. GPIO pins are: 6 = GND / 8 = UART TXD / 10 = UART RXD.
|
||||
|
||||
## I2C
|
||||
|
||||
Add `dtparam=i2c1=on` and `dtparam=i2c_arm=on` to `config.txt`. After that we create a module file on host with [config usb stick][config] or direct into `/etc/modules-load.d`.
|
||||
|
||||
rpi-i2c.conf:
|
||||
```
|
||||
i2c-dev
|
||||
i2c-bcm2708
|
||||
```
|
||||
|
||||
## USB Boot
|
||||
|
||||
USB mass storage boot is available on Raspberry Pi 3B, 3B+, 3A+, and 2B v1.2.
|
||||
To enable USB boot, add `program_usb_boot_mode=1` into `config.txt`. Note that this **permanently** alters the one-time programmable memory of the device.
|
||||
|
||||
For more information see [RaspberryPi](https://www.raspberrypi.org/documentation/hardware/raspberrypi/bootmodes/msd.md).
|
||||
|
||||
### Caveats
|
||||
|
||||
* All bootable SD cards must be removed.
|
||||
* Boot time can be significantly longer with USB. This is due to the boot process first attempting to boot from SD card, failing, and resorting to USB.
|
||||
* Many USB drives simply do not work for boot. This is likely due to minimal driver support in uboot and will not be fixed. If you can't get it to boot on one drive, try a different brand/model. SanDisk Cruzer drives seem to have a higher rate of issues.
|
||||
|
||||
## Tweaks
|
||||
|
||||
If you don't need bluetooth, disabled it with add `dtoverlay=pi3-disable-bt` into `config.txt`.
|
||||
|
||||
[config]: ../configuration.md#automatic
|
@@ -1,17 +0,0 @@
|
||||
# Tinker Board
|
||||
|
||||
Supported Hardware:
|
||||
|
||||
| Device | Board |
|
||||
|--------|-----------|
|
||||
| Tinker RK3288 | tinker |
|
||||
| Tinker S RK3288 | tinker |
|
||||
|
||||
## EMMC
|
||||
|
||||
Actual we support only SD cards. The support for EMMC will follow.
|
||||
|
||||
## Serial console
|
||||
|
||||
For access to terminal over serial console, add `console=ttyS2,115200` to `cmdline.txt`. GPIO pins are: 34 = GND / 32 = UART TXD / 33 = UART RXD.
|
||||
|
@@ -1,21 +0,0 @@
|
||||
# Building
|
||||
|
||||
Running `sudo ./enter.sh` will get you into the build Docker container.
|
||||
`make -C /build/buildroot BR2_EXTERNAL=/build/buildroot-external xy_defconfig`
|
||||
|
||||
## Scripts
|
||||
|
||||
|
||||
|
||||
## Helpers
|
||||
|
||||
- `make -C /build/buildroot BR2_EXTERNAL=/build/buildroot-external xy_defconfig`
|
||||
- `make -C /build/buildroot BR2_EXTERNAL=/build/buildroot-external menuconfig`
|
||||
- `make -C /build/buildroot BR2_EXTERNAL=/build/buildroot-external linux-menuconfig`
|
||||
- `make -C /build/buildroot BR2_EXTERNAL=/build/buildroot-external barebox-menuconfig`
|
||||
- `make -C /build/buildroot BR2_EXTERNAL=/build/buildroot-external busybox-menuconfig`
|
||||
|
||||
- `make -C /build/buildroot BR2_EXTERNAL=/build/buildroot-external savedefconfig`
|
||||
- `make -C /build/buildroot BR2_EXTERNAL=/build/buildroot-external linux-update-defconfig`
|
||||
- `make -C /build/buildroot BR2_EXTERNAL=/build/buildroot-external barebox-update-defconfig`
|
||||
- `make -C /build/buildroot BR2_EXTERNAL=/build/buildroot-external busybox-update-config`
|
@@ -3,26 +3,28 @@
|
||||
## Automatic
|
||||
|
||||
You can use an USB drive with HassOS to configure network options, SSH access to the host and to install updates.
|
||||
Format a USB stick with FAT32/EXT4/NTFS and name it `CONFIG`. Alternative you can create a `CONFIG` folder inside boot partition. Use the following directory structure within the USB drive:
|
||||
Format a USB stick with FAT32/EXT4/NTFS and name it `CONFIG` (in all capitals). Alternative you can create a `CONFIG` folder inside the `boot` partition. Use the following directory structure within the USB drive:
|
||||
|
||||
```text
|
||||
network/
|
||||
modules/
|
||||
modprobe/
|
||||
udev/
|
||||
authorized_keys
|
||||
timesyncd.conf
|
||||
hassos-xy.raucb
|
||||
```
|
||||
|
||||
- The `network` folder can contain any kind of NetworkManager connection files. For more information see [Network][network.md].
|
||||
- The `network` folder can contain any kind of NetworkManager connection files. For more information see [Network][network.md].
|
||||
- The `modules` folder is for modules-load configuration files.
|
||||
- The `modprobe` folder is for modules configuration files (/etc/modprobe.d)
|
||||
- The `udev` folder is for udev rules files.
|
||||
- The `authorized_keys` file activates debug SSH access on port `22222`. See [Debugging Hassio][debug-hassio].
|
||||
- The `authorized_keys` file activates debug SSH access on port `22222`. See [Debugging Home Assistant][debug-homeassistant].
|
||||
- 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.
|
||||
- The `hassos-*.raucb` file is a firmware OTA update which will be installed. These can be found on on the [release][hassos-release] page.
|
||||
|
||||
You can put this USB stick into the device and it will be read on startup. You can also trigger this process later over the
|
||||
API/UI or by calling `systemctl restart hassos-config` on the host.
|
||||
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
|
||||
|
||||
@@ -32,7 +34,7 @@ You can edit or create a `cmdline.txt` in your boot partition. That will be read
|
||||
|
||||
### Kernel-Module
|
||||
|
||||
The kernel module folder `/etc/modules-load.d` is persistent and you can add your configuration files there. See [Systemd modules load][systemd-modules].
|
||||
The kernel module folder `/etc/modules-load.d` is persistent and you can add your configuration files there. See [Systemd modules load][systemd-modules]. You can add the modules configuration files in `/etc/modprobe.d` that is also persistent.
|
||||
|
||||
### Udev rules
|
||||
|
||||
@@ -45,7 +47,9 @@ You can manual add, edit or remove connections configurations from `/etc/Network
|
||||
### NTP
|
||||
|
||||
You can manual edit the systemd timesync file on `/etc/systemd/timesyncd.conf`.
|
||||
Our default ntp configuration look like:
|
||||
|
||||
Our default NTP configuration look like:
|
||||
|
||||
```
|
||||
[Time]
|
||||
NTP=time1.google.com time2.google.com time3.google.com
|
||||
@@ -55,4 +59,4 @@ FallbackNTP=0.pool.ntp.org 1.pool.ntp.org 2.pool.ntp.org 3.pool.ntp.org
|
||||
[systemd-modules]: https://www.freedesktop.org/software/systemd/man/modules-load.d.html
|
||||
[network.md]: network.md
|
||||
[hassos-release]: https://github.com/home-assistant/hassos/releases/
|
||||
[debug-hassio]: https://developers.home-assistant.io/docs/en/hassio_debugging.html
|
||||
[debug-homeassistant]: https://developers.home-assistant.io/docs/en/hassio_debugging.html
|
||||
|
@@ -15,7 +15,7 @@ The development number they will be bump for the stable release version and the
|
||||
|
||||
The branch `dev` ist the actual development branch and from there we never make a release. The `master` branch contains the development version and from there we build a beta release.
|
||||
|
||||
If we create a new staging/productive release, we create a new branch `rel-{MAJOR}`. They will be used for the whole cycle of this release.
|
||||
If we create a new productive release, we create a new branch `rel-{MAJOR}`. They will be used for the whole cycle of this release.
|
||||
|
||||
## Upload release files
|
||||
|
||||
|
@@ -3,22 +3,57 @@
|
||||
## Boot system
|
||||
|
||||
`BOOT_SYS`:
|
||||
|
||||
- efi
|
||||
- hyprid
|
||||
- spl
|
||||
- hybrid
|
||||
- mbr
|
||||
|
||||
HassOS is basicly used GPT. But for use GPT we need own the first 1024 of
|
||||
boot drive. Is that not possible, you can use MBR for your device, they work also with SPLs.
|
||||
HassOS is using GPT. But to use GPT we need own the first 1024 of boot drive. Is that's not possible, you can use MBR for your device. This also work with SPLs.
|
||||
|
||||
Hyprid and SPL use both a hyprid MBR/GPT table but SPL move the GPT header 8MB for give space to write SPL and boot images before.
|
||||
Hybrid and SPL use both a hybrid MBR/GPT table but SPL move the GPT header 8 MB for give space to write SPL and boot images before.
|
||||
|
||||
`BOOT_SPL`:
|
||||
|
||||
- true
|
||||
- false
|
||||
|
||||
Enable SPL update handling.
|
||||
|
||||
`BOOTLOADER`:
|
||||
- uboot
|
||||
|
||||
- U-Boot
|
||||
- barebox
|
||||
|
||||
We support mainly uboot but for uefi system we can also use barebox. In future we hope to remove barebox with uboot also on uefi.
|
||||
We support mainly U-Boot but for UEFI systems we can also use [barebox](https://barebox.org/). In the future, we hope to remove barebox with U-Boot also on UEFI.
|
||||
|
||||
`DISK_SIZE`:
|
||||
|
||||
Default 2. That is the size of end image in GB.
|
||||
|
||||
## Supervisor
|
||||
|
||||
`SUPERVISOR_MACHINE`:
|
||||
|
||||
- intel-nuc
|
||||
- odroid-c2
|
||||
- odroid-n2
|
||||
- odroid-xu
|
||||
- qemuarm
|
||||
- qemuarm-64
|
||||
- qemux86
|
||||
- qemux86-64
|
||||
- raspberrypi
|
||||
- raspberrypi2
|
||||
- raspberrypi3
|
||||
- raspberrypi4
|
||||
- raspberrypi3-64
|
||||
- raspberrypi4-64
|
||||
- tinker
|
||||
|
||||
`SUPERVISOR_ARCH`:
|
||||
|
||||
- amd64
|
||||
- i386
|
||||
- armhf
|
||||
- armv7
|
||||
- aarch64
|
||||
|
@@ -1,11 +1,10 @@
|
||||
Getting started with Hassos development using Docker on GNU/Linux
|
||||
=================================================================
|
||||
# Getting started with HassOS development using Docker on GNU/Linux
|
||||
|
||||
First, install **docker** for your distribution - I'd advise to use your distro's provided packages, since that will make sure permissions et al. are sanely set up for what you are about to run. You're also expected to have your current user properly set up in in your sudoers policy, so that this account may elevate to root and execute arbitrary commands as UID 0 (this is required, since at some point during the build process, a new loopback device-backed filesystem image will be mounted inside a docker container - which requires a "privileged" container to run, which can only be done as root).
|
||||
First, install `docker-ce` for your distribution. I'd advise to use your distro's provided packages, since that will make sure permissions et al. are sanely set up for what you are about to run. You're also expected to have your current user properly set up in in your sudoers policy, so that this account may elevate to root and execute arbitrary commands as UID 0 (this is required, since at some point during the build process, a new loopback device-backed filesystem image will be mounted inside a Docker container - which requires a "privileged" container to run, which can only be done as root).
|
||||
|
||||
Next, make sure the docker daemon is running:
|
||||
Next, make sure the Docker daemon is running:
|
||||
|
||||
```
|
||||
```bash
|
||||
$ sudo systemctl status docker
|
||||
● docker.service - Docker Application Container Engine
|
||||
Loaded: loaded (/usr/lib/systemd/system/docker.service; disabled; vendor preset: disabled)
|
||||
@@ -15,7 +14,7 @@ $ sudo systemctl status docker
|
||||
|
||||
My desktop distro doesn't start newly installed services by default, which means I'll have to manually fire up the `docker` service:
|
||||
|
||||
```
|
||||
```bash
|
||||
$ sudo systemctl start docker
|
||||
$ sudo systemctl --no-pager status docker -n0
|
||||
● docker.service - Docker Application Container Engine
|
||||
@@ -30,9 +29,9 @@ $ sudo systemctl --no-pager status docker -n0
|
||||
└─1539 docker-containerd --config /var/run/docker/containerd/containerd.toml
|
||||
```
|
||||
|
||||
Now, change your working directory to your hassos repo checkout (please adapt pathnames as needed), make sure your intended changes to the source tree are applied (and committed, ideally :)), and execute the `enter.sh` helper script:
|
||||
Now, change your working directory to your home-assistant/operating-system repository checkout (please adapt path names as needed), make sure your intended changes to the source tree are applied (and committed, ideally :)), and execute the `enter.sh` helper script:
|
||||
|
||||
```
|
||||
```bash
|
||||
$ cd ~/codebase/hassos/
|
||||
$ sudo scripts/enter.sh
|
||||
Sending build context to Docker daemon 30.48MB
|
||||
@@ -43,24 +42,24 @@ Successfully built 4dc25a21556b
|
||||
Successfully tagged hassbuildroot:latest
|
||||
```
|
||||
|
||||
Note that the current iteration of `enter.sh` will try to load the **overlayfs** kernel module, which is not strictly required for docker's operation, as far as I can tell. It's OK if loading that module fails; the shell script will continue executing. If everything works out, you will find yourself in an interactive login shell inside your docker container/build environment, where you can peek around:
|
||||
Note that the current iteration of `enter.sh` will try to load the **overlayfs** kernel module, which is not strictly required for Docker's operation, as far as I can tell. It's OK if loading that module fails; the shell script will continue executing. If everything works out, you will find yourself in an interactive login shell inside your Docker container/build environment, where you can peek around:
|
||||
|
||||
```
|
||||
```bash
|
||||
root@somehashinhex:/build#
|
||||
root@somehashinhex:/build# make help
|
||||
[...]
|
||||
```
|
||||
|
||||
The _hassos_ developers provide a Makefile that will build hassos images for a (rather long!) list of targets. For example run the command below to start building the _ova_ variant, and go make a cup of tea. Or fifteen.
|
||||
The HassOS developers provide a `Makefile` that will build HassOS images for a list of targets. For example run the command below to start building the _ova_ variant, and go make a cup of tea. Or fifteen.
|
||||
|
||||
```
|
||||
```bash
|
||||
root@0db6f7079872:/build# make ova
|
||||
[...]
|
||||
```
|
||||
|
||||
That will result in a single VMDK image file at the very end of the build process. This image file is a compressed block device dump with a proper GPT partition table, prepared to ship into any OVA-compatible hypervisor's innards. For me, the end of the **ova** build steps looks like this:
|
||||
|
||||
```
|
||||
```bash
|
||||
[...]
|
||||
2097152+0 records out
|
||||
1073741824 bytes (1.1 GB, 1.0 GiB) copied, 12.2145 s, 87.9 MB/s
|
||||
@@ -74,33 +73,29 @@ make: Leaving directory '/build/buildroot'
|
||||
|
||||
The artifacts you just built are placed in the `target/` subdirectory:
|
||||
|
||||
```
|
||||
```bash
|
||||
root@fd292c061896:/build# ls -lh release/
|
||||
total 141M
|
||||
-rw-r--r-- 1 root root 141M Oct 10 20:22 hassos_ova-2.2.vmdk.gz
|
||||
```
|
||||
|
||||
In order to be able to use this image file with the **qemu** hypervisor, you'll need to unpack it, and convert it to an image format that qemu can work with. Conveniently, the _hassos_ buildenv already provides all the tools we need for this conversion:
|
||||
In order to be able to use this image file with the QEMU hypervisor, you'll need to unpack it, and convert it to an image format that QEMU can work with. Conveniently, the HassOS buildenv already provides all the tools we need for this conversion:
|
||||
|
||||
```
|
||||
root@fd292c061896:/build# gunzip release/hassos_ova-2.2.vmdk.gz
|
||||
root@fd292c061896:/build# qemu-img convert -O qcow2 release/hassos_ova-2.2.vmdk release/hassos_ova-2.2.qcow2
|
||||
```bash
|
||||
root@fd292c061896:/build# gunzip release/hassos_ova-2.2.qcow2.gz
|
||||
root@fd292c061896:/build# ls -lh release/
|
||||
total 673M
|
||||
-rw-r--r-- 1 root root 337M Oct 10 20:25 hassos_ova-2.2.qcow2
|
||||
-rw-r--r-- 1 root root 337M Oct 10 20:22 hassos_ova-2.2.vmdk
|
||||
```
|
||||
|
||||
Now, exit the docker container's environment, and find the build artifacts in the `releases/` directory beneath your repository checkout dir. (The generated files will be owned by _root_; make sure to `chown` them to your user account, if needed.)
|
||||
|
||||
From there, qemu can try to boot it. Since the generated image assumes UEFI support in the host/hypervisor, this is slightly more tricky than with "classic"(/legacy) MBR-based images. On the *Debian* host I use to run my qemu virtual machine on, you'll need to install the **ovmf** package, which is described as providing "UEFI firmware for 64-bit x86 virtual machines". That package will install a _TianoCore_-derived qemu UEFI image build at `/usr/share/OVMF/OVMF_CODE.fd`, which we'll use with qemu to boot the generated qcow2 image. (Please adapt pathnames as necessary, for example if you have installed the ovmf firmware image at another location.)
|
||||
From there, QEMU can try to boot it. Since the generated image assumes UEFI support in the host/hypervisor, this is slightly more tricky than with "classic"(/legacy) MBR-based images. On the *Debian* host I use to run my QEMU virtual machine on, you'll need to install the **ovmf** package which provides the "UEFI firmware for 64-bit x86 virtual machines". That package will install a **TianoCore**-derived QEMU UEFI image build at `/usr/share/OVMF/OVMF_CODE.fd`, which we'll use with QEMU to boot the generated qcow2 image. (Please adapt path names as necessary, for example if you have installed the ovmf firmware image at another location.)
|
||||
|
||||
```
|
||||
```bash
|
||||
$ /usr/bin/qemu-system-x86_64 -enable-kvm -name hassos_ova -smp 2 -m 1024 -drive file=release/hassos_ova-2.2.qcow2,index=0,media=disk,if=ide,cache=none,format=qcow2 -drive file=/usr/share/ovmf/x64/OVMF_CODE.fd,if=pflash,format=raw,readonly=on
|
||||
```
|
||||
|
||||
This should pop up qemu's SDL frontend, displaying _hassos_' VT/CLI environment. Specifying addtional options and flags to qemu for network access, keyboard layout et al. are left as an exercise for the reader.
|
||||
This should pop up QEMU's SDL frontend, displaying _hassos_' VT/CLI environment. Specifying additional options and flags to QEMU for network access, keyboard layout et al. are left as an exercise for the reader.
|
||||
|
||||
After the boot process has finished, you can log in to _hassos_ without a password, providing *root* as the username. From there, executing `login` on the *hassio>* shell prompt will yield a root shell in the host OS.
|
||||
|
||||
Happy hacking! :)
|
||||
After the boot process has finished, you can log in to _hassos_ without a password, providing *root* as the username. From there, executing `login` on the *ha>* shell prompt will yield a root shell in the host OS.
|
||||
|
@@ -1,12 +1,18 @@
|
||||
|
||||
# Kernel Version
|
||||
|
||||
Default Kernel tree: 5.4
|
||||
|
||||
| Board | Version |
|
||||
|-------|---------|
|
||||
| Open Virtual Applicance | 4.14.82 |
|
||||
| Raspberry Pi | 4.14.81 |
|
||||
| Tinker Board | 4.14.82 |
|
||||
| Odroid-C2 | 4.19.15 |
|
||||
| Odroid-XU4 | 4.19.15 |
|
||||
| Orangepi-Prime | 4.19.13 |
|
||||
| Intel NUC | 4.14.82 |
|
||||
| Open Virtual Appliance | 5.4.81 |
|
||||
| Raspberry Pi | 4.19.127 |
|
||||
| Raspberry Pi 0-W | 4.19.127 |
|
||||
| Raspberry Pi 2 | 4.19.127 |
|
||||
| Raspberry Pi 3 | 4.19.127 |
|
||||
| Raspberry Pi 4 | 4.19.127 |
|
||||
| Tinker Board | 5.4.81 |
|
||||
| Odroid-C2 | 5.7.19 |
|
||||
| Odroid-N2 | 5.7.19 |
|
||||
| Odroid-XU4 | 5.7.19 |
|
||||
| Intel NUC | 5.4.81 |
|
||||
|
@@ -1,18 +1,22 @@
|
||||
# Network
|
||||
|
||||
HassOS uses NetworkManager to control the host network. In future releases, you will be able to set up the configuration using the API/UI. Currently only a manual configuration using NetworkManager connection files is supported. Without a configuration file, the device will use DHCP by default. These network connection files can be placed on a USB drive and imported to the host as described in [Configuration][configuration-usb].
|
||||
HassOS uses NetworkManager to control the host network.
|
||||
|
||||
## Configuration Examples
|
||||
## Configure network
|
||||
|
||||
You can read the [Official Manual][keyfile] or find many configuration examples across the internet. The system is read-only, if you don't want the IP address to change on every boot, you should set the UUID property with a generic [UUID4][uuid]. Inside `\CONFIG\network\` on the USB or SD, create a file called `my-network` and add the appropriate contents below:
|
||||
Only a manual configuration using NetworkManager connection files is supported. Without a configuration file, the device will use DHCP by default. These network connection files can be placed on a USB drive and imported to the host as described in [Configuration][configuration-usb].
|
||||
|
||||
## Configuration examples
|
||||
|
||||
You can read the [NetworkManager manual][nm-manual] or find many configuration examples across the internet. Keep in mind that the system is read-only. If you don't want the IP address to change on every boot, you should modify the UUID property to a generic [UUID4][uuid]. Inside the `\CONFIG\network\` directory on the USB drive or SD card, create a file called `my-network` and add the appropriate contents below:
|
||||
|
||||
### Default
|
||||
|
||||
We have a preinstalled connection profile:
|
||||
A preinstalled connection profile is provided by default:
|
||||
|
||||
```ini
|
||||
[connection]
|
||||
id=HassOS default
|
||||
id=my-network
|
||||
uuid=f62bf7c2-e565-49ff-bbfc-a4cf791e6add
|
||||
type=802-3-ethernet
|
||||
|
||||
@@ -24,11 +28,11 @@ addr-gen-mode=stable-privacy
|
||||
method=auto
|
||||
```
|
||||
|
||||
### LAN
|
||||
### Wired connection to the LAN
|
||||
|
||||
```ini
|
||||
[connection]
|
||||
id=hassos-network
|
||||
id=my-network
|
||||
uuid=d55162b4-6152-4310-9312-8f4c54d86afa
|
||||
type=802-3-ethernet
|
||||
|
||||
@@ -40,11 +44,11 @@ addr-gen-mode=stable-privacy
|
||||
method=auto
|
||||
```
|
||||
|
||||
### Wireless WPA/PSK
|
||||
### Wireless LAN WPA/PSK
|
||||
|
||||
```ini
|
||||
[connection]
|
||||
id=hassos-network
|
||||
id=my-network
|
||||
uuid=72111c67-4a5d-4d5c-925e-f8ee26efb3c3
|
||||
type=802-11-wireless
|
||||
|
||||
@@ -74,10 +78,11 @@ Replace the following configuration:
|
||||
```ini
|
||||
[ipv4]
|
||||
method=manual
|
||||
address=192.168.1.111/24,192.168.1.1
|
||||
address=192.168.1.111/24;192.168.1.1
|
||||
dns=8.8.8.8;8.8.4.4;
|
||||
```
|
||||
For address, the value before the comma is the IP address and subnet prefix bitlength; the second value is the IP address of the gateway.
|
||||
|
||||
For `address`, the value before the semicolon is the IP address and subnet prefix bitlength. The second value (after the semicolon) is the IP address of the local gateway.
|
||||
|
||||
## Tips
|
||||
|
||||
@@ -86,59 +91,63 @@ For address, the value before the comma is the IP address and subnet prefix bitl
|
||||
If you want to reset the network configuration back to the default DHCP settings, use the following commands on the host:
|
||||
|
||||
```bash
|
||||
$ rm /etc/NetworkManager/system-connections/*
|
||||
$ cp /usr/share/system-connections/* /etc/NetworkManager/system-connections/
|
||||
$ nmcli con reload
|
||||
# rm /etc/NetworkManager/system-connections/*
|
||||
# cp /usr/share/system-connections/* /etc/NetworkManager/system-connections/
|
||||
# nmcli con reload
|
||||
```
|
||||
|
||||
### Powersave
|
||||
|
||||
If you have trouble with powersave you can do following:
|
||||
If you have trouble with powersave then apply the following changes:
|
||||
|
||||
```ini
|
||||
[wifi]
|
||||
# Values are 0 (use default), 1 (ignore/don't touch), 2 (disable) or 3 (enable).
|
||||
powersave=0
|
||||
```
|
||||
## Using nmcli to set a static IPV4 address
|
||||
|
||||
Log into the HASSOS base system via a console:
|
||||
## Using `nmcli` to set a static IPv4 address
|
||||
|
||||
Log into the the HassOS base system via a console:
|
||||
|
||||
```bash
|
||||
Welcome to Home Assistant
|
||||
homeassistant login:
|
||||
```
|
||||
Welcome to HassOS
|
||||
Hassio login:
|
||||
|
||||
- Login as `root` (no password needed). At the `ha >` prompt, type `login` (as instructed).
|
||||
|
||||
From there you use the `nmcli` configuration tool.
|
||||
|
||||
- `# nmcli con show` will list the "HassOS default" connection in use.
|
||||
- `# nmcli con show "HassOS default"` will list all the properties of the connection.
|
||||
|
||||
To start editing the configuration setting for "HassOS default":
|
||||
|
||||
```bash
|
||||
# nmcli con edit "HassOS default"
|
||||
```
|
||||
Login as `root` (no password needed)
|
||||
|
||||
At the `hassio >` prompt, type `login` (as instructed).
|
||||
|
||||
From here you will use the `nmcli` configuration tool.
|
||||
|
||||
`# nmcli connection show` will list the “HassOS default” connection in use.
|
||||
|
||||
`# nmcli con show "HassOS default"` will list all the properties of the connection.
|
||||
|
||||
`# nmcli con edit "HassOS default"` will put you in a position to edit the connection.
|
||||
|
||||
`nmcli> print ipv4` will show you the ipv4 properties of this connection.
|
||||
|
||||
To add your static IP address (select 'yes' for manual method);
|
||||
```
|
||||
|
||||
```bash
|
||||
nmcli> set ipv4.addresses 192.168.100.10/24
|
||||
Do you also want to set 'ipv4.method' to 'manual'? [yes]:
|
||||
```
|
||||
In addition I have found it is wise to set the dns server and the local gateway. For most home routers these will be the same address. If you are using Pi-Hole you can set the dns to that.
|
||||
```
|
||||
|
||||
In addition, it's recommended to set the DNS server and the local gateway. For most home routers the DNS server will have the same IP address as the router itself. If you are using Pi-Hole or a third-party DNS system then you can set the DNS server to that.
|
||||
|
||||
```bash
|
||||
nmcli> set ipv4.dns 192.168.100.1
|
||||
nmcli> set ipv4.gateway 192.168.100.1
|
||||
nmcli> save
|
||||
nmcli> quit
|
||||
```
|
||||
|
||||
`nmcli> print ipv4` will show you the IPv4 properties of this connection. With `nmcli> save` you will save the changes afterwards.
|
||||
|
||||
If you now view the default connection `cat /etc/NetworkManager/system-connections/default` you should see the method is manual and the address is set.
|
||||
|
||||
Doing a `nmcli con reload` does not always work so restart the VM.
|
||||
Doing a `nmcli con reload` does not always work, so restart the virtual machine or the physical system.
|
||||
|
||||
[keyfile]: https://developer.gnome.org/NetworkManager/stable/nm-settings.html
|
||||
[nm-manual]: https://developer.gnome.org/NetworkManager/stable/nm-settings.html
|
||||
[configuration-usb]: configuration.md
|
||||
[uuid]: https://www.uuidgenerator.net/
|
||||
|
47
Documentation/partition.md
Normal file
47
Documentation/partition.md
Normal file
@@ -0,0 +1,47 @@
|
||||
# Partition
|
||||
|
||||
The partition layout is a bit different than for regular setups. We prefer GPT, if possible. With SoCs which don't support GPT, we use the hybrid GPT. For more details about this topic, please refer to the [development](development.mnd) documentation.
|
||||
|
||||
The system is designed to have as less as possible write operations on the storage media. Which means that we have basically only write during the OTA update and 5-6 times per week on the overlay part. The data partition is having I/O. This is the reason which is should be run on a different drive.
|
||||
|
||||
A visual representation looks like this:
|
||||
|
||||
```text
|
||||
-------------------------
|
||||
| Bootloader |
|
||||
-------------------------
|
||||
| Kernel A |
|
||||
-------------------------
|
||||
| System A |
|
||||
| |
|
||||
-------------------------
|
||||
| Kernel B |
|
||||
-------------------------
|
||||
| System B |
|
||||
| |
|
||||
-------------------------
|
||||
| Bootstate |
|
||||
-------------------------
|
||||
| Overlay |
|
||||
| |
|
||||
...
|
||||
|
||||
-------------------------
|
||||
| Data |
|
||||
| |
|
||||
-------------------------
|
||||
```
|
||||
|
||||
Sometime the bootloader part can look different because there can be firmware or SPLs for boot the CPU on the SoC.
|
||||
|
||||
## Data
|
||||
|
||||
The data partition is the only partition with real I/O. It will be expanded automatic on boot time to the full size of the disk.
|
||||
|
||||
This partition can be offloaded to a different drive with the utility:
|
||||
|
||||
```sh
|
||||
$ datactl move /dev/xxx
|
||||
```
|
||||
|
||||
On next boot, the partition will be moved to the new drive. The drive needs to be bigger as the old one and we own the full new drive.
|
61
README.md
61
README.md
@@ -1,13 +1,52 @@
|
||||
# HassOS
|
||||
Hass.io OS based on [buildroot](https://buildroot.org/). It's a hypervisor for Docker and supports various kind of IoT hardware. It is also available as virtual appliance. The whole system is optimized for embedded system and security. You can update the system simple with OTA updates or offline updates.
|
||||
# Home Assistant Operating System
|
||||
|
||||
## Focus
|
||||
Home Assistant Operating System (formerly HassOS) is an operating system optimized for hosting [Home Assistant](https://www.home-assistant.io) and its [Add-ons](https://www.home-assistant.io/addons/).
|
||||
|
||||
- Barebox as bootloader on EFI
|
||||
- U-Boot as bootloader on IoT
|
||||
- RAUC for OTA updates
|
||||
- SquashFS LZ4 as filesystem
|
||||
- Docker 18.09.0
|
||||
- AppArmor protected
|
||||
- ZRAM LZ4 for /tmp, /var, swap
|
||||
- Run every supervisor
|
||||
Home Assistant Operating System uses Docker as Container engine. It by default deploys the Home Assistant Supervisor as a container. Home Assistant Supervisor in turn uses the Docker container engine to control Home Assistant Core and Add-Ons in separate containers. Home Assistant Operating System is **not** based on a regular Linux distribution like Ubuntu. It is built using [buildroot](https://buildroot.org/) and it is optimized for running Home Assistant, especially on single board compute (SBC) devices like the Pi, ODROID, NUC and Tinker Board (see supported hardware below).
|
||||
|
||||
## Features
|
||||
|
||||
- Lightweight and memory-efficient
|
||||
- Minimized I/O
|
||||
- Over The Air (OTA) updates
|
||||
- Offline updates
|
||||
- Modular using Docker
|
||||
|
||||
## Supported hardware
|
||||
|
||||
- Raspberry Pi
|
||||
- Hardkernel ODROID
|
||||
- Intel NUC
|
||||
- Asus Tinker Board
|
||||
- Virtual appliances
|
||||
|
||||
See full list and specific models [here](./Documentation/boards/README.md)
|
||||
|
||||
## Getting Started
|
||||
|
||||
If you just want to use Home Assistant the official [getting started guide](https://www.home-assistant.io/getting-started/) and [installation instructions](https://www.home-assistant.io/hassio/installation/) take you through how to download Home Assistant Operating System and get it running on your machine.
|
||||
|
||||
If you're interested in finding out more about Home Assistant Operating System and how it works read on...
|
||||
|
||||
## HassOS components
|
||||
|
||||
- **Bootloader:**
|
||||
- [Barebox](https://barebox.org/) for devices that support EFI
|
||||
- [U-Boot](https://www.denx.de/wiki/U-Boot) for devices that don't support EFI
|
||||
- **Operating System:**
|
||||
- [Buildroot](https://buildroot.org/) LTS Linux
|
||||
- **File Systems:**
|
||||
- [SquashFS](https://www.kernel.org/doc/Documentation/filesystems/squashfs.txt) for read-only file systems (using LZ4 compression)
|
||||
- [ZRAM](https://www.kernel.org/doc/Documentation/blockdev/zram.txt) for `/tmp`, `/var` and swap (using LZ4 compression)
|
||||
- **Container Platform:**
|
||||
- [Docker Engine](https://docs.docker.com/engine/) for running Home Assistant components in containers
|
||||
- **Updates:**
|
||||
- [RAUC](https://rauc.io/) for Over The Air (OTA) and USB updates
|
||||
- **Security:**
|
||||
- [AppArmor](https://apparmor.net/) Linux kernel security module
|
||||
|
||||
If you don't have experience with these, embedded systems, buildroot or the build process for Linux distributions, then please read up on these topics. The rest of the documentation in this project is for developers and assumes you have experience of embedded systems or a strong understanding of the internal workings of operating systems.
|
||||
|
||||
## Developer Documentation
|
||||
|
||||
All developer documentation is in the [Documentation](./Documentation) directory.
|
||||
|
53
azure-pipelines-ci.yml
Normal file
53
azure-pipelines-ci.yml
Normal file
@@ -0,0 +1,53 @@
|
||||
# https://dev.azure.com/home-assistant
|
||||
|
||||
trigger:
|
||||
batch: true
|
||||
branches:
|
||||
include:
|
||||
- dev
|
||||
pr:
|
||||
- dev
|
||||
|
||||
variables:
|
||||
- name: versionHadolint
|
||||
value: 'v1.17.2'
|
||||
- name: versionShellCheck
|
||||
value: 'v0.7.0'
|
||||
|
||||
jobs:
|
||||
|
||||
- job: 'Hadolint'
|
||||
pool:
|
||||
vmImage: 'ubuntu-16.04'
|
||||
steps:
|
||||
- script: |
|
||||
sudo docker pull hadolint/hadolint:$(versionHadolint)
|
||||
displayName: 'Install Hadolint'
|
||||
- script: |
|
||||
sudo docker run --rm -i \
|
||||
-v $(pwd)/.hadolint.yaml:/.hadolint.yaml:ro \
|
||||
hadolint/hadolint:$(versionHadolint) < Dockerfile
|
||||
displayName: 'Run Hadolint'
|
||||
|
||||
|
||||
- job: 'ShellCheck'
|
||||
pool:
|
||||
vmImage: 'ubuntu-16.04'
|
||||
steps:
|
||||
- script: |
|
||||
sudo docker pull koalaman/shellcheck:$(versionShellCheck)
|
||||
displayName: 'Install ShellCheck'
|
||||
- script: |
|
||||
set -e
|
||||
|
||||
# Check build script
|
||||
sudo docker run --rm -i \
|
||||
-v $(pwd):/mnt:ro koalaman/shellcheck:$(versionShellCheck) \
|
||||
scripts/*.sh \
|
||||
buildroot-external/scripts/*.sh \
|
||||
buildroot-external/board/**/*.sh \
|
||||
buildroot-external/ota/rauc-hook \
|
||||
buildroot-external/rootfs-overlay/usr/bin/* \
|
||||
buildroot-external/rootfs-overlay/usr/sbin/* \
|
||||
buildroot-external/rootfs-overlay/usr/libexec/* \
|
||||
displayName: 'Run ShellCheck'
|
95
azure-pipelines-release.yml
Normal file
95
azure-pipelines-release.yml
Normal file
@@ -0,0 +1,95 @@
|
||||
# https://dev.azure.com/home-assistant
|
||||
|
||||
trigger:
|
||||
batch: true
|
||||
tags:
|
||||
include:
|
||||
- '*'
|
||||
exclude:
|
||||
- untagged*
|
||||
pr: none
|
||||
|
||||
variables:
|
||||
- name: versionGHR
|
||||
value: 'v0.13.0'
|
||||
- group: github
|
||||
- group: rauc
|
||||
|
||||
jobs:
|
||||
|
||||
- job: 'VersionValidate'
|
||||
condition: startsWith(variables['Build.SourceBranch'], 'refs/tags')
|
||||
pool:
|
||||
vmImage: 'ubuntu-latest'
|
||||
steps:
|
||||
- script: |
|
||||
. buildroot-external/meta
|
||||
|
||||
if [ "${VERSION_MAJOR}.${VERSION_BUILD}" != "$(Build.SourceBranchName)" ]; then
|
||||
exit 1
|
||||
fi
|
||||
displayName: 'Check version of branch/tag'
|
||||
|
||||
|
||||
- job: 'Release'
|
||||
dependsOn:
|
||||
- 'VersionValidate'
|
||||
timeoutInMinutes: 240
|
||||
pool:
|
||||
name: 'Buildroot'
|
||||
strategy:
|
||||
maxParallel: 1
|
||||
matrix:
|
||||
OpenVirtualAppliance:
|
||||
board: 'ova'
|
||||
IntelNuc:
|
||||
board: 'intel_nuc'
|
||||
OdroidC2:
|
||||
board: 'odroid_c2'
|
||||
OdroidN2:
|
||||
board: 'odroid_n2'
|
||||
OdroidXU4:
|
||||
board: 'odroid_xu4'
|
||||
RaspberryPi:
|
||||
board: 'rpi'
|
||||
RaspberryPi0-W:
|
||||
board: 'rpi0_w'
|
||||
RaspberryPi2:
|
||||
board: 'rpi2'
|
||||
RaspberryPi3:
|
||||
board: 'rpi3'
|
||||
RaspberryPi3-64:
|
||||
board: 'rpi3_64'
|
||||
RaspberryPi4:
|
||||
board: 'rpi4'
|
||||
RaspberryPi4-64:
|
||||
board: 'rpi4_64'
|
||||
AsusTinker:
|
||||
board: 'tinker'
|
||||
workspace:
|
||||
clean: 'all'
|
||||
steps:
|
||||
- script: |
|
||||
echo -e "-----BEGIN CERTIFICATE-----\n$(releaseCertificate)\n-----END CERTIFICATE-----" > cert.pem
|
||||
echo -e "-----BEGIN PRIVATE KEY-----\n$(releaseKey)\n-----END PRIVATE KEY-----" > key.pem
|
||||
displayName: 'Add release PKI certs'
|
||||
- script: |
|
||||
sudo docker build -t hassos:azure .
|
||||
displayName: 'Build container for HassOS'
|
||||
- script: |
|
||||
curl -SsL https://github.com/tcnksm/ghr/releases/download/$(versionGHR)/ghr_$(versionGHR)_linux_amd64.tar.gz | tar xzf -
|
||||
cp ghr_$(versionGHR)_linux_amd64/ghr .
|
||||
rm -rf ghr_$(versionGHR)_linux_amd64
|
||||
displayName: 'Install GHR'
|
||||
- script: |
|
||||
BUILDER_UID="$(id -u)"
|
||||
BUILDER_GID="$(id -g)"
|
||||
|
||||
sudo docker run --rm --privileged -v "$(pwd):/build" \
|
||||
-e BUILDER_UID="${BUILDER_UID}" -e BUILDER_GID="${BUILDER_GID}" \
|
||||
-v "/mnt/build-cache:/cache" \
|
||||
hassos:azure make $(board)
|
||||
displayName: 'Build $(board)'
|
||||
- script: |
|
||||
./ghr -t $(githubToken) -replace $(Build.SourceBranchName) release/
|
||||
displayName: 'Upload $(board)'
|
@@ -1,6 +1,8 @@
|
||||
source "$BR2_EXTERNAL_HASSOS_PATH/package/hassos/Config.in"
|
||||
source "$BR2_EXTERNAL_HASSOS_PATH/package/hassio/Config.in"
|
||||
source "$BR2_EXTERNAL_HASSOS_PATH/package/libapparmor/Config.in"
|
||||
source "$BR2_EXTERNAL_HASSOS_PATH/package/apparmor/Config.in"
|
||||
source "$BR2_EXTERNAL_HASSOS_PATH/package/bluetooth-bcm43xx/Config.in"
|
||||
source "$BR2_EXTERNAL_HASSOS_PATH/package/bluetooth-rtl8723/Config.in"
|
||||
source "$BR2_EXTERNAL_HASSOS_PATH/package/hardkernel-boot/Config.in"
|
||||
source "$BR2_EXTERNAL_HASSOS_PATH/package/qemu-guest-agent/Config.in"
|
||||
source "$BR2_EXTERNAL_HASSOS_PATH/package/intel-e1000e/Config.in"
|
||||
|
@@ -12,14 +12,15 @@ function hassos_pre_image() {
|
||||
echo "console=tty1" > "${BOOT_DATA}/cmdline.txt"
|
||||
|
||||
# Create boot binary
|
||||
rm -f "${BINARIES_DIR}/u-boot-spl-dtb.img"
|
||||
mkimage -n rk3288 -T rksd -d "${BINARIES_DIR}/u-boot-spl-dtb.bin" "${BINARIES_DIR}/u-boot-spl-dtb.img"
|
||||
cat "${BINARIES_DIR}/u-boot-dtb.bin" >> "${BINARIES_DIR}/u-boot-spl-dtb.img"
|
||||
rm -f "${BINARIES_DIR}/idbloader.img"
|
||||
mkimage -n rk3288 -T rksd -d "${BINARIES_DIR}/u-boot-tpl.bin" "${BINARIES_DIR}/idbloader.img"
|
||||
cat "${BINARIES_DIR}/u-boot-spl.bin" >> "${BINARIES_DIR}/idbloader.img"
|
||||
|
||||
# SPL
|
||||
create_spl_image
|
||||
|
||||
dd if="${BINARIES_DIR}/u-boot-spl-dtb.img" of="${SPL_IMG}" conv=notrunc bs=512 seek=64
|
||||
dd if="${BINARIES_DIR}/idbloader.img" of="${SPL_IMG}" conv=notrunc bs=512 seek=64
|
||||
dd if="${BINARIES_DIR}/u-boot-dtb.img" of="${SPL_IMG}" conv=notrunc bs=512 seek=12288
|
||||
}
|
||||
|
||||
|
||||
|
File diff suppressed because it is too large
Load Diff
@@ -3,5 +3,8 @@ BOARD_NAME="Asus TinkerBoard"
|
||||
CHASSIS=embedded
|
||||
BOOTLOADER=uboot
|
||||
KERNEL_FILE=zImage
|
||||
BOOT_SYS=spl
|
||||
BOOT_SYS=hyprid
|
||||
BOOT_SPL=true
|
||||
BOOT_ENV_SIZE=0x8000
|
||||
SUPERVISOR_MACHINE=tinker
|
||||
SUPERVISOR_ARCH=armv7
|
||||
|
File diff suppressed because it is too large
Load Diff
@@ -1,122 +0,0 @@
|
||||
From 7ba71967a2678e119bcd819ac92d08bd038e1879 Mon Sep 17 00:00:00 2001
|
||||
From: Myy <myy@miouyouyou.fr>
|
||||
Date: Mon, 17 Jul 2017 18:34:33 +0000
|
||||
Subject: [PATCH 5/5] Mali midgard r19p0 fixes for 4.13 kernels
|
||||
|
||||
Mostly due to DMA structure members renamed, and some signatures
|
||||
modifications done during the development of Linux 4.11.
|
||||
|
||||
* mm, fs: reduce fault, page_mkwrite, and pfn_mkwrite to take only vmf
|
||||
11bac80004499ea59f361ef2a5516c84b6eab675
|
||||
v4.11-rc1
|
||||
|
||||
* sched/headers: Move task->mm handling methods to <linux/sched/mm.h>
|
||||
68e21be2916b359fd8afb536c1911dc014cfd03e
|
||||
v4.11-rc1
|
||||
|
||||
* sched/headers: Move task-stack related APIs from <linux/sched.h> to
|
||||
<linux/sched/task_stack.h>
|
||||
f3ac60671954c8d413532627b1be13a76f394c49
|
||||
v4.11-rc1
|
||||
|
||||
* dma-fence: Introduce drm_fence_set_error() helper
|
||||
a009e975da5c7d42a7f5eaadc54946eb5f76c9af
|
||||
v4.11-rc1
|
||||
|
||||
Signed-off-by: Myy <myy@miouyouyou.fr>
|
||||
---
|
||||
drivers/gpu/arm/midgard/mali_kbase.h | 4 ++++
|
||||
drivers/gpu/arm/midgard/mali_kbase_fence.h | 4 ++++
|
||||
drivers/gpu/arm/midgard/mali_kbase_mem_linux.c | 6 ++++++
|
||||
drivers/gpu/arm/midgard/mali_kbase_sync_file.c | 12 ++++++++++++
|
||||
4 files changed, 26 insertions(+)
|
||||
|
||||
diff --git a/drivers/gpu/arm/midgard/mali_kbase.h b/drivers/gpu/arm/midgard/mali_kbase.h
|
||||
index d77f186..5ee47c4 100644
|
||||
--- a/drivers/gpu/arm/midgard/mali_kbase.h
|
||||
+++ b/drivers/gpu/arm/midgard/mali_kbase.h
|
||||
@@ -35,6 +35,10 @@
|
||||
#include <linux/mutex.h>
|
||||
#include <linux/rwsem.h>
|
||||
#include <linux/sched.h>
|
||||
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 11, 0)
|
||||
+#include <linux/sched/task_stack.h>
|
||||
+#include <linux/sched/mm.h>
|
||||
+#endif
|
||||
#include <linux/slab.h>
|
||||
#include <linux/spinlock.h>
|
||||
#include <linux/vmalloc.h>
|
||||
diff --git a/drivers/gpu/arm/midgard/mali_kbase_fence.h b/drivers/gpu/arm/midgard/mali_kbase_fence.h
|
||||
index 8d39299..3c2e3a9 100644
|
||||
--- a/drivers/gpu/arm/midgard/mali_kbase_fence.h
|
||||
+++ b/drivers/gpu/arm/midgard/mali_kbase_fence.h
|
||||
@@ -134,7 +134,11 @@ static inline bool kbase_fence_out_is_ours(struct kbase_jd_atom *katom)
|
||||
static inline int kbase_fence_out_signal(struct kbase_jd_atom *katom,
|
||||
int status)
|
||||
{
|
||||
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(4, 11, 0))
|
||||
katom->dma_fence.fence->status = status;
|
||||
+#else
|
||||
+ katom->dma_fence.fence->error = status;
|
||||
+#endif
|
||||
return dma_fence_signal(katom->dma_fence.fence);
|
||||
}
|
||||
|
||||
diff --git a/drivers/gpu/arm/midgard/mali_kbase_mem_linux.c b/drivers/gpu/arm/midgard/mali_kbase_mem_linux.c
|
||||
index b1f2c46..896aa35 100644
|
||||
--- a/drivers/gpu/arm/midgard/mali_kbase_mem_linux.c
|
||||
+++ b/drivers/gpu/arm/midgard/mali_kbase_mem_linux.c
|
||||
@@ -1788,8 +1788,14 @@ static void kbase_cpu_vm_close(struct vm_area_struct *vma)
|
||||
KBASE_EXPORT_TEST_API(kbase_cpu_vm_close);
|
||||
|
||||
|
||||
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(4, 11, 0))
|
||||
static int kbase_cpu_vm_fault(struct vm_area_struct *vma, struct vm_fault *vmf)
|
||||
{
|
||||
+#else
|
||||
+static int kbase_cpu_vm_fault(struct vm_fault *vmf)
|
||||
+{
|
||||
+ struct vm_area_struct *vma = vmf->vma;
|
||||
+#endif
|
||||
struct kbase_cpu_mapping *map = vma->vm_private_data;
|
||||
pgoff_t rel_pgoff;
|
||||
size_t i;
|
||||
diff --git a/drivers/gpu/arm/midgard/mali_kbase_sync_file.c b/drivers/gpu/arm/midgard/mali_kbase_sync_file.c
|
||||
index 4e1621c..d84a54e 100644
|
||||
--- a/drivers/gpu/arm/midgard/mali_kbase_sync_file.c
|
||||
+++ b/drivers/gpu/arm/midgard/mali_kbase_sync_file.c
|
||||
@@ -161,8 +161,13 @@ static void kbase_fence_wait_callback(struct dma_fence *fence,
|
||||
struct kbase_context *kctx = katom->kctx;
|
||||
|
||||
/* Cancel atom if fence is erroneous */
|
||||
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(4, 11, 0))
|
||||
if (dma_fence_is_signaled(kcb->fence) && kcb->fence->status < 0)
|
||||
katom->event_code = BASE_JD_EVENT_JOB_CANCELLED;
|
||||
+#else
|
||||
+ if (dma_fence_is_signaled(kcb->fence) && kcb->fence->error < 0)
|
||||
+ katom->event_code = BASE_JD_EVENT_JOB_CANCELLED;
|
||||
+#endif
|
||||
|
||||
if (kbase_fence_dep_count_dec_and_test(katom)) {
|
||||
/* We take responsibility of handling this */
|
||||
@@ -273,10 +278,17 @@ static void kbase_sync_fence_info_get(struct dma_fence *fence,
|
||||
* 1 : signaled
|
||||
*/
|
||||
if (dma_fence_is_signaled(fence)) {
|
||||
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(4, 11, 0))
|
||||
if (fence->status < 0)
|
||||
info->status = fence->status; /* signaled with error */
|
||||
else
|
||||
info->status = 1; /* signaled with success */
|
||||
+#else
|
||||
+ if (fence->error < 0)
|
||||
+ info->status = fence->error; /* signaled with error */
|
||||
+ else
|
||||
+ info->status = 1; /* signaled with success */
|
||||
+#endif
|
||||
} else {
|
||||
info->status = 0; /* still active (unsignaled) */
|
||||
}
|
||||
--
|
||||
2.10.2
|
||||
|
@@ -1,36 +0,0 @@
|
||||
From f76c9c58669a3bba0456191431be558ab8054f50 Mon Sep 17 00:00:00 2001
|
||||
From: Myy <myy@miouyouyou.fr>
|
||||
Date: Mon, 17 Jul 2017 11:43:00 +0000
|
||||
Subject: [PATCH 3/5] Using the new header on 4.12 kernels for copy_*_user
|
||||
|
||||
These changes are due to :
|
||||
* generic ...copy_..._user primitives
|
||||
d597580d373774b1bdab84b3d26ff0b55162b916
|
||||
Version : 4.12-rc1
|
||||
|
||||
Signed-off-by: Myy <myy@miouyouyou.fr>
|
||||
---
|
||||
drivers/base/ump/src/linux/ump_kernel_linux.c | 7 ++++++-
|
||||
1 file changed, 6 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/drivers/base/ump/src/linux/ump_kernel_linux.c b/drivers/base/ump/src/linux/ump_kernel_linux.c
|
||||
index d6c3c53..bb3a7f0 100644
|
||||
--- a/drivers/base/ump/src/linux/ump_kernel_linux.c
|
||||
+++ b/drivers/base/ump/src/linux/ump_kernel_linux.c
|
||||
@@ -20,7 +20,12 @@
|
||||
#include <linux/ump-ioctl.h>
|
||||
#include <linux/ump.h>
|
||||
|
||||
-#include <asm/uaccess.h> /* copy_*_user */
|
||||
+#include <linux/version.h>
|
||||
+#if LINUX_VERSION_CODE < KERNEL_VERSION(4,12,0)
|
||||
+#include <asm/uaccess.h> /* copy_*_user */
|
||||
+#else
|
||||
+#include <linux/uaccess.h> /* copy_*_user */
|
||||
+#endif
|
||||
#include <linux/compat.h>
|
||||
#include <linux/module.h> /* kernel module definitions */
|
||||
#include <linux/fs.h> /* file system operations */
|
||||
--
|
||||
2.10.2
|
||||
|
@@ -1,46 +0,0 @@
|
||||
From 63c110cdebc2c692964e1250c6f74f9e8c47c85d Mon Sep 17 00:00:00 2001
|
||||
From: Myy <myy@miouyouyou.fr>
|
||||
Date: Tue, 10 Jan 2017 04:28:48 +0000
|
||||
Subject: [PATCH 4/5] Adapt get_user_pages calls to use the new calling
|
||||
procedure
|
||||
|
||||
These changes are due to this commit:
|
||||
mm: replace get_user_pages_remote() write/force parameters with gup_flags
|
||||
9beae1ea89305a9667ceaab6d0bf46a045ad71e7
|
||||
Kernel: 4.9.0-rc
|
||||
|
||||
Signed-off-by: Myy <myy@miouyouyou.fr>
|
||||
---
|
||||
drivers/base/ump/src/linux/ump_kernel_linux_mem.c | 8 ++++++++
|
||||
1 file changed, 8 insertions(+)
|
||||
|
||||
diff --git a/drivers/base/ump/src/linux/ump_kernel_linux_mem.c b/drivers/base/ump/src/linux/ump_kernel_linux_mem.c
|
||||
index 9186dd0..def4c0e 100644
|
||||
--- a/drivers/base/ump/src/linux/ump_kernel_linux_mem.c
|
||||
+++ b/drivers/base/ump/src/linux/ump_kernel_linux_mem.c
|
||||
@@ -35,6 +35,10 @@
|
||||
#include <ump_arch.h>
|
||||
#include <common/ump_kernel_priv.h>
|
||||
|
||||
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,5,0))
|
||||
+#include <linux/pfn_t.h>
|
||||
+#endif
|
||||
+
|
||||
static void umpp_vm_close(struct vm_area_struct *vma)
|
||||
{
|
||||
umpp_cpu_mapping * mapping;
|
||||
@@ -222,7 +226,11 @@ int umpp_linux_mmap(struct file * filp, struct vm_area_struct * vma)
|
||||
paddr = alloc->block_array[block_idx].addr;
|
||||
}
|
||||
|
||||
+#if (LINUX_VERSION_CODE <= KERNEL_VERSION(4,4,0))
|
||||
err = vm_insert_mixed(vma, vma->vm_start + (i << PAGE_SHIFT), paddr >> PAGE_SHIFT);
|
||||
+#else
|
||||
+ err = vm_insert_mixed(vma, vma->vm_start + (i << PAGE_SHIFT), __pfn_to_pfn_t(paddr >> PAGE_SHIFT, PFN_DEV));
|
||||
+#endif
|
||||
paddr += PAGE_SIZE;
|
||||
}
|
||||
|
||||
--
|
||||
2.10.2
|
||||
|
@@ -1,40 +0,0 @@
|
||||
From 7c27055687c595e9f9eca484314f4fe3866a4260 Mon Sep 17 00:00:00 2001
|
||||
From: Myy <myy@miouyouyou.fr>
|
||||
Date: Tue, 18 Jul 2017 17:35:16 +0000
|
||||
Subject: [PATCH 2/2] Don't be TOO severe when looking for the IRQ names
|
||||
|
||||
Using strncmp with an all caps result in the driver being unable to
|
||||
initialize itself when using the mainlined RK3288 DTS files, since they
|
||||
define the IRQ names as "job", "mmu" and "gpu" instead of "JOB", "MMU"
|
||||
and "GPU".
|
||||
|
||||
strncmp calls have been replaced by strncasecmp calls in order to
|
||||
avoid such issue.
|
||||
|
||||
Signed-off-by: Myy <myy@miouyouyou.fr>
|
||||
---
|
||||
drivers/gpu/arm/midgard/mali_kbase_core_linux.c | 6 +++---
|
||||
1 file changed, 3 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/drivers/gpu/arm/midgard/mali_kbase_core_linux.c b/drivers/gpu/arm/midgard/mali_kbase_core_linux.c
|
||||
index 0cccb0b..9cc65d2 100644
|
||||
--- a/drivers/gpu/arm/midgard/mali_kbase_core_linux.c
|
||||
+++ b/drivers/gpu/arm/midgard/mali_kbase_core_linux.c
|
||||
@@ -938,11 +938,11 @@ static int assign_irqs(struct platform_device *pdev)
|
||||
}
|
||||
|
||||
#ifdef CONFIG_OF
|
||||
- if (!strncmp(irq_res->name, "JOB", 4)) {
|
||||
+ if (!strncasecmp(irq_res->name, "JOB", 4)) {
|
||||
irqtag = JOB_IRQ_TAG;
|
||||
- } else if (!strncmp(irq_res->name, "MMU", 4)) {
|
||||
+ } else if (!strncasecmp(irq_res->name, "MMU", 4)) {
|
||||
irqtag = MMU_IRQ_TAG;
|
||||
- } else if (!strncmp(irq_res->name, "GPU", 4)) {
|
||||
+ } else if (!strncasecmp(irq_res->name, "GPU", 4)) {
|
||||
irqtag = GPU_IRQ_TAG;
|
||||
} else {
|
||||
dev_err(&pdev->dev, "Invalid irq res name: '%s'\n",
|
||||
--
|
||||
2.10.2
|
||||
|
@@ -1,42 +0,0 @@
|
||||
From ef7689887c31d2b1336e14f2c089185e8f60a9f1 Mon Sep 17 00:00:00 2001
|
||||
From: Myy <myy@miouyouyou.fr>
|
||||
Date: Mon, 7 Aug 2017 19:22:39 +0000
|
||||
Subject: [PATCH] Added the new "compatible" list, mainly used by Rockchip
|
||||
|
||||
Because, you know, all the Mali Midgard GPU used to define the GPU
|
||||
using the 'compatible = "arm,mali-midgard"' property, which worked fine.
|
||||
|
||||
But it was removed.
|
||||
|
||||
They replaced the "arm,mali-midgard" node by "arm,mali-tXXX" where XXX
|
||||
is the GPU series, and added "arm,rk3288-mali" which is used by nothing.
|
||||
|
||||
Which broke the Mali Midgard GPL kernel driver.
|
||||
|
||||
This patch fixes this issue.
|
||||
|
||||
Signed-off-by: Myy <myy@miouyouyou.fr>
|
||||
---
|
||||
drivers/gpu/arm/midgard/mali_kbase_core_linux.c | 6 ++++++
|
||||
1 file changed, 6 insertions(+)
|
||||
|
||||
diff --git a/drivers/gpu/arm/midgard/mali_kbase_core_linux.c b/drivers/gpu/arm/midgard/mali_kbase_core_linux.c
|
||||
index 27dcd9c1..cc4932a4 100644
|
||||
--- a/drivers/gpu/arm/midgard/mali_kbase_core_linux.c
|
||||
+++ b/drivers/gpu/arm/midgard/mali_kbase_core_linux.c
|
||||
@@ -4742,6 +4742,12 @@ static const struct dev_pm_ops kbase_pm_ops = {
|
||||
static const struct of_device_id kbase_dt_ids[] = {
|
||||
{ .compatible = "arm,malit6xx" },
|
||||
{ .compatible = "arm,mali-midgard" },
|
||||
+ { .compatible = "arm,mali-t720" },
|
||||
+ { .compatible = "arm,mali-t760" },
|
||||
+ { .compatible = "arm,mali-t820" },
|
||||
+ { .compatible = "arm,mali-t830" },
|
||||
+ { .compatible = "arm,mali-t860" },
|
||||
+ { .compatible = "arm,mali-t880" },
|
||||
{ /* sentinel */ }
|
||||
};
|
||||
MODULE_DEVICE_TABLE(of, kbase_dt_ids);
|
||||
--
|
||||
2.13.0
|
||||
|
@@ -1,34 +0,0 @@
|
||||
From 9812105eb6220863af05fc72591118f0a48e1c4e Mon Sep 17 00:00:00 2001
|
||||
From: Myy Miouyouyou <myy@miouyouyou.fr>
|
||||
Date: Mon, 21 May 2018 22:32:59 +0200
|
||||
Subject: [PATCH] GPU: ARM: Midgard: Adapt to the new mmap call checks.
|
||||
|
||||
Now, I don't know if this driver is just one of these "buggy" drivers
|
||||
Linus is talking about, or if this is just standard GPU procedure.
|
||||
|
||||
Anyway, this patch is due to this change by Linus Torvalds :
|
||||
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=be83bbf806822b1b89e0a0f23cd87cddc409e429
|
||||
|
||||
And the fix is inspired by :
|
||||
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=76ef6b28ea4f81c3d511866a9b31392caa833126
|
||||
|
||||
Signed-off-by: Myy Miouyouyou <myy@miouyouyou.fr>
|
||||
---
|
||||
drivers/gpu/arm/midgard/mali_kbase_core_linux.c | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/drivers/gpu/arm/midgard/mali_kbase_core_linux.c b/drivers/gpu/arm/midgard/mali_kbase_core_linux.c
|
||||
index cc4932a4ead7..89b4cca27cf1 100644
|
||||
--- a/drivers/gpu/arm/midgard/mali_kbase_core_linux.c
|
||||
+++ b/drivers/gpu/arm/midgard/mali_kbase_core_linux.c
|
||||
@@ -1087,6 +1087,7 @@ static int kbase_open(struct inode *inode, struct file *filp)
|
||||
|
||||
init_waitqueue_head(&kctx->event_queue);
|
||||
filp->private_data = kctx;
|
||||
+ filp->f_mode |= FMODE_UNSIGNED_OFFSET;
|
||||
kctx->filp = filp;
|
||||
|
||||
if (kbdev->infinite_cache_active_default)
|
||||
--
|
||||
2.17.0
|
||||
|
@@ -0,0 +1,74 @@
|
||||
Patches act8846 regulator providing the proper reset handle and exploit
|
||||
the SIPC bit in GLB_POWER_OFF register. Mainly used to reset some rockchip
|
||||
boards.
|
||||
|
||||
Origin: <https://patchwork.kernel.org/patch/6409521/>
|
||||
|
||||
diff --git a/drivers/regulator/act8865-regulator.c b/drivers/regulator/act8865-regulator.c
|
||||
index 2ff73d7..836d10b 100644
|
||||
--- a/drivers/regulator/act8865-regulator.c
|
||||
+++ b/drivers/regulator/act8865-regulator.c
|
||||
@@ -27,6 +27,7 @@
|
||||
#include <linux/regulator/of_regulator.h>
|
||||
#include <linux/regmap.h>
|
||||
#include <dt-bindings/regulator/active-semi,8865-regulator.h>
|
||||
+#include <linux/reboot.h>
|
||||
|
||||
/*
|
||||
* ACT8600 Global Register Map.
|
||||
@@ -133,6 +134,8 @@
|
||||
#define ACT8865_VOLTAGE_NUM 64
|
||||
#define ACT8600_SUDCDC_VOLTAGE_NUM 255
|
||||
|
||||
+#define ACT8846_SIPC_MASK 0x01
|
||||
+
|
||||
struct act8865 {
|
||||
struct regmap *regmap;
|
||||
int off_reg;
|
||||
@@ -402,6 +405,22 @@ static void act8865_power_off(void)
|
||||
while (1);
|
||||
}
|
||||
|
||||
+static int act8846_power_cycle(struct notifier_block *this,
|
||||
+ unsigned long code, void *unused)
|
||||
+{
|
||||
+ struct act8865 *act8846;
|
||||
+
|
||||
+ act8846 = i2c_get_clientdata(act8865_i2c_client);
|
||||
+ regmap_write(act8846->regmap, ACT8846_GLB_OFF_CTRL, ACT8846_SIPC_MASK);
|
||||
+
|
||||
+ return NOTIFY_DONE;
|
||||
+}
|
||||
+
|
||||
+static struct notifier_block act8846_restart_handler = {
|
||||
+ .notifier_call = act8846_power_cycle,
|
||||
+ .priority = 129,
|
||||
+};
|
||||
+
|
||||
static int act8865_pmic_probe(struct i2c_client *client,
|
||||
const struct i2c_device_id *i2c_id)
|
||||
{
|
||||
@@ -484,6 +503,8 @@ static int act8865_pmic_probe(struct i2c_client *client,
|
||||
}
|
||||
|
||||
if (of_device_is_system_power_controller(dev->of_node)) {
|
||||
+ int ret;
|
||||
+
|
||||
if (!pm_power_off && (off_reg > 0)) {
|
||||
act8865_i2c_client = client;
|
||||
act8865->off_reg = off_reg;
|
||||
@@ -492,6 +513,14 @@ static int act8865_pmic_probe(struct i2c_client *client,
|
||||
} else {
|
||||
dev_err(dev, "Failed to set poweroff capability, already defined\n");
|
||||
}
|
||||
+
|
||||
+ if (type == ACT8846) {
|
||||
+ act8865_i2c_client = client;
|
||||
+ ret = register_restart_handler(&act8846_restart_handler);
|
||||
+ if (ret)
|
||||
+ pr_err("%s: cannot register restart handler, %d\n",
|
||||
+ __func__, ret);
|
||||
+ }
|
||||
}
|
||||
|
||||
/* Finally register devices */
|
@@ -1,65 +0,0 @@
|
||||
From 7de25b73e152830587740d8f2ffaad94c72d90ac Mon Sep 17 00:00:00 2001
|
||||
From: Myy <myy@miouyouyou.fr>
|
||||
Date: Mon, 17 Jul 2017 11:24:47 +0000
|
||||
Subject: [PATCH 1/5] Integrating the Mali drivers
|
||||
|
||||
Changses required in order to select and compile the previously copied
|
||||
Mali Midgard drivers.
|
||||
|
||||
Signed-off-by: Myy <myy@miouyouyou.fr>
|
||||
|
||||
---
|
||||
drivers/base/Kconfig | 2 ++
|
||||
drivers/base/Makefile | 1 +
|
||||
drivers/gpu/Makefile | 2 +-
|
||||
drivers/video/Kconfig | 1 +
|
||||
4 files changed, 5 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/drivers/base/Kconfig b/drivers/base/Kconfig
|
||||
index f046d21..b0982fc 100644
|
||||
--- a/drivers/base/Kconfig
|
||||
+++ b/drivers/base/Kconfig
|
||||
@@ -348,3 +348,5 @@ config GENERIC_ARCH_TOPOLOGY
|
||||
runtime.
|
||||
|
||||
endmenu
|
||||
+
|
||||
+source "drivers/base/ump/Kconfig"
|
||||
diff --git a/drivers/base/Makefile b/drivers/base/Makefile
|
||||
index 397e5c3..251e0cf 100644
|
||||
--- a/drivers/base/Makefile
|
||||
+++ b/drivers/base/Makefile
|
||||
@@ -24,6 +24,7 @@ obj-$(CONFIG_PINCTRL) += pinctrl.o
|
||||
obj-$(CONFIG_DEV_COREDUMP) += devcoredump.o
|
||||
obj-$(CONFIG_GENERIC_MSI_IRQ_DOMAIN) += platform-msi.o
|
||||
obj-$(CONFIG_GENERIC_ARCH_TOPOLOGY) += arch_topology.o
|
||||
+obj-$(CONFIG_UMP) += ump/
|
||||
|
||||
obj-y += test/
|
||||
|
||||
diff --git a/drivers/gpu/Makefile b/drivers/gpu/Makefile
|
||||
index e9ed439..66386b4 100644
|
||||
--- a/drivers/gpu/Makefile
|
||||
+++ b/drivers/gpu/Makefile
|
||||
@@ -2,5 +2,5 @@
|
||||
# taken to initialize them in the correct order. Link order is the only way
|
||||
# to ensure this currently.
|
||||
obj-$(CONFIG_TEGRA_HOST1X) += host1x/
|
||||
-obj-y += drm/ vga/
|
||||
+obj-y += drm/ vga/ arm/
|
||||
obj-$(CONFIG_IMX_IPUV3_CORE) += ipu-v3/
|
||||
diff --git a/drivers/video/Kconfig b/drivers/video/Kconfig
|
||||
index 3c20af9..041e15f 100644
|
||||
--- a/drivers/video/Kconfig
|
||||
+++ b/drivers/video/Kconfig
|
||||
@@ -17,6 +17,7 @@ source "drivers/gpu/vga/Kconfig"
|
||||
|
||||
source "drivers/gpu/host1x/Kconfig"
|
||||
source "drivers/gpu/ipu-v3/Kconfig"
|
||||
+source "drivers/gpu/arm/midgard/Kconfig"
|
||||
|
||||
source "drivers/gpu/drm/Kconfig"
|
||||
|
||||
--
|
||||
2.10.2
|
||||
|
@@ -1,41 +0,0 @@
|
||||
From b82f540967f6a732a22bbd236457b864951aeda7 Mon Sep 17 00:00:00 2001
|
||||
From: Myy <myy@miouyouyou.fr>
|
||||
Date: Sun, 14 May 2017 10:13:26 +0000
|
||||
Subject: [PATCH] clk: rockchip: rk3288: prefer vdpu for vcodec clock source
|
||||
|
||||
Patch provided by Randy Li. The original commit message reads :
|
||||
|
||||
_______________
|
||||
The RK3288 CRU system clock solution would suggest use
|
||||
the vdpu clock source for the VPU(aclk_vpu and hclk_vpu).
|
||||
|
||||
Reading the registers of VPU(both VEPU and VDPU) would become all high
|
||||
when the vepu is used as the clock source. It may be a bug in the SoC,
|
||||
not sure whether it is fixed at RK3288W.
|
||||
|
||||
Signed-off-by: Randy Li <ayaka@soulik.info>
|
||||
_______________
|
||||
|
||||
This also resolves a freeze when loading the OOT Video Codec driver
|
||||
|
||||
Signed-off-by: Myy <myy@miouyouyou.fr>
|
||||
---
|
||||
drivers/clk/rockchip/clk-rk3288.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/drivers/clk/rockchip/clk-rk3288.c b/drivers/clk/rockchip/clk-rk3288.c
|
||||
index 1227f74..f218256 100644
|
||||
--- a/drivers/clk/rockchip/clk-rk3288.c
|
||||
+++ b/drivers/clk/rockchip/clk-rk3288.c
|
||||
@@ -215,7 +215,7 @@ PNAME(mux_hsadcout_p) = { "hsadc_src", "ext_hsadc" };
|
||||
PNAME(mux_edp_24m_p) = { "ext_edp_24m", "xin24m" };
|
||||
PNAME(mux_tspout_p) = { "cpll", "gpll", "npll", "xin27m" };
|
||||
|
||||
-PNAME(mux_aclk_vcodec_pre_p) = { "aclk_vepu", "aclk_vdpu" };
|
||||
+PNAME(mux_aclk_vcodec_pre_p) = { "aclk_vdpu", "aclk_vepu" };
|
||||
PNAME(mux_usbphy480m_p) = { "sclk_otgphy1_480m", "sclk_otgphy2_480m",
|
||||
"sclk_otgphy0_480m" };
|
||||
PNAME(mux_hsicphy480m_p) = { "cpll", "gpll", "usbphy480m_src" };
|
||||
--
|
||||
2.10.2
|
||||
|
@@ -1,30 +0,0 @@
|
||||
From 239a5e3016b7f676bc3f56ea509ed172bf954001 Mon Sep 17 00:00:00 2001
|
||||
From: Myy <myy@miouyouyou.fr>
|
||||
Date: Sat, 22 Jul 2017 04:07:36 +0000
|
||||
Subject: [PATCH] Remove the dependency to the clk_mali symbol.
|
||||
|
||||
Inspired by @wzzy2 patch
|
||||
|
||||
https://github.com/rockchip-linux/rockchip_forwardports/commit/359865c617129fe5fcc5530f4a88abcfaa6a5cb4
|
||||
|
||||
Signed-off-by: Myy <myy@miouyouyou.fr>
|
||||
---
|
||||
drivers/gpu/arm/midgard/mali_kbase_core_linux.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/drivers/gpu/arm/midgard/mali_kbase_core_linux.c b/drivers/gpu/arm/midgard/mali_kbase_core_linux.c
|
||||
index 9cc65d2..27dcd9c 100644
|
||||
--- a/drivers/gpu/arm/midgard/mali_kbase_core_linux.c
|
||||
+++ b/drivers/gpu/arm/midgard/mali_kbase_core_linux.c
|
||||
@@ -3793,7 +3793,7 @@ static int power_control_init(struct platform_device *pdev)
|
||||
}
|
||||
#endif /* LINUX_VERSION_CODE >= 3, 12, 0 */
|
||||
|
||||
- kbdev->clock = clk_get(kbdev->dev, "clk_mali");
|
||||
+ kbdev->clock = of_clk_get(kbdev->dev->of_node, 0);
|
||||
if (IS_ERR_OR_NULL(kbdev->clock)) {
|
||||
err = PTR_ERR(kbdev->clock);
|
||||
kbdev->clock = NULL;
|
||||
--
|
||||
2.10.2
|
||||
|
@@ -1,156 +0,0 @@
|
||||
From 1aeeeeaf10ad5888c1a5b3ab9b780be91c7dada9 Mon Sep 17 00:00:00 2001
|
||||
From: Myy <myy@miouyouyou.fr>
|
||||
Date: Mon, 24 Jul 2017 23:09:31 +0000
|
||||
Subject: [PATCH] Last try for the reboot hack
|
||||
|
||||
If this one does not work, get a refund for your CantRebootBoard.
|
||||
|
||||
Signed-off-by: Myy <myy@miouyouyou.fr>
|
||||
---
|
||||
drivers/mmc/host/dw_mmc-rockchip.c | 24 ++++++++++++++++++++++++
|
||||
drivers/mmc/host/dw_mmc.c | 26 ++++++++++++++++++++++++++
|
||||
include/linux/reboot.h | 3 +++
|
||||
kernel/reboot.c | 1 +
|
||||
4 files changed, 54 insertions(+)
|
||||
|
||||
diff --git a/drivers/mmc/host/dw_mmc-rockchip.c b/drivers/mmc/host/dw_mmc-rockchip.c
|
||||
index aaed6f9b..71131020 100644
|
||||
--- a/drivers/mmc/host/dw_mmc-rockchip.c
|
||||
+++ b/drivers/mmc/host/dw_mmc-rockchip.c
|
||||
@@ -14,10 +14,12 @@
|
||||
#include <linux/of_address.h>
|
||||
#include <linux/mmc/slot-gpio.h>
|
||||
#include <linux/pm_runtime.h>
|
||||
+#include <linux/regulator/consumer.h> // Hack
|
||||
#include <linux/slab.h>
|
||||
|
||||
#include "dw_mmc.h"
|
||||
#include "dw_mmc-pltfm.h"
|
||||
+#include "../core/core.h" // Hack
|
||||
|
||||
#define RK3288_CLKGEN_DIV 2
|
||||
|
||||
@@ -365,6 +367,27 @@ static int dw_mci_rockchip_probe(struct platform_device *pdev)
|
||||
return 0;
|
||||
}
|
||||
|
||||
+static void dw_mci_rockchip_platfm_shutdown(struct platform_device *pdev)
|
||||
+{
|
||||
+ struct dw_mci *host = platform_get_drvdata(pdev);
|
||||
+ struct mmc_host *mmc = host->slot->mmc;
|
||||
+ int ret;
|
||||
+
|
||||
+ if(of_machine_is_compatible("asus,rk3288-tinker")){
|
||||
+
|
||||
+ mmc_power_off(mmc);
|
||||
+
|
||||
+ mdelay(20);
|
||||
+
|
||||
+ if (!IS_ERR(mmc->supply.vmmc))
|
||||
+ ret = regulator_enable(mmc->supply.vmmc);
|
||||
+
|
||||
+ if (!IS_ERR(mmc->supply.vqmmc))
|
||||
+ regulator_set_voltage(mmc->supply.vqmmc, 3000000, 3300000);
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+
|
||||
static int dw_mci_rockchip_remove(struct platform_device *pdev)
|
||||
{
|
||||
pm_runtime_get_sync(&pdev->dev);
|
||||
@@ -385,6 +408,7 @@ static const struct dev_pm_ops dw_mci_rockchip_dev_pm_ops = {
|
||||
static struct platform_driver dw_mci_rockchip_pltfm_driver = {
|
||||
.probe = dw_mci_rockchip_probe,
|
||||
.remove = dw_mci_rockchip_remove,
|
||||
+ .shutdown = dw_mci_rockchip_platfm_shutdown,
|
||||
.driver = {
|
||||
.name = "dwmmc_rockchip",
|
||||
.of_match_table = dw_mci_rockchip_match,
|
||||
diff --git a/drivers/mmc/host/dw_mmc.c b/drivers/mmc/host/dw_mmc.c
|
||||
index a9dfb269..ee956a57 100644
|
||||
--- a/drivers/mmc/host/dw_mmc.c
|
||||
+++ b/drivers/mmc/host/dw_mmc.c
|
||||
@@ -39,8 +39,10 @@
|
||||
#include <linux/of.h>
|
||||
#include <linux/of_gpio.h>
|
||||
#include <linux/mmc/slot-gpio.h>
|
||||
+#include <linux/reboot.h> // Hack
|
||||
|
||||
#include "dw_mmc.h"
|
||||
+#include "../core/core.h" // Hack
|
||||
|
||||
/* Common flag combinations */
|
||||
#define DW_MCI_DATA_ERROR_FLAGS (SDMMC_INT_DRTO | SDMMC_INT_DCRC | \
|
||||
@@ -2687,6 +2689,28 @@ static irqreturn_t dw_mci_interrupt(int irq, void *dev_id)
|
||||
return IRQ_HANDLED;
|
||||
}
|
||||
|
||||
+struct dw_mci *mSdhost;
|
||||
+void setmmcEmergency() {
|
||||
+ struct mmc_host *mmc;
|
||||
+ int ret;
|
||||
+
|
||||
+ printk(KERN_ERR "Emergency route taken.\n");
|
||||
+ if (of_machine_is_compatible("asus,rk3288-tinker")) {
|
||||
+ mmc = mSdhost->slot->mmc;
|
||||
+
|
||||
+ mmc_power_off(mmc);
|
||||
+
|
||||
+ mdelay(20);
|
||||
+
|
||||
+ if (!IS_ERR(mmc->supply.vmmc))
|
||||
+ ret = regulator_enable(mmc->supply.vmmc);
|
||||
+
|
||||
+ if (!IS_ERR(mmc->supply.vqmmc))
|
||||
+ regulator_set_voltage(mmc->supply.vqmmc, 3000000, 3300000);
|
||||
+ }
|
||||
+}
|
||||
+EXPORT_SYMBOL(setmmcEmergency);
|
||||
+
|
||||
static int dw_mci_init_slot(struct dw_mci *host)
|
||||
{
|
||||
struct mmc_host *mmc;
|
||||
@@ -2718,6 +2742,8 @@ static int dw_mci_init_slot(struct dw_mci *host)
|
||||
mmc->f_max = freq[1];
|
||||
}
|
||||
|
||||
+ if (of_find_property(host->dev->of_node, "supports-sd", NULL))
|
||||
+ mSdhost = host;
|
||||
/*if there are external regulators, get them*/
|
||||
ret = mmc_regulator_get_supply(mmc);
|
||||
if (ret == -EPROBE_DEFER)
|
||||
diff --git a/include/linux/reboot.h b/include/linux/reboot.h
|
||||
index a7ff409f..586e4504 100644
|
||||
--- a/include/linux/reboot.h
|
||||
+++ b/include/linux/reboot.h
|
||||
@@ -72,12 +72,15 @@ extern char poweroff_cmd[POWEROFF_CMD_PATH_LEN];
|
||||
|
||||
extern void orderly_poweroff(bool force);
|
||||
extern void orderly_reboot(void);
|
||||
+// Wonderful ASUS hack
|
||||
+extern void setmmcEmergency(void);
|
||||
|
||||
/*
|
||||
* Emergency restart, callable from an interrupt handler.
|
||||
*/
|
||||
|
||||
extern void emergency_restart(void);
|
||||
+
|
||||
#include <asm/emergency-restart.h>
|
||||
|
||||
#endif /* _LINUX_REBOOT_H */
|
||||
diff --git a/kernel/reboot.c b/kernel/reboot.c
|
||||
index bd30a973..9f99488f 100644
|
||||
--- a/kernel/reboot.c
|
||||
+++ b/kernel/reboot.c
|
||||
@@ -61,6 +61,7 @@ void (*pm_power_off_prepare)(void);
|
||||
void emergency_restart(void)
|
||||
{
|
||||
kmsg_dump(KMSG_DUMP_EMERG);
|
||||
+ setmmcEmergency();
|
||||
machine_emergency_restart();
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(emergency_restart);
|
||||
--
|
||||
2.13.0
|
||||
|
File diff suppressed because it is too large
Load Diff
@@ -1,59 +0,0 @@
|
||||
From c9f505dba7e4a3adc62054b852349e8bbae10326 Mon Sep 17 00:00:00 2001
|
||||
From: Jacob Chen <jacob-chen@iotwrt.com>
|
||||
Date: Mon, 26 Jun 2017 22:53:22 +0800
|
||||
Subject: [PATCH 5/9] dt-bindings: Document the Rockchip RGA bindings
|
||||
|
||||
Add DT bindings documentation for Rockchip RGA
|
||||
|
||||
Signed-off-by: Yakir Yang <ykk@rock-chips.com>
|
||||
Signed-off-by: Jacob Chen <jacob-chen@iotwrt.com>
|
||||
---
|
||||
.../devicetree/bindings/media/rockchip-rga.txt | 36 ++++++++++++++++++++++
|
||||
1 file changed, 36 insertions(+)
|
||||
create mode 100644 Documentation/devicetree/bindings/media/rockchip-rga.txt
|
||||
|
||||
diff --git a/Documentation/devicetree/bindings/media/rockchip-rga.txt b/Documentation/devicetree/bindings/media/rockchip-rga.txt
|
||||
new file mode 100644
|
||||
index 00000000..48a260e5
|
||||
--- /dev/null
|
||||
+++ b/Documentation/devicetree/bindings/media/rockchip-rga.txt
|
||||
@@ -0,0 +1,36 @@
|
||||
+device-tree bindings for rockchip 2D raster graphic acceleration controller (RGA)
|
||||
+
|
||||
+RGA is a separate 2D raster graphic acceleration unit. It accelerates 2D
|
||||
+graphics operations, such as point/line drawing, image scaling, rotation,
|
||||
+BitBLT, alpha blending and image blur/sharpness.
|
||||
+
|
||||
+Required properties:
|
||||
+- compatible: value should be one of the following
|
||||
+ "rockchip,rk3228-rga";
|
||||
+ "rockchip,rk3288-rga";
|
||||
+ "rockchip,rk3399-rga";
|
||||
+
|
||||
+- interrupts: RGA interrupt number.
|
||||
+
|
||||
+- clocks: phandle to RGA sclk/hclk/aclk clocks
|
||||
+
|
||||
+- clock-names: should be "aclk" "hclk" and "sclk"
|
||||
+
|
||||
+- resets: Must contain an entry for each entry in reset-names.
|
||||
+ See ../reset/reset.txt for details.
|
||||
+- reset-names: should be "core" "axi" and "ahb"
|
||||
+
|
||||
+Example:
|
||||
+SoC specific DT entry:
|
||||
+ rga: rga@ff680000 {
|
||||
+ compatible = "rockchip,rk3399-rga";
|
||||
+ reg = <0xff680000 0x10000>;
|
||||
+ interrupts = <GIC_SPI 55 IRQ_TYPE_LEVEL_HIGH>;
|
||||
+ interrupt-names = "rga";
|
||||
+ clocks = <&cru ACLK_RGA>, <&cru HCLK_RGA>, <&cru SCLK_RGA_CORE>;
|
||||
+ clock-names = "aclk", "hclk", "sclk";
|
||||
+
|
||||
+ resets = <&cru SRST_RGA_CORE>, <&cru SRST_A_RGA>, <&cru SRST_H_RGA>;
|
||||
+ reset-names = "core, "axi", "ahb";
|
||||
+ status = "disabled";
|
||||
+ };
|
||||
--
|
||||
2.13.0
|
||||
|
@@ -1,83 +0,0 @@
|
||||
diff --git a/drivers/usb/dwc2/hcd.c b/drivers/usb/dwc2/hcd.c
|
||||
index 7b6eb0ad513b..96b6935dc0d7 100644
|
||||
--- a/drivers/usb/dwc2/hcd.c
|
||||
+++ b/drivers/usb/dwc2/hcd.c
|
||||
@@ -2748,6 +2748,8 @@ static int dwc2_assign_and_init_hc(struct dwc2_hsotg *hsotg, struct dwc2_qh *qh)
|
||||
chan->xfer_len = urb->length - urb->actual_length;
|
||||
chan->xfer_count = 0;
|
||||
|
||||
+ chan->csplit_nak = 0;
|
||||
+
|
||||
/* Set the split attributes if required */
|
||||
if (qh->do_split)
|
||||
dwc2_hc_init_split(hsotg, chan, qtd, urb);
|
||||
diff --git a/drivers/usb/dwc2/hcd.h b/drivers/usb/dwc2/hcd.h
|
||||
index 78e9e01051b5..e54f1351225b 100644
|
||||
--- a/drivers/usb/dwc2/hcd.h
|
||||
+++ b/drivers/usb/dwc2/hcd.h
|
||||
@@ -143,6 +143,7 @@ struct dwc2_host_chan {
|
||||
u8 halt_pending;
|
||||
u8 do_split;
|
||||
u8 complete_split;
|
||||
+ u8 csplit_nak;
|
||||
u8 hub_addr;
|
||||
u8 hub_port;
|
||||
u8 xact_pos;
|
||||
diff --git a/drivers/usb/dwc2/hcd_intr.c b/drivers/usb/dwc2/hcd_intr.c
|
||||
index 916d991b96b8..551cfacd2252 100644
|
||||
--- a/drivers/usb/dwc2/hcd_intr.c
|
||||
+++ b/drivers/usb/dwc2/hcd_intr.c
|
||||
@@ -691,6 +691,7 @@ static void dwc2_release_channel(struct dwc2_hsotg *hsotg,
|
||||
enum dwc2_transaction_type tr_type;
|
||||
u32 haintmsk;
|
||||
int free_qtd = 0;
|
||||
+ int continue_trans = 1;
|
||||
|
||||
if (dbg_hc(chan))
|
||||
dev_vdbg(hsotg->dev, " %s: channel %d, halt_status %d\n",
|
||||
@@ -719,6 +720,7 @@ static void dwc2_release_channel(struct dwc2_hsotg *hsotg,
|
||||
* deactivated. Don't want to do anything except release the
|
||||
* host channel and try to queue more transfers.
|
||||
*/
|
||||
+ continue_trans = 0;
|
||||
goto cleanup;
|
||||
case DWC2_HC_XFER_PERIODIC_INCOMPLETE:
|
||||
dev_vdbg(hsotg->dev, " Complete URB with I/O error\n");
|
||||
@@ -730,6 +732,11 @@ static void dwc2_release_channel(struct dwc2_hsotg *hsotg,
|
||||
break;
|
||||
}
|
||||
|
||||
+ if (chan->csplit_nak) {
|
||||
+ continue_trans = 0;
|
||||
+ chan->csplit_nak = 0;
|
||||
+ }
|
||||
+
|
||||
dwc2_deactivate_qh(hsotg, chan->qh, free_qtd);
|
||||
|
||||
cleanup:
|
||||
@@ -767,9 +774,11 @@ static void dwc2_release_channel(struct dwc2_hsotg *hsotg,
|
||||
dwc2_writel(haintmsk, hsotg->regs + HAINTMSK);
|
||||
|
||||
/* Try to queue more transfers now that there's a free channel */
|
||||
- tr_type = dwc2_hcd_select_transactions(hsotg);
|
||||
- if (tr_type != DWC2_TRANSACTION_NONE)
|
||||
- dwc2_hcd_queue_transactions(hsotg, tr_type);
|
||||
+ if (continue_trans) {
|
||||
+ tr_type = dwc2_hcd_select_transactions(hsotg);
|
||||
+ if (tr_type != DWC2_TRANSACTION_NONE)
|
||||
+ dwc2_hcd_queue_transactions(hsotg, tr_type);
|
||||
+ }
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -1205,6 +1214,7 @@ static void dwc2_hc_nak_intr(struct dwc2_hsotg *hsotg,
|
||||
if (chan->do_split) {
|
||||
if (chan->complete_split)
|
||||
qtd->error_count = 0;
|
||||
+ chan->csplit_nak = 1;
|
||||
qtd->complete_split = 0;
|
||||
dwc2_halt_channel(hsotg, chan, qtd, DWC2_HC_XFER_NAK);
|
||||
goto handle_nak_done;
|
||||
--
|
||||
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
|
||||
|
@@ -0,0 +1,62 @@
|
||||
From 2c2e60256f2cbb2fce50a6317f85b1500efd1a6c Mon Sep 17 00:00:00 2001
|
||||
From: "Miouyouyou (Myy)" <myy@miouyouyou.fr>
|
||||
Date: Mon, 5 Nov 2018 22:03:26 +0100
|
||||
Subject: [PATCH] ARM: DTS: rk3288-tinker: Setup the Bluetooth UART pins
|
||||
|
||||
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>
|
||||
---
|
||||
arch/arm/boot/dts/rk3288-tinker.dts | 6 ++++++
|
||||
1 file changed, 6 insertions(+)
|
||||
|
||||
diff --git a/arch/arm/boot/dts/rk3288-tinker.dts b/arch/arm/boot/dts/rk3288-tinker.dts
|
||||
index d4df13bed..b92e59c1e 100644
|
||||
--- a/arch/arm/boot/dts/rk3288-tinker.dts
|
||||
+++ b/arch/arm/boot/dts/rk3288-tinker.dts
|
||||
@@ -73,3 +73,9 @@
|
||||
status = "okay";
|
||||
supports-sdio;
|
||||
};
|
||||
+
|
||||
+&uart0 {
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&uart0_xfer>, <&uart0_cts>, <&uart0_rts>;
|
||||
+};
|
||||
+
|
||||
--
|
||||
2.16.4
|
||||
|
@@ -0,0 +1,28 @@
|
||||
From ebc29962ac27264772a4227f5abd6900cb72fa79 Mon Sep 17 00:00:00 2001
|
||||
From: "Miouyouyou (Myy)" <myy@miouyouyou.fr>
|
||||
Date: Mon, 5 Nov 2018 20:16:05 +0100
|
||||
Subject: [PATCH] ARM: DTSI: rk3288-tinker: Improving the CPU max voltage
|
||||
|
||||
Taken from the various patches provided by @TonyMac32 .
|
||||
|
||||
Signed-off-by: Miouyouyou (Myy) <myy@miouyouyou.fr>
|
||||
---
|
||||
arch/arm/boot/dts/rk3288-tinker.dtsi | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/arch/arm/boot/dts/rk3288-tinker.dtsi b/arch/arm/boot/dts/rk3288-tinker.dtsi
|
||||
index aa107ee41..3da1c830f 100644
|
||||
--- a/arch/arm/boot/dts/rk3288-tinker.dtsi
|
||||
+++ b/arch/arm/boot/dts/rk3288-tinker.dtsi
|
||||
@@ -164,7 +164,7 @@
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
regulator-min-microvolt = <750000>;
|
||||
- regulator-max-microvolt = <1350000>;
|
||||
+ regulator-max-microvolt = <1450000>;
|
||||
regulator-name = "vdd_arm";
|
||||
regulator-ramp-delay = <6000>;
|
||||
regulator-state-mem {
|
||||
--
|
||||
2.16.4
|
||||
|
@@ -0,0 +1,31 @@
|
||||
From 3dacea70a8e434008f5b1f119a7f7da9aebc772c Mon Sep 17 00:00:00 2001
|
||||
From: "Miouyouyou (Myy)" <myy@miouyouyou.fr>
|
||||
Date: Mon, 5 Nov 2018 20:18:58 +0100
|
||||
Subject: [PATCH] ARM: DTSI: rk3288-tinker: Setting up the SD regulators
|
||||
|
||||
Some are needed and some are not. Playing with these parameters is
|
||||
required to get reboot working on these boards.
|
||||
|
||||
I still can't believe that these boards can't soft reset correctly.
|
||||
|
||||
Signed-off-by: Miouyouyou (Myy) <myy@miouyouyou.fr>
|
||||
---
|
||||
arch/arm/boot/dts/rk3288-tinker.dtsi | 2 ++
|
||||
1 file changed, 2 insertions(+)
|
||||
|
||||
diff --git a/arch/arm/boot/dts/rk3288-tinker.dtsi b/arch/arm/boot/dts/rk3288-tinker.dtsi
|
||||
index 3da1c830f..dd1090728 100644
|
||||
--- a/arch/arm/boot/dts/rk3288-tinker.dtsi
|
||||
+++ b/arch/arm/boot/dts/rk3288-tinker.dtsi
|
||||
@@ -254,7 +254,8 @@
|
||||
};
|
||||
|
||||
vccio_sd: LDO_REG5 {
|
||||
+ regulator-always-on;
|
||||
regulator-boot-on;
|
||||
regulator-min-microvolt = <1800000>;
|
||||
regulator-max-microvolt = <3300000>;
|
||||
regulator-name = "vccio_sd";
|
||||
--
|
||||
2.16.4
|
||||
|
@@ -0,0 +1,53 @@
|
||||
From a72e0749acad92df7b854e38e97e1dc7b4799abe Mon Sep 17 00:00:00 2001
|
||||
From: "Miouyouyou (Myy)" <myy@miouyouyou.fr>
|
||||
Date: Mon, 5 Nov 2018 22:11:24 +0100
|
||||
Subject: [PATCH] ARM: DTS: rk3288-tinker: Defined the I2C interfaces
|
||||
|
||||
And all the hardware behind.
|
||||
|
||||
Taken from @TonyMac32, Butchered by @Miouyouyou .
|
||||
|
||||
Signed-off-by: Miouyouyou (Myy) <myy@miouyouyou.fr>
|
||||
---
|
||||
arch/arm/boot/dts/rk3288-tinker.dts | 25 +++++++++++++++++++++++++
|
||||
1 file changed, 25 insertions(+)
|
||||
|
||||
diff --git a/arch/arm/boot/dts/rk3288-tinker.dts b/arch/arm/boot/dts/rk3288-tinker.dts
|
||||
index b92e59c1e..96d05fc6b 100644
|
||||
--- a/arch/arm/boot/dts/rk3288-tinker.dts
|
||||
+++ b/arch/arm/boot/dts/rk3288-tinker.dts
|
||||
@@ -40,6 +40,31 @@
|
||||
};
|
||||
};
|
||||
|
||||
+&i2c1 {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&i2c2 {
|
||||
+ afc0:af-controller@0 {
|
||||
+ status = "okay";
|
||||
+ compatible = "silicon touch,vm149C-v4l2-i2c-subdev";
|
||||
+ reg = <0x0 0x0c>;
|
||||
+ };
|
||||
+
|
||||
+ eeprom:m24c08@50 {
|
||||
+ compatible = "at,24c08";
|
||||
+ reg = <0x50>;
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&i2c3 {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&i2c4 {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
&io_domains {
|
||||
wifi-supply = <&vcc_18>;
|
||||
};
|
||||
--
|
||||
2.16.4
|
||||
|
@@ -0,0 +1,50 @@
|
||||
From b24b8f83e150811ad54ee2a4843e44cd1421fafa Mon Sep 17 00:00:00 2001
|
||||
From: "Miouyouyou (Myy)" <myy@miouyouyou.fr>
|
||||
Date: Mon, 5 Nov 2018 22:15:14 +0100
|
||||
Subject: [PATCH] ARM: DTS: rk3288-tinker: Defining the SPI interface
|
||||
|
||||
Taken from, and tested by @TonyMac32 .
|
||||
|
||||
Well, the original one was tested by him but I had to adapt the
|
||||
registers definitions to the new 64-bits LPAE-compliant syntax.
|
||||
|
||||
Therefore that *might* break, along with a few other patches.
|
||||
|
||||
Signed-off-by: Miouyouyou (Myy) <myy@miouyouyou.fr>
|
||||
---
|
||||
arch/arm/boot/dts/rk3288-tinker.dts | 19 +++++++++++++++++++
|
||||
1 file changed, 19 insertions(+)
|
||||
|
||||
diff --git a/arch/arm/boot/dts/rk3288-tinker.dts b/arch/arm/boot/dts/rk3288-tinker.dts
|
||||
index 96d05fc6b..17bfea298 100644
|
||||
--- a/arch/arm/boot/dts/rk3288-tinker.dts
|
||||
+++ b/arch/arm/boot/dts/rk3288-tinker.dts
|
||||
@@ -99,6 +99,25 @@
|
||||
supports-sdio;
|
||||
};
|
||||
|
||||
+&spi2 {
|
||||
+ max-freq = <50000000>;
|
||||
+ status = "okay";
|
||||
+
|
||||
+ spidev@0 {
|
||||
+ compatible = "rockchip,spi_tinker";
|
||||
+ reg = <0x0 0>;
|
||||
+ spi-max-frequency = <50000000>;
|
||||
+ spi-cpha = <1>;
|
||||
+ };
|
||||
+
|
||||
+ spidev@1 {
|
||||
+ compatible = "rockchip,spi_tinker";
|
||||
+ reg = <0x1>;
|
||||
+ spi-max-frequency = <50000000>;
|
||||
+ spi-cpha = <1>;
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
&uart0 {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&uart0_xfer>, <&uart0_cts>, <&uart0_rts>;
|
||||
--
|
||||
2.16.4
|
||||
|
@@ -0,0 +1,33 @@
|
||||
From 487db7cefc9861fdaf30579c378a98f0360690ae Mon Sep 17 00:00:00 2001
|
||||
From: "Miouyouyou (Myy)" <myy@miouyouyou.fr>
|
||||
Date: Mon, 5 Nov 2018 20:27:14 +0100
|
||||
Subject: [PATCH] ARM: DTSI: rk3288-tinker: Defining SDMMC properties
|
||||
|
||||
I never knew if these properties were required to fix the dreaded
|
||||
reboot issue...
|
||||
|
||||
Signed-off-by: Miouyouyou (Myy) <myy@miouyouyou.fr>
|
||||
---
|
||||
arch/arm/boot/dts/rk3288-tinker.dtsi | 5 +++++
|
||||
1 file changed, 5 insertions(+)
|
||||
|
||||
diff --git a/arch/arm/boot/dts/rk3288-tinker.dtsi b/arch/arm/boot/dts/rk3288-tinker.dtsi
|
||||
index dd1090728..8edd6f681 100644
|
||||
--- a/arch/arm/boot/dts/rk3288-tinker.dtsi
|
||||
+++ b/arch/arm/boot/dts/rk3288-tinker.dtsi
|
||||
@@ -436,7 +436,12 @@
|
||||
disable-wp; /* wp not hooked up */
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&sdmmc_clk &sdmmc_cmd &sdmmc_cd &sdmmc_bus4>;
|
||||
+ sd-uhs-sdr12;
|
||||
+ sd-uhs-sdr25;
|
||||
+ sd-uhs-sdr50;
|
||||
+ sd-uhs-sdr104;
|
||||
status = "okay";
|
||||
+ supports-sd;
|
||||
vmmc-supply = <&vcc33_sd>;
|
||||
vqmmc-supply = <&vccio_sd>;
|
||||
};
|
||||
--
|
||||
2.16.4
|
||||
|
@@ -0,0 +1,48 @@
|
||||
From d3d3fe433d9038dcd1a98f4d6711c0777ed06703 Mon Sep 17 00:00:00 2001
|
||||
From: "Miouyouyou (Myy)" <myy@miouyouyou.fr>
|
||||
Date: Mon, 25 Jun 2018 17:08:32 +0200
|
||||
Subject: [PATCH 26/26] ARM: DTSI: rk3288: Set the VPU MMU power domains
|
||||
|
||||
Without that, the auto-activation of the VPU hardware IOMMU fails
|
||||
when enabling the hardware, before the "probe" phase of its device
|
||||
driver.
|
||||
|
||||
Basically, when loading a "of_platform" device driver targeting
|
||||
the VPU devices, you'll get these errors without this patch :
|
||||
|
||||
[12753.996950] rk_iommu ff9c0440.iommu: Error during raw reset. MMU_DTE_ADDR is not functioning
|
||||
[12754.007483] rk_iommu ff9c0440.iommu: Disable stall request timed out, status: 0xffffffff
|
||||
[12754.026652] rk_iommu ff9c0440.iommu: Disable paging request timed out, status: 0xffffffff
|
||||
[12754.045975] rk_iommu ff9c0440.iommu: Disable stall request timed out, status: 0xffffffff
|
||||
|
||||
When using this patch, the errors disappear.
|
||||
|
||||
This seems to be due to the IOMMU device sharing the same power domain
|
||||
than the device.
|
||||
When loading an "of_platform" driver, the kernel logic seems to try
|
||||
enabling the associated IOMMU device before letting the driver handles
|
||||
anything with the actual VPU hardware.
|
||||
It appears that setting the power domain of the VPU IOMMU nodes let the
|
||||
IOMMU driver enable the IOMMU shared power domain, and make the IOMMU
|
||||
device useable.
|
||||
|
||||
Signed-off-by: Miouyouyou (Myy) <myy@miouyouyou.fr>
|
||||
---
|
||||
arch/arm/boot/dts/rk3288.dtsi | 2 ++
|
||||
1 file changed, 2 insertions(+)
|
||||
|
||||
diff --git a/arch/arm/boot/dts/rk3288.dtsi b/arch/arm/boot/dts/rk3288.dtsi
|
||||
index 45ec4e89..46e1b8e2 100644
|
||||
--- a/arch/arm/boot/dts/rk3288.dtsi
|
||||
+++ b/arch/arm/boot/dts/rk3288.dtsi
|
||||
@@ -1262,6 +1263,7 @@
|
||||
interrupt-names = "hevc_mmu";
|
||||
clocks = <&cru ACLK_HEVC>, <&cru HCLK_HEVC>;
|
||||
clock-names = "aclk", "iface";
|
||||
+ power-domains = <&power RK3288_PD_HEVC>;
|
||||
#iommu-cells = <0>;
|
||||
status = "disabled";
|
||||
};
|
||||
--
|
||||
2.16.4
|
||||
|
@@ -0,0 +1,46 @@
|
||||
From 4ab4f88649468dada5d609e1a6f8a71a7d5610c9 Mon Sep 17 00:00:00 2001
|
||||
From: "Miouyouyou (Myy)" <myy@miouyouyou.fr>
|
||||
Date: Sat, 29 Sep 2018 02:48:59 +0200
|
||||
Subject: [PATCH 4/6] dts: rk3288: support for dedicating npll to a vop
|
||||
|
||||
This patch is taken from Urja Rannikko ( @urjaman ) patchset here :
|
||||
https://github.com/urjaman/arch-c201/blob/master/linux-c201/0020-RK3288-HDMI-clock-hacks-combined.patch
|
||||
https://www.spinics.net/lists/arm-kernel/msg673156.html
|
||||
|
||||
The original description was :
|
||||
|
||||
Add the VOP DCLKs to the assigned clocks list so their
|
||||
parents can be set in the dts include files for
|
||||
devices that do dedicate npll to a vop.
|
||||
|
||||
https://www.spinics.net/lists/arm-kernel/msg673162.html
|
||||
|
||||
Signed-off-by: Miouyouyou (Myy) <myy@miouyouyou.fr>
|
||||
---
|
||||
arch/arm/boot/dts/rk3288.dtsi | 6 ++++--
|
||||
1 file changed, 4 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/arch/arm/boot/dts/rk3288.dtsi b/arch/arm/boot/dts/rk3288.dtsi
|
||||
index d23c7fa55..ff04aab5e 100644
|
||||
--- a/arch/arm/boot/dts/rk3288.dtsi
|
||||
+++ b/arch/arm/boot/dts/rk3288.dtsi
|
||||
@@ -867,12 +867,14 @@
|
||||
rockchip,grf = <&grf>;
|
||||
#clock-cells = <1>;
|
||||
#reset-cells = <1>;
|
||||
- assigned-clocks = <&cru PLL_GPLL>, <&cru PLL_CPLL>,
|
||||
+ assigned-clocks = <&cru DCLK_VOP0>, <&cru DCLK_VOP1>,
|
||||
+ <&cru PLL_GPLL>, <&cru PLL_CPLL>,
|
||||
<&cru PLL_NPLL>, <&cru ACLK_CPU>,
|
||||
<&cru HCLK_CPU>, <&cru PCLK_CPU>,
|
||||
<&cru ACLK_PERI>, <&cru HCLK_PERI>,
|
||||
<&cru PCLK_PERI>;
|
||||
- assigned-clock-rates = <594000000>, <400000000>,
|
||||
+ assigned-clock-rates = <0>, <0>,
|
||||
+ <594000000>, <400000000>,
|
||||
<500000000>, <300000000>,
|
||||
<150000000>, <75000000>,
|
||||
<300000000>, <150000000>,
|
||||
--
|
||||
2.16.4
|
||||
|
@@ -0,0 +1,32 @@
|
||||
From 9177b30ab083dbda2bede3b3d61ef71ad4b1ffe0 Mon Sep 17 00:00:00 2001
|
||||
From: "Miouyouyou (Myy)" <myy@miouyouyou.fr>
|
||||
Date: Thu, 1 Nov 2018 21:31:26 +0100
|
||||
Subject: [PATCH 2/2] arm: dts: veyron: Added a flag to disable cache flush
|
||||
during reset
|
||||
|
||||
Flushing the MMC cache of ASUS Chromebooks during initialization or
|
||||
"recovery" generates 10 minutes hangup, according to @SolidHal.
|
||||
|
||||
This is an adaptation of @SolidHal, in order to pinpoint the fix to
|
||||
Veyron Chromebooks, and avoiding issues other RK3288 boards.
|
||||
|
||||
Signed-off-by: Miouyouyou (Myy) <myy@miouyouyou.fr>
|
||||
---
|
||||
arch/arm/boot/dts/rk3288-veyron.dtsi | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/arch/arm/boot/dts/rk3288-veyron.dtsi b/arch/arm/boot/dts/rk3288-veyron.dtsi
|
||||
index 2075120cf..fa4951fd7 100644
|
||||
--- a/arch/arm/boot/dts/rk3288-veyron.dtsi
|
||||
+++ b/arch/arm/boot/dts/rk3288-veyron.dtsi
|
||||
@@ -123,6 +123,7 @@
|
||||
mmc-hs200-1_8v;
|
||||
mmc-pwrseq = <&emmc_pwrseq>;
|
||||
non-removable;
|
||||
+ no-recovery-cache-flush;
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&emmc_clk &emmc_cmd &emmc_bus8>;
|
||||
};
|
||||
--
|
||||
2.16.4
|
||||
|
@@ -1,41 +0,0 @@
|
||||
From e7e092be197c51b4d222a3b4e6638318067b7e6a Mon Sep 17 00:00:00 2001
|
||||
From: Willy Tarreau <w@1wt.eu>
|
||||
Date: Tue, 2 Aug 2016 08:20:53 +0200
|
||||
Subject: [PATCH 07/28] ARM: dts: rockchip: add support for 1800 MHz operation
|
||||
on MiQi board
|
||||
|
||||
This board happily supports 1800 MHz operations (and even more), so
|
||||
let's enable it.
|
||||
|
||||
Signed-off-by: Willy Tarreau <w@1wt.eu>
|
||||
(cherry picked from commit a0b82a29e7873a81f49ac5f50be3df1c7d312a14)
|
||||
---
|
||||
arch/arm/boot/dts/rk3288-miqi.dts | 12 ++++++++++++
|
||||
1 file changed, 12 insertions(+)
|
||||
|
||||
diff --git a/arch/arm/boot/dts/rk3288-miqi.dts b/arch/arm/boot/dts/rk3288-miqi.dts
|
||||
index 0e383595..80603a3d 100644
|
||||
--- a/arch/arm/boot/dts/rk3288-miqi.dts
|
||||
+++ b/arch/arm/boot/dts/rk3288-miqi.dts
|
||||
@@ -126,6 +126,18 @@
|
||||
|
||||
&cpu0 {
|
||||
cpu0-supply = <&vdd_cpu>;
|
||||
+ operating-points = <
|
||||
+ /* KHz uV */
|
||||
+ 1800000 1400000
|
||||
+ 1704000 1350000
|
||||
+ 1608000 1300000
|
||||
+ 1512000 1250000
|
||||
+ 1416000 1200000
|
||||
+ 1200000 1100000
|
||||
+ 1008000 1050000
|
||||
+ 816000 1000000
|
||||
+ 600000 900000
|
||||
+ >;
|
||||
};
|
||||
|
||||
&emmc {
|
||||
--
|
||||
2.11.0
|
||||
|
@@ -1,170 +0,0 @@
|
||||
From de9dcd5ecab0686022eee243464f35d2c7a34c97 Mon Sep 17 00:00:00 2001
|
||||
From: Myy <myy@miouyouyou.fr>
|
||||
Date: Mon, 16 Jan 2017 12:44:56 +0000
|
||||
Subject: [PATCH 08/28] Readapt: ARM: dts: rockchip: miqi: add turbo-mode
|
||||
operating points
|
||||
|
||||
Readaptation of Willy Tarreau patch.
|
||||
|
||||
Here's the original commit message:
|
||||
|
||||
By switching to opp-v2 we can declare "turbo-mode" operating points
|
||||
which are only enabled when /sys/devices/system/cpu/cpufreq/boost is
|
||||
set. It is convenient because it allows to boot, set a safe powersave
|
||||
governor, enable boost, limit scaling_max_freq to a safe value, then
|
||||
change the governor to performance or ondemand, and the frequency can
|
||||
then be manually adjusted by only touching scaling_max_freq.
|
||||
|
||||
New values are 1896, 1920, 1992, 2016, 2040 MHz, 2064, 2088, 2112,
|
||||
2136, 2160, 2184, 2208. MiQi boards work fine up to 2112 with a very
|
||||
good power supply (5.2V/3A real) and a strong heatsink. Higher
|
||||
frequencies may randomly work. At least 1992 is rock solid for hours
|
||||
using "openssl speed -multi 4". The other ones have only been tested
|
||||
for a few minutes. Frequencies of 1896 and 1920 MHz use 1.425V.
|
||||
1992 MHz uses 1.45V. 2016, 2040 and 2064 use 1.475V. 2088 and above
|
||||
use 1.500V. 2160, 2184 and 2208 cause the lowest frequency to be
|
||||
picked. It's obvious that it's a sign issue somewhere in the kernel
|
||||
but this one was not found yet.
|
||||
|
||||
Signed-off-by: Myy <myy@miouyouyou.fr>
|
||||
---
|
||||
arch/arm/boot/dts/rk3288-miqi.dts | 120 +++++++++++++++++++++++++++++++++-----
|
||||
1 file changed, 107 insertions(+), 13 deletions(-)
|
||||
|
||||
diff --git a/arch/arm/boot/dts/rk3288-miqi.dts b/arch/arm/boot/dts/rk3288-miqi.dts
|
||||
index 80603a3d..d7fde483 100644
|
||||
--- a/arch/arm/boot/dts/rk3288-miqi.dts
|
||||
+++ b/arch/arm/boot/dts/rk3288-miqi.dts
|
||||
@@ -122,22 +122,116 @@
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
};
|
||||
-};
|
||||
|
||||
+
|
||||
+ cpu0_opp_table: opp_table0 {
|
||||
+ compatible = "operating-points-v2";
|
||||
+ opp-shared;
|
||||
+
|
||||
+ opp@600000000 {
|
||||
+ opp-hz = /bits/ 64 <600000000>;
|
||||
+ opp-microvolt = <900000>;
|
||||
+ };
|
||||
+ opp@816000000 {
|
||||
+ opp-hz = /bits/ 64 <816000000>;
|
||||
+ opp-microvolt = <1000000>;
|
||||
+ };
|
||||
+ opp@1008000000 {
|
||||
+ opp-hz = /bits/ 64 <1008000000>;
|
||||
+ opp-microvolt = <1050000>;
|
||||
+ };
|
||||
+ opp@1200000000 {
|
||||
+ opp-hz = /bits/ 64 <1200000000>;
|
||||
+ opp-microvolt = <1100000>;
|
||||
+ };
|
||||
+ opp@1416000000 {
|
||||
+ opp-hz = /bits/ 64 <1416000000>;
|
||||
+ opp-microvolt = <1200000>;
|
||||
+ };
|
||||
+ opp@1512000000 {
|
||||
+ opp-hz = /bits/ 64 <1512000000>;
|
||||
+ opp-microvolt = <1250000>;
|
||||
+ };
|
||||
+ opp@1608000000 {
|
||||
+ opp-hz = /bits/ 64 <1608000000>;
|
||||
+ opp-microvolt = <1300000>;
|
||||
+ };
|
||||
+ opp@1704000000 {
|
||||
+ opp-hz = /bits/ 64 <1704000000>;
|
||||
+ opp-microvolt = <1350000>;
|
||||
+ };
|
||||
+ opp@1800000000 {
|
||||
+ opp-hz = /bits/ 64 <1800000000>;
|
||||
+ opp-microvolt = <1400000>;
|
||||
+ };
|
||||
+ /* boot-only frequencies below */
|
||||
+ opp@1896000000 {
|
||||
+ opp-hz = /bits/ 64 <1896000000>;
|
||||
+ opp-microvolt = <1425000>;
|
||||
+ turbo-mode;
|
||||
+ };
|
||||
+ opp@1920000000 {
|
||||
+ opp-hz = /bits/ 64 <1920000000>;
|
||||
+ opp-microvolt = <1425000>;
|
||||
+ turbo-mode;
|
||||
+ };
|
||||
+ opp@1992000000 {
|
||||
+ opp-hz = /bits/ 64 <1992000000>;
|
||||
+ opp-microvolt = <1450000>;
|
||||
+ turbo-mode;
|
||||
+ };
|
||||
+ opp@2016000000 {
|
||||
+ opp-hz = /bits/ 64 <2016000000>;
|
||||
+ opp-microvolt = <1475000>;
|
||||
+ turbo-mode;
|
||||
+ };
|
||||
+ opp@2040000000 {
|
||||
+ opp-hz = /bits/ 64 <2040000000>;
|
||||
+ opp-microvolt = <1475000>;
|
||||
+ turbo-mode;
|
||||
+ };
|
||||
+ opp@2064000000 {
|
||||
+ opp-hz = /bits/ 64 <2064000000>;
|
||||
+ opp-microvolt = <1475000>;
|
||||
+ turbo-mode;
|
||||
+ };
|
||||
+ opp@2088000000 {
|
||||
+ opp-hz = /bits/ 64 <2088000000>;
|
||||
+ opp-microvolt = <1500000>;
|
||||
+ turbo-mode;
|
||||
+ };
|
||||
+ opp@2112000000 {
|
||||
+ opp-hz = /bits/ 64 <2112000000>;
|
||||
+ opp-microvolt = <1500000>;
|
||||
+ turbo-mode;
|
||||
+ };
|
||||
+ opp@2136000000 {
|
||||
+ opp-hz = /bits/ 64 <2136000000>;
|
||||
+ opp-microvolt = <1500000>;
|
||||
+ turbo-mode;
|
||||
+ };
|
||||
+ opp@2160000000 {
|
||||
+ opp-hz = /bits/ 64 <2160000000>;
|
||||
+ opp-microvolt = <1500000>;
|
||||
+ turbo-mode;
|
||||
+ };
|
||||
+ opp@2184000000 {
|
||||
+ opp-hz = /bits/ 64 <2184000000>;
|
||||
+ opp-microvolt = <1500000>;
|
||||
+ turbo-mode;
|
||||
+ };
|
||||
+ opp@2208000000 {
|
||||
+ opp-hz = /bits/ 64 <2208000000>;
|
||||
+ opp-microvolt = <1500000>;
|
||||
+ turbo-mode;
|
||||
+ };
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
&cpu0 {
|
||||
cpu0-supply = <&vdd_cpu>;
|
||||
- operating-points = <
|
||||
- /* KHz uV */
|
||||
- 1800000 1400000
|
||||
- 1704000 1350000
|
||||
- 1608000 1300000
|
||||
- 1512000 1250000
|
||||
- 1416000 1200000
|
||||
- 1200000 1100000
|
||||
- 1008000 1050000
|
||||
- 816000 1000000
|
||||
- 600000 900000
|
||||
- >;
|
||||
+
|
||||
+ operating-points-v2 = <&cpu0_opp_table>;
|
||||
};
|
||||
|
||||
&emmc {
|
||||
--
|
||||
2.11.0
|
||||
|
@@ -0,0 +1,116 @@
|
||||
From 302cd9b8a9f1f8a7735fabea3b9a7645dc40f9cc Mon Sep 17 00:00:00 2001
|
||||
From: Myy Miouyouyou <myy@miouyouyou.fr>
|
||||
Date: Sun, 7 Jan 2018 01:52:44 +0100
|
||||
Subject: [PATCH] drivers: mmc: dw-mci-rockchip: Handle ASUS Tinkerboard reboot
|
||||
|
||||
On ASUS Tinkerboard systems, if the SDMMC hardware is shutdown before
|
||||
rebooting, the system will be dead, as the SDMMC is the only way to
|
||||
boot anything, and the hardware doesn't power up the SDMMC hardware
|
||||
automatically when rebooting.
|
||||
|
||||
So, when using an ASUS Tinkerboard system, a new reboot handler is
|
||||
installed. This reboot handler takes care of powering the SDMMC
|
||||
hardware again before restarting the system, resolving the issue.
|
||||
|
||||
The code was inspired by the pwrseq_emmc.c, which seems to overcome
|
||||
similar effects with eMMC hardware.
|
||||
|
||||
Signed-off-by: Myy Miouyouyou <myy@miouyouyou.fr>
|
||||
---
|
||||
drivers/mmc/host/dw_mmc-rockchip.c | 66 ++++++++++++++++++++++++++++++++++++++
|
||||
1 file changed, 66 insertions(+)
|
||||
|
||||
diff --git a/drivers/mmc/host/dw_mmc-rockchip.c b/drivers/mmc/host/dw_mmc-rockchip.c
|
||||
index a3f1c2b30..7eac1f221 100644
|
||||
--- a/drivers/mmc/host/dw_mmc-rockchip.c
|
||||
+++ b/drivers/mmc/host/dw_mmc-rockchip.c
|
||||
@@ -16,6 +16,11 @@
|
||||
#include <linux/pm_runtime.h>
|
||||
#include <linux/slab.h>
|
||||
|
||||
+#include <linux/regulator/consumer.h>
|
||||
+#include <linux/reboot.h>
|
||||
+#include <linux/delay.h>
|
||||
+#include "../core/core.h"
|
||||
+
|
||||
#include "dw_mmc.h"
|
||||
#include "dw_mmc-pltfm.h"
|
||||
|
||||
@@ -334,6 +339,66 @@ static const struct of_device_id dw_mci_rockchip_match[] = {
|
||||
};
|
||||
MODULE_DEVICE_TABLE(of, dw_mci_rockchip_match);
|
||||
|
||||
+struct dw_mci_rockchip_broken_boards_data {
|
||||
+ struct notifier_block reset_nb;
|
||||
+ struct platform_device *pdev;
|
||||
+};
|
||||
+
|
||||
+/* This reboot handler handles cases where disabling the SDMMC on
|
||||
+ * reboot will cause the hardware to be unable to start correctly
|
||||
+ * after rebooting.
|
||||
+ *
|
||||
+ * This happens with Tinkerboard systems...
|
||||
+ */
|
||||
+static int dw_mci_rockchip_broken_boards_reset_nb(
|
||||
+ struct notifier_block *this,
|
||||
+ unsigned long mode, void *cmd)
|
||||
+{
|
||||
+ struct dw_mci_rockchip_broken_boards_data const *data =
|
||||
+ container_of(this,
|
||||
+ struct dw_mci_rockchip_broken_boards_data,
|
||||
+ reset_nb);
|
||||
+ struct dw_mci *host = platform_get_drvdata(data->pdev);
|
||||
+ struct mmc_host *mmc = host->slot->mmc;
|
||||
+
|
||||
+ printk(KERN_ERR "Meow.\n");
|
||||
+
|
||||
+ mmc_power_off(mmc);
|
||||
+
|
||||
+ mdelay(20);
|
||||
+
|
||||
+ if (!IS_ERR(mmc->supply.vmmc))
|
||||
+ regulator_enable(mmc->supply.vmmc);
|
||||
+
|
||||
+ if (!IS_ERR(mmc->supply.vqmmc))
|
||||
+ regulator_set_voltage(mmc->supply.vqmmc, 3000000, 3300000);
|
||||
+
|
||||
+ printk(KERN_ERR "woeM.\n");
|
||||
+
|
||||
+ return NOTIFY_DONE;
|
||||
+}
|
||||
+
|
||||
+static void dw_mci_rockchip_register_broken_boards_reboot_handler(
|
||||
+ struct platform_device *pdev)
|
||||
+{
|
||||
+ struct dw_mci_rockchip_broken_boards_data *data;
|
||||
+
|
||||
+ if (!of_machine_is_compatible("asus,rk3288-tinker"))
|
||||
+ return;
|
||||
+
|
||||
+ data = devm_kzalloc(&pdev->dev, sizeof(*data), GFP_KERNEL);
|
||||
+
|
||||
+ if (!data)
|
||||
+ return;
|
||||
+
|
||||
+ data->reset_nb.notifier_call =
|
||||
+ dw_mci_rockchip_broken_boards_reset_nb;
|
||||
+ data->reset_nb.priority = 255;
|
||||
+ register_restart_handler(&data->reset_nb);
|
||||
+
|
||||
+ data->pdev = pdev;
|
||||
+}
|
||||
+
|
||||
static int dw_mci_rockchip_probe(struct platform_device *pdev)
|
||||
{
|
||||
const struct dw_mci_drv_data *drv_data;
|
||||
@@ -361,6 +426,7 @@ static int dw_mci_rockchip_probe(struct platform_device *pdev)
|
||||
}
|
||||
|
||||
pm_runtime_put_autosuspend(&pdev->dev);
|
||||
+ dw_mci_rockchip_register_broken_boards_reboot_handler(pdev);
|
||||
|
||||
return 0;
|
||||
}
|
||||
--
|
||||
2.14.1
|
||||
|
@@ -1,61 +0,0 @@
|
||||
From 771bcfe1735e42650b763e52a042a9fd98b2fa5b Mon Sep 17 00:00:00 2001
|
||||
From: Myy Miouyouyou <myy@miouyouyou.fr>
|
||||
Date: Thu, 19 Oct 2017 21:20:43 +0200
|
||||
Subject: [PATCH 09/28] ARM: DTSI: rk3288.dtsi: Missing GRF handles
|
||||
|
||||
Add missing GRF handles.
|
||||
|
||||
This patch is taken from the patches provided by the ARMbian team.
|
||||
|
||||
Signed-off-by: Myy Miouyouyou <myy@miouyouyou.fr>
|
||||
---
|
||||
arch/arm/boot/dts/rk3288.dtsi | 5 +++++
|
||||
1 file changed, 5 insertions(+)
|
||||
|
||||
diff --git a/arch/arm/boot/dts/rk3288.dtsi b/arch/arm/boot/dts/rk3288.dtsi
|
||||
index 356ed1e6..5b789528 100644
|
||||
--- a/arch/arm/boot/dts/rk3288.dtsi
|
||||
+++ b/arch/arm/boot/dts/rk3288.dtsi
|
||||
@@ -547,6 +547,7 @@
|
||||
pinctrl-2 = <&otp_gpio>;
|
||||
#thermal-sensor-cells = <1>;
|
||||
rockchip,hw-tshut-temp = <95000>;
|
||||
+ rockchip,grf = <&grf>;
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
@@ -655,6 +656,7 @@
|
||||
pinctrl-0 = <&pwm0_pin>;
|
||||
clocks = <&cru PCLK_PWM>;
|
||||
clock-names = "pwm";
|
||||
+ rockchip,grf = <&grf>;
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
@@ -666,6 +668,7 @@
|
||||
pinctrl-0 = <&pwm1_pin>;
|
||||
clocks = <&cru PCLK_PWM>;
|
||||
clock-names = "pwm";
|
||||
+ rockchip,grf = <&grf>;
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
@@ -677,6 +680,7 @@
|
||||
pinctrl-0 = <&pwm2_pin>;
|
||||
clocks = <&cru PCLK_PWM>;
|
||||
clock-names = "pwm";
|
||||
+ rockchip,grf = <&grf>;
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
@@ -688,6 +692,7 @@
|
||||
pinctrl-0 = <&pwm3_pin>;
|
||||
clocks = <&cru PCLK_PWM>;
|
||||
clock-names = "pwm";
|
||||
+ rockchip,grf = <&grf>;
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
--
|
||||
2.11.0
|
||||
|
@@ -0,0 +1,74 @@
|
||||
From e7b60b10cf3fd2f4374ab26c314383121c27fe82 Mon Sep 17 00:00:00 2001
|
||||
From: "Miouyouyou (Myy)" <myy@miouyouyou.fr>
|
||||
Date: Tue, 22 Jan 2019 21:24:37 +0100
|
||||
Subject: [PATCH] soc: rockchip: power-domain: export idle request for RKMPP
|
||||
|
||||
This function, and the added header, are required by the RKMPP driver,
|
||||
provided by Randy Li. However, I can't attest that the provided code
|
||||
is correct.
|
||||
|
||||
Signed-off-by: Miouyouyou (Myy) <myy@miouyouyou.fr>
|
||||
---
|
||||
drivers/soc/rockchip/pm_domains.c | 23 +++++++++++++++++++++++
|
||||
include/soc/rockchip/pm_domains.h | 15 +++++++++++++++
|
||||
2 files changed, 38 insertions(+)
|
||||
create mode 100644 include/soc/rockchip/pm_domains.h
|
||||
|
||||
diff --git a/drivers/soc/rockchip/pm_domains.c b/drivers/soc/rockchip/pm_domains.c
|
||||
index 847c7c482..3e2e252cb 100644
|
||||
--- a/drivers/soc/rockchip/pm_domains.c
|
||||
+++ b/drivers/soc/rockchip/pm_domains.c
|
||||
@@ -199,6 +199,29 @@ static int rockchip_pmu_set_idle_request(struct rockchip_pm_domain *pd,
|
||||
return 0;
|
||||
}
|
||||
|
||||
+int rockchip_pmu_idle_request(struct device *dev, bool idle)
|
||||
+{
|
||||
+ struct generic_pm_domain *genpd;
|
||||
+ struct rockchip_pm_domain *pd;
|
||||
+ int ret;
|
||||
+
|
||||
+ if (IS_ERR_OR_NULL(dev))
|
||||
+ return -EINVAL;
|
||||
+
|
||||
+ if (IS_ERR_OR_NULL(dev->pm_domain))
|
||||
+ return -EINVAL;
|
||||
+
|
||||
+ genpd = pd_to_genpd(dev->pm_domain);
|
||||
+ pd = to_rockchip_pd(genpd);
|
||||
+
|
||||
+ mutex_lock(&pd->pmu->mutex);
|
||||
+ ret = rockchip_pmu_set_idle_request(pd, idle);
|
||||
+ mutex_unlock(&pd->pmu->mutex);
|
||||
+
|
||||
+ return ret;
|
||||
+}
|
||||
+EXPORT_SYMBOL(rockchip_pmu_idle_request);
|
||||
+
|
||||
static int rockchip_pmu_save_qos(struct rockchip_pm_domain *pd)
|
||||
{
|
||||
int i;
|
||||
diff --git a/include/soc/rockchip/pm_domains.h b/include/soc/rockchip/pm_domains.h
|
||||
new file mode 100644
|
||||
index 000000000..720b3314e
|
||||
--- /dev/null
|
||||
+++ b/include/soc/rockchip/pm_domains.h
|
||||
@@ -0,0 +1,15 @@
|
||||
+/*
|
||||
+ * pm_domain.h - Definitions and headers related to device power domains.
|
||||
+ *
|
||||
+ * Copyright (C) 2017 Randy Li <ayaka@soulik.info>.
|
||||
+ *
|
||||
+ * This file is released under the GPLv2.
|
||||
+ */
|
||||
+
|
||||
+#ifndef _LINUX_ROCKCHIP_PM_H
|
||||
+#define _LINUX_ROCKCHIP_PM_H
|
||||
+#include <linux/device.h>
|
||||
+
|
||||
+int rockchip_pmu_idle_request(struct device *dev, bool idle);
|
||||
+
|
||||
+#endif /* _LINUX_ROCKCHIP_PM_H */
|
||||
--
|
||||
2.16.4
|
||||
|
@@ -0,0 +1,101 @@
|
||||
FROM: Solidhal <hal@halemmerich.com>
|
||||
|
||||
This patch reverses commit 2b721118b7821107757eb1d37af4b60e877b27e7, as can bee seen here:
|
||||
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=2b721118b7821107757eb1d37af4b60e877b27e7
|
||||
|
||||
This commit caused issues on veyron speedy with ath9k and dwc2 drivers. Any ath9k device (ar9271)
|
||||
would intermittently work, most of the time ending in errors as can bee seen here:
|
||||
https://github.com/SolidHal/PrawnOS/issues/38
|
||||
This commit fixes that issue.
|
||||
This is only a temporary work around while a permenant fix is found, as this commit seems to only cause issues
|
||||
with dwc2
|
||||
|
||||
diff --git a/drivers/net/wireless/ath/ath9k/hif_usb.c b/drivers/net/wireless/ath/ath9k/hif_usb.c
|
||||
--- b/drivers/net/wireless/ath/ath9k/hif_usb.c
|
||||
+++ a/drivers/net/wireless/ath/ath9k/hif_usb.c
|
||||
@@ -115,10 +115,10 @@
|
||||
cmd->skb = skb;
|
||||
cmd->hif_dev = hif_dev;
|
||||
|
||||
+ usb_fill_bulk_urb(urb, hif_dev->udev,
|
||||
+ usb_sndbulkpipe(hif_dev->udev, USB_REG_OUT_PIPE),
|
||||
- usb_fill_int_urb(urb, hif_dev->udev,
|
||||
- usb_sndintpipe(hif_dev->udev, USB_REG_OUT_PIPE),
|
||||
skb->data, skb->len,
|
||||
+ hif_usb_regout_cb, cmd);
|
||||
- hif_usb_regout_cb, cmd, 1);
|
||||
|
||||
usb_anchor_urb(urb, &hif_dev->regout_submitted);
|
||||
ret = usb_submit_urb(urb, GFP_KERNEL);
|
||||
@@ -735,11 +735,11 @@
|
||||
|
||||
rx_buf->skb = nskb;
|
||||
|
||||
+ usb_fill_bulk_urb(urb, hif_dev->udev,
|
||||
+ usb_rcvbulkpipe(hif_dev->udev,
|
||||
- usb_fill_int_urb(urb, hif_dev->udev,
|
||||
- usb_rcvintpipe(hif_dev->udev,
|
||||
USB_REG_IN_PIPE),
|
||||
nskb->data, MAX_REG_IN_BUF_SIZE,
|
||||
+ ath9k_hif_usb_reg_in_cb, nskb);
|
||||
- ath9k_hif_usb_reg_in_cb, rx_buf, 1);
|
||||
}
|
||||
|
||||
resubmit:
|
||||
@@ -909,11 +909,11 @@
|
||||
rx_buf->hif_dev = hif_dev;
|
||||
rx_buf->skb = skb;
|
||||
|
||||
+ usb_fill_bulk_urb(urb, hif_dev->udev,
|
||||
+ usb_rcvbulkpipe(hif_dev->udev,
|
||||
- usb_fill_int_urb(urb, hif_dev->udev,
|
||||
- usb_rcvintpipe(hif_dev->udev,
|
||||
USB_REG_IN_PIPE),
|
||||
skb->data, MAX_REG_IN_BUF_SIZE,
|
||||
+ ath9k_hif_usb_reg_in_cb, skb);
|
||||
- ath9k_hif_usb_reg_in_cb, rx_buf, 1);
|
||||
|
||||
/* Anchor URB */
|
||||
usb_anchor_urb(urb, &hif_dev->reg_in_submitted);
|
||||
@@ -1031,7 +1031,9 @@
|
||||
|
||||
static int ath9k_hif_usb_dev_init(struct hif_device_usb *hif_dev)
|
||||
{
|
||||
+ struct usb_host_interface *alt = &hif_dev->interface->altsetting[0];
|
||||
+ struct usb_endpoint_descriptor *endp;
|
||||
+ int ret, idx;
|
||||
- int ret;
|
||||
|
||||
ret = ath9k_hif_usb_download_fw(hif_dev);
|
||||
if (ret) {
|
||||
@@ -1041,6 +1043,20 @@
|
||||
return ret;
|
||||
}
|
||||
|
||||
+ /* On downloading the firmware to the target, the USB descriptor of EP4
|
||||
+ * is 'patched' to change the type of the endpoint to Bulk. This will
|
||||
+ * bring down CPU usage during the scan period.
|
||||
+ */
|
||||
+ for (idx = 0; idx < alt->desc.bNumEndpoints; idx++) {
|
||||
+ endp = &alt->endpoint[idx].desc;
|
||||
+ if ((endp->bmAttributes & USB_ENDPOINT_XFERTYPE_MASK)
|
||||
+ == USB_ENDPOINT_XFER_INT) {
|
||||
+ endp->bmAttributes &= ~USB_ENDPOINT_XFERTYPE_MASK;
|
||||
+ endp->bmAttributes |= USB_ENDPOINT_XFER_BULK;
|
||||
+ endp->bInterval = 0;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
/* Alloc URBs */
|
||||
ret = ath9k_hif_usb_alloc_urbs(hif_dev);
|
||||
if (ret) {
|
||||
@@ -1252,7 +1268,7 @@
|
||||
if (!buf)
|
||||
return;
|
||||
|
||||
+ ret = usb_bulk_msg(udev, usb_sndbulkpipe(udev, USB_REG_OUT_PIPE),
|
||||
- ret = usb_interrupt_msg(udev, usb_sndintpipe(udev, USB_REG_OUT_PIPE),
|
||||
buf, 4, NULL, USB_MSG_TIMEOUT);
|
||||
if (ret)
|
||||
dev_err(&udev->dev, "ath9k_htc: USB reboot failed\n");
|
||||
|
@@ -1,27 +0,0 @@
|
||||
From af8d73ec0df1dde1e2fe1674c5708d4c30385ba9 Mon Sep 17 00:00:00 2001
|
||||
From: Myy <myy@miouyouyou.fr>
|
||||
Date: Mon, 5 Jun 2017 12:37:17 +0000
|
||||
Subject: [PATCH 11/28] Added support for Tinkerboard's SPI interface
|
||||
|
||||
Imported from ARMbian
|
||||
|
||||
Signed-off-by: Myy <myy@miouyouyou.fr>
|
||||
---
|
||||
drivers/spi/spidev.c | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/drivers/spi/spidev.c b/drivers/spi/spidev.c
|
||||
index cda10719..a6287475 100644
|
||||
--- a/drivers/spi/spidev.c
|
||||
+++ b/drivers/spi/spidev.c
|
||||
@@ -669,6 +669,7 @@ static const struct of_device_id spidev_dt_ids[] = {
|
||||
{ .compatible = "lineartechnology,ltc2488" },
|
||||
{ .compatible = "ge,achc" },
|
||||
{ .compatible = "semtech,sx1301" },
|
||||
+ { .compatible = "rockchip,spi_tinker" },
|
||||
{},
|
||||
};
|
||||
MODULE_DEVICE_TABLE(of, spidev_dt_ids);
|
||||
--
|
||||
2.11.0
|
||||
|
@@ -0,0 +1,178 @@
|
||||
From e03d074b8ec00718337e7373e991912f6b6f9a52 Mon Sep 17 00:00:00 2001
|
||||
From: "Miouyouyou (Myy)" <myy@miouyouyou.fr>
|
||||
Date: Mon, 5 Nov 2018 19:53:43 +0100
|
||||
Subject: [PATCH] clk: rockchip: rk3288: Support for dedicating NPLL to a VOP
|
||||
|
||||
This patch is taken from Urja Rannikko ( @urjaman ) patchset here :
|
||||
https://github.com/urjaman/arch-c201/blob/master/linux-c201/0020-RK3288-HDMI-clock-hacks-combined.patch
|
||||
https://www.spinics.net/lists/arm-kernel/msg673156.html
|
||||
|
||||
I'm not really sure what this does exactly. It basically sets the
|
||||
parent clock of the newly added clocks, if the newly added property
|
||||
"rockchip,npll-for-vop" is detected and set.
|
||||
|
||||
I have no clear idea how HDMI Neuronal PLL (and PLL in general) work,
|
||||
so I cannot comment on what it's doing and if it's a good idea in
|
||||
general.
|
||||
|
||||
Now, I still have to test if that patch does anything useful on
|
||||
RK3288 boards. If it doesn't, I might just throw it away on next
|
||||
versions.
|
||||
|
||||
Signed-off-by: Miouyouyou (Myy) <myy@miouyouyou.fr>
|
||||
---
|
||||
drivers/clk/rockchip/clk-rk3288.c | 68 ++++++++++++++++++++++++++++++++-------
|
||||
drivers/clk/rockchip/clk.h | 3 ++
|
||||
2 files changed, 59 insertions(+), 12 deletions(-)
|
||||
|
||||
diff --git a/drivers/clk/rockchip/clk-rk3288.c b/drivers/clk/rockchip/clk-rk3288.c
|
||||
index 13b38cb89..0d8b99b6b 100644
|
||||
--- a/drivers/clk/rockchip/clk-rk3288.c
|
||||
+++ b/drivers/clk/rockchip/clk-rk3288.c
|
||||
@@ -215,10 +215,13 @@ PNAME(mux_ddrphy_p) = { "dpll_ddr", "gpll_ddr" };
|
||||
PNAME(mux_aclk_cpu_src_p) = { "cpll_aclk_cpu", "gpll_aclk_cpu" };
|
||||
|
||||
PNAME(mux_pll_src_cpll_gpll_p) = { "cpll", "gpll" };
|
||||
-PNAME(mux_pll_src_npll_cpll_gpll_p) = { "npll", "cpll", "gpll" };
|
||||
-PNAME(mux_pll_src_cpll_gpll_npll_p) = { "cpll", "gpll", "npll" };
|
||||
+PNAME_ED(mux_pll_src_npll_cpll_gpll_p) = { "npll", "cpll", "gpll" };
|
||||
+
|
||||
+PNAME_ED(mux_pll_src_cgn_pll_nonvop_p) = { "cpll", "gpll", "npll" };
|
||||
+PNAME_ED(mux_pll_src_cgn_pll_vop0_p) = { "cpll", "gpll", "npll" };
|
||||
+PNAME_ED(mux_pll_src_cgn_pll_vop1_p) = { "cpll", "gpll", "npll" };
|
||||
PNAME(mux_pll_src_cpll_gpll_usb480m_p) = { "cpll", "gpll", "unstable:usbphy480m_src" };
|
||||
-PNAME(mux_pll_src_cpll_gll_usb_npll_p) = { "cpll", "gpll", "unstable:usbphy480m_src", "npll" };
|
||||
+PNAME_ED(mux_pll_src_cpll_gll_usb_npll_p) = { "cpll", "gpll", "usbphy480m_src", "npll" };
|
||||
|
||||
PNAME(mux_mmc_src_p) = { "cpll", "gpll", "xin24m", "xin24m" };
|
||||
PNAME(mux_i2s_pre_p) = { "i2s_src", "i2s_frac", "ext_i2s", "xin12m" };
|
||||
@@ -464,24 +467,24 @@ static struct rockchip_clk_branch rk3288_clk_branches[] __initdata = {
|
||||
RK3288_CLKSEL_CON(30), 14, 2, MFLAGS, 8, 5, DFLAGS,
|
||||
RK3288_CLKGATE_CON(3), 4, GFLAGS),
|
||||
|
||||
- COMPOSITE(DCLK_VOP0, "dclk_vop0", mux_pll_src_cpll_gpll_npll_p, 0,
|
||||
+ COMPOSITE(DCLK_VOP0, "dclk_vop0", mux_pll_src_cgn_pll_vop0_p, 0,
|
||||
RK3288_CLKSEL_CON(27), 0, 2, MFLAGS, 8, 8, DFLAGS,
|
||||
RK3288_CLKGATE_CON(3), 1, GFLAGS),
|
||||
- COMPOSITE(DCLK_VOP1, "dclk_vop1", mux_pll_src_cpll_gpll_npll_p, 0,
|
||||
+ COMPOSITE(DCLK_VOP1, "dclk_vop1", mux_pll_src_cgn_pll_vop1_p, 0,
|
||||
RK3288_CLKSEL_CON(29), 6, 2, MFLAGS, 8, 8, DFLAGS,
|
||||
RK3288_CLKGATE_CON(3), 3, GFLAGS),
|
||||
|
||||
COMPOSITE_NODIV(SCLK_EDP_24M, "sclk_edp_24m", mux_edp_24m_p, 0,
|
||||
RK3288_CLKSEL_CON(28), 15, 1, MFLAGS,
|
||||
RK3288_CLKGATE_CON(3), 12, GFLAGS),
|
||||
- COMPOSITE(SCLK_EDP, "sclk_edp", mux_pll_src_cpll_gpll_npll_p, 0,
|
||||
+ COMPOSITE(SCLK_EDP, "sclk_edp", mux_pll_src_cgn_pll_nonvop_p, 0,
|
||||
RK3288_CLKSEL_CON(28), 6, 2, MFLAGS, 0, 6, DFLAGS,
|
||||
RK3288_CLKGATE_CON(3), 13, GFLAGS),
|
||||
|
||||
- COMPOSITE(SCLK_ISP, "sclk_isp", mux_pll_src_cpll_gpll_npll_p, 0,
|
||||
+ COMPOSITE(SCLK_ISP, "sclk_isp", mux_pll_src_cgn_pll_nonvop_p, 0,
|
||||
RK3288_CLKSEL_CON(6), 6, 2, MFLAGS, 0, 6, DFLAGS,
|
||||
RK3288_CLKGATE_CON(3), 14, GFLAGS),
|
||||
- COMPOSITE(SCLK_ISP_JPE, "sclk_isp_jpe", mux_pll_src_cpll_gpll_npll_p, 0,
|
||||
+ COMPOSITE(SCLK_ISP_JPE, "sclk_isp_jpe", mux_pll_src_cgn_pll_nonvop_p, 0,
|
||||
RK3288_CLKSEL_CON(6), 14, 2, MFLAGS, 8, 6, DFLAGS,
|
||||
RK3288_CLKGATE_CON(3), 15, GFLAGS),
|
||||
|
||||
@@ -490,16 +493,16 @@ static struct rockchip_clk_branch rk3288_clk_branches[] __initdata = {
|
||||
GATE(SCLK_HDMI_CEC, "sclk_hdmi_cec", "xin32k", 0,
|
||||
RK3288_CLKGATE_CON(5), 11, GFLAGS),
|
||||
|
||||
- COMPOSITE(ACLK_HEVC, "aclk_hevc", mux_pll_src_cpll_gpll_npll_p, 0,
|
||||
+ COMPOSITE(ACLK_HEVC, "aclk_hevc", mux_pll_src_cgn_pll_nonvop_p, 0,
|
||||
RK3288_CLKSEL_CON(39), 14, 2, MFLAGS, 8, 5, DFLAGS,
|
||||
RK3288_CLKGATE_CON(13), 13, GFLAGS),
|
||||
DIV(HCLK_HEVC, "hclk_hevc", "aclk_hevc", 0,
|
||||
RK3288_CLKSEL_CON(40), 12, 2, DFLAGS),
|
||||
|
||||
- COMPOSITE(SCLK_HEVC_CABAC, "sclk_hevc_cabac", mux_pll_src_cpll_gpll_npll_p, 0,
|
||||
+ COMPOSITE(SCLK_HEVC_CABAC, "sclk_hevc_cabac", mux_pll_src_cgn_pll_nonvop_p, 0,
|
||||
RK3288_CLKSEL_CON(42), 6, 2, MFLAGS, 0, 5, DFLAGS,
|
||||
RK3288_CLKGATE_CON(13), 14, GFLAGS),
|
||||
- COMPOSITE(SCLK_HEVC_CORE, "sclk_hevc_core", mux_pll_src_cpll_gpll_npll_p, 0,
|
||||
+ COMPOSITE(SCLK_HEVC_CORE, "sclk_hevc_core", mux_pll_src_cgn_pll_nonvop_p, 0,
|
||||
RK3288_CLKSEL_CON(42), 14, 2, MFLAGS, 8, 5, DFLAGS,
|
||||
RK3288_CLKGATE_CON(13), 15, GFLAGS),
|
||||
|
||||
@@ -573,7 +576,7 @@ static struct rockchip_clk_branch rk3288_clk_branches[] __initdata = {
|
||||
COMPOSITE(0, "sclk_tspout", mux_tspout_p, 0,
|
||||
RK3288_CLKSEL_CON(35), 14, 2, MFLAGS, 8, 5, DFLAGS,
|
||||
RK3288_CLKGATE_CON(4), 11, GFLAGS),
|
||||
- COMPOSITE(0, "sclk_tsp", mux_pll_src_cpll_gpll_npll_p, 0,
|
||||
+ COMPOSITE(0, "sclk_tsp", mux_pll_src_cgn_pll_nonvop_p, 0,
|
||||
RK3288_CLKSEL_CON(35), 6, 2, MFLAGS, 0, 5, DFLAGS,
|
||||
RK3288_CLKGATE_CON(4), 10, GFLAGS),
|
||||
|
||||
@@ -933,5 +936,6 @@ static void __init rk3288_clk_init(struct device_node *np)
|
||||
{
|
||||
struct rockchip_clk_provider *ctx;
|
||||
+ s32 npll_vop = -1;
|
||||
|
||||
rk3288_cru_base = of_iomap(np, 0);
|
||||
if (!rk3288_cru_base) {
|
||||
@@ -940,6 +944,46 @@ static void __init rk3288_clk_init(struct device_node *np)
|
||||
return;
|
||||
}
|
||||
|
||||
+ if (!of_property_read_s32(np, "rockchip,npll-for-vop", &npll_vop)) {
|
||||
+ if ((npll_vop < -1) || (npll_vop > 1)) {
|
||||
+ pr_warn("%s: invalid VOP to dedicate NPLL to: %d\n",
|
||||
+ __func__, npll_vop);
|
||||
+ } else if (npll_vop >= 0) {
|
||||
+ unsigned int vop_clk_id;
|
||||
+ const char ** npll_names;
|
||||
+ const char ** non_npll_names;
|
||||
+ int i;
|
||||
+
|
||||
+ /* Firstly, not-VOP needs to not use npll */
|
||||
+ mux_pll_src_npll_cpll_gpll_p[0] = "dummy_npll";
|
||||
+ mux_pll_src_cgn_pll_nonvop_p[2] = "dummy_npll";
|
||||
+ mux_pll_src_cpll_gll_usb_npll_p[3] = "dummy_npll";
|
||||
+
|
||||
+ /* Then the npll VOP needs to only use npll, and the other one not use npll. */
|
||||
+ if (npll_vop) {
|
||||
+ vop_clk_id = DCLK_VOP1;
|
||||
+ npll_names = mux_pll_src_cgn_pll_vop1_p;
|
||||
+ non_npll_names = mux_pll_src_cgn_pll_vop0_p;
|
||||
+ } else {
|
||||
+ vop_clk_id = DCLK_VOP0;
|
||||
+ npll_names = mux_pll_src_cgn_pll_vop0_p;
|
||||
+ non_npll_names = mux_pll_src_cgn_pll_vop1_p;
|
||||
+ }
|
||||
+ npll_names[0] = "dummy_cpll";
|
||||
+ npll_names[1] = "dummy_gpll";
|
||||
+ non_npll_names[2] = "dummy_npll";
|
||||
+
|
||||
+ /* Lastly the npll-dedicated-VOP needs to be able to control npll. */
|
||||
+ for (i = 0; i < ARRAY_SIZE(rk3288_clk_branches); i++) {
|
||||
+ if (rk3288_clk_branches[i].id == vop_clk_id) {
|
||||
+ rk3288_clk_branches[i].flags |= CLK_SET_RATE_PARENT;
|
||||
+ break;
|
||||
+ }
|
||||
+ }
|
||||
+ pr_debug("%s: npll dedicated for VOP %d\n", __func__, npll_vop);
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
ctx = rockchip_clk_init(np, rk3288_cru_base, CLK_NR_CLKS);
|
||||
if (IS_ERR(ctx)) {
|
||||
pr_err("%s: rockchip clk init failed\n", __func__);
|
||||
diff --git a/drivers/clk/rockchip/clk.h b/drivers/clk/rockchip/clk.h
|
||||
index 6b53fff4c..dbda9d281 100644
|
||||
--- a/drivers/clk/rockchip/clk.h
|
||||
+++ b/drivers/clk/rockchip/clk.h
|
||||
@@ -382,6 +382,9 @@ struct clk *rockchip_clk_register_muxgrf(const char *name,
|
||||
|
||||
#define PNAME(x) static const char *const x[] __initconst
|
||||
|
||||
+/* For when you want to be able to modify the pointers. */
|
||||
+#define PNAME_ED(x) static const char * x[] __initdata
|
||||
+
|
||||
enum rockchip_clk_branch_type {
|
||||
branch_composite,
|
||||
branch_mux,
|
||||
--
|
||||
2.16.4
|
||||
|
@@ -0,0 +1,434 @@
|
||||
From 6c86916e81fa18394d9b57b4af44f9948e100e96 Mon Sep 17 00:00:00 2001
|
||||
From: "Miouyouyou (Myy)" <myy@miouyouyou.fr>
|
||||
Date: Sat, 29 Sep 2018 03:02:10 +0200
|
||||
Subject: [PATCH 6/6] drm: dw_hdmi-rockchip: better clock selection logic and
|
||||
dts-based rate list
|
||||
|
||||
This patch is taken from Urja Rannikko ( @urjaman ) patchset here :
|
||||
https://github.com/urjaman/arch-c201/blob/master/linux-c201/0020-RK3288-HDMI-clock-hacks-combined.patch
|
||||
https://www.spinics.net/lists/arm-kernel/msg673156.html
|
||||
|
||||
The original description was :
|
||||
This contains traces of the following commits from the ChromeOS 3.14
|
||||
tree, which improve RF/EMI performance and detach the clock selection
|
||||
logic from the HDMI PHY configurations, plus support for configuring
|
||||
the allowed clock rates via device tree as they are dependent on
|
||||
PLL configuration and maybe even the PCB layout and other hardware things,
|
||||
eg. interference to wifi or such (EMI).
|
||||
|
||||
Rates that were allowed previous to this patch are added as the fallback
|
||||
list if no dts configuration exists.
|
||||
|
||||
CHROMIUM: drm: rockchip/dw_hdmi-rockchip: Adjust rockchip_mpll_cfg for 146.25
|
||||
CHROMIUM: drm: rockchip/dw_hdmi-rockchip: expand the informal mpll config
|
||||
CHROMIUM: drm: rockchip/dw_hdmi-rockchip: add slop to more tables
|
||||
CHROMIUM: drm: rockchip/dw_hdmi-rockchip: redo rockchip hdmi to allow slop
|
||||
CHROMIUM: drm: rockchip/dw_hdmi-rockchip: Use auto-generated tables
|
||||
CHROMIUM: drm: rockchip/dw_hdmi-rockchip: Fixup the clock to be what we expect
|
||||
CHROMIUM: drm/rockchip: hdmi: adjust cklvl & txlvl for RF/EMI
|
||||
CHROMIUM: drm: rockchip/dw_hdmi-rockchip: Set cur_ctr to 0 always
|
||||
CHROMIUM: drm: rockchip/dw_hdmi-rockchip: Decrease slop
|
||||
|
||||
https://www.spinics.net/lists/arm-kernel/msg673163.html
|
||||
|
||||
This is the patch that takes into account the new property
|
||||
"rockchip,hdmi-rates-hz" that allows the definition of the HDMI
|
||||
frequencies in the DTS file.
|
||||
This also change a lot of HDMI frequencies definition, so that
|
||||
*will* require some extensive testing.
|
||||
|
||||
Still, if it works fine, this should make tinkering the HDMI
|
||||
frequencies easier, in case you have a very special HDMI screen.
|
||||
|
||||
Signed-off-by: Miouyouyou (Myy) <myy@miouyouyou.fr>
|
||||
---
|
||||
diff --git a/drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c b/drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c
|
||||
index cdc304d4c..91c7dc07b 100644
|
||||
--- a/drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c
|
||||
+++ b/drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c
|
||||
@@ -73,122 +73,141 @@ struct rockchip_hdmi {
|
||||
struct clk *grf_clk;
|
||||
struct dw_hdmi *hdmi;
|
||||
struct phy *phy;
|
||||
+ u32* rates;
|
||||
+ u32 rates_cnt;
|
||||
};
|
||||
|
||||
+#define CLK_SLOP(clk) ((clk) / 1000)
|
||||
+#define CLK_PLUS_SLOP(clk) ((clk) + CLK_SLOP(clk))
|
||||
+
|
||||
#define to_rockchip_hdmi(x) container_of(x, struct rockchip_hdmi, x)
|
||||
|
||||
+/* These were the rates allowed by the driver before rates list in device tree,
|
||||
+ * so keep them around as a fallback */
|
||||
+static const u32 dw_hdmi_fallback_rates[] = {
|
||||
+ 27000000,
|
||||
+ 36000000,
|
||||
+ 40000000,
|
||||
+ 54000000,
|
||||
+ 65000000,
|
||||
+ 66000000,
|
||||
+ 74250000,
|
||||
+ 83500000,
|
||||
+ 106500000,
|
||||
+ 108000000,
|
||||
+ 146250000,
|
||||
+ 148500000
|
||||
+};
|
||||
+
|
||||
static const struct dw_hdmi_mpll_config rockchip_mpll_cfg[] = {
|
||||
{
|
||||
- 27000000, {
|
||||
- { 0x00b3, 0x0000},
|
||||
- { 0x2153, 0x0000},
|
||||
- { 0x40f3, 0x0000}
|
||||
+ 30666000, {
|
||||
+ { 0x00b3, 0x0000 },
|
||||
+ { 0x2153, 0x0000 },
|
||||
+ { 0x40f3, 0x0000 },
|
||||
+ },
|
||||
+ }, {
|
||||
+ 36800000, {
|
||||
+ { 0x00b3, 0x0000 },
|
||||
+ { 0x2153, 0x0000 },
|
||||
+ { 0x40a2, 0x0001 },
|
||||
},
|
||||
- }, {
|
||||
- 36000000, {
|
||||
- { 0x00b3, 0x0000},
|
||||
- { 0x2153, 0x0000},
|
||||
- { 0x40f3, 0x0000}
|
||||
+ }, {
|
||||
+ 46000000, {
|
||||
+ { 0x00b3, 0x0000 },
|
||||
+ { 0x2142, 0x0001 },
|
||||
+ { 0x40a2, 0x0001 },
|
||||
},
|
||||
- }, {
|
||||
- 40000000, {
|
||||
- { 0x00b3, 0x0000},
|
||||
- { 0x2153, 0x0000},
|
||||
- { 0x40f3, 0x0000}
|
||||
+ }, {
|
||||
+ 61333000, {
|
||||
+ { 0x0072, 0x0001 },
|
||||
+ { 0x2142, 0x0001 },
|
||||
+ { 0x40a2, 0x0001 },
|
||||
},
|
||||
- }, {
|
||||
- 54000000, {
|
||||
- { 0x0072, 0x0001},
|
||||
- { 0x2142, 0x0001},
|
||||
- { 0x40a2, 0x0001},
|
||||
+ }, {
|
||||
+ 73600000, {
|
||||
+ { 0x0072, 0x0001 },
|
||||
+ { 0x2142, 0x0001 },
|
||||
+ { 0x4061, 0x0002 },
|
||||
},
|
||||
- }, {
|
||||
- 65000000, {
|
||||
- { 0x0072, 0x0001},
|
||||
- { 0x2142, 0x0001},
|
||||
- { 0x40a2, 0x0001},
|
||||
+ }, {
|
||||
+ 92000000, {
|
||||
+ { 0x0072, 0x0001 },
|
||||
+ { 0x2145, 0x0002 },
|
||||
+ { 0x4061, 0x0002 },
|
||||
},
|
||||
- }, {
|
||||
- 66000000, {
|
||||
- { 0x013e, 0x0003},
|
||||
- { 0x217e, 0x0002},
|
||||
- { 0x4061, 0x0002}
|
||||
+ }, {
|
||||
+ 122666000, {
|
||||
+ { 0x0051, 0x0002 },
|
||||
+ { 0x2145, 0x0002 },
|
||||
+ { 0x4061, 0x0002 },
|
||||
},
|
||||
- }, {
|
||||
- 74250000, {
|
||||
- { 0x0072, 0x0001},
|
||||
- { 0x2145, 0x0002},
|
||||
- { 0x4061, 0x0002}
|
||||
+ }, {
|
||||
+ 147200000, {
|
||||
+ { 0x0051, 0x0002 },
|
||||
+ { 0x2145, 0x0002 },
|
||||
+ { 0x4064, 0x0003 },
|
||||
},
|
||||
- }, {
|
||||
- 83500000, {
|
||||
- { 0x0072, 0x0001},
|
||||
+ }, {
|
||||
+ 184000000, {
|
||||
+ { 0x0051, 0x0002 },
|
||||
+ { 0x214c, 0x0003 },
|
||||
+ { 0x4064, 0x0003 },
|
||||
},
|
||||
- }, {
|
||||
- 108000000, {
|
||||
- { 0x0051, 0x0002},
|
||||
- { 0x2145, 0x0002},
|
||||
- { 0x4061, 0x0002}
|
||||
+ }, {
|
||||
+ 226666000, {
|
||||
+ { 0x0040, 0x0003 },
|
||||
+ { 0x214c, 0x0003 },
|
||||
+ { 0x4064, 0x0003 },
|
||||
},
|
||||
- }, {
|
||||
- 106500000, {
|
||||
- { 0x0051, 0x0002},
|
||||
- { 0x2145, 0x0002},
|
||||
- { 0x4061, 0x0002}
|
||||
+ }, {
|
||||
+ 272000000, {
|
||||
+ { 0x0040, 0x0003 },
|
||||
+ { 0x214c, 0x0003 },
|
||||
+ { 0x5a64, 0x0003 },
|
||||
},
|
||||
- }, {
|
||||
- 146250000, {
|
||||
- { 0x0051, 0x0002},
|
||||
- { 0x2145, 0x0002},
|
||||
- { 0x4061, 0x0002}
|
||||
+ }, {
|
||||
+ 340000000, {
|
||||
+ { 0x0040, 0x0003 },
|
||||
+ { 0x3b4c, 0x0003 },
|
||||
+ { 0x5a64, 0x0003 },
|
||||
},
|
||||
- }, {
|
||||
- 148500000, {
|
||||
- { 0x0051, 0x0003},
|
||||
- { 0x214c, 0x0003},
|
||||
- { 0x4064, 0x0003}
|
||||
+ }, {
|
||||
+ 600000000, {
|
||||
+ { 0x1a40, 0x0003 },
|
||||
+ { 0x3b4c, 0x0003 },
|
||||
+ { 0x5a64, 0x0003 },
|
||||
},
|
||||
- }, {
|
||||
+ }, {
|
||||
~0UL, {
|
||||
- { 0x00a0, 0x000a },
|
||||
- { 0x2001, 0x000f },
|
||||
- { 0x4002, 0x000f },
|
||||
+ { 0x0000, 0x0000 },
|
||||
+ { 0x0000, 0x0000 },
|
||||
+ { 0x0000, 0x0000 },
|
||||
},
|
||||
}
|
||||
};
|
||||
|
||||
static const struct dw_hdmi_curr_ctrl rockchip_cur_ctr[] = {
|
||||
- /* pixelclk bpp8 bpp10 bpp12 */
|
||||
+ /* pixelclk bpp8 bpp10 bpp12 */
|
||||
{
|
||||
- 40000000, { 0x0018, 0x0018, 0x0018 },
|
||||
- }, {
|
||||
- 65000000, { 0x0028, 0x0028, 0x0028 },
|
||||
- }, {
|
||||
- 66000000, { 0x0038, 0x0038, 0x0038 },
|
||||
- }, {
|
||||
- 74250000, { 0x0028, 0x0038, 0x0038 },
|
||||
- }, {
|
||||
- 83500000, { 0x0028, 0x0038, 0x0038 },
|
||||
- }, {
|
||||
- 146250000, { 0x0038, 0x0038, 0x0038 },
|
||||
- }, {
|
||||
- 148500000, { 0x0000, 0x0038, 0x0038 },
|
||||
- }, {
|
||||
- ~0UL, { 0x0000, 0x0000, 0x0000},
|
||||
- }
|
||||
+ 600000000, { 0x0000, 0x0000, 0x0000 },
|
||||
+ }, {
|
||||
+ ~0UL, { 0x0000, 0x0000, 0x0000 },
|
||||
+ },
|
||||
};
|
||||
|
||||
static const struct dw_hdmi_phy_config rockchip_phy_config[] = {
|
||||
/*pixelclk symbol term vlev*/
|
||||
- { 74250000, 0x8009, 0x0004, 0x0272},
|
||||
- { 148500000, 0x802b, 0x0004, 0x028d},
|
||||
- { 297000000, 0x8039, 0x0005, 0x028d},
|
||||
- { ~0UL, 0x0000, 0x0000, 0x0000}
|
||||
+ { CLK_PLUS_SLOP(74250000), 0x8009, 0x0004, 0x0272},
|
||||
+ { CLK_PLUS_SLOP(165000000), 0x802b, 0x0004, 0x0209},
|
||||
+ { CLK_PLUS_SLOP(297000000), 0x8039, 0x0005, 0x028d},
|
||||
+ { ~0UL, 0x0000, 0x0000, 0x0000}
|
||||
};
|
||||
|
||||
static int rockchip_hdmi_parse_dt(struct rockchip_hdmi *hdmi)
|
||||
{
|
||||
struct device_node *np = hdmi->dev->of_node;
|
||||
+ int rates_cnt;
|
||||
|
||||
hdmi->regmap = syscon_regmap_lookup_by_phandle(np, "rockchip,grf");
|
||||
if (IS_ERR(hdmi->regmap)) {
|
||||
@@ -216,26 +235,55 @@ static int rockchip_hdmi_parse_dt(struct rockchip_hdmi *hdmi)
|
||||
return PTR_ERR(hdmi->grf_clk);
|
||||
}
|
||||
|
||||
+ if ((rates_cnt = of_property_count_u32_elems(np, "rockchip,hdmi-rates-hz")) > 0) {
|
||||
+ int rv;
|
||||
+ u32 *rates = devm_kmalloc_array(hdmi->dev, rates_cnt, sizeof(u32), GFP_KERNEL);
|
||||
+ if (!rates)
|
||||
+ return -ENOMEM;
|
||||
+ rv = of_property_read_u32_array(np, "rockchip,hdmi-rates-hz", rates, rates_cnt);
|
||||
+ if (rv)
|
||||
+ return rv;
|
||||
+ hdmi->rates = rates;
|
||||
+ hdmi->rates_cnt = rates_cnt;
|
||||
+ } else {
|
||||
+ rates_cnt = ARRAY_SIZE(dw_hdmi_fallback_rates);
|
||||
+ hdmi->rates = devm_kmalloc_array(hdmi->dev, rates_cnt, sizeof(u32), GFP_KERNEL);
|
||||
+ if (!hdmi->rates)
|
||||
+ return -ENOMEM;
|
||||
+ memcpy(hdmi->rates, dw_hdmi_fallback_rates, rates_cnt * sizeof(u32));
|
||||
+ hdmi->rates_cnt = rates_cnt;
|
||||
+ }
|
||||
+
|
||||
+
|
||||
return 0;
|
||||
}
|
||||
|
||||
static enum drm_mode_status
|
||||
-dw_hdmi_rockchip_mode_valid(struct drm_connector *connector,
|
||||
+dw_hdmi_rockchip_encoder_mode_valid(struct drm_encoder *encoder,
|
||||
const struct drm_display_mode *mode)
|
||||
{
|
||||
- const struct dw_hdmi_mpll_config *mpll_cfg = rockchip_mpll_cfg;
|
||||
+ struct rockchip_hdmi *hdmi = to_rockchip_hdmi(encoder);
|
||||
int pclk = mode->clock * 1000;
|
||||
- bool valid = false;
|
||||
+ int num_rates = hdmi->rates_cnt;
|
||||
int i;
|
||||
|
||||
- for (i = 0; mpll_cfg[i].mpixelclock != (~0UL); i++) {
|
||||
- if (pclk == mpll_cfg[i].mpixelclock) {
|
||||
- valid = true;
|
||||
- break;
|
||||
- }
|
||||
+ /*
|
||||
+ * Pixel clocks we support are always < 2GHz and so fit in an
|
||||
+ * int. We should make sure source rate does too so we don't get
|
||||
+ * overflow when we multiply by 1000.
|
||||
+ */
|
||||
+ if (mode->clock > INT_MAX / 1000)
|
||||
+ return MODE_BAD;
|
||||
+
|
||||
+ for (i = 0; i < num_rates; i++) {
|
||||
+ int slop = CLK_SLOP(pclk);
|
||||
+
|
||||
+ if ((pclk >= hdmi->rates[i] - slop) &&
|
||||
+ (pclk <= hdmi->rates[i] + slop))
|
||||
+ return MODE_OK;
|
||||
}
|
||||
|
||||
- return (valid) ? MODE_OK : MODE_BAD;
|
||||
+ return MODE_BAD;
|
||||
}
|
||||
|
||||
static const struct drm_encoder_funcs dw_hdmi_rockchip_encoder_funcs = {
|
||||
@@ -251,7 +299,39 @@ dw_hdmi_rockchip_encoder_mode_fixup(struct drm_encoder *encoder,
|
||||
const struct drm_display_mode *mode,
|
||||
struct drm_display_mode *adj_mode)
|
||||
{
|
||||
- return true;
|
||||
+ struct rockchip_hdmi *hdmi = to_rockchip_hdmi(encoder);
|
||||
+ int pclk = adj_mode->clock * 1000;
|
||||
+ int best_diff = INT_MAX;
|
||||
+ int best_clock = 0;
|
||||
+ int slop;
|
||||
+ int i;
|
||||
+
|
||||
+ /* Pick the best clock */
|
||||
+ for (i = 0; i < hdmi->rates_cnt; i++) {
|
||||
+ int diff = hdmi->rates[i] - pclk;
|
||||
+
|
||||
+ if (diff < 0)
|
||||
+ diff = -diff;
|
||||
+ if (diff < best_diff) {
|
||||
+ best_diff = diff;
|
||||
+ best_clock = hdmi->rates[i];
|
||||
+
|
||||
+ /* Bail early if we're exact */
|
||||
+ if (best_diff == 0)
|
||||
+ return true;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ /* Double check that it's OK */
|
||||
+ slop = CLK_SLOP(pclk);
|
||||
+ if ((pclk >= best_clock - slop) && (pclk <= best_clock + slop)) {
|
||||
+ adj_mode->clock = DIV_ROUND_UP(best_clock, 1000);
|
||||
+ return true;
|
||||
+ }
|
||||
+
|
||||
+ /* Shoudn't be here; we should have said rate wasn't valid */
|
||||
+ dev_warn(hdmi->dev, "tried to set invalid rate %d\n", adj_mode->clock);
|
||||
+ return false;
|
||||
}
|
||||
|
||||
static void dw_hdmi_rockchip_encoder_mode_set(struct drm_encoder *encoder,
|
||||
@@ -307,6 +387,7 @@ dw_hdmi_rockchip_encoder_atomic_check(struct drm_encoder *encoder,
|
||||
}
|
||||
|
||||
static const struct drm_encoder_helper_funcs dw_hdmi_rockchip_encoder_helper_funcs = {
|
||||
+ .mode_valid = dw_hdmi_rockchip_encoder_mode_valid,
|
||||
.mode_fixup = dw_hdmi_rockchip_encoder_mode_fixup,
|
||||
.mode_set = dw_hdmi_rockchip_encoder_mode_set,
|
||||
.enable = dw_hdmi_rockchip_encoder_enable,
|
||||
@@ -406,7 +487,6 @@ static struct rockchip_hdmi_chip_data rk3228_chip_data = {
|
||||
};
|
||||
|
||||
static const struct dw_hdmi_plat_data rk3228_hdmi_drv_data = {
|
||||
- .mode_valid = dw_hdmi_rockchip_mode_valid,
|
||||
.mpll_cfg = rockchip_mpll_cfg,
|
||||
.cur_ctr = rockchip_cur_ctr,
|
||||
.phy_config = rockchip_phy_config,
|
||||
@@ -423,7 +503,6 @@ static struct rockchip_hdmi_chip_data rk3288_chip_data = {
|
||||
};
|
||||
|
||||
static const struct dw_hdmi_plat_data rk3288_hdmi_drv_data = {
|
||||
- .mode_valid = dw_hdmi_rockchip_mode_valid,
|
||||
.mpll_cfg = rockchip_mpll_cfg,
|
||||
.cur_ctr = rockchip_cur_ctr,
|
||||
.phy_config = rockchip_phy_config,
|
||||
@@ -443,7 +522,6 @@ static struct rockchip_hdmi_chip_data rk3328_chip_data = {
|
||||
};
|
||||
|
||||
static const struct dw_hdmi_plat_data rk3328_hdmi_drv_data = {
|
||||
- .mode_valid = dw_hdmi_rockchip_mode_valid,
|
||||
.mpll_cfg = rockchip_mpll_cfg,
|
||||
.cur_ctr = rockchip_cur_ctr,
|
||||
.phy_config = rockchip_phy_config,
|
||||
@@ -460,7 +538,6 @@ static struct rockchip_hdmi_chip_data rk3399_chip_data = {
|
||||
};
|
||||
|
||||
static const struct dw_hdmi_plat_data rk3399_hdmi_drv_data = {
|
||||
- .mode_valid = dw_hdmi_rockchip_mode_valid,
|
||||
.mpll_cfg = rockchip_mpll_cfg,
|
||||
.cur_ctr = rockchip_cur_ctr,
|
||||
.phy_config = rockchip_phy_config,
|
||||
@@ -558,6 +635,7 @@ static int dw_hdmi_rockchip_bind(struct device *dev, struct device *master,
|
||||
*/
|
||||
if (IS_ERR(hdmi->hdmi)) {
|
||||
ret = PTR_ERR(hdmi->hdmi);
|
||||
+ devm_kfree(hdmi->dev, hdmi->rates);
|
||||
drm_encoder_cleanup(encoder);
|
||||
clk_disable_unprepare(hdmi->vpll_clk);
|
||||
}
|
||||
@@ -570,6 +648,7 @@ static void dw_hdmi_rockchip_unbind(struct device *dev, struct device *master,
|
||||
{
|
||||
struct rockchip_hdmi *hdmi = dev_get_drvdata(dev);
|
||||
|
||||
+ devm_kfree(hdmi->dev, hdmi->rates);
|
||||
dw_hdmi_unbind(hdmi->hdmi);
|
||||
clk_disable_unprepare(hdmi->vpll_clk);
|
||||
}
|
@@ -1,56 +0,0 @@
|
||||
From 7af8d2bf732cb3baab7d926ed8a7e061e7a09ad9 Mon Sep 17 00:00:00 2001
|
||||
From: Myy Miouyouyou <myy@miouyouyou.fr>
|
||||
Date: Thu, 19 Oct 2017 21:39:00 +0200
|
||||
Subject: [PATCH 13/28] ARM: DTSI: rk3288.dtsi: Adding cells addresses and
|
||||
sizes of MMC nodes
|
||||
|
||||
Imported from the Rockchip 4.4 patches.
|
||||
|
||||
Signed-off-by: Myy Miouyouyou <myy@miouyouyou.fr>
|
||||
---
|
||||
arch/arm/boot/dts/rk3288.dtsi | 8 ++++++++
|
||||
1 file changed, 8 insertions(+)
|
||||
|
||||
diff --git a/arch/arm/boot/dts/rk3288.dtsi b/arch/arm/boot/dts/rk3288.dtsi
|
||||
index be985f02..14ef8202 100644
|
||||
--- a/arch/arm/boot/dts/rk3288.dtsi
|
||||
+++ b/arch/arm/boot/dts/rk3288.dtsi
|
||||
@@ -236,6 +236,8 @@
|
||||
clock-names = "biu", "ciu", "ciu-drive", "ciu-sample";
|
||||
fifo-depth = <0x100>;
|
||||
interrupts = <GIC_SPI 32 IRQ_TYPE_LEVEL_HIGH>;
|
||||
+ #address-cells = <1>;
|
||||
+ #size-cells = <0>;
|
||||
reg = <0x0 0xff0c0000 0x0 0x4000>;
|
||||
resets = <&cru SRST_MMC0>;
|
||||
reset-names = "reset";
|
||||
@@ -250,6 +252,8 @@
|
||||
clock-names = "biu", "ciu", "ciu-drive", "ciu-sample";
|
||||
fifo-depth = <0x100>;
|
||||
interrupts = <GIC_SPI 33 IRQ_TYPE_LEVEL_HIGH>;
|
||||
+ #address-cells = <1>;
|
||||
+ #size-cells = <0>;
|
||||
reg = <0x0 0xff0d0000 0x0 0x4000>;
|
||||
resets = <&cru SRST_SDIO0>;
|
||||
reset-names = "reset";
|
||||
@@ -264,6 +268,8 @@
|
||||
clock-names = "biu", "ciu", "ciu-drive", "ciu-sample";
|
||||
fifo-depth = <0x100>;
|
||||
interrupts = <GIC_SPI 34 IRQ_TYPE_LEVEL_HIGH>;
|
||||
+ #address-cells = <1>;
|
||||
+ #size-cells = <0>;
|
||||
reg = <0x0 0xff0e0000 0x0 0x4000>;
|
||||
resets = <&cru SRST_SDIO1>;
|
||||
reset-names = "reset";
|
||||
@@ -278,6 +284,8 @@
|
||||
clock-names = "biu", "ciu", "ciu-drive", "ciu-sample";
|
||||
fifo-depth = <0x100>;
|
||||
interrupts = <GIC_SPI 35 IRQ_TYPE_LEVEL_HIGH>;
|
||||
+ #address-cells = <1>;
|
||||
+ #size-cells = <0>;
|
||||
reg = <0x0 0xff0f0000 0x0 0x4000>;
|
||||
resets = <&cru SRST_EMMC>;
|
||||
reset-names = "reset";
|
||||
--
|
||||
2.11.0
|
||||
|
@@ -1,40 +0,0 @@
|
||||
From 3fe37d29b53e3d06c8f4314cfc113bfa679f67eb Mon Sep 17 00:00:00 2001
|
||||
From: Myy Miouyouyou <myy@miouyouyou.fr>
|
||||
Date: Thu, 19 Oct 2017 21:48:05 +0200
|
||||
Subject: [PATCH 15/28] ARM: DTSI: rk3288.dtsi: Add the RGA node
|
||||
|
||||
Imported from @wzyy2 patches.
|
||||
|
||||
Signed-off-by: Myy Miouyouyou <myy@miouyouyou.fr>
|
||||
---
|
||||
arch/arm/boot/dts/rk3288.dtsi | 14 ++++++++++++++
|
||||
1 file changed, 14 insertions(+)
|
||||
|
||||
diff --git a/arch/arm/boot/dts/rk3288.dtsi b/arch/arm/boot/dts/rk3288.dtsi
|
||||
index 10ecebb4..455446f6 100644
|
||||
--- a/arch/arm/boot/dts/rk3288.dtsi
|
||||
+++ b/arch/arm/boot/dts/rk3288.dtsi
|
||||
@@ -1159,6 +1159,20 @@
|
||||
};
|
||||
};
|
||||
|
||||
+ rga: rga@ff920000 {
|
||||
+ compatible = "rockchip,rk3288-rga";
|
||||
+ reg = <0x0 0xff920000 0x0 0x180>;
|
||||
+ interrupts = <GIC_SPI 18 IRQ_TYPE_LEVEL_HIGH>;
|
||||
+ interrupt-names = "rga";
|
||||
+ clocks = <&cru ACLK_RGA>, <&cru HCLK_RGA>, <&cru SCLK_RGA>;
|
||||
+ clock-names = "aclk", "hclk", "sclk";
|
||||
+ power-domains = <&power RK3288_PD_VIO>;
|
||||
+ resets = <&cru SRST_RGA_CORE>, <&cru SRST_RGA_AXI>, <&cru SRST_RGA_AHB>;
|
||||
+
|
||||
+ reset-names = "core", "axi", "ahb";
|
||||
+ status = "disabled";
|
||||
+ };
|
||||
+
|
||||
vpu_mmu: iommu@ff9a0800 {
|
||||
compatible = "rockchip,iommu";
|
||||
reg = <0x0 0xff9a0800 0x0 0x100>;
|
||||
--
|
||||
2.11.0
|
||||
|
@@ -0,0 +1,22 @@
|
||||
From d4d128324b8f8a9f5c441203d94703e41fa07df3 Mon Sep 17 00:00:00 2001
|
||||
From: "Miouyouyou (Myy)" <myy@miouyouyou.fr>
|
||||
Date: Mon, 5 Nov 2018 19:57:56 +0100
|
||||
Subject: [PATCH] spi: Added support for Tinkerboard's SPI interface
|
||||
|
||||
Imported from ARMbian
|
||||
|
||||
Signed-off-by: Miouyouyou (Myy) <myy@miouyouyou.fr>
|
||||
---
|
||||
|
||||
diff --git a/drivers/spi/spidev.c b/drivers/spi/spidev.c
|
||||
index 255786f2e..3a3f2e6fd 100644
|
||||
--- a/drivers/spi/spidev.c
|
||||
+++ b/drivers/spi/spidev.c
|
||||
@@ -665,6 +665,7 @@ static const struct of_device_id spidev_dt_ids[] = {
|
||||
{ .compatible = "lwn,bk4" },
|
||||
{ .compatible = "dh,dhcom-board" },
|
||||
{ .compatible = "menlo,m53cpld" },
|
||||
+ { .compatible = "rockchip,spi_tinker" },
|
||||
{},
|
||||
};
|
||||
MODULE_DEVICE_TABLE(of, spidev_dt_ids);
|
@@ -1,165 +0,0 @@
|
||||
From 2715f4a9ab5c169c546029a61eebb0bde6619b0e Mon Sep 17 00:00:00 2001
|
||||
From: Myy Miouyouyou <myy@miouyouyou.fr>
|
||||
Date: Thu, 19 Oct 2017 22:12:48 +0200
|
||||
Subject: [PATCH 18/28] ARM: DTS: rk3288-tinker.dts: Enabling SDIO, Wireless
|
||||
and Bluetooth
|
||||
|
||||
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.
|
||||
|
||||
Bluetooth and uart0 (AKA Bluetooth UART) definitions were also added
|
||||
in order to deal with all the wireless techs in one patch.
|
||||
|
||||
Signed-off-by: Myy Miouyouyou <myy@miouyouyou.fr>
|
||||
---
|
||||
arch/arm/boot/dts/rk3288-tinker.dts | 82 ++++++++++++++++++++++++++++++++++++-
|
||||
1 file changed, 81 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/arch/arm/boot/dts/rk3288-tinker.dts b/arch/arm/boot/dts/rk3288-tinker.dts
|
||||
index 346b0d8b..c552fd95 100644
|
||||
--- a/arch/arm/boot/dts/rk3288-tinker.dts
|
||||
+++ b/arch/arm/boot/dts/rk3288-tinker.dts
|
||||
@@ -44,6 +44,7 @@
|
||||
|
||||
#include "rk3288.dtsi"
|
||||
#include <dt-bindings/input/input.h>
|
||||
+#include <dt-bindings/clock/rockchip,rk808.h>
|
||||
|
||||
/ {
|
||||
model = "Rockchip RK3288 Tinker Board";
|
||||
@@ -114,6 +115,24 @@
|
||||
};
|
||||
};
|
||||
|
||||
+ /* 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 RK_PD4 GPIO_ACTIVE_LOW>, <&gpio4 RK_PD3 GPIO_ACTIVE_LOW>;
|
||||
+ };
|
||||
+
|
||||
vcc_sys: vsys-regulator {
|
||||
compatible = "regulator-fixed";
|
||||
regulator-name = "vcc_sys";
|
||||
@@ -134,6 +153,28 @@
|
||||
startup-delay-us = <100000>;
|
||||
vin-supply = <&vcc_io>;
|
||||
};
|
||||
+
|
||||
+ wireless-wlan {
|
||||
+ compatible = "wlan-platdata";
|
||||
+ rockchip,grf = <&grf>;
|
||||
+ wifi_chip_type = "8723bs";
|
||||
+ sdio_vref = <1800>;
|
||||
+ WIFI,host_wake_irq = <&gpio4 30 GPIO_ACTIVE_HIGH>;
|
||||
+ status = "okay";
|
||||
+ };
|
||||
+
|
||||
+ wireless-bluetooth {
|
||||
+ compatible = "bluetooth-platdata";
|
||||
+ uart_rts_gpios = <&gpio4 19 GPIO_ACTIVE_LOW>;
|
||||
+ pinctrl-names = "default","rts_gpio";
|
||||
+ pinctrl-0 = <&uart0_rts>;
|
||||
+ pinctrl-1 = <&uart0_gpios>;
|
||||
+ BT,reset_gpio = <&gpio4 29 GPIO_ACTIVE_HIGH>;
|
||||
+ BT,wake_gpio = <&gpio4 26 GPIO_ACTIVE_HIGH>;
|
||||
+ BT,wake_host_irq = <&gpio4 31 GPIO_ACTIVE_HIGH>;
|
||||
+ status = "okay";
|
||||
+ };
|
||||
+
|
||||
};
|
||||
|
||||
&cpu0 {
|
||||
@@ -373,10 +414,30 @@
|
||||
|
||||
&io_domains {
|
||||
status = "okay";
|
||||
-
|
||||
+ rockchip,grf = <&grf>;
|
||||
+ wifi-supply = <&vcc_18>;
|
||||
sdcard-supply = <&vccio_sd>;
|
||||
};
|
||||
|
||||
+&sdio0 {
|
||||
+ status = "okay";
|
||||
+ clock-frequency = <50000000>;
|
||||
+ clock-freq-min-max = <200000 50000000>;
|
||||
+ bus-width = <4>;
|
||||
+ cap-sd-highspeed;
|
||||
+ cap-sdio-irq;
|
||||
+ 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;
|
||||
+ supports-sdio;
|
||||
+
|
||||
+};
|
||||
+
|
||||
&pinctrl {
|
||||
pcfg_pull_none_drv_8ma: pcfg-pull-none-drv-8ma {
|
||||
drive-strength = <8>;
|
||||
@@ -422,6 +483,16 @@
|
||||
};
|
||||
};
|
||||
|
||||
+ 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>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
sdmmc {
|
||||
sdmmc_bus4: sdmmc-bus4 {
|
||||
rockchip,pins = <6 16 RK_FUNC_1 &pcfg_pull_up_drv_8ma>,
|
||||
@@ -453,6 +524,13 @@
|
||||
rockchip,pins = <7 8 RK_FUNC_GPIO &pcfg_pull_none>;
|
||||
};
|
||||
};
|
||||
+
|
||||
+ wireless-bluetooth {
|
||||
+ uart0_gpios: uart0-gpios {
|
||||
+ rockchip,pins = <4 19 RK_FUNC_GPIO &pcfg_pull_none>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
};
|
||||
|
||||
&pwm0 {
|
||||
@@ -485,6 +563,8 @@
|
||||
|
||||
&uart0 {
|
||||
status = "okay";
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&uart0_xfer>, <&uart0_cts>;
|
||||
};
|
||||
|
||||
&uart1 {
|
||||
--
|
||||
2.11.0
|
||||
|
@@ -1,40 +0,0 @@
|
||||
From 39e50ab508d8104a733771a8681908a66a300edd Mon Sep 17 00:00:00 2001
|
||||
From: Myy Miouyouyou <myy@miouyouyou.fr>
|
||||
Date: Thu, 19 Oct 2017 22:25:03 +0200
|
||||
Subject: [PATCH 20/28] ARM: DTS: rk3288-tinker.dts: Setting up the SD
|
||||
regulators
|
||||
|
||||
Some are needed and some are not. Playing with these parameters is
|
||||
required to get reboot working on these boards.
|
||||
|
||||
I still can't believe that these boards can't soft reset correctly.
|
||||
|
||||
Signed-off-by: Myy Miouyouyou <myy@miouyouyou.fr>
|
||||
---
|
||||
arch/arm/boot/dts/rk3288-tinker.dts | 3 ++-
|
||||
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/arch/arm/boot/dts/rk3288-tinker.dts b/arch/arm/boot/dts/rk3288-tinker.dts
|
||||
index 4ce94698..90c1a251 100644
|
||||
--- a/arch/arm/boot/dts/rk3288-tinker.dts
|
||||
+++ b/arch/arm/boot/dts/rk3288-tinker.dts
|
||||
@@ -333,6 +333,8 @@
|
||||
};
|
||||
|
||||
vccio_sd: LDO_REG5 {
|
||||
+ regulator-always-on;
|
||||
+ regulator-boot-on;
|
||||
regulator-min-microvolt = <1800000>;
|
||||
regulator-max-microvolt = <3300000>;
|
||||
regulator-name = "vccio_sd";
|
||||
@@ -379,7 +381,6 @@
|
||||
};
|
||||
|
||||
vcc33_sd: SWITCH_REG1 {
|
||||
- regulator-always-on;
|
||||
regulator-boot-on;
|
||||
regulator-name = "vcc33_sd";
|
||||
regulator-state-mem {
|
||||
--
|
||||
2.11.0
|
||||
|
@@ -1,53 +0,0 @@
|
||||
From b0a552add28bf4590b979abb3530b14b6811eec1 Mon Sep 17 00:00:00 2001
|
||||
From: Myy Miouyouyou <myy@miouyouyou.fr>
|
||||
Date: Thu, 19 Oct 2017 22:33:39 +0200
|
||||
Subject: [PATCH 21/28] ARM: DTS: rk3288-tinker.dts: Defined the I2C interfaces
|
||||
|
||||
And all the hardware behind.
|
||||
|
||||
Taken from, and tested by @TonyMac32 .
|
||||
|
||||
Signed-off-by: Myy Miouyouyou <myy@miouyouyou.fr>
|
||||
---
|
||||
arch/arm/boot/dts/rk3288-tinker.dts | 23 +++++++++++++++++++++++
|
||||
1 file changed, 23 insertions(+)
|
||||
|
||||
diff --git a/arch/arm/boot/dts/rk3288-tinker.dts b/arch/arm/boot/dts/rk3288-tinker.dts
|
||||
index 90c1a251..67a3ce6f 100644
|
||||
--- a/arch/arm/boot/dts/rk3288-tinker.dts
|
||||
+++ b/arch/arm/boot/dts/rk3288-tinker.dts
|
||||
@@ -400,8 +400,31 @@
|
||||
};
|
||||
};
|
||||
|
||||
+&i2c1 {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
&i2c2 {
|
||||
status = "okay";
|
||||
+
|
||||
+ afc0:af-controller@0 {
|
||||
+ status = "okay";
|
||||
+ compatible = "silicon touch,vm149C-v4l2-i2c-subdev";
|
||||
+ reg = <0x0 0x0c>;
|
||||
+ };
|
||||
+
|
||||
+ eeprom:m24c08@50 {
|
||||
+ compatible = "at,24c08";
|
||||
+ reg = <0x0 0x50>;
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&i2c3 {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&i2c4 {
|
||||
+ status = "okay";
|
||||
};
|
||||
|
||||
&i2c5 {
|
||||
--
|
||||
2.11.0
|
||||
|
@@ -1,35 +0,0 @@
|
||||
From 8ca607f3fe77c80a3367d8363703d5dc1d6781d4 Mon Sep 17 00:00:00 2001
|
||||
From: Myy Miouyouyou <myy@miouyouyou.fr>
|
||||
Date: Thu, 19 Oct 2017 22:36:02 +0200
|
||||
Subject: [PATCH 22/28] ARM: DTS: rk3288-tinker.dts: Add the MIPI DSI node
|
||||
|
||||
Taken from, and tested by @TonyMac32 .
|
||||
|
||||
Signed-off-by: Myy Miouyouyou <myy@miouyouyou.fr>
|
||||
---
|
||||
arch/arm/boot/dts/rk3288-tinker.dts | 9 +++++++++
|
||||
1 file changed, 9 insertions(+)
|
||||
|
||||
diff --git a/arch/arm/boot/dts/rk3288-tinker.dts b/arch/arm/boot/dts/rk3288-tinker.dts
|
||||
index 67a3ce6f..6f4c0843 100644
|
||||
--- a/arch/arm/boot/dts/rk3288-tinker.dts
|
||||
+++ b/arch/arm/boot/dts/rk3288-tinker.dts
|
||||
@@ -443,6 +443,15 @@
|
||||
sdcard-supply = <&vccio_sd>;
|
||||
};
|
||||
|
||||
+&mipi_dsi {
|
||||
+ status = "okay";
|
||||
+ mipi_panel: mipi-panel {
|
||||
+ compatible ="asus,tc358762";
|
||||
+ reg = <0x0 0>;
|
||||
+ status = "okay";
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
&sdio0 {
|
||||
status = "okay";
|
||||
clock-frequency = <50000000>;
|
||||
--
|
||||
2.11.0
|
||||
|
@@ -1,49 +0,0 @@
|
||||
From 14f951ca2d354ad8fd068d0f3d8648d5c0d1e60e Mon Sep 17 00:00:00 2001
|
||||
From: Myy Miouyouyou <myy@miouyouyou.fr>
|
||||
Date: Thu, 19 Oct 2017 22:40:26 +0200
|
||||
Subject: [PATCH 23/28] ARM: DTS: rk3288-tinker.dts: Defining the SPI interface
|
||||
|
||||
Taken from, and tested by @TonyMac32 .
|
||||
|
||||
Well, the original one was tested by him but I had to adapt the
|
||||
registers definitions to the new 64-bits LPAE-compliant syntax.
|
||||
|
||||
Therefore that *might* break, along with a few other patches.
|
||||
|
||||
Signed-off-by: Myy Miouyouyou <myy@miouyouyou.fr>
|
||||
---
|
||||
arch/arm/boot/dts/rk3288-tinker.dts | 18 ++++++++++++++++++
|
||||
1 file changed, 18 insertions(+)
|
||||
|
||||
diff --git a/arch/arm/boot/dts/rk3288-tinker.dts b/arch/arm/boot/dts/rk3288-tinker.dts
|
||||
index 6f4c0843..f4b4525c 100644
|
||||
--- a/arch/arm/boot/dts/rk3288-tinker.dts
|
||||
+++ b/arch/arm/boot/dts/rk3288-tinker.dts
|
||||
@@ -471,6 +471,24 @@
|
||||
|
||||
};
|
||||
|
||||
+&spi2 {
|
||||
+ status = "okay";
|
||||
+ max-freq = <50000000>;
|
||||
+ spidev@0 {
|
||||
+ compatible = "rockchip,spi_tinker";
|
||||
+ reg = <0x0 0>;
|
||||
+ spi-max-frequency = <50000000>;
|
||||
+ spi-cpha = <1>;
|
||||
+ };
|
||||
+ spidev@1 {
|
||||
+ compatible = "rockchip,spi_tinker";
|
||||
+ reg = <0x0 1>;
|
||||
+ spi-max-frequency = <50000000>;
|
||||
+ spi-cpha = <1>;
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+
|
||||
&pinctrl {
|
||||
pcfg_pull_none_drv_8ma: pcfg-pull-none-drv-8ma {
|
||||
drive-strength = <8>;
|
||||
--
|
||||
2.11.0
|
||||
|
@@ -1,33 +0,0 @@
|
||||
From 58d72a1cc693c4c08391487476d0cd6d167a57cf Mon Sep 17 00:00:00 2001
|
||||
From: Myy Miouyouyou <myy@miouyouyou.fr>
|
||||
Date: Thu, 19 Oct 2017 22:48:36 +0200
|
||||
Subject: [PATCH 24/28] ARM: DTS: rk3288-tinker.dts: Defining SDMMC properties
|
||||
|
||||
I never knew if these properties were required to fix the dreaded
|
||||
reboot issue...
|
||||
|
||||
Signed-off-by: Myy Miouyouyou <myy@miouyouyou.fr>
|
||||
---
|
||||
arch/arm/boot/dts/rk3288-tinker.dts | 5 +++++
|
||||
1 file changed, 5 insertions(+)
|
||||
|
||||
diff --git a/arch/arm/boot/dts/rk3288-tinker.dts b/arch/arm/boot/dts/rk3288-tinker.dts
|
||||
index f4b4525c..a0663425 100644
|
||||
--- a/arch/arm/boot/dts/rk3288-tinker.dts
|
||||
+++ b/arch/arm/boot/dts/rk3288-tinker.dts
|
||||
@@ -601,7 +601,12 @@
|
||||
disable-wp; /* wp not hooked up */
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&sdmmc_clk &sdmmc_cmd &sdmmc_cd &sdmmc_bus4>;
|
||||
+ sd-uhs-sdr12;
|
||||
+ sd-uhs-sdr25;
|
||||
+ sd-uhs-sdr50;
|
||||
+ sd-uhs-sdr104;
|
||||
status = "okay";
|
||||
+ supports-sd;
|
||||
vmmc-supply = <&vcc33_sd>;
|
||||
vqmmc-supply = <&vccio_sd>;
|
||||
};
|
||||
--
|
||||
2.11.0
|
||||
|
@@ -1,107 +0,0 @@
|
||||
From f4480cb8198085607c15e523b49aa21bc38cf62c Mon Sep 17 00:00:00 2001
|
||||
From: Myy Miouyouyou <myy@miouyouyou.fr>
|
||||
Date: Tue, 21 Nov 2017 21:47:33 +0100
|
||||
Subject: [PATCH 1/5] ARM: DTSI: rk3288.dtsi: Define the VPU services
|
||||
|
||||
Still, you will need appropriate drivers to use them.
|
||||
|
||||
Contrary to the previous versions of this patch, these services are :
|
||||
* NOT enabled by default;
|
||||
* MUST be activated in each individual DTS;
|
||||
|
||||
I currently do not own enough RK3288 boards to ensure that the
|
||||
VPU and HEVC MMU + services can be activated without issues.
|
||||
|
||||
Still this patch does not generate issues like the previous one AND
|
||||
still enable these services on boot, when activated properly in
|
||||
individual DTS files.
|
||||
|
||||
Signed-off-by: Myy Miouyouyou <myy@miouyouyou.fr>
|
||||
---
|
||||
arch/arm/boot/dts/rk3288.dtsi | 63 +++++++++++++++++++++++++++++++++++++++++++
|
||||
1 file changed, 63 insertions(+)
|
||||
|
||||
diff --git a/arch/arm/boot/dts/rk3288.dtsi b/arch/arm/boot/dts/rk3288.dtsi
|
||||
index 30b04257..bc3601ac 100644
|
||||
--- a/arch/arm/boot/dts/rk3288.dtsi
|
||||
+++ b/arch/arm/boot/dts/rk3288.dtsi
|
||||
@@ -1182,6 +1182,27 @@
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
+ vpu_service: vpu-service@ff9a0000 {
|
||||
+ compatible = "rockchip,vpu_service";
|
||||
+ reg = <0x0 0xff9a0000 0x0 0x800>;
|
||||
+ interrupts =
|
||||
+ <GIC_SPI 9 IRQ_TYPE_LEVEL_HIGH>,
|
||||
+ <GIC_SPI 10 IRQ_TYPE_LEVEL_HIGH>;
|
||||
+ interrupt-names = "irq_enc", "irq_dec";
|
||||
+ clocks = <&cru ACLK_VCODEC>, <&cru HCLK_VCODEC>;
|
||||
+ clock-names = "aclk_vcodec", "hclk_vcodec";
|
||||
+ power-domains = <&power RK3288_PD_VIDEO>;
|
||||
+ rockchip,grf = <&grf>;
|
||||
+ resets = <&cru SRST_VCODEC_AXI>, <&cru SRST_VCODEC_AHB>;
|
||||
+ reset-names = "video_a", "video_h";
|
||||
+ iommus = <&vpu_mmu>;
|
||||
+ iommu_enabled = <1>;
|
||||
+ dev_mode = <0>;
|
||||
+ status = "disabled";
|
||||
+ /* 0 means ion, 1 means drm */
|
||||
+ allocator = <1>;
|
||||
+ };
|
||||
+
|
||||
hevc_mmu: iommu@ff9c0440 {
|
||||
compatible = "rockchip,iommu";
|
||||
reg = <0x0 0xff9c0440 0x0 0x40>, <0x0 0xff9c0480 0x0 0x40>;
|
||||
@@ -1191,6 +1212,48 @@
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
+ hevc_service: hevc-service@ff9c0000 {
|
||||
+ compatible = "rockchip,hevc_service";
|
||||
+ reg = <0x0 0xff9c0000 0x0 0x400>;
|
||||
+ interrupts = <GIC_SPI 12 IRQ_TYPE_LEVEL_HIGH>;
|
||||
+ interrupt-names = "irq_dec";
|
||||
+ clocks =
|
||||
+ <&cru ACLK_HEVC>,
|
||||
+ <&cru HCLK_HEVC>,
|
||||
+ <&cru SCLK_HEVC_CORE>,
|
||||
+ <&cru SCLK_HEVC_CABAC>;
|
||||
+ clock-names =
|
||||
+ "aclk_vcodec",
|
||||
+ "hclk_vcodec",
|
||||
+ "clk_core",
|
||||
+ "clk_cabac";
|
||||
+ /*
|
||||
+ * The 4K hevc would also work well with 500/125/300/300,
|
||||
+ * no more err irq and reset request.
|
||||
+ */
|
||||
+ assigned-clocks =
|
||||
+ <&cru ACLK_HEVC>,
|
||||
+ <&cru HCLK_HEVC>,
|
||||
+ <&cru SCLK_HEVC_CORE>,
|
||||
+ <&cru SCLK_HEVC_CABAC>;
|
||||
+ assigned-clock-rates =
|
||||
+ <400000000>,
|
||||
+ <100000000>,
|
||||
+ <300000000>,
|
||||
+ <300000000>;
|
||||
+
|
||||
+ resets = <&cru SRST_HEVC>;
|
||||
+ reset-names = "video";
|
||||
+ power-domains = <&power RK3288_PD_HEVC>;
|
||||
+ rockchip,grf = <&grf>;
|
||||
+ dev_mode = <1>;
|
||||
+ iommus = <&hevc_mmu>;
|
||||
+ iommu_enabled = <1>;
|
||||
+ status = "disabled";
|
||||
+ /* 0 means ion, 1 means drm */
|
||||
+ allocator = <1>;
|
||||
+ };
|
||||
+
|
||||
gpu: gpu@ffa30000 {
|
||||
compatible = "rockchip,rk3288-mali", "arm,mali-t760";
|
||||
reg = <0x0 0xffa30000 0x0 0x10000>;
|
||||
--
|
||||
2.14.1
|
||||
|
@@ -1,57 +0,0 @@
|
||||
From 647d6012849191e9909a8acb0fc9ae5df1afc747 Mon Sep 17 00:00:00 2001
|
||||
From: Myy Miouyouyou <myy@miouyouyou.fr>
|
||||
Date: Tue, 21 Nov 2017 21:51:31 +0100
|
||||
Subject: [PATCH 2/5] ARM: DTS: rk3288-miqi.dts: Enable the Video encoding MMU
|
||||
and services
|
||||
|
||||
Enable the :
|
||||
* VPU MMU;
|
||||
* VPU service;
|
||||
* HEVC MMU;
|
||||
* HEVC service;
|
||||
on MiQi devices.
|
||||
|
||||
Signed-off-by: Myy Miouyouyou <myy@miouyouyou.fr>
|
||||
---
|
||||
arch/arm/boot/dts/rk3288-miqi.dts | 18 +++++++++++++++++-
|
||||
1 file changed, 17 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/arch/arm/boot/dts/rk3288-miqi.dts b/arch/arm/boot/dts/rk3288-miqi.dts
|
||||
index d7fde483..dd785c70 100644
|
||||
--- a/arch/arm/boot/dts/rk3288-miqi.dts
|
||||
+++ b/arch/arm/boot/dts/rk3288-miqi.dts
|
||||
@@ -124,7 +124,7 @@
|
||||
};
|
||||
|
||||
|
||||
- cpu0_opp_table: opp_table0 {
|
||||
+ cpu0_opp_table: opp_table {
|
||||
compatible = "operating-points-v2";
|
||||
opp-shared;
|
||||
|
||||
@@ -575,6 +575,22 @@
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
+&vpu_mmu {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&vpu_service {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&hevc_mmu {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&hevc_service {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
&wdt {
|
||||
status = "okay";
|
||||
};
|
||||
--
|
||||
2.14.1
|
||||
|
@@ -1,48 +0,0 @@
|
||||
From 092c26ead2eb4035a57217f8705c9deed3bfb927 Mon Sep 17 00:00:00 2001
|
||||
From: Myy Miouyouyou <myy@miouyouyou.fr>
|
||||
Date: Tue, 21 Nov 2017 21:54:22 +0100
|
||||
Subject: [PATCH 3/5] ARM: DTS: rk3288-tinker: Enable the Video encoding MMU
|
||||
and services
|
||||
|
||||
Enable the :
|
||||
* VPU MMU;
|
||||
* VPU Service;
|
||||
* HEVC MMU;
|
||||
* HEVC Service;
|
||||
for ASUS Tinkerboard devices.
|
||||
|
||||
Signed-off-by: Myy Miouyouyou <myy@miouyouyou.fr>
|
||||
---
|
||||
arch/arm/boot/dts/rk3288-tinker.dts | 16 ++++++++++++++++
|
||||
1 file changed, 16 insertions(+)
|
||||
|
||||
diff --git a/arch/arm/boot/dts/rk3288-tinker.dts b/arch/arm/boot/dts/rk3288-tinker.dts
|
||||
index a0663425..07b4af4f 100644
|
||||
--- a/arch/arm/boot/dts/rk3288-tinker.dts
|
||||
+++ b/arch/arm/boot/dts/rk3288-tinker.dts
|
||||
@@ -671,6 +671,22 @@
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
+&vpu_mmu {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&vpu_service {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&hevc_mmu {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&hevc_service {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
&wdt {
|
||||
status = "okay";
|
||||
};
|
||||
--
|
||||
2.14.1
|
||||
|
@@ -1,49 +0,0 @@
|
||||
From 2769b0e656d849c5d652c75db71ce0faff1c0551 Mon Sep 17 00:00:00 2001
|
||||
From: Myy Miouyouyou <myy@miouyouyou.fr>
|
||||
Date: Tue, 21 Nov 2017 21:56:45 +0100
|
||||
Subject: [PATCH 4/5] ARM: DTSI: rk3288-firefly: Enable the Video encoding MMU
|
||||
and services
|
||||
|
||||
Enable the :
|
||||
* VPU MMU;
|
||||
* VPU Service;
|
||||
* HEVC MMU;
|
||||
* HEVC Service;
|
||||
for RK3288 Firefly devices.
|
||||
|
||||
Signed-off-by: Myy Miouyouyou <myy@miouyouyou.fr>
|
||||
---
|
||||
arch/arm/boot/dts/rk3288-firefly.dtsi | 17 +++++++++++++++++
|
||||
1 file changed, 17 insertions(+)
|
||||
|
||||
diff --git a/arch/arm/boot/dts/rk3288-firefly.dtsi b/arch/arm/boot/dts/rk3288-firefly.dtsi
|
||||
index b9e6f3a9..9961acce 100644
|
||||
--- a/arch/arm/boot/dts/rk3288-firefly.dtsi
|
||||
+++ b/arch/arm/boot/dts/rk3288-firefly.dtsi
|
||||
@@ -606,6 +606,23 @@
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
+&vpu_mmu {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&vpu_service {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&hevc_mmu {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&hevc_service {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
&wdt {
|
||||
status = "okay";
|
||||
};
|
||||
+
|
||||
--
|
||||
2.14.1
|
||||
|
@@ -1,48 +0,0 @@
|
||||
From 4766516bcbf023813ad883c2d61c422316770d12 Mon Sep 17 00:00:00 2001
|
||||
From: Myy Miouyouyou <myy@miouyouyou.fr>
|
||||
Date: Tue, 21 Nov 2017 21:58:22 +0100
|
||||
Subject: [PATCH 5/5] ARM: DTSI: rk3288-veyron: Enable the Video encoding MMU
|
||||
and services
|
||||
|
||||
Enable the :
|
||||
* VPU MMU;
|
||||
* VPU Service;
|
||||
* HEVC MMU;
|
||||
* HEVC Service;
|
||||
for RK3288 Chromebook laptops.
|
||||
|
||||
Signed-off-by: Myy Miouyouyou <myy@miouyouyou.fr>
|
||||
---
|
||||
arch/arm/boot/dts/rk3288-veyron.dtsi | 16 ++++++++++++++++
|
||||
1 file changed, 16 insertions(+)
|
||||
|
||||
diff --git a/arch/arm/boot/dts/rk3288-veyron.dtsi b/arch/arm/boot/dts/rk3288-veyron.dtsi
|
||||
index 6e5bd897..517b9242 100644
|
||||
--- a/arch/arm/boot/dts/rk3288-veyron.dtsi
|
||||
+++ b/arch/arm/boot/dts/rk3288-veyron.dtsi
|
||||
@@ -450,6 +450,22 @@
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
+&vpu_mmu {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&vpu_service {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&hevc_mmu {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&hevc_service {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
&wdt {
|
||||
status = "okay";
|
||||
};
|
||||
--
|
||||
2.14.1
|
||||
|
@@ -1,19 +0,0 @@
|
||||
diff --git a/sound/usb/card.c b/sound/usb/card.c
|
||||
index 23d1d23..98610ae 100644
|
||||
--- a/sound/usb/card.c
|
||||
+++ b/sound/usb/card.c
|
||||
@@ -434,6 +434,14 @@ static int snd_usb_audio_create(struct usb_interface *intf,
|
||||
}
|
||||
strim(card->shortname);
|
||||
|
||||
+ /* Tinker Board ALC4040 CODEC */
|
||||
+
|
||||
+ if(USB_ID_VENDOR(chip->usb_id) == 0x0bda &&
|
||||
+ USB_ID_PRODUCT(chip->usb_id) == 0x481a) {
|
||||
+ strlcat(card->shortname, " OnBoard", sizeof(card->shortname));
|
||||
+ }
|
||||
+
|
||||
+
|
||||
/* retrieve the vendor and device strings as longname */
|
||||
if (quirk && quirk->vendor_name && *quirk->vendor_name) {
|
||||
len = strlcpy(card->longname, quirk->vendor_name, sizeof(card->longname));
|
@@ -1,30 +0,0 @@
|
||||
diff --git a/arch/arm/boot/dts/rk3288-tinker.dts b/arch/arm/boot/dts/rk3288-tinker.dts
|
||||
index 07b4af4..7755426 100644
|
||||
--- a/arch/arm/boot/dts/rk3288-tinker.dts
|
||||
+++ b/arch/arm/boot/dts/rk3288-tinker.dts
|
||||
@@ -162,7 +162,7 @@
|
||||
WIFI,host_wake_irq = <&gpio4 30 GPIO_ACTIVE_HIGH>;
|
||||
status = "okay";
|
||||
};
|
||||
-
|
||||
+/*
|
||||
wireless-bluetooth {
|
||||
compatible = "bluetooth-platdata";
|
||||
uart_rts_gpios = <&gpio4 19 GPIO_ACTIVE_LOW>;
|
||||
@@ -174,6 +174,7 @@
|
||||
BT,wake_host_irq = <&gpio4 31 GPIO_ACTIVE_HIGH>;
|
||||
status = "okay";
|
||||
};
|
||||
+*/
|
||||
|
||||
};
|
||||
|
||||
@@ -620,7 +621,7 @@
|
||||
&uart0 {
|
||||
status = "okay";
|
||||
pinctrl-names = "default";
|
||||
- pinctrl-0 = <&uart0_xfer>, <&uart0_cts>;
|
||||
+ pinctrl-0 = <&uart0_xfer>, <&uart0_cts>, <&uart0_rts>;
|
||||
};
|
||||
|
||||
&uart1 {
|
@@ -1,17 +0,0 @@
|
||||
diff --git a/arch/arm/boot/dts/rk3288-tinker.dts b/arch/arm/boot/dts/rk3288-tinker.dts
|
||||
index 925b277..33b198e 100644
|
||||
--- a/arch/arm/boot/dts/rk3288-tinker.dts
|
||||
+++ b/arch/arm/boot/dts/rk3288-tinker.dts
|
||||
@@ -100,6 +100,12 @@
|
||||
};
|
||||
};
|
||||
|
||||
+ rk3288-gpiomem {
|
||||
+ compatible = "rockchip,rk3288-gpiomem";
|
||||
+ reg = <0x0 0xff750000 0x0 0x1000>;
|
||||
+ status = "okay";
|
||||
+ };
|
||||
+
|
||||
sound {
|
||||
compatible = "simple-audio-card";
|
||||
simple-audio-card,format = "i2s";
|
@@ -1,8 +1,37 @@
|
||||
diff --git a/arch/arm/boot/dts/rk3288-tinker.dtsi b/arch/arm/boot/dts/rk3288-tinker.dtsi
|
||||
index e5b7ef1a5..f88c913ff 100644
|
||||
--- a/arch/arm/boot/dts/rk3288-tinker.dtsi
|
||||
+++ b/arch/arm/boot/dts/rk3288-tinker.dtsi
|
||||
@@ -544,3 +544,6 @@
|
||||
&wdt {
|
||||
status = "okay";
|
||||
};
|
||||
+&gpiomem {
|
||||
+ status = "okay";
|
||||
+};
|
||||
diff --git a/arch/arm/boot/dts/rk3288.dtsi b/arch/arm/boot/dts/rk3288.dtsi
|
||||
index f3ca55496..14bbcb192 100644
|
||||
--- a/arch/arm/boot/dts/rk3288.dtsi
|
||||
+++ b/arch/arm/boot/dts/rk3288.dtsi
|
||||
@@ -1418,6 +1418,12 @@
|
||||
interrupts = <GIC_PPI 9 0xf04>;
|
||||
};
|
||||
|
||||
+ gpiomem: rk3288-gpiomem@ff750000 {
|
||||
+ compatible = "rockchip,rk3288-gpiomem";
|
||||
+ reg = <0x0 0xff750000 0x0 0x1000>;
|
||||
+ status = "disabled";
|
||||
+ };
|
||||
+
|
||||
pinctrl: pinctrl {
|
||||
compatible = "rockchip,rk3288-pinctrl";
|
||||
rockchip,grf = <&grf>;
|
||||
|
||||
diff --git a/drivers/char/Kconfig b/drivers/char/Kconfig
|
||||
index c28dca0..d9df49d 100644
|
||||
index 3143db5..9c18b74 100644
|
||||
--- a/drivers/char/Kconfig
|
||||
+++ b/drivers/char/Kconfig
|
||||
@@ -6,6 +6,7 @@
|
||||
@@ -5,6 +5,7 @@
|
||||
menu "Character devices"
|
||||
|
||||
source "drivers/tty/Kconfig"
|
||||
@@ -11,18 +40,21 @@ index c28dca0..d9df49d 100644
|
||||
config DEVMEM
|
||||
bool "/dev/mem virtual device support"
|
||||
diff --git a/drivers/char/Makefile b/drivers/char/Makefile
|
||||
index 7dc3abe..5d43b1d 100644
|
||||
index d8a7579..290cb32 100644
|
||||
--- a/drivers/char/Makefile
|
||||
+++ b/drivers/char/Makefile
|
||||
@@ -60,3 +60,5 @@ js-rtc-y = rtc.o
|
||||
obj-$(CONFIG_TILE_SROM) += tile-srom.o
|
||||
@@ -51,6 +51,8 @@ obj-$(CONFIG_PS3_FLASH) += ps3flash.o
|
||||
obj-$(CONFIG_JS_RTC) += js-rtc.o
|
||||
js-rtc-y = rtc.o
|
||||
|
||||
+obj-$(CONFIG_ARCH_ROCKCHIP) += rockchip/
|
||||
+
|
||||
obj-$(CONFIG_XILLYBUS) += xillybus/
|
||||
obj-$(CONFIG_POWERNV_OP_PANEL) += powernv-op-panel.o
|
||||
+
|
||||
+obj-$(CONFIG_RK_CHAR_DRIVERS) += rockchip/
|
||||
obj-$(CONFIG_ADI) += adi.o
|
||||
diff --git a/drivers/char/rockchip/Kconfig b/drivers/char/rockchip/Kconfig
|
||||
new file mode 100644
|
||||
index 0000000..867d51e
|
||||
index 0000000..6e97486
|
||||
--- /dev/null
|
||||
+++ b/drivers/char/rockchip/Kconfig
|
||||
@@ -0,0 +1,16 @@
|
||||
@@ -42,19 +74,21 @@ index 0000000..867d51e
|
||||
+ Provides users with root-free access to the GPIO registers
|
||||
+ on the 3288. Calling mmap(/dev/gpiomem) will map the GPIO
|
||||
+ register page to the user's pointer.
|
||||
\ No newline at end of file
|
||||
diff --git a/drivers/char/rockchip/Makefile b/drivers/char/rockchip/Makefile
|
||||
new file mode 100644
|
||||
index 0000000..e7df7f2
|
||||
index 0000000..2287ec2
|
||||
--- /dev/null
|
||||
+++ b/drivers/char/rockchip/Makefile
|
||||
@@ -0,0 +1 @@
|
||||
+obj-$(CONFIG_RK3288_DEVGPIOMEM)+= rk3288-gpiomem.o
|
||||
\ No newline at end of file
|
||||
diff --git a/drivers/char/rockchip/rk3288-gpiomem.c b/drivers/char/rockchip/rk3288-gpiomem.c
|
||||
new file mode 100644
|
||||
index 0000000..c289041
|
||||
index 0000000..984471c
|
||||
--- /dev/null
|
||||
+++ b/drivers/char/rockchip/rk3288-gpiomem.c
|
||||
@@ -0,0 +1,307 @@
|
||||
@@ -0,0 +1,303 @@
|
||||
+/**
|
||||
+ * GPIO memory device driver
|
||||
+ *
|
||||
@@ -96,10 +130,6 @@ index 0000000..c289041
|
||||
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
+ */
|
||||
+
|
||||
+/*
|
||||
+ * Ported to rk3288 from Jörg Wolff, 2017
|
||||
+ */
|
||||
+
|
||||
+#include <linux/kernel.h>
|
||||
+#include <linux/module.h>
|
||||
+#include <linux/of.h>
|
||||
@@ -231,7 +261,7 @@ index 0000000..c289041
|
||||
+
|
||||
+static int rk3288_gpiomem_dev_uevent(struct device *dev, struct kobj_uevent_env *env)
|
||||
+{
|
||||
+ add_uevent_var(env, "DEVMODE=%#o", 0660);
|
||||
+ add_uevent_var(env, "DEVMODE=%#o", 0666);
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
@@ -362,3 +392,4 @@ index 0000000..c289041
|
||||
+MODULE_LICENSE("GPL");
|
||||
+MODULE_DESCRIPTION("gpiomem driver for accessing GPIO from userspace");
|
||||
+MODULE_AUTHOR("Luke Wren <luke@raspberrypi.org>");
|
||||
\ No newline at end of file
|
||||
|
@@ -0,0 +1,19 @@
|
||||
diff --git a/sound/usb/card.c b/sound/usb/card.c
|
||||
index 2bfe4e80a..cea93aaf5 100644
|
||||
--- a/sound/usb/card.c
|
||||
+++ b/sound/usb/card.c
|
||||
@@ -382,6 +382,14 @@ static void usb_audio_make_shortname(struct usb_device *dev,
|
||||
}
|
||||
|
||||
strim(card->shortname);
|
||||
+
|
||||
+ /* Tinker Board ALC4040 CODEC */
|
||||
+
|
||||
+ if(USB_ID_VENDOR(chip->usb_id) == 0x0bda &&
|
||||
+ USB_ID_PRODUCT(chip->usb_id) == 0x481a) {
|
||||
+ strlcat(card->shortname, " OnBoard", sizeof(card->shortname));
|
||||
+ }
|
||||
+
|
||||
}
|
||||
|
||||
static void usb_audio_make_longname(struct usb_device *dev,
|
@@ -1,122 +0,0 @@
|
||||
diff --git a/arch/arm/boot/dts/rk3288-tinker.dts b/arch/arm/boot/dts/rk3288-tinker.dts
|
||||
index 07b4af4..f71fa24
|
||||
--- a/arch/arm/boot/dts/rk3288-tinker.dts
|
||||
+++ b/arch/arm/boot/dts/rk3288-tinker.dts
|
||||
@@ -175,10 +175,83 @@
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
+ cpu0_opp_table: opp_table {
|
||||
+ compatible = "operating-points-v2";
|
||||
+ opp-shared;
|
||||
+
|
||||
+ opp@600000000 {
|
||||
+ opp-hz = /bits/ 64 <600000000>;
|
||||
+ opp-microvolt = <900000>;
|
||||
+ };
|
||||
+ opp@816000000 {
|
||||
+ opp-hz = /bits/ 64 <816000000>;
|
||||
+ opp-microvolt = <1000000>;
|
||||
+ };
|
||||
+ opp@1008000000 {
|
||||
+ opp-hz = /bits/ 64 <1008000000>;
|
||||
+ opp-microvolt = <1050000>;
|
||||
+ };
|
||||
+ opp@1200000000 {
|
||||
+ opp-hz = /bits/ 64 <1200000000>;
|
||||
+ opp-microvolt = <1100000>;
|
||||
+ };
|
||||
+ opp@1416000000 {
|
||||
+ opp-hz = /bits/ 64 <1416000000>;
|
||||
+ opp-microvolt = <1200000>;
|
||||
+ };
|
||||
+ opp@1512000000 {
|
||||
+ opp-hz = /bits/ 64 <1512000000>;
|
||||
+ opp-microvolt = <1250000>;
|
||||
+ };
|
||||
+ opp@1608000000 {
|
||||
+ opp-hz = /bits/ 64 <1608000000>;
|
||||
+ opp-microvolt = <1300000>;
|
||||
+ };
|
||||
+ opp@1704000000 {
|
||||
+ opp-hz = /bits/ 64 <1704000000>;
|
||||
+ opp-microvolt = <1350000>;
|
||||
+ };
|
||||
+ opp@1800000000 {
|
||||
+ opp-hz = /bits/ 64 <1800000000>;
|
||||
+ opp-microvolt = <1400000>;
|
||||
+ };
|
||||
+ /* boot-only frequencies below */
|
||||
+ opp@1896000000 {
|
||||
+ opp-hz = /bits/ 64 <1896000000>;
|
||||
+ opp-microvolt = <1425000>;
|
||||
+ turbo-mode;
|
||||
+ };
|
||||
+ opp@1920000000 {
|
||||
+ opp-hz = /bits/ 64 <1920000000>;
|
||||
+ opp-microvolt = <1425000>;
|
||||
+ turbo-mode;
|
||||
+ };
|
||||
+ opp@1992000000 {
|
||||
+ opp-hz = /bits/ 64 <1992000000>;
|
||||
+ opp-microvolt = <1450000>;
|
||||
+ turbo-mode;
|
||||
+ };
|
||||
+ opp@2016000000 {
|
||||
+ opp-hz = /bits/ 64 <2016000000>;
|
||||
+ opp-microvolt = <1475000>;
|
||||
+ turbo-mode;
|
||||
+ };
|
||||
+ opp@2040000000 {
|
||||
+ opp-hz = /bits/ 64 <2040000000>;
|
||||
+ opp-microvolt = <1475000>;
|
||||
+ turbo-mode;
|
||||
+ };
|
||||
+ opp@2064000000 {
|
||||
+ opp-hz = /bits/ 64 <2064000000>;
|
||||
+ opp-microvolt = <1475000>;
|
||||
+ turbo-mode;
|
||||
+ };
|
||||
+ };
|
||||
};
|
||||
|
||||
&cpu0 {
|
||||
cpu0-supply = <&vdd_cpu>;
|
||||
+ operating-points-v2 = <&cpu0_opp_table>;
|
||||
};
|
||||
|
||||
&gmac {
|
||||
@@ -345,8 +345,8 @@
|
||||
vdd_cpu: DCDC_REG1 {
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
- regulator-min-microvolt = <750000>;
|
||||
- regulator-max-microvolt = <1350000>;
|
||||
+ regulator-min-microvolt = <712500>;
|
||||
+ regulator-max-microvolt = <1500000>;
|
||||
regulator-name = "vdd_arm";
|
||||
regulator-ramp-delay = <6000>;
|
||||
regulator-state-mem {
|
||||
@@ -357,8 +357,8 @@
|
||||
vdd_gpu: DCDC_REG2 {
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
- regulator-min-microvolt = <850000>;
|
||||
- regulator-max-microvolt = <1250000>;
|
||||
+ regulator-min-microvolt = <712500>;
|
||||
+ regulator-max-microvolt = <1500000>;
|
||||
regulator-name = "vdd_gpu";
|
||||
regulator-ramp-delay = <6000>;
|
||||
regulator-state-mem {
|
||||
@@ -652,6 +755,11 @@
|
||||
};
|
||||
|
||||
&usb_otg {
|
||||
+ /*
|
||||
+ * The otg controller is the only system power source,
|
||||
+ * so needs to always stay in device mode.
|
||||
+ */
|
||||
+ dr_mode = "peripheral";
|
||||
status= "okay";
|
||||
};
|
||||
|
@@ -1,13 +0,0 @@
|
||||
diff --git a/sound/soc/rockchip/rk3288_hdmi_analog.c b/sound/soc/rockchip/rk3288_hdmi_analog.c
|
||||
index fa44e3901336..929b3fe289b0 100644
|
||||
--- a/sound/soc/rockchip/rk3288_hdmi_analog.c
|
||||
+++ b/sound/soc/rockchip/rk3288_hdmi_analog.c
|
||||
@@ -155,7 +155,7 @@ static struct snd_soc_dai_link_component rk_codecs[] = {
|
||||
{ },
|
||||
{
|
||||
.name = "hdmi-audio-codec.2.auto",
|
||||
- .dai_name = "hdmi-hifi.0",
|
||||
+ .dai_name = "i2s-hifi",
|
||||
},
|
||||
};
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user