Patching sunxi (#3445)

* waiter_local_repo: Fixed incomplete logic

Signed-off-by: The-going <48602507+The-going@users.noreply.github.com>

* A series of patches for sunxi v5.15.16

Signed-off-by: The-going <48602507+The-going@users.noreply.github.com>

* DEBUG

* check 70

* check 101

* Add 101 Armbian patches as series

Patches are renamed using the logic of the file structure
and the essence of the changes, sorted in the order
of their receipt. Fixed a lot of incorrect overlay
of some pieces in patches. Several small patches are
combined, because they changed one file.

Signed-off-by: The-going <48602507+The-going@users.noreply.github.com>

* Remove old patches that have been reworked into a series

Signed-off-by: The-going <48602507+The-going@users.noreply.github.com>

* Fix for apply to v5.15.17

* Two Bluetooth-BTRTL patches for sunxi will be applied in the series.

Signed-off-by: The-going <48602507+The-going@users.noreply.github.com>

* check 113

* Fix print output

* Revert "DEBUG"

This reverts commit 49e2c7fdc0.
This commit is contained in:
The-going
2022-01-28 21:08:04 +03:00
committed by GitHub
parent 8fda8d4852
commit d885bfc97d
132 changed files with 1620 additions and 1153 deletions

View File

@@ -587,8 +587,8 @@ compilation_prepare()
# Bluetooth support for Realtek 8822CS (hci_ver 0x8) chipsets
if linux-version compare "${version}" ge 5.11; then
# For sunxi, these two patches are applied in a series.
if linux-version compare "${version}" ge 5.11 && [[ "$LINUXFAMILY" != sunxi* ]] ; then
display_alert "Adding" "Bluetooth support for Realtek 8822CS (hci_ver 0x8) chipsets" "info"

View File

@@ -954,8 +954,8 @@ apply_patch_series ()
local flag
local err_pt=$(mktemp /tmp/apply_patch_series_XXXXX)
list=$(gawk '$0 !~ /^#.*|^-.*|^$/' "${series}")
skiplist=$(gawk '$0 ~ /^-.*/' "${series}")
list=$(awk '$0 !~ /^#.*|^-.*|^$/' "${series}")
skiplist=$(awk '$0 ~ /^-.*/{print $NF}' "${series}")
display_alert "apply a series of " "[$(echo $list | wc -w)] patches"
display_alert "skip [$(echo $skiplist | wc -w)] patches"
@@ -974,19 +974,19 @@ apply_patch_series ()
case $flag in
0) printf "%-72s [\033[32m done \033[0m]\n" "${p#*/}"
printf "%-72s [ done ]\n" "${p#*/}" >> "${DEST}"/debug/patching.log
0) printf "%-77s [\033[32m done \033[0m]\n" "${p}"
printf "%-77s [ done ]\n" "${p}" >> "${DEST}"/debug/patching.log
;;
1)
printf "%-72s [\033[33m FAILED \033[0m]\n" "${p#*/}"
printf "%-77s [\033[33m FAILED \033[0m]\n" "${p}"
echo -e "For ${p} \t\tprocess exit [ $flag ]" >>"${DEST}"/debug/patching.log
cat $err_pt >>"${DEST}"/debug/patching.log
;;
2)
printf "%-72s [\033[31m Patch wrong \033[0m]\n" "${p#*/}"
printf "%-77s [\033[31m Patch wrong \033[0m]\n" "${p}"
echo -e "Patch wrong ${p}\t\tprocess exit [ $flag ]" >>"${DEST}"/debug/patching.log
cat $err_pt >>"${DEST}"/debug/patching.log
;;
;;
esac
done
rm $err_pt

View File

@@ -345,11 +345,8 @@ waiter_local_repo ()
# Handle an exception if the initial tag is the top of the branch
# As v5.16 == HEAD
if $(git ls-remote -t $url ${start_tag}\* | \
awk -F'/' '$NF !~ /v[4-5][.][1-9]{1,2}[.][1]$/ {
exit 1
}'
)
if [ "${start_tag}.1" == "$(git ls-remote -t $url ${start_tag}.1 | \
awk -F'/' '{ print $NF }')" ]
then
git fetch --shallow-exclude=$start_tag $name
else

View File

@@ -1,41 +0,0 @@
From e8ea0270ea567af107d04082fdafa6289825d34b Mon Sep 17 00:00:00 2001
From: Jernej Skrabec <jernej.skrabec@gmail.com>
Date: Fri, 5 Nov 2021 18:30:06 +0100
Subject: [PATCH 37/37] bus: sunxi-rsb: Fix shutdown
Function sunxi_rsb_hw_exit() is sometimes called with pm runtime
disabled, so in such cases pm_runtime_resume() will fail with -EACCES.
Instead of doing whole dance of enabling pm runtime and thus clock just
to disable it again immediately, just check if disabling clock is
needed. That way calling pm_runtime_resume() is not needed at all.
Fixes: 4a0dbc12e618 ("bus: sunxi-rsb: Implement runtime power management")
Signed-off-by: Jernej Skrabec <jernej.skrabec@gmail.com>
---
drivers/bus/sunxi-rsb.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/bus/sunxi-rsb.c b/drivers/bus/sunxi-rsb.c
index 6f225dddc74f..4566e730ef2b 100644
--- a/drivers/bus/sunxi-rsb.c
+++ b/drivers/bus/sunxi-rsb.c
@@ -687,11 +687,11 @@ static int sunxi_rsb_hw_init(struct sunxi_rsb *rsb)
static void sunxi_rsb_hw_exit(struct sunxi_rsb *rsb)
{
- /* Keep the clock and PM reference counts consistent. */
- if (pm_runtime_status_suspended(rsb->dev))
- pm_runtime_resume(rsb->dev);
reset_control_assert(rsb->rstc);
- clk_disable_unprepare(rsb->clk);
+
+ /* Keep the clock and PM reference counts consistent. */
+ if (!pm_runtime_status_suspended(rsb->dev))
+ clk_disable_unprepare(rsb->clk);
}
static int __maybe_unused sunxi_rsb_runtime_suspend(struct device *dev)
--
2.25.1

View File

@@ -1,57 +0,0 @@
From d063238f64a1f0a4e8baf11e55d9cc1989816ee6 Mon Sep 17 00:00:00 2001
From: Vasily Khoruzhick <anarsoul@gmail.com>
Date: Wed, 31 Oct 2018 20:05:14 -0700
Subject: [PATCH 141/146] dt-bindings: net: bluetooth: Add rtl8723bs-bluetooth
Add binding document for bluetooth part of RTL8723BS/RTL8723CS
Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
---
.../bindings/net/rtl8723bs-bluetooth.txt | 35 +++++++++++++++++++
1 file changed, 35 insertions(+)
create mode 100644 Documentation/devicetree/bindings/net/rtl8723bs-bluetooth.txt
diff --git a/Documentation/devicetree/bindings/net/rtl8723bs-bluetooth.txt b/Documentation/devicetree/bindings/net/rtl8723bs-bluetooth.txt
new file mode 100644
index 000000000000..8357f242ae4c
--- /dev/null
+++ b/Documentation/devicetree/bindings/net/rtl8723bs-bluetooth.txt
@@ -0,0 +1,35 @@
+RTL8723BS/RTL8723CS Bluetooth
+---------------------
+
+RTL8723CS/RTL8723CS is WiFi + BT chip. WiFi part is connected over SDIO, while
+BT is connected over serial. It speaks H5 protocol with few extra commands
+to upload firmware and change module speed.
+
+Required properties:
+
+ - compatible: should be one of the following:
+ * "realtek,rtl8723bs-bt"
+ * "realtek,rtl8723cs-bt"
+Optional properties:
+
+ - device-wake-gpios: GPIO specifier, used to wakeup the BT module (active high)
+ - enable-gpios: GPIO specifier, used to enable the BT module (active high)
+ - host-wake-gpios: GPIO specifier, used to wakeup the host processor (active high)
+ - firmware-postfix: firmware postfix to be used for firmware config
+ - reset-gpios: GPIO specifier, used to reset the BT module (active high)
+
+Example:
+
+&uart1 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&uart1_pins>, <&uart1_rts_cts_pins>;
+ status = "okay";
+
+ bluetooth {
+ compatible = "realtek,rtl8723bs-bt";
+ reset-gpios = <&r_pio 0 4 GPIO_ACTIVE_LOW>; /* PL4 */
+ device-wake-gpios = <&r_pio 0 5 GPIO_ACTIVE_HIGH>; /* PL5 */
+ host-wakeup-gpios = <&r_pio 0 6 GPIO_ACTIVE_HIGH>; /* PL6 */
+ firmware-postfix="pine64";
+ };
+};
--
2.17.1

View File

@@ -1,16 +0,0 @@
diff --git a/arch/arm/boot/dts/sun8i-a83t-bananapi-m3.dts b/arch/arm/boot/dts/sun8i-a83t-bananapi-m3.dts
index 3b579d7567c8..ea23ff821166 100644
--- a/arch/arm/boot/dts/sun8i-a83t-bananapi-m3.dts
+++ b/arch/arm/boot/dts/sun8i-a83t-bananapi-m3.dts
@@ -183,6 +183,11 @@
status = "okay";
};
+&r_cir {
+ clock-frequency = <3000000>;
+ status = "okay";
+};
+
&r_rsb {
status = "okay";

View File

@@ -1,25 +0,0 @@
diff --git a/arch/arm/boot/dts/sun7i-a20-cubietruck.dts b/arch/arm/boot/dts/sun7i-a20-cubietruck.dts
index 8da939a..42fd205 100644
--- a/arch/arm/boot/dts/sun7i-a20-cubietruck.dts
+++ b/arch/arm/boot/dts/sun7i-a20-cubietruck.dts
@@ -56,6 +56,7 @@
aliases {
serial0 = &uart0;
+ serial2 = &uart2;
};
chosen {
@@ -307,6 +308,12 @@
status = "okay";
};
+&uart2 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&uart2_cts_rts_pi_pins>, <&uart2_pi_pins>;
+ status = "okay";
+};
+
&usb_otg {
dr_mode = "otg";
status = "okay";

View File

@@ -1,50 +0,0 @@
diff --git a/arch/arm/boot/dts/sun8i-h3-nanopi-neo-air.dts b/arch/arm/boot/dts/sun8i-h3-nanopi-neo-air.dts
index bc34d7264..f3c70d36a 100644
--- a/arch/arm/boot/dts/sun8i-h3-nanopi-neo-air.dts
+++ b/arch/arm/boot/dts/sun8i-h3-nanopi-neo-air.dts
@@ -70,9 +70,26 @@ pwr {
status {
label = "nanopi:blue:status";
gpios = <&pio 0 10 GPIO_ACTIVE_HIGH>; /* PA10 */
+ linux,default-trigger = "heartbeat";
};
};
+ vdd_cpux: gpio-regulator {
+ compatible = "regulator-gpio";
+ pinctrl-names = "default";
+ regulator-name = "vdd-cpux";
+ regulator-type = "voltage";
+ regulator-boot-on;
+ regulator-always-on;
+ regulator-min-microvolt = <1100000>;
+ regulator-max-microvolt = <1300000>;
+ regulator-ramp-delay = <50>; /* 4ms */
+ gpios = <&r_pio 0 6 GPIO_ACTIVE_HIGH>; /* PL6 */
+ gpios-states = <0x1>;
+ states = <1100000 0x0
+ 1300000 0x1>;
+ };
+
wifi_pwrseq: wifi_pwrseq {
compatible = "mmc-pwrseq-simple";
pinctrl-names = "default";
@@ -80,6 +97,7 @@ wifi_pwrseq: wifi_pwrseq {
reset-gpios = <&r_pio 0 7 GPIO_ACTIVE_LOW>; /* PL7 */
post-power-on-delay-ms = <200>;
};
+
rfkill_bt {
compatible = "rfkill-gpio";
pinctrl-names = "default";
@@ -124,6 +142,10 @@ reg_cam_dvdd: cam-dvdd {
};
+&cpu0 {
+ cpu-supply = <&vdd_cpux>;
+};
+
&pio {
bt_pwr_pin: bt_pwr_pin@0 {
pins = "PG13";

View File

@@ -1,28 +0,0 @@
diff --git a/arch/arm/boot/dts/sun8i-h3-nanopi-neo.dts b/arch/arm/boot/dts/sun8i-h3-nanopi-neo.dts
index 9f33f6fae..561182a9f 100644
--- a/arch/arm/boot/dts/sun8i-h3-nanopi-neo.dts
+++ b/arch/arm/boot/dts/sun8i-h3-nanopi-neo.dts
@@ -47,6 +47,23 @@
compatible = "friendlyarm,nanopi-neo", "allwinner,sun8i-h3";
};
+&mmc2 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&mmc2_8bit_pins>;
+ vmmc-supply = <&reg_vcc3v3>;
+ bus-width = <8>;
+ non-removable;
+ cap-mmc-hw-reset;
+ status = "okay";
+};
+
+&mmc2_8bit_pins {
+ /* Increase drive strength for DDR modes */
+ drive-strength = <40>;
+ /* eMMC is missing pull-ups */
+ bias-pull-up;
+};
+
&ehci0 {
status = "okay";
};

View File

@@ -1,47 +0,0 @@
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h5-nanopi-k1-plus.dts b/arch/arm64/boot/dts/allwinner/sun50i-h5-nanopi-k1-plus.dts
index 10d567ea7..726d76b47 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-h5-nanopi-k1-plus.dts
+++ b/arch/arm64/boot/dts/allwinner/sun50i-h5-nanopi-k1-plus.dts
@@ -152,6 +152,10 @@
};
};
+&cpu0 {
+ cpu-supply = <&reg_vdd_cpux>;
+};
+
&codec {
allwinner,audio-routing =
"Line Out", "LINEOUT",
@@ -301,6 +305,31 @@
status = "okay";
};
+
+&r_i2c {
+ status = "okay";
+ reg_vdd_cpux: regulator@65 {
+ compatible = "silergy,sy8106a";
+ reg = <0x65>;
+ regulator-name = "vdd-cpux";
+ silergy,fixed-microvolt = <1200000>;
+ /*
+ * The datasheet uses 1.1V as the minimum value of VDD-CPUX,
+ * however both the Armbian DVFS table and the official one
+ * have operating points with voltage under 1.1V, and both
+ * DVFS table are known to work properly at the lowest
+ * operating point.
+ *
+ * Use 1.0V as the minimum voltage instead.
+ */
+ regulator-min-microvolt = <1000000>;
+ regulator-max-microvolt = <1400000>;
+ regulator-ramp-delay = <200>;
+ regulator-boot-on;
+ regulator-always-on;
+ };
+};
+
&spi0 {
status = "okay";
spi-flash@0 {

View File

@@ -1,13 +0,0 @@
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h6-orangepi-3.dts b/arch/arm64/boot/dts/allwinner/sun50i-h6-orangepi-3.dts
index c0150b7..06f4161 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-h6-orangepi-3.dts
+++ b/arch/arm64/boot/dts/allwinner/sun50i-h6-orangepi-3.dts
@@ -275,6 +326,8 @@
};
};
+/delete-node/ &spi0;
+
&uart0 {
pinctrl-names = "default";
pinctrl-0 = <&uart0_ph_pins>;

View File

@@ -1,53 +0,0 @@
From f68a97c87368bb3151f2f4dcfe3a519e31de21d1 Mon Sep 17 00:00:00 2001
From: Icenowy Zheng <icenowy@aosc.io>
Date: Mon, 25 Dec 2017 12:10:59 +0800
Subject: [PATCH 24/35] arm64: allwinner: h6: enable USB3 port on Pine H64
Pine H64 board have a USB3 port, which is connected to the USB3 pins of
the H6 SoC, and the 5V power supply is controlled via GPIO (shared with
the power USB ports).
Enable this port.
Signed-off-by: Icenowy Zheng <icenowy@aosc.io>
---
.../boot/dts/allwinner/sun50i-h6-pine-h64.dts | 23 ++++++++++++++++++++++
1 file changed, 23 insertions(+)
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h6-pine-h64.dts b/arch/arm64/boot/dts/allwinner/sun50i-h6-pine-h64.dts
index e2195b0..acfa90e 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-h6-pine-h64.dts
+++ b/arch/arm64/boot/dts/allwinner/sun50i-h6-pine-h64.dts
@@ -35,6 +35,20 @@
regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <1800000>;
};
+
+ reg_usb_vbus: vbus {
+ compatible = "regulator-fixed";
+ regulator-name = "usb-vbus";
+ regulator-min-microvolt = <5000000>;
+ regulator-max-microvolt = <5000000>;
+ startup-delay-us = <100000>;
+ gpio = <&r_pio 0 5 GPIO_ACTIVE_HIGH>;
+ enable-active-high;
+ };
+};
+
+&dwc3 {
+ status = "okay";
};
&mmc0 {
@@ -180,3 +194,08 @@
pinctrl-0 = <&uart0_ph_pins>;
status = "okay";
};
+
+&usb3phy {
+ phy-supply = <&reg_usb_vbus>;
+ status = "okay";
+};
--
2.7.4

View File

@@ -1,13 +0,0 @@
diff --git a/arch/arm/boot/dts/sun8i-h3-bananapi-m2-plus.dts b/arch/arm/boot/dts/sun8i-h3-bananapi-m2-plus.dts
index 195a75d..f3f324e 100644
--- a/arch/arm/boot/dts/sun8i-h3-bananapi-m2-plus.dts
+++ b/arch/arm/boot/dts/sun8i-h3-bananapi-m2-plus.dts
@@ -48,3 +48,8 @@
model = "Banana Pi BPI-M2-Plus H3";
compatible = "sinovoip,bpi-m2-plus", "allwinner,sun8i-h3";
};
+
+&wifi_pwrseq {
+ clocks = <&rtc 1>;
+ clock-names = "ext_clock";
+};

View File

@@ -1,12 +0,0 @@
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-orangepi-win.dts b/arch/arm64/boot/dts/allwinner/sun50i-a64-orangepi-win.dts
index 04446e4..5013c8e 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-a64-orangepi-win.dts
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-orangepi-win.dts
@@ -53,6 +53,7 @@
aliases {
ethernet0 = &emac;
+ ethernet1 = &brcmf;
serial0 = &uart0;
serial1 = &uart1;
serial2 = &uart2;

View File

@@ -1,12 +0,0 @@
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi
index e628d06..8ea7fda 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi
@@ -420,6 +528,7 @@
interrupts = <GIC_SPI 60 IRQ_TYPE_LEVEL_HIGH>;
max-frequency = <150000000>;
status = "disabled";
+ bus-width = <0x4>;
#address-cells = <1>;
#size-cells = <0>;
};

View File

@@ -1,12 +0,0 @@
diff --git a/arch/arm/boot/dts/sunxi-h3-h5.dtsi b/arch/arm/boot/dts/sunxi-h3-h5.dtsi
index a663c7c..71c1afa 100644
--- a/arch/arm/boot/dts/sunxi-h3-h5.dtsi
+++ b/arch/arm/boot/dts/sunxi-h3-h5.dtsi
@@ -300,6 +307,7 @@
resets = <&ccu RST_BUS_MMC0>;
reset-names = "ahb";
interrupts = <GIC_SPI 60 IRQ_TYPE_LEVEL_HIGH>;
+ bus-width = <0x4>;
status = "disabled";
#address-cells = <1>;
#size-cells = <0>;

View File

