Merge branch 'pr-19/helios-4/wiki_update'

This commit is contained in:
Gauthier Provost 2019-07-27 11:30:35 +08:00
commit 5dc49cfba4
2 changed files with 29 additions and 27 deletions

View file

@ -143,12 +143,11 @@ List of devices can be checked under /sys/class/hwmon
``` ```
ls -l /sys/class/hwmon/ ls -l /sys/class/hwmon/
total 0 total 0
lrwxrwxrwx 1 root root 0 Nov 7 07:23 hwmon0 -> ../../devices/platform/soc/soc:internal-regs/f1072004.mdio/mdio_bus/f1072004.mdio-mii/f1072004.mdio-mii:00/hwmon/hwmon0 lrwxrwxrwx 1 root root 0 Jul 26 07:39 hwmon0 -> ../../devices/platform/soc/soc:internal-regs/f1072004.mdio/mdio_bus/f1072004.mdio-mii/f1072004.mdio-mii:00/hwmon/hwmon0
lrwxrwxrwx 1 root root 0 Nov 7 07:23 hwmon1 -> ../../devices/virtual/hwmon/hwmon1 lrwxrwxrwx 1 root root 0 Jul 26 07:39 hwmon1 -> ../../devices/virtual/thermal/thermal_zone0/hwmon1
lrwxrwxrwx 1 root root 0 Nov 7 07:23 hwmon2 -> ../../devices/platform/j10-pwm/hwmon/hwmon2 lrwxrwxrwx 1 root root 0 Jul 26 07:39 hwmon2 -> ../../devices/platform/soc/soc:internal-regs/f1011000.i2c/i2c-0/0-004c/hwmon/hwmon2
lrwxrwxrwx 1 root root 0 Nov 7 07:23 hwmon3 -> ../../devices/platform/j17-pwm/hwmon/hwmon3 lrwxrwxrwx 1 root root 0 Jul 26 07:39 hwmon3 -> ../../devices/platform/j10-pwm/hwmon/hwmon3
lrwxrwxrwx 1 root root 0 Nov 7 07:23 hwmon4 -> ../../devices/platform/soc/soc:internal-regs/f1011000.i2c/i2c-0/0-004c/hwmon/hwmon4 lrwxrwxrwx 1 root root 0 Jul 26 07:39 hwmon4 -> ../../devices/platform/j17-pwm/hwmon/hwmon4
``` ```
!!! info !!! info
@ -157,20 +156,20 @@ lrwxrwxrwx 1 root root 0 Nov 7 07:23 hwmon4 -> ../../devices/platform/soc/soc:i
To identify which hwmon belong to fan, look for *j10-pwm* and *j17-pwm*. On above example To identify which hwmon belong to fan, look for *j10-pwm* and *j17-pwm*. On above example
``` ```
hwmon2 -> ../../devices/platform/j10-pwm/hwmon/hwmon2 hwmon3 -> ../../devices/platform/j10-pwm/hwmon/hwmon3
hwmon3 -> ../../devices/platform/j17-pwm/hwmon/hwmon3 hwmon4 -> ../../devices/platform/j17-pwm/hwmon/hwmon4
``` ```
To read current PWM To read current PWM
``` ```
cat /sys/class/hwmon2/pwm1
cat /sys/class/hwmon3/pwm1 cat /sys/class/hwmon3/pwm1
cat /sys/class/hwmon4/pwm1
``` ```
To set PWM To set PWM
``` ```
echo NEW_PWM_VALUE > /sys/class/hwmon2/pwm1
echo NEW_PWM_VALUE > /sys/class/hwmon3/pwm1 echo NEW_PWM_VALUE > /sys/class/hwmon3/pwm1
echo NEW_PWM_VALUE > /sys/class/hwmon4/pwm1
``` ```
### Fancontrol - automated software based fan speed control ### Fancontrol - automated software based fan speed control
@ -196,13 +195,13 @@ fancontrol uses **/etc/fancontrol** as configuration file. Below is an example c
# Helios4 PWM Fan Control Configuration # Helios4 PWM Fan Control Configuration
# Temp source : armada_thermal sensor # Temp source : armada_thermal sensor
INTERVAL=10 INTERVAL=10
DEVPATH=hwmon2=devices/platform/j10-pwm hwmon3=devices/platform/j17-pwm hwmon4=devices/platform/soc/soc:internal-regs/f1011000.i2c/i2c-0/0-004c DEVPATH=hwmon3=devices/platform/j10-pwm hwmon4=devices/platform/j17-pwm hwmon2=devices/platform/soc/soc:internal-regs/f1011000.i2c/i2c-0/0-004c
DEVNAME=hwmon1=armada_thermal DEVNAME=hwmon1=f10e4078.thermal
FCTEMPS=hwmon2/pwm1=hwmon1/temp1_input hwmon3/pwm1=hwmon1/temp1_input FCTEMPS=hwmon3/pwm1=hwmon1/temp1_input hwmon4/pwm1=hwmon1/temp1_input
MINTEMP=hwmon2/pwm1=60 hwmon3/pwm1=60 MINTEMP=hwmon3/pwm1=40 hwmon4/pwm1=40
MAXTEMP=hwmon2/pwm1=80 hwmon3/pwm1=80 MAXTEMP=hwmon3/pwm1=80 hwmon4/pwm1=80
MINSTART=hwmon2/pwm1=20 hwmon3/pwm1=20 MINSTART=hwmon3/pwm1=20 hwmon4/pwm1=20
MINSTOP=hwmon2/pwm1=29 hwmon3/pwm1=29 MINSTOP=hwmon3/pwm1=29 hwmon4/pwm1=29
MINPWM=20 MINPWM=20
``` ```
@ -226,7 +225,7 @@ FCTEMPS
Maps PWM outputs to temperature sensors so fancontrol knows which temperature sensors should be used for calculation of new values for the corresponding PWM outputs. Maps PWM outputs to temperature sensors so fancontrol knows which temperature sensors should be used for calculation of new values for the corresponding PWM outputs.
Fans (**hwmon2** & **hwmon3**) are controlled based on CPU thermal sensor (**hwmon1**) reading. Fans (**hwmon3** & **hwmon4**) are controlled based on CPU thermal sensor (**hwmon1**) reading.
MINSTART MINSTART
@ -248,13 +247,13 @@ MINTEMP
The temperature below which the fan gets switched to minimum speed. The temperature below which the fan gets switched to minimum speed.
Fans (hwmon2 & hwmon3) runs in minimum speed if the CPU temperature below **70** degree C. Fans (hwmon2 & hwmon3) runs in minimum speed if the CPU temperature below **40** degree C.
MAXTEMP MAXTEMP
The temperature over which the fan gets switched to maximum speed. The temperature over which the fan gets switched to maximum speed.
Fans (hwmon2 & hwmon3) runs in maximum speed if the CPU temperature above **90** degree C. Fans (hwmon2 & hwmon3) runs in maximum speed if the CPU temperature above **80** degree C.
MINPWM MINPWM
@ -264,7 +263,7 @@ Set minimum PWM value to **0**. On Type-C fan, it would stopped the fan while on
!!! note !!! note
The Helios4 fancontrol configuration file can be found [here](https://raw.githubusercontent.com/armbian/build/master/packages/bsp/helios4/fancontrol_pwm-fan-mvebu-next.conf). The Helios4 fancontrol configuration file can be found [here](https://raw.githubusercontent.com/armbian/build/master/packages/bsp/helios4/fancontrol_pwm-fan.conf).
### Thermal Zone on Device Tree ### Thermal Zone on Device Tree
@ -305,14 +304,14 @@ Below is an example of device tree nodes that can be added to Helios4 device tre
trips { trips {
cpu_active: cpu_active { cpu_active: cpu_active {
/* millicelsius */ /* millicelsius */
temperature = <70000>; temperature = <40000>;
hysteresis = <2000>; hysteresis = <2000>;
type = "active"; type = "active";
}; };
cpu_alert: cpu_alert { cpu_alert: cpu_alert {
/* millicelsius */ /* millicelsius */
temperature = <90000>; temperature = <80000>;
hysteresis = <2000>; hysteresis = <2000>;
type = "hot"; type = "hot";
}; };

View file

@ -15,6 +15,9 @@ However, it is not compatible with all cards even though the SD cards are declar
!!! Warning !!! Warning
Enabling High Speed and UHS-I support could lead to unbootable system because of incompatible microSD card. Enabling High Speed and UHS-I support could lead to unbootable system because of incompatible microSD card.
!!! Important
From *Linux Kernel 4.19* onwards, High Speed and UHS-I modes for Helios4 do NOT work. It requires further work on our side.
## Device Tree Modification ## Device Tree Modification
To enable High Speed mode and UHS-I support, Helios4 device tree need to be modified. To enable High Speed mode and UHS-I support, Helios4 device tree need to be modified.
@ -30,12 +33,11 @@ Install the dependencies and extract the source into ~/src/linux
``` ```
sudo apt-get -y install build-essential linux-source-4.14.87-next-mvebu sudo apt-get -y install build-essential linux-source-4.14.87-next-mvebu
mkdir -p ~/src/linux mkdir -p ~/src/linux
tar Jxf /usr/src/linux-source-4.14.87-mvebu.tar.xz -C ~/src/linux tar Jxf /usr/src/linux-source-$(uname -r).tar.xz -C ~/src/linux
``` ```
!!! note !!! note
You will need to choose the right *linux-source* package that matches the kernel version you are running. Check kernel version with command **uname -a** You will need to choose the right *linux-source* package that matches the kernel version you are running. Check kernel version with command **uname -r**.
### Patching and Compilation ### Patching and Compilation
@ -51,6 +53,7 @@ git apply --apply --verbose helios4_dtb_sd_uhs_linux_stable.patch
Compile the device tree into dtb Compile the device tree into dtb
``` ```
cp /boot/config-$(uname -r) .config
make armada-388-helios4.dtb make armada-388-helios4.dtb
cp arch/arm/boot/dts/armada-388-helios4.dtb armada-388-helios4.dtb.uhs cp arch/arm/boot/dts/armada-388-helios4.dtb armada-388-helios4.dtb.uhs
``` ```
@ -118,7 +121,7 @@ To automate the test, a test script named [run_sdcard_test.sh](/files/sdcard/run
**3.** Install iozone and download the test script **3.** Install iozone and download the test script
``` ```
sudo apt-get -y install iozone sudo apt-get -y install iozone3
wget https://wiki.kobol.io/files/sdcard/run_sdcard_test.sh wget https://wiki.kobol.io/files/sdcard/run_sdcard_test.sh
chmod 755 run_sdcard_test.sh chmod 755 run_sdcard_test.sh