From fca652aa43e4602e2523c629d1d67f2473444ce8 Mon Sep 17 00:00:00 2001 From: The-going <48602507+The-going@users.noreply.github.com> Date: Tue, 12 Apr 2022 20:06:01 +0300 Subject: [PATCH] Sunxi 5.10 (#3672) * sun7i-a20-bananapro: add reg_ahci_5v for sunxi-5.10 * sun7i-a20-bananapro: Add more regulators * Rename patches for correct apply * Disable the patch that is not being applied. The patch is initially a crude hack. It solves one problem but creates other problems. I don't know how to resolve the conflict correctly yet, so I just disabled it. --- ...cm-wifi-on-Cubietruck-and-Banana-Pro.patch | 20 +++-- ...Bananapro-01-add-hdmi-de-reg_ahci_5v.patch | 79 +++++++++++++++++++ .../Bananapro-02-add-AXP209-regulators.patch | 70 ++++++++++++++++ .../sunxi-5.10/fix-bananapro-lima.patch | 59 -------------- ...adblock-check-for-migration.patch.disable} | 0 5 files changed, 164 insertions(+), 64 deletions(-) create mode 100644 patch/kernel/archive/sunxi-5.10/Bananapro-01-add-hdmi-de-reg_ahci_5v.patch create mode 100644 patch/kernel/archive/sunxi-5.10/Bananapro-02-add-AXP209-regulators.patch delete mode 100644 patch/kernel/archive/sunxi-5.10/fix-bananapro-lima.patch rename patch/kernel/archive/sunxi-5.10/{nand-disable-badblock-check-for-migration.patch => nand-disable-badblock-check-for-migration.patch.disable} (100%) diff --git a/patch/kernel/archive/sunxi-5.10/ARM-dts-sun7i-Disable-OOB-IRQ-for-brcm-wifi-on-Cubietruck-and-Banana-Pro.patch b/patch/kernel/archive/sunxi-5.10/ARM-dts-sun7i-Disable-OOB-IRQ-for-brcm-wifi-on-Cubietruck-and-Banana-Pro.patch index 6bfc9d98d3..6df14d234f 100644 --- a/patch/kernel/archive/sunxi-5.10/ARM-dts-sun7i-Disable-OOB-IRQ-for-brcm-wifi-on-Cubietruck-and-Banana-Pro.patch +++ b/patch/kernel/archive/sunxi-5.10/ARM-dts-sun7i-Disable-OOB-IRQ-for-brcm-wifi-on-Cubietruck-and-Banana-Pro.patch @@ -1,3 +1,9 @@ +From ba985a61de3ea7238a3b0492e348acee9427f1f4 Mon Sep 17 00:00:00 2001 +From: The Going <48602507+The-going@users.noreply.github.com> +Date: Fri, 1 Apr 2022 16:02:02 +0300 +Subject: [PATCH 1/2] + ARM-dts-sun7i-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 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 5740f9442..08073fb68 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 9109ca091..bc38fe116 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,8 @@ index 5649161de1d7..a837516db6f9 100644 + */ }; }; + +-- +2.34.1 + diff --git a/patch/kernel/archive/sunxi-5.10/Bananapro-01-add-hdmi-de-reg_ahci_5v.patch b/patch/kernel/archive/sunxi-5.10/Bananapro-01-add-hdmi-de-reg_ahci_5v.patch new file mode 100644 index 0000000000..af192ad774 --- /dev/null +++ b/patch/kernel/archive/sunxi-5.10/Bananapro-01-add-hdmi-de-reg_ahci_5v.patch @@ -0,0 +1,79 @@ +From b4f08314e1595b828fb5b70cff09ee619fc705da Mon Sep 17 00:00:00 2001 +From: The Going <48602507+The-going@users.noreply.github.com> +Date: Fri, 1 Apr 2022 17:01:33 +0300 +Subject: [PATCH 2/2] arm: dts: sun7i-a20-bananapro: Add hdmi, de, reg_ahci_5v + +--- + arch/arm/boot/dts/sun7i-a20-bananapro.dts | 30 +++++++++++++++++++++++ + 1 file changed, 30 insertions(+) + +diff --git a/arch/arm/boot/dts/sun7i-a20-bananapro.dts b/arch/arm/boot/dts/sun7i-a20-bananapro.dts +index 08073fb68..6a8c8e334 100644 +--- a/arch/arm/boot/dts/sun7i-a20-bananapro.dts ++++ b/arch/arm/boot/dts/sun7i-a20-bananapro.dts +@@ -60,6 +60,17 @@ chosen { + stdout-path = "serial0:115200n8"; + }; + ++ hdmi-connector { ++ compatible = "hdmi-connector"; ++ type = "a"; ++ ++ port { ++ hdmi_con_in: endpoint { ++ remote-endpoint = <&hdmi_out_con>; ++ }; ++ }; ++ }; ++ + leds { + compatible = "gpio-leds"; + +@@ -91,6 +102,7 @@ reg_gmac_3v3: gmac-3v3 { + }; + + &ahci { ++ target-supply = <®_ahci_5v>; + status = "okay"; + }; + +@@ -98,6 +110,10 @@ &codec { + status = "okay"; + }; + ++&de { ++ status = "okay"; ++}; ++ + &ehci0 { + status = "okay"; + }; +@@ -115,6 +131,16 @@ &gmac { + status = "okay"; + }; + ++&hdmi { ++ status = "okay"; ++}; ++ ++&hdmi_out { ++ hdmi_out_con: endpoint { ++ remote-endpoint = <&hdmi_con_in>; ++ }; ++}; ++ + &i2c0 { + status = "okay"; + +@@ -227,3 +253,7 @@ &usbphy { + usb2_vbus-supply = <®_usb2_vbus>; + status = "okay"; + }; ++ ++®_ahci_5v { ++ status = "okay"; ++}; +-- +2.34.1 + + diff --git a/patch/kernel/archive/sunxi-5.10/Bananapro-02-add-AXP209-regulators.patch b/patch/kernel/archive/sunxi-5.10/Bananapro-02-add-AXP209-regulators.patch new file mode 100644 index 0000000000..c546e768c3 --- /dev/null +++ b/patch/kernel/archive/sunxi-5.10/Bananapro-02-add-AXP209-regulators.patch @@ -0,0 +1,70 @@ +From d371d5f9047ab8152e63e9f463e4daafca37fda2 Mon Sep 17 00:00:00 2001 +From: Heiko Jehmlich +Date: Tue, 5 Apr 2022 21:33:58 +0000 +Subject: [PATCH] Bananapro-add-AXP209-regulators + +Signed-off-by: Heiko Jehmlich +--- + arch/arm/boot/dts/sun7i-a20-bananapro.dts | 50 +++++++++++++++++++++++ + 1 file changed, 50 insertions(+) + +diff --git a/arch/arm/boot/dts/sun7i-a20-bananapro.dts b/arch/arm/boot/dts/sun7i-a20-bananapro.dts +index 3a34fb39a..d5bc59060 100644 +--- a/arch/arm/boot/dts/sun7i-a20-bananapro.dts ++++ b/arch/arm/boot/dts/sun7i-a20-bananapro.dts +@@ -257,3 +257,53 @@ &usbphy { + ®_ahci_5v { + status = "okay"; + }; ++ ++#include "axp209.dtsi" ++ ++&ac_power_supply { ++ status = "okay"; ++}; ++ ++&battery_power_supply { ++ status = "okay"; ++}; ++ ++®_dcdc2 { ++ regulator-always-on; ++ regulator-min-microvolt = <1000000>; ++ regulator-max-microvolt = <1450000>; ++ regulator-name = "vdd-cpu"; ++}; ++ ++®_dcdc3 { ++ regulator-always-on; ++ regulator-min-microvolt = <1000000>; ++ regulator-max-microvolt = <1400000>; ++ regulator-name = "vdd-int-dll"; ++}; ++ ++®_ldo1 { ++ regulator-name = "vdd-rtc"; ++}; ++ ++®_ldo2 { ++ regulator-always-on; ++ regulator-min-microvolt = <3000000>; ++ regulator-max-microvolt = <3000000>; ++ regulator-name = "avcc"; ++}; ++ ++®_ldo3 { ++ regulator-always-on; ++ regulator-min-microvolt = <2800000>; ++ regulator-max-microvolt = <2800000>; ++ regulator-name = "vddio-csi0"; ++ regulator-ramp-delay = <1600>; ++}; ++ ++®_ldo4 { ++ regulator-always-on; /* required for SATA */ ++ regulator-min-microvolt = <2800000>; ++ regulator-max-microvolt = <2800000>; ++ regulator-name = "vddio-csi1"; ++}; +-- +Created with Armbian build tools https://github.com/armbian/build diff --git a/patch/kernel/archive/sunxi-5.10/fix-bananapro-lima.patch b/patch/kernel/archive/sunxi-5.10/fix-bananapro-lima.patch deleted file mode 100644 index b9c706c9d9..0000000000 --- a/patch/kernel/archive/sunxi-5.10/fix-bananapro-lima.patch +++ /dev/null @@ -1,59 +0,0 @@ -diff --git a/arch/arm/boot/dts/sun7i-a20-bananapro.dts b/arch/arm/boot/dts/sun7i-a20-bananapro.dts -index 0176e9de..1b17e433 100644 ---- a/arch/arm/boot/dts/sun7i-a20-bananapro.dts -+++ b/arch/arm/boot/dts/sun7i-a20-bananapro.dts -@@ -60,6 +60,17 @@ - stdout-path = "serial0:115200n8"; - }; - -+ hdmi-connector { -+ compatible = "hdmi-connector"; -+ type = "a"; -+ -+ port { -+ hdmi_con_in: endpoint { -+ remote-endpoint = <&hdmi_out_con>; -+ }; -+ }; -+ }; -+ - leds { - compatible = "gpio-leds"; - -@@ -91,13 +102,18 @@ - }; - - &ahci { -- status = "okay"; -+ target-supply = <®_ahci_5v>; -+ status = "okay"; - }; - - &codec { - status = "okay"; - }; - -+&de { -+ status = "okay"; -+}; -+ - &ehci0 { - status = "okay"; - }; -@@ -119,6 +135,16 @@ - }; - }; - -+&hdmi { -+ status = "okay"; -+}; -+ -+&hdmi_out { -+ hdmi_out_con: endpoint { -+ remote-endpoint = <&hdmi_con_in>; -+ }; -+}; -+ - &i2c0 { - status = "okay"; - diff --git a/patch/kernel/archive/sunxi-5.10/nand-disable-badblock-check-for-migration.patch b/patch/kernel/archive/sunxi-5.10/nand-disable-badblock-check-for-migration.patch.disable similarity index 100% rename from patch/kernel/archive/sunxi-5.10/nand-disable-badblock-check-for-migration.patch rename to patch/kernel/archive/sunxi-5.10/nand-disable-badblock-check-for-migration.patch.disable