Skip to content

Commit

Permalink
Adjust patches that are broken or they found a way upstream
Browse files Browse the repository at this point in the history
  • Loading branch information
igorpecovnik committed Aug 3, 2024
1 parent 8ec7892 commit b6722e2
Show file tree
Hide file tree
Showing 11 changed files with 3 additions and 239 deletions.
4 changes: 2 additions & 2 deletions config/sources/families/spacemit.conf
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ declare -g ATF_TARGET_MAP="PLATFORM_DEFCONFIG=k1_defconfig PLATFORM=generic ;;bu

# U-Boot
declare -g BOOTSOURCE="https://gitee.com/bianbu-linux/uboot-2022.10.git"
declare -g BOOTBRANCH="${BOOTBRANCH_BOARD:-"tag:v1.0.8"}"
declare -g BOOTBRANCH="${BOOTBRANCH_BOARD:-"tag:v1.0.12"}"
declare -g BOOTDIR='u-boot-spacemit'
declare -g BOOTPATCHDIR="${BOOTPATCHDIR:-"legacy/u-boot-spacemit-k1"}"
declare -g UBOOT_TARGET_MAP=";;bootinfo_emmc.bin FSBL.bin u-boot.itb fw_dynamic.itb"
Expand All @@ -38,7 +38,7 @@ case "${BRANCH}" in
legacy)
# Kernel
declare -g KERNELSOURCE='https://gitee.com/bianbu-linux/linux-6.1.git'
declare -g KERNELBRANCH='tag:v1.0.8'
declare -g KERNELBRANCH='tag:v1.0.12'
declare -g KERNEL_MAJOR_MINOR="6.1"
declare -g LINUXCONFIG="linux-${LINUXFAMILY}-${BRANCH}"
declare -g KERNELPATCHDIR="${LINUXFAMILY}-legacy-${KERNEL_MAJOR_MINOR}" # Needed as long as both legacy and current are 6.1 kernels
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -312,55 +312,11 @@ diff --git a/arch/arm64/boot/dts/freescale/imx8mp.dtsi b/arch/arm64/boot/dts/fre
index 4b50920ac204..b00b4cced57c 100644
--- a/arch/arm64/boot/dts/freescale/imx8mp.dtsi
+++ b/arch/arm64/boot/dts/freescale/imx8mp.dtsi
@@ -832,6 +832,23 @@ pgc_mediamix: power-domain@10 {
<&clk IMX8MP_CLK_MEDIA_APB_ROOT>;
};

