From 7b99735c44cd0214e06ac6532cde0c9eb3b7ca42 Mon Sep 17 00:00:00 2001 From: SteeManMI <36392828+SteeManMI@users.noreply.github.com> Date: Mon, 20 Mar 2023 07:59:11 -0400 Subject: [PATCH] Fix patch failures on meson64-current (6.1) (#4973) Changes to be committed: deleted: patch/kernel/archive/meson64-6.1/board-bananapim5-002-switch-VDDIO_C-pin-to-OP.patch - Patch upstreamed in 6.1.16: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/arch/arm64/boot/dts/amlogic/meson-sm1-bananapi-m5.dts?h=v6.1.20&id=58dccc65221c6465a35cb6bb2ff41f2b75b367f0 modified: patch/kernel/archive/meson64-6.1/board-bananapim5-003-convert-dts-to-dtsi.patcha - Fixed patch due to upstream change in 6.1.16: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/arch/arm64/boot/dts/amlogic/meson-sm1-bananapi-m5.dts?h=v6.1.20&id=e35feeb3fdbe3eeffae5e75123fa44523b5076b8 deleted: patch/kernel/archive/meson64-6.1/board-radxa-zero-dts-otg-fix.patch - Patch upstreamed in 6.1.16: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/arch/arm64/boot/dts/amlogic/meson-g12a-radxa-zero.dts?h=v6.1.20&id=b556778f76f975ccf7f008729b5bc2531c58ea95 deleted: patch/kernel/archive/meson64-6.1/general-arm64-dts-amlogic-Make-mmc-host-controller-interrupt.patch - Patch upstreamed in 6.1.12: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.1.20&id=274d9a28527d64a95107a1e62c71632065f0924f https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.1.20&id=222b1070b0fa12be25f9503a503724a899c6326b https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.1.20&id=a01ad536becb5d4c001a7d50dc1ca9fa14ef75a8 modified: patch/kernel/archive/meson64-6.1/general-meson-mmc-1-arm64-amlogic-mmc-meson-gx-Add-core-tx-rx-eMMC-SD-SD.patch - Fixed patch due to upstream change in 6.1.13 by copying the 6.2 version which was already rebased --- ...anapim5-002-switch-VDDIO_C-pin-to-OP.patch | 38 ------ ...d-bananapim5-003-convert-dts-to-dtsi.patch | 4 +- .../board-radxa-zero-dts-otg-fix.patch | 28 ----- ...c-Make-mmc-host-controller-interrupt.patch | 110 ------------------ ...c-meson-gx-Add-core-tx-rx-eMMC-SD-SD.patch | 6 +- 5 files changed, 5 insertions(+), 181 deletions(-) delete mode 100644 patch/kernel/archive/meson64-6.1/board-bananapim5-002-switch-VDDIO_C-pin-to-OP.patch delete mode 100644 patch/kernel/archive/meson64-6.1/board-radxa-zero-dts-otg-fix.patch delete mode 100644 patch/kernel/archive/meson64-6.1/general-arm64-dts-amlogic-Make-mmc-host-controller-interrupt.patch diff --git a/patch/kernel/archive/meson64-6.1/board-bananapim5-002-switch-VDDIO_C-pin-to-OP.patch b/patch/kernel/archive/meson64-6.1/board-bananapim5-002-switch-VDDIO_C-pin-to-OP.patch deleted file mode 100644 index 35da4d47a7..0000000000 --- a/patch/kernel/archive/meson64-6.1/board-bananapim5-002-switch-VDDIO_C-pin-to-OP.patch +++ /dev/null @@ -1,38 +0,0 @@ -From 77f05ef93b74f958226ca8325421bcc8a50dbf31 Mon Sep 17 00:00:00 2001 -From: Christian Hewitt -Date: Thu, 26 Jan 2023 16:15:59 +0000 -Subject: [PATCH 1/5] arm64: dts: meson: bananapi-m5: switch VDDIO_C pin to - OPEN_DRAIN - -For proper warm (re)boot from SD card the BPI-M5 board requires TFLASH_VDD_EN -and VDDIO_C pins to be switched to high impedance mode. This can be achieved -using OPEN_DRAIN instead of ACTIVE_HIGH to leave the GPIO pins in input mode -and retain high state (pin has the pull-up). - -This change is inspired by meson-sm1-odroid.dtsi where OPEN_DRAIN has been -used to resolve similar problems with the Odroid C4 board (TF_IO in the C4 -dts is the equivalent regulator). - -Fixes: 976e920183e4 ("arm64: dts: meson-sm1: add Banana PI BPI-M5 board dts") -Suggested-by: Neil Armstrong -Signed-off-by: Christian Hewitt ---- - arch/arm64/boot/dts/amlogic/meson-sm1-bananapi-m5.dts | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/arch/arm64/boot/dts/amlogic/meson-sm1-bananapi-m5.dts b/arch/arm64/boot/dts/amlogic/meson-sm1-bananapi-m5.dts -index 028220ed45ad..3c1267a7ffef 100644 ---- a/arch/arm64/boot/dts/amlogic/meson-sm1-bananapi-m5.dts -+++ b/arch/arm64/boot/dts/amlogic/meson-sm1-bananapi-m5.dts -@@ -123,7 +123,7 @@ vddio_c: regulator-vddio_c { - regulator-min-microvolt = <1800000>; - regulator-max-microvolt = <3300000>; - -- enable-gpio = <&gpio_ao GPIOE_2 GPIO_ACTIVE_HIGH>; -+ enable-gpio = <&gpio_ao GPIOE_2 GPIO_OPEN_DRAIN>; - enable-active-high; - regulator-always-on; - --- -2.34.1 - diff --git a/patch/kernel/archive/meson64-6.1/board-bananapim5-003-convert-dts-to-dtsi.patch b/patch/kernel/archive/meson64-6.1/board-bananapim5-003-convert-dts-to-dtsi.patch index d8425617e6..f11e55881b 100644 --- a/patch/kernel/archive/meson64-6.1/board-bananapim5-003-convert-dts-to-dtsi.patch +++ b/patch/kernel/archive/meson64-6.1/board-bananapim5-003-convert-dts-to-dtsi.patch @@ -33,13 +33,13 @@ index 86f0afe6491e..f045bf851638 100644 compatible = "bananapi,bpi-m5", "amlogic,sm1"; model = "Banana Pi BPI-M5"; -- adc_keys { +- adc-keys { - compatible = "adc-keys"; - io-channels = <&saradc 2>; - io-channel-names = "buttons"; - keyup-threshold-microvolt = <1800000>; - -- key { +- button-sw3 { - label = "SW3"; - linux,code = ; - press-threshold-microvolt = <1700000>; diff --git a/patch/kernel/archive/meson64-6.1/board-radxa-zero-dts-otg-fix.patch b/patch/kernel/archive/meson64-6.1/board-radxa-zero-dts-otg-fix.patch deleted file mode 100644 index bcb9adf608..0000000000 --- a/patch/kernel/archive/meson64-6.1/board-radxa-zero-dts-otg-fix.patch +++ /dev/null @@ -1,28 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Stephen -Date: Thu, 28 Oct 2021 14:26:24 +0800 -Subject: arm64: dts: radxa zero: set dr_mode of usb node to otg - -This enables dwc2 otg function. - -Signed-off-by: Stephen -Signed-off-by: Yuntian Zhang ---- - arch/arm64/boot/dts/amlogic/meson-g12a-radxa-zero.dts | 1 - - 1 file changed, 1 deletion(-) - -diff --git a/arch/arm64/boot/dts/amlogic/meson-g12a-radxa-zero.dts b/arch/arm64/boot/dts/amlogic/meson-g12a-radxa-zero.dts -index 28eaaa83a00e..29cfcc045bea 100644 ---- a/arch/arm64/boot/dts/amlogic/meson-g12a-radxa-zero.dts -+++ b/arch/arm64/boot/dts/amlogic/meson-g12a-radxa-zero.dts -@@ -441,7 +441,6 @@ &uart_AO { - - &usb { - status = "okay"; -- dr_mode = "host"; - }; - - &usb2_phy0 { --- -Armbian - diff --git a/patch/kernel/archive/meson64-6.1/general-arm64-dts-amlogic-Make-mmc-host-controller-interrupt.patch b/patch/kernel/archive/meson64-6.1/general-arm64-dts-amlogic-Make-mmc-host-controller-interrupt.patch deleted file mode 100644 index 48356385ab..0000000000 --- a/patch/kernel/archive/meson64-6.1/general-arm64-dts-amlogic-Make-mmc-host-controller-interrupt.patch +++ /dev/null @@ -1,110 +0,0 @@ -From c72238ca3607996ab56357a02099df0744000726 Mon Sep 17 00:00:00 2001 -From: Heiner Kallweit -Date: Thu, 26 Jan 2023 15:03:17 +0100 -Subject: [PATCH] arm64: dts: amlogic: Make mmc host controller interrupts - level-sensitive - -The usage of edge-triggered interrupts lead to lost interrupts under load, -see [0]. This was confirmed to be fixed by using level-triggered -interrupts. -The report was about SDIO. However, as the host controller is the same -for SD and MMC, apply the change to all mmc controller instances. - -[0] https://www.spinics.net/lists/linux-mmc/msg73991.html - -Fixes: 1499218c80c9 ("arm64: dts: move common G12A & G12B modes to meson-g12-common.dtsi") -Reported-by: Peter Suti -Tested-by: Peter Suti -Cc: stable@vger.kernel.org -Signed-off-by: Heiner Kallweit ---- - arch/arm64/boot/dts/amlogic/meson-axg.dtsi | 4 ++-- - arch/arm64/boot/dts/amlogic/meson-g12-common.dtsi | 6 +++--- - arch/arm64/boot/dts/amlogic/meson-gx.dtsi | 6 +++--- - 3 files changed, 8 insertions(+), 8 deletions(-) - -diff --git a/arch/arm64/boot/dts/amlogic/meson-axg.dtsi b/arch/arm64/boot/dts/amlogic/meson-axg.dtsi -index 04f797b5a012..73cd1791a13f 100644 ---- a/arch/arm64/boot/dts/amlogic/meson-axg.dtsi -+++ b/arch/arm64/boot/dts/amlogic/meson-axg.dtsi -@@ -1885,7 +1885,7 @@ apb: bus@ffe00000 { - sd_emmc_b: sd@5000 { - compatible = "amlogic,meson-axg-mmc"; - reg = <0x0 0x5000 0x0 0x800>; -- interrupts = ; -+ interrupts = ; - status = "disabled"; - clocks = <&clkc CLKID_SD_EMMC_B>, - <&clkc CLKID_SD_EMMC_B_CLK0>, -@@ -1897,7 +1897,7 @@ sd_emmc_b: sd@5000 { - sd_emmc_c: mmc@7000 { - compatible = "amlogic,meson-axg-mmc"; - reg = <0x0 0x7000 0x0 0x800>; -- interrupts = ; -+ interrupts = ; - status = "disabled"; - clocks = <&clkc CLKID_SD_EMMC_C>, - <&clkc CLKID_SD_EMMC_C_CLK0>, -diff --git a/arch/arm64/boot/dts/amlogic/meson-g12-common.dtsi b/arch/arm64/boot/dts/amlogic/meson-g12-common.dtsi -index 45947c1031c4..894cea697550 100644 ---- a/arch/arm64/boot/dts/amlogic/meson-g12-common.dtsi -+++ b/arch/arm64/boot/dts/amlogic/meson-g12-common.dtsi -@@ -2318,7 +2318,7 @@ uart_A: serial@24000 { - sd_emmc_a: sd@ffe03000 { - compatible = "amlogic,meson-axg-mmc"; - reg = <0x0 0xffe03000 0x0 0x800>; -- interrupts = ; -+ interrupts = ; - status = "disabled"; - clocks = <&clkc CLKID_SD_EMMC_A>, - <&clkc CLKID_SD_EMMC_A_CLK0>, -@@ -2330,7 +2330,7 @@ sd_emmc_a: sd@ffe03000 { - sd_emmc_b: sd@ffe05000 { - compatible = "amlogic,meson-axg-mmc"; - reg = <0x0 0xffe05000 0x0 0x800>; -- interrupts = ; -+ interrupts = ; - status = "disabled"; - clocks = <&clkc CLKID_SD_EMMC_B>, - <&clkc CLKID_SD_EMMC_B_CLK0>, -@@ -2342,7 +2342,7 @@ sd_emmc_b: sd@ffe05000 { - sd_emmc_c: mmc@ffe07000 { - compatible = "amlogic,meson-axg-mmc"; - reg = <0x0 0xffe07000 0x0 0x800>; -- interrupts = ; -+ interrupts = ; - status = "disabled"; - clocks = <&clkc CLKID_SD_EMMC_C>, - <&clkc CLKID_SD_EMMC_C_CLK0>, -diff --git a/arch/arm64/boot/dts/amlogic/meson-gx.dtsi b/arch/arm64/boot/dts/amlogic/meson-gx.dtsi -index 023a52005494..fa6cff4a2ebc 100644 ---- a/arch/arm64/boot/dts/amlogic/meson-gx.dtsi -+++ b/arch/arm64/boot/dts/amlogic/meson-gx.dtsi -@@ -602,21 +602,21 @@ apb: apb@d0000000 { - sd_emmc_a: mmc@70000 { - compatible = "amlogic,meson-gx-mmc", "amlogic,meson-gxbb-mmc"; - reg = <0x0 0x70000 0x0 0x800>; -- interrupts = ; -+ interrupts = ; - status = "disabled"; - }; - - sd_emmc_b: mmc@72000 { - compatible = "amlogic,meson-gx-mmc", "amlogic,meson-gxbb-mmc"; - reg = <0x0 0x72000 0x0 0x800>; -- interrupts = ; -+ interrupts = ; - status = "disabled"; - }; - - sd_emmc_c: mmc@74000 { - compatible = "amlogic,meson-gx-mmc", "amlogic,meson-gxbb-mmc"; - reg = <0x0 0x74000 0x0 0x800>; -- interrupts = ; -+ interrupts = ; - status = "disabled"; - }; - }; --- -2.30.2 - diff --git a/patch/kernel/archive/meson64-6.1/general-meson-mmc-1-arm64-amlogic-mmc-meson-gx-Add-core-tx-rx-eMMC-SD-SD.patch b/patch/kernel/archive/meson64-6.1/general-meson-mmc-1-arm64-amlogic-mmc-meson-gx-Add-core-tx-rx-eMMC-SD-SD.patch index e285f0bac0..13e285d6a9 100644 --- a/patch/kernel/archive/meson64-6.1/general-meson-mmc-1-arm64-amlogic-mmc-meson-gx-Add-core-tx-rx-eMMC-SD-SD.patch +++ b/patch/kernel/archive/meson64-6.1/general-meson-mmc-1-arm64-amlogic-mmc-meson-gx-Add-core-tx-rx-eMMC-SD-SD.patch @@ -16,7 +16,7 @@ Signed-off-by: Vyacheslav Bocharov 2 files changed, 48 insertions(+), 6 deletions(-) diff --git a/drivers/mmc/host/meson-gx-mmc.c b/drivers/mmc/host/meson-gx-mmc.c -index 03d313a27a7a..9f632e46c487 100644 +index 64a1520321b0..fa9ec777e4a2 100644 --- a/drivers/mmc/host/meson-gx-mmc.c +++ b/drivers/mmc/host/meson-gx-mmc.c @@ -27,6 +27,7 @@ @@ -59,9 +59,9 @@ index 03d313a27a7a..9f632e46c487 100644 + clk_reg |= FIELD_PREP(CLK_CORE_PHASE_MASK, phase[0]); + clk_reg |= FIELD_PREP(CLK_TX_PHASE_MASK, phase[1]); + clk_reg |= FIELD_PREP(CLK_RX_PHASE_MASK, phase[2]); - clk_reg |= CLK_IRQ_SDIO_SLEEP(host); + if (host->mmc->caps & MMC_CAP_SDIO_IRQ) + clk_reg |= CLK_IRQ_SDIO_SLEEP(host); writel(clk_reg, host->regs + SD_EMMC_CLOCK); - diff --git a/include/dt-bindings/mmc/meson-gx-mmc.h b/include/dt-bindings/mmc/meson-gx-mmc.h new file mode 100644 index 000000000000..cfc4a9d75b2b