Compare commits

..

616 Commits
0.5 ... rel-4

Author SHA1 Message Date
Stefan Agner
f9475a54e7 Linux: Update kernel 5.4.82 (#1069) 2020-12-08 17:24:12 +01:00
Stefan Agner
e6843b2fce Cap eMMC frequency to 24MHz in U-Boot for ODROID-N2(+) (#1068)
* Revert "Fix boot from 128GB Micron eMMC on ODROID-N2(+) (#1064)"

This reverts commit b4f2208363.

* Cap eMMC frequency to 24MHz in U-Boot for ODROID-N2(+) as well
2020-12-08 17:24:00 +01:00
Stefan Agner
a619faf6c6 Bump version to 4.20 2020-12-07 22:32:11 +01:00
Stefan Agner
b4f2208363 Fix boot from 128GB Micron eMMC on ODROID-N2(+) (#1064) 2020-12-07 22:30:32 +01:00
Pascal Vizeli
64e12437c5 Change release build order for REL-4 (#1065) 2020-12-07 22:17:59 +01:00
Stefan Agner
ba5c46b822 Bump version to 4.19 2020-12-02 22:08:15 +01:00
Stefan Agner
032eda4b59 Linux: Update kernel 5.4.81 (#1049) 2020-12-02 21:59:37 +01:00
Stefan Agner
3d3f657fda Fix boot script issue on Tinker Board (S) (#1043) (#1044) 2020-12-02 21:49:03 +01:00
Stefan Agner
ee71753836 Fix ethernet link not comming up on ODROID-C2 (#1038, #1039, #1042)
Use the latest patches from the mailing list to fix Ethernet on
ODROID-C2/N2(+).
2020-12-01 14:58:42 +01:00
Stefan Agner
ea47d13dfd Fix boot script issues (#1024) (#1026)
The change "Avoid trying to boot non-existing kernel image in failover
case" introduced a broken boot script on Raspberry Pi (when booting from
partition B) and ODROID-XU4.
2020-12-01 14:55:45 +01:00
Stefan Agner
ca30c0c338 Linux: Update kernel 5.4.80 (#1019) 2020-11-25 17:59:38 +01:00
Stefan Agner
635e648a0a Avoid trying to boot non-existing kernel image in failover case (#1016)
* Avoid trying to boot non-existing kernel image in fail-over case

The A/B update system automatically switches to the other boot slot when
booting fails. However, in a fresh installation, only boot slot A
exists. If booting fails three times (e.g. if somebody plugs out power
before the slot can be marked as good), then the system switches to boot
slot B which does not contain a kernel image yet. Avoid trying to boot
the non-existing kernel image.

With this change, if slot B is empty U-Boot will restore both slots to 3
attempts and retry booting from slot A on next reboot:

```
Trying to boot slot B, 2 attempts remaining. Loading kernel ...
** Unrecognized filesystem type **
No valid slot found, resetting tries to 3
storing env...
```

Co-authored-by: Pascal Vizeli <pascal.vizeli@syshack.ch>
2020-11-25 10:57:30 +01:00
Stefan Agner
cf49bda43a Load loop module before starting the container (#824)
This makes sure that the kernel module loop is loaded, the loop devices
under /dev have been created before the container starts. Docker uses
the current /dev as template for the container /dev. If the loop entries
are missing, loop devices can't be used inside the container. Use
losetup which does not make assumption weather loop support is built-in.

This fixes issues seen on my machine when entering the build environment
the first time after build:
  mount: /mnt/data: failed to setup loop device for /export/data.ext4.
  make[2]: *** [package/pkg-generic.mk:364: /build/buildroot/output_rpi4/build/hassio-1.0.0/.stamp_target_installed] Error 32
2020-11-25 10:55:44 +01:00
Stefan Agner
3f1223e4b4 ODROID: disable USB enumeration (#1015)
* Fix N2+ boot by disabling USB enumeration

On some devices USB enumeration in U-Boot seems to freeze:
starting USB...
Bus usb@ff500000: Register 3000140 NbrPorts 3
Starting the controller
USB XHCI 1.10
scanning bus usb@ff500000 for devices... <freeze>

We don't use USB currenty in the U-Boot script, disable it for now.

* Disable USB enumeration on all ODROID devices
2020-11-23 11:39:46 +01:00
Stefan Agner
8e8b0c6231 Add on-board RTC support for ODROID-N2+ (#999)
Make the NXP PCF8563TS on-board RTC the primary RTC of the system.
2020-11-23 11:39:33 +01:00
Stefan Agner
076f8ad8d1 Fix wireguard-linux-compat for latest stable kernels (#991) 2020-11-14 19:50:04 +01:00
Stefan Agner
62c3dade5a Bump version to 4.17 2020-11-13 15:52:54 +01:00
Stefan Agner
07c77a6d57 Linux: Update kernel 5.4.77 (#989) 2020-11-13 15:44:35 +01:00
Stefan Agner
482f6b6439 Drop services we don't offer (#988)
Stop announcing services using DNS-SD we don't offer.
2020-11-13 15:27:36 +01:00
Stefan Agner
de7d88e1b5 Use performance governor to avoid frequency scaling (#973)
After running HAOS on my ODROID N2+ several hours I see freezes and
sometimes stack traces which point to a problem in CPU frequency
scaling. This crash seems not to appear on Hardkernel's 18.04 Ubuntu
stable release. However, Hardkernel's Ubuntu uses the performance
governor. Use the performance governor as well to avoid crashes on N2+.
2020-11-13 15:26:57 +01:00
Stefan Agner
60b6d064b2 Bump version to 4.16 2020-11-06 13:17:16 +01:00
Stefan Agner
ca07152290 Linux: Update kernel 5.4.75 (#964) 2020-11-06 13:10:06 +01:00
Stefan Agner
34cf81b2e1 Update ODROID-N2 binary blobs to those built with latest U-Boot (#961) 2020-11-06 10:57:22 +01:00
Stefan Agner
9599917773 Update ODROID N2 U-Boot reference to get latest DDR timings (#958)
The DDR timings are taken direclty from the checked out hardkernel
U-Boot tree. Make sure to use the lastest hash to get the latest timing
changes.
2020-11-06 10:57:22 +01:00
Stefan Agner
b05fed4bad Add machine specific landingpage container at build time (#949)
The landingpage container is a minimal webserver with built-in zeroconf
annoucement. Preinstall the machine specific landingpage container to
make sure it will show up right after startup.
2020-11-06 10:56:58 +01:00
Pascal Vizeli
e43d4cd632 Update buildroot to 2020.02.7 (#923)
Signed-off-by: Pascal Vizeli <pvizeli@syshack.ch>
2020-11-06 10:56:27 +01:00
Stefan Agner
f9c29ef209 Fix CDC ACM error recovery in Raspberry Pi kernels as well (#940) (#962)
Backport fixes for CDC ACM error recovery path.
2020-11-06 10:10:58 +01:00
Stefan Agner
743c770326 Use upstream ODROID N2+ support and CDC ACM cooldown fix (#948)
* Use latest ODROID-N2+ patches (partial #929)

Use the queued patches (and fixes) for upstream ODROID-N2+ support.
This uses the clock settings from meson-g12b-a311d.dtsi running the
CPUs at the following clocks:
- 4xA73@2.2GHz
- 2xA53@1.8GHz

* Actually fix CDC ACM error recovery path (#921)

Remove the revert of the cool-down patch and add the actual fix for
the CDC ACM error recovery path.
2020-11-02 10:55:31 +01:00
Stefan Agner
4cecfaac18 Bump firmware to RPi bluez-firmware 1.2-4+rpt6 release (#918)
This addresses recent Bluetooth secruity vulnerabilities.
2020-10-20 23:10:57 +02:00
Pascal Vizeli
69d2f633c5 RaspberryPI: Fix issue with correct SYMLINK with ttyAMA (#915) 2020-10-20 19:10:07 +02:00
Stefan Agner
aa752d7e87 Bump version to 4.15 2020-10-17 16:57:03 +02:00
Stefan Agner
d59f59769c Linux: Update kernel 5.4.72 (#907) 2020-10-17 14:48:51 +02:00
Stefan Agner
24307c6302 Fix CDC ACM error recovery path (#712) (#905)
Revert CDC ACM cool-down patch. This should fix the error recovery paths
in the CDC ACM driver and allow CDC ACM devices to continue working even
in the event of USB issues.
2020-10-17 14:31:58 +02:00
Aman Gupta Karmani
33b08f6dc0 Fix systemd-time-wait-sync getting stuck with upstream patches (#897) 2020-10-17 14:31:36 +02:00
Aman Gupta Karmani
8d66357370 Fix var-lib-NetworkManager.mount dependencies (#895) 2020-10-17 14:30:49 +02:00
Stefan Agner
d6d3097111 Bump version to 4.14 2020-10-06 21:13:44 +02:00
Stefan Agner
915f5464c0 Linux: Update kernel 5.4.69 (#887) 2020-10-06 12:16:08 +02:00
Stefan Agner
0db7013427 Drop UART write retry patch from U-Boot (#873)
The patch causes U-Boot freezes in some configurations. The root cause
is that U-Boot does not allow to use the bss section in pre-relocation
code (which is where the UART is used). Drop the patch as it is not
required currently.

See also:
http://u-boot.10912.n7.nabble.com/RPi4-U-Boot-freeze-td424432.html#a427198
2020-10-05 22:20:59 +02:00
Pascal Vizeli
75b09cc42e Add observer plugin (#864) 2020-10-05 22:20:42 +02:00
Stefan Agner
269e97cd1c Make sure udev rule only applies to first PL011 UART (#778) (#862)
The to symlink serial0/1 currently might apply to the first or second
ttyAMAX instance. In downstream, a patch makes sure that the first
PL011 is always ttyAMA0. However, upstream the numbering depends on the
UART alias, which leads to the first PL011 being ttyAMA1.

Check the actual iobase too to make sure we are dealing with the first
PL011 instance.

See also:
05cfe136f7 (diff-2678c183f503319c8d8c09c818af789a)
2020-10-05 22:20:31 +02:00
Stefan Agner
5c2408c023 Resize serial terminal on login (#860) (#863)
The new readline utilty used by the CLI add-on requires the size of the
terminal to be set. Use the resize command to initialize terminal size
on login if we are running on a serial terminal.
2020-10-05 22:20:25 +02:00
Pascal Vizeli
5fdcf8b218 Bump version to 4.13 2020-09-07 09:29:57 +00:00
Pascal Vizeli
e369da7f5e Make getty for serial/tty same (#850)
* Make getty for serial/tty same

* adjust log output
2020-09-07 09:08:30 +00:00
Pascal Vizeli
d72e038506 Linux: Update kernel 5.4.63 / 5.7.13 (#849)
* Odroid: Update kernel 5.7.19

* Linux: Update kernel 5.4.63
2020-09-07 09:08:09 +00:00
Stefan Agner
158ec0c3c2 Do not attempt to resize on every boot (#843) (#848)
The hassos-expand script calls sfdisk to find free disk space. It seems
that today it considers the space before the first partition as free:
$ sudo sfdisk -Fq /dev/sdi
Start   End Sectors Size
 2048 16383   14336   7M

This causes the script to always resize. It seems not to cause harm to
the partition table (it does not resize really). However, the call to
partx seems to confuse systemd and kill the mnt-data.mount process
(presumably because udev causes remove/add events for the by-label
device units).

Consider everything below 8MiB to not be worthy of a size change. This
avoids missdetection and resize attempts where there is no need.
2020-09-07 09:07:58 +00:00
Stefan Agner
2e378fd0dd Align all partitions to 1MiB boundary (#808)
Aligning partitions (and hence file system structures) to higher level
then 512 byte sectors is common practise and highly recommended for flash
backed block devices. It makes sure that the underlaying flash translation
layer (FTL) does not amplify writes due to missalignment of its erase
block size. Use a 1MiB boundary which is what a modern fdisk is doing.

Before this change:

 # fdisk /dev/mmcblk0

Welcome to fdisk (util-linux 2.35.1).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.

Command (m for help): p
Disk /dev/mmcblk0: 14.57 GiB, 15634268160 bytes, 30535680 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x48617373

Device         Boot   Start      End  Sectors  Size Id Type
/dev/mmcblk0p1 *      16384    65537    49154   24M  c W95 FAT32 (LBA)
/dev/mmcblk0p2        65539  1228814  1163276  568M  5 Extended
/dev/mmcblk0p3      1228816  1425425   196610   96M 83 Linux
/dev/mmcblk0p4      1425427 30535679 29110253 13.9G 83 Linux
/dev/mmcblk0p5        65540   114693    49154   24M 83 Linux
/dev/mmcblk0p6       114695   638984   524290  256M 83 Linux
/dev/mmcblk0p7       638986   688139    49154   24M 83 Linux
/dev/mmcblk0p8       688141  1212430   524290  256M 83 Linux
/dev/mmcblk0p9      1212432  1228814    16383    8M 83 Linux

After this change:

 # fdisk /dev/mmcblk0

Welcome to fdisk (util-linux 2.35.1).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.

Command (m for help): p
Disk /dev/mmcblk0: 14.57 GiB, 15634268160 bytes, 30535680 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x48617373

Device         Boot   Start      End  Sectors  Size Id Type
/dev/mmcblk0p1 *      16384    65535    49152   24M  c W95 FAT32 (LBA)
/dev/mmcblk0p2        65536  1239039  1173504  573M  5 Extended
/dev/mmcblk0p3      1241088  1437695   196608   96M 83 Linux
/dev/mmcblk0p4      1439744 30535679 29095936 13.9G 83 Linux
/dev/mmcblk0p5        67584   116735    49152   24M 83 Linux
/dev/mmcblk0p6       118784   643071   524288  256M 83 Linux
/dev/mmcblk0p7       645120   694271    49152   24M 83 Linux
/dev/mmcblk0p8       696320  1220607   524288  256M 83 Linux
/dev/mmcblk0p9      1222656  1239039    16384    8M 83 Linux

See also:
https://unix.stackexchange.com/questions/248939/how-to-achieve-optimal-alignment-for-emmc-partition
http://3gfp.com/wp/2014/07/formatting-sd-cards-for-speed-and-lifetime/
2020-09-07 09:07:40 +00:00
Stefan Agner
4873cc649e Load socinfo only once (#838)
Remove code duplication and make sure to load socinfo only once. Also
set board_rev before MAC address to make sure board_rev is set even if
loading MAC address from efuses fails.
2020-09-07 09:07:28 +00:00
Stefan Agner
9824cff052 Fix ODROID-N2(+) SD card boot (#835) (#836) 2020-09-07 09:07:06 +00:00
Stefan Agner
b72d175754 RPi4 fix WiFi with 802.11r fast roaming enabled (#733) (#830)
Add brcmfmac patch which adds 802.11r fast roaming support.
2020-09-07 09:06:52 +00:00
Pascal Vizeli
230f95761f N2: fix possible issue with end up in not working device (#818) 2020-09-07 09:06:12 +00:00
Pascal Vizeli
1976d6bb8a Fix RPi4 with buildroot v2020.02.4 (#815) 2020-08-07 10:51:10 +00:00
Stefan Agner
99ad9600ca Do not break device tree changes made by audio patches (#807) 2020-08-07 07:32:03 +00:00
Pascal Vizeli
b1a51fd3e7 Add support for USB wifi (#813)
Signed-off-by: Pascal Vizeli <pvizeli@syshack.ch>
2020-08-06 19:24:39 +00:00
Pascal Vizeli
397e0d0ed1 Kernel 5.4.56 / Odroid 5.7.13 (#812)
* Linux: Update kernel 5.4.56

* Odroid: Update kernel 5.7.13
2020-08-06 19:24:30 +00:00
Pascal Vizeli
7f6f15647a Update buildroot v2020.02.4 (#811)
* Update buildroot to 2020.02.4

Signed-off-by: Pascal Vizeli <pvizeli@syshack.ch>

* fix patches

Signed-off-by: Pascal Vizeli <pvizeli@syshack.ch>
2020-08-06 19:24:20 +00:00
Pascal Vizeli
2acaa52cb4 Improve the compatibility (#810)
* Improve the compatibility

* small style fix
2020-08-06 19:24:12 +00:00
Pascal Vizeli
2daa519c25 Update rauc 1.4 to fix mounted boot partition issue (#809)
* Update rauc 1.4 to fix mounted boot partition issue

* applay update

* fix characters

* fix CI

* Support old format

* fix mcopy prefix

* fix lint

* fix lint

* clean style

* Fix script

* fix syntax

* Support all system

* fix shell

* Fix script
2020-08-06 19:24:01 +00:00
Stefan Agner
d893c2e7b9 hardkernel: Fix build warning when building U-Boot (#806)
Drop const since we actually modify the buffer in meson_get_soc_rev
2020-08-06 19:23:50 +00:00
Pascal Vizeli
311e183ce1 Fix amlogic patch for soc rev (#804) 2020-08-04 14:48:02 +00:00
Pascal Vizeli
5881c90e04 Update kernel mainline 5.4.55 / Odroid 5.7.12 (#803)
* Odroid: Update kernel 5.7.12

* Linux: Update kernel 5.4.55

* Fix patch
2020-08-03 20:59:17 +00:00
Pascal Vizeli
70f090078e Bump version to 4.12 2020-08-03 14:45:09 +00:00
Adam Griffiths
a2accd3129 Documentation (#769)
* spelling correction

* Restuctured, added "features", "supported hardware", intro for developers and links to the developer documentation.

* Spelling correction

* URL correction

* Documentation restructure

* Moving developer documentation index from top level README to Documentation directory README

* fixing URLS

* Restructuring and adding to board config

* Improving navigation of docs oon github

* New line after first heading

(https://github.com/home-assistant/operating-system/pull/768#discussion_r453336692)

Co-authored-by: Franck Nijhof <frenck@frenck.nl>

* Update README.md

https://github.com/home-assistant/operating-system/pull/768#discussion_r453336871

Co-authored-by: Franck Nijhof <frenck@frenck.nl>

* Update README.md

(https://github.com/home-assistant/operating-system/pull/768#discussion_r453336999)
- Surround headings with newlines
- ODROID
- Use dashes for unordered lists

Co-authored-by: Franck Nijhof <frenck@frenck.nl>

* Update README.md

- new line after heading
(https://github.com/home-assistant/operating-system/pull/768#discussion_r453337043)

Co-authored-by: Franck Nijhof <frenck@frenck.nl>

* Update README.md

- \- for unordered lists
- new line after heading
(https://github.com/home-assistant/operating-system/pull/768#discussion_r453337101)

Co-authored-by: Franck Nijhof <frenck@frenck.nl>

* Update README.md

- new line after heading
- \- for unordered lists
(https://github.com/home-assistant/operating-system/pull/768#discussion_r453337183)

Co-authored-by: Franck Nijhof <frenck@frenck.nl>

* Spelling correction, to ensure /Dpcumentation/kernel.mdhas the correct spelling

* capitalisation

* using - for unordered lists

* Adding links to config files

* fixing links to _defconfig files

* fixing link for rpi0_w

* fixing link for rpi3_64 and rpi4_64

* making the ova README consistent with the others

* formmating

* fixing numbered list

* fixing indent for sub-bullets

* questions regarding Tinker S and OVA support

* resolving PR comment from fabaff

* resolving PR comment from fabaff

* https://github.com/home-assistant/operating-system/pull/769\#discussion_r456774209

* Changing uBoot to U-Boot (https://github.com/home-assistant/operating-system/pull/769#discussion_r456774290)

* s/boot sector/eMMC boot partition/ (See https://github.com/home-assistant/operating-system/pull/769#discussion_r456774329)

* As per comments here:
https://github.com/home-assistant/operating-system/pull/769#discussion_r456791491
https://github.com/home-assistant/operating-system/pull/769#discussion_r456791580

* HassOS is no longer the official name (https://github.com/home-assistant/operating-system/pull/769#discussion_r456791863)

* Should be Home Assistant Operating System (or OS) (see https://community.home-assistant.io/t/changing-the-home-assistant-brand/167500/16). See also commennts here https://github.com/home-assistant/operating-system/pull/769#discussion_r456793030, taken in to account along with previous comments about this paragraph.

* s/HassOS/Home Assistant Operating System/

* 8Gb Pi 4 will be supported soon (see comment https://github.com/home-assistant/operating-system/pull/769#discussion_r459768349)

* resolving conflict with main dev branch.

Co-authored-by: Franck Nijhof <frenck@frenck.nl>
Co-authored-by: Pascal Vizeli <pvizeli@syshack.ch>
2020-08-03 14:44:32 +00:00
Simon Opelt
3316967f87 Add NUC (10) support info (#766) 2020-08-03 14:44:29 +00:00
Pascal Vizeli
0e1727aa58 Add support for snapshots/restore on OS level (#801) 2020-08-03 14:43:26 +00:00
Pascal Vizeli
654edc5a94 Change VM naming handling (#794) 2020-08-03 14:43:07 +00:00
Stefan Agner
335bf2d909 Add ODROID-N2+ support (#793)
* Add ODROID-N2+ support

Add ODROID-N2+ support with the new SoC revision c. Extend the U-Boot
script: Assume ODROID-N2 if the SoC revision is "a" (there are only "a"
revision SoCs on ODROID N2) and assume N2+ otherwise.

Currently using overclock mode as proposed in the upstream kernel patches.

* Update hassos-hook.sh

Co-authored-by: Pascal Vizeli <pascal.vizeli@syshack.ch>
2020-08-03 14:42:57 +00:00
Pascal Vizeli
cbf4a5cf27 Show board info on startup & Cleanup unused functionality (#784)
* Show board info on startup & Cleanup unused functionality

* Add patch for get env

* move patch
2020-08-03 14:42:41 +00:00
Pascal Vizeli
cd5fe135c2 RaspberryPi: Update kernel 4.19.127 - cc39f1c9f82f6fe5a437836811d906c709e0661c 2020-08-03 14:42:21 +00:00
Pascal Vizeli
adb00e56a0 Linux: Update kernel 5.4.53 2020-08-03 14:42:08 +00:00
Pascal Vizeli
c6adf07603 Cleanup boot files & Kenrel 5.7.10 (#782)
* Odroid: Update kernel 5.7.10

* Cleanup boot files

* Fix patches
2020-08-03 14:41:54 +00:00
Pascal Vizeli
aa3fc4766d Fix linter 2020-08-03 14:40:32 +00:00
Pascal Vizeli
eca61d10a7 Add update script (#780) 2020-08-03 14:40:24 +00:00
Simon Opelt
b9ba103e07 add out-of-tree intel e1000e ethernet module (#765)
* add intel-e1000e net module for nuc (e.g. i219v)

* disable mainline E1000E

* fix hash case

* add e1000e module make opts

* add missing newline

* remove redundant MD5

* Update intel-e1000e.hash

Co-authored-by: Pascal Vizeli <pascal.vizeli@syshack.ch>
2020-08-03 14:39:49 +00:00
Pascal Vizeli
9bbe4509c6 Fix tinker for 5.4.50 (#764) 2020-07-04 22:18:13 +00:00
Pascal Vizeli
c751537fb7 Revert DTS rpi4 2020-07-03 07:39:14 +00:00
Pascal Vizeli
05c6e627e8 cleanup patch 2020-07-02 13:23:24 +00:00
Pascal Vizeli
561e73a4e9 Fix patch for 5.4.50 (#758) 2020-07-02 13:23:21 +00:00
Pascal Vizeli
276d14fb7d Bump version 4.11 2020-07-02 09:52:57 +00:00
Pascal Vizeli
ae7b0dce54 Update kernel 20200702 (#757)
* Odroid: Update kernel 5.7.7

* Linux: Update kernel 5.4.50

* RaspberryPi: Update kernel 4.19.127 - a03605b08ae73107100c72dc92c92adf0dde3e42

* Fix script

* Add bcm2711-rpi-cm4
2020-07-02 09:45:57 +00:00
Pascal Vizeli
685530f9e1 Kernel improvments for Amlogic / Odroid (#747)
* Kernel improvments for Amlogic / Odroid

* Odroid: Update kernel 5.7.4

* Fix script

* include audio into kernel
2020-07-02 09:45:49 +00:00
thecode
00723f2115 Add condition to run QEMU guest agent for QEMU hypervisor (#752)
The proposed changed is to run the qemu guest agent for QEMU hypervisor. QEMU hypervisor and KVM hypervisor are using the same guest agent.
systemd allow detecting the difference between the two hypervisors. The change is using OR trigger, meaning it will trigger if one of the "ConditionVirtualization" rules is true.
2020-07-02 09:45:38 +00:00
Pascal Vizeli
5e5aaa21fd Fix jitters during first update/boot (#742)
* Fix jitters during first update/boot

* Address comments

* fix lint
2020-06-15 12:55:53 +00:00
Pascal Vizeli
9c554805b9 Fix version json name if image is missing (#741)
* Fix version json name if image is missing

* Update hassos-supervisor
2020-06-15 12:55:40 +00:00
Franck Nijhof
34fffa63f1 Fix missing wmv namespace in ovf definition (#732) 2020-06-08 19:55:33 +00:00
Pascal Vizeli
600eb5e208 Bump version 4.10 2020-06-06 22:57:43 +00:00
Pascal Vizeli
43797b2316 Bump wireguard linux compat for RPi kernel 2020-06-06 22:56:54 +00:00
Pascal Vizeli
c32e8be826 Make odroid upstream again (#724)
* Make odroid upstream again

* Fix question

* Linux 5.7

Signed-off-by: Pascal Vizeli <pvizeli@syshack.ch>

* Add patch

* Add DT sound

* fix build

* Fix kernel options

* working audio
2020-06-06 11:11:26 +00:00
Franck Nijhof
09e7757300 Improve self healing capabilities of Supervisor service (#726)
* Improve self healing capabilities of Supervisor service

* Fixes shellcheck linter warnings
2020-06-06 11:11:13 +00:00
Franck Nijhof
72725fd386 Fix Supervisor container name reference in hassos-supervisor service (#727) 2020-06-06 11:11:01 +00:00
Pascal Vizeli
367acbd884 RaspberryPi move back to 4.19 Kernel (#723)
* RaspberryPi: Update kernel 4.19.126 - f6b3ac28f0a9137d4c24c0b8832e693bbd16f5b7

* RaspberryPi: Update firmware 7caead9416f64b2d33361c703fb243b8e157eba4

* Remove kernel for 5.4
2020-06-06 11:10:49 +00:00
Pascal Vizeli
4413c6de74 Use odroid defconfig for XU4 (#690) 2020-06-06 11:10:34 +00:00
Pascal Vizeli
ea841dc751 Bump version 4.9 2020-06-03 11:39:17 +00:00
Pascal Vizeli
384fdabbfd Update kernel Upstream/RPi (#708)
* Linux: Update kernel 5.4.44

* RaspberryPi: Update kernel 5.4.42 - 3d1e5203531fd1791762f018538e670bf10f722c

* RaspberryPi: Update firmware f382cc150445b3ef07de941e4877a5890d665aa7
2020-06-03 11:37:20 +00:00
Pascal Vizeli
d56553c3da Add emergency Console (#705)
* Add emergency Console

* fix lint
2020-06-02 21:34:55 +00:00
Pascal Vizeli
ae853f2b28 Fix RPi4 uart 2-5 (#706) 2020-06-02 21:34:45 +00:00
Pascal Vizeli
2a9df42e50 Fix issue with RPi2 armhf / armv7 2020-06-02 20:38:49 +00:00
Sergey Avdeev
252067ed2f Update home-assistant.ovf (#696) 2020-06-02 20:38:29 +00:00
Pascal Vizeli
426156dc29 Bump version 4.8 2020-05-27 20:24:39 +00:00
Pascal Vizeli
1190f89571 RaspberryPi: Update firmware 62fc8c01165a80021054a430182b504f7b877c2d 2020-05-27 20:23:36 +00:00
Pascal Vizeli
0174732265 RaspberryPi: Update kernel 5.4.42 - 5e5024f643caa53ff59a6e00f40a9b55f7fc4e17 2020-05-27 20:23:27 +00:00
Pascal Vizeli
d4542ceb1e Linux: Update kernel 5.4.43 2020-05-27 20:18:14 +00:00
Pascal Vizeli
0b2eea1abd Fix issue with mbr partition remove on MBR (#694) 2020-05-27 14:32:55 +00:00
Pascal Vizeli
e67efbb118 Fix issue with Odroid-N2 on USB (#693) 2020-05-27 14:32:34 +00:00
Pascal Vizeli
04e721b36f Fix build issues with gcc (#685)
* Fix build issues with gcc

* fix qemu
2020-05-26 06:03:47 +00:00
Pascal Vizeli
3bb6442117 Mark stable release 2020-05-25 11:31:18 +00:00
Pascal Vizeli
2b3e806e56 Cleanup U-boot 2020-05-25 07:24:03 +00:00
Pascal Vizeli
a034fc9997 RaspberryPi: Update firmware a6c9b6b48ce86ef2527586a50760d52f1b33f642 2020-05-25 07:07:51 +00:00
Pascal Vizeli
4861cc58ce Linux: Update kernel 5.4.42 2020-05-25 07:06:32 +00:00
Pascal Vizeli
3160b59730 RaspberryPi: Update kernel 5.4.42 - 79495a5ecdfba69de51e88701a69c42d09806d84 2020-05-25 07:06:10 +00:00
Pascal Vizeli
032af2f56d Odroid: Update kernel 5.4.41 - 237731e3d2c145bd711bd1dcad0479c912b9fb4f 2020-05-25 07:05:20 +00:00
Pascal Vizeli
035e3884d8 Update Buildroot 2020.02.2 (#682)
Signed-off-by: Pascal Vizeli <pvizeli@syshack.ch>
2020-05-20 17:32:11 +02:00
Pascal Vizeli
ce3c80641b cleanup-device (#681) 2020-05-19 21:29:57 +02:00
Pascal Vizeli
4eda8a1ff3 Wait until device is exists for moving data (#680)
* Wait until device is exists for moving data

* Update hassos-data

* Update hassos-data

* Update hassos-data
2020-05-19 15:21:08 +02:00
Pascal Vizeli
b410b70814 Update the old partition layout not just partial (#679) 2020-05-19 10:38:27 +02:00
Pascal Vizeli
eca72c9898 Fix vmware OS-Type for OVA (#677) 2020-05-18 11:43:45 +02:00
Fabian Affolter
71974edfd7 Update the README file (#666) 2020-05-14 09:27:11 +02:00
Fabian Affolter
613604ea74 Update style and static IPv4 address section (#667) 2020-05-14 09:25:31 +02:00
Fabian Affolter
6c62029a74 Fix typos (#668) 2020-05-14 09:21:53 +02:00
Fabian Affolter
a5209dc400 Fix typo and style (#669) 2020-05-14 09:17:04 +02:00
Fabian Affolter
1118335b1c Fix some typos and use the upstream project's spelling (#670) 2020-05-14 09:16:22 +02:00
Fabian Affolter
f96163f04e Keep the packages sorted and one per line (as above) (#672) 2020-05-14 08:54:18 +02:00
Fabian Affolter
b0dbbf963c Update spelling (#671) 2020-05-14 01:02:35 +02:00
Pascal Vizeli
a38bf6e75a Fix issue with loop devices (#659)
Signed-off-by: Pascal Vizeli <pvizeli@syshack.ch>
2020-05-08 10:21:40 +02:00
Pascal Vizeli
0d892dbf23 Remove wrong support on the docs for Tinker S (#658) 2020-05-08 09:38:48 +02:00
Pascal Vizeli
a403b790f7 Update docker proxy (#657) 2020-05-07 22:55:37 +02:00
Pascal Vizeli
43aa64bb86 Add CRDA packages (#656)
* Add CRDA packages

* add ova too
2020-05-07 10:38:00 +02:00
Pascal Vizeli
ba17e542c5 Fix nl80211 crda errors (#655) 2020-05-07 09:48:07 +02:00
Pascal Vizeli
73dedf35de Bump version 4.7 2020-05-06 11:51:10 +02:00
Pascal Vizeli
96c622b36f Update deployment.md 2020-05-06 11:50:19 +02:00
Pascal Vizeli
698f2bb7d4 Move to staging 2020-05-06 09:42:39 +00:00
Pascal Vizeli
be39da4855 RaspberryPi: Update firmware 7eff9f6774bb43bfd61e749a0b45ffddc98c2311 2020-05-06 09:41:24 +00:00
Pascal Vizeli
b14d0223c2 Linux: Update kernel 5.4.39 2020-05-06 09:35:40 +00:00
Pascal Vizeli
fcfd951f2b RaspberryPi: Update kernel 5.4.38 - c41ae7cf543c1d680b4ac1afae40ca5bb0a96661 2020-05-06 09:35:18 +00:00
Pascal Vizeli
fcefb1e515 expand 2020-05-06 08:33:48 +00:00
Pascal Vizeli
3070b52a3e fix spell 2020-05-06 08:29:26 +00:00
Pascal Vizeli
37639fc3ff cleanup badge 2020-05-06 08:27:59 +00:00
Pascal Vizeli
770bcb62a0 Update docs 2020-05-06 08:26:44 +00:00
Pascal Vizeli
b3530d1ce1 Allow easy move data partition (#651)
* Allow easy move data partition

* Cleanup handling systemd

* Improve handling

* fix pipeline

* pipeline

* fix shell handling

* fix scripts

* Add bin folder

* fix lint

* Fix service handling

* Fix loading

* hide output

* Fix handling
2020-05-06 00:00:28 +02:00
Pascal Vizeli
ba9d1bac1e Use older Kernel for N2 (#652)
* Use older Kernel for N2

* Update docs

* Update kernel-amlogic.config
2020-05-05 14:23:17 +02:00
Pascal Vizeli
db184bf5d3 Make machine-id persist (#649)
* Make machine-id persist

* update

* Adjustments

* cleanup

* fix cleanups

* small cleanup
2020-05-04 15:11:43 +02:00
Pascal Vizeli
15a80bb405 Odroid N2 - update boot firmware (#647) 2020-04-30 17:09:30 +02:00
Pascal Vizeli
f0b5be41fe Bugfix qemu agent 4.2.0 (#646) 2020-04-29 22:09:47 +02:00
Pascal Vizeli
517abe0ea9 Check keyring of ota update file (#645) 2020-04-29 14:49:32 +02:00
Pascal Vizeli
ca90fa515d Bump version 4.6 2020-04-29 12:43:10 +02:00
Pascal Vizeli
6605b1511f Kernel updates (#643)
* Odroid: Update kernel 5.35 - f2eb401e73e9b54432cf4234722cb4fad1b334f2

* RaspberryPi: Update kernel 5.4.35 - 9a583229eff3263202522945a594a9115d49fcc6

* Odroid: Update kernel 5.4.35 - f2eb401e73e9b54432cf4234722cb4fad1b334f2

* Fix script

* RaspberryPi: Update firmware 2b731476edc463f2d6b3d751cb47c515b4b5853f

* Add script for rpi update

* RaspberryPi: Update firmware 2b731476edc463f2d6b3d751cb47c515b4b5853f

* fix script
2020-04-29 11:16:38 +02:00
Pascal Vizeli
f8b24f4b70 Make odroid downstream (#642)
* Make odroid downstream

* Fix patch

* Fix config

* audio support exynos

* Cleanup scripts

* Fix commit message

* clean options

* Extend options

* Cleanup
2020-04-28 22:23:08 +02:00
Pascal Vizeli
ada03f6736 Update qemu guest agent 4.2.0 (#639) 2020-04-26 12:33:54 +02:00
Pascal Vizeli
04e679798a Fix workstation avahi handling & add NSS mdns to host (#638)
* Fix workstation avahi handling & add NSS mdns to host

* disable avahi daemon on internal
2020-04-26 11:19:28 +02:00
Pascal Vizeli
6a49aa1c2b Create OVA file from release (#636)
* Create OVA file from release

* Fix name & add boot flag

* revert name

* style cleanup

* Fix script

* Add cleanup
2020-04-26 01:09:51 +02:00
Pascal Vizeli
34b7bbd68d New approach for uboot and rpi 5.4 (#635)
* New approach for uboot and rpi 5.4

* fix dts

* Update firmware to next
2020-04-25 11:17:03 +02:00
Pascal Vizeli
c0d8e14c2a Rpi update (#633)
* RaspberryPi: Update kernel 9daf4531948808f4a1913e6767fae6f421fb7896

* Update firmware
2020-04-24 18:28:08 +02:00
Pascal Vizeli
c017b43456 Tinker linux5.4 (#632)
* Migrate Tinker to linux 5.4

* Update bootloader
2020-04-24 15:12:57 +02:00
Pascal Vizeli
98f13d9282 RPi 5.4 (#631)
* RaspberryPi: Update kernel 68fd7d52c9fc7c40b996d6b91acaf3e03b2c3ea0

* update kernel config

* update bootloader

* Fix boot

* work

* fix boot

* Fix script

* optimize script
2020-04-23 23:05:28 +02:00
Pascal Vizeli
5ef1e83197 Update apparmor 2.13.4 (#630) 2020-04-22 22:54:58 +02:00
Pascal Vizeli
4df2ab6013 Use default CloudFlare anycast time service (#629) 2020-04-21 14:41:13 +02:00
Pascal Vizeli
45c62716cb New way to install/run supervisor + plugins (#620)
* Use new layout for CLI/Supervisor

Signed-off-by: Pascal Vizeli <pvizeli@syshack.ch>

* Fix install script

* Fix config

* Add docs

* Fix shellcheck

* Fix issue

* rename package

* Fix build

* Fix apparmor
2020-04-21 14:37:25 +02:00
Pascal Vizeli
48f3045854 Support NVMe & update barebox (#626)
* Support NVMe & Update barebox

* same for ova
2020-04-19 01:33:45 +02:00
Pascal Vizeli
3281cbd365 Optimize GCC9 & busybox (#623)
* Optimize GCC9 & busybox

* Move to o2 for stable

* fix shell issue
2020-04-17 14:44:34 +02:00
Pascal Vizeli
5a6678147e Update buildroot 2020.02.01 (#622)
* Update buildroot 2020.02.01

Signed-off-by: Pascal Vizeli <pvizeli@syshack.ch>

* Fix LN

* Fix wpa

Signed-off-by: Pascal Vizeli <pvizeli@syshack.ch>

* Fix lint

Signed-off-by: Pascal Vizeli <pvizeli@syshack.ch>

* fix-network

Signed-off-by: Pascal Vizeli <pvizeli@syshack.ch>

* Fix script

Signed-off-by: Pascal Vizeli <pvizeli@syshack.ch>
2020-04-16 20:03:01 +02:00
Pascal Vizeli
0c2b5aff65 Update azure-pipelines-release.yml 2020-04-15 16:21:55 +02:00
Pascal Vizeli
9dca4fc837 Update enter.sh 2020-04-15 16:08:16 +02:00
Pascal Vizeli
fff08c6101 Fix script 2020-04-15 14:06:39 +00:00
Pascal Vizeli
1022053aef Fix enter script & permission 2020-04-15 11:55:53 +00:00
Pascal Vizeli
0629c58d31 Update azure-pipelines-release.yml for Azure Pipelines 2020-04-15 12:37:36 +02:00
Pascal Vizeli
bc2afe33b0 Update rpi kernel/firmware (#621)
* RaspberryPi: Update kernel 2e79fd01b4b9a7eea5acb234ad4e4cdca8449d5a

* Update rpi firmware & kernel
2020-04-15 11:52:11 +02:00
Pascal Vizeli
2c963fcd05 Add dbus config for pulseaudio (#619) 2020-04-03 14:53:42 +02:00
lucagiove
d4a403b640 Fixed bluetooth-bcm43xx build (#616)
Brutally added patch command after download.

> I'm not a buildroot expert but the best way seemed to move the
> upstream btuart download in a PRE_PATCH_HOOK so that standard
> buildroot way of patching can be applied.

I've been finally able to test it and the PRE_PATCH_HOOK does not work
seems it's never triggered.
I tried also th POST_RSYNC_HOOK that works but still patch is not
applied.
I think that patch is not detected (odd, patch naming seems complient)
or since source code is not downloaded buildroot thinks that patch is
not needed, couldn't sort it out.
2020-04-03 10:27:55 +02:00
Perry Naseck
89cb68f7b7 Add USB video kernel support (#609)
* Add USB video kernel support for intel_nuc

* Add USB video kernel support for all boards

* Support USB video capture devices only, not tuners
2020-04-03 10:26:06 +02:00
lucagiove
c371e45144 Attempt to fix bluetooth communication problem on rpi3b (#614)
This problem is referenced in many different issues, some of them:
Bluetooth: hci0: Frame reassembly failed (-84)
https://github.com/raspberrypi/firmware/issues/1150

Error communicating with local bluetooth adapter (RPi3)
https://github.com/home-assistant/core/issues/30147

Xiaomi BLE Temperature and Humidity sensor no longer working after update from 0.95.4 to .096.5
https://github.com/home-assistant/core/issues/25704

Xiaomi BLE Temperature and Humidity sensor
https://github.com/home-assistant/core/issues/24313#issuecomment-578554315

Solution seemed to reeduce the boud rate of the serial connection to BT
on rpi3b where flow control is missing.

The patch to the original btuart file is to reduce the baudrate only for
rpi3b models where flow control is missing:

-		$HCIATTACH /dev/serial1 bcm43xx 921600 noflow - $BDADDR
+		$HCIATTACH /dev/serial1 bcm43xx 460800 noflow - $BDADDR

I'm not a buildroot expert but the best way seemed to move the
upstream btuart download in a PRE_PATCH_HOOK so that standard
buildroot way of patching can be applied.
2020-03-31 11:03:14 +02:00
Pascal Vizeli
2e7e039899 Optimize SND kernel module handling (#606)
* Optimize SND kernel module handling

* Update alsa-base.conf

* Update alsa-base.conf
2020-03-10 10:28:45 +01:00
Pascal Vizeli
c6e01d3468 Bump version to 4.5 2020-03-07 14:08:39 +01:00
Pascal Vizeli
5336e17a06 Update Kernel 5.4.24 (#603) 2020-03-07 14:07:05 +01:00
Pascal Vizeli
a017fae49d OS: Update CLI 21 2020-03-07 11:13:34 +00:00
Pascal Vizeli
96d59c2a40 OS: Update supervisor 209 2020-03-07 11:13:30 +00:00
Pascal Vizeli
1f23c3ac72 Replace on upload 2020-03-06 11:59:02 +01:00
Pascal Vizeli
3f26a61d9a Update RaspberryPi Kernel & Firmware 4.19.106 (#601)
* RaspberryPi: Update kernel ecb440abef61d198478b6e598b3510ff6680090a

* Update RaspberryPi kernel 4.19.106
2020-03-05 16:33:48 +01:00
nepozs
6a728d916f Update nuc.md (#591) 2020-02-20 21:42:23 +01:00
Pascal Vizeli
7f0ab07752 Bump version to 4.4 2020-02-18 13:25:39 +01:00
Pascal Vizeli
7d7a52732d Fix supervisor name on cli config (#588) 2020-02-17 13:25:44 +01:00
Pascal Vizeli
2d6f692a4c Rename Hass.io (#587) 2020-02-17 09:53:09 +01:00
Pascal Vizeli
279a4c4db1 Change uptime for offline update (#585) 2020-02-16 11:46:41 +01:00
Pascal Vizeli
a65db13c9e Support better armv7 emulation N2/C2 (#584)
* Support better armv7 emulation N2/C2

* Update kernel.config
2020-02-16 11:46:25 +01:00
Pascal Vizeli
a592fc9866 Change handling for SPL based images (#578)
* Change handling for SPL based images

* Fix script

* Fix path for rauc-hook
2020-02-10 14:52:03 +01:00
Pascal Vizeli
66c1b016c9 Bump version to 4.3 2020-02-06 18:57:20 +01:00
Pascal Vizeli
f9a3bccf7b Update Kernel 5.4.18 (#572) 2020-02-06 18:40:30 +01:00
Pascal Vizeli
1c95022184 Add support for audio & thermal & small FTD fixes (#571) 2020-02-06 18:36:44 +01:00
Pascal Vizeli
d4deca66b2 OS: Update CLI 16 2020-02-06 13:40:17 +00:00
Pascal Vizeli
1c2ef541ea OS: Update supervisor 199 2020-02-06 13:39:50 +00:00
Jason Hines
55d84758a2 Update bluetooth.md (#569)
grammatical changes
2020-02-06 08:27:22 +01:00
Pascal Vizeli
82010866b1 Bump version to 4.2 2020-02-05 16:58:30 +01:00
Pascal Vizeli
294ad6cd58 Merge branch 'master' into dev 2020-02-05 16:29:11 +01:00
Pascal Vizeli
bfdedbffe6 Support usb audio all (#566)
* Add support for SND USB audio over all

* Cleanup
2020-02-05 16:25:58 +01:00
Pascal Vizeli
d409e328be Add CEC & audo support for odroid C2/N2 (#565) 2020-02-05 16:16:22 +01:00
Etzion Bar-Noy
a6ae25da06 BT support for all platforms (#563)
* Update azure-pipelines-release.yml for Azure Pipelines

* Update azure-pipelines-release.yml for Azure Pipelines

* Update azure-pipelines-release.yml for Azure Pipelines

* Fix double LINUX_HEADERS

* Add support for TI USB 3410 or 5052 serial devices (#542)

* Added BT support to device-support.conf file, and removed BT support from kernel.config file

* Removed BT support, as it was moved to device-support.config file

* Added new line at the end of the file

* Changed:
CONFIG_BT_HCIBTUSB from 'm' to 'y'
CONFIG_BT_HCIBTUSB_BCM from 'y' to 'm'
CONFIG_BT_HCIBTUSB_RTL from 'y' to 'm'

* Update device-support.config

Co-authored-by: Pascal Vizeli <pascal.vizeli@syshack.ch>
2020-02-04 18:03:51 +01:00
Pascal Vizeli
bc1266a44b [skip ci] Change group 2020-02-03 14:30:37 +01:00
Pascal Vizeli
c1eb0ac4cd Update docker 19.03.5 on builder (#561) 2020-02-03 12:12:07 +01:00
Pascal Vizeli
9939422d10 Add more SND audio codec modules (#560)
* Add more SND audio codec modules

* Update kernel.config
2020-02-03 11:06:35 +01:00
Pascal Vizeli
51cf310472 Fix odroid issues (#556)
* Adjust kernel for C2/N2 & Kenrel 5.4.16

* Update docs

* Add script to fix mac with efuse

* Fix script

* update description

* Fix script

* Use u-boot patch

* Fix patch
2020-02-01 21:57:20 +01:00
Pascal Vizeli
f38a31eee3 Update README.md 2020-01-17 13:20:18 +01:00
Pascal Vizeli
e388662422 Add support for TI USB 3410 or 5052 serial devices (#542) 2020-01-13 14:55:08 +00:00
Pascal Vizeli
0258ef641d Fix double LINUX_HEADERS 2020-01-13 14:54:57 +00:00
Pascal Vizeli
bf29dd3971 Fix double LINUX_HEADERS 2020-01-13 15:54:13 +01:00
Pascal Vizeli
7314ce1963 Add support for TI USB 3410 or 5052 serial devices (#542) 2020-01-13 15:36:56 +01:00
Pascal Vizeli
70d69d3518 Bump version 4.1 2020-01-13 15:09:24 +01:00
Pascal Vizeli
574c883207 Merge pull request #540 from home-assistant/dev
Release 4.0
2020-01-13 15:02:39 +01:00
Pascal Vizeli
5812ed014e Default Kernel 5.4 (#541) 2020-01-13 15:02:21 +01:00
Pascal Vizeli
13e4578b7a Migrate Buildroot 2019.02.9 (#539) 2020-01-13 14:47:52 +01:00
Pascal Vizeli
d6a700565e Update RPI firmware (#537) 2020-01-12 11:03:59 +01:00
Pascal Vizeli
d9d8c96c70 Add CONFIG_VIRT_DRIVERS to ova (#536) 2020-01-12 10:21:10 +01:00
Pascal Vizeli
329caf6c1c Cleanup 2020-01-11 16:52:26 +00:00
Pascal Vizeli
27ee3ef98f VirtIO MMIO kernel module (#534)
* VirtIO MMIO kernel module

* Update kernel.config

* Update kernel.config
2020-01-11 11:50:28 +01:00
Pascal Vizeli
63967cf6c0 Buildroot 2019.02.8 (#533)
* Update Buildroot 2019.02.8

* Update patches
2020-01-11 11:24:41 +01:00
Pascal Vizeli
a874bb5fb5 RaspberryPi update stable u-boot / Kernel + Firmware (#532)
* RaspberryPi: Update kernel b4180819d3a119c56133d6a2d8301775bf6c60bb

* Update kernel docs

* Update firmware
2020-01-10 14:16:32 +01:00
Pascal Vizeli
dc4ee61809 Remove orangepi (#531) 2020-01-09 23:16:03 +01:00
Pascal Vizeli
febc4473d3 New supervisor / Adjust rauc handling (#530)
* OS: Update supervisor 194

* Remove old rauc mark code

* OS: Update supervisor 195

* Adjust dockerd
2020-01-09 23:02:46 +01:00
Pascal Vizeli
7b379e648c Initial support Odroid N2 / Linux 5.4 (#523)
* Initial version Odroid N2

Signed-off-by: Pascal Vizeli <pvizeli@syshack.ch>

* fix some issue

* optimize

* cleanup kernel config

* Fix HDMI output

* Migrate to upstream u-boot

* Use own HA image

* Add kernel for odroid xu4

* Add N2 to release pipeline

* Use uboot 2020.01 / fix version hardkernel

* Fix image
2020-01-07 18:13:24 +01:00
Pascal Vizeli
e4bff62923 Create ISSUE_TEMPLATE.md 2019-12-18 10:27:09 +01:00
Pascal Vizeli
3839e43428 OS: Update supervisor 193 2019-12-13 16:14:08 +00:00
Pascal Vizeli
9e8cccdf82 OS: Update CLI 15 2019-12-13 16:13:49 +00:00
Pascal Vizeli
f87032c302 Some cleanups (#511) 2019-12-13 15:48:22 +01:00
Pascal Vizeli
30aa775450 Fix Kernel For odroid XU4/C2 (#510) 2019-12-13 09:13:41 +01:00
Pascal Vizeli
308fccd7b1 Kernel updates 4.19.88 (#509)
* Update kernel 4.19.88

* Fix asus
2019-12-12 12:28:31 +01:00
Franck Nijhof
6e7bbdbe63 Fix auto expand disk for GPT (#508) 2019-12-12 12:12:49 +01:00
Pascal Vizeli
4c9a4aadc8 Add qemu guest agent (#505)
* Add qemu guest agent

* Fix make file

* Fix targets

* Convert it to autobuild

* Fix paths

* fix target

* Fix options

* Fix startup

* Update kernel

* Fix state dir

* Only load on kvm
2019-12-12 10:44:41 +01:00
Pascal Vizeli
d340e79bea Fix RPI issues with u-boot / firmware (#503)
* Fix RPI issues with u-boot / firmware

* Cleanup bluetooth handling

* Use RC4 for u-boot on rpi4
2019-12-10 19:07:16 +01:00
Pascal Vizeli
09cf67cb73 RaspberryPi: Update kernel 988cc7beacc150756c3fbe40646afcf8438b741b 2019-12-10 09:14:09 +00:00
Pascal Vizeli
0ef7c459ca Fix RPI bluetooth issues (#502)
* Fix RPI bluetooth issues

* Add to buildroot
2019-12-10 10:13:08 +01:00
Pascal Vizeli
bf9795f70b Update RPI firmware (#501)
* Update RPI firmware

* Update buildroot
2019-12-10 10:10:59 +01:00
Robin Harmsen
712dcf9f74 Update azure-pipelines-ci.yml (#486) 2019-10-03 12:16:30 +02:00
Robin Harmsen
c42dba1623 Update azure-pipelines-release.yml (#487) 2019-10-03 12:16:13 +02:00
Oscar Calvo
d44d271c28 Add support for SMS integrations with USB/GSM modem dongles (#485)
* Add support for USB/GSM modem dongles

* Apply PR feedback
2019-09-30 22:57:45 +02:00
mbo18
501b4bd9f4 Update network.md (#446)
* Update network.md

Solve https://community.home-assistant.io/t/setting-a-static-ip-on-hassio-hassos/63378

* Update network.md

Forgot to update the text
2019-09-26 11:29:54 +02:00
capstan1
2fd14442c7 new subheading 'configure network' (#443)
added a new subheading to make clear what the page is about
2019-09-26 11:16:14 +02:00
capstan1
4efd038805 make clear the usb drive needs to be connected only while configuration (#442) 2019-09-26 11:15:18 +02:00
Pascal Vizeli
3e1adf8325 Delete build.md 2019-09-25 23:03:14 +02:00
Pascal Vizeli
60e4d1a3cd Don't hang on serial interupts (#483) 2019-09-23 09:11:45 +02:00
Pascal Vizeli
a13089516e Bump version 4.0 / development 2019-09-13 14:15:47 +02:00
Pascal Vizeli
2e3e518982 Merge branch 'dev' of https://github.com/home-assistant/hassos into dev 2019-09-13 12:13:32 +00:00
Pascal Vizeli
c12ae11ed7 OS: Update supervisor 187 2019-09-13 12:13:28 +00:00
Pascal Vizeli
956badb2fd Change to RC 2019-09-13 14:11:53 +02:00
Pascal Vizeli
e71400cd5c Fix handling with FB on RPi4 (#477) 2019-09-13 14:08:47 +02:00
Pascal Vizeli
6668d77b93 Fix rpi firmware checksum 2019-09-12 15:57:15 +00:00
Pascal Vizeli
629f13f3d9 Update kernels to 4.19.72 (#476) 2019-09-12 16:45:44 +02:00
Pascal Vizeli
dfe261a715 rpi-update-firmware (#475) 2019-09-12 16:34:12 +02:00
Pascal Vizeli
756a0c9b13 RaspberryPi: Update kernel bd3452c84c206a171fa4cf5f6ddfab5687667228 2019-09-12 14:20:36 +00:00
Pascal Vizeli
49948b577e Remove ModemManager (#474) 2019-09-12 16:11:36 +02:00
Pascal Vizeli
61516914ce Fix screen issue with RPi4 (#472) 2019-09-09 17:10:28 +02:00
Moshe Levi
c424b295b1 create cache dir if not exist (#471)
Signed-off-by: Moshe Levi <moshele@mellanox.com>
2019-09-09 16:06:53 +02:00
Pascal Vizeli
c37d0ecd76 Bump version 3.5 2019-08-28 15:55:12 +02:00
Pascal Vizeli
37615a135b Merge pull request #460 from home-assistant/dev
Release 3.4
2019-08-28 15:54:47 +02:00
Pascal Vizeli
abf9a3b7c3 OS: Update supervisor 184 2019-08-28 13:53:54 +00:00
Pascal Vizeli
c87ac63e9b Update Some Boards to 4.19.68 2019-08-28 13:52:51 +00:00
Pascal Vizeli
28d262eecd Add simple fb for 64bit 2019-08-28 13:16:50 +00:00
Pascal Vizeli
d1d3593d65 Fix boot (#459)
* Fix permission check

* Remove fails on copy

* Disable FB_BCM2708

* Don't touch the memory map from first stage

* bootcode.bin is not needed on rpi4
2019-08-28 10:32:46 +02:00
Pascal Vizeli
9f06ffbbd5 Rpi update (#457)
* RaspberryPi: Update kernel 64f2b1b0a728a13373f9c74c6247ecf17af2caef

* Update documentation & Script

* Update firmware

* Update bluetooth firmware

* Update wifi driver
2019-08-24 14:57:16 +02:00
Pascal Vizeli
b963b1a587 Build: update script to do also commits 2019-08-23 15:39:09 +00:00
Pascal Vizeli
998c8365c0 OS: Update CLI 14 2019-08-23 15:38:29 +00:00
Pascal Vizeli
70e43c02fb OS: Update supervisor 183 2019-08-23 15:37:39 +00:00
Ryan Bray
fed40532c1 rpi: Add USB boot support (#440) 2019-07-23 14:28:22 +02:00
Alexey Pristavkin
08fac89fb0 Note that disk controller must be SATA not SCSI. (#424)
The image hang on startup on the SCSI controller, which is the default controller type for custom VMs in VMWare Fusion.
2019-07-22 16:49:39 +02:00
Pascal Vizeli
e7da2e0779 Fix defconfig name for rpi zero (#436) 2019-07-17 22:07:25 +02:00
Pascal Vizeli
3d999f8936 Update release-drafter.yml 2019-07-16 14:23:28 +02:00
Pascal Vizeli
b26d4bbb40 Pump version 3.4 2019-07-16 14:18:43 +02:00
Pascal Vizeli
e5734a9024 Merge pull request #432 from home-assistant/dev
Release 3.3
2019-07-16 14:18:13 +02:00
Pascal Vizeli
8c691e8e56 Update Hass.io Supervisor (#431) 2019-07-16 13:47:03 +02:00
Pascal Vizeli
14d91e094a RaspberryPi 4 (#428)
* RaspberryPi4 support

* Update kernel file

* Fix lint

* Fix uboot defconfig

* Update firmware for rpi4

* fix naming

* Add support for 64bit

* fix path for dts
2019-07-16 09:44:29 +02:00
Pascal Vizeli
2f40d76b6f Update bootloader RPi (#427) 2019-07-15 15:47:54 +02:00
Pascal Vizeli
219e9ca1ef Raspberry Pi Firmware/Kernel update (#426)
* Raspberry Pi Firmware/Kernel update

* Fix checksum

* Update Kernel doc
2019-07-15 14:44:22 +02:00
Ryan Bray
f3f9bd9697 Odroid xu4 updates (#425)
* Odroid-XU4: Attempt to fix some eMMC devices

* Linux-firmware: add s5p to buildroot

* Odroid-XU4: fix uboot env size
2019-07-15 09:24:43 +02:00
Franck Nijhof
2e205cafd3 Merge pull request #423 from rbrenton/patch-1
Update ova.md
2019-07-13 15:59:16 +02:00
Franck Nijhof
4d7e0977ac ✏️ More improvements 2019-07-13 15:38:59 +02:00
Brenton
0f93fcc477 Update ova.md
I had issues with "Other Linux (64-bit)", and "Other 4.x or later Linux (64-bit)" appears to be the correct choice.
2019-07-08 18:41:03 -04:00
Pascal Vizeli
fa6f7ac74d Fix build error raspberry pi3 2019-06-30 23:29:34 +02:00
Pascal Vizeli
081f7124d7 Update azure-pipelines-release.yml for Azure Pipelines 2019-06-28 11:17:25 +00:00
Pascal Vizeli
2caaf89186 Update azure-pipelines-release.yml for Azure Pipelines 2019-06-28 13:16:49 +02:00
Pascal Vizeli
5a612922f3 Update azure-pipelines-release.yml for Azure Pipelines 2019-06-28 11:10:51 +00:00
Pascal Vizeli
9f584f2c6a Update azure-pipelines-release.yml for Azure Pipelines 2019-06-28 13:10:31 +02:00
Pascal Vizeli
ee4b3a101e Update azure-pipelines-release.yml for Azure Pipelines 2019-06-28 11:09:32 +00:00
Pascal Vizeli
a04fa47883 Update azure-pipelines-release.yml for Azure Pipelines 2019-06-28 13:08:06 +02:00
Pascal Vizeli
efc61a57d9 Bump version 3.3 2019-06-28 12:17:17 +02:00
Pascal Vizeli
1e627fed34 Merge pull request #420 from home-assistant/dev
Release 3.2
2019-06-28 12:16:42 +02:00
Pascal Vizeli
20afea35d9 Update kernel patch for 4.19 (#419) 2019-06-28 10:35:20 +02:00
Pascal Vizeli
db8127c253 Update kernel 4.19.56 (#418) 2019-06-27 22:32:57 +02:00
Pascal Vizeli
e03ea97133 Cleanup host linux header pinning (#417)
* Cleanup host linux header pinning

* Update intel_nuc_defconfig
2019-06-27 22:26:29 +02:00
Pascal Vizeli
3d858e3bb6 Create azure-pipelines-release.yml 2019-06-27 18:05:36 +02:00
Pascal Vizeli
a0cba05830 Update and rename azure-pipelines.yml to azure-pipelines-ci.yml 2019-06-27 18:04:20 +02:00
Pascal Vizeli
868935f8a0 Update azure-pipelines.yml for Azure Pipelines 2019-06-27 17:11:36 +02:00
Pascal Vizeli
6581ec4028 Update Supervisor 167 (#416) 2019-06-27 16:32:19 +02:00
Pascal Vizeli
41d3f59002 Update Buildroot to 2019.02.3 (#415)
* Update Buildroot to 2019-02.3

* Fix enter script

* Update ova_defconfig

* Fix network manager

* Remove runc patches

* Use same docker version

* Fix build

* Fix vmtools

* Fix depens

* Fix handling with tempfiles

* Fix permission handling

* Fix cp

* Cleanup

* Fix mounts
2019-06-27 11:58:50 +02:00
Fabio Fantoni
bb201fb842 Add cifs support (#408)
* Add cifs support in hassos kernel

This make possible mount remote smb share in addons (if they have cifs-utils)

* Update hassos.config
2019-05-19 11:22:02 +02:00
Pascal Vizeli
a55aaf7f38 Update azure-pipelines.yml for Azure Pipelines 2019-05-15 14:36:22 +02:00
Piotr Witek
edcca58e38 ID parameter in file have to be the same as name of file (#400) 2019-05-15 13:55:05 +02:00
Pascal Vizeli
d1c2715402 Update azure-pipelines.yml for Azure Pipelines 2019-05-14 23:34:02 +02:00
Pascal Vizeli
1febb31647 Lint hostapp.sh and robust umount (#406)
* Lint hostapp.sh and robust umount

* Update hostapp.sh

* Update Dockerfile

* Update Dockerfile

* Update hassos.mk

* Update hostapp.sh

* Update Dockerfile

* Update hassos.mk

* Update hostapp.sh

* Update hdd-image.sh

* Update entry.sh
2019-05-14 23:22:48 +02:00
Pascal Vizeli
d5e6cc78d5 Update azure-pipelines.yml for Azure Pipelines 2019-05-14 01:23:58 +02:00
Pascal Vizeli
e8d14bdc60 Support build as user (#405)
* Support build as user

* Update enter.sh

* Update Dockerfile

* Update enter.sh

* Update entry.sh
2019-05-14 01:16:40 +02:00
Pascal Vizeli
5f1fadad29 Update azure-pipelines.yml for Azure Pipelines 2019-05-14 01:14:17 +02:00
Pascal Vizeli
5c38357ba6 Update HassOS App to use alpine 3.9 (#404) 2019-05-14 00:52:23 +02:00
Pascal Vizeli
27aa12911d Update azure-pipelines.yml 2019-05-13 23:31:52 +02:00
Pascal Vizeli
c662ef86d7 Update azure-pipelines.yml for Azure Pipelines 2019-05-13 22:33:54 +02:00
Pascal Vizeli
450a8295f7 Delete ghr 2019-05-13 22:08:24 +02:00
Pascal Vizeli
a13e7ad3e1 Update azure-pipelines.yml for Azure Pipelines 2019-05-13 22:07:59 +02:00
Pascal Vizeli
3077b9423d Update azure-pipelines.yml for Azure Pipelines 2019-05-13 21:53:47 +02:00
Pascal Vizeli
6204b3d165 Update azure-pipelines.yml 2019-05-13 21:31:43 +02:00
Pascal Vizeli
1624e26447 Update azure-pipelines.yml 2019-05-13 21:23:59 +02:00
Pascal Vizeli
cec027a6e6 Update azure-pipelines.yml 2019-05-13 18:48:28 +02:00
Pascal Vizeli
d347532c96 Change docker entry point script to allow additional commands (#403)
* Change docker entry point script to allow additional commands

* Delete Dockerfile
2019-05-13 17:43:11 +02:00
Pascal Vizeli
d9c2347e7c Update azure-pipelines.yml for Azure Pipelines 2019-05-13 10:38:43 +02:00
Pascal Vizeli
2e7c93428d Update azure-pipelines.yml for Azure Pipelines 2019-05-13 10:27:29 +02:00
Pascal Vizeli
4455e9a907 Update azure-pipelines.yml for Azure Pipelines 2019-05-13 08:50:10 +02:00
Pascal Vizeli
5d16ac24c3 Update azure-pipelines.yml for Azure Pipelines 2019-05-13 08:33:05 +02:00
Pascal Vizeli
f715486c58 Update azure-pipelines.yml for Azure Pipelines 2019-05-12 23:18:38 +02:00
Pascal Vizeli
7c77a692ce Update azure-pipelines.yml for Azure Pipelines 2019-05-12 23:13:54 +02:00
Pascal Vizeli
ac5121f067 Update azure-pipelines.yml for Azure Pipelines 2019-05-12 23:07:23 +02:00
Pascal Vizeli
e34b01755e Update azure-pipelines.yml for Azure Pipelines 2019-05-12 23:03:55 +02:00
Pascal Vizeli
5971ee1a46 Update Dockerfile 2019-05-12 22:57:52 +02:00
Pascal Vizeli
6bda70a451 Update azure-pipelines.yml for Azure Pipelines 2019-05-12 22:57:04 +02:00
Pascal Vizeli
9a9e2cc5df Update azure-pipelines.yml for Azure Pipelines 2019-05-12 22:53:15 +02:00
Pascal Vizeli
3dbe3e9ea7 Update azure-pipelines.yml for Azure Pipelines 2019-05-12 22:44:50 +02:00
Pascal Vizeli
3ad7dc3714 Update azure-pipelines.yml for Azure Pipelines 2019-05-12 22:35:50 +02:00
Pascal Vizeli
1a3bcf6486 Update azure-pipelines.yml for Azure Pipelines 2019-05-12 22:33:18 +02:00
Pascal Vizeli
6ddbfabfae Update azure-pipelines.yml for Azure Pipelines 2019-05-12 22:22:11 +02:00
Pascal Vizeli
c72e61e542 Update Dockerfile 2019-05-12 22:10:56 +02:00
Pascal Vizeli
f8081d7829 Create Dockerfile 2019-05-12 22:10:19 +02:00
Pascal Vizeli
27c25da90d Update azure-pipelines.yml for Azure Pipelines 2019-05-12 21:49:13 +02:00
Pascal Vizeli
d47e169bd5 Update azure-pipelines.yml for Azure Pipelines 2019-05-12 21:46:36 +02:00
Pascal Vizeli
6510cf9619 Update azure-pipelines.yml for Azure Pipelines 2019-05-12 21:42:23 +02:00
Pascal Vizeli
1419e72dbc Update azure-pipelines.yml for Azure Pipelines 2019-05-12 21:41:36 +02:00
Pascal Vizeli
30448dbc5a Update azure-pipelines.yml for Azure Pipelines 2019-05-12 21:40:32 +02:00
Pascal Vizeli
85c82c4479 Update azure-pipelines.yml for Azure Pipelines 2019-05-12 21:37:25 +02:00
Pascal Vizeli
e21f59111c Update README.md 2019-05-12 19:08:31 +02:00
Pascal Vizeli
543075222e Bump version 3.2 2019-05-12 19:05:25 +02:00
Pascal Vizeli
661b39565f Merge pull request #402 from home-assistant/dev
Version 3.1
2019-05-12 18:47:08 +02:00
Pascal Vizeli
7439de3d25 Supervisor: update Hass.io to 163 2019-05-12 09:03:02 +00:00
Pascal Vizeli
c9f4879780 Update Hass.io cli to 11 2019-05-12 09:02:31 +00:00
Pascal Vizeli
60cf077e48 Update Dockerfile 2019-05-12 11:00:07 +02:00
Pascal Vizeli
06e65b5734 Update release-drafter.yml 2019-05-11 11:10:00 +02:00
Pascal Vizeli
ac70f1bfac Update release-drafter.yml 2019-05-11 11:01:47 +02:00
Pascal Vizeli
1fc912eaf9 Create release-drafter.yml 2019-05-11 10:59:36 +02:00
Pascal Vizeli
83a0981113 Update Dockerfile 2019-05-09 10:14:23 +02:00
Pascal Vizeli
79dc34c531 Update Dockerfile 2019-05-09 10:11:42 +02:00
Pascal Vizeli
6ca35fb1af Create .hadolint.yaml 2019-05-09 10:10:53 +02:00
Pascal Vizeli
e273883077 Update Dockerfile 2019-05-09 10:08:58 +02:00
Pascal Vizeli
0fb9102e69 Set up CI with Azure Pipelines
[skip ci]
2019-05-09 10:00:51 +02:00
Pascal Vizeli
9a4027e9d4 Delete main.workflow 2019-05-09 09:43:43 +02:00
Maël Kimmerlin
5e82060124 Adding /etc/modprobe.d folder for module configuration (#397)
* Add a /etc/modprobe.d folder

populated using a config USB stick with folder modprobe

* Add the documentation for the modprobe folder
2019-05-08 13:15:48 +02:00
TonyApuzzo
d861ecae6f Add PROCPS_NG package to enable portainer stats (#398)
portainer requires ability to run 'ps -e' which is not supported
by busybox's ps.

This fixes https://github.com/hassio-addons/addon-portainer/issues/3

Tested on odroid_xu4 target.
2019-05-07 18:15:18 +02:00
Jan
061ab0ed8a Added Vmware specific kernel modules to support paravirtualized drivers (#395)
This adds VMXNET3 support and the paravirtualized SCSI controller along with virtual sockets for the guest additions and memory ballooning so that unused memory can be shared with other Vmware guests. Tested on ESXi 6.5 and it works great.
2019-04-29 22:58:03 +02:00
Pascal Vizeli
722f27d3c8 Create stale.yml 2019-04-16 11:05:56 +02:00
Ryan Bray
57ec2bb25c Merge pull request #391 from home-assistant/rbray89-patch-1
Update odroid-xu4.md to add additional eMMC instruction
2019-04-05 09:09:51 -06:00
Ryan Bray
f0c38a20bc Update odroid-xu4.md 2019-04-05 09:05:30 -06:00
Ryan Bray
267b61405d Update odroid-xu4.md 2019-04-05 08:56:29 -06:00
Franck Nijhof
98b14be0f6 OS: Adds universal TUN/TAP kernel support (#390) 2019-04-05 12:12:22 +02:00
Pascal Vizeli
fa20ccdd94 OS: Enable systemd-coredump (#382) 2019-03-20 18:10:44 +01:00
Pascal Vizeli
454964877d Add support for privileged supervisor (#381) 2019-03-18 12:45:15 +01:00
Pascal Vizeli
16fcb84886 Update CLI v9 with armv7 (#379)
* Update CLI v9 with armv7

* Update rpi2_defconfig
2019-03-18 10:36:25 +01:00
Pascal Vizeli
1d40ffd4f9 OS: Fix boot problem (#370)
* OS: Fix boot problem

* Update var-lib-docker.mount

* Update var-lib-docker.mount

* Update var-lib-docker.mount
2019-03-18 09:53:22 +01:00
Pascal Vizeli
a21871f4af OS: Disable coredump (#365) 2019-02-22 21:24:58 +01:00
Pascal Vizeli
ba01ed951b Fix workflow (#363)
* Fix workflow

* Update rauc.sh

* Update rootfs-layer.sh

* Delete .travis.yml
2019-02-22 00:51:46 +01:00
Pascal Vizeli
7308bad953 Update main.workflow (#362) 2019-02-22 00:28:52 +01:00
Pascal Vizeli
9415e2c5d0 Bump version 3.1 2019-02-21 16:04:58 +01:00
Pascal Vizeli
aa392e78a6 Merge pull request #361 from home-assistant/dev
Release 3.0
2019-02-21 16:04:25 +01:00
Pascal Vizeli
2703ec31b9 Supervisor: update Hass.io to 144 2019-02-21 14:24:45 +00:00
Pascal Vizeli
8cd0ca2cfe Rpi: update kernel 4.14.98 42f1859 (#360)
* Rpi: update kernel 4.14.98

* Update kernel
2019-02-21 15:23:42 +01:00
Pascal Vizeli
c317941767 Fix cve-2019-5736 (#359)
* Fix CVE-2019-5736

* Fix cve-2019-5736
2019-02-21 12:07:59 +01:00
TonyApuzzo
d1cf8e0016 Odroid: Fix ring buffer errors by applying (#355) 2019-02-15 15:56:14 +01:00
Pascal Vizeli
188fbc340e OVA: update kernel 4.19.20 (#353)
* OVA: update kernel 4.19.20

* Update kernel.md
2019-02-11 11:16:15 +01:00
mbo18
5e8f910714 Documentation: Tinker eMMC 2019-02-10 23:35:21 +01:00
Pascal Vizeli
30b599acc6 Tinker: update kernel 4.19 (#349) 2019-02-09 11:45:13 +01:00
Pascal Vizeli
7b4be3b4f7 OS: change zram swap to 25% of available memory (#348) 2019-02-08 11:53:31 +01:00
Ryan Bray
662eda3c3b Update odroid-xu4.md
Fix bullets
2019-02-06 02:15:51 -07:00
Ryan Bray
aad41225f4 Create odroid-xu4.md 2019-02-06 02:12:47 -07:00
Pascal Vizeli
d697c4bc8e Odroid XU4: Use ondemand (#341) 2019-02-03 11:55:15 +01:00
Pascal Vizeli
2a2e97ddf9 Build: speedup uboot kernel load (#338) 2019-02-03 11:47:45 +01:00
Ryan Bray
32fe415515 OdroidC2: fix long-running ethernet issues (#337) 2019-01-31 09:03:29 +01:00
Pascal Vizeli
292e4b3515 OVA: update kernel 4.19.18 (#335) 2019-01-28 17:49:36 +01:00
Pascal Vizeli
1a337ab937 OVA: fix openvmtools load (#334) 2019-01-28 16:31:32 +01:00
Bryan Berg
43828c2555 Migrate from LABEL= to /dev/disk/by-label/* (#318) 2019-01-28 09:58:40 +01:00
Simon Holzmayer
73a875c263 Fix modules import from USB-Stick (#331) 2019-01-25 14:27:02 +01:00
Pascal Vizeli
c270ac5c9a Bump version 3.0 2019-01-18 00:12:30 +01:00
Pascal Vizeli
c37a6d4c8c Merge pull request #323 from home-assistant/dev
Prepare new release tree
2019-01-18 00:11:34 +01:00
Pascal Vizeli
d677e2d5b2 OS: update supervisor to version 142 2019-01-17 23:05:49 +00:00
Pascal Vizeli
2d44748080 OS: update cli to version 8 2019-01-17 23:05:18 +00:00
Pascal Vizeli
b959d9c805 OS: update AppArmor to 2.13.2 (#325) 2019-01-18 00:02:40 +01:00
Pascal Vizeli
5e9ba3bb7a OS: Add kernel support for wireguard (#324) 2019-01-17 21:49:52 +01:00
Ryan Bray
3d91ac2374 Odroid-C2: Updating to 4.19 kernel (#321)
* Odroid-C2: Updating to 4.19 kernel

* Fix and tested config.
2019-01-17 12:16:13 +01:00
Pascal Vizeli
b0f95fcaec Update deployment.md 2019-01-17 11:27:38 +01:00
Ryan Bray
fffa24ed1e Odroid-XU4: Initial commit (#303) 2019-01-17 11:02:47 +01:00
Jasper van der Neut - Stulen
07bec45d8a NUC: Enable bluetooth support (#320)
* NUC: Enable bluetooth support

Enable kernel support for the intel bt-wifi-combo devices and usb
bluetooth modules. This will make Bluetooth and Bluetooth LE device
trackers work.

* BUILD: Make bluetooth kernel config the same for all boards.

The defconfig for a board may include more drivers, but this
set should be enough to get device trackers working. BLE support
is also enabled.

* Revert "BUILD: Make bluetooth kernel config the same for all boards."

This reverts commit 58f9b7c651.
2019-01-14 23:55:35 +01:00
Jasper van der Neut - Stulen
5835b6a683 OS: Fix unmount of busy mounts (#319)
dhclient and systemd-journald will be running during shutdown and are
only killed in the final shutdown fase. Unmounting the directories
they use will fail. Use lazy unmouting to fix this.
2019-01-13 21:04:57 +01:00
Pascal Vizeli
2d870984e2 Merge pull request #312 from home-assistant/dev
Release 2.5
2019-01-09 22:23:28 +01:00
Alastair D'Silva
e858c774d2 Opi prime updates (#315)
* Backport support for Linux 4.19

Signed-off-by: Alastair D'Silva <alastair@d-silva.org>

* OPI: Update Orange Pi Prime config to use Linux 4.19

Signed-off-by: Alastair D'Silva <alastair@d-silva.org>

* OPI: Enable I2C0 on the Orange Pi Prime

Signed-off-by: Alastair D'Silva <alastair@d-silva.org>

* OPI: Enable GPIO via sysfs

Signed-off-by: Alastair D'Silva <alastair@d-silva.org>
2019-01-09 16:27:20 +01:00
Jasper van der Neut - Stulen
4aa07960d8 BUILD: Build with make (#306)
* Use a Makefile to configure,build or clean the images.

* Update docs

* Remove old build script.
2019-01-04 22:01:43 +01:00
Jasper van der Neut - Stulen
5fc32d2eb7 OS: Run ash as login shell, so $PATH is set correctly. (#305) 2019-01-04 22:00:03 +01:00
Pascal Vizeli
2be8aecfbd OS: Fix docker-init (#302) 2019-01-03 21:47:44 +01:00
Pascal Vizeli
e0e87141c6 Build: Enable LTO for GCC/Binutils (#301)
* Build: Enable LTO for GCC/Binutils

* Update odroid_c2_defconfig

* Update ova_defconfig

* Update rpi0_w_defconfig

* Update rpi2_defconfig

* Update rpi3_64_defconfig

* Update rpi3_defconfig

* Update rpi_defconfig

* Update tinker_defconfig
2019-01-01 15:46:33 +01:00
Pascal Vizeli
76553bf984 OPI: Fix kernel config path 2019-01-01 15:17:03 +01:00
Alastair D'Silva
96e7e57fc4 Add support for the Orange Pi Prime (#298)
* Add support for the Orange Pi Prime

Signed-off-by: Alastair D'Silva <alastair@d-silva.org>

* Update opi_prime_defconfig

* Delete kernel.config

* Update opi_prime_defconfig
2018-12-31 11:58:41 +01:00
Pascal Vizeli
26d427ef1d Update README.md 2018-12-31 11:18:22 +01:00
Pascal Vizeli
f7eb215016 Build: Update buildroot 2018-11.1 (#300)
* Build: Update buildroot 2018-11.1

* Add cli to image
2018-12-31 02:32:21 +01:00
Jasper van der Neut - Stulen
8810b0409c OS: Make use of hardware rng devices (#299) 2018-12-30 23:04:01 +01:00
Pascal Vizeli
5adc9d0080 Kernel: Add support for RFLink (#297) 2018-12-29 22:25:57 +01:00
Jasper van der Neut - Stulen
59dba51f38 OVA: Make image bootable from virtio disk (#296) 2018-12-29 18:24:02 +01:00
Jasper van der Neut - Stulen
f711123582 Documentation: Add for intel-nuc board (#295)
Documentation: Add for intel-nuc board
2018-12-28 22:38:50 +01:00
Pascal Vizeli
3cbe6c9816 Bump version to 2.5 2018-12-28 17:42:33 +01:00
Pascal Vizeli
a5aaf01042 Build: Split kernel files for maintaining (#294)
* Build: Split kernel files for maintaining

* Update hassos.config

* Update odroid_c2_defconfig

* Update ova_defconfig

* Update rpi0_w_defconfig

* Update rpi2_defconfig

* Update rpi3_64_defconfig

* Update rpi_defconfig

* Update tinker_defconfig

* Update hassos.config

* Update intel_nuc_defconfig

* Delete misc.config

* Update hassos.config

* Update intel_nuc_defconfig

* Update odroid_c2_defconfig

* Update ova_defconfig

* Update rpi0_w_defconfig

* Update rpi2_defconfig

* Update rpi3_64_defconfig

* Update rpi3_defconfig

* Update rpi_defconfig

* Update tinker_defconfig

* Update hassos.config
2018-12-28 17:34:30 +01:00
Pascal Vizeli
934b276a3c Revert "Build: Split kernel files for maintaining (#291)" (#293)
This reverts commit 615daddbf6.
2018-12-28 14:16:31 +01:00
Pascal Vizeli
615daddbf6 Build: Split kernel files for maintaining (#291)
* Build: Split kernel files for maintaining

* Update hassos.config

* Update odroid_c2_defconfig

* Update ova_defconfig

* Update rpi0_w_defconfig

* Update rpi2_defconfig

* Update rpi3_64_defconfig

* Update rpi_defconfig

* Update tinker_defconfig

* Update hassos.config

* Update intel_nuc_defconfig
2018-12-28 14:15:22 +01:00
Jasper van der Neut - Stulen
9bc61e6318 Intel NUC support (#288)
* Add hassos configuration for intel-nuc:

 * Cloned from ova config
 * Use default amd64 kernel config
 * Add support for Intel IGB type nics
 * Add rng-tools for better random

* Build with iwlwifi module & firmware (only newer modules with iwlmvm firmware)

* Include firmware for 915, which should improve power efficiency.
Build display and audio as a module to make it all work.

* Add intel_nuc to build script.

* Change directory structure as proposed by @pvizeli

*  * Fix paths
 * Remove unused patch directory

* Unduplicate barebox config.
2018-12-28 11:09:24 +01:00
Pascal Vizeli
a860374d64 Merge pull request #285 from home-assistant/dev
Release 2.4
2018-12-18 21:21:11 +01:00
Justin Otherguy
42c2f88588 Build: Replace "~/hassos-cache" with "$HOME/hassos-cache" (#281)
Build: Replace "~/hassos-cache" with "$HOME/hassos-cache"
2018-12-10 23:54:50 +01:00
Pascal Vizeli
2107a6b64d Build: Add patch source to tinker (#278) 2018-12-06 10:20:42 +01:00
Ryan Bray
75e721e77e OdroidC2: Updating Kernel (#277) 2018-12-06 10:09:16 +01:00
Pascal Vizeli
fd707ba270 Build: Fix bug with glibc dt-utils (#275)
* Fix bug with glibc dt-utils

* Fix openvmtools

* Fix openvmtools p2
2018-12-05 07:33:15 +01:00
Pascal Vizeli
76fad70ebe Update buildroot 2018.11 (#274) 2018-12-02 16:25:21 +01:00
Pascal Vizeli
d6ad746fda Documentation: maintain local changes for ntp (#271) 2018-11-30 17:00:56 +01:00
Pascal Vizeli
60c9013535 Travis (#269)
* Update build-all.sh

* Delete ovf-create.sh

* Update patches.sh

* Update hdd-image.sh

* Create .travis.yml

* Update hdd-image.sh

* Update hdd-image.sh

* Update hdd-image.sh

* Update hdd-image.sh

* Update ota.sh

* Update post-build.sh

* Update post-image.sh

* Update rauc.sh

* Update rootfs-layer.sh

* Update hassos-cli

* Update hassos-supervisor

* Update hassos-config

* Update hassos-apparmor

* Update hassos-expand

* Update hassos-persists-journald

* Update hassos-rate

* Update hassos-hook.sh

* Update hassos-hook.sh

* Rename uboot-boot.sh to uboot-boot.ush

* Rename uboot-boot.sh to uboot-boot.ush

* Update hassos-hook.sh

* Rename uboot-boot.sh to uboot-boot.ush

* Rename uboot-boot.sh to uboot-boot.ush

* Update hassos-hook.sh

* Update odroid_c2_defconfig

* Update rpi0_w_defconfig

* Update rpi2_defconfig

* Update rpi3_64_defconfig

* Update rpi3_defconfig

* Update rpi_defconfig

* Update tinker_defconfig

* Update enter.sh

* Update .travis.yml
2018-11-30 16:22:04 +01:00
Pascal Vizeli
ae0a2fe264 OS: move service scripts into libexec 2018-11-29 16:01:16 +00:00
Pascal Vizeli
bc3cc20629 Don't use a bind mount for docker data (#266) 2018-11-29 15:20:58 +01:00
Pascal Vizeli
d94095a565 OVA: Add driver support for Xen, Hyper-V (#265)
* OVA: Add driver support for Xen, Hyper-V

* Fix devices
2018-11-28 01:04:18 +01:00
Pascal Vizeli
8ed63a9aab Fix tini static for docker (#263) 2018-11-27 21:34:54 +01:00
Pascal Vizeli
27a94565ea Update containerd to 1.2.0 (#262) 2018-11-27 09:20:21 +01:00
Pascal Vizeli
d46e2a808f Revert "Update containerd to 1.2.0 (#260)" (#261)
This reverts commit 50bc0451d0.
2018-11-27 00:06:46 +01:00
Pascal Vizeli
50bc0451d0 Update containerd to 1.2.0 (#260) 2018-11-26 16:35:54 +01:00
Pascal Vizeli
5ff51846e2 Build: Support VDI, VDHX, VMDK (#259)
* Support VDI, VDHX, VMDK

* Update hassos-hook.sh

* Update hdd-image.sh
2018-11-26 12:14:44 +01:00
Pascal Vizeli
4411307353 Buildroot 2018-11 (#258)
* Update to buildroot 2018.11

* containerd update

* runc update

* runc docker engine

* runc docker proxy

* update rpi firmware

* update network manager

* update dhcpd

* update wait on network

* update rpi wifi

* revert glibc
2018-11-26 11:04:01 +01:00
Pascal Vizeli
a9bbc7babe Bump version 2.4 2018-11-25 16:31:10 +01:00
Pascal Vizeli
80f5fe0722 Delete release-drafter.yml 2018-11-23 08:06:20 +01:00
Pascal Vizeli
519acca46d CLI: Update to version 7 2018-11-22 23:52:50 +00:00
Pascal Vizeli
566641bf8a Supervisor: Update to version 140 2018-11-22 23:52:29 +00:00
Pascal Vizeli
4d99243c91 Merge pull request #256 from home-assistant/dev
Release 2.3
2018-11-23 00:47:07 +01:00
Pascal Vizeli
18640da277 Merge branch 'dev' of https://github.com/home-assistant/hassos into dev 2018-11-22 14:45:25 +00:00
Pascal Vizeli
5351b542ff Raspberry: fix wrong patch folder in config p2 2018-11-22 14:44:54 +00:00
Pascal Vizeli
033e153d49 Delete move.yml 2018-11-22 14:48:18 +01:00
Pascal Vizeli
ad898040ac Create release-drafter.yml 2018-11-22 14:48:09 +01:00
Pascal Vizeli
9e29a12f95 Raspberry: fix wrong patch folder in config 2018-11-22 12:24:13 +00:00
Pascal Vizeli
0ab78a97c7 Tinker: update kernel 4.14.82 2018-11-21 14:57:01 +00:00
Pascal Vizeli
43c423243a OVA: update kernel 4.14.82 2018-11-21 10:14:58 +00:00
Pascal Vizeli
19488834e4 Raspberry: update kernel 4.14.81 2018-11-21 10:13:28 +00:00
Pascal Vizeli
dc35208efe OS: allow set NTP (#252)
* OS: allow set NTP

* Create etc-systemd-timesyncd.conf.mount

* Update hassos-config

* Update configuration.md

* add link

* Update Documentation/configuration.md

Co-Authored-By: pvizeli <pascal.vizeli@syshack.ch>
2018-11-21 00:28:40 +01:00
Simon Holzmayer
2435ca9065 provide a message when the OTA is skipped (#255)
Closes #249
2018-11-20 15:57:58 +01:00
cogneato
404efdee52 clarity and grammar fixes (#248) 2018-11-16 16:34:13 +01:00
Joeboyc2
cbd9b45adc Updated the fine nmcli command (#243) 2018-11-14 21:26:07 +01:00
seanodell
56992c6a77 Documentation: Add hidden=true comment for Wifi routers not broadcasting SSID (#241) 2018-11-05 20:45:24 +01:00
thomasvs
47bb76acec Clarify the format of the address field to avoid people accidentally swapping IP address of hassio vs. gateway. (#237) 2018-11-01 13:45:41 +01:00
Pascal Vizeli
caf708e14a Raspberry: Bugfix not try to load Bluetooth (#235) 2018-10-29 22:42:47 +01:00
Simon Holzmayer
809abbfde2 Fixed keeping name of udev rules after usb import (#232)
Closes #231
2018-10-29 16:01:29 +01:00
Pascal Vizeli
a2363d9a27 OS: bugfix acpid service file (#229)
* OS: bugfix acpid service file

* Update busybox-acpid.service
2018-10-29 16:00:20 +01:00
Josh Cooper
5cdf66c2c8 Typo fix (#228)
* typo fix

stands instead of stays

* typo fix 2
2018-10-28 00:04:59 +02:00
Pascal Vizeli
a7fa7efbf9 Raspberry: update kernel 4.14.78 2018-10-27 13:07:12 +00:00
Pascal Vizeli
976e9b0bce OVA: update kernel 4.14.78 2018-10-27 12:07:46 +00:00
Ryan Bray
960e11dc4f Uboot bootstate (#215)
* Uboot: cleaning up bootstate env import/export.

* Tinker: Add potential eMMC boot support.
2018-10-26 11:36:29 +02:00
Pascal Vizeli
2291e8599e OS: Config importer support now also boot partition (#212)
* OS: Config importer support now also boot partition

* Update configuration.md

* Cleanup config after import

* Update hassos-config
2018-10-25 21:59:58 +02:00
Dave
bcb9c3fa1f Remove smart quotes and fix typo (#222)
Both of these create errors when copy pasting to follow the instructions:
  - Remove smart quotes from around "HassOS default"
  - Changing typo of 'system_connections' to 'system-connections'
2018-10-24 15:55:09 +02:00
Johannes Truschnigg
b827a90a35 Enable XHCI (USB3) support in ova kernel config (#221)
With this change, hassos can have USB devices passed into a guest VM
with the hypervisor emulating an XHCI controller. QEMU recommends using
XHCI whenever possible, as it offers a much more virtualization-friendly
architecture than its [EO]HCI predecessors (which are already support by
the hassos kernel).
2018-10-24 15:54:26 +02:00
Johannes Truschnigg
921dd693dd Add informal "getting started with development" document (#220) 2018-10-24 15:52:45 +02:00
Pascal Vizeli
005cbc0b89 OS: use newer docker run command (#217)
* OS: use newer docker run command

* Update hassos-supervisor
2018-10-16 16:32:00 +02:00
Robert Schindler
482e6f7a7b Added 8021q kernel module for VLAN support (#216) 2018-10-13 17:58:13 +02:00
Pascal Vizeli
b83bfc5910 Bump version 2018-10-13 17:57:22 +02:00
Pascal Vizeli
c475daf889 build: tuning dockerignore 2018-10-11 20:56:11 +02:00
Pascal Vizeli
dac76b1632 Allow udev rules & make it persistent (#210)
* Install default to lib

* Create hmip-rfusb.rules

* Create etc-udev-rules.d.mount

* Update hassos-config

* Update configuration.md

* Update rauc.sh

* Add ln
2018-10-11 20:49:20 +02:00
Johannes Truschnigg
faa371191f Implement basic ACPI shutdown support via busybox acpid (#209)
On systems where ACPI support is present as inidcated by the presence of
/proc/acpi (e.g. on OVA compatible hypervisors), we want to properly
shut down the system when the power button is pressed (or the hypervisor
simulates this kind of event to the guest machine that executes hassos).

This changeset provides the following basic infrastructure for this
feature to work as expected:

 * a systemd service to start acpid, if ACPI support can be assumed
 * an acpid configuration directory
 * a trivial shutdown script to invoke when a PWR event is registered
2018-10-10 11:34:06 +02:00
Makrand Gupta
8cde7f9192 Fixed typo in 'address' property name for Static IP (#208) 2018-10-10 11:31:59 +02:00
Pascal Vizeli
1112a10509 Raspberry: Fix power options 2018-09-24 16:30:04 +02:00
borpin
ad9f21fdfb Update documentation for a static IPV4 address via nmcli (#199)
* Update documentation for a static IPV4 address via nmcli

This update documents a method to change to a Static IPV4 address using the NetworkManager CLI (nmcli).

Happy for the formatting to be modified to suit local convention.

I cannot be more specific about how to get into the base OS as I don't know!

* Additional nmcli commands for dns and gateway

I found that there is a need to add in the dns and gateway IP addresses otherwise there was no route out.  I note there are a number of issues alive re this routing problem e.g. https://github.com/home-assistant/home-assistant/issues/15221

* Update network.md
2018-09-20 11:48:57 +02:00
Ryan Kladar
55cc60fc8e MYLAN_SECRED_KEY should be MYLAN_SECRET_KEY, no? (#196)
Changed the placeholder secret key name spelling mistake.
2018-09-17 23:07:08 +02:00
Pascal Vizeli
075799aaa8 Raspberrypi: Performance on Raspberry Pi due to governor (#193)
* Raspberrypi: Performance on Raspberry Pi due to governor

* Update rpi0_w_defconfig

* Update rpi2_defconfig

* Update rpi3_defconfig

* Update rpi_defconfig

* Update rpi3_64_defconfig
2018-09-10 12:22:52 +02:00
Johannes Truschnigg
3733a07bac Do not assume index 0 for boot medium (#188)
When booting the HassOS VMDK appliance disk image on QEMU with OVMF UEFI
firmware, barebox numbers devices differently from other environments.

This patch makes the barebox `sh` implementation expand a pathname
wildcard at runtime, so that assigned disk indices != 0 will also work.

This fix introduces a potential (but most likely irrelevant)
bug/problem: If there is more than one disk connected to the system with
a matching name assigned, the wildcard will expand to two or more
pathnames, breaking the resulting `mount` command.
2018-09-04 21:30:32 +02:00
Ryan Bray
eb553bec07 Odroid-C2: updating kernel to 4.14.67 (#176) 2018-08-26 22:09:49 +02:00
Pascal Vizeli
803bfc8391 Merge pull request #177 from home-assistant/dev
Release 2.2
2018-08-26 10:06:14 +02:00
Pascal Vizeli
e7e2dc2aad Raspberry: fix path for config.txt 2018-08-25 22:37:47 +00:00
Pascal Vizeli
352072cc5a Supervisor: Update to version 127 2018-08-25 21:13:11 +00:00
Pascal Vizeli
5d90fa9e20 Merge pull request #175 from home-assistant/kernel
Latest kernel updates/bugfixes
2018-08-25 23:10:07 +02:00
Pascal Vizeli
54389be443 Raspberry: Bump Firmware for 4.14.66 2018-08-25 21:07:50 +00:00
Pascal Vizeli
ae8dec9f72 Documentation: Update Kernel infos 2018-08-25 20:49:46 +00:00
Pascal Vizeli
064ee9ef84 Raspberry: update kernel 4.14.66 2018-08-25 20:47:18 +00:00
Pascal Vizeli
21e3a30012 Tinker: update kernel 4.14.67 2018-08-25 20:44:10 +00:00
Pascal Vizeli
8d86fa9ec9 OVA: update kernel 4.14.67 2018-08-25 20:43:50 +00:00
Pascal Vizeli
1ead97f64a raspberry: Use new config.txt (#174) 2018-08-25 22:40:17 +02:00
Pascal Vizeli
703f0168bf odroid-c2: Add device to auto build list (#173) 2018-08-25 22:38:52 +02:00
Pascal Vizeli
7cea5a829f Merge pull request #172 from home-assistant/ota-odriod
odroid-c2: initial import
2018-08-25 22:13:26 +02:00
Dmitri Pribysh
0bc81f78ec Fix syntax highlighting in network docs (#171) 2018-08-25 21:40:15 +02:00
Ryan Bray
331336a2d4 Odroid-C2: Fix documentation typo/formatting 2018-08-25 11:48:42 -06:00
Ryan Bray
8086b55acd Odroid-C2: Updating Documentation 2018-08-25 11:45:59 -06:00
Pascal Vizeli
2a0d551667 Bump version 2.2 2018-08-25 16:46:35 +00:00
Pascal Vizeli
61b0b333f0 ota: skeep mbr 2018-08-25 07:52:46 +00:00
Ryan Bray
dc0f6367cb Odroid-C2: Build Fixes, correct root partition 2018-08-24 22:40:15 -06:00
Pascal Vizeli
486161f2d8 Fix uboot 2018-08-25 00:37:00 +00:00
Pascal Vizeli
9441f6b16e Fix uboot 2018-08-24 23:05:05 +00:00
Ryan Bray
514c59796f Odroid-c2: Moving to 4.14.36 kernel 2018-08-24 22:52:18 +00:00
Pascal Vizeli
ebf84216e9 cleanup 2018-08-24 22:46:03 +00:00
Pascal Vizeli
74ff13e25e P1 2018-08-24 21:50:29 +00:00
Pascal Vizeli
9b170812d6 Cleanup odroid 2018-08-22 22:15:08 +00:00
Ryan Bray
3b45011982 Reverting 4.17 buildroot changes 2018-08-21 03:05:25 -06:00
Ryan Bray
8e1af1313b Odroid: Allow booting from eMMC, Use bootstate partition rather than env file 2018-08-21 02:59:30 -06:00
Ryan Bray
0f8010bc90 Odroid-C2: Move to 4.17 kernel, rework directories 2018-08-21 02:56:00 -06:00
Pascal Vizeli
7006a5fd64 Merge pull request #162 from rbray89/dev
Adding Support for Odroid C2
2018-08-19 19:14:36 +02:00
Ryan Bray
170ed2db00 updating to proper homeassistant image 2018-08-17 02:19:19 -06:00
Ryan Bray
ef40d38b12 rename hardkernel-sbl to hardkernel-boot 2018-08-16 22:24:11 -06:00
Ryan Bray
d144f72868 Odroidc2: boot arg cleanup 2018-08-16 22:24:11 -06:00
Ryan Bray
11088580c5 odroid-c2: Initial Support
Working:
* Ethernet
* Resize of Data
* RAUC boot marking/fetching
* CMD Line into HASSOS and Linux

Partially working:
* USB (requires 1+ devices in at boot. Seems to be a kernel/dt issue.)

Untested:
* RAUC Update
* HDMI

Not working:
* Homeassistant
** We see:
hassio > ha info
The HTTP request failed with the error: Get http://hassio/homeassistant/info: dial tcp 172.30.32.2:80: getsockopt: connection refused
2018-08-16 22:24:11 -06:00
Fabian Affolter
5c8f8bea48 Minor changes 2018-08-15 08:30:15 +02:00
Fabian Affolter
8bb3732934 Fix typos 2018-08-15 08:27:52 +02:00
Fabian Affolter
86f88aae0a Minor changes 2018-08-15 08:26:12 +02:00
Fabian Affolter
10e310d8b5 Minor changes 2018-08-15 08:24:24 +02:00
Pascal Vizeli
6467f343cd Merge pull request #158 from home-assistant/doc-rpi
Documentation: RPI, disable bluetooth for serial console
2018-08-11 23:21:19 +02:00
Pascal Vizeli
e20249676a Documentation: RPI, disable bluetooth for serial console 2018-08-11 23:20:37 +02:00
Pascal Vizeli
67e722b032 Merge pull request #157 from home-assistant/dev
Beta 2.1
2018-08-11 21:46:24 +02:00
Pascal Vizeli
518df77e05 Merge branch 'master' into dev 2018-08-11 21:45:46 +02:00
Pascal Vizeli
202b267d09 os: add spl mbr 2018-08-11 11:03:50 +00:00
Pascal Vizeli
5ad184f943 os: use hyprid for SPL to fix windows 2018-08-11 11:02:15 +00:00
Pascal Vizeli
6ab6cd7ff4 os: revert gpt fix / not needed 2018-08-11 10:35:43 +00:00
Pascal Vizeli
a2c6107685 os: fix GPT alligne with SPL images 2018-08-11 08:56:46 +00:00
Pascal Vizeli
5f24bd5574 build: optimize vmdk 2018-08-10 15:10:38 +00:00
Pascal Vizeli
ef61756566 Documentation: Raspeberry Pi I2C (#147) 2018-08-10 12:18:45 +02:00
Pascal Vizeli
7a3d3ae502 tinker: use a other address for boot config 2018-08-10 00:40:55 +02:00
Pascal Vizeli
4346220e27 os: fix bootstate link 2018-08-08 15:09:08 +00:00
Pascal Vizeli
12b5731e20 os: fix u-boot env size (#153)
* os: fix u-boot env size

* Delete fw_env.config
2018-08-08 12:48:07 +02:00
Pascal Vizeli
72a3aec55b tinker: fix bluetooth forking 2018-08-07 20:28:55 +00:00
Pascal Vizeli
9ef96373a9 Update buildroot 2018.05.1 / u-boot (#150)
* Update buildroot 2018.05.1 / u-boot

* Cleanup

* Fix bl
2018-08-07 16:45:12 +02:00
Pascal Vizeli
bbe4c47574 os: improve fileenv u-boot (#148) 2018-08-06 23:45:12 +02:00
Pascal Vizeli
1dc2392f15 Fix some build errors (#146)
* Fix folder

* Add tinker board to build all

* Fix download URL

* Revert uart patch

* Fix link p2

* Fix cmdline
2018-08-06 00:51:12 +02:00
Pascal Vizeli
c5e85a625f OS: Update supervisor 123 2018-08-05 10:22:34 +00:00
Pascal Vizeli
fbb45e1544 tinker: Initial support (#140)
* tinker: initial support

* Fix info

* Fix uboot defconfig

* Split kernel config

* Fix name

* Add post-image

* Init different boot

* Add SPL images

* Dynamic rauc config

* Support SPL for OTA

* Fix expand script style

* Fix SPL

* Bump build u-boot

* Cleanup

* Add cmd for scritps

* Use kernel from armbian

* Fix u-boot

* Add bluetooth support

* Fix bt

* Fix env

* Change uart debug like rpi

* move config
2018-08-03 13:21:55 +02:00
Pascal Vizeli
48500a6c6e rpi: Update kernel & firmware 4.14.58 (#139) 2018-07-29 00:10:24 +02:00
Pascal Vizeli
ae58be25ad OVA: Update kernel to 4.14.59 (#138) 2018-07-28 23:52:06 +02:00
Pascal Vizeli
42087b40c5 OVA: Add support for Aeotec Zstick (#132) 2018-07-28 23:39:03 +02:00
Pascal Vizeli
e4b99ea7c0 OS: Update supervisor 121 (#137) 2018-07-28 23:38:40 +02:00
Pascal Vizeli
233e097cc4 fix wireless settings (#124) 2018-07-19 10:50:46 +02:00
Pascal Vizeli
e093875e66 OVA: Fix serial support (#119)
OVA: Fix serial support
2018-07-18 16:07:06 +02:00
Pascal Vizeli
312766e962 Add support for VIRTIO (#118)
* Add support for VIRTIO

* Update kernel.config
2018-07-18 11:57:31 +02:00
Pascal Vizeli
e3ceea2058 Allow more USB serial device on OVA (#115)
* Allow more USB serial device on OVA

* Update kernel.config
2018-07-17 09:57:35 +02:00
Robin
49edc087b0 Update network.md (#114)
Clarify that you are editing the file `my-network` which is what I understand from https://www.home-assistant.io/hassio/installation/
2018-07-17 09:48:30 +02:00
Pascal Vizeli
75cd510283 Fix prevent device tree on rpi (#107)
* Fix prevent device tree

* Update uboot-boot.sh

* Update rauc-hook

* Update rauc-hook
2018-07-15 21:40:28 +02:00
Pascal Vizeli
3847d13b1a Update OVA kernel to 4.14.55 (#108) 2018-07-15 21:40:09 +02:00
Pascal Vizeli
eaab4a7a86 Raspberry Pi node of 64bit (#103) 2018-07-14 11:07:18 +02:00
DubhAd
d5953e13be Grammar and language tweaks (#101)
Some grammar and language tweaks
2018-07-14 09:01:36 +00:00
DubhAd
ac2a1883a2 Grammar and language tweaks (#101)
Some grammar and language tweaks
2018-07-14 11:00:13 +02:00
Pascal Vizeli
85c9aa4191 Fix handling with resolv.conf (#99) 2018-07-13 18:29:34 +02:00
Pascal Vizeli
a7b16cd051 Update rpi kernel 4.14.54 / Firmware / wifi (#98)
* Update rpi kernel 4.14.54 / Firmware / wifi

Signed-off-by: Pascal Vizeli <pvizeli@syshack.ch>

* Fix patch

* Update bluetooth-bcm43xx.mk

* Update bluetooth-bcm43xx.mk

* Update bluetooth-bcm43xx.mk
2018-07-13 09:52:45 +02:00
Pascal Vizeli
d7129fb57c Update docker & new publish (#96) 2018-07-12 12:59:45 +02:00
Pascal Vizeli
1254c6162c Update Documentation (#95)
* Update deployment.md

* Update raspberrypi.md

* Update raspberrypi.md

* Update raspberrypi.md
2018-07-12 12:50:28 +02:00
Pascal Vizeli
95a2844265 Fix boot menu (#94)
* Fix boot menu

* Update action
2018-07-10 14:53:29 +02:00
Pascal Vizeli
5ce7331001 Update bluetooth docs & add udev rules (#92)
* Update bluetooth docs

* add udev rules

* Add cmp to build

* Create bluetooth.md
2018-07-10 10:11:58 +02:00
Pascal Vizeli
7cffb1f45b Native bluetooth support (#91)
* Add bluez

* rpi firmware

* add rpi support

* Make packages from rpi

* Fix build

* Fix target

* persistent

* fix package

* Auto enable

* Fix parameter

* Fix rpi

* Fix done
2018-07-10 01:14:07 +02:00
Pascal Vizeli
a0551d8010 Check simlink (#90) 2018-07-08 14:19:30 +02:00
Pascal Vizeli
38c1df36c0 Fix time on overlay (#88)
* Fix time on overlay

* Fix rights

* Fix timesync
2018-07-08 00:43:46 +02:00
Pascal Vizeli
5526dbb2f7 Bump version to 2.1 2018-07-07 13:25:20 +02:00
Pascal Vizeli
fd56d6544c Merge pull request #85 from home-assistant/dev
Beta 2.0
2018-07-07 13:24:51 +02:00
Pascal Vizeli
d2ba03164b Add powersave config to network manager (#86)
* Add powersave config to network manager

* Update network.md
2018-07-07 10:45:59 +02:00
Pascal Vizeli
c6d0fef0b4 Some cleanup (#84) 2018-07-06 21:04:48 +02:00
Pascal Vizeli
0671e3f71c Reset if we can't boot (#83)
* Update uboot-boot.sh

* Update uboot-boot.sh
2018-07-06 19:08:52 +02:00
Pascal Vizeli
14833a110f Use wait on network to delay the startup (#81)
* Use wait on network to delay the startup

* Update nm.conf

* Create nm.conf

* Update hassos-supervisor.service

* Rename hassos.conf to docker.conf

* Create hassos.conf

* Create hassos.conf

* Update hassos.conf

* aply patch

* Mark only failed

* Fix start order
2018-07-06 18:21:19 +02:00
Pascal Vizeli
988d4ebecf Update supervisor 115 (#82) 2018-07-06 14:35:22 +02:00
Pascal Vizeli
bf59b7744d Use dhcp client / avahi after NM (#75)
* Use dhcp client / avahi after NM

* Store networkmanager

* Add default connection

* cleanup

* cleanup lease

* faster boot

* Cleanup

* Fix permission
2018-07-05 20:00:56 +02:00
Gabriel Oliveira
4a80c7fcd0 Fix config documentation closing tags (#80) 2018-07-05 16:40:41 +02:00
Pascal Vizeli
6c58eb1615 Fix /usr/sbin/hassos-cli is not in /etc/shells (#78)
* Update rootfs-layer.sh

* Update rootfs-layer.sh

* Update rootfs-layer.sh
2018-07-05 13:44:52 +02:00
cogneato
46d6dba859 Update configuration.md (#50)
* Update configuration.md

Clearing up documentation, grammar fixes.

* changed known_hosts to authorized_keys

* Update configuration.md
2018-07-03 07:32:44 +02:00
cogneato
12393e083d Update network.md (#51)
* Update network.md

Clearing up network documentation, grammar

* Update network.md
2018-07-03 07:30:17 +02:00
Pascal Vizeli
3700d744b4 Update CLI / Supervisor (#71) 2018-07-03 00:00:25 +02:00
Pascal Vizeli
7e665a7b42 Fix persistent log (#70) 2018-07-02 23:53:07 +02:00
Pascal Vizeli
c860229130 Change chmod of network connection files from fat32 (#69) 2018-07-02 23:03:13 +02:00
Pascal Vizeli
32ab05bd2e Fix update script with uptime (#68) 2018-07-02 22:51:54 +02:00
Pascal Vizeli
8792d37402 Fix docker warning on rpi (#67) 2018-07-02 21:43:33 +02:00
Pascal Vizeli
414b59ac4a Fix label name in test script (#66)
* Fix label name in test script

* Update hassos-config
2018-07-02 21:24:05 +02:00
Pascal Vizeli
f8fa170e2a Fix spell in journald script (#65) 2018-07-02 19:58:00 +02:00
Pascal Vizeli
11b1946cd7 Make logs persistent over reboot and cleanup (#61)
* Create hassos-persists-journald

* Create hassos-persists-journald.service

* Set ln & permission

* Enable persists journald

* Update hassos-persists-journald
2018-07-02 01:05:21 +02:00
Pascal Vizeli
7d4b424d2f Map /etc/machine-id into supervisor/cli (#60)
* Map /etc/machine-id into supervisor/cli

* Update hassos-cli

* Update hassos-supervisor
2018-07-01 15:15:54 +02:00
Pascal Vizeli
6aa8e61d88 Add lost persistent ssh folder (#58)
Signed-off-by: Pascal Vizeli <pvizeli@syshack.ch>
2018-07-01 00:38:30 +02:00
Pascal Vizeli
d536e3d7a7 Use wpa_supplicant with NetworkManager (#57) 2018-07-01 00:29:10 +02:00
Pascal Vizeli
2614ffce40 Use CONFIG as label for config partition (#56)
* Use CONFIG as label for config partition

* Update configuration.md

* Update hassos-config
2018-07-01 00:28:00 +02:00
Pascal Vizeli
dde6d8f806 Set hassos supervisor to rauc (#55)
* Set hassos supervisor to rauc

* Update post-install

* Update hassos-config
2018-06-29 15:23:49 +02:00
Pascal Vizeli
8dd8816e4e Fix authorized_keys keys (#53)
* Fix authorized_keys keys

* Update hassos.conf

* Update configuration.md

* Update hassos-config

* Update hassos-config
2018-06-28 22:21:50 +02:00
Pascal Vizeli
f739aed8de Fix hassos-conf label (#48)
* Update mnt-config.mount

* Update configuration.md

* Update configuration.md

* Update mnt-config.mount

* Update configuration.md
2018-06-28 22:20:34 +02:00
Pascal Vizeli
f6a916001d Update ova.md (#47) 2018-06-27 13:56:52 +02:00
Pascal Vizeli
23a58b23b5 We publish now the vmdk and not OVA/OVF (#46)
* Update upload-rel.sh

* Create ova.md
2018-06-27 12:05:44 +02:00
Pascal Vizeli
d3e3e36a6e Improve the documentation (#44)
* Create network.md

* Update configuration.md

* Update network.md

* Update network.md
2018-06-26 22:24:15 +02:00
Pascal Vizeli
af23b6199e Add script for github upload (#43)
Signed-off-by: Pascal Vizeli <pvizeli@syshack.ch>
2018-06-26 21:32:41 +02:00
Pascal Vizeli
80079930c5 Include ota script into board image (#42) 2018-06-26 13:28:00 +02:00
Pascal Vizeli
ca50a86768 Bump version to next development release (#41) 2018-06-26 12:27:09 +02:00
Pascal Vizeli
6e9326d11b Fix build script for new layout (#40) 2018-06-26 11:48:16 +02:00
Pascal Vizeli
b731b422fe Merge pull request #38 from home-assistant/dev
Release 0.7 beta
2018-06-26 10:20:24 +02:00
Pascal Vizeli
27cd425f5b Use systemd for config mount (#37)
* Create mnt-config.mount

* Update hassos-config

* Update mnt-config.mount

* Update hassos-config
2018-06-26 10:18:16 +02:00
Pascal Vizeli
42f1c4bf01 cleanup avahi
Signed-off-by: Pascal Vizeli <pvizeli@syshack.ch>
2018-06-25 22:11:59 +00:00
Pascal Vizeli
b3943870dc Fix rauc config 2018-06-25 21:11:18 +00:00
Pascal Vizeli
4b4e22c355 Fix args 2018-06-25 19:22:15 +00:00
Pascal Vizeli
7675cc61fb Update Hass.io CLI to version 5 (#36) 2018-06-25 20:36:30 +02:00
Pascal Vizeli
11b1867c73 Create build.md 2018-06-25 09:00:31 +02:00
Pascal Vizeli
5cd03d19dd Update README.md 2018-06-25 08:59:43 +02:00
Pascal Vizeli
26d7a4cb23 Update hassos.conf 2018-06-25 08:58:26 +02:00
Pascal Vizeli
cc80265997 Run dropbear only if they have a known_hosts 2018-06-25 08:55:16 +02:00
Pascal Vizeli
8434f3ee55 Create docker.conf 2018-06-25 08:51:22 +02:00
Pascal Vizeli
ddde16216c Rename hassos.conf to docker.conf 2018-06-25 08:50:39 +02:00
Pascal Vizeli
3e8499ecbf Use correct cert (#35)
* Use correct cert

* Fix boot partition handling

* Cleanup rauc handling

* Make a reboot

* handling
2018-06-24 23:41:04 +02:00
Pascal Vizeli
42dc915436 Create deployment.md 2018-06-24 10:41:05 +02:00
Pascal Vizeli
17ca2ccf0a Create OTA updater (#34)
* Create OTA updater

* Create .gitignore

* Update build-all.sh

* Update hdd-image.sh

* Update ota.sh

* Update ota.sh

* Update ota.sh

* Update ota.sh

* Update post-image.sh

* Create name.sh

* Update name.sh

* Update post-build.sh

* Update name.sh

* Update post-image.sh

* Update ota.sh

* Update hdd-image.sh

* Update post-image.sh

* Update name.sh

* Update ota.sh

* Update post-image.sh

* Update hdd-image.sh

* Update hdd-image.sh

* Update hdd-image.sh

* Update post-image.sh

* Update post-image.sh

* Update hdd-image.sh

* Update hdd-image.sh

* Update post-image.sh

* Update post-image.sh

* Update post-image.sh

* Update info

* Update info

* Update info

* Update info

* Update info

* Update info

* Rename buildroot-external/board/raspberrypi/uboot-boot64.sh to buildroot-external/board/raspberrypi/rpi3-64/uboot-boot.sh

* Update rpi3_64_defconfig

* Update hdd-image.sh

* Update ota.sh

* Update post-image.sh

* Update post-image.sh

* Fix building

Signed-off-by: Pascal Vizeli <pvizeli@syshack.ch>

* Fix building v2

Signed-off-by: Pascal Vizeli <pvizeli@syshack.ch>
2018-06-24 00:11:54 +02:00
Pascal Vizeli
1e30f5120c Update configuration.md 2018-06-21 15:50:01 +02:00
Pascal Vizeli
e30e15dc53 fix rauc name 2018-06-21 15:49:37 +02:00
Pascal Vizeli
3aaadf3f5f Update supervisor 108 2018-06-21 11:37:10 +00:00
Pascal Vizeli
161c8624e0 Bump version to 0.7 2018-06-21 11:17:23 +02:00
Pascal Vizeli
56afd74720 Don't install kernel to rootfs 2018-06-21 09:15:28 +00:00
Pascal Vizeli
ed5a5033dd Use apparmor from s3 2018-06-20 13:28:30 +00:00
Pascal Vizeli
2abbbbd1fa Cleanup uboot handling like linux kernel 2018-06-20 10:41:45 +00:00
Pascal Vizeli
fa44e0a7fd cleanup 2018-06-17 01:25:47 +02:00
Pascal Vizeli
1a3d063fec Reboot after mark partition as bad 2018-06-16 22:24:36 +02:00
Pascal Vizeli
49df049f2c Change rauc mark handling 2018-06-16 09:06:07 +00:00
Pascal Vizeli
c657f6f3e7 Ignore debug stack usage 2018-06-16 01:27:34 +02:00
Pascal Vizeli
0a43cbdb05 Update hassio-supervisor 2018-06-14 16:44:40 +02:00
Pascal Vizeli
45274411e7 Merge pull request #31 from home-assistant/dev
Release 0.6
2018-06-14 15:43:10 +02:00
Pascal Vizeli
d5ff3596b1 Fix build script v2
Signed-off-by: Pascal Vizeli <pvizeli@syshack.ch>
2018-06-14 13:10:32 +00:00
Pascal Vizeli
95f82aa75d Fix build script
Signed-off-by: Pascal Vizeli <pvizeli@syshack.ch>
2018-06-14 05:15:10 +00:00
Pascal Vizeli
fc4de4f02a Fix 64bit
Signed-off-by: Pascal Vizeli <pvizeli@syshack.ch>
2018-06-14 00:13:35 +00:00
Pascal Vizeli
eae3659909 Add Builder script
Signed-off-by: Pascal Vizeli <pvizeli@syshack.ch>
2018-06-13 19:28:05 +00:00
Pascal Vizeli
6a05718235 Fix expander on SD cards
Signed-off-by: Pascal Vizeli <pvizeli@syshack.ch>
2018-06-13 19:12:57 +00:00
Pascal Vizeli
5055236725 Bump version 2018-06-13 17:04:33 +02:00
Pascal Vizeli
ac40e97670 Update hassio-supervisor 2018-06-12 23:23:33 +02:00
9152 changed files with 174749 additions and 93278 deletions

View File

@@ -1,3 +1,7 @@
buildroot
buildroot-external
buildroot-patches
# We don't need this folder because we map the hole folder
buildroot/
buildroot-external/
buildroot-patches/
# Ignore too
release/

32
.github/ISSUE_TEMPLATE.md vendored Normal file
View 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:**

13
.github/move.yml vendored
View File

@@ -1,13 +0,0 @@
# Configuration for move-issues - https://github.com/dessant/move-issues
# Delete the command comment. Ignored when the comment also contains other content
deleteCommand: true
# Close the source issue after moving
closeSourceIssue: true
# Lock the source issue after moving
lockSourceIssue: false
# Set custom aliases for targets
# aliases:
# r: repo
# or: owner/repo

17
.github/release-drafter.yml vendored Normal file
View 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
View 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
.gitignore vendored Normal file
View File

@@ -0,0 +1,2 @@
/release
*.pem

2
.hadolint.yaml Normal file
View File

@@ -0,0 +1,2 @@
ignored:
- DL3008

View File

@@ -1,21 +1,43 @@
FROM ubuntu:16.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 \
# 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
View 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

View File

@@ -0,0 +1,12 @@
# Bluetooth
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 to setup Bluetooth on the host, use the `bluetoothctl` utility.
## Scan devices
```
[bluetooth]# scan on
```

View 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/)|

View 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.

View 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.

View File

@@ -0,0 +1,22 @@
# Odroid-C2
## 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`
## USB
A long-standing kernel bug currently results in some odd behavior. To use the USB, a device must be plugged into one of the USB ports at hard boot. If all devices are removed from the USB ports, the USB will cease to function until a reboot.
### OTG
The OTG USB is untested.
## GPIO
Refer to [the odroid wiki](https://wiki.odroid.com/odroid-c2/hardware/expansion_connectors).

View 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).

View 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).

View 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

View 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

View File

@@ -1,5 +0,0 @@
# Raspberry PI
## Serial console
For access to terminal over serial console, add `console=ttyAMA0,115200` to `cmdline.txt` and `enable_uart=1` into `config.txt`.

View 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

View File

@@ -2,28 +2,61 @@
## Automatic
You can format a USB stick with FAT32 and name it with `hassos-config`. The layout could be look like:
```
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` (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/
known_hosts
hassos-xy.rauc
modprobe/
udev/
authorized_keys
timesyncd.conf
hassos-xy.raucb
```
- On `network` folder can hold any kind of NetworkManager connections files.
- The folder `modules` is for modules-load configuration files.
- `known_hosts` file activate debug SSH access of port `22222`.
- For firmware updates you can but the `hassos-*.rauc` OTA update they should be install.
- 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 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.
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
### Bootargs
You can edit or create a `cmdline.txt` into your boot partition. That will be read from our bootloader.
You can edit or create a `cmdline.txt` in your boot partition. That will be read from the bootloader.
### Kernel-Module
The kernel module folder `/etc/modules-load.d` is persistent and you can add your config 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
The udev rules folder `/etc/udev/rules.d` is persistent and you can add your configuration files there.
### Network
You can manual add, edit or remove connections configurations from `/etc/NetworkManager/system-connections`.
### NTP
You can manual edit the systemd timesync file on `/etc/systemd/timesyncd.conf`.
Our default NTP configuration look like:
```
[Time]
NTP=time1.google.com time2.google.com time3.google.com
FallbackNTP=0.pool.ntp.org 1.pool.ntp.org 2.pool.ntp.org 3.pool.ntp.org
```
[systemd-modules]: https://www.freedesktop.org/software/systemd/man/modules-load.d.html
[network.md]: network.md
[hassos-release]: https://github.com/home-assistant/hassos/releases/
[debug-homeassistant]: https://developers.home-assistant.io/docs/en/hassio_debugging.html

View File

@@ -0,0 +1,22 @@
# Deployment
We provide 3 different types of release builds:
- development (beta/dev)
- staging (rc)
- production (stable)
## Versioning
The format of version is *MAJOR.BUILD*. Everytime we create a new release with same userland, we bump the build number.
The development number they will be bump for the stable release version and the development version go to next major number.
## Git branch/Tag
The branch `dev` ist the actual development branch and from there we never make a release. The `master` branch contains the development version and from there we build a beta release.
If we create a new productive release, we create a new branch `rel-{MAJOR}`. They will be used for the whole cycle of this release.
## Upload release files
We use [ghr](https://github.com/tcnksm/ghr) to upload files to our repository. A binary version is available inside `scripts`.

View File

@@ -0,0 +1,59 @@
# Development
## Boot system
`BOOT_SYS`:
- efi
- hybrid
- mbr
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.
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`:
- U-Boot
- barebox
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

View File

@@ -0,0 +1,101 @@
# Getting started with HassOS development using Docker on GNU/Linux
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:
```bash
$ sudo systemctl status docker
● docker.service - Docker Application Container Engine
Loaded: loaded (/usr/lib/systemd/system/docker.service; disabled; vendor preset: disabled)
Active: inactive (dead)
Docs: https://docs.docker.com
```
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
Loaded: loaded (/usr/lib/systemd/system/docker.service; disabled; vendor preset: disabled)
Active: active (running) since Wed 2018-10-10 21:08:23 CEST; 25s ago
Docs: https://docs.docker.com
Main PID: 1531 (dockerd)
Tasks: 27 (limit: 4915)
Memory: 163.4M
CGroup: /system.slice/docker.service
├─1531 /usr/bin/dockerd -H fd://
└─1539 docker-containerd --config /var/run/docker/containerd/containerd.toml
```
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
Step 1/6 : FROM ubuntu:18.04
[...]
---> 4dc25a21556b
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:
```bash
root@somehashinhex:/build#
root@somehashinhex:/build# make help
[...]
```
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
make: Leaving directory '/build/buildroot'
make: Entering directory '/build/buildroot'
rm -rf /build/buildroot/output/target /build/buildroot/output/images /build/buildroot/output/host \
/build/buildroot/output/build /build/buildroot/output/staging \
/build/buildroot/output/legal-info /build/buildroot/output/graphs
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:
```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
```
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 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 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 *ha>* shell prompt will yield a root shell in the host OS.

18
Documentation/kernel.md Normal file
View File

@@ -0,0 +1,18 @@
# Kernel Version
Default Kernel tree: 5.4
| Board | Version |
|-------|---------|
| Open Virtual Appliance | 5.4.82 |
| 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.82 |
| Odroid-C2 | 5.7.19 |
| Odroid-N2 | 5.7.19 |
| Odroid-XU4 | 5.7.19 |
| Intel NUC | 5.4.82 |

153
Documentation/network.md Normal file
View File

@@ -0,0 +1,153 @@
# Network
HassOS uses NetworkManager to control the host network.
## Configure network
Only a manual configuration using NetworkManager connection files is supported. Without a configuration file, the device will use DHCP by default. These network connection files can be placed on a USB drive and imported to the host as described in [Configuration][configuration-usb].
## 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
A preinstalled connection profile is provided by default:
```ini
[connection]
id=my-network
uuid=f62bf7c2-e565-49ff-bbfc-a4cf791e6add
type=802-3-ethernet
[ipv4]
method=auto
[ipv6]
addr-gen-mode=stable-privacy
method=auto
```
### Wired connection to the LAN
```ini
[connection]
id=my-network
uuid=d55162b4-6152-4310-9312-8f4c54d86afa
type=802-3-ethernet
[ipv4]
method=auto
[ipv6]
addr-gen-mode=stable-privacy
method=auto
```
### Wireless LAN WPA/PSK
```ini
[connection]
id=my-network
uuid=72111c67-4a5d-4d5c-925e-f8ee26efb3c3
type=802-11-wireless
[802-11-wireless]
mode=infrastructure
ssid=MY_SSID
# Uncomment below if your SSID is not broadcasted
#hidden=true
[802-11-wireless-security]
auth-alg=open
key-mgmt=wpa-psk
psk=MY_WLAN_SECRET_KEY
[ipv4]
method=auto
[ipv6]
addr-gen-mode=stable-privacy
method=auto
```
### Static IP
Replace the following configuration:
```ini
[ipv4]
method=manual
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 semicolon is the IP address and subnet prefix bitlength. The second value (after the semicolon) is the IP address of the local gateway.
## Tips
### Reset network
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
```
### Powersave
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 the HassOS base system via a console:
```bash
Welcome to Home Assistant
homeassistant 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"
```
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, 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> 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 virtual machine or the physical system.
[nm-manual]: https://developer.gnome.org/NetworkManager/stable/nm-settings.html
[configuration-usb]: configuration.md
[uuid]: https://www.uuidgenerator.net/

View 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.

43
Makefile Normal file
View File

@@ -0,0 +1,43 @@
RELEASE_DIR = /build/release
BUILDROOT=/build/buildroot
BUILDROOT_EXTERNAL=/build/buildroot-external
DEFCONFIG_DIR = $(BUILDROOT_EXTERNAL)/configs
TARGETS := $(notdir $(patsubst %_defconfig,%,$(wildcard $(DEFCONFIG_DIR)/*_defconfig)))
TARGETS_CONFIG := $(notdir $(patsubst %_defconfig,%-config,$(wildcard $(DEFCONFIG_DIR)/*_defconfig)))
.NOTPARALLEL: $(TARGETS) $(TARGETS_CONFIG) all
.PHONY: $(TARGETS) $(TARGETS_CONFIG) all clean help
all: $(TARGETS)
$(RELEASE_DIR):
mkdir -p $(RELEASE_DIR)
$(TARGETS_CONFIG): %-config:
@echo "config $*"
$(MAKE) -C $(BUILDROOT) BR2_EXTERNAL=$(BUILDROOT_EXTERNAL) "$*_defconfig"
$(TARGETS): %: $(RELEASE_DIR) %-config
@echo "build $@"
$(MAKE) -C $(BUILDROOT) BR2_EXTERNAL=$(BUILDROOT_EXTERNAL)
cp -f $(BUILDROOT)/output/images/hassos_* $(RELEASE_DIR)/
# Do not clean when building for one target
ifneq ($(words $(filter $(TARGETS),$(MAKECMDGOALS))), 1)
@echo "clean $@"
$(MAKE) -C $(BUILDROOT) BR2_EXTERNAL=$(BUILDROOT_EXTERNAL) clean
endif
@echo "finished $@"
clean:
$(MAKE) -C $(BUILDROOT) BR2_EXTERNAL=$(BUILDROOT_EXTERNAL) clean
help:
@echo "Supported targets: $(TARGETS)"
@echo "Run 'make <target>' to build a target image."
@echo "Run 'make all' to build all target images."
@echo "Run 'make clean' to clean the build output."
@echo "Run 'make <target>-config' to configure buildroot for a target."

View File

@@ -1,31 +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/).
- Linux kernel 4.14 (LT)
- Barebox as bootloader on EFI
- U-Boot as bootloader on IoT
- RAUC for OTA updates
- SquashFS LZ4 as filesystem
- Docker 18.03.1
- 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).
# Building
Running `sudo ./enter.sh` will get you into the build Docker container.
`make -C /build/buildroot BR2_EXTERNAL=/build/buildroot-external xy_defconfig`
## Features
## Helpers
- Lightweight and memory-efficient
- Minimized I/O
- Over The Air (OTA) updates
- Offline updates
- Modular using Docker
- `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`
## Supported hardware
- `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`
- 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
View 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'

View 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:
OdroidN2:
board: 'odroid_n2'
OdroidC2:
board: 'odroid_c2'
OdroidXU4:
board: 'odroid_xu4'
OpenVirtualAppliance:
board: 'ova'
IntelNuc:
board: 'intel_nuc'
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)'

View File

@@ -1,3 +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"

View File

@@ -1,75 +0,0 @@
#include <tunables/global>
profile hassio-supervisor flags=(attach_disconnected,mediate_deleted) {
#include <abstractions/base>
#include <abstractions/python>
network,
deny network raw,
signal (send) set=(kill,term),
/bin/busybox ix,
/usr/bin/python{,3,3.[0-9]} ix,
/usr/bin/git cx,
/usr/bin/socat cx,
/usr/bin/gdbus cx,
deny /proc/** wl,
deny /root/** wl,
deny /sys/** wl,
/** r,
/tmp/** rw,
/data/** rw,
/{,var/}run/docker.sock rw,
capability net_bind_service,
profile /usr/bin/socat flags=(attach_disconnected,mediate_deleted) {
#include <abstractions/base>
network inet udp,
network inet tcp,
deny network raw,
deny network packet,
signal (receive) set=(kill,term),
capability net_bind_service,
/lib/* mr,
/usr/bin/socat mr,
}
profile /usr/bin/gdbus flags=(attach_disconnected,mediate_deleted) {
#include <abstractions/base>
#include <abstractions/dbus>
unix (send, receive) type=stream,
/usr/bin/gdbus mr,
/lib/* mr,
/{,var/}run/dbus/system_bus_socket rw,
}
profile /usr/bin/git flags=(attach_disconnected,mediate_deleted) {
#include <abstractions/base>
network,
deny network raw,
/bin/busybox ix,
/usr/bin/git mr,
/usr/libexec/git-core/* ix,
deny /data/homeassistant rw,
deny /data/ssl rw,
/** r,
/lib/* mr,
/data/addons/** lrw,
capability dac_override,
}
}

View File

@@ -0,0 +1,29 @@
#!/bin/bash
# shellcheck disable=SC2155
function hassos_pre_image() {
local BOOT_DATA="$(path_boot_dir)"
local SPL_IMG="$(path_spl_img)"
cp -t "${BOOT_DATA}" \
"${BINARIES_DIR}/boot.scr" \
"${BINARIES_DIR}/rk3288-tinker.dtb"
echo "console=tty1" > "${BOOT_DATA}/cmdline.txt"
# Create boot binary
rm -f "${BINARIES_DIR}/idbloader.img"
mkimage -n rk3288 -T rksd -d "${BINARIES_DIR}/u-boot-tpl.bin" "${BINARIES_DIR}/idbloader.img"
cat "${BINARIES_DIR}/u-boot-spl.bin" >> "${BINARIES_DIR}/idbloader.img"
# SPL
create_spl_image
dd if="${BINARIES_DIR}/idbloader.img" of="${SPL_IMG}" conv=notrunc bs=512 seek=64
dd if="${BINARIES_DIR}/u-boot-dtb.img" of="${SPL_IMG}" conv=notrunc bs=512 seek=12288
}
function hassos_post_image() {
convert_disk_image_gz
}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,10 @@
BOARD_ID=tinker
BOARD_NAME="Asus TinkerBoard"
CHASSIS=embedded
BOOTLOADER=uboot
KERNEL_FILE=zImage
BOOT_SYS=hyprid
BOOT_SPL=true
BOOT_ENV_SIZE=0x8000
SUPERVISOR_MACHINE=tinker
SUPERVISOR_ARCH=armv7

View File

@@ -0,0 +1,5 @@
## Kernel
https://github.com/armbian/build/tree/master/patch/kernel/rockchip-next
## u-boot
https://github.com/armbian/build/tree/master/patch/u-boot/u-boot-rockchip/board_tinkerboard

View File

@@ -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 */

View File

@@ -0,0 +1,35 @@
From 604ea7fc311af2b3a41e7fe3b4fbde0ee03dfb9c Mon Sep 17 00:00:00 2001
From: Myy Miouyouyou <myy@miouyouyou.fr>
Date: Thu, 19 Oct 2017 21:09:50 +0200
Subject: [PATCH 04/28] dts: rk3288: miqi: Enabling the Mali GPU node
Why is the MiQi the only one left without a working mali GPU node ?
Seriously, is there a rk3288 chipset WITHOUT a mali GPU ? Couldn't
they enable it once in the DTSI, instead of defining it as "disabled"
and enabling it in every DTS file ?
Signed-off-by: Myy Miouyouyou <myy@miouyouyou.fr>
---
arch/arm/boot/dts/rk3288-miqi.dts | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/arch/arm/boot/dts/rk3288-miqi.dts b/arch/arm/boot/dts/rk3288-miqi.dts
index 4d923aa6..3cd60674 100644
--- a/arch/arm/boot/dts/rk3288-miqi.dts
+++ b/arch/arm/boot/dts/rk3288-miqi.dts
@@ -149,6 +149,11 @@
status = "ok";
};
+&gpu {
+ mali-supply = <&vdd_gpu>;
+ status = "okay";
+};
+
&hdmi {
ddc-i2c-bus = <&i2c5>;
status = "okay";
--
2.11.0

View File

@@ -0,0 +1,45 @@
From 89e5763110ca77d68a4be00cd97a638adc2401d5 Mon Sep 17 00:00:00 2001
From: Willy Tarreau <w@1wt.eu>
Date: Tue, 2 Aug 2016 08:31:00 +0200
Subject: [PATCH 05/28] ARM: dts: rockchip: fix the regulator's voltage range
on MiQi board
The board declared too narrow a voltage range for the CPU and GPU
regulators, preventing it from using the full CPU frequency range.
The regulators support 712500 to 1500000 microvolts.
Signed-off-by: Willy Tarreau <w@1wt.eu>
(cherry picked from commit 95330e63a9295a2632cee8cce5db80677f01857a)
---
arch/arm/boot/dts/rk3288-miqi.dts | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/arch/arm/boot/dts/rk3288-miqi.dts b/arch/arm/boot/dts/rk3288-miqi.dts
index 3cd60674..a1c3cdaa 100644
--- a/arch/arm/boot/dts/rk3288-miqi.dts
+++ b/arch/arm/boot/dts/rk3288-miqi.dts
@@ -168,8 +168,8 @@
fcs,suspend-voltage-selector = <1>;
reg = <0x40>;
regulator-name = "vdd_cpu";
- regulator-min-microvolt = <850000>;
- regulator-max-microvolt = <1350000>;
+ regulator-min-microvolt = <712500>;
+ regulator-max-microvolt = <1500000>;
regulator-always-on;
regulator-boot-on;
regulator-enable-ramp-delay = <300>;
@@ -182,8 +182,8 @@
fcs,suspend-voltage-selector = <1>;
reg = <0x41>;
regulator-name = "vdd_gpu";
- regulator-min-microvolt = <850000>;
- regulator-max-microvolt = <1350000>;
+ regulator-min-microvolt = <712500>;
+ regulator-max-microvolt = <1500000>;
regulator-always-on;
vin-supply = <&vcc_sys>;
};
--
2.11.0

View File

@@ -0,0 +1,46 @@
From c27e445527e949f3ef46d5326066196969c17d23 Mon Sep 17 00:00:00 2001
From: Myy <myy@miouyouyou.fr>
Date: Sun, 12 Mar 2017 19:43:15 +0000
Subject: [PATCH 06/28] ARM: dts: rockchip: add the MiQi board's fan definition
The MiQi board is sold with an enclosure in which a fan is connected
to the second LED output, and configured by default in "heartbeat"
mode so that it rotates slowly and increases when the CPU load
increases, ensuring appropriate cooling by default. This LED output
is called "Fan" in the original kernel and connected to GPIO18
(gpiochip 0, pin 18). Here we called it "miqi:green:fan" to stay
consistent with the kernel's naming conventions.
It's worth noting that without this patch the fan doesn't work at
all, risking to make the board overheat.
Fixes: 162718c (v4.7)
Cc: Heiko Stuebner <heiko@sntech.de>
Signed-off-by: Willy Tarreau <w@1wt.eu>
Signed-off-by: Myy <myy@miouyouyou.fr>
---
arch/arm/boot/dts/rk3288-miqi.dts | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/arch/arm/boot/dts/rk3288-miqi.dts b/arch/arm/boot/dts/rk3288-miqi.dts
index a1c3cdaa..0e383595 100644
--- a/arch/arm/boot/dts/rk3288-miqi.dts
+++ b/arch/arm/boot/dts/rk3288-miqi.dts
@@ -67,6 +67,13 @@
leds {
compatible = "gpio-leds";
+ fan {
+ gpios = <&gpio0 RK_PC2 GPIO_ACTIVE_HIGH>;
+ label = "miqi:green:fan";
+ linux,default-trigger = "heartbeat";
+ };
+
+
work {
gpios = <&gpio7 RK_PA2 GPIO_ACTIVE_HIGH>;
label = "miqi:green:user";
--
2.11.0

View File

@@ -0,0 +1,31 @@
From 062488e4b8fd552c01e1104b3bc91a6f7ffe6c41 Mon Sep 17 00:00:00 2001
From: Myy Miouyouyou <myy@miouyouyou.fr>
Date: Thu, 19 Oct 2017 21:24:47 +0200
Subject: [PATCH 10/28] RK3288: DTSI: rk3288.dtsi: Add missing SPI2 pinctrl
The spi2_cs1 pin reference is missing in the spi2 first pin control
definition.
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 | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/arm/boot/dts/rk3288.dtsi b/arch/arm/boot/dts/rk3288.dtsi
index 5b789528..9ed532cc 100644
--- a/arch/arm/boot/dts/rk3288.dtsi
+++ b/arch/arm/boot/dts/rk3288.dtsi
@@ -334,7 +334,7 @@
dma-names = "tx", "rx";
interrupts = <GIC_SPI 46 IRQ_TYPE_LEVEL_HIGH>;
pinctrl-names = "default";
- pinctrl-0 = <&spi2_clk &spi2_tx &spi2_rx &spi2_cs0>;
+ pinctrl-0 = <&spi2_clk &spi2_tx &spi2_rx &spi2_cs0 &spi2_cs1>;
reg = <0x0 0xff130000 0x0 0x1000>;
#address-cells = <1>;
#size-cells = <0>;
--
2.11.0

View File

@@ -0,0 +1,27 @@
From ac220d592aa38b9b717d36f7bb93f7be5a08f6b3 Mon Sep 17 00:00:00 2001
From: Myy Miouyouyou <myy@miouyouyou.fr>
Date: Thu, 19 Oct 2017 21:43:51 +0200
Subject: [PATCH 14/28] ARM: DTSI: rk3288.dtsi: Adding missing EDP power domain
Imported from Rockchip 4.4 kernel patches.
Signed-off-by: Myy Miouyouyou <myy@miouyouyou.fr>
---
arch/arm/boot/dts/rk3288.dtsi | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/arm/boot/dts/rk3288.dtsi b/arch/arm/boot/dts/rk3288.dtsi
index 14ef8202..10ecebb4 100644
--- a/arch/arm/boot/dts/rk3288.dtsi
+++ b/arch/arm/boot/dts/rk3288.dtsi
@@ -1105,6 +1105,7 @@
interrupts = <GIC_SPI 98 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&cru SCLK_EDP>, <&cru PCLK_EDP_CTRL>;
clock-names = "dp", "pclk";
+ power-domains = <&power RK3288_PD_VIO>;
phys = <&edp_phy>;
phy-names = "dp";
resets = <&cru SRST_EDP>;
--
2.11.0

View File

@@ -0,0 +1,28 @@
From c5af6798c9a411b3f550f463182a4b4904a21ec2 Mon Sep 17 00:00:00 2001
From: Myy Miouyouyou <myy@miouyouyou.fr>
Date: Thu, 19 Oct 2017 21:51:14 +0200
Subject: [PATCH 16/28] ARM: DTSI: rk3288.dtsi: Adding missing VOPB registers
Imported from @wzyy2 patches... I think...
Signed-off-by: Myy Miouyouyou <myy@miouyouyou.fr>
---
arch/arm/boot/dts/rk3288.dtsi | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/arm/boot/dts/rk3288.dtsi b/arch/arm/boot/dts/rk3288.dtsi
index 455446f6..125f8835 100644
--- a/arch/arm/boot/dts/rk3288.dtsi
+++ b/arch/arm/boot/dts/rk3288.dtsi
@@ -987,7 +987,7 @@
vopb: vop@ff930000 {
compatible = "rockchip,rk3288-vop";
- reg = <0x0 0xff930000 0x0 0x19c>;
+ reg = <0x0 0xff930000 0x0 0x19c>, <0x0 0xff931000 0x0 0x1000>;
interrupts = <GIC_SPI 15 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&cru ACLK_VOP0>, <&cru DCLK_VOP0>, <&cru HCLK_VOP0>;
clock-names = "aclk_vop", "dclk_vop", "hclk_vop";
--
2.11.0

View File

@@ -0,0 +1,31 @@
From a0602b2724893de7ac9b4190a7a6bb66458da2d5 Mon Sep 17 00:00:00 2001
From: Myy Miouyouyou <myy@miouyouyou.fr>
Date: Thu, 19 Oct 2017 21:54:37 +0200
Subject: [PATCH 17/28] ARM: DTSI: rk3288.dtsi: Fixed the SPDIF node address
Now, the typo is only in the name of the node itself, not in the
actual registers addresses definition.
Still, this ought to be fixed one day !
Signed-off-by: Myy Miouyouyou <myy@miouyouyou.fr>
---
arch/arm/boot/dts/rk3288.dtsi | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/arm/boot/dts/rk3288.dtsi b/arch/arm/boot/dts/rk3288.dtsi
index 125f8835..e5d3d3c9 100644
--- a/arch/arm/boot/dts/rk3288.dtsi
+++ b/arch/arm/boot/dts/rk3288.dtsi
@@ -922,7 +922,7 @@
status = "disabled";
};
- spdif: sound@ff88b0000 {
+ spdif: sound@ff8b0000 {
compatible = "rockchip,rk3288-spdif", "rockchip,rk3066-spdif";
reg = <0x0 0xff8b0000 0x0 0x10000>;
#sound-dai-cells = <0>;
--
2.11.0

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -0,0 +1,50 @@
From e0c5a419cf5464cd02996431afa98e3b22dc6801 Mon Sep 17 00:00:00 2001
From: Myy <myy@miouyouyou.fr>
Date: Mon, 17 Jul 2017 23:14:48 +0000
Subject: [PATCH] clk: rockchip: add all known operating points to the allowed
CPU freqs
Patch from Willy Tarreau
Original commit message :
At least 1920 MHz runs stable on the MiQi even on openssl speed -multi 4,
which is by far the most intensive workload, and 1992/2016 work fine on
the CS-008 until it starts to heat too much. So add all of them so that
the device tree can simply manipulate them.
Signed-off-by: Myy <myy@miouyouyou.fr>
---
drivers/clk/rockchip/clk-rk3288.c | 17 +++++++++++++++++
1 file changed, 17 insertions(+)
diff --git a/drivers/clk/rockchip/clk-rk3288.c b/drivers/clk/rockchip/clk-rk3288.c
index 753c649..fd2058f 100644
--- a/drivers/clk/rockchip/clk-rk3288.c
+++ b/drivers/clk/rockchip/clk-rk3288.c
@@ -145,6 +145,23 @@ static struct rockchip_pll_rate_table rk3288_pll_rates[] = {
}
static struct rockchip_cpuclk_rate_table rk3288_cpuclk_rates[] __initdata = {
+ RK3288_CPUCLK_RATE(2208000000U, 1, 3, 1, 3, 3),
+ RK3288_CPUCLK_RATE(2184000000U, 1, 3, 1, 3, 3),
+ RK3288_CPUCLK_RATE(2160000000U, 1, 3, 1, 3, 3),
+ RK3288_CPUCLK_RATE(2136000000, 1, 3, 1, 3, 3),
+ RK3288_CPUCLK_RATE(2112000000, 1, 3, 1, 3, 3),
+ RK3288_CPUCLK_RATE(2088000000, 1, 3, 1, 3, 3),
+ RK3288_CPUCLK_RATE(2064000000, 1, 3, 1, 3, 3),
+ RK3288_CPUCLK_RATE(2040000000, 1, 3, 1, 3, 3),
+ RK3288_CPUCLK_RATE(2016000000, 1, 3, 1, 3, 3),
+ RK3288_CPUCLK_RATE(1992000000, 1, 3, 1, 3, 3),
+ RK3288_CPUCLK_RATE(1968000000, 1, 3, 1, 3, 3),
+ RK3288_CPUCLK_RATE(1944000000, 1, 3, 1, 3, 3),
+ RK3288_CPUCLK_RATE(1920000000, 1, 3, 1, 3, 3),
+ RK3288_CPUCLK_RATE(1896000000, 1, 3, 1, 3, 3),
+ RK3288_CPUCLK_RATE(1872000000, 1, 3, 1, 3, 3),
+ RK3288_CPUCLK_RATE(1848000000, 1, 3, 1, 3, 3),
+ RK3288_CPUCLK_RATE(1824000000, 1, 3, 1, 3, 3),
RK3288_CPUCLK_RATE(1800000000, 1, 3, 1, 3, 3),
RK3288_CPUCLK_RATE(1704000000, 1, 3, 1, 3, 3),
RK3288_CPUCLK_RATE(1608000000, 1, 3, 1, 3, 3),
--
2.10.2

View File

@@ -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

View File

@@ -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

View File

@@ -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");

View File

@@ -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

View File

@@ -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);
}

View File

@@ -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);

View File

@@ -0,0 +1,395 @@
diff --git a/arch/arm/boot/dts/rk3288-tinker.dtsi b/arch/arm/boot/dts/rk3288-tinker.dtsi
index e5b7ef1a5..f88c913ff 100644
--- a/arch/arm/boot/dts/rk3288-tinker.dtsi
+++ b/arch/arm/boot/dts/rk3288-tinker.dtsi
@@ -544,3 +544,6 @@
&wdt {
status = "okay";
};
+&gpiomem {
+ status = "okay";
+};
diff --git a/arch/arm/boot/dts/rk3288.dtsi b/arch/arm/boot/dts/rk3288.dtsi
index f3ca55496..14bbcb192 100644
--- a/arch/arm/boot/dts/rk3288.dtsi
+++ b/arch/arm/boot/dts/rk3288.dtsi
@@ -1418,6 +1418,12 @@
interrupts = <GIC_PPI 9 0xf04>;
};
+ gpiomem: rk3288-gpiomem@ff750000 {
+ compatible = "rockchip,rk3288-gpiomem";
+ reg = <0x0 0xff750000 0x0 0x1000>;
+ status = "disabled";
+ };
+
pinctrl: pinctrl {
compatible = "rockchip,rk3288-pinctrl";
rockchip,grf = <&grf>;
diff --git a/drivers/char/Kconfig b/drivers/char/Kconfig
index 3143db5..9c18b74 100644
--- a/drivers/char/Kconfig
+++ b/drivers/char/Kconfig
@@ -5,6 +5,7 @@
menu "Character devices"
source "drivers/tty/Kconfig"
+source "drivers/char/rockchip/Kconfig"
config DEVMEM
bool "/dev/mem virtual device support"
diff --git a/drivers/char/Makefile b/drivers/char/Makefile
index d8a7579..290cb32 100644
--- a/drivers/char/Makefile
+++ b/drivers/char/Makefile
@@ -51,6 +51,8 @@ obj-$(CONFIG_PS3_FLASH) += ps3flash.o
obj-$(CONFIG_JS_RTC) += js-rtc.o
js-rtc-y = rtc.o
+obj-$(CONFIG_ARCH_ROCKCHIP) += rockchip/
+
obj-$(CONFIG_XILLYBUS) += xillybus/
obj-$(CONFIG_POWERNV_OP_PANEL) += powernv-op-panel.o
obj-$(CONFIG_ADI) += adi.o
diff --git a/drivers/char/rockchip/Kconfig b/drivers/char/rockchip/Kconfig
new file mode 100644
index 0000000..6e97486
--- /dev/null
+++ b/drivers/char/rockchip/Kconfig
@@ -0,0 +1,16 @@
+#
+# Broadcom char driver config
+#
+
+menuconfig RK_CHAR_DRIVERS
+ bool "Rockchip Char Drivers"
+ help
+ Rockchip's char drivers
+
+config RK3288_DEVGPIOMEM
+ tristate "/dev/gpiomem rootless GPIO access via mmap() on the RK3288"
+ default y
+ help
+ Provides users with root-free access to the GPIO registers
+ on the 3288. Calling mmap(/dev/gpiomem) will map the GPIO
+ register page to the user's pointer.
\ No newline at end of file
diff --git a/drivers/char/rockchip/Makefile b/drivers/char/rockchip/Makefile
new file mode 100644
index 0000000..2287ec2
--- /dev/null
+++ b/drivers/char/rockchip/Makefile
@@ -0,0 +1 @@
+obj-$(CONFIG_RK3288_DEVGPIOMEM)+= rk3288-gpiomem.o
\ No newline at end of file
diff --git a/drivers/char/rockchip/rk3288-gpiomem.c b/drivers/char/rockchip/rk3288-gpiomem.c
new file mode 100644
index 0000000..984471c
--- /dev/null
+++ b/drivers/char/rockchip/rk3288-gpiomem.c
@@ -0,0 +1,303 @@
+/**
+ * GPIO memory device driver
+ *
+ * Creates a chardev /dev/gpiomem which will provide user access to
+ * the rk3288's GPIO registers when it is mmap()'d.
+ * No longer need root for user GPIO access, but without relaxing permissions
+ * on /dev/mem.
+ *
+ * Written by Luke Wren <luke@raspberrypi.org>
+ * Copyright (c) 2015, Raspberry Pi (Trading) Ltd.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions, and the following disclaimer,
+ * without modification.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. The names of the above-listed copyright holders may not be used
+ * to endorse or promote products derived from this software without
+ * specific prior written permission.
+ *
+ * ALTERNATIVELY, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2, as published by the Free
+ * Software Foundation.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
+ * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include <linux/kernel.h>
+#include <linux/module.h>
+#include <linux/of.h>
+#include <linux/platform_device.h>
+#include <linux/mm.h>
+#include <linux/slab.h>
+#include <linux/cdev.h>
+#include <linux/pagemap.h>
+#include <linux/io.h>
+
+#define DEVICE_NAME "rk3288-gpiomem"
+#define DRIVER_NAME "gpiomem-rk3288"
+#define DEVICE_MINOR 0
+
+struct rk3288_gpiomem_instance {
+ unsigned long gpio_regs_phys;
+ struct device *dev;
+};
+
+static struct cdev rk3288_gpiomem_cdev;
+static dev_t rk3288_gpiomem_devid;
+static struct class *rk3288_gpiomem_class;
+static struct device *rk3288_gpiomem_dev;
+static struct rk3288_gpiomem_instance *inst;
+
+
+/****************************************************************************
+*
+* GPIO mem chardev file ops
+*
+***************************************************************************/
+
+static int rk3288_gpiomem_open(struct inode *inode, struct file *file)
+{
+ int dev = iminor(inode);
+ int ret = 0;
+
+ if (dev != DEVICE_MINOR) {
+ dev_err(inst->dev, "Unknown minor device: %d", dev);
+ ret = -ENXIO;
+ }
+ return ret;
+}
+
+static int rk3288_gpiomem_release(struct inode *inode, struct file *file)
+{
+ int dev = iminor(inode);
+ int ret = 0;
+
+ if (dev != DEVICE_MINOR) {
+ dev_err(inst->dev, "Unknown minor device %d", dev);
+ ret = -ENXIO;
+ }
+ return ret;
+}
+
+static const struct vm_operations_struct rk3288_gpiomem_vm_ops = {
+#ifdef CONFIG_HAVE_IOREMAP_PROT
+ .access = generic_access_phys
+#endif
+};
+static int address_is_allowed(unsigned long pfn, unsigned long size)
+{
+ unsigned long address = pfn << PAGE_SHIFT;
+
+ dev_info(inst->dev, "address_is_allowed.pfn: 0x%08lx", address);
+
+ switch(address) {
+
+ case 0xff750000:
+ case 0xff760000:
+ case 0xff780000:
+ case 0xff790000:
+ case 0xff7a0000:
+ case 0xff7b0000:
+ case 0xff7c0000:
+ case 0xff7d0000:
+ case 0xff7e0000:
+ case 0xff7f0000:
+ case 0xff7f2000:
+ case 0xff770000:
+ case 0xff730000:
+ case 0xff680000:
+ dev_info(inst->dev, "address_is_allowed.return 1");
+ return 1;
+ break;
+ default :
+ dev_info(inst->dev, "address_is_allowed.return 0");
+ return 0;
+ }
+}
+
+static int rk3288_gpiomem_mmap(struct file *file, struct vm_area_struct *vma)
+{
+
+ size_t size;
+
+ size = vma->vm_end - vma->vm_start;
+
+
+ if (!address_is_allowed(vma->vm_pgoff, size))
+ return -EPERM;
+
+ vma->vm_page_prot = phys_mem_access_prot(file, vma->vm_pgoff,
+ size,
+ vma->vm_page_prot);
+
+ vma->vm_ops = &rk3288_gpiomem_vm_ops;
+
+ /* Remap-pfn-range will mark the range VM_IO */
+ if (remap_pfn_range(vma,
+ vma->vm_start,
+ vma->vm_pgoff,
+ size,
+ vma->vm_page_prot)) {
+ return -EAGAIN;
+ }
+
+ return 0;
+}
+
+static const struct file_operations
+rk3288_gpiomem_fops = {
+ .owner = THIS_MODULE,
+ .open = rk3288_gpiomem_open,
+ .release = rk3288_gpiomem_release,
+ .mmap = rk3288_gpiomem_mmap,
+};
+
+static int rk3288_gpiomem_dev_uevent(struct device *dev, struct kobj_uevent_env *env)
+{
+ add_uevent_var(env, "DEVMODE=%#o", 0666);
+ return 0;
+}
+
+ /****************************************************************************
+*
+* Probe and remove functions
+*
+***************************************************************************/
+
+
+static int rk3288_gpiomem_probe(struct platform_device *pdev)
+{
+ int err;
+ void *ptr_err;
+ struct device *dev = &pdev->dev;
+ struct resource *ioresource;
+
+ /* Allocate buffers and instance data */
+
+ inst = kzalloc(sizeof(struct rk3288_gpiomem_instance), GFP_KERNEL);
+
+ if (!inst) {
+ err = -ENOMEM;
+ goto failed_inst_alloc;
+ }
+
+ inst->dev = dev;
+
+ ioresource = platform_get_resource(pdev, IORESOURCE_MEM, 0);
+ if (ioresource) {
+ inst->gpio_regs_phys = ioresource->start;
+ } else {
+ dev_err(inst->dev, "failed to get IO resource");
+ err = -ENOENT;
+ goto failed_get_resource;
+ }
+
+ /* Create character device entries */
+
+ err = alloc_chrdev_region(&rk3288_gpiomem_devid,
+ DEVICE_MINOR, 1, DEVICE_NAME);
+ if (err != 0) {
+ dev_err(inst->dev, "unable to allocate device number");
+ goto failed_alloc_chrdev;
+ }
+ cdev_init(&rk3288_gpiomem_cdev, &rk3288_gpiomem_fops);
+ rk3288_gpiomem_cdev.owner = THIS_MODULE;
+ err = cdev_add(&rk3288_gpiomem_cdev, rk3288_gpiomem_devid, 1);
+ if (err != 0) {
+ dev_err(inst->dev, "unable to register device");
+ goto failed_cdev_add;
+ }
+
+ /* Create sysfs entries */
+
+ rk3288_gpiomem_class = class_create(THIS_MODULE, DEVICE_NAME);
+ ptr_err = rk3288_gpiomem_class;
+ if (IS_ERR(ptr_err))
+ goto failed_class_create;
+ rk3288_gpiomem_class->dev_uevent = rk3288_gpiomem_dev_uevent;
+ rk3288_gpiomem_dev = device_create(rk3288_gpiomem_class, NULL,
+ rk3288_gpiomem_devid, NULL,
+ "gpiomem");
+ ptr_err = rk3288_gpiomem_dev;
+ if (IS_ERR(ptr_err))
+ goto failed_device_create;
+
+ dev_info(inst->dev, "Initialised: Registers at 0x%08lx",
+ inst->gpio_regs_phys);
+
+ return 0;
+
+failed_device_create:
+ class_destroy(rk3288_gpiomem_class);
+failed_class_create:
+ cdev_del(&rk3288_gpiomem_cdev);
+ err = PTR_ERR(ptr_err);
+failed_cdev_add:
+ unregister_chrdev_region(rk3288_gpiomem_devid, 1);
+failed_alloc_chrdev:
+failed_get_resource:
+ kfree(inst);
+failed_inst_alloc:
+ dev_err(inst->dev, "could not load rk3288_gpiomem");
+ return err;
+}
+
+static int rk3288_gpiomem_remove(struct platform_device *pdev)
+{
+ struct device *dev = inst->dev;
+
+ kfree(inst);
+ device_destroy(rk3288_gpiomem_class, rk3288_gpiomem_devid);
+ class_destroy(rk3288_gpiomem_class);
+ cdev_del(&rk3288_gpiomem_cdev);
+ unregister_chrdev_region(rk3288_gpiomem_devid, 1);
+
+ dev_info(dev, "GPIO mem driver removed - OK");
+ return 0;
+}
+
+ /****************************************************************************
+*
+* Register the driver with device tree
+*
+***************************************************************************/
+
+static const struct of_device_id rk3288_gpiomem_of_match[] = {
+ {.compatible = "rockchip,rk3288-gpiomem",},
+ { /* sentinel */ },
+};
+
+MODULE_DEVICE_TABLE(of, rk3288_gpiomem_of_match);
+
+static struct platform_driver rk3288_gpiomem_driver = {
+ .probe = rk3288_gpiomem_probe,
+ .remove = rk3288_gpiomem_remove,
+ .driver = {
+ .name = DRIVER_NAME,
+ .owner = THIS_MODULE,
+ .of_match_table = rk3288_gpiomem_of_match,
+ },
+};
+
+module_platform_driver(rk3288_gpiomem_driver);
+
+MODULE_ALIAS("platform:gpiomem-rk3288");
+MODULE_LICENSE("GPL");
+MODULE_DESCRIPTION("gpiomem driver for accessing GPIO from userspace");
+MODULE_AUTHOR("Luke Wren <luke@raspberrypi.org>");
\ No newline at end of file

View File

@@ -0,0 +1,32 @@
diff --git a/arch/arm/boot/dts/rk3288.dtsi b/arch/arm/boot/dts/rk3288.dtsi
index bc3601a..37ae378 100644
--- a/arch/arm/boot/dts/rk3288.dtsi
+++ b/arch/arm/boot/dts/rk3288.dtsi
@@ -467,13 +467,6 @@
};
thermal-zones {
- reserve_thermal: reserve_thermal {
- polling-delay-passive = <1000>; /* milliseconds */
- polling-delay = <5000>; /* milliseconds */
-
- thermal-sensors = <&tsadc 0>;
- };
-
cpu_thermal: cpu_thermal {
polling-delay-passive = <100>; /* milliseconds */
polling-delay = <5000>; /* milliseconds */
@@ -539,6 +532,13 @@
};
};
};
+
+ reserve_thermal: reserve_thermal {
+ polling-delay-passive = <1000>; /* milliseconds */
+ polling-delay = <5000>; /* milliseconds */
+
+ thermal-sensors = <&tsadc 0>;
+ };
};
tsadc: tsadc@ff280000 {

View 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,

View File

@@ -0,0 +1,80 @@
diff --git a/arch/arm/boot/dts/rk3288.dtsi b/arch/arm/boot/dts/rk3288.dtsi
index 58bd91539..9c0dac199 100644
--- a/arch/arm/boot/dts/rk3288.dtsi
+++ b/arch/arm/boot/dts/rk3288.dtsi
@@ -153,6 +153,75 @@
opp-hz = /bits/ 64 <1608000000>;
opp-microvolt = <1350000>;
};
+ opp@1704000000 {
+ opp-hz = /bits/ 64 <1704000000>;
+ opp-microvolt = <1350000>;
+ };
+ opp@1800000000 {
+ opp-hz = /bits/ 64 <1800000000>;
+ opp-microvolt = <1400000>;
+ };
+ /* boot-only frequencies below */
+ opp@1896000000 {
+ opp-hz = /bits/ 64 <1896000000>;
+ opp-microvolt = <1425000>;
+ turbo-mode;
+ };
+ opp@1920000000 {
+ opp-hz = /bits/ 64 <1920000000>;
+ opp-microvolt = <1425000>;
+ turbo-mode;
+ };
+ opp@1992000000 {
+ opp-hz = /bits/ 64 <1992000000>;
+ opp-microvolt = <1450000>;
+ turbo-mode;
+ };
+ opp@2016000000 {
+ opp-hz = /bits/ 64 <2016000000>;
+ opp-microvolt = <1475000>;
+ turbo-mode;
+ };
+ opp@2040000000 {
+ opp-hz = /bits/ 64 <2040000000>;
+ opp-microvolt = <1475000>;
+ turbo-mode;
+ };
+ opp@2064000000 {
+ opp-hz = /bits/ 64 <2064000000>;
+ opp-microvolt = <1475000>;
+ turbo-mode;
+ };
+ opp@2088000000 {
+ opp-hz = /bits/ 64 <2088000000>;
+ opp-microvolt = <1500000>;
+ turbo-mode;
+ };
+ opp@2112000000 {
+ opp-hz = /bits/ 64 <2112000000>;
+ opp-microvolt = <1500000>;
+ turbo-mode;
+ };
+ opp@2136000000 {
+ opp-hz = /bits/ 64 <2136000000>;
+ opp-microvolt = <1500000>;
+ turbo-mode;
+ };
+ opp@2160000000 {
+ opp-hz = /bits/ 64 <2160000000>;
+ opp-microvolt = <1500000>;
+ turbo-mode;
+ };
+ opp@2184000000 {
+ opp-hz = /bits/ 64 <2184000000>;
+ opp-microvolt = <1500000>;
+ turbo-mode;
+ };
+ opp@2208000000 {
+ opp-hz = /bits/ 64 <2208000000>;
+ opp-microvolt = <1500000>;
+ turbo-mode;
+ };
};
amba {

View File

@@ -0,0 +1,25 @@
diff --git a/arch/arm/boot/dts/rk3288-tinker.dtsi b/arch/arm/boot/dts/rk3288-tinker.dtsi
index f88c913ff..7f04ccbdf 100644
--- a/arch/arm/boot/dts/rk3288-tinker.dtsi
+++ b/arch/arm/boot/dts/rk3288-tinker.dtsi
@@ -547,3 +547,20 @@
&gpiomem {
status = "okay";
};
+
+&emmc {
+ bus-width = <8>;
+ cap-mmc-highspeed;
+ non-removable;
+ pinctrl-names = "default";
+ pinctrl-0 = <&emmc_clk &emmc_cmd &emmc_pwr &emmc_bus8>;
+ max-frequency = <150000000>;
+ mmc-hs200-1_8v;
+ mmc-ddr-1_8v;
+ status = "okay";
+};
+
+&hdmi {
+ pinctrl-names = "default";
+ pinctrl-0 = <&hdmi_cec_c0>;
+};

View File

@@ -0,0 +1,23 @@
diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c
index a907d7b06..ec71996c7 100644
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c
@@ -619,13 +619,17 @@ BRCMF_FW_DEF(4354, "brcmfmac4354-sdio");
BRCMF_FW_DEF(4356, "brcmfmac4356-sdio");
BRCMF_FW_DEF(4373, "brcmfmac4373-sdio");
+/* AMPAK */
+BRCMF_FW_DEF(AP6330, "brcmfmac-ap6330-sdio");
+
static const struct brcmf_firmware_mapping brcmf_sdio_fwnames[] = {
BRCMF_FW_ENTRY(BRCM_CC_43143_CHIP_ID, 0xFFFFFFFF, 43143),
BRCMF_FW_ENTRY(BRCM_CC_43241_CHIP_ID, 0x0000001F, 43241B0),
BRCMF_FW_ENTRY(BRCM_CC_43241_CHIP_ID, 0x00000020, 43241B4),
BRCMF_FW_ENTRY(BRCM_CC_43241_CHIP_ID, 0xFFFFFFC0, 43241B5),
BRCMF_FW_ENTRY(BRCM_CC_4329_CHIP_ID, 0xFFFFFFFF, 4329),
- BRCMF_FW_ENTRY(BRCM_CC_4330_CHIP_ID, 0xFFFFFFFF, 4330),
+ BRCMF_FW_ENTRY(BRCM_CC_4330_CHIP_ID, 0xFFFFFFEF, 4330),
+ BRCMF_FW_ENTRY(BRCM_CC_4330_CHIP_ID, 0x10, AP6330),
BRCMF_FW_ENTRY(BRCM_CC_4334_CHIP_ID, 0xFFFFFFFF, 4334),
BRCMF_FW_ENTRY(BRCM_CC_43340_CHIP_ID, 0xFFFFFFFF, 43340),
BRCMF_FW_ENTRY(BRCM_CC_43341_CHIP_ID, 0xFFFFFFFF, 43340),

View File

@@ -0,0 +1,13 @@
diff --git a/arch/arm/boot/dts/rk3288-tinker.dtsi b/arch/arm/boot/dts/rk3288-tinker.dtsi
index 01be2bca9..5439e29e0 100644
--- a/arch/arm/boot/dts/rk3288-tinker.dtsi
+++ b/arch/arm/boot/dts/rk3288-tinker.dtsi
@@ -64,7 +64,7 @@
sound {
compatible = "simple-audio-card";
simple-audio-card,format = "i2s";
- simple-audio-card,name = "rockchip,tinker-codec";
+ simple-audio-card,name = "DW-I2S-HDMI";
simple-audio-card,mclk-fs = <512>;
simple-audio-card,codec {

View File

@@ -0,0 +1,19 @@
diff --git a/drivers/mmc/core/core.c b/drivers/mmc/core/core.c
index 5bd58b95d..48ebe081f 100644
--- a/drivers/mmc/core/core.c
+++ b/drivers/mmc/core/core.c
@@ -1684,6 +1684,14 @@ void mmc_power_off(struct mmc_host *host)
if (host->ios.power_mode == MMC_POWER_OFF)
return;
+ mmc_set_initial_signal_voltage(host);
+
+ /*
+ * This delay should be sufficient to allow the power supply
+ * to reach the minimum voltage.
+ */
+ mmc_delay(host->ios.power_delay_ms);
+
mmc_pwrseq_power_off(host);
host->ios.clock = 0;

View File

@@ -0,0 +1,22 @@
diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
index a98dee2ae..d3cef7033 100644
--- a/arch/arm/boot/dts/Makefile
+++ b/arch/arm/boot/dts/Makefile
@@ -916,17 +916,7 @@ dtb-$(CONFIG_ARCH_ROCKCHIP) += \
rk3288-rock2-square.dtb \
rk3288-tinker.dtb \
rk3288-tinker-s.dtb \
- rk3288-veyron-brain.dtb \
- rk3288-veyron-fievel.dtb \
- rk3288-veyron-jaq.dtb \
- rk3288-veyron-jerry.dtb \
- rk3288-veyron-mickey.dtb \
- rk3288-veyron-mighty.dtb \
- rk3288-veyron-minnie.dtb \
- rk3288-veyron-pinky.dtb \
- rk3288-veyron-speedy.dtb \
- rk3288-veyron-tiger.dtb \
rk3288-vyasa.dtb
dtb-$(CONFIG_ARCH_S3C24XX) += \
s3c2416-smdk2416.dtb
dtb-$(CONFIG_ARCH_S3C64XX) += \

View File

@@ -0,0 +1,13 @@
diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
index 37a3de760..6bcfceede 100644
--- a/arch/arm/boot/dts/Makefile
+++ b/arch/arm/boot/dts/Makefile
@@ -832,6 +832,7 @@ dtb-$(CONFIG_ARCH_ROCKCHIP) += \
rk3188-radxarock.dtb \
rk3228-evb.dtb \
rk3229-evb.dtb \
+ rk3288-xt-q8l-v10.dtb \
rk3229-xms6.dtb \
rk3288-evb-act8846.dtb \
rk3288-evb-rk808.dtb \

View File

@@ -0,0 +1,103 @@
diff --git a/drivers/media/rc/keymaps/rc-xt-q8l-v10.c b/drivers/media/rc/keymaps/rc-xt-q8l-v10.c
index e69de29..19c7d9e 100644
--- /dev/null
+++ b/drivers/media/rc/keymaps/rc-xt-q8l-v10.c
@@ -0,0 +1,76 @@
+// SPDX-License-Identifier: GPL-2.0+
+// rc-xt-q8l-v10.c - Keytable for xt-q8l-v10 tv box remote controller
+//
+// keymap imported from ir-keymaps.c
+//
+// Copyright (c) 2018 Paolo Sabatino
+
+#include <media/rc-map.h>
+#include <linux/module.h>
+
+/*
+
+*/
+
+static struct rc_map_table xt_q8l_v10[] = {
+
+ { 0xcc1d11, KEY_ENTER },
+ { 0xcc1d00, KEY_POWER },
+ { 0xcc1d15, KEY_PLAYPAUSE },
+ { 0xcc1d16, KEY_STOP },
+ { 0xcc1d06, KEY_PREVIOUSSONG },
+ { 0xcc1d0a, KEY_NEXTSONG },
+ { 0xcc1d41, KEY_1 },
+ { 0xcc1d45, KEY_2 },
+ { 0xcc1d4d, KEY_3 },
+ { 0xcc1d42, KEY_4 },
+ { 0xcc1d46, KEY_5 },
+ { 0xcc1d4e, KEY_6 },
+ { 0xcc1d43, KEY_7 },
+ { 0xcc1d47, KEY_8 },
+ { 0xcc1d4f, KEY_9 },
+ { 0xcc1d49, KEY_0 },
+ { 0xcc1d4a, KEY_BACKSPACE },
+ { 0xcc1d48, KEY_F6 },
+ { 0xcc1d03, KEY_HOME },
+ { 0xcc1d0f, KEY_BACK },
+ { 0xcc1d40, KEY_MENU },
+ { 0xcc1d4c, KEY_TEXT },
+ { 0xcc1d10, KEY_LEFT },
+ { 0xcc1d12, KEY_RIGHT },
+ { 0xcc1d44, KEY_DOWN },
+ { 0xcc1d07, KEY_UP },
+ { 0xcc1d02, KEY_VOLUMEDOWN },
+ { 0xcc1d0c, KEY_MUTE },
+ { 0xcc1d0e, KEY_VOLUMEUP },
+ { 0xcc1d01, KEY_F1 },
+ { 0xcc1d05, KEY_F2 },
+ { 0xcc1d09, KEY_F3 },
+ { 0xcc1d0d, KEY_F4 },
+
+};
+
+static struct rc_map_list xt_q8l_v10_map = {
+ .map = {
+ .scan = xt_q8l_v10,
+ .size = ARRAY_SIZE(xt_q8l_v10),
+ .rc_proto = RC_PROTO_NEC, /* Legacy IR type */
+ .name = RC_MAP_XT_Q8L_V10,
+ }
+};
+
+static int __init init_rc_map_xt_q8l_v10(void)
+{
+ return rc_map_register(&xt_q8l_v10_map);
+}
+
+static void __exit exit_rc_map_xt_q8l_v10(void)
+{
+ rc_map_unregister(&xt_q8l_v10_map);
+}
+
+module_init(init_rc_map_xt_q8l_v10)
+module_exit(exit_rc_map_xt_q8l_v10)
+
+MODULE_LICENSE("GPL");
+MODULE_AUTHOR("Paolo Sabatino");
diff --git a/include/media/rc-map.h b/include/media/rc-map.h
index d621acadf..ad7abdb97 100644
--- a/include/media/rc-map.h
+++ b/include/media/rc-map.h
@@ -278,6 +278,7 @@ struct rc_map *rc_map_get(const char *name);
#define RC_MAP_WINFAST_USBII_DELUXE "rc-winfast-usbii-deluxe"
#define RC_MAP_SU3000 "rc-su3000"
#define RC_MAP_XBOX_DVD "rc-xbox-dvd"
+#define RC_MAP_XT_Q8L_V10 "rc-xt-q8l-v10"
#define RC_MAP_X96MAX "rc-x96max"
/*
diff --git a/drivers/media/rc/keymaps/Makefile b/drivers/media/rc/keymaps/Makefile
index 5b1399af6..ec9ce1206 100644
--- a/drivers/media/rc/keymaps/Makefile
+++ b/drivers/media/rc/keymaps/Makefile
@@ -117,4 +117,5 @@ obj-$(CONFIG_RC_MAP) += rc-adstech-dvb-t-pci.o \
rc-winfast-usbii-deluxe.o \
rc-su3000.o \
rc-xbox-dvd.o \
+ rc-xt-q8l-v10.o \
rc-x96max.o \

View File

@@ -0,0 +1,23 @@
From 17735a28503d90db2a7173816861750f475580ea Mon Sep 17 00:00:00 2001
From: Pascal Vizeli <pvizeli@syshack.ch>
Date: Fri, 24 Apr 2020 12:41:50 +0000
Subject: [PATCH 1/1] TLP: Modify entrypoint for u-boot
Signed-off-by: Pascal Vizeli <pvizeli@syshack.ch>
---
configs/tinker-rk3288_defconfig | 2 ++
1 file changed, 2 insertions(+)
diff --git a/configs/tinker-rk3288_defconfig b/configs/tinker-rk3288_defconfig
index 83c3450839..648a7904be 100644
--- a/configs/tinker-rk3288_defconfig
+++ b/configs/tinker-rk3288_defconfig
@@ -84,3 +84,5 @@ CONFIG_USB_ETHER_ASIX=y
CONFIG_USB_ETHER_SMSC95XX=y
CONFIG_CMD_DHRYSTONE=y
CONFIG_ERRNO_STR=y
+CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR=0x3000
+
--
2.17.1

View File

@@ -0,0 +1,65 @@
From 4147d34a63f74f78a8ff9a3dcf2f4c9cd8d6be3a Mon Sep 17 00:00:00 2001
From: Pascal Vizeli <pvizeli@syshack.ch>
Date: Fri, 24 Apr 2020 11:37:55 +0000
Subject: [PATCH 1/1] pmic: enable LDO2 vcc33_mipi at bootup
Signed-off-by: Pascal Vizeli <pvizeli@syshack.ch>
---
board/rockchip/tinker_rk3288/tinker-rk3288.c | 37 ++++++++++++++++++++
1 file changed, 37 insertions(+)
diff --git a/board/rockchip/tinker_rk3288/tinker-rk3288.c b/board/rockchip/tinker_rk3288/tinker-rk3288.c
index 7af39e10cd..f12409933d 100644
--- a/board/rockchip/tinker_rk3288/tinker-rk3288.c
+++ b/board/rockchip/tinker_rk3288/tinker-rk3288.c
@@ -12,6 +12,7 @@
#include <netdev.h>
#include <asm/arch-rockchip/bootrom.h>
#include <asm/io.h>
+#include <power/regulator.h>
static int get_ethaddr_from_eeprom(u8 *addr)
{
@@ -47,3 +48,39 @@ int mmc_get_env_dev(void)
return 1;
}
+
+
+#ifdef CONFIG_DM_PMIC
+static int rockchip_set_regulator_on(const char *name, uint uv)
+{
+ struct udevice *dev;
+ int ret;
+
+ ret = regulator_get_by_platname(name, &dev);
+ if (ret) {
+ debug("%s: Cannot find regulator %s\n", __func__, name);
+ return ret;
+ }
+ ret = regulator_set_value(dev, uv);
+ if (ret) {
+ debug("%s: Cannot set regulator %s\n", __func__, name);
+ return ret;
+ }
+ ret = regulator_set_enable(dev, 1);
+ if (ret) {
+ debug("%s: Cannot enable regulator %s\n", __func__, name);
+ return ret;
+ }
+
+ return 0;
+}
+
+int power_init_board(void)
+{
+ int ret = rockchip_set_regulator_on("vcc33_mipi", 3300000);
+ if (ret)
+ return ret;
+
+ return 0;
+}
+#endif
--
2.17.1

View File

@@ -0,0 +1,69 @@
part start mmc ${devnum} 6 mmc_env
mmc dev ${devnum}
setenv loadbootstate " \
echo 'loading env...'; \
mmc read ${ramdisk_addr_r} ${mmc_env} 0x40; \
env import -c ${ramdisk_addr_r} 0x8000;"
setenv storebootstate " \
echo 'storing env...'; \
env export -c -s 0x8000 ${ramdisk_addr_r} BOOT_ORDER BOOT_A_LEFT BOOT_B_LEFT MACHINE_ID; \
mmc write ${ramdisk_addr_r} ${mmc_env} 0x40;"
run loadbootstate
test -n "${BOOT_ORDER}" || setenv BOOT_ORDER "A B"
test -n "${BOOT_A_LEFT}" || setenv BOOT_A_LEFT 3
test -n "${BOOT_B_LEFT}" || setenv BOOT_B_LEFT 3
# HassOS bootargs
setenv bootargs_hassos "zram.enabled=1 zram.num_devices=3 apparmor=1 security=apparmor systemd.machine_id=${MACHINE_ID} cgroup_enable=memory"
# HassOS system A/B
setenv bootargs_a "root=PARTUUID=8d3d53e3-6d49-4c38-8349-aff6859e82fd rootfstype=squashfs ro rootwait"
setenv bootargs_b "root=PARTUUID=a3ec664e-32ce-4665-95ea-7ae90ce9aa20 rootfstype=squashfs ro rootwait"
# Load extraargs
fileenv mmc ${devnum}:1 ${ramdisk_addr_r} cmdline.txt cmdline
# Load device tree
fatload mmc ${devnum}:1 ${fdt_addr_r} rk3288-tinker.dtb
setenv bootargs
for BOOT_SLOT in "${BOOT_ORDER}"; do
if test "x${bootargs}" != "x"; then
# skip remaining slots
elif test "x${BOOT_SLOT}" = "xA"; then
if test ${BOOT_A_LEFT} -gt 0; then
setexpr BOOT_A_LEFT ${BOOT_A_LEFT} - 1
echo "Trying to boot slot A, ${BOOT_A_LEFT} attempts remaining. Loading kernel ..."
if ext4load mmc ${devnum}:2 ${kernel_addr_r} zImage; then
setenv bootargs "${bootargs_hassos} ${bootargs_a} rauc.slot=A ${cmdline}"
fi
fi
elif test "x${BOOT_SLOT}" = "xB"; then
if test ${BOOT_B_LEFT} -gt 0; then
setexpr BOOT_B_LEFT ${BOOT_B_LEFT} - 1
echo "Trying to boot slot B, ${BOOT_B_LEFT} attempts remaining. Loading kernel ..."
if ext4load mmc ${devnum}:4 ${kernel_addr_r} zImage"; then
setenv bootargs "${bootargs_hassos} ${bootargs_b} rauc.slot=B ${cmdline}"
fi
fi
fi
done
if test -n "${bootargs}"; then
run storebootstate
else
echo "No valid slot found, resetting tries to 3"
setenv BOOT_A_LEFT 3
setenv BOOT_B_LEFT 3
run storebootstate
reset
fi
echo "Starting kernel"
bootz ${kernel_addr_r} - ${fdt_addr_r}
echo "Boot failed, resetting..."
reset

View File

@@ -0,0 +1,2 @@
# CONFIG_USB_STORAGE is not set
# CONFIG_DOS_PARTITION is not set

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,27 @@
#!/bin/bash
# shellcheck disable=SC2155
function hassos_pre_image() {
local BOOT_DATA="$(path_boot_dir)"
local BL1="${BINARIES_DIR}/bl1.bin.hardkernel"
local UBOOT_GXBB="${BINARIES_DIR}/u-boot.gxbb"
local SPL_IMG="$(path_spl_img)"
cp "${BINARIES_DIR}/boot.scr" "${BOOT_DATA}/boot.scr"
cp "${BINARIES_DIR}/meson-gxbb-odroidc2.dtb" "${BOOT_DATA}/meson-gxbb-odroidc2.dtb"
echo "console=tty0 console=ttyAML0,115200n8" > "${BOOT_DATA}/cmdline.txt"
# SPL
create_spl_image
dd if="${BL1}" of="${SPL_IMG}" conv=notrunc bs=1 count=440
dd if="${BL1}" of="${SPL_IMG}" conv=notrunc bs=512 skip=1 seek=1
dd if="${UBOOT_GXBB}" of="${SPL_IMG}" conv=notrunc bs=512 seek=97
}
function hassos_post_image() {
convert_disk_image_gz
}

View File

@@ -0,0 +1,10 @@
BOARD_ID=odroid-c2
BOARD_NAME="Hardkernel Odroid-C2"
CHASSIS=embedded
BOOTLOADER=uboot
KERNEL_FILE=Image
BOOT_SYS=mbr
BOOT_SPL=true
BOOT_ENV_SIZE=0x2000
SUPERVISOR_MACHINE=odroid-c2
SUPERVISOR_ARCH=aarch64

View File

@@ -0,0 +1,80 @@
###########################################
part start mmc ${devnum} 9 mmc_env
mmc dev ${devnum}
setenv loadbootstate " \
echo 'loading env...'; \
mmc read ${ramdisk_addr_r} ${mmc_env} 0x10; \
env import -c ${ramdisk_addr_r} 0x2000;"
setenv storebootstate " \
echo 'storing env...'; \
env export -c -s 0x2000 ${ramdisk_addr_r} BOOT_ORDER BOOT_A_LEFT BOOT_B_LEFT MACHINE_ID; \
mmc write ${ramdisk_addr_r} ${mmc_env} 0x10;"
run loadbootstate
test -n "${BOOT_ORDER}" || setenv BOOT_ORDER "A B"
test -n "${BOOT_A_LEFT}" || setenv BOOT_A_LEFT 3
test -n "${BOOT_B_LEFT}" || setenv BOOT_B_LEFT 3
# HassOS bootargs
setenv bootargs_hassos "zram.enabled=1 zram.num_devices=3 apparmor=1 security=apparmor systemd.machine_id=${MACHINE_ID} cgroup_enable=memory"
# HassOS system A/B
setenv bootargs_a "root=PARTUUID=48617373-06 rootfstype=squashfs ro rootwait"
setenv bootargs_b "root=PARTUUID=48617373-08 rootfstype=squashfs ro rootwait"
# Load extraargs
fileenv mmc ${devnum}:1 ${ramdisk_addr_r} cmdline.txt cmdline
fatload mmc ${devnum}:1 ${fdt_addr_r} meson-gxbb-odroidc2.dtb
# logical volumes get numbered after physical ones.
# 1. boot
# 2. Extended partition
# 3. Overlay
# 4. Data
# 5. KernelA
# 6. SystemA
# 7. KernelB
# 8. SystemB
# 9. BootInfo
setenv bootargs
for BOOT_SLOT in "${BOOT_ORDER}"; do
if test "x${bootargs}" != "x"; then
# skip remaining slots
elif test "x${BOOT_SLOT}" = "xA"; then
if test ${BOOT_A_LEFT} -gt 0; then
setexpr BOOT_A_LEFT ${BOOT_A_LEFT} - 1
echo "Trying to boot slot A, ${BOOT_A_LEFT} attempts remaining. Loading kernel ..."
if ext4load mmc ${devnum}:5 ${kernel_addr_r} Image; then
setenv bootargs "${bootargs_hassos} ${bootargs_a} rauc.slot=A ${cmdline}"
fi
fi
elif test "x${BOOT_SLOT}" = "xB"; then
if test ${BOOT_B_LEFT} -gt 0; then
setexpr BOOT_B_LEFT ${BOOT_B_LEFT} - 1
echo "Trying to boot slot B, ${BOOT_B_LEFT} attempts remaining. Loading kernel ..."
if ext4load mmc ${devnum}:7 ${kernel_addr_r} Image; then
setenv bootargs "${bootargs_hassos} ${bootargs_b} rauc.slot=B ${cmdline}"
fi
fi
fi
done
if test -n "${bootargs}"; then
run storebootstate
else
echo "No valid slot found, resetting tries to 3"
setenv BOOT_A_LEFT 3
setenv BOOT_B_LEFT 3
run storebootstate
reset
fi
printenv bootargs
echo "Starting kernel"
booti ${kernel_addr_r} - ${fdt_addr_r}
echo "Boot failed, resetting..."
reset

View File

@@ -0,0 +1,4 @@
CONFIG_DOS_PARTITION=y
# CONFIG_EFI_PARTITION is not set
# CONFIG_USB_STORAGE is not set
CONFIG_DISPLAY_BOARDINFO=y

View File

@@ -0,0 +1,24 @@
#!/bin/bash
# shellcheck disable=SC2155
function hassos_pre_image() {
local BOOT_DATA="$(path_boot_dir)"
local UBOOT_G12B="${BINARIES_DIR}/u-boot.g12b"
local SPL_IMG="$(path_spl_img)"
cp "${BINARIES_DIR}/boot.scr" "${BOOT_DATA}/boot.scr"
cp "${BINARIES_DIR}"/*.dtb "${BOOT_DATA}/"
echo "console=tty0 console=ttyAML0,115200n8" > "${BOOT_DATA}/cmdline.txt"
# SPL
create_spl_image
dd if="${UBOOT_G12B}" of="${SPL_IMG}" conv=notrunc bs=512 seek=1
}
function hassos_post_image() {
convert_disk_image_gz
}

View File

@@ -0,0 +1 @@
CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE=y

View File

@@ -0,0 +1,10 @@
BOARD_ID=odroid-n2
BOARD_NAME="Hardkernel Odroid-N2"
CHASSIS=embedded
BOOTLOADER=uboot
KERNEL_FILE=Image
BOOT_SYS=mbr
BOOT_SPL=true
BOOT_ENV_SIZE=0x2000
SUPERVISOR_MACHINE=odroid-n2
SUPERVISOR_ARCH=aarch64

View File

@@ -0,0 +1,84 @@
###########################################
part start mmc ${devnum} 9 mmc_env
mmc dev ${devnum}
setenv loadbootstate " \
echo 'loading env...'; \
mmc read ${ramdisk_addr_r} ${mmc_env} 0x10; \
env import -c ${ramdisk_addr_r} 0x2000;"
setenv storebootstate " \
echo 'storing env...'; \
env export -c -s 0x2000 ${ramdisk_addr_r} BOOT_ORDER BOOT_A_LEFT BOOT_B_LEFT MACHINE_ID; \
mmc write ${ramdisk_addr_r} ${mmc_env} 0x10;"
run loadbootstate
test -n "${BOOT_ORDER}" || setenv BOOT_ORDER "A B"
test -n "${BOOT_A_LEFT}" || setenv BOOT_A_LEFT 3
test -n "${BOOT_B_LEFT}" || setenv BOOT_B_LEFT 3
# HassOS bootargs
setenv bootargs_hassos "zram.enabled=1 zram.num_devices=3 apparmor=1 security=apparmor systemd.machine_id=${MACHINE_ID} cgroup_enable=memory"
# HassOS system A/B
setenv bootargs_a "root=PARTUUID=48617373-06 rootfstype=squashfs ro rootwait"
setenv bootargs_b "root=PARTUUID=48617373-08 rootfstype=squashfs ro rootwait"
# Load extraargs
fileenv mmc ${devnum}:1 ${ramdisk_addr_r} cmdline.txt cmdline
if test "${board_rev}" = "c"; then
fatload mmc ${devnum}:1 ${fdt_addr_r} meson-g12b-odroid-n2-plus.dtb
else
fatload mmc ${devnum}:1 ${fdt_addr_r} meson-g12b-odroid-n2.dtb
fi
# logical volumes get numbered after physical ones.
# 1. boot
# 2. Extended partition
# 3. Overlay
# 4. Data
# 5. KernelA
# 6. SystemA
# 7. KernelB
# 8. SystemB
# 9. BootInfo
setenv bootargs
for BOOT_SLOT in "${BOOT_ORDER}"; do
if test "x${bootargs}" != "x"; then
# skip remaining slots
elif test "x${BOOT_SLOT}" = "xA"; then
if test ${BOOT_A_LEFT} -gt 0; then
setexpr BOOT_A_LEFT ${BOOT_A_LEFT} - 1
echo "Trying to boot slot A, ${BOOT_A_LEFT} attempts remaining. Loading kernel ..."
if ext4load mmc ${devnum}:5 ${kernel_addr_r} Image; then
setenv bootargs "${bootargs_hassos} ${bootargs_a} rauc.slot=A ${cmdline}"
fi
fi
elif test "x${BOOT_SLOT}" = "xB"; then
if test ${BOOT_B_LEFT} -gt 0; then
setexpr BOOT_B_LEFT ${BOOT_B_LEFT} - 1
echo "Trying to boot slot B, ${BOOT_B_LEFT} attempts remaining. Loading kernel ..."
if ext4load mmc ${devnum}:7 ${kernel_addr_r} Image; then
setenv bootargs "${bootargs_hassos} ${bootargs_b} rauc.slot=B ${cmdline}"
fi
fi
fi
done
if test -n "${bootargs}"; then
run storebootstate
else
echo "No valid slot found, resetting tries to 3"
setenv BOOT_A_LEFT 3
setenv BOOT_B_LEFT 3
run storebootstate
reset
fi
printenv bootargs
echo "Starting kernel"
booti ${kernel_addr_r} - ${fdt_addr_r}
echo "Boot failed, resetting..."
reset

View File

@@ -0,0 +1,4 @@
CONFIG_DOS_PARTITION=y
# CONFIG_EFI_PARTITION is not set
# CONFIG_USB_STORAGE is not set
CONFIG_DISPLAY_BOARDINFO=y

View File

@@ -0,0 +1,30 @@
#!/bin/bash
# shellcheck disable=SC2155
function hassos_pre_image() {
local BOOT_DATA="$(path_boot_dir)"
local BL1="${BINARIES_DIR}/bl1.bin.hardkernel"
local BL2="${BINARIES_DIR}/bl2.bin.hardkernel.720k_uboot"
local BLTZ="${BINARIES_DIR}/tzsw.bin.hardkernel"
local UBOOT="${BINARIES_DIR}/u-boot.bin"
local spl_img="$(path_spl_img)"
cp "${BINARIES_DIR}/boot.scr" "${BOOT_DATA}/boot.scr"
cp "${BINARIES_DIR}/exynos5422-odroidxu4.dtb" "${BOOT_DATA}/exynos5422-odroidxu4.dtb"
echo "console=tty1 console=ttySAC2,115200" > "${BOOT_DATA}/cmdline.txt"
# SPL
create_spl_image
dd if="${BL1}" of="${spl_img}" conv=notrunc bs=512 seek=1
dd if="${BL2}" of="${spl_img}" conv=notrunc bs=512 seek=31
dd if="${UBOOT}" of="${spl_img}" conv=notrunc bs=512 seek=63
dd if="${BLTZ}" of="${spl_img}" conv=notrunc bs=512 seek=1503
dd if=/dev/zero of="${spl_img}" conv=notrunc bs=512 count=32 seek=2015
}
function hassos_post_image() {
convert_disk_image_gz
}

View File

@@ -0,0 +1,10 @@
BOARD_ID=odroid-xu4
BOARD_NAME="Hardkernel Odroid-XU4"
CHASSIS=embedded
BOOTLOADER=uboot
KERNEL_FILE=zImage
BOOT_SYS=mbr
BOOT_SPL=true
BOOT_ENV_SIZE=0x4000
SUPERVISOR_MACHINE=odroid-xu
SUPERVISOR_ARCH=armv7

View File

@@ -0,0 +1,84 @@
###########################################
part start mmc ${devnum} 9 mmc_env
mmc dev ${devnum}
# Note that import is performed twice for backwards compatability.
setenv loadbootstate " \
echo 'loading env...'; \
mmc read ${ramdisk_addr_r} ${mmc_env} 0x20; \
env import -c ${ramdisk_addr_r} 0x4000;"
setenv storebootstate " \
echo 'storing env...'; \
env export -c -s 0x4000 ${ramdisk_addr_r} BOOT_ORDER BOOT_A_LEFT BOOT_B_LEFT MACHINE_ID; \
mmc write ${ramdisk_addr_r} ${mmc_env} 0x20;"
run loadbootstate
test -n "${BOOT_ORDER}" || setenv BOOT_ORDER "A B"
test -n "${BOOT_A_LEFT}" || setenv BOOT_A_LEFT 3
test -n "${BOOT_B_LEFT}" || setenv BOOT_B_LEFT 3
# HassOS bootargs
setenv bootargs_hassos "zram.enabled=1 zram.num_devices=3 apparmor=1 security=apparmor systemd.machine_id=${MACHINE_ID} cgroup_enable=memory"
# HassOS system A/B
setenv bootargs_a "root=PARTUUID=48617373-06 rootfstype=squashfs ro rootwait"
setenv bootargs_b "root=PARTUUID=48617373-08 rootfstype=squashfs ro rootwait"
# Load extraargs
fileenv mmc ${devnum}:1 ${ramdisk_addr_r} cmdline.txt cmdline
fatload mmc ${devnum}:1 ${fdt_addr_r} exynos5422-odroidxu4.dtb
fdt addr ${fdt_addr_r}
# logical volumes get numbered after physical ones.
# 1. boot
# 2. Extended partition
# 3. Overlay
# 4. Data
# 5. KernelA
# 6. SystemA
# 7. KernelB
# 8. SystemB
# 9. BootInfo
setenv bootargs
for BOOT_SLOT in "${BOOT_ORDER}"; do
if test "x${bootargs}" != "x"; then
# skip remaining slots
elif test "x${BOOT_SLOT}" = "xA"; then
if test ${BOOT_A_LEFT} -gt 0; then
setexpr BOOT_A_LEFT ${BOOT_A_LEFT} - 1
echo "Trying to boot slot A, ${BOOT_A_LEFT} attempts remaining. Loading kernel ..."
if ext4load mmc ${devnum}:5 ${kernel_addr_r} zImage; then
setenv bootargs "${bootargs_hassos} ${bootargs_a} rauc.slot=A ${cmdline}"
fi
fi
elif test "x${BOOT_SLOT}" = "xB"; then
if test ${BOOT_B_LEFT} -gt 0; then
setexpr BOOT_B_LEFT ${BOOT_B_LEFT} - 1
echo "Trying to boot slot B, ${BOOT_B_LEFT} attempts remaining. Loading kernel ..."
if ext4load mmc ${devnum}:7 ${kernel_addr_r} zImage; then
setenv bootargs "${bootargs_hassos} ${bootargs_b} rauc.slot=B ${cmdline}"
fi
fi
fi
done
if test -n "${bootargs}"; then
run storebootstate
else
echo "No valid slot found, resetting tries to 3"
setenv BOOT_A_LEFT 3
setenv BOOT_B_LEFT 3
run storebootstate
reset
fi
printenv bootargs
echo "Starting kernel"
bootz ${kernel_addr_r} - ${fdt_addr_r}
echo "Boot failed, resetting..."
reset

View File

@@ -0,0 +1,3 @@
CONFIG_DOS_PARTITION=y
# CONFIG_EFI_PARTITION is not set
# CONFIG_USB_STORAGE is not set

View File

@@ -0,0 +1,44 @@
From 59bbf3567b02c36edfa4ee013d7e7e8c492756f2 Mon Sep 17 00:00:00 2001
Message-Id: <59bbf3567b02c36edfa4ee013d7e7e8c492756f2.1606830718.git.stefan@agner.ch>
From: Jerome Brunet <jbrunet@baylibre.com>
Date: Tue, 21 Apr 2020 18:39:30 +0200
Subject: [PATCH 01/17] arm64: defconfig: enable meson gx audio as module
Enable the module config for the Amlogic GX audio card.
This module will imply the internal components usually associated
with it to make a functional sound card on these platforms.
Also enable the simple amplifier module which often used on the
output stage of those cards.
Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
Signed-off-by: Kevin Hilman <khilman@baylibre.com>
Tested-by: Christian Hewitt <christianshewitt@gmail.com>
Link: https://lore.kernel.org/r/20200421163935.775935-2-jbrunet@baylibre.com
---
arch/arm64/configs/defconfig | 2 ++
1 file changed, 2 insertions(+)
diff --git a/arch/arm64/configs/defconfig b/arch/arm64/configs/defconfig
index 03d0189f7d68..ceb60ee9c340 100644
--- a/arch/arm64/configs/defconfig
+++ b/arch/arm64/configs/defconfig
@@ -644,6 +644,7 @@ CONFIG_SND_HDA_CODEC_HDMI=m
CONFIG_SND_SOC=y
CONFIG_SND_BCM2835_SOC_I2S=m
CONFIG_SND_MESON_AXG_SOUND_CARD=m
+CONFIG_SND_MESON_GX_SOUND_CARD=m
CONFIG_SND_SOC_SDM845=m
CONFIG_SND_SOC_ROCKCHIP=m
CONFIG_SND_SOC_ROCKCHIP_SPDIF=m
@@ -656,6 +657,7 @@ CONFIG_SND_SOC_AK4613=m
CONFIG_SND_SOC_ES7134=m
CONFIG_SND_SOC_ES7241=m
CONFIG_SND_SOC_PCM3168A_I2C=m
+CONFIG_SND_SOC_SIMPLE_AMPLIFIER=m
CONFIG_SND_SOC_TAS571X=m
CONFIG_SND_SOC_WCD934X=m
CONFIG_SND_SOC_WSA881X=m
--
2.29.2

View File

@@ -0,0 +1,31 @@
From 4684d42cbbbb2d0331eb273229c9856a09b8d687 Mon Sep 17 00:00:00 2001
Message-Id: <4684d42cbbbb2d0331eb273229c9856a09b8d687.1606830718.git.stefan@agner.ch>
In-Reply-To: <59bbf3567b02c36edfa4ee013d7e7e8c492756f2.1606830718.git.stefan@agner.ch>
References: <59bbf3567b02c36edfa4ee013d7e7e8c492756f2.1606830718.git.stefan@agner.ch>
From: Jerome Brunet <jbrunet@baylibre.com>
Date: Mon, 30 Mar 2020 17:39:04 +0200
Subject: [PATCH 02/17] ASoC: meson: imply acodec glue on axg sound card
When axg card driver support is enabled, lets enable the related
internal DAC glue by default.
Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
---
sound/soc/meson/Kconfig | 1 +
1 file changed, 1 insertion(+)
diff --git a/sound/soc/meson/Kconfig b/sound/soc/meson/Kconfig
index 8b6295283989..363dc3b1bbe4 100644
--- a/sound/soc/meson/Kconfig
+++ b/sound/soc/meson/Kconfig
@@ -68,6 +68,7 @@ config SND_MESON_AXG_SOUND_CARD
imply SND_MESON_AXG_SPDIFOUT
imply SND_MESON_AXG_SPDIFIN
imply SND_MESON_AXG_PDM
+ imply SND_MESON_G12A_TOACODEC
imply SND_MESON_G12A_TOHDMITX if DRM_MESON_DW_HDMI
help
Select Y or M to add support for the AXG SoC sound card
--
2.29.2

View File

@@ -0,0 +1,50 @@
From 07eb6dcfc912281b3c4ad598d8cfd3b7548fc965 Mon Sep 17 00:00:00 2001
Message-Id: <07eb6dcfc912281b3c4ad598d8cfd3b7548fc965.1606830718.git.stefan@agner.ch>
In-Reply-To: <59bbf3567b02c36edfa4ee013d7e7e8c492756f2.1606830718.git.stefan@agner.ch>
References: <59bbf3567b02c36edfa4ee013d7e7e8c492756f2.1606830718.git.stefan@agner.ch>
From: Jerome Brunet <jbrunet@baylibre.com>
Date: Mon, 24 Feb 2020 14:35:17 +0100
Subject: [PATCH 03/17] ASoC: meson: gx-card: fix sound-dai dt schema
There is a fair amount of warnings when running 'make dtbs_check' with
amlogic,gx-sound-card.yaml.
Ex:
arch/arm64/boot/dts/amlogic/meson-gxm-q200.dt.yaml: sound: dai-link-0:sound-dai:0:1: missing phandle tag in 0
arch/arm64/boot/dts/amlogic/meson-gxm-q200.dt.yaml: sound: dai-link-0:sound-dai:0:2: missing phandle tag in 0
arch/arm64/boot/dts/amlogic/meson-gxm-q200.dt.yaml: sound: dai-link-0:sound-dai:0: [66, 0, 0] is too long
The reason is that the sound-dai phandle provided has cells, and in such
case the schema should use 'phandle-array' instead of 'phandle'.
Fixes: fd00366b8e41 ("ASoC: meson: gx: add sound card dt-binding documentation")
Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
---
.../devicetree/bindings/sound/amlogic,gx-sound-card.yaml | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/Documentation/devicetree/bindings/sound/amlogic,gx-sound-card.yaml b/Documentation/devicetree/bindings/sound/amlogic,gx-sound-card.yaml
index fb374c659be1..a48222e8cd08 100644
--- a/Documentation/devicetree/bindings/sound/amlogic,gx-sound-card.yaml
+++ b/Documentation/devicetree/bindings/sound/amlogic,gx-sound-card.yaml
@@ -57,7 +57,7 @@ patternProperties:
rate
sound-dai:
- $ref: /schemas/types.yaml#/definitions/phandle
+ $ref: /schemas/types.yaml#/definitions/phandle-array
description: phandle of the CPU DAI
patternProperties:
@@ -71,7 +71,7 @@ patternProperties:
properties:
sound-dai:
- $ref: /schemas/types.yaml#/definitions/phandle
+ $ref: /schemas/types.yaml#/definitions/phandle-array
description: phandle of the codec DAI
required:
--
2.29.2

View File

@@ -0,0 +1,42 @@
From 5f7bab7b52bc68738dd23af62a085dcc45c22f79 Mon Sep 17 00:00:00 2001
Message-Id: <5f7bab7b52bc68738dd23af62a085dcc45c22f79.1606830718.git.stefan@agner.ch>
In-Reply-To: <59bbf3567b02c36edfa4ee013d7e7e8c492756f2.1606830718.git.stefan@agner.ch>
References: <59bbf3567b02c36edfa4ee013d7e7e8c492756f2.1606830718.git.stefan@agner.ch>
From: Jerome Brunet <jbrunet@baylibre.com>
Date: Thu, 7 May 2020 00:16:55 +0200
Subject: [PATCH 04/17] arm64: dts: meson: g12: add internal DAC
add internal audio DAC support on the g12 and sm1 SoC family
Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
Signed-off-by: Kevin Hilman <khilman@baylibre.com>
Link: https://lore.kernel.org/r/20200506221656.477379-7-jbrunet@baylibre.com
---
arch/arm64/boot/dts/amlogic/meson-g12-common.dtsi | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/arch/arm64/boot/dts/amlogic/meson-g12-common.dtsi b/arch/arm64/boot/dts/amlogic/meson-g12-common.dtsi
index c0aef7d69117..593a006f4b7b 100644
--- a/arch/arm64/boot/dts/amlogic/meson-g12-common.dtsi
+++ b/arch/arm64/boot/dts/amlogic/meson-g12-common.dtsi
@@ -250,6 +250,17 @@ hwrng: rng@218 {
};
};
+ acodec: audio-controller@32000 {
+ compatible = "amlogic,t9015";
+ reg = <0x0 0x32000 0x0 0x14>;
+ #sound-dai-cells = <0>;
+ sound-name-prefix = "ACODEC";
+ clocks = <&clkc CLKID_AUDIO_CODEC>;
+ clock-names = "pclk";
+ resets = <&reset RESET_AUDIO_CODEC>;
+ status = "disabled";
+ };
+
periphs: bus@34400 {
compatible = "simple-bus";
reg = <0x0 0x34400 0x0 0x400>;
--
2.29.2

View File

@@ -0,0 +1,42 @@
From e7d1f61513cfe9d2557fbd0ac981a3ecaab9bc70 Mon Sep 17 00:00:00 2001
Message-Id: <e7d1f61513cfe9d2557fbd0ac981a3ecaab9bc70.1606830718.git.stefan@agner.ch>
In-Reply-To: <59bbf3567b02c36edfa4ee013d7e7e8c492756f2.1606830718.git.stefan@agner.ch>
References: <59bbf3567b02c36edfa4ee013d7e7e8c492756f2.1606830718.git.stefan@agner.ch>
From: Jerome Brunet <jbrunet@baylibre.com>
Date: Thu, 7 May 2020 00:16:56 +0200
Subject: [PATCH 05/17] arm64: dts: meson: g12: add internal DAC glue
add the internal DAC glue support on the g12 and sm1 family
This glue connects the different TDM interfaces of the SoC to
the internal audio DAC codec.
Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
Signed-off-by: Kevin Hilman <khilman@baylibre.com>
Link: https://lore.kernel.org/r/20200506221656.477379-8-jbrunet@baylibre.com
---
arch/arm64/boot/dts/amlogic/meson-g12.dtsi | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/arch/arm64/boot/dts/amlogic/meson-g12.dtsi b/arch/arm64/boot/dts/amlogic/meson-g12.dtsi
index 55d39020ec72..0d14409f509c 100644
--- a/arch/arm64/boot/dts/amlogic/meson-g12.dtsi
+++ b/arch/arm64/boot/dts/amlogic/meson-g12.dtsi
@@ -343,6 +343,15 @@ spdifout_b: audio-controller@680 {
status = "disabled";
};
+ toacodec: audio-controller@740 {
+ compatible = "amlogic,g12a-toacodec";
+ reg = <0x0 0x740 0x0 0x4>;
+ #sound-dai-cells = <1>;
+ sound-name-prefix = "TOACODEC";
+ resets = <&clkc_audio AUD_RESET_TOACODEC>;
+ status = "disabled";
+ };
+
tohdmitx: audio-controller@744 {
compatible = "amlogic,g12a-tohdmitx";
reg = <0x0 0x744 0x0 0x4>;
--
2.29.2

View File

@@ -0,0 +1,127 @@
From a778ae244b9e6035ef4c0e4fb36d81f140ed5019 Mon Sep 17 00:00:00 2001
Message-Id: <a778ae244b9e6035ef4c0e4fb36d81f140ed5019.1606830718.git.stefan@agner.ch>
In-Reply-To: <59bbf3567b02c36edfa4ee013d7e7e8c492756f2.1606830718.git.stefan@agner.ch>
References: <59bbf3567b02c36edfa4ee013d7e7e8c492756f2.1606830718.git.stefan@agner.ch>
From: Jerome Brunet <jbrunet@baylibre.com>
Date: Mon, 15 Jun 2020 15:38:44 +0200
Subject: [PATCH 06/17] arm64: dts: meson-g12b: odroid-n2: enable audio
loopback
Add capture pcm interfaces and loopback routes to the odroid-n2
Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
---
.../boot/dts/amlogic/meson-g12b-odroid-n2.dts | 65 +++++++++++++++++--
1 file changed, 61 insertions(+), 4 deletions(-)
diff --git a/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dts b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dts
index 169ea283d4ee..d4421ad164bd 100644
--- a/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dts
+++ b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dts
@@ -209,11 +209,28 @@ hdmi_connector_in: endpoint {
sound {
compatible = "amlogic,axg-sound-card";
model = "G12B-ODROID-N2";
- audio-aux-devs = <&tdmout_b>;
+ audio-aux-devs = <&tdmout_b>, <&tdmin_a>, <&tdmin_b>,
+ <&tdmin_c>, <&tdmin_lb>;
audio-routing = "TDMOUT_B IN 0", "FRDDR_A OUT 1",
"TDMOUT_B IN 1", "FRDDR_B OUT 1",
"TDMOUT_B IN 2", "FRDDR_C OUT 1",
- "TDM_B Playback", "TDMOUT_B OUT";
+ "TDM_B Playback", "TDMOUT_B OUT",
+ "TDMIN_A IN 4", "TDM_B Loopback",
+ "TDMIN_B IN 4", "TDM_B Loopback",
+ "TDMIN_C IN 4", "TDM_B Loopback",
+ "TDMIN_LB IN 1", "TDM_B Loopback",
+ "TODDR_A IN 0", "TDMIN_A OUT",
+ "TODDR_B IN 0", "TDMIN_A OUT",
+ "TODDR_C IN 0", "TDMIN_A OUT",
+ "TODDR_A IN 1", "TDMIN_B OUT",
+ "TODDR_B IN 1", "TDMIN_B OUT",
+ "TODDR_C IN 1", "TDMIN_B OUT",
+ "TODDR_A IN 2", "TDMIN_C OUT",
+ "TODDR_B IN 2", "TDMIN_C OUT",
+ "TODDR_C IN 2", "TDMIN_C OUT",
+ "TODDR_A IN 6", "TDMIN_LB OUT",
+ "TODDR_B IN 6", "TDMIN_LB OUT",
+ "TODDR_C IN 6", "TDMIN_LB OUT";
assigned-clocks = <&clkc CLKID_MPLL2>,
<&clkc CLKID_MPLL0>,
@@ -236,8 +253,20 @@ dai-link-2 {
sound-dai = <&frddr_c>;
};
- /* 8ch hdmi interface */
dai-link-3 {
+ sound-dai = <&toddr_a>;
+ };
+
+ dai-link-4 {
+ sound-dai = <&toddr_b>;
+ };
+
+ dai-link-5 {
+ sound-dai = <&toddr_c>;
+ };
+
+ /* 8ch hdmi interface */
+ dai-link-6 {
sound-dai = <&tdmif_b>;
dai-format = "i2s";
dai-tdm-slot-tx-mask-0 = <1 1>;
@@ -252,7 +281,7 @@ codec {
};
/* hdmi glue */
- dai-link-4 {
+ dai-link-7 {
sound-dai = <&tohdmitx TOHDMITX_I2S_OUT>;
codec {
@@ -476,6 +505,22 @@ &tdmif_b {
status = "okay";
};
+&tdmin_a {
+ status = "okay";
+};
+
+&tdmin_b {
+ status = "okay";
+};
+
+&tdmin_c {
+ status = "okay";
+};
+
+&tdmin_lb {
+ status = "okay";
+};
+
&tdmout_b {
status = "okay";
};
@@ -484,6 +529,18 @@ &tohdmitx {
status = "okay";
};
+&toddr_a {
+ status = "okay";
+};
+
+&toddr_b {
+ status = "okay";
+};
+
+&toddr_c {
+ status = "okay";
+};
+
&uart_AO {
status = "okay";
pinctrl-0 = <&uart_ao_a_pins>;
--
2.29.2

View File

@@ -0,0 +1,171 @@
From 26603168f26468ac1872fcbcd703d2cd5a626310 Mon Sep 17 00:00:00 2001
Message-Id: <26603168f26468ac1872fcbcd703d2cd5a626310.1606830718.git.stefan@agner.ch>
In-Reply-To: <59bbf3567b02c36edfa4ee013d7e7e8c492756f2.1606830718.git.stefan@agner.ch>
References: <59bbf3567b02c36edfa4ee013d7e7e8c492756f2.1606830718.git.stefan@agner.ch>
From: Jerome Brunet <jbrunet@baylibre.com>
Date: Mon, 15 Jun 2020 16:34:37 +0200
Subject: [PATCH 07/17] arm64: dts: meson: odroid-n2: add jack audio output
support
Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
---
.../boot/dts/amlogic/meson-g12b-odroid-n2.dts | 79 +++++++++++++++++--
1 file changed, 74 insertions(+), 5 deletions(-)
diff --git a/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dts b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dts
index d4421ad164bd..34fffa6d859d 100644
--- a/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dts
+++ b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dts
@@ -9,6 +9,7 @@
#include "meson-g12b-s922x.dtsi"
#include <dt-bindings/input/input.h>
#include <dt-bindings/gpio/meson-g12a-gpio.h>
+#include <dt-bindings/sound/meson-g12a-toacodec.h>
#include <dt-bindings/sound/meson-g12a-tohdmitx.h>
/ {
@@ -20,6 +21,14 @@ aliases {
ethernet0 = &ethmac;
};
+ dioo2133: audio-amplifier-0 {
+ compatible = "simple-audio-amplifier";
+ enable-gpios = <&gpio_ao GPIOAO_2 GPIO_ACTIVE_HIGH>;
+ VCC-supply = <&vcc_5v>;
+ sound-name-prefix = "U19";
+ status = "okay";
+ };
+
chosen {
stdout-path = "serial0:115200n8";
};
@@ -209,16 +218,26 @@ hdmi_connector_in: endpoint {
sound {
compatible = "amlogic,axg-sound-card";
model = "G12B-ODROID-N2";
- audio-aux-devs = <&tdmout_b>, <&tdmin_a>, <&tdmin_b>,
- <&tdmin_c>, <&tdmin_lb>;
+ audio-widgets = "Line", "Lineout";
+ audio-aux-devs = <&tdmout_b>, <&tdmout_c>, <&tdmin_a>,
+ <&tdmin_b>, <&tdmin_c>, <&tdmin_lb>,
+ <&dioo2133>;
audio-routing = "TDMOUT_B IN 0", "FRDDR_A OUT 1",
"TDMOUT_B IN 1", "FRDDR_B OUT 1",
"TDMOUT_B IN 2", "FRDDR_C OUT 1",
"TDM_B Playback", "TDMOUT_B OUT",
+ "TDMOUT_C IN 0", "FRDDR_A OUT 2",
+ "TDMOUT_C IN 1", "FRDDR_B OUT 2",
+ "TDMOUT_C IN 2", "FRDDR_C OUT 2",
+ "TDM_C Playback", "TDMOUT_C OUT",
"TDMIN_A IN 4", "TDM_B Loopback",
"TDMIN_B IN 4", "TDM_B Loopback",
"TDMIN_C IN 4", "TDM_B Loopback",
"TDMIN_LB IN 1", "TDM_B Loopback",
+ "TDMIN_A IN 5", "TDM_C Loopback",
+ "TDMIN_B IN 5", "TDM_C Loopback",
+ "TDMIN_C IN 5", "TDM_C Loopback",
+ "TDMIN_LB IN 2", "TDM_C Loopback",
"TODDR_A IN 0", "TDMIN_A OUT",
"TODDR_B IN 0", "TDMIN_A OUT",
"TODDR_C IN 0", "TDMIN_A OUT",
@@ -230,7 +249,11 @@ sound {
"TODDR_C IN 2", "TDMIN_C OUT",
"TODDR_A IN 6", "TDMIN_LB OUT",
"TODDR_B IN 6", "TDMIN_LB OUT",
- "TODDR_C IN 6", "TDMIN_LB OUT";
+ "TODDR_C IN 6", "TDMIN_LB OUT",
+ "U19 INL", "ACODEC LOLP",
+ "U19 INR", "ACODEC LORP",
+ "Lineout", "U19 OUTL",
+ "Lineout", "U19 OUTR";
assigned-clocks = <&clkc CLKID_MPLL2>,
<&clkc CLKID_MPLL0>,
@@ -275,22 +298,56 @@ dai-link-6 {
dai-tdm-slot-tx-mask-3 = <1 1>;
mclk-fs = <256>;
- codec {
+ codec-0 {
sound-dai = <&tohdmitx TOHDMITX_I2S_IN_B>;
};
+
+ codec-1 {
+ sound-dai = <&toacodec TOACODEC_IN_B>;
+ };
};
- /* hdmi glue */
+ /* i2s jack output interface */
dai-link-7 {
+ sound-dai = <&tdmif_c>;
+ dai-format = "i2s";
+ dai-tdm-slot-tx-mask-0 = <1 1>;
+ mclk-fs = <256>;
+
+ codec-0 {
+ sound-dai = <&tohdmitx TOHDMITX_I2S_IN_C>;
+ };
+
+ codec-1 {
+ sound-dai = <&toacodec TOACODEC_IN_C>;
+ };
+ };
+
+ /* hdmi glue */
+ dai-link-8 {
sound-dai = <&tohdmitx TOHDMITX_I2S_OUT>;
codec {
sound-dai = <&hdmi_tx>;
};
};
+
+ /* acodec glue */
+ dai-link-9 {
+ sound-dai = <&toacodec TOACODEC_OUT>;
+
+ codec {
+ sound-dai = <&acodec>;
+ };
+ };
};
};
+&acodec {
+ AVDD-supply = <&vddao_1v8>;
+ status = "okay";
+};
+
&arb {
status = "okay";
};
@@ -505,6 +562,10 @@ &tdmif_b {
status = "okay";
};
+&tdmif_c {
+ status = "okay";
+};
+
&tdmin_a {
status = "okay";
};
@@ -525,6 +586,14 @@ &tdmout_b {
status = "okay";
};
+&tdmout_c {
+ status = "okay";
+};
+
+&toacodec {
+ status = "okay";
+};
+
&tohdmitx {
status = "okay";
};
--
2.29.2

View File

@@ -0,0 +1,37 @@
From 40c86a409f3fa18c3f30bad3abeccff04379eaa9 Mon Sep 17 00:00:00 2001
Message-Id: <40c86a409f3fa18c3f30bad3abeccff04379eaa9.1606830718.git.stefan@agner.ch>
In-Reply-To: <59bbf3567b02c36edfa4ee013d7e7e8c492756f2.1606830718.git.stefan@agner.ch>
References: <59bbf3567b02c36edfa4ee013d7e7e8c492756f2.1606830718.git.stefan@agner.ch>
From: Christian Hewitt <christianshewitt@gmail.com>
Date: Tue, 15 Sep 2020 17:24:31 +0200
Subject: [PATCH 08/17] dt-bindings: arm: amlogic: add support for the
ODROID-N2+
HardKernel ODROID-N2+ uses a revised Amlogic S922X v2 chip that supports
higher cpu clock speeds than the original ODROID-N2.
Signed-off-by: Christian Hewitt <christianshewitt@gmail.com>
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
Signed-off-by: Kevin Hilman <khilman@baylibre.com>
Acked-by: Rob Herring <robh@kernel.org>
Acked-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Link: https://lore.kernel.org/r/20200915152432.30616-3-narmstrong@baylibre.com
---
Documentation/devicetree/bindings/arm/amlogic.yaml | 1 +
1 file changed, 1 insertion(+)
diff --git a/Documentation/devicetree/bindings/arm/amlogic.yaml b/Documentation/devicetree/bindings/arm/amlogic.yaml
index f74aba48cec1..915ef4f355ad 100644
--- a/Documentation/devicetree/bindings/arm/amlogic.yaml
+++ b/Documentation/devicetree/bindings/arm/amlogic.yaml
@@ -149,6 +149,7 @@ properties:
items:
- enum:
- hardkernel,odroid-n2
+ - hardkernel,odroid-n2-plus
- khadas,vim3
- ugoos,am6
- const: amlogic,s922x
--
2.29.2

Some files were not shown because too many files have changed in this diff Show More