From 8f21d26411f25a846de18873ae9611c377648e81 Mon Sep 17 00:00:00 2001 From: Kenneth Kasilag Date: Wed, 3 Jun 2026 03:08:32 +0000 Subject: [PATCH] airoha: 6.18: refresh patches Refreshed automatically with `make target/linux/refresh V=s`. Signed-off-by: Kenneth Kasilag Link: https://github.com/openwrt/openwrt/pull/21019 Signed-off-by: Jonas Jelonek --- ...issing-stats-to-ethtool_eth_mac_stat.patch | 2 +- ...airoha-Add-get_link-ethtool-callback.patch | 2 +- ...emove-airoha_ppe_is_enabled-where-no.patch | 6 +-- ...onfigure-SRAM-PPE-entries-via-the-cp.patch | 4 +- ...lush-PPE-SRAM-table-during-PPE-setup.patch | 6 +-- ...t-default-ppe-cpu-port-in-airoha_dev.patch | 8 ++-- ...o-not-use-magic-numbers-in-airoha_pp.patch | 2 +- ...a-npu-Add-airoha_npu_soc_data-struct.patch | 6 +-- ...-net-airoha-npu-Add-7583-SoC-support.patch | 4 +- ...wm-airoha-Add-support-for-EN7581-SoC.patch | 4 +- ...eneralize-pins-group-function-confs-.patch | 34 ++++++++--------- ...airoha-convert-PHY-LED-GPIO-to-macro.patch | 4 +- ...trl-airoha-convert-PWM-GPIO-to-macro.patch | 4 +- ...a-add-support-for-Airoha-AN7583-PINs.patch | 38 +++++++++---------- ...ha-Fix-AIROHA_PINCTRL_CONFS_DRIVE_E2.patch | 2 +- ...oha-npu-Dump-fw-version-during-probe.patch | 6 +-- ...-airoha-implement-get_link_ksettings.patch | 2 +- ...dd-the-capability-to-read-firmware-n.patch | 4 +- ...-__field_prep-for-non-constant-masks.patch | 6 +-- ...flow-control-source-port-mapping-dep.patch | 2 +- ...GDM-forward-port-configuration-in-nd.patch | 14 +++---- ...t-QDMA-block-according-LAN-WAN-confi.patch | 22 +++++------ ...mediatek-enable-interrupts-on-AN7581.patch | 2 +- ...-PPE-default-cput-port-in-airoha_ppe.patch | 16 ++++---- ...-offloading-until-all-net_devices-ar.patch | 4 +- ...on-net_device-pointer-in-airoha_dev_.patch | 8 ++-- ...on-net_device-pointer-in-HTB-callbac.patch | 12 +++--- ...on-net_device-pointer-in-ETS-callbac.patch | 12 +++--- ...ypo-in-airoha_set_gdm2_loopback-rout.patch | 4 +- ...PE-cpu-port-configuration-for-GDM2-l.patch | 14 +++---- ...e-get_src_port_id-callback-in-get_sp.patch | 10 ++--- ...gure-QoS-channel-for-HW-accelerated-.patch | 4 +- ...AFE-and-I2S-driver-for-Airoha-AN7581.patch | 4 +- ...Add-documentation-for-Airoha-AN7581-.patch | 2 +- ...dd-support-for-Airoha-AN7581-USB-PHY.patch | 2 +- ...-gen3-set-PHY-mode-for-Airoha-EN7581.patch | 2 +- ...k-airoha-Add-reset-support-to-EN7523.patch | 6 +-- ...et-pcs-airoha-add-support-for-AN7583.patch | 18 ++++----- ...dd-support-for-optional-xfi-reset-li.patch | 2 +- ...-add-PHY_DETACH_NO_HW_RESET-PHY-flag.patch | 6 +-- .../886-uart-add-en7523-support.patch | 16 ++++---- .../901-snand-mtk-bmt-support.patch | 8 ++-- ...dd-x2-link-support-for-Airoha-EN7581.patch | 10 ++--- ...atek-gen3-fix-x2-mode-PERST-deassert.patch | 2 - ...w-QoS-parameter-according-to-the-pac.patch | 12 +++--- ...airoha_qdma-pointer-in-airoha_gdm_de.patch | 4 +- ...on-airoha_gdm_dev-pointer-in-airoha_.patch | 2 +- ...net-airoha-Introduce-WAN-device-flag.patch | 2 +- ...rt-multiple-LAN-WAN-interfaces-for-h.patch | 2 +- 49 files changed, 178 insertions(+), 190 deletions(-) diff --git a/target/linux/airoha/patches-6.18/096-v6.19-net-airoha-Add-missing-stats-to-ethtool_eth_mac_stat.patch b/target/linux/airoha/patches-6.18/096-v6.19-net-airoha-Add-missing-stats-to-ethtool_eth_mac_stat.patch index c6b7541732..010b4fe6a4 100644 --- a/target/linux/airoha/patches-6.18/096-v6.19-net-airoha-Add-missing-stats-to-ethtool_eth_mac_stat.patch +++ b/target/linux/airoha/patches-6.18/096-v6.19-net-airoha-Add-missing-stats-to-ethtool_eth_mac_stat.patch @@ -19,7 +19,7 @@ Signed-off-by: Jakub Kicinski --- a/drivers/net/ethernet/airoha/airoha_eth.c +++ b/drivers/net/ethernet/airoha/airoha_eth.c -@@ -2048,8 +2048,12 @@ static void airoha_ethtool_get_mac_stats +@@ -2160,8 +2160,12 @@ static void airoha_ethtool_get_mac_stats airoha_update_hw_stats(port); do { start = u64_stats_fetch_begin(&port->stats.syncp); diff --git a/target/linux/airoha/patches-6.18/097-v6.19-net-airoha-Add-get_link-ethtool-callback.patch b/target/linux/airoha/patches-6.18/097-v6.19-net-airoha-Add-get_link-ethtool-callback.patch index 4754e2dfb4..6ceae92cd2 100644 --- a/target/linux/airoha/patches-6.18/097-v6.19-net-airoha-Add-get_link-ethtool-callback.patch +++ b/target/linux/airoha/patches-6.18/097-v6.19-net-airoha-Add-get_link-ethtool-callback.patch @@ -15,7 +15,7 @@ Signed-off-by: Jakub Kicinski --- a/drivers/net/ethernet/airoha/airoha_eth.c +++ b/drivers/net/ethernet/airoha/airoha_eth.c -@@ -2796,6 +2796,7 @@ static const struct ethtool_ops airoha_e +@@ -2908,6 +2908,7 @@ static const struct ethtool_ops airoha_e .get_drvinfo = airoha_ethtool_get_drvinfo, .get_eth_mac_stats = airoha_ethtool_get_mac_stats, .get_rmon_stats = airoha_ethtool_get_rmon_stats, diff --git a/target/linux/airoha/patches-6.18/099-06-v6.19-net-airoha-ppe-Remove-airoha_ppe_is_enabled-where-no.patch b/target/linux/airoha/patches-6.18/099-06-v6.19-net-airoha-ppe-Remove-airoha_ppe_is_enabled-where-no.patch index 18b92fb50d..bdbf1d9ae0 100644 --- a/target/linux/airoha/patches-6.18/099-06-v6.19-net-airoha-ppe-Remove-airoha_ppe_is_enabled-where-no.patch +++ b/target/linux/airoha/patches-6.18/099-06-v6.19-net-airoha-ppe-Remove-airoha_ppe_is_enabled-where-no.patch @@ -18,7 +18,7 @@ Signed-off-by: Paolo Abeni --- a/drivers/net/ethernet/airoha/airoha_ppe.c +++ b/drivers/net/ethernet/airoha/airoha_ppe.c -@@ -514,10 +514,8 @@ static int airoha_ppe_foe_get_flow_stats +@@ -527,10 +527,8 @@ static int airoha_ppe_foe_get_flow_stats if (ppe_num_stats_entries < 0) return ppe_num_stats_entries; @@ -31,7 +31,7 @@ Signed-off-by: Paolo Abeni return 0; } -@@ -607,13 +605,11 @@ airoha_ppe_foe_get_entry_locked(struct a +@@ -620,13 +618,11 @@ airoha_ppe_foe_get_entry_locked(struct a if (hash < sram_num_entries) { u32 *hwe = ppe->foe + hash * sizeof(struct airoha_foe_entry); @@ -46,7 +46,7 @@ Signed-off-by: Paolo Abeni airoha_fe_wr(ppe->eth, REG_PPE_RAM_CTRL(ppe2), FIELD_PREP(PPE_SRAM_CTRL_ENTRY_MASK, hash) | PPE_SRAM_CTRL_REQ_MASK); -@@ -691,8 +687,7 @@ static int airoha_ppe_foe_commit_entry(s +@@ -704,8 +700,7 @@ static int airoha_ppe_foe_commit_entry(s if (hash < sram_num_entries) { dma_addr_t addr = ppe->foe_dma + hash * sizeof(*hwe); diff --git a/target/linux/airoha/patches-6.18/099-07-v6.19-net-airoha-ppe-Configure-SRAM-PPE-entries-via-the-cp.patch b/target/linux/airoha/patches-6.18/099-07-v6.19-net-airoha-ppe-Configure-SRAM-PPE-entries-via-the-cp.patch index 60b4ee1e44..02c9093e21 100644 --- a/target/linux/airoha/patches-6.18/099-07-v6.19-net-airoha-ppe-Configure-SRAM-PPE-entries-via-the-cp.patch +++ b/target/linux/airoha/patches-6.18/099-07-v6.19-net-airoha-ppe-Configure-SRAM-PPE-entries-via-the-cp.patch @@ -19,7 +19,7 @@ Signed-off-by: Paolo Abeni --- a/drivers/net/ethernet/airoha/airoha_ppe.c +++ b/drivers/net/ethernet/airoha/airoha_ppe.c -@@ -656,6 +656,27 @@ static bool airoha_ppe_foe_compare_entry +@@ -669,6 +669,27 @@ static bool airoha_ppe_foe_compare_entry return !memcmp(&e->data.d, &hwe->d, len - sizeof(hwe->ib1)); } @@ -47,7 +47,7 @@ Signed-off-by: Paolo Abeni static int airoha_ppe_foe_commit_entry(struct airoha_ppe *ppe, struct airoha_foe_entry *e, u32 hash, bool rx_wlan) -@@ -685,13 +706,8 @@ static int airoha_ppe_foe_commit_entry(s +@@ -698,13 +719,8 @@ static int airoha_ppe_foe_commit_entry(s if (!rx_wlan) airoha_ppe_foe_flow_stats_update(ppe, npu, hwe, hash); diff --git a/target/linux/airoha/patches-6.18/099-08-v6.19-net-airoha-ppe-Flush-PPE-SRAM-table-during-PPE-setup.patch b/target/linux/airoha/patches-6.18/099-08-v6.19-net-airoha-ppe-Flush-PPE-SRAM-table-during-PPE-setup.patch index 24ecccabc8..dd4bda6001 100644 --- a/target/linux/airoha/patches-6.18/099-08-v6.19-net-airoha-ppe-Flush-PPE-SRAM-table-during-PPE-setup.patch +++ b/target/linux/airoha/patches-6.18/099-08-v6.19-net-airoha-ppe-Flush-PPE-SRAM-table-during-PPE-setup.patch @@ -18,7 +18,7 @@ Signed-off-by: Paolo Abeni --- a/drivers/net/ethernet/airoha/airoha_ppe.c +++ b/drivers/net/ethernet/airoha/airoha_ppe.c -@@ -1291,18 +1291,22 @@ static int airoha_ppe_flow_offload_cmd(s +@@ -1304,18 +1304,22 @@ static int airoha_ppe_flow_offload_cmd(s return -EOPNOTSUPP; } @@ -47,7 +47,7 @@ Signed-off-by: Paolo Abeni } static struct airoha_npu *airoha_ppe_npu_get(struct airoha_eth *eth) -@@ -1339,10 +1343,6 @@ static int airoha_ppe_offload_setup(stru +@@ -1380,10 +1384,6 @@ static int airoha_ppe_offload_setup(stru } airoha_ppe_hw_init(ppe); @@ -58,7 +58,7 @@ Signed-off-by: Paolo Abeni airoha_ppe_foe_flow_stats_reset(ppe, npu); rcu_assign_pointer(eth->npu, npu); -@@ -1513,6 +1513,10 @@ int airoha_ppe_init(struct airoha_eth *e +@@ -1554,6 +1554,10 @@ int airoha_ppe_init(struct airoha_eth *e if (!ppe->foe_check_time) return -ENOMEM; diff --git a/target/linux/airoha/patches-6.18/099-09-v6.19-net-airoha-Select-default-ppe-cpu-port-in-airoha_dev.patch b/target/linux/airoha/patches-6.18/099-09-v6.19-net-airoha-Select-default-ppe-cpu-port-in-airoha_dev.patch index d6fc01a447..477d6e2d9d 100644 --- a/target/linux/airoha/patches-6.18/099-09-v6.19-net-airoha-Select-default-ppe-cpu-port-in-airoha_dev.patch +++ b/target/linux/airoha/patches-6.18/099-09-v6.19-net-airoha-Select-default-ppe-cpu-port-in-airoha_dev.patch @@ -21,7 +21,7 @@ Signed-off-by: Paolo Abeni --- a/drivers/net/ethernet/airoha/airoha_eth.c +++ b/drivers/net/ethernet/airoha/airoha_eth.c -@@ -531,25 +531,6 @@ static int airoha_fe_init(struct airoha_ +@@ -521,25 +521,6 @@ static int airoha_fe_init(struct airoha_ /* disable IFC by default */ airoha_fe_clear(eth, REG_FE_CSR_IFC_CFG, FE_IFC_EN_MASK); @@ -47,7 +47,7 @@ Signed-off-by: Paolo Abeni /* enable 1:N vlan action, init vlan table */ airoha_fe_set(eth, REG_MC_VLAN_EN, MC_VLAN_EN_MASK); -@@ -1782,8 +1763,10 @@ static void airhoha_set_gdm2_loopback(st +@@ -1853,8 +1834,10 @@ static int airhoha_set_gdm2_loopback(str static int airoha_dev_init(struct net_device *dev) { struct airoha_gdm_port *port = netdev_priv(dev); @@ -60,9 +60,9 @@ Signed-off-by: Paolo Abeni airoha_set_macaddr(port, dev->dev_addr); -@@ -1796,16 +1779,27 @@ static int airoha_dev_init(struct net_de +@@ -1872,16 +1855,27 @@ static int airoha_dev_init(struct net_de fallthrough; - case 2: + case AIROHA_GDM2_IDX: if (airoha_ppe_is_enabled(eth, 1)) { + /* For PPE2 always use secondary cpu port. */ + fe_cpu_port = FE_PSE_PORT_CDM2; diff --git a/target/linux/airoha/patches-6.18/099-11-v6.19-net-airoha-ppe-Do-not-use-magic-numbers-in-airoha_pp.patch b/target/linux/airoha/patches-6.18/099-11-v6.19-net-airoha-ppe-Do-not-use-magic-numbers-in-airoha_pp.patch index 93e7f5e592..3cea4a4a60 100644 --- a/target/linux/airoha/patches-6.18/099-11-v6.19-net-airoha-ppe-Do-not-use-magic-numbers-in-airoha_pp.patch +++ b/target/linux/airoha/patches-6.18/099-11-v6.19-net-airoha-ppe-Do-not-use-magic-numbers-in-airoha_pp.patch @@ -17,7 +17,7 @@ Signed-off-by: Paolo Abeni --- a/drivers/net/ethernet/airoha/airoha_ppe.c +++ b/drivers/net/ethernet/airoha/airoha_ppe.c -@@ -619,7 +619,8 @@ airoha_ppe_foe_get_entry_locked(struct a +@@ -632,7 +632,8 @@ airoha_ppe_foe_get_entry_locked(struct a REG_PPE_RAM_CTRL(ppe2))) return NULL; diff --git a/target/linux/airoha/patches-6.18/102-02-v6.19-net-airoha-npu-Add-airoha_npu_soc_data-struct.patch b/target/linux/airoha/patches-6.18/102-02-v6.19-net-airoha-npu-Add-airoha_npu_soc_data-struct.patch index 4d2e712410..d2ddaf9362 100644 --- a/target/linux/airoha/patches-6.18/102-02-v6.19-net-airoha-npu-Add-airoha_npu_soc_data-struct.patch +++ b/target/linux/airoha/patches-6.18/102-02-v6.19-net-airoha-npu-Add-airoha_npu_soc_data-struct.patch @@ -15,8 +15,6 @@ Signed-off-by: Jakub Kicinski drivers/net/ethernet/airoha/airoha_npu.c | 77 ++++++++++++++++-------- 1 file changed, 51 insertions(+), 26 deletions(-) -diff --git a/drivers/net/ethernet/airoha/airoha_npu.c b/drivers/net/ethernet/airoha/airoha_npu.c -index 8c883f2b2d36b7..41944cc5f6b062 100644 --- a/drivers/net/ethernet/airoha/airoha_npu.c +++ b/drivers/net/ethernet/airoha/airoha_npu.c @@ -103,6 +103,16 @@ enum { @@ -36,7 +34,7 @@ index 8c883f2b2d36b7..41944cc5f6b062 100644 #define MBOX_MSG_FUNC_ID GENMASK(14, 11) #define MBOX_MSG_STATIC_BUF BIT(5) #define MBOX_MSG_STATUS GENMASK(4, 2) -@@ -182,49 +192,53 @@ static int airoha_npu_send_msg(struct airoha_npu *npu, int func_id, +@@ -182,49 +192,53 @@ static int airoha_npu_send_msg(struct ai return ret; } @@ -115,7 +113,7 @@ index 8c883f2b2d36b7..41944cc5f6b062 100644 } static irqreturn_t airoha_npu_mbox_handler(int irq, void *npu_instance) -@@ -597,8 +611,19 @@ void airoha_npu_put(struct airoha_npu *npu) +@@ -597,8 +611,19 @@ void airoha_npu_put(struct airoha_npu *n } EXPORT_SYMBOL_GPL(airoha_npu_put); diff --git a/target/linux/airoha/patches-6.18/102-03-v6.19-net-airoha-npu-Add-7583-SoC-support.patch b/target/linux/airoha/patches-6.18/102-03-v6.19-net-airoha-npu-Add-7583-SoC-support.patch index a628d09b77..9147279582 100644 --- a/target/linux/airoha/patches-6.18/102-03-v6.19-net-airoha-npu-Add-7583-SoC-support.patch +++ b/target/linux/airoha/patches-6.18/102-03-v6.19-net-airoha-npu-Add-7583-SoC-support.patch @@ -24,7 +24,7 @@ Signed-off-by: Jakub Kicinski #define NPU_EN7581_FIRMWARE_RV32_MAX_SIZE 0x200000 #define NPU_EN7581_FIRMWARE_DATA_MAX_SIZE 0x10000 #define NPU_DUMP_SIZE 512 -@@ -621,8 +623,20 @@ static const struct airoha_npu_soc_data +@@ -622,8 +624,20 @@ static const struct airoha_npu_soc_data }, }; @@ -45,7 +45,7 @@ Signed-off-by: Jakub Kicinski { /* sentinel */ } }; MODULE_DEVICE_TABLE(of, of_airoha_npu_match); -@@ -768,6 +782,8 @@ module_platform_driver(airoha_npu_driver +@@ -762,6 +776,8 @@ module_platform_driver(airoha_npu_driver MODULE_FIRMWARE(NPU_EN7581_FIRMWARE_DATA); MODULE_FIRMWARE(NPU_EN7581_FIRMWARE_RV32); diff --git a/target/linux/airoha/patches-6.18/107-v6.19-pwm-airoha-Add-support-for-EN7581-SoC.patch b/target/linux/airoha/patches-6.18/107-v6.19-pwm-airoha-Add-support-for-EN7581-SoC.patch index 0848cb410e..72d5a9d871 100644 --- a/target/linux/airoha/patches-6.18/107-v6.19-pwm-airoha-Add-support-for-EN7581-SoC.patch +++ b/target/linux/airoha/patches-6.18/107-v6.19-pwm-airoha-Add-support-for-EN7581-SoC.patch @@ -35,7 +35,7 @@ Signed-off-by: Uwe Kleine-König --- a/drivers/pwm/Kconfig +++ b/drivers/pwm/Kconfig -@@ -54,6 +54,16 @@ config PWM_ADP5585 +@@ -63,6 +63,16 @@ config PWM_ADP5585 This option enables support for the PWM function found in the Analog Devices ADP5585. @@ -60,8 +60,8 @@ Signed-off-by: Uwe Kleine-König obj-$(CONFIG_PWM_ADP5585) += pwm-adp5585.o +obj-$(CONFIG_PWM_AIROHA) += pwm-airoha.o obj-$(CONFIG_PWM_APPLE) += pwm-apple.o + obj-$(CONFIG_PWM_ARGON_FAN_HAT) += pwm-argon-fan-hat.o obj-$(CONFIG_PWM_ATMEL) += pwm-atmel.o - obj-$(CONFIG_PWM_ATMEL_HLCDC_PWM) += pwm-atmel-hlcdc.o --- /dev/null +++ b/drivers/pwm/pwm-airoha.c @@ -0,0 +1,622 @@ diff --git a/target/linux/airoha/patches-6.18/109-01-v6.19-pinctrl-airoha-generalize-pins-group-function-confs-.patch b/target/linux/airoha/patches-6.18/109-01-v6.19-pinctrl-airoha-generalize-pins-group-function-confs-.patch index bcb056b31a..e3c3ab27c8 100644 --- a/target/linux/airoha/patches-6.18/109-01-v6.19-pinctrl-airoha-generalize-pins-group-function-confs-.patch +++ b/target/linux/airoha/patches-6.18/109-01-v6.19-pinctrl-airoha-generalize-pins-group-function-confs-.patch @@ -17,8 +17,6 @@ Signed-off-by: Linus Walleij drivers/pinctrl/mediatek/pinctrl-airoha.c | 567 ++++++++++++---------- 1 file changed, 318 insertions(+), 249 deletions(-) -diff --git a/drivers/pinctrl/mediatek/pinctrl-airoha.c b/drivers/pinctrl/mediatek/pinctrl-airoha.c -index f1cf2578fe423e..32e5c1b32d5071 100644 --- a/drivers/pinctrl/mediatek/pinctrl-airoha.c +++ b/drivers/pinctrl/mediatek/pinctrl-airoha.c @@ -30,15 +30,15 @@ @@ -92,7 +90,7 @@ index f1cf2578fe423e..32e5c1b32d5071 100644 PINCTRL_PIN(0, "uart1_txd"), PINCTRL_PIN(1, "uart1_rxd"), PINCTRL_PIN(2, "i2c_scl"), -@@ -427,172 +457,172 @@ static struct pinctrl_pin_desc airoha_pinctrl_pins[] = { +@@ -427,172 +457,172 @@ static struct pinctrl_pin_desc airoha_pi PINCTRL_PIN(63, "pcie_reset2"), }; @@ -431,7 +429,7 @@ index f1cf2578fe423e..32e5c1b32d5071 100644 }; static const char *const pon_groups[] = { "pon" }; -@@ -1955,33 +1985,33 @@ static const struct airoha_pinctrl_func_group phy4_led1_func_group[] = { +@@ -1955,33 +1985,33 @@ static const struct airoha_pinctrl_func_ }, }; @@ -490,7 +488,7 @@ index f1cf2578fe423e..32e5c1b32d5071 100644 PINCTRL_CONF_DESC(0, REG_I2C_SDA_PU, UART1_TXD_PU_MASK), PINCTRL_CONF_DESC(1, REG_I2C_SDA_PU, UART1_RXD_PU_MASK), PINCTRL_CONF_DESC(2, REG_I2C_SDA_PU, I2C_SDA_PU_MASK), -@@ -2042,7 +2072,7 @@ static const struct airoha_pinctrl_conf airoha_pinctrl_pullup_conf[] = { +@@ -2042,7 +2072,7 @@ static const struct airoha_pinctrl_conf PINCTRL_CONF_DESC(63, REG_I2C_SDA_PU, PCIE2_RESET_PU_MASK), }; @@ -499,7 +497,7 @@ index f1cf2578fe423e..32e5c1b32d5071 100644 PINCTRL_CONF_DESC(0, REG_I2C_SDA_PD, UART1_TXD_PD_MASK), PINCTRL_CONF_DESC(1, REG_I2C_SDA_PD, UART1_RXD_PD_MASK), PINCTRL_CONF_DESC(2, REG_I2C_SDA_PD, I2C_SDA_PD_MASK), -@@ -2103,7 +2133,7 @@ static const struct airoha_pinctrl_conf airoha_pinctrl_pulldown_conf[] = { +@@ -2103,7 +2133,7 @@ static const struct airoha_pinctrl_conf PINCTRL_CONF_DESC(63, REG_I2C_SDA_PD, PCIE2_RESET_PD_MASK), }; @@ -508,7 +506,7 @@ index f1cf2578fe423e..32e5c1b32d5071 100644 PINCTRL_CONF_DESC(0, REG_I2C_SDA_E2, UART1_TXD_E2_MASK), PINCTRL_CONF_DESC(1, REG_I2C_SDA_E2, UART1_RXD_E2_MASK), PINCTRL_CONF_DESC(2, REG_I2C_SDA_E2, I2C_SDA_E2_MASK), -@@ -2164,7 +2194,7 @@ static const struct airoha_pinctrl_conf airoha_pinctrl_drive_e2_conf[] = { +@@ -2164,7 +2194,7 @@ static const struct airoha_pinctrl_conf PINCTRL_CONF_DESC(63, REG_I2C_SDA_E2, PCIE2_RESET_E2_MASK), }; @@ -517,7 +515,7 @@ index f1cf2578fe423e..32e5c1b32d5071 100644 PINCTRL_CONF_DESC(0, REG_I2C_SDA_E4, UART1_TXD_E4_MASK), PINCTRL_CONF_DESC(1, REG_I2C_SDA_E4, UART1_RXD_E4_MASK), PINCTRL_CONF_DESC(2, REG_I2C_SDA_E4, I2C_SDA_E4_MASK), -@@ -2225,7 +2255,7 @@ static const struct airoha_pinctrl_conf airoha_pinctrl_drive_e4_conf[] = { +@@ -2225,7 +2255,7 @@ static const struct airoha_pinctrl_conf PINCTRL_CONF_DESC(63, REG_I2C_SDA_E4, PCIE2_RESET_E4_MASK), }; @@ -526,7 +524,7 @@ index f1cf2578fe423e..32e5c1b32d5071 100644 PINCTRL_CONF_DESC(61, REG_PCIE_RESET_OD, PCIE0_RESET_OD_MASK), PINCTRL_CONF_DESC(62, REG_PCIE_RESET_OD, PCIE1_RESET_OD_MASK), PINCTRL_CONF_DESC(63, REG_PCIE_RESET_OD, PCIE2_RESET_OD_MASK), -@@ -2546,12 +2576,17 @@ airoha_pinctrl_get_conf_reg(const struct airoha_pinctrl_conf *conf, +@@ -2546,12 +2576,17 @@ airoha_pinctrl_get_conf_reg(const struct } static int airoha_pinctrl_get_conf(struct airoha_pinctrl *pinctrl, @@ -547,7 +545,7 @@ index f1cf2578fe423e..32e5c1b32d5071 100644 if (!reg) return -EINVAL; -@@ -2564,12 +2599,17 @@ static int airoha_pinctrl_get_conf(struct airoha_pinctrl *pinctrl, +@@ -2564,12 +2599,17 @@ static int airoha_pinctrl_get_conf(struc } static int airoha_pinctrl_set_conf(struct airoha_pinctrl *pinctrl, @@ -568,7 +566,7 @@ index f1cf2578fe423e..32e5c1b32d5071 100644 if (!reg) return -EINVAL; -@@ -2582,44 +2622,34 @@ static int airoha_pinctrl_set_conf(struct airoha_pinctrl *pinctrl, +@@ -2582,44 +2622,34 @@ static int airoha_pinctrl_set_conf(struc } #define airoha_pinctrl_get_pullup_conf(pinctrl, pin, val) \ @@ -623,7 +621,7 @@ index f1cf2578fe423e..32e5c1b32d5071 100644 (pin), (val)) static int airoha_pinconf_get_direction(struct pinctrl_dev *pctrl_dev, u32 p) -@@ -2796,12 +2826,13 @@ static int airoha_pinconf_set(struct pinctrl_dev *pctrl_dev, +@@ -2796,12 +2826,13 @@ static int airoha_pinconf_set(struct pin static int airoha_pinconf_group_get(struct pinctrl_dev *pctrl_dev, unsigned int group, unsigned long *config) { @@ -639,7 +637,7 @@ index f1cf2578fe423e..32e5c1b32d5071 100644 config)) return -ENOTSUPP; -@@ -2818,13 +2849,14 @@ static int airoha_pinconf_group_set(struct pinctrl_dev *pctrl_dev, +@@ -2818,13 +2849,14 @@ static int airoha_pinconf_group_set(stru unsigned int group, unsigned long *configs, unsigned int num_configs) { @@ -656,7 +654,7 @@ index f1cf2578fe423e..32e5c1b32d5071 100644 configs, num_configs); if (err) return err; -@@ -2850,23 +2882,16 @@ static const struct pinctrl_ops airoha_pctlops = { +@@ -2850,23 +2882,16 @@ static const struct pinctrl_ops airoha_p .dt_free_map = pinconf_generic_dt_free_map, }; @@ -683,7 +681,7 @@ index f1cf2578fe423e..32e5c1b32d5071 100644 pinctrl = devm_kzalloc(dev, sizeof(*pinctrl), GFP_KERNEL); if (!pinctrl) return -ENOMEM; -@@ -2881,14 +2906,23 @@ static int airoha_pinctrl_probe(struct platform_device *pdev) +@@ -2881,14 +2906,23 @@ static int airoha_pinctrl_probe(struct p pinctrl->chip_scu = map; @@ -710,7 +708,7 @@ index f1cf2578fe423e..32e5c1b32d5071 100644 err = pinctrl_generic_add_group(pinctrl->ctrl, grp->name, grp->pins, grp->npins, -@@ -2901,10 +2935,10 @@ static int airoha_pinctrl_probe(struct platform_device *pdev) +@@ -2901,10 +2935,10 @@ static int airoha_pinctrl_probe(struct p } /* build functions */ @@ -723,7 +721,7 @@ index f1cf2578fe423e..32e5c1b32d5071 100644 err = pinmux_generic_add_pinfunction(pinctrl->ctrl, &func->desc, (void *)func); -@@ -2915,6 +2949,10 @@ static int airoha_pinctrl_probe(struct platform_device *pdev) +@@ -2915,6 +2949,10 @@ static int airoha_pinctrl_probe(struct p } } @@ -734,7 +732,7 @@ index f1cf2578fe423e..32e5c1b32d5071 100644 err = pinctrl_enable(pinctrl->ctrl); if (err) return err; -@@ -2923,8 +2961,39 @@ static int airoha_pinctrl_probe(struct platform_device *pdev) +@@ -2923,8 +2961,39 @@ static int airoha_pinctrl_probe(struct p return airoha_pinctrl_add_gpiochip(pinctrl, pdev); } diff --git a/target/linux/airoha/patches-6.18/109-02-v6.19-pinctrl-airoha-convert-PHY-LED-GPIO-to-macro.patch b/target/linux/airoha/patches-6.18/109-02-v6.19-pinctrl-airoha-convert-PHY-LED-GPIO-to-macro.patch index 6f2ebc1237..0f96183a26 100644 --- a/target/linux/airoha/patches-6.18/109-02-v6.19-pinctrl-airoha-convert-PHY-LED-GPIO-to-macro.patch +++ b/target/linux/airoha/patches-6.18/109-02-v6.19-pinctrl-airoha-convert-PHY-LED-GPIO-to-macro.patch @@ -14,11 +14,9 @@ Signed-off-by: Linus Walleij drivers/pinctrl/mediatek/pinctrl-airoha.c | 588 ++++------------------ 1 file changed, 100 insertions(+), 488 deletions(-) -diff --git a/drivers/pinctrl/mediatek/pinctrl-airoha.c b/drivers/pinctrl/mediatek/pinctrl-airoha.c -index 32e5c1b32d5071..cb0edc2a66a1e6 100644 --- a/drivers/pinctrl/mediatek/pinctrl-airoha.c +++ b/drivers/pinctrl/mediatek/pinctrl-airoha.c -@@ -1473,516 +1473,128 @@ static const struct airoha_pinctrl_func_group pwm_func_group[] = { +@@ -1473,516 +1473,128 @@ static const struct airoha_pinctrl_func_ }, }; diff --git a/target/linux/airoha/patches-6.18/109-03-v6.19-pinctrl-airoha-convert-PWM-GPIO-to-macro.patch b/target/linux/airoha/patches-6.18/109-03-v6.19-pinctrl-airoha-convert-PWM-GPIO-to-macro.patch index 0cd944b2ba..a38ef0574c 100644 --- a/target/linux/airoha/patches-6.18/109-03-v6.19-pinctrl-airoha-convert-PWM-GPIO-to-macro.patch +++ b/target/linux/airoha/patches-6.18/109-03-v6.19-pinctrl-airoha-convert-PWM-GPIO-to-macro.patch @@ -15,11 +15,9 @@ Signed-off-by: Linus Walleij drivers/pinctrl/mediatek/pinctrl-airoha.c | 465 ++++------------------ 1 file changed, 68 insertions(+), 397 deletions(-) -diff --git a/drivers/pinctrl/mediatek/pinctrl-airoha.c b/drivers/pinctrl/mediatek/pinctrl-airoha.c -index cb0edc2a66a1e6..f3cf48bdd1f83d 100644 --- a/drivers/pinctrl/mediatek/pinctrl-airoha.c +++ b/drivers/pinctrl/mediatek/pinctrl-airoha.c -@@ -1073,404 +1073,75 @@ static const struct airoha_pinctrl_func_group pcie_reset_func_group[] = { +@@ -1073,404 +1073,75 @@ static const struct airoha_pinctrl_func_ }; /* PWM */ diff --git a/target/linux/airoha/patches-6.18/109-05-v6.19-pinctrl-airoha-add-support-for-Airoha-AN7583-PINs.patch b/target/linux/airoha/patches-6.18/109-05-v6.19-pinctrl-airoha-add-support-for-Airoha-AN7583-PINs.patch index 990a154d12..ad0ff9f410 100644 --- a/target/linux/airoha/patches-6.18/109-05-v6.19-pinctrl-airoha-add-support-for-Airoha-AN7583-PINs.patch +++ b/target/linux/airoha/patches-6.18/109-05-v6.19-pinctrl-airoha-add-support-for-Airoha-AN7583-PINs.patch @@ -14,8 +14,6 @@ Signed-off-by: Linus Walleij drivers/pinctrl/mediatek/pinctrl-airoha.c | 747 +++++++++++++++++++++- 1 file changed, 740 insertions(+), 7 deletions(-) -diff --git a/drivers/pinctrl/mediatek/pinctrl-airoha.c b/drivers/pinctrl/mediatek/pinctrl-airoha.c -index f3cf48bdd1f83d..bfcedc7f920b1e 100644 --- a/drivers/pinctrl/mediatek/pinctrl-airoha.c +++ b/drivers/pinctrl/mediatek/pinctrl-airoha.c @@ -70,6 +70,7 @@ @@ -96,7 +94,7 @@ index f3cf48bdd1f83d..bfcedc7f920b1e 100644 #define UART1_RXD_PD_MASK BIT(3) #define UART1_TXD_PD_MASK BIT(2) #define I2C_SCL_PD_MASK BIT(1) -@@ -625,10 +642,223 @@ static const struct pingroup en7581_pinctrl_groups[] = { +@@ -625,10 +642,223 @@ static const struct pingroup en7581_pinc PINCTRL_PIN_GROUP("pcie_reset2", en7581_pcie_reset2), }; @@ -320,7 +318,7 @@ index f3cf48bdd1f83d..bfcedc7f920b1e 100644 static const char *const uart_groups[] = { "uart2", "uart2_cts_rts", "hsuart", "hsuart_cts_rts", "uart4", "uart5" }; -@@ -641,11 +871,16 @@ static const char *const pcm_spi_groups[] = { "pcm_spi", "pcm_spi_int", +@@ -641,11 +871,16 @@ static const char *const pcm_spi_groups[ "pcm_spi_cs2_p156", "pcm_spi_cs2_p128", "pcm_spi_cs3", "pcm_spi_cs4" }; @@ -337,7 +335,7 @@ index f3cf48bdd1f83d..bfcedc7f920b1e 100644 static const char *const pwm_groups[] = { "gpio0", "gpio1", "gpio2", "gpio3", "gpio4", "gpio5", -@@ -684,6 +919,22 @@ static const char *const phy3_led1_groups[] = { "gpio43", "gpio44", +@@ -684,6 +919,22 @@ static const char *const phy3_led1_group "gpio45", "gpio46" }; static const char *const phy4_led1_groups[] = { "gpio43", "gpio44", "gpio45", "gpio46" }; @@ -360,7 +358,7 @@ index f3cf48bdd1f83d..bfcedc7f920b1e 100644 static const struct airoha_pinctrl_func_group pon_func_group[] = { { -@@ -761,6 +1012,25 @@ static const struct airoha_pinctrl_func_group mdio_func_group[] = { +@@ -761,6 +1012,25 @@ static const struct airoha_pinctrl_func_ }, }; @@ -386,7 +384,7 @@ index f3cf48bdd1f83d..bfcedc7f920b1e 100644 static const struct airoha_pinctrl_func_group uart_func_group[] = { { .name = "uart2", -@@ -1002,6 +1272,73 @@ static const struct airoha_pinctrl_func_group pcm_spi_func_group[] = { +@@ -1002,6 +1272,73 @@ static const struct airoha_pinctrl_func_ }, }; @@ -460,7 +458,7 @@ index f3cf48bdd1f83d..bfcedc7f920b1e 100644 static const struct airoha_pinctrl_func_group i2s_func_group[] = { { .name = "i2s", -@@ -1072,6 +1409,28 @@ static const struct airoha_pinctrl_func_group pcie_reset_func_group[] = { +@@ -1072,6 +1409,28 @@ static const struct airoha_pinctrl_func_ }, }; @@ -489,7 +487,7 @@ index f3cf48bdd1f83d..bfcedc7f920b1e 100644 /* PWM */ #define AIROHA_PINCTRL_PWM(gpio, mux_val) \ { \ -@@ -1268,6 +1627,94 @@ static const struct airoha_pinctrl_func_group phy4_led1_func_group[] = { +@@ -1268,6 +1627,94 @@ static const struct airoha_pinctrl_func_ LAN3_LED_MAPPING_MASK, LAN3_PHY_LED_MAP(2)), }; @@ -584,7 +582,7 @@ index f3cf48bdd1f83d..bfcedc7f920b1e 100644 static const struct airoha_pinctrl_func en7581_pinctrl_funcs[] = { PINCTRL_FUNC_DESC("pon", pon), PINCTRL_FUNC_DESC("tod_1pps", tod_1pps), -@@ -1294,6 +1741,31 @@ static const struct airoha_pinctrl_func en7581_pinctrl_funcs[] = { +@@ -1294,6 +1741,31 @@ static const struct airoha_pinctrl_func PINCTRL_FUNC_DESC("phy4_led1", phy4_led1), }; @@ -616,7 +614,7 @@ index f3cf48bdd1f83d..bfcedc7f920b1e 100644 static const struct airoha_pinctrl_conf en7581_pinctrl_pullup_conf[] = { PINCTRL_CONF_DESC(0, REG_I2C_SDA_PU, UART1_TXD_PU_MASK), PINCTRL_CONF_DESC(1, REG_I2C_SDA_PU, UART1_RXD_PU_MASK), -@@ -1355,6 +1827,62 @@ static const struct airoha_pinctrl_conf en7581_pinctrl_pullup_conf[] = { +@@ -1355,6 +1827,62 @@ static const struct airoha_pinctrl_conf PINCTRL_CONF_DESC(63, REG_I2C_SDA_PU, PCIE2_RESET_PU_MASK), }; @@ -679,7 +677,7 @@ index f3cf48bdd1f83d..bfcedc7f920b1e 100644 static const struct airoha_pinctrl_conf en7581_pinctrl_pulldown_conf[] = { PINCTRL_CONF_DESC(0, REG_I2C_SDA_PD, UART1_TXD_PD_MASK), PINCTRL_CONF_DESC(1, REG_I2C_SDA_PD, UART1_RXD_PD_MASK), -@@ -1416,6 +1944,62 @@ static const struct airoha_pinctrl_conf en7581_pinctrl_pulldown_conf[] = { +@@ -1416,6 +1944,62 @@ static const struct airoha_pinctrl_conf PINCTRL_CONF_DESC(63, REG_I2C_SDA_PD, PCIE2_RESET_PD_MASK), }; @@ -742,7 +740,7 @@ index f3cf48bdd1f83d..bfcedc7f920b1e 100644 static const struct airoha_pinctrl_conf en7581_pinctrl_drive_e2_conf[] = { PINCTRL_CONF_DESC(0, REG_I2C_SDA_E2, UART1_TXD_E2_MASK), PINCTRL_CONF_DESC(1, REG_I2C_SDA_E2, UART1_RXD_E2_MASK), -@@ -1477,6 +2061,62 @@ static const struct airoha_pinctrl_conf en7581_pinctrl_drive_e2_conf[] = { +@@ -1477,6 +2061,62 @@ static const struct airoha_pinctrl_conf PINCTRL_CONF_DESC(63, REG_I2C_SDA_E2, PCIE2_RESET_E2_MASK), }; @@ -805,7 +803,7 @@ index f3cf48bdd1f83d..bfcedc7f920b1e 100644 static const struct airoha_pinctrl_conf en7581_pinctrl_drive_e4_conf[] = { PINCTRL_CONF_DESC(0, REG_I2C_SDA_E4, UART1_TXD_E4_MASK), PINCTRL_CONF_DESC(1, REG_I2C_SDA_E4, UART1_RXD_E4_MASK), -@@ -1538,12 +2178,73 @@ static const struct airoha_pinctrl_conf en7581_pinctrl_drive_e4_conf[] = { +@@ -1538,12 +2178,73 @@ static const struct airoha_pinctrl_conf PINCTRL_CONF_DESC(63, REG_I2C_SDA_E4, PCIE2_RESET_E4_MASK), }; @@ -879,7 +877,7 @@ index f3cf48bdd1f83d..bfcedc7f920b1e 100644 static int airoha_convert_pin_to_reg_offset(struct pinctrl_dev *pctrl_dev, struct pinctrl_gpio_range *range, int pin) -@@ -1708,7 +2409,7 @@ static const struct irq_chip airoha_gpio_irq_chip = { +@@ -1708,7 +2409,7 @@ static const struct irq_chip airoha_gpio }; static int airoha_pinctrl_add_gpiochip(struct airoha_pinctrl *pinctrl, @@ -888,7 +886,7 @@ index f3cf48bdd1f83d..bfcedc7f920b1e 100644 { struct airoha_pinctrl_gpiochip *chip = &pinctrl->gpiochip; struct gpio_chip *gc = &chip->chip; -@@ -1743,7 +2444,7 @@ static int airoha_pinctrl_add_gpiochip(struct airoha_pinctrl *pinctrl, +@@ -1743,7 +2444,7 @@ static int airoha_pinctrl_add_gpiochip(s return irq; err = devm_request_irq(dev, irq, airoha_irq_handler, IRQF_SHARED, @@ -897,7 +895,7 @@ index f3cf48bdd1f83d..bfcedc7f920b1e 100644 if (err) { dev_err(dev, "error requesting irq %d: %d\n", irq, err); return err; -@@ -1807,8 +2508,8 @@ static int airoha_pinmux_set_mux(struct pinctrl_dev *pctrl_dev, +@@ -1807,8 +2508,8 @@ static int airoha_pinmux_set_mux(struct } static int airoha_pinmux_set_direction(struct pinctrl_dev *pctrl_dev, @@ -908,7 +906,7 @@ index f3cf48bdd1f83d..bfcedc7f920b1e 100644 { struct airoha_pinctrl *pinctrl = pinctrl_dev_get_drvdata(pctrl_dev); u32 mask, index; -@@ -1898,7 +2599,7 @@ static int airoha_pinctrl_set_conf(struct airoha_pinctrl *pinctrl, +@@ -1898,7 +2599,7 @@ static int airoha_pinctrl_set_conf(struc if (regmap_update_bits(pinctrl->chip_scu, reg->offset, reg->mask, @@ -917,7 +915,7 @@ index f3cf48bdd1f83d..bfcedc7f920b1e 100644 return -EINVAL; return 0; -@@ -2115,8 +2816,8 @@ static int airoha_pinconf_group_get(struct pinctrl_dev *pctrl_dev, +@@ -2115,8 +2816,8 @@ static int airoha_pinconf_group_get(stru for (i = 0; i < pinctrl->grps[group].npins; i++) { if (airoha_pinconf_get(pctrl_dev, @@ -928,7 +926,7 @@ index f3cf48bdd1f83d..bfcedc7f920b1e 100644 return -ENOTSUPP; if (i && cur_config != *config) -@@ -2275,8 +2976,40 @@ static const struct airoha_pinctrl_match_data en7581_pinctrl_match_data = { +@@ -2275,8 +2976,40 @@ static const struct airoha_pinctrl_match }, }; diff --git a/target/linux/airoha/patches-6.18/113-v6.19-pinctrl-airoha-Fix-AIROHA_PINCTRL_CONFS_DRIVE_E2.patch b/target/linux/airoha/patches-6.18/113-v6.19-pinctrl-airoha-Fix-AIROHA_PINCTRL_CONFS_DRIVE_E2.patch index c4044e3a32..ac5b1d2ca3 100644 --- a/target/linux/airoha/patches-6.18/113-v6.19-pinctrl-airoha-Fix-AIROHA_PINCTRL_CONFS_DRIVE_E2.patch +++ b/target/linux/airoha/patches-6.18/113-v6.19-pinctrl-airoha-Fix-AIROHA_PINCTRL_CONFS_DRIVE_E2.patch @@ -29,7 +29,7 @@ Signed-off-by: Linus Walleij --- a/drivers/pinctrl/mediatek/pinctrl-airoha.c +++ b/drivers/pinctrl/mediatek/pinctrl-airoha.c -@@ -2998,7 +2998,7 @@ static const struct airoha_pinctrl_match +@@ -2993,7 +2993,7 @@ static const struct airoha_pinctrl_match .num_confs = ARRAY_SIZE(an7583_pinctrl_pulldown_conf), }, [AIROHA_PINCTRL_CONFS_DRIVE_E2] = { diff --git a/target/linux/airoha/patches-6.18/118-v7.0-net-airoha-npu-Dump-fw-version-during-probe.patch b/target/linux/airoha/patches-6.18/118-v7.0-net-airoha-npu-Dump-fw-version-during-probe.patch index 36f8850c6c..1086474dd3 100644 --- a/target/linux/airoha/patches-6.18/118-v7.0-net-airoha-npu-Dump-fw-version-during-probe.patch +++ b/target/linux/airoha/patches-6.18/118-v7.0-net-airoha-npu-Dump-fw-version-during-probe.patch @@ -14,15 +14,15 @@ Signed-off-by: Jakub Kicinski --- a/drivers/net/ethernet/airoha/airoha_npu.c +++ b/drivers/net/ethernet/airoha/airoha_npu.c -@@ -658,6 +658,7 @@ static int airoha_npu_probe(struct platf - struct device_node *np; +@@ -657,6 +657,7 @@ static int airoha_npu_probe(struct platf + struct resource res; void __iomem *base; int i, irq, err; + u32 val; base = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(base)) -@@ -757,6 +758,11 @@ static int airoha_npu_probe(struct platf +@@ -750,6 +751,11 @@ static int airoha_npu_probe(struct platf regmap_write(npu->regmap, REG_CR_BOOT_TRIGGER, 0x1); msleep(100); diff --git a/target/linux/airoha/patches-6.18/120-v7.0-net-airoha-implement-get_link_ksettings.patch b/target/linux/airoha/patches-6.18/120-v7.0-net-airoha-implement-get_link_ksettings.patch index e08bd168fa..17e57d7c97 100644 --- a/target/linux/airoha/patches-6.18/120-v7.0-net-airoha-implement-get_link_ksettings.patch +++ b/target/linux/airoha/patches-6.18/120-v7.0-net-airoha-implement-get_link_ksettings.patch @@ -16,7 +16,7 @@ Signed-off-by: Paolo Abeni --- a/drivers/net/ethernet/airoha/airoha_eth.c +++ b/drivers/net/ethernet/airoha/airoha_eth.c -@@ -2826,6 +2826,7 @@ static const struct ethtool_ops airoha_e +@@ -2902,6 +2902,7 @@ static const struct ethtool_ops airoha_e .get_drvinfo = airoha_ethtool_get_drvinfo, .get_eth_mac_stats = airoha_ethtool_get_mac_stats, .get_rmon_stats = airoha_ethtool_get_rmon_stats, diff --git a/target/linux/airoha/patches-6.18/123-v7.0-net-airoha-npu-Add-the-capability-to-read-firmware-n.patch b/target/linux/airoha/patches-6.18/123-v7.0-net-airoha-npu-Add-the-capability-to-read-firmware-n.patch index 35ad950f42..678e6432d2 100644 --- a/target/linux/airoha/patches-6.18/123-v7.0-net-airoha-npu-Add-the-capability-to-read-firmware-n.patch +++ b/target/linux/airoha/patches-6.18/123-v7.0-net-airoha-npu-Add-the-capability-to-read-firmware-n.patch @@ -81,7 +81,7 @@ Signed-off-by: Jakub Kicinski +} + static int airoha_npu_run_firmware(struct device *dev, void __iomem *base, - struct reserved_mem *rmem) + struct resource *res) { @@ -233,14 +257,22 @@ static int airoha_npu_run_firmware(struc if (IS_ERR(addr)) @@ -108,7 +108,7 @@ Signed-off-by: Jakub Kicinski } static irqreturn_t airoha_npu_mbox_handler(int irq, void *npu_instance) -@@ -797,6 +829,8 @@ module_platform_driver(airoha_npu_driver +@@ -790,6 +822,8 @@ module_platform_driver(airoha_npu_driver MODULE_FIRMWARE(NPU_EN7581_FIRMWARE_DATA); MODULE_FIRMWARE(NPU_EN7581_FIRMWARE_RV32); diff --git a/target/linux/airoha/patches-6.18/125-v7.1-net-airoha-Rely-__field_prep-for-non-constant-masks.patch b/target/linux/airoha/patches-6.18/125-v7.1-net-airoha-Rely-__field_prep-for-non-constant-masks.patch index 78dc75eb0a..91260a9794 100644 --- a/target/linux/airoha/patches-6.18/125-v7.1-net-airoha-Rely-__field_prep-for-non-constant-masks.patch +++ b/target/linux/airoha/patches-6.18/125-v7.1-net-airoha-Rely-__field_prep-for-non-constant-masks.patch @@ -15,7 +15,7 @@ Signed-off-by: Jakub Kicinski --- a/drivers/net/ethernet/airoha/airoha_eth.c +++ b/drivers/net/ethernet/airoha/airoha_eth.c -@@ -1748,7 +1748,7 @@ static int airhoha_set_gdm2_loopback(str +@@ -1821,7 +1821,7 @@ static int airhoha_set_gdm2_loopback(str airoha_fe_rmw(eth, REG_SP_DFT_CPORT(src_port >> fls(SP_CPORT_DFT_MASK)), SP_CPORT_MASK(val), @@ -24,7 +24,7 @@ Signed-off-by: Jakub Kicinski if (port->id != AIROHA_GDM3_IDX && airoha_is_7581(eth)) airoha_fe_rmw(eth, REG_SRC_PORT_FC_MAP6, -@@ -1802,7 +1802,7 @@ static int airoha_dev_init(struct net_de +@@ -1875,7 +1875,7 @@ static int airoha_dev_init(struct net_de ppe_id = pse_port == FE_PSE_PORT_PPE2 ? 1 : 0; airoha_fe_rmw(eth, REG_PPE_DFT_CPORT0(ppe_id), DFT_CPORT_MASK(port->id), @@ -33,7 +33,7 @@ Signed-off-by: Jakub Kicinski return 0; } -@@ -2159,7 +2159,7 @@ static int airoha_qdma_set_chan_tx_sched +@@ -2235,7 +2235,7 @@ static int airoha_qdma_set_chan_tx_sched airoha_qdma_rmw(port->qdma, REG_CHAN_QOS_MODE(channel >> 3), CHAN_QOS_MODE_MASK(channel), diff --git a/target/linux/airoha/patches-6.18/126-v7.1-net-airoha-Make-flow-control-source-port-mapping-dep.patch b/target/linux/airoha/patches-6.18/126-v7.1-net-airoha-Make-flow-control-source-port-mapping-dep.patch index 9e4684bddc..7e078d0865 100644 --- a/target/linux/airoha/patches-6.18/126-v7.1-net-airoha-Make-flow-control-source-port-mapping-dep.patch +++ b/target/linux/airoha/patches-6.18/126-v7.1-net-airoha-Make-flow-control-source-port-mapping-dep.patch @@ -19,7 +19,7 @@ Signed-off-by: Jakub Kicinski --- a/drivers/net/ethernet/airoha/airoha_eth.c +++ b/drivers/net/ethernet/airoha/airoha_eth.c -@@ -1750,10 +1750,12 @@ static int airhoha_set_gdm2_loopback(str +@@ -1823,10 +1823,12 @@ static int airhoha_set_gdm2_loopback(str SP_CPORT_MASK(val), __field_prep(SP_CPORT_MASK(val), FE_PSE_PORT_CDM2)); diff --git a/target/linux/airoha/patches-6.18/127-v7.1-net-airoha-Move-GDM-forward-port-configuration-in-nd.patch b/target/linux/airoha/patches-6.18/127-v7.1-net-airoha-Move-GDM-forward-port-configuration-in-nd.patch index d2458a9aa5..3b49e76b22 100644 --- a/target/linux/airoha/patches-6.18/127-v7.1-net-airoha-Move-GDM-forward-port-configuration-in-nd.patch +++ b/target/linux/airoha/patches-6.18/127-v7.1-net-airoha-Move-GDM-forward-port-configuration-in-nd.patch @@ -18,7 +18,7 @@ Signed-off-by: Paolo Abeni --- a/drivers/net/ethernet/airoha/airoha_eth.c +++ b/drivers/net/ethernet/airoha/airoha_eth.c -@@ -1632,6 +1632,7 @@ static int airoha_dev_open(struct net_de +@@ -1708,6 +1708,7 @@ static int airoha_dev_open(struct net_de int err, len = ETH_HLEN + dev->mtu + ETH_FCS_LEN; struct airoha_gdm_port *port = netdev_priv(dev); struct airoha_qdma *qdma = port->qdma; @@ -26,7 +26,7 @@ Signed-off-by: Paolo Abeni netif_tx_start_all_queues(dev); err = airoha_set_vip_for_gdm_port(port, true); -@@ -1655,6 +1656,14 @@ static int airoha_dev_open(struct net_de +@@ -1731,6 +1732,14 @@ static int airoha_dev_open(struct net_de GLOBAL_CFG_RX_DMA_EN_MASK); atomic_inc(&qdma->users); @@ -41,8 +41,8 @@ Signed-off-by: Paolo Abeni return 0; } -@@ -1672,6 +1681,9 @@ static int airoha_dev_stop(struct net_de - for (i = 0; i < ARRAY_SIZE(qdma->q_tx); i++) +@@ -1745,6 +1754,9 @@ static int airoha_dev_stop(struct net_de + for (i = 0; i < dev->num_tx_queues; i++) netdev_tx_reset_subqueue(dev, i); + airoha_set_gdm_port_fwd_cfg(qdma->eth, REG_GDM_FWD_CFG(port->id), @@ -51,7 +51,7 @@ Signed-off-by: Paolo Abeni if (atomic_dec_and_test(&qdma->users)) { airoha_qdma_clear(qdma, REG_QDMA_GLOBAL_CFG, GLOBAL_CFG_TX_DMA_EN_MASK | -@@ -1765,7 +1777,7 @@ static int airoha_dev_init(struct net_de +@@ -1838,7 +1850,7 @@ static int airoha_dev_init(struct net_de struct airoha_gdm_port *port = netdev_priv(dev); struct airoha_qdma *qdma = port->qdma; struct airoha_eth *eth = qdma->eth; @@ -60,7 +60,7 @@ Signed-off-by: Paolo Abeni u8 ppe_id; airoha_set_macaddr(port, dev->dev_addr); -@@ -1786,7 +1798,7 @@ static int airoha_dev_init(struct net_de +@@ -1859,7 +1871,7 @@ static int airoha_dev_init(struct net_de if (airoha_ppe_is_enabled(eth, 1)) { /* For PPE2 always use secondary cpu port. */ fe_cpu_port = FE_PSE_PORT_CDM2; @@ -69,7 +69,7 @@ Signed-off-by: Paolo Abeni break; } fallthrough; -@@ -1795,13 +1807,11 @@ static int airoha_dev_init(struct net_de +@@ -1868,13 +1880,11 @@ static int airoha_dev_init(struct net_de /* For PPE1 select cpu port according to the running QDMA. */ fe_cpu_port = qdma_id ? FE_PSE_PORT_CDM2 : FE_PSE_PORT_CDM1; diff --git a/target/linux/airoha/patches-6.18/129-v7.1-net-airoha-select-QDMA-block-according-LAN-WAN-confi.patch b/target/linux/airoha/patches-6.18/129-v7.1-net-airoha-select-QDMA-block-according-LAN-WAN-confi.patch index e0eecea69a..f8e489d9b7 100644 --- a/target/linux/airoha/patches-6.18/129-v7.1-net-airoha-select-QDMA-block-according-LAN-WAN-confi.patch +++ b/target/linux/airoha/patches-6.18/129-v7.1-net-airoha-select-QDMA-block-according-LAN-WAN-confi.patch @@ -39,7 +39,7 @@ Signed-off-by: Paolo Abeni --- a/drivers/net/ethernet/airoha/airoha_eth.c +++ b/drivers/net/ethernet/airoha/airoha_eth.c -@@ -1775,11 +1775,13 @@ static int airhoha_set_gdm2_loopback(str +@@ -1848,11 +1848,13 @@ static int airhoha_set_gdm2_loopback(str static int airoha_dev_init(struct net_device *dev) { struct airoha_gdm_port *port = netdev_priv(dev); @@ -55,7 +55,7 @@ Signed-off-by: Paolo Abeni airoha_set_macaddr(port, dev->dev_addr); switch (port->id) { -@@ -1803,7 +1805,7 @@ static int airoha_dev_init(struct net_de +@@ -1876,7 +1878,7 @@ static int airoha_dev_init(struct net_de } fallthrough; default: { @@ -64,7 +64,7 @@ Signed-off-by: Paolo Abeni /* For PPE1 select cpu port according to the running QDMA. */ fe_cpu_port = qdma_id ? FE_PSE_PORT_CDM2 : FE_PSE_PORT_CDM1; -@@ -2887,11 +2889,10 @@ bool airoha_is_valid_gdm_port(struct air +@@ -2963,11 +2965,10 @@ bool airoha_is_valid_gdm_port(struct air } static int airoha_alloc_gdm_port(struct airoha_eth *eth, @@ -77,7 +77,7 @@ Signed-off-by: Paolo Abeni struct net_device *dev; int err, p; u32 id; -@@ -2922,7 +2923,6 @@ static int airoha_alloc_gdm_port(struct +@@ -2998,7 +2999,6 @@ static int airoha_alloc_gdm_port(struct return -ENOMEM; } @@ -85,7 +85,7 @@ Signed-off-by: Paolo Abeni dev->netdev_ops = &airoha_netdev_ops; dev->ethtool_ops = &airoha_ethtool_ops; dev->max_mtu = AIROHA_MAX_MTU; -@@ -2934,7 +2934,6 @@ static int airoha_alloc_gdm_port(struct +@@ -3010,7 +3010,6 @@ static int airoha_alloc_gdm_port(struct dev->features |= dev->hw_features; dev->vlan_features = dev->hw_features; dev->dev.of_node = np; @@ -93,7 +93,7 @@ Signed-off-by: Paolo Abeni SET_NETDEV_DEV(dev, eth->dev); /* reserve hw queues for HTB offloading */ -@@ -2955,7 +2954,7 @@ static int airoha_alloc_gdm_port(struct +@@ -3031,7 +3030,7 @@ static int airoha_alloc_gdm_port(struct port = netdev_priv(dev); u64_stats_init(&port->stats.syncp); spin_lock_init(&port->stats.lock); @@ -101,8 +101,8 @@ Signed-off-by: Paolo Abeni + port->eth = eth; port->dev = dev; port->id = id; - eth->ports[p] = port; -@@ -3055,7 +3054,6 @@ static int airoha_probe(struct platform_ + /* XXX: Read nbq from DTS */ +@@ -3133,7 +3132,6 @@ static int airoha_probe(struct platform_ for (i = 0; i < ARRAY_SIZE(eth->qdma); i++) airoha_qdma_start_napi(ð->qdma[i]); @@ -110,7 +110,7 @@ Signed-off-by: Paolo Abeni for_each_child_of_node(pdev->dev.of_node, np) { if (!of_device_is_compatible(np, "airoha,eth-mac")) continue; -@@ -3063,7 +3061,7 @@ static int airoha_probe(struct platform_ +@@ -3141,7 +3139,7 @@ static int airoha_probe(struct platform_ if (!of_device_is_available(np)) continue; @@ -121,11 +121,11 @@ Signed-off-by: Paolo Abeni goto error_napi_stop; --- a/drivers/net/ethernet/airoha/airoha_eth.h +++ b/drivers/net/ethernet/airoha/airoha_eth.h -@@ -533,6 +533,7 @@ struct airoha_qdma { +@@ -534,6 +534,7 @@ struct airoha_qdma { struct airoha_gdm_port { struct airoha_qdma *qdma; + struct airoha_eth *eth; struct net_device *dev; int id; - + int nbq; diff --git a/target/linux/airoha/patches-6.18/131-v7.0-net-phy-mediatek-enable-interrupts-on-AN7581.patch b/target/linux/airoha/patches-6.18/131-v7.0-net-phy-mediatek-enable-interrupts-on-AN7581.patch index a30014bec5..d5b60b1f03 100644 --- a/target/linux/airoha/patches-6.18/131-v7.0-net-phy-mediatek-enable-interrupts-on-AN7581.patch +++ b/target/linux/airoha/patches-6.18/131-v7.0-net-phy-mediatek-enable-interrupts-on-AN7581.patch @@ -16,7 +16,7 @@ Signed-off-by: Jakub Kicinski --- a/drivers/net/phy/mediatek/mtk-ge-soc.c +++ b/drivers/net/phy/mediatek/mtk-ge-soc.c -@@ -1492,6 +1492,8 @@ static struct phy_driver mtk_socphy_driv +@@ -1508,6 +1508,8 @@ static struct phy_driver mtk_socphy_driv { PHY_ID_MATCH_EXACT(MTK_GPHY_ID_AN7581), .name = "Airoha AN7581 PHY", diff --git a/target/linux/airoha/patches-6.18/132-v7.1-net-airoha-Reset-PPE-default-cput-port-in-airoha_ppe.patch b/target/linux/airoha/patches-6.18/132-v7.1-net-airoha-Reset-PPE-default-cput-port-in-airoha_ppe.patch index 136c707f7f..7262c7f3c7 100644 --- a/target/linux/airoha/patches-6.18/132-v7.1-net-airoha-Reset-PPE-default-cput-port-in-airoha_ppe.patch +++ b/target/linux/airoha/patches-6.18/132-v7.1-net-airoha-Reset-PPE-default-cput-port-in-airoha_ppe.patch @@ -32,7 +32,7 @@ Signed-off-by: Lorenzo Bianconi --- a/drivers/net/ethernet/airoha/airoha_eth.c +++ b/drivers/net/ethernet/airoha/airoha_eth.c -@@ -1776,8 +1776,7 @@ static int airoha_dev_init(struct net_de +@@ -1849,8 +1849,7 @@ static int airoha_dev_init(struct net_de { struct airoha_gdm_port *port = netdev_priv(dev); struct airoha_eth *eth = port->eth; @@ -42,7 +42,7 @@ Signed-off-by: Lorenzo Bianconi /* QDMA0 is used for lan ports while QDMA1 is used for WAN ports */ port->qdma = ð->qdma[!airoha_is_lan_gdm_port(port)]; -@@ -1795,28 +1794,13 @@ static int airoha_dev_init(struct net_de +@@ -1868,28 +1867,13 @@ static int airoha_dev_init(struct net_de if (err) return err; } @@ -75,7 +75,7 @@ Signed-off-by: Lorenzo Bianconi return 0; } -@@ -1919,7 +1903,7 @@ static u32 airoha_get_dsa_tag(struct sk_ +@@ -1992,7 +1976,7 @@ static u32 airoha_get_dsa_tag(struct sk_ #endif } @@ -86,7 +86,7 @@ Signed-off-by: Lorenzo Bianconi struct airoha_eth *eth = qdma->eth; --- a/drivers/net/ethernet/airoha/airoha_eth.h +++ b/drivers/net/ethernet/airoha/airoha_eth.h -@@ -646,9 +646,11 @@ static inline bool airoha_is_7583(struct +@@ -654,9 +654,11 @@ static inline bool airoha_is_7583(struct return eth->soc->version == 0x7583; } @@ -121,9 +121,9 @@ Signed-off-by: Lorenzo Bianconi static void airoha_ppe_hw_init(struct airoha_ppe *ppe) { u32 sram_ppe_num_data_entries = PPE_SRAM_NUM_ENTRIES, sram_num_entries; -@@ -147,7 +161,9 @@ static void airoha_ppe_hw_init(struct ai - - airoha_fe_wr(eth, REG_PPE_HASH_SEED(i), PPE_HASH_SEED); +@@ -155,7 +169,9 @@ static void airoha_ppe_hw_init(struct ai + airoha_fe_clear(eth, REG_PPE_PPE_FLOW_CFG(i), + PPE_FLOW_CFG_IP6_6RD_MASK); - for (p = 0; p < ARRAY_SIZE(eth->ports); p++) + for (p = 0; p < ARRAY_SIZE(eth->ports); p++) { @@ -132,7 +132,7 @@ Signed-off-by: Lorenzo Bianconi airoha_fe_rmw(eth, REG_PPE_MTU(i, p), FP0_EGRESS_MTU_MASK | FP1_EGRESS_MTU_MASK, -@@ -155,6 +171,11 @@ static void airoha_ppe_hw_init(struct ai +@@ -163,6 +179,11 @@ static void airoha_ppe_hw_init(struct ai AIROHA_MAX_MTU) | FIELD_PREP(FP1_EGRESS_MTU_MASK, AIROHA_MAX_MTU)); diff --git a/target/linux/airoha/patches-6.18/134-v7.1-net-airoha-Delay-offloading-until-all-net_devices-ar.patch b/target/linux/airoha/patches-6.18/134-v7.1-net-airoha-Delay-offloading-until-all-net_devices-ar.patch index 14be9c1925..b0112a08ba 100644 --- a/target/linux/airoha/patches-6.18/134-v7.1-net-airoha-Delay-offloading-until-all-net_devices-ar.patch +++ b/target/linux/airoha/patches-6.18/134-v7.1-net-airoha-Delay-offloading-until-all-net_devices-ar.patch @@ -26,7 +26,7 @@ Signed-off-by: Jakub Kicinski --- a/drivers/net/ethernet/airoha/airoha_eth.c +++ b/drivers/net/ethernet/airoha/airoha_eth.c -@@ -2978,6 +2978,8 @@ static int airoha_register_gdm_devices(s +@@ -3040,6 +3040,8 @@ static int airoha_register_gdm_devices(s return err; } @@ -47,7 +47,7 @@ Signed-off-by: Jakub Kicinski enum { --- a/drivers/net/ethernet/airoha/airoha_ppe.c +++ b/drivers/net/ethernet/airoha/airoha_ppe.c -@@ -1387,6 +1387,13 @@ int airoha_ppe_setup_tc_block_cb(struct +@@ -1425,6 +1425,13 @@ int airoha_ppe_setup_tc_block_cb(struct struct airoha_eth *eth = ppe->eth; int err = 0; diff --git a/target/linux/airoha/patches-6.18/142-01-v7.1-net-airoha-Rely-on-net_device-pointer-in-airoha_dev_.patch b/target/linux/airoha/patches-6.18/142-01-v7.1-net-airoha-Rely-on-net_device-pointer-in-airoha_dev_.patch index d09272a8af..a66538984f 100644 --- a/target/linux/airoha/patches-6.18/142-01-v7.1-net-airoha-Rely-on-net_device-pointer-in-airoha_dev_.patch +++ b/target/linux/airoha/patches-6.18/142-01-v7.1-net-airoha-Rely-on-net_device-pointer-in-airoha_dev_.patch @@ -20,7 +20,7 @@ Signed-off-by: Jakub Kicinski --- a/drivers/net/ethernet/airoha/airoha_eth.c +++ b/drivers/net/ethernet/airoha/airoha_eth.c -@@ -2683,7 +2683,7 @@ static int airoha_dev_setup_tc_block_cb( +@@ -2752,7 +2752,7 @@ static int airoha_dev_setup_tc_block_cb( } } @@ -29,7 +29,7 @@ Signed-off-by: Jakub Kicinski struct flow_block_offload *f) { flow_setup_cb_t *cb = airoha_dev_setup_tc_block_cb; -@@ -2696,12 +2696,12 @@ static int airoha_dev_setup_tc_block(str +@@ -2765,12 +2765,12 @@ static int airoha_dev_setup_tc_block(str f->driver_block_list = &block_cb_list; switch (f->command) { case FLOW_BLOCK_BIND: @@ -44,7 +44,7 @@ Signed-off-by: Jakub Kicinski if (IS_ERR(block_cb)) return PTR_ERR(block_cb); -@@ -2710,7 +2710,7 @@ static int airoha_dev_setup_tc_block(str +@@ -2779,7 +2779,7 @@ static int airoha_dev_setup_tc_block(str list_add_tail(&block_cb->driver_list, &block_cb_list); return 0; case FLOW_BLOCK_UNBIND: @@ -53,7 +53,7 @@ Signed-off-by: Jakub Kicinski if (!block_cb) return -ENOENT; -@@ -2809,7 +2809,7 @@ static int airoha_dev_tc_setup(struct ne +@@ -2878,7 +2878,7 @@ static int airoha_dev_tc_setup(struct ne return airoha_tc_setup_qdisc_htb(port, type_data); case TC_SETUP_BLOCK: case TC_SETUP_FT: diff --git a/target/linux/airoha/patches-6.18/142-02-v7.1-net-airoha-Rely-on-net_device-pointer-in-HTB-callbac.patch b/target/linux/airoha/patches-6.18/142-02-v7.1-net-airoha-Rely-on-net_device-pointer-in-HTB-callbac.patch index 76651dbe60..faad31a588 100644 --- a/target/linux/airoha/patches-6.18/142-02-v7.1-net-airoha-Rely-on-net_device-pointer-in-HTB-callbac.patch +++ b/target/linux/airoha/patches-6.18/142-02-v7.1-net-airoha-Rely-on-net_device-pointer-in-HTB-callbac.patch @@ -19,7 +19,7 @@ Signed-off-by: Jakub Kicinski --- a/drivers/net/ethernet/airoha/airoha_eth.c +++ b/drivers/net/ethernet/airoha/airoha_eth.c -@@ -2488,10 +2488,11 @@ static int airoha_qdma_set_trtcm_token_b +@@ -2557,10 +2557,11 @@ static int airoha_qdma_set_trtcm_token_b mode, val); } @@ -32,7 +32,7 @@ Signed-off-by: Jakub Kicinski int i, err; for (i = 0; i <= TRTCM_PEAK_MODE; i++) { -@@ -2511,21 +2512,20 @@ static int airoha_qdma_set_tx_rate_limit +@@ -2580,21 +2581,20 @@ static int airoha_qdma_set_tx_rate_limit return 0; } @@ -58,7 +58,7 @@ Signed-off-by: Jakub Kicinski if (err) { NL_SET_ERR_MSG_MOD(opt->extack, "failed configuring htb offload"); -@@ -2537,7 +2537,7 @@ static int airoha_tc_htb_alloc_leaf_queu +@@ -2606,7 +2606,7 @@ static int airoha_tc_htb_alloc_leaf_queu err = netif_set_real_num_tx_queues(dev, num_tx_queues + 1); if (err) { @@ -67,7 +67,7 @@ Signed-off-by: Jakub Kicinski NL_SET_ERR_MSG_MOD(opt->extack, "failed setting real_num_tx_queues"); return err; -@@ -2724,44 +2724,47 @@ static int airoha_dev_setup_tc_block(str +@@ -2793,44 +2793,47 @@ static int airoha_dev_setup_tc_block(str } } @@ -123,7 +123,7 @@ Signed-off-by: Jakub Kicinski if (!test_bit(channel, port->qos_sq_bmap)) { NL_SET_ERR_MSG_MOD(opt->extack, "invalid queue id"); -@@ -2773,23 +2776,23 @@ static int airoha_tc_get_htb_get_leaf_qu +@@ -2842,23 +2845,23 @@ static int airoha_tc_get_htb_get_leaf_qu return 0; } @@ -152,7 +152,7 @@ Signed-off-by: Jakub Kicinski default: return -EOPNOTSUPP; } -@@ -2806,7 +2809,7 @@ static int airoha_dev_tc_setup(struct ne +@@ -2875,7 +2878,7 @@ static int airoha_dev_tc_setup(struct ne case TC_SETUP_QDISC_ETS: return airoha_tc_setup_qdisc_ets(port, type_data); case TC_SETUP_QDISC_HTB: diff --git a/target/linux/airoha/patches-6.18/142-03-v7.1-net-airoha-Rely-on-net_device-pointer-in-ETS-callbac.patch b/target/linux/airoha/patches-6.18/142-03-v7.1-net-airoha-Rely-on-net_device-pointer-in-ETS-callbac.patch index a8b15717c0..a9400d1fb8 100644 --- a/target/linux/airoha/patches-6.18/142-03-v7.1-net-airoha-Rely-on-net_device-pointer-in-ETS-callbac.patch +++ b/target/linux/airoha/patches-6.18/142-03-v7.1-net-airoha-Rely-on-net_device-pointer-in-ETS-callbac.patch @@ -19,7 +19,7 @@ Signed-off-by: Jakub Kicinski --- a/drivers/net/ethernet/airoha/airoha_eth.c +++ b/drivers/net/ethernet/airoha/airoha_eth.c -@@ -2134,10 +2134,11 @@ airoha_ethtool_get_rmon_stats(struct net +@@ -2203,10 +2203,11 @@ airoha_ethtool_get_rmon_stats(struct net } while (u64_stats_fetch_retry(&port->stats.syncp, start)); } @@ -32,7 +32,7 @@ Signed-off-by: Jakub Kicinski int i; for (i = 0; i < AIROHA_NUM_TX_RING; i++) -@@ -2169,17 +2170,15 @@ static int airoha_qdma_set_chan_tx_sched +@@ -2238,17 +2239,15 @@ static int airoha_qdma_set_chan_tx_sched return 0; } @@ -53,7 +53,7 @@ Signed-off-by: Jakub Kicinski struct tc_ets_qopt_offload *opt) { struct tc_ets_qopt_offload_replace_params *p = &opt->replace_params; -@@ -2220,20 +2219,21 @@ static int airoha_qdma_set_tx_ets_sched( +@@ -2289,20 +2288,21 @@ static int airoha_qdma_set_tx_ets_sched( else if (nstrict < AIROHA_NUM_QOS_QUEUES - 1) mode = nstrict + 1; @@ -78,7 +78,7 @@ Signed-off-by: Jakub Kicinski _bstats_update(opt->stats.bstats, 0, tx_packets); port->cpu_tx_packets = cpu_tx_packets; -@@ -2242,7 +2242,7 @@ static int airoha_qdma_get_tx_ets_stats( +@@ -2311,7 +2311,7 @@ static int airoha_qdma_get_tx_ets_stats( return 0; } @@ -87,7 +87,7 @@ Signed-off-by: Jakub Kicinski struct tc_ets_qopt_offload *opt) { int channel; -@@ -2255,12 +2255,12 @@ static int airoha_tc_setup_qdisc_ets(str +@@ -2324,12 +2324,12 @@ static int airoha_tc_setup_qdisc_ets(str switch (opt->command) { case TC_ETS_REPLACE: @@ -103,7 +103,7 @@ Signed-off-by: Jakub Kicinski default: return -EOPNOTSUPP; } -@@ -2803,11 +2803,9 @@ static int airoha_tc_setup_qdisc_htb(str +@@ -2872,11 +2872,9 @@ static int airoha_tc_setup_qdisc_htb(str static int airoha_dev_tc_setup(struct net_device *dev, enum tc_setup_type type, void *type_data) { diff --git a/target/linux/airoha/patches-6.18/143-v7.1-net-airoha-Fix-typo-in-airoha_set_gdm2_loopback-rout.patch b/target/linux/airoha/patches-6.18/143-v7.1-net-airoha-Fix-typo-in-airoha_set_gdm2_loopback-rout.patch index dcbc223ca1..5a491bd59e 100644 --- a/target/linux/airoha/patches-6.18/143-v7.1-net-airoha-Fix-typo-in-airoha_set_gdm2_loopback-rout.patch +++ b/target/linux/airoha/patches-6.18/143-v7.1-net-airoha-Fix-typo-in-airoha_set_gdm2_loopback-rout.patch @@ -15,7 +15,7 @@ Signed-off-by: Jakub Kicinski --- a/drivers/net/ethernet/airoha/airoha_eth.c +++ b/drivers/net/ethernet/airoha/airoha_eth.c -@@ -1722,7 +1722,7 @@ static int airoha_dev_set_macaddr(struct +@@ -1786,7 +1786,7 @@ static int airoha_dev_set_macaddr(struct return 0; } @@ -24,7 +24,7 @@ Signed-off-by: Jakub Kicinski { struct airoha_eth *eth = port->qdma->eth; u32 val, pse_port, chan; -@@ -1796,7 +1796,7 @@ static int airoha_dev_init(struct net_de +@@ -1862,7 +1862,7 @@ static int airoha_dev_init(struct net_de if (!eth->ports[1]) { int err; diff --git a/target/linux/airoha/patches-6.18/147-v7.1-net-airoha-Fix-PPE-cpu-port-configuration-for-GDM2-l.patch b/target/linux/airoha/patches-6.18/147-v7.1-net-airoha-Fix-PPE-cpu-port-configuration-for-GDM2-l.patch index 39b0fdfd90..417adfd7db 100644 --- a/target/linux/airoha/patches-6.18/147-v7.1-net-airoha-Fix-PPE-cpu-port-configuration-for-GDM2-l.patch +++ b/target/linux/airoha/patches-6.18/147-v7.1-net-airoha-Fix-PPE-cpu-port-configuration-for-GDM2-l.patch @@ -24,16 +24,16 @@ Signed-off-by: Paolo Abeni --- a/drivers/net/ethernet/airoha/airoha_eth.c +++ b/drivers/net/ethernet/airoha/airoha_eth.c -@@ -1755,7 +1755,7 @@ static int airoha_set_gdm2_loopback(stru +@@ -1791,7 +1791,7 @@ static int airoha_set_gdm2_loopback(stru { struct airoha_eth *eth = port->qdma->eth; u32 val, pse_port, chan; - int src_port; + int i, src_port; - /* Forward the traffic to the proper GDM port */ - pse_port = port->id == AIROHA_GDM3_IDX ? FE_PSE_PORT_GDM3 -@@ -1797,6 +1797,9 @@ static int airoha_set_gdm2_loopback(stru + airoha_set_gdm_port_fwd_cfg(eth, REG_GDM_FWD_CFG(AIROHA_GDM2_IDX), + FE_PSE_PORT_DROP); +@@ -1835,6 +1835,9 @@ static int airoha_set_gdm2_loopback(stru SP_CPORT_MASK(val), __field_prep(SP_CPORT_MASK(val), FE_PSE_PORT_CDM2)); @@ -41,9 +41,9 @@ Signed-off-by: Paolo Abeni + airoha_ppe_set_cpu_port(port, i, AIROHA_GDM2_IDX); + if (port->id == AIROHA_GDM4_IDX && airoha_is_7581(eth)) { - u32 mask = FC_ID_OF_SRC_PORT_MASK(port->nbq); + u32 mask = FC_ID_OF_SRC_PORT_MASK(nbq); -@@ -1835,7 +1838,8 @@ static int airoha_dev_init(struct net_de +@@ -1873,7 +1876,8 @@ static int airoha_dev_init(struct net_de } for (i = 0; i < eth->soc->num_ppe; i++) @@ -55,7 +55,7 @@ Signed-off-by: Paolo Abeni } --- a/drivers/net/ethernet/airoha/airoha_eth.h +++ b/drivers/net/ethernet/airoha/airoha_eth.h -@@ -653,7 +653,8 @@ int airoha_get_fe_port(struct airoha_gdm +@@ -659,7 +659,8 @@ int airoha_get_fe_port(struct airoha_gdm bool airoha_is_valid_gdm_port(struct airoha_eth *eth, struct airoha_gdm_port *port); diff --git a/target/linux/airoha/patches-6.18/155-v7.2-net-airoha-Rename-get_src_port_id-callback-in-get_sp.patch b/target/linux/airoha/patches-6.18/155-v7.2-net-airoha-Rename-get_src_port_id-callback-in-get_sp.patch index 425ee19eef..65e0a597e0 100644 --- a/target/linux/airoha/patches-6.18/155-v7.2-net-airoha-Rename-get_src_port_id-callback-in-get_sp.patch +++ b/target/linux/airoha/patches-6.18/155-v7.2-net-airoha-Rename-get_src_port_id-callback-in-get_sp.patch @@ -17,7 +17,7 @@ Signed-off-by: Jakub Kicinski --- a/drivers/net/ethernet/airoha/airoha_eth.c +++ b/drivers/net/ethernet/airoha/airoha_eth.c -@@ -1823,7 +1823,7 @@ static int airoha_set_gdm2_loopback(stru +@@ -1822,7 +1822,7 @@ static int airoha_set_gdm2_loopback(stru airoha_fe_clear(eth, REG_FE_VIP_PORT_EN, BIT(AIROHA_GDM2_IDX)); airoha_fe_clear(eth, REG_FE_IFC_PORT_EN, BIT(AIROHA_GDM2_IDX)); @@ -26,7 +26,7 @@ Signed-off-by: Jakub Kicinski if (src_port < 0) return src_port; -@@ -3199,7 +3199,7 @@ static const char * const en7581_xsi_rst +@@ -3196,7 +3196,7 @@ static const char * const en7581_xsi_rst "xfp-mac", }; @@ -35,7 +35,7 @@ Signed-off-by: Jakub Kicinski { switch (port->id) { case AIROHA_GDM3_IDX: -@@ -3252,7 +3252,7 @@ static const char * const an7583_xsi_rst +@@ -3249,7 +3249,7 @@ static const char * const an7583_xsi_rst "xfp-mac", }; @@ -44,7 +44,7 @@ Signed-off-by: Jakub Kicinski { switch (port->id) { case AIROHA_GDM3_IDX: -@@ -3300,7 +3300,7 @@ static const struct airoha_eth_soc_data +@@ -3297,7 +3297,7 @@ static const struct airoha_eth_soc_data .num_xsi_rsts = ARRAY_SIZE(en7581_xsi_rsts_names), .num_ppe = 2, .ops = { @@ -53,7 +53,7 @@ Signed-off-by: Jakub Kicinski .get_vip_port = airoha_en7581_get_vip_port, }, }; -@@ -3311,7 +3311,7 @@ static const struct airoha_eth_soc_data +@@ -3308,7 +3308,7 @@ static const struct airoha_eth_soc_data .num_xsi_rsts = ARRAY_SIZE(an7583_xsi_rsts_names), .num_ppe = 1, .ops = { diff --git a/target/linux/airoha/patches-6.18/158-v7.2-net-airoha-configure-QoS-channel-for-HW-accelerated-.patch b/target/linux/airoha/patches-6.18/158-v7.2-net-airoha-configure-QoS-channel-for-HW-accelerated-.patch index c9a6192110..e41c62c1be 100644 --- a/target/linux/airoha/patches-6.18/158-v7.2-net-airoha-configure-QoS-channel-for-HW-accelerated-.patch +++ b/target/linux/airoha/patches-6.18/158-v7.2-net-airoha-configure-QoS-channel-for-HW-accelerated-.patch @@ -18,7 +18,7 @@ Signed-off-by: Jakub Kicinski --- a/drivers/net/ethernet/airoha/airoha_ppe.c +++ b/drivers/net/ethernet/airoha/airoha_ppe.c -@@ -332,7 +332,7 @@ static int airoha_ppe_foe_entry_prepare( +@@ -334,7 +334,7 @@ static int airoha_ppe_foe_entry_prepare( info.wcid); } else { struct airoha_gdm_port *port = netdev_priv(dev); @@ -27,7 +27,7 @@ Signed-off-by: Jakub Kicinski if (!airoha_is_valid_gdm_port(eth, port)) return -EINVAL; -@@ -345,6 +345,14 @@ static int airoha_ppe_foe_entry_prepare( +@@ -347,6 +347,14 @@ static int airoha_ppe_foe_entry_prepare( * loopback */ diff --git a/target/linux/airoha/patches-6.18/200-02-ASoC-airoha-Add-AFE-and-I2S-driver-for-Airoha-AN7581.patch b/target/linux/airoha/patches-6.18/200-02-ASoC-airoha-Add-AFE-and-I2S-driver-for-Airoha-AN7581.patch index 9984b531e5..c13ee3d106 100644 --- a/target/linux/airoha/patches-6.18/200-02-ASoC-airoha-Add-AFE-and-I2S-driver-for-Airoha-AN7581.patch +++ b/target/linux/airoha/patches-6.18/200-02-ASoC-airoha-Add-AFE-and-I2S-driver-for-Airoha-AN7581.patch @@ -29,7 +29,7 @@ Signed-off-by: Christian Marangi --- a/MAINTAINERS +++ b/MAINTAINERS -@@ -734,6 +734,14 @@ F: Documentation/devicetree/bindings/phy +@@ -754,6 +754,14 @@ F: Documentation/devicetree/bindings/phy F: drivers/phy/phy-airoha-pcie-regs.h F: drivers/phy/phy-airoha-pcie.c @@ -46,7 +46,7 @@ Signed-off-by: Christian Marangi M: Ray Liu --- a/sound/soc/mediatek/Kconfig +++ b/sound/soc/mediatek/Kconfig -@@ -3,6 +3,26 @@ config SND_SOC_MEDIATEK +@@ -5,6 +5,26 @@ config SND_SOC_MEDIATEK tristate select REGMAP_MMIO diff --git a/target/linux/airoha/patches-6.18/220-05-dt-bindings-phy-Add-documentation-for-Airoha-AN7581-.patch b/target/linux/airoha/patches-6.18/220-05-dt-bindings-phy-Add-documentation-for-Airoha-AN7581-.patch index 1937a692ee..f29e92ab16 100644 --- a/target/linux/airoha/patches-6.18/220-05-dt-bindings-phy-Add-documentation-for-Airoha-AN7581-.patch +++ b/target/linux/airoha/patches-6.18/220-05-dt-bindings-phy-Add-documentation-for-Airoha-AN7581-.patch @@ -111,7 +111,7 @@ Signed-off-by: Christian Marangi + --- a/MAINTAINERS +++ b/MAINTAINERS -@@ -751,6 +751,13 @@ S: Maintained +@@ -771,6 +771,13 @@ S: Maintained F: Documentation/devicetree/bindings/spi/airoha,en7581-snand.yaml F: drivers/spi/spi-airoha-snfi.c diff --git a/target/linux/airoha/patches-6.18/220-07-phy-airoha-Add-support-for-Airoha-AN7581-USB-PHY.patch b/target/linux/airoha/patches-6.18/220-07-phy-airoha-Add-support-for-Airoha-AN7581-USB-PHY.patch index 8994927b07..1c535a0bd9 100644 --- a/target/linux/airoha/patches-6.18/220-07-phy-airoha-Add-support-for-Airoha-AN7581-USB-PHY.patch +++ b/target/linux/airoha/patches-6.18/220-07-phy-airoha-Add-support-for-Airoha-AN7581-USB-PHY.patch @@ -35,7 +35,7 @@ Signed-off-by: Christian Marangi --- a/MAINTAINERS +++ b/MAINTAINERS -@@ -756,6 +756,7 @@ M: Christian Marangi --- a/drivers/pci/controller/pcie-mediatek-gen3.c +++ b/drivers/pci/controller/pcie-mediatek-gen3.c -@@ -925,6 +925,12 @@ static int mtk_pcie_en7581_power_up(stru +@@ -969,6 +969,12 @@ static int mtk_pcie_en7581_power_up(stru size = lower_32_bits(resource_size(entry->res)); regmap_write(pbus_regmap, args[1], GENMASK(31, __fls(size))); diff --git a/target/linux/airoha/patches-6.18/600-11-dt-bindings-clock-airoha-Add-reset-support-to-EN7523.patch b/target/linux/airoha/patches-6.18/600-11-dt-bindings-clock-airoha-Add-reset-support-to-EN7523.patch index 0c391ebce9..8a8c757afc 100644 --- a/target/linux/airoha/patches-6.18/600-11-dt-bindings-clock-airoha-Add-reset-support-to-EN7523.patch +++ b/target/linux/airoha/patches-6.18/600-11-dt-bindings-clock-airoha-Add-reset-support-to-EN7523.patch @@ -18,15 +18,15 @@ Reviewed-by: Rob Herring (Arm) --- a/Documentation/devicetree/bindings/clock/airoha,en7523-scu.yaml +++ b/Documentation/devicetree/bindings/clock/airoha,en7523-scu.yaml @@ -64,8 +64,6 @@ allOf: - - description: scu base address - - description: misc scu base address + reg: + minItems: 2 - '#reset-cells': false - - if: properties: compatible: -@@ -89,6 +87,7 @@ examples: +@@ -85,6 +83,7 @@ examples: reg = <0x1fa20000 0x400>, <0x1fb00000 0x1000>; #clock-cells = <1>; diff --git a/target/linux/airoha/patches-6.18/604-01-net-pcs-airoha-add-support-for-AN7583.patch b/target/linux/airoha/patches-6.18/604-01-net-pcs-airoha-add-support-for-AN7583.patch index 0801c2bec1..74138e5438 100644 --- a/target/linux/airoha/patches-6.18/604-01-net-pcs-airoha-add-support-for-AN7583.patch +++ b/target/linux/airoha/patches-6.18/604-01-net-pcs-airoha-add-support-for-AN7583.patch @@ -139,7 +139,7 @@ Signed-off-by: Christian Marangi } static void airoha_pcs_init_hsgmii(struct airoha_pcs_priv *priv, int index) -@@ -512,6 +549,13 @@ static int airoha_pcs_config(struct phyl +@@ -514,6 +551,13 @@ static int airoha_pcs_config(struct phyl AIROHA_PCS_USXGMII_PCS_AN_CONTROL_7, AIROHA_PCS_USXGMII_RATE_UPDATE_MODE); } @@ -153,7 +153,7 @@ Signed-off-by: Christian Marangi } /* Clear any force bit that my be set by bootloader */ -@@ -1015,10 +1059,14 @@ static int airoha_pcs_usb_alloc_maps(str +@@ -1017,10 +1061,14 @@ static int airoha_pcs_usb_alloc_maps(str if (ret) return ret; @@ -169,7 +169,7 @@ Signed-off-by: Christian Marangi struct airoha_pcs_priv *priv) { struct airoha_pcs_maps *maps = priv->maps; -@@ -1115,6 +1163,60 @@ static struct phylink_pcs *airoha_pcs_ge +@@ -1117,6 +1165,60 @@ static struct phylink_pcs *airoha_pcs_ge return &priv->ports[index].pcs; } @@ -230,7 +230,7 @@ Signed-off-by: Christian Marangi static int airoha_pcs_probe(struct platform_device *pdev) { const struct airoha_pcs_match_data *data; -@@ -1136,14 +1238,19 @@ static int airoha_pcs_probe(struct platf +@@ -1138,14 +1240,19 @@ static int airoha_pcs_probe(struct platf priv->dev = dev; priv->data = data; @@ -253,7 +253,7 @@ Signed-off-by: Christian Marangi } switch (data->port_type) { -@@ -1155,7 +1262,10 @@ static int airoha_pcs_probe(struct platf +@@ -1157,7 +1264,10 @@ static int airoha_pcs_probe(struct platf break; case AIROHA_PCS_PCIE: @@ -265,7 +265,7 @@ Signed-off-by: Christian Marangi if (ret) return ret; -@@ -1260,6 +1370,8 @@ static void airoha_pcs_remove(struct pla +@@ -1261,6 +1371,8 @@ static void airoha_pcs_remove(struct pla static const struct airoha_pcs_match_data an7581_pcs_eth = { .num_port = 1, .port_type = AIROHA_PCS_ETH, @@ -274,7 +274,7 @@ Signed-off-by: Christian Marangi .alloc_regmap_fields = an7581_pcs_alloc_regmap_fields, .bringup = an7581_pcs_bringup, .link_up = an7581_pcs_phya_link_up, -@@ -1269,6 +1381,8 @@ static const struct airoha_pcs_match_dat +@@ -1270,6 +1382,8 @@ static const struct airoha_pcs_match_dat static const struct airoha_pcs_match_data an7581_pcs_pon = { .num_port = 1, .port_type = AIROHA_PCS_PON, @@ -283,7 +283,7 @@ Signed-off-by: Christian Marangi .alloc_regmap_fields = an7581_pcs_alloc_regmap_fields, .bringup = an7581_pcs_bringup, .link_up = an7581_pcs_phya_link_up, -@@ -1277,6 +1391,8 @@ static const struct airoha_pcs_match_dat +@@ -1278,6 +1392,8 @@ static const struct airoha_pcs_match_dat static const struct airoha_pcs_match_data an7581_pcs_pcie = { .num_port = 2, .port_type = AIROHA_PCS_PCIE, @@ -292,7 +292,7 @@ Signed-off-by: Christian Marangi .alloc_regmap_fields = an7581_pcs_pcie_alloc_regmap_fields, .bringup = an7581_pcs_bringup, .link_up = an7581_pcs_phya_link_up, -@@ -1288,11 +1404,44 @@ static const struct airoha_pcs_match_dat +@@ -1289,11 +1405,44 @@ static const struct airoha_pcs_match_dat .bringup = an7581_pcs_usb_bringup, }; diff --git a/target/linux/airoha/patches-6.18/605-net-pcs-airoha-add-support-for-optional-xfi-reset-li.patch b/target/linux/airoha/patches-6.18/605-net-pcs-airoha-add-support-for-optional-xfi-reset-li.patch index a505475097..a9f35ab21b 100644 --- a/target/linux/airoha/patches-6.18/605-net-pcs-airoha-add-support-for-optional-xfi-reset-li.patch +++ b/target/linux/airoha/patches-6.18/605-net-pcs-airoha-add-support-for-optional-xfi-reset-li.patch @@ -40,7 +40,7 @@ Signed-off-by: Christian Marangi /* TODO better handle reset from MAC */ ret = reset_control_bulk_assert(ARRAY_SIZE(priv->rsts), priv->rsts); -@@ -1298,6 +1306,10 @@ static int airoha_pcs_probe(struct platf +@@ -1300,6 +1308,10 @@ static int airoha_pcs_probe(struct platf if (ret) return dev_err_probe(dev, ret, "failed to get bulk reset lines\n"); diff --git a/target/linux/airoha/patches-6.18/801-01-net-phy-add-PHY_DETACH_NO_HW_RESET-PHY-flag.patch b/target/linux/airoha/patches-6.18/801-01-net-phy-add-PHY_DETACH_NO_HW_RESET-PHY-flag.patch index 0c273f000f..2b978e1160 100644 --- a/target/linux/airoha/patches-6.18/801-01-net-phy-add-PHY_DETACH_NO_HW_RESET-PHY-flag.patch +++ b/target/linux/airoha/patches-6.18/801-01-net-phy-add-PHY_DETACH_NO_HW_RESET-PHY-flag.patch @@ -107,8 +107,8 @@ Signed-off-by: Christian Marangi module_phy_driver(as21xxx_drivers); --- a/drivers/net/phy/phy_device.c +++ b/drivers/net/phy/phy_device.c -@@ -2069,7 +2069,8 @@ void phy_detach(struct phy_device *phyde - device_release_driver(&phydev->mdio.dev); +@@ -1882,7 +1882,8 @@ void phy_detach(struct phy_device *phyde + } /* Assert the reset signal */ - phy_device_reset(phydev, 1); @@ -119,7 +119,7 @@ Signed-off-by: Christian Marangi * The phydev might go away on the put_device() below, so avoid --- a/include/linux/phy.h +++ b/include/linux/phy.h -@@ -90,6 +90,7 @@ extern const int phy_10gbit_features_arr +@@ -64,6 +64,7 @@ extern const int phy_basic_ports_array[3 #define PHY_RST_AFTER_CLK_EN 0x00000002 #define PHY_POLL_CABLE_TEST 0x00000004 #define PHY_ALWAYS_CALL_SUSPEND 0x00000008 diff --git a/target/linux/airoha/patches-6.18/886-uart-add-en7523-support.patch b/target/linux/airoha/patches-6.18/886-uart-add-en7523-support.patch index f6ea73fa47..db613856b5 100644 --- a/target/linux/airoha/patches-6.18/886-uart-add-en7523-support.patch +++ b/target/linux/airoha/patches-6.18/886-uart-add-en7523-support.patch @@ -97,7 +97,7 @@ +EXPORT_SYMBOL_GPL(en7523_set_uart_baud_rate); --- a/drivers/tty/serial/8250/8250_of.c +++ b/drivers/tty/serial/8250/8250_of.c -@@ -341,6 +341,7 @@ static const struct of_device_id of_plat +@@ -353,6 +353,7 @@ static const struct of_device_id of_plat { .compatible = "ti,da830-uart", .data = (void *)PORT_DA830, }, { .compatible = "nuvoton,wpcm450-uart", .data = (void *)PORT_NPCM, }, { .compatible = "nuvoton,npcm750-uart", .data = (void *)PORT_NPCM, }, @@ -107,7 +107,7 @@ MODULE_DEVICE_TABLE(of, of_platform_serial_table); --- a/drivers/tty/serial/8250/8250_port.c +++ b/drivers/tty/serial/8250/8250_port.c -@@ -319,6 +319,14 @@ static const struct serial8250_config ua +@@ -311,6 +311,14 @@ static const struct serial8250_config ua .rxtrig_bytes = {1, 8, 16, 30}, .flags = UART_CAP_FIFO | UART_CAP_AFE, }, @@ -122,9 +122,9 @@ }; /* Uart divisor latch read */ -@@ -2841,6 +2849,12 @@ serial8250_do_set_termios(struct uart_po - - serial8250_set_divisor(port, baud, quot, frac); +@@ -2766,6 +2774,12 @@ serial8250_do_set_termios(struct uart_po + baud = serial8250_get_baud_rate(port, termios, old); + quot = serial8250_get_divisor(port, baud, &frac); +#ifdef CONFIG_SERIAL_8250_AIROHA + /* Airoha SoCs have custom registers for baud rate settings */ @@ -133,11 +133,11 @@ +#endif + /* - * LCR DLAB must be set to enable 64-byte FIFO mode. If the FCR - * is written without DLAB set, this mode will be disabled. + * Ok, we're now changing the port state. Do it with interrupts disabled. + * --- a/drivers/tty/serial/8250/Kconfig +++ b/drivers/tty/serial/8250/Kconfig -@@ -355,6 +355,16 @@ config SERIAL_8250_ACORN +@@ -356,6 +356,16 @@ config SERIAL_8250_ACORN system, say Y to this option. The driver can handle 1, 2, or 3 port cards. If unsure, say N. diff --git a/target/linux/airoha/patches-6.18/901-snand-mtk-bmt-support.patch b/target/linux/airoha/patches-6.18/901-snand-mtk-bmt-support.patch index 2dc81292ec..804542b9f5 100644 --- a/target/linux/airoha/patches-6.18/901-snand-mtk-bmt-support.patch +++ b/target/linux/airoha/patches-6.18/901-snand-mtk-bmt-support.patch @@ -6,9 +6,9 @@ #include +#include - static int spinand_read_reg_op(struct spinand_device *spinand, u8 reg, u8 *val) + int spinand_read_reg_op(struct spinand_device *spinand, u8 reg, u8 *val) { -@@ -1604,6 +1605,7 @@ static int spinand_probe(struct spi_mem +@@ -1718,6 +1719,7 @@ static int spinand_probe(struct spi_mem if (ret) return ret; @@ -16,7 +16,7 @@ ret = mtd_device_register(mtd, NULL, 0); if (ret) goto err_spinand_cleanup; -@@ -1611,6 +1613,7 @@ static int spinand_probe(struct spi_mem +@@ -1725,6 +1727,7 @@ static int spinand_probe(struct spi_mem return 0; err_spinand_cleanup: @@ -24,7 +24,7 @@ spinand_cleanup(spinand); return ret; -@@ -1629,6 +1632,7 @@ static int spinand_remove(struct spi_mem +@@ -1743,6 +1746,7 @@ static int spinand_remove(struct spi_mem if (ret) return ret; diff --git a/target/linux/airoha/patches-6.18/912-pcie-mediatek-gen3-Add-x2-link-support-for-Airoha-EN7581.patch b/target/linux/airoha/patches-6.18/912-pcie-mediatek-gen3-Add-x2-link-support-for-Airoha-EN7581.patch index 9426756203..ec45c45711 100644 --- a/target/linux/airoha/patches-6.18/912-pcie-mediatek-gen3-Add-x2-link-support-for-Airoha-EN7581.patch +++ b/target/linux/airoha/patches-6.18/912-pcie-mediatek-gen3-Add-x2-link-support-for-Airoha-EN7581.patch @@ -21,7 +21,7 @@ link to retrain at Gen3 x2 (8 GT/s). Signed-off-by: Ryan Chen --- a/drivers/pci/controller/pcie-mediatek-gen3.c +++ b/drivers/pci/controller/pcie-mediatek-gen3.c -@@ -61,6 +61,14 @@ +@@ -67,6 +67,14 @@ #define PCIE_LTSSM_STATE(val) ((val & PCIE_LTSSM_STATE_MASK) >> 24) #define PCIE_LTSSM_STATE_L2_IDLE 0x14 @@ -36,7 +36,7 @@ Signed-off-by: Ryan Chen #define PCIE_LINK_STATUS_REG 0x154 #define PCIE_PORT_LINKUP BIT(8) -@@ -205,6 +213,11 @@ struct mtk_gen3_pcie { +@@ -221,6 +229,11 @@ struct mtk_gen3_pcie { DECLARE_BITMAP(msi_irq_in_use, PCIE_MSI_IRQS_NUM); const struct mtk_gen3_pcie_pdata *soc; @@ -48,7 +48,7 @@ Signed-off-by: Ryan Chen }; /* LTSSM state in PCIE_LTSSM_STATUS_REG bit[28:24] */ -@@ -925,6 +938,28 @@ static int mtk_pcie_en7581_power_up(stru +@@ -969,6 +982,28 @@ static int mtk_pcie_en7581_power_up(stru size = lower_32_bits(resource_size(entry->res)); regmap_write(pbus_regmap, args[1], GENMASK(31, __fls(size))); @@ -77,7 +77,7 @@ Signed-off-by: Ryan Chen err = phy_set_mode(pcie->phy, PHY_MODE_PCIE); if (err) { dev_err(dev, "failed to set PHY mode\n"); -@@ -962,17 +997,28 @@ static int mtk_pcie_en7581_power_up(stru +@@ -1007,17 +1042,28 @@ static int mtk_pcie_en7581_power_up(stru pm_runtime_enable(dev); pm_runtime_get_sync(dev); @@ -117,7 +117,7 @@ Signed-off-by: Ryan Chen err = clk_bulk_prepare_enable(pcie->num_clks, pcie->clks); if (err) { -@@ -981,12 +1027,121 @@ static int mtk_pcie_en7581_power_up(stru +@@ -1026,12 +1072,121 @@ static int mtk_pcie_en7581_power_up(stru } /* diff --git a/target/linux/airoha/patches-6.18/913-pcie-mediatek-gen3-fix-x2-mode-PERST-deassert.patch b/target/linux/airoha/patches-6.18/913-pcie-mediatek-gen3-fix-x2-mode-PERST-deassert.patch index 2be755f4a4..e6ac81c08e 100644 --- a/target/linux/airoha/patches-6.18/913-pcie-mediatek-gen3-fix-x2-mode-PERST-deassert.patch +++ b/target/linux/airoha/patches-6.18/913-pcie-mediatek-gen3-fix-x2-mode-PERST-deassert.patch @@ -27,8 +27,6 @@ Signed-off-by: Kenneth Kasilag drivers/pci/controller/pcie-mediatek-gen3.c | 124 ++++++++------- 1 file changed, 86 insertions(+), 38 deletions(-) -diff --git a/drivers/pci/controller/pcie-mediatek-gen3.c b/drivers/pci/controller/pcie-mediatek-gen3.c -index afcd4343293e0f..cf7d5272eadb6e 100644 --- a/drivers/pci/controller/pcie-mediatek-gen3.c +++ b/drivers/pci/controller/pcie-mediatek-gen3.c @@ -72,8 +72,21 @@ diff --git a/target/linux/airoha/patches-6.18/915-02-net-airoha-Set-hw-QoS-parameter-according-to-the-pac.patch b/target/linux/airoha/patches-6.18/915-02-net-airoha-Set-hw-QoS-parameter-according-to-the-pac.patch index 15eded87d3..6acc99da3e 100644 --- a/target/linux/airoha/patches-6.18/915-02-net-airoha-Set-hw-QoS-parameter-according-to-the-pac.patch +++ b/target/linux/airoha/patches-6.18/915-02-net-airoha-Set-hw-QoS-parameter-according-to-the-pac.patch @@ -25,7 +25,7 @@ Signed-off-by: Lorenzo Bianconi #include "airoha_regs.h" #include "airoha_eth.h" -@@ -298,7 +299,7 @@ static int airoha_ppe_foe_entry_prepare( +@@ -300,7 +301,7 @@ static int airoha_ppe_foe_entry_prepare( struct airoha_foe_entry *hwe, struct net_device *dev, int type, struct airoha_flow_data *data, @@ -34,7 +34,7 @@ Signed-off-by: Lorenzo Bianconi { u32 qdata = FIELD_PREP(AIROHA_FOE_SHAPER_ID, 0x7f), ports_pad, val; int wlan_etype = -EINVAL, dsa_port = airoha_get_dsa_port(&dev); -@@ -331,7 +332,7 @@ static int airoha_ppe_foe_entry_prepare( +@@ -333,7 +334,7 @@ static int airoha_ppe_foe_entry_prepare( info.wcid); } else { struct airoha_gdm_port *port = netdev_priv(dev); @@ -43,7 +43,7 @@ Signed-off-by: Lorenzo Bianconi if (!airoha_is_valid_gdm_port(eth, port)) return -EINVAL; -@@ -350,9 +351,13 @@ static int airoha_ppe_foe_entry_prepare( +@@ -352,9 +353,13 @@ static int airoha_ppe_foe_entry_prepare( */ channel = dsa_port >= 0 ? dsa_port : port->id; channel = channel % AIROHA_NUM_QOS_CHANNELS; @@ -58,7 +58,7 @@ Signed-off-by: Lorenzo Bianconi AIROHA_FOE_IB2_PSE_QOS; /* For downlink traffic consume SRAM memory for hw * forwarding descriptors queue. -@@ -1044,9 +1049,9 @@ static int airoha_ppe_flow_offload_repla +@@ -1046,9 +1051,9 @@ static int airoha_ppe_flow_offload_repla struct net_device *odev = NULL; struct flow_action_entry *act; struct airoha_foe_entry hwe; @@ -69,7 +69,7 @@ Signed-off-by: Lorenzo Bianconi if (rhashtable_lookup(ð->flow_table, &f->cookie, airoha_flow_table_params)) -@@ -1076,6 +1081,13 @@ static int airoha_ppe_flow_offload_repla +@@ -1078,6 +1083,13 @@ static int airoha_ppe_flow_offload_repla return -EOPNOTSUPP; } @@ -83,7 +83,7 @@ Signed-off-by: Lorenzo Bianconi switch (addr_type) { case 0: offload_type = PPE_PKT_TYPE_BRIDGE; -@@ -1141,7 +1153,7 @@ static int airoha_ppe_flow_offload_repla +@@ -1143,7 +1155,7 @@ static int airoha_ppe_flow_offload_repla return -EINVAL; err = airoha_ppe_foe_entry_prepare(eth, &hwe, odev, offload_type, diff --git a/target/linux/airoha/patches-6.18/920-02-net-airoha-Move-airoha_qdma-pointer-in-airoha_gdm_de.patch b/target/linux/airoha/patches-6.18/920-02-net-airoha-Move-airoha_qdma-pointer-in-airoha_gdm_de.patch index 6b2ab1c70f..8f3dd2d1d1 100644 --- a/target/linux/airoha/patches-6.18/920-02-net-airoha-Move-airoha_qdma-pointer-in-airoha_gdm_de.patch +++ b/target/linux/airoha/patches-6.18/920-02-net-airoha-Move-airoha_qdma-pointer-in-airoha_gdm_de.patch @@ -155,7 +155,7 @@ Signed-off-by: Lorenzo Bianconi + airoha_ppe_set_cpu_port(dev, i, AIROHA_GDM2_IDX); if (port->id == AIROHA_GDM4_IDX && airoha_is_7581(eth)) { - u32 mask = FC_ID_OF_SRC_PORT_MASK(port->nbq); + u32 mask = FC_ID_OF_SRC_PORT_MASK(nbq); @@ -2033,9 +2038,9 @@ static int airoha_dev_init(struct net_de int i; @@ -476,7 +476,7 @@ Signed-off-by: Lorenzo Bianconi } } } -@@ -1483,11 +1483,12 @@ void airoha_ppe_check_skb(struct airoha_ +@@ -1485,11 +1485,12 @@ void airoha_ppe_check_skb(struct airoha_ airoha_ppe_foe_insert_entry(ppe, skb, hash, rx_wlan); } diff --git a/target/linux/airoha/patches-6.18/920-03-net-airoha-Rely-on-airoha_gdm_dev-pointer-in-airoha_.patch b/target/linux/airoha/patches-6.18/920-03-net-airoha-Rely-on-airoha_gdm_dev-pointer-in-airoha_.patch index dfcd606c4d..3ae068204b 100644 --- a/target/linux/airoha/patches-6.18/920-03-net-airoha-Rely-on-airoha_gdm_dev-pointer-in-airoha_.patch +++ b/target/linux/airoha/patches-6.18/920-03-net-airoha-Rely-on-airoha_gdm_dev-pointer-in-airoha_.patch @@ -62,7 +62,7 @@ Signed-off-by: Lorenzo Bianconi * phy module. --- a/drivers/net/ethernet/airoha/airoha_ppe.c +++ b/drivers/net/ethernet/airoha/airoha_ppe.c -@@ -365,7 +365,7 @@ static int airoha_ppe_foe_entry_prepare( +@@ -367,7 +367,7 @@ static int airoha_ppe_foe_entry_prepare( /* For downlink traffic consume SRAM memory for hw * forwarding descriptors queue. */ diff --git a/target/linux/airoha/patches-6.18/920-08-net-airoha-Introduce-WAN-device-flag.patch b/target/linux/airoha/patches-6.18/920-08-net-airoha-Introduce-WAN-device-flag.patch index bb9145c228..9451c6fcee 100644 --- a/target/linux/airoha/patches-6.18/920-08-net-airoha-Introduce-WAN-device-flag.patch +++ b/target/linux/airoha/patches-6.18/920-08-net-airoha-Introduce-WAN-device-flag.patch @@ -163,7 +163,7 @@ Signed-off-by: Lorenzo Bianconi static inline bool airoha_is_7581(struct airoha_eth *eth) --- a/drivers/net/ethernet/airoha/airoha_ppe.c +++ b/drivers/net/ethernet/airoha/airoha_ppe.c -@@ -354,7 +354,7 @@ static int airoha_ppe_foe_entry_prepare( +@@ -356,7 +356,7 @@ static int airoha_ppe_foe_entry_prepare( return -EINVAL; port = dev->port; diff --git a/target/linux/airoha/patches-6.18/920-09-net-airoha-Support-multiple-LAN-WAN-interfaces-for-h.patch b/target/linux/airoha/patches-6.18/920-09-net-airoha-Support-multiple-LAN-WAN-interfaces-for-h.patch index d60794e1b7..be9382c9eb 100644 --- a/target/linux/airoha/patches-6.18/920-09-net-airoha-Support-multiple-LAN-WAN-interfaces-for-h.patch +++ b/target/linux/airoha/patches-6.18/920-09-net-airoha-Support-multiple-LAN-WAN-interfaces-for-h.patch @@ -145,7 +145,7 @@ Signed-off-by: Lorenzo Bianconi u32 hash); --- a/drivers/net/ethernet/airoha/airoha_ppe.c +++ b/drivers/net/ethernet/airoha/airoha_ppe.c -@@ -1497,12 +1497,10 @@ void airoha_ppe_check_skb(struct airoha_ +@@ -1499,12 +1499,10 @@ void airoha_ppe_check_skb(struct airoha_ airoha_ppe_foe_insert_entry(ppe, skb, hash, rx_wlan); }