From 508bf7ca0fc58d5f9d156bd05b5ae9a6e5b780e3 Mon Sep 17 00:00:00 2001 From: Rosen Penev Date: Tue, 3 Dec 2024 13:29:37 -0800 Subject: [PATCH 01/43] lantiq: use regulator for USB GPIO One is already present. The other one can be implemented in terms of the PHY. Signed-off-by: Rosen Penev Link: https://github.com/openwrt/openwrt/pull/17250 Signed-off-by: John Crispin --- .../mips/boot/dts/lantiq/ar9_zte_h201l.dts | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/ar9_zte_h201l.dts b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/ar9_zte_h201l.dts index a0e3664b6dbcd2..3e8cbcf84bc91c 100644 --- a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/ar9_zte_h201l.dts +++ b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/ar9_zte_h201l.dts @@ -96,11 +96,6 @@ gpio-export,output = <1>; gpios = <&gpio 38 GPIO_ACTIVE_HIGH>; }; - usb { - gpio-export,name = "usb"; - gpio-export,output = <1>; - gpios = <&gpio 28 GPIO_ACTIVE_HIGH>; - }; wifi { gpio-export,name = "wifi"; gpio-export,output = <1>; @@ -108,6 +103,18 @@ }; }; + usb_phy: regulator-usb-phy { + compatible = "regulator-fixed"; + + regulator-name = "USB_PHY"; + + regulator-min-microvolt = <5000000>; + regulator-max-microvolt = <5000000>; + + gpios = <&gpio 28 GPIO_ACTIVE_HIGH>; + enable-active-high; + }; + usb_vbus: regulator-usb-vbus { compatible = "regulator-fixed"; @@ -166,6 +173,7 @@ &usb_phy0 { status = "okay"; + phy-supply = <&usb_phy>; }; From fb17914f65a430555b908929682d8b36d6e31b12 Mon Sep 17 00:00:00 2001 From: Georgi Valkov Date: Thu, 12 Dec 2024 11:05:15 +0200 Subject: [PATCH 02/43] mac80211: refresh patch for ath12k refresh the following patch for ath12k 001-wifi-ath12k-add-11d-scan-offload-support-and-handle-country-code-for-WCN7850.patch Signed-off-by: Georgi Valkov Link: https://github.com/openwrt/openwrt/pull/17246 Signed-off-by: John Crispin --- ...-and-handle-country-code-for-WCN7850.patch | 40 +++++++++---------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/package/kernel/mac80211/patches/ath12k/001-wifi-ath12k-add-11d-scan-offload-support-and-handle-country-code-for-WCN7850.patch b/package/kernel/mac80211/patches/ath12k/001-wifi-ath12k-add-11d-scan-offload-support-and-handle-country-code-for-WCN7850.patch index d370db104713a0..f368ccd2727fad 100644 --- a/package/kernel/mac80211/patches/ath12k/001-wifi-ath12k-add-11d-scan-offload-support-and-handle-country-code-for-WCN7850.patch +++ b/package/kernel/mac80211/patches/ath12k/001-wifi-ath12k-add-11d-scan-offload-support-and-handle-country-code-for-WCN7850.patch @@ -121,7 +121,7 @@ Acked-by: Jeff Johnson }; static __le32 ath12k_wmi_tlv_hdr(u32 cmd, u32 len) -@@ -2363,7 +2365,10 @@ int ath12k_wmi_send_scan_start_cmd(struc +@@ -2364,7 +2366,10 @@ int ath12k_wmi_send_scan_start_cmd(struc cmd->scan_id = cpu_to_le32(arg->scan_id); cmd->scan_req_id = cpu_to_le32(arg->scan_req_id); cmd->vdev_id = cpu_to_le32(arg->vdev_id); @@ -133,7 +133,7 @@ Acked-by: Jeff Johnson cmd->notify_scan_events = cpu_to_le32(arg->notify_scan_events); ath12k_wmi_copy_scan_event_cntrl_flags(cmd, arg); -@@ -3083,6 +3088,110 @@ out: +@@ -3084,6 +3089,110 @@ out: return ret; } @@ -244,7 +244,7 @@ Acked-by: Jeff Johnson int ath12k_wmi_send_twt_enable_cmd(struct ath12k *ar, u32 pdev_id) { -@@ -5668,6 +5777,50 @@ static void ath12k_wmi_op_ep_tx_credits( +@@ -5669,6 +5778,50 @@ static void ath12k_wmi_op_ep_tx_credits( wake_up(&ab->wmi_ab.tx_credits_wq); } @@ -295,7 +295,7 @@ Acked-by: Jeff Johnson static void ath12k_wmi_htc_tx_complete(struct ath12k_base *ab, struct sk_buff *skb) { -@@ -7269,6 +7422,9 @@ static void ath12k_wmi_op_rx(struct ath1 +@@ -7270,6 +7423,9 @@ static void ath12k_wmi_op_rx(struct ath1 case WMI_GTK_OFFLOAD_STATUS_EVENTID: ath12k_wmi_gtk_offload_status_event(ab, skb); break; @@ -307,7 +307,7 @@ Acked-by: Jeff Johnson ath12k_dbg(ab, ATH12K_DBG_WMI, "Unknown eventid: 0x%x\n", id); --- a/drivers/net/wireless/ath/ath12k/wmi.h +++ b/drivers/net/wireless/ath/ath12k/wmi.h -@@ -3859,6 +3859,28 @@ struct wmi_init_country_cmd { +@@ -3860,6 +3860,28 @@ struct wmi_init_country_cmd { } cc_info; } __packed; @@ -336,7 +336,7 @@ Acked-by: Jeff Johnson struct wmi_delba_send_cmd { __le32 tlv_header; __le32 vdev_id; -@@ -3944,6 +3966,16 @@ struct ath12k_wmi_eht_rate_set_params { +@@ -3945,6 +3967,16 @@ struct ath12k_wmi_eht_rate_set_params { #define MAX_6G_REG_RULES 5 #define REG_US_5G_NUM_REG_RULES 4 @@ -353,7 +353,7 @@ Acked-by: Jeff Johnson enum wmi_start_event_param { WMI_VDEV_START_RESP_EVENT = 0, WMI_VDEV_RESTART_RESP_EVENT, -@@ -5546,11 +5578,17 @@ int ath12k_wmi_send_bcn_offload_control_ +@@ -5547,11 +5579,17 @@ int ath12k_wmi_send_bcn_offload_control_ u32 vdev_id, u32 bcn_ctrl_op); int ath12k_wmi_send_init_country_cmd(struct ath12k *ar, struct ath12k_wmi_init_country_arg *arg); @@ -485,7 +485,7 @@ Acked-by: Jeff Johnson u32 fw_crash_counter; --- a/drivers/net/wireless/ath/ath12k/mac.c +++ b/drivers/net/wireless/ath/ath12k/mac.c -@@ -2947,6 +2947,11 @@ static void ath12k_bss_assoc(struct ath1 +@@ -2946,6 +2946,11 @@ static void ath12k_bss_assoc(struct ath1 if (ret) ath12k_warn(ar->ab, "failed to set vdev %i OBSS PD parameters: %d\n", arvif->vdev_id, ret); @@ -497,7 +497,7 @@ Acked-by: Jeff Johnson } static void ath12k_bss_disassoc(struct ath12k *ar, -@@ -3522,7 +3527,7 @@ void __ath12k_mac_scan_finish(struct ath +@@ -3521,7 +3526,7 @@ void __ath12k_mac_scan_finish(struct ath ar->scan_channel = NULL; ar->scan.roc_freq = 0; cancel_delayed_work(&ar->scan.timeout); @@ -506,7 +506,7 @@ Acked-by: Jeff Johnson break; } } -@@ -3783,7 +3788,12 @@ scan: +@@ -3782,7 +3787,12 @@ scan: ret = ath12k_start_scan(ar, &arg); if (ret) { @@ -520,7 +520,7 @@ Acked-by: Jeff Johnson spin_lock_bh(&ar->data_lock); ar->scan.state = ATH12K_SCAN_IDLE; spin_unlock_bh(&ar->data_lock); -@@ -3802,6 +3812,11 @@ exit: +@@ -3801,6 +3811,11 @@ exit: mutex_unlock(&ar->conf_mutex); @@ -532,7 +532,7 @@ Acked-by: Jeff Johnson return ret; } -@@ -5986,7 +6001,7 @@ static int ath12k_mac_start(struct ath12 +@@ -5985,7 +6000,7 @@ static int ath12k_mac_start(struct ath12 /* TODO: Do we need to enable ANI? */ @@ -541,7 +541,7 @@ Acked-by: Jeff Johnson ar->num_started_vdevs = 0; ar->num_created_vdevs = 0; -@@ -6166,6 +6181,9 @@ static void ath12k_mac_stop(struct ath12 +@@ -6165,6 +6180,9 @@ static void ath12k_mac_stop(struct ath12 cancel_delayed_work_sync(&ar->scan.timeout); cancel_work_sync(&ar->regd_update_work); cancel_work_sync(&ar->ab->rfkill_work); @@ -551,7 +551,7 @@ Acked-by: Jeff Johnson spin_lock_bh(&ar->data_lock); list_for_each_entry_safe(ppdu_stats, tmp, &ar->ppdu_stats_info, list) { -@@ -6412,6 +6430,117 @@ static void ath12k_mac_op_update_vif_off +@@ -6411,6 +6429,117 @@ static void ath12k_mac_op_update_vif_off ath12k_mac_update_vif_offload(arvif); } @@ -669,7 +669,7 @@ Acked-by: Jeff Johnson static int ath12k_mac_vdev_create(struct ath12k *ar, struct ieee80211_vif *vif) { struct ath12k_hw *ah = ar->ah; -@@ -6526,6 +6655,7 @@ static int ath12k_mac_vdev_create(struct +@@ -6525,6 +6654,7 @@ static int ath12k_mac_vdev_create(struct arvif->vdev_id, ret); goto err_peer_del; } @@ -677,7 +677,7 @@ Acked-by: Jeff Johnson break; case WMI_VDEV_TYPE_STA: param_id = WMI_STA_PS_PARAM_RX_WAKE_POLICY; -@@ -6564,6 +6694,13 @@ static int ath12k_mac_vdev_create(struct +@@ -6563,6 +6693,13 @@ static int ath12k_mac_vdev_create(struct arvif->vdev_id, ret); goto err_peer_del; } @@ -691,7 +691,7 @@ Acked-by: Jeff Johnson break; default: break; -@@ -6904,6 +7041,11 @@ static void ath12k_mac_op_remove_interfa +@@ -6903,6 +7040,11 @@ static void ath12k_mac_op_remove_interfa ath12k_dbg(ab, ATH12K_DBG_MAC, "mac remove interface (vdev %d)\n", arvif->vdev_id); @@ -703,7 +703,7 @@ Acked-by: Jeff Johnson if (arvif->vdev_type == WMI_VDEV_TYPE_AP) { ret = ath12k_peer_delete(ar, arvif->vdev_id, vif->addr); if (ret) -@@ -7744,6 +7886,14 @@ ath12k_mac_op_unassign_vif_chanctx(struc +@@ -7743,6 +7885,14 @@ ath12k_mac_op_unassign_vif_chanctx(struc ar->num_started_vdevs == 1 && ar->monitor_vdev_created) ath12k_mac_monitor_stop(ar); @@ -718,7 +718,7 @@ Acked-by: Jeff Johnson mutex_unlock(&ar->conf_mutex); } -@@ -8282,6 +8432,14 @@ ath12k_mac_op_reconfig_complete(struct i +@@ -8281,6 +8431,14 @@ ath12k_mac_op_reconfig_complete(struct i ath12k_warn(ar->ab, "pdev %d successfully recovered\n", ar->pdev->pdev_id); @@ -733,7 +733,7 @@ Acked-by: Jeff Johnson if (ab->is_reset) { recovery_count = atomic_inc_return(&ab->recovery_count); -@@ -9331,6 +9489,9 @@ static void ath12k_mac_setup(struct ath1 +@@ -9330,6 +9488,9 @@ static void ath12k_mac_setup(struct ath1 INIT_WORK(&ar->wmi_mgmt_tx_work, ath12k_mgmt_over_wmi_tx_work); skb_queue_head_init(&ar->wmi_mgmt_tx_queue); From 76fabd909e64fe2f6e56e28ded90053d1293b242 Mon Sep 17 00:00:00 2001 From: David Bauer Date: Sat, 7 Dec 2024 14:47:29 +0100 Subject: [PATCH 03/43] wifi-scripts: don't fail on unset PSK Don't fail wireless interface bringup on empty PSK set. This is a valid configuration, resulting in a PSK network which can't be connected to. It does not fail the bringup of the hostapd process. Keep failing the interface setup in case a password with invalid length is used. This is also beneficial when intending to configure a PPSK network. It allows to create a network where no PPSK is yet set. Signed-off-by: David Bauer Link: https://github.com/openwrt/openwrt/pull/17197 Signed-off-by: John Crispin --- package/network/config/wifi-scripts/files/lib/netifd/hostapd.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package/network/config/wifi-scripts/files/lib/netifd/hostapd.sh b/package/network/config/wifi-scripts/files/lib/netifd/hostapd.sh index 3285ee4312f37d..080f15d7a6579e 100644 --- a/package/network/config/wifi-scripts/files/lib/netifd/hostapd.sh +++ b/package/network/config/wifi-scripts/files/lib/netifd/hostapd.sh @@ -724,7 +724,7 @@ hostapd_set_bss_options() { append bss_conf "wpa_psk=$key" "$N" elif [ ${#key} -ge 8 ] && [ ${#key} -le 63 ]; then append bss_conf "wpa_passphrase=$key" "$N" - elif [ -n "$key" ] || [ -z "$wpa_psk_file" ] || [ -z "$sae_password_file" ]; then + elif [ -n "$key" ]; then wireless_setup_vif_failed INVALID_WPA_PSK return 1 fi From dcef169319a4b90160c1d52ee6c1ddb6c3c6fe2c Mon Sep 17 00:00:00 2001 From: Rosen Penev Date: Thu, 28 Nov 2024 20:21:20 -0800 Subject: [PATCH 04/43] ath79: usb: remove usb- from reset-names This matches the upstream PHY driver, which removed it. Signed-off-by: Rosen Penev Link: https://github.com/openwrt/openwrt/pull/17118 Signed-off-by: John Crispin --- target/linux/ath79/dts/ar7100.dtsi | 2 +- target/linux/ath79/dts/ar7240.dtsi | 2 +- target/linux/ath79/dts/ar7241.dtsi | 2 +- target/linux/ath79/dts/ar7242.dtsi | 2 +- target/linux/ath79/dts/ar9132.dtsi | 2 +- target/linux/ath79/dts/ar9330.dtsi | 2 +- target/linux/ath79/dts/ar934x.dtsi | 2 +- target/linux/ath79/dts/qca953x.dtsi | 2 +- target/linux/ath79/dts/qca955x.dtsi | 4 ++-- target/linux/ath79/dts/qca956x.dtsi | 4 ++-- .../ath79/patches-6.6/700-phy-add-ath79-usb-phys.patch | 8 ++++---- 11 files changed, 16 insertions(+), 16 deletions(-) diff --git a/target/linux/ath79/dts/ar7100.dtsi b/target/linux/ath79/dts/ar7100.dtsi index 5237157458ed6b..bac27d9284957d 100644 --- a/target/linux/ath79/dts/ar7100.dtsi +++ b/target/linux/ath79/dts/ar7100.dtsi @@ -54,7 +54,7 @@ compatible = "qca,ar7100-usb-phy"; reg = <0x18030000 0x10>; - reset-names = "usb-phy", "usb-host", "usb-ohci-dll"; + reset-names = "phy", "usb-host", "usb-ohci-dll"; resets = <&rst 4>, <&rst 5>, <&rst 6>; #phy-cells = <0>; diff --git a/target/linux/ath79/dts/ar7240.dtsi b/target/linux/ath79/dts/ar7240.dtsi index eb4b2e4aa39367..23409b25d6c3b2 100644 --- a/target/linux/ath79/dts/ar7240.dtsi +++ b/target/linux/ath79/dts/ar7240.dtsi @@ -6,7 +6,7 @@ usb_phy: usb-phy { compatible = "qca,ar7200-usb-phy"; - reset-names = "usb-phy", "usb-ohci-dll"; + reset-names = "phy", "usb-ohci-dll"; resets = <&rst 4>, <&rst 3>; #phy-cells = <0>; diff --git a/target/linux/ath79/dts/ar7241.dtsi b/target/linux/ath79/dts/ar7241.dtsi index 8d0e60da4024e3..3dd074002527d8 100644 --- a/target/linux/ath79/dts/ar7241.dtsi +++ b/target/linux/ath79/dts/ar7241.dtsi @@ -6,7 +6,7 @@ usb_phy: usb-phy { compatible = "qca,ar7200-usb-phy"; - reset-names = "usb-phy", "usb-suspend-override"; + reset-names = "phy", "suspend-override"; resets = <&rst 4>, <&rst 3>; #phy-cells = <0>; diff --git a/target/linux/ath79/dts/ar7242.dtsi b/target/linux/ath79/dts/ar7242.dtsi index aab6c28f7b1f39..9b4cc9920a76b3 100644 --- a/target/linux/ath79/dts/ar7242.dtsi +++ b/target/linux/ath79/dts/ar7242.dtsi @@ -6,7 +6,7 @@ usb_phy: usb-phy { compatible = "qca,ar7200-usb-phy"; - reset-names = "usb-phy", "usb-suspend-override"; + reset-names = "phy", "suspend-override"; resets = <&rst 4>, <&rst 3>; #phy-cells = <0>; diff --git a/target/linux/ath79/dts/ar9132.dtsi b/target/linux/ath79/dts/ar9132.dtsi index 71181c46de68dd..2ea689fac16bd5 100644 --- a/target/linux/ath79/dts/ar9132.dtsi +++ b/target/linux/ath79/dts/ar9132.dtsi @@ -188,7 +188,7 @@ usb_phy: usb-phy { compatible = "qca,ar7200-usb-phy"; - reset-names = "usb-phy", "usb-suspend-override"; + reset-names = "phy", "suspend-override"; resets = <&rst 4>, <&rst 3>; #phy-cells = <0>; diff --git a/target/linux/ath79/dts/ar9330.dtsi b/target/linux/ath79/dts/ar9330.dtsi index 466e0fb25dc5a1..5b53ec1e4f10d6 100644 --- a/target/linux/ath79/dts/ar9330.dtsi +++ b/target/linux/ath79/dts/ar9330.dtsi @@ -166,7 +166,7 @@ usb_phy: usb-phy { compatible = "qca,ar7200-usb-phy"; - reset-names = "usb-phy", "usb-suspend-override"; + reset-names = "phy", "suspend-override"; resets = <&rst 4>, <&rst 3>; #phy-cells = <0>; diff --git a/target/linux/ath79/dts/ar934x.dtsi b/target/linux/ath79/dts/ar934x.dtsi index 98cd76629f3617..c3bdfc916d6529 100644 --- a/target/linux/ath79/dts/ar934x.dtsi +++ b/target/linux/ath79/dts/ar934x.dtsi @@ -216,7 +216,7 @@ usb_phy: usb-phy { compatible = "qca,ar9340-usb-phy", "qca,ar7200-usb-phy"; - reset-names = "usb-phy-analog", "usb-phy", "usb-suspend-override"; + reset-names = "phy-analog", "phy", "suspend-override"; resets = <&rst 11>, <&rst 4>, <&rst 3>; #phy-cells = <0>; diff --git a/target/linux/ath79/dts/qca953x.dtsi b/target/linux/ath79/dts/qca953x.dtsi index 0e52a80f6e776f..ccfc3380beb3d8 100644 --- a/target/linux/ath79/dts/qca953x.dtsi +++ b/target/linux/ath79/dts/qca953x.dtsi @@ -60,7 +60,7 @@ reg = <0x18030000 0x100>; #phy-cells = <0>; - reset-names = "usb-phy-analog", "usb-phy", "usb-suspend-override"; + reset-names = "phy-analog", "phy", "suspend-override"; resets = <&rst 11>, <&rst 4>, <&rst 3>; status = "disabled"; diff --git a/target/linux/ath79/dts/qca955x.dtsi b/target/linux/ath79/dts/qca955x.dtsi index f8318b8f65dc08..719b965d1cf9a1 100644 --- a/target/linux/ath79/dts/qca955x.dtsi +++ b/target/linux/ath79/dts/qca955x.dtsi @@ -64,7 +64,7 @@ compatible ="qca,qca9550-usb-phy", "qca,ar7200-usb-phy"; reg = <0x18030000 4>, <0x18030004 4>; - reset-names = "usb-phy-analog", "usb-phy", "usb-suspend-override"; + reset-names = "phy-analog", "phy", "suspend-override"; resets = <&rst 11>, <&rst 4>, <&rst 3>; #phy-cells = <0>; @@ -76,7 +76,7 @@ compatible = "qca,qca9550-usb-phy", "qca,ar7200-usb-phy"; reg = <0x18030010 4>, <0x18030014 4>; - reset-names = "usb-phy-analog", "usb-phy", "usb-suspend-override"; + reset-names = "phy-analog", "phy", "suspend-override"; resets = <&rst2 11>, <&rst2 4>, <&rst2 3>; #phy-cells = <0>; diff --git a/target/linux/ath79/dts/qca956x.dtsi b/target/linux/ath79/dts/qca956x.dtsi index de685d053c75bf..9581e87421944d 100644 --- a/target/linux/ath79/dts/qca956x.dtsi +++ b/target/linux/ath79/dts/qca956x.dtsi @@ -254,7 +254,7 @@ usb_phy0: usb-phy { compatible = "qca,qca9560-usb-phy", "qca,ar7200-usb-phy"; - reset-names = "usb-phy", "usb-suspend-override"; + reset-names = "phy", "suspend-override"; resets = <&rst 4>, <&rst 3>; #phy-cells = <0>; @@ -265,7 +265,7 @@ usb_phy1: usb-phy { compatible = "qca,qca9560-usb-phy", "qca,ar7200-usb-phy"; - reset-names = "usb-phy", "usb-suspend-override"; + reset-names = "phy", "suspend-override"; resets = <&rst2 4>, <&rst2 3>; #phy-cells = <0>; diff --git a/target/linux/ath79/patches-6.6/700-phy-add-ath79-usb-phys.patch b/target/linux/ath79/patches-6.6/700-phy-add-ath79-usb-phys.patch index 98c399c9e0949f..98879927cbee15 100644 --- a/target/linux/ath79/patches-6.6/700-phy-add-ath79-usb-phys.patch +++ b/target/linux/ath79/patches-6.6/700-phy-add-ath79-usb-phys.patch @@ -128,7 +128,7 @@ Signed-off-by: John Crispin + if (IS_ERR(priv->io_base)) + return PTR_ERR(priv->io_base); + -+ priv->rst_phy = devm_reset_control_get(&pdev->dev, "usb-phy"); ++ priv->rst_phy = devm_reset_control_get(&pdev->dev, "phy"); + if (IS_ERR(priv->rst_phy)) + return dev_err_probe(&pdev->dev, PTR_ERR(priv->rst_phy), "phy reset is missing"); + @@ -250,17 +250,17 @@ Signed-off-by: John Crispin + if (!priv) + return -ENOMEM; + -+ priv->rst_phy = devm_reset_control_get(&pdev->dev, "usb-phy"); ++ priv->rst_phy = devm_reset_control_get(&pdev->dev, "phy"); + if (IS_ERR(priv->rst_phy)) + return dev_err_probe(&pdev->dev, PTR_ERR(priv->rst_phy), "phy reset is missing"); + + priv->rst_phy_analog = devm_reset_control_get_optional( -+ &pdev->dev, "usb-phy-analog"); ++ &pdev->dev, "phy-analog"); + if (IS_ERR(priv->rst_phy_analog)) + return PTR_ERR(priv->rst_phy_analog); + + priv->suspend_override = devm_reset_control_get_optional( -+ &pdev->dev, "usb-suspend-override"); ++ &pdev->dev, "suspend-override"); + if (IS_ERR(priv->suspend_override)) + return PTR_ERR(priv->suspend_override); + From 787cb9d87edbf3c853328bf26e41dcff2ddde8c8 Mon Sep 17 00:00:00 2001 From: Rosen Penev Date: Thu, 28 Nov 2024 20:44:51 -0800 Subject: [PATCH 05/43] ath79: change phy-names to only usb Both generic-ehci.yaml and generic-ohci.yaml state that phy-names is to only be usb. Signed-off-by: Rosen Penev Link: https://github.com/openwrt/openwrt/pull/17118 Signed-off-by: John Crispin --- target/linux/ath79/dts/ar7100.dtsi | 4 ++-- target/linux/ath79/dts/ar7240.dtsi | 2 +- target/linux/ath79/dts/ar7241.dtsi | 2 +- target/linux/ath79/dts/ar7242.dtsi | 2 +- target/linux/ath79/dts/ar9330.dtsi | 2 +- target/linux/ath79/dts/ar934x.dtsi | 2 +- target/linux/ath79/dts/qca953x.dtsi | 2 +- target/linux/ath79/dts/qca955x.dtsi | 4 ++-- target/linux/ath79/dts/qca956x.dtsi | 4 ++-- 9 files changed, 12 insertions(+), 12 deletions(-) diff --git a/target/linux/ath79/dts/ar7100.dtsi b/target/linux/ath79/dts/ar7100.dtsi index bac27d9284957d..a23b61c935a072 100644 --- a/target/linux/ath79/dts/ar7100.dtsi +++ b/target/linux/ath79/dts/ar7100.dtsi @@ -147,7 +147,7 @@ interrupt-parent = <&cpuintc>; interrupts = <3>; - phy-names = "usb-phy"; + phy-names = "usb"; phys = <&usb_phy>; has-synopsys-hc-bug; @@ -170,7 +170,7 @@ interrupt-parent = <&miscintc>; interrupts = <6>; - phy-names = "usb-phy"; + phy-names = "usb"; phys = <&usb_phy>; status = "disabled"; diff --git a/target/linux/ath79/dts/ar7240.dtsi b/target/linux/ath79/dts/ar7240.dtsi index 23409b25d6c3b2..9d6e56b7a473da 100644 --- a/target/linux/ath79/dts/ar7240.dtsi +++ b/target/linux/ath79/dts/ar7240.dtsi @@ -29,7 +29,7 @@ resets = <&rst 5>; reset-names = "usb-host"; - phy-names = "usb-phy"; + phy-names = "usb"; phys = <&usb_phy>; status = "disabled"; diff --git a/target/linux/ath79/dts/ar7241.dtsi b/target/linux/ath79/dts/ar7241.dtsi index 3dd074002527d8..e5813db9782609 100644 --- a/target/linux/ath79/dts/ar7241.dtsi +++ b/target/linux/ath79/dts/ar7241.dtsi @@ -32,7 +32,7 @@ has-transaction-translator; caps-offset = <0x100>; - phy-names = "usb-phy"; + phy-names = "usb"; phys = <&usb_phy>; status = "disabled"; diff --git a/target/linux/ath79/dts/ar7242.dtsi b/target/linux/ath79/dts/ar7242.dtsi index 9b4cc9920a76b3..14609a54f24590 100644 --- a/target/linux/ath79/dts/ar7242.dtsi +++ b/target/linux/ath79/dts/ar7242.dtsi @@ -32,7 +32,7 @@ has-transaction-translator; caps-offset = <0x100>; - phy-names = "usb-phy"; + phy-names = "usb"; phys = <&usb_phy>; status = "disabled"; diff --git a/target/linux/ath79/dts/ar9330.dtsi b/target/linux/ath79/dts/ar9330.dtsi index 5b53ec1e4f10d6..976529bd3ff3d1 100644 --- a/target/linux/ath79/dts/ar9330.dtsi +++ b/target/linux/ath79/dts/ar9330.dtsi @@ -122,7 +122,7 @@ resets = <&rst 5>; reset-names = "usb-host"; - phy-names = "usb-phy"; + phy-names = "usb"; phys = <&usb_phy>; status = "disabled"; diff --git a/target/linux/ath79/dts/ar934x.dtsi b/target/linux/ath79/dts/ar934x.dtsi index c3bdfc916d6529..c490f051bb7239 100644 --- a/target/linux/ath79/dts/ar934x.dtsi +++ b/target/linux/ath79/dts/ar934x.dtsi @@ -171,7 +171,7 @@ has-transaction-translator; caps-offset = <0x100>; - phy-names = "usb-phy"; + phy-names = "usb"; phys = <&usb_phy>; status = "disabled"; diff --git a/target/linux/ath79/dts/qca953x.dtsi b/target/linux/ath79/dts/qca953x.dtsi index ccfc3380beb3d8..e7feeded7bc80d 100644 --- a/target/linux/ath79/dts/qca953x.dtsi +++ b/target/linux/ath79/dts/qca953x.dtsi @@ -199,7 +199,7 @@ has-transaction-translator; caps-offset = <0x100>; - phy-names = "usb-phy"; + phy-names = "usb"; phys = <&usb_phy>; status = "disabled"; diff --git a/target/linux/ath79/dts/qca955x.dtsi b/target/linux/ath79/dts/qca955x.dtsi index 719b965d1cf9a1..de27b0e7d2ed4c 100644 --- a/target/linux/ath79/dts/qca955x.dtsi +++ b/target/linux/ath79/dts/qca955x.dtsi @@ -278,7 +278,7 @@ has-transaction-translator; caps-offset = <0x100>; - phy-names = "usb-phy0"; + phy-names = "usb"; phys = <&usb_phy0>; status = "disabled"; @@ -304,7 +304,7 @@ has-transaction-translator; caps-offset = <0x100>; - phy-names = "usb-phy1"; + phy-names = "usb"; phys = <&usb_phy1>; status = "disabled"; diff --git a/target/linux/ath79/dts/qca956x.dtsi b/target/linux/ath79/dts/qca956x.dtsi index 9581e87421944d..e9f443cbef9c07 100644 --- a/target/linux/ath79/dts/qca956x.dtsi +++ b/target/linux/ath79/dts/qca956x.dtsi @@ -197,7 +197,7 @@ has-transaction-translator; caps-offset = <0x100>; - phy-names = "usb-phy0"; + phy-names = "usb"; phys = <&usb_phy0>; status = "disabled"; @@ -224,7 +224,7 @@ has-transaction-translator; caps-offset = <0x100>; - phy-names = "usb-phy1"; + phy-names = "usb"; phys = <&usb_phy1>; status = "disabled"; From 481bf5805a5961ba154826d24d40587058066773 Mon Sep 17 00:00:00 2001 From: Rosen Penev Date: Fri, 29 Nov 2024 14:24:38 -0800 Subject: [PATCH 06/43] ath79: usb: remove reset names Upstream uses devm_reset_control_array_get_optional_shared, which does not use names. reset-names is also not specified in the documentation. Signed-off-by: Rosen Penev Link: https://github.com/openwrt/openwrt/pull/17118 Signed-off-by: John Crispin --- target/linux/ath79/dts/ar7100.dtsi | 2 +- target/linux/ath79/dts/ar7240.dtsi | 1 - target/linux/ath79/dts/ar7241.dtsi | 1 - target/linux/ath79/dts/ar7242.dtsi | 1 - target/linux/ath79/dts/ar9330.dtsi | 1 - target/linux/ath79/dts/ar934x.dtsi | 1 - target/linux/ath79/dts/qca953x.dtsi | 1 - target/linux/ath79/dts/qca955x.dtsi | 2 -- target/linux/ath79/dts/qca956x.dtsi | 2 -- target/linux/ath79/patches-6.6/700-phy-add-ath79-usb-phys.patch | 2 +- 10 files changed, 2 insertions(+), 12 deletions(-) diff --git a/target/linux/ath79/dts/ar7100.dtsi b/target/linux/ath79/dts/ar7100.dtsi index a23b61c935a072..1cfe82ded89136 100644 --- a/target/linux/ath79/dts/ar7100.dtsi +++ b/target/linux/ath79/dts/ar7100.dtsi @@ -54,7 +54,7 @@ compatible = "qca,ar7100-usb-phy"; reg = <0x18030000 0x10>; - reset-names = "phy", "usb-host", "usb-ohci-dll"; + reset-names = "phy", "host", "usb-ohci-dll"; resets = <&rst 4>, <&rst 5>, <&rst 6>; #phy-cells = <0>; diff --git a/target/linux/ath79/dts/ar7240.dtsi b/target/linux/ath79/dts/ar7240.dtsi index 9d6e56b7a473da..d51bd701e577ab 100644 --- a/target/linux/ath79/dts/ar7240.dtsi +++ b/target/linux/ath79/dts/ar7240.dtsi @@ -27,7 +27,6 @@ interrupts = <3>; resets = <&rst 5>; - reset-names = "usb-host"; phy-names = "usb"; phys = <&usb_phy>; diff --git a/target/linux/ath79/dts/ar7241.dtsi b/target/linux/ath79/dts/ar7241.dtsi index e5813db9782609..3eb0b17e79e756 100644 --- a/target/linux/ath79/dts/ar7241.dtsi +++ b/target/linux/ath79/dts/ar7241.dtsi @@ -27,7 +27,6 @@ interrupts = <3>; resets = <&rst 5>; - reset-names = "usb-host"; has-transaction-translator; caps-offset = <0x100>; diff --git a/target/linux/ath79/dts/ar7242.dtsi b/target/linux/ath79/dts/ar7242.dtsi index 14609a54f24590..414e967616069b 100644 --- a/target/linux/ath79/dts/ar7242.dtsi +++ b/target/linux/ath79/dts/ar7242.dtsi @@ -27,7 +27,6 @@ interrupts = <3>; resets = <&rst 5>; - reset-names = "usb-host"; has-transaction-translator; caps-offset = <0x100>; diff --git a/target/linux/ath79/dts/ar9330.dtsi b/target/linux/ath79/dts/ar9330.dtsi index 976529bd3ff3d1..e13e3fd5aa1b9b 100644 --- a/target/linux/ath79/dts/ar9330.dtsi +++ b/target/linux/ath79/dts/ar9330.dtsi @@ -120,7 +120,6 @@ interrupts = <3>; resets = <&rst 5>; - reset-names = "usb-host"; phy-names = "usb"; phys = <&usb_phy>; diff --git a/target/linux/ath79/dts/ar934x.dtsi b/target/linux/ath79/dts/ar934x.dtsi index c490f051bb7239..b2106fcdaa0319 100644 --- a/target/linux/ath79/dts/ar934x.dtsi +++ b/target/linux/ath79/dts/ar934x.dtsi @@ -166,7 +166,6 @@ interrupts = <3>; resets = <&rst 5>; - reset-names = "usb-host"; has-transaction-translator; caps-offset = <0x100>; diff --git a/target/linux/ath79/dts/qca953x.dtsi b/target/linux/ath79/dts/qca953x.dtsi index e7feeded7bc80d..0e982016f425e0 100644 --- a/target/linux/ath79/dts/qca953x.dtsi +++ b/target/linux/ath79/dts/qca953x.dtsi @@ -193,7 +193,6 @@ interrupts = <3>; resets = <&rst 5>; - reset-names = "usb-host"; dr_mode = "host"; has-transaction-translator; diff --git a/target/linux/ath79/dts/qca955x.dtsi b/target/linux/ath79/dts/qca955x.dtsi index de27b0e7d2ed4c..d697b0476906b0 100644 --- a/target/linux/ath79/dts/qca955x.dtsi +++ b/target/linux/ath79/dts/qca955x.dtsi @@ -273,7 +273,6 @@ interrupt-parent = <&intc3>; interrupts = <1>; resets = <&rst 5>; - reset-names = "usb-host"; has-transaction-translator; caps-offset = <0x100>; @@ -299,7 +298,6 @@ interrupt-parent = <&intc3>; interrupts = <2>; resets = <&rst2 5>; - reset-names = "usb-host"; has-transaction-translator; caps-offset = <0x100>; diff --git a/target/linux/ath79/dts/qca956x.dtsi b/target/linux/ath79/dts/qca956x.dtsi index e9f443cbef9c07..8070fefbb71e7d 100644 --- a/target/linux/ath79/dts/qca956x.dtsi +++ b/target/linux/ath79/dts/qca956x.dtsi @@ -192,7 +192,6 @@ interrupts = <1>; resets = <&rst 5>; - reset-names = "usb-host"; has-transaction-translator; caps-offset = <0x100>; @@ -219,7 +218,6 @@ interrupts = <2>; resets = <&rst2 5>; - reset-names = "usb-host"; has-transaction-translator; caps-offset = <0x100>; diff --git a/target/linux/ath79/patches-6.6/700-phy-add-ath79-usb-phys.patch b/target/linux/ath79/patches-6.6/700-phy-add-ath79-usb-phys.patch index 98879927cbee15..b50e4b51a45c46 100644 --- a/target/linux/ath79/patches-6.6/700-phy-add-ath79-usb-phys.patch +++ b/target/linux/ath79/patches-6.6/700-phy-add-ath79-usb-phys.patch @@ -132,7 +132,7 @@ Signed-off-by: John Crispin + if (IS_ERR(priv->rst_phy)) + return dev_err_probe(&pdev->dev, PTR_ERR(priv->rst_phy), "phy reset is missing"); + -+ priv->rst_host = devm_reset_control_get(&pdev->dev, "usb-host"); ++ priv->rst_host = devm_reset_control_get(&pdev->dev, "host"); + if (IS_ERR(priv->rst_host)) + return dev_err_probe(&pdev->dev, PTR_ERR(priv->rst_host), "host reset is missing"); + From 6b32a5d768847b7d0e9222adecbcb66e367abbfc Mon Sep 17 00:00:00 2001 From: Yaoguang Bai <0xdeadc0de@badguys.club> Date: Tue, 26 Nov 2024 17:18:28 +0800 Subject: [PATCH 07/43] mediatek: filogic: add support for NRadio C8-668GL MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit NRadio C8-668GL is a Wi-Fi 6 5G cellular router based on MediaTek MT7981B SoC. - **SoC**: MediaTek MT7981B (2x Cortex-A53, 1.3GHz) - **RAM**: Nanya NT5AD512M16C4-JR 1GB DDR4 - **Flash**: ESMT FC51L08SFY3A 8GB eMMC - **Ethernet**: - 1x 2.5GbE (via GMAC0 and GPY211 PHY, shared with MT7531AE) - 3x 10/100/1000 Mbps (via MT7531AE, connected to GMAC0) - 5G Modem: GMAC1 (via GPY211 PHY - RTL8125BG - RM520N-GL) - **Wi-Fi**: MediaTek MT7976CN (2.4GHz/5GHz, 802.11ax, 2x2 MIMO, AX3000) - **Buttons**: Reset, WPS - **LEDs**: Power, 5G, 4G, WiFi - **SIM Slot**: 1x Nano SIM - **5G Modem**: Quectel RM520N-GL (Snapdragon™ X62) - **Power**: 12V/2A DC, 5.5×2.1 connector The MAC addresses are derived from the `fac_mac` field in the `bdinfo` partition, formatted as `fac_mac = HWMAC`. The allocation is as follows: | Vendor | OpenWrt Interface | Address | Notes | |---------|-------------------|---------------|------------------------------------------------| | LAN | br-lan | Label MAC | Default | | WAN | lan4 | Label MAC+1 | Only when lan4 is switched to WAN | | 2.4GHz | phy0-ap0 | Label MAC | | | 5GHz | phy1-ap0 | Label MAC | (Local Admin bit set) | | Modem | eth1 | Label MAC+2 | | 1. Log in to the router via `http://192.168.66.1`/. 2. Upgrade the official firmware to dual-system mode. 3. Select **Burn second system** and upload the `sysupgrade.bin` image. - Download the image from the OpenWrt build system or build it yourself using the OpenWrt buildroot. 4. Wait for 30 seconds and click **Switch system**. 5. The device will reboot and switch to OpenWrt. Set the U-Boot environment variable `boot_system=0` and reboot: ```bash fw_setenv boot_system 0 ``` Power off the router, hold the **WPS button**, and power it back on. 1. Rename the stock firmware file to **`recovery.bin`**. 2. Set your PC's Ethernet IP to **192.168.1.88** and connect it to the lan1 port on the router. 3. Run a TFTP server and place the `recovery.bin` file in its root directory. 4. Power off the router, press and hold the **Reset button**, and power it back on. 5. Release the Reset button when the TFTP server shows activity. 6. Wait for the router to flash the firmware and reboot automatically. - By default, `lan4` is part of `br-lan` and uses the label MAC address. - To query the RM520N-GL module, use the following command: ```bash cat /dev/ttyUSB2 & printf 'ATI\r\n' > /dev/ttyUSB2 ``` Signed-off-by: Yaoguang Bai <0xdeadc0de@badguys.club> Link: https://github.com/openwrt/openwrt/pull/17093 Signed-off-by: John Crispin --- .../uboot-envtools/files/mediatek_filogic | 3 +- .../mediatek/dts/mt7981b-nradio-c8-668gl.dts | 264 ++++++++++++++++++ .../filogic/base-files/etc/board.d/01_leds | 4 + .../filogic/base-files/etc/board.d/02_network | 6 + .../etc/hotplug.d/ieee80211/11_fix_wifi_mac | 5 + .../base-files/lib/upgrade/platform.sh | 18 ++ target/linux/mediatek/image/filogic.mk | 13 + 7 files changed, 312 insertions(+), 1 deletion(-) create mode 100644 target/linux/mediatek/dts/mt7981b-nradio-c8-668gl.dts diff --git a/package/boot/uboot-envtools/files/mediatek_filogic b/package/boot/uboot-envtools/files/mediatek_filogic index 5bde699a47a47d..d0a15e34736c5d 100644 --- a/package/boot/uboot-envtools/files/mediatek_filogic +++ b/package/boot/uboot-envtools/files/mediatek_filogic @@ -57,7 +57,8 @@ acer,vero-w6m|\ glinet,gl-mt2500|\ glinet,gl-mt6000|\ glinet,gl-x3000|\ -glinet,gl-xe3000) +glinet,gl-xe3000|\ +nradio,c8-668gl) local envdev=$(find_mmc_part "u-boot-env") ubootenv_add_uci_config "$envdev" "0x0" "0x80000" ;; diff --git a/target/linux/mediatek/dts/mt7981b-nradio-c8-668gl.dts b/target/linux/mediatek/dts/mt7981b-nradio-c8-668gl.dts new file mode 100644 index 00000000000000..d1b74f2ffed2af --- /dev/null +++ b/target/linux/mediatek/dts/mt7981b-nradio-c8-668gl.dts @@ -0,0 +1,264 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT + +/dts-v1/; + +#include "mt7981.dtsi" + +/ { + model = "NRadio C8-668GL"; + compatible = "nradio,c8-668gl", "mediatek,mt7981"; + + aliases { + ethernet0 = &gmac0; + led-boot = &led_power; + led-failsafe = &led_power; + led-running = &led_power; + led-upgrade = &led_power; + serial0 = &uart0; + }; + + chosen { + stdout-path = "serial0:115200n1"; + /* If official system version < 1.9.2.n6.c3, use root=PARTLABEL=rootfs */ + bootargs = "console=ttyS0,115200n1 root=PARTLABEL=rootfs_2nd rootwait"; + }; + + gpio-keys { + compatible = "gpio-keys"; + + reset { + label = "reset"; + linux,code = ; + gpios = <&pio 1 GPIO_ACTIVE_LOW>; + }; + + wps { + label = "wps"; + linux,code = ; + gpios = <&pio 9 GPIO_ACTIVE_LOW>; + }; + }; + + gpio-export { + compatible = "gpio-export"; + #size-cells = <0>; + + cpepower { + gpio-export,name = "cpe-pwr"; + gpio-export,output = <0>; + gpios = <&pio 31 GPIO_ACTIVE_LOW>; + }; + + cpesel0 { + gpio-export,name = "cpe-sel0"; + gpio-export,output = <1>; + gpios = <&pio 30 GPIO_ACTIVE_HIGH>; + }; + }; + + leds { + compatible = "gpio-leds"; + + led_power: power { + color = ; + function = LED_FUNCTION_POWER; + gpios = <&pio 10 GPIO_ACTIVE_LOW>; + }; + + led-cellular-5g { + color = ; + function = LED_FUNCTION_INDICATOR; + function-enumerator = <0>; + gpios = <&pio 11 GPIO_ACTIVE_LOW>; + }; + + led-cellular-4g { + color = ; + function = LED_FUNCTION_INDICATOR; + function-enumerator = <1>; + gpios = <&pio 12 GPIO_ACTIVE_LOW>; + }; + + led-wifi { + color = ; + function = LED_FUNCTION_WLAN; + gpios = <&pio 13 GPIO_ACTIVE_LOW>; + }; + }; +}; + +&uart0 { + status = "okay"; +}; + +&watchdog { + status = "okay"; +}; + +&mmc0 { + pinctrl-names = "default", "state_uhs"; + pinctrl-0 = <&mmc0_pins_default>; + pinctrl-1 = <&mmc0_pins_uhs>; + bus-width = <8>; + max-frequency = <52000000>; + cap-mmc-highspeed; + vmmc-supply = <®_3p3v>; + non-removable; + status = "okay"; + + card@0 { + compatible = "mmc-card"; + reg = <0>; + + block { + compatible = "block-device"; + partitions { + block-partition-env { + partname = "u-boot-env"; + + nvmem-layout { + compatible = "u-boot,env"; + }; + }; + + block-partition-factory { + partname = "factory"; + + nvmem-layout { + compatible = "fixed-layout"; + #address-cells = <1>; + #size-cells = <1>; + + eeprom_factory_0: eeprom@0 { + reg = <0x0 0x1000>; + }; + }; + }; + }; + }; + }; +}; + +&pio { + mmc0_pins_default: mmc0-pins-default { + mux { + function = "flash"; + groups = "emmc_45"; + }; + }; + + mmc0_pins_uhs: mmc0-pins-uhs { + mux { + function = "flash"; + groups = "emmc_45"; + }; + }; +}; + +ð { + status = "okay"; + + gmac0: mac@0 { + compatible = "mediatek,eth-mac"; + reg = <0>; + phy-mode = "2500base-x"; + + fixed-link { + speed = <2500>; + full-duplex; + pause; + }; + }; + + gmac1: mac@1 { + compatible = "mediatek,eth-mac"; + reg = <1>; + phy-mode = "2500base-x"; + phy-handle = <&phy21>; + }; + + mdio: mdio-bus { + #address-cells = <1>; + #size-cells = <0>; + + phy5: ethernet-phy@5 { + compatible = "ethernet-phy-ieee802.3-c45"; + reg = <5>; + reset-gpios = <&pio 7 GPIO_ACTIVE_LOW>; + reset-assert-us = <600>; + reset-deassert-us = <20000>; + }; + + phy21: ethernet-phy@21 { + compatible = "ethernet-phy-ieee802.3-c45"; + reg = <21>; + reset-gpios = <&pio 8 GPIO_ACTIVE_LOW>; + reset-assert-us = <600>; + reset-deassert-us = <20000>; + }; + + switch@1f { + compatible = "mediatek,mt7531"; + reg = <31>; + reset-gpios = <&pio 39 GPIO_ACTIVE_HIGH>; + interrupt-controller; + #interrupt-cells = <1>; + interrupt-parent = <&pio>; + interrupts = <38 IRQ_TYPE_LEVEL_HIGH>; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@1 { + reg = <1>; + label = "lan1"; + }; + + port@2 { + reg = <2>; + label = "lan2"; + }; + + port@3 { + reg = <3>; + label = "lan3"; + }; + + port@5 { + reg = <5>; + label = "lan4"; + phy-mode = "2500base-x"; + phy-handle = <&phy5>; + }; + + port@6 { + reg = <6>; + label = "cpu"; + ethernet = <&gmac0>; + phy-mode = "2500base-x"; + + fixed-link { + speed = <2500>; + full-duplex; + pause; + }; + }; + }; + }; + }; +}; + +&usb_phy { + status = "okay"; +}; + +&xhci { + status = "okay"; +}; + +&wifi { + nvmem-cells = <&eeprom_factory_0>; + nvmem-cell-names = "eeprom"; + status = "okay"; +}; diff --git a/target/linux/mediatek/filogic/base-files/etc/board.d/01_leds b/target/linux/mediatek/filogic/base-files/etc/board.d/01_leds index 64df50eb0a18e8..2496323d873a30 100644 --- a/target/linux/mediatek/filogic/base-files/etc/board.d/01_leds +++ b/target/linux/mediatek/filogic/base-files/etc/board.d/01_leds @@ -66,6 +66,10 @@ nokia,ea0326gmp) ucidef_set_led_netdev "lan" "LAN" "green:lan" "br-lan" "link" ucidef_set_led_netdev "wlan" "WLAN" "green:wlan" "phy1-ap0" "link" ;; +nradio,c8-668gl) + ucidef_set_led_netdev "wifi" "WIFI" "blue:wlan" "phy1-ap0" "link" + ucidef_set_led_netdev "5g" "5G" "blue:indicator-0" "eth1" "link" + ;; openembed,som7981) ucidef_set_led_netdev "lanact" "LANACT" "green:lan" "eth1" "rx tx" ucidef_set_led_netdev "lanlink" "LANLINK" "amber:lan" "eth1" "link" diff --git a/target/linux/mediatek/filogic/base-files/etc/board.d/02_network b/target/linux/mediatek/filogic/base-files/etc/board.d/02_network index 78483442d764f7..2a133813263c16 100644 --- a/target/linux/mediatek/filogic/base-files/etc/board.d/02_network +++ b/target/linux/mediatek/filogic/base-files/etc/board.d/02_network @@ -43,6 +43,7 @@ mediatek_setup_interfaces() jdcloud,re-cp-03|\ mediatek,mt7981-rfb|\ netcore,n60|\ + nradio,c8-668gl|\ ruijie,rg-x60-pro|\ unielec,u7981-01*|\ zbtlink,zbt-z8102ax|\ @@ -165,6 +166,11 @@ mediatek_setup_macs() lan_mac=$(mtd_get_mac_ascii u-boot-env mac) label_mac=$lan_mac ;; + nradio,c8-668gl) + lan_mac=$(mmc_get_mac_ascii bdinfo "fac_mac ") + wan_mac=$(macaddr_add "$lan_mac" 2) + label_mac=$lan_mac + ;; qihoo,360t7) lan_mac=$(mtd_get_mac_ascii factory lanMac) wan_mac=$(macaddr_add "$lan_mac" 1) diff --git a/target/linux/mediatek/filogic/base-files/etc/hotplug.d/ieee80211/11_fix_wifi_mac b/target/linux/mediatek/filogic/base-files/etc/hotplug.d/ieee80211/11_fix_wifi_mac index fb67323e7b089c..41c425e5579e79 100644 --- a/target/linux/mediatek/filogic/base-files/etc/hotplug.d/ieee80211/11_fix_wifi_mac +++ b/target/linux/mediatek/filogic/base-files/etc/hotplug.d/ieee80211/11_fix_wifi_mac @@ -136,6 +136,11 @@ case "$board" in [ "$PHYNBR" = "0" ] && macaddr_add $addr 1 > /sys${DEVPATH}/macaddress [ "$PHYNBR" = "1" ] && macaddr_add $addr 2 > /sys${DEVPATH}/macaddress ;; + nradio,c8-668gl) + hw_mac_addr=$(mmc_get_mac_ascii bdinfo "fac_mac ") + [ "$PHYNBR" = "0" ] && echo "$hw_mac_addr" > /sys${DEVPATH}/macaddress + [ "$PHYNBR" = "1" ] && macaddr_setbit_la $hw_mac_addr > /sys${DEVPATH}/macaddress + ;; openembed,som7981) [ "$PHYNBR" = "1" ] && cat /sys/class/net/eth0/address > /sys${DEVPATH}/macaddress ;; diff --git a/target/linux/mediatek/filogic/base-files/lib/upgrade/platform.sh b/target/linux/mediatek/filogic/base-files/lib/upgrade/platform.sh index fb48ffc49f090d..f3d5cb472e39a4 100755 --- a/target/linux/mediatek/filogic/base-files/lib/upgrade/platform.sh +++ b/target/linux/mediatek/filogic/base-files/lib/upgrade/platform.sh @@ -128,6 +128,12 @@ platform_do_upgrade() { CI_UBIPART="ubi0" nand_do_upgrade "$1" ;; + nradio,c8-668gl) + CI_DATAPART="rootfs_data" + CI_KERNPART="kernel_2nd" + CI_ROOTPART="rootfs_2nd" + emmc_do_upgrade "$1" + ;; ubnt,unifi-6-plus) CI_KERNPART="kernel0" EMMC_ROOT_DEV="$(cmdline_get_var root)" @@ -181,6 +187,17 @@ platform_check_image() { echo "Invalid image type." return 1 } + return 0 + ;; + nradio,c8-668gl) + # tar magic `ustar` + magic="$(dd if="$1" bs=1 skip=257 count=5 2>/dev/null)" + + [ "$magic" != "ustar" ] && { + echo "Invalid image type." + return 1 + } + return 0 ;; *) @@ -212,6 +229,7 @@ platform_copy_config() { glinet,gl-x3000|\ glinet,gl-xe3000|\ jdcloud,re-cp-03|\ + nradio,c8-668gl|\ smartrg,sdg-8612|\ smartrg,sdg-8614|\ smartrg,sdg-8622|\ diff --git a/target/linux/mediatek/image/filogic.mk b/target/linux/mediatek/image/filogic.mk index c18873e697d40d..1fdb3036776852 100644 --- a/target/linux/mediatek/image/filogic.mk +++ b/target/linux/mediatek/image/filogic.mk @@ -1195,6 +1195,19 @@ define Device/nokia_ea0326gmp endef TARGET_DEVICES += nokia_ea0326gmp +define Device/nradio_c8-668gl + DEVICE_VENDOR := NRadio + DEVICE_MODEL := C8-668GL + DEVICE_DTS := mt7981b-nradio-c8-668gl + DEVICE_DTS_DIR := ../dts + DEVICE_PACKAGES := kmod-mt7915e kmod-mt7981-firmware mt7981-wo-firmware \ + kmod-usb-serial-option kmod-usb-net-cdc-ether kmod-usb-net-qmi-wwan \ + kmod-usb3 + IMAGE_SIZE := 131072k + IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata | check-size +endef +TARGET_DEVICES += nradio_c8-668gl + define Device/openembed_som7981 DEVICE_VENDOR := OpenEmbed DEVICE_MODEL := SOM7981 From c90842b0d1b228df2986ec483ce692db2e7c3032 Mon Sep 17 00:00:00 2001 From: Rosen Penev Date: Mon, 25 Nov 2024 14:33:06 -0800 Subject: [PATCH 08/43] ath79: pqi-air-pen: adjust mac addresses The original ar71xx version of this device used 1002 as mac address for both ethernet and wireless. The ath79 version inexplicably changes this to 2, which seems to be done nowhere else in ath79, indicating it's bogus. Restore previous ar71xx assignment. 1002 is used as an ethernet interface with some other devices as well. Also remove the bogus caldata userspace extraction. The size is bogus and it's already handled in dts. Signed-off-by: Rosen Penev Link: https://github.com/openwrt/openwrt/pull/17083 Signed-off-by: John Crispin --- target/linux/ath79/dts/ar9330_pqi_air-pen.dts | 8 ++------ .../base-files/etc/hotplug.d/firmware/10-ath9k-eeprom | 3 --- 2 files changed, 2 insertions(+), 9 deletions(-) diff --git a/target/linux/ath79/dts/ar9330_pqi_air-pen.dts b/target/linux/ath79/dts/ar9330_pqi_air-pen.dts index 121dcbcb0e26d0..4153de571ab50f 100644 --- a/target/linux/ath79/dts/ar9330_pqi_air-pen.dts +++ b/target/linux/ath79/dts/ar9330_pqi_air-pen.dts @@ -95,10 +95,6 @@ #address-cells = <1>; #size-cells = <1>; - macaddr_art_2: macaddr@2 { - reg = <0x2 0x6>; - }; - cal_art_1000: calibration@1000 { reg = <0x1000 0x440>; }; @@ -153,6 +149,6 @@ &wmac { status = "okay"; - nvmem-cells = <&macaddr_art_2>, <&cal_art_1000>; - nvmem-cell-names = "mac-address", "calibration"; + nvmem-cells = <&cal_art_1000>; + nvmem-cell-names = "calibration"; }; diff --git a/target/linux/ath79/tiny/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom b/target/linux/ath79/tiny/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom index d424b9fe2ca80c..796ebc33216d23 100644 --- a/target/linux/ath79/tiny/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom +++ b/target/linux/ath79/tiny/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom @@ -46,9 +46,6 @@ case "$FIRMWARE" in ubnt,picostation-m) caldata_extract "art" 0x1000 0x1000 ;; - pqi,air-pen) - caldata_extract "art" 0x1000 0x7d2 - ;; *) caldata_die "board $board is not supported yet" ;; From 9e78db022985e1a4efebfcfde27e15068922fdca Mon Sep 17 00:00:00 2001 From: Die Peter Pan Date: Sat, 23 Nov 2024 05:23:57 -0500 Subject: [PATCH 09/43] ramips: mt7620: add support for THA-103AC (Version v1.0R) Hardware * Mediatek MT7620A + Mediatek MT7610EN * 64MB RAM * 8MB NAND (Winbond 25064FVSIG ) Both 2.4GHZ and 5GHZ are working, it is enabled by default since there is no physical ethernet port in the device. All LED's and buttons work. UART: 57600 8N1 3.3V Installation Upload the openwrt-ramips-mt7620-trendnet_tha103ac-initramfs-kernel.bin via the manufacturer firmware upgrade page on the device. Upon reboot wait +- 3 mins until the green power LED is not flashing anymore (do not be tempted to switch the device off while the LED is flashing, unless you are ready for soldering and TTL) and then press the WPS button to enable the default OpenWrt Wifi AP, the BLUE wifi LED will start flash. Then install openwrt-ramips-mt7620-trendnet_tha103ac-squashfs-sysupgrade.bin via OpenWrt. The integrated power monitoring and relay do not work in OpenWrt as the PL7223 chip source/documentation is unavailable. Recovery Mis-configuration can be dealt with using the RESET button to reset to factory, worst case scenario will require some serious work and soldering, there's pads on the PCB for both the UART and ETH0, and I soldered and tested that it does work. You will have to power the board using the header pins GND & 5V, see the 8-pin header socket. Signed-off-by: Die Peter Pan Link: https://github.com/openwrt/openwrt/pull/17114 Signed-off-by: John Crispin --- .../ramips/dts/mt7620a_trendnet_tha103ac.dts | 201 ++++++++++++++++++ target/linux/ramips/image/mt7620.mk | 10 + .../mt7620/base-files/etc/board.d/01_leds | 7 + .../mt7620/base-files/etc/board.d/02_network | 4 +- 4 files changed, 221 insertions(+), 1 deletion(-) create mode 100644 target/linux/ramips/dts/mt7620a_trendnet_tha103ac.dts diff --git a/target/linux/ramips/dts/mt7620a_trendnet_tha103ac.dts b/target/linux/ramips/dts/mt7620a_trendnet_tha103ac.dts new file mode 100644 index 00000000000000..c7587550b0d0b8 --- /dev/null +++ b/target/linux/ramips/dts/mt7620a_trendnet_tha103ac.dts @@ -0,0 +1,201 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT + +#include "mt7620a.dtsi" + +#include +#include +#include + +/ { + compatible = "trendnet,tha103ac", "ralink,mt7620a-soc"; + model = "TRENDNET THA-103AC (EU)"; + + aliases { + label-mac-device = ðernet; + led-boot = &led_power; + led-failsafe = &led_power; + led-running = &led_power; + led-upgrade = &led_power; + }; + + keys: keys { + compatible = "gpio-keys"; + + button_reset { + label = "reset"; + gpios = <&gpio0 9 GPIO_ACTIVE_LOW>; + linux,code = ; + }; + + /* wps button reassigned to rfkill */ + button_rfkill { + label = "wifi on/off"; + gpios = <&gpio0 13 GPIO_ACTIVE_LOW>; + linux,code = ; + }; + + }; + + leds { + compatible = "gpio-leds"; + + led-0 { + color = ; + function = LED_FUNCTION_WPS; + gpios = <&gpio0 10 GPIO_ACTIVE_LOW>; + }; + + led_power: led-1 { + color = ; + function = LED_FUNCTION_POWER; + gpios = <&gpio0 14 GPIO_ACTIVE_LOW>; + default-state = "on"; + }; + + led-2 { + color = ; + function = LED_FUNCTION_WLAN; + gpios = <&gpio1 14 GPIO_ACTIVE_LOW>; + }; + + led-3 { + color = ; + /* LED_FUNCTION_RSSILOW isn't implemented yet */ + function = "rssilow"; + gpios = <&gpio2 16 GPIO_ACTIVE_LOW>; + }; + + led-4 { + color = ; + /* LED_FUNCTION_RSSIMEDLOW isn't implemented yet */ + function = "rssimedlow"; + gpios = <&gpio2 17 GPIO_ACTIVE_LOW>; + }; + + led-5 { + color = ; + /* LED_FUNCTION_RSSIMEDIUM isn't implemented yet */ + function = "rssimedium"; + gpios = <&gpio2 18 GPIO_ACTIVE_LOW>; + }; + + led-6 { + color = ; + /* LED_FUNCTION_RSSIHIGH isn't implemented yet */ + function = "rssihigh"; + gpios = <&gpio2 19 GPIO_ACTIVE_LOW>; + }; + }; +}; + +&spi0 { + status = "okay"; + + flash@0 { + compatible = "jedec,spi-nor"; + reg = <0>; + spi-max-frequency = <50000000>; + + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + partition@0 { + label = "u-boot"; + reg = <0x0 0x30000>; + read-only; + }; + + partition@30000 { + label = "u-boot-env"; + reg = <0x30000 0x10000>; + read-only; + }; + + partition@40000 { + label = "factory"; + reg = <0x40000 0x10000>; + read-only; + + nvmem-layout { + compatible = "fixed-layout"; + #address-cells = <1>; + #size-cells = <1>; + + eeprom_factory_0: eeprom@0 { + reg = <0x0 0x200>; + }; + + eeprom_factory_8000: eeprom@8000 { + reg = <0x8000 0x200>; + }; + + macaddr_factory_4: macaddr@4 { + compatible = "mac-base"; + reg = <0x4 0x6>; + #nvmem-cell-cells = <1>; + }; + + macaddr_factory_28: macaddr@28 { + compatible = "mac-base"; + reg = <0x28 0x6>; + #nvmem-cell-cells = <1>; + }; + + macaddr_factory_8004: macaddr@8004 { + compatible = "mac-base"; + reg = <0x8004 0x6>; + #nvmem-cell-cells = <1>; + }; + }; + }; + + partition@50000 { + compatible = "denx,uimage"; + label = "firmware"; + reg = <0x50000 0x7b0000>; + }; + }; + }; +}; + +&state_default { + gpio { + groups = "i2c", "uartf", "ephy"; + function = "gpio"; + }; +}; + +ðernet { + nvmem-cells = <&macaddr_factory_28 0>; + nvmem-cell-names = "mac-address"; + + mediatek,portmap = "wl"; +}; + +&gpio1 { + status = "okay"; +}; + +&gpio2 { + status = "okay"; +}; + +&wmac { + nvmem-cells = <&eeprom_factory_0>, <&macaddr_factory_4 0>; + nvmem-cell-names = "eeprom", "mac-address"; +}; + +&pcie { + status = "okay"; +}; + +&pcie0 { + wifi@0,0 { + reg = <0x0000 0 0 0 0>; + ieee80211-freq-limit = <5000000 6000000>; + nvmem-cells = <&eeprom_factory_8000>, <&macaddr_factory_8004 0>; + nvmem-cell-names = "eeprom", "mac-address"; + }; +}; diff --git a/target/linux/ramips/image/mt7620.mk b/target/linux/ramips/image/mt7620.mk index 6cf65ad1194bfb..f12f13d9e9382e 100644 --- a/target/linux/ramips/image/mt7620.mk +++ b/target/linux/ramips/image/mt7620.mk @@ -1322,6 +1322,16 @@ define Device/trendnet_tew-810dr endef TARGET_DEVICES += trendnet_tew-810dr +define Device/trendnet_tha103ac + SOC := mt7620a + DEVICE_PACKAGES := kmod-mt76x0e rssileds + DEVICE_VENDOR := TRENDnet + DEVICE_MODEL := THA-103AC + IMAGE_SIZE := 7872k + SUPPORTED_DEVICES += mt7620a_mt7610e +endef +TARGET_DEVICES += trendnet_tha103ac + define Device/vonets_var11n-300 SOC := mt7620n IMAGE_SIZE := 3776k diff --git a/target/linux/ramips/mt7620/base-files/etc/board.d/01_leds b/target/linux/ramips/mt7620/base-files/etc/board.d/01_leds index 261e54f5e19589..ff5d3debfd9f89 100644 --- a/target/linux/ramips/mt7620/base-files/etc/board.d/01_leds +++ b/target/linux/ramips/mt7620/base-files/etc/board.d/01_leds @@ -249,6 +249,13 @@ tplink,ec220-g5-v2) tplink,re200-v1) ucidef_set_led_netdev "lan" "lan" "green:lan" "eth0" ;; +trendnet,tha103ac) + ucidef_set_rssimon "wlan0" "200000" "1" + ucidef_set_led_rssi "led_rssilow" "RSSILOW" "blue:rssilow" "wlan0" "31" "100" + ucidef_set_led_rssi "led_rssimedlow" "RSSIMEDIUMLOW" "blue:rssimedlow" "wlan0" "41" "100" + ucidef_set_led_rssi "led_rssimedium" "RSSIMEDIUM" "blue:rssimedium" "wlan0" "51" "100" + ucidef_set_led_rssi "led_rssihigh" "RSSIHIGH" "blue:rssihigh" "wlan0" "71" "100" + ;; wavlink,wl-wn535k1) ucidef_set_led_switch "lan1" "lan1" "green:lan1" "switch0" "0x20" ucidef_set_led_switch "lan2" "lan2" "green:lan2" "switch0" "0x04" diff --git a/target/linux/ramips/mt7620/base-files/etc/board.d/02_network b/target/linux/ramips/mt7620/base-files/etc/board.d/02_network index 577f77cb9339d4..204a1b0a54fd55 100644 --- a/target/linux/ramips/mt7620/base-files/etc/board.d/02_network +++ b/target/linux/ramips/mt7620/base-files/etc/board.d/02_network @@ -65,6 +65,7 @@ ramips_setup_interfaces() sercomm,na930|\ tplink,re200-v1|\ tplink,re210-v1|\ + trendnet,tha103ac|\ yukai,bocco|\ zbtlink,zbt-cpe102|\ zte,q7) @@ -340,7 +341,8 @@ ramips_setup_macs() asus,rt-ac54u) lan_mac=$(mtd_get_mac_binary factory 0x22) ;; - dlink,dch-m225) + dlink,dch-m225|\ + trendnet,tha103ac) lan_mac=$(mtd_get_mac_ascii factory lanmac) ;; dlink,dir-510l|\ From 502916468e2871f7f19b14b521a10ebf28394006 Mon Sep 17 00:00:00 2001 From: Chuncheng Chen Date: Thu, 20 Oct 2022 11:43:11 +0800 Subject: [PATCH 10/43] ramips: add support for ASUS 4G-AX56 Specifications: - Device: ASUS 4g-AX56 - SoC: MT7621AT - Flash: 128MB - RAM: 512MB - Switch: 1 WAN, 4 LAN (10/100/1000 Mbps) - WiFi: MT7905 2x2 2.4G + MT7975 2x2 5G - LTE : Fibocom FG621-EA - LEDs: 1x POWER (white, configurable) 1x 2.4G (white, not configurable) 1x 5G (white, not configurable) 1x WAN (white, not configurable) 1x 3G/4G (white, not configurable) 3x signal (white, not configurable) Flash by U-Boot TFTP method: - Configure your PC with IP 192.168.0.2 - Set up TFTP server and put the factory.bin image on your PC - Connect serial port(rate:115200) and turn on AP, then interrupt "U-Boot Boot Menu" by hitting any key Select "2. Upgrade firmware" Press enter when show "Run firmware after upgrading? (Y/n):" Select 0 for TFTP method Input U-Boot's IP address: 192.168.0.1 Input TFTP server's IP address: 192.168.0.2 Input IP netmask: 255.255.255.0 Input file name: openwrt-ramips-mt7621-asus_4g-ax56-squashfs-factory.bin - Restart AP aftre see the log "Firmware upgrade completed!" Notice: - LTE module is disable after flash openwrt image so you must active LTE by following two AT command echo -e "AT+GTAUTOCONNECT=1\r\n" > /dev/ttyUSB0 echo -e "AT+GTRNDIS=1,1\r\n" > /dev/ttyUSB0 - After finish AT command once, you don't need to input command later even if reboot/restore default Signed-off-by: Chuncheng Chen Link: https://github.com/openwrt/openwrt/pull/16752 Signed-off-by: John Crispin --- package/boot/uboot-envtools/files/ramips | 1 + .../linux/ramips/dts/mt7621_asus_4g-ax56.dts | 211 ++++++++++++++++++ target/linux/ramips/image/mt7621.mk | 14 ++ .../mt7621/base-files/lib/upgrade/platform.sh | 1 + 4 files changed, 227 insertions(+) create mode 100755 target/linux/ramips/dts/mt7621_asus_4g-ax56.dts mode change 100644 => 100755 target/linux/ramips/image/mt7621.mk diff --git a/package/boot/uboot-envtools/files/ramips b/package/boot/uboot-envtools/files/ramips index 341687625c8603..ace29907da6715 100644 --- a/package/boot/uboot-envtools/files/ramips +++ b/package/boot/uboot-envtools/files/ramips @@ -69,6 +69,7 @@ zte,mf283plus) ;; asus,rt-ax53u|\ asus,rt-ax54|\ +asus,4g-ax56|\ belkin,rt1800|\ elecom,wrc-x1800gs|\ h3c,tx1800-plus|\ diff --git a/target/linux/ramips/dts/mt7621_asus_4g-ax56.dts b/target/linux/ramips/dts/mt7621_asus_4g-ax56.dts new file mode 100755 index 00000000000000..159feeb9dc2bb9 --- /dev/null +++ b/target/linux/ramips/dts/mt7621_asus_4g-ax56.dts @@ -0,0 +1,211 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT + +#include "mt7621.dtsi" + +#include +#include +#include + +/ { + compatible = "asus,4g-ax56", "mediatek,mt7621-soc"; + model = "ASUS 4G-AX56"; + + aliases { + led-boot = &led_power; + led-failsafe = &led_power; + led-running = &led_power; + led-upgrade = &led_power; + label-mac-device = &gmac0; + }; + + chosen { + bootargs = "console=ttyS0,115200"; + bootargs-override = "console=ttyS0,115200"; + }; + + leds { + compatible = "gpio-leds"; + + led_power: power { + color = ; + function = LED_FUNCTION_POWER; + gpios = <&gpio 14 GPIO_ACTIVE_HIGH>; + }; + }; + + keys { + compatible = "gpio-keys"; + + key-restart { + label = "reset"; + gpios = <&gpio 8 GPIO_ACTIVE_LOW>; + linux,code = ; + }; + + key-wps { + label = "wps"; + gpios = <&gpio 4 GPIO_ACTIVE_LOW>; + linux,code = ; + }; + }; +}; + +&nand { + status = "okay"; + + mediatek,nmbm; + mediatek,bmt-remap-range = + <0x000000 0x7e0000>, + <0x35e0000 0x7800000>; + + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + partition@0 { + label = "u-boot"; + reg = <0x0 0x80000>; + read-only; + }; + + /* + * u-boot gets split here while keeping u-boot read-only, + * which allows safe usage of fw_setenv + */ + partition@80000 { + label = "u-boot-env"; + reg = <0x80000 0x60000>; + }; + + partition@e0000 { + label = "nvram"; + reg = <0xe0000 0x100000>; + read-only; + }; + + partition@1e0000 { + label = "factory"; + reg = <0x1e0000 0x100000>; + read-only; + + nvmem-layout { + compatible = "fixed-layout"; + #address-cells = <1>; + #size-cells = <1>; + + eeprom_factory_0: eeprom@0 { + reg = <0x0 0xe00>; + }; + + macaddr_factory_4: macaddr@4 { + reg = <0x4 0x6>; + }; + + precal_factory_e10: precal@e10 { + reg = <0xe10 0x19c10>; + }; + }; + }; + + partition@2e0000 { + label = "factory2"; + reg = <0x2e0000 0x100000>; + read-only; + }; + + partition@3e0000 { + label = "firmware"; + reg = <0x3e0000 0x3200000>; + + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + partition@0 { + label = "kernel"; + reg = <0x0 0x400000>; + }; + + partition@400000 { + label = "ubi"; + reg = <0x400000 0x2e00000>; + }; + }; + + partition@35e0000 { + label = "firmware2"; + reg = <0x35e0000 0x3200000>; + }; + + partition@67e0000 { + label = "jffs2"; + reg = <0x67e0000 0x1020000>; + }; + + /* Last 8M are reserved for NMBM management (bad blocks) */ + }; +}; + +&pcie { + status = "okay"; +}; + +&pcie1 { + wifi@0,0 { + compatible = "mediatek,mt76"; + reg = <0x0000 0 0 0 0>; + nvmem-cells = <&eeprom_factory_0>, <&precal_factory_e10>; + nvmem-cell-names = "eeprom", "precal"; + mediatek,disable-radar-background; + }; +}; + +&gmac0 { + nvmem-cells = <&macaddr_factory_4>; + nvmem-cell-names = "mac-address"; +}; + +&gmac1 { + status = "okay"; + label = "wan"; + phy-handle = <ðphy0>; + + nvmem-cells = <&macaddr_factory_4>; + nvmem-cell-names = "mac-address"; +}; + +ðphy0 { + /delete-property/ interrupts; +}; + +&switch0 { + ports { + port@1 { + status = "okay"; + label = "lan1"; + }; + + port@2 { + status = "okay"; + label = "lan2"; + }; + + port@3 { + status = "okay"; + label = "lan3"; + }; + + port@4 { + status = "okay"; + label = "lan4"; + }; + }; +}; + +&state_default { + gpio { + groups = "i2c", "uart2", "uart3", "jtag", "wdt"; + function = "gpio"; + }; +}; diff --git a/target/linux/ramips/image/mt7621.mk b/target/linux/ramips/image/mt7621.mk old mode 100644 new mode 100755 index eb7dacefefb793..2623d890f61c8a --- a/target/linux/ramips/image/mt7621.mk +++ b/target/linux/ramips/image/mt7621.mk @@ -471,6 +471,20 @@ define Device/asus_rt-ax54 endef TARGET_DEVICES += asus_rt-ax54 +define Device/asus_4g-ax56 + $(Device/nand) + $(Device/uimage-lzma-loader) + DEVICE_VENDOR := ASUS + DEVICE_MODEL := 4G-AX56 + IMAGE_SIZE := 51200k + IMAGES += factory.bin + IMAGE/factory.bin := append-kernel | pad-to $$(KERNEL_SIZE) | append-ubi | \ + check-size + DEVICE_PACKAGES := kmod-mt7915-firmware kmod-usb3 kmod-usb-serial-option \ + kmod-usb-net-cdc-ncm +endef +TARGET_DEVICES += asus_4g-ax56 + define Device/beeline_smartbox-flash $(Device/nand) $(Device/uimage-lzma-loader) diff --git a/target/linux/ramips/mt7621/base-files/lib/upgrade/platform.sh b/target/linux/ramips/mt7621/base-files/lib/upgrade/platform.sh index 17532f795b293c..f2325c83254c8e 100755 --- a/target/linux/ramips/mt7621/base-files/lib/upgrade/platform.sh +++ b/target/linux/ramips/mt7621/base-files/lib/upgrade/platform.sh @@ -74,6 +74,7 @@ platform_do_upgrade() { asus,rt-ac85p|\ asus,rt-ax53u|\ asus,rt-ax54|\ + asus,4g-ax56|\ beeline,smartbox-flash|\ beeline,smartbox-giga|\ beeline,smartbox-pro|\ From 1306237fab40781f01a5635f1688d28fc68b77f4 Mon Sep 17 00:00:00 2001 From: Rosen Penev Date: Tue, 3 Dec 2024 13:40:28 -0800 Subject: [PATCH 11/43] qualcommax: use PHY regulator for USB GPIO The PHY can handle turning off the GPIOs when turning off all USB ports. Signed-off-by: Rosen Penev Link: https://github.com/openwrt/openwrt/pull/17192 Signed-off-by: Robert Marko --- target/linux/qualcommax/config-6.6 | 1 - .../arch/arm64/boot/dts/qcom/ipq6000-mr7350.dts | 7 ++----- .../arch/arm64/boot/dts/qcom/ipq8072-aw1000.dts | 17 +++++++++++------ .../arm64/boot/dts/qcom/ipq8074-rt-ax89x.dts | 14 ++++---------- 4 files changed, 17 insertions(+), 22 deletions(-) diff --git a/target/linux/qualcommax/config-6.6 b/target/linux/qualcommax/config-6.6 index 05e2f51bf20a67..3519557bccbb6a 100644 --- a/target/linux/qualcommax/config-6.6 +++ b/target/linux/qualcommax/config-6.6 @@ -444,7 +444,6 @@ CONFIG_REGMAP_MMIO=y CONFIG_REGULATOR=y # CONFIG_REGULATOR_CPR3 is not set CONFIG_REGULATOR_FIXED_VOLTAGE=y -CONFIG_REGULATOR_USERSPACE_CONSUMER=y # CONFIG_REGULATOR_VQMMC_IPQ4019 is not set CONFIG_RELOCATABLE=y CONFIG_REMOTEPROC=y diff --git a/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq6000-mr7350.dts b/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq6000-mr7350.dts index 5761c3b582738f..8714b34499f9c3 100644 --- a/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq6000-mr7350.dts +++ b/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq6000-mr7350.dts @@ -123,11 +123,6 @@ gpio = <&tlmm 61 GPIO_ACTIVE_LOW>; regulator-boot-on; }; - - output-usb0-power { - compatible = "regulator-output"; - vout-supply = <®_usb_vbus>; - }; }; &tlmm { @@ -246,6 +241,8 @@ &qusb_phy_0 { status = "okay"; + + vdd-supply = <®_usb_vbus>; }; &ssphy_0 { diff --git a/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq8072-aw1000.dts b/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq8072-aw1000.dts index c85e9f1993aa33..1b5f58e51b4cfa 100644 --- a/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq8072-aw1000.dts +++ b/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq8072-aw1000.dts @@ -57,12 +57,6 @@ gpio-export,output = <1>; gpios = <&tlmm 63 GPIO_ACTIVE_HIGH>; }; - - usb-vbus { - gpio-export,name = "usb_vbus"; - gpio-export,output = <0>; - gpios = <&tlmm 9 GPIO_ACTIVE_LOW>; - }; }; keys { @@ -160,6 +154,15 @@ gpios = <&led_gpio 11 GPIO_ACTIVE_HIGH>; }; }; + + usb_vbus: regulator-usb-vbus { + compatible = "regulator-fixed"; + regulator-name = "usb_vbus"; + regulator-min-microvolt = <5000000>; + regulator-max-microvolt = <5000000>; + gpio = <&tlmm 9 GPIO_ACTIVE_LOW>; + regulator-boot-on; + }; }; &tlmm { @@ -221,6 +224,8 @@ &qusb_phy_1 { status = "okay"; + + vdd-supply = <&usb_vbus>; }; &ssphy_0 { diff --git a/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq8074-rt-ax89x.dts b/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq8074-rt-ax89x.dts index 4af942c2892877..781b6478114f55 100644 --- a/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq8074-rt-ax89x.dts +++ b/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq8074-rt-ax89x.dts @@ -160,16 +160,6 @@ enable-active-high; regulator-boot-on; }; - - output-usb0-power { - compatible = "regulator-output"; - vout-supply = <&usb0_vbus>; - }; - - output-usb1-power { - compatible = "regulator-output"; - vout-supply = <&usb1_vbus>; - }; }; &cpu0_thermal { @@ -374,6 +364,8 @@ &qusb_phy_0 { status = "okay"; + + vdda-phy-supply = <&usb0_vbus>; }; &ssphy_1 { @@ -382,6 +374,8 @@ &qusb_phy_1 { status = "okay"; + + vdda-phy-supply = <&usb1_vbus>; }; &usb_0 { From 5158e28769cb5e5c6a59bd9a176f55cf2d568742 Mon Sep 17 00:00:00 2001 From: John Audia Date: Tue, 10 Dec 2024 00:19:18 +0100 Subject: [PATCH 12/43] kernel: bump 6.6 to 6.6.64 Changelog: https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.6.64 Manually rebased: generic/hack-6.6/780-usb-net-MeigLink_modem_support.patch bcm27xx/patches-6.6/950-0585-drm-vc4-Introduce-generation-number-enum.patch bcm27xx/patches-6.6/950-0610-drm-vc4-hvs-Support-BCM2712-HVS.patch bcm27xx/patches-6.6/950-0829-vc4-hvs-Add-support-for-D0-register-changes.patch Removed upstreamed: bcm27xx/patches-6.6/950-0597-drm-vc4-hdmi-Avoid-hang-with-debug-registers-when-su.patch[1] bcm27xx/patches-6.6/950-0599-drm-vc4-Fix-dlist-debug-not-resetting-the-next-entry.patch[2] bcm27xx/patches-6.6/950-0600-drm-vc4-Remove-incorrect-limit-from-hvs_dlist-debugf.patch[3] bcm27xx/patches-6.6/950-0708-drm-vc4-Correct-logic-on-stopping-an-HVS-channel.patch[4] ramips/patches-6.6/002-01-v6.13-clk-ralink-mtmips-fix-clock-plan-for-Ralink-SoC-RT38.patch[5] ramips/patches-6.6/002-02-v6.13-clk-ralink-mtmips-fix-clocks-probe-order-in-oldest-r.patch[6] All other patches automatically rebased. 1. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.6.64&id=223ee2567a55e4f80315c768d2969e6a3b9fb23d 2. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.6.64&id=8182b5ca19c6f173b6498d1c6d3e4b034b76bbde 3. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.6.64&id=52c1716f65a558174e381360bd88f18dae4be85c 4. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.6.64&id=9728b508b01a5eeeac79ceb676364c674dd951ac 5. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.6.64&id=f85a1d06afbcc57ac44176db8f9d7a934979952c 6. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.6.64&id=fbb13732c6ffa9d58cedafabcd5ce8fd7ef8ae5a Build system: x86/64 Build-tested: x86/64/AMD Cezanne, flogic/xiaomi_redmi-router-ax6000-ubootmod, ramips/tplink_archer-a6-v3 Run-tested: x86/64/AMD Cezanne, flogic/xiaomi_redmi-router-ax6000-ubootmod, ramips/tplink_archer-a6-v3 Co-authored-by: Mieczyslaw Nalewaj Signed-off-by: John Audia Link: https://github.com/openwrt/openwrt/pull/17217 Signed-off-by: Robert Marko --- include/kernel-6.6 | 4 +- .../901-snand-mtk-bmt-support.patch | 6 +- ...0-0007-drm-vc4-Add-firmware-kms-mode.patch | 2 +- ...vc4-Add-support-for-gamma-on-BCM2711.patch | 12 +- ...gfs-node-that-dumps-the-vc5-gamma-PW.patch | 4 +- ...vs-Force-modeset-on-gamma-lut-change.patch | 6 +- ...nable-gamma-block-only-when-required.patch | 4 +- ...4-Validate-the-size-of-the-gamma_lut.patch | 2 +- ...e-Keep-fractional-source-coords-insi.patch | 2 +- ...igger-of-dlist-update-on-margins-cha.patch | 2 +- ...s-Skip-DebugFS-Registration-for-FKMS.patch | 2 +- ...mi-Allow-hotplug-detect-to-be-forced.patch | 2 +- ...oid-log-spam-for-audio-start-failure.patch | 2 +- ...4-hvs-Defer-dlist-slots-deallocation.patch | 26 ++-- ...ialize-the-dlist-allocation-list-ent.patch | 2 +- ...-the-dlist-allocation-destruction-to.patch | 4 +- ...roy-dlist-allocations-immediately-wh.patch | 2 +- ...ulate-bpc-based-on-max_requested_bpc.patch | 2 +- ...-vc4-Set-AXI-panic-modes-for-the-HVS.patch | 2 +- ...ecessary-and-harmful-HDMI-RGB-format.patch | 2 +- ...-drm-vc4-Limit-max_bpc-to-8-on-Pi0-3.patch | 4 +- ...0-0039-arm64-setup-Fix-build-warning.patch | 2 +- ...oup-Disable-cgroup-memory-by-default.patch | 8 +- ...8xx-Enable-LEDs-and-auto-negotiation.patch | 6 +- ...all-the-downstream-rpi-sound-card-dr.patch | 2 +- ...78xx-Read-initial-EEE-status-from-DT.patch | 2 +- ...Disable-TCP-Segmentation-Offload-TSO.patch | 2 +- ...e-enabling-of-EEE-into-PHY-init-code.patch | 4 +- ...is7xx-Don-t-spin-if-no-data-received.patch | 2 +- ...e-link-events-to-minimize-poll-storm.patch | 6 +- ...xx-EEE-support-is-now-a-PHY-property.patch | 2 +- ...CS_HIGH-if-GPIO-descriptors-are-used.patch | 4 +- ...dmi-Increase-MAI-fifo-dreq-threshold.patch | 4 +- ...7xx-Read-modem-line-state-at-startup.patch | 2 +- ...5-usb-xhci-add-XHCI_VLI_HUB_TT_QUIRK.patch | 6 +- ...-drm-vc4-hdmi-Enable-the-audio-clock.patch | 4 +- ...vs-More-logging-for-dlist-generation.patch | 2 +- ...Print-error-if-we-fail-an-allocation.patch | 4 +- ...vc4-Introduce-generation-number-enum.patch | 53 ++++---- ...switch-statement-to-simplify-vc4_hvs.patch | 2 +- ...switch-statement-to-simplify-enablin.patch | 2 +- ...st-if-the-EOF-interrupts-are-enabled.patch | 10 +- ...-drm-vc4-hvs-Create-hw_init-function.patch | 4 +- ...drm-vc4-hvs-Create-cob_init-function.patch | 6 +- ...592-drm-vc4-hvs-Rename-hvs_regs-list.patch | 2 +- ...plane-Change-ptr0_offset-to-an-array.patch | 2 +- ...ge-prototype-of-__vc4_hvs_alloc-to-p.patch | 8 +- ...id-hang-with-debug-registers-when-su.patch | 40 ------ ...-buffer-offset-out-of-the-vc4_plane_.patch | 2 +- ...t-debug-not-resetting-the-next-entry.patch | 34 ----- ...ncorrect-limit-from-hvs_dlist-debugf.patch | 57 -------- ...ble-SCALER_CONTROL-early-in-HVS-init.patch | 8 +- ...0610-drm-vc4-hvs-Support-BCM2712-HVS.patch | 52 ++++---- ...-0622-drm-vc4-Add-additional-warn_on.patch | 24 ++-- ...e-the-clear-of-SCALER_DISPBKGND_FILL.patch | 2 +- ...ect-logic-on-stopping-an-HVS-channel.patch | 52 -------- ...p-WARN-for-HVS-FIFOs-not-being-empty.patch | 2 +- ...-stale-dlists-if-channel-is-disabled.patch | 6 +- ...dd-hvs_dlist_allocs-debugfs-function.patch | 2 +- ...size-of-the-dlist-allocation-that-wa.patch | 2 +- ...-dlist-alloc-immediately-if-it-never.patch | 4 +- ...x-reading-of-frame-count-on-GEN5-Pi4.patch | 4 +- ...-Add-support-for-D0-register-changes.patch | 27 ++-- ...-to-support-D0-alpha-and-csc-changes.patch | 4 +- ...-vc4_hvs_dlist_free_work-to-only-rea.patch | 2 +- ...ale-dlist-entries-if-allocation-fail.patch | 6 +- ...g_fill-if-there-are-no-planes-enable.patch | 2 +- ...ort-for-per-plane-scaling-filter-sel.patch | 4 +- ...equest-for-min-clocks-when-hdmi-outp.patch | 2 +- ...l-command-line-to-disable-memory-cgr.patch | 8 +- .../generic/hack-6.6/204-module_strip.patch | 12 +- .../generic/hack-6.6/253-ksmbd-config.patch | 2 +- .../780-usb-net-MeigLink_modem_support.patch | 5 +- .../hack-6.6/901-debloat_sock_diag.patch | 4 +- .../generic/hack-6.6/902-debloat_proc.patch | 2 +- .../hack-6.6/920-device_tree_cmdline.patch | 2 +- .../203-kallsyms_uncompressed.patch | 2 +- ...ng-with-source-address-failed-policy.patch | 8 +- ...les-ignore-EOPNOTSUPP-on-flowtable-d.patch | 2 +- .../pending-6.6/920-mangle_bootargs.patch | 2 +- .../900-arm-add-cmdline-override.patch | 2 +- ...nor-Use-1-bit-mode-of-spansion-s25fs.patch | 2 +- ...-Add-support-for-dynamic-calibration.patch | 6 +- .../901-arm-add-cmdline-override.patch | 2 +- .../102-powerpc-add-cmdline-override.patch | 2 +- ...ers-ralink-Add-Ralink-System-Tick-Co.patch | 2 +- ...s-fix-clock-plan-for-Ralink-SoC-RT38.patch | 48 ------- ...s-fix-clocks-probe-order-in-oldest-r.patch | 124 ------------------ ...e-to-enable-disable-the-cevt-r4k-irq.patch | 2 +- .../810-uvc-add-iPassion-iP2970-support.patch | 2 +- ...-clocksource-Add-JH7110-timer-driver.patch | 2 +- ...ET_CONFIG_DEVICE_WAIT_MS-waiting-tim.patch | 2 +- ...-precheck-and-delay-for-CQE-pending-.patch | 2 +- ...ove-performance-usb-using-lowmem-for.patch | 2 +- 94 files changed, 242 insertions(+), 590 deletions(-) delete mode 100644 target/linux/bcm27xx/patches-6.6/950-0597-drm-vc4-hdmi-Avoid-hang-with-debug-registers-when-su.patch delete mode 100644 target/linux/bcm27xx/patches-6.6/950-0599-drm-vc4-Fix-dlist-debug-not-resetting-the-next-entry.patch delete mode 100644 target/linux/bcm27xx/patches-6.6/950-0600-drm-vc4-Remove-incorrect-limit-from-hvs_dlist-debugf.patch delete mode 100644 target/linux/bcm27xx/patches-6.6/950-0708-drm-vc4-Correct-logic-on-stopping-an-HVS-channel.patch delete mode 100644 target/linux/ramips/patches-6.6/002-01-v6.13-clk-ralink-mtmips-fix-clock-plan-for-Ralink-SoC-RT38.patch delete mode 100644 target/linux/ramips/patches-6.6/002-02-v6.13-clk-ralink-mtmips-fix-clocks-probe-order-in-oldest-r.patch diff --git a/include/kernel-6.6 b/include/kernel-6.6 index 0cfe052e651ad1..ddbef67f942d28 100644 --- a/include/kernel-6.6 +++ b/include/kernel-6.6 @@ -1,2 +1,2 @@ -LINUX_VERSION-6.6 = .63 -LINUX_KERNEL_HASH-6.6.63 = d1054ab4803413efe2850f50f1a84349c091631ec50a1cf9e891d1b1f9061835 +LINUX_VERSION-6.6 = .64 +LINUX_KERNEL_HASH-6.6.64 = 065fd93fa6cb422f650fb563f15d3e0107c85009f766405993d795fd39796ab1 diff --git a/target/linux/airoha/patches-6.6/901-snand-mtk-bmt-support.patch b/target/linux/airoha/patches-6.6/901-snand-mtk-bmt-support.patch index de8e8806433c60..939ec048555787 100644 --- a/target/linux/airoha/patches-6.6/901-snand-mtk-bmt-support.patch +++ b/target/linux/airoha/patches-6.6/901-snand-mtk-bmt-support.patch @@ -8,7 +8,7 @@ static int spinand_read_reg_op(struct spinand_device *spinand, u8 reg, u8 *val) { -@@ -1346,6 +1347,7 @@ static int spinand_probe(struct spi_mem +@@ -1347,6 +1348,7 @@ static int spinand_probe(struct spi_mem if (ret) return ret; @@ -16,7 +16,7 @@ ret = mtd_device_register(mtd, NULL, 0); if (ret) goto err_spinand_cleanup; -@@ -1353,6 +1355,7 @@ static int spinand_probe(struct spi_mem +@@ -1354,6 +1356,7 @@ static int spinand_probe(struct spi_mem return 0; err_spinand_cleanup: @@ -24,7 +24,7 @@ spinand_cleanup(spinand); return ret; -@@ -1371,6 +1374,7 @@ static int spinand_remove(struct spi_mem +@@ -1372,6 +1375,7 @@ static int spinand_remove(struct spi_mem if (ret) return ret; diff --git a/target/linux/bcm27xx/patches-6.6/950-0007-drm-vc4-Add-firmware-kms-mode.patch b/target/linux/bcm27xx/patches-6.6/950-0007-drm-vc4-Add-firmware-kms-mode.patch index c755e8143598e1..468420bdee0eac 100644 --- a/target/linux/bcm27xx/patches-6.6/950-0007-drm-vc4-Add-firmware-kms-mode.patch +++ b/target/linux/bcm27xx/patches-6.6/950-0007-drm-vc4-Add-firmware-kms-mode.patch @@ -220,7 +220,7 @@ Signed-off-by: Dave Stevenson struct vc4_hang_state *hang_state; -@@ -963,6 +967,9 @@ extern struct platform_driver vc4_dsi_dr +@@ -964,6 +968,9 @@ extern struct platform_driver vc4_dsi_dr /* vc4_fence.c */ extern const struct dma_fence_ops vc4_fence_ops; diff --git a/target/linux/bcm27xx/patches-6.6/950-0008-drm-vc4-Add-support-for-gamma-on-BCM2711.patch b/target/linux/bcm27xx/patches-6.6/950-0008-drm-vc4-Add-support-for-gamma-on-BCM2711.patch index a4712310f2b7b2..10a09eb2c0c155 100644 --- a/target/linux/bcm27xx/patches-6.6/950-0008-drm-vc4-Add-support-for-gamma-on-BCM2711.patch +++ b/target/linux/bcm27xx/patches-6.6/950-0008-drm-vc4-Add-support-for-gamma-on-BCM2711.patch @@ -83,7 +83,7 @@ Signed-off-by: Maxime Ripard struct drm_device; struct drm_gem_object; -@@ -494,6 +495,17 @@ struct drm_encoder *vc4_find_encoder_by_ +@@ -495,6 +496,17 @@ struct drm_encoder *vc4_find_encoder_by_ return NULL; } @@ -101,7 +101,7 @@ Signed-off-by: Maxime Ripard struct vc4_crtc_data { const char *name; -@@ -538,9 +550,19 @@ struct vc4_crtc { +@@ -539,9 +551,19 @@ struct vc4_crtc { /* Timestamp at start of vblank irq - unaffected by lock delays. */ ktime_t t_vblank; @@ -126,7 +126,7 @@ Signed-off-by: Maxime Ripard --- a/drivers/gpu/drm/vc4/vc4_hvs.c +++ b/drivers/gpu/drm/vc4/vc4_hvs.c -@@ -243,7 +243,8 @@ static void vc4_hvs_lut_load(struct vc4_ +@@ -248,7 +248,8 @@ static void vc4_hvs_lut_load(struct vc4_ static void vc4_hvs_update_gamma_lut(struct vc4_hvs *hvs, struct vc4_crtc *vc4_crtc) { @@ -136,7 +136,7 @@ Signed-off-by: Maxime Ripard struct drm_color_lut *lut = crtc_state->gamma_lut->data; u32 length = drm_color_lut_size(crtc_state->gamma_lut); u32 i; -@@ -257,6 +258,81 @@ static void vc4_hvs_update_gamma_lut(str +@@ -262,6 +263,81 @@ static void vc4_hvs_update_gamma_lut(str vc4_hvs_lut_load(hvs, vc4_crtc); } @@ -218,7 +218,7 @@ Signed-off-by: Maxime Ripard u8 vc4_hvs_get_fifo_frame_count(struct vc4_hvs *hvs, unsigned int fifo) { struct drm_device *drm = &hvs->vc4->base; -@@ -400,7 +476,10 @@ static int vc4_hvs_init_channel(struct v +@@ -405,7 +481,10 @@ static int vc4_hvs_init_channel(struct v /* Reload the LUT, since the SRAMs would have been disabled if * all CRTCs had SCALER_DISPBKGND_GAMMA unset at once. */ @@ -230,7 +230,7 @@ Signed-off-by: Maxime Ripard drm_dev_exit(idx); -@@ -646,7 +725,11 @@ void vc4_hvs_atomic_flush(struct drm_crt +@@ -649,7 +728,11 @@ void vc4_hvs_atomic_flush(struct drm_crt u32 dispbkgndx = HVS_READ(SCALER_DISPBKGNDX(channel)); if (crtc->state->gamma_lut) { diff --git a/target/linux/bcm27xx/patches-6.6/950-0009-drm-vc4-Add-debugfs-node-that-dumps-the-vc5-gamma-PW.patch b/target/linux/bcm27xx/patches-6.6/950-0009-drm-vc4-Add-debugfs-node-that-dumps-the-vc5-gamma-PW.patch index 24d0cd90f6e2f9..863ad82432d5df 100644 --- a/target/linux/bcm27xx/patches-6.6/950-0009-drm-vc4-Add-debugfs-node-that-dumps-the-vc5-gamma-PW.patch +++ b/target/linux/bcm27xx/patches-6.6/950-0009-drm-vc4-Add-debugfs-node-that-dumps-the-vc5-gamma-PW.patch @@ -17,7 +17,7 @@ Signed-off-by: Maxime Ripard --- a/drivers/gpu/drm/vc4/vc4_hvs.c +++ b/drivers/gpu/drm/vc4/vc4_hvs.c -@@ -143,6 +143,85 @@ static int vc4_hvs_debugfs_dlist(struct +@@ -145,6 +145,85 @@ static int vc4_hvs_debugfs_dlist(struct return 0; } @@ -103,7 +103,7 @@ Signed-off-by: Maxime Ripard /* The filter kernel is composed of dwords each containing 3 9-bit * signed integers packed next to each other. */ -@@ -850,11 +929,15 @@ int vc4_hvs_debugfs_init(struct drm_mino +@@ -854,11 +933,15 @@ int vc4_hvs_debugfs_init(struct drm_mino if (!vc4->hvs) return -ENODEV; diff --git a/target/linux/bcm27xx/patches-6.6/950-0010-drm-vc4-hvs-Force-modeset-on-gamma-lut-change.patch b/target/linux/bcm27xx/patches-6.6/950-0010-drm-vc4-hvs-Force-modeset-on-gamma-lut-change.patch index f49122dec27a11..b8847230af0841 100644 --- a/target/linux/bcm27xx/patches-6.6/950-0010-drm-vc4-hvs-Force-modeset-on-gamma-lut-change.patch +++ b/target/linux/bcm27xx/patches-6.6/950-0010-drm-vc4-hvs-Force-modeset-on-gamma-lut-change.patch @@ -45,7 +45,7 @@ Signed-off-by: Maxime Ripard struct vc4_crtc *vc4_crtc = to_vc4_crtc(crtc); --- a/drivers/gpu/drm/vc4/vc4_drv.h +++ b/drivers/gpu/drm/vc4/vc4_drv.h -@@ -613,6 +613,9 @@ vc4_crtc_to_vc4_pv_data(const struct vc4 +@@ -614,6 +614,9 @@ vc4_crtc_to_vc4_pv_data(const struct vc4 return container_of_const(data, struct vc4_pv_data, base); } @@ -57,7 +57,7 @@ Signed-off-by: Maxime Ripard --- a/drivers/gpu/drm/vc4/vc4_hvs.c +++ b/drivers/gpu/drm/vc4/vc4_hvs.c -@@ -596,6 +596,36 @@ out: +@@ -599,6 +599,36 @@ out: drm_dev_exit(idx); } @@ -94,7 +94,7 @@ Signed-off-by: Maxime Ripard int vc4_hvs_atomic_check(struct drm_crtc *crtc, struct drm_atomic_state *state) { struct drm_crtc_state *crtc_state = drm_atomic_get_new_crtc_state(state, crtc); -@@ -626,7 +656,7 @@ int vc4_hvs_atomic_check(struct drm_crtc +@@ -629,7 +659,7 @@ int vc4_hvs_atomic_check(struct drm_crtc if (ret) return ret; diff --git a/target/linux/bcm27xx/patches-6.6/950-0014-drm-vc4-Enable-gamma-block-only-when-required.patch b/target/linux/bcm27xx/patches-6.6/950-0014-drm-vc4-Enable-gamma-block-only-when-required.patch index 76647cbd48889b..061b37797de7c8 100644 --- a/target/linux/bcm27xx/patches-6.6/950-0014-drm-vc4-Enable-gamma-block-only-when-required.patch +++ b/target/linux/bcm27xx/patches-6.6/950-0014-drm-vc4-Enable-gamma-block-only-when-required.patch @@ -20,7 +20,7 @@ Signed-off-by: Dave Stevenson --- a/drivers/gpu/drm/vc4/vc4_hvs.c +++ b/drivers/gpu/drm/vc4/vc4_hvs.c -@@ -548,8 +548,11 @@ static int vc4_hvs_init_channel(struct v +@@ -553,8 +553,11 @@ static int vc4_hvs_init_channel(struct v dispbkgndx &= ~SCALER_DISPBKGND_GAMMA; dispbkgndx &= ~SCALER_DISPBKGND_INTERLACE; @@ -33,7 +33,7 @@ Signed-off-by: Dave Stevenson (interlace ? SCALER_DISPBKGND_INTERLACE : 0)); /* Reload the LUT, since the SRAMs would have been disabled if -@@ -834,18 +837,25 @@ void vc4_hvs_atomic_flush(struct drm_crt +@@ -837,18 +840,25 @@ void vc4_hvs_atomic_flush(struct drm_crt u32 dispbkgndx = HVS_READ(SCALER_DISPBKGNDX(channel)); if (crtc->state->gamma_lut) { diff --git a/target/linux/bcm27xx/patches-6.6/950-0016-drm-vc4-Validate-the-size-of-the-gamma_lut.patch b/target/linux/bcm27xx/patches-6.6/950-0016-drm-vc4-Validate-the-size-of-the-gamma_lut.patch index fd0823aa136c89..7280b6e30c4a87 100644 --- a/target/linux/bcm27xx/patches-6.6/950-0016-drm-vc4-Validate-the-size-of-the-gamma_lut.patch +++ b/target/linux/bcm27xx/patches-6.6/950-0016-drm-vc4-Validate-the-size-of-the-gamma_lut.patch @@ -13,7 +13,7 @@ Signed-off-by: Dave Stevenson --- a/drivers/gpu/drm/vc4/vc4_hvs.c +++ b/drivers/gpu/drm/vc4/vc4_hvs.c -@@ -614,6 +614,16 @@ static int vc4_hvs_gamma_check(struct dr +@@ -617,6 +617,16 @@ static int vc4_hvs_gamma_check(struct dr if (!crtc_state->color_mgmt_changed) return 0; diff --git a/target/linux/bcm27xx/patches-6.6/950-0020-vc4-drm-vc4_plane-Keep-fractional-source-coords-insi.patch b/target/linux/bcm27xx/patches-6.6/950-0020-vc4-drm-vc4_plane-Keep-fractional-source-coords-insi.patch index 46a72e4ed92cbd..17dd4433e1ac47 100644 --- a/target/linux/bcm27xx/patches-6.6/950-0020-vc4-drm-vc4_plane-Keep-fractional-source-coords-insi.patch +++ b/target/linux/bcm27xx/patches-6.6/950-0020-vc4-drm-vc4_plane-Keep-fractional-source-coords-insi.patch @@ -12,7 +12,7 @@ Signed-off-by: Dom Cobley --- a/drivers/gpu/drm/vc4/vc4_drv.h +++ b/drivers/gpu/drm/vc4/vc4_drv.h -@@ -408,7 +408,7 @@ struct vc4_plane_state { +@@ -409,7 +409,7 @@ struct vc4_plane_state { /* Clipped coordinates of the plane on the display. */ int crtc_x, crtc_y, crtc_w, crtc_h; diff --git a/target/linux/bcm27xx/patches-6.6/950-0024-drm-vc4-Force-trigger-of-dlist-update-on-margins-cha.patch b/target/linux/bcm27xx/patches-6.6/950-0024-drm-vc4-Force-trigger-of-dlist-update-on-margins-cha.patch index 9779cd512c0078..06cb7094985b1f 100644 --- a/target/linux/bcm27xx/patches-6.6/950-0024-drm-vc4-Force-trigger-of-dlist-update-on-margins-cha.patch +++ b/target/linux/bcm27xx/patches-6.6/950-0024-drm-vc4-Force-trigger-of-dlist-update-on-margins-cha.patch @@ -42,7 +42,7 @@ Signed-off-by: Dave Stevenson --- a/drivers/gpu/drm/vc4/vc4_drv.h +++ b/drivers/gpu/drm/vc4/vc4_drv.h -@@ -626,12 +626,7 @@ struct vc4_crtc_state { +@@ -627,12 +627,7 @@ struct vc4_crtc_state { bool txp_armed; unsigned int assigned_channel; diff --git a/target/linux/bcm27xx/patches-6.6/950-0027-drm-vc4-hvs-Skip-DebugFS-Registration-for-FKMS.patch b/target/linux/bcm27xx/patches-6.6/950-0027-drm-vc4-hvs-Skip-DebugFS-Registration-for-FKMS.patch index ba03cfb7b92fc9..fb8abd20caf596 100644 --- a/target/linux/bcm27xx/patches-6.6/950-0027-drm-vc4-hvs-Skip-DebugFS-Registration-for-FKMS.patch +++ b/target/linux/bcm27xx/patches-6.6/950-0027-drm-vc4-hvs-Skip-DebugFS-Registration-for-FKMS.patch @@ -13,7 +13,7 @@ Signed-off-by: Maxime Ripard --- a/drivers/gpu/drm/vc4/vc4_hvs.c +++ b/drivers/gpu/drm/vc4/vc4_hvs.c -@@ -976,6 +976,9 @@ int vc4_hvs_debugfs_init(struct drm_mino +@@ -980,6 +980,9 @@ int vc4_hvs_debugfs_init(struct drm_mino struct vc4_dev *vc4 = to_vc4_dev(drm); struct vc4_hvs *hvs = vc4->hvs; diff --git a/target/linux/bcm27xx/patches-6.6/950-0028-drm-vc4_hdmi-Allow-hotplug-detect-to-be-forced.patch b/target/linux/bcm27xx/patches-6.6/950-0028-drm-vc4_hdmi-Allow-hotplug-detect-to-be-forced.patch index 95b3ec7a248de5..5785fbf667b28b 100644 --- a/target/linux/bcm27xx/patches-6.6/950-0028-drm-vc4_hdmi-Allow-hotplug-detect-to-be-forced.patch +++ b/target/linux/bcm27xx/patches-6.6/950-0028-drm-vc4_hdmi-Allow-hotplug-detect-to-be-forced.patch @@ -45,7 +45,7 @@ Signed-off-by: Dom Cobley static const char * const output_format_str[] = { [VC4_HDMI_OUTPUT_RGB] = "RGB", [VC4_HDMI_OUTPUT_YUV420] = "YUV 4:2:0", -@@ -478,7 +484,9 @@ static int vc4_hdmi_connector_detect_ctx +@@ -482,7 +488,9 @@ static int vc4_hdmi_connector_detect_ctx return connector_status_unknown; } diff --git a/target/linux/bcm27xx/patches-6.6/950-0029-vc4_hdmi-Avoid-log-spam-for-audio-start-failure.patch b/target/linux/bcm27xx/patches-6.6/950-0029-vc4_hdmi-Avoid-log-spam-for-audio-start-failure.patch index 0baf803edf8d5f..a73c5e3163fa5e 100644 --- a/target/linux/bcm27xx/patches-6.6/950-0029-vc4_hdmi-Avoid-log-spam-for-audio-start-failure.patch +++ b/target/linux/bcm27xx/patches-6.6/950-0029-vc4_hdmi-Avoid-log-spam-for-audio-start-failure.patch @@ -30,7 +30,7 @@ Signed-off-by: Dom Cobley --- a/drivers/gpu/drm/vc4/vc4_hdmi.c +++ b/drivers/gpu/drm/vc4/vc4_hdmi.c -@@ -2400,7 +2400,7 @@ static int vc4_hdmi_audio_startup(struct +@@ -2404,7 +2404,7 @@ static int vc4_hdmi_audio_startup(struct } if (!vc4_hdmi_audio_can_stream(vc4_hdmi)) { diff --git a/target/linux/bcm27xx/patches-6.6/950-0030-drm-vc4-hvs-Defer-dlist-slots-deallocation.patch b/target/linux/bcm27xx/patches-6.6/950-0030-drm-vc4-hvs-Defer-dlist-slots-deallocation.patch index a53dd1fa637e02..0d052868638180 100644 --- a/target/linux/bcm27xx/patches-6.6/950-0030-drm-vc4-hvs-Defer-dlist-slots-deallocation.patch +++ b/target/linux/bcm27xx/patches-6.6/950-0030-drm-vc4-hvs-Defer-dlist-slots-deallocation.patch @@ -98,7 +98,7 @@ Signed-off-by: Maxime Ripard } --- a/drivers/gpu/drm/vc4/vc4_drv.h +++ b/drivers/gpu/drm/vc4/vc4_drv.h -@@ -332,6 +332,9 @@ struct vc4_hvs { +@@ -333,6 +333,9 @@ struct vc4_hvs { struct drm_mm lbm_mm; spinlock_t mm_lock; @@ -108,7 +108,7 @@ Signed-off-by: Maxime Ripard struct drm_mm_node mitchell_netravali_filter; struct debugfs_regset32 regset; -@@ -619,10 +622,16 @@ struct drm_connector *vc4_get_crtc_conne +@@ -620,10 +623,16 @@ struct drm_connector *vc4_get_crtc_conne struct drm_encoder *vc4_get_crtc_encoder(struct drm_crtc *crtc, struct drm_crtc_state *state); @@ -127,7 +127,7 @@ Signed-off-by: Maxime Ripard bool txp_armed; unsigned int assigned_channel; -@@ -1032,6 +1041,8 @@ struct vc4_hvs *__vc4_hvs_alloc(struct v +@@ -1033,6 +1042,8 @@ struct vc4_hvs *__vc4_hvs_alloc(struct v void vc4_hvs_stop_channel(struct vc4_hvs *hvs, unsigned int output); int vc4_hvs_get_fifo_from_output(struct vc4_hvs *hvs, unsigned int output); u8 vc4_hvs_get_fifo_frame_count(struct vc4_hvs *hvs, unsigned int fifo); @@ -138,7 +138,7 @@ Signed-off-by: Maxime Ripard void vc4_hvs_atomic_enable(struct drm_crtc *crtc, struct drm_atomic_state *state); --- a/drivers/gpu/drm/vc4/vc4_hvs.c +++ b/drivers/gpu/drm/vc4/vc4_hvs.c -@@ -412,6 +412,152 @@ static void vc5_hvs_update_gamma_lut(str +@@ -417,6 +417,152 @@ static void vc5_hvs_update_gamma_lut(str vc5_hvs_lut_load(hvs, vc4_crtc); } @@ -291,7 +291,7 @@ Signed-off-by: Maxime Ripard u8 vc4_hvs_get_fifo_frame_count(struct vc4_hvs *hvs, unsigned int fifo) { struct drm_device *drm = &hvs->vc4->base; -@@ -643,13 +789,12 @@ int vc4_hvs_atomic_check(struct drm_crtc +@@ -646,13 +792,12 @@ int vc4_hvs_atomic_check(struct drm_crtc { struct drm_crtc_state *crtc_state = drm_atomic_get_new_crtc_state(state, crtc); struct vc4_crtc_state *vc4_state = to_vc4_crtc_state(crtc_state); @@ -306,7 +306,7 @@ Signed-off-by: Maxime Ripard /* The pixelvalve can only feed one encoder (and encoders are * 1:1 with connectors.) -@@ -662,12 +807,11 @@ int vc4_hvs_atomic_check(struct drm_crtc +@@ -665,12 +810,11 @@ int vc4_hvs_atomic_check(struct drm_crtc dlist_count++; /* Account for SCALER_CTL0_END. */ @@ -324,7 +324,7 @@ Signed-off-by: Maxime Ripard return vc4_hvs_gamma_check(crtc, state); } -@@ -683,8 +827,9 @@ static void vc4_hvs_install_dlist(struct +@@ -686,8 +830,9 @@ static void vc4_hvs_install_dlist(struct if (!drm_dev_enter(dev, &idx)) return; @@ -335,7 +335,7 @@ Signed-off-by: Maxime Ripard drm_dev_exit(idx); } -@@ -711,8 +856,10 @@ static void vc4_hvs_update_dlist(struct +@@ -714,8 +859,10 @@ static void vc4_hvs_update_dlist(struct spin_unlock_irqrestore(&dev->event_lock, flags); } @@ -347,7 +347,7 @@ Signed-off-by: Maxime Ripard spin_unlock_irqrestore(&vc4_crtc->irq_lock, flags); } -@@ -769,8 +916,7 @@ void vc4_hvs_atomic_flush(struct drm_crt +@@ -772,8 +919,7 @@ void vc4_hvs_atomic_flush(struct drm_crt struct vc4_plane_state *vc4_plane_state; bool debug_dump_regs = false; bool enable_bg_fill = false; @@ -357,7 +357,7 @@ Signed-off-by: Maxime Ripard unsigned int zpos = 0; bool found = false; int idx; -@@ -788,6 +934,9 @@ void vc4_hvs_atomic_flush(struct drm_crt +@@ -791,6 +937,9 @@ void vc4_hvs_atomic_flush(struct drm_crt vc4_hvs_dump_state(hvs); } @@ -367,7 +367,7 @@ Signed-off-by: Maxime Ripard /* Copy all the active planes' dlist contents to the hardware dlist. */ do { found = false; -@@ -821,7 +970,8 @@ void vc4_hvs_atomic_flush(struct drm_crt +@@ -824,7 +973,8 @@ void vc4_hvs_atomic_flush(struct drm_crt writel(SCALER_CTL0_END, dlist_next); dlist_next++; @@ -377,7 +377,7 @@ Signed-off-by: Maxime Ripard if (enable_bg_fill) /* This sets a black background color fill, as is the case -@@ -960,6 +1110,11 @@ static irqreturn_t vc4_hvs_irq_handler(i +@@ -964,6 +1114,11 @@ static irqreturn_t vc4_hvs_irq_handler(i irqret = IRQ_HANDLED; } @@ -389,7 +389,7 @@ Signed-off-by: Maxime Ripard } /* Clear every per-channel interrupt flag. */ -@@ -1014,6 +1169,9 @@ struct vc4_hvs *__vc4_hvs_alloc(struct v +@@ -1018,6 +1173,9 @@ struct vc4_hvs *__vc4_hvs_alloc(struct v spin_lock_init(&hvs->mm_lock); diff --git a/target/linux/bcm27xx/patches-6.6/950-0031-drm-vc4-hvs-Initialize-the-dlist-allocation-list-ent.patch b/target/linux/bcm27xx/patches-6.6/950-0031-drm-vc4-hvs-Initialize-the-dlist-allocation-list-ent.patch index d250dd4e1e15bf..2fd7aa573de881 100644 --- a/target/linux/bcm27xx/patches-6.6/950-0031-drm-vc4-hvs-Initialize-the-dlist-allocation-list-ent.patch +++ b/target/linux/bcm27xx/patches-6.6/950-0031-drm-vc4-hvs-Initialize-the-dlist-allocation-list-ent.patch @@ -19,7 +19,7 @@ Signed-off-by: Maxime Ripard --- a/drivers/gpu/drm/vc4/vc4_hvs.c +++ b/drivers/gpu/drm/vc4/vc4_hvs.c -@@ -452,6 +452,8 @@ vc4_hvs_alloc_dlist_entry(struct vc4_hvs +@@ -457,6 +457,8 @@ vc4_hvs_alloc_dlist_entry(struct vc4_hvs if (!alloc) return ERR_PTR(-ENOMEM); diff --git a/target/linux/bcm27xx/patches-6.6/950-0032-drm-vc4-hvs-Move-the-dlist-allocation-destruction-to.patch b/target/linux/bcm27xx/patches-6.6/950-0032-drm-vc4-hvs-Move-the-dlist-allocation-destruction-to.patch index f6fe9e1a4c20b2..07fb255e66109f 100644 --- a/target/linux/bcm27xx/patches-6.6/950-0032-drm-vc4-hvs-Move-the-dlist-allocation-destruction-to.patch +++ b/target/linux/bcm27xx/patches-6.6/950-0032-drm-vc4-hvs-Move-the-dlist-allocation-destruction-to.patch @@ -14,7 +14,7 @@ Signed-off-by: Maxime Ripard --- a/drivers/gpu/drm/vc4/vc4_hvs.c +++ b/drivers/gpu/drm/vc4/vc4_hvs.c -@@ -466,6 +466,18 @@ vc4_hvs_alloc_dlist_entry(struct vc4_hvs +@@ -471,6 +471,18 @@ vc4_hvs_alloc_dlist_entry(struct vc4_hvs return alloc; } @@ -33,7 +33,7 @@ Signed-off-by: Maxime Ripard void vc4_hvs_mark_dlist_entry_stale(struct vc4_hvs *hvs, struct vc4_hvs_dlist_allocation *alloc) { -@@ -553,9 +565,7 @@ static void vc4_hvs_dlist_free_work(stru +@@ -558,9 +570,7 @@ static void vc4_hvs_dlist_free_work(stru if (!vc4_hvs_frcnt_lte(cur->target_frame_count, frcnt)) continue; diff --git a/target/linux/bcm27xx/patches-6.6/950-0033-drm-vc4-hvs-Destroy-dlist-allocations-immediately-wh.patch b/target/linux/bcm27xx/patches-6.6/950-0033-drm-vc4-hvs-Destroy-dlist-allocations-immediately-wh.patch index 6c8689e169cb46..ecfabf63b92a59 100644 --- a/target/linux/bcm27xx/patches-6.6/950-0033-drm-vc4-hvs-Destroy-dlist-allocations-immediately-wh.patch +++ b/target/linux/bcm27xx/patches-6.6/950-0033-drm-vc4-hvs-Destroy-dlist-allocations-immediately-wh.patch @@ -27,7 +27,7 @@ Signed-off-by: Maxime Ripard --- a/drivers/gpu/drm/vc4/vc4_hvs.c +++ b/drivers/gpu/drm/vc4/vc4_hvs.c -@@ -490,6 +490,18 @@ void vc4_hvs_mark_dlist_entry_stale(stru +@@ -495,6 +495,18 @@ void vc4_hvs_mark_dlist_entry_stale(stru if (!drm_mm_node_allocated(&alloc->mm_node)) return; diff --git a/target/linux/bcm27xx/patches-6.6/950-0035-drm-vc4-Calculate-bpc-based-on-max_requested_bpc.patch b/target/linux/bcm27xx/patches-6.6/950-0035-drm-vc4-Calculate-bpc-based-on-max_requested_bpc.patch index f0fb3eb7d47eee..fbaa2619aa52b2 100644 --- a/target/linux/bcm27xx/patches-6.6/950-0035-drm-vc4-Calculate-bpc-based-on-max_requested_bpc.patch +++ b/target/linux/bcm27xx/patches-6.6/950-0035-drm-vc4-Calculate-bpc-based-on-max_requested_bpc.patch @@ -18,7 +18,7 @@ Signed-off-by: Matthias Reichl --- a/drivers/gpu/drm/vc4/vc4_hdmi.c +++ b/drivers/gpu/drm/vc4/vc4_hdmi.c -@@ -2132,7 +2132,7 @@ vc4_hdmi_encoder_compute_config(const st +@@ -2136,7 +2136,7 @@ vc4_hdmi_encoder_compute_config(const st { struct drm_device *dev = vc4_hdmi->connector.dev; struct drm_connector_state *conn_state = &vc4_state->base; diff --git a/target/linux/bcm27xx/patches-6.6/950-0036-drm-vc4-Set-AXI-panic-modes-for-the-HVS.patch b/target/linux/bcm27xx/patches-6.6/950-0036-drm-vc4-Set-AXI-panic-modes-for-the-HVS.patch index 996094739581f7..13015f1f497a47 100644 --- a/target/linux/bcm27xx/patches-6.6/950-0036-drm-vc4-Set-AXI-panic-modes-for-the-HVS.patch +++ b/target/linux/bcm27xx/patches-6.6/950-0036-drm-vc4-Set-AXI-panic-modes-for-the-HVS.patch @@ -19,7 +19,7 @@ Signed-off-by: Dave Stevenson --- a/drivers/gpu/drm/vc4/vc4_hvs.c +++ b/drivers/gpu/drm/vc4/vc4_hvs.c -@@ -1363,6 +1363,17 @@ static int vc4_hvs_bind(struct device *d +@@ -1368,6 +1368,17 @@ static int vc4_hvs_bind(struct device *d dispctrl |= VC4_SET_FIELD(2, SCALER_DISPCTRL_PANIC1); dispctrl |= VC4_SET_FIELD(2, SCALER_DISPCTRL_PANIC2); diff --git a/target/linux/bcm27xx/patches-6.6/950-0037-drm-vc4-drop-unnecessary-and-harmful-HDMI-RGB-format.patch b/target/linux/bcm27xx/patches-6.6/950-0037-drm-vc4-drop-unnecessary-and-harmful-HDMI-RGB-format.patch index b9fba16f695737..18b5b63b547870 100644 --- a/target/linux/bcm27xx/patches-6.6/950-0037-drm-vc4-drop-unnecessary-and-harmful-HDMI-RGB-format.patch +++ b/target/linux/bcm27xx/patches-6.6/950-0037-drm-vc4-drop-unnecessary-and-harmful-HDMI-RGB-format.patch @@ -25,7 +25,7 @@ Signed-off-by: Matthias Reichl --- a/drivers/gpu/drm/vc4/vc4_hdmi.c +++ b/drivers/gpu/drm/vc4/vc4_hdmi.c -@@ -1958,9 +1958,6 @@ vc4_hdmi_sink_supports_format_bpc(const +@@ -1962,9 +1962,6 @@ vc4_hdmi_sink_supports_format_bpc(const case VC4_HDMI_OUTPUT_RGB: drm_dbg(dev, "RGB Format, checking the constraints.\n"); diff --git a/target/linux/bcm27xx/patches-6.6/950-0038-drm-vc4-Limit-max_bpc-to-8-on-Pi0-3.patch b/target/linux/bcm27xx/patches-6.6/950-0038-drm-vc4-Limit-max_bpc-to-8-on-Pi0-3.patch index 2b86f419529670..b3b1c3d9e4348c 100644 --- a/target/linux/bcm27xx/patches-6.6/950-0038-drm-vc4-Limit-max_bpc-to-8-on-Pi0-3.patch +++ b/target/linux/bcm27xx/patches-6.6/950-0038-drm-vc4-Limit-max_bpc-to-8-on-Pi0-3.patch @@ -13,7 +13,7 @@ Signed-off-by: Dave Stevenson --- a/drivers/gpu/drm/vc4/vc4_hdmi.c +++ b/drivers/gpu/drm/vc4/vc4_hdmi.c -@@ -762,7 +762,6 @@ static int vc4_hdmi_connector_init(struc +@@ -766,7 +766,6 @@ static int vc4_hdmi_connector_init(struc drm_connector_attach_colorspace_property(connector); drm_connector_attach_tv_margin_properties(connector); @@ -21,7 +21,7 @@ Signed-off-by: Dave Stevenson connector->polled = (DRM_CONNECTOR_POLL_CONNECT | DRM_CONNECTOR_POLL_DISCONNECT); -@@ -771,8 +770,12 @@ static int vc4_hdmi_connector_init(struc +@@ -775,8 +774,12 @@ static int vc4_hdmi_connector_init(struc connector->doublescan_allowed = 0; connector->stereo_allowed = 1; diff --git a/target/linux/bcm27xx/patches-6.6/950-0039-arm64-setup-Fix-build-warning.patch b/target/linux/bcm27xx/patches-6.6/950-0039-arm64-setup-Fix-build-warning.patch index a53c896daaaf65..75e552a7ef036c 100644 --- a/target/linux/bcm27xx/patches-6.6/950-0039-arm64-setup-Fix-build-warning.patch +++ b/target/linux/bcm27xx/patches-6.6/950-0039-arm64-setup-Fix-build-warning.patch @@ -10,7 +10,7 @@ Signed-off-by: Maxime Ripard --- a/arch/arm64/kernel/setup.c +++ b/arch/arm64/kernel/setup.c -@@ -225,9 +225,9 @@ static void __init request_standard_reso +@@ -229,9 +229,9 @@ static void __init request_standard_reso size_t res_size; kernel_code.start = __pa_symbol(_stext); diff --git a/target/linux/bcm27xx/patches-6.6/950-0065-cgroup-Disable-cgroup-memory-by-default.patch b/target/linux/bcm27xx/patches-6.6/950-0065-cgroup-Disable-cgroup-memory-by-default.patch index 8a06ec387e6ef6..5f2d80b697ce87 100644 --- a/target/linux/bcm27xx/patches-6.6/950-0065-cgroup-Disable-cgroup-memory-by-default.patch +++ b/target/linux/bcm27xx/patches-6.6/950-0065-cgroup-Disable-cgroup-memory-by-default.patch @@ -17,7 +17,7 @@ Signed-off-by: Phil Elwell --- a/kernel/cgroup/cgroup.c +++ b/kernel/cgroup/cgroup.c -@@ -6060,6 +6060,9 @@ int __init cgroup_init_early(void) +@@ -6063,6 +6063,9 @@ int __init cgroup_init_early(void) return 0; } @@ -27,7 +27,7 @@ Signed-off-by: Phil Elwell /** * cgroup_init - cgroup initialization * -@@ -6093,6 +6096,12 @@ int __init cgroup_init(void) +@@ -6096,6 +6099,12 @@ int __init cgroup_init(void) cgroup_unlock(); @@ -40,7 +40,7 @@ Signed-off-by: Phil Elwell for_each_subsys(ss, ssid) { if (ss->early_init) { struct cgroup_subsys_state *css = -@@ -6733,6 +6742,10 @@ static int __init cgroup_disable(char *s +@@ -6736,6 +6745,10 @@ static int __init cgroup_disable(char *s strcmp(token, ss->legacy_name)) continue; @@ -51,7 +51,7 @@ Signed-off-by: Phil Elwell static_branch_disable(cgroup_subsys_enabled_key[i]); pr_info("Disabling %s control group subsystem\n", ss->name); -@@ -6751,6 +6764,31 @@ static int __init cgroup_disable(char *s +@@ -6754,6 +6767,31 @@ static int __init cgroup_disable(char *s } __setup("cgroup_disable=", cgroup_disable); diff --git a/target/linux/bcm27xx/patches-6.6/950-0081-lan78xx-Enable-LEDs-and-auto-negotiation.patch b/target/linux/bcm27xx/patches-6.6/950-0081-lan78xx-Enable-LEDs-and-auto-negotiation.patch index 8735b0617017ad..fb248b08892ddb 100644 --- a/target/linux/bcm27xx/patches-6.6/950-0081-lan78xx-Enable-LEDs-and-auto-negotiation.patch +++ b/target/linux/bcm27xx/patches-6.6/950-0081-lan78xx-Enable-LEDs-and-auto-negotiation.patch @@ -14,7 +14,7 @@ Signed-off-by: Phil Elwell --- a/drivers/net/usb/lan78xx.c +++ b/drivers/net/usb/lan78xx.c -@@ -2883,6 +2883,11 @@ static int lan78xx_reset(struct lan78xx_ +@@ -2884,6 +2884,11 @@ static int lan78xx_reset(struct lan78xx_ int ret; u32 buf; u8 sig; @@ -26,7 +26,7 @@ Signed-off-by: Phil Elwell ret = lan78xx_read_reg(dev, HW_CFG, &buf); if (ret < 0) -@@ -2947,6 +2952,10 @@ static int lan78xx_reset(struct lan78xx_ +@@ -2948,6 +2953,10 @@ static int lan78xx_reset(struct lan78xx_ buf |= HW_CFG_MEF_; @@ -37,7 +37,7 @@ Signed-off-by: Phil Elwell ret = lan78xx_write_reg(dev, HW_CFG, buf); if (ret < 0) return ret; -@@ -3046,6 +3055,9 @@ static int lan78xx_reset(struct lan78xx_ +@@ -3047,6 +3056,9 @@ static int lan78xx_reset(struct lan78xx_ buf |= MAC_CR_AUTO_DUPLEX_ | MAC_CR_AUTO_SPEED_; } } diff --git a/target/linux/bcm27xx/patches-6.6/950-0106-Add-support-for-all-the-downstream-rpi-sound-card-dr.patch b/target/linux/bcm27xx/patches-6.6/950-0106-Add-support-for-all-the-downstream-rpi-sound-card-dr.patch index 395ec0797c15ca..a8a58b58fa64c1 100644 --- a/target/linux/bcm27xx/patches-6.6/950-0106-Add-support-for-all-the-downstream-rpi-sound-card-dr.patch +++ b/target/linux/bcm27xx/patches-6.6/950-0106-Add-support-for-all-the-downstream-rpi-sound-card-dr.patch @@ -17583,7 +17583,7 @@ Signed-off-by: Phil Elwell * For devices with more than one control interface, we assume the --- a/sound/usb/quirks.c +++ b/sound/usb/quirks.c -@@ -2197,6 +2197,8 @@ static const struct usb_audio_quirk_flag +@@ -2212,6 +2212,8 @@ static const struct usb_audio_quirk_flag QUIRK_FLAG_ALIGN_TRANSFER), DEVICE_FLG(0x534d, 0x2109, /* MacroSilicon MS2109 */ QUIRK_FLAG_ALIGN_TRANSFER), diff --git a/target/linux/bcm27xx/patches-6.6/950-0120-lan78xx-Read-initial-EEE-status-from-DT.patch b/target/linux/bcm27xx/patches-6.6/950-0120-lan78xx-Read-initial-EEE-status-from-DT.patch index 296ceae6c70c3a..7aa05b0abc4225 100644 --- a/target/linux/bcm27xx/patches-6.6/950-0120-lan78xx-Read-initial-EEE-status-from-DT.patch +++ b/target/linux/bcm27xx/patches-6.6/950-0120-lan78xx-Read-initial-EEE-status-from-DT.patch @@ -15,7 +15,7 @@ Signed-off-by: Phil Elwell --- a/drivers/net/usb/lan78xx.c +++ b/drivers/net/usb/lan78xx.c -@@ -3111,6 +3111,22 @@ static int lan78xx_open(struct net_devic +@@ -3112,6 +3112,22 @@ static int lan78xx_open(struct net_devic netif_dbg(dev, ifup, dev->net, "phy initialised successfully"); diff --git a/target/linux/bcm27xx/patches-6.6/950-0125-net-lan78xx-Disable-TCP-Segmentation-Offload-TSO.patch b/target/linux/bcm27xx/patches-6.6/950-0125-net-lan78xx-Disable-TCP-Segmentation-Offload-TSO.patch index 7738bdb8da8688..1b6643508b38cc 100644 --- a/target/linux/bcm27xx/patches-6.6/950-0125-net-lan78xx-Disable-TCP-Segmentation-Offload-TSO.patch +++ b/target/linux/bcm27xx/patches-6.6/950-0125-net-lan78xx-Disable-TCP-Segmentation-Offload-TSO.patch @@ -38,7 +38,7 @@ Signed-off-by: Dave Stevenson static int lan78xx_read_reg(struct lan78xx_net *dev, u32 index, u32 *data) { u32 *buf; -@@ -3471,8 +3480,14 @@ static int lan78xx_bind(struct lan78xx_n +@@ -3472,8 +3481,14 @@ static int lan78xx_bind(struct lan78xx_n if (DEFAULT_RX_CSUM_ENABLE) dev->net->features |= NETIF_F_RXCSUM; diff --git a/target/linux/bcm27xx/patches-6.6/950-0127-lan78xx-Move-enabling-of-EEE-into-PHY-init-code.patch b/target/linux/bcm27xx/patches-6.6/950-0127-lan78xx-Move-enabling-of-EEE-into-PHY-init-code.patch index f73106ab4bd8b4..f98d2c7dd63c18 100644 --- a/target/linux/bcm27xx/patches-6.6/950-0127-lan78xx-Move-enabling-of-EEE-into-PHY-init-code.patch +++ b/target/linux/bcm27xx/patches-6.6/950-0127-lan78xx-Move-enabling-of-EEE-into-PHY-init-code.patch @@ -16,7 +16,7 @@ Signed-off-by: Phil Elwell --- a/drivers/net/usb/lan78xx.c +++ b/drivers/net/usb/lan78xx.c -@@ -2419,6 +2419,22 @@ static int lan78xx_phy_init(struct lan78 +@@ -2420,6 +2420,22 @@ static int lan78xx_phy_init(struct lan78 mii_adv_to_linkmode_adv_t(fc, mii_adv); linkmode_or(phydev->advertising, fc, phydev->advertising); @@ -39,7 +39,7 @@ Signed-off-by: Phil Elwell if (phydev->mdio.dev.of_node) { u32 reg; int len; -@@ -3120,22 +3136,6 @@ static int lan78xx_open(struct net_devic +@@ -3121,22 +3137,6 @@ static int lan78xx_open(struct net_devic netif_dbg(dev, ifup, dev->net, "phy initialised successfully"); diff --git a/target/linux/bcm27xx/patches-6.6/950-0130-serial-sc16is7xx-Don-t-spin-if-no-data-received.patch b/target/linux/bcm27xx/patches-6.6/950-0130-serial-sc16is7xx-Don-t-spin-if-no-data-received.patch index eceba53aabdaa7..4ef34aeffc0b6a 100644 --- a/target/linux/bcm27xx/patches-6.6/950-0130-serial-sc16is7xx-Don-t-spin-if-no-data-received.patch +++ b/target/linux/bcm27xx/patches-6.6/950-0130-serial-sc16is7xx-Don-t-spin-if-no-data-received.patch @@ -15,7 +15,7 @@ Signed-off-by: Phil Elwell --- a/drivers/tty/serial/sc16is7xx.c +++ b/drivers/tty/serial/sc16is7xx.c -@@ -773,6 +773,8 @@ static bool sc16is7xx_port_irq(struct sc +@@ -777,6 +777,8 @@ static bool sc16is7xx_port_irq(struct sc if (rxlen) sc16is7xx_handle_rx(port, rxlen, iir); diff --git a/target/linux/bcm27xx/patches-6.6/950-0133-lan78xx-Debounce-link-events-to-minimize-poll-storm.patch b/target/linux/bcm27xx/patches-6.6/950-0133-lan78xx-Debounce-link-events-to-minimize-poll-storm.patch index dc411233dfa2ff..2ca2550acb3823 100644 --- a/target/linux/bcm27xx/patches-6.6/950-0133-lan78xx-Debounce-link-events-to-minimize-poll-storm.patch +++ b/target/linux/bcm27xx/patches-6.6/950-0133-lan78xx-Debounce-link-events-to-minimize-poll-storm.patch @@ -29,7 +29,7 @@ See: https://github.com/raspberrypi/linux/issues/2447 static int lan78xx_read_reg(struct lan78xx_net *dev, u32 index, u32 *data) { u32 *buf; -@@ -4455,7 +4460,13 @@ static int lan78xx_probe(struct usb_inte +@@ -4458,7 +4463,13 @@ static int lan78xx_probe(struct usb_inte if (ret < 0) goto out4; @@ -42,5 +42,5 @@ See: https://github.com/raspberrypi/linux/issues/2447 + netif_notice(dev, probe, netdev, "int urb period %d\n", period); + maxp = usb_maxpacket(dev->udev, dev->pipe_intr); - buf = kmalloc(maxp, GFP_KERNEL); - if (!buf) { + + dev->urb_intr = usb_alloc_urb(0, GFP_KERNEL); diff --git a/target/linux/bcm27xx/patches-6.6/950-0134-lan78xx-EEE-support-is-now-a-PHY-property.patch b/target/linux/bcm27xx/patches-6.6/950-0134-lan78xx-EEE-support-is-now-a-PHY-property.patch index df6c7e687fd7d3..b5e0095d97c01d 100644 --- a/target/linux/bcm27xx/patches-6.6/950-0134-lan78xx-EEE-support-is-now-a-PHY-property.patch +++ b/target/linux/bcm27xx/patches-6.6/950-0134-lan78xx-EEE-support-is-now-a-PHY-property.patch @@ -15,7 +15,7 @@ Signed-off-by: Phil Elwell --- a/drivers/net/usb/lan78xx.c +++ b/drivers/net/usb/lan78xx.c -@@ -2424,7 +2424,7 @@ static int lan78xx_phy_init(struct lan78 +@@ -2425,7 +2425,7 @@ static int lan78xx_phy_init(struct lan78 mii_adv_to_linkmode_adv_t(fc, mii_adv); linkmode_or(phydev->advertising, fc, phydev->advertising); diff --git a/target/linux/bcm27xx/patches-6.6/950-0204-spi-Force-CS_HIGH-if-GPIO-descriptors-are-used.patch b/target/linux/bcm27xx/patches-6.6/950-0204-spi-Force-CS_HIGH-if-GPIO-descriptors-are-used.patch index 5398d85ef3e23a..7cbbeebf6de146 100644 --- a/target/linux/bcm27xx/patches-6.6/950-0204-spi-Force-CS_HIGH-if-GPIO-descriptors-are-used.patch +++ b/target/linux/bcm27xx/patches-6.6/950-0204-spi-Force-CS_HIGH-if-GPIO-descriptors-are-used.patch @@ -32,7 +32,7 @@ Signed-off-by: Phil Elwell --- a/drivers/spi/spi.c +++ b/drivers/spi/spi.c -@@ -3740,6 +3740,7 @@ static int spi_set_cs_timing(struct spi_ +@@ -3747,6 +3747,7 @@ static int spi_set_cs_timing(struct spi_ */ int spi_setup(struct spi_device *spi) { @@ -40,7 +40,7 @@ Signed-off-by: Phil Elwell unsigned bad_bits, ugly_bits; int status = 0; -@@ -3760,6 +3761,14 @@ int spi_setup(struct spi_device *spi) +@@ -3767,6 +3768,14 @@ int spi_setup(struct spi_device *spi) (SPI_TX_DUAL | SPI_TX_QUAD | SPI_TX_OCTAL | SPI_RX_DUAL | SPI_RX_QUAD | SPI_RX_OCTAL))) return -EINVAL; diff --git a/target/linux/bcm27xx/patches-6.6/950-0468-drm-vc4-hdmi-Increase-MAI-fifo-dreq-threshold.patch b/target/linux/bcm27xx/patches-6.6/950-0468-drm-vc4-hdmi-Increase-MAI-fifo-dreq-threshold.patch index a0c1eba931041b..f43df7ca3f7176 100644 --- a/target/linux/bcm27xx/patches-6.6/950-0468-drm-vc4-hdmi-Increase-MAI-fifo-dreq-threshold.patch +++ b/target/linux/bcm27xx/patches-6.6/950-0468-drm-vc4-hdmi-Increase-MAI-fifo-dreq-threshold.patch @@ -16,7 +16,7 @@ Signed-off-by: Dom Cobley --- a/drivers/gpu/drm/vc4/vc4_hdmi.c +++ b/drivers/gpu/drm/vc4/vc4_hdmi.c -@@ -2527,6 +2527,7 @@ static int vc4_hdmi_audio_prepare(struct +@@ -2531,6 +2531,7 @@ static int vc4_hdmi_audio_prepare(struct { struct vc4_hdmi *vc4_hdmi = dev_get_drvdata(dev); struct drm_device *drm = vc4_hdmi->connector.dev; @@ -24,7 +24,7 @@ Signed-off-by: Dom Cobley struct drm_encoder *encoder = &vc4_hdmi->encoder.base; unsigned int sample_rate = params->sample_rate; unsigned int channels = params->channels; -@@ -2585,11 +2586,18 @@ static int vc4_hdmi_audio_prepare(struct +@@ -2589,11 +2590,18 @@ static int vc4_hdmi_audio_prepare(struct VC4_HDMI_AUDIO_PACKET_CEA_MASK); /* Set the MAI threshold */ diff --git a/target/linux/bcm27xx/patches-6.6/950-0475-serial-sc16is7xx-Read-modem-line-state-at-startup.patch b/target/linux/bcm27xx/patches-6.6/950-0475-serial-sc16is7xx-Read-modem-line-state-at-startup.patch index 08c1bd17ce7293..0149501e777b1c 100644 --- a/target/linux/bcm27xx/patches-6.6/950-0475-serial-sc16is7xx-Read-modem-line-state-at-startup.patch +++ b/target/linux/bcm27xx/patches-6.6/950-0475-serial-sc16is7xx-Read-modem-line-state-at-startup.patch @@ -16,7 +16,7 @@ Signed-off-by: Phil Elwell --- a/drivers/tty/serial/sc16is7xx.c +++ b/drivers/tty/serial/sc16is7xx.c -@@ -1206,6 +1206,9 @@ static int sc16is7xx_startup(struct uart +@@ -1210,6 +1210,9 @@ static int sc16is7xx_startup(struct uart SC16IS7XX_IER_MSI_BIT; sc16is7xx_port_write(port, SC16IS7XX_IER_REG, val); diff --git a/target/linux/bcm27xx/patches-6.6/950-0485-usb-xhci-add-XHCI_VLI_HUB_TT_QUIRK.patch b/target/linux/bcm27xx/patches-6.6/950-0485-usb-xhci-add-XHCI_VLI_HUB_TT_QUIRK.patch index f0c75c6bfaf4dc..8d276e1681866f 100644 --- a/target/linux/bcm27xx/patches-6.6/950-0485-usb-xhci-add-XHCI_VLI_HUB_TT_QUIRK.patch +++ b/target/linux/bcm27xx/patches-6.6/950-0485-usb-xhci-add-XHCI_VLI_HUB_TT_QUIRK.patch @@ -75,7 +75,7 @@ Signed-off-by: Jonathan Bell if (pdev->vendor == PCI_VENDOR_ID_ASMEDIA && --- a/drivers/usb/host/xhci-ring.c +++ b/drivers/usb/host/xhci-ring.c -@@ -3671,6 +3671,48 @@ static int xhci_align_td(struct xhci_hcd +@@ -3679,6 +3679,48 @@ static int xhci_align_td(struct xhci_hcd return 1; } @@ -124,7 +124,7 @@ Signed-off-by: Jonathan Bell /* This is very similar to what ehci-q.c qtd_fill() does */ int xhci_queue_bulk_tx(struct xhci_hcd *xhci, gfp_t mem_flags, struct urb *urb, int slot_id, unsigned int ep_index) -@@ -3827,6 +3869,8 @@ int xhci_queue_bulk_tx(struct xhci_hcd * +@@ -3835,6 +3877,8 @@ int xhci_queue_bulk_tx(struct xhci_hcd * } check_trb_math(urb, enqd_len); @@ -133,7 +133,7 @@ Signed-off-by: Jonathan Bell giveback_first_trb(xhci, slot_id, ep_index, urb->stream_id, start_cycle, start_trb); return 0; -@@ -3962,6 +4006,8 @@ int xhci_queue_ctrl_tx(struct xhci_hcd * +@@ -3970,6 +4014,8 @@ int xhci_queue_ctrl_tx(struct xhci_hcd * /* Event on completion */ field | TRB_IOC | TRB_TYPE(TRB_STATUS) | ep_ring->cycle_state); diff --git a/target/linux/bcm27xx/patches-6.6/950-0578-drm-vc4-hdmi-Enable-the-audio-clock.patch b/target/linux/bcm27xx/patches-6.6/950-0578-drm-vc4-hdmi-Enable-the-audio-clock.patch index 79d040070f068d..ab082c6a1900cb 100644 --- a/target/linux/bcm27xx/patches-6.6/950-0578-drm-vc4-hdmi-Enable-the-audio-clock.patch +++ b/target/linux/bcm27xx/patches-6.6/950-0578-drm-vc4-hdmi-Enable-the-audio-clock.patch @@ -18,7 +18,7 @@ Signed-off-by: Maxime Ripard --- a/drivers/gpu/drm/vc4/vc4_hdmi.c +++ b/drivers/gpu/drm/vc4/vc4_hdmi.c -@@ -3595,6 +3595,7 @@ static int vc4_hdmi_runtime_suspend(stru +@@ -3599,6 +3599,7 @@ static int vc4_hdmi_runtime_suspend(stru { struct vc4_hdmi *vc4_hdmi = dev_get_drvdata(dev); @@ -26,7 +26,7 @@ Signed-off-by: Maxime Ripard clk_disable_unprepare(vc4_hdmi->hsm_clock); return 0; -@@ -3627,6 +3628,10 @@ static int vc4_hdmi_runtime_resume(struc +@@ -3631,6 +3632,10 @@ static int vc4_hdmi_runtime_resume(struc goto err_disable_clk; } diff --git a/target/linux/bcm27xx/patches-6.6/950-0580-drm-vc4-hvs-More-logging-for-dlist-generation.patch b/target/linux/bcm27xx/patches-6.6/950-0580-drm-vc4-hvs-More-logging-for-dlist-generation.patch index 6c0a85d703dc09..69b36207c6ad76 100644 --- a/target/linux/bcm27xx/patches-6.6/950-0580-drm-vc4-hvs-More-logging-for-dlist-generation.patch +++ b/target/linux/bcm27xx/patches-6.6/950-0580-drm-vc4-hvs-More-logging-for-dlist-generation.patch @@ -14,7 +14,7 @@ Signed-off-by: Maxime Ripard --- a/drivers/gpu/drm/vc4/vc4_hvs.c +++ b/drivers/gpu/drm/vc4/vc4_hvs.c -@@ -826,11 +826,22 @@ int vc4_hvs_atomic_check(struct drm_crtc +@@ -829,11 +829,22 @@ int vc4_hvs_atomic_check(struct drm_crtc if (hweight32(crtc_state->connector_mask) > 1) return -EINVAL; diff --git a/target/linux/bcm27xx/patches-6.6/950-0581-drm-vc4-hvs-Print-error-if-we-fail-an-allocation.patch b/target/linux/bcm27xx/patches-6.6/950-0581-drm-vc4-hvs-Print-error-if-we-fail-an-allocation.patch index 3b30ea2f479ae3..eeed520f4b2b8d 100644 --- a/target/linux/bcm27xx/patches-6.6/950-0581-drm-vc4-hvs-Print-error-if-we-fail-an-allocation.patch +++ b/target/linux/bcm27xx/patches-6.6/950-0581-drm-vc4-hvs-Print-error-if-we-fail-an-allocation.patch @@ -19,7 +19,7 @@ Signed-off-by: Maxime Ripard --- a/drivers/gpu/drm/vc4/vc4_hvs.c +++ b/drivers/gpu/drm/vc4/vc4_hvs.c -@@ -441,6 +441,8 @@ vc4_hvs_alloc_dlist_entry(struct vc4_hvs +@@ -446,6 +446,8 @@ vc4_hvs_alloc_dlist_entry(struct vc4_hvs unsigned int channel, size_t dlist_count) { @@ -28,7 +28,7 @@ Signed-off-by: Maxime Ripard struct vc4_hvs_dlist_allocation *alloc; unsigned long flags; int ret; -@@ -458,8 +460,10 @@ vc4_hvs_alloc_dlist_entry(struct vc4_hvs +@@ -463,8 +465,10 @@ vc4_hvs_alloc_dlist_entry(struct vc4_hvs ret = drm_mm_insert_node(&hvs->dlist_mm, &alloc->mm_node, dlist_count); spin_unlock_irqrestore(&hvs->mm_lock, flags); diff --git a/target/linux/bcm27xx/patches-6.6/950-0585-drm-vc4-Introduce-generation-number-enum.patch b/target/linux/bcm27xx/patches-6.6/950-0585-drm-vc4-Introduce-generation-number-enum.patch index 0e810a1f4e11ac..8372ae23fec77d 100644 --- a/target/linux/bcm27xx/patches-6.6/950-0585-drm-vc4-Introduce-generation-number-enum.patch +++ b/target/linux/bcm27xx/patches-6.6/950-0585-drm-vc4-Introduce-generation-number-enum.patch @@ -22,7 +22,7 @@ Signed-off-by: Maxime Ripard drivers/gpu/drm/vc4/vc4_drv.h | 7 ++- drivers/gpu/drm/vc4/vc4_gem.c | 24 +++++------ drivers/gpu/drm/vc4/vc4_hdmi.c | 2 +- - drivers/gpu/drm/vc4/vc4_hvs.c | 50 ++++++++++++---------- + drivers/gpu/drm/vc4/vc4_hvs.c | 52 ++++++++++++---------- drivers/gpu/drm/vc4/vc4_irq.c | 10 ++--- drivers/gpu/drm/vc4/vc4_kms.c | 14 +++--- drivers/gpu/drm/vc4/vc4_perfmon.c | 20 ++++----- @@ -31,7 +31,7 @@ Signed-off-by: Maxime Ripard drivers/gpu/drm/vc4/vc4_v3d.c | 10 ++--- drivers/gpu/drm/vc4/vc4_validate.c | 8 ++-- drivers/gpu/drm/vc4/vc4_validate_shaders.c | 2 +- - 16 files changed, 126 insertions(+), 111 deletions(-) + 16 files changed, 127 insertions(+), 112 deletions(-) --- a/drivers/gpu/drm/vc4/tests/vc4_mock.c +++ b/drivers/gpu/drm/vc4/tests/vc4_mock.c @@ -470,7 +470,7 @@ Signed-off-by: Maxime Ripard switch (args->madv) { --- a/drivers/gpu/drm/vc4/vc4_hdmi.c +++ b/drivers/gpu/drm/vc4/vc4_hdmi.c -@@ -2586,7 +2586,7 @@ static int vc4_hdmi_audio_prepare(struct +@@ -2590,7 +2590,7 @@ static int vc4_hdmi_audio_prepare(struct VC4_HDMI_AUDIO_PACKET_CEA_MASK); /* Set the MAI threshold */ @@ -481,7 +481,16 @@ Signed-off-by: Maxime Ripard VC4_SET_FIELD(0x10, VC4_HD_MAI_THR_PANICLOW) | --- a/drivers/gpu/drm/vc4/vc4_hvs.c +++ b/drivers/gpu/drm/vc4/vc4_hvs.c -@@ -416,7 +416,7 @@ static void vc4_hvs_irq_enable_eof(const +@@ -303,7 +303,7 @@ static void vc4_hvs_lut_load(struct vc4_ + if (!drm_dev_enter(drm, &idx)) + return; + +- if (hvs->vc4->is_vc5) ++ if (hvs->vc4->gen == VC4_GEN_5) + return; + + /* The LUT memory is laid out with each HVS channel in order, +@@ -421,7 +421,7 @@ static void vc4_hvs_irq_enable_eof(const unsigned int channel) { struct vc4_dev *vc4 = hvs->vc4; @@ -490,7 +499,7 @@ Signed-off-by: Maxime Ripard SCALER5_DISPCTRL_DSPEIEOF(channel) : SCALER_DISPCTRL_DSPEIEOF(channel); -@@ -428,7 +428,7 @@ static void vc4_hvs_irq_clear_eof(const +@@ -433,7 +433,7 @@ static void vc4_hvs_irq_clear_eof(const unsigned int channel) { struct vc4_dev *vc4 = hvs->vc4; @@ -499,7 +508,7 @@ Signed-off-by: Maxime Ripard SCALER5_DISPCTRL_DSPEIEOF(channel) : SCALER_DISPCTRL_DSPEIEOF(channel); -@@ -620,7 +620,7 @@ int vc4_hvs_get_fifo_from_output(struct +@@ -625,7 +625,7 @@ int vc4_hvs_get_fifo_from_output(struct u32 reg; int ret; @@ -508,7 +517,7 @@ Signed-off-by: Maxime Ripard return output; /* -@@ -701,7 +701,7 @@ static int vc4_hvs_init_channel(struct v +@@ -706,7 +706,7 @@ static int vc4_hvs_init_channel(struct v dispctrl = SCALER_DISPCTRLX_ENABLE; dispbkgndx = HVS_READ(SCALER_DISPBKGNDX(chan)); @@ -517,7 +526,7 @@ Signed-off-by: Maxime Ripard dispctrl |= VC4_SET_FIELD(mode->hdisplay, SCALER_DISPCTRLX_WIDTH) | VC4_SET_FIELD(mode->vdisplay, -@@ -732,7 +732,7 @@ static int vc4_hvs_init_channel(struct v +@@ -737,7 +737,7 @@ static int vc4_hvs_init_channel(struct v /* Reload the LUT, since the SRAMs would have been disabled if * all CRTCs had SCALER_DISPBKGND_GAMMA unset at once. */ @@ -526,7 +535,7 @@ Signed-off-by: Maxime Ripard vc4_hvs_lut_load(hvs, vc4_crtc); else vc5_hvs_lut_load(hvs, vc4_crtc); -@@ -782,7 +782,7 @@ static int vc4_hvs_gamma_check(struct dr +@@ -785,7 +785,7 @@ static int vc4_hvs_gamma_check(struct dr struct drm_device *dev = crtc->dev; struct vc4_dev *vc4 = to_vc4_dev(dev); @@ -535,7 +544,7 @@ Signed-off-by: Maxime Ripard return 0; if (!crtc_state->color_mgmt_changed) -@@ -1036,7 +1036,7 @@ void vc4_hvs_atomic_flush(struct drm_crt +@@ -1039,7 +1039,7 @@ void vc4_hvs_atomic_flush(struct drm_crt u32 dispbkgndx = HVS_READ(SCALER_DISPBKGNDX(channel)); if (crtc->state->gamma_lut) { @@ -544,7 +553,7 @@ Signed-off-by: Maxime Ripard vc4_hvs_update_gamma_lut(hvs, vc4_crtc); dispbkgndx |= SCALER_DISPBKGND_GAMMA; } else { -@@ -1053,7 +1053,7 @@ void vc4_hvs_atomic_flush(struct drm_crt +@@ -1056,7 +1056,7 @@ void vc4_hvs_atomic_flush(struct drm_crt * should already be disabling/enabling the pipeline * when gamma changes. */ @@ -553,7 +562,7 @@ Signed-off-by: Maxime Ripard dispbkgndx &= ~SCALER_DISPBKGND_GAMMA; } HVS_WRITE(SCALER_DISPBKGNDX(channel), dispbkgndx); -@@ -1069,7 +1069,8 @@ void vc4_hvs_atomic_flush(struct drm_crt +@@ -1073,7 +1073,8 @@ exit: void vc4_hvs_mask_underrun(struct vc4_hvs *hvs, int channel) { @@ -563,7 +572,7 @@ Signed-off-by: Maxime Ripard u32 dispctrl; int idx; -@@ -1077,8 +1078,9 @@ void vc4_hvs_mask_underrun(struct vc4_hv +@@ -1081,8 +1082,9 @@ void vc4_hvs_mask_underrun(struct vc4_hv return; dispctrl = HVS_READ(SCALER_DISPCTRL); @@ -575,7 +584,7 @@ Signed-off-by: Maxime Ripard HVS_WRITE(SCALER_DISPCTRL, dispctrl); -@@ -1087,7 +1089,8 @@ void vc4_hvs_mask_underrun(struct vc4_hv +@@ -1091,7 +1093,8 @@ void vc4_hvs_mask_underrun(struct vc4_hv void vc4_hvs_unmask_underrun(struct vc4_hvs *hvs, int channel) { @@ -585,7 +594,7 @@ Signed-off-by: Maxime Ripard u32 dispctrl; int idx; -@@ -1095,8 +1098,9 @@ void vc4_hvs_unmask_underrun(struct vc4_ +@@ -1099,8 +1102,9 @@ void vc4_hvs_unmask_underrun(struct vc4_ return; dispctrl = HVS_READ(SCALER_DISPCTRL); @@ -597,7 +606,7 @@ Signed-off-by: Maxime Ripard HVS_WRITE(SCALER_DISPSTAT, SCALER_DISPSTAT_EUFLOW(channel)); -@@ -1139,8 +1143,10 @@ static irqreturn_t vc4_hvs_irq_handler(i +@@ -1143,8 +1147,10 @@ static irqreturn_t vc4_hvs_irq_handler(i control = HVS_READ(SCALER_DISPCTRL); for (channel = 0; channel < SCALER_CHANNELS_COUNT; channel++) { @@ -610,7 +619,7 @@ Signed-off-by: Maxime Ripard /* Interrupt masking is not always honored, so check it here. */ if (status & SCALER_DISPSTAT_EUFLOW(channel) && control & dspeislur) { -@@ -1176,7 +1182,7 @@ int vc4_hvs_debugfs_init(struct drm_mino +@@ -1180,7 +1186,7 @@ int vc4_hvs_debugfs_init(struct drm_mino if (!vc4->hvs) return -ENODEV; @@ -619,7 +628,7 @@ Signed-off-by: Maxime Ripard debugfs_create_bool("hvs_load_tracker", S_IRUGO | S_IWUSR, minor->debugfs_root, &vc4->load_tracker_enabled); -@@ -1225,7 +1231,7 @@ struct vc4_hvs *__vc4_hvs_alloc(struct v +@@ -1230,7 +1236,7 @@ struct vc4_hvs *__vc4_hvs_alloc(struct v * between planes when they don't overlap on the screen, but * for now we just allocate globally. */ @@ -628,7 +637,7 @@ Signed-off-by: Maxime Ripard /* 48k words of 2x12-bit pixels */ drm_mm_init(&hvs->lbm_mm, 0, 48 * 1024); else -@@ -1259,7 +1265,7 @@ static int vc4_hvs_bind(struct device *d +@@ -1264,7 +1270,7 @@ static int vc4_hvs_bind(struct device *d hvs->regset.regs = hvs_regs; hvs->regset.nregs = ARRAY_SIZE(hvs_regs); @@ -637,7 +646,7 @@ Signed-off-by: Maxime Ripard struct rpi_firmware *firmware; struct device_node *node; unsigned int max_rate; -@@ -1297,7 +1303,7 @@ static int vc4_hvs_bind(struct device *d +@@ -1302,7 +1308,7 @@ static int vc4_hvs_bind(struct device *d } } @@ -646,7 +655,7 @@ Signed-off-by: Maxime Ripard hvs->dlist = hvs->regs + SCALER_DLIST_START; else hvs->dlist = hvs->regs + SCALER5_DLIST_START; -@@ -1338,7 +1344,7 @@ static int vc4_hvs_bind(struct device *d +@@ -1343,7 +1349,7 @@ static int vc4_hvs_bind(struct device *d SCALER_DISPCTRL_DISPEIRQ(1) | SCALER_DISPCTRL_DISPEIRQ(2); @@ -655,7 +664,7 @@ Signed-off-by: Maxime Ripard dispctrl &= ~(SCALER_DISPCTRL_DMAEIRQ | SCALER_DISPCTRL_SLVWREIRQ | SCALER_DISPCTRL_SLVRDEIRQ | -@@ -1393,7 +1399,7 @@ static int vc4_hvs_bind(struct device *d +@@ -1398,7 +1404,7 @@ static int vc4_hvs_bind(struct device *d /* Recompute Composite Output Buffer (COB) allocations for the displays */ diff --git a/target/linux/bcm27xx/patches-6.6/950-0587-drm-vc4-hvs-Use-switch-statement-to-simplify-vc4_hvs.patch b/target/linux/bcm27xx/patches-6.6/950-0587-drm-vc4-hvs-Use-switch-statement-to-simplify-vc4_hvs.patch index e07e120ed098a3..db59ab5d5b4df7 100644 --- a/target/linux/bcm27xx/patches-6.6/950-0587-drm-vc4-hvs-Use-switch-statement-to-simplify-vc4_hvs.patch +++ b/target/linux/bcm27xx/patches-6.6/950-0587-drm-vc4-hvs-Use-switch-statement-to-simplify-vc4_hvs.patch @@ -14,7 +14,7 @@ Signed-off-by: Maxime Ripard --- a/drivers/gpu/drm/vc4/vc4_hvs.c +++ b/drivers/gpu/drm/vc4/vc4_hvs.c -@@ -620,57 +620,63 @@ int vc4_hvs_get_fifo_from_output(struct +@@ -625,57 +625,63 @@ int vc4_hvs_get_fifo_from_output(struct u32 reg; int ret; diff --git a/target/linux/bcm27xx/patches-6.6/950-0588-drm-vc4-hvs-Use-switch-statement-to-simplify-enablin.patch b/target/linux/bcm27xx/patches-6.6/950-0588-drm-vc4-hvs-Use-switch-statement-to-simplify-enablin.patch index 16810d5035d61f..0875383a0280fc 100644 --- a/target/linux/bcm27xx/patches-6.6/950-0588-drm-vc4-hvs-Use-switch-statement-to-simplify-enablin.patch +++ b/target/linux/bcm27xx/patches-6.6/950-0588-drm-vc4-hvs-Use-switch-statement-to-simplify-enablin.patch @@ -15,7 +15,7 @@ Signed-off-by: Maxime Ripard --- a/drivers/gpu/drm/vc4/vc4_hvs.c +++ b/drivers/gpu/drm/vc4/vc4_hvs.c -@@ -416,24 +416,46 @@ static void vc4_hvs_irq_enable_eof(const +@@ -421,24 +421,46 @@ static void vc4_hvs_irq_enable_eof(const unsigned int channel) { struct vc4_dev *vc4 = hvs->vc4; diff --git a/target/linux/bcm27xx/patches-6.6/950-0589-drm-vc4-hvs-Test-if-the-EOF-interrupts-are-enabled.patch b/target/linux/bcm27xx/patches-6.6/950-0589-drm-vc4-hvs-Test-if-the-EOF-interrupts-are-enabled.patch index c16b1c1ca79c27..d8d2037350de02 100644 --- a/target/linux/bcm27xx/patches-6.6/950-0589-drm-vc4-hvs-Test-if-the-EOF-interrupts-are-enabled.patch +++ b/target/linux/bcm27xx/patches-6.6/950-0589-drm-vc4-hvs-Test-if-the-EOF-interrupts-are-enabled.patch @@ -32,7 +32,7 @@ Signed-off-by: Maxime Ripard struct vc4_hvs { struct vc4_dev *vc4; struct platform_device *pdev; -@@ -327,6 +329,10 @@ struct vc4_hvs { +@@ -328,6 +330,10 @@ struct vc4_hvs { struct clk *core_clk; @@ -43,7 +43,7 @@ Signed-off-by: Maxime Ripard unsigned long max_core_rate; /* Memory manager for CRTCs to allocate space in the display -@@ -359,8 +365,6 @@ struct vc4_hvs { +@@ -360,8 +366,6 @@ struct vc4_hvs { bool vc5_hdmi_enable_4096by2160; }; @@ -54,7 +54,7 @@ Signed-off-by: Maxime Ripard unsigned long core_clock_rate; --- a/drivers/gpu/drm/vc4/vc4_hvs.c +++ b/drivers/gpu/drm/vc4/vc4_hvs.c -@@ -412,11 +412,14 @@ static void vc5_hvs_update_gamma_lut(str +@@ -417,11 +417,14 @@ static void vc5_hvs_update_gamma_lut(str vc5_hvs_lut_load(hvs, vc4_crtc); } @@ -70,7 +70,7 @@ Signed-off-by: Maxime Ripard switch (vc4->gen) { case VC4_GEN_4: HVS_WRITE(SCALER_DISPCTRL, -@@ -433,13 +436,18 @@ static void vc4_hvs_irq_enable_eof(const +@@ -438,13 +441,18 @@ static void vc4_hvs_irq_enable_eof(const default: break; } @@ -90,7 +90,7 @@ Signed-off-by: Maxime Ripard switch (vc4->gen) { case VC4_GEN_4: HVS_WRITE(SCALER_DISPCTRL, -@@ -456,6 +464,8 @@ static void vc4_hvs_irq_clear_eof(const +@@ -461,6 +469,8 @@ static void vc4_hvs_irq_clear_eof(const default: break; } diff --git a/target/linux/bcm27xx/patches-6.6/950-0590-drm-vc4-hvs-Create-hw_init-function.patch b/target/linux/bcm27xx/patches-6.6/950-0590-drm-vc4-hvs-Create-hw_init-function.patch index bd0b8903695d37..7ddac05734135a 100644 --- a/target/linux/bcm27xx/patches-6.6/950-0590-drm-vc4-hvs-Create-hw_init-function.patch +++ b/target/linux/bcm27xx/patches-6.6/950-0590-drm-vc4-hvs-Create-hw_init-function.patch @@ -16,7 +16,7 @@ Signed-off-by: Maxime Ripard --- a/drivers/gpu/drm/vc4/vc4_hvs.c +++ b/drivers/gpu/drm/vc4/vc4_hvs.c -@@ -1281,79 +1281,10 @@ struct vc4_hvs *__vc4_hvs_alloc(struct v +@@ -1286,79 +1286,10 @@ struct vc4_hvs *__vc4_hvs_alloc(struct v return hvs; } @@ -99,7 +99,7 @@ Signed-off-by: Maxime Ripard reg = HVS_READ(SCALER_DISPECTRL); reg &= ~SCALER_DISPECTRL_DSP2_MUX_MASK; -@@ -1435,6 +1366,86 @@ static int vc4_hvs_bind(struct device *d +@@ -1440,6 +1371,86 @@ static int vc4_hvs_bind(struct device *d HVS_WRITE(SCALER_DISPCTRL, dispctrl); diff --git a/target/linux/bcm27xx/patches-6.6/950-0591-drm-vc4-hvs-Create-cob_init-function.patch b/target/linux/bcm27xx/patches-6.6/950-0591-drm-vc4-hvs-Create-cob_init-function.patch index 157a474ce55c6a..6add44807baad2 100644 --- a/target/linux/bcm27xx/patches-6.6/950-0591-drm-vc4-hvs-Create-cob_init-function.patch +++ b/target/linux/bcm27xx/patches-6.6/950-0591-drm-vc4-hvs-Create-cob_init-function.patch @@ -16,7 +16,7 @@ Signed-off-by: Maxime Ripard --- a/drivers/gpu/drm/vc4/vc4_hvs.c +++ b/drivers/gpu/drm/vc4/vc4_hvs.c -@@ -1369,6 +1369,77 @@ static int vc4_hvs_hw_init(struct vc4_hv +@@ -1374,6 +1374,77 @@ static int vc4_hvs_hw_init(struct vc4_hv return 0; } @@ -94,7 +94,7 @@ Signed-off-by: Maxime Ripard static int vc4_hvs_bind(struct device *dev, struct device *master, void *data) { struct platform_device *pdev = to_platform_device(dev); -@@ -1376,7 +1447,6 @@ static int vc4_hvs_bind(struct device *d +@@ -1381,7 +1452,6 @@ static int vc4_hvs_bind(struct device *d struct vc4_dev *vc4 = to_vc4_dev(drm); struct vc4_hvs *hvs = NULL; int ret; @@ -102,7 +102,7 @@ Signed-off-by: Maxime Ripard hvs = __vc4_hvs_alloc(vc4, NULL); if (IS_ERR(hvs)) -@@ -1446,59 +1516,9 @@ static int vc4_hvs_bind(struct device *d +@@ -1451,59 +1521,9 @@ static int vc4_hvs_bind(struct device *d if (ret) return ret; diff --git a/target/linux/bcm27xx/patches-6.6/950-0592-drm-vc4-hvs-Rename-hvs_regs-list.patch b/target/linux/bcm27xx/patches-6.6/950-0592-drm-vc4-hvs-Rename-hvs_regs-list.patch index 6719a445223f75..f354f6acd7f0f8 100644 --- a/target/linux/bcm27xx/patches-6.6/950-0592-drm-vc4-hvs-Rename-hvs_regs-list.patch +++ b/target/linux/bcm27xx/patches-6.6/950-0592-drm-vc4-hvs-Rename-hvs_regs-list.patch @@ -25,7 +25,7 @@ Signed-off-by: Maxime Ripard VC4_REG32(SCALER_DISPCTRL), VC4_REG32(SCALER_DISPSTAT), VC4_REG32(SCALER_DISPID), -@@ -1457,8 +1457,8 @@ static int vc4_hvs_bind(struct device *d +@@ -1462,8 +1462,8 @@ static int vc4_hvs_bind(struct device *d return PTR_ERR(hvs->regs); hvs->regset.base = hvs->regs; diff --git a/target/linux/bcm27xx/patches-6.6/950-0593-drm-vc4-plane-Change-ptr0_offset-to-an-array.patch b/target/linux/bcm27xx/patches-6.6/950-0593-drm-vc4-plane-Change-ptr0_offset-to-an-array.patch index bc72a950217145..4fba060928c598 100644 --- a/target/linux/bcm27xx/patches-6.6/950-0593-drm-vc4-plane-Change-ptr0_offset-to-an-array.patch +++ b/target/linux/bcm27xx/patches-6.6/950-0593-drm-vc4-plane-Change-ptr0_offset-to-an-array.patch @@ -25,7 +25,7 @@ Signed-off-by: Maxime Ripard #include #include #include -@@ -410,7 +411,7 @@ struct vc4_plane_state { +@@ -411,7 +412,7 @@ struct vc4_plane_state { */ u32 pos0_offset; u32 pos2_offset; diff --git a/target/linux/bcm27xx/patches-6.6/950-0595-drm-vc4-hvs-Change-prototype-of-__vc4_hvs_alloc-to-p.patch b/target/linux/bcm27xx/patches-6.6/950-0595-drm-vc4-hvs-Change-prototype-of-__vc4_hvs_alloc-to-p.patch index 90f5d8a9b226af..36c4010b7e9425 100644 --- a/target/linux/bcm27xx/patches-6.6/950-0595-drm-vc4-hvs-Change-prototype-of-__vc4_hvs_alloc-to-p.patch +++ b/target/linux/bcm27xx/patches-6.6/950-0595-drm-vc4-hvs-Change-prototype-of-__vc4_hvs_alloc-to-p.patch @@ -36,7 +36,7 @@ Signed-off-by: Maxime Ripard drm = &vc4->base; --- a/drivers/gpu/drm/vc4/vc4_drv.h +++ b/drivers/gpu/drm/vc4/vc4_drv.h -@@ -1047,7 +1047,9 @@ void vc4_irq_reset(struct drm_device *de +@@ -1048,7 +1048,9 @@ void vc4_irq_reset(struct drm_device *de /* vc4_hvs.c */ extern struct platform_driver vc4_hvs_driver; @@ -49,7 +49,7 @@ Signed-off-by: Maxime Ripard u8 vc4_hvs_get_fifo_frame_count(struct vc4_hvs *hvs, unsigned int fifo); --- a/drivers/gpu/drm/vc4/vc4_hvs.c +++ b/drivers/gpu/drm/vc4/vc4_hvs.c -@@ -1238,7 +1238,9 @@ int vc4_hvs_debugfs_init(struct drm_mino +@@ -1242,7 +1242,9 @@ int vc4_hvs_debugfs_init(struct drm_mino return 0; } @@ -60,7 +60,7 @@ Signed-off-by: Maxime Ripard { struct drm_device *drm = &vc4->base; struct vc4_hvs *hvs; -@@ -1248,6 +1250,7 @@ struct vc4_hvs *__vc4_hvs_alloc(struct v +@@ -1252,6 +1254,7 @@ struct vc4_hvs *__vc4_hvs_alloc(struct v return ERR_PTR(-ENOMEM); hvs->vc4 = vc4; @@ -68,7 +68,7 @@ Signed-off-by: Maxime Ripard hvs->pdev = pdev; spin_lock_init(&hvs->mm_lock); -@@ -1446,16 +1449,17 @@ static int vc4_hvs_bind(struct device *d +@@ -1451,16 +1454,17 @@ static int vc4_hvs_bind(struct device *d struct drm_device *drm = dev_get_drvdata(master); struct vc4_dev *vc4 = to_vc4_dev(drm); struct vc4_hvs *hvs = NULL; diff --git a/target/linux/bcm27xx/patches-6.6/950-0597-drm-vc4-hdmi-Avoid-hang-with-debug-registers-when-su.patch b/target/linux/bcm27xx/patches-6.6/950-0597-drm-vc4-hdmi-Avoid-hang-with-debug-registers-when-su.patch deleted file mode 100644 index 9f58504abb1de1..00000000000000 --- a/target/linux/bcm27xx/patches-6.6/950-0597-drm-vc4-hdmi-Avoid-hang-with-debug-registers-when-su.patch +++ /dev/null @@ -1,40 +0,0 @@ -From db41506f785ad84895a31b01e8bd7c07bceabb3d Mon Sep 17 00:00:00 2001 -From: Dom Cobley -Date: Tue, 5 Sep 2023 19:38:24 +0100 -Subject: [PATCH 0597/1085] drm/vc4: hdmi: Avoid hang with debug registers when - suspended - -Trying to read /sys/kernel/debug/dri/1/hdmi1_regs -when the hdmi is disconnected results in a fatal system hang. - -This is due to the pm suspend code disabling the dvp clock. -That is just a gate of the 108MHz clock in DVP_HT_RPI_MISC_CONFIG, -which results in accesses hanging AXI bus. - -Protect against this. - -Signed-off-by: Dom Cobley ---- - drivers/gpu/drm/vc4/vc4_hdmi.c | 4 ++++ - 1 file changed, 4 insertions(+) - ---- a/drivers/gpu/drm/vc4/vc4_hdmi.c -+++ b/drivers/gpu/drm/vc4/vc4_hdmi.c -@@ -185,6 +185,8 @@ static int vc4_hdmi_debugfs_regs(struct - if (!drm_dev_enter(drm, &idx)) - return -ENODEV; - -+ WARN_ON(pm_runtime_resume_and_get(&vc4_hdmi->pdev->dev)); -+ - drm_print_regset32(&p, &vc4_hdmi->hdmi_regset); - drm_print_regset32(&p, &vc4_hdmi->hd_regset); - drm_print_regset32(&p, &vc4_hdmi->cec_regset); -@@ -194,6 +196,8 @@ static int vc4_hdmi_debugfs_regs(struct - drm_print_regset32(&p, &vc4_hdmi->ram_regset); - drm_print_regset32(&p, &vc4_hdmi->rm_regset); - -+ pm_runtime_put(&vc4_hdmi->pdev->dev); -+ - drm_dev_exit(idx); - - return 0; diff --git a/target/linux/bcm27xx/patches-6.6/950-0598-drm-vc4-Move-the-buffer-offset-out-of-the-vc4_plane_.patch b/target/linux/bcm27xx/patches-6.6/950-0598-drm-vc4-Move-the-buffer-offset-out-of-the-vc4_plane_.patch index ae069adc59381a..7a63bc65b50bf1 100644 --- a/target/linux/bcm27xx/patches-6.6/950-0598-drm-vc4-Move-the-buffer-offset-out-of-the-vc4_plane_.patch +++ b/target/linux/bcm27xx/patches-6.6/950-0598-drm-vc4-Move-the-buffer-offset-out-of-the-vc4_plane_.patch @@ -23,7 +23,7 @@ Signed-off-by: Dave Stevenson --- a/drivers/gpu/drm/vc4/vc4_drv.h +++ b/drivers/gpu/drm/vc4/vc4_drv.h -@@ -431,11 +431,6 @@ struct vc4_plane_state { +@@ -432,11 +432,6 @@ struct vc4_plane_state { bool is_unity; bool is_yuv; diff --git a/target/linux/bcm27xx/patches-6.6/950-0599-drm-vc4-Fix-dlist-debug-not-resetting-the-next-entry.patch b/target/linux/bcm27xx/patches-6.6/950-0599-drm-vc4-Fix-dlist-debug-not-resetting-the-next-entry.patch deleted file mode 100644 index bfaecc53caaf33..00000000000000 --- a/target/linux/bcm27xx/patches-6.6/950-0599-drm-vc4-Fix-dlist-debug-not-resetting-the-next-entry.patch +++ /dev/null @@ -1,34 +0,0 @@ -From d64998e5fc5894eb37f142b7259fa3bec091abbc Mon Sep 17 00:00:00 2001 -From: Dave Stevenson -Date: Thu, 24 Aug 2023 15:36:21 +0100 -Subject: [PATCH 0599/1085] drm/vc4: Fix dlist debug not resetting the next - entry pointer - -The debug function to display the dlists didn't reset next_entry_start -when starting each display, so resulting in not stopping the -list at the correct place. - -Signed-off-by: Dave Stevenson ---- - drivers/gpu/drm/vc4/vc4_hvs.c | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - ---- a/drivers/gpu/drm/vc4/vc4_hvs.c -+++ b/drivers/gpu/drm/vc4/vc4_hvs.c -@@ -110,7 +110,7 @@ static int vc4_hvs_debugfs_dlist(struct - struct vc4_dev *vc4 = to_vc4_dev(dev); - struct vc4_hvs *hvs = vc4->hvs; - struct drm_printer p = drm_seq_file_printer(m); -- unsigned int next_entry_start = 0; -+ unsigned int next_entry_start; - unsigned int i, j; - u32 dlist_word, dispstat; - -@@ -124,6 +124,7 @@ static int vc4_hvs_debugfs_dlist(struct - } - - drm_printf(&p, "HVS chan %u:\n", i); -+ next_entry_start = 0; - - for (j = HVS_READ(SCALER_DISPLISTX(i)); j < 256; j++) { - dlist_word = readl((u32 __iomem *)vc4->hvs->dlist + j); diff --git a/target/linux/bcm27xx/patches-6.6/950-0600-drm-vc4-Remove-incorrect-limit-from-hvs_dlist-debugf.patch b/target/linux/bcm27xx/patches-6.6/950-0600-drm-vc4-Remove-incorrect-limit-from-hvs_dlist-debugf.patch deleted file mode 100644 index a104d30b5a637a..00000000000000 --- a/target/linux/bcm27xx/patches-6.6/950-0600-drm-vc4-Remove-incorrect-limit-from-hvs_dlist-debugf.patch +++ /dev/null @@ -1,57 +0,0 @@ -From 480184600be75fd78dcff1502092901d32530cc6 Mon Sep 17 00:00:00 2001 -From: Dave Stevenson -Date: Fri, 1 Sep 2023 13:45:08 +0100 -Subject: [PATCH 0600/1085] drm: vc4: Remove incorrect limit from hvs_dlist - debugfs function - -The debugfs function to dump dlists aborted at 256 bytes, -when actually the dlist memory is generally significantly -larger but varies based on SoC. - -We already have the correct limit in __vc4_hvs_alloc, so -store it for use in the debugfs dlist function. - -Signed-off-by: Dave Stevenson ---- - drivers/gpu/drm/vc4/vc4_drv.h | 1 + - drivers/gpu/drm/vc4/vc4_hvs.c | 5 ++++- - 2 files changed, 5 insertions(+), 1 deletion(-) - ---- a/drivers/gpu/drm/vc4/vc4_drv.h -+++ b/drivers/gpu/drm/vc4/vc4_drv.h -@@ -327,6 +327,7 @@ struct vc4_hvs { - struct platform_device *pdev; - void __iomem *regs; - u32 __iomem *dlist; -+ unsigned int dlist_mem_size; - - struct clk *core_clk; - ---- a/drivers/gpu/drm/vc4/vc4_hvs.c -+++ b/drivers/gpu/drm/vc4/vc4_hvs.c -@@ -110,6 +110,7 @@ static int vc4_hvs_debugfs_dlist(struct - struct vc4_dev *vc4 = to_vc4_dev(dev); - struct vc4_hvs *hvs = vc4->hvs; - struct drm_printer p = drm_seq_file_printer(m); -+ unsigned int dlist_mem_size = hvs->dlist_mem_size; - unsigned int next_entry_start; - unsigned int i, j; - u32 dlist_word, dispstat; -@@ -126,7 +127,7 @@ static int vc4_hvs_debugfs_dlist(struct - drm_printf(&p, "HVS chan %u:\n", i); - next_entry_start = 0; - -- for (j = HVS_READ(SCALER_DISPLISTX(i)); j < 256; j++) { -+ for (j = HVS_READ(SCALER_DISPLISTX(i)); j < dlist_mem_size; j++) { - dlist_word = readl((u32 __iomem *)vc4->hvs->dlist + j); - drm_printf(&p, "dlist: %02d: 0x%08x\n", j, - dlist_word); -@@ -1268,6 +1269,8 @@ struct vc4_hvs *__vc4_hvs_alloc(struct v - HVS_BOOTLOADER_DLIST_END, - (SCALER_DLIST_SIZE >> 2) - HVS_BOOTLOADER_DLIST_END); - -+ hvs->dlist_mem_size = dlist_size; -+ - /* Set up the HVS LBM memory manager. We could have some more - * complicated data structure that allowed reuse of LBM areas - * between planes when they don't overlap on the screen, but diff --git a/target/linux/bcm27xx/patches-6.6/950-0602-drm-vc4-Enable-SCALER_CONTROL-early-in-HVS-init.patch b/target/linux/bcm27xx/patches-6.6/950-0602-drm-vc4-Enable-SCALER_CONTROL-early-in-HVS-init.patch index 56cd010972d09c..62406a268b8f6a 100644 --- a/target/linux/bcm27xx/patches-6.6/950-0602-drm-vc4-Enable-SCALER_CONTROL-early-in-HVS-init.patch +++ b/target/linux/bcm27xx/patches-6.6/950-0602-drm-vc4-Enable-SCALER_CONTROL-early-in-HVS-init.patch @@ -15,7 +15,7 @@ Signed-off-by: Tim Gover --- a/drivers/gpu/drm/vc4/vc4_hvs.c +++ b/drivers/gpu/drm/vc4/vc4_hvs.c -@@ -1293,6 +1293,10 @@ static int vc4_hvs_hw_init(struct vc4_hv +@@ -1294,6 +1294,10 @@ static int vc4_hvs_hw_init(struct vc4_hv struct vc4_dev *vc4 = hvs->vc4; u32 dispctrl, reg; @@ -26,7 +26,7 @@ Signed-off-by: Tim Gover reg = HVS_READ(SCALER_DISPECTRL); reg &= ~SCALER_DISPECTRL_DSP2_MUX_MASK; HVS_WRITE(SCALER_DISPECTRL, -@@ -1314,8 +1318,6 @@ static int vc4_hvs_hw_init(struct vc4_hv +@@ -1315,8 +1319,6 @@ static int vc4_hvs_hw_init(struct vc4_hv reg | VC4_SET_FIELD(3, SCALER_DISPDITHER_DSP5_MUX)); dispctrl = HVS_READ(SCALER_DISPCTRL); @@ -35,7 +35,7 @@ Signed-off-by: Tim Gover dispctrl |= SCALER_DISPCTRL_DISPEIRQ(0) | SCALER_DISPCTRL_DISPEIRQ(1) | SCALER_DISPCTRL_DISPEIRQ(2); -@@ -1511,6 +1513,10 @@ static int vc4_hvs_bind(struct device *d +@@ -1512,6 +1514,10 @@ static int vc4_hvs_bind(struct device *d else hvs->dlist = hvs->regs + SCALER5_DLIST_START; @@ -46,7 +46,7 @@ Signed-off-by: Tim Gover /* Upload filter kernels. We only have the one for now, so we * keep it around for the lifetime of the driver. */ -@@ -1520,10 +1526,6 @@ static int vc4_hvs_bind(struct device *d +@@ -1521,10 +1527,6 @@ static int vc4_hvs_bind(struct device *d if (ret) return ret; diff --git a/target/linux/bcm27xx/patches-6.6/950-0610-drm-vc4-hvs-Support-BCM2712-HVS.patch b/target/linux/bcm27xx/patches-6.6/950-0610-drm-vc4-hvs-Support-BCM2712-HVS.patch index 6065fc6e86b161..9d19b23d95ab71 100644 --- a/target/linux/bcm27xx/patches-6.6/950-0610-drm-vc4-hvs-Support-BCM2712-HVS.patch +++ b/target/linux/bcm27xx/patches-6.6/950-0610-drm-vc4-hvs-Support-BCM2712-HVS.patch @@ -341,7 +341,7 @@ Signed-off-by: Maxime Ripard static int vc5_hvs_debugfs_gamma(struct seq_file *m, void *data) { struct drm_info_node *node = m->private; -@@ -435,6 +558,10 @@ static void vc4_hvs_irq_enable_eof(struc +@@ -438,6 +561,10 @@ static void vc4_hvs_irq_enable_eof(struc SCALER5_DISPCTRL_DSPEIEOF(channel)); break; @@ -352,7 +352,7 @@ Signed-off-by: Maxime Ripard default: break; } -@@ -463,6 +590,10 @@ static void vc4_hvs_irq_clear_eof(struct +@@ -466,6 +593,10 @@ static void vc4_hvs_irq_clear_eof(struct ~SCALER5_DISPCTRL_DSPEIEOF(channel)); break; @@ -363,7 +363,7 @@ Signed-off-by: Maxime Ripard default: break; } -@@ -622,26 +753,32 @@ static void vc4_hvs_dlist_free_work(stru +@@ -625,26 +756,32 @@ static void vc4_hvs_dlist_free_work(stru u8 vc4_hvs_get_fifo_frame_count(struct vc4_hvs *hvs, unsigned int fifo) { @@ -410,7 +410,7 @@ Signed-off-by: Maxime Ripard } drm_dev_exit(idx); -@@ -708,6 +845,23 @@ int vc4_hvs_get_fifo_from_output(struct +@@ -711,6 +848,23 @@ int vc4_hvs_get_fifo_from_output(struct default: return -EPIPE; } @@ -434,7 +434,7 @@ Signed-off-by: Maxime Ripard } return -EPIPE; -@@ -782,7 +936,41 @@ static int vc4_hvs_init_channel(struct v +@@ -785,7 +939,41 @@ static int vc4_hvs_init_channel(struct v return 0; } @@ -477,7 +477,7 @@ Signed-off-by: Maxime Ripard { struct drm_device *drm = &hvs->vc4->base; int idx; -@@ -813,6 +1001,42 @@ out: +@@ -814,6 +1002,42 @@ out: drm_dev_exit(idx); } @@ -520,7 +520,7 @@ Signed-off-by: Maxime Ripard static int vc4_hvs_gamma_check(struct drm_crtc *crtc, struct drm_atomic_state *state) { -@@ -907,8 +1131,14 @@ static void vc4_hvs_install_dlist(struct +@@ -908,8 +1132,14 @@ static void vc4_hvs_install_dlist(struct return; WARN_ON(!vc4_state->mm); @@ -537,7 +537,7 @@ Signed-off-by: Maxime Ripard drm_dev_exit(idx); } -@@ -965,7 +1195,11 @@ void vc4_hvs_atomic_enable(struct drm_cr +@@ -966,7 +1196,11 @@ void vc4_hvs_atomic_enable(struct drm_cr vc4_hvs_install_dlist(crtc); vc4_hvs_update_dlist(crtc); @@ -550,7 +550,7 @@ Signed-off-by: Maxime Ripard } void vc4_hvs_atomic_disable(struct drm_crtc *crtc, -@@ -1052,13 +1286,28 @@ void vc4_hvs_atomic_flush(struct drm_crt +@@ -1053,13 +1287,28 @@ void vc4_hvs_atomic_flush(struct drm_crt WARN_ON(!vc4_state->mm); WARN_ON_ONCE(dlist_next - dlist_start != vc4_state->mm->mm_node.size); @@ -583,7 +583,7 @@ Signed-off-by: Maxime Ripard /* Only update DISPLIST if the CRTC was already running and is not * being disabled. -@@ -1210,6 +1459,27 @@ static irqreturn_t vc4_hvs_irq_handler(i +@@ -1212,6 +1461,27 @@ static irqreturn_t vc4_hvs_irq_handler(i return irqret; } @@ -611,7 +611,7 @@ Signed-off-by: Maxime Ripard int vc4_hvs_debugfs_init(struct drm_minor *minor) { struct drm_device *drm = minor->dev; -@@ -1231,7 +1501,10 @@ int vc4_hvs_debugfs_init(struct drm_mino +@@ -1233,7 +1503,10 @@ int vc4_hvs_debugfs_init(struct drm_mino NULL); } @@ -623,7 +623,7 @@ Signed-off-by: Maxime Ripard drm_debugfs_add_file(drm, "hvs_underrun", vc4_hvs_debugfs_underrun, NULL); -@@ -1246,6 +1519,9 @@ struct vc4_hvs *__vc4_hvs_alloc(struct v +@@ -1248,6 +1521,9 @@ struct vc4_hvs *__vc4_hvs_alloc(struct v { struct drm_device *drm = &vc4->base; struct vc4_hvs *hvs; @@ -633,7 +633,7 @@ Signed-off-by: Maxime Ripard hvs = drmm_kzalloc(drm, sizeof(*hvs), GFP_KERNEL); if (!hvs) -@@ -1260,14 +1536,39 @@ struct vc4_hvs *__vc4_hvs_alloc(struct v +@@ -1262,27 +1538,87 @@ struct vc4_hvs *__vc4_hvs_alloc(struct v INIT_LIST_HEAD(&hvs->stale_dlist_entries); INIT_WORK(&hvs->free_dlist_work, vc4_hvs_dlist_free_work); @@ -642,9 +642,10 @@ Signed-off-by: Maxime Ripard - * our 16K), since we don't want to scramble the screen when - * transitioning from the firmware's boot setup to runtime. - */ +- hvs->dlist_mem_size = (SCALER_DLIST_SIZE >> 2) - HVS_BOOTLOADER_DLIST_END; - drm_mm_init(&hvs->dlist_mm, - HVS_BOOTLOADER_DLIST_END, -- (SCALER_DLIST_SIZE >> 2) - HVS_BOOTLOADER_DLIST_END); +- hvs->dlist_mem_size); + switch (vc4->gen) { + case VC4_GEN_4: + case VC4_GEN_5: @@ -678,10 +679,11 @@ Signed-off-by: Maxime Ripard + } + + drm_mm_init(&hvs->dlist_mm, dlist_start, dlist_size); ++ ++ hvs->dlist_mem_size = dlist_size; - hvs->dlist_mem_size = dlist_size; - -@@ -1276,12 +1577,46 @@ struct vc4_hvs *__vc4_hvs_alloc(struct v + /* Set up the HVS LBM memory manager. We could have some more + * complicated data structure that allowed reuse of LBM areas * between planes when they don't overlap on the screen, but * for now we just allocate globally. */ @@ -732,7 +734,7 @@ Signed-off-by: Maxime Ripard vc4->hvs = hvs; -@@ -1378,10 +1713,124 @@ static int vc4_hvs_hw_init(struct vc4_hv +@@ -1379,10 +1715,124 @@ static int vc4_hvs_hw_init(struct vc4_hv return 0; } @@ -858,7 +860,7 @@ Signed-off-by: Maxime Ripard /* * Recompute Composite Output Buffer (COB) allocations for the -@@ -1442,6 +1891,31 @@ static int vc4_hvs_cob_init(struct vc4_h +@@ -1443,6 +1893,31 @@ static int vc4_hvs_cob_init(struct vc4_h HVS_WRITE(SCALER_DISPBASE0, reg); break; @@ -890,7 +892,7 @@ Signed-off-by: Maxime Ripard default: return -EINVAL; } -@@ -1467,10 +1941,16 @@ static int vc4_hvs_bind(struct device *d +@@ -1468,10 +1943,16 @@ static int vc4_hvs_bind(struct device *d return PTR_ERR(hvs); hvs->regset.base = hvs->regs; @@ -910,7 +912,7 @@ Signed-off-by: Maxime Ripard struct rpi_firmware *firmware; struct device_node *node; unsigned int max_rate; -@@ -1484,12 +1964,20 @@ static int vc4_hvs_bind(struct device *d +@@ -1485,12 +1966,20 @@ static int vc4_hvs_bind(struct device *d if (!firmware) return -EPROBE_DEFER; @@ -932,7 +934,7 @@ Signed-off-by: Maxime Ripard max_rate = rpi_firmware_clk_get_max_rate(firmware, RPI_FIRMWARE_CORE_CLK_ID); rpi_firmware_put(firmware); -@@ -1506,14 +1994,51 @@ static int vc4_hvs_bind(struct device *d +@@ -1507,14 +1996,51 @@ static int vc4_hvs_bind(struct device *d dev_err(&pdev->dev, "Couldn't enable the core clock\n"); return ret; } @@ -988,7 +990,7 @@ Signed-off-by: Maxime Ripard if (ret) return ret; -@@ -1530,10 +2055,12 @@ static int vc4_hvs_bind(struct device *d +@@ -1531,10 +2057,12 @@ static int vc4_hvs_bind(struct device *d if (ret) return ret; @@ -1005,7 +1007,7 @@ Signed-off-by: Maxime Ripard return 0; } -@@ -1558,6 +2085,7 @@ static void vc4_hvs_unbind(struct device +@@ -1559,6 +2087,7 @@ static void vc4_hvs_unbind(struct device drm_mm_remove_node(node); drm_mm_takedown(&vc4->hvs->lbm_mm); @@ -1013,7 +1015,7 @@ Signed-off-by: Maxime Ripard clk_disable_unprepare(hvs->core_clk); vc4->hvs = NULL; -@@ -1580,6 +2108,7 @@ static void vc4_hvs_dev_remove(struct pl +@@ -1581,6 +2110,7 @@ static void vc4_hvs_dev_remove(struct pl static const struct of_device_id vc4_hvs_dt_match[] = { { .compatible = "brcm,bcm2711-hvs" }, diff --git a/target/linux/bcm27xx/patches-6.6/950-0622-drm-vc4-Add-additional-warn_on.patch b/target/linux/bcm27xx/patches-6.6/950-0622-drm-vc4-Add-additional-warn_on.patch index 2fc6f3d033e065..8dd44970f8b9b9 100644 --- a/target/linux/bcm27xx/patches-6.6/950-0622-drm-vc4-Add-additional-warn_on.patch +++ b/target/linux/bcm27xx/patches-6.6/950-0622-drm-vc4-Add-additional-warn_on.patch @@ -32,7 +32,7 @@ Signed-off-by: Maxime Ripard if (!drm_dev_enter(drm, &idx)) return; -@@ -758,6 +761,8 @@ u8 vc4_hvs_get_fifo_frame_count(struct v +@@ -761,6 +764,8 @@ u8 vc4_hvs_get_fifo_frame_count(struct v u8 field = 0; int idx; @@ -41,7 +41,7 @@ Signed-off-by: Maxime Ripard if (!drm_dev_enter(drm, &idx)) return 0; -@@ -791,6 +796,8 @@ int vc4_hvs_get_fifo_from_output(struct +@@ -794,6 +799,8 @@ int vc4_hvs_get_fifo_from_output(struct u32 reg; int ret; @@ -50,7 +50,7 @@ Signed-off-by: Maxime Ripard switch (vc4->gen) { case VC4_GEN_4: return output; -@@ -880,6 +887,8 @@ static int vc4_hvs_init_channel(struct v +@@ -883,6 +890,8 @@ static int vc4_hvs_init_channel(struct v u32 dispctrl; int idx; @@ -59,7 +59,7 @@ Signed-off-by: Maxime Ripard if (!drm_dev_enter(drm, &idx)) return -ENODEV; -@@ -947,6 +956,8 @@ static int vc6_hvs_init_channel(struct v +@@ -950,6 +959,8 @@ static int vc6_hvs_init_channel(struct v u32 disp_ctrl1; int idx; @@ -68,7 +68,7 @@ Signed-off-by: Maxime Ripard if (!drm_dev_enter(drm, &idx)) return -ENODEV; -@@ -972,9 +983,12 @@ static int vc6_hvs_init_channel(struct v +@@ -975,9 +986,12 @@ static int vc6_hvs_init_channel(struct v static void __vc4_hvs_stop_channel(struct vc4_hvs *hvs, unsigned int chan) { @@ -82,7 +82,7 @@ Signed-off-by: Maxime Ripard if (!drm_dev_enter(drm, &idx)) return; -@@ -1007,6 +1021,8 @@ static void __vc6_hvs_stop_channel(struc +@@ -1008,6 +1022,8 @@ static void __vc6_hvs_stop_channel(struc struct drm_device *drm = &vc4->base; int idx; @@ -91,7 +91,7 @@ Signed-off-by: Maxime Ripard if (!drm_dev_enter(drm, &idx)) return; -@@ -1234,6 +1250,8 @@ void vc4_hvs_atomic_flush(struct drm_crt +@@ -1235,6 +1251,8 @@ void vc4_hvs_atomic_flush(struct drm_crt bool found = false; int idx; @@ -100,7 +100,7 @@ Signed-off-by: Maxime Ripard if (!drm_dev_enter(dev, &idx)) { vc4_crtc_send_vblank(crtc); return; -@@ -1324,6 +1342,8 @@ void vc4_hvs_atomic_flush(struct drm_crt +@@ -1325,6 +1343,8 @@ void vc4_hvs_atomic_flush(struct drm_crt if (crtc->state->color_mgmt_changed) { u32 dispbkgndx = HVS_READ(SCALER_DISPBKGNDX(channel)); @@ -109,7 +109,7 @@ Signed-off-by: Maxime Ripard if (crtc->state->gamma_lut) { if (vc4->gen == VC4_GEN_4) { vc4_hvs_update_gamma_lut(hvs, vc4_crtc); -@@ -1363,6 +1383,8 @@ void vc4_hvs_mask_underrun(struct vc4_hv +@@ -1365,6 +1385,8 @@ void vc4_hvs_mask_underrun(struct vc4_hv u32 dispctrl; int idx; @@ -118,7 +118,7 @@ Signed-off-by: Maxime Ripard if (!drm_dev_enter(drm, &idx)) return; -@@ -1383,6 +1405,8 @@ void vc4_hvs_unmask_underrun(struct vc4_ +@@ -1385,6 +1407,8 @@ void vc4_hvs_unmask_underrun(struct vc4_ u32 dispctrl; int idx; @@ -127,7 +127,7 @@ Signed-off-by: Maxime Ripard if (!drm_dev_enter(drm, &idx)) return; -@@ -1417,6 +1441,8 @@ static irqreturn_t vc4_hvs_irq_handler(i +@@ -1419,6 +1443,8 @@ static irqreturn_t vc4_hvs_irq_handler(i u32 status; u32 dspeislur; @@ -136,7 +136,7 @@ Signed-off-by: Maxime Ripard /* * NOTE: We don't need to protect the register access using * drm_dev_enter() there because the interrupt handler lifetime -@@ -1466,6 +1492,8 @@ static irqreturn_t vc6_hvs_eof_irq_handl +@@ -1468,6 +1494,8 @@ static irqreturn_t vc6_hvs_eof_irq_handl struct vc4_hvs *hvs = vc4->hvs; unsigned int i; diff --git a/target/linux/bcm27xx/patches-6.6/950-0655-vc4-drm-Remove-the-clear-of-SCALER_DISPBKGND_FILL.patch b/target/linux/bcm27xx/patches-6.6/950-0655-vc4-drm-Remove-the-clear-of-SCALER_DISPBKGND_FILL.patch index fa57c12cf62878..5b2ac385c16fdf 100644 --- a/target/linux/bcm27xx/patches-6.6/950-0655-vc4-drm-Remove-the-clear-of-SCALER_DISPBKGND_FILL.patch +++ b/target/linux/bcm27xx/patches-6.6/950-0655-vc4-drm-Remove-the-clear-of-SCALER_DISPBKGND_FILL.patch @@ -25,7 +25,7 @@ Signed-off-by: Dom Cobley --- a/drivers/gpu/drm/vc4/vc4_hvs.c +++ b/drivers/gpu/drm/vc4/vc4_hvs.c -@@ -1304,27 +1304,25 @@ void vc4_hvs_atomic_flush(struct drm_crt +@@ -1305,27 +1305,25 @@ void vc4_hvs_atomic_flush(struct drm_crt WARN_ON(!vc4_state->mm); WARN_ON_ONCE(dlist_next - dlist_start != vc4_state->mm->mm_node.size); diff --git a/target/linux/bcm27xx/patches-6.6/950-0708-drm-vc4-Correct-logic-on-stopping-an-HVS-channel.patch b/target/linux/bcm27xx/patches-6.6/950-0708-drm-vc4-Correct-logic-on-stopping-an-HVS-channel.patch deleted file mode 100644 index 46b5afaa96b7d2..00000000000000 --- a/target/linux/bcm27xx/patches-6.6/950-0708-drm-vc4-Correct-logic-on-stopping-an-HVS-channel.patch +++ /dev/null @@ -1,52 +0,0 @@ -From 48016174777294ea86103946f71e25bb04f647a1 Mon Sep 17 00:00:00 2001 -From: Dave Stevenson -Date: Thu, 26 Oct 2023 17:46:13 +0100 -Subject: [PATCH 0708/1085] drm/vc4: Correct logic on stopping an HVS channel - -When factoring out __vc4_hvs_stop_channel, the logic got inverted from - if (condition) - // stop channel -to - if (condition) - goto out - //stop channel - out: -and also changed the exact register writes used to stop the channel. - -Correct the logic so that the channel is actually stopped, and revert -to the original register writes. - -Fixes: 6d01a106b4c8 ("drm/vc4: crtc: Move HVS init and close to a function") -Signed-off-by: Dave Stevenson ---- - drivers/gpu/drm/vc4/vc4_hvs.c | 10 ++++------ - 1 file changed, 4 insertions(+), 6 deletions(-) - ---- a/drivers/gpu/drm/vc4/vc4_hvs.c -+++ b/drivers/gpu/drm/vc4/vc4_hvs.c -@@ -992,13 +992,11 @@ static void __vc4_hvs_stop_channel(struc - if (!drm_dev_enter(drm, &idx)) - return; - -- if (HVS_READ(SCALER_DISPCTRLX(chan)) & SCALER_DISPCTRLX_ENABLE) -+ if (!(HVS_READ(SCALER_DISPCTRLX(chan)) & SCALER_DISPCTRLX_ENABLE)) - goto out; - -- HVS_WRITE(SCALER_DISPCTRLX(chan), -- HVS_READ(SCALER_DISPCTRLX(chan)) | SCALER_DISPCTRLX_RESET); -- HVS_WRITE(SCALER_DISPCTRLX(chan), -- HVS_READ(SCALER_DISPCTRLX(chan)) & ~SCALER_DISPCTRLX_ENABLE); -+ HVS_WRITE(SCALER_DISPCTRLX(chan), SCALER_DISPCTRLX_RESET); -+ HVS_WRITE(SCALER_DISPCTRLX(chan), 0); - - /* Once we leave, the scaler should be disabled and its fifo empty. */ - WARN_ON_ONCE(HVS_READ(SCALER_DISPCTRLX(chan)) & SCALER_DISPCTRLX_RESET); -@@ -1026,7 +1024,7 @@ static void __vc6_hvs_stop_channel(struc - if (!drm_dev_enter(drm, &idx)) - return; - -- if (HVS_READ(SCALER6_DISPX_CTRL0(chan)) & SCALER6_DISPX_CTRL0_ENB) -+ if (!(HVS_READ(SCALER6_DISPX_CTRL0(chan)) & SCALER6_DISPX_CTRL0_ENB)) - goto out; - - HVS_WRITE(SCALER6_DISPX_CTRL0(chan), diff --git a/target/linux/bcm27xx/patches-6.6/950-0709-drm-vc4-Drop-WARN-for-HVS-FIFOs-not-being-empty.patch b/target/linux/bcm27xx/patches-6.6/950-0709-drm-vc4-Drop-WARN-for-HVS-FIFOs-not-being-empty.patch index 0d4f6a4ea905b6..d43ed3f7d76b31 100644 --- a/target/linux/bcm27xx/patches-6.6/950-0709-drm-vc4-Drop-WARN-for-HVS-FIFOs-not-being-empty.patch +++ b/target/linux/bcm27xx/patches-6.6/950-0709-drm-vc4-Drop-WARN-for-HVS-FIFOs-not-being-empty.patch @@ -17,7 +17,7 @@ Signed-off-by: Dave Stevenson --- a/drivers/gpu/drm/vc4/vc4_hvs.c +++ b/drivers/gpu/drm/vc4/vc4_hvs.c -@@ -1005,10 +1005,6 @@ static void __vc4_hvs_stop_channel(struc +@@ -1008,10 +1008,6 @@ static void __vc4_hvs_stop_channel(struc SCALER_DISPSTATX_MODE) != SCALER_DISPSTATX_MODE_DISABLED); diff --git a/target/linux/bcm27xx/patches-6.6/950-0710-drm-vc4-Free-all-stale-dlists-if-channel-is-disabled.patch b/target/linux/bcm27xx/patches-6.6/950-0710-drm-vc4-Free-all-stale-dlists-if-channel-is-disabled.patch index 53f2684f3be612..6651fac56e1df9 100644 --- a/target/linux/bcm27xx/patches-6.6/950-0710-drm-vc4-Free-all-stale-dlists-if-channel-is-disabled.patch +++ b/target/linux/bcm27xx/patches-6.6/950-0710-drm-vc4-Free-all-stale-dlists-if-channel-is-disabled.patch @@ -36,7 +36,7 @@ Signed-off-by: Dave Stevenson * someone was waiting it. --- a/drivers/gpu/drm/vc4/vc4_hvs.c +++ b/drivers/gpu/drm/vc4/vc4_hvs.c -@@ -697,7 +697,8 @@ static void vc4_hvs_schedule_dlist_sweep +@@ -700,7 +700,8 @@ static void vc4_hvs_schedule_dlist_sweep if (!list_empty(&hvs->stale_dlist_entries)) queue_work(system_unbound_wq, &hvs->free_dlist_work); @@ -46,7 +46,7 @@ Signed-off-by: Dave Stevenson spin_unlock_irqrestore(&hvs->mm_lock, flags); } -@@ -712,6 +713,27 @@ static bool vc4_hvs_frcnt_lte(u8 cnt1, u +@@ -715,6 +716,27 @@ static bool vc4_hvs_frcnt_lte(u8 cnt1, u return (s8)((cnt1 << 2) - (cnt2 << 2)) <= 0; } @@ -74,7 +74,7 @@ Signed-off-by: Dave Stevenson /* * Some atomic commits (legacy cursor updates, mostly) will not wait for * the next vblank and will just return once the commit has been pushed -@@ -746,7 +768,8 @@ static void vc4_hvs_dlist_free_work(stru +@@ -749,7 +771,8 @@ static void vc4_hvs_dlist_free_work(stru u8 frcnt; frcnt = vc4_hvs_get_fifo_frame_count(hvs, cur->channel); diff --git a/target/linux/bcm27xx/patches-6.6/950-0711-drm-vc4-Add-hvs_dlist_allocs-debugfs-function.patch b/target/linux/bcm27xx/patches-6.6/950-0711-drm-vc4-Add-hvs_dlist_allocs-debugfs-function.patch index e8e93d5e80a88b..d8a60aadbfd0a4 100644 --- a/target/linux/bcm27xx/patches-6.6/950-0711-drm-vc4-Add-hvs_dlist_allocs-debugfs-function.patch +++ b/target/linux/bcm27xx/patches-6.6/950-0711-drm-vc4-Add-hvs_dlist_allocs-debugfs-function.patch @@ -50,7 +50,7 @@ Signed-off-by: Dave Stevenson /* The filter kernel is composed of dwords each containing 3 9-bit * signed integers packed next to each other. */ -@@ -1551,6 +1581,8 @@ int vc4_hvs_debugfs_init(struct drm_mino +@@ -1555,6 +1585,8 @@ int vc4_hvs_debugfs_init(struct drm_mino drm_debugfs_add_file(drm, "hvs_underrun", vc4_hvs_debugfs_underrun, NULL); diff --git a/target/linux/bcm27xx/patches-6.6/950-0712-drm-vc4-Log-the-size-of-the-dlist-allocation-that-wa.patch b/target/linux/bcm27xx/patches-6.6/950-0712-drm-vc4-Log-the-size-of-the-dlist-allocation-that-wa.patch index 484d1e36763b55..65c02feda08c78 100644 --- a/target/linux/bcm27xx/patches-6.6/950-0712-drm-vc4-Log-the-size-of-the-dlist-allocation-that-wa.patch +++ b/target/linux/bcm27xx/patches-6.6/950-0712-drm-vc4-Log-the-size-of-the-dlist-allocation-that-wa.patch @@ -11,7 +11,7 @@ Signed-off-by: Dave Stevenson --- a/drivers/gpu/drm/vc4/vc4_hvs.c +++ b/drivers/gpu/drm/vc4/vc4_hvs.c -@@ -659,7 +659,8 @@ vc4_hvs_alloc_dlist_entry(struct vc4_hvs +@@ -662,7 +662,8 @@ vc4_hvs_alloc_dlist_entry(struct vc4_hvs dlist_count); spin_unlock_irqrestore(&hvs->mm_lock, flags); if (ret) { diff --git a/target/linux/bcm27xx/patches-6.6/950-0740-drm-vc4-Free-the-dlist-alloc-immediately-if-it-never.patch b/target/linux/bcm27xx/patches-6.6/950-0740-drm-vc4-Free-the-dlist-alloc-immediately-if-it-never.patch index dced86878d1eb8..b28ae3c4a1456b 100644 --- a/target/linux/bcm27xx/patches-6.6/950-0740-drm-vc4-Free-the-dlist-alloc-immediately-if-it-never.patch +++ b/target/linux/bcm27xx/patches-6.6/950-0740-drm-vc4-Free-the-dlist-alloc-immediately-if-it-never.patch @@ -33,7 +33,7 @@ Signed-off-by: Dave Stevenson struct vc4_crtc_state { --- a/drivers/gpu/drm/vc4/vc4_hvs.c +++ b/drivers/gpu/drm/vc4/vc4_hvs.c -@@ -697,8 +697,11 @@ void vc4_hvs_mark_dlist_entry_stale(stru +@@ -700,8 +700,11 @@ void vc4_hvs_mark_dlist_entry_stale(stru * Kunit tests run with a mock device and we consider any hardware * access a test failure. Let's free the dlist allocation right away if * we're running under kunit, we won't risk a dlist corruption anyway. @@ -46,7 +46,7 @@ Signed-off-by: Dave Stevenson spin_lock_irqsave(&hvs->mm_lock, flags); vc4_hvs_free_dlist_entry_locked(hvs, alloc); spin_unlock_irqrestore(&hvs->mm_lock, flags); -@@ -1195,6 +1198,7 @@ static void vc4_hvs_install_dlist(struct +@@ -1198,6 +1201,7 @@ static void vc4_hvs_install_dlist(struct return; WARN_ON(!vc4_state->mm); diff --git a/target/linux/bcm27xx/patches-6.6/950-0810-drm-vc4-Fix-reading-of-frame-count-on-GEN5-Pi4.patch b/target/linux/bcm27xx/patches-6.6/950-0810-drm-vc4-Fix-reading-of-frame-count-on-GEN5-Pi4.patch index 849caa45390bf6..8fdd244a002c73 100644 --- a/target/linux/bcm27xx/patches-6.6/950-0810-drm-vc4-Fix-reading-of-frame-count-on-GEN5-Pi4.patch +++ b/target/linux/bcm27xx/patches-6.6/950-0810-drm-vc4-Fix-reading-of-frame-count-on-GEN5-Pi4.patch @@ -16,7 +16,7 @@ Signed-off-by: Dave Stevenson --- a/drivers/gpu/drm/vc4/vc4_hvs.c +++ b/drivers/gpu/drm/vc4/vc4_hvs.c -@@ -823,10 +823,28 @@ u8 vc4_hvs_get_fifo_frame_count(struct v +@@ -826,10 +826,28 @@ u8 vc4_hvs_get_fifo_frame_count(struct v if (!drm_dev_enter(drm, &idx)) return 0; @@ -47,7 +47,7 @@ Signed-off-by: Dave Stevenson switch (fifo) { case 0: field = VC4_GET_FIELD(HVS_READ(SCALER_DISPSTAT1), -@@ -841,6 +859,7 @@ u8 vc4_hvs_get_fifo_frame_count(struct v +@@ -844,6 +862,7 @@ u8 vc4_hvs_get_fifo_frame_count(struct v SCALER_DISPSTAT2_FRCNT2); break; } diff --git a/target/linux/bcm27xx/patches-6.6/950-0829-vc4-hvs-Add-support-for-D0-register-changes.patch b/target/linux/bcm27xx/patches-6.6/950-0829-vc4-hvs-Add-support-for-D0-register-changes.patch index 3d13a6a09c3928..c8c284a1394c84 100644 --- a/target/linux/bcm27xx/patches-6.6/950-0829-vc4-hvs-Add-support-for-D0-register-changes.patch +++ b/target/linux/bcm27xx/patches-6.6/950-0829-vc4-hvs-Add-support-for-D0-register-changes.patch @@ -169,7 +169,7 @@ Signed-off-by: Dom Cobley next_entry_start = 0; for (j = active_dlist; j < dlist_mem_size; j++) { -@@ -760,7 +819,7 @@ bool vc4_hvs_check_channel_active(struct +@@ -763,7 +822,7 @@ bool vc4_hvs_check_channel_active(struct return 0; if (vc4->gen >= VC4_GEN_6) @@ -178,7 +178,7 @@ Signed-off-by: Dom Cobley else enabled = HVS_READ(SCALER_DISPCTRLX(fifo)) & SCALER_DISPCTRLX_ENABLE; -@@ -825,8 +884,8 @@ u8 vc4_hvs_get_fifo_frame_count(struct v +@@ -828,8 +887,8 @@ u8 vc4_hvs_get_fifo_frame_count(struct v switch (vc4->gen) { case VC4_GEN_6: @@ -189,7 +189,7 @@ Signed-off-by: Dom Cobley break; case VC4_GEN_5: switch (fifo) { -@@ -1037,20 +1096,20 @@ static int vc6_hvs_init_channel(struct v +@@ -1040,20 +1099,20 @@ static int vc6_hvs_init_channel(struct v if (!drm_dev_enter(drm, &idx)) return -ENODEV; @@ -219,12 +219,7 @@ Signed-off-by: Dom Cobley drm_dev_exit(idx); -@@ -1096,18 +1155,18 @@ static void __vc6_hvs_stop_channel(struc - if (!drm_dev_enter(drm, &idx)) - return; - -- if (!(HVS_READ(SCALER6_DISPX_CTRL0(chan)) & SCALER6_DISPX_CTRL0_ENB)) -+ if (!(HVS_READ(SCALER6_DISPX_CTRL0(chan)) & SCALER6(DISPX_CTRL0_ENB))) +@@ -1103,14 +1162,14 @@ static void __vc6_hvs_stop_channel(struc goto out; HVS_WRITE(SCALER6_DISPX_CTRL0(chan), @@ -244,7 +239,7 @@ Signed-off-by: Dom Cobley out: drm_dev_exit(idx); -@@ -1221,8 +1280,8 @@ static void vc4_hvs_install_dlist(struct +@@ -1224,8 +1283,8 @@ static void vc4_hvs_install_dlist(struct if (vc4->gen >= VC4_GEN_6) HVS_WRITE(SCALER6_DISPX_LPTRS(vc4_state->assigned_channel), @@ -255,7 +250,7 @@ Signed-off-by: Dom Cobley else HVS_WRITE(SCALER_DISPLISTX(vc4_state->assigned_channel), vc4_state->mm->mm_node.start); -@@ -1382,11 +1441,11 @@ void vc4_hvs_atomic_flush(struct drm_crt +@@ -1385,11 +1444,11 @@ void vc4_hvs_atomic_flush(struct drm_crt if (enable_bg_fill) HVS_WRITE(SCALER6_DISPX_CTRL1(channel), HVS_READ(SCALER6_DISPX_CTRL1(channel)) | @@ -269,7 +264,7 @@ Signed-off-by: Dom Cobley } else { /* we can actually run with a lower core clock when background * fill is enabled on VC4_GEN_5 so leave it enabled always. -@@ -1656,7 +1715,7 @@ struct vc4_hvs *__vc4_hvs_alloc(struct v +@@ -1660,7 +1719,7 @@ struct vc4_hvs *__vc4_hvs_alloc(struct v * access a register. Use a plausible size then. */ if (!kunit_get_current_test()) @@ -278,7 +273,7 @@ Signed-off-by: Dom Cobley else dlist_size = 4096; -@@ -1890,14 +1949,17 @@ static int vc6_hvs_hw_init(struct vc4_hv +@@ -1894,14 +1953,17 @@ static int vc6_hvs_hw_init(struct vc4_hv const struct vc6_csc_coeff_entry *coeffs; unsigned int i; @@ -300,7 +295,7 @@ Signed-off-by: Dom Cobley for (i = 0; i < 6; i++) { coeffs = &csc_coeffs[i / 3][i % 3]; -@@ -1996,21 +2058,21 @@ static int vc4_hvs_cob_init(struct vc4_h +@@ -2000,21 +2062,21 @@ static int vc4_hvs_cob_init(struct vc4_h reg = 0; top = 3840; @@ -325,7 +320,7 @@ Signed-off-by: Dom Cobley VC4_SET_FIELD(top, SCALER6_DISPX_COB_TOP) | VC4_SET_FIELD(base, SCALER6_DISPX_COB_BASE)); break; -@@ -2041,7 +2103,10 @@ static int vc4_hvs_bind(struct device *d +@@ -2045,7 +2107,10 @@ static int vc4_hvs_bind(struct device *d hvs->regset.base = hvs->regs; @@ -337,7 +332,7 @@ Signed-off-by: Dom Cobley hvs->regset.regs = vc6_hvs_regs; hvs->regset.nregs = ARRAY_SIZE(vc6_hvs_regs); } else { -@@ -2208,6 +2273,7 @@ static void vc4_hvs_dev_remove(struct pl +@@ -2212,6 +2277,7 @@ static void vc4_hvs_dev_remove(struct pl static const struct of_device_id vc4_hvs_dt_match[] = { { .compatible = "brcm,bcm2711-hvs" }, { .compatible = "brcm,bcm2712-hvs" }, diff --git a/target/linux/bcm27xx/patches-6.6/950-0830-vc4-hvs-Updates-to-support-D0-alpha-and-csc-changes.patch b/target/linux/bcm27xx/patches-6.6/950-0830-vc4-hvs-Updates-to-support-D0-alpha-and-csc-changes.patch index d88e6a744cda16..0535f63224f5ff 100644 --- a/target/linux/bcm27xx/patches-6.6/950-0830-vc4-hvs-Updates-to-support-D0-alpha-and-csc-changes.patch +++ b/target/linux/bcm27xx/patches-6.6/950-0830-vc4-hvs-Updates-to-support-D0-alpha-and-csc-changes.patch @@ -16,7 +16,7 @@ Signed-off-by: Dom Cobley --- a/drivers/gpu/drm/vc4/vc4_hvs.c +++ b/drivers/gpu/drm/vc4/vc4_hvs.c -@@ -1888,6 +1888,17 @@ static int vc4_hvs_hw_init(struct vc4_hv +@@ -1892,6 +1892,17 @@ static int vc4_hvs_hw_init(struct vc4_hv #define CFC1_N_MA_CSC_COEFF_C23(x) (0xa03c + ((x) * 0x3000)) #define CFC1_N_MA_CSC_COEFF_C24(x) (0xa040 + ((x) * 0x3000)) @@ -34,7 +34,7 @@ Signed-off-by: Dom Cobley /* 4 S2.22 multiplication factors, and 1 S9.15 addititive element for each of 3 * output components */ -@@ -1958,31 +1969,43 @@ static int vc6_hvs_hw_init(struct vc4_hv +@@ -1962,31 +1973,43 @@ static int vc6_hvs_hw_init(struct vc4_hv HVS_WRITE(SCALER6(PRI_MAP0), 0xffffffff); HVS_WRITE(SCALER6(PRI_MAP1), 0xffffffff); diff --git a/target/linux/bcm27xx/patches-6.6/950-0836-drm-vc4-Optimise-vc4_hvs_dlist_free_work-to-only-rea.patch b/target/linux/bcm27xx/patches-6.6/950-0836-drm-vc4-Optimise-vc4_hvs_dlist_free_work-to-only-rea.patch index ff589278b6678e..19442e421c35d3 100644 --- a/target/linux/bcm27xx/patches-6.6/950-0836-drm-vc4-Optimise-vc4_hvs_dlist_free_work-to-only-rea.patch +++ b/target/linux/bcm27xx/patches-6.6/950-0836-drm-vc4-Optimise-vc4_hvs_dlist_free_work-to-only-rea.patch @@ -18,7 +18,7 @@ Signed-off-by: Dave Stevenson --- a/drivers/gpu/drm/vc4/vc4_hvs.c +++ b/drivers/gpu/drm/vc4/vc4_hvs.c -@@ -855,14 +855,19 @@ static void vc4_hvs_dlist_free_work(stru +@@ -858,14 +858,19 @@ static void vc4_hvs_dlist_free_work(stru struct vc4_hvs *hvs = container_of(work, struct vc4_hvs, free_dlist_work); struct vc4_hvs_dlist_allocation *cur, *next; unsigned long flags; diff --git a/target/linux/bcm27xx/patches-6.6/950-0837-drm-vc4-Flush-stale-dlist-entries-if-allocation-fail.patch b/target/linux/bcm27xx/patches-6.6/950-0837-drm-vc4-Flush-stale-dlist-entries-if-allocation-fail.patch index 67be70d9a28947..b12ce4c542b3de 100644 --- a/target/linux/bcm27xx/patches-6.6/950-0837-drm-vc4-Flush-stale-dlist-entries-if-allocation-fail.patch +++ b/target/linux/bcm27xx/patches-6.6/950-0837-drm-vc4-Flush-stale-dlist-entries-if-allocation-fail.patch @@ -19,7 +19,7 @@ Signed-off-by: Dave Stevenson --- a/drivers/gpu/drm/vc4/vc4_hvs.c +++ b/drivers/gpu/drm/vc4/vc4_hvs.c -@@ -693,6 +693,9 @@ static void vc4_hvs_irq_clear_eof(struct +@@ -696,6 +696,9 @@ static void vc4_hvs_irq_clear_eof(struct hvs->eof_irq[channel].enabled = false; } @@ -29,7 +29,7 @@ Signed-off-by: Dave Stevenson static struct vc4_hvs_dlist_allocation * vc4_hvs_alloc_dlist_entry(struct vc4_hvs *hvs, unsigned int channel, -@@ -701,6 +704,7 @@ vc4_hvs_alloc_dlist_entry(struct vc4_hvs +@@ -704,6 +707,7 @@ vc4_hvs_alloc_dlist_entry(struct vc4_hvs struct vc4_dev *vc4 = hvs->vc4; struct drm_device *dev = &vc4->base; struct vc4_hvs_dlist_allocation *alloc; @@ -37,7 +37,7 @@ Signed-off-by: Dave Stevenson unsigned long flags; int ret; -@@ -718,9 +722,26 @@ vc4_hvs_alloc_dlist_entry(struct vc4_hvs +@@ -721,9 +725,26 @@ vc4_hvs_alloc_dlist_entry(struct vc4_hvs dlist_count); spin_unlock_irqrestore(&hvs->mm_lock, flags); if (ret) { diff --git a/target/linux/bcm27xx/patches-6.6/950-0989-drm-vc4-Enable-bg_fill-if-there-are-no-planes-enable.patch b/target/linux/bcm27xx/patches-6.6/950-0989-drm-vc4-Enable-bg_fill-if-there-are-no-planes-enable.patch index 10d7f571194fc9..b34cff057eadab 100644 --- a/target/linux/bcm27xx/patches-6.6/950-0989-drm-vc4-Enable-bg_fill-if-there-are-no-planes-enable.patch +++ b/target/linux/bcm27xx/patches-6.6/950-0989-drm-vc4-Enable-bg_fill-if-there-are-no-planes-enable.patch @@ -19,7 +19,7 @@ Signed-off-by: Dave Stevenson --- a/drivers/gpu/drm/vc4/vc4_hvs.c +++ b/drivers/gpu/drm/vc4/vc4_hvs.c -@@ -1400,7 +1400,7 @@ void vc4_hvs_atomic_flush(struct drm_crt +@@ -1403,7 +1403,7 @@ void vc4_hvs_atomic_flush(struct drm_crt struct drm_plane *plane; struct vc4_plane_state *vc4_plane_state; bool debug_dump_regs = false; diff --git a/target/linux/bcm27xx/patches-6.6/950-1257-drm-vc4-Add-support-for-per-plane-scaling-filter-sel.patch b/target/linux/bcm27xx/patches-6.6/950-1257-drm-vc4-Add-support-for-per-plane-scaling-filter-sel.patch index 5b3ae3c9101122..52a13c6508db92 100644 --- a/target/linux/bcm27xx/patches-6.6/950-1257-drm-vc4-Add-support-for-per-plane-scaling-filter-sel.patch +++ b/target/linux/bcm27xx/patches-6.6/950-1257-drm-vc4-Add-support-for-per-plane-scaling-filter-sel.patch @@ -40,7 +40,7 @@ Signed-off-by: Dave Stevenson static int vc4_hvs_upload_linear_kernel(struct vc4_hvs *hvs, struct drm_mm_node *space, -@@ -2255,14 +2258,19 @@ static int vc4_hvs_bind(struct device *d +@@ -2259,14 +2262,19 @@ static int vc4_hvs_bind(struct device *d if (ret) return ret; @@ -62,7 +62,7 @@ Signed-off-by: Dave Stevenson ret = vc4_hvs_cob_init(hvs); if (ret) -@@ -2288,6 +2296,8 @@ static void vc4_hvs_unbind(struct device +@@ -2292,6 +2300,8 @@ static void vc4_hvs_unbind(struct device if (drm_mm_node_allocated(&vc4->hvs->mitchell_netravali_filter)) drm_mm_remove_node(&vc4->hvs->mitchell_netravali_filter); diff --git a/target/linux/bcm27xx/patches-6.6/950-1323-drm-vc4-Remove-request-for-min-clocks-when-hdmi-outp.patch b/target/linux/bcm27xx/patches-6.6/950-1323-drm-vc4-Remove-request-for-min-clocks-when-hdmi-outp.patch index 9f4cf9d0336dab..1a1e3439e5e4e0 100644 --- a/target/linux/bcm27xx/patches-6.6/950-1323-drm-vc4-Remove-request-for-min-clocks-when-hdmi-outp.patch +++ b/target/linux/bcm27xx/patches-6.6/950-1323-drm-vc4-Remove-request-for-min-clocks-when-hdmi-outp.patch @@ -50,7 +50,7 @@ Signed-off-by: Dom Cobley return 0; --- a/drivers/gpu/drm/vc4/vc4_hvs.c +++ b/drivers/gpu/drm/vc4/vc4_hvs.c -@@ -2308,7 +2308,10 @@ static void vc4_hvs_unbind(struct device +@@ -2312,7 +2312,10 @@ static void vc4_hvs_unbind(struct device drm_mm_remove_node(node); drm_mm_takedown(&vc4->hvs->lbm_mm); diff --git a/target/linux/bcm27xx/patches-6.6/950-1349-cgroup-Use-kernel-command-line-to-disable-memory-cgr.patch b/target/linux/bcm27xx/patches-6.6/950-1349-cgroup-Use-kernel-command-line-to-disable-memory-cgr.patch index 46e0aeaf4ce6f6..61dec89382cff5 100644 --- a/target/linux/bcm27xx/patches-6.6/950-1349-cgroup-Use-kernel-command-line-to-disable-memory-cgr.patch +++ b/target/linux/bcm27xx/patches-6.6/950-1349-cgroup-Use-kernel-command-line-to-disable-memory-cgr.patch @@ -148,7 +148,7 @@ Signed-off-by: Maíra Canal --- a/kernel/cgroup/cgroup.c +++ b/kernel/cgroup/cgroup.c -@@ -6060,9 +6060,6 @@ int __init cgroup_init_early(void) +@@ -6063,9 +6063,6 @@ int __init cgroup_init_early(void) return 0; } @@ -158,7 +158,7 @@ Signed-off-by: Maíra Canal /** * cgroup_init - cgroup initialization * -@@ -6096,12 +6093,6 @@ int __init cgroup_init(void) +@@ -6099,12 +6096,6 @@ int __init cgroup_init(void) cgroup_unlock(); @@ -171,7 +171,7 @@ Signed-off-by: Maíra Canal for_each_subsys(ss, ssid) { if (ss->early_init) { struct cgroup_subsys_state *css = -@@ -6742,10 +6733,6 @@ static int __init cgroup_disable(char *s +@@ -6745,10 +6736,6 @@ static int __init cgroup_disable(char *s strcmp(token, ss->legacy_name)) continue; @@ -182,7 +182,7 @@ Signed-off-by: Maíra Canal static_branch_disable(cgroup_subsys_enabled_key[i]); pr_info("Disabling %s control group subsystem\n", ss->name); -@@ -6779,7 +6766,7 @@ static int __init cgroup_enable(char *st +@@ -6782,7 +6769,7 @@ static int __init cgroup_enable(char *st strcmp(token, ss->legacy_name)) continue; diff --git a/target/linux/generic/hack-6.6/204-module_strip.patch b/target/linux/generic/hack-6.6/204-module_strip.patch index 403ee11513cc54..9eadd2ce16bb58 100644 --- a/target/linux/generic/hack-6.6/204-module_strip.patch +++ b/target/linux/generic/hack-6.6/204-module_strip.patch @@ -141,7 +141,7 @@ Signed-off-by: Felix Fietkau if (err) --- a/scripts/mod/modpost.c +++ b/scripts/mod/modpost.c -@@ -1693,7 +1693,9 @@ static void read_symbols(const char *mod +@@ -1666,7 +1666,9 @@ static void read_symbols(const char *mod symname = remove_dot(info.strtab + sym->st_name); handle_symbol(mod, &info, sym, symname); @@ -151,7 +151,7 @@ Signed-off-by: Felix Fietkau } check_sec_ref(mod, &info); -@@ -1866,8 +1868,10 @@ static void add_header(struct buffer *b, +@@ -1839,8 +1841,10 @@ static void add_header(struct buffer *b, buf_printf(b, "BUILD_SALT;\n"); buf_printf(b, "BUILD_LTO_INFO;\n"); buf_printf(b, "\n"); @@ -162,7 +162,7 @@ Signed-off-by: Felix Fietkau buf_printf(b, "\n"); buf_printf(b, "__visible struct module __this_module\n"); buf_printf(b, "__section(\".gnu.linkonce.this_module\") = {\n"); -@@ -1881,8 +1885,10 @@ static void add_header(struct buffer *b, +@@ -1854,8 +1858,10 @@ static void add_header(struct buffer *b, buf_printf(b, "\t.arch = MODULE_ARCH_INIT,\n"); buf_printf(b, "};\n"); @@ -173,7 +173,7 @@ Signed-off-by: Felix Fietkau buf_printf(b, "\n" -@@ -1890,8 +1896,10 @@ static void add_header(struct buffer *b, +@@ -1863,8 +1869,10 @@ static void add_header(struct buffer *b, "MODULE_INFO(retpoline, \"Y\");\n" "#endif\n"); @@ -184,7 +184,7 @@ Signed-off-by: Felix Fietkau if (strstarts(mod->name, "tools/testing")) buf_printf(b, "\nMODULE_INFO(test, \"Y\");\n"); -@@ -2001,11 +2009,13 @@ static void add_depends(struct buffer *b +@@ -1974,11 +1982,13 @@ static void add_depends(struct buffer *b static void add_srcversion(struct buffer *b, struct module *mod) { @@ -198,7 +198,7 @@ Signed-off-by: Felix Fietkau } static void write_buf(struct buffer *b, const char *fname) -@@ -2088,7 +2098,9 @@ static void write_mod_c_file(struct modu +@@ -2061,7 +2071,9 @@ static void write_mod_c_file(struct modu add_exported_symbols(&buf, mod); add_versions(&buf, mod); add_depends(&buf, mod); diff --git a/target/linux/generic/hack-6.6/253-ksmbd-config.patch b/target/linux/generic/hack-6.6/253-ksmbd-config.patch index 9079c66d420e7f..d54b48895ea369 100644 --- a/target/linux/generic/hack-6.6/253-ksmbd-config.patch +++ b/target/linux/generic/hack-6.6/253-ksmbd-config.patch @@ -10,7 +10,7 @@ Subject: [PATCH] Kconfig: add tristate for OID and ASNI string --- a/init/Kconfig +++ b/init/Kconfig -@@ -1993,7 +1993,7 @@ config PADATA +@@ -2002,7 +2002,7 @@ config PADATA bool config ASN1 diff --git a/target/linux/generic/hack-6.6/780-usb-net-MeigLink_modem_support.patch b/target/linux/generic/hack-6.6/780-usb-net-MeigLink_modem_support.patch index 66c58dba64e42a..cefb9c53e89d61 100644 --- a/target/linux/generic/hack-6.6/780-usb-net-MeigLink_modem_support.patch +++ b/target/linux/generic/hack-6.6/780-usb-net-MeigLink_modem_support.patch @@ -10,7 +10,7 @@ Subject: [PATCH] net/usb/qmi_wwan: add MeigLink modem support --- a/drivers/net/usb/qmi_wwan.c +++ b/drivers/net/usb/qmi_wwan.c -@@ -1084,12 +1084,18 @@ static const struct usb_device_id produc +@@ -1084,6 +1084,11 @@ static const struct usb_device_id produc USB_DEVICE_AND_INTERFACE_INFO(0x03f0, 0x581d, USB_CLASS_VENDOR_SPEC, 1, 7), .driver_info = (unsigned long)&qmi_wwan_info, }, @@ -19,9 +19,10 @@ Subject: [PATCH] net/usb/qmi_wwan: add MeigLink modem support + .driver_info = (unsigned long)&qmi_wwan_info, + }, + + {QMI_MATCH_FF_FF_FF(0x2c7c, 0x0122)}, /* Quectel RG650V */ {QMI_MATCH_FF_FF_FF(0x2c7c, 0x0125)}, /* Quectel EC25, EC20 R2.0 Mini PCIe */ {QMI_MATCH_FF_FF_FF(0x2c7c, 0x0306)}, /* Quectel EP06/EG06/EM06 */ - {QMI_MATCH_FF_FF_FF(0x2c7c, 0x0512)}, /* Quectel EG12/EM12 */ +@@ -1091,6 +1096,7 @@ static const struct usb_device_id produc {QMI_MATCH_FF_FF_FF(0x2c7c, 0x0620)}, /* Quectel EM160R-GL */ {QMI_MATCH_FF_FF_FF(0x2c7c, 0x0800)}, /* Quectel RM500Q-GL */ {QMI_MATCH_FF_FF_FF(0x2c7c, 0x0801)}, /* Quectel RM520N */ diff --git a/target/linux/generic/hack-6.6/901-debloat_sock_diag.patch b/target/linux/generic/hack-6.6/901-debloat_sock_diag.patch index acf72f4422579e..4b1ea3c5ad932f 100644 --- a/target/linux/generic/hack-6.6/901-debloat_sock_diag.patch +++ b/target/linux/generic/hack-6.6/901-debloat_sock_diag.patch @@ -105,8 +105,8 @@ Signed-off-by: Felix Fietkau #include #include -@@ -21,23 +20,6 @@ static int (*inet_rcv_compat)(struct sk_ - static DEFINE_MUTEX(sock_diag_table_mutex); +@@ -22,23 +21,6 @@ static const struct sock_diag_inet_compa + static struct workqueue_struct *broadcast_wq; -DEFINE_COOKIE(sock_cookie); diff --git a/target/linux/generic/hack-6.6/902-debloat_proc.patch b/target/linux/generic/hack-6.6/902-debloat_proc.patch index 691a60bcc03888..2c3eca2552fc32 100644 --- a/target/linux/generic/hack-6.6/902-debloat_proc.patch +++ b/target/linux/generic/hack-6.6/902-debloat_proc.patch @@ -246,7 +246,7 @@ Signed-off-by: Felix Fietkau &vmalloc_op, --- a/mm/vmstat.c +++ b/mm/vmstat.c -@@ -2135,10 +2135,12 @@ void __init init_mm_internals(void) +@@ -2136,10 +2136,12 @@ void __init init_mm_internals(void) start_shepherd_timer(); #endif #ifdef CONFIG_PROC_FS diff --git a/target/linux/generic/hack-6.6/920-device_tree_cmdline.patch b/target/linux/generic/hack-6.6/920-device_tree_cmdline.patch index 2a43ffb7ad54ef..1d78a9dc4dedc3 100644 --- a/target/linux/generic/hack-6.6/920-device_tree_cmdline.patch +++ b/target/linux/generic/hack-6.6/920-device_tree_cmdline.patch @@ -9,7 +9,7 @@ Subject: [PATCH] of/ftd: add device tree cmdline --- a/drivers/of/fdt.c +++ b/drivers/of/fdt.c -@@ -1185,6 +1185,9 @@ int __init early_init_dt_scan_chosen(cha +@@ -1186,6 +1186,9 @@ int __init early_init_dt_scan_chosen(cha p = of_get_flat_dt_prop(node, "bootargs", &l); if (p != NULL && l > 0) strscpy(cmdline, p, min(l, COMMAND_LINE_SIZE)); diff --git a/target/linux/generic/pending-6.6/203-kallsyms_uncompressed.patch b/target/linux/generic/pending-6.6/203-kallsyms_uncompressed.patch index c23811ed3987e4..94b22603d8c261 100644 --- a/target/linux/generic/pending-6.6/203-kallsyms_uncompressed.patch +++ b/target/linux/generic/pending-6.6/203-kallsyms_uncompressed.patch @@ -13,7 +13,7 @@ Signed-off-by: Felix Fietkau --- a/init/Kconfig +++ b/init/Kconfig -@@ -1451,6 +1451,17 @@ config SYSCTL_ARCH_UNALIGN_ALLOW +@@ -1460,6 +1460,17 @@ config SYSCTL_ARCH_UNALIGN_ALLOW the unaligned access emulation. see arch/parisc/kernel/unaligned.c for reference diff --git a/target/linux/generic/pending-6.6/670-ipv6-allow-rejecting-with-source-address-failed-policy.patch b/target/linux/generic/pending-6.6/670-ipv6-allow-rejecting-with-source-address-failed-policy.patch index f754705dc6d140..9cf9117d097122 100644 --- a/target/linux/generic/pending-6.6/670-ipv6-allow-rejecting-with-source-address-failed-policy.patch +++ b/target/linux/generic/pending-6.6/670-ipv6-allow-rejecting-with-source-address-failed-policy.patch @@ -76,7 +76,7 @@ Signed-off-by: Jonas Gorski static inline const char *rtn_type(char *buf, size_t len, unsigned int t) --- a/net/ipv4/ipmr.c +++ b/net/ipv4/ipmr.c -@@ -180,6 +180,7 @@ static int ipmr_rule_action(struct fib_r +@@ -190,6 +190,7 @@ static int ipmr_rule_action(struct fib_r case FR_ACT_UNREACHABLE: return -ENETUNREACH; case FR_ACT_PROHIBIT: @@ -99,7 +99,7 @@ Signed-off-by: Jonas Gorski tb_id = fib_rule_get_table(rule, arg); --- a/net/ipv6/ip6mr.c +++ b/net/ipv6/ip6mr.c -@@ -170,6 +170,8 @@ static int ip6mr_rule_action(struct fib_ +@@ -180,6 +180,8 @@ static int ip6mr_rule_action(struct fib_ return -ENETUNREACH; case FR_ACT_PROHIBIT: return -EACCES; @@ -138,7 +138,7 @@ Signed-off-by: Jonas Gorski static const struct rt6_info ip6_blk_hole_entry_template = { .dst = { .__rcuref = RCUREF_INIT(1), -@@ -1040,6 +1054,7 @@ static const int fib6_prop[RTN_MAX + 1] +@@ -1043,6 +1057,7 @@ static const int fib6_prop[RTN_MAX + 1] [RTN_BLACKHOLE] = -EINVAL, [RTN_UNREACHABLE] = -EHOSTUNREACH, [RTN_PROHIBIT] = -EACCES, @@ -146,7 +146,7 @@ Signed-off-by: Jonas Gorski [RTN_THROW] = -EAGAIN, [RTN_NAT] = -EINVAL, [RTN_XRESOLVE] = -EINVAL, -@@ -1075,6 +1090,10 @@ static void ip6_rt_init_dst_reject(struc +@@ -1078,6 +1093,10 @@ static void ip6_rt_init_dst_reject(struc rt->dst.output = ip6_pkt_prohibit_out; rt->dst.input = ip6_pkt_prohibit; break; diff --git a/target/linux/generic/pending-6.6/701-netfilter-nf_tables-ignore-EOPNOTSUPP-on-flowtable-d.patch b/target/linux/generic/pending-6.6/701-netfilter-nf_tables-ignore-EOPNOTSUPP-on-flowtable-d.patch index cfa3975c386bff..d13641064063fa 100644 --- a/target/linux/generic/pending-6.6/701-netfilter-nf_tables-ignore-EOPNOTSUPP-on-flowtable-d.patch +++ b/target/linux/generic/pending-6.6/701-netfilter-nf_tables-ignore-EOPNOTSUPP-on-flowtable-d.patch @@ -18,7 +18,7 @@ Signed-off-by: Felix Fietkau --- a/net/netfilter/nf_tables_api.c +++ b/net/netfilter/nf_tables_api.c -@@ -8377,7 +8377,7 @@ static int nft_register_flowtable_net_ho +@@ -8417,7 +8417,7 @@ static int nft_register_flowtable_net_ho err = flowtable->data.type->setup(&flowtable->data, hook->ops.dev, FLOW_BLOCK_BIND); diff --git a/target/linux/generic/pending-6.6/920-mangle_bootargs.patch b/target/linux/generic/pending-6.6/920-mangle_bootargs.patch index 1d73cca11e2321..36e7c18324bdfb 100644 --- a/target/linux/generic/pending-6.6/920-mangle_bootargs.patch +++ b/target/linux/generic/pending-6.6/920-mangle_bootargs.patch @@ -13,7 +13,7 @@ Signed-off-by: Imre Kaloz --- a/init/Kconfig +++ b/init/Kconfig -@@ -1811,6 +1811,15 @@ config DEBUG_RSEQ +@@ -1820,6 +1820,15 @@ config DEBUG_RSEQ If unsure, say N. diff --git a/target/linux/ipq806x/patches-6.6/900-arm-add-cmdline-override.patch b/target/linux/ipq806x/patches-6.6/900-arm-add-cmdline-override.patch index f8bd1674b80ab4..7ea3c82ffd4c8a 100644 --- a/target/linux/ipq806x/patches-6.6/900-arm-add-cmdline-override.patch +++ b/target/linux/ipq806x/patches-6.6/900-arm-add-cmdline-override.patch @@ -17,7 +17,7 @@ default "" --- a/drivers/of/fdt.c +++ b/drivers/of/fdt.c -@@ -1189,6 +1189,17 @@ int __init early_init_dt_scan_chosen(cha +@@ -1190,6 +1190,17 @@ int __init early_init_dt_scan_chosen(cha if (p != NULL && l > 0) strlcat(cmdline, p, min_t(int, strlen(cmdline) + (int)l, COMMAND_LINE_SIZE)); diff --git a/target/linux/layerscape/patches-6.6/400-LF-20-3-mtd-spi-nor-Use-1-bit-mode-of-spansion-s25fs.patch b/target/linux/layerscape/patches-6.6/400-LF-20-3-mtd-spi-nor-Use-1-bit-mode-of-spansion-s25fs.patch index b85053eba9ea0e..008a146cc97e8b 100644 --- a/target/linux/layerscape/patches-6.6/400-LF-20-3-mtd-spi-nor-Use-1-bit-mode-of-spansion-s25fs.patch +++ b/target/linux/layerscape/patches-6.6/400-LF-20-3-mtd-spi-nor-Use-1-bit-mode-of-spansion-s25fs.patch @@ -15,7 +15,7 @@ Signed-off-by: Kuldeep Singh --- a/drivers/mtd/spi-nor/spansion.c +++ b/drivers/mtd/spi-nor/spansion.c -@@ -798,8 +798,8 @@ static const struct flash_info spansion_ +@@ -799,8 +799,8 @@ static const struct flash_info spansion_ MFR_FLAGS(USE_CLSR) }, { "s25fs512s", INFO6(0x010220, 0x4d0081, 256 * 1024, 256) diff --git a/target/linux/mediatek/patches-6.6/432-drivers-spi-Add-support-for-dynamic-calibration.patch b/target/linux/mediatek/patches-6.6/432-drivers-spi-Add-support-for-dynamic-calibration.patch index 19fe984aa6179b..7ff7b05301aea5 100644 --- a/target/linux/mediatek/patches-6.6/432-drivers-spi-Add-support-for-dynamic-calibration.patch +++ b/target/linux/mediatek/patches-6.6/432-drivers-spi-Add-support-for-dynamic-calibration.patch @@ -11,7 +11,7 @@ Signed-off-by: SkyLake.Huang --- a/drivers/spi/spi.c +++ b/drivers/spi/spi.c -@@ -1370,6 +1370,70 @@ static int spi_transfer_wait(struct spi_ +@@ -1380,6 +1380,70 @@ static int spi_transfer_wait(struct spi_ return 0; } @@ -82,7 +82,7 @@ Signed-off-by: SkyLake.Huang static void _spi_transfer_delay_ns(u32 ns) { if (!ns) -@@ -2215,6 +2279,75 @@ void spi_flush_queue(struct spi_controll +@@ -2225,6 +2289,75 @@ void spi_flush_queue(struct spi_controll /*-------------------------------------------------------------------------*/ #if defined(CONFIG_OF) @@ -158,7 +158,7 @@ Signed-off-by: SkyLake.Huang static void of_spi_parse_dt_cs_delay(struct device_node *nc, struct spi_delay *delay, const char *prop) { -@@ -2354,6 +2487,10 @@ of_register_spi_device(struct spi_contro +@@ -2364,6 +2497,10 @@ of_register_spi_device(struct spi_contro if (rc) goto err_out; diff --git a/target/linux/mediatek/patches-6.6/901-arm-add-cmdline-override.patch b/target/linux/mediatek/patches-6.6/901-arm-add-cmdline-override.patch index 4f4fb9f23e42b6..7b7c905a0f3b60 100644 --- a/target/linux/mediatek/patches-6.6/901-arm-add-cmdline-override.patch +++ b/target/linux/mediatek/patches-6.6/901-arm-add-cmdline-override.patch @@ -17,7 +17,7 @@ default "" --- a/drivers/of/fdt.c +++ b/drivers/of/fdt.c -@@ -1189,6 +1189,17 @@ int __init early_init_dt_scan_chosen(cha +@@ -1190,6 +1190,17 @@ int __init early_init_dt_scan_chosen(cha if (p != NULL && l > 0) strlcat(cmdline, p, min_t(int, strlen(cmdline) + (int)l, COMMAND_LINE_SIZE)); diff --git a/target/linux/mpc85xx/patches-6.6/102-powerpc-add-cmdline-override.patch b/target/linux/mpc85xx/patches-6.6/102-powerpc-add-cmdline-override.patch index 1aa7c3dbd340ef..34bb95e4c01e69 100644 --- a/target/linux/mpc85xx/patches-6.6/102-powerpc-add-cmdline-override.patch +++ b/target/linux/mpc85xx/patches-6.6/102-powerpc-add-cmdline-override.patch @@ -17,7 +17,7 @@ help --- a/drivers/of/fdt.c +++ b/drivers/of/fdt.c -@@ -1189,6 +1189,17 @@ int __init early_init_dt_scan_chosen(cha +@@ -1190,6 +1190,17 @@ int __init early_init_dt_scan_chosen(cha if (p != NULL && l > 0) strlcat(cmdline, p, min_t(int, strlen(cmdline) + (int)l, COMMAND_LINE_SIZE)); diff --git a/target/linux/ramips/patches-6.6/001-v6.13-clocksource-drivers-ralink-Add-Ralink-System-Tick-Co.patch b/target/linux/ramips/patches-6.6/001-v6.13-clocksource-drivers-ralink-Add-Ralink-System-Tick-Co.patch index cd2a90826c767d..de3438427d787c 100644 --- a/target/linux/ramips/patches-6.6/001-v6.13-clocksource-drivers-ralink-Add-Ralink-System-Tick-Co.patch +++ b/target/linux/ramips/patches-6.6/001-v6.13-clocksource-drivers-ralink-Add-Ralink-System-Tick-Co.patch @@ -208,7 +208,7 @@ Signed-off-by: Daniel Lezcano -TIMER_OF_DECLARE(systick, "ralink,cevt-systick", ralink_systick_init); --- a/drivers/clocksource/Kconfig +++ b/drivers/clocksource/Kconfig -@@ -732,4 +732,13 @@ config GOLDFISH_TIMER +@@ -733,4 +733,13 @@ config GOLDFISH_TIMER help Support for the timer/counter of goldfish-rtc diff --git a/target/linux/ramips/patches-6.6/002-01-v6.13-clk-ralink-mtmips-fix-clock-plan-for-Ralink-SoC-RT38.patch b/target/linux/ramips/patches-6.6/002-01-v6.13-clk-ralink-mtmips-fix-clock-plan-for-Ralink-SoC-RT38.patch deleted file mode 100644 index 422b6dcfb07799..00000000000000 --- a/target/linux/ramips/patches-6.6/002-01-v6.13-clk-ralink-mtmips-fix-clock-plan-for-Ralink-SoC-RT38.patch +++ /dev/null @@ -1,48 +0,0 @@ -From 33239152305567b3e9bf052f71fd4baecd626341 Mon Sep 17 00:00:00 2001 -From: Sergio Paracuellos -Date: Tue, 10 Sep 2024 06:40:22 +0200 -Subject: [PATCH 1/3] clk: ralink: mtmips: fix clock plan for Ralink SoC RT3883 - -Clock plan for Ralink SoC RT3883 needs an extra 'periph' clock to properly -set some peripherals that has this clock as their parent. When this driver -was mainlined we could not find any active users of this SoC so we cannot -perform any real tests for it. Now, one user of a Belkin f9k1109 version 1 -device which uses this SoC appear and reported some issues in openWRT: -- https://github.com/openwrt/openwrt/issues/16054 -The peripherals that are wrong are 'uart', 'i2c', 'i2s' and 'uartlite' which -has a not defined 'periph' clock as parent. Hence, introduce it to have a -properly working clock plan for this SoC. - -Fixes: 6f3b15586eef ("clk: ralink: add clock and reset driver for MTMIPS SoCs") -Signed-off-by: Sergio Paracuellos -Link: https://lore.kernel.org/r/20240910044024.120009-2-sergio.paracuellos@gmail.com -Signed-off-by: Stephen Boyd ---- - drivers/clk/ralink/clk-mtmips.c | 9 +++++++-- - 1 file changed, 7 insertions(+), 2 deletions(-) - ---- a/drivers/clk/ralink/clk-mtmips.c -+++ b/drivers/clk/ralink/clk-mtmips.c -@@ -267,6 +267,11 @@ static struct mtmips_clk_fixed rt305x_fi - CLK_FIXED("xtal", NULL, 40000000) - }; - -+static struct mtmips_clk_fixed rt3883_fixed_clocks[] = { -+ CLK_FIXED("xtal", NULL, 40000000), -+ CLK_FIXED("periph", "xtal", 40000000) -+}; -+ - static struct mtmips_clk_fixed rt3352_fixed_clocks[] = { - CLK_FIXED("periph", "xtal", 40000000) - }; -@@ -779,8 +784,8 @@ static const struct mtmips_clk_data rt33 - static const struct mtmips_clk_data rt3883_clk_data = { - .clk_base = rt3883_clks_base, - .num_clk_base = ARRAY_SIZE(rt3883_clks_base), -- .clk_fixed = rt305x_fixed_clocks, -- .num_clk_fixed = ARRAY_SIZE(rt305x_fixed_clocks), -+ .clk_fixed = rt3883_fixed_clocks, -+ .num_clk_fixed = ARRAY_SIZE(rt3883_fixed_clocks), - .clk_factor = NULL, - .num_clk_factor = 0, - .clk_periph = rt5350_pherip_clks, diff --git a/target/linux/ramips/patches-6.6/002-02-v6.13-clk-ralink-mtmips-fix-clocks-probe-order-in-oldest-r.patch b/target/linux/ramips/patches-6.6/002-02-v6.13-clk-ralink-mtmips-fix-clocks-probe-order-in-oldest-r.patch deleted file mode 100644 index 3268a18dac704f..00000000000000 --- a/target/linux/ramips/patches-6.6/002-02-v6.13-clk-ralink-mtmips-fix-clocks-probe-order-in-oldest-r.patch +++ /dev/null @@ -1,124 +0,0 @@ -From d34db686a3d74bd564bfce2ada15011c556269fc Mon Sep 17 00:00:00 2001 -From: Sergio Paracuellos -Date: Tue, 10 Sep 2024 06:40:23 +0200 -Subject: [PATCH 2/3] clk: ralink: mtmips: fix clocks probe order in oldest - ralink SoCs - -Base clocks are the first in being probed and are real dependencies of the -rest of fixed, factor and peripheral clocks. For old ralink SoCs RT2880, -RT305x and RT3883 'xtal' must be defined first since in any other case, -when fixed clocks are probed they are delayed until 'xtal' is probed so the -following warning appears: - - WARNING: CPU: 0 PID: 0 at drivers/clk/ralink/clk-mtmips.c:499 rt3883_bus_recalc_rate+0x98/0x138 - Modules linked in: - CPU: 0 PID: 0 Comm: swapper Not tainted 6.6.43 #0 - Stack : 805e58d0 00000000 00000004 8004f950 00000000 00000004 00000000 00000000 - 80669c54 80830000 80700000 805ae570 80670068 00000001 80669bf8 00000000 - 00000000 00000000 805ae570 80669b38 00000020 804db7dc 00000000 00000000 - 203a6d6d 80669b78 80669e48 70617773 00000000 805ae570 00000000 00000009 - 00000000 00000001 00000004 00000001 00000000 00000000 83fe43b0 00000000 - ... - Call Trace: - [<800065d0>] show_stack+0x64/0xf4 - [<804bca14>] dump_stack_lvl+0x38/0x60 - [<800218ac>] __warn+0x94/0xe4 - [<8002195c>] warn_slowpath_fmt+0x60/0x94 - [<80259ff8>] rt3883_bus_recalc_rate+0x98/0x138 - [<80254530>] __clk_register+0x568/0x688 - [<80254838>] of_clk_hw_register+0x18/0x2c - [<8070b910>] rt2880_clk_of_clk_init_driver+0x18c/0x594 - [<8070b628>] of_clk_init+0x1c0/0x23c - [<806fc448>] plat_time_init+0x58/0x18c - [<806fdaf0>] time_init+0x10/0x6c - [<806f9bc4>] start_kernel+0x458/0x67c - - ---[ end trace 0000000000000000 ]--- - -When this driver was mainlined we could not find any active users of old -ralink SoCs so we cannot perform any real tests for them. Now, one user -of a Belkin f9k1109 version 1 device which uses RT3883 SoC appeared and -reported some issues in openWRT: -- https://github.com/openwrt/openwrt/issues/16054 - -Thus, define a 'rt2880_xtal_recalc_rate()' just returning the expected -frequency 40Mhz and use it along the old ralink SoCs to have a correct -boot trace with no warnings and a working clock plan from the beggining. - -Fixes: 6f3b15586eef ("clk: ralink: add clock and reset driver for MTMIPS SoCs") -Signed-off-by: Sergio Paracuellos -Link: https://lore.kernel.org/r/20240910044024.120009-3-sergio.paracuellos@gmail.com -Signed-off-by: Stephen Boyd ---- - drivers/clk/ralink/clk-mtmips.c | 21 +++++++++++++-------- - 1 file changed, 13 insertions(+), 8 deletions(-) - ---- a/drivers/clk/ralink/clk-mtmips.c -+++ b/drivers/clk/ralink/clk-mtmips.c -@@ -263,10 +263,6 @@ err_clk_unreg: - .rate = _rate \ - } - --static struct mtmips_clk_fixed rt305x_fixed_clocks[] = { -- CLK_FIXED("xtal", NULL, 40000000) --}; -- - static struct mtmips_clk_fixed rt3883_fixed_clocks[] = { - CLK_FIXED("xtal", NULL, 40000000), - CLK_FIXED("periph", "xtal", 40000000) -@@ -371,6 +367,12 @@ static inline struct mtmips_clk *to_mtmi - return container_of(hw, struct mtmips_clk, hw); - } - -+static unsigned long rt2880_xtal_recalc_rate(struct clk_hw *hw, -+ unsigned long parent_rate) -+{ -+ return 40000000; -+} -+ - static unsigned long rt5350_xtal_recalc_rate(struct clk_hw *hw, - unsigned long parent_rate) - { -@@ -682,10 +684,12 @@ static unsigned long mt76x8_cpu_recalc_r - } - - static struct mtmips_clk rt2880_clks_base[] = { -+ { CLK_BASE("xtal", NULL, rt2880_xtal_recalc_rate) }, - { CLK_BASE("cpu", "xtal", rt2880_cpu_recalc_rate) } - }; - - static struct mtmips_clk rt305x_clks_base[] = { -+ { CLK_BASE("xtal", NULL, rt2880_xtal_recalc_rate) }, - { CLK_BASE("cpu", "xtal", rt305x_cpu_recalc_rate) } - }; - -@@ -695,6 +699,7 @@ static struct mtmips_clk rt3352_clks_bas - }; - - static struct mtmips_clk rt3883_clks_base[] = { -+ { CLK_BASE("xtal", NULL, rt2880_xtal_recalc_rate) }, - { CLK_BASE("cpu", "xtal", rt3883_cpu_recalc_rate) }, - { CLK_BASE("bus", "cpu", rt3883_bus_recalc_rate) } - }; -@@ -751,8 +756,8 @@ err_clk_unreg: - static const struct mtmips_clk_data rt2880_clk_data = { - .clk_base = rt2880_clks_base, - .num_clk_base = ARRAY_SIZE(rt2880_clks_base), -- .clk_fixed = rt305x_fixed_clocks, -- .num_clk_fixed = ARRAY_SIZE(rt305x_fixed_clocks), -+ .clk_fixed = NULL, -+ .num_clk_fixed = 0, - .clk_factor = rt2880_factor_clocks, - .num_clk_factor = ARRAY_SIZE(rt2880_factor_clocks), - .clk_periph = rt2880_pherip_clks, -@@ -762,8 +767,8 @@ static const struct mtmips_clk_data rt28 - static const struct mtmips_clk_data rt305x_clk_data = { - .clk_base = rt305x_clks_base, - .num_clk_base = ARRAY_SIZE(rt305x_clks_base), -- .clk_fixed = rt305x_fixed_clocks, -- .num_clk_fixed = ARRAY_SIZE(rt305x_fixed_clocks), -+ .clk_fixed = NULL, -+ .num_clk_fixed = 0, - .clk_factor = rt305x_factor_clocks, - .num_clk_factor = ARRAY_SIZE(rt305x_factor_clocks), - .clk_periph = rt305x_pherip_clks, diff --git a/target/linux/ramips/patches-6.6/311-MIPS-use-set_mode-to-enable-disable-the-cevt-r4k-irq.patch b/target/linux/ramips/patches-6.6/311-MIPS-use-set_mode-to-enable-disable-the-cevt-r4k-irq.patch index d59a71af88b0a9..3162d669e1dd49 100644 --- a/target/linux/ramips/patches-6.6/311-MIPS-use-set_mode-to-enable-disable-the-cevt-r4k-irq.patch +++ b/target/linux/ramips/patches-6.6/311-MIPS-use-set_mode-to-enable-disable-the-cevt-r4k-irq.patch @@ -96,7 +96,7 @@ Signed-off-by: John Crispin } --- a/drivers/clocksource/Kconfig +++ b/drivers/clocksource/Kconfig -@@ -731,10 +731,15 @@ config GOLDFISH_TIMER +@@ -732,10 +732,15 @@ config GOLDFISH_TIMER depends on RTC_DRV_GOLDFISH help Support for the timer/counter of goldfish-rtc diff --git a/target/linux/ramips/patches-6.6/810-uvc-add-iPassion-iP2970-support.patch b/target/linux/ramips/patches-6.6/810-uvc-add-iPassion-iP2970-support.patch index 71adf6600f61ce..efc2763880f04e 100644 --- a/target/linux/ramips/patches-6.6/810-uvc-add-iPassion-iP2970-support.patch +++ b/target/linux/ramips/patches-6.6/810-uvc-add-iPassion-iP2970-support.patch @@ -13,7 +13,7 @@ Signed-off-by: John Crispin --- a/drivers/media/usb/uvc/uvc_driver.c +++ b/drivers/media/usb/uvc/uvc_driver.c -@@ -3183,6 +3183,18 @@ static const struct usb_device_id uvc_id +@@ -3229,6 +3229,18 @@ static const struct usb_device_id uvc_id .bInterfaceSubClass = 1, .bInterfaceProtocol = 0, .driver_info = UVC_INFO_META(V4L2_META_FMT_D4XX) }, diff --git a/target/linux/starfive/patches-6.6/0003-clocksource-Add-JH7110-timer-driver.patch b/target/linux/starfive/patches-6.6/0003-clocksource-Add-JH7110-timer-driver.patch index 68b9c38d5bb250..b4398ef146858f 100644 --- a/target/linux/starfive/patches-6.6/0003-clocksource-Add-JH7110-timer-driver.patch +++ b/target/linux/starfive/patches-6.6/0003-clocksource-Add-JH7110-timer-driver.patch @@ -15,7 +15,7 @@ Signed-off-by: Xingyu Wu --- a/drivers/clocksource/Kconfig +++ b/drivers/clocksource/Kconfig -@@ -641,6 +641,17 @@ config RISCV_TIMER +@@ -642,6 +642,17 @@ config RISCV_TIMER is accessed via both the SBI and the rdcycle instruction. This is required for all RISC-V systems. diff --git a/target/linux/starfive/patches-6.6/0033-PCI-Add-PCIE_RESET_CONFIG_DEVICE_WAIT_MS-waiting-tim.patch b/target/linux/starfive/patches-6.6/0033-PCI-Add-PCIE_RESET_CONFIG_DEVICE_WAIT_MS-waiting-tim.patch index cc50dfe68e81c9..ff089604681845 100644 --- a/target/linux/starfive/patches-6.6/0033-PCI-Add-PCIE_RESET_CONFIG_DEVICE_WAIT_MS-waiting-tim.patch +++ b/target/linux/starfive/patches-6.6/0033-PCI-Add-PCIE_RESET_CONFIG_DEVICE_WAIT_MS-waiting-tim.patch @@ -30,7 +30,7 @@ Acked-by: Bjorn Helgaas --- a/drivers/pci/pci.h +++ b/drivers/pci/pci.h -@@ -19,6 +19,22 @@ +@@ -22,6 +22,22 @@ */ #define PCIE_PME_TO_L2_TIMEOUT_US 10000 diff --git a/target/linux/starfive/patches-6.6/0072-drivers-nvme-Add-precheck-and-delay-for-CQE-pending-.patch b/target/linux/starfive/patches-6.6/0072-drivers-nvme-Add-precheck-and-delay-for-CQE-pending-.patch index d602df9e4c3c10..7b768a9bc5a09f 100644 --- a/target/linux/starfive/patches-6.6/0072-drivers-nvme-Add-precheck-and-delay-for-CQE-pending-.patch +++ b/target/linux/starfive/patches-6.6/0072-drivers-nvme-Add-precheck-and-delay-for-CQE-pending-.patch @@ -22,7 +22,7 @@ Signed-off-by: Kevin.xie #include "trace.h" #include "nvme.h" -@@ -1062,6 +1063,15 @@ static inline int nvme_poll_cq(struct nv +@@ -1058,6 +1059,15 @@ static inline int nvme_poll_cq(struct nv { int found = 0; diff --git a/target/linux/starfive/patches-6.6/0109-usb-xhci-To-improve-performance-usb-using-lowmem-for.patch b/target/linux/starfive/patches-6.6/0109-usb-xhci-To-improve-performance-usb-using-lowmem-for.patch index 44c6fe6126802f..febc6bac4e8500 100644 --- a/target/linux/starfive/patches-6.6/0109-usb-xhci-To-improve-performance-usb-using-lowmem-for.patch +++ b/target/linux/starfive/patches-6.6/0109-usb-xhci-To-improve-performance-usb-using-lowmem-for.patch @@ -160,7 +160,7 @@ Signed-off-by: minda.chen } --- a/drivers/usb/host/xhci-ring.c +++ b/drivers/usb/host/xhci-ring.c -@@ -3664,7 +3664,8 @@ int xhci_queue_bulk_tx(struct xhci_hcd * +@@ -3672,7 +3672,8 @@ int xhci_queue_bulk_tx(struct xhci_hcd * full_len = urb->transfer_buffer_length; /* If we have scatter/gather list, we use it. */ From 15e173bf7e873d004d6c665ee81d54a10ce1f868 Mon Sep 17 00:00:00 2001 From: John Audia Date: Thu, 12 Dec 2024 08:19:59 -0500 Subject: [PATCH 13/43] kernel: bump 6.6 to 6.6.65 Changelog: https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.6.65 Update to checksum only/no patches required a rebase. Per the changelog, this is a trivial upstream bump with only 4 commits, 2 of which being reverts. Build system: x86/64 Build-tested: x86/64/AMD Cezanne Run-tested: x86/64/AMD Cezanne Signed-off-by: John Audia Link: https://github.com/openwrt/openwrt/pull/17217 Signed-off-by: Robert Marko --- include/kernel-6.6 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/kernel-6.6 b/include/kernel-6.6 index ddbef67f942d28..875c715ba4b6f4 100644 --- a/include/kernel-6.6 +++ b/include/kernel-6.6 @@ -1,2 +1,2 @@ -LINUX_VERSION-6.6 = .64 -LINUX_KERNEL_HASH-6.6.64 = 065fd93fa6cb422f650fb563f15d3e0107c85009f766405993d795fd39796ab1 +LINUX_VERSION-6.6 = .65 +LINUX_KERNEL_HASH-6.6.65 = 7ae1476e8b4c86e7754e581d45d6fbce5932bfefce934758a2907d6d79eca3e0 From 3c7134fa320b823ab7c5f91dd1ad948491d97478 Mon Sep 17 00:00:00 2001 From: Andre Heider Date: Sat, 14 Dec 2024 11:27:09 +0100 Subject: [PATCH 14/43] base-files: fix shell scope error for the default LED brightness This fixes "sh: write error: Invalid argument" for all default!=1 LEDs as an empty $brightness was used. Setting up LEDs via luci also now works again. Fixes cbdfd03e: "base-files: add option to set LED brightness" Signed-off-by: Andre Heider Link: https://github.com/openwrt/openwrt/issues/17269 Signed-off-by: John Crispin --- package/base-files/files/etc/init.d/led | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/package/base-files/files/etc/init.d/led b/package/base-files/files/etc/init.d/led index d292e2a8dd1557..79fdd452cecc03 100755 --- a/package/base-files/files/etc/init.d/led +++ b/package/base-files/files/etc/init.d/led @@ -106,9 +106,10 @@ load_led() { [ "$default" = 0 ] && echo 0 >/sys/class/leds/${sysfs}/brightness - [ $default = 1 ] && - [ -z "$brightness" ] && brightness=$(cat /sys/class/leds/${sysfs}/max_brightness) - echo $brightness > /sys/class/leds/${sysfs}/brightness + [ "$default" = 1 ] && { + [ -z "$brightness" ] && brightness="$(cat /sys/class/leds/${sysfs}/max_brightness)" + echo "$brightness" > /sys/class/leds/${sysfs}/brightness + } led_color_set "$1" "$sysfs" From 5a24850de1418510c421d45eb2436bdcb2b243c6 Mon Sep 17 00:00:00 2001 From: Shiji Yang Date: Sat, 14 Dec 2024 12:11:24 +0800 Subject: [PATCH 15/43] ramips: fix 2.4G wmac eeprom offset for TL-WR902AC v4 The eeprom data offset on 2.4GHz wmac is wrong. It is obvious that this is a copy & paste issue. Suggested-by: @cgm999 on https://github.com/openwrt/openwrt/issues/13969 Signed-off-by: Shiji Yang Link: https://github.com/openwrt/openwrt/pull/17263 Signed-off-by: Hauke Mehrtens --- target/linux/ramips/dts/mt7628an_tplink_tl-wr902ac-v4.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/linux/ramips/dts/mt7628an_tplink_tl-wr902ac-v4.dts b/target/linux/ramips/dts/mt7628an_tplink_tl-wr902ac-v4.dts index 946efb9443e8aa..a2dd4ce5cb8719 100644 --- a/target/linux/ramips/dts/mt7628an_tplink_tl-wr902ac-v4.dts +++ b/target/linux/ramips/dts/mt7628an_tplink_tl-wr902ac-v4.dts @@ -108,7 +108,7 @@ &wmac { status = "okay"; - nvmem-cells = <&eeprom_factory_28000>, <&macaddr_factory_f100 0>; + nvmem-cells = <&eeprom_factory_20000>, <&macaddr_factory_f100 0>; nvmem-cell-names = "eeprom", "mac-address"; }; From 96eb12e961748373a38738de92f5ef1a87f0cc75 Mon Sep 17 00:00:00 2001 From: Shiji Yang Date: Thu, 12 Dec 2024 22:40:08 +0800 Subject: [PATCH 16/43] ath79: fix ath9k calibration data size for AR9132 For ath9k NICs older than AR9287, The eeprom size is 0xeb8. Fixes: https://github.com/openwrt/openwrt/issues/17196 Fixes: 74f2df9dbccd ("ath79: mtd-cal-data removals") Signed-off-by: Shiji Yang Link: https://github.com/openwrt/openwrt/pull/17261 Signed-off-by: Hauke Mehrtens --- target/linux/ath79/dts/ar9132_buffalo_wzr-hp-g300nh.dtsi | 2 +- target/linux/ath79/dts/ar9132_tplink_tl-wa901nd-v2.dts | 2 +- target/linux/ath79/dts/ar9132_tplink_tl-wr1043nd-v1.dts | 2 +- target/linux/ath79/dts/ar9132_tplink_tl-wr941-v2.dts | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/target/linux/ath79/dts/ar9132_buffalo_wzr-hp-g300nh.dtsi b/target/linux/ath79/dts/ar9132_buffalo_wzr-hp-g300nh.dtsi index a82546c1c1395e..474d0fa80f74cd 100644 --- a/target/linux/ath79/dts/ar9132_buffalo_wzr-hp-g300nh.dtsi +++ b/target/linux/ath79/dts/ar9132_buffalo_wzr-hp-g300nh.dtsi @@ -145,7 +145,7 @@ #size-cells = <1>; cal_art_11000: calibration@11000 { - reg = <0x11000 0x440>; + reg = <0x11000 0xeb8>; }; macaddr_art_1120c: macaddr@1120c { diff --git a/target/linux/ath79/dts/ar9132_tplink_tl-wa901nd-v2.dts b/target/linux/ath79/dts/ar9132_tplink_tl-wa901nd-v2.dts index ed4ca5297e7f5c..3fcc4073fea630 100644 --- a/target/linux/ath79/dts/ar9132_tplink_tl-wa901nd-v2.dts +++ b/target/linux/ath79/dts/ar9132_tplink_tl-wa901nd-v2.dts @@ -104,7 +104,7 @@ #size-cells = <1>; cal_art_1000: calibration@1000 { - reg = <0x1000 0x440>; + reg = <0x1000 0xeb8>; }; }; }; diff --git a/target/linux/ath79/dts/ar9132_tplink_tl-wr1043nd-v1.dts b/target/linux/ath79/dts/ar9132_tplink_tl-wr1043nd-v1.dts index 8958ddd3a83b3f..847d4d4c47def9 100644 --- a/target/linux/ath79/dts/ar9132_tplink_tl-wr1043nd-v1.dts +++ b/target/linux/ath79/dts/ar9132_tplink_tl-wr1043nd-v1.dts @@ -131,7 +131,7 @@ #size-cells = <1>; cal_art_1000: calibration@1000 { - reg = <0x1000 0x440>; + reg = <0x1000 0xeb8>; }; }; }; diff --git a/target/linux/ath79/dts/ar9132_tplink_tl-wr941-v2.dts b/target/linux/ath79/dts/ar9132_tplink_tl-wr941-v2.dts index d3f189479a8b8e..3ad058e9597350 100644 --- a/target/linux/ath79/dts/ar9132_tplink_tl-wr941-v2.dts +++ b/target/linux/ath79/dts/ar9132_tplink_tl-wr941-v2.dts @@ -153,7 +153,7 @@ #size-cells = <1>; cal_art_1000: calibration@1000 { - reg = <0x1000 0x440>; + reg = <0x1000 0xeb8>; }; }; }; From a3c484c3b9468a7bd9190b0fee027bb133cee3d5 Mon Sep 17 00:00:00 2001 From: John Audia Date: Sun, 15 Dec 2024 09:30:52 -0500 Subject: [PATCH 17/43] kernel: generic: tg3: Fix DMA allocations on 57766 devices At the request of rsalvaterra, add this patch to fix an issue affecting tg3 ethernet interfaces[1]. 1. https://github.com/openwrt/openwrt/pull/17271#issuecomment-2543836518 Tested-by: Rui Salvaterra Signed-off-by: John Audia Link: https://github.com/openwrt/openwrt/pull/17282 Signed-off-by: Hauke Mehrtens --- ...Fix-DMA-allocations-on-57766-devices.patch | 31 +++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 target/linux/generic/pending-6.6/791-tg3-Fix-DMA-allocations-on-57766-devices.patch diff --git a/target/linux/generic/pending-6.6/791-tg3-Fix-DMA-allocations-on-57766-devices.patch b/target/linux/generic/pending-6.6/791-tg3-Fix-DMA-allocations-on-57766-devices.patch new file mode 100644 index 00000000000000..a90d77c9f0440a --- /dev/null +++ b/target/linux/generic/pending-6.6/791-tg3-Fix-DMA-allocations-on-57766-devices.patch @@ -0,0 +1,31 @@ +From f992b15965177e2f280fb6f41f292214f9a6f8d5 Mon Sep 17 00:00:00 2001 +From: Pavan Chebbi +Date: Tue, 10 Dec 2024 03:28:31 -0800 +Subject: [PATCH] tg3: Fix DMA allocations on 57766 devices + +The coherent DMA mask of 31b may not be accepted if +the DMA mask is configured to use higher memories of +64b. Set the DMA mask also to lower 32b for 57766 +devices. + +Fixes: 614f4d166eee ("tg3: Set coherent DMA mask bits to 31 for BCM57766 chipsets") +Reported-By: Rui Salvaterra +Signed-off-by: Pavan Chebbi +--- + drivers/net/ethernet/broadcom/tg3.c | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +--- a/drivers/net/ethernet/broadcom/tg3.c ++++ b/drivers/net/ethernet/broadcom/tg3.c +@@ -17731,8 +17731,10 @@ static int tg3_init_one(struct pci_dev * + } else + persist_dma_mask = dma_mask = DMA_BIT_MASK(64); + +- if (tg3_asic_rev(tp) == ASIC_REV_57766) ++ if (tg3_asic_rev(tp) == ASIC_REV_57766) { ++ dma_mask = DMA_BIT_MASK(32); + persist_dma_mask = DMA_BIT_MASK(31); ++ } + + /* Configure DMA attributes. */ + if (dma_mask > DMA_BIT_MASK(32)) { From e63326e26a82cb083eec602b3a2f71d4cd8e2ea4 Mon Sep 17 00:00:00 2001 From: Andrew MacIntyre Date: Fri, 29 Nov 2024 17:06:02 +1100 Subject: [PATCH 18/43] lantiq/xrx200: move 8M flash devices to a small flash subtarget Images for xrx200 8M flash are either not building due to image size (TD-W8970, TD-W8980) or building such that the available free space in the overlayfs is too little to be useful. To keep images for these devices buildable, move them into a small flash variant of the xrx200 subtarget. As these devices are NOR flash only, remove NAND and UBI references from the kernel config to gain some additional image size reduction. The apparent 8M flash devices Arcadyan VGV7510KW22-brn, Arcadyan VGV7519-brn and Lantiq Easy80920-nor seem to exist in order to create special "factory" installation images for these devices (which actually have larger flash: 16MB for the Arcardyan devices; 64MB for the Lantiq device). As a considerable amount of surgery would appear to be required to the uboot-lantiq package structure to separate the "factory" from the "sysupgrade" device recipes for these devices they remain in the xrx200 target - if factory images aren't now created, 23.05.x factory images should suffice for initial installation. Tested on: Netgear DM200, TP-Link TD-W8980, AVM Fritz7490 (xrx200 subtarget: image build only) Fixes: https://github.com/openwrt/openwrt/issues/16761 Signed-off-by: Andrew MacIntyre Link: https://github.com/openwrt/openwrt/pull/17113 Signed-off-by: Hauke Mehrtens --- .../lantiq/dsl-vrx200-firmware-xdsl/Makefile | 8 +- package/kernel/lantiq/ltq-atm/Makefile | 2 +- package/kernel/lantiq/ltq-deu/Makefile | 8 +- package/kernel/lantiq/ltq-ptm/Makefile | 10 +-- package/kernel/lantiq/ltq-vdsl-fw/Makefile | 2 +- .../kernel/lantiq/ltq-vdsl-vr9-mei/Makefile | 4 +- package/kernel/lantiq/ltq-vdsl-vr9/Makefile | 2 +- package/kernel/lantiq/ltq-vectoring/Makefile | 4 +- .../network/config/ltq-vdsl-vr9-app/Makefile | 2 +- target/linux/lantiq/Makefile | 2 +- target/linux/lantiq/image/Makefile | 6 ++ target/linux/lantiq/image/tp-link.mk | 28 ------ target/linux/lantiq/image/tp-link_legacy.mk | 46 ++++++++++ target/linux/lantiq/image/vr9.mk | 37 -------- target/linux/lantiq/image/vr9_legacy.mk | 43 ++++++++++ .../xrx200/base-files/etc/board.d/01_leds | 3 - .../xrx200/base-files/etc/board.d/02_network | 22 +---- .../etc/hotplug.d/firmware/12-ath9k-eeprom | 4 - .../etc/uci-defaults/01_led_migration | 2 - .../base-files/etc/board.d/01_leds | 34 ++++++++ .../base-files/etc/board.d/02_network | 75 ++++++++++++++++ .../base-files/etc/board.d/05_compat-version | 18 ++++ .../etc/hotplug.d/firmware/12-ath9k-eeprom | 23 +++++ .../etc/uci-defaults/01_led_migration | 31 +++++++ .../base-files/lib/upgrade/platform.sh | 16 ++++ target/linux/lantiq/xrx200_legacy/config-6.6 | 86 +++++++++++++++++++ .../xrx200_legacy/profiles/00-default.mk | 9 ++ target/linux/lantiq/xrx200_legacy/target.mk | 22 +++++ 28 files changed, 432 insertions(+), 117 deletions(-) create mode 100644 target/linux/lantiq/image/tp-link_legacy.mk create mode 100644 target/linux/lantiq/image/vr9_legacy.mk create mode 100644 target/linux/lantiq/xrx200_legacy/base-files/etc/board.d/01_leds create mode 100644 target/linux/lantiq/xrx200_legacy/base-files/etc/board.d/02_network create mode 100644 target/linux/lantiq/xrx200_legacy/base-files/etc/board.d/05_compat-version create mode 100644 target/linux/lantiq/xrx200_legacy/base-files/etc/hotplug.d/firmware/12-ath9k-eeprom create mode 100644 target/linux/lantiq/xrx200_legacy/base-files/etc/uci-defaults/01_led_migration create mode 100755 target/linux/lantiq/xrx200_legacy/base-files/lib/upgrade/platform.sh create mode 100644 target/linux/lantiq/xrx200_legacy/config-6.6 create mode 100644 target/linux/lantiq/xrx200_legacy/profiles/00-default.mk create mode 100644 target/linux/lantiq/xrx200_legacy/target.mk diff --git a/package/firmware/lantiq/dsl-vrx200-firmware-xdsl/Makefile b/package/firmware/lantiq/dsl-vrx200-firmware-xdsl/Makefile index 37db950beae54f..b6e1d11efc60a6 100644 --- a/package/firmware/lantiq/dsl-vrx200-firmware-xdsl/Makefile +++ b/package/firmware/lantiq/dsl-vrx200-firmware-xdsl/Makefile @@ -40,7 +40,7 @@ define Package/dsl-vrx200-firmware-xdsl-a CATEGORY:=Firmware TITLE:=VRX200 / VR9 CPE xDSL Annex A firmware URL:=http://www.lantiq.com/ - DEPENDS:=@TARGET_lantiq_xrx200 + DEPENDS:=@(TARGET_lantiq_xrx200||TARGET_lantiq_xrx200_legacy) endef define Package/dsl-vrx200-firmware-xdsl-a/description @@ -52,7 +52,7 @@ define Package/dsl-vrx200-firmware-xdsl-b CATEGORY:=Firmware TITLE:=VRX200 / VR9 CPE xDSL Annex B firmware URL:=http://www.lantiq.com/ - DEPENDS:=@TARGET_lantiq_xrx200 + DEPENDS:=@(TARGET_lantiq_xrx200||TARGET_lantiq_xrx200_legacy) endef define Package/dsl-vrx200-firmware-xdsl-b/description @@ -64,7 +64,7 @@ define Package/dsl-vrx200-firmware-xdsl-a-patch CATEGORY:=Firmware TITLE:=VRX200 / VR9 CPE xDSL Annex B to Annex A firmware patch URL:=http://www.lantiq.com/ - DEPENDS:=@TARGET_lantiq_xrx200 +dsl-vrx200-firmware-xdsl-b +bspatch + DEPENDS:=@(TARGET_lantiq_xrx200||TARGET_lantiq_xrx200_legacy) +dsl-vrx200-firmware-xdsl-b +bspatch endef define Package/dsl-vrx200-firmware-xdsl-a-patch/description @@ -76,7 +76,7 @@ define Package/dsl-vrx200-firmware-xdsl-b-patch CATEGORY:=Firmware TITLE:=VRX200 / VR9 CPE xDSL Annex A to Annex B firmware patch URL:=http://www.lantiq.com/ - DEPENDS:=@TARGET_lantiq_xrx200 +dsl-vrx200-firmware-xdsl-a +bspatch + DEPENDS:=@(TARGET_lantiq_xrx200||TARGET_lantiq_xrx200_legacy) +dsl-vrx200-firmware-xdsl-a +bspatch endef define Package/dsl-vrx200-firmware-xdsl-b-patch/description diff --git a/package/kernel/lantiq/ltq-atm/Makefile b/package/kernel/lantiq/ltq-atm/Makefile index b81f3bb2938224..ca19c5052e9b24 100644 --- a/package/kernel/lantiq/ltq-atm/Makefile +++ b/package/kernel/lantiq/ltq-atm/Makefile @@ -33,7 +33,7 @@ endef KernelPackage/ltq-atm-danube=$(call KernelPackage/ltq-atm-template,danube,(TARGET_lantiq_xway||TARGET_lantiq_xway_legacy)) KernelPackage/ltq-atm-ar9=$(call KernelPackage/ltq-atm-template,ar9,TARGET_lantiq_xway) KernelPackage/ltq-atm-ase=$(call KernelPackage/ltq-atm-template,ase,TARGET_lantiq_ase) -KernelPackage/ltq-atm-vr9=$(call KernelPackage/ltq-atm-template,vr9,TARGET_lantiq_xrx200) +KernelPackage/ltq-atm-vr9=$(call KernelPackage/ltq-atm-template,vr9,(TARGET_lantiq_xrx200||TARGET_lantiq_xrx200_legacy)) define Build/Configure endef diff --git a/package/kernel/lantiq/ltq-deu/Makefile b/package/kernel/lantiq/ltq-deu/Makefile index 4e8127afabb986..96414bf186f696 100644 --- a/package/kernel/lantiq/ltq-deu/Makefile +++ b/package/kernel/lantiq/ltq-deu/Makefile @@ -21,14 +21,14 @@ define KernelPackage/ltq-deu-template TITLE:=deu driver for $(1) URL:=http://www.lantiq.com/ VARIANT:=$(1) - DEPENDS:=@TARGET_lantiq_$(2) +kmod-crypto-manager +kmod-crypto-des + DEPENDS:=@$(2) +kmod-crypto-manager +kmod-crypto-des FILES:=$(PKG_BUILD_DIR)/ltq_deu_$(1).ko AUTOLOAD:=$(call AutoProbe,ltq_deu_$(1)) endef -KernelPackage/ltq-deu-danube=$(call KernelPackage/ltq-deu-template,danube,xway) -KernelPackage/ltq-deu-ar9=$(call KernelPackage/ltq-deu-template,ar9,xway) -KernelPackage/ltq-deu-vr9=$(call KernelPackage/ltq-deu-template,vr9,xrx200) +KernelPackage/ltq-deu-danube=$(call KernelPackage/ltq-deu-template,danube,TARGET_lantiq_xway) +KernelPackage/ltq-deu-ar9=$(call KernelPackage/ltq-deu-template,ar9,TARGET_lantiq_xway) +KernelPackage/ltq-deu-vr9=$(call KernelPackage/ltq-deu-template,vr9,(TARGET_lantiq_xrx200||TARGET_lantiq_xrx200_legacy)) define Build/Configure endef diff --git a/package/kernel/lantiq/ltq-ptm/Makefile b/package/kernel/lantiq/ltq-ptm/Makefile index 03b121887470d0..c3ab47c1b3e5fb 100644 --- a/package/kernel/lantiq/ltq-ptm/Makefile +++ b/package/kernel/lantiq/ltq-ptm/Makefile @@ -22,7 +22,7 @@ define KernelPackage/ltq-ptm-template TITLE:=ptm driver for $(1) URL:=http://www.lantiq.com/ VARIANT:=$(1) - DEPENDS:=@TARGET_lantiq_$(2) + DEPENDS:=@$(2) ifeq ($(1),vr9) DEPENDS+= +PACKAGE_kmod-ltq-ptm-$(1):kmod-ltq-vdsl-vr9-mei else @@ -34,10 +34,10 @@ endif FILES:=$(PKG_BUILD_DIR)/ltq_ptm_$(1).ko endef -KernelPackage/ltq-ptm-danube=$(call KernelPackage/ltq-ptm-template,danube,xway) -KernelPackage/ltq-ptm-ar9=$(call KernelPackage/ltq-ptm-template,ar9,xway) -KernelPackage/ltq-ptm-ase=$(call KernelPackage/ltq-ptm-template,ase,ase) -KernelPackage/ltq-ptm-vr9=$(call KernelPackage/ltq-ptm-template,vr9,xrx200) +KernelPackage/ltq-ptm-danube=$(call KernelPackage/ltq-ptm-template,danube,TARGET_lantiq_xway) +KernelPackage/ltq-ptm-ar9=$(call KernelPackage/ltq-ptm-template,ar9,TARGET_lantiq_xway) +KernelPackage/ltq-ptm-ase=$(call KernelPackage/ltq-ptm-template,ase,TARGET_lantiq_ase) +KernelPackage/ltq-ptm-vr9=$(call KernelPackage/ltq-ptm-template,vr9,(TARGET_lantiq_xrx200||TARGET_lantiq_xrx200_legacy)) define Build/Configure endef diff --git a/package/kernel/lantiq/ltq-vdsl-fw/Makefile b/package/kernel/lantiq/ltq-vdsl-fw/Makefile index 88883ffdee0f4a..61833e018c28db 100644 --- a/package/kernel/lantiq/ltq-vdsl-fw/Makefile +++ b/package/kernel/lantiq/ltq-vdsl-fw/Makefile @@ -19,7 +19,7 @@ define Package/ltq-vdsl-vr9-vectoring-fw-installer TITLE:=VDSL2 Vectoring Firmware installer SECTION:=net CATEGORY:=Network - DEPENDS:=@TARGET_lantiq_xrx200 +kmod-ltq-vdsl-vr9 + DEPENDS:=@(TARGET_lantiq_xrx200||TARGET_lantiq_xrx200_legacy) +kmod-ltq-vdsl-vr9 endef define Build/Prepare diff --git a/package/kernel/lantiq/ltq-vdsl-vr9-mei/Makefile b/package/kernel/lantiq/ltq-vdsl-vr9-mei/Makefile index e9c5a681fd0098..9b3dac299feac1 100644 --- a/package/kernel/lantiq/ltq-vdsl-vr9-mei/Makefile +++ b/package/kernel/lantiq/ltq-vdsl-vr9-mei/Makefile @@ -29,7 +29,7 @@ define KernelPackage/ltq-vdsl-vr9-mei TITLE:=mei driver for vdsl SECTION:=sys SUBMENU:=Network Devices - DEPENDS:=@TARGET_lantiq_xrx200 +kmod-ltq-ifxos +kmod-ltq-vectoring + DEPENDS:=@(TARGET_lantiq_xrx200||TARGET_lantiq_xrx200_legacy) +kmod-ltq-ifxos +kmod-ltq-vectoring FILES:=$(PKG_BUILD_DIR)/src/drv_mei_cpe.ko AUTOLOAD:=$(call AutoLoad,50,drv_mei_cpe) endef @@ -44,7 +44,7 @@ define Package/ltq-vdsl-vr9-mei-test CATEGORY:=Network TITLE:=Lantiq mei driver test tool URL:=http://www.lantiq.com/ - DEPENDS:=@TARGET_lantiq_xrx200 + DEPENDS:=@(TARGET_lantiq_xrx200||TARGET_lantiq_xrx200_legacy) endef define Package/ltq-vdsl-vr9-mei-test/description diff --git a/package/kernel/lantiq/ltq-vdsl-vr9/Makefile b/package/kernel/lantiq/ltq-vdsl-vr9/Makefile index ebcb935a739dc4..5a53c050d4bfc0 100644 --- a/package/kernel/lantiq/ltq-vdsl-vr9/Makefile +++ b/package/kernel/lantiq/ltq-vdsl-vr9/Makefile @@ -29,7 +29,7 @@ define KernelPackage/ltq-vdsl-vr9 TITLE:=vdsl driver SECTION:=sys SUBMENU:=Network Devices - DEPENDS:=@TARGET_lantiq_xrx200 +kmod-ltq-vdsl-vr9-mei + DEPENDS:=@(TARGET_lantiq_xrx200||TARGET_lantiq_xrx200_legacy) +kmod-ltq-vdsl-vr9-mei FILES:=$(PKG_BUILD_DIR)/src/drv_dsl_cpe_api.ko AUTOLOAD:=$(call AutoLoad,51,drv_dsl_cpe_api) endef diff --git a/package/kernel/lantiq/ltq-vectoring/Makefile b/package/kernel/lantiq/ltq-vectoring/Makefile index 6076df77428091..ea177942b48c59 100644 --- a/package/kernel/lantiq/ltq-vectoring/Makefile +++ b/package/kernel/lantiq/ltq-vectoring/Makefile @@ -20,7 +20,7 @@ define KernelPackage/ltq-vectoring CATEGORY:=Kernel modules SUBMENU:=Network Devices TITLE:=driver for sending vectoring error samples - DEPENDS:=@TARGET_lantiq_xrx200 + DEPENDS:=@(TARGET_lantiq_xrx200||TARGET_lantiq_xrx200_legacy) FILES:=$(PKG_BUILD_DIR)/$(MAKE_PATH)/ltq_vectoring.ko AUTOLOAD:=$(call AutoLoad,49,ltq_vectoring) endef @@ -38,7 +38,7 @@ define KernelPackage/ltq-vectoring-test CATEGORY:=Kernel modules SUBMENU:=Network Devices TITLE:=driver for testing the vectoring driver - DEPENDS:=@TARGET_lantiq_xrx200 +kmod-ltq-vectoring + DEPENDS:=@(TARGET_lantiq_xrx200||TARGET_lantiq_xrx200_legacy) +kmod-ltq-vectoring FILES:=$(PKG_BUILD_DIR)/$(MAKE_PATH)/ltq_vectoring_test.ko endef diff --git a/package/network/config/ltq-vdsl-vr9-app/Makefile b/package/network/config/ltq-vdsl-vr9-app/Makefile index 51b88231f7e4b8..a73cd4ae62ff74 100644 --- a/package/network/config/ltq-vdsl-vr9-app/Makefile +++ b/package/network/config/ltq-vdsl-vr9-app/Makefile @@ -29,7 +29,7 @@ define Package/ltq-vdsl-vr9-app CATEGORY:=Network TITLE:=Lantiq VDSL userland tool URL:=http://www.lantiq.com/ - DEPENDS:=@TARGET_lantiq_xrx200 +libpthread +librt +ltq-dsl-base +libubox +libubus + DEPENDS:=@(TARGET_lantiq_xrx200||TARGET_lantiq_xrx200_legacy) +libpthread +librt +ltq-dsl-base +libubox +libubus PROVIDES:=ltq-dsl-app endef diff --git a/target/linux/lantiq/Makefile b/target/linux/lantiq/Makefile index 69fa8276e754c2..e7a251a505cc02 100644 --- a/target/linux/lantiq/Makefile +++ b/target/linux/lantiq/Makefile @@ -7,7 +7,7 @@ include $(TOPDIR)/rules.mk BOARD:=lantiq BOARDNAME:=Lantiq FEATURES:=squashfs -SUBTARGETS:=xrx200 xway xway_legacy falcon ase +SUBTARGETS:=xrx200 xrx200_legacy xway xway_legacy falcon ase KERNEL_PATCHVER:=6.6 diff --git a/target/linux/lantiq/image/Makefile b/target/linux/lantiq/image/Makefile index 9fdb949392a156..307d47a979e55d 100644 --- a/target/linux/lantiq/image/Makefile +++ b/target/linux/lantiq/image/Makefile @@ -162,6 +162,12 @@ include danube.mk include ar9.mk endif +ifeq ($(SUBTARGET),xrx200_legacy) +DEFAULT_SOC := vr9 +include tp-link_legacy.mk +include vr9_legacy.mk +endif + ifeq ($(SUBTARGET),xrx200) DEFAULT_SOC := vr9 include tp-link.mk diff --git a/target/linux/lantiq/image/tp-link.mk b/target/linux/lantiq/image/tp-link.mk index 751f61589de8cf..c2f5b95dd6a015 100644 --- a/target/linux/lantiq/image/tp-link.mk +++ b/target/linux/lantiq/image/tp-link.mk @@ -17,34 +17,6 @@ define Device/lantiqTpLink check-size | append-metadata endef -define Device/tplink_tdw8970 - $(Device/dsa-migration) - $(Device/lantiqTpLink) - DEVICE_MODEL := TD-W8970 - DEVICE_VARIANT := v1 - TPLINK_FLASHLAYOUT := 8Mltq - TPLINK_HWID := 0x89700001 - TPLINK_HWREV := 1 - IMAGE_SIZE := 7680k - DEVICE_PACKAGES:= kmod-ath9k wpad-basic-mbedtls kmod-usb-dwc2 kmod-usb-ledtrig-usbport - SUPPORTED_DEVICES += TDW8970 -endef -TARGET_DEVICES += tplink_tdw8970 - -define Device/tplink_tdw8980 - $(Device/dsa-migration) - $(Device/lantiqTpLink) - DEVICE_MODEL := TD-W8980 - DEVICE_VARIANT := v1 - TPLINK_FLASHLAYOUT := 8Mltq - TPLINK_HWID := 0x89800001 - TPLINK_HWREV := 14 - IMAGE_SIZE := 7680k - DEVICE_PACKAGES:= kmod-ath9k kmod-owl-loader wpad-basic-mbedtls kmod-usb-dwc2 kmod-usb-ledtrig-usbport - SUPPORTED_DEVICES += TDW8980 -endef -TARGET_DEVICES += tplink_tdw8980 - define Device/tplink_vr200 $(Device/dsa-migration) $(Device/lantiqTpLink) diff --git a/target/linux/lantiq/image/tp-link_legacy.mk b/target/linux/lantiq/image/tp-link_legacy.mk new file mode 100644 index 00000000000000..d9bcd35d10f0de --- /dev/null +++ b/target/linux/lantiq/image/tp-link_legacy.mk @@ -0,0 +1,46 @@ +DEVICE_VARS += TPLINK_FLASHLAYOUT TPLINK_HWID TPLINK_HWREV TPLINK_HWREVADD TPLINK_HVERSION + +define Device/dsa-migration + DEVICE_COMPAT_VERSION := 1.1 + DEVICE_COMPAT_MESSAGE := Config cannot be migrated from swconfig to DSA +endef + +define Device/lantiqTpLink + DEVICE_VENDOR := TP-Link + TPLINK_HWREVADD := 0 + TPLINK_HVERSION := 2 + KERNEL := kernel-bin | append-dtb | lzma + KERNEL_INITRAMFS := kernel-bin | append-dtb | lzma | \ + tplink-v2-header -s -V "ver. 1.0" + IMAGES := sysupgrade.bin + IMAGE/sysupgrade.bin := tplink-v2-image -s -V "ver. 1.0" | \ + check-size | append-metadata +endef + +define Device/tplink_tdw8970 + $(Device/dsa-migration) + $(Device/lantiqTpLink) + DEVICE_MODEL := TD-W8970 + DEVICE_VARIANT := v1 + TPLINK_FLASHLAYOUT := 8Mltq + TPLINK_HWID := 0x89700001 + TPLINK_HWREV := 1 + IMAGE_SIZE := 7680k + DEVICE_PACKAGES:= kmod-ath9k wpad-basic-mbedtls kmod-usb-dwc2 kmod-usb-ledtrig-usbport + SUPPORTED_DEVICES += TDW8970 +endef +TARGET_DEVICES += tplink_tdw8970 + +define Device/tplink_tdw8980 + $(Device/dsa-migration) + $(Device/lantiqTpLink) + DEVICE_MODEL := TD-W8980 + DEVICE_VARIANT := v1 + TPLINK_FLASHLAYOUT := 8Mltq + TPLINK_HWID := 0x89800001 + TPLINK_HWREV := 14 + IMAGE_SIZE := 7680k + DEVICE_PACKAGES:= kmod-ath9k kmod-owl-loader wpad-basic-mbedtls kmod-usb-dwc2 kmod-usb-ledtrig-usbport + SUPPORTED_DEVICES += TDW8980 +endef +TARGET_DEVICES += tplink_tdw8980 diff --git a/target/linux/lantiq/image/vr9.mk b/target/linux/lantiq/image/vr9.mk index fe5b5a6bb50028..e2608213dc5f4f 100644 --- a/target/linux/lantiq/image/vr9.mk +++ b/target/linux/lantiq/image/vr9.mk @@ -5,17 +5,6 @@ define Device/dsa-migration DEVICE_COMPAT_MESSAGE := Config cannot be migrated from swconfig to DSA endef -define Device/alphanetworks_asl56026 - $(Device/dsa-migration) - DEVICE_VENDOR := Alpha - DEVICE_MODEL := ASL56026 - DEVICE_ALT0_VENDOR := BT Openreach - DEVICE_ALT0_MODEL := ECI VDSL Modem V-2FUb/I - IMAGE_SIZE := 7488k - DEFAULT := n -endef -TARGET_DEVICES += alphanetworks_asl56026 - define Device/arcadyan_arv7519rw22 $(Device/dsa-migration) DEVICE_VENDOR := Arcadyan @@ -33,16 +22,6 @@ define Device/arcadyan_arv7519rw22 endef TARGET_DEVICES += arcadyan_arv7519rw22 -define Device/arcadyan_vg3503j - $(Device/dsa-migration) - DEVICE_VENDOR := BT Openreach - DEVICE_MODEL := ECI VDSL Modem V-2FUb/R - IMAGE_SIZE := 8000k - SUPPORTED_DEVICES += VG3503J - DEFAULT := n -endef -TARGET_DEVICES += arcadyan_vg3503j - define Device/arcadyan_vgv7510kw22-brn $(Device/dsa-migration) $(Device/lantiqBrnImage) @@ -351,22 +330,6 @@ define Device/lantiq_easy80920-nor endef TARGET_DEVICES += lantiq_easy80920-nor -define Device/netgear_dm200 - $(Device/dsa-migration) - DEVICE_VENDOR := NETGEAR - DEVICE_MODEL := DM200 - IMAGES := sysupgrade.bin factory.img - IMAGE/sysupgrade.bin := append-kernel | \ - pad-offset 64k 64 | append-uImage-fakehdr filesystem | \ - pad-offset 64k 64 | append-uImage-fakehdr filesystem | \ - append-rootfs | pad-rootfs | check-size | append-metadata - IMAGE/factory.img := $$(IMAGE/sysupgrade.bin) | netgear-dni - IMAGE_SIZE := 7872k - NETGEAR_BOARD_ID := DM200 - NETGEAR_HW_ID := 29765233+8+0+64+0+0 -endef -TARGET_DEVICES += netgear_dm200 - define Device/zyxel_p-2812hnu-f1 $(Device/NAND) DEVICE_COMPAT_VERSION := 2.0 diff --git a/target/linux/lantiq/image/vr9_legacy.mk b/target/linux/lantiq/image/vr9_legacy.mk new file mode 100644 index 00000000000000..814fb515780312 --- /dev/null +++ b/target/linux/lantiq/image/vr9_legacy.mk @@ -0,0 +1,43 @@ +DEVICE_VARS += NETGEAR_BOARD_ID NETGEAR_HW_ID + +define Device/dsa-migration + DEVICE_COMPAT_VERSION := 1.1 + DEVICE_COMPAT_MESSAGE := Config cannot be migrated from swconfig to DSA +endef + +define Device/alphanetworks_asl56026 + $(Device/dsa-migration) + DEVICE_VENDOR := Alpha + DEVICE_MODEL := ASL56026 + DEVICE_ALT0_VENDOR := BT Openreach + DEVICE_ALT0_MODEL := ECI VDSL Modem V-2FUb/I + IMAGE_SIZE := 7488k + DEFAULT := n +endef +TARGET_DEVICES += alphanetworks_asl56026 + +define Device/arcadyan_vg3503j + $(Device/dsa-migration) + DEVICE_VENDOR := BT Openreach + DEVICE_MODEL := ECI VDSL Modem V-2FUb/R + IMAGE_SIZE := 8000k + SUPPORTED_DEVICES += VG3503J + DEFAULT := n +endef +TARGET_DEVICES += arcadyan_vg3503j + +define Device/netgear_dm200 + $(Device/dsa-migration) + DEVICE_VENDOR := NETGEAR + DEVICE_MODEL := DM200 + IMAGES := sysupgrade.bin factory.img + IMAGE/sysupgrade.bin := append-kernel | \ + pad-offset 64k 64 | append-uImage-fakehdr filesystem | \ + pad-offset 64k 64 | append-uImage-fakehdr filesystem | \ + append-rootfs | pad-rootfs | check-size | append-metadata + IMAGE/factory.img := $$(IMAGE/sysupgrade.bin) | netgear-dni + IMAGE_SIZE := 7872k + NETGEAR_BOARD_ID := DM200 + NETGEAR_HW_ID := 29765233+8+0+64+0+0 +endef +TARGET_DEVICES += netgear_dm200 diff --git a/target/linux/lantiq/xrx200/base-files/etc/board.d/01_leds b/target/linux/lantiq/xrx200/base-files/etc/board.d/01_leds index dfc647a43e4b67..815f312dac069e 100644 --- a/target/linux/lantiq/xrx200/base-files/etc/board.d/01_leds +++ b/target/linux/lantiq/xrx200/base-files/etc/board.d/01_leds @@ -64,9 +64,6 @@ buffalo,wbmr-300hpd) ucidef_set_led_switch "lan3" "LAN3" "green:lan3" "switch0" "0x20" ucidef_set_led_default "router" "router" "green:router" "1" ;; -netgear,dm200) - ucidef_set_led_netdev "lan" "lan" "green:lan" "eth0" - ;; esac board_config_flush diff --git a/target/linux/lantiq/xrx200/base-files/etc/board.d/02_network b/target/linux/lantiq/xrx200/base-files/etc/board.d/02_network index 27a3c75edc44c7..6c35c7a4debb18 100644 --- a/target/linux/lantiq/xrx200/base-files/etc/board.d/02_network +++ b/target/linux/lantiq/xrx200/base-files/etc/board.d/02_network @@ -11,10 +11,6 @@ lantiq_setup_interfaces() local board="$1" case "$board" in - alphanetworks,asl56026|\ - arcadyan,vg3503j) - ucidef_set_interface_lan "lan1 lan2" - ;; arcadyan,arv7519rw22) ucidef_set_interface_lan "lan1 lan2 lan3 lan4 lan5" ;; @@ -46,14 +42,11 @@ lantiq_setup_interfaces() avm,fritz7490|\ avm,fritz7490-micron|\ buffalo,wbmr-300hpd|\ - tplink,tdw8970|\ - tplink,tdw8980|\ tplink,vr200|\ tplink,vr200v) ucidef_set_interface_lan "lan1 lan2 lan3 lan4" ;; - avm,fritz7412|\ - netgear,dm200) + avm,fritz7412) ucidef_set_interface_lan "lan" ;; *) @@ -95,14 +88,9 @@ lantiq_setup_macs() local wan_mac="" case "$board" in - alphanetworks,asl56026) - lan_mac=$(mtd_get_mac_ascii u-boot-env ethaddr) - wan_mac=$(mtd_get_mac_ascii u-boot-env wanmac) - ;; arcadyan,arv7519rw22) wan_mac=$(macaddr_add "$(mtd_get_mac_binary boardconfig 0x16)" 1) ;; - arcadyan,vg3503j|\ lantiq,easy80920-nand|\ lantiq,easy80920-nor|\ zyxel,p-2812hnu-f1|\ @@ -148,14 +136,6 @@ lantiq_setup_macs() lan_mac=$(mtd_get_mac_ascii u-boot-env ethaddr) wan_mac="$lan_mac" ;; - netgear,dm200) - lan_mac=$(mtd_get_mac_binary ART 0x0) - wan_mac=$(macaddr_add "$lan_mac" 1) - ;; - tplink,tdw8970|\ - tplink,tdw8980) - wan_mac=$(macaddr_add "$(mtd_get_mac_binary boardconfig 0xf100)" 1) - ;; tplink,vr200|\ tplink,vr200v) wan_mac=$(macaddr_add "$(mtd_get_mac_binary romfile 0xf100)" 1) diff --git a/target/linux/lantiq/xrx200/base-files/etc/hotplug.d/firmware/12-ath9k-eeprom b/target/linux/lantiq/xrx200/base-files/etc/hotplug.d/firmware/12-ath9k-eeprom index eefc39b30b463e..164e2d39caa5b6 100644 --- a/target/linux/lantiq/xrx200/base-files/etc/hotplug.d/firmware/12-ath9k-eeprom +++ b/target/linux/lantiq/xrx200/base-files/etc/hotplug.d/firmware/12-ath9k-eeprom @@ -31,10 +31,6 @@ case "$FIRMWARE" in caldata_extract_ubi "caldata" 0x1000 0x1000 ath9k_patch_mac_crc $(macaddr_add $(mtd_get_mac_binary_ubi caldata 0x110c) 2) 0x10c ;; - tplink,tdw8970|\ - tplink,tdw8980) - caldata_extract "boardconfig" 0x21000 0x1000 - ;; *) caldata_die "board $board is not supported yet" ;; diff --git a/target/linux/lantiq/xrx200/base-files/etc/uci-defaults/01_led_migration b/target/linux/lantiq/xrx200/base-files/etc/uci-defaults/01_led_migration index 94f9df78bd559c..e3f6a98149fb44 100644 --- a/target/linux/lantiq/xrx200/base-files/etc/uci-defaults/01_led_migration +++ b/target/linux/lantiq/xrx200/base-files/etc/uci-defaults/01_led_migration @@ -18,9 +18,7 @@ do_internet_led_rename() } case "$(board_name)" in -alphanetworks,asl56026|\ arcadyan,arv7519rw22|\ -arcadyan,vg3503j|\ avm,fritz7360sl|\ bt,homehub-v5a) do_internet_led_rename diff --git a/target/linux/lantiq/xrx200_legacy/base-files/etc/board.d/01_leds b/target/linux/lantiq/xrx200_legacy/base-files/etc/board.d/01_leds new file mode 100644 index 00000000000000..dec22b51b55572 --- /dev/null +++ b/target/linux/lantiq/xrx200_legacy/base-files/etc/board.d/01_leds @@ -0,0 +1,34 @@ +# +# Copyright (C) 2011-2015 OpenWrt.org +# + +. /lib/functions/leds.sh +. /lib/functions/uci-defaults.sh + +board_config_update + +led_wifi="$(get_dt_led wifi)" +[ -n "$led_wifi" ] && ucidef_set_led_wlan "wifi" "wifi" "$led_wifi" "phy0tpt" + +led_dsl="$(get_dt_led dsl)" +[ -n "$led_dsl" ] && { + led_internet="$(get_dt_led internet)" + if [ -n "$led_internet" ]; then + ucidef_set_led_default "dsl" "dsl" "$led_dsl" "0" + ucidef_set_led_netdev "internet" "internet" "$led_internet" "pppoe-wan" + else + ucidef_set_led_netdev "dsl" "dsl" "$led_dsl" "dsl0" + fi +} + +board=$(board_name) + +case "$board" in +netgear,dm200) + ucidef_set_led_netdev "lan" "lan" "green:lan" "eth0" + ;; +esac + +board_config_flush + +exit 0 diff --git a/target/linux/lantiq/xrx200_legacy/base-files/etc/board.d/02_network b/target/linux/lantiq/xrx200_legacy/base-files/etc/board.d/02_network new file mode 100644 index 00000000000000..9088de86b10cbf --- /dev/null +++ b/target/linux/lantiq/xrx200_legacy/base-files/etc/board.d/02_network @@ -0,0 +1,75 @@ +# +# Copyright (C) 2011-2015 OpenWrt.org +# + +. /lib/functions/uci-defaults.sh +. /lib/functions/system.sh +. /lib/functions/lantiq.sh + +lantiq_setup_interfaces() +{ + local board="$1" + + case "$board" in + alphanetworks,asl56026|\ + arcadyan,vg3503j) + ucidef_set_interface_lan "lan1 lan2" + ;; + tplink,tdw8970|\ + tplink,tdw8980) + ucidef_set_interface_lan "lan1 lan2 lan3 lan4" + ;; + netgear,dm200) + ucidef_set_interface_lan "lan" + ;; + *) + ucidef_set_interface_lan 'eth0' + ;; + esac +} + +lantiq_setup_dsl() +{ + local board="$1" + local annex="a" + + lantiq_setup_dsl_helper "$annex" +} + +lantiq_setup_macs() +{ + local board="$1" + local lan_mac="" + local wan_mac="" + + case "$board" in + alphanetworks,asl56026) + lan_mac=$(mtd_get_mac_ascii u-boot-env ethaddr) + wan_mac=$(mtd_get_mac_ascii u-boot-env wanmac) + ;; + arcadyan,vg3503j) + lan_mac=$(mtd_get_mac_ascii u-boot-env ethaddr) + wan_mac=$(macaddr_add "$lan_mac" 1) + ;; + netgear,dm200) + lan_mac=$(mtd_get_mac_binary ART 0x0) + wan_mac=$(macaddr_add "$lan_mac" 1) + ;; + tplink,tdw8970|\ + tplink,tdw8980) + wan_mac=$(macaddr_add "$(mtd_get_mac_binary boardconfig 0xf100)" 1) + ;; + esac + + [ -n "$lan_mac" ] && ucidef_set_interface_macaddr "lan" "$lan_mac" + [ -n "$wan_mac" ] && ucidef_set_interface_macaddr "wan" "$wan_mac" +} + +board_config_update +board=$(board_name) +lantiq_setup_interfaces $board +lantiq_setup_dsl $board +lantiq_setup_macs $board +board_config_flush + +exit 0 diff --git a/target/linux/lantiq/xrx200_legacy/base-files/etc/board.d/05_compat-version b/target/linux/lantiq/xrx200_legacy/base-files/etc/board.d/05_compat-version new file mode 100644 index 00000000000000..45bef9385bdd6d --- /dev/null +++ b/target/linux/lantiq/xrx200_legacy/base-files/etc/board.d/05_compat-version @@ -0,0 +1,18 @@ +# +# Copyright (C) 2020 OpenWrt.org +# + +. /lib/functions.sh +. /lib/functions/uci-defaults.sh + +board_config_update + +case "$(board_name)" in + *) + ucidef_set_compat_version "1.1" + ;; +esac + +board_config_flush + +exit 0 diff --git a/target/linux/lantiq/xrx200_legacy/base-files/etc/hotplug.d/firmware/12-ath9k-eeprom b/target/linux/lantiq/xrx200_legacy/base-files/etc/hotplug.d/firmware/12-ath9k-eeprom new file mode 100644 index 00000000000000..c10065d5d5dcc0 --- /dev/null +++ b/target/linux/lantiq/xrx200_legacy/base-files/etc/hotplug.d/firmware/12-ath9k-eeprom @@ -0,0 +1,23 @@ +#!/bin/sh + +[ -e /lib/firmware/$FIRMWARE ] && exit 0 + +. /lib/functions/caldata.sh + +case "$FIRMWARE" in + "ath9k-eeprom-pci-0000:00:0e.0.bin" | \ + "ath9k-eeprom-pci-0000:01:00.0.bin" | \ + "ath9k-eeprom-pci-0000:02:00.0.bin") + board=$(board_name) + + case "$board" in + tplink,tdw8970|\ + tplink,tdw8980) + caldata_extract "boardconfig" 0x21000 0x1000 + ;; + *) + caldata_die "board $board is not supported yet" + ;; + esac + ;; +esac diff --git a/target/linux/lantiq/xrx200_legacy/base-files/etc/uci-defaults/01_led_migration b/target/linux/lantiq/xrx200_legacy/base-files/etc/uci-defaults/01_led_migration new file mode 100644 index 00000000000000..f6f11bc569209e --- /dev/null +++ b/target/linux/lantiq/xrx200_legacy/base-files/etc/uci-defaults/01_led_migration @@ -0,0 +1,31 @@ +# +# Copyright (C) 2013 OpenWrt.org +# + +. /lib/functions/migrations.sh + +do_internet_led_rename() +{ + config_load system + + [ -n $(config_get led_internet name) ] || return + [ -z $(config_get led_dsl name) ] || return + + uci rename system.led_internet=led_dsl + uci set system.led_dsl.name=dsl + + logger -t led-migration "internet led renamed to dsl" +} + +case "$(board_name)" in +alphanetworks,asl56026|\ +arcadyan,vg3503j) + do_internet_led_rename + ;; +esac + +remove_devicename_leds + +migrations_apply system + +exit 0 diff --git a/target/linux/lantiq/xrx200_legacy/base-files/lib/upgrade/platform.sh b/target/linux/lantiq/xrx200_legacy/base-files/lib/upgrade/platform.sh new file mode 100755 index 00000000000000..9a613c43b1a2a3 --- /dev/null +++ b/target/linux/lantiq/xrx200_legacy/base-files/lib/upgrade/platform.sh @@ -0,0 +1,16 @@ +PART_NAME=firmware +REQUIRE_IMAGE_METADATA=1 + +platform_check_image() { + return 0 +} + +platform_do_upgrade() { + local board=$(board_name) + + case "$board" in + *) + default_do_upgrade "$1" + ;; + esac +} diff --git a/target/linux/lantiq/xrx200_legacy/config-6.6 b/target/linux/lantiq/xrx200_legacy/config-6.6 new file mode 100644 index 00000000000000..c8650c4e87f0e4 --- /dev/null +++ b/target/linux/lantiq/xrx200_legacy/config-6.6 @@ -0,0 +1,86 @@ +CONFIG_AT803X_PHY=y +CONFIG_BLK_MQ_PCI=y +CONFIG_CONTEXT_TRACKING=y +CONFIG_CONTEXT_TRACKING_IDLE=y +CONFIG_CPU_MIPSR2_IRQ_EI=y +CONFIG_CPU_MIPSR2_IRQ_VI=y +CONFIG_CPU_RMAP=y +CONFIG_CRC16=y +CONFIG_CRYPTO_DEFLATE=y +CONFIG_CRYPTO_HASH_INFO=y +CONFIG_CRYPTO_LZO=y +CONFIG_CRYPTO_ZSTD=y +CONFIG_EXTRA_FIRMWARE="lantiq/xrx200_phy11g_a14.bin lantiq/xrx200_phy11g_a22.bin lantiq/xrx200_phy22f_a14.bin lantiq/xrx200_phy22f_a22.bin" +CONFIG_EXTRA_FIRMWARE_DIR="firmware" +CONFIG_GENERIC_ALLOCATOR=y +CONFIG_GENERIC_IRQ_EFFECTIVE_AFF_MASK=y +CONFIG_GRO_CELLS=y +CONFIG_HWMON=y +CONFIG_HW_RANDOM=y +CONFIG_ICPLUS_PHY=y +CONFIG_IFX_VPE_EXT=y +CONFIG_INPUT=y +CONFIG_INPUT_EVDEV=y +CONFIG_INTEL_XWAY_PHY=y +CONFIG_IRQ_DOMAIN_HIERARCHY=y +# CONFIG_ISDN is not set +CONFIG_LANTIQ_XRX200=y +CONFIG_LZO_COMPRESS=y +CONFIG_LZO_DECOMPRESS=y +CONFIG_MIPS_MT=y +# CONFIG_MIPS_MT_FPAFF is not set +CONFIG_MIPS_MT_SMP=y +CONFIG_MIPS_NR_CPU_NR_MAP=2 +CONFIG_MIPS_PERF_SHARED_TC_COUNTERS=y +CONFIG_MIPS_VPE_APSP_API=y +CONFIG_MIPS_VPE_APSP_API_MT=y +CONFIG_MIPS_VPE_LOADER=y +CONFIG_MIPS_VPE_LOADER_MT=y +CONFIG_MIPS_VPE_LOADER_TOM=y +CONFIG_NEED_SRCU_NMI_SAFE=y +CONFIG_NET_DEVLINK=y +CONFIG_NET_DSA=y +CONFIG_NET_DSA_LANTIQ_GSWIP=y +CONFIG_NET_DSA_TAG_GSWIP=y +CONFIG_NET_FLOW_LIMIT=y +CONFIG_NET_SWITCHDEV=y +CONFIG_NLS=y +CONFIG_NR_CPUS=2 +CONFIG_PADATA=y +CONFIG_PCI=y +CONFIG_PCIEPORTBUS=y +CONFIG_PCIE_LANTIQ=y +CONFIG_PCI_DOMAINS=y +CONFIG_PCI_LANTIQ=y +CONFIG_PHYLINK=y +CONFIG_PHY_LANTIQ_VRX200_PCIE=y +CONFIG_POWER_RESET_GPIO=y +CONFIG_POWER_SUPPLY=y +CONFIG_POWER_SUPPLY_HWMON=y +CONFIG_QCOM_NET_PHYLIB=y +CONFIG_QUEUED_RWLOCKS=y +CONFIG_QUEUED_SPINLOCKS=y +CONFIG_REGULATOR=y +CONFIG_REGULATOR_FIXED_VOLTAGE=y +CONFIG_RFS_ACCEL=y +CONFIG_RPS=y +CONFIG_SENSORS_LTQ_CPUTEMP=y +CONFIG_SGL_ALLOC=y +CONFIG_SMP=y +CONFIG_SMP_UP=y +CONFIG_SOCK_RX_QUEUE_MAPPING=y +CONFIG_SYNC_R4K=y +CONFIG_SYS_SUPPORTS_SCHED_SMT=y +CONFIG_SYS_SUPPORTS_SMP=y +CONFIG_TREE_RCU=y +CONFIG_TREE_SRCU=y +CONFIG_USB=y +CONFIG_USB_COMMON=y +CONFIG_USB_SUPPORT=y +CONFIG_XPS=y +CONFIG_XXHASH=y +CONFIG_ZLIB_DEFLATE=y +CONFIG_ZLIB_INFLATE=y +CONFIG_ZSTD_COMMON=y +CONFIG_ZSTD_COMPRESS=y +CONFIG_ZSTD_DECOMPRESS=y diff --git a/target/linux/lantiq/xrx200_legacy/profiles/00-default.mk b/target/linux/lantiq/xrx200_legacy/profiles/00-default.mk new file mode 100644 index 00000000000000..26bc8b502b0fea --- /dev/null +++ b/target/linux/lantiq/xrx200_legacy/profiles/00-default.mk @@ -0,0 +1,9 @@ +define Profile/Default + NAME:=Default Profile + PRIORITY:=1 +endef + +define Profile/Default/Description + Default package set compatible with most boards. +endef +$(eval $(call Profile,Default)) diff --git a/target/linux/lantiq/xrx200_legacy/target.mk b/target/linux/lantiq/xrx200_legacy/target.mk new file mode 100644 index 00000000000000..d9a6fff651b4f7 --- /dev/null +++ b/target/linux/lantiq/xrx200_legacy/target.mk @@ -0,0 +1,22 @@ +ARCH:=mips +SUBTARGET:=xrx200_legacy +BOARDNAME:=XRX200 Legacy +FEATURES+=atm ramdisk small_flash +CPU_TYPE:=24kc + +DEFAULT_PACKAGES+=kmod-leds-gpio \ + kmod-gpio-button-hotplug \ + ltq-vdsl-vr9-vectoring-fw-installer \ + kmod-ltq-vdsl-vr9-mei \ + kmod-ltq-vdsl-vr9 \ + kmod-ltq-atm-vr9 \ + kmod-ltq-deu-vr9 \ + kmod-ltq-ptm-vr9 \ + ltq-vdsl-vr9-app \ + dsl-vrx200-firmware-xdsl-a \ + dsl-vrx200-firmware-xdsl-b-patch \ + ppp-mod-pppoa + +define Target/Description + Lantiq XRX200 Legacy for boards with small flash +endef From f71ce1c34e43a1722eeadefa89324b23d0463022 Mon Sep 17 00:00:00 2001 From: Daniel Golle Date: Sun, 15 Dec 2024 23:58:27 +0000 Subject: [PATCH 19/43] mediatek: add pending patches fixing video output on MT7623N Add a bunch of fixes for HDMI output and Mali-450 GPU rendering on MT7623N, ie. the BananaPi R2. Signed-off-by: Daniel Golle --- ...701-vdec-fix-conversion-to-mtk_clk_s.patch | 56 +++++++++++ ...701-aud-fix-conversion-to-mtk_clk_si.patch | 92 +++++++++++++++++++ ...tek-mt2701-bdp-add-missing-dummy-clk.patch | 55 +++++++++++ ...atek-mt2701-mm-add-missing-dummy-clk.patch | 56 +++++++++++ ...tek-mt2701-img-add-missing-dummy-clk.patch | 55 +++++++++++ ...y-touch-DISP_REG_OVL_PITCH_MSB-if-AF.patch | 70 ++++++++++++++ 6 files changed, 384 insertions(+) create mode 100644 target/linux/mediatek/patches-6.6/256-clk-mediatek-mt2701-vdec-fix-conversion-to-mtk_clk_s.patch create mode 100644 target/linux/mediatek/patches-6.6/257-clk-mediatek-mt2701-aud-fix-conversion-to-mtk_clk_si.patch create mode 100644 target/linux/mediatek/patches-6.6/258-clk-mediatek-mt2701-bdp-add-missing-dummy-clk.patch create mode 100644 target/linux/mediatek/patches-6.6/259-clk-mediatek-mt2701-mm-add-missing-dummy-clk.patch create mode 100644 target/linux/mediatek/patches-6.6/260-clk-mediatek-mt2701-img-add-missing-dummy-clk.patch create mode 100644 target/linux/mediatek/patches-6.6/870-drm-mediatek-only-touch-DISP_REG_OVL_PITCH_MSB-if-AF.patch diff --git a/target/linux/mediatek/patches-6.6/256-clk-mediatek-mt2701-vdec-fix-conversion-to-mtk_clk_s.patch b/target/linux/mediatek/patches-6.6/256-clk-mediatek-mt2701-vdec-fix-conversion-to-mtk_clk_s.patch new file mode 100644 index 00000000000000..e2aed0126f4529 --- /dev/null +++ b/target/linux/mediatek/patches-6.6/256-clk-mediatek-mt2701-vdec-fix-conversion-to-mtk_clk_s.patch @@ -0,0 +1,56 @@ +From patchwork Sun Dec 15 22:13:49 2024 +Content-Type: text/plain; charset="utf-8" +MIME-Version: 1.0 +Content-Transfer-Encoding: 7bit +X-Patchwork-Submitter: Daniel Golle +X-Patchwork-Id: 13909005 +Date: Sun, 15 Dec 2024 22:13:49 +0000 +From: Daniel Golle +To: Michael Turquette , + Stephen Boyd , Matthias Brugger , + AngeloGioacchino Del Regno , + Alexandre Mergnat , + Geert Uytterhoeven , + Daniel Golle , + Uwe =?iso-8859-1?q?Kleine-K=F6nig?= , + Miles Chen , Chen-Yu Tsai , + Frank Wunderlich , John Crispin , + linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org, + linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, + stable@vger.kernel.org +Subject: [PATCH 1/5] clk: mediatek: mt2701-vdec: fix conversion to + mtk_clk_simple_probe +Message-ID: + +Precedence: bulk +X-Mailing-List: linux-clk@vger.kernel.org +List-Id: +List-Subscribe: +List-Unsubscribe: +MIME-Version: 1.0 +Content-Disposition: inline + +Commit 973d1607d936 ("clk: mediatek: mt2701: use mtk_clk_simple_probe to +simplify driver") broke DT bindings as the highest index was reduced by +1 because the id count starts from 1 and not from 0. + +Fix this, like for other drivers which had the same issue, by adding a +dummy clk at index 0. + +Fixes: 973d1607d936 ("clk: mediatek: mt2701: use mtk_clk_simple_probe to simplify driver") +Cc: stable@vger.kernel.org +Signed-off-by: Daniel Golle +--- + drivers/clk/mediatek/clk-mt2701-vdec.c | 1 + + 1 file changed, 1 insertion(+) + +--- a/drivers/clk/mediatek/clk-mt2701-vdec.c ++++ b/drivers/clk/mediatek/clk-mt2701-vdec.c +@@ -31,6 +31,7 @@ static const struct mtk_gate_regs vdec1_ + GATE_MTK(_id, _name, _parent, &vdec1_cg_regs, _shift, &mtk_clk_gate_ops_setclr_inv) + + static const struct mtk_gate vdec_clks[] = { ++ GATE_DUMMY(CLK_DUMMY, "vdec_dummy"), + GATE_VDEC0(CLK_VDEC_CKGEN, "vdec_cken", "vdec_sel", 0), + GATE_VDEC1(CLK_VDEC_LARB, "vdec_larb_cken", "mm_sel", 0), + }; diff --git a/target/linux/mediatek/patches-6.6/257-clk-mediatek-mt2701-aud-fix-conversion-to-mtk_clk_si.patch b/target/linux/mediatek/patches-6.6/257-clk-mediatek-mt2701-aud-fix-conversion-to-mtk_clk_si.patch new file mode 100644 index 00000000000000..5d31aec0be7534 --- /dev/null +++ b/target/linux/mediatek/patches-6.6/257-clk-mediatek-mt2701-aud-fix-conversion-to-mtk_clk_si.patch @@ -0,0 +1,92 @@ +From patchwork Sun Dec 15 22:14:11 2024 +Content-Type: text/plain; charset="utf-8" +MIME-Version: 1.0 +Content-Transfer-Encoding: 7bit +X-Patchwork-Submitter: Daniel Golle +X-Patchwork-Id: 13909006 +Date: Sun, 15 Dec 2024 22:14:11 +0000 +From: Daniel Golle +To: Michael Turquette , + Stephen Boyd , Matthias Brugger , + AngeloGioacchino Del Regno , + Alexandre Mergnat , + Geert Uytterhoeven , + Daniel Golle , + Uwe =?iso-8859-1?q?Kleine-K=F6nig?= , + Miles Chen , Chen-Yu Tsai , + Frank Wunderlich , John Crispin , + linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org, + linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, + stable@vger.kernel.org +Subject: [PATCH 2/5] clk: mediatek: mt2701-aud: fix conversion to + mtk_clk_simple_probe +Message-ID: + +References: + +Precedence: bulk +X-Mailing-List: linux-clk@vger.kernel.org +List-Id: +List-Subscribe: +List-Unsubscribe: +MIME-Version: 1.0 +Content-Disposition: inline +In-Reply-To: + + +Some of the audio subsystem clocks defined in clk-mt2701.h aren't +actually used by the driver. This broke conversion to +mtk_clk_simple_probe which expects that the highest possible clk id is +defined by the ARRAY_SIZE. + +Add additional dummy clocks to fill the gaps and remain compatible with +the existing DT bindings. + +Fixes: 0f69a423c458 ("clk: mediatek: Switch to mtk_clk_simple_probe() where possible") +Cc: stable@vger.kernel.org +Signed-off-by: Daniel Golle +--- + drivers/clk/mediatek/clk-mt2701-aud.c | 10 ++++++++++ + 1 file changed, 10 insertions(+) + +--- a/drivers/clk/mediatek/clk-mt2701-aud.c ++++ b/drivers/clk/mediatek/clk-mt2701-aud.c +@@ -55,10 +55,16 @@ static const struct mtk_gate audio_clks[ + GATE_DUMMY(CLK_DUMMY, "aud_dummy"), + /* AUDIO0 */ + GATE_AUDIO0(CLK_AUD_AFE, "audio_afe", "aud_intbus_sel", 2), ++ GATE_DUMMY(CLK_AUD_LRCK_DETECT, "audio_lrck_detect_dummy"), ++ GATE_DUMMY(CLK_AUD_I2S, "audio_i2c_dummy"), ++ GATE_DUMMY(CLK_AUD_APLL_TUNER, "audio_apll_tuner_dummy"), + GATE_AUDIO0(CLK_AUD_HDMI, "audio_hdmi", "audpll_sel", 20), + GATE_AUDIO0(CLK_AUD_SPDF, "audio_spdf", "audpll_sel", 21), + GATE_AUDIO0(CLK_AUD_SPDF2, "audio_spdf2", "audpll_sel", 22), + GATE_AUDIO0(CLK_AUD_APLL, "audio_apll", "audpll_sel", 23), ++ GATE_DUMMY(CLK_AUD_TML, "audio_tml_dummy"), ++ GATE_DUMMY(CLK_AUD_AHB_IDLE_EXT, "audio_ahb_idle_ext_dummy"), ++ GATE_DUMMY(CLK_AUD_AHB_IDLE_INT, "audio_ahb_idle_int_dummy"), + /* AUDIO1 */ + GATE_AUDIO1(CLK_AUD_I2SIN1, "audio_i2sin1", "aud_mux1_sel", 0), + GATE_AUDIO1(CLK_AUD_I2SIN2, "audio_i2sin2", "aud_mux1_sel", 1), +@@ -76,10 +82,12 @@ static const struct mtk_gate audio_clks[ + GATE_AUDIO1(CLK_AUD_ASRCI2, "audio_asrci2", "asm_h_sel", 13), + GATE_AUDIO1(CLK_AUD_ASRCO1, "audio_asrco1", "asm_h_sel", 14), + GATE_AUDIO1(CLK_AUD_ASRCO2, "audio_asrco2", "asm_h_sel", 15), ++ GATE_DUMMY(CLK_AUD_HDMIRX, "audio_hdmirx_dummy"), + GATE_AUDIO1(CLK_AUD_INTDIR, "audio_intdir", "intdir_sel", 20), + GATE_AUDIO1(CLK_AUD_A1SYS, "audio_a1sys", "aud_mux1_sel", 21), + GATE_AUDIO1(CLK_AUD_A2SYS, "audio_a2sys", "aud_mux2_sel", 22), + GATE_AUDIO1(CLK_AUD_AFE_CONN, "audio_afe_conn", "aud_mux1_sel", 23), ++ GATE_DUMMY(CLK_AUD_AFE_PCMIF, "audio_afe_pcmif_dummy"), + GATE_AUDIO1(CLK_AUD_AFE_MRGIF, "audio_afe_mrgif", "aud_mux1_sel", 25), + /* AUDIO2 */ + GATE_AUDIO2(CLK_AUD_MMIF_UL1, "audio_ul1", "aud_mux1_sel", 0), +@@ -100,6 +108,8 @@ static const struct mtk_gate audio_clks[ + GATE_AUDIO2(CLK_AUD_MMIF_AWB2, "audio_awb2", "aud_mux1_sel", 15), + GATE_AUDIO2(CLK_AUD_MMIF_DAI, "audio_dai", "aud_mux1_sel", 16), + /* AUDIO3 */ ++ GATE_DUMMY(CLK_AUD_DMIC1, "audio_dmic1_dummy"), ++ GATE_DUMMY(CLK_AUD_DMIC2, "audio_dmic2_dummy"), + GATE_AUDIO3(CLK_AUD_ASRCI3, "audio_asrci3", "asm_h_sel", 2), + GATE_AUDIO3(CLK_AUD_ASRCI4, "audio_asrci4", "asm_h_sel", 3), + GATE_AUDIO3(CLK_AUD_ASRCI5, "audio_asrci5", "asm_h_sel", 4), diff --git a/target/linux/mediatek/patches-6.6/258-clk-mediatek-mt2701-bdp-add-missing-dummy-clk.patch b/target/linux/mediatek/patches-6.6/258-clk-mediatek-mt2701-bdp-add-missing-dummy-clk.patch new file mode 100644 index 00000000000000..0542bcae4eed03 --- /dev/null +++ b/target/linux/mediatek/patches-6.6/258-clk-mediatek-mt2701-bdp-add-missing-dummy-clk.patch @@ -0,0 +1,55 @@ +From patchwork Sun Dec 15 22:14:24 2024 +Content-Type: text/plain; charset="utf-8" +MIME-Version: 1.0 +Content-Transfer-Encoding: 7bit +X-Patchwork-Submitter: Daniel Golle +X-Patchwork-Id: 13909007 +Date: Sun, 15 Dec 2024 22:14:24 +0000 +From: Daniel Golle +To: Michael Turquette , + Stephen Boyd , Matthias Brugger , + AngeloGioacchino Del Regno , + Alexandre Mergnat , + Geert Uytterhoeven , + Daniel Golle , + Uwe =?iso-8859-1?q?Kleine-K=F6nig?= , + Miles Chen , Chen-Yu Tsai , + Frank Wunderlich , John Crispin , + linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org, + linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, + stable@vger.kernel.org +Subject: [PATCH 3/5] clk: mediatek: mt2701-bdp: add missing dummy clk +Message-ID: + +References: + +Precedence: bulk +X-Mailing-List: linux-clk@vger.kernel.org +List-Id: +List-Subscribe: +List-Unsubscribe: +MIME-Version: 1.0 +Content-Disposition: inline +In-Reply-To: + + +Add dummy clk for index 0 which was missed during the conversion to +mtk_clk_simple_probe(). + +Fixes: 973d1607d936 ("clk: mediatek: mt2701: use mtk_clk_simple_probe to simplify driver") +Cc: stable@vger.kernel.org +Signed-off-by: Daniel Golle +--- + drivers/clk/mediatek/clk-mt2701-bdp.c | 1 + + 1 file changed, 1 insertion(+) + +--- a/drivers/clk/mediatek/clk-mt2701-bdp.c ++++ b/drivers/clk/mediatek/clk-mt2701-bdp.c +@@ -31,6 +31,7 @@ static const struct mtk_gate_regs bdp1_c + GATE_MTK(_id, _name, _parent, &bdp1_cg_regs, _shift, &mtk_clk_gate_ops_setclr_inv) + + static const struct mtk_gate bdp_clks[] = { ++ GATE_DUMMY(CLK_DUMMY, "bdp_dummy"), + GATE_BDP0(CLK_BDP_BRG_BA, "brg_baclk", "mm_sel", 0), + GATE_BDP0(CLK_BDP_BRG_DRAM, "brg_dram", "mm_sel", 1), + GATE_BDP0(CLK_BDP_LARB_DRAM, "larb_dram", "mm_sel", 2), diff --git a/target/linux/mediatek/patches-6.6/259-clk-mediatek-mt2701-mm-add-missing-dummy-clk.patch b/target/linux/mediatek/patches-6.6/259-clk-mediatek-mt2701-mm-add-missing-dummy-clk.patch new file mode 100644 index 00000000000000..526fdd9d1a2f36 --- /dev/null +++ b/target/linux/mediatek/patches-6.6/259-clk-mediatek-mt2701-mm-add-missing-dummy-clk.patch @@ -0,0 +1,56 @@ +From patchwork Sun Dec 15 22:14:34 2024 +Content-Type: text/plain; charset="utf-8" +MIME-Version: 1.0 +Content-Transfer-Encoding: 7bit +X-Patchwork-Submitter: Daniel Golle +X-Patchwork-Id: 13909008 +Date: Sun, 15 Dec 2024 22:14:34 +0000 +From: Daniel Golle +To: Michael Turquette , + Stephen Boyd , Matthias Brugger , + AngeloGioacchino Del Regno , + Alexandre Mergnat , + Geert Uytterhoeven , + Daniel Golle , + Uwe =?iso-8859-1?q?Kleine-K=F6nig?= , + Miles Chen , Chen-Yu Tsai , + Frank Wunderlich , John Crispin , + linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org, + linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, + stable@vger.kernel.org +Subject: [PATCH 4/5] clk: mediatek: mt2701-mm: add missing dummy clk +Message-ID: + <9de23440fcba1ffef9e77d58c9f505105e57a250.1734300668.git.daniel@makrotopia.org> +References: + +Precedence: bulk +X-Mailing-List: linux-clk@vger.kernel.org +List-Id: +List-Subscribe: +List-Unsubscribe: +MIME-Version: 1.0 +Content-Disposition: inline +In-Reply-To: + + +Add dummy clk which was missed during the conversion to +mtk_clk_pdev_probe() and is required for the existing DT bindings to +keep working. + +Fixes: 65c10c50c9c7 ("clk: mediatek: Migrate to mtk_clk_pdev_probe() for multimedia clocks") +Cc: stable@vger.kernel.org +Signed-off-by: Daniel Golle +--- + drivers/clk/mediatek/clk-mt2701-mm.c | 1 + + 1 file changed, 1 insertion(+) + +--- a/drivers/clk/mediatek/clk-mt2701-mm.c ++++ b/drivers/clk/mediatek/clk-mt2701-mm.c +@@ -31,6 +31,7 @@ static const struct mtk_gate_regs disp1_ + GATE_MTK(_id, _name, _parent, &disp1_cg_regs, _shift, &mtk_clk_gate_ops_setclr) + + static const struct mtk_gate mm_clks[] = { ++ GATE_DUMMY(CLK_DUMMY, "mm_dummy"), + GATE_DISP0(CLK_MM_SMI_COMMON, "mm_smi_comm", "mm_sel", 0), + GATE_DISP0(CLK_MM_SMI_LARB0, "mm_smi_larb0", "mm_sel", 1), + GATE_DISP0(CLK_MM_CMDQ, "mm_cmdq", "mm_sel", 2), diff --git a/target/linux/mediatek/patches-6.6/260-clk-mediatek-mt2701-img-add-missing-dummy-clk.patch b/target/linux/mediatek/patches-6.6/260-clk-mediatek-mt2701-img-add-missing-dummy-clk.patch new file mode 100644 index 00000000000000..a86f158106f2d0 --- /dev/null +++ b/target/linux/mediatek/patches-6.6/260-clk-mediatek-mt2701-img-add-missing-dummy-clk.patch @@ -0,0 +1,55 @@ +From patchwork Sun Dec 15 22:14:48 2024 +Content-Type: text/plain; charset="utf-8" +MIME-Version: 1.0 +Content-Transfer-Encoding: 7bit +X-Patchwork-Submitter: Daniel Golle +X-Patchwork-Id: 13909009 +Date: Sun, 15 Dec 2024 22:14:48 +0000 +From: Daniel Golle +To: Michael Turquette , + Stephen Boyd , Matthias Brugger , + AngeloGioacchino Del Regno , + Alexandre Mergnat , + Geert Uytterhoeven , + Daniel Golle , + Uwe =?iso-8859-1?q?Kleine-K=F6nig?= , + Miles Chen , Chen-Yu Tsai , + Frank Wunderlich , John Crispin , + linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org, + linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, + stable@vger.kernel.org +Subject: [PATCH 5/5] clk: mediatek: mt2701-img: add missing dummy clk +Message-ID: + +References: + +Precedence: bulk +X-Mailing-List: linux-clk@vger.kernel.org +List-Id: +List-Subscribe: +List-Unsubscribe: +MIME-Version: 1.0 +Content-Disposition: inline +In-Reply-To: + + +Add dummy clk for index 0 which was missed during the conversion to +mtk_clk_simple_probe(). + +Fixes: 973d1607d936 ("clk: mediatek: mt2701: use mtk_clk_simple_probe to simplify driver") +Cc: stable@vger.kernel.org +Signed-off-by: Daniel Golle +--- + drivers/clk/mediatek/clk-mt2701-img.c | 1 + + 1 file changed, 1 insertion(+) + +--- a/drivers/clk/mediatek/clk-mt2701-img.c ++++ b/drivers/clk/mediatek/clk-mt2701-img.c +@@ -22,6 +22,7 @@ static const struct mtk_gate_regs img_cg + GATE_MTK(_id, _name, _parent, &img_cg_regs, _shift, &mtk_clk_gate_ops_setclr) + + static const struct mtk_gate img_clks[] = { ++ GATE_DUMMY(CLK_DUMMY, "img_dummy"), + GATE_IMG(CLK_IMG_SMI_COMM, "img_smi_comm", "mm_sel", 0), + GATE_IMG(CLK_IMG_RESZ, "img_resz", "mm_sel", 1), + GATE_IMG(CLK_IMG_JPGDEC_SMI, "img_jpgdec_smi", "mm_sel", 5), diff --git a/target/linux/mediatek/patches-6.6/870-drm-mediatek-only-touch-DISP_REG_OVL_PITCH_MSB-if-AF.patch b/target/linux/mediatek/patches-6.6/870-drm-mediatek-only-touch-DISP_REG_OVL_PITCH_MSB-if-AF.patch new file mode 100644 index 00000000000000..4aea9e034ced57 --- /dev/null +++ b/target/linux/mediatek/patches-6.6/870-drm-mediatek-only-touch-DISP_REG_OVL_PITCH_MSB-if-AF.patch @@ -0,0 +1,70 @@ +From patchwork Sun Dec 15 22:09:41 2024 +Content-Type: text/plain; charset="utf-8" +MIME-Version: 1.0 +Content-Transfer-Encoding: 7bit +X-Patchwork-Submitter: Daniel Golle +X-Patchwork-Id: 13908995 +Return-Path: + +Date: Sun, 15 Dec 2024 22:09:41 +0000 +From: Daniel Golle +To: Chun-Kuang Hu , + Philipp Zabel , + David Airlie , Simona Vetter , + Matthias Brugger , + AngeloGioacchino Del Regno , + Justin Green , + Frank Wunderlich , + John Crispin , dri-devel@lists.freedesktop.org, + linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org, + linux-arm-kernel@lists.infradead.org, stable@vger.kernel.org +Subject: [PATCH] drm/mediatek: only touch DISP_REG_OVL_PITCH_MSB if AFBC is + supported +Message-ID: + <8c001c8e70d93d64d3ee6bf7dc5078d2783d4e32.1734300345.git.daniel@makrotopia.org> +MIME-Version: 1.0 +Content-Disposition: inline +X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 +X-CRM114-CacheID: sfid-20241215_140959_910539_20C140B3 +X-CRM114-Status: UNSURE ( 9.48 ) +X-CRM114-Notice: Please train this message. +X-BeenThere: linux-mediatek@lists.infradead.org +X-Mailman-Version: 2.1.34 +Precedence: list +List-Id: +List-Unsubscribe: , + +List-Archive: +List-Post: +List-Help: +List-Subscribe: , + +Sender: "Linux-mediatek" +Errors-To: + linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org + +Touching DISP_REG_OVL_PITCH_MSB leads to video overlay on MT2701, MT7623N +and probably other older SoCs being broken. + +Only touching it on hardware which actually supports AFBC like it was +before commit c410fa9b07c3 ("drm/mediatek: Add AFBC support to Mediatek +DRM driver") fixes it. + +Fixes: c410fa9b07c3 ("drm/mediatek: Add AFBC support to Mediatek DRM driver") +Cc: stable@vger.kernel.org +Signed-off-by: Daniel Golle +--- + drivers/gpu/drm/mediatek/mtk_disp_ovl.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/drivers/gpu/drm/mediatek/mtk_disp_ovl.c ++++ b/drivers/gpu/drm/mediatek/mtk_disp_ovl.c +@@ -478,7 +478,7 @@ void mtk_ovl_layer_config(struct device + &ovl->cmdq_reg, ovl->regs, DISP_REG_OVL_PITCH_MSB(idx)); + mtk_ddp_write_relaxed(cmdq_pkt, hdr_pitch, &ovl->cmdq_reg, ovl->regs, + DISP_REG_OVL_HDR_PITCH(ovl, idx)); +- } else { ++ } else if (ovl->data->supports_afbc) { + mtk_ddp_write_relaxed(cmdq_pkt, + overlay_pitch.split_pitch.msb, + &ovl->cmdq_reg, ovl->regs, DISP_REG_OVL_PITCH_MSB(idx)); From 0634ebed9f74dca6d008b00f9fa00cc1220fa425 Mon Sep 17 00:00:00 2001 From: Rosen Penev Date: Sat, 14 Dec 2024 14:26:25 -0800 Subject: [PATCH 20/43] ath79: fix tl-wa eth1 mac This is using mac-base and so a 0 needs to be added. Signed-off-by: Rosen Penev Link: https://github.com/openwrt/openwrt/pull/17274 Signed-off-by: Robert Marko --- target/linux/ath79/dts/ar7240_tplink_tl-wa.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/linux/ath79/dts/ar7240_tplink_tl-wa.dtsi b/target/linux/ath79/dts/ar7240_tplink_tl-wa.dtsi index 1f46e77423cd24..94d2570c6c1e54 100644 --- a/target/linux/ath79/dts/ar7240_tplink_tl-wa.dtsi +++ b/target/linux/ath79/dts/ar7240_tplink_tl-wa.dtsi @@ -17,7 +17,7 @@ }; ð1 { - nvmem-cells = <&macaddr_uboot_1fc00>; + nvmem-cells = <&macaddr_uboot_1fc00 0>; nvmem-cell-names = "mac-address"; }; From af1740a28b63ecc6683dceb249a1f75af5e9098d Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Mon, 16 Dec 2024 13:03:26 +0100 Subject: [PATCH 21/43] unetd: update to Git HEAD (2024-12-16) d22d7db581d5 bpf_skb_utils.h: add missing include to fix build against newer kernel headers bbd3e0eb1419 host: fix peer routes on a node acting as gateway b17164751fc7 unet-tool: add support for generating keys from salt + seed passphrase 041e05870c20 unet-tool: add support for dumping pubkey from signed file b58920d420cb unet-tool: add support for extracting network data from signed bin file f335f5b40b4e unet-cli: add support for generating key from seed 8b1f1d099352 unet-cli: add support for importing networks from signed data 188ba05eadf2 unet-cli: add missing command line help for import 8f15fc306a40 unet-cli: fix add-ssh-host with seed keys 486bc3b86dc2 pex-msg: enable broadcast for global PEX socket e4a24cdfbc1c unet-cli: fix defaults on create Signed-off-by: Felix Fietkau --- package/network/services/unetd/Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package/network/services/unetd/Makefile b/package/network/services/unetd/Makefile index 018f6b8ea9707e..7b0bd3c6e7bf29 100644 --- a/package/network/services/unetd/Makefile +++ b/package/network/services/unetd/Makefile @@ -10,9 +10,9 @@ include $(TOPDIR)/rules.mk PKG_NAME:=unetd PKG_SOURCE_PROTO:=git PKG_SOURCE_URL=$(PROJECT_GIT)/project/unetd.git -PKG_SOURCE_DATE:=2024-03-31 -PKG_SOURCE_VERSION:=806457664ab6e952a7f4febb82e891f596fe577c -PKG_MIRROR_HASH:=f469d65fd83721a8da0e5253d1ba871a6734233da6f23b631009b17b3af82455 +PKG_SOURCE_DATE:=2024-12-16 +PKG_SOURCE_VERSION:=e4a24cdfbc1cbdb38f1958440f2a06529df1c7f4 +PKG_MIRROR_HASH:=1959170b25be07b06c198bfd1e072b7ed19b930faad0e886acb6b0d719d25ed1 PKG_LICENSE:=GPL-2.0 PKG_MAINTAINER:=Felix Fietkau From 8a7239009c5f4b28b696042b70ed1f8f89902915 Mon Sep 17 00:00:00 2001 From: Linus Walleij Date: Sun, 17 Nov 2024 22:47:27 +0100 Subject: [PATCH 22/43] kirkwood: Make the Marvell DSA switch a module Not all Kirkwood systems have the Marvell MV88E6XXX switches. Drop those from the generic config and add them as modules in the systems that have it. This was inferred by inspecting the upstream DTS files for any mv88e* strings and adding the mv88e6xxx kmod package to those that have an upstream device tree with an MV88E6xxx switch and an OpenWrt image target. Signed-off-by: Linus Walleij --- target/linux/kirkwood/config-6.6 | 4 ---- target/linux/kirkwood/image/Makefile | 8 +++++--- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/target/linux/kirkwood/config-6.6 b/target/linux/kirkwood/config-6.6 index 751d3e6a1b4608..e3341523802f04 100644 --- a/target/linux/kirkwood/config-6.6 +++ b/target/linux/kirkwood/config-6.6 @@ -192,10 +192,6 @@ CONFIG_NEED_KUSER_HELPERS=y CONFIG_NEED_PER_CPU_KM=y CONFIG_NET_DEVLINK=y CONFIG_NET_DSA=y -CONFIG_NET_DSA_MV88E6XXX=y -CONFIG_NET_DSA_TAG_DSA=y -CONFIG_NET_DSA_TAG_DSA_COMMON=y -CONFIG_NET_DSA_TAG_EDSA=y CONFIG_NET_EGRESS=y CONFIG_NET_INGRESS=y CONFIG_NET_SELFTESTS=y diff --git a/target/linux/kirkwood/image/Makefile b/target/linux/kirkwood/image/Makefile index eaced926577630..cd9390b62a58d0 100644 --- a/target/linux/kirkwood/image/Makefile +++ b/target/linux/kirkwood/image/Makefile @@ -132,7 +132,8 @@ define Device/checkpoint_l-50 DEVICE_VENDOR := Check Point DEVICE_MODEL := L-50 DEVICE_PACKAGES := kmod-ath9k kmod-gpio-button-hotplug kmod-mvsdio \ - kmod-rtc-s35390a kmod-usb-ledtrig-usbport wpad-basic-mbedtls + kmod-rtc-s35390a kmod-usb-ledtrig-usbport wpad-basic-mbedtls \ + kmod-dsa-mv88e6xxx IMAGES := sysupgrade.bin endef TARGET_DEVICES += checkpoint_l-50 @@ -193,7 +194,8 @@ define Device/endian_4i-edge-200 DEVICE_MODEL := 4i Edge 200 DEVICE_ALT0_VENDOR := Endian DEVICE_ALT0_MODEL := UTM Mini Firewall - DEVICE_PACKAGES := kmod-ath9k kmod-mvsdio wpad-basic-mbedtls kmod-rtc-mv + DEVICE_PACKAGES := kmod-ath9k kmod-mvsdio wpad-basic-mbedtls kmod-rtc-mv \ + kmod-dsa-mv88e6xxx KERNEL_SIZE := 4096k IMAGES := sysupgrade.bin endef @@ -273,7 +275,7 @@ define Device/linksys $(Device/kernel-size-migration-linksys) DEVICE_VENDOR := Linksys DEVICE_PACKAGES := kmod-mwl8k wpad-basic-mbedtls kmod-gpio-button-hotplug \ - kmod-rtc-mv + kmod-rtc-mv kmod-dsa-mv88e6xxx KERNEL_IN_UBI := KERNEL_SIZE := 4096k UBINIZE_OPTS := -E 5 From f8a16524c4a4070d61a32f6203ea5e26cea125d4 Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Tue, 17 Dec 2024 14:51:18 +0100 Subject: [PATCH 23/43] unetd: add firewall input rule for global port Ensure that peers can be exchanged over any interface Signed-off-by: Felix Fietkau --- package/network/services/unetd/files/unetd.init | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/package/network/services/unetd/files/unetd.init b/package/network/services/unetd/files/unetd.init index c1124821ee8fa1..7c980e3d0d541b 100644 --- a/package/network/services/unetd/files/unetd.init +++ b/package/network/services/unetd/files/unetd.init @@ -13,5 +13,20 @@ start_service() { procd_set_param command "$PROG" -h /var/run/unetd/hosts -u /var/run/unetd/socket procd_set_param respawn procd_set_param limits core="unlimited" + + procd_open_data + json_add_array firewall + + json_add_object "" + json_add_string type rule + json_add_string proto udp + json_add_string src "*" + json_add_int dest_port 51819 + json_add_string target ACCEPT + json_close_object + + json_close_array + procd_close_data + procd_close_instance } From 53e312e19313dd738eabed3a4af5fb42a8f9e8fb Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Tue, 17 Dec 2024 20:01:13 +0100 Subject: [PATCH 24/43] netifd: update to Git HEAD (2024-12-17) 058a099f5bc5 interface: fix memleak and reload issue for the zone attribute ea01ed41f321 interface: remove unnecessary NULL checks before free() Signed-off-by: Felix Fietkau --- package/network/config/netifd/Makefile | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/package/network/config/netifd/Makefile b/package/network/config/netifd/Makefile index 95f1f6f7d11e09..c327f061136ba8 100644 --- a/package/network/config/netifd/Makefile +++ b/package/network/config/netifd/Makefile @@ -1,13 +1,13 @@ include $(TOPDIR)/rules.mk PKG_NAME:=netifd -PKG_RELEASE:=2 +PKG_RELEASE:=1 PKG_SOURCE_PROTO:=git PKG_SOURCE_URL=$(PROJECT_GIT)/project/netifd.git -PKG_SOURCE_DATE:=2024-11-27 -PKG_SOURCE_VERSION:=768027c5a7640137857f412f554227abd6160cdd -PKG_MIRROR_HASH:=5f74dc10470c64b42caa2d1fda3b80672293cf39676aa5c0b9f8c89880a15270 +PKG_SOURCE_DATE:=2024-12-17 +PKG_SOURCE_VERSION:=ea01ed41f3212ecbe000422f3c122a01b93fe874 +PKG_MIRROR_HASH:=dbaad26c1f9b15d0caff6ccdf80d85b34d96bda72cbd2b1dc188a04136d96c28 PKG_MAINTAINER:=Felix Fietkau PKG_LICENSE:=GPL-2.0 From 3d900bd055b5d8f07a879c9c8c4f7783d35dd4ba Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Tue, 17 Dec 2024 21:53:36 +0100 Subject: [PATCH 25/43] procd: update to Git HEAD (2024-12-17) 2e206dbe77ec service: add support for triggers on service/instance data changes 735b48728fca service: remove leftover lines from previous commit 32469644a029 service: allow incremental changes to service properties fd01fb852302 service: fix double free bug when dealing with data Signed-off-by: Felix Fietkau --- package/system/procd/Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package/system/procd/Makefile b/package/system/procd/Makefile index 70df481a2285ee..7a2276a46d1967 100644 --- a/package/system/procd/Makefile +++ b/package/system/procd/Makefile @@ -12,9 +12,9 @@ PKG_RELEASE:=1 PKG_SOURCE_PROTO:=git PKG_SOURCE_URL=$(PROJECT_GIT)/project/procd.git -PKG_MIRROR_HASH:=2c9eb493618e3a695d329cbf7379a165d4c2366a6e00edc63db3271aa059a294 -PKG_SOURCE_DATE:=2024-12-11 -PKG_SOURCE_VERSION:=e2f05deb93949f447d397e8cd3a341bc8e53cd38 +PKG_MIRROR_HASH:=99139ce325d73f5b250d115703540acfac3bcdc8ee202f2d3aacf3083042bc70 +PKG_SOURCE_DATE:=2024-12-17 +PKG_SOURCE_VERSION:=fd01fb852302a2683d09ee1c2193d7c51e2b0ba8 CMAKE_INSTALL:=1 PKG_LICENSE:=GPL-2.0 From 8c5826b140b6288b9270d232ecda0d540e380d4e Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Tue, 17 Dec 2024 21:21:37 +0100 Subject: [PATCH 26/43] procd: do not overwrite service data by default Allows a running servie to manage its own data if untouched by the init script Signed-off-by: Felix Fietkau --- package/base-files/files/etc/rc.common | 4 ---- package/system/procd/files/procd.sh | 8 +++++--- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/package/base-files/files/etc/rc.common b/package/base-files/files/etc/rc.common index d7473038444cb1..abf72ea3372fe8 100755 --- a/package/base-files/files/etc/rc.common +++ b/package/base-files/files/etc/rc.common @@ -100,10 +100,6 @@ service_triggers() { return 0 } -service_data() { - return 0 -} - service_running() { local instance="${1:-*}" diff --git a/package/system/procd/files/procd.sh b/package/system/procd/files/procd.sh index 5dc8ec42b7a4ef..59e002036d9558 100644 --- a/package/system/procd/files/procd.sh +++ b/package/system/procd/files/procd.sh @@ -101,9 +101,11 @@ _procd_close_service() { _procd_open_trigger service_triggers _procd_close_trigger - _procd_open_data - service_data - _procd_close_data + type service_data >/dev/null 2>&1 && { + _procd_open_data + service_data + _procd_close_data + } _procd_ubus_call ${1:-set} } From 49d92d3e933c45e3684da2fbf0a198d195635581 Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Tue, 17 Dec 2024 21:54:14 +0100 Subject: [PATCH 27/43] procd: add support for reload triggers on data change This can be useful to reload the firewall when procd firewall data changes Signed-off-by: Felix Fietkau --- package/system/procd/files/procd.sh | 31 +++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/package/system/procd/files/procd.sh b/package/system/procd/files/procd.sh index 59e002036d9558..0f9405a2220007 100644 --- a/package/system/procd/files/procd.sh +++ b/package/system/procd/files/procd.sh @@ -308,6 +308,36 @@ _procd_add_reload_interface_trigger() { _procd_close_trigger } +_procd_add_data_trigger() { + json_add_array + _procd_add_array_data "service.data.update" + + json_add_array + _procd_add_array_data "if" + + json_add_array + _procd_add_array_data "eq" "name" "$1" + shift + json_close_array + + json_add_array + _procd_add_array_data "run_script" "$@" + json_close_array + + json_close_array + _procd_add_timeout + json_close_array +} + +_procd_add_reload_data_trigger() { + local script=$(readlink "$initscript") + local name=$(basename ${script:-$initscript}) + + _procd_open_trigger + _procd_add_data_trigger $1 /etc/init.d/$name reload + _procd_close_trigger +} + _procd_add_config_trigger() { json_add_array _procd_add_array_data "$1" @@ -661,6 +691,7 @@ _procd_wrapper \ procd_add_interface_trigger \ procd_add_mount_trigger \ procd_add_reload_trigger \ + procd_add_reload_data_trigger \ procd_add_reload_interface_trigger \ procd_add_action_mount_trigger \ procd_add_reload_mount_trigger \ From f077e058fd485ab87f0995351a3ddc0a009e4593 Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Tue, 17 Dec 2024 21:57:44 +0100 Subject: [PATCH 28/43] unetd: update to Git HEAD (2024-12-17) 93461ca4c827 unet-cli: only apply defaults on create 3e5766783d5d unet-tool: add support for confirming password 074d3659ca4a unet-cli: confirm password when creating new seed based key bf3488a3807a unet-cli: add add/set-local-host command 9eb57c528461 unet-cli: add support for setting interface zone a0a2d80f3459 ubus: add firewall rules for network port/pex_port via procd Signed-off-by: Felix Fietkau --- package/network/services/unetd/Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package/network/services/unetd/Makefile b/package/network/services/unetd/Makefile index 7b0bd3c6e7bf29..c3875219985848 100644 --- a/package/network/services/unetd/Makefile +++ b/package/network/services/unetd/Makefile @@ -10,9 +10,9 @@ include $(TOPDIR)/rules.mk PKG_NAME:=unetd PKG_SOURCE_PROTO:=git PKG_SOURCE_URL=$(PROJECT_GIT)/project/unetd.git -PKG_SOURCE_DATE:=2024-12-16 -PKG_SOURCE_VERSION:=e4a24cdfbc1cbdb38f1958440f2a06529df1c7f4 -PKG_MIRROR_HASH:=1959170b25be07b06c198bfd1e072b7ed19b930faad0e886acb6b0d719d25ed1 +PKG_SOURCE_DATE:=2024-12-17 +PKG_SOURCE_VERSION:=a0a2d80f3459425182a9f0e665d8ca8eff97c82f +PKG_MIRROR_HASH:=a6f07d91da40152b2af5b5b9d1d67d87a9991943147e47be6921c092ad7b49a3 PKG_LICENSE:=GPL-2.0 PKG_MAINTAINER:=Felix Fietkau From 03560d470c285e7b77a55e2bcf287b2298d1246e Mon Sep 17 00:00:00 2001 From: Chukun Pan Date: Mon, 16 Dec 2024 23:09:26 +0800 Subject: [PATCH 29/43] qualcommax: fix usb regulator supply for RT-AX89X The qusb_phy node looks for the following supply: "vdd", "vdda-pll", "vdda-phy-dpdm" And ssphy node looks for the following supply: "vdda-phy", "vdda-pll" So fix the usb regulator supply for RT-AX89X. Fixes: 1306237 ("qualcommax: use PHY regulator for USB GPIO") Signed-off-by: Chukun Pan Link: https://github.com/openwrt/openwrt/pull/17290 Signed-off-by: Robert Marko --- .../files/arch/arm64/boot/dts/qcom/ipq8074-rt-ax89x.dts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq8074-rt-ax89x.dts b/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq8074-rt-ax89x.dts index 781b6478114f55..dd5ce8542e57c8 100644 --- a/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq8074-rt-ax89x.dts +++ b/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq8074-rt-ax89x.dts @@ -365,7 +365,7 @@ &qusb_phy_0 { status = "okay"; - vdda-phy-supply = <&usb0_vbus>; + vdd-supply = <&usb0_vbus>; }; &ssphy_1 { @@ -375,7 +375,7 @@ &qusb_phy_1 { status = "okay"; - vdda-phy-supply = <&usb1_vbus>; + vdd-supply = <&usb1_vbus>; }; &usb_0 { From 2417770b131ae77c56d888748cfe2a8503f2c9bf Mon Sep 17 00:00:00 2001 From: Chukun Pan Date: Tue, 10 Dec 2024 23:02:09 +0800 Subject: [PATCH 30/43] linux-firmware: ath11k: add QCA2066 firmware Add QCA2066 firmware package, ath11k is already supported. Signed-off-by: Chukun Pan Link: https://github.com/openwrt/openwrt/pull/17260 Signed-off-by: Robert Marko --- package/firmware/linux-firmware/qca_ath11k.mk | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/package/firmware/linux-firmware/qca_ath11k.mk b/package/firmware/linux-firmware/qca_ath11k.mk index 9fdd6119488dd9..a06bcda420c204 100644 --- a/package/firmware/linux-firmware/qca_ath11k.mk +++ b/package/firmware/linux-firmware/qca_ath11k.mk @@ -1,3 +1,11 @@ +Package/ath11k-firmware-qca2066 = $(call Package/firmware-default,QCA2066 ath11k firmware,,LICENCE.atheros_firmware) +define Package/ath11k-firmware-qca2066/install + $(INSTALL_DIR) $(1)/lib/firmware/ath11k/QCA2066/hw2.1 + $(INSTALL_DATA) \ + $(PKG_BUILD_DIR)/ath11k/QCA2066/hw2.1/* $(1)/lib/firmware/ath11k/QCA2066/hw2.1/ +endef +$(eval $(call BuildPackage,ath11k-firmware-qca2066)) + Package/ath11k-firmware-qca6390 = $(call Package/firmware-default,QCA6390 ath11k firmware,,LICENCE.atheros_firmware) define Package/ath11k-firmware-qca6390/install $(INSTALL_DIR) $(1)/lib/firmware/ath11k/QCA6390/hw2.0 @@ -14,7 +22,7 @@ define Package/ath11k-firmware-wcn6750/install $(INSTALL_DATA) \ $(PKG_BUILD_DIR)/ath11k/WCN6750/hw1.0/Notice.txt $(1)/lib/firmware/ath11k/WCN6750/hw1.0/ $(INSTALL_DATA) \ - $(PKG_BUILD_DIR)/ath11k/WCN6750/hw1.0/sc7280/wpss.mbn $(1)/lib/firmware/ath11k/WCN6750/hw1.0/ + $(PKG_BUILD_DIR)/ath11k/WCN6750/hw1.0/sc7280/wpss.mbn $(1)/lib/firmware/ath11k/WCN6750/hw1.0/ endef $(eval $(call BuildPackage,ath11k-firmware-wcn6750)) From f02df14a997e575b360ed4a9094c3e82490f470d Mon Sep 17 00:00:00 2001 From: Robert Marko Date: Wed, 18 Dec 2024 10:55:01 +0100 Subject: [PATCH 31/43] apk: disable tests Currently if the host system has cmocka installed it will leak the host path and try to use the host cmocka and build tests. This will obviously fail, so backport upstream commit allowing disabling of tests and disable building them. Fixes: openwrt/packages#25456 Link: https://github.com/openwrt/openwrt/pull/17297 Signed-off-by: Robert Marko --- package/system/apk/Makefile | 5 +- ...openwrt-move-layer-db-to-temp-folder.patch | 2 +- .../patches/0002-meson-add-tests-option.patch | 52 +++++++++++++++++++ 3 files changed, 56 insertions(+), 3 deletions(-) create mode 100644 package/system/apk/patches/0002-meson-add-tests-option.patch diff --git a/package/system/apk/Makefile b/package/system/apk/Makefile index c045a990f0aa5d..6ed07384c2f9dc 100644 --- a/package/system/apk/Makefile +++ b/package/system/apk/Makefile @@ -1,7 +1,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=apk -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_SOURCE_URL=https://gitlab.alpinelinux.org/alpine/apk-tools.git PKG_SOURCE_PROTO:=git @@ -60,7 +60,8 @@ MESON_COMMON_ARGS = \ -Dlua_version=5.1 \ -Ddefault_library=static \ -Durl_backend=wget \ - -Dzstd=false + -Dzstd=false \ + -Dtests=disabled MESON_HOST_ARGS += \ $(MESON_COMMON_ARGS) \ diff --git a/package/system/apk/patches/0001-openwrt-move-layer-db-to-temp-folder.patch b/package/system/apk/patches/0001-openwrt-move-layer-db-to-temp-folder.patch index 2b54f47ab77b22..aaf36310a03283 100644 --- a/package/system/apk/patches/0001-openwrt-move-layer-db-to-temp-folder.patch +++ b/package/system/apk/patches/0001-openwrt-move-layer-db-to-temp-folder.patch @@ -10,7 +10,7 @@ Signed-off-by: Paul Spooren --- a/src/database.c +++ b/src/database.c -@@ -1631,7 +1631,7 @@ const char *apk_db_layer_name(int layer) +@@ -1624,7 +1624,7 @@ const char *apk_db_layer_name(int layer) { switch (layer) { case APK_DB_LAYER_ROOT: return "lib/apk/db"; diff --git a/package/system/apk/patches/0002-meson-add-tests-option.patch b/package/system/apk/patches/0002-meson-add-tests-option.patch new file mode 100644 index 00000000000000..075d3a9897f237 --- /dev/null +++ b/package/system/apk/patches/0002-meson-add-tests-option.patch @@ -0,0 +1,52 @@ +From a6180e4cfa1a98d361ffdce9e48857504997fbe9 Mon Sep 17 00:00:00 2001 +From: Rosen Penev +Date: Tue, 3 Dec 2024 18:12:58 -0800 +Subject: [PATCH] meson: add tests option + +Allows disabling tests when not desired. + +Signed-off-by: Rosen Penev +--- + meson_options.txt | 1 + + test/meson.build | 10 +++++++--- + test/unit/meson.build | 2 +- + 3 files changed, 9 insertions(+), 4 deletions(-) + +--- a/meson_options.txt ++++ b/meson_options.txt +@@ -6,6 +6,7 @@ option('docs', description: 'Build manpa + option('help', description: 'Build help into apk binaries, needs lua', type: 'feature', value: 'auto') + option('lua', description: 'Build luaapk (lua bindings)', type: 'feature', value: 'auto') + option('lua_version', description: 'Lua version to build against', type: 'string', value: '5.3') ++option('tests', description: 'Build tests', type: 'feature', value: 'auto') + option('url_backend', description: 'URL backend', type: 'combo', choices: ['libfetch', 'wget'], value: 'libfetch') + option('uvol_db_target', description: 'Default target for uvol database layer', type: 'string') + option('zstd', description: 'Build with zstd support', type: 'boolean', value: true) +--- a/test/meson.build ++++ b/test/meson.build +@@ -1,10 +1,14 @@ ++enum_sh = find_program('enum.sh', required: get_option('tests')) ++solver_sh = find_program('solver.sh', required: get_option('tests')) ++ ++if not enum_sh.found() or not solver_sh.found() ++ subdir_done() ++endif ++ + cur_dir = meson.current_source_dir() + env = environment() + env.set('APK', apk_exe.full_path()) + +-enum_sh = files('enum.sh') +-solver_sh = files('solver.sh') +- + subdir('unit') + + foreach t : run_command(enum_sh, 'shell', check: true).stdout().strip().split(' ') +--- a/test/unit/meson.build ++++ b/test/unit/meson.build +@@ -1,4 +1,4 @@ +-cmocka_dep = dependency('cmocka', required: false) ++cmocka_dep = dependency('cmocka', required: get_option('tests')) + + if cmocka_dep.found() + From 47c75a25cdeed6fda9608d61926799dbd1b1fef3 Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Wed, 18 Dec 2024 10:35:21 +0100 Subject: [PATCH 32/43] firewall4: update to Git HEAD (2024-12-18) e00958884416 fw4: do not add physical devices for soft offload dfbcc1cd127c fw4: skip not existing netdev names in flowtable device list 18fc0ead19fa init: use the reload data trigger to reload firewall on procd data changes Fixes: https://github.com/openwrt/openwrt/issues/13410 Signed-off-by: Felix Fietkau --- package/network/config/firewall4/Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package/network/config/firewall4/Makefile b/package/network/config/firewall4/Makefile index 6aacc05e365b45..9b53349275bf2c 100644 --- a/package/network/config/firewall4/Makefile +++ b/package/network/config/firewall4/Makefile @@ -9,9 +9,9 @@ PKG_RELEASE:=1 PKG_SOURCE_PROTO:=git PKG_SOURCE_URL=$(PROJECT_GIT)/project/firewall4.git -PKG_SOURCE_DATE:=2024-05-21 -PKG_SOURCE_VERSION:=4c01d1ebf99e8ecfa69758a9b4f450ecef7b93cd -PKG_MIRROR_HASH:=bbc5622bc03e3b43116fcc86e3fa2d2372bfc07b3a00d2b3a6efac4f7454a403 +PKG_SOURCE_DATE:=2024-12-18 +PKG_SOURCE_VERSION:=18fc0ead19faf06b8ce7ec5be84957278e942dfa +PKG_MIRROR_HASH:=123d1b5d00cdbbfa77813b3eb694d00949171037a0fa26e6d36a75a37066ba48 PKG_MAINTAINER:=Jo-Philipp Wich PKG_LICENSE:=ISC From eec6ec4755075cf40add30a00dabeecd07ddb6cf Mon Sep 17 00:00:00 2001 From: Rosen Penev Date: Sun, 16 Jun 2024 12:40:53 -0700 Subject: [PATCH 33/43] ath79: tplink,deco-s4-v2: use nvmem for cal Userspace handling is deprecated. MAC address stuff needs to remain handled in userspace as it's encrypted. Maybe an NVMEM driver can be written in the future... Signed-off-by: Rosen Penev Link: https://github.com/openwrt/openwrt/pull/17276 Signed-off-by: Robert Marko --- target/linux/ath79/dts/qca9563_tplink_deco-s4-v2.dts | 7 ++++++- .../base-files/etc/hotplug.d/firmware/10-ath9k-eeprom | 5 ----- .../base-files/etc/hotplug.d/ieee80211/10_fix_wifi_mac | 3 ++- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/target/linux/ath79/dts/qca9563_tplink_deco-s4-v2.dts b/target/linux/ath79/dts/qca9563_tplink_deco-s4-v2.dts index 7cbc77f64b5777..147a880de88ba4 100644 --- a/target/linux/ath79/dts/qca9563_tplink_deco-s4-v2.dts +++ b/target/linux/ath79/dts/qca9563_tplink_deco-s4-v2.dts @@ -121,6 +121,10 @@ #address-cells = <1>; #size-cells = <1>; + cal_art_1000: calibration@1000 { + reg = <0x1000 0x440>; + }; + precal_art_5000: pre-calibration@5000 { reg = <0x5000 0x2f20>; }; @@ -146,5 +150,6 @@ &wmac { status = "okay"; - qca,no-eeprom; + nvmem-cells = <&cal_art_1000>; + nvmem-cell-names = "calibration"; }; diff --git a/target/linux/ath79/generic/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom b/target/linux/ath79/generic/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom index 17639ad439e5b3..675522823f61ca 100644 --- a/target/linux/ath79/generic/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom +++ b/target/linux/ath79/generic/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom @@ -58,11 +58,6 @@ case "$FIRMWARE" in caldata_extract "art" 0x1000 0x440 ath9k_patch_mac $(mtd_get_mac_ascii u-boot-env mac_addr) ;; - tplink,deco-s4-v2) - caldata_extract "art" 0x1000 0x440 - base_mac=$(mtd_get_mac_encrypted_deco $(find_mtd_part config)) - ath9k_patch_mac $(macaddr_add $base_mac 1) - ;; *) caldata_die "board $board is not supported yet" ;; diff --git a/target/linux/ath79/generic/base-files/etc/hotplug.d/ieee80211/10_fix_wifi_mac b/target/linux/ath79/generic/base-files/etc/hotplug.d/ieee80211/10_fix_wifi_mac index 5155d240a825ac..b10599cc154970 100644 --- a/target/linux/ath79/generic/base-files/etc/hotplug.d/ieee80211/10_fix_wifi_mac +++ b/target/linux/ath79/generic/base-files/etc/hotplug.d/ieee80211/10_fix_wifi_mac @@ -110,7 +110,8 @@ case "$board" in base_mac=$(mtd_get_mac_encrypted_deco $(find_mtd_part config)) [ "$PHYNBR" -eq 0 ] && \ macaddr_add $base_mac 2 > /sys${DEVPATH}/macaddress - + [ "$PHYNBR" -eq 1 ] && \ + macaddr_add $base_mac 1 > /sys${DEVPATH}/macaddress ;; trendnet,tew-823dru) # set the 2.4G interface mac address to LAN MAC From 28f534d953b1163548610554981763d24fde6d03 Mon Sep 17 00:00:00 2001 From: John Audia Date: Sat, 14 Dec 2024 15:02:19 -0500 Subject: [PATCH 34/43] kernel: bump 6.6 to 6.6.66 Update patch set for new release and add required kernel option CONFIG_ZRAM_TRACK_ENTRY_ACTIME to generic config Changelog: https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.6.66 Manually rebased: bcm27xx/patches-6.6/950-0092-MMC-added-alternative-MMC-driver.patch bcm53xx/patches-6.6/180-usb-xhci-add-support-for-performing-fake-doorbell.patch starfive/patches-6.6/1000-serial-8250_dw-Add-starfive-jh7100-hsuart-compatible.patch Removed upstreamed: bcm27xx/patches-6.6/950-0029-vc4_hdmi-Avoid-log-spam-for-audio-start-failure.patch[1] All other patches automatically rebased. 1. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.6.66&id=e0388a95736abd1f5f5a94221dd1ac24eacbd4d7 Build system: x86/64 Build-tested: bcm27xx/bcm2712, flogic/glinet_gl-mt6000, flogic/xiaomi_redmi-router-ax6000-ubootmod, ramips/tplink_archer-a6-v3, x86/64 Run-tested: bcm27xx/bcm2712, flogic/glinet_gl-mt6000, flogic/xiaomi_redmi-router-ax6000-ubootmod, ramips/tplink_archer-a6-v3, x86/64 Signed-off-by: John Audia Link: https://github.com/openwrt/openwrt/pull/17271 Signed-off-by: Hauke Mehrtens --- include/kernel-6.6 | 4 +- ...eset-controller-support-for-EN7581-S.patch | 2 +- ...e-clock_register-in-hw_init-callback.patch | 2 +- ...clk-en7523-introduce-chip_scu-regmap.patch | 2 +- .../900-unaligned_access_hacks.patch | 4 +- ...oid-log-spam-for-audio-start-failure.patch | 41 ------------------- ...-vc4-Set-AXI-panic-modes-for-the-HVS.patch | 2 +- ...ci-add-quirk-for-host-controllers-th.patch | 2 +- ...Add-cts-event-workaround-DT-property.patch | 2 +- ...092-MMC-added-alternative-MMC-driver.patch | 6 +-- ...all-the-downstream-rpi-sound-card-dr.patch | 2 +- ...hci_fixup_endpoint-for-interval-adju.patch | 2 +- ...ce-quirks-for-Freeway-Airmouse-T3-an.patch | 4 +- ...-Add-a-timing-for-the-Raspberry-Pi-7.patch | 2 +- ...nel-simple-add-Geekworm-MZP280-Panel.patch | 2 +- ...a-introduce-a-customisable-threshold.patch | 2 +- ...mple-Add-Innolux-AT056tN53V1-5.6-VGA.patch | 2 +- ...ci_sync-Add-fallback-bd-address-prop.patch | 4 +- ...-quirks-add-link-TRB-quirk-for-VL805.patch | 6 +-- ...upstream-TRB_FETCH-quirk-on-VL805-ho.patch | 2 +- ...b-xhci-add-VLI_SS_BULK_OUT_BUG-quirk.patch | 4 +- ...5-usb-xhci-add-XHCI_VLI_HUB_TT_QUIRK.patch | 10 ++--- ...wc3-Set-DMA-and-coherent-masks-early.patch | 4 +- ...0-0531-serial-pl011-rp1-uart-support.patch | 4 +- ...vc4-Introduce-generation-number-enum.patch | 2 +- ...-drm-vc4-hvs-Create-hw_init-function.patch | 2 +- ...drm-vc4-hvs-Create-cob_init-function.patch | 6 +-- ...592-drm-vc4-hvs-Rename-hvs_regs-list.patch | 2 +- ...ge-prototype-of-__vc4_hvs_alloc-to-p.patch | 2 +- ...ble-SCALER_CONTROL-early-in-HVS-init.patch | 4 +- ...0610-drm-vc4-hvs-Support-BCM2712-HVS.patch | 16 ++++---- .../950-0757-drm-panel-add-panel-dsi.patch | 4 +- ...-Add-support-for-D0-register-changes.patch | 8 ++-- ...-to-support-D0-alpha-and-csc-changes.patch | 4 +- ...M-pl011-Add-rs485-to-the-RP1-support.patch | 2 +- ...-add-FS-LS-bus-instance-parkmode-dis.patch | 4 +- ...llocate-a-block-for-SD-extension-reg.patch | 4 +- ...ted-write-counts-for-SD-cards-in-CQ-.patch | 2 +- ...th-hci_sync-Fix-crash-on-NULL-parent.patch | 2 +- ...ort-for-per-plane-scaling-filter-sel.patch | 4 +- ...ble-write-caching-on-Samsung-2023-mo.patch | 10 ++--- ...-Also-unregister-pl011_axi_platform_.patch | 2 +- ...equest-for-min-clocks-when-hdmi-outp.patch | 2 +- ...le-cache-on-more-known-bad-Sandisk-c.patch | 2 +- ...MC_QUIRK_BROKEN_ERASE-for-Phison-Int.patch | 2 +- ...erride-of-kernel-s-default-NUMA-poli.patch | 10 ++--- ...support-for-performing-fake-doorbell.patch | 6 +-- ...ansmit-from-devices-with-no-checksum.patch | 2 +- ...169-improve-handling-task-scheduling.patch | 2 +- ...support-for-LED-s-on-RTL8168-RTL8101.patch | 4 +- ...ix-building-with-CONFIG_LEDS_CLASS-m.patch | 2 +- ...-07-v6.9-r8169-simplify-EEE-handling.patch | 4 +- ...-v6.9-r8169-add-support-for-RTL8126A.patch | 4 +- ...ode-by-using-core-provided-pcpu-stat.patch | 4 +- ...-add-LED-support-for-RTL8125-RTL8126.patch | 2 +- ...D-related-deadlock-on-module-removal.patch | 4 +- ...g-conditional-compiling-for-call-to-.patch | 2 +- ...-disable-interrupt-source-RxOverflow.patch | 2 +- ...r8169-add-support-for-RTL8126A-rev.b.patch | 4 +- target/linux/generic/config-6.6 | 1 + .../generic/hack-6.6/259-regmap_dynamic.patch | 2 +- ...-netfilter-add-xt_FLOWOFFLOAD-target.patch | 4 +- .../790-SFP-GE-T-ignore-TX_FAULT.patch | 6 +-- ...vert-driver-core-Set-fw_devlink-on-b.patch | 2 +- .../456-mmc-core-set-card-fwnode_handle.patch | 2 +- ...ow_offload-handle-netdevice-events-f.patch | 6 +-- ...hdog-mediatek-mt7988-add-wdt-support.patch | 4 +- .../810-uvc-add-iPassion-iP2970-support.patch | 2 +- ...sfp-re-probe-modules-on-DEV_UP-event.patch | 2 +- ...14-net-phy-sfp-add-support-for-SMBus.patch | 6 +-- ...c3-add-optional-PHY-interface-clocks.patch | 4 +- ...ove-performance-usb-using-lowmem-for.patch | 8 ++-- ...dd-starfive-jh7100-hsuart-compatible.patch | 8 ++-- 73 files changed, 136 insertions(+), 176 deletions(-) delete mode 100644 target/linux/bcm27xx/patches-6.6/950-0029-vc4_hdmi-Avoid-log-spam-for-audio-start-failure.patch diff --git a/include/kernel-6.6 b/include/kernel-6.6 index 875c715ba4b6f4..1e5dc77de0eb75 100644 --- a/include/kernel-6.6 +++ b/include/kernel-6.6 @@ -1,2 +1,2 @@ -LINUX_VERSION-6.6 = .65 -LINUX_KERNEL_HASH-6.6.65 = 7ae1476e8b4c86e7754e581d45d6fbce5932bfefce934758a2907d6d79eca3e0 +LINUX_VERSION-6.6 = .66 +LINUX_KERNEL_HASH-6.6.66 = 9d757937c4661c2f512c62641b74ef74eff9bb13dc5dbcbaaa108c21152f1e52 diff --git a/target/linux/airoha/patches-6.6/019-01-v6.11-clk-en7523-Add-reset-controller-support-for-EN7581-S.patch b/target/linux/airoha/patches-6.6/019-01-v6.11-clk-en7523-Add-reset-controller-support-for-EN7581-S.patch index f7cc5159eaf5a6..4d9ff9ef9de3e3 100644 --- a/target/linux/airoha/patches-6.6/019-01-v6.11-clk-en7523-Add-reset-controller-support-for-EN7581-S.patch +++ b/target/linux/airoha/patches-6.6/019-01-v6.11-clk-en7523-Add-reset-controller-support-for-EN7581-S.patch @@ -139,7 +139,7 @@ Signed-off-by: Stephen Boyd return PTR_ERR(pb_base); @@ -428,6 +510,95 @@ static void en7523_register_clocks(struc - clk_data->num = EN7523_NUM_CLOCKS; + clk_data->hws[EN7523_CLK_PCIE] = hw; } +static int en7523_reset_update(struct reset_controller_dev *rcdev, diff --git a/target/linux/airoha/patches-6.6/033-02-v6.13-clk-en7523-move-clock_register-in-hw_init-callback.patch b/target/linux/airoha/patches-6.6/033-02-v6.13-clk-en7523-move-clock_register-in-hw_init-callback.patch index f4cfaa2bf9d901..6a76886c1b4856 100644 --- a/target/linux/airoha/patches-6.6/033-02-v6.13-clk-en7523-move-clock_register-in-hw_init-callback.patch +++ b/target/linux/airoha/patches-6.6/033-02-v6.13-clk-en7523-move-clock_register-in-hw_init-callback.patch @@ -51,7 +51,7 @@ Signed-off-by: Stephen Boyd void __iomem *base, void __iomem *np_base) { @@ -449,6 +436,49 @@ static void en7523_register_clocks(struc - clk_data->num = EN7523_NUM_CLOCKS; + clk_data->hws[EN7523_CLK_PCIE] = hw; } +static int en7523_clk_hw_init(struct platform_device *pdev, diff --git a/target/linux/airoha/patches-6.6/033-03-v6.13-clk-en7523-introduce-chip_scu-regmap.patch b/target/linux/airoha/patches-6.6/033-03-v6.13-clk-en7523-introduce-chip_scu-regmap.patch index 6c34ca2fa54808..31966273f0238d 100644 --- a/target/linux/airoha/patches-6.6/033-03-v6.13-clk-en7523-introduce-chip_scu-regmap.patch +++ b/target/linux/airoha/patches-6.6/033-03-v6.13-clk-en7523-introduce-chip_scu-regmap.patch @@ -63,7 +63,7 @@ Signed-off-by: Stephen Boyd val >>= desc->div_shift; val &= (1 << desc->div_bits) - 1; -@@ -416,9 +409,12 @@ static void en7523_register_clocks(struc +@@ -418,9 +411,12 @@ static void en7523_register_clocks(struc for (i = 0; i < ARRAY_SIZE(en7523_base_clks); i++) { const struct en_clk_desc *desc = &en7523_base_clks[i]; diff --git a/target/linux/ath79/patches-6.6/900-unaligned_access_hacks.patch b/target/linux/ath79/patches-6.6/900-unaligned_access_hacks.patch index dd57c53a18101a..969cde5ce27901 100644 --- a/target/linux/ath79/patches-6.6/900-unaligned_access_hacks.patch +++ b/target/linux/ath79/patches-6.6/900-unaligned_access_hacks.patch @@ -259,7 +259,7 @@ SVN-Revision: 35130 #include #include #include -@@ -893,10 +894,10 @@ static void tcp_v6_send_response(const s +@@ -891,10 +892,10 @@ static void tcp_v6_send_response(const s topt = (__be32 *)(t1 + 1); if (tsecr) { @@ -337,7 +337,7 @@ SVN-Revision: 35130 #endif /* _LINUX_TYPES_H */ --- a/net/ipv4/af_inet.c +++ b/net/ipv4/af_inet.c -@@ -1508,8 +1508,8 @@ struct sk_buff *inet_gro_receive(struct +@@ -1506,8 +1506,8 @@ struct sk_buff *inet_gro_receive(struct goto out; NAPI_GRO_CB(skb)->proto = proto; diff --git a/target/linux/bcm27xx/patches-6.6/950-0029-vc4_hdmi-Avoid-log-spam-for-audio-start-failure.patch b/target/linux/bcm27xx/patches-6.6/950-0029-vc4_hdmi-Avoid-log-spam-for-audio-start-failure.patch deleted file mode 100644 index a73c5e3163fa5e..00000000000000 --- a/target/linux/bcm27xx/patches-6.6/950-0029-vc4_hdmi-Avoid-log-spam-for-audio-start-failure.patch +++ /dev/null @@ -1,41 +0,0 @@ -From 7508b889b8c8058e53ceeec90a1e3cc998897e16 Mon Sep 17 00:00:00 2001 -From: Dom Cobley -Date: Tue, 6 Dec 2022 15:05:56 +0000 -Subject: [PATCH 0029/1085] vc4_hdmi: Avoid log spam for audio start failure - -We regularly get dmesg error reports of: -[ 18.184066] hdmi-audio-codec hdmi-audio-codec.3.auto: ASoC: error at snd_soc_dai_startup on i2s-hifi: -19 -[ 18.184098] MAI: soc_pcm_open() failed (-19) - -Currently I get 30 of these when booting to desktop. -We always say, ignore they are harmless, but removing them would be good. - -A bit of investigation shows, for me, the errors are all generated by second, unused hdmi interface. - -It shows as an alsa device, and pulseaudio attempts to open it (numerous times), generating a kernel -error message each time. - -systemctl --user restart pulseaudio.service generates 6 additional error messages. - -The error messages all come through: -https://github.com/raspberrypi/linux/blob/a009a9c0d79dfec114ee5102ec3d3325a172c952/sound/soc/soc-pcm.c#L39 - -which suggests returning ENOTSUPP, rather that ENODEV will be quiet. And indeed it is. - -Note: earlier kernels do not have the quiet ENOTSUPP, so additional cherry-picks will be needed to backport -Signed-off-by: Dom Cobley ---- - drivers/gpu/drm/vc4/vc4_hdmi.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - ---- a/drivers/gpu/drm/vc4/vc4_hdmi.c -+++ b/drivers/gpu/drm/vc4/vc4_hdmi.c -@@ -2404,7 +2404,7 @@ static int vc4_hdmi_audio_startup(struct - } - - if (!vc4_hdmi_audio_can_stream(vc4_hdmi)) { -- ret = -ENODEV; -+ ret = -ENOTSUPP; - goto out_dev_exit; - } - diff --git a/target/linux/bcm27xx/patches-6.6/950-0036-drm-vc4-Set-AXI-panic-modes-for-the-HVS.patch b/target/linux/bcm27xx/patches-6.6/950-0036-drm-vc4-Set-AXI-panic-modes-for-the-HVS.patch index 13015f1f497a47..3ecea01fcd56a6 100644 --- a/target/linux/bcm27xx/patches-6.6/950-0036-drm-vc4-Set-AXI-panic-modes-for-the-HVS.patch +++ b/target/linux/bcm27xx/patches-6.6/950-0036-drm-vc4-Set-AXI-panic-modes-for-the-HVS.patch @@ -19,7 +19,7 @@ Signed-off-by: Dave Stevenson --- a/drivers/gpu/drm/vc4/vc4_hvs.c +++ b/drivers/gpu/drm/vc4/vc4_hvs.c -@@ -1368,6 +1368,17 @@ static int vc4_hvs_bind(struct device *d +@@ -1379,6 +1379,17 @@ static int vc4_hvs_bind(struct device *d dispctrl |= VC4_SET_FIELD(2, SCALER_DISPCTRL_PANIC1); dispctrl |= VC4_SET_FIELD(2, SCALER_DISPCTRL_PANIC2); diff --git a/target/linux/bcm27xx/patches-6.6/950-0061-Revert-Revert-xhci-add-quirk-for-host-controllers-th.patch b/target/linux/bcm27xx/patches-6.6/950-0061-Revert-Revert-xhci-add-quirk-for-host-controllers-th.patch index 1135b31d4f6222..f8aa2fe5a74b52 100644 --- a/target/linux/bcm27xx/patches-6.6/950-0061-Revert-Revert-xhci-add-quirk-for-host-controllers-th.patch +++ b/target/linux/bcm27xx/patches-6.6/950-0061-Revert-Revert-xhci-add-quirk-for-host-controllers-th.patch @@ -14,7 +14,7 @@ We don't agree with upstream revert so undo it. --- a/drivers/usb/host/xhci-pci.c +++ b/drivers/usb/host/xhci-pci.c -@@ -490,8 +490,10 @@ static void xhci_pci_quirks(struct devic +@@ -480,8 +480,10 @@ static void xhci_pci_quirks(struct devic pdev->device == 0x3432) xhci->quirks |= XHCI_BROKEN_STREAMS; diff --git a/target/linux/bcm27xx/patches-6.6/950-0083-amba_pl011-Add-cts-event-workaround-DT-property.patch b/target/linux/bcm27xx/patches-6.6/950-0083-amba_pl011-Add-cts-event-workaround-DT-property.patch index 58910b861198a3..efee03dc801a74 100644 --- a/target/linux/bcm27xx/patches-6.6/950-0083-amba_pl011-Add-cts-event-workaround-DT-property.patch +++ b/target/linux/bcm27xx/patches-6.6/950-0083-amba_pl011-Add-cts-event-workaround-DT-property.patch @@ -36,7 +36,7 @@ Signed-off-by: Phil Elwell - reg --- a/drivers/tty/serial/amba-pl011.c +++ b/drivers/tty/serial/amba-pl011.c -@@ -2808,6 +2808,11 @@ static int pl011_probe(struct amba_devic +@@ -2815,6 +2815,11 @@ static int pl011_probe(struct amba_devic if (IS_ERR(uap->clk)) return PTR_ERR(uap->clk); diff --git a/target/linux/bcm27xx/patches-6.6/950-0092-MMC-added-alternative-MMC-driver.patch b/target/linux/bcm27xx/patches-6.6/950-0092-MMC-added-alternative-MMC-driver.patch index aebb491f32af30..9b86d0e6a32af2 100644 --- a/target/linux/bcm27xx/patches-6.6/950-0092-MMC-added-alternative-MMC-driver.patch +++ b/target/linux/bcm27xx/patches-6.6/950-0092-MMC-added-alternative-MMC-driver.patch @@ -344,7 +344,7 @@ Signed-off-by: Phil Elwell } --- a/drivers/mmc/core/quirks.h +++ b/drivers/mmc/core/quirks.h -@@ -134,6 +134,14 @@ static const struct mmc_fixup __maybe_un +@@ -143,6 +143,14 @@ static const struct mmc_fixup __maybe_un MMC_FIXUP(CID_NAME_ANY, CID_MANFID_SANDISK_SD, 0x5344, add_quirk_sd, MMC_QUIRK_BROKEN_SD_DISCARD), @@ -2013,10 +2013,10 @@ Signed-off-by: Phil Elwell sdhci_dumpregs(host); --- a/include/linux/mmc/card.h +++ b/include/linux/mmc/card.h -@@ -296,6 +296,7 @@ struct mmc_card { - #define MMC_QUIRK_BROKEN_SD_DISCARD (1<<14) /* Disable broken SD discard support */ +@@ -297,6 +297,7 @@ struct mmc_card { #define MMC_QUIRK_BROKEN_SD_CACHE (1<<15) /* Disable broken SD cache support */ #define MMC_QUIRK_BROKEN_CACHE_FLUSH (1<<16) /* Don't flush cache until the write has occurred */ + #define MMC_QUIRK_BROKEN_SD_POWEROFF_NOTIFY (1<<17) /* Disable broken SD poweroff notify support */ +#define MMC_QUIRK_ERASE_BROKEN (1<<31) /* Skip erase */ bool written_flag; /* Indicates eMMC has been written since power on */ diff --git a/target/linux/bcm27xx/patches-6.6/950-0106-Add-support-for-all-the-downstream-rpi-sound-card-dr.patch b/target/linux/bcm27xx/patches-6.6/950-0106-Add-support-for-all-the-downstream-rpi-sound-card-dr.patch index a8a58b58fa64c1..6ffc9364da8889 100644 --- a/target/linux/bcm27xx/patches-6.6/950-0106-Add-support-for-all-the-downstream-rpi-sound-card-dr.patch +++ b/target/linux/bcm27xx/patches-6.6/950-0106-Add-support-for-all-the-downstream-rpi-sound-card-dr.patch @@ -17583,7 +17583,7 @@ Signed-off-by: Phil Elwell * For devices with more than one control interface, we assume the --- a/sound/usb/quirks.c +++ b/sound/usb/quirks.c -@@ -2212,6 +2212,8 @@ static const struct usb_audio_quirk_flag +@@ -2233,6 +2233,8 @@ static const struct usb_audio_quirk_flag QUIRK_FLAG_ALIGN_TRANSFER), DEVICE_FLG(0x534d, 0x2109, /* MacroSilicon MS2109 */ QUIRK_FLAG_ALIGN_TRANSFER), diff --git a/target/linux/bcm27xx/patches-6.6/950-0161-xhci-implement-xhci_fixup_endpoint-for-interval-adju.patch b/target/linux/bcm27xx/patches-6.6/950-0161-xhci-implement-xhci_fixup_endpoint-for-interval-adju.patch index f5eea9b47df860..942f47a0a36e08 100644 --- a/target/linux/bcm27xx/patches-6.6/950-0161-xhci-implement-xhci_fixup_endpoint-for-interval-adju.patch +++ b/target/linux/bcm27xx/patches-6.6/950-0161-xhci-implement-xhci_fixup_endpoint-for-interval-adju.patch @@ -125,7 +125,7 @@ Signed-off-by: Jonathan Bell * non-error returns are a promise to giveback() the urb later * we drop ownership so next owner (or urb unlink) can get it */ -@@ -5328,6 +5431,7 @@ static const struct hc_driver xhci_hc_dr +@@ -5347,6 +5450,7 @@ static const struct hc_driver xhci_hc_dr .endpoint_reset = xhci_endpoint_reset, .check_bandwidth = xhci_check_bandwidth, .reset_bandwidth = xhci_reset_bandwidth, diff --git a/target/linux/bcm27xx/patches-6.6/950-0169-hid-usb-Add-device-quirks-for-Freeway-Airmouse-T3-an.patch b/target/linux/bcm27xx/patches-6.6/950-0169-hid-usb-Add-device-quirks-for-Freeway-Airmouse-T3-an.patch index 6e9ca2261bb087..a65d198d21f48f 100644 --- a/target/linux/bcm27xx/patches-6.6/950-0169-hid-usb-Add-device-quirks-for-Freeway-Airmouse-T3-an.patch +++ b/target/linux/bcm27xx/patches-6.6/950-0169-hid-usb-Add-device-quirks-for-Freeway-Airmouse-T3-an.patch @@ -23,7 +23,7 @@ Signed-off-by: Jonathan Bell --- a/drivers/hid/hid-ids.h +++ b/drivers/hid/hid-ids.h -@@ -242,6 +242,9 @@ +@@ -243,6 +243,9 @@ #define USB_VENDOR_ID_BAANTO 0x2453 #define USB_DEVICE_ID_BAANTO_MT_190W2 0x0100 @@ -33,7 +33,7 @@ Signed-off-by: Jonathan Bell #define USB_VENDOR_ID_BELKIN 0x050d #define USB_DEVICE_ID_FLIP_KVM 0x3201 -@@ -1405,6 +1408,9 @@ +@@ -1406,6 +1409,9 @@ #define USB_VENDOR_ID_XIAOMI 0x2717 #define USB_DEVICE_ID_MI_SILENT_MOUSE 0x5014 diff --git a/target/linux/bcm27xx/patches-6.6/950-0301-drm-panel-simple-Add-a-timing-for-the-Raspberry-Pi-7.patch b/target/linux/bcm27xx/patches-6.6/950-0301-drm-panel-simple-Add-a-timing-for-the-Raspberry-Pi-7.patch index d5cee828b07630..e3a07581f82967 100644 --- a/target/linux/bcm27xx/patches-6.6/950-0301-drm-panel-simple-Add-a-timing-for-the-Raspberry-Pi-7.patch +++ b/target/linux/bcm27xx/patches-6.6/950-0301-drm-panel-simple-Add-a-timing-for-the-Raspberry-Pi-7.patch @@ -47,7 +47,7 @@ Signed-off-by: Dave Stevenson static const struct display_timing rocktech_rk070er9427_timing = { .pixelclock = { 26400000, 33300000, 46800000 }, .hactive = { 800, 800, 800 }, -@@ -4427,6 +4452,9 @@ static const struct of_device_id platfor +@@ -4452,6 +4477,9 @@ static const struct of_device_id platfor .compatible = "rocktech,rk043fn48h", .data = &rocktech_rk043fn48h, }, { diff --git a/target/linux/bcm27xx/patches-6.6/950-0343-drm-panel-simple-add-Geekworm-MZP280-Panel.patch b/target/linux/bcm27xx/patches-6.6/950-0343-drm-panel-simple-add-Geekworm-MZP280-Panel.patch index d5a071364a0ee7..49493e67a9cdc6 100644 --- a/target/linux/bcm27xx/patches-6.6/950-0343-drm-panel-simple-add-Geekworm-MZP280-Panel.patch +++ b/target/linux/bcm27xx/patches-6.6/950-0343-drm-panel-simple-add-Geekworm-MZP280-Panel.patch @@ -46,7 +46,7 @@ Acked-by: Maxime Ripard static const struct drm_display_mode giantplus_gpg482739qs5_mode = { .clock = 9000, .hdisplay = 480, -@@ -4302,6 +4328,9 @@ static const struct of_device_id platfor +@@ -4327,6 +4353,9 @@ static const struct of_device_id platfor .compatible = "friendlyarm,hd702e", .data = &friendlyarm_hd702e, }, { diff --git a/target/linux/bcm27xx/patches-6.6/950-0359-mm-page_alloc-cma-introduce-a-customisable-threshold.patch b/target/linux/bcm27xx/patches-6.6/950-0359-mm-page_alloc-cma-introduce-a-customisable-threshold.patch index f8baf9befc5b0f..8cf8a05098cb97 100644 --- a/target/linux/bcm27xx/patches-6.6/950-0359-mm-page_alloc-cma-introduce-a-customisable-threshold.patch +++ b/target/linux/bcm27xx/patches-6.6/950-0359-mm-page_alloc-cma-introduce-a-customisable-threshold.patch @@ -48,7 +48,7 @@ Signed-off-by: David Plowman /* * A cached value of the page's pageblock's migratetype, used when the page is * put on a pcplist. Used to avoid the pageblock migratetype lookup when -@@ -2094,12 +2115,13 @@ __rmqueue(struct zone *zone, unsigned in +@@ -2109,12 +2130,13 @@ __rmqueue(struct zone *zone, unsigned in if (IS_ENABLED(CONFIG_CMA)) { /* * Balance movable allocations between regular and CMA areas by diff --git a/target/linux/bcm27xx/patches-6.6/950-0401-drm-panel-simple-Add-Innolux-AT056tN53V1-5.6-VGA.patch b/target/linux/bcm27xx/patches-6.6/950-0401-drm-panel-simple-Add-Innolux-AT056tN53V1-5.6-VGA.patch index d8376a3fe598cc..394109d5658be9 100644 --- a/target/linux/bcm27xx/patches-6.6/950-0401-drm-panel-simple-Add-Innolux-AT056tN53V1-5.6-VGA.patch +++ b/target/linux/bcm27xx/patches-6.6/950-0401-drm-panel-simple-Add-Innolux-AT056tN53V1-5.6-VGA.patch @@ -165,7 +165,7 @@ Signed-off-by: Phil Elwell static const struct drm_display_mode innolux_at070tn92_mode = { .clock = 33333, .hdisplay = 800, -@@ -4352,6 +4384,9 @@ static const struct of_device_id platfor +@@ -4377,6 +4409,9 @@ static const struct of_device_id platfor .compatible = "innolux,at043tn24", .data = &innolux_at043tn24, }, { diff --git a/target/linux/bcm27xx/patches-6.6/950-0441-Bluetooth-hci_sync-Add-fallback-bd-address-prop.patch b/target/linux/bcm27xx/patches-6.6/950-0441-Bluetooth-hci_sync-Add-fallback-bd-address-prop.patch index cc5e3d1dc304b6..3f9d802de3c229 100644 --- a/target/linux/bcm27xx/patches-6.6/950-0441-Bluetooth-hci_sync-Add-fallback-bd-address-prop.patch +++ b/target/linux/bcm27xx/patches-6.6/950-0441-Bluetooth-hci_sync-Add-fallback-bd-address-prop.patch @@ -20,7 +20,7 @@ Signed-off-by: Phil Elwell --- a/net/bluetooth/hci_sync.c +++ b/net/bluetooth/hci_sync.c -@@ -4865,6 +4865,7 @@ static const struct { +@@ -4872,6 +4872,7 @@ static const struct { */ static int hci_dev_setup_sync(struct hci_dev *hdev) { @@ -28,7 +28,7 @@ Signed-off-by: Phil Elwell int ret = 0; bool invalid_bdaddr; size_t i; -@@ -4893,7 +4894,8 @@ static int hci_dev_setup_sync(struct hci +@@ -4900,7 +4901,8 @@ static int hci_dev_setup_sync(struct hci test_bit(HCI_QUIRK_USE_BDADDR_PROPERTY, &hdev->quirks); if (!ret) { if (test_bit(HCI_QUIRK_USE_BDADDR_PROPERTY, &hdev->quirks) && diff --git a/target/linux/bcm27xx/patches-6.6/950-0482-xhci-quirks-add-link-TRB-quirk-for-VL805.patch b/target/linux/bcm27xx/patches-6.6/950-0482-xhci-quirks-add-link-TRB-quirk-for-VL805.patch index 4a7bfd4f2eb060..93e45b54424fad 100644 --- a/target/linux/bcm27xx/patches-6.6/950-0482-xhci-quirks-add-link-TRB-quirk-for-VL805.patch +++ b/target/linux/bcm27xx/patches-6.6/950-0482-xhci-quirks-add-link-TRB-quirk-for-VL805.patch @@ -24,7 +24,7 @@ Signed-off-by: Jonathan Bell --- a/drivers/usb/host/xhci-pci.c +++ b/drivers/usb/host/xhci-pci.c -@@ -493,6 +493,7 @@ static void xhci_pci_quirks(struct devic +@@ -483,6 +483,7 @@ static void xhci_pci_quirks(struct devic if (pdev->vendor == PCI_VENDOR_ID_VIA && pdev->device == 0x3483) { xhci->quirks |= XHCI_LPM_SUPPORT; xhci->quirks |= XHCI_EP_CTX_BROKEN_DCS; @@ -52,9 +52,9 @@ Signed-off-by: Jonathan Bell addr = xhci_trb_virt_to_dma(new_seg, new_deq); --- a/drivers/usb/host/xhci.h +++ b/drivers/usb/host/xhci.h -@@ -1662,6 +1662,9 @@ struct xhci_hcd { - #define XHCI_WRITE_64_HI_LO BIT_ULL(47) +@@ -1663,6 +1663,9 @@ struct xhci_hcd { #define XHCI_CDNS_SCTX_QUIRK BIT_ULL(48) + #define XHCI_ETRON_HOST BIT_ULL(49) +/* Downstream VLI fixes */ +#define XHCI_AVOID_DQ_ON_LINK BIT_ULL(56) diff --git a/target/linux/bcm27xx/patches-6.6/950-0483-usb-xhci-borrow-upstream-TRB_FETCH-quirk-on-VL805-ho.patch b/target/linux/bcm27xx/patches-6.6/950-0483-usb-xhci-borrow-upstream-TRB_FETCH-quirk-on-VL805-ho.patch index e76a413d67f09d..852e6a36735c29 100644 --- a/target/linux/bcm27xx/patches-6.6/950-0483-usb-xhci-borrow-upstream-TRB_FETCH-quirk-on-VL805-ho.patch +++ b/target/linux/bcm27xx/patches-6.6/950-0483-usb-xhci-borrow-upstream-TRB_FETCH-quirk-on-VL805-ho.patch @@ -22,7 +22,7 @@ Signed-off-by: Jonathan Bell --- a/drivers/usb/host/xhci-pci.c +++ b/drivers/usb/host/xhci-pci.c -@@ -494,6 +494,7 @@ static void xhci_pci_quirks(struct devic +@@ -484,6 +484,7 @@ static void xhci_pci_quirks(struct devic xhci->quirks |= XHCI_LPM_SUPPORT; xhci->quirks |= XHCI_EP_CTX_BROKEN_DCS; xhci->quirks |= XHCI_AVOID_DQ_ON_LINK; diff --git a/target/linux/bcm27xx/patches-6.6/950-0484-usb-xhci-add-VLI_SS_BULK_OUT_BUG-quirk.patch b/target/linux/bcm27xx/patches-6.6/950-0484-usb-xhci-add-VLI_SS_BULK_OUT_BUG-quirk.patch index 663a2f93233fe7..add65ee641de97 100644 --- a/target/linux/bcm27xx/patches-6.6/950-0484-usb-xhci-add-VLI_SS_BULK_OUT_BUG-quirk.patch +++ b/target/linux/bcm27xx/patches-6.6/950-0484-usb-xhci-add-VLI_SS_BULK_OUT_BUG-quirk.patch @@ -90,7 +90,7 @@ Signed-off-by: Jonathan Bell /* Allow 3 retries for everything but isoc, set CErr = 3 */ --- a/drivers/usb/host/xhci-pci.c +++ b/drivers/usb/host/xhci-pci.c -@@ -495,6 +495,7 @@ static void xhci_pci_quirks(struct devic +@@ -485,6 +485,7 @@ static void xhci_pci_quirks(struct devic xhci->quirks |= XHCI_EP_CTX_BROKEN_DCS; xhci->quirks |= XHCI_AVOID_DQ_ON_LINK; xhci->quirks |= XHCI_ZHAOXIN_TRB_FETCH; @@ -100,7 +100,7 @@ Signed-off-by: Jonathan Bell if (pdev->vendor == PCI_VENDOR_ID_ASMEDIA && --- a/drivers/usb/host/xhci.h +++ b/drivers/usb/host/xhci.h -@@ -1664,6 +1664,7 @@ struct xhci_hcd { +@@ -1665,6 +1665,7 @@ struct xhci_hcd { /* Downstream VLI fixes */ #define XHCI_AVOID_DQ_ON_LINK BIT_ULL(56) diff --git a/target/linux/bcm27xx/patches-6.6/950-0485-usb-xhci-add-XHCI_VLI_HUB_TT_QUIRK.patch b/target/linux/bcm27xx/patches-6.6/950-0485-usb-xhci-add-XHCI_VLI_HUB_TT_QUIRK.patch index 8d276e1681866f..9c45bd77e9a789 100644 --- a/target/linux/bcm27xx/patches-6.6/950-0485-usb-xhci-add-XHCI_VLI_HUB_TT_QUIRK.patch +++ b/target/linux/bcm27xx/patches-6.6/950-0485-usb-xhci-add-XHCI_VLI_HUB_TT_QUIRK.patch @@ -64,7 +64,7 @@ Signed-off-by: Jonathan Bell static void xhci_pci_quirks(struct device *dev, struct xhci_hcd *xhci) { struct pci_dev *pdev = to_pci_dev(dev); -@@ -496,6 +508,8 @@ static void xhci_pci_quirks(struct devic +@@ -486,6 +498,8 @@ static void xhci_pci_quirks(struct devic xhci->quirks |= XHCI_AVOID_DQ_ON_LINK; xhci->quirks |= XHCI_ZHAOXIN_TRB_FETCH; xhci->quirks |= XHCI_VLI_SS_BULK_OUT_BUG; @@ -75,7 +75,7 @@ Signed-off-by: Jonathan Bell if (pdev->vendor == PCI_VENDOR_ID_ASMEDIA && --- a/drivers/usb/host/xhci-ring.c +++ b/drivers/usb/host/xhci-ring.c -@@ -3679,6 +3679,48 @@ static int xhci_align_td(struct xhci_hcd +@@ -3674,6 +3674,48 @@ static int xhci_align_td(struct xhci_hcd return 1; } @@ -124,7 +124,7 @@ Signed-off-by: Jonathan Bell /* This is very similar to what ehci-q.c qtd_fill() does */ int xhci_queue_bulk_tx(struct xhci_hcd *xhci, gfp_t mem_flags, struct urb *urb, int slot_id, unsigned int ep_index) -@@ -3835,6 +3877,8 @@ int xhci_queue_bulk_tx(struct xhci_hcd * +@@ -3830,6 +3872,8 @@ int xhci_queue_bulk_tx(struct xhci_hcd * } check_trb_math(urb, enqd_len); @@ -133,7 +133,7 @@ Signed-off-by: Jonathan Bell giveback_first_trb(xhci, slot_id, ep_index, urb->stream_id, start_cycle, start_trb); return 0; -@@ -3970,6 +4014,8 @@ int xhci_queue_ctrl_tx(struct xhci_hcd * +@@ -3979,6 +4023,8 @@ int xhci_queue_ctrl_tx(struct xhci_hcd * /* Event on completion */ field | TRB_IOC | TRB_TYPE(TRB_STATUS) | ep_ring->cycle_state); @@ -144,7 +144,7 @@ Signed-off-by: Jonathan Bell return 0; --- a/drivers/usb/host/xhci.h +++ b/drivers/usb/host/xhci.h -@@ -1665,6 +1665,7 @@ struct xhci_hcd { +@@ -1666,6 +1666,7 @@ struct xhci_hcd { /* Downstream VLI fixes */ #define XHCI_AVOID_DQ_ON_LINK BIT_ULL(56) #define XHCI_VLI_SS_BULK_OUT_BUG BIT_ULL(57) diff --git a/target/linux/bcm27xx/patches-6.6/950-0519-usb-dwc3-Set-DMA-and-coherent-masks-early.patch b/target/linux/bcm27xx/patches-6.6/950-0519-usb-dwc3-Set-DMA-and-coherent-masks-early.patch index 7609657162d259..fe77f212117713 100644 --- a/target/linux/bcm27xx/patches-6.6/950-0519-usb-dwc3-Set-DMA-and-coherent-masks-early.patch +++ b/target/linux/bcm27xx/patches-6.6/950-0519-usb-dwc3-Set-DMA-and-coherent-masks-early.patch @@ -333,7 +333,7 @@ Signed-off-by: Jonathan Bell /* Global Debug LSP MUX Select */ #define DWC3_GDBGLSPMUX_ENDBC BIT(15) /* Host only */ #define DWC3_GDBGLSPMUX_HOSTSELECT(n) ((n) & 0x3fff) -@@ -1061,6 +1064,7 @@ struct dwc3_scratchpad_array { +@@ -1062,6 +1065,7 @@ struct dwc3_scratchpad_array { * @tx_max_burst_prd: max periodic ESS transmit burst size * @tx_fifo_resize_max_num: max number of fifos allocated during txfifo resize * @clear_stall_protocol: endpoint number that requires a delayed status phase @@ -341,7 +341,7 @@ Signed-off-by: Jonathan Bell * @hsphy_interface: "utmi" or "ulpi" * @connected: true when we're connected to a host, false otherwise * @softconnect: true when gadget connect is called, false when disconnect runs -@@ -1298,6 +1302,7 @@ struct dwc3 { +@@ -1299,6 +1303,7 @@ struct dwc3 { u8 tx_max_burst_prd; u8 tx_fifo_resize_max_num; u8 clear_stall_protocol; diff --git a/target/linux/bcm27xx/patches-6.6/950-0531-serial-pl011-rp1-uart-support.patch b/target/linux/bcm27xx/patches-6.6/950-0531-serial-pl011-rp1-uart-support.patch index a36fbd2a597c4c..f916b5709d1cba 100644 --- a/target/linux/bcm27xx/patches-6.6/950-0531-serial-pl011-rp1-uart-support.patch +++ b/target/linux/bcm27xx/patches-6.6/950-0531-serial-pl011-rp1-uart-support.patch @@ -31,7 +31,7 @@ Signed-off-by: Phil Elwell #ifdef CONFIG_ACPI_SPCR_TABLE static const struct vendor_data vendor_qdt_qdf2400_e44 = { .reg_offset = pl011_std_offsets, -@@ -2979,6 +2993,86 @@ static struct platform_driver arm_sbsa_u +@@ -2986,6 +3000,86 @@ static struct platform_driver arm_sbsa_u }, }; @@ -118,7 +118,7 @@ Signed-off-by: Phil Elwell static const struct amba_id pl011_ids[] = { { .id = 0x00041011, -@@ -3012,6 +3106,8 @@ static int __init pl011_init(void) +@@ -3019,6 +3113,8 @@ static int __init pl011_init(void) if (platform_driver_register(&arm_sbsa_uart_platform_driver)) pr_warn("could not register SBSA UART platform driver\n"); diff --git a/target/linux/bcm27xx/patches-6.6/950-0585-drm-vc4-Introduce-generation-number-enum.patch b/target/linux/bcm27xx/patches-6.6/950-0585-drm-vc4-Introduce-generation-number-enum.patch index 8372ae23fec77d..f57aa6d1b79244 100644 --- a/target/linux/bcm27xx/patches-6.6/950-0585-drm-vc4-Introduce-generation-number-enum.patch +++ b/target/linux/bcm27xx/patches-6.6/950-0585-drm-vc4-Introduce-generation-number-enum.patch @@ -664,7 +664,7 @@ Signed-off-by: Maxime Ripard dispctrl &= ~(SCALER_DISPCTRL_DMAEIRQ | SCALER_DISPCTRL_SLVWREIRQ | SCALER_DISPCTRL_SLVRDEIRQ | -@@ -1398,7 +1404,7 @@ static int vc4_hvs_bind(struct device *d +@@ -1409,7 +1415,7 @@ static int vc4_hvs_bind(struct device *d /* Recompute Composite Output Buffer (COB) allocations for the displays */ diff --git a/target/linux/bcm27xx/patches-6.6/950-0590-drm-vc4-hvs-Create-hw_init-function.patch b/target/linux/bcm27xx/patches-6.6/950-0590-drm-vc4-hvs-Create-hw_init-function.patch index 7ddac05734135a..afa95ac2586112 100644 --- a/target/linux/bcm27xx/patches-6.6/950-0590-drm-vc4-hvs-Create-hw_init-function.patch +++ b/target/linux/bcm27xx/patches-6.6/950-0590-drm-vc4-hvs-Create-hw_init-function.patch @@ -99,7 +99,7 @@ Signed-off-by: Maxime Ripard reg = HVS_READ(SCALER_DISPECTRL); reg &= ~SCALER_DISPECTRL_DSP2_MUX_MASK; -@@ -1440,6 +1371,86 @@ static int vc4_hvs_bind(struct device *d +@@ -1451,6 +1382,86 @@ static int vc4_hvs_bind(struct device *d HVS_WRITE(SCALER_DISPCTRL, dispctrl); diff --git a/target/linux/bcm27xx/patches-6.6/950-0591-drm-vc4-hvs-Create-cob_init-function.patch b/target/linux/bcm27xx/patches-6.6/950-0591-drm-vc4-hvs-Create-cob_init-function.patch index 6add44807baad2..00cefef2353917 100644 --- a/target/linux/bcm27xx/patches-6.6/950-0591-drm-vc4-hvs-Create-cob_init-function.patch +++ b/target/linux/bcm27xx/patches-6.6/950-0591-drm-vc4-hvs-Create-cob_init-function.patch @@ -16,7 +16,7 @@ Signed-off-by: Maxime Ripard --- a/drivers/gpu/drm/vc4/vc4_hvs.c +++ b/drivers/gpu/drm/vc4/vc4_hvs.c -@@ -1374,6 +1374,77 @@ static int vc4_hvs_hw_init(struct vc4_hv +@@ -1385,6 +1385,77 @@ static int vc4_hvs_hw_init(struct vc4_hv return 0; } @@ -94,7 +94,7 @@ Signed-off-by: Maxime Ripard static int vc4_hvs_bind(struct device *dev, struct device *master, void *data) { struct platform_device *pdev = to_platform_device(dev); -@@ -1381,7 +1452,6 @@ static int vc4_hvs_bind(struct device *d +@@ -1392,7 +1463,6 @@ static int vc4_hvs_bind(struct device *d struct vc4_dev *vc4 = to_vc4_dev(drm); struct vc4_hvs *hvs = NULL; int ret; @@ -102,7 +102,7 @@ Signed-off-by: Maxime Ripard hvs = __vc4_hvs_alloc(vc4, NULL); if (IS_ERR(hvs)) -@@ -1451,59 +1521,9 @@ static int vc4_hvs_bind(struct device *d +@@ -1462,59 +1532,9 @@ static int vc4_hvs_bind(struct device *d if (ret) return ret; diff --git a/target/linux/bcm27xx/patches-6.6/950-0592-drm-vc4-hvs-Rename-hvs_regs-list.patch b/target/linux/bcm27xx/patches-6.6/950-0592-drm-vc4-hvs-Rename-hvs_regs-list.patch index f354f6acd7f0f8..2ce5289a65414d 100644 --- a/target/linux/bcm27xx/patches-6.6/950-0592-drm-vc4-hvs-Rename-hvs_regs-list.patch +++ b/target/linux/bcm27xx/patches-6.6/950-0592-drm-vc4-hvs-Rename-hvs_regs-list.patch @@ -25,7 +25,7 @@ Signed-off-by: Maxime Ripard VC4_REG32(SCALER_DISPCTRL), VC4_REG32(SCALER_DISPSTAT), VC4_REG32(SCALER_DISPID), -@@ -1462,8 +1462,8 @@ static int vc4_hvs_bind(struct device *d +@@ -1473,8 +1473,8 @@ static int vc4_hvs_bind(struct device *d return PTR_ERR(hvs->regs); hvs->regset.base = hvs->regs; diff --git a/target/linux/bcm27xx/patches-6.6/950-0595-drm-vc4-hvs-Change-prototype-of-__vc4_hvs_alloc-to-p.patch b/target/linux/bcm27xx/patches-6.6/950-0595-drm-vc4-hvs-Change-prototype-of-__vc4_hvs_alloc-to-p.patch index 36c4010b7e9425..e7a63dcfcb5a4b 100644 --- a/target/linux/bcm27xx/patches-6.6/950-0595-drm-vc4-hvs-Change-prototype-of-__vc4_hvs_alloc-to-p.patch +++ b/target/linux/bcm27xx/patches-6.6/950-0595-drm-vc4-hvs-Change-prototype-of-__vc4_hvs_alloc-to-p.patch @@ -68,7 +68,7 @@ Signed-off-by: Maxime Ripard hvs->pdev = pdev; spin_lock_init(&hvs->mm_lock); -@@ -1451,16 +1454,17 @@ static int vc4_hvs_bind(struct device *d +@@ -1462,16 +1465,17 @@ static int vc4_hvs_bind(struct device *d struct drm_device *drm = dev_get_drvdata(master); struct vc4_dev *vc4 = to_vc4_dev(drm); struct vc4_hvs *hvs = NULL; diff --git a/target/linux/bcm27xx/patches-6.6/950-0602-drm-vc4-Enable-SCALER_CONTROL-early-in-HVS-init.patch b/target/linux/bcm27xx/patches-6.6/950-0602-drm-vc4-Enable-SCALER_CONTROL-early-in-HVS-init.patch index 62406a268b8f6a..d694e865722a41 100644 --- a/target/linux/bcm27xx/patches-6.6/950-0602-drm-vc4-Enable-SCALER_CONTROL-early-in-HVS-init.patch +++ b/target/linux/bcm27xx/patches-6.6/950-0602-drm-vc4-Enable-SCALER_CONTROL-early-in-HVS-init.patch @@ -35,7 +35,7 @@ Signed-off-by: Tim Gover dispctrl |= SCALER_DISPCTRL_DISPEIRQ(0) | SCALER_DISPCTRL_DISPEIRQ(1) | SCALER_DISPCTRL_DISPEIRQ(2); -@@ -1512,6 +1514,10 @@ static int vc4_hvs_bind(struct device *d +@@ -1523,6 +1525,10 @@ static int vc4_hvs_bind(struct device *d else hvs->dlist = hvs->regs + SCALER5_DLIST_START; @@ -46,7 +46,7 @@ Signed-off-by: Tim Gover /* Upload filter kernels. We only have the one for now, so we * keep it around for the lifetime of the driver. */ -@@ -1521,10 +1527,6 @@ static int vc4_hvs_bind(struct device *d +@@ -1532,10 +1538,6 @@ static int vc4_hvs_bind(struct device *d if (ret) return ret; diff --git a/target/linux/bcm27xx/patches-6.6/950-0610-drm-vc4-hvs-Support-BCM2712-HVS.patch b/target/linux/bcm27xx/patches-6.6/950-0610-drm-vc4-hvs-Support-BCM2712-HVS.patch index 9d19b23d95ab71..390d445497659f 100644 --- a/target/linux/bcm27xx/patches-6.6/950-0610-drm-vc4-hvs-Support-BCM2712-HVS.patch +++ b/target/linux/bcm27xx/patches-6.6/950-0610-drm-vc4-hvs-Support-BCM2712-HVS.patch @@ -734,7 +734,7 @@ Signed-off-by: Maxime Ripard vc4->hvs = hvs; -@@ -1379,10 +1715,124 @@ static int vc4_hvs_hw_init(struct vc4_hv +@@ -1390,10 +1726,124 @@ static int vc4_hvs_hw_init(struct vc4_hv return 0; } @@ -860,7 +860,7 @@ Signed-off-by: Maxime Ripard /* * Recompute Composite Output Buffer (COB) allocations for the -@@ -1443,6 +1893,31 @@ static int vc4_hvs_cob_init(struct vc4_h +@@ -1454,6 +1904,31 @@ static int vc4_hvs_cob_init(struct vc4_h HVS_WRITE(SCALER_DISPBASE0, reg); break; @@ -892,7 +892,7 @@ Signed-off-by: Maxime Ripard default: return -EINVAL; } -@@ -1468,10 +1943,16 @@ static int vc4_hvs_bind(struct device *d +@@ -1479,10 +1954,16 @@ static int vc4_hvs_bind(struct device *d return PTR_ERR(hvs); hvs->regset.base = hvs->regs; @@ -912,7 +912,7 @@ Signed-off-by: Maxime Ripard struct rpi_firmware *firmware; struct device_node *node; unsigned int max_rate; -@@ -1485,12 +1966,20 @@ static int vc4_hvs_bind(struct device *d +@@ -1496,12 +1977,20 @@ static int vc4_hvs_bind(struct device *d if (!firmware) return -EPROBE_DEFER; @@ -934,7 +934,7 @@ Signed-off-by: Maxime Ripard max_rate = rpi_firmware_clk_get_max_rate(firmware, RPI_FIRMWARE_CORE_CLK_ID); rpi_firmware_put(firmware); -@@ -1507,14 +1996,51 @@ static int vc4_hvs_bind(struct device *d +@@ -1518,14 +2007,51 @@ static int vc4_hvs_bind(struct device *d dev_err(&pdev->dev, "Couldn't enable the core clock\n"); return ret; } @@ -990,7 +990,7 @@ Signed-off-by: Maxime Ripard if (ret) return ret; -@@ -1531,10 +2057,12 @@ static int vc4_hvs_bind(struct device *d +@@ -1542,10 +2068,12 @@ static int vc4_hvs_bind(struct device *d if (ret) return ret; @@ -1007,7 +1007,7 @@ Signed-off-by: Maxime Ripard return 0; } -@@ -1559,6 +2087,7 @@ static void vc4_hvs_unbind(struct device +@@ -1570,6 +2098,7 @@ static void vc4_hvs_unbind(struct device drm_mm_remove_node(node); drm_mm_takedown(&vc4->hvs->lbm_mm); @@ -1015,7 +1015,7 @@ Signed-off-by: Maxime Ripard clk_disable_unprepare(hvs->core_clk); vc4->hvs = NULL; -@@ -1581,6 +2110,7 @@ static void vc4_hvs_dev_remove(struct pl +@@ -1592,6 +2121,7 @@ static void vc4_hvs_dev_remove(struct pl static const struct of_device_id vc4_hvs_dt_match[] = { { .compatible = "brcm,bcm2711-hvs" }, diff --git a/target/linux/bcm27xx/patches-6.6/950-0757-drm-panel-add-panel-dsi.patch b/target/linux/bcm27xx/patches-6.6/950-0757-drm-panel-add-panel-dsi.patch index 989fe3315f7606..4e9ba92a1883ac 100644 --- a/target/linux/bcm27xx/patches-6.6/950-0757-drm-panel-add-panel-dsi.patch +++ b/target/linux/bcm27xx/patches-6.6/950-0757-drm-panel-add-panel-dsi.patch @@ -23,7 +23,7 @@ Signed-off-by: Timon Skerutsch /** * struct panel_desc - Describes a simple panel. -@@ -4875,6 +4876,9 @@ static const struct panel_desc_dsi osd10 +@@ -4903,6 +4904,9 @@ static const struct panel_desc_dsi osd10 .lanes = 4, }; @@ -33,7 +33,7 @@ Signed-off-by: Timon Skerutsch static const struct of_device_id dsi_of_match[] = { { .compatible = "auo,b080uan01", -@@ -4898,20 +4902,137 @@ static const struct of_device_id dsi_of_ +@@ -4926,20 +4930,137 @@ static const struct of_device_id dsi_of_ .compatible = "osddisplays,osd101t2045-53ts", .data = &osd101t2045_53ts }, { diff --git a/target/linux/bcm27xx/patches-6.6/950-0829-vc4-hvs-Add-support-for-D0-register-changes.patch b/target/linux/bcm27xx/patches-6.6/950-0829-vc4-hvs-Add-support-for-D0-register-changes.patch index c8c284a1394c84..82edd649c0ca56 100644 --- a/target/linux/bcm27xx/patches-6.6/950-0829-vc4-hvs-Add-support-for-D0-register-changes.patch +++ b/target/linux/bcm27xx/patches-6.6/950-0829-vc4-hvs-Add-support-for-D0-register-changes.patch @@ -273,7 +273,7 @@ Signed-off-by: Dom Cobley else dlist_size = 4096; -@@ -1894,14 +1953,17 @@ static int vc6_hvs_hw_init(struct vc4_hv +@@ -1905,14 +1964,17 @@ static int vc6_hvs_hw_init(struct vc4_hv const struct vc6_csc_coeff_entry *coeffs; unsigned int i; @@ -295,7 +295,7 @@ Signed-off-by: Dom Cobley for (i = 0; i < 6; i++) { coeffs = &csc_coeffs[i / 3][i % 3]; -@@ -2000,21 +2062,21 @@ static int vc4_hvs_cob_init(struct vc4_h +@@ -2011,21 +2073,21 @@ static int vc4_hvs_cob_init(struct vc4_h reg = 0; top = 3840; @@ -320,7 +320,7 @@ Signed-off-by: Dom Cobley VC4_SET_FIELD(top, SCALER6_DISPX_COB_TOP) | VC4_SET_FIELD(base, SCALER6_DISPX_COB_BASE)); break; -@@ -2045,7 +2107,10 @@ static int vc4_hvs_bind(struct device *d +@@ -2056,7 +2118,10 @@ static int vc4_hvs_bind(struct device *d hvs->regset.base = hvs->regs; @@ -332,7 +332,7 @@ Signed-off-by: Dom Cobley hvs->regset.regs = vc6_hvs_regs; hvs->regset.nregs = ARRAY_SIZE(vc6_hvs_regs); } else { -@@ -2212,6 +2277,7 @@ static void vc4_hvs_dev_remove(struct pl +@@ -2223,6 +2288,7 @@ static void vc4_hvs_dev_remove(struct pl static const struct of_device_id vc4_hvs_dt_match[] = { { .compatible = "brcm,bcm2711-hvs" }, { .compatible = "brcm,bcm2712-hvs" }, diff --git a/target/linux/bcm27xx/patches-6.6/950-0830-vc4-hvs-Updates-to-support-D0-alpha-and-csc-changes.patch b/target/linux/bcm27xx/patches-6.6/950-0830-vc4-hvs-Updates-to-support-D0-alpha-and-csc-changes.patch index 0535f63224f5ff..ec7071c59502eb 100644 --- a/target/linux/bcm27xx/patches-6.6/950-0830-vc4-hvs-Updates-to-support-D0-alpha-and-csc-changes.patch +++ b/target/linux/bcm27xx/patches-6.6/950-0830-vc4-hvs-Updates-to-support-D0-alpha-and-csc-changes.patch @@ -16,7 +16,7 @@ Signed-off-by: Dom Cobley --- a/drivers/gpu/drm/vc4/vc4_hvs.c +++ b/drivers/gpu/drm/vc4/vc4_hvs.c -@@ -1892,6 +1892,17 @@ static int vc4_hvs_hw_init(struct vc4_hv +@@ -1903,6 +1903,17 @@ static int vc4_hvs_hw_init(struct vc4_hv #define CFC1_N_MA_CSC_COEFF_C23(x) (0xa03c + ((x) * 0x3000)) #define CFC1_N_MA_CSC_COEFF_C24(x) (0xa040 + ((x) * 0x3000)) @@ -34,7 +34,7 @@ Signed-off-by: Dom Cobley /* 4 S2.22 multiplication factors, and 1 S9.15 addititive element for each of 3 * output components */ -@@ -1962,31 +1973,43 @@ static int vc6_hvs_hw_init(struct vc4_hv +@@ -1973,31 +1984,43 @@ static int vc6_hvs_hw_init(struct vc4_hv HVS_WRITE(SCALER6(PRI_MAP0), 0xffffffff); HVS_WRITE(SCALER6(PRI_MAP1), 0xffffffff); diff --git a/target/linux/bcm27xx/patches-6.6/950-0842-ARM-pl011-Add-rs485-to-the-RP1-support.patch b/target/linux/bcm27xx/patches-6.6/950-0842-ARM-pl011-Add-rs485-to-the-RP1-support.patch index ed90f11920fdb5..75cdb63c6a4f47 100644 --- a/target/linux/bcm27xx/patches-6.6/950-0842-ARM-pl011-Add-rs485-to-the-RP1-support.patch +++ b/target/linux/bcm27xx/patches-6.6/950-0842-ARM-pl011-Add-rs485-to-the-RP1-support.patch @@ -13,7 +13,7 @@ Signed-off-by: Phil Elwell --- a/drivers/tty/serial/amba-pl011.c +++ b/drivers/tty/serial/amba-pl011.c -@@ -3033,6 +3033,8 @@ static int pl011_axi_probe(struct platfo +@@ -3040,6 +3040,8 @@ static int pl011_axi_probe(struct platfo uap->port.iotype = vendor->access_32b ? UPIO_MEM32 : UPIO_MEM; uap->port.irq = irq; uap->port.ops = &amba_pl011_pops; diff --git a/target/linux/bcm27xx/patches-6.6/950-0853-drivers-usb-dwc3-add-FS-LS-bus-instance-parkmode-dis.patch b/target/linux/bcm27xx/patches-6.6/950-0853-drivers-usb-dwc3-add-FS-LS-bus-instance-parkmode-dis.patch index 901553cd6cebce..706baccdc722fb 100644 --- a/target/linux/bcm27xx/patches-6.6/950-0853-drivers-usb-dwc3-add-FS-LS-bus-instance-parkmode-dis.patch +++ b/target/linux/bcm27xx/patches-6.6/950-0853-drivers-usb-dwc3-add-FS-LS-bus-instance-parkmode-dis.patch @@ -45,7 +45,7 @@ Signed-off-by: Jonathan Bell #define DWC3_GUCTL1_RESUME_OPMODE_HS_HOST BIT(10) /* Global Status Register */ -@@ -1116,10 +1117,12 @@ struct dwc3_scratchpad_array { +@@ -1117,10 +1118,12 @@ struct dwc3_scratchpad_array { * generation after resume from suspend. * @ulpi_ext_vbus_drv: Set to confiure the upli chip to drives CPEN pin * VBUS with an external supply. @@ -62,7 +62,7 @@ Signed-off-by: Jonathan Bell * @tx_de_emphasis_quirk: set if we enable Tx de-emphasis quirk * @tx_de_emphasis: Tx de-emphasis value * 0 - -6dB de-emphasis -@@ -1346,6 +1349,7 @@ struct dwc3 { +@@ -1347,6 +1350,7 @@ struct dwc3 { unsigned ulpi_ext_vbus_drv:1; unsigned parkmode_disable_ss_quirk:1; unsigned parkmode_disable_hs_quirk:1; diff --git a/target/linux/bcm27xx/patches-6.6/950-0983-drivers-mmc-preallocate-a-block-for-SD-extension-reg.patch b/target/linux/bcm27xx/patches-6.6/950-0983-drivers-mmc-preallocate-a-block-for-SD-extension-reg.patch index 4d90245f364ef8..2d1d317891ce15 100644 --- a/target/linux/bcm27xx/patches-6.6/950-0983-drivers-mmc-preallocate-a-block-for-SD-extension-reg.patch +++ b/target/linux/bcm27xx/patches-6.6/950-0983-drivers-mmc-preallocate-a-block-for-SD-extension-reg.patch @@ -19,7 +19,7 @@ Signed-off-by: Jonathan Bell --- a/drivers/mmc/core/bus.c +++ b/drivers/mmc/core/bus.c -@@ -264,6 +264,8 @@ static void mmc_release_card(struct devi +@@ -266,6 +266,8 @@ static void mmc_release_card(struct devi sdio_free_common_cis(card); @@ -145,7 +145,7 @@ Signed-off-by: Jonathan Bell --- a/include/linux/mmc/card.h +++ b/include/linux/mmc/card.h -@@ -320,6 +320,7 @@ struct mmc_card { +@@ -321,6 +321,7 @@ struct mmc_card { struct sd_switch_caps sw_caps; /* switch (CMD6) caps */ struct sd_ext_reg ext_power; /* SD extension reg for PM */ struct sd_ext_reg ext_perf; /* SD extension reg for PERF */ diff --git a/target/linux/bcm27xx/patches-6.6/950-1167-mmc-restrict-posted-write-counts-for-SD-cards-in-CQ-.patch b/target/linux/bcm27xx/patches-6.6/950-1167-mmc-restrict-posted-write-counts-for-SD-cards-in-CQ-.patch index 2ba494958ea0bb..b1ddf96311c62a 100644 --- a/target/linux/bcm27xx/patches-6.6/950-1167-mmc-restrict-posted-write-counts-for-SD-cards-in-CQ-.patch +++ b/target/linux/bcm27xx/patches-6.6/950-1167-mmc-restrict-posted-write-counts-for-SD-cards-in-CQ-.patch @@ -146,7 +146,7 @@ Signed-off-by: Jonathan Bell card->ext_perf.fno = fno; --- a/include/linux/mmc/card.h +++ b/include/linux/mmc/card.h -@@ -343,6 +343,8 @@ struct mmc_card { +@@ -344,6 +344,8 @@ struct mmc_card { unsigned int nr_parts; struct workqueue_struct *complete_wq; /* Private workqueue */ diff --git a/target/linux/bcm27xx/patches-6.6/950-1218-Bluetooth-hci_sync-Fix-crash-on-NULL-parent.patch b/target/linux/bcm27xx/patches-6.6/950-1218-Bluetooth-hci_sync-Fix-crash-on-NULL-parent.patch index 3b4c7e65afc17d..223e2df2b7859b 100644 --- a/target/linux/bcm27xx/patches-6.6/950-1218-Bluetooth-hci_sync-Fix-crash-on-NULL-parent.patch +++ b/target/linux/bcm27xx/patches-6.6/950-1218-Bluetooth-hci_sync-Fix-crash-on-NULL-parent.patch @@ -15,7 +15,7 @@ Signed-off-by: Phil Elwell --- a/net/bluetooth/hci_sync.c +++ b/net/bluetooth/hci_sync.c -@@ -4865,7 +4865,8 @@ static const struct { +@@ -4872,7 +4872,8 @@ static const struct { */ static int hci_dev_setup_sync(struct hci_dev *hdev) { diff --git a/target/linux/bcm27xx/patches-6.6/950-1257-drm-vc4-Add-support-for-per-plane-scaling-filter-sel.patch b/target/linux/bcm27xx/patches-6.6/950-1257-drm-vc4-Add-support-for-per-plane-scaling-filter-sel.patch index 52a13c6508db92..e4d2aace93b1db 100644 --- a/target/linux/bcm27xx/patches-6.6/950-1257-drm-vc4-Add-support-for-per-plane-scaling-filter-sel.patch +++ b/target/linux/bcm27xx/patches-6.6/950-1257-drm-vc4-Add-support-for-per-plane-scaling-filter-sel.patch @@ -40,7 +40,7 @@ Signed-off-by: Dave Stevenson static int vc4_hvs_upload_linear_kernel(struct vc4_hvs *hvs, struct drm_mm_node *space, -@@ -2259,14 +2262,19 @@ static int vc4_hvs_bind(struct device *d +@@ -2270,14 +2273,19 @@ static int vc4_hvs_bind(struct device *d if (ret) return ret; @@ -62,7 +62,7 @@ Signed-off-by: Dave Stevenson ret = vc4_hvs_cob_init(hvs); if (ret) -@@ -2292,6 +2300,8 @@ static void vc4_hvs_unbind(struct device +@@ -2303,6 +2311,8 @@ static void vc4_hvs_unbind(struct device if (drm_mm_node_allocated(&vc4->hvs->mitchell_netravali_filter)) drm_mm_remove_node(&vc4->hvs->mitchell_netravali_filter); diff --git a/target/linux/bcm27xx/patches-6.6/950-1260-drivers-mmc-disable-write-caching-on-Samsung-2023-mo.patch b/target/linux/bcm27xx/patches-6.6/950-1260-drivers-mmc-disable-write-caching-on-Samsung-2023-mo.patch index 35607aacafba9e..761e5bea7f6533 100644 --- a/target/linux/bcm27xx/patches-6.6/950-1260-drivers-mmc-disable-write-caching-on-Samsung-2023-mo.patch +++ b/target/linux/bcm27xx/patches-6.6/950-1260-drivers-mmc-disable-write-caching-on-Samsung-2023-mo.patch @@ -20,8 +20,8 @@ Signed-off-by: Jonathan Bell --- a/drivers/mmc/core/card.h +++ b/drivers/mmc/core/card.h -@@ -84,6 +84,7 @@ struct mmc_fixup { - #define CID_MANFID_TOSHIBA 0x11 +@@ -85,6 +85,7 @@ struct mmc_fixup { + #define CID_MANFID_GIGASTONE 0x12 #define CID_MANFID_MICRON 0x13 #define CID_MANFID_SAMSUNG 0x15 +#define CID_MANFID_SAMSUNG_SD 0x1b @@ -30,9 +30,9 @@ Signed-off-by: Jonathan Bell #define CID_MANFID_HYNIX 0x90 --- a/drivers/mmc/core/quirks.h +++ b/drivers/mmc/core/quirks.h -@@ -25,6 +25,14 @@ static const struct mmc_fixup __maybe_un - 0, -1ull, SDIO_ANY_ID, SDIO_ANY_ID, add_quirk_sd, - MMC_QUIRK_BROKEN_SD_CACHE, EXT_CSD_REV_ANY), +@@ -34,6 +34,14 @@ static const struct mmc_fixup __maybe_un + MMC_QUIRK_BROKEN_SD_CACHE | MMC_QUIRK_BROKEN_SD_POWEROFF_NOTIFY, + EXT_CSD_REV_ANY), + /* + * Samsung Pro Plus/EVO Plus/Pro Ultimate SD cards (2023) claim to cache diff --git a/target/linux/bcm27xx/patches-6.6/950-1282-tty-serial-pl011-Also-unregister-pl011_axi_platform_.patch b/target/linux/bcm27xx/patches-6.6/950-1282-tty-serial-pl011-Also-unregister-pl011_axi_platform_.patch index 3a5f9f15c38faa..593d4a1e538468 100644 --- a/target/linux/bcm27xx/patches-6.6/950-1282-tty-serial-pl011-Also-unregister-pl011_axi_platform_.patch +++ b/target/linux/bcm27xx/patches-6.6/950-1282-tty-serial-pl011-Also-unregister-pl011_axi_platform_.patch @@ -12,7 +12,7 @@ Signed-off-by: Dom Cobley --- a/drivers/tty/serial/amba-pl011.c +++ b/drivers/tty/serial/amba-pl011.c -@@ -3122,6 +3122,7 @@ static int __init pl011_init(void) +@@ -3129,6 +3129,7 @@ static int __init pl011_init(void) static void __exit pl011_exit(void) { platform_driver_unregister(&arm_sbsa_uart_platform_driver); diff --git a/target/linux/bcm27xx/patches-6.6/950-1323-drm-vc4-Remove-request-for-min-clocks-when-hdmi-outp.patch b/target/linux/bcm27xx/patches-6.6/950-1323-drm-vc4-Remove-request-for-min-clocks-when-hdmi-outp.patch index 1a1e3439e5e4e0..cde586b126cc0f 100644 --- a/target/linux/bcm27xx/patches-6.6/950-1323-drm-vc4-Remove-request-for-min-clocks-when-hdmi-outp.patch +++ b/target/linux/bcm27xx/patches-6.6/950-1323-drm-vc4-Remove-request-for-min-clocks-when-hdmi-outp.patch @@ -50,7 +50,7 @@ Signed-off-by: Dom Cobley return 0; --- a/drivers/gpu/drm/vc4/vc4_hvs.c +++ b/drivers/gpu/drm/vc4/vc4_hvs.c -@@ -2312,7 +2312,10 @@ static void vc4_hvs_unbind(struct device +@@ -2323,7 +2323,10 @@ static void vc4_hvs_unbind(struct device drm_mm_remove_node(node); drm_mm_takedown(&vc4->hvs->lbm_mm); diff --git a/target/linux/bcm27xx/patches-6.6/950-1333-mmc-quirks-disable-cache-on-more-known-bad-Sandisk-c.patch b/target/linux/bcm27xx/patches-6.6/950-1333-mmc-quirks-disable-cache-on-more-known-bad-Sandisk-c.patch index 109c502e13f6d9..c62b301c22f113 100644 --- a/target/linux/bcm27xx/patches-6.6/950-1333-mmc-quirks-disable-cache-on-more-known-bad-Sandisk-c.patch +++ b/target/linux/bcm27xx/patches-6.6/950-1333-mmc-quirks-disable-cache-on-more-known-bad-Sandisk-c.patch @@ -14,7 +14,7 @@ Signed-off-by: Jonathan Bell --- a/drivers/mmc/core/quirks.h +++ b/drivers/mmc/core/quirks.h -@@ -33,6 +33,18 @@ static const struct mmc_fixup __maybe_un +@@ -42,6 +42,18 @@ static const struct mmc_fixup __maybe_un 0, -1ull, SDIO_ANY_ID, SDIO_ANY_ID, add_quirk_sd, MMC_QUIRK_BROKEN_SD_CACHE, EXT_CSD_REV_ANY), diff --git a/target/linux/bcm27xx/patches-6.6/950-1336-mmc-quirks-add-MMC_QUIRK_BROKEN_ERASE-for-Phison-Int.patch b/target/linux/bcm27xx/patches-6.6/950-1336-mmc-quirks-add-MMC_QUIRK_BROKEN_ERASE-for-Phison-Int.patch index ba61b15ea15773..feb6eaf8ead981 100644 --- a/target/linux/bcm27xx/patches-6.6/950-1336-mmc-quirks-add-MMC_QUIRK_BROKEN_ERASE-for-Phison-Int.patch +++ b/target/linux/bcm27xx/patches-6.6/950-1336-mmc-quirks-add-MMC_QUIRK_BROKEN_ERASE-for-Phison-Int.patch @@ -15,7 +15,7 @@ Signed-off-by: Jonathan Bell --- a/drivers/mmc/core/quirks.h +++ b/drivers/mmc/core/quirks.h -@@ -162,6 +162,15 @@ static const struct mmc_fixup __maybe_un +@@ -171,6 +171,15 @@ static const struct mmc_fixup __maybe_un MMC_FIXUP("SD32G", 0x41, 0x3432, add_quirk, MMC_QUIRK_ERASE_BROKEN), MMC_FIXUP("SD64G", 0x41, 0x3432, add_quirk, MMC_QUIRK_ERASE_BROKEN), diff --git a/target/linux/bcm27xx/patches-6.6/950-1340-mm-numa-Allow-override-of-kernel-s-default-NUMA-poli.patch b/target/linux/bcm27xx/patches-6.6/950-1340-mm-numa-Allow-override-of-kernel-s-default-NUMA-poli.patch index dceb6df45f86da..f2d7a91b77f9ee 100644 --- a/target/linux/bcm27xx/patches-6.6/950-1340-mm-numa-Allow-override-of-kernel-s-default-NUMA-poli.patch +++ b/target/linux/bcm27xx/patches-6.6/950-1340-mm-numa-Allow-override-of-kernel-s-default-NUMA-poli.patch @@ -23,7 +23,7 @@ Signed-off-by: Tvrtko Ursulin --- a/mm/mempolicy.c +++ b/mm/mempolicy.c -@@ -2963,7 +2963,9 @@ void __init numa_policy_init(void) +@@ -2947,7 +2947,9 @@ void __init numa_policy_init(void) /* Reset policy of current process to default */ void numa_default_policy(void) { @@ -34,7 +34,7 @@ Signed-off-by: Tvrtko Ursulin } /* -@@ -2981,7 +2983,6 @@ static const char * const policy_modes[] +@@ -2965,7 +2967,6 @@ static const char * const policy_modes[] }; @@ -42,7 +42,7 @@ Signed-off-by: Tvrtko Ursulin /** * mpol_parse_str - parse string to mempolicy, for tmpfs mpol mount option. * @str: string containing mempolicy to parse -@@ -2994,13 +2995,18 @@ static const char * const policy_modes[] +@@ -2978,13 +2979,18 @@ static const char * const policy_modes[] */ int mpol_parse_str(char *str, struct mempolicy **mpol) { @@ -62,7 +62,7 @@ Signed-off-by: Tvrtko Ursulin if (flags) *flags++ = '\0'; /* terminate mode string */ -@@ -3079,9 +3085,16 @@ int mpol_parse_str(char *str, struct mem +@@ -3063,9 +3069,16 @@ int mpol_parse_str(char *str, struct mem goto out; } @@ -82,7 +82,7 @@ Signed-off-by: Tvrtko Ursulin /* * Save nodes for mpol_to_str() to show the tmpfs mount options -@@ -3114,7 +3127,29 @@ out: +@@ -3098,7 +3111,29 @@ out: *mpol = new; return err; } diff --git a/target/linux/bcm53xx/patches-6.6/180-usb-xhci-add-support-for-performing-fake-doorbell.patch b/target/linux/bcm53xx/patches-6.6/180-usb-xhci-add-support-for-performing-fake-doorbell.patch index 13b6566a8e980f..7ac12a290f6822 100644 --- a/target/linux/bcm53xx/patches-6.6/180-usb-xhci-add-support-for-performing-fake-doorbell.patch +++ b/target/linux/bcm53xx/patches-6.6/180-usb-xhci-add-support-for-performing-fake-doorbell.patch @@ -103,11 +103,11 @@ it on BCM4708 family. if (xhci->quirks & XHCI_NEC_HOST) --- a/drivers/usb/host/xhci.h +++ b/drivers/usb/host/xhci.h -@@ -1660,6 +1660,7 @@ struct xhci_hcd { - #define XHCI_ZHAOXIN_HOST BIT_ULL(46) +@@ -1661,6 +1661,7 @@ struct xhci_hcd { #define XHCI_WRITE_64_HI_LO BIT_ULL(47) #define XHCI_CDNS_SCTX_QUIRK BIT_ULL(48) -+#define XHCI_FAKE_DOORBELL BIT_ULL(49) + #define XHCI_ETRON_HOST BIT_ULL(49) ++#define XHCI_FAKE_DOORBELL BIT_ULL(50) unsigned int num_active_eps; unsigned int limit_active_eps; diff --git a/target/linux/generic/backport-6.6/611-01-v6.11-udp-Allow-GSO-transmit-from-devices-with-no-checksum.patch b/target/linux/generic/backport-6.6/611-01-v6.11-udp-Allow-GSO-transmit-from-devices-with-no-checksum.patch index 2f03074bc9ac8f..b9633a87725baf 100644 --- a/target/linux/generic/backport-6.6/611-01-v6.11-udp-Allow-GSO-transmit-from-devices-with-no-checksum.patch +++ b/target/linux/generic/backport-6.6/611-01-v6.11-udp-Allow-GSO-transmit-from-devices-with-no-checksum.patch @@ -82,7 +82,7 @@ Signed-off-by: Jakub Kicinski int delta = sum_truesize - gso_skb->truesize; --- a/net/ipv6/udp.c +++ b/net/ipv6/udp.c -@@ -1261,8 +1261,7 @@ static int udp_v6_send_skb(struct sk_buf +@@ -1258,8 +1258,7 @@ static int udp_v6_send_skb(struct sk_buf kfree_skb(skb); return -EINVAL; } diff --git a/target/linux/generic/backport-6.6/780-04-v6.8-r8169-improve-handling-task-scheduling.patch b/target/linux/generic/backport-6.6/780-04-v6.8-r8169-improve-handling-task-scheduling.patch index 757c800533dac3..36ac67375a23b4 100644 --- a/target/linux/generic/backport-6.6/780-04-v6.8-r8169-improve-handling-task-scheduling.patch +++ b/target/linux/generic/backport-6.6/780-04-v6.8-r8169-improve-handling-task-scheduling.patch @@ -29,7 +29,7 @@ Signed-off-by: Jakub Kicinski set_bit(flag, tp->wk.flags); schedule_work(&tp->wk.work); } -@@ -4520,8 +4523,7 @@ static void rtl_task(struct work_struct +@@ -4526,8 +4529,7 @@ static void rtl_task(struct work_struct rtnl_lock(); diff --git a/target/linux/generic/backport-6.6/780-05-v6.8-r8169-add-support-for-LED-s-on-RTL8168-RTL8101.patch b/target/linux/generic/backport-6.6/780-05-v6.8-r8169-add-support-for-LED-s-on-RTL8168-RTL8101.patch index 0504a00df4f87a..ccb8e413fefa42 100644 --- a/target/linux/generic/backport-6.6/780-05-v6.8-r8169-add-support-for-LED-s-on-RTL8168-RTL8101.patch +++ b/target/linux/generic/backport-6.6/780-05-v6.8-r8169-add-support-for-LED-s-on-RTL8168-RTL8101.patch @@ -296,7 +296,7 @@ Signed-off-by: David S. Miller static void r8168fp_adjust_ocp_cmd(struct rtl8169_private *tp, u32 *cmd, int type) { /* based on RTL8168FP_OOBMAC_BASE in vendor driver */ -@@ -5197,6 +5255,7 @@ static int rtl_init_one(struct pci_dev * +@@ -5203,6 +5261,7 @@ static int rtl_init_one(struct pci_dev * raw_spin_lock_init(&tp->cfg9346_usage_lock); raw_spin_lock_init(&tp->config25_lock); raw_spin_lock_init(&tp->mac_ocp_lock); @@ -304,7 +304,7 @@ Signed-off-by: David S. Miller dev->tstats = devm_netdev_alloc_pcpu_stats(&pdev->dev, struct pcpu_sw_netstats); -@@ -5353,6 +5412,12 @@ static int rtl_init_one(struct pci_dev * +@@ -5359,6 +5418,12 @@ static int rtl_init_one(struct pci_dev * if (rc) return rc; diff --git a/target/linux/generic/backport-6.6/780-06-v6.8-r8169-fix-building-with-CONFIG_LEDS_CLASS-m.patch b/target/linux/generic/backport-6.6/780-06-v6.8-r8169-fix-building-with-CONFIG_LEDS_CLASS-m.patch index 1adaf87625e6ce..3860de75700732 100644 --- a/target/linux/generic/backport-6.6/780-06-v6.8-r8169-fix-building-with-CONFIG_LEDS_CLASS-m.patch +++ b/target/linux/generic/backport-6.6/780-06-v6.8-r8169-fix-building-with-CONFIG_LEDS_CLASS-m.patch @@ -59,7 +59,7 @@ Signed-off-by: Jakub Kicinski obj-$(CONFIG_R8169) += r8169.o --- a/drivers/net/ethernet/realtek/r8169_main.c +++ b/drivers/net/ethernet/realtek/r8169_main.c -@@ -5412,11 +5412,10 @@ static int rtl_init_one(struct pci_dev * +@@ -5418,11 +5418,10 @@ static int rtl_init_one(struct pci_dev * if (rc) return rc; diff --git a/target/linux/generic/backport-6.6/780-07-v6.9-r8169-simplify-EEE-handling.patch b/target/linux/generic/backport-6.6/780-07-v6.9-r8169-simplify-EEE-handling.patch index c3f94b3aff07aa..0f5f68c68a10d9 100644 --- a/target/linux/generic/backport-6.6/780-07-v6.9-r8169-simplify-EEE-handling.patch +++ b/target/linux/generic/backport-6.6/780-07-v6.9-r8169-simplify-EEE-handling.patch @@ -75,7 +75,7 @@ Signed-off-by: Jakub Kicinski genphy_soft_reset(tp->phydev); } -@@ -5114,7 +5089,9 @@ static int r8169_mdio_register(struct rt +@@ -5120,7 +5095,9 @@ static int r8169_mdio_register(struct rt } tp->phydev->mac_managed_pm = true; @@ -86,7 +86,7 @@ Signed-off-by: Jakub Kicinski phy_support_asym_pause(tp->phydev); /* PHY will be woken up in rtl_open() */ -@@ -5249,7 +5226,6 @@ static int rtl_init_one(struct pci_dev * +@@ -5255,7 +5232,6 @@ static int rtl_init_one(struct pci_dev * tp->dev = dev; tp->pci_dev = pdev; tp->supports_gmii = ent->driver_data == RTL_CFG_NO_GBIT ? 0 : 1; diff --git a/target/linux/generic/backport-6.6/780-08-v6.9-r8169-add-support-for-RTL8126A.patch b/target/linux/generic/backport-6.6/780-08-v6.9-r8169-add-support-for-RTL8126A.patch index 354aacf1cf7c89..210730d6b127ee 100644 --- a/target/linux/generic/backport-6.6/780-08-v6.9-r8169-add-support-for-RTL8126A.patch +++ b/target/linux/generic/backport-6.6/780-08-v6.9-r8169-add-support-for-RTL8126A.patch @@ -311,7 +311,7 @@ Signed-off-by: David S. Miller rtl_enable_rxdvgate(tp); fsleep(2000); break; -@@ -4105,8 +4163,7 @@ static unsigned int rtl_quirk_packet_pad +@@ -4111,8 +4169,7 @@ static unsigned int rtl_quirk_packet_pad switch (tp->mac_version) { case RTL_GIGA_MAC_VER_34: @@ -321,7 +321,7 @@ Signed-off-by: David S. Miller padto = max_t(unsigned int, padto, ETH_ZLEN); break; default: -@@ -5141,7 +5198,7 @@ static void rtl_hw_initialize(struct rtl +@@ -5147,7 +5204,7 @@ static void rtl_hw_initialize(struct rtl case RTL_GIGA_MAC_VER_40 ... RTL_GIGA_MAC_VER_48: rtl_hw_init_8168g(tp); break; diff --git a/target/linux/generic/backport-6.6/780-10-v6.9-r8169-simplify-code-by-using-core-provided-pcpu-stat.patch b/target/linux/generic/backport-6.6/780-10-v6.9-r8169-simplify-code-by-using-core-provided-pcpu-stat.patch index c155b11431f87c..959a1b0276d94c 100644 --- a/target/linux/generic/backport-6.6/780-10-v6.9-r8169-simplify-code-by-using-core-provided-pcpu-stat.patch +++ b/target/linux/generic/backport-6.6/780-10-v6.9-r8169-simplify-code-by-using-core-provided-pcpu-stat.patch @@ -16,7 +16,7 @@ Signed-off-by: Paolo Abeni --- a/drivers/net/ethernet/realtek/r8169_main.c +++ b/drivers/net/ethernet/realtek/r8169_main.c -@@ -5290,11 +5290,6 @@ static int rtl_init_one(struct pci_dev * +@@ -5296,11 +5296,6 @@ static int rtl_init_one(struct pci_dev * raw_spin_lock_init(&tp->mac_ocp_lock); mutex_init(&tp->led_lock); @@ -28,7 +28,7 @@ Signed-off-by: Paolo Abeni /* Get the *optional* external "ether_clk" used on some boards */ tp->clk = devm_clk_get_optional_enabled(&pdev->dev, "ether_clk"); if (IS_ERR(tp->clk)) -@@ -5409,6 +5404,8 @@ static int rtl_init_one(struct pci_dev * +@@ -5415,6 +5410,8 @@ static int rtl_init_one(struct pci_dev * dev->hw_features |= NETIF_F_RXALL; dev->hw_features |= NETIF_F_RXFCS; diff --git a/target/linux/generic/backport-6.6/780-11-v6.9-r8169-add-LED-support-for-RTL8125-RTL8126.patch b/target/linux/generic/backport-6.6/780-11-v6.9-r8169-add-LED-support-for-RTL8125-RTL8126.patch index 1c793f9b1d337a..fa9b4f10620627 100644 --- a/target/linux/generic/backport-6.6/780-11-v6.9-r8169-add-LED-support-for-RTL8125-RTL8126.patch +++ b/target/linux/generic/backport-6.6/780-11-v6.9-r8169-add-LED-support-for-RTL8125-RTL8126.patch @@ -225,7 +225,7 @@ Signed-off-by: Jakub Kicinski void r8169_get_led_name(struct rtl8169_private *tp, int idx, char *buf, int buf_len) { -@@ -5442,10 +5493,12 @@ static int rtl_init_one(struct pci_dev * +@@ -5448,10 +5499,12 @@ static int rtl_init_one(struct pci_dev * if (rc) return rc; diff --git a/target/linux/generic/backport-6.6/780-16-v6.9-r8169-fix-LED-related-deadlock-on-module-removal.patch b/target/linux/generic/backport-6.6/780-16-v6.9-r8169-fix-LED-related-deadlock-on-module-removal.patch index cb031d8f34887a..26290cdef566ab 100644 --- a/target/linux/generic/backport-6.6/780-16-v6.9-r8169-fix-LED-related-deadlock-on-module-removal.patch +++ b/target/linux/generic/backport-6.6/780-16-v6.9-r8169-fix-LED-related-deadlock-on-module-removal.patch @@ -124,7 +124,7 @@ Signed-off-by: David S. Miller u32 ocp_base; }; -@@ -5069,6 +5071,8 @@ static void rtl_remove_one(struct pci_de +@@ -5075,6 +5077,8 @@ static void rtl_remove_one(struct pci_de cancel_work_sync(&tp->wk.work); @@ -133,7 +133,7 @@ Signed-off-by: David S. Miller unregister_netdev(tp->dev); if (tp->dash_type != RTL_DASH_NONE) -@@ -5527,9 +5531,9 @@ static int rtl_init_one(struct pci_dev * +@@ -5533,9 +5537,9 @@ static int rtl_init_one(struct pci_dev * if (IS_ENABLED(CONFIG_R8169_LEDS)) { if (rtl_is_8125(tp)) diff --git a/target/linux/generic/backport-6.6/780-17-v6.9-r8169-add-missing-conditional-compiling-for-call-to-.patch b/target/linux/generic/backport-6.6/780-17-v6.9-r8169-add-missing-conditional-compiling-for-call-to-.patch index 0412c919035f4b..265c715f5e4d56 100644 --- a/target/linux/generic/backport-6.6/780-17-v6.9-r8169-add-missing-conditional-compiling-for-call-to-.patch +++ b/target/linux/generic/backport-6.6/780-17-v6.9-r8169-add-missing-conditional-compiling-for-call-to-.patch @@ -19,7 +19,7 @@ Signed-off-by: Jakub Kicinski --- a/drivers/net/ethernet/realtek/r8169_main.c +++ b/drivers/net/ethernet/realtek/r8169_main.c -@@ -5071,7 +5071,8 @@ static void rtl_remove_one(struct pci_de +@@ -5077,7 +5077,8 @@ static void rtl_remove_one(struct pci_de cancel_work_sync(&tp->wk.work); diff --git a/target/linux/generic/backport-6.6/780-20-v6.11-r8169-disable-interrupt-source-RxOverflow.patch b/target/linux/generic/backport-6.6/780-20-v6.11-r8169-disable-interrupt-source-RxOverflow.patch index fc10a3ff143076..9ded598665af0c 100644 --- a/target/linux/generic/backport-6.6/780-20-v6.11-r8169-disable-interrupt-source-RxOverflow.patch +++ b/target/linux/generic/backport-6.6/780-20-v6.11-r8169-disable-interrupt-source-RxOverflow.patch @@ -18,7 +18,7 @@ Signed-off-by: Jakub Kicinski --- a/drivers/net/ethernet/realtek/r8169_main.c +++ b/drivers/net/ethernet/realtek/r8169_main.c -@@ -5112,12 +5112,10 @@ static void rtl_set_irq_mask(struct rtl8 +@@ -5118,12 +5118,10 @@ static void rtl_set_irq_mask(struct rtl8 tp->irq_mask = RxOK | RxErr | TxOK | TxErr | LinkChg; if (tp->mac_version <= RTL_GIGA_MAC_VER_06) diff --git a/target/linux/generic/backport-6.6/780-22-v6.12-r8169-add-support-for-RTL8126A-rev.b.patch b/target/linux/generic/backport-6.6/780-22-v6.12-r8169-add-support-for-RTL8126A-rev.b.patch index a825627e743919..3360b61fad9834 100644 --- a/target/linux/generic/backport-6.6/780-22-v6.12-r8169-add-support-for-RTL8126A-rev.b.patch +++ b/target/linux/generic/backport-6.6/780-22-v6.12-r8169-add-support-for-RTL8126A-rev.b.patch @@ -215,7 +215,7 @@ Signed-off-by: Jakub Kicinski rtl_enable_rxdvgate(tp); fsleep(2000); break; -@@ -4252,7 +4264,7 @@ static unsigned int rtl_quirk_packet_pad +@@ -4258,7 +4270,7 @@ static unsigned int rtl_quirk_packet_pad switch (tp->mac_version) { case RTL_GIGA_MAC_VER_34: @@ -224,7 +224,7 @@ Signed-off-by: Jakub Kicinski padto = max_t(unsigned int, padto, ETH_ZLEN); break; default: -@@ -5288,7 +5300,7 @@ static void rtl_hw_initialize(struct rtl +@@ -5294,7 +5306,7 @@ static void rtl_hw_initialize(struct rtl case RTL_GIGA_MAC_VER_40 ... RTL_GIGA_MAC_VER_48: rtl_hw_init_8168g(tp); break; diff --git a/target/linux/generic/config-6.6 b/target/linux/generic/config-6.6 index 105dc0d344fa82..2ea1b7910388f5 100644 --- a/target/linux/generic/config-6.6 +++ b/target/linux/generic/config-6.6 @@ -7547,6 +7547,7 @@ CONFIG_ZONE_DMA=y # CONFIG_ZRAM_DEF_COMP_ZSTD is not set # CONFIG_ZRAM_MEMORY_TRACKING is not set # CONFIG_ZRAM_MULTI_COMP is not set +# CONFIG_ZRAM_TRACK_ENTRY_ACTIME is not set # CONFIG_ZSMALLOC is not set CONFIG_ZSMALLOC_CHAIN_SIZE=8 # CONFIG_ZSWAP is not set diff --git a/target/linux/generic/hack-6.6/259-regmap_dynamic.patch b/target/linux/generic/hack-6.6/259-regmap_dynamic.patch index cb93c96da60da2..4f6dca7127b8e8 100644 --- a/target/linux/generic/hack-6.6/259-regmap_dynamic.patch +++ b/target/linux/generic/hack-6.6/259-regmap_dynamic.patch @@ -137,7 +137,7 @@ Signed-off-by: Felix Fietkau #include #include #include -@@ -3470,3 +3471,5 @@ static int __init regmap_initcall(void) +@@ -3483,3 +3484,5 @@ static int __init regmap_initcall(void) return 0; } postcore_initcall(regmap_initcall); diff --git a/target/linux/generic/hack-6.6/650-netfilter-add-xt_FLOWOFFLOAD-target.patch b/target/linux/generic/hack-6.6/650-netfilter-add-xt_FLOWOFFLOAD-target.patch index eca611da7e8375..58b37db2fb9ce1 100644 --- a/target/linux/generic/hack-6.6/650-netfilter-add-xt_FLOWOFFLOAD-target.patch +++ b/target/linux/generic/hack-6.6/650-netfilter-add-xt_FLOWOFFLOAD-target.patch @@ -758,7 +758,7 @@ Signed-off-by: Felix Fietkau #include #include #include -@@ -377,8 +376,7 @@ flow_offload_lookup(struct nf_flowtable +@@ -373,8 +372,7 @@ flow_offload_lookup(struct nf_flowtable } EXPORT_SYMBOL_GPL(flow_offload_lookup); @@ -768,7 +768,7 @@ Signed-off-by: Felix Fietkau void (*iter)(struct nf_flowtable *flowtable, struct flow_offload *flow, void *data), void *data) -@@ -439,6 +437,7 @@ static void nf_flow_offload_gc_step(stru +@@ -435,6 +433,7 @@ static void nf_flow_offload_gc_step(stru nf_flow_offload_stats(flow_table, flow); } } diff --git a/target/linux/generic/hack-6.6/790-SFP-GE-T-ignore-TX_FAULT.patch b/target/linux/generic/hack-6.6/790-SFP-GE-T-ignore-TX_FAULT.patch index 7733b45520874c..1d6bc6ee079707 100644 --- a/target/linux/generic/hack-6.6/790-SFP-GE-T-ignore-TX_FAULT.patch +++ b/target/linux/generic/hack-6.6/790-SFP-GE-T-ignore-TX_FAULT.patch @@ -26,7 +26,7 @@ Signed-off-by: Daniel Golle --- a/drivers/net/phy/sfp.c +++ b/drivers/net/phy/sfp.c -@@ -471,6 +471,9 @@ static const struct sfp_quirk sfp_quirks +@@ -472,6 +472,9 @@ static const struct sfp_quirk sfp_quirks // FS 2.5G Base-T SFP_QUIRK_M("FS", "SFP-2.5G-T", sfp_quirk_oem_2_5g), @@ -36,7 +36,7 @@ Signed-off-by: Daniel Golle // Lantech 8330-262D-E can operate at 2500base-X, but incorrectly report // 2500MBd NRZ in their EEPROM SFP_QUIRK_M("Lantech", "8330-262D-E", sfp_quirk_2500basex), -@@ -2589,7 +2592,8 @@ static void sfp_sm_main(struct sfp *sfp, +@@ -2590,7 +2593,8 @@ static void sfp_sm_main(struct sfp *sfp, * or t_start_up, so assume there is a fault. */ sfp_sm_fault(sfp, SFP_S_INIT_TX_FAULT, @@ -46,7 +46,7 @@ Signed-off-by: Daniel Golle } else if (event == SFP_E_TIMEOUT || event == SFP_E_TX_CLEAR) { init_done: /* Create mdiobus and start trying for PHY */ -@@ -2843,10 +2847,12 @@ static void sfp_check_state(struct sfp * +@@ -2844,10 +2848,12 @@ static void sfp_check_state(struct sfp * mutex_lock(&sfp->st_mutex); state = sfp_get_state(sfp); changed = state ^ sfp->state; diff --git a/target/linux/generic/hack-6.6/930-Revert-Revert-Revert-driver-core-Set-fw_devlink-on-b.patch b/target/linux/generic/hack-6.6/930-Revert-Revert-Revert-driver-core-Set-fw_devlink-on-b.patch index 1c5fb11ff540cd..85a19027fda7f6 100644 --- a/target/linux/generic/hack-6.6/930-Revert-Revert-Revert-driver-core-Set-fw_devlink-on-b.patch +++ b/target/linux/generic/hack-6.6/930-Revert-Revert-Revert-driver-core-Set-fw_devlink-on-b.patch @@ -19,7 +19,7 @@ Signed-off-by: Rafał Miłecki --- a/drivers/base/core.c +++ b/drivers/base/core.c -@@ -1657,7 +1657,7 @@ static void device_links_purge(struct de +@@ -1658,7 +1658,7 @@ static void device_links_purge(struct de #define FW_DEVLINK_FLAGS_RPM (FW_DEVLINK_FLAGS_ON | \ DL_FLAG_PM_RUNTIME) diff --git a/target/linux/generic/pending-6.6/456-mmc-core-set-card-fwnode_handle.patch b/target/linux/generic/pending-6.6/456-mmc-core-set-card-fwnode_handle.patch index 2ee170d47b855f..323c208e7327b7 100644 --- a/target/linux/generic/pending-6.6/456-mmc-core-set-card-fwnode_handle.patch +++ b/target/linux/generic/pending-6.6/456-mmc-core-set-card-fwnode_handle.patch @@ -12,7 +12,7 @@ Signed-off-by: Daniel Golle --- a/drivers/mmc/core/bus.c +++ b/drivers/mmc/core/bus.c -@@ -364,6 +364,8 @@ int mmc_add_card(struct mmc_card *card) +@@ -366,6 +366,8 @@ int mmc_add_card(struct mmc_card *card) mmc_add_card_debugfs(card); card->dev.of_node = mmc_of_find_child_device(card->host, 0); diff --git a/target/linux/generic/pending-6.6/700-netfilter-nft_flow_offload-handle-netdevice-events-f.patch b/target/linux/generic/pending-6.6/700-netfilter-nft_flow_offload-handle-netdevice-events-f.patch index 6b93f47772e13b..750ca29287ab2f 100644 --- a/target/linux/generic/pending-6.6/700-netfilter-nft_flow_offload-handle-netdevice-events-f.patch +++ b/target/linux/generic/pending-6.6/700-netfilter-nft_flow_offload-handle-netdevice-events-f.patch @@ -10,7 +10,7 @@ Signed-off-by: Pablo Neira Ayuso --- a/net/netfilter/nf_flow_table_core.c +++ b/net/netfilter/nf_flow_table_core.c -@@ -662,6 +662,23 @@ static struct pernet_operations nf_flow_ +@@ -658,6 +658,23 @@ static struct pernet_operations nf_flow_ .exit_batch = nf_flow_table_pernet_exit, }; @@ -34,7 +34,7 @@ Signed-off-by: Pablo Neira Ayuso static int __init nf_flow_table_module_init(void) { int ret; -@@ -674,8 +691,14 @@ static int __init nf_flow_table_module_i +@@ -670,8 +687,14 @@ static int __init nf_flow_table_module_i if (ret) goto out_offload; @@ -49,7 +49,7 @@ Signed-off-by: Pablo Neira Ayuso out_offload: unregister_pernet_subsys(&nf_flow_table_net_ops); return ret; -@@ -683,6 +706,7 @@ out_offload: +@@ -679,6 +702,7 @@ out_offload: static void __exit nf_flow_table_module_exit(void) { diff --git a/target/linux/mediatek/patches-6.6/251-v6.8-watchdog-mediatek-mt7988-add-wdt-support.patch b/target/linux/mediatek/patches-6.6/251-v6.8-watchdog-mediatek-mt7988-add-wdt-support.patch index b89b385eeb466f..c399b768b00392 100644 --- a/target/linux/mediatek/patches-6.6/251-v6.8-watchdog-mediatek-mt7988-add-wdt-support.patch +++ b/target/linux/mediatek/patches-6.6/251-v6.8-watchdog-mediatek-mt7988-add-wdt-support.patch @@ -106,7 +106,7 @@ Signed-off-by: Wim Van Sebroeck spin_unlock_irqrestore(&data->lock, flags); return 0; -@@ -406,6 +445,8 @@ static int mtk_wdt_probe(struct platform +@@ -412,6 +451,8 @@ static int mtk_wdt_probe(struct platform wdt_data->toprgu_sw_rst_num); if (err) return err; @@ -115,7 +115,7 @@ Signed-off-by: Wim Van Sebroeck } mtk_wdt->disable_wdt_extrst = -@@ -444,6 +485,7 @@ static const struct of_device_id mtk_wdt +@@ -450,6 +491,7 @@ static const struct of_device_id mtk_wdt { .compatible = "mediatek,mt6589-wdt" }, { .compatible = "mediatek,mt6795-wdt", .data = &mt6795_data }, { .compatible = "mediatek,mt7986-wdt", .data = &mt7986_data }, diff --git a/target/linux/ramips/patches-6.6/810-uvc-add-iPassion-iP2970-support.patch b/target/linux/ramips/patches-6.6/810-uvc-add-iPassion-iP2970-support.patch index efc2763880f04e..c98aaf9442bb7d 100644 --- a/target/linux/ramips/patches-6.6/810-uvc-add-iPassion-iP2970-support.patch +++ b/target/linux/ramips/patches-6.6/810-uvc-add-iPassion-iP2970-support.patch @@ -13,7 +13,7 @@ Signed-off-by: John Crispin --- a/drivers/media/usb/uvc/uvc_driver.c +++ b/drivers/media/usb/uvc/uvc_driver.c -@@ -3229,6 +3229,18 @@ static const struct usb_device_id uvc_id +@@ -3249,6 +3249,18 @@ static const struct usb_device_id uvc_id .bInterfaceSubClass = 1, .bInterfaceProtocol = 0, .driver_info = UVC_INFO_META(V4L2_META_FMT_D4XX) }, diff --git a/target/linux/realtek/patches-6.6/710-net-phy-sfp-re-probe-modules-on-DEV_UP-event.patch b/target/linux/realtek/patches-6.6/710-net-phy-sfp-re-probe-modules-on-DEV_UP-event.patch index d7a232327d8b15..4e1a21aa715017 100644 --- a/target/linux/realtek/patches-6.6/710-net-phy-sfp-re-probe-modules-on-DEV_UP-event.patch +++ b/target/linux/realtek/patches-6.6/710-net-phy-sfp-re-probe-modules-on-DEV_UP-event.patch @@ -10,7 +10,7 @@ Signed-off-by: Antoine Tenart --- a/drivers/net/phy/sfp.c +++ b/drivers/net/phy/sfp.c -@@ -2415,6 +2415,13 @@ static void sfp_sm_module(struct sfp *sf +@@ -2416,6 +2416,13 @@ static void sfp_sm_module(struct sfp *sf return; } diff --git a/target/linux/realtek/patches-6.6/714-net-phy-sfp-add-support-for-SMBus.patch b/target/linux/realtek/patches-6.6/714-net-phy-sfp-add-support-for-SMBus.patch index 06d264d805e347..76e2d765069b55 100644 --- a/target/linux/realtek/patches-6.6/714-net-phy-sfp-add-support-for-SMBus.patch +++ b/target/linux/realtek/patches-6.6/714-net-phy-sfp-add-support-for-SMBus.patch @@ -10,7 +10,7 @@ Signed-off-by: Antoine Tenart --- a/drivers/net/phy/sfp.c +++ b/drivers/net/phy/sfp.c -@@ -662,10 +662,64 @@ static int sfp_i2c_write(struct sfp *sfp +@@ -663,10 +663,64 @@ static int sfp_i2c_write(struct sfp *sfp return ret == ARRAY_SIZE(msgs) ? len : 0; } @@ -77,7 +77,7 @@ Signed-off-by: Antoine Tenart sfp->i2c = i2c; sfp->read = sfp_i2c_read; -@@ -697,6 +751,29 @@ static int sfp_i2c_mdiobus_create(struct +@@ -698,6 +752,29 @@ static int sfp_i2c_mdiobus_create(struct return 0; } @@ -107,7 +107,7 @@ Signed-off-by: Antoine Tenart static void sfp_i2c_mdiobus_destroy(struct sfp *sfp) { mdiobus_unregister(sfp->i2c_mii); -@@ -1870,8 +1947,15 @@ static void sfp_sm_fault(struct sfp *sfp +@@ -1871,8 +1948,15 @@ static void sfp_sm_fault(struct sfp *sfp static int sfp_sm_add_mdio_bus(struct sfp *sfp) { diff --git a/target/linux/rockchip/patches-6.6/034-v6.7-usb-dwc3-add-optional-PHY-interface-clocks.patch b/target/linux/rockchip/patches-6.6/034-v6.7-usb-dwc3-add-optional-PHY-interface-clocks.patch index 0b9e47da3c9879..00ca1d40139873 100644 --- a/target/linux/rockchip/patches-6.6/034-v6.7-usb-dwc3-add-optional-PHY-interface-clocks.patch +++ b/target/linux/rockchip/patches-6.6/034-v6.7-usb-dwc3-add-optional-PHY-interface-clocks.patch @@ -71,7 +71,7 @@ Signed-off-by: Greg Kroah-Hartman --- a/drivers/usb/dwc3/core.h +++ b/drivers/usb/dwc3/core.h -@@ -997,6 +997,8 @@ struct dwc3_scratchpad_array { +@@ -998,6 +998,8 @@ struct dwc3_scratchpad_array { * @bus_clk: clock for accessing the registers * @ref_clk: reference clock * @susp_clk: clock used when the SS phy is in low power (S3) state @@ -80,7 +80,7 @@ Signed-off-by: Greg Kroah-Hartman * @reset: reset control * @regs: base address for our registers * @regs_size: address space size -@@ -1169,6 +1171,8 @@ struct dwc3 { +@@ -1170,6 +1172,8 @@ struct dwc3 { struct clk *bus_clk; struct clk *ref_clk; struct clk *susp_clk; diff --git a/target/linux/starfive/patches-6.6/0109-usb-xhci-To-improve-performance-usb-using-lowmem-for.patch b/target/linux/starfive/patches-6.6/0109-usb-xhci-To-improve-performance-usb-using-lowmem-for.patch index febc6bac4e8500..847b8e20ff49a7 100644 --- a/target/linux/starfive/patches-6.6/0109-usb-xhci-To-improve-performance-usb-using-lowmem-for.patch +++ b/target/linux/starfive/patches-6.6/0109-usb-xhci-To-improve-performance-usb-using-lowmem-for.patch @@ -160,7 +160,7 @@ Signed-off-by: minda.chen } --- a/drivers/usb/host/xhci-ring.c +++ b/drivers/usb/host/xhci-ring.c -@@ -3672,7 +3672,8 @@ int xhci_queue_bulk_tx(struct xhci_hcd * +@@ -3667,7 +3667,8 @@ int xhci_queue_bulk_tx(struct xhci_hcd * full_len = urb->transfer_buffer_length; /* If we have scatter/gather list, we use it. */ @@ -277,16 +277,16 @@ Signed-off-by: minda.chen /* There is one xhci_hcd structure per controller */ struct xhci_hcd { struct usb_hcd *main_hcd; -@@ -1661,6 +1668,8 @@ struct xhci_hcd { - #define XHCI_WRITE_64_HI_LO BIT_ULL(47) +@@ -1662,6 +1669,8 @@ struct xhci_hcd { #define XHCI_CDNS_SCTX_QUIRK BIT_ULL(48) + #define XHCI_ETRON_HOST BIT_ULL(49) +#define XHCI_LOCAL_BUFFER BIT_ULL(63) + unsigned int num_active_eps; unsigned int limit_active_eps; struct xhci_port *hw_ports; -@@ -1690,6 +1699,8 @@ struct xhci_hcd { +@@ -1691,6 +1700,8 @@ struct xhci_hcd { struct list_head regset_list; void *dbc; diff --git a/target/linux/starfive/patches-6.6/1000-serial-8250_dw-Add-starfive-jh7100-hsuart-compatible.patch b/target/linux/starfive/patches-6.6/1000-serial-8250_dw-Add-starfive-jh7100-hsuart-compatible.patch index 463c7eb7b667fc..a094e4b5d69187 100644 --- a/target/linux/starfive/patches-6.6/1000-serial-8250_dw-Add-starfive-jh7100-hsuart-compatible.patch +++ b/target/linux/starfive/patches-6.6/1000-serial-8250_dw-Add-starfive-jh7100-hsuart-compatible.patch @@ -15,11 +15,11 @@ Signed-off-by: Emil Renner Berthing --- a/drivers/tty/serial/8250/8250_dw.c +++ b/drivers/tty/serial/8250/8250_dw.c -@@ -802,6 +802,7 @@ static const struct of_device_id dw8250_ - { .compatible = "cavium,octeon-3860-uart", .data = &dw8250_octeon_3860_data }, +@@ -803,6 +803,7 @@ static const struct of_device_id dw8250_ { .compatible = "marvell,armada-38x-uart", .data = &dw8250_armada_38x_data }, { .compatible = "renesas,rzn1-uart", .data = &dw8250_renesas_rzn1_data }, -+ { .compatible = "starfive,jh7100-hsuart", .data = &dw8250_starfive_jh7100_data }, - { .compatible = "starfive,jh7100-uart", .data = &dw8250_starfive_jh7100_data }, + { .compatible = "sophgo,sg2044-uart", .data = &dw8250_skip_set_rate_data }, ++ { .compatible = "starfive,jh7100-hsuart", .data = &dw8250_skip_set_rate_data }, + { .compatible = "starfive,jh7100-uart", .data = &dw8250_skip_set_rate_data }, { /* Sentinel */ } }; From 8943430b9f8046d49842de6b40f9c90fb57fff04 Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Thu, 19 Dec 2024 06:26:59 +0100 Subject: [PATCH 35/43] hostapd: fix passing radio parameter in wpa_supplicant calls Fixes accessing PHY status in AP+STA configurations Signed-off-by: Felix Fietkau --- package/network/services/hostapd/files/hostapd.uc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package/network/services/hostapd/files/hostapd.uc b/package/network/services/hostapd/files/hostapd.uc index e345a678f417c3..873881200ad26f 100644 --- a/package/network/services/hostapd/files/hostapd.uc +++ b/package/network/services/hostapd/files/hostapd.uc @@ -189,7 +189,7 @@ function __iface_pending_next(pending, state, ret, data) pending.call("wpa_supplicant", "phy_status", { phy: phydev.phy, - radio: phydev.radio, + radio: phydev.radio ?? -1, }); return "check_phy"; case "check_phy": @@ -202,7 +202,7 @@ function __iface_pending_next(pending, state, ret, data) } pending.call("wpa_supplicant", "phy_set_state", { phy: phydev.phy, - radio: phydev.radio, + radio: phydev.radio ?? -1, stop: true }); return "wpas_stopped"; @@ -211,7 +211,7 @@ function __iface_pending_next(pending, state, ret, data) hostapd.printf(`hostapd.add_iface failed for phy ${phy} ifname=${bss.ifname}`); pending.call("wpa_supplicant", "phy_set_state", { phy: phydev.phy, - radio: phydev.radio, + radio: phydev.radio ?? -1, stop: false }); return null; From 2e03c7d53e84e5e8c964914b78fe4b429563655e Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Thu, 19 Dec 2024 06:44:30 +0100 Subject: [PATCH 36/43] wifi-scripts: fix phy index lookup in device_capabilities For renamed phys, the index cannot be derived from the name Signed-off-by: Felix Fietkau --- .../wifi-scripts/files-ucode/usr/share/ucode/wifi/hostapd.uc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package/network/config/wifi-scripts/files-ucode/usr/share/ucode/wifi/hostapd.uc b/package/network/config/wifi-scripts/files-ucode/usr/share/ucode/wifi/hostapd.uc index f95f01e8468079..adbfc1b9781436 100644 --- a/package/network/config/wifi-scripts/files-ucode/usr/share/ucode/wifi/hostapd.uc +++ b/package/network/config/wifi-scripts/files-ucode/usr/share/ucode/wifi/hostapd.uc @@ -437,7 +437,7 @@ function device_extended_features(data, flag) { } function device_capabilities(phy) { - let idx = +substr(phy, 3, 1);; + let idx = +fs.readfile(`/sys/class/ieee80211/${phy}/index`); phy = nl80211.request(nl80211.const.NL80211_CMD_GET_WIPHY, nl80211.const.NLM_F_DUMP, { wiphy: idx, split_wiphy_dump: true }); if (!phy) return; From 31e45f62cafbc9361c72d320241e589b31e2b5ed Mon Sep 17 00:00:00 2001 From: Florian Maurer Date: Sat, 14 Dec 2024 12:38:28 +0100 Subject: [PATCH 37/43] hostapd: fix call to hostapd reload access to undeclared variable radio In [anonymous function](), file /usr/share/hostap/hostapd.uc, line 830, byte 45: Signed-off-by: Florian Maurer --- package/network/services/hostapd/files/hostapd.uc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package/network/services/hostapd/files/hostapd.uc b/package/network/services/hostapd/files/hostapd.uc index 873881200ad26f..b7ef22ce6f0be8 100644 --- a/package/network/services/hostapd/files/hostapd.uc +++ b/package/network/services/hostapd/files/hostapd.uc @@ -899,7 +899,7 @@ let main_obj = { let phy_list = req.args.phy ? [ phy_name(req.args.phy, req.args.radio) ] : keys(hostapd.data.config); for (let phy_name in phy_list) { let phy = hostapd.data.config[phy_name]; - let config = iface_load_config(phy.phy, radio, phy.orig_file); + let config = iface_load_config(phy.phy, phy.radio_idx, phy.orig_file); iface_set_config(phy_name, config); } From d4d6c48b6e055dca5480d49d44503d1175539485 Mon Sep 17 00:00:00 2001 From: Jonas Jelonek Date: Mon, 25 Nov 2024 23:04:15 +0000 Subject: [PATCH 38/43] mediatek: filogic: support openwrt,netdev-name for renaming interfaces Add support in filogic subtarget for our own custom property `openwrt,netdev-name` in the device tree instead of `label` for renaming interfaces. This was suggested upstream to avoid potential conflicts [1]. [1] https://lore.kernel.org/netdev/20240709124503.pubki5nwjfbedhhy@skbuf/ Signed-off-by: Jonas Jelonek --- .../filogic/base-files/lib/preinit/04_set_netdev_label | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/target/linux/mediatek/filogic/base-files/lib/preinit/04_set_netdev_label b/target/linux/mediatek/filogic/base-files/lib/preinit/04_set_netdev_label index 110e023b962d3d..2c5e420f93bd17 100644 --- a/target/linux/mediatek/filogic/base-files/lib/preinit/04_set_netdev_label +++ b/target/linux/mediatek/filogic/base-files/lib/preinit/04_set_netdev_label @@ -10,6 +10,14 @@ set_netdev_labels() { [ "$netdev" = "$label" ] && continue ip link set "$netdev" name "$label" done + + for dir in /sys/class/net/*; do + [ -r "$dir/of_node/openwrt,netdev-name" ] || continue + read -r label < "$dir/of_node/openwrt,netdev-name" + netdev="${dir##*/}" + [ "$netdev" = "$label" ] && continue + ip link set "$netdev" name "$label" + done } boot_hook_add preinit_main set_netdev_labels From 84fc59c0d5285a0a0fe50e3cb2a85f6224362c55 Mon Sep 17 00:00:00 2001 From: Jonas Jelonek Date: Sun, 10 Nov 2024 00:43:23 +0000 Subject: [PATCH 39/43] mediatek: filogic: bpi-r3: set netdev-name for sfp1 port Sets openwrt,netdev-name for the gmac1 node in the dts of BPI-R3, which corresponds to the sfp1 slot, to have a proper naming and match the label on the official BPI-R3 metal case. This renames the port from eth1 to sfp1. The COMPAT_VERSION is increased to denote that configuration has to be adjusted manually. Signed-off-by: Jonas Jelonek --- .../mediatek/filogic/base-files/etc/board.d/02_network | 2 +- .../filogic/base-files/etc/board.d/05_compat-version | 2 +- target/linux/mediatek/image/filogic.mk | 4 ++-- ...t7968a-bpi-r3-add-label-to-gmac-for-sfp1-port.patch | 10 ++++++++++ 4 files changed, 14 insertions(+), 4 deletions(-) create mode 100644 target/linux/mediatek/patches-6.6/955-dts-mt7968a-bpi-r3-add-label-to-gmac-for-sfp1-port.patch diff --git a/target/linux/mediatek/filogic/base-files/etc/board.d/02_network b/target/linux/mediatek/filogic/base-files/etc/board.d/02_network index 2a133813263c16..85422fe1f63ee5 100644 --- a/target/linux/mediatek/filogic/base-files/etc/board.d/02_network +++ b/target/linux/mediatek/filogic/base-files/etc/board.d/02_network @@ -59,7 +59,7 @@ mediatek_setup_interfaces() ucidef_set_interfaces_lan_wan "lan1 lan2 lan3 lan4 lan5" eth1 ;; bananapi,bpi-r3) - ucidef_set_interfaces_lan_wan "lan1 lan2 lan3 lan4 sfp2" "eth1 wan" + ucidef_set_interfaces_lan_wan "lan1 lan2 lan3 lan4 sfp2" "sfp1 wan" ;; bananapi,bpi-r3-mini|\ edgecore,eap111) diff --git a/target/linux/mediatek/filogic/base-files/etc/board.d/05_compat-version b/target/linux/mediatek/filogic/base-files/etc/board.d/05_compat-version index 9b704b983cb7f0..48c040613c952d 100644 --- a/target/linux/mediatek/filogic/base-files/etc/board.d/05_compat-version +++ b/target/linux/mediatek/filogic/base-files/etc/board.d/05_compat-version @@ -6,7 +6,7 @@ board_config_update case "$(board_name)" in bananapi,bpi-r3) - ucidef_set_compat_version "1.2" + ucidef_set_compat_version "1.3" ;; routerich,ax3000) ucidef_set_compat_version "1.1" diff --git a/target/linux/mediatek/image/filogic.mk b/target/linux/mediatek/image/filogic.mk index 1fdb3036776852..825e4abbad54f3 100644 --- a/target/linux/mediatek/image/filogic.mk +++ b/target/linux/mediatek/image/filogic.mk @@ -375,8 +375,8 @@ endif fit lzma $$(KDIR)/image-$$(firstword $$(DEVICE_DTS)).dtb with-initrd | pad-to 64k IMAGE/sysupgrade.itb := append-kernel | fit gzip $$(KDIR)/image-$$(firstword $$(DEVICE_DTS)).dtb external-static-with-rootfs | pad-rootfs | append-metadata DEVICE_DTC_FLAGS := --pad 4096 - DEVICE_COMPAT_VERSION := 1.2 - DEVICE_COMPAT_MESSAGE := SPI-NAND flash layout changes require bootloader update + DEVICE_COMPAT_VERSION := 1.3 + DEVICE_COMPAT_MESSAGE := First sfp port renamed from eth1 to sfp1 endef TARGET_DEVICES += bananapi_bpi-r3 diff --git a/target/linux/mediatek/patches-6.6/955-dts-mt7968a-bpi-r3-add-label-to-gmac-for-sfp1-port.patch b/target/linux/mediatek/patches-6.6/955-dts-mt7968a-bpi-r3-add-label-to-gmac-for-sfp1-port.patch new file mode 100644 index 00000000000000..f11cf01686850f --- /dev/null +++ b/target/linux/mediatek/patches-6.6/955-dts-mt7968a-bpi-r3-add-label-to-gmac-for-sfp1-port.patch @@ -0,0 +1,10 @@ +--- a/arch/arm64/boot/dts/mediatek/mt7986a-bananapi-bpi-r3.dts ++++ b/arch/arm64/boot/dts/mediatek/mt7986a-bananapi-bpi-r3.dts +@@ -195,6 +195,7 @@ + phy-mode = "2500base-x"; + sfp = <&sfp1>; + managed = "in-band-status"; ++ openwrt,netdev-name = "sfp1"; + }; + + mdio: mdio-bus { From cd8dcfef378044a1687adfa3738f01f9a9622baf Mon Sep 17 00:00:00 2001 From: Jonas Jelonek Date: Wed, 13 Nov 2024 22:25:09 +0000 Subject: [PATCH 40/43] mediatek: filogic: bpi-r4: set netdev-name for sfp ports Sets openwrt,netdev-name for the gmac nodes in the dts of BPI-R4 which correspond to the two sfp slots. By default they are automatically named as eth1 and eth2 in bad order, however 'SFP1-WAN' and 'SFP2-LAN' are printed on the PCB and the official metal case has labels 'SFP-WAN' and 'SFP-LAN'. Thus, label the ports accordingly to match the board/case labels. The COMPAT_VERSION is increased to denote that configuration has to be adjusted manually. Signed-off-by: Jonas Jelonek --- .../arm64/boot/dts/mediatek/mt7988a-bananapi-bpi-r4-poe.dts | 1 + .../arm64/boot/dts/mediatek/mt7988a-bananapi-bpi-r4.dts | 1 + .../arm64/boot/dts/mediatek/mt7988a-bananapi-bpi-r4.dtsi | 1 + .../mediatek/filogic/base-files/etc/board.d/02_network | 6 ++++-- .../filogic/base-files/etc/board.d/05_compat-version | 4 ++++ target/linux/mediatek/image/filogic.mk | 2 ++ 6 files changed, 13 insertions(+), 2 deletions(-) diff --git a/target/linux/mediatek/files-6.6/arch/arm64/boot/dts/mediatek/mt7988a-bananapi-bpi-r4-poe.dts b/target/linux/mediatek/files-6.6/arch/arm64/boot/dts/mediatek/mt7988a-bananapi-bpi-r4-poe.dts index efcf0ec35851cc..910f60d11b2255 100644 --- a/target/linux/mediatek/files-6.6/arch/arm64/boot/dts/mediatek/mt7988a-bananapi-bpi-r4-poe.dts +++ b/target/linux/mediatek/files-6.6/arch/arm64/boot/dts/mediatek/mt7988a-bananapi-bpi-r4-poe.dts @@ -17,6 +17,7 @@ phy-connection-type = "internal"; phy = <&int_2p5g_phy>; status = "okay"; + openwrt,netdev-name = "lan4"; }; &int_2p5g_phy { diff --git a/target/linux/mediatek/files-6.6/arch/arm64/boot/dts/mediatek/mt7988a-bananapi-bpi-r4.dts b/target/linux/mediatek/files-6.6/arch/arm64/boot/dts/mediatek/mt7988a-bananapi-bpi-r4.dts index d2c223b4efaaa4..0f8b6e3d03f5ad 100644 --- a/target/linux/mediatek/files-6.6/arch/arm64/boot/dts/mediatek/mt7988a-bananapi-bpi-r4.dts +++ b/target/linux/mediatek/files-6.6/arch/arm64/boot/dts/mediatek/mt7988a-bananapi-bpi-r4.dts @@ -29,6 +29,7 @@ managed = "in-band-status"; phy-mode = "usxgmii"; status = "okay"; + openwrt,netdev-name = "sfp-lan"; }; &pca9545 { diff --git a/target/linux/mediatek/files-6.6/arch/arm64/boot/dts/mediatek/mt7988a-bananapi-bpi-r4.dtsi b/target/linux/mediatek/files-6.6/arch/arm64/boot/dts/mediatek/mt7988a-bananapi-bpi-r4.dtsi index c4455fbc7471ed..8dba5b4275fbca 100644 --- a/target/linux/mediatek/files-6.6/arch/arm64/boot/dts/mediatek/mt7988a-bananapi-bpi-r4.dtsi +++ b/target/linux/mediatek/files-6.6/arch/arm64/boot/dts/mediatek/mt7988a-bananapi-bpi-r4.dtsi @@ -90,6 +90,7 @@ managed = "in-band-status"; phy-mode = "usxgmii"; status = "okay"; + openwrt,netdev-name = "sfp-wan"; }; &switch { diff --git a/target/linux/mediatek/filogic/base-files/etc/board.d/02_network b/target/linux/mediatek/filogic/base-files/etc/board.d/02_network index 85422fe1f63ee5..12dca517127268 100644 --- a/target/linux/mediatek/filogic/base-files/etc/board.d/02_network +++ b/target/linux/mediatek/filogic/base-files/etc/board.d/02_network @@ -65,9 +65,11 @@ mediatek_setup_interfaces() edgecore,eap111) ucidef_set_interfaces_lan_wan eth0 eth1 ;; - bananapi,bpi-r4|\ + bananapi,bpi-r4) + ucidef_set_interfaces_lan_wan "lan1 lan2 lan3 sfp-lan" "wan sfp-wan" + ;; bananapi,bpi-r4-poe) - ucidef_set_interfaces_lan_wan "lan1 lan2 lan3 eth1" "wan eth2" + ucidef_set_interfaces_lan_wan "lan1 lan2 lan3 lan4" "wan sfp-wan" ;; comfast,cf-e393ax) ucidef_set_interfaces_lan_wan "lan1" eth1 diff --git a/target/linux/mediatek/filogic/base-files/etc/board.d/05_compat-version b/target/linux/mediatek/filogic/base-files/etc/board.d/05_compat-version index 48c040613c952d..5ffc4e33743ba9 100644 --- a/target/linux/mediatek/filogic/base-files/etc/board.d/05_compat-version +++ b/target/linux/mediatek/filogic/base-files/etc/board.d/05_compat-version @@ -11,6 +11,10 @@ case "$(board_name)" in routerich,ax3000) ucidef_set_compat_version "1.1" ;; + bananapi,bpi-r4|\ + bananapi,bpi-r4-poe) + ucidef_set_compat_version "1.1" + ;; esac board_config_flush diff --git a/target/linux/mediatek/image/filogic.mk b/target/linux/mediatek/image/filogic.mk index 825e4abbad54f3..abc6fc1e091031 100644 --- a/target/linux/mediatek/image/filogic.mk +++ b/target/linux/mediatek/image/filogic.mk @@ -433,6 +433,8 @@ define Device/bananapi_bpi-r4-common DEVICE_DTC_FLAGS := --pad 4096 DEVICE_PACKAGES := kmod-hwmon-pwmfan kmod-i2c-mux-pca954x kmod-eeprom-at24 kmod-mt7996-firmware kmod-mt7996-233-firmware \ kmod-rtc-pcf8563 kmod-sfp kmod-usb3 e2fsprogs f2fsck mkf2fs mt7988-wo-firmware + DEVICE_COMPAT_VERSION := 1.1 + DEVICE_COMPAT_MESSAGE := The non-switch ports were renamed to match the board/case labels IMAGES := sysupgrade.itb KERNEL_LOADADDR := 0x46000000 KERNEL_INITRAMFS_SUFFIX := -recovery.itb From d7f638bc692a7a81cf13c8ca50c7dc4a73c0fed9 Mon Sep 17 00:00:00 2001 From: Marco von Rosenberg Date: Wed, 18 Dec 2024 23:32:42 +0100 Subject: [PATCH 41/43] generic: fix BCM54612E suspend/resume backport patch This backport patch inserted suspend/resume callbacks for the wrong PHY driver. The fixed patch is needed for Huawei AP5030DN to initialize its second PHY. Refresh all affected patch with make target/linux/refresh. Fixes: 06cdc07f8cc7 ("ath79: add support for Huawei AP5030DN") Signed-off-by: Marco von Rosenberg Link: https://github.com/openwrt/openwrt/pull/17312 Signed-off-by: Hauke Mehrtens --- ...y-broadcom-split-out-the-BCM54213PE-from-the-BCM54.patch | 4 ++-- .../950-0382-Populate-phy-driver-block-for-BCM54213PE.patch | 2 +- .../734-v6.8-net-phy-bcm54612e-add-suspend-resume.patch | 6 +++--- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/target/linux/bcm27xx/patches-6.6/950-0260-phy-broadcom-split-out-the-BCM54213PE-from-the-BCM54.patch b/target/linux/bcm27xx/patches-6.6/950-0260-phy-broadcom-split-out-the-BCM54213PE-from-the-BCM54.patch index 69008c65de0b39..b4133150918860 100644 --- a/target/linux/bcm27xx/patches-6.6/950-0260-phy-broadcom-split-out-the-BCM54213PE-from-the-BCM54.patch +++ b/target/linux/bcm27xx/patches-6.6/950-0260-phy-broadcom-split-out-the-BCM54213PE-from-the-BCM54.patch @@ -26,7 +26,7 @@ Signed-off-by: Jonathan Bell return; val = bcm_phy_read_shadow(phydev, BCM54XX_SHD_SCR3); -@@ -1021,7 +1022,7 @@ static struct phy_driver broadcom_driver +@@ -1019,7 +1020,7 @@ static struct phy_driver broadcom_driver .link_change_notify = bcm54xx_link_change_notify, }, { .phy_id = PHY_ID_BCM54210E, @@ -35,7 +35,7 @@ Signed-off-by: Jonathan Bell .name = "Broadcom BCM54210E", /* PHY_GBIT_FEATURES */ .flags = PHY_ALWAYS_CALL_SUSPEND, -@@ -1039,6 +1040,13 @@ static struct phy_driver broadcom_driver +@@ -1037,6 +1038,13 @@ static struct phy_driver broadcom_driver .set_wol = bcm54xx_phy_set_wol, .led_brightness_set = bcm_phy_led_brightness_set, }, { diff --git a/target/linux/bcm27xx/patches-6.6/950-0382-Populate-phy-driver-block-for-BCM54213PE.patch b/target/linux/bcm27xx/patches-6.6/950-0382-Populate-phy-driver-block-for-BCM54213PE.patch index 218743e942ceed..e74d2d361d547f 100644 --- a/target/linux/bcm27xx/patches-6.6/950-0382-Populate-phy-driver-block-for-BCM54213PE.patch +++ b/target/linux/bcm27xx/patches-6.6/950-0382-Populate-phy-driver-block-for-BCM54213PE.patch @@ -16,7 +16,7 @@ Signed-off-by: Jonathan Lemon --- a/drivers/net/phy/broadcom.c +++ b/drivers/net/phy/broadcom.c -@@ -1052,8 +1052,14 @@ static struct phy_driver broadcom_driver +@@ -1050,8 +1050,14 @@ static struct phy_driver broadcom_driver .phy_id_mask = 0xffffffff, .name = "Broadcom BCM54213PE", /* PHY_GBIT_FEATURES */ diff --git a/target/linux/generic/backport-6.6/734-v6.8-net-phy-bcm54612e-add-suspend-resume.patch b/target/linux/generic/backport-6.6/734-v6.8-net-phy-bcm54612e-add-suspend-resume.patch index 28524a3dcf4cd8..12a89dae74a3e3 100644 --- a/target/linux/generic/backport-6.6/734-v6.8-net-phy-bcm54612e-add-suspend-resume.patch +++ b/target/linux/generic/backport-6.6/734-v6.8-net-phy-bcm54612e-add-suspend-resume.patch @@ -16,12 +16,12 @@ Signed-off-by: David S. Miller --- a/drivers/net/phy/broadcom.c +++ b/drivers/net/phy/broadcom.c -@@ -1001,6 +1001,8 @@ static struct phy_driver broadcom_driver - .config_intr = bcm_phy_config_intr, +@@ -1061,6 +1061,8 @@ static struct phy_driver broadcom_driver .handle_interrupt = bcm_phy_handle_interrupt, .link_change_notify = bcm54xx_link_change_notify, + .led_brightness_set = bcm_phy_led_brightness_set, + .suspend = bcm54xx_suspend, + .resume = bcm54xx_resume, }, { - .phy_id = PHY_ID_BCM5421, + .phy_id = PHY_ID_BCM54616S, .phy_id_mask = 0xfffffff0, From efe9fb084659ba9da4246ebc43435ea147eaf610 Mon Sep 17 00:00:00 2001 From: John Audia Date: Thu, 19 Dec 2024 14:01:20 -0500 Subject: [PATCH 42/43] kernel: bump 6.6 to 6.6.67 Changelog: https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.6.67 All patches automatically rebased. Build system: x86/64 Build-tested: flogic/xiaomi_redmi-router-ax6000-ubootmod, ramips/tplink_archer-a6-v3, x86/64 Run-tested: flogic/xiaomi_redmi-router-ax6000-ubootmod, ramips/tplink_archer-a6-v3, x86/64 Signed-off-by: John Audia Link: https://github.com/openwrt/openwrt/pull/17309 Signed-off-by: Hauke Mehrtens --- include/kernel-6.6 | 4 ++-- ...Add-support-for-all-the-downstream-rpi-sound-card-dr.patch | 2 +- ...compiler.h-only-include-asm-rwonce.h-for-kernel-code.patch | 4 ++-- ...netfilter-nf_tables-ignore-EOPNOTSUPP-on-flowtable-d.patch | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/include/kernel-6.6 b/include/kernel-6.6 index 1e5dc77de0eb75..3b76c2be062c65 100644 --- a/include/kernel-6.6 +++ b/include/kernel-6.6 @@ -1,2 +1,2 @@ -LINUX_VERSION-6.6 = .66 -LINUX_KERNEL_HASH-6.6.66 = 9d757937c4661c2f512c62641b74ef74eff9bb13dc5dbcbaaa108c21152f1e52 +LINUX_VERSION-6.6 = .67 +LINUX_KERNEL_HASH-6.6.67 = e41da482ec42a3b0e2b8ed2574c1d327e3dcf95cdf025c55a356b04307113e1a diff --git a/target/linux/bcm27xx/patches-6.6/950-0106-Add-support-for-all-the-downstream-rpi-sound-card-dr.patch b/target/linux/bcm27xx/patches-6.6/950-0106-Add-support-for-all-the-downstream-rpi-sound-card-dr.patch index 6ffc9364da8889..ecb7bffa025a7e 100644 --- a/target/linux/bcm27xx/patches-6.6/950-0106-Add-support-for-all-the-downstream-rpi-sound-card-dr.patch +++ b/target/linux/bcm27xx/patches-6.6/950-0106-Add-support-for-all-the-downstream-rpi-sound-card-dr.patch @@ -17583,7 +17583,7 @@ Signed-off-by: Phil Elwell * For devices with more than one control interface, we assume the --- a/sound/usb/quirks.c +++ b/sound/usb/quirks.c -@@ -2233,6 +2233,8 @@ static const struct usb_audio_quirk_flag +@@ -2247,6 +2247,8 @@ static const struct usb_audio_quirk_flag QUIRK_FLAG_ALIGN_TRANSFER), DEVICE_FLG(0x534d, 0x2109, /* MacroSilicon MS2109 */ QUIRK_FLAG_ALIGN_TRANSFER), diff --git a/target/linux/generic/pending-6.6/100-compiler.h-only-include-asm-rwonce.h-for-kernel-code.patch b/target/linux/generic/pending-6.6/100-compiler.h-only-include-asm-rwonce.h-for-kernel-code.patch index 0844fcd6dbd657..50fcdbaed8108b 100644 --- a/target/linux/generic/pending-6.6/100-compiler.h-only-include-asm-rwonce.h-for-kernel-code.patch +++ b/target/linux/generic/pending-6.6/100-compiler.h-only-include-asm-rwonce.h-for-kernel-code.patch @@ -19,8 +19,8 @@ Signed-off-by: Felix Fietkau + #endif /* __KERNEL__ */ - /* -@@ -243,6 +245,4 @@ static inline void *offset_to_ptr(const + /** +@@ -258,6 +260,4 @@ static inline void *offset_to_ptr(const */ #define prevent_tail_call_optimization() mb() diff --git a/target/linux/generic/pending-6.6/701-netfilter-nf_tables-ignore-EOPNOTSUPP-on-flowtable-d.patch b/target/linux/generic/pending-6.6/701-netfilter-nf_tables-ignore-EOPNOTSUPP-on-flowtable-d.patch index d13641064063fa..572aad2a3b3dde 100644 --- a/target/linux/generic/pending-6.6/701-netfilter-nf_tables-ignore-EOPNOTSUPP-on-flowtable-d.patch +++ b/target/linux/generic/pending-6.6/701-netfilter-nf_tables-ignore-EOPNOTSUPP-on-flowtable-d.patch @@ -18,7 +18,7 @@ Signed-off-by: Felix Fietkau --- a/net/netfilter/nf_tables_api.c +++ b/net/netfilter/nf_tables_api.c -@@ -8417,7 +8417,7 @@ static int nft_register_flowtable_net_ho +@@ -8421,7 +8421,7 @@ static int nft_register_flowtable_net_ho err = flowtable->data.type->setup(&flowtable->data, hook->ops.dev, FLOW_BLOCK_BIND); From 69582e71fabfb42aa2842d24eecb1f4392048404 Mon Sep 17 00:00:00 2001 From: Hannu Nyman Date: Thu, 19 Dec 2024 20:45:40 +0200 Subject: [PATCH 43/43] busybox: Fix hexdump applet Fix the hexdump applet's formatting with certain format types by applying the upstream fix for 1.37.0. Also refresh patches. Signed-off-by: Hannu Nyman Link: https://github.com/openwrt/openwrt/pull/17308 [Changed to 002- patch file name prefix] Signed-off-by: Hauke Mehrtens --- package/utils/busybox/Makefile | 2 +- .../patches/001-fix-non-x86-build.patch | 6 +-- .../patches/002-upstream-fix-hexdump.patch | 49 +++++++++++++++++++ 3 files changed, 52 insertions(+), 5 deletions(-) create mode 100644 package/utils/busybox/patches/002-upstream-fix-hexdump.patch diff --git a/package/utils/busybox/Makefile b/package/utils/busybox/Makefile index c2fc609610e80a..cda3be9f2f505d 100644 --- a/package/utils/busybox/Makefile +++ b/package/utils/busybox/Makefile @@ -6,7 +6,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=busybox PKG_VERSION:=1.37.0 -PKG_RELEASE:=3 +PKG_RELEASE:=4 PKG_FLAGS:=essential PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 diff --git a/package/utils/busybox/patches/001-fix-non-x86-build.patch b/package/utils/busybox/patches/001-fix-non-x86-build.patch index b33ec98bf29968..7a47292474fac4 100644 --- a/package/utils/busybox/patches/001-fix-non-x86-build.patch +++ b/package/utils/busybox/patches/001-fix-non-x86-build.patch @@ -1,7 +1,5 @@ -Index: busybox-1.37.0/libbb/hash_md5_sha.c -=================================================================== ---- busybox-1.37.0.orig/libbb/hash_md5_sha.c -+++ busybox-1.37.0/libbb/hash_md5_sha.c +--- a/libbb/hash_md5_sha.c ++++ b/libbb/hash_md5_sha.c @@ -1313,7 +1313,9 @@ unsigned FAST_FUNC sha1_end(sha1_ctx_t * hash_size = 8; if (ctx->process_block == sha1_process_block64 diff --git a/package/utils/busybox/patches/002-upstream-fix-hexdump.patch b/package/utils/busybox/patches/002-upstream-fix-hexdump.patch new file mode 100644 index 00000000000000..a123fe3a5f1684 --- /dev/null +++ b/package/utils/busybox/patches/002-upstream-fix-hexdump.patch @@ -0,0 +1,49 @@ +From 87e60dcf0f7ef917b73353d8605188a420bd91f9 Mon Sep 17 00:00:00 2001 +From: Natanael Copa +Date: Mon, 28 Oct 2024 15:26:21 +0100 +Subject: hexdump: fix regression with -n4 -e '"%u"' + +Fix bug introduced in busybox 1.37.0 that broke kernel builds. + +Fixes commit e2287f99fe6f (od: for !DESKTOP, match output more closely +to GNU coreutils 9.1, implement -s) + +function old new delta +rewrite 967 976 +9 + +Signed-off-by: Natanael Copa +Signed-off-by: Denys Vlasenko +--- + libbb/dump.c | 6 ++++-- + testsuite/hexdump.tests | 6 ++++++ + 2 files changed, 10 insertions(+), 2 deletions(-) + +--- a/libbb/dump.c ++++ b/libbb/dump.c +@@ -198,9 +198,11 @@ static NOINLINE void rewrite(priv_dumper + if (!e) + goto DO_BAD_CONV_CHAR; + pr->flags = F_INT; +- if (e > int_convs + 1) /* not d or i? */ +- pr->flags = F_UINT; + byte_count_str = "\010\004\002\001"; ++ if (e > int_convs + 1) { /* not d or i? */ ++ pr->flags = F_UINT; ++ byte_count_str++; ++ } + goto DO_BYTE_COUNT; + } else + if (strchr(int_convs, *p1)) { /* %d etc */ +--- a/testsuite/hexdump.tests ++++ b/testsuite/hexdump.tests +@@ -82,4 +82,10 @@ testing "hexdump -e /2 %d" \ + "\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"\ + "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"\ + ++testing "hexdump -n4 -e '\"%u\"'" \ ++ "hexdump -n4 -e '\"%u\"'" \ ++ "12345678" \ ++ "" \ ++ "\x4e\x61\xbc\x00AAAA" ++ + exit $FAILCOUNT