@@ -1,7 +1,8 @@
From f60f1605f5056d543e49fc625ffeeb05621f2ad3 Mon Sep 17 00:00:00 2001
From: Vasily Khoruzhick
From 52dda4dc60ae6b10bd719308e7ef03cf2c8ae6a7 Mon Sep 17 00:00:00 2001
From: Vasily Khoruzhick <anarsoul@gmail.com>
Date: Wed, 31 Oct 2018 19:40:18 -0700
Subject: Bluetooth: Add new quirk for broken local ext features max_page
Subject: [PATCH 302/476] Bluetooth: Add new quirk for broken local ext
features max_page
Some adapters (e.g. RTL8723CS) advertise that they have more than
2 pages for local ext features, but they don't support any features
@@ -10,34 +11,36 @@ support for sync train and secure connection, but it responds with
either garbage or with error in status on corresponding commands.
Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
Signed-off-by: The-going <48602507+The-going@users.noreply.github.com>
---
include/net/bluetooth/hci.h | 7 +++++++
net/bluetooth/hci_event.c | 4 +++-
2 files changed, 10 insertions(+), 1 deletion(-)
diff --git a/include/net/bluetooth/hci.h b/include/net/bluetooth/hci.h
index 16ab6ce87883..8e4c16210d18 100644
index b80415011dcd..715577a600a7 100644
--- a/include/net/bluetooth/hci.h
+++ b/include/net/bluetooth/hci.h
@@ -238,6 +238,13 @@ enum {
* HCI after resume.
@@ -247,6 +247,13 @@ enum {
*/
HCI_QUIRK_NO_SUSPEND_NOTIFIER,
+
+ /* When this quirk is set, max_page for local extended features
+ * is set to 1, even if controller reports higher number. Some
+ * controllers (e.g. RTL8723CS) report more pages, but they
+ * don't actually support features declared there.
+ */
+ HCI_QUIRK_BROKEN_LOCAL_EXT_FTR_MAX_PAGE,
+
/*
* When this quirk is set, LE tx power is not queried on startup
* When this quirk is set, LE tx power is not queried on startup
* and the min/max tx power values default to HCI_TX_POWER_INVALID.
diff --git a/net/bluetooth/hci_event.c b/net/bluetooth/hci_event.c
index cfeaee347db3..df3232828978 100644
index 0bca035bf2dc..0958898900ed 100644
--- a/net/bluetooth/hci_event.c
+++ b/net/bluetooth/hci_event.c
@@ -700,7 +700,9 @@ static void hci_cc_read_local_ext_features(struct hci_dev *hdev,
@@ -725,7 +725,9 @@ static void hci_cc_read_local_ext_features(struct hci_dev *hdev,
if (rp->status)
return;
@@ -49,5 +52,5 @@ index cfeaee347db3..df3232828978 100644
if (rp->page < HCI_MAX_PAGES)
--
cgit v1.2.3
2.34.0

View File

@@ -1,7 +1,8 @@
From 62d75bddd6fb671adc7684bfd206f8e635c4bf4b Mon Sep 17 00:00:00 2001
From 956ce2584e2ddcf8286cc46b162981461b65741c Mon Sep 17 00:00:00 2001
From: Marcus Cooper <codekipper@gmail.com>
Date: Wed, 1 Jan 2020 20:03:03 +0100
Subject: [PATCH] Allwinner: Add frame inversion to correct audio channels
Subject: [PATCH 072/101] Allwinner: Add frame inversion to correct audio
channels
For some reason the mainline i2s driver inverts the frame clock
which in turn maps the audio channels incorrectly when not using
@@ -23,7 +24,7 @@ Signed-off-by: Marcus Cooper <codekipper@gmail.com>
diff --git a/projects/Allwinner/devices/A64/patches/linux/04-Add-frame-inversion-to-correct-multi-channel-audio.patch b/projects/Allwinner/devices/A64/patches/linux/04-Add-frame-inversion-to-correct-multi-channel-audio.patch
new file mode 100644
index 00000000000..16bbbb5c808
index 000000000..16bbbb5c8
--- /dev/null
+++ b/projects/Allwinner/devices/A64/patches/linux/04-Add-frame-inversion-to-correct-multi-channel-audio.patch
@@ -0,0 +1,24 @@
@@ -53,7 +54,7 @@ index 00000000000..16bbbb5c808
+
diff --git a/projects/Allwinner/devices/H3/patches/linux/17-Add-frame-inversion-to-correct-multi-channel-audio.patch b/projects/Allwinner/devices/H3/patches/linux/17-Add-frame-inversion-to-correct-multi-channel-audio.patch
new file mode 100644
index 00000000000..21e13cbfd72
index 000000000..21e13cbfd
--- /dev/null
+++ b/projects/Allwinner/devices/H3/patches/linux/17-Add-frame-inversion-to-correct-multi-channel-audio.patch
@@ -0,0 +1,24 @@
@@ -83,7 +84,7 @@ index 00000000000..21e13cbfd72
+
diff --git a/projects/Allwinner/devices/H6/patches/linux/16-Add-frame-inversion-to-correct-multi-channel-audio.patch b/projects/Allwinner/devices/H6/patches/linux/16-Add-frame-inversion-to-correct-multi-channel-audio.patch
new file mode 100644
index 00000000000..18f7f636562
index 000000000..18f7f6365
--- /dev/null
+++ b/projects/Allwinner/devices/H6/patches/linux/16-Add-frame-inversion-to-correct-multi-channel-audio.patch
@@ -0,0 +1,24 @@
@@ -111,3 +112,6 @@ index 00000000000..18f7f636562
+--
+2.24.1
+
--
2.31.1

View File

@@ -1,7 +1,7 @@
From 6ae894c32f900740be92a2f51c2a8ea040e30d6b Mon Sep 17 00:00:00 2001
From 1d0462899c9b8407b81be2ea6a586634d0bd3c45 Mon Sep 17 00:00:00 2001
From: Andre Przywara <andre.przywara@arm.com>
Date: Mon, 7 Dec 2020 21:35:46 +0000
Subject: [PATCH 13/37] dt-bindings: arm: sunxi: Add OrangePi Zero 2 binding
Subject: [PATCH 029/101] Doc:dt-bindings:arm:sunxi: Add OrangePi Zero2 binding
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Acked-by: Rob Herring <robh@kernel.org>
@@ -10,7 +10,7 @@ Acked-by: Rob Herring <robh@kernel.org>
1 file changed, 5 insertions(+)
diff --git a/Documentation/devicetree/bindings/arm/sunxi.yaml b/Documentation/devicetree/bindings/arm/sunxi.yaml
index 889128acf49a..a13cecb5f456 100644
index 889128acf..a13cecb5f 100644
--- a/Documentation/devicetree/bindings/arm/sunxi.yaml
+++ b/Documentation/devicetree/bindings/arm/sunxi.yaml
@@ -948,4 +948,9 @@ properties:
@@ -24,5 +24,5 @@ index 889128acf49a..a13cecb5f456 100644
+
additionalProperties: true
--
2.25.1
2.31.1

View File

@@ -1,7 +1,7 @@
From 80694d54812c5fc49dd738e17a9cf5a91f343cae Mon Sep 17 00:00:00 2001
From 9c6eff265145ef77166242abd1181c3c15e302d4 Mon Sep 17 00:00:00 2001
From: Oskari Lemmela <oskari@lemmela.net>
Date: Tue, 23 Oct 2018 21:53:22 +0300
Subject: [PATCH 104/146] dt-bindings: gpio: gpio-axp209: add AXP803 GPIO
Subject: [PATCH 064/101] Doc:dt-bindings: gpio: gpio-axp209: add AXP803 GPIO
bindings
The AXP803 GPIO is compatible with AXP813 GPIO, but add
@@ -14,7 +14,7 @@ Reviewed-by: Rob Herring <robh@kernel.org>
1 file changed, 2 insertions(+)
diff --git a/Documentation/devicetree/bindings/gpio/gpio-axp209.txt b/Documentation/devicetree/bindings/gpio/gpio-axp209.txt
index fc42b2caa06d..5337a21d7bcf 100644
index fc42b2caa..5337a21d7 100644
--- a/Documentation/devicetree/bindings/gpio/gpio-axp209.txt
+++ b/Documentation/devicetree/bindings/gpio/gpio-axp209.txt
@@ -11,6 +11,7 @@ This driver employs the per-pin muxing pattern.
@@ -34,5 +34,5 @@ index fc42b2caa06d..5337a21d7bcf 100644
------
GPIO | Functions
--
2.17.1
2.31.1

View File

@@ -1,7 +1,7 @@
From d46a280114b797bc3e0c2c28e7b7f79c22f00c5c Mon Sep 17 00:00:00 2001
From 7c04839ef865c48da931bddfa74fff188248d4fc Mon Sep 17 00:00:00 2001
From: Andre Przywara <andre.przywara@arm.com>
Date: Wed, 27 Jan 2021 13:27:39 +0000
Subject: [PATCH 06/37] dt-bindings: net: sun8i-emac: Add H616 compatible
Subject: [PATCH 018/101] Doc:dt-bindings:net: sun8i-emac: Add H616 compatible
string
Add the obvious compatible name to the existing EMAC binding, and pair
@@ -16,7 +16,7 @@ Signed-off-by: Andre Przywara <andre.przywara@arm.com>
1 file changed, 1 insertion(+)
diff --git a/Documentation/devicetree/bindings/net/allwinner,sun8i-a83t-emac.yaml b/Documentation/devicetree/bindings/net/allwinner,sun8i-a83t-emac.yaml
index 9eb4bb529ad5..7a47c51421fd 100644
index 9eb4bb529..7a47c5142 100644
--- a/Documentation/devicetree/bindings/net/allwinner,sun8i-a83t-emac.yaml
+++ b/Documentation/devicetree/bindings/net/allwinner,sun8i-a83t-emac.yaml
@@ -22,6 +22,7 @@ properties:
@@ -28,5 +28,5 @@ index 9eb4bb529ad5..7a47c51421fd 100644
reg:
--
2.25.1
2.31.1

View File

@@ -1,7 +1,7 @@
From 1feb657de6fe48ee055d8ef055f8186359394eb6 Mon Sep 17 00:00:00 2001
From 95b51d2a26e104dc6ff38b105048c9f2184c7693 Mon Sep 17 00:00:00 2001
From: Andre Przywara <andre.przywara@arm.com>
Date: Thu, 10 Dec 2020 22:42:55 +0000
Subject: [PATCH 01/37] dt-bindings: rtc: sun6i: Add H616 compatible string
Subject: [PATCH 005/101] Doc:dt-bindings:rtc:sun6i: Add H616 compatible string
Add the obvious compatible name to the existing RTC binding.
The actual RTC part of the device uses a different day/month/year
@@ -13,7 +13,7 @@ Signed-off-by: Andre Przywara <andre.przywara@arm.com>
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/Documentation/devicetree/bindings/rtc/allwinner,sun6i-a31-rtc.yaml b/Documentation/devicetree/bindings/rtc/allwinner,sun6i-a31-rtc.yaml
index beeb90e55727..004f43765493 100644
index beeb90e55..004f43765 100644
--- a/Documentation/devicetree/bindings/rtc/allwinner,sun6i-a31-rtc.yaml
+++ b/Documentation/devicetree/bindings/rtc/allwinner,sun6i-a31-rtc.yaml
@@ -26,6 +26,7 @@ properties:
@@ -36,5 +36,5 @@ index beeb90e55727..004f43765493 100644
then:
properties:
--
2.25.1
2.31.1

View File

@@ -1,7 +1,7 @@
From 768bea287708624e841ff9ae92fa08e66f59c3b2 Mon Sep 17 00:00:00 2001
From d271d5f20015452fbe7fc8f983dde014b6904741 Mon Sep 17 00:00:00 2001
From: Icenowy Zheng <icenowy@aosc.io>
Date: Mon, 25 Dec 2017 12:08:01 +0800
Subject: [PATCH 21/35] dt-bindings: usb: add binding for the DWC3 controller
Subject: [PATCH 097/101] Doc:dt-bindings:usb: add binding for DWC3 controller
on Allwinner SoC
The Allwinner H6 SoC uses DWC3 controller for USB3.
@@ -10,13 +10,13 @@ Add its device tree binding document.
Signed-off-by: Icenowy Zheng <icenowy@aosc.io>
---
.../devicetree/bindings/usb/allwinner,dwc3.txt | 39 ++++++++++++++++++++++
.../bindings/usb/allwinner,dwc3.txt | 39 +++++++++++++++++++
1 file changed, 39 insertions(+)
create mode 100644 Documentation/devicetree/bindings/usb/allwinner,dwc3.txt
diff --git a/Documentation/devicetree/bindings/usb/allwinner,dwc3.txt b/Documentation/devicetree/bindings/usb/allwinner,dwc3.txt
new file mode 100644
index 0000000..3f77146
index 000000000..3f7714636
--- /dev/null
+++ b/Documentation/devicetree/bindings/usb/allwinner,dwc3.txt
@@ -0,0 +1,39 @@
@@ -60,5 +60,5 @@ index 0000000..3f77146
+ };
+ };
--
2.7.4
2.31.1

View File

@@ -1,7 +1,7 @@
From 80154550543601c5c32f77fa575839222c071fc6 Mon Sep 17 00:00:00 2001
From b0a5f4e53bb4de44c30c7b038f2660800be6c07a Mon Sep 17 00:00:00 2001
From: Benjamin Gaignard <benjamin.gaignard@collabora.com>
Date: Thu, 15 Jul 2021 17:12:22 +0200
Subject: [PATCH 22/37] media: hevc: Add scaling matrix control
Subject: [PATCH 043/101] Doc:u-api:media:v4l: Add scaling matrix control
HEVC scaling lists are used for the scaling process for transform
coefficients.
@@ -22,7 +22,7 @@ Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
5 files changed, 84 insertions(+)
diff --git a/Documentation/userspace-api/media/v4l/ext-ctrls-codec.rst b/Documentation/userspace-api/media/v4l/ext-ctrls-codec.rst
index 976d34445a24..e141f0e4eec9 100644
index 976d34445..e141f0e4e 100644
--- a/Documentation/userspace-api/media/v4l/ext-ctrls-codec.rst
+++ b/Documentation/userspace-api/media/v4l/ext-ctrls-codec.rst
@@ -3088,6 +3088,63 @@ enum v4l2_mpeg_video_hevc_size_of_length_field -
@@ -90,7 +90,7 @@ index 976d34445a24..e141f0e4eec9 100644
.. raw:: latex
diff --git a/Documentation/userspace-api/media/v4l/vidioc-queryctrl.rst b/Documentation/userspace-api/media/v4l/vidioc-queryctrl.rst
index f9ecf6276129..2f491c17dd5d 100644
index f9ecf6276..2f491c17d 100644
--- a/Documentation/userspace-api/media/v4l/vidioc-queryctrl.rst
+++ b/Documentation/userspace-api/media/v4l/vidioc-queryctrl.rst
@@ -495,6 +495,12 @@ See also the examples in :ref:`control`.
@@ -107,7 +107,7 @@ index f9ecf6276129..2f491c17dd5d 100644
- n/a
- n/a
diff --git a/drivers/media/v4l2-core/v4l2-ctrls-core.c b/drivers/media/v4l2-core/v4l2-ctrls-core.c
index c4b5082849b6..70adfc1b9c81 100644
index c4b508284..70adfc1b9 100644
--- a/drivers/media/v4l2-core/v4l2-ctrls-core.c
+++ b/drivers/media/v4l2-core/v4l2-ctrls-core.c
@@ -687,6 +687,9 @@ static int std_validate_compound(const struct v4l2_ctrl *ctrl, u32 idx,
@@ -131,7 +131,7 @@ index c4b5082849b6..70adfc1b9c81 100644
elem_size = sizeof(struct v4l2_ctrl_hevc_decode_params);
break;
diff --git a/drivers/media/v4l2-core/v4l2-ctrls-defs.c b/drivers/media/v4l2-core/v4l2-ctrls-defs.c
index 421300e13a41..eae300c58274 100644
index 421300e13..eae300c58 100644
--- a/drivers/media/v4l2-core/v4l2-ctrls-defs.c
+++ b/drivers/media/v4l2-core/v4l2-ctrls-defs.c
@@ -997,6 +997,7 @@ const char *v4l2_ctrl_get_name(u32 id)
@@ -153,7 +153,7 @@ index 421300e13a41..eae300c58274 100644
*type = V4L2_CTRL_TYPE_HEVC_DECODE_PARAMS;
break;
diff --git a/include/media/hevc-ctrls.h b/include/media/hevc-ctrls.h
index 781371bff2ad..ef63bc205756 100644
index 781371bff..ef63bc205 100644
--- a/include/media/hevc-ctrls.h
+++ b/include/media/hevc-ctrls.h
@@ -19,6 +19,7 @@
@@ -189,5 +189,5 @@ index 781371bff2ad..ef63bc205756 100644
#define V4L2_CID_CODEC_HANTRO_BASE (V4L2_CTRL_CLASS_CODEC | 0x1200)
/*
--
2.25.1
2.31.1

View File

@@ -1,14 +1,14 @@
From e966547c4c3ba40c9e6d418cd4b74170de39db16 Mon Sep 17 00:00:00 2001
From 59b72897a905b8254ac5ff697465bc02e2d0e87e Mon Sep 17 00:00:00 2001
From: Jonas Karlman <jonas@kwiboo.se>
Date: Sat, 23 May 2020 15:07:15 +0000
Subject: [PATCH 31/37] HACK: media: uapi: hevc: tiles and num_slices
Subject: [PATCH 055/101] HACK: media: uapi: hevc: tiles and num_slices
---
include/media/hevc-ctrls.h | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/include/media/hevc-ctrls.h b/include/media/hevc-ctrls.h
index a808894e8c76..f1b8756521b9 100644
index a808894e8..f1b875652 100644
--- a/include/media/hevc-ctrls.h
+++ b/include/media/hevc-ctrls.h
@@ -83,7 +83,8 @@ struct v4l2_ctrl_hevc_sps {
@@ -33,5 +33,5 @@ index a808894e8c76..f1b8756521b9 100644
/* ISO/IEC 23008-2, ITU-T Rec. H.265: Weighted prediction parameter */
struct v4l2_hevc_pred_weight_table pred_weight_table;
--
2.25.1
2.31.1

View File

@@ -1,8 +1,8 @@
From 3ec70749ae3cb072f19d886981a217121f776415 Mon Sep 17 00:00:00 2001
From e3e9a55245fcadd5658cf783a3c273b4b4835b9e Mon Sep 17 00:00:00 2001
From: Igor Pecovnik <igor.pecovnik@gmail.com>
Date: Sat, 6 Nov 2021 19:15:23 +0100
Subject: [PATCH] Revert "net: Remove net/ipx.h and uapi/linux/ipx.h header
files"
Subject: [PATCH 003/101] Revert "net: Remove net/ipx.h and uapi/linux/ipx.h
header files"
This reverts commit 6c9b40844751ea30c72f7a2f92f4d704bc6b2927.
---
@@ -14,7 +14,7 @@ This reverts commit 6c9b40844751ea30c72f7a2f92f4d704bc6b2927.
diff --git a/include/net/ipx.h b/include/net/ipx.h
new file mode 100644
index 000000000000..9d1342807b59
index 000000000..9d1342807
--- /dev/null
+++ b/include/net/ipx.h
@@ -0,0 +1,171 @@
@@ -191,7 +191,7 @@ index 000000000000..9d1342807b59
+#endif /* _NET_INET_IPX_H_ */
diff --git a/include/uapi/linux/ipx.h b/include/uapi/linux/ipx.h
new file mode 100644
index 000000000000..3168137adae8
index 000000000..3168137ad
--- /dev/null
+++ b/include/uapi/linux/ipx.h
@@ -0,0 +1,87 @@
@@ -283,5 +283,5 @@ index 000000000000..3168137adae8
+#define SIOCIPXNCPCONN (SIOCPROTOPRIVATE + 3)
+#endif /* _IPX_H_ */
--
2.25.1
2.31.1

View File

@@ -1,7 +1,7 @@
From 9499575dfeebdee3aeac65be72ea704e835e7f95 Mon Sep 17 00:00:00 2001
From b47ff0ab5ea204f3db72e8ab1c1b4a69679e6441 Mon Sep 17 00:00:00 2001
From: Jonas Karlman <jonas@kwiboo.se>
Date: Sat, 23 May 2020 15:03:46 +0000
Subject: [PATCH 30/37] WIP: media: uapi: hevc: add fields needed for rkvdec
Subject: [PATCH 054/101] WIP: media: uapi: hevc: add fields needed for rkvdec
NOTE: these fields are used by rkvdec hevc backend
@@ -11,7 +11,7 @@ Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
1 file changed, 10 insertions(+), 2 deletions(-)
diff --git a/include/media/hevc-ctrls.h b/include/media/hevc-ctrls.h
index ef63bc205756..a808894e8c76 100644
index ef63bc205..a808894e8 100644
--- a/include/media/hevc-ctrls.h
+++ b/include/media/hevc-ctrls.h
@@ -58,6 +58,8 @@ enum v4l2_mpeg_video_hevc_start_code {
@@ -62,5 +62,5 @@ index ef63bc205756..a808894e8c76 100644
/* ISO/IEC 23008-2, ITU-T Rec. H.265: Weighted prediction parameter */
struct v4l2_hevc_pred_weight_table pred_weight_table;
--
2.25.1
2.31.1

View File

@@ -1,3 +1,15 @@
From 3a934000cccaf616cca02dbede612aae51207d33 Mon Sep 17 00:00:00 2001
From: The-going <48602507+The-going@users.noreply.github.com>
Date: Sun, 23 Jan 2022 16:43:53 +0300
Subject: [PATCH 008/101] arm:arm64:dts: Add leds axp20x charger
---
arch/arm/boot/dts/axp209.dtsi | 5 +++++
arch/arm/boot/dts/axp22x.dtsi | 5 +++++
arch/arm/boot/dts/axp81x.dtsi | 5 +++++
arch/arm64/boot/dts/allwinner/axp803.dtsi | 5 +++++
4 files changed, 20 insertions(+)
diff --git a/arch/arm/boot/dts/axp209.dtsi b/arch/arm/boot/dts/axp209.dtsi
index 0d9ff12bd..f972b6f3e 100644
--- a/arch/arm/boot/dts/axp209.dtsi
@@ -47,10 +59,10 @@ index 00b092f94..7d2bfa42d 100644
compatible = "x-powers,axp813-battery-power-supply";
status = "disabled";
diff --git a/arch/arm64/boot/dts/allwinner/axp803.dtsi b/arch/arm64/boot/dts/allwinner/axp803.dtsi
index 43276d88b..ac484b5da 100644
index 10e9186a7..5a1034748 100644
--- a/arch/arm64/boot/dts/allwinner/axp803.dtsi
+++ b/arch/arm64/boot/dts/allwinner/axp803.dtsi
@@ -38,6 +38,11 @@ gpio1_ldo: gpio1-ldo {
@@ -37,6 +37,11 @@ gpio1_ldo: gpio1-ldo {
};
};
@@ -62,3 +74,6 @@ index 43276d88b..ac484b5da 100644
battery_power_supply: battery-power-supply {
compatible = "x-powers,axp803-battery-power-supply",
"x-powers,axp813-battery-power-supply";
--
2.31.1

View File

@@ -1,18 +1,29 @@
From 67ce246e3bb03dec3851a5bfdffe93a32fa82b76 Mon Sep 17 00:00:00 2001
From: The-going <48602507+The-going@users.noreply.github.com>
Date: Mon, 24 Jan 2022 15:00:36 +0300
Subject: [PATCH 079/101] arm:dts: Add sun8i-h2-plus-nanopi-duo device
---
arch/arm/boot/dts/Makefile | 1 +
.../arm/boot/dts/sun8i-h2-plus-nanopi-duo.dts | 164 ++++++++++++++++++
2 files changed, 165 insertions(+)
create mode 100644 arch/arm/boot/dts/sun8i-h2-plus-nanopi-duo.dts
diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
index 99cf49a..977b6ff 100644
index 234762eb5..3f5f5498f 100644
--- a/arch/arm/boot/dts/Makefile
+++ b/arch/arm/boot/dts/Makefile
@@ -1030,6 +1030,7 @@ dtb-$(CONFIG_MACH_SUN8I) += \
@@ -1240,6 +1240,7 @@ dtb-$(CONFIG_MACH_SUN8I) += \
sun8i-a83t-tbs-a711.dtb \
sun8i-h2-plus-bananapi-m2-zero.dtb \
sun8i-h2-plus-libretech-all-h3-cc.dtb \
+ sun8i-h2-plus-nanopi-duo.dtb \
sun8i-h2-plus-orangepi-r1.dtb \
sun8i-h2-plus-orangepi-zero.dtb \
sun8i-h2-plus-sunvell-r69.dtb \
sun8i-h3-bananapi-m2-plus.dtb \
diff --git a/arch/arm/boot/dts/sun8i-h2-plus-nanopi-duo.dts b/arch/arm/boot/dts/sun8i-h2-plus-nanopi-duo.dts
new file mode 100644
index 0000000..2b31b8f
index 000000000..2b31b8fdd
--- /dev/null
+++ b/arch/arm/boot/dts/sun8i-h2-plus-nanopi-duo.dts
@@ -0,0 +1,164 @@
@@ -180,3 +191,6 @@ index 0000000..2b31b8f
+ status = "okay";
+ usb0_id_det-gpios = <&pio 6 12 GPIO_ACTIVE_HIGH>; /* PG12 */
+};
--
2.31.1

View File

@@ -1,8 +1,19 @@
From 472e545e962621bfcb806ce475ed6f6e403b2584 Mon Sep 17 00:00:00 2001
From: The-going <48602507+The-going@users.noreply.github.com>
Date: Mon, 24 Jan 2022 15:23:33 +0300
Subject: [PATCH 080/101] arm:dts: Add sun8i-h2-plus-sunvell-r69 device
---
arch/arm/boot/dts/Makefile | 1 +
.../boot/dts/sun8i-h2-plus-sunvell-r69.dts | 225 ++++++++++++++++++
2 files changed, 226 insertions(+)
create mode 100644 arch/arm/boot/dts/sun8i-h2-plus-sunvell-r69.dts
diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
index f47ce87..9f4bc9e 100644
index 3f5f5498f..a4367ae2a 100644
--- a/arch/arm/boot/dts/Makefile
+++ b/arch/arm/boot/dts/Makefile
@@ -1092,6 +1092,7 @@ dtb-$(CONFIG_MACH_SUN8I) += \
@@ -1243,6 +1243,7 @@ dtb-$(CONFIG_MACH_SUN8I) += \
sun8i-h2-plus-nanopi-duo.dtb \
sun8i-h2-plus-orangepi-r1.dtb \
sun8i-h2-plus-orangepi-zero.dtb \
@@ -12,7 +23,7 @@ index f47ce87..9f4bc9e 100644
sun8i-h3-beelink-x2.dtb \
diff --git a/arch/arm/boot/dts/sun8i-h2-plus-sunvell-r69.dts b/arch/arm/boot/dts/sun8i-h2-plus-sunvell-r69.dts
new file mode 100644
index 0000000..bb0c2f7
index 000000000..bb0c2f72b
--- /dev/null
+++ b/arch/arm/boot/dts/sun8i-h2-plus-sunvell-r69.dts
@@ -0,0 +1,225 @@
@@ -241,3 +252,6 @@ index 0000000..bb0c2f7
+&usbphy {
+ status = "okay";
+};
--
2.31.1

View File

@@ -1,9 +1,20 @@
From 87a2cfa2afc9952c7c9ffb7ed8af57a364ee2da2 Mon Sep 17 00:00:00 2001
From: The-going <48602507+The-going@users.noreply.github.com>
Date: Mon, 24 Jan 2022 14:46:11 +0300
Subject: [PATCH 078/101] arm:dts: a10-cubiebord a20-cubietruck green LED mmc0
default-trigger
---
arch/arm/boot/dts/sun4i-a10-cubieboard.dts | 2 +-
arch/arm/boot/dts/sun7i-a20-cubietruck.dts | 1 +
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/arch/arm/boot/dts/sun4i-a10-cubieboard.dts b/arch/arm/boot/dts/sun4i-a10-cubieboard.dts
index 710e2ef..ffe7625 100644
index 0645d6064..f97b53c44 100644
--- a/arch/arm/boot/dts/sun4i-a10-cubieboard.dts
+++ b/arch/arm/boot/dts/sun4i-a10-cubieboard.dts
@@ -73,7 +73,7 @@
green {
@@ -83,7 +83,7 @@ led-0 {
led-1 {
label = "cubieboard:green:usr";
gpios = <&pio 7 20 GPIO_ACTIVE_HIGH>; /* LED2 */
- linux,default-trigger = "heartbeat";
@@ -12,14 +23,17 @@ index 710e2ef..ffe7625 100644
};
};
diff --git a/arch/arm/boot/dts/sun7i-a20-cubietruck.dts b/arch/arm/boot/dts/sun7i-a20-cubietruck.dts
index 8da939a..934655f 100644
index 525cb7fcc..df428f29b 100644
--- a/arch/arm/boot/dts/sun7i-a20-cubietruck.dts
+++ b/arch/arm/boot/dts/sun7i-a20-cubietruck.dts
@@ -85,6 +85,7 @@
green {
@@ -93,6 +93,7 @@ led-2 {
led-3 {
label = "cubietruck:green:usr";
gpios = <&pio 7 7 GPIO_ACTIVE_HIGH>;
+ linux,default-trigger = "mmc0";
};
};
--
2.31.1

View File

@@ -1,5 +1,15 @@
From 2956436a55d001b49e904197e0ac228287eb0ec0 Mon Sep 17 00:00:00 2001
From: The-going <48602507+The-going@users.noreply.github.com>
Date: Mon, 24 Jan 2022 13:18:28 +0300
Subject: [PATCH 073/101] arm:dts: a20-orangepi and mini fix phy-mode, hdmi
---
arch/arm/boot/dts/sun7i-a20-orangepi-mini.dts | 2 +-
arch/arm/boot/dts/sun7i-a20-orangepi.dts | 31 ++++++++++++++++++-
2 files changed, 31 insertions(+), 2 deletions(-)
diff --git a/arch/arm/boot/dts/sun7i-a20-orangepi-mini.dts b/arch/arm/boot/dts/sun7i-a20-orangepi-mini.dts
index 2e328d2ce..3cd0803a1 100644
index 84efa01e7..fc87309ae 100644
--- a/arch/arm/boot/dts/sun7i-a20-orangepi-mini.dts
+++ b/arch/arm/boot/dts/sun7i-a20-orangepi-mini.dts
@@ -121,7 +121,7 @@ &gmac {
@@ -12,7 +22,7 @@ index 2e328d2ce..3cd0803a1 100644
status = "okay";
};
diff --git a/arch/arm/boot/dts/sun7i-a20-orangepi.dts b/arch/arm/boot/dts/sun7i-a20-orangepi.dts
index d75b2e2ba..31e3beba1 100644
index 5d77f1d98..0c760b0a5 100644
--- a/arch/arm/boot/dts/sun7i-a20-orangepi.dts
+++ b/arch/arm/boot/dts/sun7i-a20-orangepi.dts
@@ -61,6 +61,17 @@ chosen {
@@ -71,3 +81,6 @@ index d75b2e2ba..31e3beba1 100644
&i2c0 {
status = "okay";
--
2.31.1

View File

@@ -1,8 +1,17 @@
From b71f9ac99f587f068b876494438bd60166bc02c4 Mon Sep 17 00:00:00 2001
From: The-going <48602507+The-going@users.noreply.github.com>
Date: Mon, 24 Jan 2022 15:34:01 +0300
Subject: [PATCH 081/101] arm:dts: h3-nanopi-neo Add regulator, leds, mmc2
---
arch/arm/boot/dts/sun8i-h3-nanopi-neo.dts | 53 +++++++++++++++++++++++
1 file changed, 53 insertions(+)
diff --git a/arch/arm/boot/dts/sun8i-h3-nanopi-neo.dts b/arch/arm/boot/dts/sun8i-h3-nanopi-neo.dts
index 561182a9f..ada548028 100644
index 9f33f6fae..ada548028 100644
--- a/arch/arm/boot/dts/sun8i-h3-nanopi-neo.dts
+++ b/arch/arm/boot/dts/sun8i-h3-nanopi-neo.dts
@@ -45,6 +45,42 @@
@@ -45,6 +45,59 @@
/ {
model = "FriendlyARM NanoPi NEO";
compatible = "friendlyarm,nanopi-neo", "allwinner,sun8i-h3";
@@ -42,6 +51,26 @@ index 561182a9f..ada548028 100644
+
+&cpu0 {
+ cpu-supply = <&vdd_cpux>;
+};
+
+&mmc2 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&mmc2_8bit_pins>;
+ vmmc-supply = <&reg_vcc3v3>;
+ bus-width = <8>;
+ non-removable;
+ cap-mmc-hw-reset;
+ status = "okay";
+};
+
+&mmc2_8bit_pins {
+ /* Increase drive strength for DDR modes */
+ drive-strength = <40>;
+ /* eMMC is missing pull-ups */
+ bias-pull-up;
};
&mmc2 {
&ehci0 {
--
2.31.1

View File

@@ -1,16 +1,49 @@
From 18e1970e8dd69c65161bc3ac6d1f404b93633cf9 Mon Sep 17 00:00:00 2001
From: The-going <48602507+The-going@users.noreply.github.com>
Date: Mon, 24 Jan 2022 15:45:43 +0300
Subject: [PATCH 082/101] arm:dts: h3-nanopi-neo-air Add regulator camera wifi
bluetooth otg
---
arch/arm/boot/dts/sun8i-h3-nanopi-neo-air.dts | 169 ++++++++++++++++++
1 file changed, 169 insertions(+)
diff --git a/arch/arm/boot/dts/sun8i-h3-nanopi-neo-air.dts b/arch/arm/boot/dts/sun8i-h3-nanopi-neo-air.dts
index 6246d3ef..a2b6e0b2 100644
index be49eabbf..45936f046 100644
--- a/arch/arm/boot/dts/sun8i-h3-nanopi-neo-air.dts
+++ b/arch/arm/boot/dts/sun8i-h3-nanopi-neo-air.dts
@@ -75,10 +75,69 @@
@@ -70,15 +70,96 @@ led-0 {
led-1 {
label = "nanopi:blue:status";
gpios = <&pio 0 10 GPIO_ACTIVE_HIGH>; /* PA10 */
+ linux,default-trigger = "heartbeat";
};
};
+ vdd_cpux: gpio-regulator {
+ compatible = "regulator-gpio";
+ pinctrl-names = "default";
+ regulator-name = "vdd-cpux";
+ regulator-type = "voltage";
+ regulator-boot-on;
+ regulator-always-on;
+ regulator-min-microvolt = <1100000>;
+ regulator-max-microvolt = <1300000>;
+ regulator-ramp-delay = <50>; /* 4ms */
+ gpios = <&r_pio 0 6 GPIO_ACTIVE_HIGH>; /* PL6 */
+ gpios-states = <0x1>;
+ states = <1100000 0x0
+ 1300000 0x1>;
+ };
+
wifi_pwrseq: wifi_pwrseq {
compatible = "mmc-pwrseq-simple";
+ pinctrl-names = "default";
+ pinctrl-0 = <&wifi_en_npi>;
reset-gpios = <&r_pio 0 7 GPIO_ACTIVE_LOW>; /* PL7 */
+ post-power-on-delay-ms = <200>;
};
+ };
+
+ rfkill_bt {
+ compatible = "rfkill-gpio";
+ pinctrl-names = "default";
@@ -53,15 +86,19 @@ index 6246d3ef..a2b6e0b2 100644
+ vin-supply = <&reg_vcc3v3>;
+ };
+
};
+};
+
+&cpu0 {
+ cpu-supply = <&vdd_cpux>;
+};
+
+&pio {
+ bt_pwr_pin: bt_pwr_pin@0 {
+ pins = "PG13";
+ function = "gpio_out";
+ };
+};
+
};
};
+&r_pio {
+ wifi_en_npi: wifi_en_pin {
+ pins = "PL7";
@@ -72,7 +109,7 @@ index 6246d3ef..a2b6e0b2 100644
&mmc0 {
vmmc-supply = <&reg_vcc3v3>;
bus-width = <4>;
@@ -103,12 +162,100 @@
@@ -103,12 +184,100 @@ brcmf: bcrmf@1 {
};
};
@@ -173,3 +210,6 @@ index 6246d3ef..a2b6e0b2 100644
&usbphy {
/* USB VBUS is always on */
status = "okay";
--
2.31.1

View File

@@ -1,12 +1,17 @@
From fe15516466ced5e9aa71d71b44134833cab19ac4 Mon Sep 17 00:00:00 2001
From: The-going <48602507+The-going@users.noreply.github.com>
Date: Mon, 24 Jan 2022 18:23:18 +0300
Subject: [PATCH 083/101] arm:dts: h3-orangepi-2 Add regulator vdd cpu
---
arch/arm/boot/dts/sun8i-h3-orangepi-2.dts | 29 +++++++++++++++++++++++
1 file changed, 29 insertions(+)
diff --git a/arch/arm/boot/dts/sun8i-h3-orangepi-2.dts b/arch/arm/boot/dts/sun8i-h3-orangepi-2.dts
index f1fc6bdca..47a5635b0 100644
index 0347b763a..fcecfa037 100644
--- a/arch/arm/boot/dts/sun8i-h3-orangepi-2.dts
+++ b/arch/arm/boot/dts/sun8i-h3-orangepi-2.dts
diff --git a/arch/arm/boot/dts/sun8i-h3-orangepi-2.dts b/arch/arm/boot/dts/sun8i-h3-orangepi-2.dts
index 597c425..26c9cc6 100644
--- a/arch/arm/boot/dts/sun8i-h3-orangepi-2.dts
+++ b/arch/arm/boot/dts/sun8i-h3-orangepi-2.dts
@@ -123,6 +123,10 @@
@@ -123,6 +123,10 @@ &de {
status = "okay";
};
@@ -17,7 +22,7 @@ index 597c425..26c9cc6 100644
&ehci1 {
status = "okay";
};
@@ -173,6 +177,31 @@
@@ -177,6 +181,31 @@ rtl8189: sdio_wifi@1 {
};
};
@@ -44,8 +49,11 @@ index 597c425..26c9cc6 100644
+ regulator-boot-on;
+ regulator-always-on;
+ };
+};
+};
+
&reg_usb1_vbus {
gpio = <&pio 6 13 GPIO_ACTIVE_HIGH>;
status = "okay";
--
2.31.1

View File

@@ -1,3 +1,9 @@
From a0cef4901bc0a988ba415189eddc0da8c0b467db Mon Sep 17 00:00:00 2001
From: The-going <48602507+The-going@users.noreply.github.com>
Date: Sun, 23 Jan 2022 22:32:07 +0300
Subject: [PATCH 070/101] arm:dts:sun7i-a20 Disable OOB IRQ for brcm-wifi on
Cubietruck and Banana-Pro
While doing some brcmfmac driver work I needed to test this also on some
devicetree based boards. So I fired up the good old Cubietruck and when
that would not work a Banana Pro.
@@ -35,10 +41,10 @@ Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2 files changed, 26 insertions(+), 6 deletions(-)
diff --git a/arch/arm/boot/dts/sun7i-a20-bananapro.dts b/arch/arm/boot/dts/sun7i-a20-bananapro.dts
index 0898eb6162f5..0e1ddd998b20 100644
index e22f0e8bb..e68748076 100644
--- a/arch/arm/boot/dts/sun7i-a20-bananapro.dts
+++ b/arch/arm/boot/dts/sun7i-a20-bananapro.dts
@@ -174,9 +174,19 @@
@@ -162,9 +162,19 @@ &mmc3 {
brcmf: wifi@1 {
reg = <1>;
compatible = "brcm,bcm4329-fmac";
@@ -60,12 +66,12 @@ index 0898eb6162f5..0e1ddd998b20 100644
+ */
};
};
diff --git a/arch/arm/boot/dts/sun7i-a20-cubietruck.dts b/arch/arm/boot/dts/sun7i-a20-cubietruck.dts
index 5649161de1d7..a837516db6f9 100644
index 52160e368..525cb7fcc 100644
--- a/arch/arm/boot/dts/sun7i-a20-cubietruck.dts
+++ b/arch/arm/boot/dts/sun7i-a20-cubietruck.dts
@@ -222,9 +222,19 @@
@@ -213,9 +213,19 @@ &mmc3 {
brcmf: wifi@1 {
reg = <1>;
compatible = "brcm,bcm4329-fmac";
@@ -87,4 +93,7 @@ index 5649161de1d7..a837516db6f9 100644
+ */
};
};
--
2.31.1

View File

@@ -1,8 +1,17 @@
From 927ca4b6c7648cd69605ca95bf87bea310e27e3b Mon Sep 17 00:00:00 2001
From: The-going <48602507+The-going@users.noreply.github.com>
Date: Fri, 28 Jan 2022 15:15:19 +0300
Subject: [PATCH 7/8] arm:dts: sun7i-a20-bananapro add hdmi-connector, de
---
arch/arm/boot/dts/sun7i-a20-bananapro.dts | 26 +++++++++++++++++++++++
1 file changed, 26 insertions(+)
diff --git a/arch/arm/boot/dts/sun7i-a20-bananapro.dts b/arch/arm/boot/dts/sun7i-a20-bananapro.dts
index 0176e9de..1b17e433 100644
index e68748076..10ee53fba 100644
--- a/arch/arm/boot/dts/sun7i-a20-bananapro.dts
+++ b/arch/arm/boot/dts/sun7i-a20-bananapro.dts
@@ -60,6 +60,17 @@
@@ -60,6 +60,17 @@ chosen {
stdout-path = "serial0:115200n8";
};
@@ -20,28 +29,27 @@ index 0176e9de..1b17e433 100644
leds {
compatible = "gpio-leds";
@@ -91,13 +102,18 @@
@@ -91,6 +102,7 @@ reg_gmac_3v3: gmac-3v3 {
};
&ahci {
- status = "okay";
+ target-supply = <&reg_ahci_5v>;
+ status = "okay";
+ target-supply = <&reg_ahci_5v>;
status = "okay";
};
&codec {
@@ -98,6 +110,10 @@ &codec {
status = "okay";
};
+&de {
+ status = "okay";
+ status = "okay";
+};
+
&ehci0 {
status = "okay";
};
@@ -119,6 +135,16 @@
};
@@ -115,6 +131,16 @@ &gmac {
status = "okay";
};
+&hdmi {
@@ -57,3 +65,6 @@ index 0176e9de..1b17e433 100644
&i2c0 {
status = "okay";
--
2.31.1

View File

@@ -0,0 +1,24 @@
From 1e7f21b847b5f583f950aee5538320cee1b9c085 Mon Sep 17 00:00:00 2001
From: The-going <48602507+The-going@users.noreply.github.com>
Date: Fri, 28 Jan 2022 11:38:08 +0300
Subject: [PATCH 2/4] arm:dts: sun7i-a20-cubietruck add alias uart2
---
arch/arm/boot/dts/sun7i-a20-cubietruck.dts | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/arm/boot/dts/sun7i-a20-cubietruck.dts b/arch/arm/boot/dts/sun7i-a20-cubietruck.dts
index df428f29b..a3d169c43 100644
--- a/arch/arm/boot/dts/sun7i-a20-cubietruck.dts
+++ b/arch/arm/boot/dts/sun7i-a20-cubietruck.dts
@@ -55,6 +55,7 @@ / {
aliases {
serial0 = &uart0;
+ serial2 = &uart2;
};
chosen {
--
2.31.1

View File

@@ -0,0 +1,25 @@
From 4cfa2969de97a9bef0fda836cb5b17c53b88dff0 Mon Sep 17 00:00:00 2001
From: The-going <48602507+The-going@users.noreply.github.com>
Date: Fri, 28 Jan 2022 15:06:34 +0300
Subject: [PATCH 6/8] arm:dts:sun8i-h3-bananapi-m2-plus add wifi_pwrseq
---
arch/arm/boot/dts/sun8i-h3-bananapi-m2-plus.dts | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/arch/arm/boot/dts/sun8i-h3-bananapi-m2-plus.dts b/arch/arm/boot/dts/sun8i-h3-bananapi-m2-plus.dts
index 195a75da1..f3f324e66 100644
--- a/arch/arm/boot/dts/sun8i-h3-bananapi-m2-plus.dts
+++ b/arch/arm/boot/dts/sun8i-h3-bananapi-m2-plus.dts
@@ -48,3 +48,8 @@ / {
model = "Banana Pi BPI-M2-Plus H3";
compatible = "sinovoip,bpi-m2-plus", "allwinner,sun8i-h3";
};
+
+&wifi_pwrseq {
+ clocks = <&rtc 1>;
+ clock-names = "ext_clock";
+};
--
2.31.1

View File

@@ -1,17 +1,26 @@
From 0a961113148851f72343d4bea906527b0a3352c8 Mon Sep 17 00:00:00 2001
From: The-going <48602507+The-going@users.noreply.github.com>
Date: Mon, 24 Jan 2022 14:14:41 +0300
Subject: [PATCH 075/101] arm:dts: sun8i-h3-nanopi add leds pio pins
---
arch/arm/boot/dts/sun8i-h3-nanopi.dtsi | 23 +++++++++++++++++++++++
1 file changed, 23 insertions(+)
diff --git a/arch/arm/boot/dts/sun8i-h3-nanopi.dtsi b/arch/arm/boot/dts/sun8i-h3-nanopi.dtsi
index 4df29a6..cf59d3f 100644
index c7c3e7d8b..f57338e5a 100644
--- a/arch/arm/boot/dts/sun8i-h3-nanopi.dtsi
+++ b/arch/arm/boot/dts/sun8i-h3-nanopi.dtsi
@@ -59,6 +63,8 @@
@@ -59,6 +59,8 @@ chosen {
leds {
compatible = "gpio-leds";
+ pinctrl-names = "default";
+ pinctrl-0 = <&leds_npi>, <&leds_r_npi>;
status {
led-0 {
label = "nanopi:blue:status";
@@ -76,6 +82,8 @@
@@ -76,6 +78,8 @@ led-1 {
r_gpio_keys {
compatible = "gpio-keys";
input-name = "k1";
@@ -20,7 +29,7 @@ index 4df29a6..cf59d3f 100644
k1 {
label = "k1";
@@ -100,6 +136,25 @@
@@ -100,6 +104,25 @@ &ohci3 {
status = "okay";
};
@@ -46,3 +55,6 @@ index 4df29a6..cf59d3f 100644
&uart0 {
pinctrl-names = "default";
pinctrl-0 = <&uart0_pa_pins>;
--
2.31.1

View File

@@ -1,10 +1,19 @@
From b60c7af6b6779013167086be5e0b21df7ecb00a0 Mon Sep 17 00:00:00 2001
From: The-going <48602507+The-going@users.noreply.github.com>
Date: Fri, 28 Jan 2022 15:01:30 +0300
Subject: [PATCH 5/8] arm:dts: sun8i-r40 add clk_out_a fix bananam2ultra
---
arch/arm/boot/dts/sun8i-r40.dtsi | 17 +++++++++++++++++
1 file changed, 17 insertions(+)
diff --git a/arch/arm/boot/dts/sun8i-r40.dtsi b/arch/arm/boot/dts/sun8i-r40.dtsi
index bd97ca3..a8a522f 100644
index 5bb6e1530..767d41509 100644
--- a/arch/arm/boot/dts/sun8i-r40.dtsi
+++ b/arch/arm/boot/dts/sun8i-r40.dtsi
@@ -68,6 +71,23 @@
clock-frequency = <32768>;
clock-output-names = "osc32k";
@@ -74,6 +74,23 @@ osc32k: osc32k {
clock-accuracy = <20000>;
clock-output-names = "ext-osc32k";
};
+
+ osc24M_32k: clk@1 {
@@ -26,3 +35,6 @@ index bd97ca3..a8a522f 100644
};
cpus {
--
2.31.1

View File

@@ -1,5 +1,15 @@
From c42403109d01c176ce425083b08303c46961e822 Mon Sep 17 00:00:00 2001
From: The-going <48602507+The-going@users.noreply.github.com>
Date: Tue, 25 Jan 2022 21:18:21 +0300
Subject: [PATCH 101/101] arm:dts: sun8i-r40 bananapi-m2-ultra add codec analog
---
.../boot/dts/sun8i-r40-bananapi-m2-ultra.dts | 10 ++++++++++
arch/arm/boot/dts/sun8i-r40.dtsi | 18 ++++++++++++++++++
2 files changed, 28 insertions(+)
diff --git a/arch/arm/boot/dts/sun8i-r40-bananapi-m2-ultra.dts b/arch/arm/boot/dts/sun8i-r40-bananapi-m2-ultra.dts
index a6a1087a0c9b..3ad67d12cb9f 100644
index 87cf03574..73370f20d 100644
--- a/arch/arm/boot/dts/sun8i-r40-bananapi-m2-ultra.dts
+++ b/arch/arm/boot/dts/sun8i-r40-bananapi-m2-ultra.dts
@@ -113,6 +113,16 @@ &ahci {
@@ -20,10 +30,10 @@ index a6a1087a0c9b..3ad67d12cb9f 100644
status = "okay";
};
diff --git a/arch/arm/boot/dts/sun8i-r40.dtsi b/arch/arm/boot/dts/sun8i-r40.dtsi
index 7907569e7b5c..63d531617f59 100644
index 4f42e3c4b..5bb6e1530 100644
--- a/arch/arm/boot/dts/sun8i-r40.dtsi
+++ b/arch/arm/boot/dts/sun8i-r40.dtsi
@@ -672,6 +672,24 @@ ths: thermal-sensor@1c24c00 {
@@ -800,6 +800,24 @@ ths: thermal-sensor@1c24c00 {
#thermal-sensor-cells = <1>;
};
@@ -48,3 +58,6 @@ index 7907569e7b5c..63d531617f59 100644
uart0: serial@1c28000 {
compatible = "snps,dw-apb-uart";
reg = <0x01c28000 0x400>;
--
2.31.1

View File

@@ -1,5 +1,15 @@
From 3437123f7c1b5b717efc79c604273a0661937cb2 Mon Sep 17 00:00:00 2001
From: The-going <48602507+The-going@users.noreply.github.com>
Date: Fri, 28 Jan 2022 12:58:57 +0300
Subject: [PATCH 3/4] arm:dts: sun8i-v3s/s3-pinecube enable sound codec
---
arch/arm/boot/dts/sun8i-s3-pinecube.dts | 14 ++++++++++++++
arch/arm/boot/dts/sun8i-v3s.dtsi | 14 ++++++++++++++
2 files changed, 28 insertions(+)
diff --git a/arch/arm/boot/dts/sun8i-s3-pinecube.dts b/arch/arm/boot/dts/sun8i-s3-pinecube.dts
index 4aa0ee897a0a..9416aa6f1e96 100644
index 20966e954..773ad0503 100644
--- a/arch/arm/boot/dts/sun8i-s3-pinecube.dts
+++ b/arch/arm/boot/dts/sun8i-s3-pinecube.dts
@@ -58,6 +58,20 @@ wifi_pwrseq: wifi_pwrseq {
@@ -24,11 +34,11 @@ index 4aa0ee897a0a..9416aa6f1e96 100644
pinctrl-names = "default";
pinctrl-0 = <&csi1_8bit_pins>;
diff --git a/arch/arm/boot/dts/sun8i-v3s.dtsi b/arch/arm/boot/dts/sun8i-v3s.dtsi
index 89abd4cc7e23..1b9278f75ae3 100644
index b30bc1a25..74be87254 100644
--- a/arch/arm/boot/dts/sun8i-v3s.dtsi
+++ b/arch/arm/boot/dts/sun8i-v3s.dtsi
@@ -408,6 +417,20 @@ lradc: lradc@1c22800 {
status = "disabled";
@@ -469,6 +469,20 @@ codec_analog: codec-analog@1c23000 {
reg = <0x01c23000 0x4>;
};
+
@@ -48,22 +58,6 @@ index 89abd4cc7e23..1b9278f75ae3 100644
uart0: serial@1c28000 {
compatible = "snps,dw-apb-uart";
reg = <0x01c28000 0x400>;
diff --git a/sound/soc/sunxi/sun8i-codec-analog.c b/sound/soc/sunxi/sun8i-codec-analog.c
index be872eefa61e..10387fa9f9c4 100644
--- a/sound/soc/sunxi/sun8i-codec-analog.c
+++ b/sound/soc/sunxi/sun8i-codec-analog.c
@@ -729,8 +729,12 @@ static int sun8i_codec_analog_add_mixer(struct snd_soc_component *cmpnt,
}
static const struct sun8i_codec_analog_quirks sun8i_v3s_quirks = {
- .has_headphone = true,
- .has_hmic = true,
+ .has_headphone = true,
+ .has_hmic = true,
+ .has_linein = true,
+ .has_lineout = true,
+ .has_mbias = true,
+ .has_mic2 = true,
};
static int sun8i_codec_analog_cmpnt_probe(struct snd_soc_component *cmpnt)
--
2.31.1

View File

@@ -1,8 +1,7 @@
From 4990f2559d012df5c225df7cda3c29d60d3263b7 Mon Sep 17 00:00:00 2001
From 116680ba94f5bb5fe6fabfdbb237cdc97d2fd08b Mon Sep 17 00:00:00 2001
From: Philipp Rossak <embed3d@gmail.com>
Date: Sat, 27 Jan 2018 21:30:16 +0100
Subject: [PATCH 032/146] arm: dts: sun9i: a80: add support for the thermal
sensor in A80
Subject: [PATCH 057/101] arm:dts: sun9i-a80 add thermal sensor
As we have gained the support for the thermal sensor in A80,
we can now add its device nodes to the device tree.
@@ -16,10 +15,10 @@ Signed-off-by: Philipp Rossak <embed3d@gmail.com>
1 file changed, 11 insertions(+)
diff --git a/arch/arm/boot/dts/sun9i-a80.dtsi b/arch/arm/boot/dts/sun9i-a80.dtsi
index 25591d6883ef..9411831d04aa 100644
index ce4fa6706..ebffbc506 100644
--- a/arch/arm/boot/dts/sun9i-a80.dtsi
+++ b/arch/arm/boot/dts/sun9i-a80.dtsi
@@ -913,6 +913,17 @@
@@ -941,6 +941,17 @@ ccu: clock@6000000 {
#reset-cells = <1>;
};
@@ -38,5 +37,5 @@ index 25591d6883ef..9411831d04aa 100644
compatible = "allwinner,sun4i-a10-timer";
reg = <0x06000c00 0xa0>;
--
2.17.1
2.31.1

View File

@@ -1,7 +1,7 @@
From 559d5cc47ffd71a47da77424e251a8d21250cabb Mon Sep 17 00:00:00 2001
From cfdc927d7c1779223f8c9444b9e305f23327af10 Mon Sep 17 00:00:00 2001
From: Philipp Rossak <embed3d@gmail.com>
Date: Sat, 27 Jan 2018 21:39:09 +0100
Subject: [PATCH 033/146] arm: dts: sun9i: a80: add thermal zone to A80
Subject: [PATCH 058/101] arm:dts: sun9i-a80 add thermal zone
This patch adds the thermal zones to the A80.
@@ -15,10 +15,10 @@ Signed-off-by: Philipp Rossak <embed3d@gmail.com>
1 file changed, 26 insertions(+)
diff --git a/arch/arm/boot/dts/sun9i-a80.dtsi b/arch/arm/boot/dts/sun9i-a80.dtsi
index 9411831d04aa..6c52b33dad84 100644
index ebffbc506..c34b463fe 100644
--- a/arch/arm/boot/dts/sun9i-a80.dtsi
+++ b/arch/arm/boot/dts/sun9i-a80.dtsi
@@ -1221,4 +1221,30 @@
@@ -1262,4 +1262,30 @@ r_rsb: rsb@8003400 {
#size-cells = <0>;
};
};
@@ -50,5 +50,5 @@ index 9411831d04aa..6c52b33dad84 100644
+ };
};
--
2.17.1
2.31.1

View File

@@ -0,0 +1,24 @@
From 178284aea1769c4aed0e73a880bbf4fd87b2d0ad Mon Sep 17 00:00:00 2001
From: The-going <48602507+The-going@users.noreply.github.com>
Date: Fri, 28 Jan 2022 16:12:37 +0300
Subject: [PATCH 4/4] arm:dts: sunxi-h3-h5.dtsi force mmc0 bus-width
---
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 fe9268f70..422a5bbbc 100644
--- a/arch/arm/boot/dts/sunxi-h3-h5.dtsi
+++ b/arch/arm/boot/dts/sunxi-h3-h5.dtsi
@@ -220,6 +220,7 @@ mmc0: mmc@1c0f000 {
resets = <&ccu RST_BUS_MMC0>;
reset-names = "ahb";
interrupts = <GIC_SPI 60 IRQ_TYPE_LEVEL_HIGH>;
+ bus-width = <0x4>;
status = "disabled";
#address-cells = <1>;
#size-cells = <0>;
--
2.31.1

View File

@@ -1,21 +1,21 @@
From ba9ba2949e86b5a00b0ae89b5e298b4cd46118ee Mon Sep 17 00:00:00 2001
From 64fb06b24f8d73e8c88c188668587317215f7b56 Mon Sep 17 00:00:00 2001
From: wuweidong <625769020@qq.com>
Date: Mon, 27 Nov 2017 10:23:51 +0800
Subject: [PATCH] arm64: dts: sun50i-h5-nanopi: Add a new board NanoPi K1 Plus
Subject: [PATCH 084/101] arm64:dts: Add sun50i-h5-nanopi-k1-plus device
---
arch/arm64/boot/dts/allwinner/Makefile | 1 +
.../allwinner/sun50i-h5-nanopi-k1-plus.dts | 555 ++++++++++++++++++
2 files changed, 556 insertions(+)
.../allwinner/sun50i-h5-nanopi-k1-plus.dts | 396 ++++++++++++++++++
2 files changed, 397 insertions(+)
create mode 100644 arch/arm64/boot/dts/allwinner/sun50i-h5-nanopi-k1-plus.dts
diff --git a/arch/arm64/boot/dts/allwinner/Makefile b/arch/arm64/boot/dts/allwinner/Makefile
index c03224962034..eb4494332002 100644
index 14053c566..ce5eecc6b 100644
--- a/arch/arm64/boot/dts/allwinner/Makefile
+++ b/arch/arm64/boot/dts/allwinner/Makefile
@@ -10,6 +10,7 @@ dtb-$(CONFIG_ARCH_SUNXI) += sun50i-a64-pinebook.dtb
dtb-$(CONFIG_ARCH_SUNXI) += sun50i-a64-sopine-baseboard.dtb
dtb-$(CONFIG_ARCH_SUNXI) += sun50i-a64-teres-i.dtb
@@ -27,6 +27,7 @@ dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h5-nanopi-neo2.dtb
dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h5-nanopi-neo-plus2.dtb
dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h5-nanopi-r1s-h5.dtb
dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h5-orangepi-pc2.dtb
+dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h5-nanopi-k1-plus.dtb
dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h5-orangepi-prime.dtb
@@ -23,10 +23,10 @@ index c03224962034..eb4494332002 100644
dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h5-orangepi-zero-plus2.dtb
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h5-nanopi-k1-plus.dts b/arch/arm64/boot/dts/allwinner/sun50i-h5-nanopi-k1-plus.dts
new file mode 100644
index 000000000000..52337a18721f
index 000000000..b7045a9ef
--- /dev/null
+++ b/arch/arm64/boot/dts/allwinner/sun50i-h5-nanopi-k1-plus.dts
@@ -0,0 +1,367 @@
@@ -0,0 +1,396 @@
+/*
+ * Copyright (C) 2016 ARM Ltd.
+ *
@@ -181,6 +181,10 @@ index 000000000000..52337a18721f
+ };
+};
+
+&cpu0 {
+ cpu-supply = <&reg_vdd_cpux>;
+};
+
+&codec {
+ allwinner,audio-routing =
+ "Line Out", "LINEOUT",
@@ -330,6 +334,31 @@ index 000000000000..52337a18721f
+ status = "okay";
+};
+
+
+&r_i2c {
+ status = "okay";
+ reg_vdd_cpux: regulator@65 {
+ compatible = "silergy,sy8106a";
+ reg = <0x65>;
+ regulator-name = "vdd-cpux";
+ silergy,fixed-microvolt = <1200000>;
+ /*
+ * The datasheet uses 1.1V as the minimum value of VDD-CPUX,
+ * however both the Armbian DVFS table and the official one
+ * have operating points with voltage under 1.1V, and both
+ * DVFS table are known to work properly at the lowest
+ * operating point.
+ *
+ * Use 1.0V as the minimum voltage instead.
+ */
+ regulator-min-microvolt = <1000000>;
+ regulator-max-microvolt = <1400000>;
+ regulator-ramp-delay = <200>;
+ regulator-boot-on;
+ regulator-always-on;
+ };
+};
+
+&spi0 {
+ status = "okay";
+ spi-flash@0 {
@@ -395,3 +424,6 @@ index 000000000000..52337a18721f
+ status = "disabled";
+};
\ No newline at end of file
--
2.31.1

View File

@@ -1,9 +1,20 @@
From af8c23904928a74f0cf6c6feb83bee029a0385a0 Mon Sep 17 00:00:00 2001
From: The-going <48602507+The-going@users.noreply.github.com>
Date: Mon, 24 Jan 2022 18:54:36 +0300
Subject: [PATCH 087/101] arm64:dts: Add sun50i-h5-nanopi-m1-plus2 device
---
arch/arm64/boot/dts/allwinner/Makefile | 1 +
.../allwinner/sun50i-h5-nanopi-m1-plus2.dts | 240 ++++++++++++++++++
2 files changed, 241 insertions(+)
create mode 100644 arch/arm64/boot/dts/allwinner/sun50i-h5-nanopi-m1-plus2.dts
diff --git a/arch/arm64/boot/dts/allwinner/Makefile b/arch/arm64/boot/dts/allwinner/Makefile
index 323f30fa..ac1eead4 100644
index e9eb00b9f..f8301e431 100644
--- a/arch/arm64/boot/dts/allwinner/Makefile
+++ b/arch/arm64/boot/dts/allwinner/Makefile
@@ -17,6 +17,7 @@ dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h5-nanopi-neo-plus2.dtb
dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h5-nanopi-neo-core2.dtb
@@ -30,6 +30,7 @@ dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h5-nanopi-neo-core2.dtb
dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h5-nanopi-r1s-h5.dtb
dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h5-orangepi-pc2.dtb
dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h5-nanopi-k1-plus.dtb
+dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h5-nanopi-m1-plus2.dtb
@@ -12,7 +23,7 @@ index 323f30fa..ac1eead4 100644
dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h5-orangepi-zero-plus2.dtb
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h5-nanopi-m1-plus2.dts b/arch/arm64/boot/dts/allwinner/sun50i-h5-nanopi-m1-plus2.dts
new file mode 100644
index 0000000..a6bf32d
index 000000000..d051382cc
--- /dev/null
+++ b/arch/arm64/boot/dts/allwinner/sun50i-h5-nanopi-m1-plus2.dts
@@ -0,0 +1,240 @@
@@ -256,3 +267,6 @@ index 0000000..a6bf32d
+ usb0_vbus-supply = <&reg_usb0_vbus>;
+ status = "okay";
+};
--
2.31.1

View File

@@ -1,10 +1,21 @@
From 1ab94f02fbdb45f3a4de71c4adc09a99e3e6cad7 Mon Sep 17 00:00:00 2001
From: The-going <48602507+The-going@users.noreply.github.com>
Date: Mon, 24 Jan 2022 18:43:42 +0300
Subject: [PATCH 085/101] arm64:dts: Add sun50i-h5-nanopi-neo-core2 device
---
arch/arm64/boot/dts/allwinner/Makefile | 1 +
.../allwinner/sun50i-h5-nanopi-neo-core2.dts | 210 ++++++++++++++++++
2 files changed, 211 insertions(+)
create mode 100644 arch/arm64/boot/dts/allwinner/sun50i-h5-nanopi-neo-core2.dts
diff --git a/arch/arm64/boot/dts/allwinner/Makefile b/arch/arm64/boot/dts/allwinner/Makefile
index c6fc096..731e2ae 100644
index ce5eecc6b..d29fba472 100644
--- a/arch/arm64/boot/dts/allwinner/Makefile
+++ b/arch/arm64/boot/dts/allwinner/Makefile
@@ -11,6 +11,7 @@ dtb-$(CONFIG_ARCH_SUNXI) += sun50i-a64-teres-i.dtb
@@ -25,6 +25,7 @@ dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h5-libretech-all-h3-it.dtb
dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h5-libretech-all-h5-cc.dtb
dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h5-nanopi-neo2.dtb
dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h5-nanopi-neo2-v1.1.dtb
dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h5-nanopi-neo-plus2.dtb
+dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h5-nanopi-neo-core2.dtb
dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h5-nanopi-r1s-h5.dtb
@@ -12,7 +23,7 @@ index c6fc096..731e2ae 100644
dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h5-nanopi-k1-plus.dtb
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h5-nanopi-neo-core2.dts b/arch/arm64/boot/dts/allwinner/sun50i-h5-nanopi-neo-core2.dts
new file mode 100644
index 000000000..b3035ddd7
index 000000000..57283cc16
--- /dev/null
+++ b/arch/arm64/boot/dts/allwinner/sun50i-h5-nanopi-neo-core2.dts
@@ -0,0 +1,210 @@
@@ -226,3 +237,6 @@ index 000000000..b3035ddd7
+ /* USB Type-A ports' VBUS is always on */
+ status = "okay";
+};
--
2.31.1

View File

@@ -1,18 +1,29 @@
From 4f3c08d1a3bb88a6dbe924f49ca382cdbee74c02 Mon Sep 17 00:00:00 2001
From: The-going <48602507+The-going@users.noreply.github.com>
Date: Mon, 24 Jan 2022 18:49:55 +0300
Subject: [PATCH 086/101] arm64:dts: Add sun50i-h5-nanopi-neo2-v1.1 device
---
arch/arm64/boot/dts/allwinner/Makefile | 1 +
.../allwinner/sun50i-h5-nanopi-neo2-v1.1.dts | 180 ++++++++++++++++++
2 files changed, 181 insertions(+)
create mode 100644 arch/arm64/boot/dts/allwinner/sun50i-h5-nanopi-neo2-v1.1.dts
diff --git a/arch/arm64/boot/dts/allwinner/Makefile b/arch/arm64/boot/dts/allwinner/Makefile
index 731e2aec..bb9012fa 100644
index d29fba472..e9eb00b9f 100644
--- a/arch/arm64/boot/dts/allwinner/Makefile
+++ b/arch/arm64/boot/dts/allwinner/Makefile
@@ -16,6 +16,7 @@ dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h5-orangepi-prime.dtb
dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h5-orangepi-zero-plus.dtb
dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h5-orangepi-zero-plus2.dtb
@@ -24,6 +24,7 @@ dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h5-libretech-all-h3-cc.dtb
dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h5-libretech-all-h3-it.dtb
dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h5-libretech-all-h5-cc.dtb
dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h5-nanopi-neo2.dtb
+dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h5-nanopi-neo2-v1.1.dtb
dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h5-nanopi-neo-plus2.dtb
dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h5-nanopi-neo-core2.dtb
dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h5-nanopi-m1-plus2.dtb
dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h5-nanopi-r1s-h5.dtb
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h5-nanopi-neo2-v1.1.dts b/arch/arm64/boot/dts/allwinner/sun50i-h5-nanopi-neo2-v1.1.dts
new file mode 100644
index 00000000..cab3c73b
index 000000000..06ffbbd29
--- /dev/null
+++ b/arch/arm64/boot/dts/allwinner/sun50i-h5-nanopi-neo2-v1.1.dts
@@ -0,0 +1,180 @@
@@ -196,3 +207,6 @@ index 00000000..cab3c73b
+ usb0_vbus-supply = <&reg_usb0_vbus>;
+ status = "okay";
+};
--
2.31.1

View File

@@ -1,8 +1,7 @@
From 1accc4684942b53fc6acaa35074c0ebb905e369a Mon Sep 17 00:00:00 2001
From 4834c59f7a14e9736dcc432c7bec7507d1547a8d Mon Sep 17 00:00:00 2001
From: Andre Przywara <andre.przywara@arm.com>
Date: Fri, 27 Nov 2020 15:28:40 +0000
Subject: [PATCH 14/37] arm64: dts: allwinner: h616: Add OrangePi Zero 2 board
support
Subject: [PATCH 031/101] arm64:dts: Add sun50i-h616-orangepi-zero2 device
The OrangePi Zero 2 is a development board with the new H616 SoC. It
comes with the following features:
@@ -29,7 +28,7 @@ Signed-off-by: Andre Przywara <andre.przywara@arm.com>
create mode 100644 arch/arm64/boot/dts/allwinner/sun50i-h616-orangepi-zero2.dts
diff --git a/arch/arm64/boot/dts/allwinner/Makefile b/arch/arm64/boot/dts/allwinner/Makefile
index a96d9d2d8dd8..62f8d43cf84d 100644
index a96d9d2d8..62f8d43cf 100644
--- a/arch/arm64/boot/dts/allwinner/Makefile
+++ b/arch/arm64/boot/dts/allwinner/Makefile
@@ -37,3 +37,4 @@ dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h6-orangepi-one-plus.dtb
@@ -39,7 +38,7 @@ index a96d9d2d8dd8..62f8d43cf84d 100644
+dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h616-orangepi-zero2.dtb
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h616-orangepi-zero2.dts b/arch/arm64/boot/dts/allwinner/sun50i-h616-orangepi-zero2.dts
new file mode 100644
index 000000000000..a26201288872
index 000000000..a26201288
--- /dev/null
+++ b/arch/arm64/boot/dts/allwinner/sun50i-h616-orangepi-zero2.dts
@@ -0,0 +1,245 @@
@@ -289,5 +288,5 @@ index 000000000000..a26201288872
+ status = "okay";
+};
--
2.25.1
2.31.1

View File

@@ -1,7 +1,7 @@
From a96a4e9a8a561b2f444981c7fdc6a5e7297bff5b Mon Sep 17 00:00:00 2001
From f9756b4f8625f2bfd03ef52c5eef9762f489d578 Mon Sep 17 00:00:00 2001
From: Andre Przywara <andre.przywara@arm.com>
Date: Wed, 28 Apr 2021 00:06:26 +0100
Subject: [PATCH 15/37] arm64: dts: allwinner: h616: Add X96 Mate TV box
Subject: [PATCH 033/101] arm64:dts: Add sun50i-h616-x96-mate TV box device
support
The X96 Mate is an Allwinner H616 based TV box, featuring:
@@ -31,7 +31,7 @@ Signed-off-by: Andre Przywara <andre.przywara@arm.com>
create mode 100644 arch/arm64/boot/dts/allwinner/sun50i-h616-x96-mate.dts
diff --git a/arch/arm64/boot/dts/allwinner/Makefile b/arch/arm64/boot/dts/allwinner/Makefile
index 62f8d43cf84d..14053c566601 100644
index 62f8d43cf..14053c566 100644
--- a/arch/arm64/boot/dts/allwinner/Makefile
+++ b/arch/arm64/boot/dts/allwinner/Makefile
@@ -38,3 +38,4 @@ dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h6-pine-h64.dtb
@@ -41,7 +41,7 @@ index 62f8d43cf84d..14053c566601 100644
+dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h616-x96-mate.dtb
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h616-x96-mate.dts b/arch/arm64/boot/dts/allwinner/sun50i-h616-x96-mate.dts
new file mode 100644
index 000000000000..b960bb310289
index 000000000..b960bb310
--- /dev/null
+++ b/arch/arm64/boot/dts/allwinner/sun50i-h616-x96-mate.dts
@@ -0,0 +1,201 @@
@@ -247,5 +247,5 @@ index 000000000000..b960bb310289
+ status = "okay";
+};
--
2.25.1
2.31.1

View File

@@ -1,5 +1,14 @@
From 5d1a8d7717cf81e3b7672328837b90f1c85df14e Mon Sep 17 00:00:00 2001
From: The-going <48602507+The-going@users.noreply.github.com>
Date: Mon, 24 Jan 2022 14:24:40 +0300
Subject: [PATCH 077/101] arm64:dts: a64-olinuxino add regulator audio mmc
---
.../dts/allwinner/sun50i-a64-olinuxino.dts | 59 +++++++++++++++++++
1 file changed, 59 insertions(+)
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-olinuxino.dts b/arch/arm64/boot/dts/allwinner/sun50i-a64-olinuxino.dts
index f3f8e177a..3e7aea743 100644
index 354d63558..5321cd75e 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-a64-olinuxino.dts
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-olinuxino.dts
@@ -52,6 +52,13 @@ reg_usb1_vbus: usb1-vbus {
@@ -12,7 +21,7 @@ index f3f8e177a..3e7aea743 100644
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ };
+
+
wifi_pwrseq: wifi_pwrseq {
compatible = "mmc-pwrseq-simple";
reset-gpios = <&r_pio 0 2 GPIO_ACTIVE_LOW>; /* PL2 */
@@ -50,7 +59,7 @@ index f3f8e177a..3e7aea743 100644
&emac {
pinctrl-names = "default";
pinctrl-0 = <&rgmii_pins>;
@@ -142,6 +169,16 @@ rtl8723bs: wifi@1 {
@@ -146,6 +173,16 @@ rtl8723bs: wifi@1 {
};
};
@@ -67,8 +76,8 @@ index f3f8e177a..3e7aea743 100644
&ohci0 {
status = "okay";
};
@@ -328,6 +365,28 @@ &simplefb_hdmi {
vcc-hdmi-supply = <&reg_dldo1>;
@@ -336,6 +373,28 @@ &sound_hdmi {
status = "okay";
};
+&sound {
@@ -81,7 +90,7 @@ index f3f8e177a..3e7aea743 100644
+ "Left DAC", "AIF1 Slot 0 Left",
+ "Right DAC", "AIF1 Slot 0 Right",
+ "INL", "LINEOUT",
+ "INR", "LINEOUT",
+ "INR", "LINEOUT",
+ "Headphone Jack", "HP",
+ "AIF1 Slot 0 Left ADC", "Left ADC",
+ "AIF1 Slot 0 Right ADC", "Right ADC",
@@ -96,3 +105,6 @@ index f3f8e177a..3e7aea743 100644
&uart0 {
pinctrl-names = "default";
pinctrl-0 = <&uart0_pb_pins>;
--
2.31.1

View File

@@ -1,7 +1,7 @@
From 50b9a4612a8cc6e2131b83f498d7c5d4cb6ea74f Mon Sep 17 00:00:00 2001
From 0cb51be425d50c8278a91e87f8bc0889af77754f Mon Sep 17 00:00:00 2001
From: Andre Przywara <andre.przywara@arm.com>
Date: Fri, 27 Nov 2020 15:28:12 +0000
Subject: [PATCH 12/37] arm64: dts: allwinner: Add Allwinner H616 .dtsi file
Subject: [PATCH 027/101] arm64: dts: allwinner: Add sun50i-h616.dtsi file
This (relatively) new SoC is similar to the H6, but drops the (broken)
PCIe support and the USB 3.0 controller. It also gets the management
@@ -27,7 +27,7 @@ Signed-off-by: Andre Przywara <andre.przywara@arm.com>
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h616.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-h616.dtsi
new file mode 100644
index 000000000000..30195e4779de
index 000000000..30195e477
--- /dev/null
+++ b/arch/arm64/boot/dts/allwinner/sun50i-h616.dtsi
@@ -0,0 +1,747 @@
@@ -779,5 +779,5 @@ index 000000000000..30195e4779de
+ };
+};
--
2.25.1
2.31.1

View File

@@ -1,7 +1,7 @@
From 447ff14c667daf36e6d0d5a484c1918fb5386280 Mon Sep 17 00:00:00 2001
From dac2a4e5a3270df2a0dc2b9839f63d9e70204b08 Mon Sep 17 00:00:00 2001
From: Jernej Skrabec <jernej.skrabec@gmail.com>
Date: Fri, 15 Oct 2021 21:07:46 +0200
Subject: [PATCH 17/37] arm64: dts: allwinner: h616: Add GPU node
Subject: [PATCH 036/101] arm64:dts: allwinner: sun50i-h616 Add GPU node
Signed-off-by: Jernej Skrabec <jernej.skrabec@gmail.com>
---
@@ -9,12 +9,12 @@ Signed-off-by: Jernej Skrabec <jernej.skrabec@gmail.com>
1 file changed, 14 insertions(+)
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h616.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-h616.dtsi
index deda3ad8c6e7..eadbdc1fc172 100644
index 30195e477..e5e099068 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-h616.dtsi
+++ b/arch/arm64/boot/dts/allwinner/sun50i-h616.dtsi
@@ -156,6 +156,20 @@ mixer0_out_tcon_top_mixer0: endpoint {
};
};
@@ -103,6 +103,20 @@ soc {
#size-cells = <1>;
ranges = <0x0 0x0 0x0 0x40000000>;
+ gpu: gpu@1800000 {
+ compatible = "allwinner,sun50i-h616-mali",
@@ -34,5 +34,5 @@ index deda3ad8c6e7..eadbdc1fc172 100644
compatible = "allwinner,sun50i-h616-system-control";
reg = <0x03000000 0x1000>;
--
2.25.1
2.31.1

View File

@@ -1,7 +1,7 @@
From f5425ca6edbbf54166c66970d64af6296e520bff Mon Sep 17 00:00:00 2001
From 473775a0b6fbc8e5b8d2e118ac6e6007358476b4 Mon Sep 17 00:00:00 2001
From: Jernej Skrabec <jernej.skrabec@gmail.com>
Date: Fri, 15 Oct 2021 21:14:55 +0200
Subject: [PATCH 21/37] arm64: dts: allwinner: h616: Add VPU node
Subject: [PATCH 042/101] arm64:dts:allwinner: sun50i-h616 Add VPU node
Signed-off-by: Jernej Skrabec <jernej.skrabec@gmail.com>
---
@@ -9,10 +9,10 @@ Signed-off-by: Jernej Skrabec <jernej.skrabec@gmail.com>
1 file changed, 24 insertions(+)
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h616.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-h616.dtsi
index eadbdc1fc172..0c196c9d7945 100644
index e5e099068..805b1e6b7 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-h616.dtsi
+++ b/arch/arm64/boot/dts/allwinner/sun50i-h616.dtsi
@@ -170,6 +170,17 @@ gpu: gpu@1800000 {
@@ -117,6 +117,17 @@ gpu: gpu@1800000 {
status = "disabled";
};
@@ -30,9 +30,9 @@ index eadbdc1fc172..0c196c9d7945 100644
syscon: syscon@3000000 {
compatible = "allwinner,sun50i-h616-system-control";
reg = <0x03000000 0x1000>;
@@ -190,6 +201,19 @@ de3_sram: sram-section@0 {
reg = <0x0000 0x1e000>;
};
@@ -131,6 +142,19 @@ sram_c: sram@28000 {
#size-cells = <1>;
ranges = <0 0x00028000 0x30000>;
};
+
+ sram_c1: sram@1a00000 {
@@ -51,5 +51,5 @@ index eadbdc1fc172..0c196c9d7945 100644
ccu: clock@3001000 {
--
2.25.1
2.31.1

View File

@@ -1,8 +1,10 @@
From 9fa7f92966d8b0e689171ddcd708c4f249012e3f Mon Sep 17 00:00:00 2001
From 8085d8cf96974c77bf8972091f19d8a22d5ff92b Mon Sep 17 00:00:00 2001
From: root <guido.lehwalder@gmail.com>
Date: Tue, 26 Jan 2021 18:17:33 +0300
Subject: [PATCH] set right phy-mode for NPI A64 to rgmii-id for working
onboard-ethernet
Subject: [PATCH 076/101] arm64:dts: nanopi-a64 set right phy-mode to rgmii-id
set right phy-mode for NPI A64 to rgmii-id for working
onboard-ethernet
Signed-off-by: root <guido.lehwalder@gmail.com>
---
@@ -10,10 +12,10 @@ Signed-off-by: root <guido.lehwalder@gmail.com>
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-nanopi-a64.dts b/arch/arm64/boot/dts/allwinner/sun50i-a64-nanopi-a64.dts
index 0cf3d2e61..25f07cf89 100644
index e74c48b92..9bccbf6d3 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-a64-nanopi-a64.dts
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-nanopi-a64.dts
@@ -94,7 +94,7 @@ &ehci1 {
@@ -80,7 +80,7 @@ &ehci1 {
&emac {
pinctrl-names = "default";
pinctrl-0 = <&rgmii_pins>;
@@ -23,5 +25,5 @@ index 0cf3d2e61..25f07cf89 100644
phy-supply = <&reg_dcdc1>;
status = "okay";
--
Created with Armbian build tools https://github.com/armbian/build
2.31.1

View File

@@ -0,0 +1,24 @@
From f95f6c86d61601400569700a5cb2e006d4210af3 Mon Sep 17 00:00:00 2001
From: The-going <48602507+The-going@users.noreply.github.com>
Date: Fri, 28 Jan 2022 15:52:48 +0300
Subject: [PATCH 3/4] arm64:dts: sun50i-a64 force mmc0 bus-width
---
arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi
index 17031c35d..cee9cd579 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi
@@ -559,6 +559,7 @@ mmc0: mmc@1c0f000 {
interrupts = <GIC_SPI 60 IRQ_TYPE_LEVEL_HIGH>;
max-frequency = <150000000>;
status = "disabled";
+ bus-width = <0x4>;
#address-cells = <1>;
#size-cells = <0>;
};
--
2.31.1

View File

@@ -0,0 +1,24 @@
From b81777f105ab05f76feb45c83f6616b05c953703 Mon Sep 17 00:00:00 2001
From: The-going <48602507+The-going@users.noreply.github.com>
Date: Fri, 28 Jan 2022 15:48:25 +0300
Subject: [PATCH 2/4] arm64:dts: sun50i-a64-orangepi-win add aliase ethernet1
---
arch/arm64/boot/dts/allwinner/sun50i-a64-orangepi-win.dts | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-orangepi-win.dts b/arch/arm64/boot/dts/allwinner/sun50i-a64-orangepi-win.dts
index b9ec9c7e1..917105a51 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-a64-orangepi-win.dts
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-orangepi-win.dts
@@ -15,6 +15,7 @@ / {
aliases {
ethernet0 = &emac;
+ ethernet1 = &brcmf;
serial0 = &uart0;
serial1 = &uart1;
serial2 = &uart2;
--
2.31.1

View File

@@ -1,9 +1,18 @@
From 494726be286d25bb95eba2ef9198abf2a567a71b Mon Sep 17 00:00:00 2001
From: The-going <48602507+The-going@users.noreply.github.com>
Date: Tue, 25 Jan 2022 19:10:06 +0300
Subject: [PATCH 099/101] arm64:dts: sun50i-a64-pine64 add spi0
---
.../boot/dts/allwinner/sun50i-a64-pine64.dts | 29 +++++++++++++++++++
1 file changed, 29 insertions(+)
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-pine64.dts b/arch/arm64/boot/dts/allwinner/sun50i-a64-pine64.dts
index 7161b06..66b8fa7 100644
index cba8ae875..fc0f7975c 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-a64-pine64.dts
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-pine64.dts
@@ -124,3 +124,32 @@
allwinner,leds-active-low;
@@ -350,3 +350,32 @@ &usb_otg {
&usbphy {
status = "okay";
};
+
@@ -35,3 +44,6 @@ index 7161b06..66b8fa7 100644
+ };
+ };
+};
--
2.31.1

View File

@@ -1,7 +1,7 @@
From 7f24fdacc41a34b5d1a39ae81f4f39660a5b72ca Mon Sep 17 00:00:00 2001
From 041084848f6c218a95c306248c44999439a26597 Mon Sep 17 00:00:00 2001
From: Vasily Khoruzhick <anarsoul@gmail.com>
Date: Wed, 31 Oct 2018 20:45:16 -0700
Subject: [PATCH 145/146] arm64: allwinner: a64: enable Bluetooth On Pine64
Subject: [PATCH 066/101] arm64:dts: sun50i-a64-pine64 enable Bluetooth
Pine64 has optional RTL8723BS WiFi + BT module, BT is connected to UART1
and uses PL4 as BT reset, PL5 as device wake GPIO, PL6 as host wake GPIO
@@ -15,10 +15,10 @@ Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-pine64.dts b/arch/arm64/boot/dts/allwinner/sun50i-a64-pine64.dts
index f6fc0ed2f4ec..8e55e81c3236 100644
index a08c97f23..cba8ae875 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-a64-pine64.dts
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-pine64.dts
@@ -333,7 +333,15 @@
@@ -310,7 +310,15 @@ &uart0 {
&uart1 {
pinctrl-names = "default";
pinctrl-0 = <&uart1_pins>, <&uart1_rts_cts_pins>;
@@ -36,5 +36,5 @@ index f6fc0ed2f4ec..8e55e81c3236 100644
/* On Pi-2 connector */
--
2.17.1
2.31.1

View File

@@ -1,7 +1,7 @@
From a5b709a81ad9a5e2e6e4be6a696711ad7f35ad57 Mon Sep 17 00:00:00 2001
From a75d699946645e521260b4a099937cd563eeeae8 Mon Sep 17 00:00:00 2001
From: Icenowy Zheng <icenowy@aosc.io>
Date: Thu, 9 Feb 2017 00:18:56 +0800
Subject: [PATCH 001/146] arm64: allwinner: a64: enable Wi-Fi for Pine64
Subject: [PATCH 004/101] arm64:dts: sun50i-a64-pine64 enable wifi mmc1
The Wi-Fi modules of Pine64 is powered via DLDO4 and ELDO1 (the latter
one provides I/O voltage).
@@ -14,12 +14,12 @@ Signed-off-by: Icenowy Zheng <icenowy@aosc.io>
1 file changed, 16 insertions(+)
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-pine64.dts b/arch/arm64/boot/dts/allwinner/sun50i-a64-pine64.dts
index 1b9b92e541d2..d06b5b88f60e 100644
index 17886709b..a08c97f23 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-a64-pine64.dts
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-pine64.dts
@@ -62,6 +62,11 @@
chosen {
stdout-path = "serial0:115200n8";
@@ -35,6 +35,11 @@ hdmi_con_in: endpoint {
};
};
};
+
+ wifi_pwrseq: wifi_pwrseq {
@@ -28,8 +28,8 @@ index 1b9b92e541d2..d06b5b88f60e 100644
+ };
};
&ehci0 {
@@ -109,6 +114,17 @@
&codec {
@@ -128,6 +133,17 @@ &mmc0 {
status = "okay";
};
@@ -48,5 +48,5 @@ index 1b9b92e541d2..d06b5b88f60e 100644
status = "okay";
};
--
2.17.1
2.31.1

View File

@@ -1,7 +1,7 @@
From 26b3d6f8ffa77cb05066c11967a498d6dacbdc42 Mon Sep 17 00:00:00 2001
From baa2f7cf1d457a34b27d32fba0609b3eeabb6d7c Mon Sep 17 00:00:00 2001
From: Vasily Khoruzhick <anarsoul@gmail.com>
Date: Wed, 31 Oct 2018 20:43:26 -0700
Subject: [PATCH 144/146] arm64: allwinner: a64: enable Bluetooth On Pinebook
Subject: [PATCH 065/101] arm64:dts: sun50i-a64-pinebook enable Bluetooth
Pinebook has an RTL8723CS WiFi + BT chip, BT is connected to UART1
and uses PL4 as BT reset, PL5 as device wake GPIO, PL6 as host wake GPIO
@@ -15,10 +15,10 @@ Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
1 file changed, 14 insertions(+)
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinebook.dts b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinebook.dts
index 0f788400ece0..c1e57597f76a 100644
index 34e67f5f8..0cd5cf419 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinebook.dts
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinebook.dts
@@ -401,6 +401,20 @@
@@ -405,6 +405,20 @@ &uart0 {
status = "okay";
};
@@ -40,5 +40,5 @@ index 0f788400ece0..c1e57597f76a 100644
dr_mode = "host";
};
--
2.17.1
2.31.1

View File

@@ -1,18 +1,17 @@
From 87020e638ad511e0ebe9c72208d2f0192c905812 Mon Sep 17 00:00:00 2001
From 03f0067f158c4a8c31b26b17bb2c3eff06d32351 Mon Sep 17 00:00:00 2001
From: Vasily Khoruzhick <anarsoul@gmail.com>
Date: Sun, 3 Dec 2017 11:43:08 -0800
Subject: [PATCH 007/146] Add sopine HDMI sound and WiFi support
Subject: [PATCH 019/101] arm64:dts: sun50i-a64-sopine-baseboard Add i2s2 mmc1
---
.../allwinner/sun50i-a64-sopine-baseboard.dts | 18 ++++++++++++
arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi | 29 +++++++++++++++++++
2 files changed, 47 insertions(+)
.../dts/allwinner/sun50i-a64-sopine-baseboard.dts | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-sopine-baseboard.dts b/arch/arm64/boot/dts/allwinner/sun50i-a64-sopine-baseboard.dts
index c21f2331add6..8161895dde52 100644
index 970d52837..ee4fd195e 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-a64-sopine-baseboard.dts
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-sopine-baseboard.dts
@@ -86,6 +86,10 @@
@@ -100,6 +100,10 @@ &i2s2 {
status = "okay";
};
@@ -23,7 +22,7 @@ index c21f2331add6..8161895dde52 100644
&mdio {
ext_rgmii_phy: ethernet-phy@1 {
compatible = "ethernet-phy-ieee802.3-c22";
@@ -93,6 +97,16 @@
@@ -107,6 +111,16 @@ ext_rgmii_phy: ethernet-phy@1 {
};
};
@@ -40,3 +39,6 @@ index c21f2331add6..8161895dde52 100644
&mmc2 {
pinctrl-names = "default";
pinctrl-0 = <&mmc2_pins>;
--
2.31.1

View File

@@ -1,8 +1,8 @@
From b325cd227f2426f938a08168b5c1b40111562e9e Mon Sep 17 00:00:00 2001
From 57e9f66bb8891a1157533f8b7193f84fc1a4b568 Mon Sep 17 00:00:00 2001
From: Vasily Khoruzhick <anarsoul@gmail.com>
Date: Wed, 31 Oct 2018 20:50:09 -0700
Subject: [PATCH 146/146] arm64: allwinner: a64: enable Bluetooth On SoPine
baseboard
Subject: [PATCH 067/101] arm64:dts: sun50i-a64-sopine-baseboard enable
Bluetooth
SoPine has optional RTL8723BS WiFi + BT module, BT is connected to UART1
and uses PL4 as BT reset, PL5 as device wake GPIO, PL6 as host wake GPIO
@@ -16,10 +16,10 @@ Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
1 file changed, 14 insertions(+)
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-sopine-baseboard.dts b/arch/arm64/boot/dts/allwinner/sun50i-a64-sopine-baseboard.dts
index 9010bd58af1b..590a77769cde 100644
index ee4fd195e..56714cc3f 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-a64-sopine-baseboard.dts
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-sopine-baseboard.dts
@@ -230,6 +230,20 @@
@@ -197,6 +197,20 @@ &uart0 {
status = "okay";
};
@@ -37,9 +37,9 @@ index 9010bd58af1b..590a77769cde 100644
+ };
+};
+
&usb_otg {
dr_mode = "host";
status = "okay";
/* On Pi-2 connector */
&uart2 {
pinctrl-names = "default";
--
2.17.1
2.31.1

View File

@@ -1,8 +1,18 @@
From 00261eb89842912d41faca6ea0c46d13f9ffe7f6 Mon Sep 17 00:00:00 2001
From: The-going <48602507+The-going@users.noreply.github.com>
Date: Mon, 24 Jan 2022 19:24:24 +0300
Subject: [PATCH 088/101] arm64:dts: sun50i-h5-nanopi-neo2 add regulator, led
triger
---
.../dts/allwinner/sun50i-h5-nanopi-neo2.dts | 23 ++++++++++++++++++-
1 file changed, 22 insertions(+), 1 deletion(-)
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h5-nanopi-neo2.dts b/arch/arm64/boot/dts/allwinner/sun50i-h5-nanopi-neo2.dts
index ea417eb01..fcf5a1a04 100644
index 05486ccce..39331229c 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-h5-nanopi-neo2.dts
+++ b/arch/arm64/boot/dts/allwinner/sun50i-h5-nanopi-neo2.dts
@@ -26,12 +26,13 @@ leds {
@@ -25,12 +25,13 @@ leds {
led-0 {
label = "nanopi:green:pwr";
gpios = <&r_pio 0 10 GPIO_ACTIVE_HIGH>;
@@ -17,7 +27,7 @@ index ea417eb01..fcf5a1a04 100644
};
};
@@ -52,6 +53,22 @@ reg_vcc3v3: vcc3v3 {
@@ -51,6 +52,22 @@ reg_vcc3v3: vcc3v3 {
regulator-max-microvolt = <3300000>;
};
@@ -40,7 +50,7 @@ index ea417eb01..fcf5a1a04 100644
reg_usb0_vbus: usb0-vbus {
compatible = "regulator-fixed";
regulator-name = "usb0-vbus";
@@ -63,6 +80,10 @@ reg_usb0_vbus: usb0-vbus {
@@ -62,6 +79,10 @@ reg_usb0_vbus: usb0-vbus {
};
};
@@ -51,3 +61,6 @@ index ea417eb01..fcf5a1a04 100644
&ehci0 {
status = "okay";
};
--
2.31.1

View File

@@ -1,8 +1,17 @@
From 5084b907001b739337fda54ec442a35f2ed96afb Mon Sep 17 00:00:00 2001
From: The-going <48602507+The-going@users.noreply.github.com>
Date: Mon, 24 Jan 2022 19:27:52 +0300
Subject: [PATCH 089/101] arm64:dts: sun50i-h5-orangepi-pc2 add spi flash
---
.../dts/allwinner/sun50i-h5-orangepi-pc2.dts | 25 +++++++++++++++++++
1 file changed, 25 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 2582b113..93af1282 100644
index d7852fa4d..181a465fb 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-pc2.dts
+++ b/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-pc2.dts
@@ -271,6 +271,31 @@
@@ -239,6 +239,31 @@ reg_vdd_cpux: regulator@65 {
};
};
@@ -34,3 +43,6 @@ index 2582b113..93af1282 100644
&uart0 {
pinctrl-names = "default";
pinctrl-0 = <&uart0_pa_pins>;
--
2.31.1

View File

@@ -1,8 +1,17 @@
From 18df89efaaa1aba61f501ecdc674e58a732ddbd4 Mon Sep 17 00:00:00 2001
From: The-going <48602507+The-going@users.noreply.github.com>
Date: Mon, 24 Jan 2022 19:34:31 +0300
Subject: [PATCH 090/101] arm64:dts: sun50i-h5-orangepi-prime add regulator
---
.../allwinner/sun50i-h5-orangepi-prime.dts | 43 ++++++++++++++++---
1 file changed, 36 insertions(+), 7 deletions(-)
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-prime.dts b/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-prime.dts
index 93b8dd6be..bf9b9af71 100644
index 19b8538e0..2e2ff6cc1 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-prime.dts
+++ b/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-prime.dts
@@ -48,11 +48,19 @@
@@ -8,11 +8,19 @@
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
@@ -22,7 +31,7 @@ index 93b8dd6be..bf9b9af71 100644
aliases {
ethernet0 = &emac;
serial0 = &uart0;
@@ -109,13 +117,6 @@
@@ -68,13 +76,6 @@ reg_gmac_3v3: gmac-3v3 {
gpio = <&pio 3 6 GPIO_ACTIVE_HIGH>;
};
@@ -36,7 +45,7 @@ index 93b8dd6be..bf9b9af71 100644
reg_usb0_vbus: usb0-vbus {
compatible = "regulator-fixed";
regulator-name = "usb0-vbus";
@@ -132,6 +133,10 @@
@@ -91,6 +92,10 @@ wifi_pwrseq: wifi_pwrseq {
};
};
@@ -47,8 +56,8 @@ index 93b8dd6be..bf9b9af71 100644
&codec {
allwinner,audio-routing =
"Line Out", "LINEOUT",
@@ -226,6 +231,30 @@
&ohci3 {
@@ -189,6 +194,30 @@ &ohci3 {
&sound_hdmi {
status = "okay";
};
+&r_i2c {
@@ -78,3 +87,6 @@ index 93b8dd6be..bf9b9af71 100644
&uart0 {
pinctrl-names = "default";
--
2.31.1

View File

@@ -1,5 +1,14 @@
From 03864f045fcdcf3154d14f348a2c11fb46f3ed8f Mon Sep 17 00:00:00 2001
From: The-going <48602507+The-going@users.noreply.github.com>
Date: Mon, 24 Jan 2022 19:49:11 +0300
Subject: [PATCH 091/101] arm64:dts: sun50i-h5-orangepi-zero-plus add regulator
---
.../sun50i-h5-orangepi-zero-plus.dts | 25 ++++++++++++++++++-
1 file changed, 24 insertions(+), 1 deletion(-)
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus.dts b/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus.dts
index ef5ca6444..a3359924f 100644
index 7ec5ac850..dfa5fd2a7 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus.dts
+++ b/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus.dts
@@ -4,6 +4,7 @@
@@ -53,12 +62,6 @@ index ef5ca6444..a3359924f 100644
};
&ehci0 {
@@ -69,7 +92,7 @@ &emac {
pinctrl-0 = <&emac_rgmii_pins>;
phy-supply = <&reg_gmac_3v3>;
phy-handle = <&ext_rgmii_phy>;
- phy-mode = "rgmii";
+ phy-mode = "rgmii-id";
status = "okay";
};
--
2.31.1

View File

@@ -1,5 +1,15 @@
From 2c0599854c3c4835aa778db604eba54f0dc5feee Mon Sep 17 00:00:00 2001
From: The-going <48602507+The-going@users.noreply.github.com>
Date: Mon, 24 Jan 2022 19:54:04 +0300
Subject: [PATCH 092/101] arm64:dts: sun50i-h5-orangepi-zero-plus2
regulator-gpio fix
---
.../sun50i-h5-orangepi-zero-plus2.dts | 58 ++++++++++++++-----
1 file changed, 45 insertions(+), 13 deletions(-)
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus2.dts b/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus2.dts
index de19e68eb..e1514bb68 100644
index 3e69ebde5..999fdcd96 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus2.dts
+++ b/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus2.dts
@@ -4,6 +4,7 @@
@@ -79,7 +89,7 @@ index de19e68eb..e1514bb68 100644
};
&de {
@@ -141,3 +164,12 @@ &usb_otg {
@@ -149,3 +172,12 @@ &usb_otg {
&usbphy {
status = "okay";
};
@@ -92,3 +102,6 @@ index de19e68eb..e1514bb68 100644
+&usbphy {
+ status = "okay";
+};
--
2.31.1

View File

@@ -1,7 +1,7 @@
From 1b08baab634bebd4ef94ca449b81d7550c91abf0 Mon Sep 17 00:00:00 2001
From c843cbfb9d8c5b68ed2fedfd2d6905ec852f2873 Mon Sep 17 00:00:00 2001
From: Jernej Skrabec <jernej.skrabec@siol.net>
Date: Sun, 12 Jan 2020 12:09:12 +0100
Subject: [PATCH 3/4] arm64: dts: allwinner: h6: Add AC200 EPHY related nodes
Subject: [PATCH 011/101] arm64:dts: sun50i-h6: Add AC200 EPHY related nodes
Signed-off-by: Jernej Skrabec <jernej.skrabec@siol.net>
---
@@ -9,12 +9,12 @@ Signed-off-by: Jernej Skrabec <jernej.skrabec@siol.net>
1 file changed, 63 insertions(+)
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi
index 3329283e38ab..81caf1e96407 100644
index 6cdebbbff..7c17076d9 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi
+++ b/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi
@@ -16,6 +16,16 @@
#address-cells = <1>;
#size-cells = <1>;
@@ -22,6 +22,16 @@ aliases {
mmc2 = &mmc2;
};
+ ac200_pwm_clk: ac200_clk {
+ compatible = "pwm-clock";
@@ -29,22 +29,21 @@ index 3329283e38ab..81caf1e96407 100644
cpus {
#address-cells = <1>;
#size-cells = <0>;
@@ -248,6 +258,10 @@
ths_calibration: thermal-sensor-calibration@14 {
@@ -307,6 +317,10 @@ ths_calibration: thermal-sensor-calibration@14 {
reg = <0x14 0x8>;
};
+
+ ephy_calibration: ephy-calibration@2c {
+ reg = <0x2c 0x2>;
+ };
};
watchdog: watchdog@30090a0 {
@@ -291,6 +305,14 @@
function = "emac";
+
cpu_speed_grade: cpu-speed-grade@1c {
reg = <0x1c 0x4>;
};
@@ -364,6 +378,14 @@ ext_rgmii_pins: rgmii-pins {
drive-strength = <40>;
};
+
+ /omit-if-no-ref/
+ ext_rmii_pins: rmii_pins {
+ pins = "PA0", "PA1", "PA2", "PA3", "PA4",
@@ -52,22 +51,23 @@ index 3329283e38ab..81caf1e96407 100644
+ function = "emac";
+ drive-strength = <40>;
+ };
+
hdmi_pins: hdmi-pins {
pins = "PH8", "PH9", "PH10";
@@ -311,6 +333,11 @@
pins = "PD23", "PD24";
function = "hdmi";
@@ -384,6 +406,11 @@ i2c2_pins: i2c2-pins {
function = "i2c2";
};
+
+ i2c3_pins: i2c3-pins {
+ pins = "PB17", "PB18";
+ function = "i2c3";
+ };
+
mmc0_pins: mmc0-pins {
pins = "PF0", "PF1", "PF2", "PF3",
@@ -329,6 +356,11 @@
"PF4", "PF5";
@@ -401,6 +428,11 @@ mmc1_pins: mmc1-pins {
bias-pull-up;
};
@@ -79,7 +79,7 @@ index 3329283e38ab..81caf1e96407 100644
mmc2_pins: mmc2-pins {
pins = "PC1", "PC4", "PC5", "PC6",
"PC7", "PC8", "PC9", "PC10",
@@ -504,6 +536,37 @@
@@ -643,6 +675,37 @@ spi1: spi@5011000 {
#size-cells = <0>;
};
@@ -118,5 +118,5 @@ index 3329283e38ab..81caf1e96407 100644
compatible = "allwinner,sun50i-h6-emac",
"allwinner,sun50i-a64-emac";
--
2.20.1
2.31.1

View File

@@ -1,9 +1,18 @@
From 86694ad8ba1f02ba3148b282b1bdf710fd07d83b Mon Sep 17 00:00:00 2001
From: The-going <48602507+The-going@users.noreply.github.com>
Date: Sun, 23 Jan 2022 20:49:27 +0300
Subject: [PATCH 023/101] arm64:dts: sun50i-h6 Add r_uart uart2-3 pins
---
arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi | 60 ++++++++++++++++----
1 file changed, 50 insertions(+), 10 deletions(-)
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi
index dc785da9c..141fd186b 100644
index 7c17076d9..ceda702d6 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi
+++ b/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi
@@ -374,6 +381,17 @@
#dma-cells = <1>;
@@ -307,6 +307,17 @@ msgbox: mailbox@3003000 {
#mbox-cells = <1>;
};
+ gic: interrupt-controller@3021000 {
@@ -20,7 +29,7 @@ index dc785da9c..141fd186b 100644
sid: efuse@3006000 {
compatible = "allwinner,sun50i-h6-sid";
reg = <0x03006000 0x400>;
@@ -279,6 +305,7 @@
@@ -370,6 +381,7 @@ pio: pinctrl@300b000 {
interrupt-controller;
#interrupt-cells = <3>;
@@ -28,15 +37,15 @@ index dc785da9c..141fd186b 100644
ext_rgmii_pins: rgmii-pins {
pins = "PD0", "PD1", "PD2", "PD3", "PD4",
"PD5", "PD7", "PD8", "PD9", "PD10",
@@ -309,6 +354,7 @@
bias-pull-up;
@@ -433,6 +445,7 @@ pwm1_pin: pwm1-pin {
function = "pwm1";
};
+ /omit-if-no-ref/
mmc2_pins: mmc2-pins {
pins = "PC1", "PC4", "PC5", "PC6",
"PC7", "PC8", "PC9", "PC10",
@@ -511,17 +540,26 @@
@@ -486,17 +499,26 @@ uart1_rts_cts_pins: uart1-rts-cts-pins {
pins = "PG8", "PG9";
function = "uart1";
};
@@ -72,8 +81,8 @@ index dc785da9c..141fd186b 100644
+ };
};
mmc0: mmc@4020000 {
@@ -963,6 +1033,19 @@
iommu: iommu@30f0000 {
@@ -1014,6 +1036,19 @@ tcon_tv_out_tcon_top: endpoint@1 {
};
};
@@ -93,9 +102,9 @@ index dc785da9c..141fd186b 100644
rtc: rtc@7000000 {
compatible = "allwinner,sun50i-h6-rtc";
reg = <0x07000000 0x400>;
@@ -1021,6 +1104,11 @@
pins = "PL9";
function = "s_cir_rx";
@@ -1078,6 +1113,11 @@ r_rsb_pins: r-rsb-pins {
pins = "PL0", "PL1";
function = "s_rsb";
};
+
+ r_uart_pins: r-uart-pins {
@@ -105,3 +114,6 @@ index dc785da9c..141fd186b 100644
};
r_ir: ir@7040000 {
--
2.31.1

View File

@@ -0,0 +1,25 @@
From 0d6606772184ef516d18670dcacadd7d29bb744c Mon Sep 17 00:00:00 2001
From: The-going <48602507+The-going@users.noreply.github.com>
Date: Tue, 25 Jan 2022 17:06:21 +0300
Subject: [PATCH 094/101] arm64:dts: sun50i-h6-orangepi-3 delete-node &spi0
---
arch/arm64/boot/dts/allwinner/sun50i-h6-orangepi-3.dts | 2 ++
1 file changed, 2 insertions(+)
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h6-orangepi-3.dts b/arch/arm64/boot/dts/allwinner/sun50i-h6-orangepi-3.dts
index 5780ae248..33678b938 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-h6-orangepi-3.dts
+++ b/arch/arm64/boot/dts/allwinner/sun50i-h6-orangepi-3.dts
@@ -347,6 +347,8 @@ &sound_hdmi {
status = "okay";
};
+/delete-node/ &spi0;
+
&uart0 {
pinctrl-names = "default";
pinctrl-0 = <&uart0_ph_pins>;
--
2.31.1

View File

@@ -1,7 +1,8 @@
From 1e8fd722fb2bff6748f89c89dd0c2b0974357211 Mon Sep 17 00:00:00 2001
From 7301a90cf33bdff78a22572e32daa3738544ee11 Mon Sep 17 00:00:00 2001
From: Igor Pecovnik <igor.pecovnik@gmail.com>
Date: Thu, 22 Jul 2021 08:56:39 +0200
Subject: [PATCH] board h6 orangepilite2 enable spi0, usb3phy and dwc3
Subject: [PATCH 095/101] arm64:dts: sun50i-h6-orangepi-lite2 spi0, usb3phy,
dwc3 enable
Signed-off-by: Igor Pecovnik <igor.pecovnik@gmail.com>
---
@@ -56,5 +57,5 @@ index e8770858b..ee6c01da5 100644
+ status = "okay";
+};
--
Created with Armbian build tools https://github.com/armbian/build
2.31.1

View File

@@ -0,0 +1,36 @@
From 190d32328799259a2edb4a7aab4f9ca3cd098e63 Mon Sep 17 00:00:00 2001
From: The-going <48602507+The-going@users.noreply.github.com>
Date: Tue, 25 Jan 2022 19:05:25 +0300
Subject: [PATCH 098/101] arm64:dts: sun50i-h6-pine-h64 add dwc3 usb3phy
---
arch/arm64/boot/dts/allwinner/sun50i-h6-pine-h64.dts | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h6-pine-h64.dts b/arch/arm64/boot/dts/allwinner/sun50i-h6-pine-h64.dts
index 41d3b5d21..454d2a297 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-h6-pine-h64.dts
+++ b/arch/arm64/boot/dts/allwinner/sun50i-h6-pine-h64.dts
@@ -89,6 +89,10 @@ reg_usb_vbus: vbus {
};
};
+&dwc3 {
+ status = "okay";
+};
+
&cpu0 {
cpu-supply = <&reg_dcdca>;
};
@@ -378,3 +382,8 @@ &usb2phy {
usb3_vbus-supply = <&reg_usb_vbus>;
status = "okay";
};
+
+&usb3phy {
+ phy-supply = <&reg_usb_vbus>;
+ status = "okay";
+};
--
2.31.1

View File

@@ -1,9 +1,18 @@
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h6-pine-h64.dts-old b/arch/arm64/boot/dts/allwinner/sun50i-h6-pine-h64.dts
index 52a1574..326195b 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-h6-pine-h64.dts-old
From cf049f587d77cb53db68aece926526389829bf80 Mon Sep 17 00:00:00 2001
From: The-going <48602507+The-going@users.noreply.github.com>
Date: Tue, 25 Jan 2022 18:41:47 +0300
Subject: [PATCH 096/101] arm64:dts: sun50i-h6-pine-h64 add wifi rtl8723cs
---
.../boot/dts/allwinner/sun50i-h6-pine-h64.dts | 38 +++++++++++++++++++
1 file changed, 38 insertions(+)
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h6-pine-h64.dts b/arch/arm64/boot/dts/allwinner/sun50i-h6-pine-h64.dts
index 341f42ae0..41d3b5d21 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-h6-pine-h64.dts
+++ b/arch/arm64/boot/dts/allwinner/sun50i-h6-pine-h64.dts
@@ -75,6 +75,14 @@
enable-active-high;
@@ -41,6 +41,14 @@ hdmi_con_in: endpoint {
};
};
+ wifi_pwrseq: wifi_pwrseq {
@@ -17,7 +26,7 @@ index 52a1574..326195b 100644
leds {
compatible = "gpio-leds";
@@ -160,6 +168,24 @@
@@ -141,6 +149,24 @@ &mmc0 {
status = "okay";
};
@@ -40,9 +49,9 @@ index 52a1574..326195b 100644
+};
+
&mmc2 {
pinctrl-names = "default";
pinctrl-0 = <&mmc2_pins>;
@@ -263,12 +263,24 @@
vmmc-supply = <&reg_cldo1>;
vqmmc-supply = <&reg_bldo2>;
@@ -234,12 +260,24 @@ reg_cldo1: cldo1 {
};
reg_cldo2: cldo2 {
@@ -67,3 +76,6 @@ index 52a1574..326195b 100644
regulator-min-microvolt = <3300000>;
regulator-max-microvolt = <3300000>;
regulator-name = "vcc-wifi-2";
--
2.31.1

View File

@@ -1,7 +1,7 @@
From 15a2214233c38b98cb76e7214c83fbc26068a909 Mon Sep 17 00:00:00 2001
From 30ac1964293d718fe9fe16f8beec7c1cc80e18cc Mon Sep 17 00:00:00 2001
From: Jernej Skrabec <jernej.skrabec@siol.net>
Date: Sun, 12 Jan 2020 12:19:51 +0100
Subject: [PATCH 4/4] arm64: dts: allwinner: h6: tanix-tx6: Enable ethernet
Subject: [PATCH 013/101] arm64:dts: sun50i-h6-tanix-tx6 Enable ethernet
Signed-off-by: Jernej Skrabec <jernej.skrabec@siol.net>
---
@@ -9,10 +9,10 @@ Signed-off-by: Jernej Skrabec <jernej.skrabec@siol.net>
1 file changed, 32 insertions(+)
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h6-tanix-tx6.dts b/arch/arm64/boot/dts/allwinner/sun50i-h6-tanix-tx6.dts
index 83e6cb0e59ce..41a2e3454be5 100644
index e91860a9e..d21dfe721 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-h6-tanix-tx6.dts
+++ b/arch/arm64/boot/dts/allwinner/sun50i-h6-tanix-tx6.dts
@@ -12,6 +12,7 @@
@@ -13,6 +13,7 @@ / {
compatible = "oranth,tanix-tx6", "allwinner,sun50i-h6";
aliases {
@@ -20,8 +20,8 @@ index 83e6cb0e59ce..41a2e3454be5 100644
serial0 = &uart0;
};
@@ -39,6 +40,14 @@
};
@@ -58,6 +59,14 @@ &cpu0 {
cpu-supply = <&reg_vdd_cpu_gpu>;
};
+&ac200_ephy {
@@ -35,7 +35,7 @@ index 83e6cb0e59ce..41a2e3454be5 100644
&de {
status = "okay";
};
@@ -47,6 +56,14 @@
@@ -66,6 +75,14 @@ &dwc3 {
status = "okay";
};
@@ -50,8 +50,8 @@ index 83e6cb0e59ce..41a2e3454be5 100644
&ehci0 {
status = "okay";
};
@@ -69,6 +86,17 @@
};
@@ -93,6 +110,17 @@ &i2s1 {
status = "okay";
};
+&i2c3 {
@@ -68,8 +68,8 @@ index 83e6cb0e59ce..41a2e3454be5 100644
&mmc0 {
pinctrl-names = "default";
pinctrl-0 = <&mmc0_pins>;
@@ -86,6 +114,10 @@
status = "okay";
@@ -126,6 +154,10 @@ &pio {
vcc-pg-supply = <&reg_vcc1v8>;
};
+&pwm {
@@ -80,5 +80,5 @@ index 83e6cb0e59ce..41a2e3454be5 100644
linux,rc-map-name = "rc-tanix-tx5max";
status = "okay";
--
2.20.1
2.31.1

View File

@@ -1,8 +1,17 @@
From 9e69bb4e0f9767b1ace285cf3227b5a82f6ace3a Mon Sep 17 00:00:00 2001
From: The-going <48602507+The-going@users.noreply.github.com>
Date: Fri, 28 Jan 2022 15:19:32 +0300
Subject: [PATCH 8/8] arm64:dts: sun50i-h6.dtsi add pinctrl pins for spi
---
arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi
index 2c15b3fb0..00794a6a1 100644
index 35279469c..0bea1c77c 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi
+++ b/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi
@@ -608,6 +670,8 @@ spi0: spi@5010000 {
@@ -677,6 +677,8 @@ spi0: spi@5010000 {
clock-names = "ahb", "mod";
dmas = <&dma 22>, <&dma 22>;
dma-names = "rx", "tx";
@@ -11,7 +20,7 @@ index 2c15b3fb0..00794a6a1 100644
resets = <&ccu RST_BUS_SPI0>;
status = "disabled";
#address-cells = <1>;
@@ -623,6 +687,8 @@ spi1: spi@5011000 {
@@ -692,6 +694,8 @@ spi1: spi@5011000 {
clock-names = "ahb", "mod";
dmas = <&dma 23>, <&dma 23>;
dma-names = "rx", "tx";
@@ -20,3 +29,6 @@ index 2c15b3fb0..00794a6a1 100644
resets = <&ccu RST_BUS_SPI1>;
status = "disabled";
#address-cells = <1>;
--
2.31.1

View File

@@ -1,5 +1,14 @@
From 9eac817d9c58eee57d287e09e1ff1b5e62746342 Mon Sep 17 00:00:00 2001
From: The-going <48602507+The-going@users.noreply.github.com>
Date: Tue, 25 Jan 2022 17:02:30 +0300
Subject: [PATCH 093/101] arm64:dts: sun50i-h6.dtsi improve thermals
---
arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi | 68 ++++++++++++++++----
1 file changed, 55 insertions(+), 13 deletions(-)
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi
index 5840db1ef..b3717ebb7 100644
index ceda702d6..35279469c 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi
+++ b/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi
@@ -1,5 +1,6 @@
@@ -9,7 +18,7 @@ index 5840db1ef..b3717ebb7 100644
#include <dt-bindings/interrupt-controller/arm-gic.h>
#include <dt-bindings/clock/sun50i-h6-ccu.h>
@@ -1151,33 +1152,74 @@ ths: thermal-sensor@5070400 {
@@ -1177,33 +1178,74 @@ ths: thermal-sensor@5070400 {
thermal-zones {
cpu-thermal {
@@ -97,3 +106,6 @@ index 5840db1ef..b3717ebb7 100644
};
gpu-thermal {
--
2.31.1

View File

@@ -1,7 +1,7 @@
From 53ef90b3e9bf8cfba32714d8a5adc150e79cb0f3 Mon Sep 17 00:00:00 2001
From 47d026ab3c8dbb7a8da1791a1fa23466c1e9d160 Mon Sep 17 00:00:00 2001
From: Jernej Skrabec <jernej.skrabec@gmail.com>
Date: Fri, 15 Oct 2021 21:09:42 +0200
Subject: [PATCH 18/37] arm64: dts: allwinner: h616: orangepi-zero2: Enable GPU
Subject: [PATCH 038/101] arm64:dts: sun50i-h616-orangepi-zero2 Enable GPU mali
Signed-off-by: Jernej Skrabec <jernej.skrabec@gmail.com>
---
@@ -9,11 +9,11 @@ Signed-off-by: Jernej Skrabec <jernej.skrabec@gmail.com>
1 file changed, 5 insertions(+)
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h616-orangepi-zero2.dts b/arch/arm64/boot/dts/allwinner/sun50i-h616-orangepi-zero2.dts
index 8f7ec0077fca..67f8077f9fbd 100644
index a26201288..39e639b53 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-h616-orangepi-zero2.dts
+++ b/arch/arm64/boot/dts/allwinner/sun50i-h616-orangepi-zero2.dts
@@ -92,6 +92,11 @@ hdmi_out_con: endpoint {
};
@@ -66,6 +66,11 @@ &ehci1 {
status = "okay";
};
+&gpu {
@@ -25,5 +25,5 @@ index 8f7ec0077fca..67f8077f9fbd 100644
&emac0 {
--
2.25.1
2.31.1

View File

@@ -1,7 +1,8 @@
From ed7ecee2044284e7c7f8ccbca216d9742ed49689 Mon Sep 17 00:00:00 2001
From 46d15dff209a4a14c9596c4f050c2a69aaf0408b Mon Sep 17 00:00:00 2001
From: Jernej Skrabec <jernej.skrabec@gmail.com>
Date: Mon, 14 Jun 2021 20:48:15 +0200
Subject: [PATCH 34/37] T95 eth & sd card hack
Subject: [PATCH 059/101] arm64:dts: sun50i-h616-x96-mate T95 eth & sd card
hack
Signed-off-by: Jernej Skrabec <jernej.skrabec@gmail.com>
---
@@ -10,7 +11,7 @@ Signed-off-by: Jernej Skrabec <jernej.skrabec@gmail.com>
2 files changed, 46 insertions(+), 1 deletion(-)
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h616-x96-mate.dts b/arch/arm64/boot/dts/allwinner/sun50i-h616-x96-mate.dts
index b960bb310289..51f1764edc3d 100644
index b960bb310..51f1764ed 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-h616-x96-mate.dts
+++ b/arch/arm64/boot/dts/allwinner/sun50i-h616-x96-mate.dts
@@ -15,6 +15,7 @@ / {
@@ -55,10 +56,10 @@ index b960bb310289..51f1764edc3d 100644
status = "okay";
};
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h616.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-h616.dtsi
index 0c196c9d7945..ad12368270f2 100644
index 805b1e6b7..6794a8035 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-h616.dtsi
+++ b/arch/arm64/boot/dts/allwinner/sun50i-h616.dtsi
@@ -301,6 +301,13 @@ mmc2_pins: mmc2-pins {
@@ -242,6 +242,13 @@ mmc2_pins: mmc2-pins {
bias-pull-up;
};
@@ -72,7 +73,7 @@ index 0c196c9d7945..ad12368270f2 100644
spi0_pins: spi0-pins {
pins = "PC0", "PC2", "PC3", "PC4";
function = "spi0";
@@ -587,6 +594,25 @@ mdio0: mdio {
@@ -528,6 +535,25 @@ mdio0: mdio {
};
};
@@ -99,5 +100,5 @@ index 0c196c9d7945..ad12368270f2 100644
compatible = "allwinner,sun50i-h616-musb",
"allwinner,sun8i-h3-musb";
--
2.25.1
2.31.1

View File

@@ -1,7 +1,7 @@
From 0f9eacdccea87c7c958512245a4ef9cf225a3cb3 Mon Sep 17 00:00:00 2001
From d1fae81ee1b7e5c1259119e35e9c100e8e9f2a2d Mon Sep 17 00:00:00 2001
From: Jernej Skrabec <jernej.skrabec@gmail.com>
Date: Mon, 14 Jun 2021 22:39:58 +0200
Subject: [PATCH 35/37] x96 hdmi
Subject: [PATCH 060/101] arm64:dts: sun50i-h616-x96-mate add hdmi
Signed-off-by: Jernej Skrabec <jernej.skrabec@gmail.com>
---
@@ -9,7 +9,7 @@ Signed-off-by: Jernej Skrabec <jernej.skrabec@gmail.com>
1 file changed, 26 insertions(+)
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h616-x96-mate.dts b/arch/arm64/boot/dts/allwinner/sun50i-h616-x96-mate.dts
index 51f1764edc3d..3640160a369e 100644
index 51f1764ed..3640160a3 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-h616-x96-mate.dts
+++ b/arch/arm64/boot/dts/allwinner/sun50i-h616-x96-mate.dts
@@ -23,6 +23,17 @@ chosen {
@@ -60,5 +60,5 @@ index 51f1764edc3d..3640160a369e 100644
status = "okay";
};
--
2.25.1
2.31.1

View File

@@ -0,0 +1,31 @@
From a6ff7a92a7bc37748410072f340bbbcda8c6206e Mon Sep 17 00:00:00 2001
From: chbgdn <chbgdn@gmail.com>
Date: Fri, 15 Oct 2021 23:08:52 +0300
Subject: [PATCH] drv:bluetooth: btrtl: Add rtl8822cs (hci ver 0008)
Signed-off-by: chbgdn <chbgdn@gmail.com>
---
drivers/bluetooth/btrtl.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/drivers/bluetooth/btrtl.c b/drivers/bluetooth/btrtl.c
index fd293a9c4..ad4085eed 100644
--- a/drivers/bluetooth/btrtl.c
+++ b/drivers/bluetooth/btrtl.c
@@ -192,6 +192,13 @@ static const struct id_table ic_id_table[] = {
.fw_name = "rtl_bt/rtl8822cs_fw.bin",
.cfg_name = "rtl_bt/rtl8822cs_config" },
+ /* 8822C with UART interface */
+ { IC_INFO(RTL_ROM_LMP_8822B, 0xc, 0x8, HCI_UART),
+ .config_needed = true,
+ .has_rom_version = true,
+ .fw_name = "rtl_bt/rtl8822cs_fw.bin",
+ .cfg_name = "rtl_bt/rtl8822cs_config" },
+
/* 8822C with USB interface */
{ IC_INFO(RTL_ROM_LMP_8822B, 0xc, 0xa, HCI_USB),
.config_needed = false,
--
2.31.1

View File

@@ -0,0 +1,32 @@
From 9c561be107f67a878c902970b0fca27f35baf071 Mon Sep 17 00:00:00 2001
From: Vyacheslav Bocharov <adeep@lexina.in>
Date: Tue, 19 Oct 2021 12:46:06 +0300
Subject: [PATCH 002/101] drv:bluetooth:hci_h5: power reset via gpio in
h5_btrtl_open
Add power reset via enable-gpios in h5_btrtl_open function.
Signed-off-by: Vyacheslav Bocharov <adeep@lexina.in>
---
drivers/bluetooth/hci_h5.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/drivers/bluetooth/hci_h5.c b/drivers/bluetooth/hci_h5.c
index c9b54335a..a56e378b1 100644
--- a/drivers/bluetooth/hci_h5.c
+++ b/drivers/bluetooth/hci_h5.c
@@ -971,6 +971,11 @@ static void h5_btrtl_open(struct h5 *h5)
pm_runtime_enable(&h5->hu->serdev->dev);
}
+ /* The controller needs reset to startup */
+ gpiod_set_value_cansleep(h5->enable_gpio, 0);
+ gpiod_set_value_cansleep(h5->device_wake_gpio, 0);
+ msleep(100);
+
/* The controller needs up to 500ms to wakeup */
gpiod_set_value_cansleep(h5->enable_gpio, 1);
gpiod_set_value_cansleep(h5->device_wake_gpio, 1);
--
2.31.1

View File

@@ -1,8 +1,7 @@
From 9c4d2eb582078788a3f115fef91824d9213e237d Mon Sep 17 00:00:00 2001
From e37139c6fd329a0893244063c86f8925d77d7337 Mon Sep 17 00:00:00 2001
From: Vasily Khoruzhick <anarsoul@gmail.com>
Date: Tue, 24 Jul 2018 10:17:55 -0700
Subject: [PATCH 074/146] a64: ccu: enable LDOs for pll-mipi and add min/max
rate for it
Subject: [PATCH 063/101] drv:clk:sunxi-ng: ccu: add min/max rate sun50i-a64
---
drivers/clk/sunxi-ng/ccu-sun50i-a64.c | 2 ++
@@ -11,10 +10,10 @@ Subject: [PATCH 074/146] a64: ccu: enable LDOs for pll-mipi and add min/max
3 files changed, 10 insertions(+)
diff --git a/drivers/clk/sunxi-ng/ccu-sun50i-a64.c b/drivers/clk/sunxi-ng/ccu-sun50i-a64.c
index 1fe3c3fbc9bc..7c645f2c017a 100644
index 3ea8b9ee6..ba10a76b5 100644
--- a/drivers/clk/sunxi-ng/ccu-sun50i-a64.c
+++ b/drivers/clk/sunxi-ng/ccu-sun50i-a64.c
@@ -163,6 +163,8 @@ static struct ccu_nkm pll_mipi_clk = {
@@ -196,6 +196,8 @@ static struct ccu_nkm pll_mipi_clk = {
.n = _SUNXI_CCU_MULT(8, 4),
.k = _SUNXI_CCU_MULT_MIN(4, 2, 2),
.m = _SUNXI_CCU_DIV(0, 4),
@@ -24,10 +23,10 @@ index 1fe3c3fbc9bc..7c645f2c017a 100644
.reg = 0x040,
.hw.init = CLK_HW_INIT("pll-mipi", "pll-video0",
diff --git a/drivers/clk/sunxi-ng/ccu_nkm.c b/drivers/clk/sunxi-ng/ccu_nkm.c
index 841840e35e61..01e6df4c1232 100644
index b9cfee027..5d687c1dc 100644
--- a/drivers/clk/sunxi-ng/ccu_nkm.c
+++ b/drivers/clk/sunxi-ng/ccu_nkm.c
@@ -122,6 +122,11 @@ static unsigned long ccu_nkm_round_rate(struct ccu_mux_internal *mux,
@@ -119,6 +119,11 @@ static unsigned long ccu_nkm_round_rate(struct ccu_mux_internal *mux,
_nkm.min_m = 1;
_nkm.max_m = nkm->m.max ?: 1 << nkm->m.width;
@@ -40,10 +39,10 @@ index 841840e35e61..01e6df4c1232 100644
rate *= nkm->fixed_post_div;
diff --git a/drivers/clk/sunxi-ng/ccu_nkm.h b/drivers/clk/sunxi-ng/ccu_nkm.h
index cc6efb70a102..6e01836ef122 100644
index 6601defb3..57aa8087c 100644
--- a/drivers/clk/sunxi-ng/ccu_nkm.h
+++ b/drivers/clk/sunxi-ng/ccu_nkm.h
@@ -36,6 +36,9 @@ struct ccu_nkm {
@@ -28,6 +28,9 @@ struct ccu_nkm {
unsigned int fixed_post_div;
@@ -54,5 +53,5 @@ index cc6efb70a102..6e01836ef122 100644
};
--
2.17.1
2.31.1

View File

@@ -1,8 +1,17 @@
From 6dcd635e0305930f9f6d0a57345e6b46095c344b Mon Sep 17 00:00:00 2001
From: The-going <48602507+The-going@users.noreply.github.com>
Date: Fri, 28 Jan 2022 14:10:52 +0300
Subject: [PATCH 3/8] drv:clk:sunxi-ng:ccu-sun50i-a64: revert ccu Pinebook-A64
---
drivers/clk/sunxi-ng/ccu-sun50i-a64.c | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/drivers/clk/sunxi-ng/ccu-sun50i-a64.c b/drivers/clk/sunxi-ng/ccu-sun50i-a64.c
index 52bad5f61..47eeb9a1e 100644
index ba10a76b5..b72cf0f37 100644
--- a/drivers/clk/sunxi-ng/ccu-sun50i-a64.c
+++ b/drivers/clk/sunxi-ng/ccu-sun50i-a64.c
@@ -558,8 +558,8 @@ static SUNXI_CCU_M_WITH_MUX_GATE(de_clk, "de", de_parents,
@@ -560,8 +560,8 @@ static SUNXI_CCU_M_WITH_MUX_GATE(de_clk, "de", de_parents,
* is required to restore the rate of TCON0 when the rate of PLL-Video0
* changed.
*/
@@ -13,7 +22,7 @@ index 52bad5f61..47eeb9a1e 100644
static SUNXI_CCU_MUX_TABLE_WITH_GATE(tcon0_clk, "tcon0", tcon0_parents,
tcon0_table, 0x118, 24, 3, BIT(31),
CLK_SET_RATE_PARENT);
@@ -1004,9 +1004,9 @@ static int sun50i_a64_ccu_probe(struct platform_device *pdev)
@@ -1006,9 +1006,9 @@ static int sun50i_a64_ccu_probe(struct platform_device *pdev)
}
/* Force the parent of TCON0 to PLL-MIPI */
@@ -24,9 +33,9 @@ index 52bad5f61..47eeb9a1e 100644
+// val &= ~GENMASK(26, 24);
+// writel(val | (0 << 24), reg + SUN50I_A64_TCON0_REG);
ret = sunxi_ccu_probe(pdev->dev.of_node, reg, &sun50i_a64_ccu_desc);
ret = devm_sunxi_ccu_probe(&pdev->dev, reg, &sun50i_a64_ccu_desc);
if (ret)
@@ -1020,8 +1020,8 @@ static int sun50i_a64_ccu_probe(struct platform_device *pdev)
@@ -1022,8 +1022,8 @@ static int sun50i_a64_ccu_probe(struct platform_device *pdev)
&sun50i_a64_cpu_nb);
/* Reset the rate of TCON0 clock when PLL-VIDEO0 is changed */
@@ -37,3 +46,6 @@ index 52bad5f61..47eeb9a1e 100644
return 0;
}
--
2.31.1

View File

@@ -1,8 +1,17 @@
From 0842ca056554ac01c0a2c0770496291ca76d4480 Mon Sep 17 00:00:00 2001
From: The-going <48602507+The-going@users.noreply.github.com>
Date: Fri, 28 Jan 2022 14:18:17 +0300
Subject: [PATCH 4/8] drv:clocksource:arm_arch_timer fix a64 timejump
---
drivers/clocksource/arm_arch_timer.c | 25 ++++++++++++++-----------
1 file changed, 14 insertions(+), 11 deletions(-)
diff --git a/drivers/clocksource/arm_arch_timer.c b/drivers/clocksource/arm_arch_timer.c
index 9a5464c62..91142959c 100644
index be6d741d4..ffc42573a 100644
--- a/drivers/clocksource/arm_arch_timer.c
+++ b/drivers/clocksource/arm_arch_timer.c
@@ -341,17 +341,20 @@ static u64 notrace arm64_858921_read_cntvct_el0(void)
@@ -357,17 +357,20 @@ static u64 notrace arm64_858921_read_cntvct_el0(void)
* with all ones or all zeros in the low bits. Bound the loop by the maximum
* number of CPU cycles in 3 consecutive 24 MHz counter periods.
*/
@@ -34,3 +43,6 @@ index 9a5464c62..91142959c 100644
})
static u64 notrace sun50i_a64_read_cntpct_el0(void)
--
2.31.1

View File

@@ -1,7 +1,7 @@
From ea69ff188dd5d9ac7162f05a22bf299b83a7536e Mon Sep 17 00:00:00 2001
From ec4ed2069d597d7790795e3cf6a02c6b868a3533 Mon Sep 17 00:00:00 2001
From: Maxime Ripard <maxime.ripard@free-electrons.com>
Date: Mon, 7 Dec 2015 09:33:28 +0100
Subject: [PATCH 005/146] drm: gem: cma: Export with handle allocator
Subject: [PATCH 015/101] drv:gpu:drm: gem: cma: Export with handle allocator
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
---
@@ -10,10 +10,10 @@ Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
2 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/drm_gem_cma_helper.c b/drivers/gpu/drm/drm_gem_cma_helper.c
index 80a5115c3846..077c61f065d9 100644
index 9d0567455..67145ce30 100644
--- a/drivers/gpu/drm/drm_gem_cma_helper.c
+++ b/drivers/gpu/drm/drm_gem_cma_helper.c
@@ -142,7 +142,7 @@ EXPORT_SYMBOL_GPL(drm_gem_cma_create);
@@ -162,7 +162,7 @@ EXPORT_SYMBOL_GPL(drm_gem_cma_create);
* A struct drm_gem_cma_object * on success or an ERR_PTR()-encoded negative
* error code on failure.
*/
@@ -22,7 +22,7 @@ index 80a5115c3846..077c61f065d9 100644
drm_gem_cma_create_with_handle(struct drm_file *file_priv,
struct drm_device *drm, size_t size,
uint32_t *handle)
@@ -169,6 +169,7 @@ drm_gem_cma_create_with_handle(struct drm_file *file_priv,
@@ -189,6 +189,7 @@ drm_gem_cma_create_with_handle(struct drm_file *file_priv,
return cma_obj;
}
@@ -31,10 +31,10 @@ index 80a5115c3846..077c61f065d9 100644
/**
* drm_gem_cma_free_object - free resources associated with a CMA GEM object
diff --git a/include/drm/drm_gem_cma_helper.h b/include/drm/drm_gem_cma_helper.h
index 19777145cf8e..79f397c91517 100644
index cd13508ac..32de8c5ad 100644
--- a/include/drm/drm_gem_cma_helper.h
+++ b/include/drm/drm_gem_cma_helper.h
@@ -79,6 +79,10 @@ int drm_gem_cma_mmap(struct file *filp, struct vm_area_struct *vma);
@@ -82,6 +82,10 @@ int drm_gem_cma_dumb_create(struct drm_file *file_priv,
/* allocate physical memory */
struct drm_gem_cma_object *drm_gem_cma_create(struct drm_device *drm,
size_t size);
@@ -46,5 +46,5 @@ index 19777145cf8e..79f397c91517 100644
extern const struct vm_operations_struct drm_gem_cma_vm_ops;
--
2.17.1
2.31.1

View File

@@ -1,9 +1,10 @@
From c1f367a69854abc4c359c98645ce47d550285344 Mon Sep 17 00:00:00 2001
From 049012898c54318e947458ade5fe07550a93acce Mon Sep 17 00:00:00 2001
From: Icenowy Zheng <icenowy@aosc.io>
Date: Sat, 28 Nov 2020 20:49:38 +0800
Subject: [PATCH] drm/panel: feiyang-fy07024di26a30d: cleanup if panel
attaching failed
Subject: [PATCH 100/101] drv:gpu:drm:panel: feiyang cleanup if attaching
failed
feiyang-fy07024di26a30d: cleanup if panel attaching failed
Attaching the panel can fail, so cleanup work is necessary, otherwise
a pointer to freed struct drm_panel* will remain in drm_panel code.
@@ -16,7 +17,7 @@ Signed-off-by: Icenowy Zheng <icenowy@aosc.io>
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/panel/panel-feiyang-fy07024di26a30d.c b/drivers/gpu/drm/panel/panel-feiyang-fy07024di26a30d.c
index 581661b506f8..f9c1f7bc8218 100644
index 581661b50..f9c1f7bc8 100644
--- a/drivers/gpu/drm/panel/panel-feiyang-fy07024di26a30d.c
+++ b/drivers/gpu/drm/panel/panel-feiyang-fy07024di26a30d.c
@@ -227,7 +227,13 @@ static int feiyang_dsi_probe(struct mipi_dsi_device *dsi)
@@ -35,5 +36,5 @@ index 581661b506f8..f9c1f7bc8218 100644
static int feiyang_dsi_remove(struct mipi_dsi_device *dsi)
--
2.28.0
2.31.1

View File

@@ -1,7 +1,7 @@
From b143de6aef8be007256082e0f89606b7f5e3c757 Mon Sep 17 00:00:00 2001
From 68a63631a714cc28c401f66613ec90dced5226fd Mon Sep 17 00:00:00 2001
From: Maxime Ripard <maxime.ripard@free-electrons.com>
Date: Mon, 7 Dec 2015 09:47:34 +0100
Subject: [PATCH 006/146] drm/sun4i: Add GEM allocator
Subject: [PATCH 017/101] drv:gpu:drm:sun4i: Add GEM allocator
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
---
@@ -11,19 +11,19 @@ Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
create mode 100644 include/uapi/drm/sun4i_drm.h
diff --git a/drivers/gpu/drm/sun4i/sun4i_drv.c b/drivers/gpu/drm/sun4i/sun4i_drv.c
index 8b0cd08034e0..9f5de14fb2fe 100644
index 54dd562e2..4a2c551be 100644
--- a/drivers/gpu/drm/sun4i/sun4i_drv.c
+++ b/drivers/gpu/drm/sun4i/sun4i_drv.c
@@ -22,6 +22,8 @@
#include <drm/drm_fb_helper.h>
#include <drm/drm_of.h>
@@ -23,6 +23,8 @@
#include <drm/drm_probe_helper.h>
#include <drm/drm_vblank.h>
+#include <uapi/drm/sun4i_drm.h>
+
#include "sun4i_drv.h"
#include "sun4i_frontend.h"
#include "sun4i_framebuffer.h"
@@ -30,6 +32,27 @@
@@ -41,6 +43,27 @@ static int drm_sun4i_gem_dumb_create(struct drm_file *file_priv,
DEFINE_DRM_GEM_CMA_FOPS(sun4i_drv_fops);
@@ -51,7 +51,7 @@ index 8b0cd08034e0..9f5de14fb2fe 100644
static const struct drm_driver sun4i_drv_driver = {
.driver_features = DRIVER_GEM | DRIVER_MODESET | DRIVER_ATOMIC,
@@ -42,6 +65,10 @@ static struct drm_driver sun4i_drv_driver = {
@@ -52,6 +75,10 @@ static const struct drm_driver sun4i_drv_driver = {
.major = 1,
.minor = 0,
@@ -60,11 +60,11 @@ index 8b0cd08034e0..9f5de14fb2fe 100644
+ .num_ioctls = ARRAY_SIZE(sun4i_drv_ioctls),
+
/* GEM Operations */
.dumb_create = drm_gem_cma_dumb_create,
.gem_free_object_unlocked = drm_gem_cma_free_object,
DRM_GEM_CMA_DRIVER_OPS_VMAP_WITH_DUMB_CREATE(drm_sun4i_gem_dumb_create),
};
diff --git a/include/uapi/drm/sun4i_drm.h b/include/uapi/drm/sun4i_drm.h
new file mode 100644
index 000000000000..67b9dd4ee594
index 000000000..67b9dd4ee
--- /dev/null
+++ b/include/uapi/drm/sun4i_drm.h
@@ -0,0 +1,29 @@
@@ -98,5 +98,5 @@ index 000000000000..67b9dd4ee594
+
+#endif
--
2.17.1
2.31.1

View File

@@ -1,3 +1,8 @@
From c8b0cc17860a6819e42fd8967c74963af943ee3b Mon Sep 17 00:00:00 2001
From: The-going <48602507+The-going@users.noreply.github.com>
Date: Mon, 24 Jan 2022 13:07:16 +0300
Subject: [PATCH 071/101] drv:gpu:drm:sun4i: Add HDMI audio sun4i-hdmi encoder
Add HDMI audio support for the sun4i-hdmi encoder, used on
the older Allwinner chips - A10, A20, A31.
@@ -7,32 +12,22 @@ there where some problems with them and only S16_LE is left.
Signed-off-by: Stefan Mavrodiev <stefan@olimex.com>
---
Changes for v3:
- Instead of platfrom_driver dynammicly register/unregister card
- Add Kconfig dependencies
- Restrore drvdata after card unregistering
Changes for v2:
- Create a new platform driver instead of using the HDMI encoder
- Expose a new kcontrol to the userspace holding the ELD data
- Wrap all macro arguments in parentheses
drivers/gpu/drm/sun4i/Kconfig | 11 +
drivers/gpu/drm/sun4i/Makefile | 3 +
drivers/gpu/drm/sun4i/sun4i_hdmi.h | 37 ++
drivers/gpu/drm/sun4i/sun4i_hdmi_audio.c | 450 +++++++++++++++++++++++
drivers/gpu/drm/sun4i/sun4i_hdmi_enc.c | 14 +
5 files changed, 515 insertions(+)
drivers/gpu/drm/sun4i/sun4i_hdmi_enc.c | 15 +
5 files changed, 516 insertions(+)
create mode 100644 drivers/gpu/drm/sun4i/sun4i_hdmi_audio.c
diff --git a/drivers/gpu/drm/sun4i/Kconfig b/drivers/gpu/drm/sun4i/Kconfig
index 37e90e42943f..ca2ab5d53dd4 100644
index 8c796de53..eebf67daf 100644
--- a/drivers/gpu/drm/sun4i/Kconfig
+++ b/drivers/gpu/drm/sun4i/Kconfig
@@ -23,6 +23,17 @@ config DRM_SUN4I_HDMI
Choose this option if you have an Allwinner SoC with an HDMI
controller.
+config DRM_SUN4I_HDMI_AUDIO
+ bool "Allwinner A10 HDMI Audio Support"
+ default y
@@ -45,16 +40,16 @@ index 37e90e42943f..ca2ab5d53dd4 100644
+ controller and want to use audio.
+
config DRM_SUN4I_HDMI_CEC
bool "Allwinner A10 HDMI CEC Support"
depends on DRM_SUN4I_HDMI
bool "Allwinner A10 HDMI CEC Support"
depends on DRM_SUN4I_HDMI
diff --git a/drivers/gpu/drm/sun4i/Makefile b/drivers/gpu/drm/sun4i/Makefile
index 0d04f2447b01..492bfd28ad2e 100644
index 0d04f2447..492bfd28a 100644
--- a/drivers/gpu/drm/sun4i/Makefile
+++ b/drivers/gpu/drm/sun4i/Makefile
@@ -5,6 +5,9 @@ sun4i-frontend-y += sun4i_frontend.o
sun4i-drm-y += sun4i_drv.o
sun4i-drm-y += sun4i_framebuffer.o
+ifdef CONFIG_DRM_SUN4I_HDMI_AUDIO
+sun4i-drm-hdmi-y += sun4i_hdmi_audio.o
+endif
@@ -62,13 +57,13 @@ index 0d04f2447b01..492bfd28ad2e 100644
sun4i-drm-hdmi-y += sun4i_hdmi_enc.o
sun4i-drm-hdmi-y += sun4i_hdmi_i2c.o
diff --git a/drivers/gpu/drm/sun4i/sun4i_hdmi.h b/drivers/gpu/drm/sun4i/sun4i_hdmi.h
index 7ad3f06c127e..28621d289655 100644
index 00ca35f07..d7e6a1f0c 100644
--- a/drivers/gpu/drm/sun4i/sun4i_hdmi.h
+++ b/drivers/gpu/drm/sun4i/sun4i_hdmi.h
@@ -42,7 +42,32 @@
#define SUN4I_HDMI_VID_TIMING_POL_VSYNC BIT(1)
#define SUN4I_HDMI_VID_TIMING_POL_HSYNC BIT(0)
+#define SUN4I_HDMI_AUDIO_CTRL_REG 0x040
+#define SUN4I_HDMI_AUDIO_CTRL_ENABLE BIT(31)
+#define SUN4I_HDMI_AUDIO_CTRL_RESET BIT(30)
@@ -95,13 +90,13 @@ index 7ad3f06c127e..28621d289655 100644
+
#define SUN4I_HDMI_AVI_INFOFRAME_REG(n) (0x080 + (n))
+#define SUN4I_HDMI_AUDIO_INFOFRAME_REG(n) (0x0a0 + (n))
#define SUN4I_HDMI_PAD_CTRL0_REG 0x200
#define SUN4I_HDMI_PAD_CTRL0_BIASEN BIT(31)
@@ -242,6 +267,11 @@ struct sun4i_hdmi_variant {
bool ddc_fifo_has_dir;
};
+struct sun4i_hdmi_audio {
+ struct snd_soc_card *card;
+ u8 channels;
@@ -113,17 +108,17 @@ index 7ad3f06c127e..28621d289655 100644
@@ -283,9 +313,14 @@ struct sun4i_hdmi {
struct regmap_field *field_ddc_sda_en;
struct regmap_field *field_ddc_sck_en;
+
struct sun4i_drv *drv;
bool hdmi_monitor;
+ bool hdmi_audio;
+
+ struct sun4i_hdmi_audio audio;
+
struct cec_adapter *cec_adap;
const struct sun4i_hdmi_variant *variant;
@@ -294,5 +329,7 @@ struct sun4i_hdmi {
int sun4i_ddc_create(struct sun4i_hdmi *hdmi, struct clk *clk);
@@ -131,11 +126,11 @@ index 7ad3f06c127e..28621d289655 100644
int sun4i_hdmi_i2c_create(struct device *dev, struct sun4i_hdmi *hdmi);
+int sun4i_hdmi_audio_create(struct sun4i_hdmi *hdmi);
+void sun4i_hdmi_audio_destroy(struct sun4i_hdmi *hdmi);
#endif /* _SUN4I_HDMI_H_ */
diff --git a/drivers/gpu/drm/sun4i/sun4i_hdmi_audio.c b/drivers/gpu/drm/sun4i/sun4i_hdmi_audio.c
new file mode 100644
index 000000000000..f42f2cea4e9e
index 000000000..2ac967bfd
--- /dev/null
+++ b/drivers/gpu/drm/sun4i/sun4i_hdmi_audio.c
@@ -0,0 +1,450 @@
@@ -590,22 +585,22 @@ index 000000000000..f42f2cea4e9e
+ dev_set_drvdata(hdmi->dev, data);
+}
diff --git a/drivers/gpu/drm/sun4i/sun4i_hdmi_enc.c b/drivers/gpu/drm/sun4i/sun4i_hdmi_enc.c
index 68d4644ac2dc..4cd35c97c503 100644
index 2f2c9f0a1..f75b63550 100644
--- a/drivers/gpu/drm/sun4i/sun4i_hdmi_enc.c
+++ b/drivers/gpu/drm/sun4i/sun4i_hdmi_enc.c
@@ -23,6 +23,8 @@
#include <drm/drm_print.h>
@@ -24,6 +24,8 @@
#include <drm/drm_probe_helper.h>
#include <drm/drm_simple_kms_helper.h>
+#include <sound/soc.h>
+
#include "sun4i_backend.h"
#include "sun4i_crtc.h"
#include "sun4i_drv.h"
@@ -87,6 +89,11 @@ static void sun4i_hdmi_disable(struct drm_encoder *encoder)
@@ -88,6 +90,11 @@ static void sun4i_hdmi_disable(struct drm_encoder *encoder)
DRM_DEBUG_DRIVER("Disabling the HDMI Output\n");
+#ifdef CONFIG_DRM_SUN4I_HDMI_AUDIO
+ if (hdmi->hdmi_audio)
+ sun4i_hdmi_audio_destroy(hdmi);
@@ -614,9 +609,9 @@ index 68d4644ac2dc..4cd35c97c503 100644
val = readl(hdmi->base + SUN4I_HDMI_VID_CTRL_REG);
val &= ~SUN4I_HDMI_VID_CTRL_ENABLE;
writel(val, hdmi->base + SUN4I_HDMI_VID_CTRL_REG);
@@ -114,6 +120,11 @@ static void sun4i_hdmi_enable(struct drm_encoder *encoder)
@@ -115,6 +122,11 @@ static void sun4i_hdmi_enable(struct drm_encoder *encoder)
val |= SUN4I_HDMI_VID_CTRL_HDMI_MODE;
writel(val, hdmi->base + SUN4I_HDMI_VID_CTRL_REG);
+
+#ifdef CONFIG_DRM_SUN4I_HDMI_AUDIO
@@ -624,15 +619,18 @@ index 68d4644ac2dc..4cd35c97c503 100644
+ DRM_ERROR("Couldn't create the HDMI audio adapter\n");
+#endif
}
static void sun4i_hdmi_mode_set(struct drm_encoder *encoder,
@@ -218,6 +229,9 @@ static int sun4i_hdmi_get_modes(struct drm_connector *connector)
@@ -215,6 +227,9 @@ static int sun4i_hdmi_get_modes(struct drm_connector *connector)
if (!edid)
return 0;
+#ifdef CONFIG_DRM_SUN4I_HDMI_AUDIO
+ hdmi->hdmi_audio = drm_detect_monitor_audio(edid);
+#endif
hdmi->hdmi_monitor = drm_detect_hdmi_monitor(edid);
DRM_DEBUG_DRIVER("Monitor is %s monitor\n",
hdmi->hdmi_monitor ? "an HDMI" : "a DVI");
--
2.31.1

View File

@@ -1,7 +1,7 @@
From f79548364ea767853c5a95f1db2407219f06572a Mon Sep 17 00:00:00 2001
From fb0aa61f5cf9811e41f55aab23686ce72b083f5f Mon Sep 17 00:00:00 2001
From: Philipp Rossak <embed3d@gmail.com>
Date: Wed, 24 Jan 2018 22:35:13 +0100
Subject: [PATCH 026/146] iio: adc: Kconfig: enable A80, A64 and H5 for THS
Subject: [PATCH 047/101] drv:iio:adc: Kconfig: enable A80,A64,H5 for THS
Signed-off-by: Philipp Rossak <embed3d@gmail.com>
---
@@ -9,10 +9,10 @@ Signed-off-by: Philipp Rossak <embed3d@gmail.com>
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/iio/adc/Kconfig b/drivers/iio/adc/Kconfig
index 4a754921fb6f..c77aec60a364 100644
index af168e1c9..caa58fdaf 100644
--- a/drivers/iio/adc/Kconfig
+++ b/drivers/iio/adc/Kconfig
@@ -723,7 +723,7 @@ config STX104
@@ -1010,7 +1010,7 @@ config STX104
config SUN4I_GPADC
tristate "Support for the Allwinner SoCs GPADC"
depends on IIO
@@ -22,5 +22,5 @@ index 4a754921fb6f..c77aec60a364 100644
select REGMAP_IRQ
help
--
2.17.1
2.31.1

View File

@@ -1,8 +1,7 @@
From 5a1eb96e482c276f8bc81c18696748ecb20b3656 Mon Sep 17 00:00:00 2001
From ddeddc46d2faee828445a80513f19ea20b9b75e1 Mon Sep 17 00:00:00 2001
From: Philipp Rossak <embed3d@gmail.com>
Date: Wed, 24 Jan 2018 17:41:45 +0100
Subject: [PATCH 029/146] iio: adc: sun4i-gpadc-iio: add support for A64
thermal sensor
Subject: [PATCH 052/101] drv:iio: adc: sun4i-gpadc-iio: add A64 thermal sensor
This patch adds support for the A64 ths sensor.
@@ -15,10 +14,10 @@ Signed-off-by: Philipp Rossak <embed3d@gmail.com>
1 file changed, 50 insertions(+)
diff --git a/drivers/iio/adc/sun4i-gpadc-iio.c b/drivers/iio/adc/sun4i-gpadc-iio.c
index 7ab175f0bd40..fdfa01bad325 100644
index 696561cb4..e1100337f 100644
--- a/drivers/iio/adc/sun4i-gpadc-iio.c
+++ b/drivers/iio/adc/sun4i-gpadc-iio.c
@@ -278,6 +278,52 @@ static const struct gpadc_data sun9i_a80_ths_data = {
@@ -243,6 +243,52 @@ static const struct gpadc_data sun9i_a80_ths_data = {
SUNXI_THS_TEMP_PERIOD(0x3a),
};
@@ -71,7 +70,7 @@ index 7ab175f0bd40..fdfa01bad325 100644
struct sun4i_gpadc_iio {
struct iio_dev *indio_dev;
struct completion completion;
@@ -792,6 +838,10 @@ static const struct of_device_id sun4i_gpadc_of_id[] = {
@@ -751,6 +797,10 @@ static const struct of_device_id sun4i_gpadc_of_id[] = {
.compatible = "allwinner,sun9i-a80-ths",
.data = &sun9i_a80_ths_data,
},
@@ -83,5 +82,5 @@ index 7ab175f0bd40..fdfa01bad325 100644
};
--
2.17.1
2.31.1

View File

@@ -1,8 +1,7 @@
From 413a3bde03c061d4b5affe25ad75f4dfe6e3282b Mon Sep 17 00:00:00 2001
From 4d3f1f419bc3e5e4946c39bf2c2c882ff3a4a94f Mon Sep 17 00:00:00 2001
From: Philipp Rossak <embed3d@gmail.com>
Date: Wed, 24 Jan 2018 17:28:02 +0100
Subject: [PATCH 028/146] iio: adc: sun4i-gpadc-iio: add support for A80
thermal sensor
Subject: [PATCH 050/101] drv:iio:adc:sun4i-gpadc-iio: add A80 thermal sensor
This patch adds support for the A80 ths sensor.
@@ -18,11 +17,11 @@ Signed-off-by: Philipp Rossak <embed3d@gmail.com>
1 file changed, 46 insertions(+)
diff --git a/drivers/iio/adc/sun4i-gpadc-iio.c b/drivers/iio/adc/sun4i-gpadc-iio.c
index 40529a197335..7ab175f0bd40 100644
index 7450a914d..696561cb4 100644
--- a/drivers/iio/adc/sun4i-gpadc-iio.c
+++ b/drivers/iio/adc/sun4i-gpadc-iio.c
@@ -236,6 +236,48 @@ static const struct gpadc_data sun50i_h5_ths_data = {
SUNXI_THS_TEMP_PERIOD(0x3a),
@@ -201,6 +201,48 @@ static const struct gpadc_data sun8i_a83t_ths_data = {
SUNXI_THS_TEMP_PERIOD(0x257),
};
+static const struct gpadc_data sun9i_a80_ths_data = {
@@ -70,9 +69,9 @@ index 40529a197335..7ab175f0bd40 100644
struct sun4i_gpadc_iio {
struct iio_dev *indio_dev;
struct completion completion;
@@ -746,6 +788,10 @@ static const struct of_device_id sun4i_gpadc_of_id[] = {
.compatible = "allwinner,sun50i-h5-ths",
.data = &sun50i_h5_ths_data,
@@ -705,6 +747,10 @@ static const struct of_device_id sun4i_gpadc_of_id[] = {
.compatible = "allwinner,sun8i-a83t-ths",
.data = &sun8i_a83t_ths_data,
},
+ {
+ .compatible = "allwinner,sun9i-a80-ths",
@@ -82,5 +81,5 @@ index 40529a197335..7ab175f0bd40 100644
};
--
2.17.1
2.31.1

View File

@@ -1,8 +1,7 @@
From 20484f59a26747db157563c9ba13767c21b48efb Mon Sep 17 00:00:00 2001
From b5198c4ec21a9848d18827991b18d4d586851b13 Mon Sep 17 00:00:00 2001
From: Philipp Rossak <embed3d@gmail.com>
Date: Sun, 21 Jan 2018 18:50:11 +0100
Subject: [PATCH 018/146] iio: adc: sun4i-gpadc-iio: add support for A83T
thermal sensor
Subject: [PATCH 039/101] drv:iio:adc:sun4i-gpadc-iio: add A83T thermal sensor
This patch adds support for the A83T ths sensor.
@@ -15,10 +14,10 @@ Signed-off-by: Philipp Rossak <embed3d@gmail.com>
1 file changed, 38 insertions(+)
diff --git a/drivers/iio/adc/sun4i-gpadc-iio.c b/drivers/iio/adc/sun4i-gpadc-iio.c
index f2e0ec65c53e..b8693afcdbea 100644
index 77199f230..7450a914d 100644
--- a/drivers/iio/adc/sun4i-gpadc-iio.c
+++ b/drivers/iio/adc/sun4i-gpadc-iio.c
@@ -170,6 +170,40 @@ static const struct gpadc_data sun8i_h3_ths_data = {
@@ -167,6 +167,40 @@ static const struct gpadc_data sun8i_h3_ths_data = {
SUNXI_THS_TEMP_PERIOD(0x7),
};
@@ -59,7 +58,7 @@ index f2e0ec65c53e..b8693afcdbea 100644
struct sun4i_gpadc_iio {
struct iio_dev *indio_dev;
struct completion completion;
@@ -672,6 +706,10 @@ static const struct of_device_id sun4i_gpadc_of_id[] = {
@@ -667,6 +701,10 @@ static const struct of_device_id sun4i_gpadc_of_id[] = {
.compatible = "allwinner,sun8i-h3-ths",
.data = &sun8i_h3_ths_data,
},
@@ -71,5 +70,5 @@ index f2e0ec65c53e..b8693afcdbea 100644
};
--
2.17.1
2.31.1

View File

@@ -1,8 +1,7 @@
From 1968a84bd7cfdf60b29a154e682c4239bdfe6cb7 Mon Sep 17 00:00:00 2001
From 23e563bad96f80c5c2e171b2a98c9df2a746bc8a Mon Sep 17 00:00:00 2001
From: Philipp Rossak <embed3d@gmail.com>
Date: Sun, 21 Jan 2018 23:14:09 +0100
Subject: [PATCH 017/146] iio: adc: sun4i-gpadc-iio: add support for H3 thermal
sensor
Subject: [PATCH 037/101] drv:iio:adc: sun4i-gpadc-iio: add H3 thermal sensor
This patch adds support for the H3 ths sensor.
@@ -16,10 +15,10 @@ Signed-off-by: Philipp Rossak <embed3d@gmail.com>
1 file changed, 29 insertions(+)
diff --git a/drivers/iio/adc/sun4i-gpadc-iio.c b/drivers/iio/adc/sun4i-gpadc-iio.c
index 77e07f042730..f2e0ec65c53e 100644
index 6424ec19e..77199f230 100644
--- a/drivers/iio/adc/sun4i-gpadc-iio.c
+++ b/drivers/iio/adc/sun4i-gpadc-iio.c
@@ -145,6 +145,31 @@ static const struct gpadc_data sun8i_a33_gpadc_data = {
@@ -142,6 +142,31 @@ static const struct gpadc_data sun8i_a33_gpadc_data = {
.support_irq = false,
};
@@ -51,7 +50,7 @@ index 77e07f042730..f2e0ec65c53e 100644
struct sun4i_gpadc_iio {
struct iio_dev *indio_dev;
struct completion completion;
@@ -643,6 +668,10 @@ static const struct of_device_id sun4i_gpadc_of_id[] = {
@@ -638,6 +663,10 @@ static const struct of_device_id sun4i_gpadc_of_id[] = {
.compatible = "allwinner,sun8i-a33-ths",
.data = &sun8i_a33_gpadc_data,
},
@@ -63,5 +62,5 @@ index 77e07f042730..f2e0ec65c53e 100644
};
--
2.17.1
2.31.1

View File

@@ -1,8 +1,7 @@
From 153c005037601e2ba02f7fb36d8864194d8c98c8 Mon Sep 17 00:00:00 2001
From aa302e2bfbc653df304eb26a2faf94cf49f7a9c8 Mon Sep 17 00:00:00 2001
From: Philipp Rossak <embed3d@gmail.com>
Date: Sun, 21 Jan 2018 11:20:55 +0100
Subject: [PATCH 016/146] iio: adc: sun4i-gpadc-iio: rework: add interrupt
support
Subject: [PATCH 035/101] drv:iio:adc:sun4i-gpadc-iio: add interrupt support
This patch rewors the driver to support interrupts for the thermal part
of the sensor.
@@ -22,10 +21,10 @@ Signed-off-by: Philipp Rossak <embed3d@gmail.com>
2 files changed, 95 insertions(+), 6 deletions(-)
diff --git a/drivers/iio/adc/sun4i-gpadc-iio.c b/drivers/iio/adc/sun4i-gpadc-iio.c
index 7b12666cdd9e..77e07f042730 100644
index 65827d1f3..6424ec19e 100644
--- a/drivers/iio/adc/sun4i-gpadc-iio.c
+++ b/drivers/iio/adc/sun4i-gpadc-iio.c
@@ -78,11 +78,14 @@ struct gpadc_data {
@@ -75,11 +75,14 @@ struct gpadc_data {
u32 ctrl2_map;
u32 sensor_en_map;
u32 filter_map;
@@ -40,7 +39,7 @@ index 7b12666cdd9e..77e07f042730 100644
};
static const struct gpadc_data sun4i_gpadc_data = {
@@ -97,6 +100,7 @@ static const struct gpadc_data sun4i_gpadc_data = {
@@ -94,6 +97,7 @@ static const struct gpadc_data sun4i_gpadc_data = {
.sample_end = sun4i_gpadc_sample_end,
.sensor_count = 1,
.supports_nvmem = false,
@@ -48,7 +47,7 @@ index 7b12666cdd9e..77e07f042730 100644
};
static const struct gpadc_data sun5i_gpadc_data = {
@@ -111,6 +115,7 @@ static const struct gpadc_data sun5i_gpadc_data = {
@@ -108,6 +112,7 @@ static const struct gpadc_data sun5i_gpadc_data = {
.sample_end = sun4i_gpadc_sample_end,
.sensor_count = 1,
.supports_nvmem = false,
@@ -56,7 +55,7 @@ index 7b12666cdd9e..77e07f042730 100644
};
static const struct gpadc_data sun6i_gpadc_data = {
@@ -125,6 +130,7 @@ static const struct gpadc_data sun6i_gpadc_data = {
@@ -122,6 +127,7 @@ static const struct gpadc_data sun6i_gpadc_data = {
.sample_end = sun4i_gpadc_sample_end,
.sensor_count = 1,
.supports_nvmem = false,
@@ -64,7 +63,7 @@ index 7b12666cdd9e..77e07f042730 100644
};
static const struct gpadc_data sun8i_a33_gpadc_data = {
@@ -136,6 +142,7 @@ static const struct gpadc_data sun8i_a33_gpadc_data = {
@@ -133,6 +139,7 @@ static const struct gpadc_data sun8i_a33_gpadc_data = {
.sample_end = sun4i_gpadc_sample_end,
.sensor_count = 1,
.supports_nvmem = false,
@@ -72,7 +71,7 @@ index 7b12666cdd9e..77e07f042730 100644
};
struct sun4i_gpadc_iio {
@@ -339,6 +346,11 @@ static int sun4i_gpadc_temp_read(struct iio_dev *indio_dev, int *val,
@@ -336,6 +343,11 @@ static int sun4i_gpadc_temp_read(struct iio_dev *indio_dev, int *val,
return 0;
}
@@ -84,7 +83,7 @@ index 7b12666cdd9e..77e07f042730 100644
return sun4i_gpadc_read(indio_dev, 0, val, info->temp_data_irq);
}
@@ -436,6 +448,17 @@ static irqreturn_t sun4i_gpadc_fifo_data_irq_handler(int irq, void *dev_id)
@@ -433,6 +445,17 @@ static irqreturn_t sun4i_gpadc_fifo_data_irq_handler(int irq, void *dev_id)
return IRQ_HANDLED;
}
@@ -102,7 +101,7 @@ index 7b12666cdd9e..77e07f042730 100644
static int sun4i_gpadc_sample_end(struct sun4i_gpadc_iio *info)
{
/* Disable the ADC on IP */
@@ -448,6 +471,8 @@ static int sun4i_gpadc_sample_end(struct sun4i_gpadc_iio *info)
@@ -445,6 +468,8 @@ static int sun4i_gpadc_sample_end(struct sun4i_gpadc_iio *info)
static int sunxi_ths_sample_end(struct sun4i_gpadc_iio *info)
{
@@ -111,7 +110,7 @@ index 7b12666cdd9e..77e07f042730 100644
/* Disable temperature sensor */
regmap_write(info->regmap, SUNXI_THS_CTRL2, 0x0);
@@ -509,9 +534,15 @@ static int sunxi_ths_sample_start(struct sun4i_gpadc_iio *info)
@@ -506,9 +531,15 @@ static int sunxi_ths_sample_start(struct sun4i_gpadc_iio *info)
regmap_write(info->regmap, SUNXI_THS_CTRL2,
info->data->ctrl2_map);
@@ -127,7 +126,7 @@ index 7b12666cdd9e..77e07f042730 100644
regmap_read(info->regmap, SUNXI_THS_CTRL2, &value);
regmap_write(info->regmap, SUNXI_THS_CTRL2,
@@ -625,12 +656,29 @@ static int sun4i_gpadc_probe_dt(struct platform_device *pdev,
@@ -619,12 +650,29 @@ static int sun4i_gpadc_probe_dt(struct platform_device *pdev,
struct nvmem_cell *cell;
ssize_t cell_size;
u64 *cell_data;
@@ -158,7 +157,7 @@ index 7b12666cdd9e..77e07f042730 100644
indio_dev->num_channels = ARRAY_SIZE(sun8i_a33_gpadc_channels);
indio_dev->channels = sun8i_a33_gpadc_channels;
@@ -840,11 +888,13 @@ static int sun4i_gpadc_probe(struct platform_device *pdev)
@@ -832,11 +880,13 @@ static int sun4i_gpadc_probe(struct platform_device *pdev)
if (ret)
return ret;
@@ -177,7 +176,7 @@ index 7b12666cdd9e..77e07f042730 100644
if (IS_ENABLED(CONFIG_THERMAL_OF)) {
for (i = 0; i < info->data->sensor_count; i++) {
@@ -865,6 +915,9 @@ static int sun4i_gpadc_probe(struct platform_device *pdev)
@@ -857,6 +907,9 @@ static int sun4i_gpadc_probe(struct platform_device *pdev)
}
}
@@ -187,7 +186,7 @@ index 7b12666cdd9e..77e07f042730 100644
ret = devm_iio_device_register(&pdev->dev, indio_dev);
if (ret < 0) {
dev_err(&pdev->dev, "could not register the device\n");
@@ -894,6 +947,9 @@ static int sun4i_gpadc_remove(struct platform_device *pdev)
@@ -886,6 +939,9 @@ static int sun4i_gpadc_remove(struct platform_device *pdev)
if (!IS_ENABLED(CONFIG_THERMAL_OF))
return 0;
@@ -198,10 +197,10 @@ index 7b12666cdd9e..77e07f042730 100644
if (!info->no_irq)
diff --git a/include/linux/mfd/sun4i-gpadc.h b/include/linux/mfd/sun4i-gpadc.h
index c251002431bd..ab34a96a7ff3 100644
index 1439422b0..5c196e4a5 100644
--- a/include/linux/mfd/sun4i-gpadc.h
+++ b/include/linux/mfd/sun4i-gpadc.h
@@ -89,6 +89,8 @@
@@ -86,6 +86,8 @@
/* SUNXI_THS COMMON REGISTERS + DEFINES */
#define SUNXI_THS_CTRL0 0x00
#define SUNXI_THS_CTRL2 0x40
@@ -210,7 +209,7 @@ index c251002431bd..ab34a96a7ff3 100644
#define SUNXI_THS_FILTER 0x70
#define SUNXI_THS_CDATA_0_1 0x74
#define SUNXI_THS_CDATA_2_3 0x78
@@ -107,6 +109,37 @@
@@ -104,6 +106,37 @@
#define SUNXI_THS_TEMP_SENSE_EN2 BIT(2)
#define SUNXI_THS_TEMP_SENSE_EN3 BIT(3)
@@ -249,5 +248,5 @@ index c251002431bd..ab34a96a7ff3 100644
struct sun4i_gpadc_dev {
--
2.17.1
2.31.1

View File

@@ -1,8 +1,7 @@
From e684b6faf4b5509f852867cac4830a0274f89211 Mon Sep 17 00:00:00 2001
From 374d0765fec24ecc324caafb8d9dbb457f41a951 Mon Sep 17 00:00:00 2001
From: Philipp Rossak <embed3d@gmail.com>
Date: Sun, 21 Jan 2018 22:26:50 +0100
Subject: [PATCH 014/146] iio: adc: sun4i-gpadc-iio: rework: support multible
sensors
Subject: [PATCH 032/101] drv:iio:adc:sun4i-gpadc-iio: multible sensors support
For adding newer sensor some basic rework of the code is necessary.
@@ -21,10 +20,10 @@ Signed-off-by: Philipp Rossak <embed3d@gmail.com>
2 files changed, 29 insertions(+), 13 deletions(-)
diff --git a/drivers/iio/adc/sun4i-gpadc-iio.c b/drivers/iio/adc/sun4i-gpadc-iio.c
index 1a80744bd472..bff06f2798e8 100644
index 2045a4aa3..0208130e1 100644
--- a/drivers/iio/adc/sun4i-gpadc-iio.c
+++ b/drivers/iio/adc/sun4i-gpadc-iio.c
@@ -70,7 +70,7 @@ struct gpadc_data {
@@ -67,7 +67,7 @@ struct gpadc_data {
unsigned int tp_adc_select;
unsigned int (*adc_chan_select)(unsigned int chan);
unsigned int adc_chan_mask;
@@ -33,7 +32,7 @@ index 1a80744bd472..bff06f2798e8 100644
int (*sample_start)(struct sun4i_gpadc_iio *info);
int (*sample_end)(struct sun4i_gpadc_iio *info);
u32 ctrl0_map;
@@ -80,6 +80,7 @@ struct gpadc_data {
@@ -77,6 +77,7 @@ struct gpadc_data {
bool has_bus_clk;
bool has_bus_rst;
bool has_mod_clk;
@@ -41,7 +40,7 @@ index 1a80744bd472..bff06f2798e8 100644
};
static const struct gpadc_data sun4i_gpadc_data = {
@@ -89,9 +90,10 @@ static const struct gpadc_data sun4i_gpadc_data = {
@@ -86,9 +87,10 @@ static const struct gpadc_data sun4i_gpadc_data = {
.tp_adc_select = SUN4I_GPADC_CTRL1_TP_ADC_SELECT,
.adc_chan_select = &sun4i_gpadc_chan_select,
.adc_chan_mask = SUN4I_GPADC_CTRL1_ADC_CHAN_MASK,
@@ -53,7 +52,7 @@ index 1a80744bd472..bff06f2798e8 100644
};
static const struct gpadc_data sun5i_gpadc_data = {
@@ -101,9 +103,10 @@ static const struct gpadc_data sun5i_gpadc_data = {
@@ -98,9 +100,10 @@ static const struct gpadc_data sun5i_gpadc_data = {
.tp_adc_select = SUN4I_GPADC_CTRL1_TP_ADC_SELECT,
.adc_chan_select = &sun4i_gpadc_chan_select,
.adc_chan_mask = SUN4I_GPADC_CTRL1_ADC_CHAN_MASK,
@@ -65,7 +64,7 @@ index 1a80744bd472..bff06f2798e8 100644
};
static const struct gpadc_data sun6i_gpadc_data = {
@@ -113,18 +116,20 @@ static const struct gpadc_data sun6i_gpadc_data = {
@@ -110,18 +113,20 @@ static const struct gpadc_data sun6i_gpadc_data = {
.tp_adc_select = SUN6I_GPADC_CTRL1_TP_ADC_SELECT,
.adc_chan_select = &sun6i_gpadc_chan_select,
.adc_chan_mask = SUN6I_GPADC_CTRL1_ADC_CHAN_MASK,
@@ -88,7 +87,7 @@ index 1a80744bd472..bff06f2798e8 100644
};
struct sun4i_gpadc_iio {
@@ -142,6 +147,7 @@ struct sun4i_gpadc_iio {
@@ -139,6 +144,7 @@ struct sun4i_gpadc_iio {
struct clk *bus_clk;
struct clk *mod_clk;
struct reset_control *reset;
@@ -96,7 +95,7 @@ index 1a80744bd472..bff06f2798e8 100644
/* prevents concurrent reads of temperature and ADC */
struct mutex mutex;
struct thermal_zone_device *tzd;
@@ -309,14 +315,15 @@ static int sun4i_gpadc_adc_read(struct iio_dev *indio_dev, int channel,
@@ -306,14 +312,15 @@ static int sun4i_gpadc_adc_read(struct iio_dev *indio_dev, int channel,
return sun4i_gpadc_read(indio_dev, channel, val, info->fifo_data_irq);
}
@@ -114,7 +113,7 @@ index 1a80744bd472..bff06f2798e8 100644
pm_runtime_mark_last_busy(indio_dev->dev.parent);
pm_runtime_put_autosuspend(indio_dev->dev.parent);
@@ -363,7 +370,7 @@ static int sun4i_gpadc_read_raw(struct iio_dev *indio_dev,
@@ -360,7 +367,7 @@ static int sun4i_gpadc_read_raw(struct iio_dev *indio_dev,
ret = sun4i_gpadc_adc_read(indio_dev, chan->channel,
val);
else
@@ -123,7 +122,7 @@ index 1a80744bd472..bff06f2798e8 100644
if (ret)
return ret;
@@ -511,7 +518,7 @@ static int sun4i_gpadc_get_temp(void *data, int *temp)
@@ -508,7 +515,7 @@ static int sun4i_gpadc_get_temp(void *data, int *temp)
struct sun4i_gpadc_iio *info = data;
int val, scale, offset;
@@ -132,7 +131,7 @@ index 1a80744bd472..bff06f2798e8 100644
return -ETIMEDOUT;
sun4i_gpadc_temp_scale(info->indio_dev, &scale);
@@ -755,7 +762,7 @@ static int sun4i_gpadc_probe(struct platform_device *pdev)
@@ -748,7 +755,7 @@ static int sun4i_gpadc_probe(struct platform_device *pdev)
{
struct sun4i_gpadc_iio *info;
struct iio_dev *indio_dev;
@@ -141,7 +140,7 @@ index 1a80744bd472..bff06f2798e8 100644
indio_dev = devm_iio_device_alloc(&pdev->dev, sizeof(*info));
if (!indio_dev)
@@ -788,9 +795,12 @@ static int sun4i_gpadc_probe(struct platform_device *pdev)
@@ -780,9 +787,12 @@ static int sun4i_gpadc_probe(struct platform_device *pdev)
pm_runtime_enable(&pdev->dev);
if (IS_ENABLED(CONFIG_THERMAL_OF)) {
@@ -158,10 +157,10 @@ index 1a80744bd472..bff06f2798e8 100644
* Do not fail driver probing when failing to register in
* thermal because no thermal DT node is found.
diff --git a/include/linux/mfd/sun4i-gpadc.h b/include/linux/mfd/sun4i-gpadc.h
index 39e096c3ddac..40b4dd9d2405 100644
index a7cd4c644..4b4415bf4 100644
--- a/include/linux/mfd/sun4i-gpadc.h
+++ b/include/linux/mfd/sun4i-gpadc.h
@@ -90,6 +90,10 @@
@@ -87,6 +87,10 @@
#define SUNXI_THS_CTRL0 0x00
#define SUNXI_THS_CTRL2 0x40
#define SUNXI_THS_FILTER 0x70
@@ -172,7 +171,7 @@ index 39e096c3ddac..40b4dd9d2405 100644
#define SUNXI_THS_FILTER_EN BIT(2)
#define SUNXI_THS_FILTER_TYPE(x) (GENMASK(1, 0) & (x))
@@ -101,6 +105,8 @@
@@ -98,6 +102,8 @@
#define SUNXI_THS_TEMP_SENSE_EN2 BIT(2)
#define SUNXI_THS_TEMP_SENSE_EN3 BIT(3)
@@ -182,5 +181,5 @@ index 39e096c3ddac..40b4dd9d2405 100644
struct device *dev;
struct regmap *regmap;
--
2.17.1
2.31.1

View File

@@ -1,7 +1,7 @@
From ef6a8862ab9440c5d6a73da32be83edc46e2fe94 Mon Sep 17 00:00:00 2001
From dff7a7339f685bf9869d230605485cb98a3b5bd2 Mon Sep 17 00:00:00 2001
From: Icenowy Zheng <icenowy@aosc.io>
Date: Thu, 14 Sep 2017 22:52:47 +0800
Subject: [PATCH 011/146] iio: adc: sun4i-gpadc-iio: rename A33-specified
Subject: [PATCH 025/101] drv:iio:adc: sun4i-gpadc-iio: rename A33-specified
registers to contain A33
As the H3 SoC, which is also in sun8i line, has totally different
@@ -22,10 +22,10 @@ Acked-by: Lee Jones <lee.jones@linaro.org>
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/iio/adc/sun4i-gpadc-iio.c b/drivers/iio/adc/sun4i-gpadc-iio.c
index 04d7147e0110..03804ff9c006 100644
index 637bde7c5..80717da94 100644
--- a/drivers/iio/adc/sun4i-gpadc-iio.c
+++ b/drivers/iio/adc/sun4i-gpadc-iio.c
@@ -88,7 +88,7 @@ static const struct gpadc_data sun6i_gpadc_data = {
@@ -85,7 +85,7 @@ static const struct gpadc_data sun6i_gpadc_data = {
static const struct gpadc_data sun8i_a33_gpadc_data = {
.temp_offset = -1662,
.temp_scale = 162,
@@ -35,10 +35,10 @@ index 04d7147e0110..03804ff9c006 100644
struct sun4i_gpadc_iio {
diff --git a/include/linux/mfd/sun4i-gpadc.h b/include/linux/mfd/sun4i-gpadc.h
index 139872c2e0fe..78d31984a222 100644
index 021f820f9..af79cfd9a 100644
--- a/include/linux/mfd/sun4i-gpadc.h
+++ b/include/linux/mfd/sun4i-gpadc.h
@@ -38,9 +38,9 @@
@@ -35,9 +35,9 @@
#define SUN6I_GPADC_CTRL1_ADC_CHAN_SELECT(x) (GENMASK(3, 0) & BIT(x))
#define SUN6I_GPADC_CTRL1_ADC_CHAN_MASK GENMASK(3, 0)
@@ -52,5 +52,5 @@ index 139872c2e0fe..78d31984a222 100644
#define SUN4I_GPADC_CTRL2 0x08
--
2.17.1
2.31.1

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