Compare commits
77 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4d99243c91 | ||
|
|
18640da277 | ||
|
|
5351b542ff | ||
|
|
033e153d49 | ||
|
|
ad898040ac | ||
|
|
9e29a12f95 | ||
|
|
0ab78a97c7 | ||
|
|
43c423243a | ||
|
|
19488834e4 | ||
|
|
dc35208efe | ||
|
|
2435ca9065 | ||
|
|
404efdee52 | ||
|
|
cbd9b45adc | ||
|
|
56992c6a77 | ||
|
|
47bb76acec | ||
|
|
caf708e14a | ||
|
|
809abbfde2 | ||
|
|
a2363d9a27 | ||
|
|
5cdf66c2c8 | ||
|
|
a7fa7efbf9 | ||
|
|
976e9b0bce | ||
|
|
960e11dc4f | ||
|
|
2291e8599e | ||
|
|
bcb9c3fa1f | ||
|
|
b827a90a35 | ||
|
|
921dd693dd | ||
|
|
005cbc0b89 | ||
|
|
482e6f7a7b | ||
|
|
b83bfc5910 | ||
|
|
c475daf889 | ||
|
|
dac76b1632 | ||
|
|
faa371191f | ||
|
|
8cde7f9192 | ||
|
|
1112a10509 | ||
|
|
ad9f21fdfb | ||
|
|
55cc60fc8e | ||
|
|
075799aaa8 | ||
|
|
3733a07bac | ||
|
|
eb553bec07 | ||
|
|
803bfc8391 | ||
|
|
e7e2dc2aad | ||
|
|
352072cc5a | ||
|
|
5d90fa9e20 | ||
|
|
54389be443 | ||
|
|
ae8dec9f72 | ||
|
|
064ee9ef84 | ||
|
|
21e3a30012 | ||
|
|
8d86fa9ec9 | ||
|
|
1ead97f64a | ||
|
|
703f0168bf | ||
|
|
7cea5a829f | ||
|
|
0bc81f78ec | ||
|
|
331336a2d4 | ||
|
|
8086b55acd | ||
|
|
2a0d551667 | ||
|
|
61b0b333f0 | ||
|
|
dc0f6367cb | ||
|
|
486161f2d8 | ||
|
|
9441f6b16e | ||
|
|
514c59796f | ||
|
|
ebf84216e9 | ||
|
|
74ff13e25e | ||
|
|
9b170812d6 | ||
|
|
3b45011982 | ||
|
|
8e1af1313b | ||
|
|
0f8010bc90 | ||
|
|
7006a5fd64 | ||
|
|
170ed2db00 | ||
|
|
ef40d38b12 | ||
|
|
d144f72868 | ||
|
|
11088580c5 | ||
|
|
5c8f8bea48 | ||
|
|
8bb3732934 | ||
|
|
86f88aae0a | ||
|
|
10e310d8b5 | ||
|
|
6467f343cd | ||
|
|
e20249676a |
@@ -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/
|
||||
|
||||
13
.github/move.yml
vendored
13
.github/move.yml
vendored
@@ -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
|
||||
|
||||
4
.github/release-drafter.yml
vendored
Normal file
4
.github/release-drafter.yml
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
template: |
|
||||
## What's Changed
|
||||
|
||||
$CHANGES
|
||||
@@ -1,9 +1,9 @@
|
||||
# Bluetooth
|
||||
|
||||
We support `bluetoothctl` on host. Later we want also support bluetooth trought UI.
|
||||
We support `bluetoothctl` on host. Later we want also support Bluetooth trought UI.
|
||||
All pairs and settings are persistent over reboots and updates.
|
||||
|
||||
If you want setup bluetooth on host, use the *bluetoothctl* utility.
|
||||
If you want setup Bluetooth on host, use the `bluetoothctl` utility.
|
||||
|
||||
## Scan devices
|
||||
|
||||
|
||||
22
Documentation/boards/odroid-c2.md
Normal file
22
Documentation/boards/odroid-c2.md
Normal 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).
|
||||
@@ -1,7 +1,7 @@
|
||||
# OVA
|
||||
|
||||
The OVA stay for open virtual appliance. Currently we had remove the ova files and publish a vmdk virtual disk,
|
||||
until we have better OVF template to generate our OVA. This vmdk work with (maybe you need convert the disk):
|
||||
OVA stands for Open Virtual Appliance. Currently we had remove the ova files and publish a vmdk virtual disk,
|
||||
until we have better OVF template to generate our OVA. This VMDK work with (maybe you need convert the disk):
|
||||
- HyperV
|
||||
- VirtualBox
|
||||
- VMware
|
||||
|
||||
@@ -16,7 +16,7 @@ The 64bit version is under development by RPi-Team. It work very nice but it cou
|
||||
|
||||
## Serial console
|
||||
|
||||
For access to terminal over serial console, add `console=ttyAMA0,115200` to `cmdline.txt` and `enable_uart=1` into `config.txt`. GPIO pins are: 6 = GND / 8 = UART TXD / 10 = UART RXD.
|
||||
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
|
||||
|
||||
|
||||
@@ -2,19 +2,23 @@
|
||||
|
||||
## Automatic
|
||||
|
||||
You can use a 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`. Use the following directory structure within the USB drive:
|
||||
You can use an USB drive with HassOS to configure network options, SSH access to the host and to install updates.
|
||||
Format a USB stick with FAT32/EXT4/NTFS and name it `CONFIG`. Alternative you can create a `CONFIG` folder inside boot partition. Use the following directory structure within the USB drive:
|
||||
|
||||
```
|
||||
```text
|
||||
network/
|
||||
modules/
|
||||
udev/
|
||||
authorized_keys
|
||||
timesyncd.conf
|
||||
hassos-xy.raucb
|
||||
```
|
||||
|
||||
- The `network` folder can contain any kind of NetworkManager connection files. For more information see [Network][network.md].
|
||||
- The `modules` folder is for modules-load configuration files.
|
||||
- The `udev` folder is for udev rules files.
|
||||
- The `authorized_keys` file activates debug SSH access on port `22222`. See [Debugging Hassio][debug-hassio].
|
||||
- The `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. You can also trigger this process later over the
|
||||
@@ -24,15 +28,19 @@ API/UI or by calling `systemctl restart hassos-config` on the host.
|
||||
|
||||
### 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].
|
||||
|
||||
### 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 configs from `/etc/NetworkManager/system-connections`.
|
||||
You can manual add, edit or remove connections configurations from `/etc/NetworkManager/system-connections`.
|
||||
|
||||
[systemd-modules]: https://www.freedesktop.org/software/systemd/man/modules-load.d.html
|
||||
[network.md]: network.md
|
||||
|
||||
@@ -1,11 +1,13 @@
|
||||
# Deployment
|
||||
|
||||
We know 3 types of release builds:
|
||||
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 use here own major number they will be bump for the stable version and the development version go to next major number.
|
||||
|
||||
@@ -16,11 +18,11 @@ The development use here own major number they will be bump for the stable versi
|
||||
3.x = stable
|
||||
```
|
||||
|
||||
## GIT Branch/Tag
|
||||
The branch `dev` ist the actual development branch and from there we never make a release. The `master` branch hould the development
|
||||
version from they we build a beta release.
|
||||
## Git branch/Tag
|
||||
|
||||
If we create a new staging/productive release, we create a new branch `rel-{MAJOR}`. They will be used for the hole cycle of this release.
|
||||
The branch `dev` ist the actual development branch and from there we never make a release. The `master` branch contains the development version and from there we build a beta release.
|
||||
|
||||
If we create a new staging/productive release, we create a new branch `rel-{MAJOR}`. They will be used for the whole cycle of this release.
|
||||
|
||||
## Upload release files
|
||||
|
||||
|
||||
24
Documentation/development.md
Normal file
24
Documentation/development.md
Normal file
@@ -0,0 +1,24 @@
|
||||
# Development
|
||||
|
||||
## Boot system
|
||||
|
||||
`BOOT_SYS`:
|
||||
- efi
|
||||
- hyprid
|
||||
- spl
|
||||
- mbr
|
||||
|
||||
HassOS is basicly used GPT. But for use GPT we need own the first 1024 of
|
||||
boot drive. Is that not possible, you can use MBR for your device, they work also with SPLs.
|
||||
|
||||
Hyprid and SPL use both a hyprid MBR/GPT table but SPL move the GPT header 8MB for give space to write SPL and boot images before.
|
||||
|
||||
`BOOTLOADER`:
|
||||
- uboot
|
||||
- barebox
|
||||
|
||||
We support mainly uboot but for uefi system we can also use barebox. In future we hope to remove barebox with uboot also on uefi.
|
||||
|
||||
`DISK_SIZE`:
|
||||
Default 2. That is the size of end image in GB.
|
||||
|
||||
106
Documentation/getting_started_development.md
Normal file
106
Documentation/getting_started_development.md
Normal file
@@ -0,0 +1,106 @@
|
||||
Getting started with Hassos development using Docker on GNU/Linux
|
||||
=================================================================
|
||||
|
||||
First, install **docker** for your distribution - I'd advise to use your distro's provided packages, since that will make sure permissions et al. are sanely set up for what you are about to run. You're also expected to have your current user properly set up in in your sudoers policy, so that this account may elevate to root and execute arbitrary commands as UID 0 (this is required, since at some point during the build process, a new loopback device-backed filesystem image will be mounted inside a docker container - which requires a "privileged" container to run, which can only be done as root).
|
||||
|
||||
Next, make sure the docker daemon is running:
|
||||
|
||||
```
|
||||
$ 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:
|
||||
|
||||
```
|
||||
$ 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 hassos repo checkout (please adapt pathnames as needed), make sure your intended changes to the source tree are applied (and committed, ideally :)), and execute the `enter.sh` helper script:
|
||||
|
||||
```
|
||||
$ 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:
|
||||
|
||||
```
|
||||
root@somehashinhex:/build#
|
||||
root@somehashinhex:/build# cat scripts/build-all.sh
|
||||
[...]
|
||||
```
|
||||
|
||||
The _hassos_ developers provides another convenience script that will build hassos images for a (rather long!) list of targets - if you're not interested in building artifacts for all supported platforms, make sure to take a peek inside and monkeypatch away... After you're done making changes, start it, and go make a cup of tea. Or fifteen.
|
||||
|
||||
```
|
||||
root@0db6f7079872:/build# scripts/build-all.sh
|
||||
[...]
|
||||
```
|
||||
|
||||
Personally, I removed all advertised build targets from the `all_platforms` array variable, expect for the _ova_ variant. 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:
|
||||
|
||||
```
|
||||
[...]
|
||||
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:
|
||||
|
||||
```
|
||||
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:
|
||||
|
||||
```
|
||||
root@fd292c061896:/build# gunzip release/hassos_ova-2.2.vmdk.gz
|
||||
root@fd292c061896:/build# qemu-img convert -O qcow2 release/hassos_ova-2.2.vmdk release/hassos_ova-2.2.qcow2
|
||||
root@fd292c061896:/build# ls -lh release/
|
||||
total 673M
|
||||
-rw-r--r-- 1 root root 337M Oct 10 20:25 hassos_ova-2.2.qcow2
|
||||
-rw-r--r-- 1 root root 337M Oct 10 20:22 hassos_ova-2.2.vmdk
|
||||
```
|
||||
|
||||
Now, exit the docker container's environment, and find the build artifacts in the `releases/` directory beneath your repository checkout dir. (The generated files will be owned by _root_; make sure to `chown` them to your user account, if needed.)
|
||||
|
||||
From there, qemu can try to boot it. Since the generated image assumes UEFI support in the host/hypervisor, this is slightly more tricky than with "classic"(/legacy) MBR-based images. On the *Debian* host I use to run my qemu virtual machine on, you'll need to install the **ovmf** package, which is described as providing "UEFI firmware for 64-bit x86 virtual machines". That package will install a _TianoCore_-derived qemu UEFI image build at `/usr/share/OVMF/OVMF_CODE.fd`, which we'll use with qemu to boot the generated qcow2 image. (Please adapt pathnames as necessary, for example if you have installed the ovmf firmware image at another location.)
|
||||
|
||||
```
|
||||
$ /usr/bin/qemu-system-x86_64 -enable-kvm -name hassos_ova -smp 2 -m 1024 -drive file=release/hassos_ova-2.2.qcow2,index=0,media=disk,if=ide,cache=none,format=qcow2 -drive file=/usr/share/ovmf/x64/OVMF_CODE.fd,if=pflash,format=raw,readonly=on
|
||||
```
|
||||
|
||||
This should pop up qemu's SDL frontend, displaying _hassos_' VT/CLI environment. Specifying addtional options and flags to qemu for network access, keyboard layout et al. are left as an exercise for the reader.
|
||||
|
||||
After the boot process has finished, you can log in to _hassos_ without a password, providing *root* as the username. From there, executing `login` on the *hassio>* shell prompt will yield a root shell in the host OS.
|
||||
|
||||
Happy hacking! :)
|
||||
@@ -3,5 +3,7 @@
|
||||
|
||||
| Board | Version |
|
||||
|-------|---------|
|
||||
| Open Virtual Applicance | 4.14.59 |
|
||||
| Raspberry Pi | 4.14.58 |
|
||||
| Open Virtual Applicance | 4.14.82 |
|
||||
| Raspberry Pi | 4.14.81 |
|
||||
| Tinker Board | 4.14.82 |
|
||||
| Odroid-C2 | 4.14.67 |
|
||||
|
||||
@@ -1,15 +1,16 @@
|
||||
# Network
|
||||
|
||||
HassOS uses NetworkManager to control the host network. In future releases, you will be able to set up the configuration using the API/UI. Currently only 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 as described in [Configuration][configuration-usb].
|
||||
HassOS uses NetworkManager to control the host network. In future releases, you will be able to set up the configuration using the API/UI. Currently only a manual configuration using NetworkManager connection files is supported. Without a configuration file, the device will use DHCP by default. These network connection files can be placed on a USB drive and imported to the host as described in [Configuration][configuration-usb].
|
||||
|
||||
## Configuration Examples
|
||||
|
||||
You can also read the [Official Manual][keyfile] or there are a lot of examples accross internet. The system is read only, if you don't want the IP address to change every boot, you should set the uuid property with a generic [UUID4][uuid]. Inside the `network` folder create the file `my-network` and add the appropriate contents below:
|
||||
You can read the [Official Manual][keyfile] or find many configuration examples across the internet. The system is read-only, if you don't want the IP address to change on every boot, you should set the UUID property with a generic [UUID4][uuid]. Inside `\CONFIG\network\` on the USB or SD, create a file called `my-network` and add the appropriate contents below:
|
||||
|
||||
### Default
|
||||
|
||||
We have a preinstalled connection profile:
|
||||
```
|
||||
|
||||
```ini
|
||||
[connection]
|
||||
id=HassOS default
|
||||
uuid=f62bf7c2-e565-49ff-bbfc-a4cf791e6add
|
||||
@@ -24,6 +25,7 @@ method=auto
|
||||
```
|
||||
|
||||
### LAN
|
||||
|
||||
```ini
|
||||
[connection]
|
||||
id=hassos-network
|
||||
@@ -39,6 +41,7 @@ method=auto
|
||||
```
|
||||
|
||||
### Wireless WPA/PSK
|
||||
|
||||
```ini
|
||||
[connection]
|
||||
id=hassos-network
|
||||
@@ -48,11 +51,13 @@ 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_SECRED_KEY
|
||||
psk=MY_WLAN_SECRET_KEY
|
||||
|
||||
[ipv4]
|
||||
method=auto
|
||||
@@ -64,19 +69,22 @@ method=auto
|
||||
|
||||
### Static IP
|
||||
|
||||
Replace follow configs:
|
||||
Replace the following configuration:
|
||||
|
||||
```ini
|
||||
[ipv4]
|
||||
method=manual
|
||||
address1=192.168.1.111/24,192.168.1.1
|
||||
address=192.168.1.111/24,192.168.1.1
|
||||
dns=8.8.8.8;8.8.4.4;
|
||||
```
|
||||
For address, the value before the comma is the IP address and subnet prefix bitlength; the second value is the IP address of the gateway.
|
||||
|
||||
## Tips
|
||||
|
||||
### Reset network
|
||||
|
||||
If you want reset the network configuration to default, use follow commands on host:
|
||||
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/
|
||||
@@ -86,11 +94,50 @@ $ nmcli con reload
|
||||
### Powersave
|
||||
|
||||
If you have trouble with powersave you can do following:
|
||||
|
||||
```ini
|
||||
[wifi]
|
||||
# Values are 0 (use default), 1 (ignore/don't touch), 2 (disable) or 3 (enable).
|
||||
powersave=0
|
||||
```
|
||||
## Using nmcli to set a static IPV4 address
|
||||
|
||||
Log into the HASSOS base system via a console:
|
||||
|
||||
```
|
||||
Welcome to HassOS
|
||||
Hassio login:
|
||||
```
|
||||
Login as `root` (no password needed)
|
||||
|
||||
At the `hassio >` prompt, type `login` (as instructed).
|
||||
|
||||
From here you will use the `nmcli` configuration tool.
|
||||
|
||||
`# nmcli connection show` will list the “HassOS default” connection in use.
|
||||
|
||||
`# nmcli con show "HassOS default"` will list all the properties of the connection.
|
||||
|
||||
`# nmcli con edit "HassOS default"` will put you in a position to edit the connection.
|
||||
|
||||
`nmcli> print ipv4` will show you the ipv4 properties of this connection.
|
||||
|
||||
To add your static IP address (select 'yes' for manual method);
|
||||
```
|
||||
nmcli> set ipv4.addresses 192.168.100.10/24
|
||||
Do you also want to set 'ipv4.method' to 'manual'? [yes]:
|
||||
```
|
||||
In addition I have found it is wise to set the dns server and the local gateway. For most home routers these will be the same address. If you are using Pi-Hole you can set the dns to that.
|
||||
```
|
||||
nmcli> set ipv4.dns 192.168.100.1
|
||||
nmcli> set ipv4.gateway 192.168.100.1
|
||||
nmcli> save
|
||||
nmcli> quit
|
||||
```
|
||||
|
||||
If you now view the default connection `cat /etc/NetworkManager/system-connections/default` you should see the method is manual and the address is set.
|
||||
|
||||
Doing a `nmcli con reload` does not always work so restart the VM.
|
||||
|
||||
[keyfile]: https://developer.gnome.org/NetworkManager/stable/nm-settings.html
|
||||
[configuration-usb]: configuration.md
|
||||
|
||||
@@ -3,3 +3,4 @@ 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"
|
||||
|
||||
28
buildroot-external/board/asus/hassos-hook.sh
Executable file
28
buildroot-external/board/asus/hassos-hook.sh
Executable file
@@ -0,0 +1,28 @@
|
||||
#!/bin/bash
|
||||
|
||||
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}/u-boot-spl-dtb.img
|
||||
mkimage -n rk3288 -T rksd -d ${BINARIES_DIR}/u-boot-spl-dtb.bin ${BINARIES_DIR}/u-boot-spl-dtb.img
|
||||
cat ${BINARIES_DIR}/u-boot-dtb.bin >> ${BINARIES_DIR}/u-boot-spl-dtb.img
|
||||
|
||||
# SPL
|
||||
create_spl_image
|
||||
|
||||
dd if=${BINARIES_DIR}/u-boot-spl-dtb.img of=${SPL_IMG} conv=notrunc bs=512 seek=64
|
||||
}
|
||||
|
||||
|
||||
function hassos_post_image() {
|
||||
convert_disk_image_gz
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
BOARD_ID=tinker
|
||||
BOARD_NAME="Tinker Board"
|
||||
BOARD_NAME="Asus TinkerBoard"
|
||||
CHASSIS=embedded
|
||||
BOOTLOADER=uboot
|
||||
KERNEL_FILE=zImage
|
||||
@@ -1,3 +1,17 @@
|
||||
|
||||
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; \
|
||||
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
|
||||
@@ -10,10 +24,10 @@ setenv bootargs_a "root=PARTUUID=8d3d53e3-6d49-4c38-8349-aff6859e82fd rootfstype
|
||||
setenv bootargs_b "root=PARTUUID=a3ec664e-32ce-4665-95ea-7ae90ce9aa20 rootfstype=squashfs ro"
|
||||
|
||||
# Load extraargs
|
||||
fileenv mmc 1:1 ${ramdisk_addr_r} cmdline.txt cmdline
|
||||
fileenv mmc ${devnum}:1 ${ramdisk_addr_r} cmdline.txt cmdline
|
||||
|
||||
# Load device tree
|
||||
fatload mmc 1:1 ${fdt_addr_r} rk3288-tinker.dtb
|
||||
fatload mmc ${devnum}:1 ${fdt_addr_r} rk3288-tinker.dtb
|
||||
|
||||
setenv bootargs
|
||||
for BOOT_SLOT in "${BOOT_ORDER}"; do
|
||||
@@ -23,26 +37,26 @@ for BOOT_SLOT in "${BOOT_ORDER}"; do
|
||||
if test ${BOOT_A_LEFT} -gt 0; then
|
||||
setexpr BOOT_A_LEFT ${BOOT_A_LEFT} - 1
|
||||
echo "Found valid slot A, ${BOOT_A_LEFT} attempts remaining"
|
||||
setenv load_kernel "ext4load mmc 1:2 ${kernel_addr_r} zImage"
|
||||
setenv load_kernel "ext4load mmc ${devnum}:2 ${kernel_addr_r} zImage"
|
||||
setenv bootargs "${bootargs_hassos} ${bootargs_a} rauc.slot=A ${cmdline}"
|
||||
fi
|
||||
elif test "x${BOOT_SLOT}" = "xB"; then
|
||||
if test ${BOOT_B_LEFT} -gt 0; then
|
||||
setexpr BOOT_B_LEFT ${BOOT_B_LEFT} - 1
|
||||
echo "Found valid slot B, ${BOOT_B_LEFT} attempts remaining"
|
||||
setenv load_kernel "ext4load mmc 1:4 ${kernel_addr_r} zImage"
|
||||
setenv load_kernel "ext4load mmc ${devnum}:4 ${kernel_addr_r} zImage"
|
||||
setenv bootargs "${bootargs_hassos} ${bootargs_b} rauc.slot=B ${cmdline}"
|
||||
fi
|
||||
fi
|
||||
done
|
||||
|
||||
if test -n "${bootargs}"; then
|
||||
saveenv
|
||||
run storebootstate
|
||||
else
|
||||
echo "No valid slot found, resetting tries to 3"
|
||||
setenv BOOT_A_LEFT 3
|
||||
setenv BOOT_B_LEFT 3
|
||||
saveenv
|
||||
run storebootstate
|
||||
reset
|
||||
fi
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
# CONFIG_USB_STORAGE is not set
|
||||
# CONFIG_DOS_PARTITION is not set
|
||||
CONFIG_DM_VIDEO=y
|
||||
CONFIG_CMD_FILEENV=y
|
||||
CONFIG_ENV_OFFSET=0x25100000
|
||||
CONFIG_ENV_IS_NOWHERE=Y
|
||||
131
buildroot-external/board/hardkernel/odroid-c2/boot-env.txt
Normal file
131
buildroot-external/board/hardkernel/odroid-c2/boot-env.txt
Normal file
@@ -0,0 +1,131 @@
|
||||
|
||||
|
||||
# Custom modeline!
|
||||
# To use custom modeline you need to disable all the below resolutions
|
||||
# and setup your own!
|
||||
# For more information check our wiki:
|
||||
# http://odroid.com/dokuwiki/doku.php?id=en:c2_hdmi_autosetting
|
||||
# Example below:
|
||||
#m=custombuilt
|
||||
#modeline=1920,1200,154000,74040,60,1920,1968,2000,2080,1200,1202,1208,1235,1,0,1
|
||||
|
||||
# 480 Lines (720x480)
|
||||
#m=480i60hz
|
||||
#m=480i_rpt
|
||||
#m=480p60hz
|
||||
#m=480p_rpt
|
||||
|
||||
# 576 Lines (720x576)
|
||||
#m=576i50hz
|
||||
#m=576i_rpt
|
||||
#m=576p50hz
|
||||
#m=576p_rpt
|
||||
|
||||
# 720 Lines (1280x720)
|
||||
#m=720p50hz
|
||||
#m=720p60hz
|
||||
|
||||
# 1080 Lines (1920x1080)
|
||||
#m=1080i60hz
|
||||
m=1080p60hz
|
||||
#m=1080i50hz
|
||||
#m=1080p50hz
|
||||
#m=1080p24hz
|
||||
|
||||
# 4K (3840x2160)
|
||||
#m=2160p30hz
|
||||
#m=2160p25hz
|
||||
#m=2160p24hz
|
||||
#m=smpte24hz
|
||||
#m=2160p50hz
|
||||
#m=2160p60hz
|
||||
#m=2160p50hz420
|
||||
#m=2160p60hz420
|
||||
|
||||
### VESA modes ###
|
||||
#m=640x480p60hz
|
||||
#m=800x480p60hz
|
||||
#m=480x800p60hz
|
||||
#m=800x600p60hz
|
||||
#m=1024x600p60hz
|
||||
#m=1024x768p60hz
|
||||
#m=1280x800p60hz
|
||||
#m=1280x1024p60hz
|
||||
#m=1360x768p60hz
|
||||
#m=1440x900p60hz
|
||||
#m=1600x900p60hz
|
||||
#m=1680x1050p60hz
|
||||
#m=1600x1200p60hz
|
||||
#m=1920x1200p60hz
|
||||
#m=2560x1080p60hz
|
||||
#m=2560x1440p60hz
|
||||
#m=2560x1600p60hz
|
||||
#m=3440x1440p60hz
|
||||
|
||||
# HDMI BPP Mode
|
||||
m_bpp=32
|
||||
#m_bpp=24
|
||||
#m_bpp=16
|
||||
|
||||
# HDMI DVI/VGA modes
|
||||
# By default its set to HDMI, if needed change below.
|
||||
# Uncomment only a single Line.
|
||||
#vout=dvi
|
||||
#vout=vga
|
||||
|
||||
# HDMI HotPlug Detection control
|
||||
# Allows you to force HDMI thinking that the cable is connected.
|
||||
# true = HDMI will believe that cable is always connected
|
||||
# false = will let board/monitor negotiate the connection status
|
||||
hpd=true
|
||||
#hpd=false
|
||||
|
||||
# Monitor output
|
||||
# Controls if HDMI PHY should output anything to the monitor
|
||||
monitor_onoff=false
|
||||
|
||||
# Server Mode (aka. No Graphics)
|
||||
# Setting nographics to 1 will disable all video subsystem
|
||||
# This mode is ideal of server type usage. (Saves ~300Mb of RAM)
|
||||
nographics=0
|
||||
|
||||
# Meson Timer
|
||||
# 1 - Meson Timer
|
||||
# 0 - Arch Timer
|
||||
# Using meson_timer improves the video playback however it breaks KVM (virtualization).
|
||||
# Using arch timer allows KVM/Virtualization to work however you'll experience poor video
|
||||
mesontimer=1
|
||||
|
||||
# UHS (Ultra High Speed) MicroSD mode enable/disable
|
||||
disableuhs=false
|
||||
|
||||
# MicroSD Card Detection enable/disable
|
||||
# Force the MMC controlled to believe that a card is connected.
|
||||
mmc_removable=true
|
||||
|
||||
# USB Multi WebCam tweak
|
||||
# Only enable this if you use it.
|
||||
usbmulticam=false
|
||||
|
||||
# CPU Frequency / Cores control
|
||||
###########################################
|
||||
### WARNING!!! WARNING!!! WARNING!!!
|
||||
# Before changing anything here please read the wiki entry:
|
||||
# http://odroid.com/dokuwiki/doku.php?id=en:c2_set_cpu_freq
|
||||
#
|
||||
# MAX CPU's
|
||||
#maxcpus=1
|
||||
#maxcpus=2
|
||||
#maxcpus=3
|
||||
maxcpus=4
|
||||
|
||||
# MAX Frequency
|
||||
#max_freq=2016
|
||||
#max_freq=1944
|
||||
#max_freq=1944
|
||||
#max_freq=1920
|
||||
#max_freq=1896
|
||||
#max_freq=1752
|
||||
#max_freq=1680
|
||||
#max_freq=1656
|
||||
max_freq=1536
|
||||
27
buildroot-external/board/hardkernel/odroid-c2/hassos-hook.sh
Executable file
27
buildroot-external/board/hardkernel/odroid-c2/hassos-hook.sh
Executable file
@@ -0,0 +1,27 @@
|
||||
#!/bin/bash
|
||||
|
||||
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 ${BOARD_DIR}/boot-env.txt ${BOOT_DATA}/config.txt
|
||||
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
|
||||
}
|
||||
|
||||
4621
buildroot-external/board/hardkernel/odroid-c2/kernel.config
Normal file
4621
buildroot-external/board/hardkernel/odroid-c2/kernel.config
Normal file
File diff suppressed because it is too large
Load Diff
7
buildroot-external/board/hardkernel/odroid-c2/meta
Normal file
7
buildroot-external/board/hardkernel/odroid-c2/meta
Normal file
@@ -0,0 +1,7 @@
|
||||
BOARD_ID=odroid-c2
|
||||
BOARD_NAME="Hardkernel Odroid-C2"
|
||||
CHASSIS=embedded
|
||||
BOOTLOADER=uboot
|
||||
KERNEL_FILE=Image
|
||||
BOOT_SYS=mbr
|
||||
BOOT_ENV_SIZE=0x2000
|
||||
@@ -0,0 +1,2 @@
|
||||
kernel patches from
|
||||
https://github.com/superna9999/meta-meson/tree/sumo/recipes-kernel/linux/linux-yocto-meson64-4.14
|
||||
@@ -0,0 +1,41 @@
|
||||
From 841ec7b8484dee021a15fdc187cdadc1c89220f2 Mon Sep 17 00:00:00 2001
|
||||
From: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
|
||||
Date: Thu, 12 Jan 2017 01:38:26 +0100
|
||||
Subject: [PATCH 02/39] ARM64: dts: meson-gxbb: allow child devices on the USB
|
||||
controller
|
||||
|
||||
Add the size and adress cells to the USB controllers to allow specifying
|
||||
child devices (for example the USB hub on the Odroid-C2 which must be
|
||||
taken out of reset to work).
|
||||
|
||||
Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
|
||||
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
|
||||
---
|
||||
arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi | 4 ++++
|
||||
1 file changed, 4 insertions(+)
|
||||
|
||||
diff --git a/arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi b/arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi
|
||||
index af834cd..7d38d55 100644
|
||||
--- a/arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi
|
||||
+++ b/arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi
|
||||
@@ -73,6 +73,8 @@
|
||||
|
||||
usb0: usb@c9000000 {
|
||||
compatible = "amlogic,meson-gxbb-usb", "snps,dwc2";
|
||||
+ #address-cells = <1>;
|
||||
+ #size-cells = <0>;
|
||||
reg = <0x0 0xc9000000 0x0 0x40000>;
|
||||
interrupts = <GIC_SPI 30 IRQ_TYPE_LEVEL_HIGH>;
|
||||
clocks = <&clkc CLKID_USB0_DDR_BRIDGE>;
|
||||
@@ -85,6 +87,8 @@
|
||||
|
||||
usb1: usb@c9100000 {
|
||||
compatible = "amlogic,meson-gxbb-usb", "snps,dwc2";
|
||||
+ #address-cells = <1>;
|
||||
+ #size-cells = <0>;
|
||||
reg = <0x0 0xc9100000 0x0 0x40000>;
|
||||
interrupts = <GIC_SPI 31 IRQ_TYPE_LEVEL_HIGH>;
|
||||
clocks = <&clkc CLKID_USB1_DDR_BRIDGE>;
|
||||
--
|
||||
2.7.4
|
||||
|
||||
@@ -0,0 +1,34 @@
|
||||
From 564bc89139a6bf0833cef64993dfe3fe2784c6a8 Mon Sep 17 00:00:00 2001
|
||||
From: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
|
||||
Date: Thu, 12 Jan 2017 01:39:20 +0100
|
||||
Subject: [PATCH 03/39] ARM64: dts: meson-gxbb-odroidc2: take USB hub out of
|
||||
reset
|
||||
|
||||
This takes the USB hub out of reset, otherwise the hub is not working.
|
||||
|
||||
Fixes: 5a0803bd5ae ("ARM64: dts: meson-gxbb-odroidc2: Enable USB Nodes")
|
||||
Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
|
||||
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
|
||||
---
|
||||
arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts | 7 +++++++
|
||||
1 file changed, 7 insertions(+)
|
||||
|
||||
diff --git a/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts b/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts
|
||||
index 08b7bb7..c3a7b7f 100644
|
||||
--- a/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts
|
||||
+++ b/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts
|
||||
@@ -310,4 +310,11 @@
|
||||
|
||||
&usb1 {
|
||||
status = "okay";
|
||||
+
|
||||
+ hub@1 {
|
||||
+ compatible = "usb5e3,610";
|
||||
+ reg = <1>;
|
||||
+ reset-gpios = <&gpio GPIOAO_4 GPIO_ACTIVE_LOW>;
|
||||
+ reset-duration-us = <3000>;
|
||||
+ };
|
||||
};
|
||||
--
|
||||
2.7.4
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
From eb29dbaf90e217978d8abfab1912b11020825e28 Mon Sep 17 00:00:00 2001
|
||||
From: Jerome Brunet <jbrunet@baylibre.com>
|
||||
Date: Mon, 13 Nov 2017 12:02:59 +0100
|
||||
Subject: [PATCH 10/39] ARM64: defconfig: add CONFIG_MESON_EFUSE
|
||||
|
||||
Turn on CONFIG_MESON_EFUSE as module
|
||||
|
||||
Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
|
||||
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
|
||||
---
|
||||
arch/arm64/configs/defconfig | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/arch/arm64/configs/defconfig b/arch/arm64/configs/defconfig
|
||||
index 34480e9..3cdfc74 100644
|
||||
--- a/arch/arm64/configs/defconfig
|
||||
+++ b/arch/arm64/configs/defconfig
|
||||
@@ -541,6 +541,7 @@ CONFIG_PHY_XGENE=y
|
||||
CONFIG_PHY_TEGRA_XUSB=y
|
||||
CONFIG_QCOM_L2_PMU=y
|
||||
CONFIG_QCOM_L3_PMU=y
|
||||
+CONFIG_MESON_EFUSE=m
|
||||
CONFIG_TEE=y
|
||||
CONFIG_OPTEE=y
|
||||
CONFIG_ARM_SCPI_PROTOCOL=y
|
||||
--
|
||||
2.7.4
|
||||
|
||||
@@ -0,0 +1,36 @@
|
||||
From 175366cb9e77fe54e6949f6599c0900cf0980b26 Mon Sep 17 00:00:00 2001
|
||||
From: Jerome Brunet <jbrunet@baylibre.com>
|
||||
Date: Mon, 13 Nov 2017 12:09:40 +0100
|
||||
Subject: [PATCH 11/39] ARM64: defconfig: enable CEC support
|
||||
|
||||
Turn on CONFIG_CEC_SUPPORT and CONFIG_CEC_PLATFORM_DRIVERS
|
||||
|
||||
Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
|
||||
Signed-off-by: Neil Armstrong <narmstrong@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 3cdfc74..944b93b 100644
|
||||
--- a/arch/arm64/configs/defconfig
|
||||
+++ b/arch/arm64/configs/defconfig
|
||||
@@ -350,6 +350,7 @@ CONFIG_MEDIA_SUPPORT=m
|
||||
CONFIG_MEDIA_CAMERA_SUPPORT=y
|
||||
CONFIG_MEDIA_ANALOG_TV_SUPPORT=y
|
||||
CONFIG_MEDIA_DIGITAL_TV_SUPPORT=y
|
||||
+CONFIG_MEDIA_CEC_SUPPORT=y
|
||||
CONFIG_MEDIA_CONTROLLER=y
|
||||
CONFIG_MEDIA_RC_SUPPORT=y
|
||||
CONFIG_RC_CORE=m
|
||||
@@ -364,6 +365,7 @@ CONFIG_VIDEO_SAMSUNG_S5P_MFC=m
|
||||
CONFIG_VIDEO_SAMSUNG_EXYNOS_GSC=m
|
||||
CONFIG_VIDEO_RENESAS_FCP=m
|
||||
CONFIG_VIDEO_RENESAS_VSP1=m
|
||||
+CONFIG_CEC_PLATFORM_DRIVERS=y
|
||||
CONFIG_DRM=m
|
||||
CONFIG_DRM_NOUVEAU=m
|
||||
CONFIG_DRM_EXYNOS=m
|
||||
--
|
||||
2.7.4
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
From c71be51a7778a6aa6b784dd0edc57951acf63ef2 Mon Sep 17 00:00:00 2001
|
||||
From: Jerome Brunet <jbrunet@baylibre.com>
|
||||
Date: Mon, 13 Nov 2017 12:11:41 +0100
|
||||
Subject: [PATCH 12/39] ARM64: defconfig: enable CONFIG_VIDEO_MESON_AO_CEC
|
||||
|
||||
Turn on CONFIG_VIDEO_MESON_AO_CEC as module
|
||||
|
||||
Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
|
||||
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
|
||||
---
|
||||
arch/arm64/configs/defconfig | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/arch/arm64/configs/defconfig b/arch/arm64/configs/defconfig
|
||||
index 944b93b..fdf94cb 100644
|
||||
--- a/arch/arm64/configs/defconfig
|
||||
+++ b/arch/arm64/configs/defconfig
|
||||
@@ -366,6 +366,7 @@ CONFIG_VIDEO_SAMSUNG_EXYNOS_GSC=m
|
||||
CONFIG_VIDEO_RENESAS_FCP=m
|
||||
CONFIG_VIDEO_RENESAS_VSP1=m
|
||||
CONFIG_CEC_PLATFORM_DRIVERS=y
|
||||
+CONFIG_VIDEO_MESON_AO_CEC=m
|
||||
CONFIG_DRM=m
|
||||
CONFIG_DRM_NOUVEAU=m
|
||||
CONFIG_DRM_EXYNOS=m
|
||||
--
|
||||
2.7.4
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
From 94fb1910e76e39cc910fb5b5a528712f4135891e Mon Sep 17 00:00:00 2001
|
||||
From: Jerome Brunet <jbrunet@baylibre.com>
|
||||
Date: Mon, 13 Nov 2017 12:15:18 +0100
|
||||
Subject: [PATCH 13/39] ARM64: defconfig: enable CONFIG_DRM_DW_HDMI_CEC
|
||||
|
||||
Turn on CONFIG_DRM_DW_HDMI_CEC as module
|
||||
|
||||
Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
|
||||
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
|
||||
---
|
||||
arch/arm64/configs/defconfig | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/arch/arm64/configs/defconfig b/arch/arm64/configs/defconfig
|
||||
index fdf94cb..dcf1090 100644
|
||||
--- a/arch/arm64/configs/defconfig
|
||||
+++ b/arch/arm64/configs/defconfig
|
||||
@@ -388,6 +388,7 @@ CONFIG_DRM_RCAR_VSP=y
|
||||
CONFIG_DRM_TEGRA=m
|
||||
CONFIG_DRM_PANEL_SIMPLE=m
|
||||
CONFIG_DRM_I2C_ADV7511=m
|
||||
+CONFIG_DRM_DW_HDMI_CEC=m
|
||||
CONFIG_DRM_VC4=m
|
||||
CONFIG_DRM_HISI_KIRIN=m
|
||||
CONFIG_DRM_MESON=m
|
||||
--
|
||||
2.7.4
|
||||
|
||||
@@ -0,0 +1,55 @@
|
||||
From 9bc414d9e18f8c9d39be44165b4926e2b2cdc1d9 Mon Sep 17 00:00:00 2001
|
||||
From: Neil Armstrong <narmstrong@baylibre.com>
|
||||
Date: Mon, 16 Oct 2017 17:29:33 +0200
|
||||
Subject: [PATCH 14/39] clk: meson: gxbb: Add VPU and VAPB clockids
|
||||
|
||||
Add the clkids for the clocks feeding the Video Processing Unit.
|
||||
|
||||
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
|
||||
---
|
||||
drivers/clk/meson/gxbb.h | 6 +++++-
|
||||
include/dt-bindings/clock/gxbb-clkc.h | 11 +++++++++++
|
||||
2 files changed, 16 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/drivers/clk/meson/gxbb.h b/drivers/clk/meson/gxbb.h
|
||||
index 5b1d4b3..aee6fbb 100644
|
||||
--- a/drivers/clk/meson/gxbb.h
|
||||
+++ b/drivers/clk/meson/gxbb.h
|
||||
@@ -190,8 +190,12 @@
|
||||
#define CLKID_SD_EMMC_B_CLK0_DIV 121
|
||||
#define CLKID_SD_EMMC_C_CLK0_SEL 123
|
||||
#define CLKID_SD_EMMC_C_CLK0_DIV 124
|
||||
+#define CLKID_VPU_0_DIV 127
|
||||
+#define CLKID_VPU_1_DIV 130
|
||||
+#define CLKID_VAPB_0_DIV 134
|
||||
+#define CLKID_VAPB_1_DIV 137
|
||||
|
||||
-#define NR_CLKS 126
|
||||
+#define NR_CLKS 141
|
||||
|
||||
/* include the CLKIDs that have been made part of the DT binding */
|
||||
#include <dt-bindings/clock/gxbb-clkc.h>
|
||||
diff --git a/include/dt-bindings/clock/gxbb-clkc.h b/include/dt-bindings/clock/gxbb-clkc.h
|
||||
index 8c92528..8ba99a5 100644
|
||||
--- a/include/dt-bindings/clock/gxbb-clkc.h
|
||||
+++ b/include/dt-bindings/clock/gxbb-clkc.h
|
||||
@@ -114,5 +114,16 @@
|
||||
#define CLKID_SD_EMMC_A_CLK0 119
|
||||
#define CLKID_SD_EMMC_B_CLK0 122
|
||||
#define CLKID_SD_EMMC_C_CLK0 125
|
||||
+#define CLKID_VPU_0_SEL 126
|
||||
+#define CLKID_VPU_0 128
|
||||
+#define CLKID_VPU_1_SEL 129
|
||||
+#define CLKID_VPU_1 131
|
||||
+#define CLKID_VPU 132
|
||||
+#define CLKID_VAPB_0_SEL 133
|
||||
+#define CLKID_VAPB_0 135
|
||||
+#define CLKID_VAPB_1_SEL 136
|
||||
+#define CLKID_VAPB_1 138
|
||||
+#define CLKID_VAPB_SEL 139
|
||||
+#define CLKID_VAPB 140
|
||||
|
||||
#endif /* __GXBB_CLKC_H */
|
||||
--
|
||||
2.7.4
|
||||
|
||||
@@ -0,0 +1,357 @@
|
||||
From a3b8b7bfd775fa521425c72856b4394fb6fec518 Mon Sep 17 00:00:00 2001
|
||||
From: Neil Armstrong <narmstrong@baylibre.com>
|
||||
Date: Fri, 13 Oct 2017 14:38:37 +0200
|
||||
Subject: [PATCH 15/39] clk: meson: gxbb: Add VPU and VAPB clocks data
|
||||
|
||||
The Amlogic Meson GX SoCs needs these two clocks to power up the
|
||||
VPU power domain.
|
||||
|
||||
These two clocks are similar to the MALI clocks by having a glitch-free
|
||||
mux and two similar clocks with gate, divider and muxes.
|
||||
|
||||
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
|
||||
---
|
||||
drivers/clk/meson/gxbb.c | 292 +++++++++++++++++++++++++++++++++++++++++++++++
|
||||
1 file changed, 292 insertions(+)
|
||||
|
||||
diff --git a/drivers/clk/meson/gxbb.c b/drivers/clk/meson/gxbb.c
|
||||
index 92168348..86cb5af 100644
|
||||
--- a/drivers/clk/meson/gxbb.c
|
||||
+++ b/drivers/clk/meson/gxbb.c
|
||||
@@ -1131,6 +1131,253 @@ static struct clk_gate gxbb_sd_emmc_c_clk0 = {
|
||||
},
|
||||
};
|
||||
|
||||
+/* VPU Clock */
|
||||
+
|
||||
+static u32 mux_table_vpu[] = {0, 1, 2, 3};
|
||||
+static const char * const gxbb_vpu_parent_names[] = {
|
||||
+ "fclk_div4", "fclk_div3", "fclk_div5", "fclk_div7"
|
||||
+};
|
||||
+
|
||||
+static struct clk_mux gxbb_vpu_0_sel = {
|
||||
+ .reg = (void *)HHI_VPU_CLK_CNTL,
|
||||
+ .mask = 0x3,
|
||||
+ .shift = 9,
|
||||
+ .lock = &clk_lock,
|
||||
+ .table = mux_table_vpu,
|
||||
+ .hw.init = &(struct clk_init_data){
|
||||
+ .name = "vpu_0_sel",
|
||||
+ .ops = &clk_mux_ops,
|
||||
+ /*
|
||||
+ * bits 9:10 selects from 4 possible parents:
|
||||
+ * fclk_div4, fclk_div3, fclk_div5, fclk_div7,
|
||||
+ */
|
||||
+ .parent_names = gxbb_vpu_parent_names,
|
||||
+ .num_parents = ARRAY_SIZE(gxbb_vpu_parent_names),
|
||||
+ .flags = CLK_SET_RATE_NO_REPARENT | CLK_IGNORE_UNUSED,
|
||||
+ },
|
||||
+};
|
||||
+
|
||||
+static struct clk_divider gxbb_vpu_0_div = {
|
||||
+ .reg = (void *)HHI_VPU_CLK_CNTL,
|
||||
+ .shift = 0,
|
||||
+ .width = 7,
|
||||
+ .lock = &clk_lock,
|
||||
+ .hw.init = &(struct clk_init_data){
|
||||
+ .name = "vpu_0_div",
|
||||
+ .ops = &clk_divider_ops,
|
||||
+ .parent_names = (const char *[]){ "vpu_0_sel" },
|
||||
+ .num_parents = 1,
|
||||
+ .flags = CLK_SET_RATE_PARENT | CLK_IGNORE_UNUSED,
|
||||
+ },
|
||||
+};
|
||||
+
|
||||
+static struct clk_gate gxbb_vpu_0 = {
|
||||
+ .reg = (void *)HHI_VPU_CLK_CNTL,
|
||||
+ .bit_idx = 8,
|
||||
+ .lock = &clk_lock,
|
||||
+ .hw.init = &(struct clk_init_data) {
|
||||
+ .name = "vpu_0",
|
||||
+ .ops = &clk_gate_ops,
|
||||
+ .parent_names = (const char *[]){ "vpu_0_div" },
|
||||
+ .num_parents = 1,
|
||||
+ .flags = CLK_SET_RATE_PARENT | CLK_IGNORE_UNUSED,
|
||||
+ },
|
||||
+};
|
||||
+
|
||||
+static struct clk_mux gxbb_vpu_1_sel = {
|
||||
+ .reg = (void *)HHI_VPU_CLK_CNTL,
|
||||
+ .mask = 0x3,
|
||||
+ .shift = 25,
|
||||
+ .lock = &clk_lock,
|
||||
+ .table = mux_table_vpu,
|
||||
+ .hw.init = &(struct clk_init_data){
|
||||
+ .name = "vpu_1_sel",
|
||||
+ .ops = &clk_mux_ops,
|
||||
+ /*
|
||||
+ * bits 25:26 selects from 4 possible parents:
|
||||
+ * fclk_div4, fclk_div3, fclk_div5, fclk_div7,
|
||||
+ */
|
||||
+ .parent_names = gxbb_vpu_parent_names,
|
||||
+ .num_parents = ARRAY_SIZE(gxbb_vpu_parent_names),
|
||||
+ .flags = CLK_SET_RATE_NO_REPARENT | CLK_IGNORE_UNUSED,
|
||||
+ },
|
||||
+};
|
||||
+
|
||||
+static struct clk_divider gxbb_vpu_1_div = {
|
||||
+ .reg = (void *)HHI_VPU_CLK_CNTL,
|
||||
+ .shift = 16,
|
||||
+ .width = 7,
|
||||
+ .lock = &clk_lock,
|
||||
+ .hw.init = &(struct clk_init_data){
|
||||
+ .name = "vpu_1_div",
|
||||
+ .ops = &clk_divider_ops,
|
||||
+ .parent_names = (const char *[]){ "vpu_1_sel" },
|
||||
+ .num_parents = 1,
|
||||
+ .flags = CLK_SET_RATE_PARENT | CLK_IGNORE_UNUSED,
|
||||
+ },
|
||||
+};
|
||||
+
|
||||
+static struct clk_gate gxbb_vpu_1 = {
|
||||
+ .reg = (void *)HHI_VPU_CLK_CNTL,
|
||||
+ .bit_idx = 24,
|
||||
+ .lock = &clk_lock,
|
||||
+ .hw.init = &(struct clk_init_data) {
|
||||
+ .name = "vpu_1",
|
||||
+ .ops = &clk_gate_ops,
|
||||
+ .parent_names = (const char *[]){ "vpu_1_div" },
|
||||
+ .num_parents = 1,
|
||||
+ .flags = CLK_SET_RATE_PARENT | CLK_IGNORE_UNUSED,
|
||||
+ },
|
||||
+};
|
||||
+
|
||||
+static struct clk_mux gxbb_vpu = {
|
||||
+ .reg = (void *)HHI_VPU_CLK_CNTL,
|
||||
+ .mask = 1,
|
||||
+ .shift = 31,
|
||||
+ .lock = &clk_lock,
|
||||
+ .hw.init = &(struct clk_init_data){
|
||||
+ .name = "vpu",
|
||||
+ .ops = &clk_mux_ops,
|
||||
+ /*
|
||||
+ * bit 31 selects from 2 possible parents:
|
||||
+ * vpu_0 or vpu_1
|
||||
+ */
|
||||
+ .parent_names = (const char *[]){ "vpu_0", "vpu_1" },
|
||||
+ .num_parents = 2,
|
||||
+ .flags = CLK_SET_RATE_NO_REPARENT | CLK_IGNORE_UNUSED,
|
||||
+ },
|
||||
+};
|
||||
+
|
||||
+/* VAPB Clock */
|
||||
+
|
||||
+static u32 mux_table_vapb[] = {0, 1, 2, 3};
|
||||
+static const char * const gxbb_vapb_parent_names[] = {
|
||||
+ "fclk_div4", "fclk_div3", "fclk_div5", "fclk_div7"
|
||||
+};
|
||||
+
|
||||
+static struct clk_mux gxbb_vapb_0_sel = {
|
||||
+ .reg = (void *)HHI_VAPBCLK_CNTL,
|
||||
+ .mask = 0x3,
|
||||
+ .shift = 9,
|
||||
+ .lock = &clk_lock,
|
||||
+ .table = mux_table_vapb,
|
||||
+ .hw.init = &(struct clk_init_data){
|
||||
+ .name = "vapb_0_sel",
|
||||
+ .ops = &clk_mux_ops,
|
||||
+ /*
|
||||
+ * bits 9:10 selects from 4 possible parents:
|
||||
+ * fclk_div4, fclk_div3, fclk_div5, fclk_div7,
|
||||
+ */
|
||||
+ .parent_names = gxbb_vapb_parent_names,
|
||||
+ .num_parents = ARRAY_SIZE(gxbb_vapb_parent_names),
|
||||
+ .flags = CLK_SET_RATE_NO_REPARENT | CLK_IGNORE_UNUSED,
|
||||
+ },
|
||||
+};
|
||||
+
|
||||
+static struct clk_divider gxbb_vapb_0_div = {
|
||||
+ .reg = (void *)HHI_VAPBCLK_CNTL,
|
||||
+ .shift = 0,
|
||||
+ .width = 7,
|
||||
+ .lock = &clk_lock,
|
||||
+ .hw.init = &(struct clk_init_data){
|
||||
+ .name = "vapb_0_div",
|
||||
+ .ops = &clk_divider_ops,
|
||||
+ .parent_names = (const char *[]){ "vapb_0_sel" },
|
||||
+ .num_parents = 1,
|
||||
+ .flags = CLK_SET_RATE_PARENT | CLK_IGNORE_UNUSED,
|
||||
+ },
|
||||
+};
|
||||
+
|
||||
+static struct clk_gate gxbb_vapb_0 = {
|
||||
+ .reg = (void *)HHI_VAPBCLK_CNTL,
|
||||
+ .bit_idx = 8,
|
||||
+ .lock = &clk_lock,
|
||||
+ .hw.init = &(struct clk_init_data) {
|
||||
+ .name = "vapb_0",
|
||||
+ .ops = &clk_gate_ops,
|
||||
+ .parent_names = (const char *[]){ "vapb_0_div" },
|
||||
+ .num_parents = 1,
|
||||
+ .flags = CLK_SET_RATE_PARENT | CLK_IGNORE_UNUSED,
|
||||
+ },
|
||||
+};
|
||||
+
|
||||
+static struct clk_mux gxbb_vapb_1_sel = {
|
||||
+ .reg = (void *)HHI_VAPBCLK_CNTL,
|
||||
+ .mask = 0x3,
|
||||
+ .shift = 25,
|
||||
+ .lock = &clk_lock,
|
||||
+ .table = mux_table_vapb,
|
||||
+ .hw.init = &(struct clk_init_data){
|
||||
+ .name = "vapb_1_sel",
|
||||
+ .ops = &clk_mux_ops,
|
||||
+ /*
|
||||
+ * bits 25:26 selects from 4 possible parents:
|
||||
+ * fclk_div4, fclk_div3, fclk_div5, fclk_div7,
|
||||
+ */
|
||||
+ .parent_names = gxbb_vapb_parent_names,
|
||||
+ .num_parents = ARRAY_SIZE(gxbb_vapb_parent_names),
|
||||
+ .flags = CLK_SET_RATE_NO_REPARENT | CLK_IGNORE_UNUSED,
|
||||
+ },
|
||||
+};
|
||||
+
|
||||
+static struct clk_divider gxbb_vapb_1_div = {
|
||||
+ .reg = (void *)HHI_VAPBCLK_CNTL,
|
||||
+ .shift = 16,
|
||||
+ .width = 7,
|
||||
+ .lock = &clk_lock,
|
||||
+ .hw.init = &(struct clk_init_data){
|
||||
+ .name = "vapb_1_div",
|
||||
+ .ops = &clk_divider_ops,
|
||||
+ .parent_names = (const char *[]){ "vapb_1_sel" },
|
||||
+ .num_parents = 1,
|
||||
+ .flags = CLK_SET_RATE_PARENT | CLK_IGNORE_UNUSED,
|
||||
+ },
|
||||
+};
|
||||
+
|
||||
+static struct clk_gate gxbb_vapb_1 = {
|
||||
+ .reg = (void *)HHI_VAPBCLK_CNTL,
|
||||
+ .bit_idx = 24,
|
||||
+ .lock = &clk_lock,
|
||||
+ .hw.init = &(struct clk_init_data) {
|
||||
+ .name = "vapb_1",
|
||||
+ .ops = &clk_gate_ops,
|
||||
+ .parent_names = (const char *[]){ "vapb_1_div" },
|
||||
+ .num_parents = 1,
|
||||
+ .flags = CLK_SET_RATE_PARENT | CLK_IGNORE_UNUSED,
|
||||
+ },
|
||||
+};
|
||||
+
|
||||
+static struct clk_mux gxbb_vapb_sel = {
|
||||
+ .reg = (void *)HHI_VAPBCLK_CNTL,
|
||||
+ .mask = 1,
|
||||
+ .shift = 31,
|
||||
+ .lock = &clk_lock,
|
||||
+ .hw.init = &(struct clk_init_data){
|
||||
+ .name = "vapb_sel",
|
||||
+ .ops = &clk_mux_ops,
|
||||
+ /*
|
||||
+ * bit 31 selects from 2 possible parents:
|
||||
+ * vapb_0 or vapb_1
|
||||
+ */
|
||||
+ .parent_names = (const char *[]){ "vapb_0", "vapb_1" },
|
||||
+ .num_parents = 2,
|
||||
+ .flags = CLK_SET_RATE_NO_REPARENT | CLK_IGNORE_UNUSED,
|
||||
+ },
|
||||
+};
|
||||
+
|
||||
+static struct clk_gate gxbb_vapb = {
|
||||
+ .reg = (void *)HHI_VAPBCLK_CNTL,
|
||||
+ .bit_idx = 30,
|
||||
+ .lock = &clk_lock,
|
||||
+ .hw.init = &(struct clk_init_data) {
|
||||
+ .name = "vapb",
|
||||
+ .ops = &clk_gate_ops,
|
||||
+ .parent_names = (const char *[]){ "vapb_sel" },
|
||||
+ .num_parents = 1,
|
||||
+ .flags = CLK_SET_RATE_PARENT | CLK_IGNORE_UNUSED,
|
||||
+ },
|
||||
+};
|
||||
+
|
||||
/* Everything Else (EE) domain gates */
|
||||
static MESON_GATE(gxbb_ddr, HHI_GCLK_MPEG0, 0);
|
||||
static MESON_GATE(gxbb_dos, HHI_GCLK_MPEG0, 1);
|
||||
@@ -1349,6 +1596,21 @@ static struct clk_hw_onecell_data gxbb_hw_onecell_data = {
|
||||
[CLKID_SD_EMMC_C_CLK0_SEL] = &gxbb_sd_emmc_c_clk0_sel.hw,
|
||||
[CLKID_SD_EMMC_C_CLK0_DIV] = &gxbb_sd_emmc_c_clk0_div.hw,
|
||||
[CLKID_SD_EMMC_C_CLK0] = &gxbb_sd_emmc_c_clk0.hw,
|
||||
+ [CLKID_VPU_0_SEL] = &gxbb_vpu_0_sel.hw,
|
||||
+ [CLKID_VPU_0_DIV] = &gxbb_vpu_0_div.hw,
|
||||
+ [CLKID_VPU_0] = &gxbb_vpu_0.hw,
|
||||
+ [CLKID_VPU_1_SEL] = &gxbb_vpu_1_sel.hw,
|
||||
+ [CLKID_VPU_1_DIV] = &gxbb_vpu_1_div.hw,
|
||||
+ [CLKID_VPU_1] = &gxbb_vpu_1.hw,
|
||||
+ [CLKID_VPU] = &gxbb_vpu.hw,
|
||||
+ [CLKID_VAPB_0_SEL] = &gxbb_vapb_0_sel.hw,
|
||||
+ [CLKID_VAPB_0_DIV] = &gxbb_vapb_0_div.hw,
|
||||
+ [CLKID_VAPB_0] = &gxbb_vapb_0.hw,
|
||||
+ [CLKID_VAPB_1_SEL] = &gxbb_vapb_1_sel.hw,
|
||||
+ [CLKID_VAPB_1_DIV] = &gxbb_vapb_1_div.hw,
|
||||
+ [CLKID_VAPB_1] = &gxbb_vapb_1.hw,
|
||||
+ [CLKID_VAPB_SEL] = &gxbb_vapb_sel.hw,
|
||||
+ [CLKID_VAPB] = &gxbb_vapb.hw,
|
||||
[NR_CLKS] = NULL,
|
||||
},
|
||||
.num = NR_CLKS,
|
||||
@@ -1481,6 +1743,21 @@ static struct clk_hw_onecell_data gxl_hw_onecell_data = {
|
||||
[CLKID_SD_EMMC_C_CLK0_SEL] = &gxbb_sd_emmc_c_clk0_sel.hw,
|
||||
[CLKID_SD_EMMC_C_CLK0_DIV] = &gxbb_sd_emmc_c_clk0_div.hw,
|
||||
[CLKID_SD_EMMC_C_CLK0] = &gxbb_sd_emmc_c_clk0.hw,
|
||||
+ [CLKID_VPU_0_SEL] = &gxbb_vpu_0_sel.hw,
|
||||
+ [CLKID_VPU_0_DIV] = &gxbb_vpu_0_div.hw,
|
||||
+ [CLKID_VPU_0] = &gxbb_vpu_0.hw,
|
||||
+ [CLKID_VPU_1_SEL] = &gxbb_vpu_1_sel.hw,
|
||||
+ [CLKID_VPU_1_DIV] = &gxbb_vpu_1_div.hw,
|
||||
+ [CLKID_VPU_1] = &gxbb_vpu_1.hw,
|
||||
+ [CLKID_VPU] = &gxbb_vpu.hw,
|
||||
+ [CLKID_VAPB_0_SEL] = &gxbb_vapb_0_sel.hw,
|
||||
+ [CLKID_VAPB_0_DIV] = &gxbb_vapb_0_div.hw,
|
||||
+ [CLKID_VAPB_0] = &gxbb_vapb_0.hw,
|
||||
+ [CLKID_VAPB_1_SEL] = &gxbb_vapb_1_sel.hw,
|
||||
+ [CLKID_VAPB_1_DIV] = &gxbb_vapb_1_div.hw,
|
||||
+ [CLKID_VAPB_1] = &gxbb_vapb_1.hw,
|
||||
+ [CLKID_VAPB_SEL] = &gxbb_vapb_sel.hw,
|
||||
+ [CLKID_VAPB] = &gxbb_vapb.hw,
|
||||
[NR_CLKS] = NULL,
|
||||
},
|
||||
.num = NR_CLKS,
|
||||
@@ -1600,6 +1877,11 @@ static struct clk_gate *const gxbb_clk_gates[] = {
|
||||
&gxbb_sd_emmc_a_clk0,
|
||||
&gxbb_sd_emmc_b_clk0,
|
||||
&gxbb_sd_emmc_c_clk0,
|
||||
+ &gxbb_vpu_0,
|
||||
+ &gxbb_vpu_1,
|
||||
+ &gxbb_vapb_0,
|
||||
+ &gxbb_vapb_1,
|
||||
+ &gxbb_vapb,
|
||||
};
|
||||
|
||||
static struct clk_mux *const gxbb_clk_muxes[] = {
|
||||
@@ -1615,6 +1897,12 @@ static struct clk_mux *const gxbb_clk_muxes[] = {
|
||||
&gxbb_sd_emmc_a_clk0_sel,
|
||||
&gxbb_sd_emmc_b_clk0_sel,
|
||||
&gxbb_sd_emmc_c_clk0_sel,
|
||||
+ &gxbb_vpu_0_sel,
|
||||
+ &gxbb_vpu_1_sel,
|
||||
+ &gxbb_vpu,
|
||||
+ &gxbb_vapb_0_sel,
|
||||
+ &gxbb_vapb_1_sel,
|
||||
+ &gxbb_vapb_sel,
|
||||
};
|
||||
|
||||
static struct clk_divider *const gxbb_clk_dividers[] = {
|
||||
@@ -1627,6 +1915,10 @@ static struct clk_divider *const gxbb_clk_dividers[] = {
|
||||
&gxbb_sd_emmc_a_clk0_div,
|
||||
&gxbb_sd_emmc_b_clk0_div,
|
||||
&gxbb_sd_emmc_c_clk0_div,
|
||||
+ &gxbb_vpu_0_div,
|
||||
+ &gxbb_vpu_1_div,
|
||||
+ &gxbb_vapb_0_div,
|
||||
+ &gxbb_vapb_1_div,
|
||||
};
|
||||
|
||||
static struct meson_clk_audio_divider *const gxbb_audio_dividers[] = {
|
||||
--
|
||||
2.7.4
|
||||
|
||||
@@ -0,0 +1,56 @@
|
||||
From fc742b3d9f1b79f9e3e695f0e4bfc6a35c7ed7e3 Mon Sep 17 00:00:00 2001
|
||||
From: Neil Armstrong <narmstrong@baylibre.com>
|
||||
Date: Mon, 16 Oct 2017 15:35:00 +0200
|
||||
Subject: [PATCH 16/39] drm/meson: dw_hdmi: Add support for an optional
|
||||
external 5V regulator
|
||||
|
||||
On reference boards and derivatives, the HDMI Logic is powered by an external
|
||||
5V regulator.
|
||||
This regulator was set by the Vendor U-Boot, add optional support for it.
|
||||
|
||||
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
|
||||
---
|
||||
drivers/gpu/drm/meson/meson_dw_hdmi.c | 13 +++++++++++++
|
||||
1 file changed, 13 insertions(+)
|
||||
|
||||
diff --git a/drivers/gpu/drm/meson/meson_dw_hdmi.c b/drivers/gpu/drm/meson/meson_dw_hdmi.c
|
||||
index cef4144..17de3af 100644
|
||||
--- a/drivers/gpu/drm/meson/meson_dw_hdmi.c
|
||||
+++ b/drivers/gpu/drm/meson/meson_dw_hdmi.c
|
||||
@@ -23,6 +23,7 @@
|
||||
#include <linux/of_graph.h>
|
||||
#include <linux/reset.h>
|
||||
#include <linux/clk.h>
|
||||
+#include <linux/regulator/consumer.h>
|
||||
|
||||
#include <drm/drmP.h>
|
||||
#include <drm/drm_edid.h>
|
||||
@@ -137,6 +138,7 @@ struct meson_dw_hdmi {
|
||||
struct reset_control *hdmitx_phy;
|
||||
struct clk *hdmi_pclk;
|
||||
struct clk *venci_clk;
|
||||
+ struct regulator *hdmi_supply;
|
||||
u32 irq_stat;
|
||||
};
|
||||
#define encoder_to_meson_dw_hdmi(x) \
|
||||
@@ -751,6 +753,17 @@ static int meson_dw_hdmi_bind(struct device *dev, struct device *master,
|
||||
dw_plat_data = &meson_dw_hdmi->dw_plat_data;
|
||||
encoder = &meson_dw_hdmi->encoder;
|
||||
|
||||
+ meson_dw_hdmi->hdmi_supply = devm_regulator_get_optional(dev, "hdmi");
|
||||
+ if (IS_ERR(meson_dw_hdmi->hdmi_supply)) {
|
||||
+ if (PTR_ERR(meson_dw_hdmi->hdmi_supply) == -EPROBE_DEFER)
|
||||
+ return -EPROBE_DEFER;
|
||||
+ meson_dw_hdmi->hdmi_supply = NULL;
|
||||
+ } else {
|
||||
+ ret = regulator_enable(meson_dw_hdmi->hdmi_supply);
|
||||
+ if (ret)
|
||||
+ return ret;
|
||||
+ }
|
||||
+
|
||||
meson_dw_hdmi->hdmitx_apb = devm_reset_control_get_exclusive(dev,
|
||||
"hdmitx_apb");
|
||||
if (IS_ERR(meson_dw_hdmi->hdmitx_apb)) {
|
||||
--
|
||||
2.7.4
|
||||
|
||||
@@ -0,0 +1,58 @@
|
||||
From 253dbcb48f94e172873878262d19338bcc9aa108 Mon Sep 17 00:00:00 2001
|
||||
From: Neil Armstrong <narmstrong@baylibre.com>
|
||||
Date: Mon, 16 Oct 2017 15:34:21 +0200
|
||||
Subject: [PATCH 17/39] drm/meson: Add missing VPU init
|
||||
|
||||
The VPU init misses these configurations values.
|
||||
|
||||
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
|
||||
---
|
||||
drivers/gpu/drm/meson/meson_drv.c | 9 +++++++++
|
||||
drivers/gpu/drm/meson/meson_registers.h | 4 ++++
|
||||
2 files changed, 13 insertions(+)
|
||||
|
||||
diff --git a/drivers/gpu/drm/meson/meson_drv.c b/drivers/gpu/drm/meson/meson_drv.c
|
||||
index 7742c7d..19a0d8d 100644
|
||||
--- a/drivers/gpu/drm/meson/meson_drv.c
|
||||
+++ b/drivers/gpu/drm/meson/meson_drv.c
|
||||
@@ -150,6 +150,14 @@ static struct regmap_config meson_regmap_config = {
|
||||
.max_register = 0x1000,
|
||||
};
|
||||
|
||||
+static void meson_vpu_init(struct meson_drm *priv)
|
||||
+{
|
||||
+ writel_relaxed(0x210000, priv->io_base + _REG(VPU_RDARB_MODE_L1C1));
|
||||
+ writel_relaxed(0x10000, priv->io_base + _REG(VPU_RDARB_MODE_L1C2));
|
||||
+ writel_relaxed(0x900000, priv->io_base + _REG(VPU_RDARB_MODE_L2C1));
|
||||
+ writel_relaxed(0x20000, priv->io_base + _REG(VPU_WRARB_MODE_L2C1));
|
||||
+}
|
||||
+
|
||||
static int meson_drv_bind_master(struct device *dev, bool has_components)
|
||||
{
|
||||
struct platform_device *pdev = to_platform_device(dev);
|
||||
@@ -221,6 +229,7 @@ static int meson_drv_bind_master(struct device *dev, bool has_components)
|
||||
|
||||
/* Hardware Initialization */
|
||||
|
||||
+ meson_vpu_init(priv);
|
||||
meson_venc_init(priv);
|
||||
meson_vpp_init(priv);
|
||||
meson_viu_init(priv);
|
||||
diff --git a/drivers/gpu/drm/meson/meson_registers.h b/drivers/gpu/drm/meson/meson_registers.h
|
||||
index 2847381..bca8714 100644
|
||||
--- a/drivers/gpu/drm/meson/meson_registers.h
|
||||
+++ b/drivers/gpu/drm/meson/meson_registers.h
|
||||
@@ -1363,6 +1363,10 @@
|
||||
#define VPU_PROT3_STAT_1 0x277a
|
||||
#define VPU_PROT3_STAT_2 0x277b
|
||||
#define VPU_PROT3_REQ_ONOFF 0x277c
|
||||
+#define VPU_RDARB_MODE_L1C1 0x2790
|
||||
+#define VPU_RDARB_MODE_L1C2 0x2799
|
||||
+#define VPU_RDARB_MODE_L2C1 0x279d
|
||||
+#define VPU_WRARB_MODE_L2C1 0x27a2
|
||||
|
||||
/* osd super scale */
|
||||
#define OSDSR_HV_SIZEIN 0x3130
|
||||
--
|
||||
2.7.4
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user