mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-08-01 15:07:49 +00:00
Merge pull request #4253 from jernejsk/h5-new
Allwinner: Add support for H5
This commit is contained in:
commit
396788e953
@ -3,3 +3,4 @@
|
||||
# CONFIG_USB_OHCI_HCD is not set
|
||||
# CONFIG_SUN8I_EMAC is not set
|
||||
CONFIG_BOOTDELAY=0
|
||||
CONFIG_MACPWR=""
|
||||
|
@ -0,0 +1,36 @@
|
||||
#
|
||||
# Configuration for H3 analog output
|
||||
#
|
||||
|
||||
<confdir:pcm/front.conf>
|
||||
|
||||
H3_Audio_Codec.pcm.front.0 {
|
||||
@args [ CARD ]
|
||||
@args.CARD {
|
||||
type string
|
||||
}
|
||||
type hooks
|
||||
slave.pcm {
|
||||
type hw
|
||||
card $CARD
|
||||
}
|
||||
hooks.0 {
|
||||
type ctl_elems
|
||||
hook_args [
|
||||
{
|
||||
name "Line Out Playback Volume"
|
||||
lock true
|
||||
preserve true
|
||||
optional false
|
||||
value 31
|
||||
}
|
||||
{
|
||||
name "Line Out Playback Switch"
|
||||
lock true
|
||||
preserve true
|
||||
optional false
|
||||
value [ on on ]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
41
projects/Allwinner/devices/H5/options
Normal file
41
projects/Allwinner/devices/H5/options
Normal file
@ -0,0 +1,41 @@
|
||||
################################################################################
|
||||
# setup system defaults
|
||||
################################################################################
|
||||
|
||||
# The TARGET_CPU variable controls which processor should be targeted for
|
||||
# generated code.
|
||||
case $TARGET_ARCH in
|
||||
aarch64)
|
||||
TARGET_CPU="cortex-a53"
|
||||
TARGET_CPU_FLAGS="+crc+crypto"
|
||||
TARGET_FEATURES="64bit"
|
||||
TARGET_KERNEL_ARCH="arm64"
|
||||
;;
|
||||
arm)
|
||||
TARGET_KERNEL_ARCH="arm64"
|
||||
TARGET_PATCH_ARCH="aarch64"
|
||||
TARGET_FLOAT="hard"
|
||||
TARGET_CPU="cortex-a53"
|
||||
TARGET_CPU_FLAGS="+crc"
|
||||
TARGET_FPU="crypto-neon-fp-armv8"
|
||||
TARGET_FEATURES="32bit"
|
||||
;;
|
||||
esac
|
||||
|
||||
# Kernel target
|
||||
KERNEL_TARGET="Image"
|
||||
|
||||
# U-Boot firmware package(s) to use
|
||||
UBOOT_FIRMWARE="atf"
|
||||
|
||||
# ATF platform
|
||||
ATF_PLATFORM="sun50i_a64"
|
||||
|
||||
# OpenGL-ES implementation to use
|
||||
OPENGLES="mesa"
|
||||
|
||||
# Mali GPU family
|
||||
MALI_FAMILY="450"
|
||||
|
||||
# KODI Player implementation to use
|
||||
KODIPLAYER_DRIVER="$OPENGLES"
|
@ -0,0 +1,56 @@
|
||||
diff --git a/arch/arm/boot/dts/sunxi-h3-h5.dtsi b/arch/arm/boot/dts/sunxi-h3-h5.dtsi
|
||||
index 8aa2befc..d3d70eac 100644
|
||||
--- a/arch/arm/boot/dts/sunxi-h3-h5.dtsi
|
||||
+++ b/arch/arm/boot/dts/sunxi-h3-h5.dtsi
|
||||
@@ -53,6 +53,23 @@
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
|
||||
+ sound_hdmi: sound {
|
||||
+ compatible = "simple-audio-card";
|
||||
+ simple-audio-card,format = "i2s";
|
||||
+ simple-audio-card,name = "allwinner-hdmi";
|
||||
+ simple-audio-card,mclk-fs = <128>;
|
||||
+
|
||||
+ simple-audio-card,codec {
|
||||
+ sound-dai = <&hdmi>;
|
||||
+ };
|
||||
+
|
||||
+ simple-audio-card,cpu {
|
||||
+ sound-dai = <&i2s2>;
|
||||
+ dai-tdm-slot-num = <2>;
|
||||
+ dai-tdm-slot-width = <32>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
clocks {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
@@ -631,6 +648,19 @@
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
+ i2s2: i2s@1c22800 {
|
||||
+ #sound-dai-cells = <0>;
|
||||
+ compatible = "allwinner,sun8i-h3-i2s";
|
||||
+ reg = <0x01c22800 0x400>;
|
||||
+ interrupts = <GIC_SPI 15 IRQ_TYPE_LEVEL_HIGH>;
|
||||
+ clocks = <&ccu CLK_BUS_I2S2>, <&ccu CLK_I2S2>;
|
||||
+ clock-names = "apb", "mod";
|
||||
+ dmas = <&dma 27>;
|
||||
+ resets = <&ccu RST_BUS_I2S2>;
|
||||
+ dma-names = "tx";
|
||||
+ allwinner,playback-channels = <8>;
|
||||
+ };
|
||||
+
|
||||
codec: codec@1c22c00 {
|
||||
#sound-dai-cells = <0>;
|
||||
compatible = "allwinner,sun8i-h3-codec";
|
||||
@@ -110,6 +126,7 @@
|
||||
};
|
||||
|
||||
hdmi: hdmi@1ee0000 {
|
||||
+ #sound-dai-cells = <0>;
|
||||
compatible = "allwinner,sun8i-h3-dw-hdmi",
|
||||
"allwinner,sun8i-a83t-dw-hdmi";
|
||||
reg = <0x01ee0000 0x10000>;
|
@ -0,0 +1,24 @@
|
||||
From 51dcda7a261bcadca0a8f5e6fe6241ec266438d0 Mon Sep 17 00:00:00 2001
|
||||
From: Marcus Cooper <codekipper@gmail.com>
|
||||
Date: Thu, 2 Jan 2020 19:03:35 +0100
|
||||
Subject: [PATCH] Add frame inversion to correct multi-channel audio
|
||||
|
||||
---
|
||||
arch/arm/boot/dts/sunxi-h3-h5.dtsi | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/arch/arm/boot/dts/sunxi-h3-h5.dtsi b/arch/arm/boot/dts/sunxi-h3-h5.dtsi
|
||||
index 8644435e66d3..7375a9479e84 100644
|
||||
--- a/arch/arm/boot/dts/sunxi-h3-h5.dtsi
|
||||
+++ b/arch/arm/boot/dts/sunxi-h3-h5.dtsi
|
||||
@@ -82,6 +82,7 @@
|
||||
simple-audio-card,format = "i2s";
|
||||
simple-audio-card,name = "allwinner-hdmi";
|
||||
simple-audio-card,mclk-fs = <128>;
|
||||
+ simple-audio-card,frame-inversion;
|
||||
|
||||
simple-audio-card,codec {
|
||||
sound-dai = <&hdmi>;
|
||||
--
|
||||
2.24.1
|
||||
|
@ -0,0 +1,39 @@
|
||||
From 06860479d1bfd84037f29236511d5945e5193c85 Mon Sep 17 00:00:00 2001
|
||||
From: Jernej Skrabec <jernej.skrabec@siol.net>
|
||||
Date: Sun, 8 Mar 2020 08:08:03 +0100
|
||||
Subject: [PATCH] OrangePi PC2: Update defaults
|
||||
|
||||
---
|
||||
configs/orangepi_pc2_defconfig | 6 ++++--
|
||||
1 file changed, 4 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/configs/orangepi_pc2_defconfig b/configs/orangepi_pc2_defconfig
|
||||
index 3d65b87d33..1ffeeed6cd 100644
|
||||
--- a/configs/orangepi_pc2_defconfig
|
||||
+++ b/configs/orangepi_pc2_defconfig
|
||||
@@ -4,18 +4,20 @@ CONFIG_NR_DRAM_BANKS=1
|
||||
CONFIG_SPL=y
|
||||
CONFIG_MACH_SUN50I_H5=y
|
||||
CONFIG_DRAM_CLK=672
|
||||
-CONFIG_DRAM_ZQ=3881977
|
||||
-# CONFIG_DRAM_ODT_EN is not set
|
||||
+CONFIG_DRAM_ZQ=4145117
|
||||
CONFIG_MACPWR="PD6"
|
||||
CONFIG_SPL_SPI_SUNXI=y
|
||||
# CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
|
||||
CONFIG_USE_PREBOOT=y
|
||||
CONFIG_SYS_SPI_U_BOOT_OFFS=0x8000
|
||||
+CONFIG_SPL_I2C_SUPPORT=y
|
||||
# CONFIG_SPL_DOS_PARTITION is not set
|
||||
# CONFIG_SPL_EFI_PARTITION is not set
|
||||
CONFIG_DEFAULT_DEVICE_TREE="sun50i-h5-orangepi-pc2"
|
||||
CONFIG_SYS_RELOC_GD_ENV_ADDR=y
|
||||
CONFIG_SUN8I_EMAC=y
|
||||
+CONFIG_SY8106A_POWER=y
|
||||
+CONFIG_SY8106A_VOUT1_VOLT=1100
|
||||
CONFIG_USB_EHCI_HCD=y
|
||||
CONFIG_USB_OHCI_HCD=y
|
||||
CONFIG_USB_MUSB_GADGET=y
|
||||
--
|
||||
2.25.1
|
||||
|
@ -496,15 +496,15 @@ CONFIG_CPU_FREQ=y
|
||||
CONFIG_CPU_FREQ_GOV_ATTR_SET=y
|
||||
CONFIG_CPU_FREQ_GOV_COMMON=y
|
||||
CONFIG_CPU_FREQ_STAT=y
|
||||
CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE=y
|
||||
# CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE is not set
|
||||
# CONFIG_CPU_FREQ_DEFAULT_GOV_POWERSAVE is not set
|
||||
# CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE is not set
|
||||
# CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND is not set
|
||||
CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND=y
|
||||
# CONFIG_CPU_FREQ_DEFAULT_GOV_CONSERVATIVE is not set
|
||||
# CONFIG_CPU_FREQ_DEFAULT_GOV_SCHEDUTIL is not set
|
||||
CONFIG_CPU_FREQ_GOV_PERFORMANCE=y
|
||||
CONFIG_CPU_FREQ_GOV_POWERSAVE=m
|
||||
CONFIG_CPU_FREQ_GOV_USERSPACE=y
|
||||
CONFIG_CPU_FREQ_GOV_USERSPACE=m
|
||||
CONFIG_CPU_FREQ_GOV_ONDEMAND=y
|
||||
CONFIG_CPU_FREQ_GOV_CONSERVATIVE=m
|
||||
CONFIG_CPU_FREQ_GOV_SCHEDUTIL=y
|
||||
|
@ -493,17 +493,17 @@ CONFIG_CPU_FREQ=y
|
||||
CONFIG_CPU_FREQ_GOV_ATTR_SET=y
|
||||
CONFIG_CPU_FREQ_GOV_COMMON=y
|
||||
# CONFIG_CPU_FREQ_STAT is not set
|
||||
CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE=y
|
||||
# CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE is not set
|
||||
# CONFIG_CPU_FREQ_DEFAULT_GOV_POWERSAVE is not set
|
||||
# CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE is not set
|
||||
# CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND is not set
|
||||
CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND=y
|
||||
# CONFIG_CPU_FREQ_DEFAULT_GOV_CONSERVATIVE is not set
|
||||
# CONFIG_CPU_FREQ_DEFAULT_GOV_SCHEDUTIL is not set
|
||||
CONFIG_CPU_FREQ_GOV_PERFORMANCE=y
|
||||
CONFIG_CPU_FREQ_GOV_POWERSAVE=y
|
||||
# CONFIG_CPU_FREQ_GOV_USERSPACE is not set
|
||||
CONFIG_CPU_FREQ_GOV_POWERSAVE=m
|
||||
CONFIG_CPU_FREQ_GOV_USERSPACE=m
|
||||
CONFIG_CPU_FREQ_GOV_ONDEMAND=y
|
||||
# CONFIG_CPU_FREQ_GOV_CONSERVATIVE is not set
|
||||
CONFIG_CPU_FREQ_GOV_CONSERVATIVE=m
|
||||
CONFIG_CPU_FREQ_GOV_SCHEDUTIL=y
|
||||
|
||||
#
|
||||
|
@ -2397,3 +2397,58 @@ index 67fca439bbfb..24965e53d351 100644
|
||||
--
|
||||
2.25.1
|
||||
|
||||
From 9ad42557109a9db9ca16964352c3c045a775b018 Mon Sep 17 00:00:00 2001
|
||||
From: Ondrej Jirman <megous@megous.com>
|
||||
Date: Thu, 19 Dec 2019 09:28:21 -0800
|
||||
Subject: [PATCH] arm64: dts: allwinner: h5: Add thermal sensor and thermal
|
||||
zones
|
||||
|
||||
There are two sensors, one for CPU, one for GPU.
|
||||
|
||||
Signed-off-by: Ondrej Jirman <megous@megous.com>
|
||||
Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
|
||||
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
|
||||
---
|
||||
arch/arm64/boot/dts/allwinner/sun50i-h5.dtsi | 26 ++++++++++++++++++++
|
||||
1 file changed, 26 insertions(+)
|
||||
|
||||
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h5.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-h5.dtsi
|
||||
index 3e724788dd3e..9893aa64dd0b 100644
|
||||
--- a/arch/arm64/boot/dts/allwinner/sun50i-h5.dtsi
|
||||
+++ b/arch/arm64/boot/dts/allwinner/sun50i-h5.dtsi
|
||||
@@ -147,6 +147,32 @@ mali: gpu@1e80000 {
|
||||
assigned-clocks = <&ccu CLK_GPU>;
|
||||
assigned-clock-rates = <384000000>;
|
||||
};
|
||||
+
|
||||
+ ths: thermal-sensor@1c25000 {
|
||||
+ compatible = "allwinner,sun50i-h5-ths";
|
||||
+ reg = <0x01c25000 0x400>;
|
||||
+ interrupts = <GIC_SPI 31 IRQ_TYPE_LEVEL_HIGH>;
|
||||
+ resets = <&ccu RST_BUS_THS>;
|
||||
+ clocks = <&ccu CLK_BUS_THS>, <&ccu CLK_THS>;
|
||||
+ clock-names = "bus", "mod";
|
||||
+ nvmem-cells = <&ths_calibration>;
|
||||
+ nvmem-cell-names = "calibration";
|
||||
+ #thermal-sensor-cells = <1>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ thermal-zones {
|
||||
+ cpu_thermal: cpu-thermal {
|
||||
+ polling-delay-passive = <0>;
|
||||
+ polling-delay = <0>;
|
||||
+ thermal-sensors = <&ths 0>;
|
||||
+ };
|
||||
+
|
||||
+ gpu_thermal {
|
||||
+ polling-delay-passive = <0>;
|
||||
+ polling-delay = <0>;
|
||||
+ thermal-sensors = <&ths 1>;
|
||||
+ };
|
||||
};
|
||||
};
|
||||
|
||||
--
|
||||
2.25.0
|
||||
|
||||
|
@ -0,0 +1,56 @@
|
||||
From 3abe422fdc65ba08054659b0d27c71e24346021d Mon Sep 17 00:00:00 2001
|
||||
From: Ondrej Jirman <megous@megous.com>
|
||||
Date: Sun, 23 Feb 2020 11:40:19 +0100
|
||||
Subject: [PATCH] arm64: dts: sun50i-h5-orange-pi-pc2: Add CPUX voltage
|
||||
regulator
|
||||
|
||||
Orange Pi PC2 features sy8106a regulator just like Orange Pi PC.
|
||||
|
||||
Signed-off-by: Ondrej Jirman <megous@megous.com>
|
||||
Reviewed-by: Samuel Holland <samuel@sholland.org>
|
||||
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
|
||||
---
|
||||
.../dts/allwinner/sun50i-h5-orangepi-pc2.dts | 20 +++++++++++++++++++
|
||||
1 file changed, 20 insertions(+)
|
||||
|
||||
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-pc2.dts b/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-pc2.dts
|
||||
index c4f89c312f42..7d7aad18f078 100644
|
||||
--- a/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-pc2.dts
|
||||
+++ b/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-pc2.dts
|
||||
@@ -94,6 +94,10 @@ &codec {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
+&cpu0 {
|
||||
+ cpu-supply = <®_vdd_cpux>;
|
||||
+};
|
||||
+
|
||||
&de {
|
||||
status = "okay";
|
||||
};
|
||||
@@ -169,6 +173,22 @@ &ohci3 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
+&r_i2c {
|
||||
+ status = "okay";
|
||||
+
|
||||
+ reg_vdd_cpux: regulator@65 {
|
||||
+ compatible = "silergy,sy8106a";
|
||||
+ reg = <0x65>;
|
||||
+ regulator-name = "vdd-cpux";
|
||||
+ silergy,fixed-microvolt = <1100000>;
|
||||
+ regulator-min-microvolt = <1000000>;
|
||||
+ regulator-max-microvolt = <1400000>;
|
||||
+ regulator-ramp-delay = <200>;
|
||||
+ regulator-boot-on;
|
||||
+ regulator-always-on;
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
&spi0 {
|
||||
status = "okay";
|
||||
|
||||
--
|
||||
2.25.1
|
||||
|
@ -107,6 +107,12 @@ devices = \
|
||||
'config': 'orangepi_plus_defconfig'
|
||||
},
|
||||
},
|
||||
'H5' : {
|
||||
'orangepi-pc2': {
|
||||
'dtb': 'sun50i-h5-orangepi-pc2.dtb',
|
||||
'config': 'orangepi_pc2_defconfig'
|
||||
},
|
||||
},
|
||||
'H6': {
|
||||
'beelink-gs1' : {
|
||||
'dtb' : 'sun50i-h6-beelink-gs1.dtb',
|
||||
|
Loading…
x
Reference in New Issue
Block a user