+ pgc_hdmimix: power-domains@14 {
+ #power-domain-cells = <0>;
+ reg = <IMX8MP_POWER_DOMAIN_HDMIMIX>;
+ clocks = <&clk IMX8MP_CLK_HDMI_ROOT>,
+ <&clk IMX8MP_CLK_HDMI_APB>;
+ assigned-clocks = <&clk IMX8MP_CLK_HDMI_AXI>,
+ <&clk IMX8MP_CLK_HDMI_APB>;
+ assigned-clock-parents = <&clk IMX8MP_SYS_PLL2_500M>,
+ <&clk IMX8MP_SYS_PLL1_133M>;
+ assigned-clock-rates = <500000000>, <133000000>;
+ };
+
+ pgc_hdmi_phy: power-domains@15 {
+ #power-domain-cells = <0>;
+ reg = <IMX8MP_POWER_DOMAIN_HDMI_PHY>;
+ };
+
pgc_mipi_phy2: power-domain@16 {
#power-domain-cells = <0>;
reg = <IMX8MP_POWER_DOMAIN_MIPI_PHY2>;
@@ -1831,6 +1848,122 @@ hsio_blk_ctrl: blk-ctrl@32f10000 {
@@ -1831,6 +1848,102 @@ hsio_blk_ctrl: blk-ctrl@32f10000 {
#power-domain-cells = <1>;
#clock-cells = <0>;
};
+
+ hdmi_blk_ctrl: blk-ctrl@32fc0000 {
+ compatible = "fsl,imx8mp-hdmi-blk-ctrl", "syscon";
+ reg = <0x32fc0000 0x23c>;
+ clocks = <&clk IMX8MP_CLK_HDMI_APB>,
+ <&clk IMX8MP_CLK_HDMI_ROOT>,
+ <&clk IMX8MP_CLK_HDMI_REF_266M>,
+ <&clk IMX8MP_CLK_HDMI_24M>;
+ clock-names = "apb", "axi", "ref_266m", "ref_24m";
+ power-domains = <&pgc_hdmimix>, <&pgc_hdmimix>,
+ <&pgc_hdmimix>, <&pgc_hdmimix>,
+ <&pgc_hdmimix>, <&pgc_hdmimix>,
+ <&pgc_hdmimix>, <&pgc_hdmi_phy>,
+ <&pgc_hdmimix>, <&pgc_hdmimix>;
+ power-domain-names = "bus", "irqsteer", "lcdif",
+ "pai", "pvi", "trng",
+ "hdmi-tx", "hdmi-tx-phy",
+ "hdmiblk-hrv", "hdmiblk-hdcp";
+ #power-domain-cells = <1>;
+ };
+
+ irqsteer_hdmi: interrupt-controller@32fc2000 {
+ compatible = "fsl,imx-irqsteer";
+ reg = <0x32fc2000 0x44>;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2593,34 +2593,6 @@ index e50f71ad3ceb..ef0a078c22f4 100644

for (i = 0; i < NUM_YUV2YUV_COEFFICIENTS; i++) {

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Jonas Karlman <jonas@kwiboo.se>
Date: Wed, 8 Jan 2020 21:07:51 +0000
Subject: [PATCH] arm64: dts: rockchip: increase vop clock rate on rk3328

The VOP on RK3328 needs to run at higher rate in order to
produce a proper 3840x2160 signal.

Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
---
arch/arm64/boot/dts/rockchip/rk3328.dtsi | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/arm64/boot/dts/rockchip/rk3328.dtsi b/arch/arm64/boot/dts/rockchip/rk3328.dtsi
index d7e44d174d7b..5519347232f6 100644
--- a/arch/arm64/boot/dts/rockchip/rk3328.dtsi
+++ b/arch/arm64/boot/dts/rockchip/rk3328.dtsi
@@ -811,8 +811,8 @@ cru: clock-controller@ff440000 {
<0>, <24000000>,
<24000000>, <24000000>,
<15000000>, <15000000>,
- <100000000>, <100000000>,
- <100000000>, <100000000>,
+ <300000000>, <100000000>,
+ <400000000>, <100000000>,
<50000000>, <100000000>,
<100000000>, <100000000>,
<50000000>, <50000000>,

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Alex Bee <knaerzche@gmail.com>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2610,35 +2610,6 @@ index e50f71ad3ceb..ef0a078c22f4 100644

for (i = 0; i < NUM_YUV2YUV_COEFFICIENTS; i++) {

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Jonas Karlman <jonas@kwiboo.se>
Date: Wed, 8 Jan 2020 21:07:51 +0000
Subject: [PATCH] arm64: dts: rockchip: increase vop clock rate on rk3328

The VOP on RK3328 needs to run at higher rate in order to
produce a proper 3840x2160 signal.

Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
---
arch/arm64/boot/dts/rockchip/rk3328.dtsi | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/arm64/boot/dts/rockchip/rk3328.dtsi b/arch/arm64/boot/dts/rockchip/rk3328.dtsi
index d7e44d174d7b..5519347232f6 100644
--- a/arch/arm64/boot/dts/rockchip/rk3328.dtsi
+++ b/arch/arm64/boot/dts/rockchip/rk3328.dtsi
@@ -811,8 +811,8 @@ cru: clock-controller@ff440000 {
<0>, <24000000>,
<24000000>, <24000000>,
<15000000>, <15000000>,
- <100000000>, <100000000>,
- <100000000>, <100000000>,
+ <300000000>, <100000000>,
+ <400000000>, <100000000>,
<50000000>, <100000000>,
<100000000>, <100000000>,
<50000000>, <50000000>,

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Alex Bee <knaerzche@gmail.com>
Date: Sat, 10 Apr 2021 16:54:26 +0200
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,32 +1,3 @@
From 5113ec8e82ea78884308aac6b0b8172c417d570b Mon Sep 17 00:00:00 2001
From: Paolo Sabatino <paolo.sabatino@gmail.com>
Date: Sat, 6 Apr 2024 15:40:30 +0200
Subject: [PATCH 1/2] hdmi timing core changes and fixes

---
arch/arm64/boot/dts/rockchip/rk3328.dtsi | 4 +-
drivers/clk/rockchip/clk-rk3399.c | 49 ++++++++++++++++++---
drivers/gpu/drm/bridge/synopsys/dw-hdmi.c | 29 ++++++++----
drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c | 44 +++++++++++++++++-
drivers/gpu/drm/rockchip/rockchip_drm_vop.c | 31 ++++++++++---
drivers/gpu/drm/rockchip/rockchip_vop_reg.c | 7 +++
6 files changed, 140 insertions(+), 24 deletions(-)

diff --git a/arch/arm64/boot/dts/rockchip/rk3328.dtsi b/arch/arm64/boot/dts/rockchip/rk3328.dtsi
index cc8209795c3e..74af7dba0f9a 100644
--- a/arch/arm64/boot/dts/rockchip/rk3328.dtsi
+++ b/arch/arm64/boot/dts/rockchip/rk3328.dtsi
@@ -813,8 +813,8 @@ cru: clock-controller@ff440000 {
<0>, <24000000>,
<24000000>, <24000000>,
<15000000>, <15000000>,
- <100000000>, <100000000>,
- <100000000>, <100000000>,
+ <300000000>, <100000000>,
+ <400000000>, <100000000>,
<50000000>, <100000000>,
<100000000>, <100000000>,
<50000000>, <50000000>,
diff --git a/drivers/clk/rockchip/clk-rk3399.c b/drivers/clk/rockchip/clk-rk3399.c
index 9ebd6c451b3d..d2391fdd6cb5 100644
--- a/drivers/clk/rockchip/clk-rk3399.c
Expand Down
16 changes: 0 additions & 16 deletions patch/kernel/archive/rockchip64-6.6/general-hdmi-clock-fixes.patch
Original file line number Diff line number Diff line change
Expand Up @@ -4,29 +4,13 @@ Date: Sat, 6 Apr 2024 15:40:30 +0200
Subject: [PATCH 1/2] hdmi timing core changes and fixes

---
arch/arm64/boot/dts/rockchip/rk3328.dtsi | 4 +-
drivers/clk/rockchip/clk-rk3399.c | 49 ++++++++++++++++++---
drivers/gpu/drm/bridge/synopsys/dw-hdmi.c | 29 ++++++++----
drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c | 44 +++++++++++++++++-
drivers/gpu/drm/rockchip/rockchip_drm_vop.c | 31 ++++++++++---
drivers/gpu/drm/rockchip/rockchip_vop_reg.c | 7 +++
6 files changed, 140 insertions(+), 24 deletions(-)

diff --git a/arch/arm64/boot/dts/rockchip/rk3328.dtsi b/arch/arm64/boot/dts/rockchip/rk3328.dtsi
index cc8209795c3e..74af7dba0f9a 100644
--- a/arch/arm64/boot/dts/rockchip/rk3328.dtsi
+++ b/arch/arm64/boot/dts/rockchip/rk3328.dtsi
@@ -813,8 +813,8 @@ cru: clock-controller@ff440000 {
<0>, <24000000>,
<24000000>, <24000000>,
<15000000>, <15000000>,
- <100000000>, <100000000>,
- <100000000>, <100000000>,
+ <300000000>, <100000000>,
+ <400000000>, <100000000>,
<50000000>, <100000000>,
<100000000>, <100000000>,
<50000000>, <50000000>,
diff --git a/drivers/clk/rockchip/clk-rk3399.c b/drivers/clk/rockchip/clk-rk3399.c
index 9ebd6c451b3d..d2391fdd6cb5 100644
--- a/drivers/clk/rockchip/clk-rk3399.c
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6408,66 +6408,6 @@ index 1dfe7c6ae4ba..a28f35a03b26 100644
--
2.44.0

From 3b25c78f92268d44d0c3c8201a302f49a841c0a1 Mon Sep 17 00:00:00 2001
From: Bitterblue Smith <rtl8821cerfe2@gmail.com>
Date: Mon, 29 Apr 2024 20:57:52 +0300
Subject: [PATCH] wifi: rtw88: usb: Fix disconnection after beacon loss

When there is beacon loss, for example due to unrelated Bluetooth
devices transmitting music nearby, the wifi connection dies soon
after the first beacon loss message:

Apr 28 20:47:14 ideapad2 wpa_supplicant[1161]: wlp3s0f3u4:
CTRL-EVENT-BEACON-LOSS
Apr 28 20:47:15 ideapad2 wpa_supplicant[1161]: wlp3s0f3u4:
CTRL-EVENT-DISCONNECTED bssid=... reason=4 locally_generated=1

Apr 28 20:47:24 ideapad2 wpa_supplicant[1161]: wlp3s0f3u4:
CTRL-EVENT-BEACON-LOSS
Apr 28 20:47:25 ideapad2 wpa_supplicant[1161]: wlp3s0f3u4:
CTRL-EVENT-DISCONNECTED bssid=... reason=4 locally_generated=1

Apr 28 20:47:34 ideapad2 wpa_supplicant[1161]: wlp3s0f3u4:
CTRL-EVENT-BEACON-LOSS
Apr 28 20:47:35 ideapad2 wpa_supplicant[1161]: wlp3s0f3u4:
CTRL-EVENT-DISCONNECTED bssid=... reason=4 locally_generated=1

When the beacon loss happens, mac80211 makes rtw88 transmit a QOS
NULL frame and asks to confirm the ACK status. Even though rtw88
confirms to mac80211 that the QOS NULL was transmitted successfully,
the connection still dies. This is because rtw88 is handing the QOS
NULL back to mac80211 with skb->data pointing to the headroom (the
TX descriptor) instead of ieee80211_hdr.

Fix the disconnection by moving skb->data to the correct position
before ieee80211_tx_status_irqsafe().

The problem was observed with RTL8811AU (TP-Link Archer T2U Nano)
and the potential future rtw88_8821au driver. Also tested with
RTL8811CU (Tenda U9).

Cc: stable@vger.kernel.org
Signed-off-by: Bitterblue Smith <rtl8821cerfe2@gmail.com>
---
drivers/net/wireless/realtek/rtw88/usb.c | 2 ++
1 file changed, 2 insertions(+)

diff --git a/drivers/net/wireless/realtek/rtw88/usb.c b/drivers/net/wireless/realtek/rtw88/usb.c
index 3ba7b81c6080..1dfe7c6ae4ba 100644
--- a/drivers/net/wireless/realtek/rtw88/usb.c
+++ b/drivers/net/wireless/realtek/rtw88/usb.c
@@ -278,6 +278,8 @@ static void rtw_usb_write_port_tx_complete(struct urb *urb)
info = IEEE80211_SKB_CB(skb);
tx_data = rtw_usb_get_tx_data(skb);

+ skb_pull(skb, rtwdev->chip->tx_pkt_desc_sz);
+
/* enqueue to wait for tx report */
if (info->flags & IEEE80211_TX_CTL_REQ_TX_STATUS) {
rtw_tx_report_enqueue(rtwdev, skb, tx_data->sn);
--
2.44.0

From 3b25c78f92268d44d0c3c8201a302f49a841c0a1 Mon Sep 17 00:00:00 2001
From: Bitterblue Smith <rtl8821cerfe2@gmail.com>
Date: Sun, 16 Jun 2024 22:27:34 +0300
Expand Down

0 comments on commit b6722e2

Please sign in to comment.