diff --git a/package/boot/uboot-rockchip/Makefile b/package/boot/uboot-rockchip/Makefile index 7d1e1fc39408d7..bef045b7a26134 100644 --- a/package/boot/uboot-rockchip/Makefile +++ b/package/boot/uboot-rockchip/Makefile @@ -163,6 +163,7 @@ define U-Boot/opc-h68k-rk3568 BUILD_SUBTARGET:=armv8 NAME:=OPC-H68K Board BUILD_DEVICES:= \ + hinlink_opc-h66k \ hinlink_opc-h68k DEPENDS:=+PACKAGE_u-boot-opc-h68k-rk3568:arm-trusted-firmware-rk3568 PKG_BUILD_DEPENDS:=arm-trusted-firmware-rockchip-vendor diff --git a/package/firmware/linux-firmware/Makefile b/package/firmware/linux-firmware/Makefile index 2c4d361012d4b7..7ffd8baf884123 100644 --- a/package/firmware/linux-firmware/Makefile +++ b/package/firmware/linux-firmware/Makefile @@ -8,12 +8,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=linux-firmware -PKG_VERSION:=20221109 -PKG_RELEASE:=2 +PKG_VERSION:=20221214 +PKG_RELEASE:=3 PKG_SOURCE_URL:=@KERNEL/linux/kernel/firmware PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz -PKG_HASH:=c0ddffbbcf30f2e015bddd5c6d3ce1f13976b906aceabda4a57e3c41a3190701 +PKG_HASH:=e793783e92acbde549965521462d1d1327827360664cf242dbda08f075654331 PKG_MAINTAINER:=Felix Fietkau @@ -21,6 +21,9 @@ SCAN_DEPS = *.mk include $(INCLUDE_DIR)/package.mk +RSTRIP:=: +STRIP:=: + define Package/firmware-default SECTION:=firmware CATEGORY:=Firmware diff --git a/package/firmware/linux-firmware/qca_ath11k.mk b/package/firmware/linux-firmware/qca_ath11k.mk index 3e997bc3f4a1e8..b8f6ab8605d9a0 100644 --- a/package/firmware/linux-firmware/qca_ath11k.mk +++ b/package/firmware/linux-firmware/qca_ath11k.mk @@ -19,5 +19,6 @@ define Package/ath11k-firmware-wcn6855/install $(INSTALL_DIR) $(1)/lib/firmware/ath11k/WCN6855/hw2.0 $(INSTALL_DATA) \ $(PKG_BUILD_DIR)/ath11k/WCN6855/hw2.0/* $(1)/lib/firmware/ath11k/WCN6855/hw2.0/ + $(LN) ./hw2.0 $(1)/lib/firmware/ath11k/WCN6855/hw2.1 endef $(eval $(call BuildPackage,ath11k-firmware-wcn6855)) diff --git a/package/kernel/ath10k-ct/patches/100-api_update.patch b/package/kernel/ath10k-ct/patches/100-api_update.patch new file mode 100644 index 00000000000000..beb7836cf66cd5 --- /dev/null +++ b/package/kernel/ath10k-ct/patches/100-api_update.patch @@ -0,0 +1,29 @@ +--- a/ath10k-5.15/core.c ++++ b/ath10k-5.15/core.c +@@ -4151,7 +4151,11 @@ + ath10k_debug_print_board_info(ar); + } + ++#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 0, 0) + device_get_mac_address(ar->dev, ar->mac_addr, sizeof(ar->mac_addr)); ++#else ++ device_get_mac_address(ar->dev, ar->mac_addr); ++#endif + + /* Try to get mac address from device node (from nvmem cell) */ + of_get_mac_address(ar->dev->of_node, ar->mac_addr); +--- a/ath10k-5.15/pci.c ++++ b/ath10k-5.15/pci.c +@@ -3563,8 +3563,12 @@ + + void ath10k_pci_init_napi(struct ath10k *ar) + { ++#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 0, 0) + netif_napi_add(&ar->napi_dev, &ar->napi, ath10k_pci_napi_poll, + ATH10K_NAPI_BUDGET); ++#else ++ netif_napi_add(&ar->napi_dev, &ar->napi, ath10k_pci_napi_poll); ++#endif + } + + static int ath10k_pci_init_irq(struct ath10k *ar) diff --git a/package/kernel/mt76/Makefile b/package/kernel/mt76/Makefile index 912cae16d0768d..376da55b5fffb2 100644 --- a/package/kernel/mt76/Makefile +++ b/package/kernel/mt76/Makefile @@ -1,16 +1,16 @@ include $(TOPDIR)/rules.mk PKG_NAME:=mt76 -PKG_RELEASE=7 +PKG_RELEASE=5 PKG_LICENSE:=GPLv2 PKG_LICENSE_FILES:= PKG_SOURCE_URL:=https://github.com/openwrt/mt76 PKG_SOURCE_PROTO:=git -PKG_SOURCE_DATE:=2022-12-10 -PKG_SOURCE_VERSION:=7fae1de12ae7832a6095fd2df198f41fabd5223d -PKG_MIRROR_HASH:=c01388f8029b007efdfb4327ef54aa373a91bbbff423caaa2ab4ab22befb9635 +PKG_SOURCE_DATE:=2022-12-22 +PKG_SOURCE_VERSION:=5b509e80384ab019ac11aa90c81ec0dbb5b0d7f2 +PKG_MIRROR_HASH:=6fc25df4d28becd010ff4971b23731c08b53e69381a9e4c868091899712f78a9 PKG_MAINTAINER:=Felix Fietkau PKG_USE_NINJA:=0 diff --git a/package/kernel/mt76/patches/001-Revert-sync-with-upstream.patch b/package/kernel/mt76/patches/001-Revert-sync-with-upstream.patch index d23dd80489d778..3fe394c70c815b 100644 --- a/package/kernel/mt76/patches/001-Revert-sync-with-upstream.patch +++ b/package/kernel/mt76/patches/001-Revert-sync-with-upstream.patch @@ -42,8 +42,6 @@ This reverts commit ec46d7486ab91786fbfe77edd306911b7c543334. usb.c | 2 +- 35 files changed, 204 insertions(+), 250 deletions(-) -diff --git a/debugfs.c b/debugfs.c -index 79064a4d..895a1376 100644 --- a/debugfs.c +++ b/debugfs.c @@ -25,32 +25,6 @@ mt76_reg_get(void *data, u64 *val) @@ -79,7 +77,7 @@ index 79064a4d..895a1376 100644 int mt76_queues_read(struct seq_file *s, void *data) { struct mt76_dev *dev = dev_get_drvdata(s->private); -@@ -116,8 +90,6 @@ mt76_register_debugfs_fops(struct mt76_phy *phy, +@@ -116,8 +90,6 @@ mt76_register_debugfs_fops(struct mt76_p debugfs_create_bool("led_active_low", 0600, dir, &phy->leds.al); debugfs_create_u32("regidx", 0600, dir, &dev->debugfs_reg); debugfs_create_file_unsafe("regval", 0600, dir, dev, fops); @@ -88,11 +86,9 @@ index 79064a4d..895a1376 100644 debugfs_create_blob("eeprom", 0400, dir, &dev->eeprom); if (dev->otp.data) debugfs_create_blob("otp", 0400, dir, &dev->otp); -diff --git a/dma.c b/dma.c -index fc24b353..db8b6623 100644 --- a/dma.c +++ b/dma.c -@@ -890,7 +890,7 @@ mt76_dma_init(struct mt76_dev *dev, +@@ -910,7 +910,7 @@ mt76_dma_init(struct mt76_dev *dev, dev->napi_dev.threaded = 1; mt76_for_each_q_rx(dev, i) { @@ -101,8 +97,6 @@ index fc24b353..db8b6623 100644 mt76_dma_rx_fill(dev, &dev->q_rx[i]); napi_enable(&dev->napi[i]); } -diff --git a/eeprom.c b/eeprom.c -index 0a88048b..25f67760 100644 --- a/eeprom.c +++ b/eeprom.c @@ -106,6 +106,7 @@ void @@ -113,8 +107,6 @@ index 0a88048b..25f67760 100644 struct device_node *np = dev->dev->of_node; of_get_mac_address(np, phy->macaddr); -diff --git a/mac80211.c b/mac80211.c -index 7fe7f68a..7c6bc5f3 100644 --- a/mac80211.c +++ b/mac80211.c @@ -1496,7 +1496,7 @@ EXPORT_SYMBOL_GPL(mt76_get_sar_power); @@ -126,7 +118,7 @@ index 7fe7f68a..7c6bc5f3 100644 ieee80211_csa_finish(vif); } -@@ -1518,7 +1518,7 @@ __mt76_csa_check(void *priv, u8 *mac, struct ieee80211_vif *vif) +@@ -1518,7 +1518,7 @@ __mt76_csa_check(void *priv, u8 *mac, st { struct mt76_dev *dev = priv; @@ -135,11 +127,9 @@ index 7fe7f68a..7c6bc5f3 100644 return; dev->csa_complete |= ieee80211_beacon_cntdwn_is_complete(vif); -diff --git a/mt7603/beacon.c b/mt7603/beacon.c -index b65b0a88..5807cf2c 100644 --- a/mt7603/beacon.c +++ b/mt7603/beacon.c -@@ -20,7 +20,7 @@ mt7603_update_beacon_iter(void *priv, u8 *mac, struct ieee80211_vif *vif) +@@ -20,7 +20,7 @@ mt7603_update_beacon_iter(void *priv, u8 if (!(mdev->beacon_mask & BIT(mvif->idx))) return; @@ -148,11 +138,9 @@ index b65b0a88..5807cf2c 100644 if (!skb) return; -diff --git a/mt7603/dma.c b/mt7603/dma.c -index 03ba11a6..06a9e6ec 100644 --- a/mt7603/dma.c +++ b/mt7603/dma.c -@@ -223,8 +223,8 @@ int mt7603_dma_init(struct mt7603_dev *dev) +@@ -223,8 +223,8 @@ int mt7603_dma_init(struct mt7603_dev *d if (ret) return ret; @@ -163,11 +151,9 @@ index 03ba11a6..06a9e6ec 100644 napi_enable(&dev->mt76.tx_napi); return 0; -diff --git a/mt7603/mac.c b/mt7603/mac.c -index 70a7f84a..b025e355 100644 --- a/mt7603/mac.c +++ b/mt7603/mac.c -@@ -326,21 +326,19 @@ void mt7603_wtbl_update_cap(struct mt7603_dev *dev, struct ieee80211_sta *sta) +@@ -326,21 +326,19 @@ void mt7603_wtbl_update_cap(struct mt760 addr = mt7603_wtbl1_addr(idx); @@ -194,7 +180,7 @@ index 70a7f84a..b025e355 100644 val |= MT_WTBL1_W2_VHT; mt76_wr(dev, addr + 2 * 4, val); -@@ -349,9 +347,9 @@ void mt7603_wtbl_update_cap(struct mt7603_dev *dev, struct ieee80211_sta *sta) +@@ -349,9 +347,9 @@ void mt7603_wtbl_update_cap(struct mt760 val = mt76_rr(dev, addr + 9 * 4); val &= ~(MT_WTBL2_W9_SHORT_GI_20 | MT_WTBL2_W9_SHORT_GI_40 | MT_WTBL2_W9_SHORT_GI_80); @@ -206,11 +192,9 @@ index 70a7f84a..b025e355 100644 val |= MT_WTBL2_W9_SHORT_GI_40; mt76_wr(dev, addr + 9 * 4, val); } -diff --git a/mt7603/main.c b/mt7603/main.c -index ca50feb0..91425b45 100644 --- a/mt7603/main.c +++ b/mt7603/main.c -@@ -297,7 +297,7 @@ mt7603_configure_filter(struct ieee80211_hw *hw, unsigned int changed_flags, +@@ -297,7 +297,7 @@ mt7603_configure_filter(struct ieee80211 static void mt7603_bss_info_changed(struct ieee80211_hw *hw, struct ieee80211_vif *vif, @@ -219,7 +203,7 @@ index ca50feb0..91425b45 100644 { struct mt7603_dev *dev = hw->priv; struct mt7603_vif *mvif = (struct mt7603_vif *)vif->drv_priv; -@@ -305,7 +305,7 @@ mt7603_bss_info_changed(struct ieee80211_hw *hw, struct ieee80211_vif *vif, +@@ -305,7 +305,7 @@ mt7603_bss_info_changed(struct ieee80211 mutex_lock(&dev->mt76.mutex); if (changed & (BSS_CHANGED_ASSOC | BSS_CHANGED_BSSID)) { @@ -228,7 +212,7 @@ index ca50feb0..91425b45 100644 mt76_wr(dev, MT_BSSID0(mvif->idx), get_unaligned_le32(info->bssid)); mt76_wr(dev, MT_BSSID1(mvif->idx), -@@ -527,8 +527,7 @@ mt7603_set_key(struct ieee80211_hw *hw, enum set_key_cmd cmd, +@@ -527,8 +527,7 @@ mt7603_set_key(struct ieee80211_hw *hw, } static int @@ -238,7 +222,7 @@ index ca50feb0..91425b45 100644 const struct ieee80211_tx_queue_params *params) { struct mt7603_dev *dev = hw->priv; -@@ -658,7 +657,7 @@ mt7603_sta_rate_tbl_update(struct ieee80211_hw *hw, struct ieee80211_vif *vif, +@@ -658,7 +657,7 @@ mt7603_sta_rate_tbl_update(struct ieee80 mt7603_wtbl_set_rates(dev, msta, NULL, msta->rates); msta->rate_probe = false; mt7603_wtbl_set_smps(dev, msta, @@ -247,11 +231,9 @@ index ca50feb0..91425b45 100644 spin_unlock_bh(&dev->mt76.lock); } -diff --git a/mt7615/dma.c b/mt7615/dma.c -index f1914431..ec729dbe 100644 --- a/mt7615/dma.c +++ b/mt7615/dma.c -@@ -281,8 +281,8 @@ int mt7615_dma_init(struct mt7615_dev *dev) +@@ -281,8 +281,8 @@ int mt7615_dma_init(struct mt7615_dev *d if (ret < 0) return ret; @@ -262,11 +244,9 @@ index f1914431..ec729dbe 100644 napi_enable(&dev->mt76.tx_napi); mt76_poll(dev, MT_WPDMA_GLO_CFG, -diff --git a/mt7615/main.c b/mt7615/main.c -index ab4c1b44..0d80003c 100644 --- a/mt7615/main.c +++ b/mt7615/main.c -@@ -473,8 +473,7 @@ static int mt7615_config(struct ieee80211_hw *hw, u32 changed) +@@ -473,8 +473,7 @@ static int mt7615_config(struct ieee8021 } static int @@ -276,7 +256,7 @@ index ab4c1b44..0d80003c 100644 const struct ieee80211_tx_queue_params *params) { struct mt76_vif *mvif = (struct mt76_vif *)vif->drv_priv; -@@ -556,7 +555,7 @@ static void mt7615_configure_filter(struct ieee80211_hw *hw, +@@ -556,7 +555,7 @@ static void mt7615_configure_filter(stru static void mt7615_bss_info_changed(struct ieee80211_hw *hw, struct ieee80211_vif *vif, struct ieee80211_bss_conf *info, @@ -285,7 +265,7 @@ index ab4c1b44..0d80003c 100644 { struct mt7615_dev *dev = mt7615_hw_dev(hw); struct mt7615_phy *phy = mt7615_hw_phy(hw); -@@ -599,7 +598,7 @@ static void mt7615_bss_info_changed(struct ieee80211_hw *hw, +@@ -599,7 +598,7 @@ static void mt7615_bss_info_changed(stru } if (changed & BSS_CHANGED_ASSOC) @@ -294,8 +274,6 @@ index ab4c1b44..0d80003c 100644 mt7615_mutex_release(dev); } -diff --git a/mt7615/mcu.c b/mt7615/mcu.c -index 83f30305..81579a14 100644 --- a/mt7615/mcu.c +++ b/mt7615/mcu.c @@ -352,7 +352,7 @@ out: @@ -307,7 +285,7 @@ index 83f30305..81579a14 100644 ieee80211_csa_finish(vif); } -@@ -698,7 +698,7 @@ mt7615_mcu_add_beacon_offload(struct mt7615_dev *dev, +@@ -698,7 +698,7 @@ mt7615_mcu_add_beacon_offload(struct mt7 if (!enable) goto out; @@ -316,7 +294,7 @@ index 83f30305..81579a14 100644 if (!skb) return -EINVAL; -@@ -1073,7 +1073,7 @@ mt7615_mcu_uni_add_beacon_offload(struct mt7615_dev *dev, +@@ -1073,7 +1073,7 @@ mt7615_mcu_uni_add_beacon_offload(struct if (!enable) goto out; @@ -325,7 +303,7 @@ index 83f30305..81579a14 100644 if (!skb) return -EINVAL; -@@ -2525,7 +2525,7 @@ int mt7615_mcu_set_bss_pm(struct mt7615_dev *dev, struct ieee80211_vif *vif, +@@ -2525,7 +2525,7 @@ int mt7615_mcu_set_bss_pm(struct mt7615_ u8 pad; } req = { .bss_idx = mvif->mt76.idx, @@ -334,11 +312,9 @@ index 83f30305..81579a14 100644 .dtim_period = vif->bss_conf.dtim_period, .bcn_interval = cpu_to_le16(vif->bss_conf.beacon_int), }; -diff --git a/mt7615/soc.c b/mt7615/soc.c -index f13d1b41..be9a69fe 100644 --- a/mt7615/soc.c +++ b/mt7615/soc.c -@@ -31,6 +31,7 @@ int mt7622_wmac_init(struct mt7615_dev *dev) +@@ -31,6 +31,7 @@ int mt7622_wmac_init(struct mt7615_dev * static int mt7622_wmac_probe(struct platform_device *pdev) { @@ -346,7 +322,7 @@ index f13d1b41..be9a69fe 100644 void __iomem *mem_base; int irq; -@@ -38,7 +39,7 @@ static int mt7622_wmac_probe(struct platform_device *pdev) +@@ -38,7 +39,7 @@ static int mt7622_wmac_probe(struct plat if (irq < 0) return irq; @@ -355,11 +331,9 @@ index f13d1b41..be9a69fe 100644 if (IS_ERR(mem_base)) return PTR_ERR(mem_base); -diff --git a/mt76_connac_mcu.c b/mt76_connac_mcu.c -index 5a047e63..b6ad54fe 100644 --- a/mt76_connac_mcu.c +++ b/mt76_connac_mcu.c -@@ -196,7 +196,7 @@ int mt76_connac_mcu_set_vif_ps(struct mt76_dev *dev, struct ieee80211_vif *vif) +@@ -196,7 +196,7 @@ int mt76_connac_mcu_set_vif_ps(struct mt */ } req = { .bss_idx = mvif->idx, @@ -368,7 +342,7 @@ index 5a047e63..b6ad54fe 100644 }; if (vif->type != NL80211_IFTYPE_STATION) -@@ -407,7 +407,7 @@ void mt76_connac_mcu_sta_basic_tlv(struct sk_buff *skb, +@@ -407,7 +407,7 @@ void mt76_connac_mcu_sta_basic_tlv(struc else conn_type = CONNECTION_INFRA_AP; basic->conn_type = cpu_to_le32(conn_type); @@ -377,7 +351,7 @@ index 5a047e63..b6ad54fe 100644 break; case NL80211_IFTYPE_ADHOC: basic->conn_type = cpu_to_le32(CONNECTION_IBSS_ADHOC); -@@ -551,7 +551,7 @@ void mt76_connac_mcu_wtbl_generic_tlv(struct mt76_dev *dev, +@@ -551,7 +551,7 @@ void mt76_connac_mcu_wtbl_generic_tlv(st if (sta) { if (vif->type == NL80211_IFTYPE_STATION) @@ -386,7 +360,7 @@ index 5a047e63..b6ad54fe 100644 else generic->partial_aid = cpu_to_le16(sta->aid); memcpy(generic->peer_addr, sta->addr, ETH_ALEN); -@@ -597,14 +597,14 @@ mt76_connac_mcu_sta_amsdu_tlv(struct sk_buff *skb, struct ieee80211_sta *sta, +@@ -597,14 +597,14 @@ mt76_connac_mcu_sta_amsdu_tlv(struct sk_ vif->type != NL80211_IFTYPE_STATION) return; @@ -403,7 +377,7 @@ index 5a047e63..b6ad54fe 100644 IEEE80211_MAX_MPDU_LEN_VHT_7991; wcid->amsdu = true; -@@ -615,7 +615,7 @@ mt76_connac_mcu_sta_amsdu_tlv(struct sk_buff *skb, struct ieee80211_sta *sta, +@@ -615,7 +615,7 @@ mt76_connac_mcu_sta_amsdu_tlv(struct sk_ static void mt76_connac_mcu_sta_he_tlv(struct sk_buff *skb, struct ieee80211_sta *sta) { @@ -412,7 +386,7 @@ index 5a047e63..b6ad54fe 100644 struct ieee80211_he_cap_elem *elem = &he_cap->he_cap_elem; struct sta_rec_he *he; struct tlv *tlv; -@@ -703,7 +703,7 @@ mt76_connac_mcu_sta_he_tlv(struct sk_buff *skb, struct ieee80211_sta *sta) +@@ -703,7 +703,7 @@ mt76_connac_mcu_sta_he_tlv(struct sk_buf he->he_cap = cpu_to_le32(cap); @@ -421,7 +395,7 @@ index 5a047e63..b6ad54fe 100644 case IEEE80211_STA_RX_BW_160: if (elem->phy_cap_info[0] & IEEE80211_HE_PHY_CAP0_CHANNEL_WIDTH_SET_80PLUS80_MHZ_IN_5G) -@@ -788,9 +788,9 @@ mt76_connac_get_phy_mode_v2(struct mt76_phy *mphy, struct ieee80211_vif *vif, +@@ -788,9 +788,9 @@ mt76_connac_get_phy_mode_v2(struct mt76_ u8 mode = 0; if (sta) { @@ -434,7 +408,7 @@ index 5a047e63..b6ad54fe 100644 } else { struct ieee80211_supported_band *sband; -@@ -839,25 +839,25 @@ void mt76_connac_mcu_sta_tlv(struct mt76_phy *mphy, struct sk_buff *skb, +@@ -839,25 +839,25 @@ void mt76_connac_mcu_sta_tlv(struct mt76 u16 supp_rates; /* starec ht */ @@ -466,7 +440,7 @@ index 5a047e63..b6ad54fe 100644 } /* starec uapsd */ -@@ -866,11 +866,11 @@ void mt76_connac_mcu_sta_tlv(struct mt76_phy *mphy, struct sk_buff *skb, +@@ -866,11 +866,11 @@ void mt76_connac_mcu_sta_tlv(struct mt76 if (!is_mt7921(dev)) return; @@ -480,7 +454,7 @@ index 5a047e63..b6ad54fe 100644 mt76_connac_mcu_sta_he_tlv(skb, sta); mt76_connac_mcu_sta_he_tlv_v2(skb, sta); if (band == NL80211_BAND_6GHZ && -@@ -880,7 +880,7 @@ void mt76_connac_mcu_sta_tlv(struct mt76_phy *mphy, struct sk_buff *skb, +@@ -880,7 +880,7 @@ void mt76_connac_mcu_sta_tlv(struct mt76 tlv = mt76_connac_mcu_add_tlv(skb, STA_REC_HE_6G, sizeof(*he_6g_capa)); he_6g_capa = (struct sta_rec_he_6g_capa *)tlv; @@ -489,7 +463,7 @@ index 5a047e63..b6ad54fe 100644 } } -@@ -890,14 +890,14 @@ void mt76_connac_mcu_sta_tlv(struct mt76_phy *mphy, struct sk_buff *skb, +@@ -890,14 +890,14 @@ void mt76_connac_mcu_sta_tlv(struct mt76 phy->basic_rate = cpu_to_le16((u16)vif->bss_conf.basic_rates); phy->rcpi = rcpi; phy->ampdu = FIELD_PREP(IEEE80211_HT_AMPDU_PARM_FACTOR, @@ -507,7 +481,7 @@ index 5a047e63..b6ad54fe 100644 if (band == NL80211_BAND_2GHZ) supp_rates = FIELD_PREP(RA_LEGACY_OFDM, supp_rates >> 4) | FIELD_PREP(RA_LEGACY_CCK, supp_rates & 0xf); -@@ -906,18 +906,17 @@ void mt76_connac_mcu_sta_tlv(struct mt76_phy *mphy, struct sk_buff *skb, +@@ -906,18 +906,17 @@ void mt76_connac_mcu_sta_tlv(struct mt76 ra_info->legacy = cpu_to_le16(supp_rates); @@ -531,7 +505,7 @@ index 5a047e63..b6ad54fe 100644 IEEE80211_OPMODE_NOTIF_RX_NSS_SHIFT; } } -@@ -933,7 +932,7 @@ void mt76_connac_mcu_wtbl_smps_tlv(struct sk_buff *skb, +@@ -933,7 +932,7 @@ void mt76_connac_mcu_wtbl_smps_tlv(struc tlv = mt76_connac_mcu_add_nested_tlv(skb, WTBL_SMPS, sizeof(*smps), wtbl_tlv, sta_wtbl); smps = (struct wtbl_smps *)tlv; @@ -540,7 +514,7 @@ index 5a047e63..b6ad54fe 100644 } EXPORT_SYMBOL_GPL(mt76_connac_mcu_wtbl_smps_tlv); -@@ -945,27 +944,27 @@ void mt76_connac_mcu_wtbl_ht_tlv(struct mt76_dev *dev, struct sk_buff *skb, +@@ -945,27 +944,27 @@ void mt76_connac_mcu_wtbl_ht_tlv(struct struct tlv *tlv; u32 flags = 0; @@ -576,7 +550,7 @@ index 5a047e63..b6ad54fe 100644 struct wtbl_vht *vht; u8 af; -@@ -974,18 +973,18 @@ void mt76_connac_mcu_wtbl_ht_tlv(struct mt76_dev *dev, struct sk_buff *skb, +@@ -974,18 +973,18 @@ void mt76_connac_mcu_wtbl_ht_tlv(struct sta_wtbl); vht = (struct wtbl_vht *)tlv; vht->ldpc = vht_ldpc && @@ -598,7 +572,7 @@ index 5a047e63..b6ad54fe 100644 /* sgi */ u32 msk = MT_WTBL_W5_SHORT_GI_20 | MT_WTBL_W5_SHORT_GI_40 | MT_WTBL_W5_SHORT_GI_80 | MT_WTBL_W5_SHORT_GI_160; -@@ -995,15 +994,15 @@ void mt76_connac_mcu_wtbl_ht_tlv(struct mt76_dev *dev, struct sk_buff *skb, +@@ -995,15 +994,15 @@ void mt76_connac_mcu_wtbl_ht_tlv(struct sizeof(*raw), wtbl_tlv, sta_wtbl); @@ -619,7 +593,7 @@ index 5a047e63..b6ad54fe 100644 flags |= MT_WTBL_W5_SHORT_GI_160; } raw = (struct wtbl_raw *)tlv; -@@ -1289,9 +1288,9 @@ u8 mt76_connac_get_phy_mode(struct mt76_phy *phy, struct ieee80211_vif *vif, +@@ -1289,9 +1288,9 @@ u8 mt76_connac_get_phy_mode(struct mt76_ return 0x38; if (sta) { @@ -632,7 +606,7 @@ index 5a047e63..b6ad54fe 100644 } else { struct ieee80211_supported_band *sband; -@@ -2231,10 +2230,8 @@ int mt76_connac_mcu_update_arp_filter(struct mt76_dev *dev, +@@ -2231,10 +2230,8 @@ int mt76_connac_mcu_update_arp_filter(st struct mt76_vif *vif, struct ieee80211_bss_conf *info) { @@ -644,7 +618,7 @@ index 5a047e63..b6ad54fe 100644 IEEE80211_BSS_ARP_ADDR_LIST_LEN); struct { struct { -@@ -2262,7 +2259,7 @@ int mt76_connac_mcu_update_arp_filter(struct mt76_dev *dev, +@@ -2262,7 +2259,7 @@ int mt76_connac_mcu_update_arp_filter(st skb_put_data(skb, &req_hdr, sizeof(req_hdr)); for (i = 0; i < len; i++) @@ -653,11 +627,9 @@ index 5a047e63..b6ad54fe 100644 return mt76_mcu_skb_send_msg(dev, skb, MCU_UNI_CMD(OFFLOAD), true); } -diff --git a/mt76x02.h b/mt76x02.h -index 4cd63bac..3f2a9b7f 100644 --- a/mt76x02.h +++ b/mt76x02.h -@@ -170,8 +170,7 @@ int mt76x02_set_key(struct ieee80211_hw *hw, enum set_key_cmd cmd, +@@ -170,8 +170,7 @@ int mt76x02_set_key(struct ieee80211_hw struct ieee80211_vif *vif, struct ieee80211_sta *sta, struct ieee80211_key_conf *key); int mt76x02_conf_tx(struct ieee80211_hw *hw, struct ieee80211_vif *vif, @@ -667,7 +639,7 @@ index 4cd63bac..3f2a9b7f 100644 void mt76x02_sta_rate_tbl_update(struct ieee80211_hw *hw, struct ieee80211_vif *vif, struct ieee80211_sta *sta); -@@ -202,7 +201,7 @@ void mt76x02_sw_scan_complete(struct ieee80211_hw *hw, +@@ -202,7 +201,7 @@ void mt76x02_sw_scan_complete(struct iee void mt76x02_sta_ps(struct mt76_dev *dev, struct ieee80211_sta *sta, bool ps); void mt76x02_bss_info_changed(struct ieee80211_hw *hw, struct ieee80211_vif *vif, @@ -676,11 +648,9 @@ index 4cd63bac..3f2a9b7f 100644 void mt76x02_reconfig_complete(struct ieee80211_hw *hw, enum ieee80211_reconfig_type reconfig_type); -diff --git a/mt76x02_beacon.c b/mt76x02_beacon.c -index ad4dc8e1..67844e2e 100644 --- a/mt76x02_beacon.c +++ b/mt76x02_beacon.c -@@ -143,7 +143,7 @@ mt76x02_update_beacon_iter(void *priv, u8 *mac, struct ieee80211_vif *vif) +@@ -143,7 +143,7 @@ mt76x02_update_beacon_iter(void *priv, u if (!(dev->mt76.beacon_mask & BIT(mvif->idx))) return; @@ -689,11 +659,9 @@ index ad4dc8e1..67844e2e 100644 if (!skb) return; -diff --git a/mt76x02_mac.c b/mt76x02_mac.c -index d3f74473..87ea3db1 100644 --- a/mt76x02_mac.c +++ b/mt76x02_mac.c -@@ -404,7 +404,7 @@ void mt76x02_mac_write_txwi(struct mt76x02_dev *dev, struct mt76x02_txwi *txwi, +@@ -404,7 +404,7 @@ void mt76x02_mac_write_txwi(struct mt76x txwi->rate |= cpu_to_le16(MT_RXWI_RATE_LDPC); if ((info->flags & IEEE80211_TX_CTL_STBC) && nss == 1) txwi->rate |= cpu_to_le16(MT_RXWI_RATE_STBC); @@ -702,7 +670,7 @@ index d3f74473..87ea3db1 100644 txwi_flags |= MT_TXWI_FLAGS_MMPS; if (!(info->flags & IEEE80211_TX_CTL_NO_ACK)) txwi->ack_ctl |= MT_TXWI_ACK_CTL_REQ; -@@ -412,9 +412,9 @@ void mt76x02_mac_write_txwi(struct mt76x02_dev *dev, struct mt76x02_txwi *txwi, +@@ -412,9 +412,9 @@ void mt76x02_mac_write_txwi(struct mt76x txwi->ack_ctl |= MT_TXWI_ACK_CTL_NSEQ; if ((info->flags & IEEE80211_TX_CTL_AMPDU) && sta) { u8 ba_size = IEEE80211_MIN_AMPDU_BUF; @@ -714,11 +682,9 @@ index d3f74473..87ea3db1 100644 ba_size = min_t(int, 63, ba_size - 1); if (info->flags & IEEE80211_TX_CTL_RATE_CTRL_PROBE) ba_size = 0; -diff --git a/mt76x02_mmio.c b/mt76x02_mmio.c -index e9c5e85e..648f4ab9 100644 --- a/mt76x02_mmio.c +++ b/mt76x02_mmio.c -@@ -231,8 +231,8 @@ int mt76x02_dma_init(struct mt76x02_dev *dev) +@@ -231,8 +231,8 @@ int mt76x02_dma_init(struct mt76x02_dev if (ret) return ret; @@ -729,11 +695,9 @@ index e9c5e85e..648f4ab9 100644 napi_enable(&dev->mt76.tx_napi); return 0; -diff --git a/mt76x02_util.c b/mt76x02_util.c -index 7451a632..f9315c7e 100644 --- a/mt76x02_util.c +++ b/mt76x02_util.c -@@ -486,8 +486,7 @@ int mt76x02_set_key(struct ieee80211_hw *hw, enum set_key_cmd cmd, +@@ -486,8 +486,7 @@ int mt76x02_set_key(struct ieee80211_hw EXPORT_SYMBOL_GPL(mt76x02_set_key); int mt76x02_conf_tx(struct ieee80211_hw *hw, struct ieee80211_vif *vif, @@ -752,11 +716,9 @@ index 7451a632..f9315c7e 100644 { struct mt76x02_vif *mvif = (struct mt76x02_vif *)vif->drv_priv; struct mt76x02_dev *dev = hw->priv; -diff --git a/mt76x2/pci.c b/mt76x2/pci.c -index df85ebc6..8a22ee58 100644 --- a/mt76x2/pci.c +++ b/mt76x2/pci.c -@@ -80,7 +80,7 @@ mt76x2e_probe(struct pci_dev *pdev, const struct pci_device_id *id) +@@ -80,7 +80,7 @@ mt76x2e_probe(struct pci_dev *pdev, cons mt76_rmw_field(dev, 0x15a10, 0x1f << 16, 0x9); /* RG_SSUSB_G1_CDR_BIC_LTR = 0xf */ @@ -765,8 +727,6 @@ index df85ebc6..8a22ee58 100644 /* RG_SSUSB_CDR_BR_PE1D = 0x3 */ mt76_rmw_field(dev, 0x15c58, 0x3 << 6, 0x3); -diff --git a/mt7915/Kconfig b/mt7915/Kconfig -index d710726d..32001254 100644 --- a/mt7915/Kconfig +++ b/mt7915/Kconfig @@ -5,7 +5,6 @@ config MT7915E @@ -777,11 +737,9 @@ index d710726d..32001254 100644 help This adds support for MT7915-based wireless PCIe devices, which support concurrent dual-band operation at both 5GHz -diff --git a/mt7915/debugfs.c b/mt7915/debugfs.c -index 5a46813a..6cb7c16b 100644 --- a/mt7915/debugfs.c +++ b/mt7915/debugfs.c -@@ -1364,8 +1364,8 @@ static ssize_t mt7915_sta_fixed_rate_set(struct file *file, +@@ -1364,8 +1364,8 @@ static ssize_t mt7915_sta_fixed_rate_set phy.ldpc = (phy.bw || phy.ldpc) * GENMASK(2, 0); for (i = 0; i <= phy.bw; i++) { @@ -792,11 +750,9 @@ index 5a46813a..6cb7c16b 100644 } field = RATE_PARAM_FIXED; -diff --git a/mt7915/dma.c b/mt7915/dma.c -index e3fa0649..0ca68d4a 100644 --- a/mt7915/dma.c +++ b/mt7915/dma.c -@@ -550,8 +550,8 @@ int mt7915_dma_init(struct mt7915_dev *dev, struct mt7915_phy *phy2) +@@ -550,8 +550,8 @@ int mt7915_dma_init(struct mt7915_dev *d if (ret < 0) return ret; @@ -807,11 +763,9 @@ index e3fa0649..0ca68d4a 100644 napi_enable(&dev->mt76.tx_napi); mt7915_dma_enable(dev); -diff --git a/mt7915/init.c b/mt7915/init.c -index 6fd5c63e..0a640c7f 100644 --- a/mt7915/init.c +++ b/mt7915/init.c -@@ -1093,8 +1093,7 @@ mt7915_init_he_caps(struct mt7915_phy *phy, enum nl80211_band band, +@@ -1093,8 +1093,7 @@ mt7915_init_he_caps(struct mt7915_phy *p mt7915_gen_ppe_thresh(he_cap->ppe_thres, nss); } else { he_cap_elem->phy_cap_info[9] |= @@ -821,11 +775,9 @@ index 6fd5c63e..0a640c7f 100644 } if (band == NL80211_BAND_6GHZ) { -diff --git a/mt7915/mac.c b/mt7915/mac.c -index f0d5a360..b477e9d9 100644 --- a/mt7915/mac.c +++ b/mt7915/mac.c -@@ -853,7 +853,7 @@ mt7915_tx_check_aggr(struct ieee80211_sta *sta, __le32 *txwi) +@@ -853,7 +853,7 @@ mt7915_tx_check_aggr(struct ieee80211_st u16 fc, tid; u32 val; @@ -834,11 +786,9 @@ index f0d5a360..b477e9d9 100644 return; tid = le32_get_bits(txwi[1], MT_TXD1_TID); -diff --git a/mt7915/main.c b/mt7915/main.c -index 0511d6a5..076688d8 100644 --- a/mt7915/main.c +++ b/mt7915/main.c -@@ -490,8 +490,7 @@ static int mt7915_config(struct ieee80211_hw *hw, u32 changed) +@@ -490,8 +490,7 @@ static int mt7915_config(struct ieee8021 } static int @@ -848,7 +798,7 @@ index 0511d6a5..076688d8 100644 const struct ieee80211_tx_queue_params *params) { struct mt7915_vif *mvif = (struct mt7915_vif *)vif->drv_priv; -@@ -586,7 +585,7 @@ mt7915_update_bss_color(struct ieee80211_hw *hw, +@@ -586,7 +585,7 @@ mt7915_update_bss_color(struct ieee80211 static void mt7915_bss_info_changed(struct ieee80211_hw *hw, struct ieee80211_vif *vif, struct ieee80211_bss_conf *info, @@ -857,7 +807,7 @@ index 0511d6a5..076688d8 100644 { struct mt7915_phy *phy = mt7915_hw_phy(hw); struct mt7915_dev *dev = mt7915_hw_dev(hw); -@@ -606,7 +605,7 @@ static void mt7915_bss_info_changed(struct ieee80211_hw *hw, +@@ -606,7 +605,7 @@ static void mt7915_bss_info_changed(stru } if (changed & BSS_CHANGED_ASSOC) @@ -866,7 +816,7 @@ index 0511d6a5..076688d8 100644 if (changed & BSS_CHANGED_ERP_CTS_PROT) mt7915_mac_enable_rtscts(dev, vif, info->use_cts_prot); -@@ -1146,10 +1145,10 @@ static int mt7915_sta_set_txpwr(struct ieee80211_hw *hw, +@@ -1146,10 +1145,10 @@ static int mt7915_sta_set_txpwr(struct i { struct mt7915_phy *phy = mt7915_hw_phy(hw); struct mt7915_dev *dev = mt7915_hw_dev(hw); @@ -879,11 +829,9 @@ index 0511d6a5..076688d8 100644 txpower = 0; mutex_lock(&dev->mt76.mutex); -diff --git a/mt7915/mcu.c b/mt7915/mcu.c -index 35441dcb..e29fd0b7 100644 --- a/mt7915/mcu.c +++ b/mt7915/mcu.c -@@ -59,7 +59,7 @@ mt7915_mcu_set_sta_he_mcs(struct ieee80211_sta *sta, __le16 *he_mcs, +@@ -59,7 +59,7 @@ mt7915_mcu_set_sta_he_mcs(struct ieee802 struct mt7915_dev *dev = msta->vif->phy->dev; enum nl80211_band band = msta->vif->phy->mt76->chandef.chan->band; const u16 *mask = msta->vif->bitrate_mask.control[band].he_mcs; @@ -892,7 +840,7 @@ index 35441dcb..e29fd0b7 100644 for (nss = 0; nss < max_nss; nss++) { int mcs; -@@ -99,7 +99,7 @@ mt7915_mcu_set_sta_he_mcs(struct ieee80211_sta *sta, __le16 *he_mcs, +@@ -99,7 +99,7 @@ mt7915_mcu_set_sta_he_mcs(struct ieee802 /* only support 2ss on 160MHz for mt7915 */ if (is_mt7915(&dev->mt76) && nss > 1 && @@ -901,7 +849,7 @@ index 35441dcb..e29fd0b7 100644 break; } -@@ -112,8 +112,8 @@ mt7915_mcu_set_sta_vht_mcs(struct ieee80211_sta *sta, __le16 *vht_mcs, +@@ -112,8 +112,8 @@ mt7915_mcu_set_sta_vht_mcs(struct ieee80 { struct mt7915_sta *msta = (struct mt7915_sta *)sta->drv_priv; struct mt7915_dev *dev = msta->vif->phy->dev; @@ -912,7 +860,7 @@ index 35441dcb..e29fd0b7 100644 u16 mcs; for (nss = 0; nss < max_nss; nss++, mcs_map >>= 2) { -@@ -135,7 +135,7 @@ mt7915_mcu_set_sta_vht_mcs(struct ieee80211_sta *sta, __le16 *vht_mcs, +@@ -135,7 +135,7 @@ mt7915_mcu_set_sta_vht_mcs(struct ieee80 /* only support 2ss on 160MHz for mt7915 */ if (is_mt7915(&dev->mt76) && nss > 1 && @@ -934,7 +882,7 @@ index 35441dcb..e29fd0b7 100644 } static int -@@ -220,7 +220,7 @@ int mt7915_mcu_wa_cmd(struct mt7915_dev *dev, int cmd, u32 a1, u32 a2, u32 a3) +@@ -220,7 +220,7 @@ int mt7915_mcu_wa_cmd(struct mt7915_dev static void mt7915_mcu_csa_finish(void *priv, u8 *mac, struct ieee80211_vif *vif) { @@ -943,7 +891,7 @@ index 35441dcb..e29fd0b7 100644 ieee80211_csa_finish(vif); } -@@ -321,7 +321,7 @@ mt7915_mcu_rx_log_message(struct mt7915_dev *dev, struct sk_buff *skb) +@@ -321,7 +321,7 @@ mt7915_mcu_rx_log_message(struct mt7915_ static void mt7915_mcu_cca_finish(void *priv, u8 *mac, struct ieee80211_vif *vif) { @@ -952,7 +900,7 @@ index 35441dcb..e29fd0b7 100644 return; ieee80211_color_change_finish(vif); -@@ -707,13 +707,13 @@ mt7915_mcu_sta_he_tlv(struct sk_buff *skb, struct ieee80211_sta *sta, +@@ -707,13 +707,13 @@ mt7915_mcu_sta_he_tlv(struct sk_buff *sk struct ieee80211_vif *vif) { struct mt7915_vif *mvif = (struct mt7915_vif *)vif->drv_priv; @@ -968,7 +916,7 @@ index 35441dcb..e29fd0b7 100644 return; tlv = mt76_connac_mcu_add_tlv(skb, STA_REC_HE, sizeof(*he)); -@@ -799,8 +799,8 @@ mt7915_mcu_sta_he_tlv(struct sk_buff *skb, struct ieee80211_sta *sta, +@@ -799,8 +799,8 @@ mt7915_mcu_sta_he_tlv(struct sk_buff *sk he->he_cap = cpu_to_le32(cap); @@ -979,7 +927,7 @@ index 35441dcb..e29fd0b7 100644 case IEEE80211_STA_RX_BW_160: if (elem->phy_cap_info[0] & IEEE80211_HE_PHY_CAP0_CHANNEL_WIDTH_SET_80PLUS80_MHZ_IN_5G) -@@ -850,7 +850,7 @@ mt7915_mcu_sta_muru_tlv(struct mt7915_dev *dev, struct sk_buff *skb, +@@ -850,7 +850,7 @@ mt7915_mcu_sta_muru_tlv(struct mt7915_de struct ieee80211_sta *sta, struct ieee80211_vif *vif) { struct mt7915_vif *mvif = (struct mt7915_vif *)vif->drv_priv; @@ -988,7 +936,7 @@ index 35441dcb..e29fd0b7 100644 struct sta_rec_muru *muru; struct tlv *tlv; -@@ -869,11 +869,11 @@ mt7915_mcu_sta_muru_tlv(struct mt7915_dev *dev, struct sk_buff *skb, +@@ -869,11 +869,11 @@ mt7915_mcu_sta_muru_tlv(struct mt7915_de muru->cfg.mimo_ul_en = true; muru->cfg.ofdma_dl_en = true; @@ -1003,7 +951,7 @@ index 35441dcb..e29fd0b7 100644 return; muru->mimo_dl.partial_bw_dl_mimo = -@@ -907,13 +907,13 @@ mt7915_mcu_sta_ht_tlv(struct sk_buff *skb, struct ieee80211_sta *sta) +@@ -907,13 +907,13 @@ mt7915_mcu_sta_ht_tlv(struct sk_buff *sk struct sta_rec_ht *ht; struct tlv *tlv; @@ -1019,7 +967,7 @@ index 35441dcb..e29fd0b7 100644 } static void -@@ -922,15 +922,15 @@ mt7915_mcu_sta_vht_tlv(struct sk_buff *skb, struct ieee80211_sta *sta) +@@ -922,15 +922,15 @@ mt7915_mcu_sta_vht_tlv(struct sk_buff *s struct sta_rec_vht *vht; struct tlv *tlv; @@ -1039,7 +987,7 @@ index 35441dcb..e29fd0b7 100644 } static void -@@ -945,7 +945,7 @@ mt7915_mcu_sta_amsdu_tlv(struct mt7915_dev *dev, struct sk_buff *skb, +@@ -945,7 +945,7 @@ mt7915_mcu_sta_amsdu_tlv(struct mt7915_d vif->type != NL80211_IFTYPE_AP) return; @@ -1048,7 +996,7 @@ index 35441dcb..e29fd0b7 100644 return; tlv = mt76_connac_mcu_add_tlv(skb, STA_REC_HW_AMSDU, sizeof(*amsdu)); -@@ -954,7 +954,7 @@ mt7915_mcu_sta_amsdu_tlv(struct mt7915_dev *dev, struct sk_buff *skb, +@@ -954,7 +954,7 @@ mt7915_mcu_sta_amsdu_tlv(struct mt7915_d amsdu->amsdu_en = true; msta->wcid.amsdu = true; @@ -1057,7 +1005,7 @@ index 35441dcb..e29fd0b7 100644 case IEEE80211_MAX_MPDU_LEN_VHT_11454: if (!is_mt7915(&dev->mt76)) { amsdu->max_mpdu_size = -@@ -1017,8 +1017,8 @@ mt7915_is_ebf_supported(struct mt7915_phy *phy, struct ieee80211_vif *vif, +@@ -1017,8 +1017,8 @@ mt7915_is_ebf_supported(struct mt7915_ph if (!bfee && tx_ant < 2) return false; @@ -1068,7 +1016,7 @@ index 35441dcb..e29fd0b7 100644 if (bfee) return mvif->cap.he_su_ebfee && -@@ -1028,8 +1028,8 @@ mt7915_is_ebf_supported(struct mt7915_phy *phy, struct ieee80211_vif *vif, +@@ -1028,8 +1028,8 @@ mt7915_is_ebf_supported(struct mt7915_ph HE_PHY(CAP4_SU_BEAMFORMEE, pe->phy_cap_info[4]); } @@ -1097,7 +1045,7 @@ index 35441dcb..e29fd0b7 100644 struct ieee80211_sta_vht_cap *vc = &phy->mt76->sband_5g.sband.vht_cap; u16 mcs_map = le16_to_cpu(pc->vht_mcs.rx_mcs_map); u8 nss_mcs = mt7915_mcu_get_sta_nss(mcs_map); -@@ -1101,14 +1101,14 @@ mt7915_mcu_sta_bfer_vht(struct ieee80211_sta *sta, struct mt7915_phy *phy, +@@ -1101,14 +1101,14 @@ mt7915_mcu_sta_bfer_vht(struct ieee80211 bf->ncol = min_t(u8, nss_mcs, bf->nrow); bf->ibf_ncol = bf->ncol; @@ -1123,7 +1071,7 @@ index 35441dcb..e29fd0b7 100644 struct ieee80211_he_cap_elem *pe = &pc->he_cap_elem; const struct ieee80211_sta_he_cap *vc = mt76_connac_get_he_phy_cap(phy->mt76, vif); -@@ -1142,7 +1142,7 @@ mt7915_mcu_sta_bfer_he(struct ieee80211_sta *sta, struct ieee80211_vif *vif, +@@ -1142,7 +1142,7 @@ mt7915_mcu_sta_bfer_he(struct ieee80211_ bf->ncol = min_t(u8, nss_mcs, bf->nrow); bf->ibf_ncol = bf->ncol; @@ -1132,7 +1080,7 @@ index 35441dcb..e29fd0b7 100644 return; /* go over for 160MHz and 80p80 */ -@@ -1190,7 +1190,7 @@ mt7915_mcu_sta_bfer_tlv(struct mt7915_dev *dev, struct sk_buff *skb, +@@ -1190,7 +1190,7 @@ mt7915_mcu_sta_bfer_tlv(struct mt7915_de }; bool ebf; @@ -1141,7 +1089,7 @@ index 35441dcb..e29fd0b7 100644 return; ebf = mt7915_is_ebf_supported(phy, vif, sta, false); -@@ -1204,21 +1204,21 @@ mt7915_mcu_sta_bfer_tlv(struct mt7915_dev *dev, struct sk_buff *skb, +@@ -1204,21 +1204,21 @@ mt7915_mcu_sta_bfer_tlv(struct mt7915_de * vht: support eBF and iBF * ht: iBF only, since mac80211 lacks of eBF support */ @@ -1169,7 +1117,7 @@ index 35441dcb..e29fd0b7 100644 bf->ibf_timeout = 0x48; else bf->ibf_timeout = 0x18; -@@ -1228,7 +1228,7 @@ mt7915_mcu_sta_bfer_tlv(struct mt7915_dev *dev, struct sk_buff *skb, +@@ -1228,7 +1228,7 @@ mt7915_mcu_sta_bfer_tlv(struct mt7915_de else bf->mem_20m = matrix[bf->nrow][bf->ncol]; @@ -1178,7 +1126,7 @@ index 35441dcb..e29fd0b7 100644 case IEEE80211_STA_RX_BW_160: case IEEE80211_STA_RX_BW_80: bf->mem_total = bf->mem_20m * 2; -@@ -1253,7 +1253,7 @@ mt7915_mcu_sta_bfee_tlv(struct mt7915_dev *dev, struct sk_buff *skb, +@@ -1253,7 +1253,7 @@ mt7915_mcu_sta_bfee_tlv(struct mt7915_de struct tlv *tlv; u8 nrow = 0; @@ -1187,7 +1135,7 @@ index 35441dcb..e29fd0b7 100644 return; if (!mt7915_is_ebf_supported(phy, vif, sta, true)) -@@ -1262,13 +1262,13 @@ mt7915_mcu_sta_bfee_tlv(struct mt7915_dev *dev, struct sk_buff *skb, +@@ -1262,13 +1262,13 @@ mt7915_mcu_sta_bfee_tlv(struct mt7915_de tlv = mt76_connac_mcu_add_tlv(skb, STA_REC_BFEE, sizeof(*bfee)); bfee = (struct sta_rec_bfee *)tlv; @@ -1205,7 +1153,7 @@ index 35441dcb..e29fd0b7 100644 nrow = FIELD_GET(IEEE80211_VHT_CAP_SOUNDING_DIMENSIONS_MASK, pc->cap); -@@ -1324,7 +1324,7 @@ int mt7915_mcu_set_fixed_rate_ctrl(struct mt7915_dev *dev, +@@ -1324,7 +1324,7 @@ int mt7915_mcu_set_fixed_rate_ctrl(struc ra->phy = *phy; break; case RATE_PARAM_MMPS_UPDATE: @@ -1214,7 +1162,7 @@ index 35441dcb..e29fd0b7 100644 break; case RATE_PARAM_SPE_UPDATE: ra->spe_idx = *(u8 *)data; -@@ -1399,7 +1399,7 @@ mt7915_mcu_add_rate_ctrl_fixed(struct mt7915_dev *dev, +@@ -1399,7 +1399,7 @@ mt7915_mcu_add_rate_ctrl_fixed(struct mt do { \ u8 i, gi = mask->control[band]._gi; \ gi = (_he) ? gi : gi == NL80211_TXRATE_FORCE_SGI; \ @@ -1223,7 +1171,7 @@ index 35441dcb..e29fd0b7 100644 phy.sgi |= gi << (i << (_he)); \ phy.he_ltf |= mask->control[band].he_ltf << (i << (_he));\ } \ -@@ -1413,11 +1413,11 @@ mt7915_mcu_add_rate_ctrl_fixed(struct mt7915_dev *dev, +@@ -1413,11 +1413,11 @@ mt7915_mcu_add_rate_ctrl_fixed(struct mt } \ } while (0) @@ -1238,7 +1186,7 @@ index 35441dcb..e29fd0b7 100644 __sta_phy_bitrate_mask_check(ht_mcs, gi, 1, 0); } else { nrates = hweight32(mask->control[band].legacy); -@@ -1451,7 +1451,7 @@ mt7915_mcu_add_rate_ctrl_fixed(struct mt7915_dev *dev, +@@ -1451,7 +1451,7 @@ mt7915_mcu_add_rate_ctrl_fixed(struct mt * actual txrate hardware sends out. */ addr = mt7915_mac_wtbl_lmac_addr(dev, msta->wcid.idx, 7); @@ -1247,7 +1195,7 @@ index 35441dcb..e29fd0b7 100644 mt76_rmw_field(dev, addr, GENMASK(31, 24), phy.sgi); else mt76_rmw_field(dev, addr, GENMASK(15, 12), phy.sgi); -@@ -1484,7 +1484,7 @@ mt7915_mcu_sta_rate_ctrl_tlv(struct sk_buff *skb, struct mt7915_dev *dev, +@@ -1484,7 +1484,7 @@ mt7915_mcu_sta_rate_ctrl_tlv(struct sk_b enum nl80211_band band = chandef->chan->band; struct sta_rec_ra *ra; struct tlv *tlv; @@ -1256,7 +1204,7 @@ index 35441dcb..e29fd0b7 100644 u32 cap = sta->wme ? STA_CAP_WMM : 0; tlv = mt76_connac_mcu_add_tlv(skb, STA_REC_RA, sizeof(*ra)); -@@ -1494,9 +1494,9 @@ mt7915_mcu_sta_rate_ctrl_tlv(struct sk_buff *skb, struct mt7915_dev *dev, +@@ -1494,9 +1494,9 @@ mt7915_mcu_sta_rate_ctrl_tlv(struct sk_b ra->auto_rate = true; ra->phy_mode = mt76_connac_get_phy_mode(mphy, vif, band, sta); ra->channel = chandef->chan->hw_value; @@ -1269,7 +1217,7 @@ index 35441dcb..e29fd0b7 100644 if (supp_rate) { supp_rate &= mask->control[band].legacy; -@@ -1516,22 +1516,22 @@ mt7915_mcu_sta_rate_ctrl_tlv(struct sk_buff *skb, struct mt7915_dev *dev, +@@ -1516,22 +1516,22 @@ mt7915_mcu_sta_rate_ctrl_tlv(struct sk_b } } @@ -1300,7 +1248,7 @@ index 35441dcb..e29fd0b7 100644 cap |= STA_CAP_LDPC; mt7915_mcu_set_sta_ht_mcs(sta, ra->ht_mcs, -@@ -1539,37 +1539,37 @@ mt7915_mcu_sta_rate_ctrl_tlv(struct sk_buff *skb, struct mt7915_dev *dev, +@@ -1539,37 +1539,37 @@ mt7915_mcu_sta_rate_ctrl_tlv(struct sk_b ra->supp_ht_mcs = *(__le32 *)ra->ht_mcs; } @@ -1348,7 +1296,7 @@ index 35441dcb..e29fd0b7 100644 IEEE80211_HE_6GHZ_CAP_MAX_AMPDU_LEN_EXP); } -@@ -1778,7 +1778,7 @@ mt7915_mcu_beacon_cntdwn(struct ieee80211_vif *vif, struct sk_buff *rskb, +@@ -1778,7 +1778,7 @@ mt7915_mcu_beacon_cntdwn(struct ieee8021 if (!offs->cntdwn_counter_offs[0]) return; @@ -1357,7 +1305,7 @@ index 35441dcb..e29fd0b7 100644 tlv = mt7915_mcu_add_nested_subtlv(rskb, sub_tag, sizeof(*info), &bcn->sub_ntlv, &bcn->len); info = (struct bss_info_bcn_cntdwn *)tlv; -@@ -1863,9 +1863,9 @@ mt7915_mcu_beacon_cont(struct mt7915_dev *dev, struct ieee80211_vif *vif, +@@ -1863,9 +1863,9 @@ mt7915_mcu_beacon_cont(struct mt7915_dev if (offs->cntdwn_counter_offs[0]) { u16 offset = offs->cntdwn_counter_offs[0]; @@ -1369,7 +1317,7 @@ index 35441dcb..e29fd0b7 100644 cont->bcc_ofs = cpu_to_le16(offset - 3); } -@@ -2050,7 +2050,7 @@ int mt7915_mcu_add_beacon(struct ieee80211_hw *hw, struct ieee80211_vif *vif, +@@ -2050,7 +2050,7 @@ int mt7915_mcu_add_beacon(struct ieee802 if (!en) goto out; @@ -1378,7 +1326,7 @@ index 35441dcb..e29fd0b7 100644 if (!skb) return -EINVAL; -@@ -3181,17 +3181,17 @@ int mt7915_mcu_set_txpower_frame(struct mt7915_phy *phy, +@@ -3181,17 +3181,17 @@ int mt7915_mcu_set_txpower_frame(struct if (txpower) { u32 offs, len, i; @@ -1399,8 +1347,6 @@ index 35441dcb..e29fd0b7 100644 offs += len + sku_len[SKU_HE_RU26] * 3; len = sku_len[SKU_HE_RU242] * 4; } -diff --git a/mt7915/soc.c b/mt7915/soc.c -index 686c9bbd..777077cd 100644 --- a/mt7915/soc.c +++ b/mt7915/soc.c @@ -4,7 +4,6 @@ @@ -1411,11 +1357,9 @@ index 686c9bbd..777077cd 100644 #include #include #include -diff --git a/mt7921/dma.c b/mt7921/dma.c -index d1f10f6d..6456c9a6 100644 --- a/mt7921/dma.c +++ b/mt7921/dma.c -@@ -283,8 +283,8 @@ int mt7921_dma_init(struct mt7921_dev *dev) +@@ -283,8 +283,8 @@ int mt7921_dma_init(struct mt7921_dev *d if (ret < 0) return ret; @@ -1426,11 +1370,9 @@ index d1f10f6d..6456c9a6 100644 napi_enable(&dev->mt76.tx_napi); return mt7921_dma_enable(dev); -diff --git a/mt7921/init.c b/mt7921/init.c -index d4b681d7..9bf5d9f0 100644 --- a/mt7921/init.c +++ b/mt7921/init.c -@@ -76,8 +76,8 @@ mt7921_init_wiphy(struct ieee80211_hw *hw) +@@ -76,8 +76,8 @@ mt7921_init_wiphy(struct ieee80211_hw *h struct wiphy *wiphy = hw->wiphy; hw->queues = 4; @@ -1441,11 +1383,9 @@ index d4b681d7..9bf5d9f0 100644 hw->netdev_features = NETIF_F_RXCSUM; hw->radiotap_timestamp.units_pos = -diff --git a/mt7921/mac.c b/mt7921/mac.c -index 82db3762..47f79f16 100644 --- a/mt7921/mac.c +++ b/mt7921/mac.c -@@ -496,7 +496,7 @@ static void mt7921_tx_check_aggr(struct ieee80211_sta *sta, __le32 *txwi) +@@ -496,7 +496,7 @@ static void mt7921_tx_check_aggr(struct u16 fc, tid; u32 val; @@ -1454,11 +1394,9 @@ index 82db3762..47f79f16 100644 return; tid = le32_get_bits(txwi[1], MT_TXD1_TID); -diff --git a/mt7921/main.c b/mt7921/main.c -index 76ac5069..a1611590 100644 --- a/mt7921/main.c +++ b/mt7921/main.c -@@ -171,8 +171,7 @@ mt7921_init_he_caps(struct mt7921_phy *phy, enum nl80211_band band, +@@ -171,8 +171,7 @@ mt7921_init_he_caps(struct mt7921_phy *p mt7921_gen_ppe_thresh(he_cap->ppe_thres, nss); } else { he_cap_elem->phy_cap_info[9] |= @@ -1468,7 +1406,7 @@ index 76ac5069..a1611590 100644 } if (band == NL80211_BAND_6GHZ) { -@@ -691,8 +690,7 @@ out: +@@ -686,8 +685,7 @@ out: } static int @@ -1478,7 +1416,7 @@ index 76ac5069..a1611590 100644 const struct ieee80211_tx_queue_params *params) { struct mt7921_vif *mvif = (struct mt7921_vif *)vif->drv_priv; -@@ -762,7 +760,7 @@ static void mt7921_configure_filter(struct ieee80211_hw *hw, +@@ -757,7 +755,7 @@ static void mt7921_configure_filter(stru static void mt7921_bss_info_changed(struct ieee80211_hw *hw, struct ieee80211_vif *vif, struct ieee80211_bss_conf *info, @@ -1487,7 +1425,7 @@ index 76ac5069..a1611590 100644 { struct mt7921_phy *phy = mt7921_hw_phy(hw); struct mt7921_dev *dev = mt7921_hw_dev(hw); -@@ -793,7 +791,7 @@ static void mt7921_bss_info_changed(struct ieee80211_hw *hw, +@@ -788,7 +786,7 @@ static void mt7921_bss_info_changed(stru if (changed & BSS_CHANGED_ASSOC) { mt7921_mcu_sta_update(dev, NULL, vif, true, MT76_STA_INFO_STATE_ASSOC); @@ -1496,7 +1434,7 @@ index 76ac5069..a1611590 100644 } if (changed & BSS_CHANGED_ARP_FILTER) { -@@ -1640,8 +1638,8 @@ mt7921_channel_switch_beacon(struct ieee80211_hw *hw, +@@ -1635,8 +1633,8 @@ mt7921_channel_switch_beacon(struct ieee } static int @@ -1507,7 +1445,7 @@ index 76ac5069..a1611590 100644 { struct mt7921_vif *mvif = (struct mt7921_vif *)vif->drv_priv; struct mt7921_phy *phy = mt7921_hw_phy(hw); -@@ -1668,8 +1666,8 @@ out: +@@ -1663,8 +1661,8 @@ out: } static void @@ -1518,11 +1456,9 @@ index 76ac5069..a1611590 100644 { struct mt7921_vif *mvif = (struct mt7921_vif *)vif->drv_priv; struct mt7921_phy *phy = mt7921_hw_phy(hw); -diff --git a/mt7921/mcu.c b/mt7921/mcu.c -index 8930b5a4..672bd987 100644 --- a/mt7921/mcu.c +++ b/mt7921/mcu.c -@@ -862,7 +862,7 @@ int mt7921_mcu_uni_bss_ps(struct mt7921_dev *dev, struct ieee80211_vif *vif) +@@ -862,7 +862,7 @@ int mt7921_mcu_uni_bss_ps(struct mt7921_ .ps = { .tag = cpu_to_le16(UNI_BSS_INFO_PS), .len = cpu_to_le16(sizeof(struct ps_tlv)), @@ -1531,7 +1467,7 @@ index 8930b5a4..672bd987 100644 }, }; -@@ -926,7 +926,7 @@ mt7921_mcu_set_bss_pm(struct mt7921_dev *dev, struct ieee80211_vif *vif, +@@ -926,7 +926,7 @@ mt7921_mcu_set_bss_pm(struct mt7921_dev u8 pad; } req = { .bss_idx = mvif->mt76.idx, @@ -1540,7 +1476,7 @@ index 8930b5a4..672bd987 100644 .dtim_period = vif->bss_conf.dtim_period, .bcn_interval = cpu_to_le16(vif->bss_conf.beacon_int), }; -@@ -1143,7 +1143,7 @@ mt7921_mcu_uni_add_beacon_offload(struct mt7921_dev *dev, +@@ -1143,7 +1143,7 @@ mt7921_mcu_uni_add_beacon_offload(struct if (!enable) return -EOPNOTSUPP; @@ -1549,11 +1485,9 @@ index 8930b5a4..672bd987 100644 if (!skb) return -EINVAL; -diff --git a/mt7921/pci_mac.c b/mt7921/pci_mac.c -index 8dd60408..436f07ba 100644 --- a/mt7921/pci_mac.c +++ b/mt7921/pci_mac.c -@@ -113,7 +113,7 @@ int mt7921e_mac_reset(struct mt7921_dev *dev) +@@ -113,7 +113,7 @@ int mt7921e_mac_reset(struct mt7921_dev err = mt7921e_driver_own(dev); if (err) @@ -1562,11 +1496,9 @@ index 8dd60408..436f07ba 100644 err = mt7921_run_firmware(dev); if (err) -diff --git a/tx.c b/tx.c -index 1f309d05..6cda23fa 100644 --- a/tx.c +++ b/tx.c -@@ -60,20 +60,15 @@ mt76_tx_status_unlock(struct mt76_dev *dev, struct sk_buff_head *list) +@@ -60,20 +60,15 @@ mt76_tx_status_unlock(struct mt76_dev *d .skb = skb, .info = IEEE80211_SKB_CB(skb), }; @@ -1590,11 +1522,9 @@ index 1f309d05..6cda23fa 100644 } hw = mt76_tx_status_get_hw(dev, skb); -diff --git a/usb.c b/usb.c -index 3e281715..369c27ab 100644 --- a/usb.c +++ b/usb.c -@@ -1075,7 +1075,7 @@ int __mt76u_init(struct mt76_dev *dev, struct usb_interface *intf, +@@ -1075,7 +1075,7 @@ int __mt76u_init(struct mt76_dev *dev, s INIT_WORK(&usb->stat_work, mt76u_tx_status_data); @@ -1603,6 +1533,3 @@ index 3e281715..369c27ab 100644 if (usb->data_len < 32) usb->data_len = 32; --- -2.17.1 - diff --git a/package/kernel/mt76/patches/002-Revert-wifi-mt76-mt7921-introduce-chanctx-support.patch b/package/kernel/mt76/patches/002-Revert-wifi-mt76-mt7921-introduce-chanctx-support.patch index 85fe650d1f3ac3..b5a1b88b26d6f2 100644 --- a/package/kernel/mt76/patches/002-Revert-wifi-mt76-mt7921-introduce-chanctx-support.patch +++ b/package/kernel/mt76/patches/002-Revert-wifi-mt76-mt7921-introduce-chanctx-support.patch @@ -14,11 +14,9 @@ This reverts commit 2575de3aea332837a0784629b11146efa1c55e58. mt7921/usb.c | 7 --- 7 files changed, 17 insertions(+), 157 deletions(-) -diff --git a/mt7921/init.c b/mt7921/init.c -index 9bf5d9f0..c16aeab0 100644 --- a/mt7921/init.c +++ b/mt7921/init.c -@@ -26,27 +26,6 @@ static const struct ieee80211_iface_combination if_comb[] = { +@@ -26,27 +26,6 @@ static const struct ieee80211_iface_comb .max_interfaces = MT7921_MAX_INTERFACES, .num_different_channels = 1, .beacon_int_infra_match = true, @@ -46,7 +44,7 @@ index 9bf5d9f0..c16aeab0 100644 } }; -@@ -88,19 +67,17 @@ mt7921_init_wiphy(struct ieee80211_hw *hw) +@@ -88,19 +67,17 @@ mt7921_init_wiphy(struct ieee80211_hw *h hw->sta_data_size = sizeof(struct mt7921_sta); hw->vif_data_size = sizeof(struct mt7921_vif); @@ -71,8 +69,6 @@ index 9bf5d9f0..c16aeab0 100644 wiphy->max_remain_on_channel_duration = 5000; wiphy->max_scan_ie_len = MT76_CONNAC_SCAN_IE_LEN; wiphy->max_scan_ssids = 4; -diff --git a/mt7921/mac.c b/mt7921/mac.c -index 47f79f16..639614b0 100644 --- a/mt7921/mac.c +++ b/mt7921/mac.c @@ -168,6 +168,14 @@ static void @@ -90,11 +86,9 @@ index 47f79f16..639614b0 100644 if (chfreq > 180) { status->band = NL80211_BAND_6GHZ; chfreq = (chfreq - 181) * 4 + 1; -diff --git a/mt7921/main.c b/mt7921/main.c -index a1611590..1b7219e3 100644 --- a/mt7921/main.c +++ b/mt7921/main.c -@@ -856,7 +856,7 @@ void mt7921_mac_sta_assoc(struct mt76_dev *mdev, struct ieee80211_vif *vif, +@@ -851,7 +851,7 @@ void mt7921_mac_sta_assoc(struct mt76_de if (vif->type == NL80211_IFTYPE_STATION && !sta->tdls) mt76_connac_mcu_uni_add_bss(&dev->mphy, vif, &mvif->sta.wcid, @@ -103,7 +97,7 @@ index a1611590..1b7219e3 100644 mt7921_mac_wtbl_update(dev, msta->wcid.idx, MT_WTBL_UPDATE_ADM_COUNT_CLEAR); -@@ -889,7 +889,7 @@ void mt7921_mac_sta_remove(struct mt76_dev *mdev, struct ieee80211_vif *vif, +@@ -884,7 +884,7 @@ void mt7921_mac_sta_remove(struct mt76_d if (!sta->tdls) mt76_connac_mcu_uni_add_bss(&dev->mphy, vif, &mvif->sta.wcid, false, @@ -112,7 +106,7 @@ index a1611590..1b7219e3 100644 } spin_lock_bh(&dev->sta_poll_lock); -@@ -1649,7 +1649,7 @@ mt7921_start_ap(struct ieee80211_hw *hw, +@@ -1644,7 +1644,7 @@ mt7921_start_ap(struct ieee80211_hw *hw, mt7921_mutex_acquire(dev); err = mt76_connac_mcu_uni_add_bss(phy->mt76, vif, &mvif->sta.wcid, @@ -121,7 +115,7 @@ index a1611590..1b7219e3 100644 if (err) goto out; -@@ -1681,108 +1681,12 @@ mt7921_stop_ap(struct ieee80211_hw *hw, +@@ -1676,105 +1676,12 @@ mt7921_stop_ap(struct ieee80211_hw *hw, goto out; mt76_connac_mcu_uni_add_bss(phy->mt76, vif, &mvif->sta.wcid, false, @@ -221,17 +215,14 @@ index a1611590..1b7219e3 100644 - struct ieee80211_prep_tx_info *info) -{ - struct mt7921_vif *mvif = (struct mt7921_vif *)vif->drv_priv; -- struct mt7921_dev *dev = mt7921_hw_dev(hw); - -- mt7921_mutex_acquire(dev); - mt7921_abort_roc(mvif->phy, mvif); -- mt7921_mutex_release(dev); -} - const struct ieee80211_ops mt7921_ops = { .tx = mt7921_tx, .start = mt7921_start, -@@ -1835,13 +1739,6 @@ const struct ieee80211_ops mt7921_ops = { +@@ -1827,13 +1734,6 @@ const struct ieee80211_ops mt7921_ops = .set_sar_specs = mt7921_set_sar_specs, .remain_on_channel = mt7921_remain_on_channel, .cancel_remain_on_channel = mt7921_cancel_remain_on_channel, @@ -245,8 +236,6 @@ index a1611590..1b7219e3 100644 }; EXPORT_SYMBOL_GPL(mt7921_ops); -diff --git a/mt7921/mt7921.h b/mt7921/mt7921.h -index efff4d43..0954ac6c 100644 --- a/mt7921/mt7921.h +++ b/mt7921/mt7921.h @@ -171,7 +171,6 @@ struct mt7921_vif { @@ -257,11 +246,9 @@ index efff4d43..0954ac6c 100644 }; struct mib_stats { -diff --git a/mt7921/pci.c b/mt7921/pci.c -index d84dbdd1..fbb06f04 100644 --- a/mt7921/pci.c +++ b/mt7921/pci.c -@@ -297,13 +297,6 @@ static int mt7921_pci_probe(struct pci_dev *pdev, +@@ -297,13 +297,6 @@ static int mt7921_pci_probe(struct pci_d if (!(features & MT7921_FW_CAP_CNM)) { ops->remain_on_channel = NULL; ops->cancel_remain_on_channel = NULL; @@ -275,11 +262,9 @@ index d84dbdd1..fbb06f04 100644 } mdev = mt76_alloc_device(&pdev->dev, sizeof(*dev), ops, &drv_ops); -diff --git a/mt7921/sdio.c b/mt7921/sdio.c -index 3f8973fb..f6b35087 100644 --- a/mt7921/sdio.c +++ b/mt7921/sdio.c -@@ -140,13 +140,6 @@ static int mt7921s_probe(struct sdio_func *func, +@@ -140,13 +140,6 @@ static int mt7921s_probe(struct sdio_fun if (!(features & MT7921_FW_CAP_CNM)) { ops->remain_on_channel = NULL; ops->cancel_remain_on_channel = NULL; @@ -293,11 +278,9 @@ index 3f8973fb..f6b35087 100644 } mdev = mt76_alloc_device(&func->dev, sizeof(*dev), ops, &drv_ops); -diff --git a/mt7921/usb.c b/mt7921/usb.c -index 5321d20d..8a49d3de 100644 --- a/mt7921/usb.c +++ b/mt7921/usb.c -@@ -218,13 +218,6 @@ static int mt7921u_probe(struct usb_interface *usb_intf, +@@ -218,13 +218,6 @@ static int mt7921u_probe(struct usb_inte if (!(features & MT7921_FW_CAP_CNM)) { ops->remain_on_channel = NULL; ops->cancel_remain_on_channel = NULL; @@ -311,6 +294,3 @@ index 5321d20d..8a49d3de 100644 } ops->stop = mt7921u_stop; --- -2.17.1 - diff --git a/package/kernel/mt76/patches/003-Revert-changed-IEEE80211_MAX_AMPDU_BUF-defi.patch b/package/kernel/mt76/patches/003-Revert-changed-IEEE80211_MAX_AMPDU_BUF-defi.patch index 1f84c601fbabc9..65ad25b9ebdd6f 100644 --- a/package/kernel/mt76/patches/003-Revert-changed-IEEE80211_MAX_AMPDU_BUF-defi.patch +++ b/package/kernel/mt76/patches/003-Revert-changed-IEEE80211_MAX_AMPDU_BUF-defi.patch @@ -15,11 +15,9 @@ Signed-off-by: Christian Marangi mt7915/init.c | 5 +++++ 1 file changed, 5 insertions(+) -diff --git a/mt7915/init.c b/mt7915/init.c -index 489f6e77..1813370a 100644 --- a/mt7915/init.c +++ b/mt7915/init.c -@@ -327,8 +327,8 @@ mt7915_init_wiphy(struct ieee80211_hw *hw) +@@ -329,8 +329,8 @@ mt7915_init_wiphy(struct mt7915_phy *phy struct mt7915_dev *dev = phy->dev; hw->queues = 4; @@ -30,5 +28,3 @@ index 489f6e77..1813370a 100644 hw->netdev_features = NETIF_F_RXCSUM; hw->radiotap_timestamp.units_pos = --- -2.37.2 diff --git a/package/kernel/mt76/patches/020-fix-crash-in-chip-reset-fail.patch b/package/kernel/mt76/patches/020-fix-crash-in-chip-reset-fail.patch index 2777d142e3e328..fe3579e0e5d5cf 100644 --- a/package/kernel/mt76/patches/020-fix-crash-in-chip-reset-fail.patch +++ b/package/kernel/mt76/patches/020-fix-crash-in-chip-reset-fail.patch @@ -1,6 +1,6 @@ --- a/mt7921/pci_mac.c +++ b/mt7921/pci_mac.c -@@ -261,7 +261,7 @@ int mt7921e_mac_reset(struct mt7921_dev *dev) +@@ -113,7 +113,7 @@ int mt7921e_mac_reset(struct mt7921_dev err = mt7921e_driver_own(dev); if (err) diff --git a/package/kernel/mt76/patches/090-backport-to-linux-5.19.patch b/package/kernel/mt76/patches/090-backport-to-linux-5.19.patch index 44a14950ad84a9..5a274bd14713f0 100644 --- a/package/kernel/mt76/patches/090-backport-to-linux-5.19.patch +++ b/package/kernel/mt76/patches/090-backport-to-linux-5.19.patch @@ -1,6 +1,6 @@ --- a/usb.c +++ b/usb.c -@@ -1068,7 +1068,11 @@ +@@ -1075,7 +1075,11 @@ int __mt76u_init(struct mt76_dev *dev, s INIT_WORK(&usb->stat_work, mt76u_tx_status_data); diff --git a/package/kernel/mt76/patches/091-fix-linux-6.1-build.patch b/package/kernel/mt76/patches/091-fix-linux-6.1-build.patch index 0b7ee7b3e2c664..592d523f0af0f6 100644 --- a/package/kernel/mt76/patches/091-fix-linux-6.1-build.patch +++ b/package/kernel/mt76/patches/091-fix-linux-6.1-build.patch @@ -1,6 +1,6 @@ --- a/mt7921/dma.c ---- b/mt7921/dma.c -@@ -283,10 +283,15 @@ ++++ b/mt7921/dma.c +@@ -283,10 +283,15 @@ int mt7921_dma_init(struct mt7921_dev *d if (ret < 0) return ret; @@ -18,8 +18,8 @@ } --- a/dma.c ---- b/dma.c -@@ -895,7 +895,11 @@ ++++ b/dma.c +@@ -910,7 +910,11 @@ mt76_dma_init(struct mt76_dev *dev, dev->napi_dev.threaded = 1; mt76_for_each_q_rx(dev, i) { diff --git a/package/libs/libbsd/Makefile b/package/libs/libbsd/Makefile index 789126cb829306..92c7054e3bd3fa 100644 --- a/package/libs/libbsd/Makefile +++ b/package/libs/libbsd/Makefile @@ -14,6 +14,7 @@ PKG_LICENSE_FILES:=COPYING PKG_INSTALL:=1 PKG_BUILD_PARALLEL:=1 PKG_BUILD_DEPENDS := libmd +PKG_FIXUP:=autoreconf include $(INCLUDE_DIR)/package.mk diff --git a/package/libs/libbsd/patches/001-fix-libpath.patch b/package/libs/libbsd/patches/001-fix-libpath.patch new file mode 100644 index 00000000000000..ca2407024960d7 --- /dev/null +++ b/package/libs/libbsd/patches/001-fix-libpath.patch @@ -0,0 +1,13 @@ +do not use host path to fix cross compiling + +--- a/src/Makefile.am ++++ b/src/Makefile.am +@@ -160,7 +160,7 @@ + (echo '/* GNU ld script'; \ + echo ' * The MD5 functions are provided by the libmd library. */'; \ + cat format.ld; \ +- echo "GROUP($(runtimelibdir)/$$soname AS_NEEDED($(MD5_LIBS)))"; \ ++ echo "GROUP($$soname AS_NEEDED($(MD5_LIBS)))"; \ + )>$(DESTDIR)$(libdir)/libbsd.so + else + if [ "$(libdir)" != "$(runtimelibdir)" ]; then \ diff --git a/package/libs/mbedtls/Makefile b/package/libs/mbedtls/Makefile index fd0f821d858238..b07f0477e45cf0 100644 --- a/package/libs/mbedtls/Makefile +++ b/package/libs/mbedtls/Makefile @@ -8,13 +8,13 @@ include $(TOPDIR)/rules.mk PKG_NAME:=mbedtls -PKG_VERSION:=2.28.1 -PKG_RELEASE:=$(AUTORELEASE) +PKG_VERSION:=2.28.2 +PKG_RELEASE:=1 PKG_USE_MIPS16:=0 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=https://codeload.github.com/ARMmbed/mbedtls/tar.gz/v$(PKG_VERSION)? -PKG_HASH:=6797a7b6483ef589deeab8d33d401ed235d7be25eeecda1be8ddfed406d40ff4 +PKG_HASH:=bc55232bf71fd66045122ba9050a29ea7cb2e8f99b064a9e6334a82f715881a0 PKG_LICENSE:=GPL-2.0-or-later PKG_LICENSE_FILES:=gpl-2.0.txt diff --git a/package/libs/mbedtls/patches/100-fix-compile.patch b/package/libs/mbedtls/patches/100-fix-compile.patch index c3b26ac9c9b8a7..411d3716994050 100644 --- a/package/libs/mbedtls/patches/100-fix-compile.patch +++ b/package/libs/mbedtls/patches/100-fix-compile.patch @@ -4,7 +4,7 @@ Bug report: https://github.com/Mbed-TLS/mbedtls/issues/6243 --- a/programs/ssl/ssl_server2.c +++ b/programs/ssl/ssl_server2.c -@@ -2511,7 +2511,6 @@ int main( int argc, char *argv[] ) +@@ -2529,7 +2529,6 @@ int main( int argc, char *argv[] ) } key_cert_init2 = 2; #endif /* MBEDTLS_ECDSA_C */ @@ -12,11 +12,11 @@ Bug report: https://github.com/Mbed-TLS/mbedtls/issues/6243 #if defined(MBEDTLS_USE_PSA_CRYPTO) if( opt.key_opaque != 0 ) -@@ -2540,6 +2539,7 @@ int main( int argc, char *argv[] ) +@@ -2558,6 +2557,7 @@ int main( int argc, char *argv[] ) } #endif /* MBEDTLS_USE_PSA_CRYPTO */ #endif /* MBEDTLS_CERTS_C */ + } mbedtls_printf( " ok (key types: %s - %s)\n", mbedtls_pk_get_name( &pkey ), mbedtls_pk_get_name( &pkey2 ) ); - #endif /* MBEDTLS_X509_CRT_PARSE_C */ + #endif /* MBEDTLS_KEY_EXCHANGE_WITH_CERT_ENABLED */ diff --git a/package/network/services/dnsmasq/Makefile b/package/network/services/dnsmasq/Makefile index 22eb12c1d1987e..4bc0e71c965db5 100644 --- a/package/network/services/dnsmasq/Makefile +++ b/package/network/services/dnsmasq/Makefile @@ -8,13 +8,13 @@ include $(TOPDIR)/rules.mk PKG_NAME:=dnsmasq -PKG_UPSTREAM_VERSION:=2.87 +PKG_UPSTREAM_VERSION:=2.88 PKG_VERSION:=$(subst test,~~test,$(subst rc,~rc,$(PKG_UPSTREAM_VERSION))) PKG_RELEASE:=$(AUTORELEASE) PKG_SOURCE:=$(PKG_NAME)-$(PKG_UPSTREAM_VERSION).tar.xz PKG_SOURCE_URL:=https://thekelleys.org.uk/dnsmasq/ -PKG_HASH:=0228c0364a7f2356fd7e7f1549937cbf3099a78d3b2eb1ba5bb0c31e2b89de7a +PKG_HASH:=23544deda10340c053bea6f15a93fed6ea7f5aaa85316bfc671ffa6d22fbc1b3 PKG_LICENSE:=GPL-2.0 PKG_LICENSE_FILES:=COPYING diff --git a/package/network/services/dnsmasq/files/dnsmasq.init b/package/network/services/dnsmasq/files/dnsmasq.init index 4f90e931ac3474..10d171c098b5d1 100755 --- a/package/network/services/dnsmasq/files/dnsmasq.init +++ b/package/network/services/dnsmasq/files/dnsmasq.init @@ -929,7 +929,7 @@ dnsmasq_start() append_bool "$cfg" noping "--no-ping" append_bool "$cfg" rapidcommit "--dhcp-rapid-commit" append_bool "$cfg" scriptarp "--script-arp" - + append_bool "$cfg" filter_aaaa "--filter-AAAA" append_bool "$cfg" filter_a "--filter-A" @@ -1135,7 +1135,6 @@ dnsmasq_start() config_foreach filter_dnsmasq ipset dnsmasq_ipset_add "$cfg" echo >> $CONFIGFILE_TMP - echo >> $CONFIGFILE_TMP mv -f $CONFIGFILE_TMP $CONFIGFILE mv -f $HOSTFILE_TMP $HOSTFILE diff --git a/package/network/services/dnsmasq/patches/100-remove-old-runtime-kernel-support.patch b/package/network/services/dnsmasq/patches/100-remove-old-runtime-kernel-support.patch index b1b134a98c2440..76065375bdec98 100644 --- a/package/network/services/dnsmasq/patches/100-remove-old-runtime-kernel-support.patch +++ b/package/network/services/dnsmasq/patches/100-remove-old-runtime-kernel-support.patch @@ -26,7 +26,7 @@ Signed-off-by: Kevin Darbyshire-Bryant --- a/src/dnsmasq.h +++ b/src/dnsmasq.h -@@ -1229,7 +1229,7 @@ extern struct daemon { +@@ -1247,7 +1247,7 @@ extern struct daemon { int inotifyfd; #endif #if defined(HAVE_LINUX_NETWORK) @@ -35,7 +35,7 @@ Signed-off-by: Kevin Darbyshire-Bryant #elif defined(HAVE_BSD_NETWORK) int dhcp_raw_fd, dhcp_icmp_fd, routefd; #endif -@@ -1422,9 +1422,6 @@ int read_write(int fd, unsigned char *pa +@@ -1452,9 +1452,6 @@ int read_write(int fd, unsigned char *pa void close_fds(long max_fd, int spare1, int spare2, int spare3); int wildcard_match(const char* wildcard, const char* match); int wildcard_matchn(const char* wildcard, const char* match, int num); @@ -140,7 +140,7 @@ Signed-off-by: Kevin Darbyshire-Bryant my_syslog(LOG_ERR, _("failed to update ipset %s: %s"), setname, strerror(errno)); --- a/src/util.c +++ b/src/util.c -@@ -833,22 +833,3 @@ int wildcard_matchn(const char* wildcard +@@ -855,22 +855,3 @@ int wildcard_matchn(const char* wildcard return (!num) || (*wildcard == *match); } diff --git a/package/network/services/dnsmasq/patches/200-ubus_dns.patch b/package/network/services/dnsmasq/patches/200-ubus_dns.patch index c4cc1df207f96c..f88763f94a0198 100644 --- a/package/network/services/dnsmasq/patches/200-ubus_dns.patch +++ b/package/network/services/dnsmasq/patches/200-ubus_dns.patch @@ -1,6 +1,6 @@ --- a/src/dnsmasq.h +++ b/src/dnsmasq.h -@@ -1598,14 +1598,26 @@ void emit_dbus_signal(int action, struct +@@ -1630,14 +1630,26 @@ void emit_dbus_signal(int action, struct /* ubus.c */ #ifdef HAVE_UBUS @@ -151,7 +151,7 @@ if (!ADD_RDLEN(header, p, qlen, rdlen)) return 0; /* bad packet */ } -@@ -568,7 +637,7 @@ int extract_addresses(struct dns_header +@@ -570,7 +639,7 @@ int extract_addresses(struct dns_header cache_start_insert(); /* find_soa is needed for dns_doctor side effects, so don't call it lazily if there are any. */ @@ -269,7 +269,7 @@ struct ubus_context *ubus = (struct ubus_context *)daemon->ubus; --- a/src/dnsmasq.c +++ b/src/dnsmasq.c -@@ -1998,6 +1998,10 @@ static void check_dns_listeners(time_t n +@@ -2003,6 +2003,10 @@ static void check_dns_listeners(time_t n daemon->pipe_to_parent = pipefd[1]; } diff --git a/package/network/services/fullconenat/Makefile b/package/network/services/fullconenat/Makefile index d49155c7eaf304..94383510dd20a4 100644 --- a/package/network/services/fullconenat/Makefile +++ b/package/network/services/fullconenat/Makefile @@ -8,7 +8,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=fullconenat -PKG_RELEASE:=9 +PKG_RELEASE:=10 PKG_SOURCE_DATE:=2022-02-13 PKG_SOURCE_PROTO:=git @@ -49,9 +49,7 @@ endef include $(INCLUDE_DIR)/kernel-defaults.mk define Build/Compile - +$(MAKE) $(PKG_JOBS) -C "$(LINUX_DIR)" \ - CROSS_COMPILE="$(TARGET_CROSS)" \ - ARCH="$(LINUX_KARCH)" \ + +$(KERNEL_MAKE) $(PKG_JOBS) \ M="$(PKG_BUILD_DIR)" \ EXTRA_CFLAGS="$(BUILDFLAGS)" \ modules diff --git a/package/network/services/uhttpd/Makefile b/package/network/services/uhttpd/Makefile index 860b41f1a4afb6..55ca3f6818970d 100644 --- a/package/network/services/uhttpd/Makefile +++ b/package/network/services/uhttpd/Makefile @@ -12,9 +12,9 @@ PKG_RELEASE:=1 PKG_SOURCE_PROTO:=git PKG_SOURCE_URL=$(PROJECT_GIT)/project/uhttpd.git -PKG_SOURCE_DATE:=2022-06-01 -PKG_SOURCE_VERSION:=d59d732a10a4a2b9f18af6dfc3facf696108f31e -PKG_MIRROR_HASH:=31caa46ca025a1a7657bd5252d59d4a67d0f1c4b87c15a1bc94663ba3cc899ee +PKG_SOURCE_DATE:=2022-10-31 +PKG_SOURCE_VERSION:=23977554d9694d025eada50a5547e99ee1be7838 +PKG_MIRROR_HASH:=e546fd57d0d0be6a51e2aeb5797febe8c89d2bba61b26c930ecb0616d5f6ace9 PKG_MAINTAINER:=Felix Fietkau PKG_LICENSE:=ISC diff --git a/package/network/services/uhttpd/files/uhttpd.init b/package/network/services/uhttpd/files/uhttpd.init index 8dbc23f59c1e01..bfde231bf62f70 100755 --- a/package/network/services/uhttpd/files/uhttpd.init +++ b/package/network/services/uhttpd/files/uhttpd.init @@ -222,6 +222,7 @@ start_instance() service_triggers() { procd_add_reload_trigger "uhttpd" + procd_add_raw_trigger acme.renew 5000 /etc/init.d/uhttpd reload } start_service() { diff --git a/target/linux/bcm27xx/patches-5.15/200-Revert-net-broadcom-Add-PTP_1588_CLOCK_OPTIONAL-depe.patch b/target/linux/bcm27xx/patches-5.15/200-Revert-net-broadcom-Add-PTP_1588_CLOCK_OPTIONAL-depe.patch new file mode 100644 index 00000000000000..4357a6ba13481e --- /dev/null +++ b/target/linux/bcm27xx/patches-5.15/200-Revert-net-broadcom-Add-PTP_1588_CLOCK_OPTIONAL-depe.patch @@ -0,0 +1,31 @@ +From 882882912cd25a637ba0cf09932ad248f584e680 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?=C3=81lvaro=20Fern=C3=A1ndez=20Rojas?= +Date: Wed, 28 Dec 2022 13:19:49 +0100 +Subject: [PATCH 1/2] Revert "net: broadcom: Add PTP_1588_CLOCK_OPTIONAL + dependency for BCMGENET under ARCH_BCM2835" + +[ Upstream commit 421f8663b3a775c32f724f793264097c60028f2e ] + +This reverts commit eb96fd3983b2cca1c90db45eaff1de67b94f9950. +--- + drivers/net/ethernet/broadcom/Kconfig | 3 +-- + 1 file changed, 1 insertion(+), 2 deletions(-) + +--- a/drivers/net/ethernet/broadcom/Kconfig ++++ b/drivers/net/ethernet/broadcom/Kconfig +@@ -71,14 +71,13 @@ config BCM63XX_ENET + config BCMGENET + tristate "Broadcom GENET internal MAC support" + depends on HAS_IOMEM +- depends on PTP_1588_CLOCK_OPTIONAL || !ARCH_BCM2835 + select MII + select PHYLIB + select FIXED_PHY + select BCM7XXX_PHY + select MDIO_BCM_UNIMAC + select DIMLIB +- select BROADCOM_PHY if ARCH_BCM2835 ++ select BROADCOM_PHY if (ARCH_BCM2835 && PTP_1588_CLOCK_OPTIONAL) + help + This driver supports the built-in Ethernet MACs found in the + Broadcom BCM7xxx Set Top Box family chipset. diff --git a/target/linux/bcm27xx/patches-5.15/201-Revert-net-broadcom-Fix-BCMGENET-Kconfig.patch b/target/linux/bcm27xx/patches-5.15/201-Revert-net-broadcom-Fix-BCMGENET-Kconfig.patch new file mode 100644 index 00000000000000..1e29da5c955aba --- /dev/null +++ b/target/linux/bcm27xx/patches-5.15/201-Revert-net-broadcom-Fix-BCMGENET-Kconfig.patch @@ -0,0 +1,23 @@ +From f032f801658ce6b47498f3e140f7e4aef0645042 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?=C3=81lvaro=20Fern=C3=A1ndez=20Rojas?= +Date: Wed, 28 Dec 2022 13:20:24 +0100 +Subject: [PATCH 2/2] Revert "net: broadcom: Fix BCMGENET Kconfig" + +[ Upstream commit 8d820bc9d12b8beebca836cceaf2bbe68216c2f8 ] + +This reverts commit 6a264203dbdb0d076891d83bf3bb274d6b3863f2. +--- + drivers/net/ethernet/broadcom/Kconfig | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/drivers/net/ethernet/broadcom/Kconfig ++++ b/drivers/net/ethernet/broadcom/Kconfig +@@ -77,7 +77,7 @@ config BCMGENET + select BCM7XXX_PHY + select MDIO_BCM_UNIMAC + select DIMLIB +- select BROADCOM_PHY if (ARCH_BCM2835 && PTP_1588_CLOCK_OPTIONAL) ++ select BROADCOM_PHY if ARCH_BCM2835 + help + This driver supports the built-in Ethernet MACs found in the + Broadcom BCM7xxx Set Top Box family chipset. diff --git a/target/linux/rockchip/patches-5.15/061-v5.20-arm64-enable-THP_SWAP-for-arm64.patch b/target/linux/generic/backport-5.15/350-v6.0-arm64-enable-THP_SWAP-for-arm64.patch similarity index 100% rename from target/linux/rockchip/patches-5.15/061-v5.20-arm64-enable-THP_SWAP-for-arm64.patch rename to target/linux/generic/backport-5.15/350-v6.0-arm64-enable-THP_SWAP-for-arm64.patch diff --git a/target/linux/generic/config-5.10 b/target/linux/generic/config-5.10 index 56b93a5bbd9b9d..e8e6f5d322db9e 100644 --- a/target/linux/generic/config-5.10 +++ b/target/linux/generic/config-5.10 @@ -4560,6 +4560,9 @@ CONFIG_PROC_SYSCTL=y # CONFIG_PWM is not set # CONFIG_PWM_DEBUG is not set # CONFIG_PWM_FSL_FTM is not set +# CONFIG_PWM_IMG is not set +# CONFIG_PWM_JZ4740 is not set +# CONFIG_PWM_MEDIATEK is not set # CONFIG_PWM_PCA9685 is not set CONFIG_PWRSEQ_EMMC=y # CONFIG_PWRSEQ_SD8787 is not set diff --git a/target/linux/generic/config-5.15 b/target/linux/generic/config-5.15 index c9eacfa8bc1ec7..10ee3015ba36a8 100644 --- a/target/linux/generic/config-5.15 +++ b/target/linux/generic/config-5.15 @@ -1652,6 +1652,7 @@ CONFIG_DQL=y # CONFIG_DRM_VKMS is not set # CONFIG_DRM_VMWGFX is not set # CONFIG_DRM_XEN is not set +# CONFIG_DRM_XEN_FRONTEND is not set # CONFIG_DS1682 is not set # CONFIG_DS1803 is not set # CONFIG_DS4424 is not set @@ -4813,7 +4814,9 @@ CONFIG_PSTORE_DEFAULT_KMSG_BYTES=10240 # CONFIG_PWM_DEBUG is not set # CONFIG_PWM_DWC is not set # CONFIG_PWM_FSL_FTM is not set +# CONFIG_PWM_IMG is not set # CONFIG_PWM_JZ4740 is not set +# CONFIG_PWM_MEDIATEK is not set # CONFIG_PWM_PCA9685 is not set CONFIG_PWRSEQ_EMMC=y # CONFIG_PWRSEQ_SD8787 is not set diff --git a/target/linux/generic/hack-5.15/601-of_net-add-mac-address-ascii-support.patch b/target/linux/generic/hack-5.15/601-of_net-add-mac-address-ascii-support.patch new file mode 100644 index 00000000000000..4ab05b4ea6f949 --- /dev/null +++ b/target/linux/generic/hack-5.15/601-of_net-add-mac-address-ascii-support.patch @@ -0,0 +1,112 @@ +From: Yousong Zhou +Subject: [PATCH] ath79: add nvmem cell mac-address-ascii support + +This is needed for devices with mac address stored in ascii format, e.g. +HiWiFi HC6361 to be ported in the following patch. + +Submitted-by: Yousong Zhou +--- + net/ethernet/eth.c | 83 ++++++++++++------ + 1 files changed, 72 insertions(+), 11 deletions(-) + +--- a/net/ethernet/eth.c ++++ b/net/ethernet/eth.c +@@ -538,6 +538,63 @@ int eth_platform_get_mac_address(struct + } + EXPORT_SYMBOL(eth_platform_get_mac_address); + ++static void *nvmem_cell_get_mac_address(struct nvmem_cell *cell) ++{ ++ size_t len; ++ void *mac; ++ ++ mac = nvmem_cell_read(cell, &len); ++ if (IS_ERR(mac)) ++ return mac; ++ if (len != ETH_ALEN) { ++ kfree(mac); ++ return ERR_PTR(-EINVAL); ++ } ++ return mac; ++} ++ ++static void *nvmem_cell_get_mac_address_ascii(struct nvmem_cell *cell) ++{ ++ size_t len; ++ int ret; ++ void *mac_ascii; ++ u8 *mac; ++ ++ mac_ascii = nvmem_cell_read(cell, &len); ++ if (IS_ERR(mac_ascii)) ++ return mac_ascii; ++ if (len != ETH_ALEN*2+5) { ++ kfree(mac_ascii); ++ return ERR_PTR(-EINVAL); ++ } ++ mac = kmalloc(ETH_ALEN, GFP_KERNEL); ++ if (!mac) { ++ kfree(mac_ascii); ++ return ERR_PTR(-ENOMEM); ++ } ++ ret = sscanf(mac_ascii, "%2hhx:%2hhx:%2hhx:%2hhx:%2hhx:%2hhx", ++ &mac[0], &mac[1], &mac[2], ++ &mac[3], &mac[4], &mac[5]); ++ kfree(mac_ascii); ++ if (ret == ETH_ALEN) ++ return mac; ++ kfree(mac); ++ return ERR_PTR(-EINVAL); ++} ++ ++static struct nvmem_cell_mac_address_property { ++ char *name; ++ void *(*read)(struct nvmem_cell *); ++} nvmem_cell_mac_address_properties[] = { ++ { ++ .name = "mac-address", ++ .read = nvmem_cell_get_mac_address, ++ }, { ++ .name = "mac-address-ascii", ++ .read = nvmem_cell_get_mac_address_ascii, ++ }, ++}; ++ + /** + * nvmem_get_mac_address - Obtain the MAC address from an nvmem cell named + * 'mac-address' associated with given device. +@@ -551,19 +608,23 @@ int nvmem_get_mac_address(struct device + { + struct nvmem_cell *cell; + const void *mac; +- size_t len; ++ struct nvmem_cell_mac_address_property *property; ++ int i; + +- cell = nvmem_cell_get(dev, "mac-address"); +- if (IS_ERR(cell)) +- return PTR_ERR(cell); +- +- mac = nvmem_cell_read(cell, &len); +- nvmem_cell_put(cell); +- +- if (IS_ERR(mac)) +- return PTR_ERR(mac); ++ for (i = 0; i < ARRAY_SIZE(nvmem_cell_mac_address_properties); i++) { ++ property = &nvmem_cell_mac_address_properties[i]; ++ cell = nvmem_cell_get(dev, property->name); ++ if (IS_ERR(cell)) { ++ if (i == ARRAY_SIZE(nvmem_cell_mac_address_properties) - 1) ++ return PTR_ERR(cell); ++ continue; ++ } ++ mac = property->read(cell); ++ nvmem_cell_put(cell); ++ break; ++ } + +- if (len != ETH_ALEN || !is_valid_ether_addr(mac)) { ++ if (!is_valid_ether_addr(mac)) { + kfree(mac); + return -EINVAL; + } diff --git a/target/linux/mediatek/dts/mt7622-netgear-wax206.dts b/target/linux/mediatek/dts/mt7622-netgear-wax206.dts deleted file mode 100644 index cf846155d25454..00000000000000 --- a/target/linux/mediatek/dts/mt7622-netgear-wax206.dts +++ /dev/null @@ -1,603 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0-or-later OR MIT -/* Copyright (c) 2022, Marcel Ziswiler */ - -/dts-v1/; -#include "mt7622.dtsi" -#include "mt6380.dtsi" -#include -#include - -/ { - model = "Netgear WAX206"; - compatible = "netgear,wax206", "mediatek,mt7622"; - - aliases { - ethernet0 = &gmac0; -// label-mac-device = &gmac0; -// label-mac-device = &wan; - led-boot = &led_power; - led-failsafe = &led_power; - led-running = &led_power; - led-upgrade = &led_power; - serial0 = &uart0; - }; - - chosen { - stdout-path = "serial0:115200n8"; - bootargs = "earlycon=uart8250,mmio32,0x11002000 console=ttyS0,115200n8 swiotlb=512"; - }; - - cpus { -//&cpu0 - cpu@0 { - proc-supply = <&mt6380_vcpu_reg>; - sram-supply = <&mt6380_vm_reg>; - }; - -//&cpu1 - cpu@1 { - proc-supply = <&mt6380_vcpu_reg>; - sram-supply = <&mt6380_vm_reg>; - }; - }; - - gpio-keys { - compatible = "gpio-keys"; - - reset { - gpios = <&pio 0 GPIO_ACTIVE_LOW>; - label = "reset"; - linux,code = ; - }; - - wps { - gpios = <&pio 102 GPIO_ACTIVE_LOW>; - label = "wps"; - linux,code = ; - }; - }; - - gpio-leds { - compatible = "gpio-leds"; - - led_power: power_red { - default-state = "on"; - gpios = <&pio 3 GPIO_ACTIVE_LOW>; - label = "power:red"; - }; - - power_green { - default-state = "off"; - gpios = <&pio 4 GPIO_ACTIVE_LOW>; - label = "power:green"; - }; - - inet_green { - default-state = "off"; - gpios = <&pio 20 GPIO_ACTIVE_HIGH>; - label = "inet:green"; - }; - - inet_blue { - default-state = "off"; - gpios = <&pio 17 GPIO_ACTIVE_LOW>; - label = "inet:blue"; - }; - - wifin_green { - default-state = "off"; - gpios = <&pio 85 GPIO_ACTIVE_LOW>; - label = "wifin:green"; - }; - - wifin_blue { - default-state = "off"; - gpios = <&pio 86 GPIO_ACTIVE_LOW>; - label = "wifin:blue"; - }; - - wifia_green { - default-state = "off"; - gpios = <&pio 2 GPIO_ACTIVE_HIGH>; - label = "wifia:green"; - }; - - wifia_blue { - default-state = "off"; - gpios = <&pio 1 GPIO_ACTIVE_LOW>; - label = "wifia:blue"; - }; - }; - - memory { - reg = <0 0x40000000 0 0x40000000>; - }; -}; - -//TBD: disabled in stock? -&bch { - status = "okay"; -}; - -&btif { - status = "okay"; -}; - -&cir { - pinctrl-names = "default"; - pinctrl-0 = <&irrx_pins>; - status = "okay"; -}; - -//&efuse - -ð { - pinctrl-names = "default"; - pinctrl-0 = <ð_pins>; - status = "okay"; - - gmac0: mac@0 { - compatible = "mediatek,eth-mac"; - nvmem-cells = <&macaddr_factory_7fff4>; - nvmem-cell-names = "mac-address"; -// phy-connection-type = "2500base-x"; - phy-mode = "2500base-x"; - reg = <0>; - - fixed-link { - full-duplex; - pause; - speed = <2500>; - }; - }; - - mdio-bus { - #address-cells = <1>; - #size-cells = <0>; - - switch@0 { - compatible = "mediatek,mt7531"; - #interrupt-cells = <1>; -// #interrupt-cells = <2>; - interrupt-controller; - interrupt-parent = <&pio>; - interrupts = <53 IRQ_TYPE_LEVEL_HIGH>; -//TBD: 2nd interrupt 77 IRQ_TYPE_EDGE_FALLING - reg = <0>; - reset-gpios = <&pio 54 GPIO_ACTIVE_HIGH>; - - ports { - #address-cells = <1>; - #size-cells = <0>; - - port@1 { - label = "lan1"; - reg = <1>; - }; - - port@2 { - label = "lan2"; - reg = <2>; - }; - - port@3 { - label = "lan3"; - reg = <3>; - }; - - port@4 { - label = "lan4"; - reg = <4>; - }; - - wan: port@5 { - label = "wan"; -//TBD -// managed = "in-band-status"; - nvmem-cells = <&macaddr_factory_7fffa>; - nvmem-cell-names = "mac-address"; - phy-handle = <&rtl8221b_phy>; - phy-mode = "sgmii"; -// phy-mode = "2500base-x"; - reg = <5>; - }; - - port@6 { - ethernet = <&gmac0>; - label = "cpu"; - phy-mode = "2500base-x"; - reg = <6>; - - fixed-link { - full-duplex; - pause; - speed = <2500>; - }; - }; - }; - }; - - rtl8221b_phy: ethernet-phy@7 { - compatible = "ethernet-phy-id001c.c849"; - reg = <7>; - reset-gpios = <&pio 101 GPIO_ACTIVE_LOW>; - interrupts = <52 IRQ_TYPE_LEVEL_HIGH>; - reset-assert-us = <100000>; - reset-deassert-us = <100000>; - }; - }; -}; - -//&hnat - -//TBD: i2c? - -&pcie0 { - pinctrl-names = "default"; - pinctrl-0 = <&pcie0_pins>; - status = "okay"; -}; - -&pcie1 { - pinctrl-names = "default"; - pinctrl-0 = <&pcie1_pins>; - status = "okay"; -}; - -&pio { - eth_pins: eth-pins { - mux { - function = "eth"; - groups = "mdc_mdio", "rgmii_via_gmac2"; - }; - }; - - irrx_pins: irrx-pins { - mux { - function = "ir"; - groups = "ir_1_rx"; - }; - }; - - irtx_pins: irtx-pins { - mux { - function = "ir"; - groups = "ir_1_tx"; - }; - }; - - pcie0_pins: pcie0-pins { - mux { - function = "pcie"; - groups = "pcie0_pad_perst", - "pcie0_1_waken", - "pcie0_1_clkreq"; - }; - }; - - pcie1_pins: pcie1-pins { - mux { - function = "pcie"; - groups = "pcie1_pad_perst", - "pcie1_0_waken", - "pcie1_0_clkreq"; - }; - }; - - pmic_bus_pins: pmic-bus-pins { - mux { - function = "pmic"; - groups = "pmic_bus"; - }; - }; - - pwm7_pins: pwm1-2-pins { - mux { - function = "pwm"; - groups = "pwm_ch7_2"; - }; - }; - - wled_pins: wled-pins { - mux { - function = "led"; - groups = "wled"; - }; - }; - - /* Serial NAND is shared pin with SPI-NOR */ - serial_nand_pins: serial-nand-pins { - mux { - function = "flash"; - groups = "snfi"; - }; - }; - - spic0_pins: spic0-pins { - mux { - function = "spi"; - groups = "spic0_0"; - }; - }; - - spic1_pins: spic1-pins { - mux { - function = "spi"; - groups = "spic1_0"; - }; - }; - - uart0_pins: uart0-pins { - mux { - function = "uart"; - groups = "uart0_0_tx_rx"; - }; - }; - - uart2_pins: uart2-pins { - mux { - function = "uart"; - groups = "uart2_1_tx_rx"; - }; - }; - - watchdog_pins: watchdog-pins { - mux { - function = "watchdog"; - groups = "watchdog"; - }; - }; -}; - -&pwm { - pinctrl-names = "default"; - pinctrl-0 = <&pwm7_pins>; - status = "okay"; -}; - -&pwrap { - pinctrl-names = "default"; - pinctrl-0 = <&pmic_bus_pins>; - status = "okay"; -}; - -&rtc { - status = "disabled"; -}; - -&sata { - status = "disabled"; -}; - -&sata_phy { - status = "disabled"; -}; - -&slot0 { - wmac1: mt7915@0,0 { - reg = <0x0000 0 0 0 0>; - ieee80211-freq-limit = <5000000 6000000>; - }; -}; - -&snfi { - pinctrl-names = "default"; - pinctrl-0 = <&serial_nand_pins>; - status = "okay"; - - snand: flash@0 { - compatible = "spi-nand"; - mediatek,bmt-table-size = <0x1000>; - mediatek,bmt-v2; - nand-ecc-engine = <&snfi>; - reg = <0>; - spi-rx-bus-width = <4>; - spi-tx-bus-width = <4>; - - partitions { - compatible = "fixed-partitions"; - #address-cells = <1>; - #size-cells = <1>; - /* - [ 1.456820] 0x000000000000-0x000000080000 : "Preloader" - [ 1.463323] 0x000000080000-0x0000000c0000 : "ATF" - [ 1.468865] 0x0000000c0000-0x000000140000 : "Bootloader" - [ 1.475339] 0x000000140000-0x0000001c0000 : "Config" - [ 1.481469] 0x0000001c0000-0x0000002c0000 : "Factory" - [ 1.488403] 0x0000002c0000-0x0000028c0000 : "ImageA" - [ 1.546793] 0x0000002e0000-0x0000028c0000 : "Kernel" - [ 1.609321] 2 fit-fw partitions found on MTD device Kernel - [ 1.614809] 0x0000002e0000-0x000000580000 : "kernel" - [ 1.623890] 0x000000580000-0x0000028c0000 : "rootfs" - [ 1.678471] mtd: device 8 (rootfs) set to be root filesystem - [ 1.715994] 1 squashfs-split partitions found on MTD device rootfs - [ 1.722175] 0x000001c60000-0x0000028c0000 : "rootfs_var" - [ 1.745236] 0x0000028c0000-0x000004ec0000 : "Kernel_backup" - [ 1.806070] 0x000004ec0000-0x0000056c0000 : "CFG" - [ 1.822393] 0x0000056c0000-0x000005ac0000 : "RAE" - [ 1.833183] 0x000005ac0000-0x000005bc0000 : "POT" - [ 1.843779] 0x000005bc0000-0x000005fc0000 : "Language" - [ 1.855067] 0x000005fc0000-0x0000061c0000 : "Traffic" - [ 1.863392] 0x0000061c0000-0x0000062c0000 : "Cert" - [ 1.870064] 0x0000062c0000-0x0000063c0000 : "NTGRcryptK" - [ 1.877258] 0x0000063c0000-0x0000068c0000 : "NTGRcryptD" - [ 1.890005] 0x0000068c0000-0x0000069c0000 : "LOG" - [ 1.902786] mtdoops: ready 0, 1 (no erase) - [ 1.906880] mtdoops: Attached to MTD device 19 - [ 1.911668] 0x0000069c0000-0x000007000000 : "User_data" - */ - partition@0 { - label = "Preloader"; - reg = <0x00000 0x0080000>; - read-only; - }; - - partition@80000 { - label = "ATF"; - reg = <0x80000 0x0040000>; - read-only; - }; - - partition@c0000 { - label = "Bootloader"; - reg = <0xc0000 0x0080000>; - read-only; - }; - - partition@140000 { - label = "Config"; - reg = <0x140000 0x0080000>; - }; - - factory: partition@1c0000 { - compatible = "nvmem-cells"; - label = "Factory"; - reg = <0x1c0000 0x0100000>; - #address-cells = <1>; - #size-cells = <1>; - read-only; - - macaddr_factory_7fff4: macaddr@7fff4 { - reg = <0x7fff4 0x6>; - }; - - macaddr_factory_7fffa: macaddr@7fffa { - reg = <0x7fffa 0x6>; - }; - }; - - partition@2c0000 { - label = "firmware"; - reg = <0x2c0000 0x2600000>; - - compatible = "fixed-partitions"; - #address-cells = <1>; - #size-cells = <1>; - - partition@0 { - label = "kernel"; - reg = <0x0 0x600000>; - }; - - partition@600000 { - label = "ubi"; - reg = <0x600000 0x2000000>; - }; - }; - - partition@28c0000 { - label = "firmware_backup"; - reg = <0x28c0000 0x2600000>; - read-only; - }; - - partition@4ec0000 { - label = "CFG"; - reg = <0x4ec0000 0x800000>; - read-only; - }; - - partition@56c0000 { - label = "RAE"; - reg = <0x56c0000 0x400000>; - read-only; - }; - - partition@5ac0000 { - label = "POT"; - reg = <0x5ac0000 0x100000>; - read-only; - }; - - partition@5bc0000 { - label = "Language"; - reg = <0x5bc0000 0x400000>; - read-only; - }; - - partition@5fc0000 { - label = "Traffic"; - reg = <0x5fc0000 0x200000>; - read-only; - }; - - partition@61c0000 { - label = "Cert"; - reg = <0x61c0000 0x100000>; - read-only; - }; - - partition@62c0000 { - label = "NTGRcryptK"; - reg = <0x62c0000 0x100000>; - read-only; - }; - - partition@63c0000 { - label = "NTGRcryptD"; - reg = <0x63c0000 0x500000>; - read-only; - }; - - partition@68c0000 { - label = "LOG"; - reg = <0x68c0000 0x100000>; - read-only; - }; - - partition@69c0000 { - label = "User_data"; - reg = <0x69c0000 0x640000>; - read-only; - }; - - }; - }; -}; - -&spi0 { - pinctrl-names = "default"; - pinctrl-0 = <&spic0_pins>; - status = "okay"; -}; - -&spi1 { - pinctrl-names = "default"; - pinctrl-0 = <&spic1_pins>; - status = "okay"; -}; - -&ssusb { - status = "disabled"; -}; - -&u3phy { - status = "disabled"; -}; - -&uart0 { - pinctrl-names = "default"; - pinctrl-0 = <&uart0_pins>; - status = "okay"; -}; - -&uart2 { - pinctrl-names = "default"; - pinctrl-0 = <&uart2_pins>; - status = "okay"; -}; - -&watchdog { - pinctrl-names = "default"; - pinctrl-0 = <&watchdog_pins>; - status = "okay"; -}; - -&wmac { - mediatek,mtd-eeprom = <&factory 0x0000>; - status = "okay"; -}; - -&wmac1 { - mediatek,mtd-eeprom = <&factory 0x05000>; -}; diff --git a/target/linux/mediatek/image/mt7622.mk b/target/linux/mediatek/image/mt7622.mk index 8b0f24eb5b6382..f9cd18fd418b27 100644 --- a/target/linux/mediatek/image/mt7622.mk +++ b/target/linux/mediatek/image/mt7622.mk @@ -228,33 +228,6 @@ define Device/mediatek_mt7622-rfb1-ubi endef TARGET_DEVICES += mediatek_mt7622-rfb1-ubi -define Device/netgear_wax206 - $(Device/dsa-migration) - DEVICE_VENDOR := NETGEAR - DEVICE_MODEL := WAX206 - DEVICE_DTS := mt7622-netgear-wax206 - DEVICE_DTS_DIR := ../dts - NETGEAR_ENC_MODEL := WAX206 - NETGEAR_ENC_REGION := US - DEVICE_PACKAGES := kmod-mt7915e - UBINIZE_OPTS := -E 5 - BLOCKSIZE := 128k - PAGESIZE := 2048 - KERNEL_SIZE := 6144k - IMAGE_SIZE := 32768k - KERNEL := kernel-bin | lzma | fit lzma $$(KDIR)/image-$$(firstword $$(DEVICE_DTS)).dtb | \ - append-squashfs4-fakeroot -# recovery can also be used with stock firmware web-ui, hence the padding... - KERNEL_INITRAMFS := kernel-bin | lzma | \ - fit lzma $$(KDIR)/image-$$(firstword $$(DEVICE_DTS)).dtb with-initrd | pad-to 128k - KERNEL_INITRAMFS_SUFFIX := -recovery.itb - IMAGES += factory.img - IMAGE/factory.img := append-kernel | pad-to $$(KERNEL_SIZE) | \ - append-ubi | check-size | netgear-encrypted-factory - IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata -endef -TARGET_DEVICES += netgear_wax206 - define Device/ruijie_rg-ew3200gx-pro DEVICE_VENDOR := Ruijie DEVICE_MODEL := RG-EW3200GX PRO diff --git a/target/linux/mediatek/mt7622/base-files/etc/board.d/01_leds b/target/linux/mediatek/mt7622/base-files/etc/board.d/01_leds index 7cb54186fd1e42..5c32918d35cd76 100644 --- a/target/linux/mediatek/mt7622/base-files/etc/board.d/01_leds +++ b/target/linux/mediatek/mt7622/base-files/etc/board.d/01_leds @@ -7,8 +7,7 @@ board_config_update case $board in linksys,e8450|\ -linksys,e8450-ubi|\ -netgear,wax206) +linksys,e8450-ubi) ucidef_set_led_netdev "wan" "WAN" "inet:blue" "wan" ;; xiaomi,redmi-router-ax6s) diff --git a/target/linux/mediatek/mt7622/base-files/etc/board.d/02_network b/target/linux/mediatek/mt7622/base-files/etc/board.d/02_network index 4dc2dc9a12fca1..29f4b875f8b2fe 100644 --- a/target/linux/mediatek/mt7622/base-files/etc/board.d/02_network +++ b/target/linux/mediatek/mt7622/base-files/etc/board.d/02_network @@ -14,8 +14,7 @@ mediatek_setup_interfaces() linksys,e8450-ubi|\ mediatek,mt7622-rfb1|\ mediatek,mt7622-rfb1-ubi|\ - ruijie,rg-ew3200gx-pro|\ - netgear,wax206) + ruijie,rg-ew3200gx-pro) ucidef_set_interfaces_lan_wan "lan1 lan2 lan3 lan4" wan ;; buffalo,wsr-2533dhp2) diff --git a/target/linux/mediatek/mt7622/base-files/lib/upgrade/platform.sh b/target/linux/mediatek/mt7622/base-files/lib/upgrade/platform.sh index ae9590245d1e69..e62eba7ef17f6a 100755 --- a/target/linux/mediatek/mt7622/base-files/lib/upgrade/platform.sh +++ b/target/linux/mediatek/mt7622/base-files/lib/upgrade/platform.sh @@ -34,7 +34,6 @@ platform_do_upgrade() { ;; elecom,wrc-x3200gst3|\ mediatek,mt7622-rfb1-ubi|\ - netgear,wax206|\ totolink,a8000ru|\ xiaomi,redmi-router-ax6s) nand_do_upgrade "$1" @@ -75,9 +74,6 @@ platform_check_image() { xiaomi,redmi-router-ax6s) nand_do_platform_check "$board" "$1" ;; - netgear,wax206) - nand_do_platform_check "${board//,/_}" "$1" - ;; *) [ "$magic" != "d00dfeed" ] && { echo "Invalid image type." diff --git a/target/linux/ramips/patches-5.15/845-pwm-add-mediatek-support.patch b/target/linux/ramips/patches-5.15/845-pwm-add-mediatek-support.patch index 7792b7d63cf56d..06074d6031028e 100644 --- a/target/linux/ramips/patches-5.15/845-pwm-add-mediatek-support.patch +++ b/target/linux/ramips/patches-5.15/845-pwm-add-mediatek-support.patch @@ -41,7 +41,7 @@ Signed-off-by: John Crispin obj-$(CONFIG_PWM_NTXEC) += pwm-ntxec.o --- /dev/null +++ b/drivers/pwm/pwm-mediatek-ramips.c -@@ -0,0 +1,173 @@ +@@ -0,0 +1,175 @@ +/* + * Mediatek Pulse Width Modulator driver + * @@ -190,7 +190,9 @@ Signed-off-by: John Crispin + for (i = 0; i < NUM_PWM; i++) + pwm_disable(&pc->chip.pwms[i]); + -+ return pwmchip_remove(&pc->chip); ++ pwmchip_remove(&pc->chip); ++ ++ return 0; +} + +static const struct of_device_id mtk_pwm_of_match[] = { diff --git a/target/linux/rockchip/armv8/base-files/etc/board.d/01_leds b/target/linux/rockchip/armv8/base-files/etc/board.d/01_leds index 077fcf1d612504..3158ebb91e1b5d 100755 --- a/target/linux/rockchip/armv8/base-files/etc/board.d/01_leds +++ b/target/linux/rockchip/armv8/base-files/etc/board.d/01_leds @@ -27,6 +27,7 @@ friendlyarm,nanopi-r5s) ucidef_set_led_netdev "lan1" "LAN1" "green:lan1" "eth1" ucidef_set_led_netdev "lan2" "LAN2" "green:lan2" "eth2" ;; +hinlink,opc-h66k|\ hinlink,opc-h68k) ucidef_set_led_netdev "wan" "WAN" "blue:net" "eth0" ;; diff --git a/target/linux/rockchip/armv8/base-files/etc/board.d/02_network b/target/linux/rockchip/armv8/base-files/etc/board.d/02_network index a69b2b1d288ec8..d2b7e947f992dc 100755 --- a/target/linux/rockchip/armv8/base-files/etc/board.d/02_network +++ b/target/linux/rockchip/armv8/base-files/etc/board.d/02_network @@ -10,6 +10,7 @@ rockchip_setup_interfaces() case "$board" in ariaboard,photonicat|\ ezpro,mrkaio-m68s|\ + hinlink,opc-h66k|\ friendlyarm,nanopi-r2c|\ friendlyarm,nanopi-r2s|\ friendlyarm,nanopi-r4s|\ @@ -77,6 +78,7 @@ rockchip_setup_macs() case "$board" in ariaboard,photonicat|\ ezpro,mrkaio-m68s|\ + hinlink,opc-h66k|\ hinlink,opc-h68k|\ fastrhino,r66s|\ fastrhino,r68s|\ diff --git a/target/linux/rockchip/files/arch/arm64/boot/dts/rockchip/rk3568-hinlink-opc.dtsi b/target/linux/rockchip/files/arch/arm64/boot/dts/rockchip/rk3568-hinlink-opc.dtsi new file mode 100644 index 00000000000000..b08e6219e0b016 --- /dev/null +++ b/target/linux/rockchip/files/arch/arm64/boot/dts/rockchip/rk3568-hinlink-opc.dtsi @@ -0,0 +1,670 @@ +// SPDX-License-Identifier: (GPL-2.0+ OR MIT) +// Copyright (c) 2022 AmadeusGhost + +#include +#include +#include +#include +#include "rk3568.dtsi" + +/ { + aliases { + mmc0 = &sdmmc0; + mmc1 = &sdhci; + + led-boot = &led_work; + led-failsafe = &led_work; + led-running = &led_work; + led-upgrade = &led_work; + }; + + chosen { + stdout-path = "serial2:1500000n8"; + }; + +#ifdef DTS_NO_LEGACY + hdmi-con { + compatible = "hdmi-connector"; + type = "a"; + + port { + hdmi_con_in: endpoint { + remote-endpoint = <&hdmi_out_con>; + }; + }; + }; +#endif + + keys { + compatible = "gpio-keys"; + pinctrl-0 = <&reset_button_pin>; + pinctrl-names = "default"; + + reset { + label = "reset"; + gpios = <&gpio0 RK_PA0 GPIO_ACTIVE_LOW>; + linux,code = ; + debounce-interval = <50>; + }; + }; + + leds { + compatible = "gpio-leds"; + pinctrl-names = "default"; + pinctrl-0 = <&led_net_en>, <&led_sata_en>, <&led_work_en>; + + net { + label = "blue:net"; + gpios = <&gpio3 RK_PA5 GPIO_ACTIVE_HIGH>; + }; + + sata { + label = "amber:sata"; + gpios = <&gpio3 RK_PA7 GPIO_ACTIVE_HIGH>; + }; + + led_work: work { + label = "green:work"; + gpios = <&gpio3 RK_PB0 GPIO_ACTIVE_HIGH>; + }; + }; + + vcc12v_dcin: vcc12v-dcin { + compatible = "regulator-fixed"; + regulator-always-on; + regulator-boot-on; + regulator-min-microvolt = <12000000>; + regulator-max-microvolt = <12000000>; + regulator-name = "vcc12v_dcin"; + }; + + vcc3v3_sys: vcc3v3-sys { + compatible = "regulator-fixed"; + regulator-always-on; + regulator-boot-on; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + regulator-name = "vcc3v3_sys"; + vin-supply = <&vcc12v_dcin>; + }; + + vcc5v0_sys: vcc5v0-sys { + compatible = "regulator-fixed"; + regulator-always-on; + regulator-boot-on; + regulator-min-microvolt = <5000000>; + regulator-max-microvolt = <5000000>; + regulator-name = "vcc5v0_sys"; + vin-supply = <&vcc12v_dcin>; + }; + + vcc5v0_usb: vcc5v0-usb { + compatible = "regulator-fixed"; + regulator-always-on; + regulator-boot-on; + regulator-min-microvolt = <5000000>; + regulator-max-microvolt = <5000000>; + regulator-name = "vcc5v0_usb"; + vin-supply = <&vcc12v_dcin>; + }; + + vcc5v0_usb_host: vcc5v0-usb-host { + compatible = "regulator-fixed"; + enable-active-high; + gpio = <&gpio0 RK_PA5 GPIO_ACTIVE_HIGH>; + pinctrl-names = "default"; + pinctrl-0 = <&vcc5v0_usb_host_en>; + regulator-min-microvolt = <5000000>; + regulator-max-microvolt = <5000000>; + regulator-name = "vcc5v0_usb_host"; + vin-supply = <&vcc5v0_usb>; + }; + + vcc3v3_pcie: vcc3v3-pcie { + compatible = "regulator-fixed"; + enable-active-high; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + regulator-name = "vcc3v3_pcie"; + startup-delay-us = <5000>; + vin-supply = <&vcc5v0_sys>; + }; + + rk809-sound { + compatible = "simple-audio-card"; + simple-audio-card,format = "i2s"; + simple-audio-card,name = "Analog RK809"; + simple-audio-card,mclk-fs = <256>; + + simple-audio-card,cpu { + sound-dai = <&i2s1_8ch>; + }; + simple-audio-card,codec { + sound-dai = <&rk809>; + }; + }; +}; + +&combphy0 { + status = "okay"; +}; + +&combphy1 { + status = "okay"; +}; + +&combphy2 { + status = "okay"; +}; + +&cpu0 { + cpu-supply = <&vdd_cpu>; +}; + +&cpu1 { + cpu-supply = <&vdd_cpu>; +}; + +&cpu2 { + cpu-supply = <&vdd_cpu>; +}; + +&cpu3 { + cpu-supply = <&vdd_cpu>; +}; + +#ifdef DTS_NO_LEGACY +&gpu { + mali-supply = <&vdd_gpu>; + status = "okay"; +}; + +&hdmi { + avdd-0v9-supply = <&vdda0v9_image>; + avdd-1v8-supply = <&vcca1v8_image>; + status = "okay"; +}; + +&hdmi_in { + hdmi_in_vp0: endpoint { + remote-endpoint = <&vp0_out_hdmi>; + }; +}; + +&hdmi_out { + hdmi_out_con: endpoint { + remote-endpoint = <&hdmi_con_in>; + }; +}; + +&hdmi_sound { + status = "okay"; +}; +#endif + +&i2c0 { + status = "okay"; + + vdd_cpu: regulator@1c { + compatible = "tcs,tcs4525"; + reg = <0x1c>; + fcs,suspend-voltage-selector = <1>; + regulator-name = "vdd_cpu"; + regulator-always-on; + regulator-boot-on; + regulator-min-microvolt = <800000>; + regulator-max-microvolt = <1150000>; + regulator-ramp-delay = <2300>; + vin-supply = <&vcc5v0_sys>; + + regulator-state-mem { + regulator-off-in-suspend; + }; + }; + + rk809: pmic@20 { + compatible = "rockchip,rk809"; + reg = <0x20>; + interrupt-parent = <&gpio0>; + interrupts = ; + assigned-clocks = <&cru I2S1_MCLKOUT_TX>; + assigned-clock-parents = <&cru CLK_I2S1_8CH_TX>; + #clock-cells = <1>; + clock-names = "mclk"; + clocks = <&cru I2S1_MCLKOUT_TX>; + pinctrl-names = "default"; + pinctrl-0 = <&pmic_int>, <&i2s1m0_mclk>; + rockchip,system-power-controller; + #sound-dai-cells = <0>; + wakeup-source; + + vcc1-supply = <&vcc3v3_sys>; + vcc2-supply = <&vcc3v3_sys>; + vcc3-supply = <&vcc3v3_sys>; + vcc4-supply = <&vcc3v3_sys>; + vcc5-supply = <&vcc3v3_sys>; + vcc6-supply = <&vcc3v3_sys>; + vcc7-supply = <&vcc3v3_sys>; + vcc8-supply = <&vcc3v3_sys>; + vcc9-supply = <&vcc3v3_sys>; + + regulators { + vdd_logic: DCDC_REG1 { + regulator-always-on; + regulator-boot-on; + regulator-init-microvolt = <900000>; + regulator-initial-mode = <0x2>; + regulator-min-microvolt = <500000>; + regulator-max-microvolt = <1350000>; + regulator-name = "vdd_logic"; + regulator-ramp-delay = <6001>; + + regulator-state-mem { + regulator-off-in-suspend; + }; + }; + + vdd_gpu: DCDC_REG2 { + regulator-always-on; + regulator-init-microvolt = <900000>; + regulator-initial-mode = <0x2>; + regulator-min-microvolt = <500000>; + regulator-max-microvolt = <1350000>; + regulator-name = "vdd_gpu"; + regulator-ramp-delay = <6001>; + + regulator-state-mem { + regulator-off-in-suspend; + }; + }; + + vcc_ddr: DCDC_REG3 { + regulator-always-on; + regulator-boot-on; + regulator-initial-mode = <0x2>; + regulator-name = "vcc_ddr"; + + regulator-state-mem { + regulator-on-in-suspend; + }; + }; + + vdd_npu: DCDC_REG4 { + regulator-init-microvolt = <900000>; + regulator-initial-mode = <0x2>; + regulator-min-microvolt = <500000>; + regulator-max-microvolt = <1350000>; + regulator-name = "vdd_npu"; + regulator-ramp-delay = <6001>; + + regulator-state-mem { + regulator-off-in-suspend; + }; + }; + + vcc_1v8: DCDC_REG5 { + regulator-always-on; + regulator-boot-on; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + regulator-name = "vcc_1v8"; + + regulator-state-mem { + regulator-off-in-suspend; + }; + }; + + vdda0v9_image: LDO_REG1 { + regulator-name = "vdda0v9_image"; + regulator-min-microvolt = <900000>; + regulator-max-microvolt = <900000>; + + regulator-state-mem { + regulator-off-in-suspend; + }; + }; + + vdda_0v9: LDO_REG2 { + regulator-always-on; + regulator-boot-on; + regulator-min-microvolt = <900000>; + regulator-max-microvolt = <900000>; + regulator-name = "vdda_0v9"; + + regulator-state-mem { + regulator-off-in-suspend; + }; + }; + + vdda0v9_pmu: LDO_REG3 { + regulator-always-on; + regulator-boot-on; + regulator-min-microvolt = <900000>; + regulator-max-microvolt = <900000>; + regulator-name = "vdda0v9_pmu"; + + regulator-state-mem { + regulator-on-in-suspend; + regulator-suspend-microvolt = <900000>; + }; + }; + + vccio_acodec: LDO_REG4 { + regulator-always-on; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + regulator-name = "vccio_acodec"; + + regulator-state-mem { + regulator-off-in-suspend; + }; + }; + + vccio_sd: LDO_REG5 { + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <3300000>; + regulator-name = "vccio_sd"; + + regulator-state-mem { + regulator-off-in-suspend; + }; + }; + + vcc3v3_pmu: LDO_REG6 { + regulator-always-on; + regulator-boot-on; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + regulator-name = "vcc3v3_pmu"; + + regulator-state-mem { + regulator-on-in-suspend; + regulator-suspend-microvolt = <3300000>; + }; + }; + + vcca_1v8: LDO_REG7 { + regulator-always-on; + regulator-boot-on; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + regulator-name = "vcca_1v8"; + + regulator-state-mem { + regulator-off-in-suspend; + }; + }; + + vcca1v8_pmu: LDO_REG8 { + regulator-always-on; + regulator-boot-on; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + regulator-name = "vcca1v8_pmu"; + + regulator-state-mem { + regulator-on-in-suspend; + regulator-suspend-microvolt = <1800000>; + }; + }; + + vcca1v8_image: LDO_REG9 { + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + regulator-name = "vcca1v8_image"; + + regulator-state-mem { + regulator-off-in-suspend; + }; + }; + + vcc_3v3: SWITCH_REG1 { + regulator-name = "vcc_3v3"; + regulator-always-on; + regulator-boot-on; + + regulator-state-mem { + regulator-off-in-suspend; + }; + }; + + vcc3v3_sd: SWITCH_REG2 { + regulator-name = "vcc3v3_sd"; + + regulator-state-mem { + regulator-off-in-suspend; + }; + }; + }; + + codec { + mic-in-differential; + }; + }; +}; + +#ifdef DTS_NO_LEGACY +&i2s0_8ch { + status = "okay"; +}; +#endif + +&i2s1_8ch { + rockchip,trcm-sync-tx-only; + status = "okay"; +}; + +&mdio0 { + rgmii_phy0: ethernet-phy@0 { + compatible = "ethernet-phy-ieee802.3-c22"; + reg = <0x0>; + }; +}; + +&mdio1 { + rgmii_phy1: ethernet-phy@0 { + compatible = "ethernet-phy-ieee802.3-c22"; + reg = <0x0>; + }; +}; + +&pcie2x1 { + reset-gpios = <&gpio2 RK_PD6 GPIO_ACTIVE_HIGH>; + vpcie3v3-supply = <&vcc3v3_pcie>; + status = "okay"; +}; + +&pcie30phy { + data-lanes = <1 2>; + status = "okay"; +}; + +&pcie3x1 { + num-lanes = <1>; + reset-gpios = <&gpio3 RK_PA4 GPIO_ACTIVE_HIGH>; + vpcie3v3-supply = <&vcc3v3_pcie>; + status = "okay"; + + pcie@10 { + reg = <0x00100000 0 0 0 0>; + #address-cells = <3>; + #size-cells = <2>; + + rtl8125_1: pcie-eth@10,0 { + compatible = "pci10ec,8125"; + reg = <0x000000 0 0 0 0>; + }; + }; +}; + +&pcie3x2 { + num-lanes = <1>; + reset-gpios = <&gpio2 RK_PD0 GPIO_ACTIVE_HIGH>; + vpcie3v3-supply = <&vcc3v3_pcie>; + status = "okay"; + + pcie@20 { + reg = <0x00200000 0 0 0 0>; + #address-cells = <3>; + #size-cells = <2>; + + rtl8125_2: pcie-eth@20,0 { + compatible = "pci10ec,8125"; + reg = <0x000000 0 0 0 0>; + }; + }; +}; + +&pinctrl { + button { + reset_button_pin: reset-button-pin { + rockchip,pins = <0 RK_PA0 RK_FUNC_GPIO &pcfg_pull_up>; + }; + }; + + leds { + led_net_en: led_net_en { + rockchip,pins = <3 RK_PA5 RK_FUNC_GPIO &pcfg_pull_none>; + }; + + led_sata_en: led_sata_en { + rockchip,pins = <3 RK_PA7 RK_FUNC_GPIO &pcfg_pull_none>; + }; + + led_work_en: led_work_en { + rockchip,pins = <3 RK_PB0 RK_FUNC_GPIO &pcfg_pull_none>; + }; + }; + + pmic { + pmic_int: pmic_int { + rockchip,pins = <0 RK_PA3 RK_FUNC_GPIO &pcfg_pull_up>; + }; + }; + + usb { + vcc5v0_usb_host_en: vcc5v0_usb_host_en { + rockchip,pins = <0 RK_PA5 RK_FUNC_GPIO &pcfg_pull_none>; + }; + }; +}; + +&pmu_io_domains { + pmuio1-supply = <&vcc3v3_pmu>; + pmuio2-supply = <&vcc3v3_pmu>; + vccio1-supply = <&vccio_acodec>; + vccio2-supply = <&vcc_1v8>; + vccio3-supply = <&vccio_sd>; + vccio4-supply = <&vcc_1v8>; + vccio5-supply = <&vcc_3v3>; + vccio6-supply = <&vcc_1v8>; + vccio7-supply = <&vcc_3v3>; + status = "okay"; +}; + +&rng { + status = "okay"; +}; + +&saradc { + vref-supply = <&vcca_1v8>; + status = "okay"; +}; + +&sata0 { + status = "okay"; +}; + +&sdhci { + bus-width = <8>; + max-frequency = <200000000>; + non-removable; + pinctrl-names = "default"; + pinctrl-0 = <&emmc_bus8 &emmc_clk &emmc_cmd &emmc_datastrobe>; + status = "okay"; +}; + +&sdmmc0 { + bus-width = <4>; + cap-sd-highspeed; + cd-gpios = <&gpio0 RK_PA4 GPIO_ACTIVE_LOW>; + disable-wp; + pinctrl-names = "default"; + pinctrl-0 = <&sdmmc0_bus4 &sdmmc0_clk &sdmmc0_cmd &sdmmc0_det>; + sd-uhs-sdr104; + vmmc-supply = <&vcc3v3_sd>; + vqmmc-supply = <&vccio_sd>; + status = "okay"; +}; + +&tsadc { + rockchip,hw-tshut-mode = <1>; + rockchip,hw-tshut-polarity = <0>; + status = "okay"; +}; + +&uart2 { + status = "okay"; +}; + +&usb_host0_ehci { + status = "okay"; +}; + +&usb_host0_ohci { + status = "okay"; +}; + +&usb_host1_ehci { + status = "okay"; +}; + +&usb_host1_ohci { + status = "okay"; +}; + +&usb_host1_xhci { + status = "okay"; +}; + +&usb2phy0 { + status = "okay"; +}; + +&usb2phy0_host { + phy-supply = <&vcc5v0_usb_host>; + status = "okay"; +}; + +&usb2phy1 { + status = "okay"; +}; + +&usb2phy1_host { + phy-supply = <&vcc5v0_usb_host>; + status = "okay"; +}; + +&usb2phy1_otg { + phy-supply = <&vcc5v0_usb_host>; + status = "okay"; +}; + +#ifdef DTS_NO_LEGACY +&vop { + assigned-clocks = <&cru DCLK_VOP0>, <&cru DCLK_VOP1>; + assigned-clock-parents = <&pmucru PLL_HPLL>, <&cru PLL_VPLL>; + status = "okay"; +}; + +&vop_mmu { + status = "okay"; +}; + +&vp0 { + vp0_out_hdmi: endpoint@ROCKCHIP_VOP2_EP_HDMI0 { + reg = ; + remote-endpoint = <&hdmi_in_vp0>; + }; +}; +#endif diff --git a/target/linux/rockchip/files/arch/arm64/boot/dts/rockchip/rk3568-opc-h66k.dts b/target/linux/rockchip/files/arch/arm64/boot/dts/rockchip/rk3568-opc-h66k.dts new file mode 100644 index 00000000000000..d0529275bd2f51 --- /dev/null +++ b/target/linux/rockchip/files/arch/arm64/boot/dts/rockchip/rk3568-opc-h66k.dts @@ -0,0 +1,19 @@ +// SPDX-License-Identifier: (GPL-2.0+ OR MIT) + +/dts-v1/; + +#include "rk3568-hinlink-opc.dtsi" + +/ { + model = "HINLINK OPC-H66K Board"; + compatible = "hinlink,opc-h66k", "rockchip,rk3568"; + + aliases { + ethernet0 = &rtl8125_1; + ethernet1 = &rtl8125_2; + }; +}; + +&vcc3v3_pcie { + gpio = <&gpio0 RK_PC4 GPIO_ACTIVE_HIGH>; +}; diff --git a/target/linux/rockchip/files/arch/arm64/boot/dts/rockchip/rk3568-opc-h68k.dts b/target/linux/rockchip/files/arch/arm64/boot/dts/rockchip/rk3568-opc-h68k.dts index 6e276f0b4763c5..c76c1bd896328a 100644 --- a/target/linux/rockchip/files/arch/arm64/boot/dts/rockchip/rk3568-opc-h68k.dts +++ b/target/linux/rockchip/files/arch/arm64/boot/dts/rockchip/rk3568-opc-h68k.dts @@ -3,11 +3,7 @@ /dts-v1/; -#include -#include -#include -#include -#include "rk3568.dtsi" +#include "rk3568-hinlink-opc.dtsi" / { model = "HINLINK OPC-H68K Board"; @@ -16,169 +12,7 @@ aliases { ethernet0 = &gmac0; ethernet1 = &gmac1; - mmc0 = &sdmmc0; - mmc1 = &sdhci; - - led-boot = &led_work; - led-failsafe = &led_work; - led-running = &led_work; - led-upgrade = &led_work; - }; - - chosen { - stdout-path = "serial2:1500000n8"; - }; - -#ifdef DTS_NO_LEGACY - hdmi-con { - compatible = "hdmi-connector"; - type = "a"; - - port { - hdmi_con_in: endpoint { - remote-endpoint = <&hdmi_out_con>; - }; - }; - }; -#endif - - keys { - compatible = "gpio-keys"; - pinctrl-0 = <&reset_button_pin>; - pinctrl-names = "default"; - - reset { - label = "reset"; - gpios = <&gpio0 RK_PA0 GPIO_ACTIVE_LOW>; - linux,code = ; - debounce-interval = <50>; - }; - }; - - leds { - compatible = "gpio-leds"; - pinctrl-names = "default"; - pinctrl-0 = <&led_net_en>, <&led_sata_en>, <&led_work_en>; - - net { - label = "blue:net"; - gpios = <&gpio3 RK_PA5 GPIO_ACTIVE_HIGH>; - }; - - sata { - label = "amber:sata"; - gpios = <&gpio3 RK_PA7 GPIO_ACTIVE_HIGH>; - }; - - led_work: work { - label = "green:work"; - gpios = <&gpio3 RK_PB0 GPIO_ACTIVE_HIGH>; - }; - }; - - vcc12v_dcin: vcc12v-dcin { - compatible = "regulator-fixed"; - regulator-always-on; - regulator-boot-on; - regulator-min-microvolt = <12000000>; - regulator-max-microvolt = <12000000>; - regulator-name = "vcc12v_dcin"; - }; - - vcc3v3_sys: vcc3v3-sys { - compatible = "regulator-fixed"; - regulator-always-on; - regulator-boot-on; - regulator-min-microvolt = <3300000>; - regulator-max-microvolt = <3300000>; - regulator-name = "vcc3v3_sys"; - vin-supply = <&vcc12v_dcin>; - }; - - vcc5v0_sys: vcc5v0-sys { - compatible = "regulator-fixed"; - regulator-always-on; - regulator-boot-on; - regulator-min-microvolt = <5000000>; - regulator-max-microvolt = <5000000>; - regulator-name = "vcc5v0_sys"; - vin-supply = <&vcc12v_dcin>; - }; - - vcc5v0_usb: vcc5v0-usb { - compatible = "regulator-fixed"; - regulator-always-on; - regulator-boot-on; - regulator-min-microvolt = <5000000>; - regulator-max-microvolt = <5000000>; - regulator-name = "vcc5v0_usb"; - vin-supply = <&vcc12v_dcin>; - }; - - vcc5v0_usb_host: vcc5v0-usb-host { - compatible = "regulator-fixed"; - enable-active-high; - gpio = <&gpio0 RK_PA5 GPIO_ACTIVE_HIGH>; - pinctrl-names = "default"; - pinctrl-0 = <&vcc5v0_usb_host_en>; - regulator-min-microvolt = <5000000>; - regulator-max-microvolt = <5000000>; - regulator-name = "vcc5v0_usb_host"; - vin-supply = <&vcc5v0_usb>; - }; - - vcc3v3_pcie: gpio-regulator { - compatible = "regulator-fixed"; - enable-active-high; - gpio = <&gpio2 RK_PD2 GPIO_ACTIVE_HIGH>; - regulator-min-microvolt = <3300000>; - regulator-max-microvolt = <3300000>; - regulator-name = "vcc3v3_pcie"; - startup-delay-us = <5000>; - vin-supply = <&vcc5v0_sys>; }; - - rk809-sound { - compatible = "simple-audio-card"; - simple-audio-card,format = "i2s"; - simple-audio-card,name = "Analog RK809"; - simple-audio-card,mclk-fs = <256>; - - simple-audio-card,cpu { - sound-dai = <&i2s1_8ch>; - }; - simple-audio-card,codec { - sound-dai = <&rk809>; - }; - }; -}; - -&combphy0 { - status = "okay"; -}; - -&combphy1 { - status = "okay"; -}; - -&combphy2 { - status = "okay"; -}; - -&cpu0 { - cpu-supply = <&vdd_cpu>; -}; - -&cpu1 { - cpu-supply = <&vdd_cpu>; -}; - -&cpu2 { - cpu-supply = <&vdd_cpu>; -}; - -&cpu3 { - cpu-supply = <&vdd_cpu>; }; &gmac0 { @@ -223,497 +57,6 @@ status = "okay"; }; -#ifdef DTS_NO_LEGACY -&gpu { - mali-supply = <&vdd_gpu>; - status = "okay"; -}; - -&hdmi { - avdd-0v9-supply = <&vdda0v9_image>; - avdd-1v8-supply = <&vcca1v8_image>; - status = "okay"; -}; - -&hdmi_in { - hdmi_in_vp0: endpoint { - remote-endpoint = <&vp0_out_hdmi>; - }; -}; - -&hdmi_out { - hdmi_out_con: endpoint { - remote-endpoint = <&hdmi_con_in>; - }; -}; - -&hdmi_sound { - status = "okay"; -}; -#endif - -&i2c0 { - status = "okay"; - - vdd_cpu: regulator@1c { - compatible = "tcs,tcs4525"; - reg = <0x1c>; - fcs,suspend-voltage-selector = <1>; - regulator-name = "vdd_cpu"; - regulator-always-on; - regulator-boot-on; - regulator-min-microvolt = <800000>; - regulator-max-microvolt = <1150000>; - regulator-ramp-delay = <2300>; - vin-supply = <&vcc5v0_sys>; - - regulator-state-mem { - regulator-off-in-suspend; - }; - }; - - rk809: pmic@20 { - compatible = "rockchip,rk809"; - reg = <0x20>; - interrupt-parent = <&gpio0>; - interrupts = ; - assigned-clocks = <&cru I2S1_MCLKOUT_TX>; - assigned-clock-parents = <&cru CLK_I2S1_8CH_TX>; - #clock-cells = <1>; - clock-names = "mclk"; - clocks = <&cru I2S1_MCLKOUT_TX>; - pinctrl-names = "default"; - pinctrl-0 = <&pmic_int>, <&i2s1m0_mclk>; - rockchip,system-power-controller; - #sound-dai-cells = <0>; - wakeup-source; - - vcc1-supply = <&vcc3v3_sys>; - vcc2-supply = <&vcc3v3_sys>; - vcc3-supply = <&vcc3v3_sys>; - vcc4-supply = <&vcc3v3_sys>; - vcc5-supply = <&vcc3v3_sys>; - vcc6-supply = <&vcc3v3_sys>; - vcc7-supply = <&vcc3v3_sys>; - vcc8-supply = <&vcc3v3_sys>; - vcc9-supply = <&vcc3v3_sys>; - - regulators { - vdd_logic: DCDC_REG1 { - regulator-always-on; - regulator-boot-on; - regulator-init-microvolt = <900000>; - regulator-initial-mode = <0x2>; - regulator-min-microvolt = <500000>; - regulator-max-microvolt = <1350000>; - regulator-name = "vdd_logic"; - regulator-ramp-delay = <6001>; - - regulator-state-mem { - regulator-off-in-suspend; - }; - }; - - vdd_gpu: DCDC_REG2 { - regulator-always-on; - regulator-init-microvolt = <900000>; - regulator-initial-mode = <0x2>; - regulator-min-microvolt = <500000>; - regulator-max-microvolt = <1350000>; - regulator-name = "vdd_gpu"; - regulator-ramp-delay = <6001>; - - regulator-state-mem { - regulator-off-in-suspend; - }; - }; - - vcc_ddr: DCDC_REG3 { - regulator-always-on; - regulator-boot-on; - regulator-initial-mode = <0x2>; - regulator-name = "vcc_ddr"; - - regulator-state-mem { - regulator-on-in-suspend; - }; - }; - - vdd_npu: DCDC_REG4 { - regulator-init-microvolt = <900000>; - regulator-initial-mode = <0x2>; - regulator-min-microvolt = <500000>; - regulator-max-microvolt = <1350000>; - regulator-name = "vdd_npu"; - regulator-ramp-delay = <6001>; - - regulator-state-mem { - regulator-off-in-suspend; - }; - }; - - vcc_1v8: DCDC_REG5 { - regulator-always-on; - regulator-boot-on; - regulator-min-microvolt = <1800000>; - regulator-max-microvolt = <1800000>; - regulator-name = "vcc_1v8"; - - regulator-state-mem { - regulator-off-in-suspend; - }; - }; - - vdda0v9_image: LDO_REG1 { - regulator-name = "vdda0v9_image"; - regulator-min-microvolt = <900000>; - regulator-max-microvolt = <900000>; - - regulator-state-mem { - regulator-off-in-suspend; - }; - }; - - vdda_0v9: LDO_REG2 { - regulator-always-on; - regulator-boot-on; - regulator-min-microvolt = <900000>; - regulator-max-microvolt = <900000>; - regulator-name = "vdda_0v9"; - - regulator-state-mem { - regulator-off-in-suspend; - }; - }; - - vdda0v9_pmu: LDO_REG3 { - regulator-always-on; - regulator-boot-on; - regulator-min-microvolt = <900000>; - regulator-max-microvolt = <900000>; - regulator-name = "vdda0v9_pmu"; - - regulator-state-mem { - regulator-on-in-suspend; - regulator-suspend-microvolt = <900000>; - }; - }; - - vccio_acodec: LDO_REG4 { - regulator-always-on; - regulator-min-microvolt = <3300000>; - regulator-max-microvolt = <3300000>; - regulator-name = "vccio_acodec"; - - regulator-state-mem { - regulator-off-in-suspend; - }; - }; - - vccio_sd: LDO_REG5 { - regulator-min-microvolt = <1800000>; - regulator-max-microvolt = <3300000>; - regulator-name = "vccio_sd"; - - regulator-state-mem { - regulator-off-in-suspend; - }; - }; - - vcc3v3_pmu: LDO_REG6 { - regulator-always-on; - regulator-boot-on; - regulator-min-microvolt = <3300000>; - regulator-max-microvolt = <3300000>; - regulator-name = "vcc3v3_pmu"; - - regulator-state-mem { - regulator-on-in-suspend; - regulator-suspend-microvolt = <3300000>; - }; - }; - - vcca_1v8: LDO_REG7 { - regulator-always-on; - regulator-boot-on; - regulator-min-microvolt = <1800000>; - regulator-max-microvolt = <1800000>; - regulator-name = "vcca_1v8"; - - regulator-state-mem { - regulator-off-in-suspend; - }; - }; - - vcca1v8_pmu: LDO_REG8 { - regulator-always-on; - regulator-boot-on; - regulator-min-microvolt = <1800000>; - regulator-max-microvolt = <1800000>; - regulator-name = "vcca1v8_pmu"; - - regulator-state-mem { - regulator-on-in-suspend; - regulator-suspend-microvolt = <1800000>; - }; - }; - - vcca1v8_image: LDO_REG9 { - regulator-min-microvolt = <1800000>; - regulator-max-microvolt = <1800000>; - regulator-name = "vcca1v8_image"; - - regulator-state-mem { - regulator-off-in-suspend; - }; - }; - - vcc_3v3: SWITCH_REG1 { - regulator-name = "vcc_3v3"; - regulator-always-on; - regulator-boot-on; - - regulator-state-mem { - regulator-off-in-suspend; - }; - }; - - vcc3v3_sd: SWITCH_REG2 { - regulator-name = "vcc3v3_sd"; - - regulator-state-mem { - regulator-off-in-suspend; - }; - }; - }; - - codec { - mic-in-differential; - }; - }; -}; - -#ifdef DTS_NO_LEGACY -&i2s0_8ch { - status = "okay"; -}; -#endif - -&i2s1_8ch { - rockchip,trcm-sync-tx-only; - status = "okay"; -}; - -&mdio0 { - rgmii_phy0: ethernet-phy@0 { - compatible = "ethernet-phy-ieee802.3-c22"; - reg = <0x0>; - }; -}; - -&mdio1 { - rgmii_phy1: ethernet-phy@0 { - compatible = "ethernet-phy-ieee802.3-c22"; - reg = <0x0>; - }; -}; - -&pcie2x1 { - reset-gpios = <&gpio2 RK_PD6 GPIO_ACTIVE_HIGH>; - vpcie3v3-supply = <&vcc3v3_pcie>; - status = "okay"; -}; - -&pcie30phy { - data-lanes = <1 2>; - status = "okay"; -}; - -&pcie3x1 { - num-lanes = <1>; - reset-gpios = <&gpio3 RK_PA4 GPIO_ACTIVE_HIGH>; - vpcie3v3-supply = <&vcc3v3_pcie>; - status = "okay"; - - pcie@10 { - reg = <0x00100000 0 0 0 0>; - #address-cells = <3>; - #size-cells = <2>; - - rtl8125_1: pcie-eth@10,0 { - compatible = "pci10ec,8125"; - reg = <0x000000 0 0 0 0>; - }; - }; -}; - -&pcie3x2 { - num-lanes = <1>; - reset-gpios = <&gpio2 RK_PD0 GPIO_ACTIVE_HIGH>; - vpcie3v3-supply = <&vcc3v3_pcie>; - status = "okay"; - - pcie@20 { - reg = <0x00200000 0 0 0 0>; - #address-cells = <3>; - #size-cells = <2>; - - rtl8125_2: pcie-eth@20,0 { - compatible = "pci10ec,8125"; - reg = <0x000000 0 0 0 0>; - }; - }; -}; - -&pinctrl { - button { - reset_button_pin: reset-button-pin { - rockchip,pins = <0 RK_PA0 RK_FUNC_GPIO &pcfg_pull_up>; - }; - }; - - leds { - led_net_en: led_net_en { - rockchip,pins = <3 RK_PA5 RK_FUNC_GPIO &pcfg_pull_none>; - }; - - led_sata_en: led_sata_en { - rockchip,pins = <3 RK_PA7 RK_FUNC_GPIO &pcfg_pull_none>; - }; - - led_work_en: led_work_en { - rockchip,pins = <3 RK_PB0 RK_FUNC_GPIO &pcfg_pull_none>; - }; - }; - - pmic { - pmic_int: pmic_int { - rockchip,pins = <0 RK_PA3 RK_FUNC_GPIO &pcfg_pull_up>; - }; - }; - - usb { - vcc5v0_usb_host_en: vcc5v0_usb_host_en { - rockchip,pins = <0 RK_PA5 RK_FUNC_GPIO &pcfg_pull_none>; - }; - }; -}; - -&pmu_io_domains { - pmuio1-supply = <&vcc3v3_pmu>; - pmuio2-supply = <&vcc3v3_pmu>; - vccio1-supply = <&vccio_acodec>; - vccio2-supply = <&vcc_1v8>; - vccio3-supply = <&vccio_sd>; - vccio4-supply = <&vcc_1v8>; - vccio5-supply = <&vcc_3v3>; - vccio6-supply = <&vcc_1v8>; - vccio7-supply = <&vcc_3v3>; - status = "okay"; -}; - -&rng { - status = "okay"; -}; - -&saradc { - vref-supply = <&vcca_1v8>; - status = "okay"; -}; - -&sata0 { - status = "okay"; -}; - -&sdhci { - bus-width = <8>; - max-frequency = <200000000>; - non-removable; - pinctrl-names = "default"; - pinctrl-0 = <&emmc_bus8 &emmc_clk &emmc_cmd &emmc_datastrobe>; - status = "okay"; -}; - -&sdmmc0 { - bus-width = <4>; - cap-sd-highspeed; - cd-gpios = <&gpio0 RK_PA4 GPIO_ACTIVE_LOW>; - disable-wp; - pinctrl-names = "default"; - pinctrl-0 = <&sdmmc0_bus4 &sdmmc0_clk &sdmmc0_cmd &sdmmc0_det>; - vmmc-supply = <&vcc3v3_sd>; - vqmmc-supply = <&vccio_sd>; - status = "okay"; -}; - -&tsadc { - rockchip,hw-tshut-mode = <1>; - rockchip,hw-tshut-polarity = <0>; - status = "okay"; -}; - -&uart2 { - status = "okay"; -}; - -&usb_host0_ehci { - status = "okay"; -}; - -&usb_host0_ohci { - status = "okay"; -}; - -&usb_host1_ehci { - status = "okay"; -}; - -&usb_host1_ohci { - status = "okay"; -}; - -&usb_host1_xhci { - status = "okay"; -}; - -&usb2phy0 { - status = "okay"; -}; - -&usb2phy0_host { - phy-supply = <&vcc5v0_usb_host>; - status = "okay"; -}; - -&usb2phy1 { - status = "okay"; -}; - -&usb2phy1_host { - phy-supply = <&vcc5v0_usb_host>; - status = "okay"; -}; - -&usb2phy1_otg { - phy-supply = <&vcc5v0_usb_host>; - status = "okay"; -}; - -#ifdef DTS_NO_LEGACY -&vop { - assigned-clocks = <&cru DCLK_VOP0>, <&cru DCLK_VOP1>; - assigned-clock-parents = <&pmucru PLL_HPLL>, <&cru PLL_VPLL>; - status = "okay"; -}; - -&vop_mmu { - status = "okay"; -}; - -&vp0 { - vp0_out_hdmi: endpoint@ROCKCHIP_VOP2_EP_HDMI0 { - reg = ; - remote-endpoint = <&hdmi_in_vp0>; - }; +&vcc3v3_pcie { + gpio = <&gpio2 RK_PD2 GPIO_ACTIVE_HIGH>; }; -#endif diff --git a/target/linux/rockchip/image/armv8.mk b/target/linux/rockchip/image/armv8.mk index 3ef8f3d869b42d..29910d02155e06 100644 --- a/target/linux/rockchip/image/armv8.mk +++ b/target/linux/rockchip/image/armv8.mk @@ -12,14 +12,24 @@ define Device/ezpro_mrkaio-m68s endef TARGET_DEVICES += ezpro_mrkaio-m68s -define Device/hinlink_opc-h68k +define Device/hinlink_common DEVICE_VENDOR := HINLINK - DEVICE_MODEL := OPC-H68K SOC := rk3568 UBOOT_DEVICE_NAME := opc-h68k-rk3568 IMAGE/sysupgrade.img.gz := boot-common | boot-script nanopi-r5s | pine64-img | gzip | append-metadata DEVICE_PACKAGES := kmod-ata-ahci-platform kmod-mt7921e kmod-r8125 wpad-openssl endef + +define Device/hinlink_opc-h66k +$(call Device/hinlink_common) + DEVICE_MODEL := OPC-H66K +endef +TARGET_DEVICES += hinlink_opc-h66k + +define Device/hinlink_opc-h68k +$(call Device/hinlink_common) + DEVICE_MODEL := OPC-H68K +endef TARGET_DEVICES += hinlink_opc-h68k define Device/fastrhino_common diff --git a/target/linux/rockchip/patches-5.15/210-rockchip-rk356x-add-support-for-new-boards.patch b/target/linux/rockchip/patches-5.15/210-rockchip-rk356x-add-support-for-new-boards.patch index 76a8de794429b9..7f0a1576f929e6 100644 --- a/target/linux/rockchip/patches-5.15/210-rockchip-rk356x-add-support-for-new-boards.patch +++ b/target/linux/rockchip/patches-5.15/210-rockchip-rk356x-add-support-for-new-boards.patch @@ -1,12 +1,13 @@ --- a/arch/arm64/boot/dts/rockchip/Makefile +++ b/arch/arm64/boot/dts/rockchip/Makefile -@@ -59,3 +59,11 @@ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-sa +@@ -59,3 +59,12 @@ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-sa dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-sapphire-excavator.dtb dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399pro-rock-pi-n10.dtb dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-evb1-v10.dtb +dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-mrkaio-m68s.dtb +dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-nanopi-r5s.dtb +dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-radxa-e25.dtb ++dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-opc-h66k.dtb +dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-opc-h68k.dtb +dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-rock-3a.dtb +dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-roc-pc.dtb diff --git a/target/linux/rockchip/patches-6.1/210-rockchip-rk356x-add-support-for-new-boards.patch b/target/linux/rockchip/patches-6.1/210-rockchip-rk356x-add-support-for-new-boards.patch index 34af7a70179b69..6a9df96c15e9e3 100644 --- a/target/linux/rockchip/patches-6.1/210-rockchip-rk356x-add-support-for-new-boards.patch +++ b/target/linux/rockchip/patches-6.1/210-rockchip-rk356x-add-support-for-new-boards.patch @@ -1,12 +1,13 @@ --- a/arch/arm64/boot/dts/rockchip/Makefile +++ b/arch/arm64/boot/dts/rockchip/Makefile -@@ -79,3 +79,10 @@ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3566-so +@@ -79,3 +79,11 @@ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3566-so dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-bpi-r2-pro.dtb dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-evb1-v10.dtb dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-rock-3a.dtb +dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-radxa-e25.dtb +dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-mrkaio-m68s.dtb +dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-nanopi-r5s.dtb ++dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-opc-h66k.dtb +dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-opc-h68k.dtb +dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-r66s.dtb +dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-r68s.dtb