From 52870ddf62057533a721cd502b0ea88b47310262 Mon Sep 17 00:00:00 2001 From: John Audia Date: Sat, 22 Mar 2025 17:35:16 -0400 Subject: [PATCH 01/49] kernel: bump 6.6 to 6.6.84 Changelog: https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.6.84 All patches automatically rebased. Build system: x86/64 Build-tested: flogic/xiaomi_redmi-router-ax6000-ubootmod, x86/64 Run-tested: flogic/xiaomi_redmi-router-ax6000-ubootmod, x86/64 Signed-off-by: John Audia Link: https://github.com/openwrt/openwrt/pull/18326 Signed-off-by: Nick Hainke (cherry picked from commit 314ca0387743e5d18850d9c7c959a3206ec6fbc5) Link: https://github.com/openwrt/openwrt/pull/18419 Signed-off-by: Hauke Mehrtens --- include/kernel-6.6 | 4 ++-- ...mic-helpers-remove-legacy_cursor_update-hacks.patch | 2 +- ...-Add-device-quirks-for-Freeway-Airmouse-T3-an.patch | 4 ++-- .../950-0923-drm-Add-DRM_MODE_TV_MODE_MONOCHROME.patch | 2 +- ...el-Add-and-initialise-an-orientation-field-to.patch | 2 +- ...-mv88e6xxx-rename-mv88e6xxx_g2_scratch_gpio_s.patch | 2 +- ...-mv88e6xxx-add-Amethyst-specific-SMI-GPIO-fun.patch | 2 +- ...1-v6.13-net-dsa-mv88e6xxx-Support-LED-control.patch | 10 +++++----- .../711-net-dsa-mv88e6xxx-disable-ATU-violation.patch | 2 +- .../linux/generic/hack-6.6/904-debloat_dma_buf.patch | 2 +- ...er-nf_tables-ignore-EOPNOTSUPP-on-flowtable-d.patch | 2 +- 11 files changed, 17 insertions(+), 17 deletions(-) diff --git a/include/kernel-6.6 b/include/kernel-6.6 index e6f3c97c6e..250365a50f 100644 --- a/include/kernel-6.6 +++ b/include/kernel-6.6 @@ -1,2 +1,2 @@ -LINUX_VERSION-6.6 = .83 -LINUX_KERNEL_HASH-6.6.83 = 894bbbe63b7484a0bc576a1e11a8dbc090fbd476d6424431bdc8435e03c2c208 +LINUX_VERSION-6.6 = .84 +LINUX_KERNEL_HASH-6.6.84 = 7fd20721551a61db347c5ac6ca05818e24058682be4e4389dc51e88d4ac17ba7 diff --git a/target/linux/bcm27xx/patches-6.6/950-0025-drm-atomic-helpers-remove-legacy_cursor_update-hacks.patch b/target/linux/bcm27xx/patches-6.6/950-0025-drm-atomic-helpers-remove-legacy_cursor_update-hacks.patch index 4c3ff50b8c..a0981c9c0d 100644 --- a/target/linux/bcm27xx/patches-6.6/950-0025-drm-atomic-helpers-remove-legacy_cursor_update-hacks.patch +++ b/target/linux/bcm27xx/patches-6.6/950-0025-drm-atomic-helpers-remove-legacy_cursor_update-hacks.patch @@ -89,7 +89,7 @@ Signed-off-by: Maxime Ripard commit->event = kzalloc(sizeof(*commit->event), --- a/drivers/gpu/drm/i915/display/intel_display.c +++ b/drivers/gpu/drm/i915/display/intel_display.c -@@ -7298,6 +7298,19 @@ int intel_atomic_commit(struct drm_devic +@@ -7297,6 +7297,19 @@ int intel_atomic_commit(struct drm_devic state->base.legacy_cursor_update = false; } diff --git a/target/linux/bcm27xx/patches-6.6/950-0169-hid-usb-Add-device-quirks-for-Freeway-Airmouse-T3-an.patch b/target/linux/bcm27xx/patches-6.6/950-0169-hid-usb-Add-device-quirks-for-Freeway-Airmouse-T3-an.patch index afdb5aca08..9b6617361f 100644 --- a/target/linux/bcm27xx/patches-6.6/950-0169-hid-usb-Add-device-quirks-for-Freeway-Airmouse-T3-an.patch +++ b/target/linux/bcm27xx/patches-6.6/950-0169-hid-usb-Add-device-quirks-for-Freeway-Airmouse-T3-an.patch @@ -23,7 +23,7 @@ Signed-off-by: Jonathan Bell --- a/drivers/hid/hid-ids.h +++ b/drivers/hid/hid-ids.h -@@ -243,6 +243,9 @@ +@@ -244,6 +244,9 @@ #define USB_VENDOR_ID_BAANTO 0x2453 #define USB_DEVICE_ID_BAANTO_MT_190W2 0x0100 @@ -33,7 +33,7 @@ Signed-off-by: Jonathan Bell #define USB_VENDOR_ID_BELKIN 0x050d #define USB_DEVICE_ID_FLIP_KVM 0x3201 -@@ -1405,6 +1408,9 @@ +@@ -1408,6 +1411,9 @@ #define USB_VENDOR_ID_XIAOMI 0x2717 #define USB_DEVICE_ID_MI_SILENT_MOUSE 0x5014 diff --git a/target/linux/bcm27xx/patches-6.6/950-0923-drm-Add-DRM_MODE_TV_MODE_MONOCHROME.patch b/target/linux/bcm27xx/patches-6.6/950-0923-drm-Add-DRM_MODE_TV_MODE_MONOCHROME.patch index c4a5537a8c..2fd1278488 100644 --- a/target/linux/bcm27xx/patches-6.6/950-0923-drm-Add-DRM_MODE_TV_MODE_MONOCHROME.patch +++ b/target/linux/bcm27xx/patches-6.6/950-0923-drm-Add-DRM_MODE_TV_MODE_MONOCHROME.patch @@ -29,7 +29,7 @@ Signed-off-by: Nick Hollinghurst }; DRM_ENUM_NAME_FN(drm_get_tv_mode_name, drm_tv_mode_enum_list) -@@ -1736,6 +1737,12 @@ EXPORT_SYMBOL(drm_connector_attach_dp_su +@@ -1740,6 +1741,12 @@ EXPORT_SYMBOL(drm_connector_attach_dp_su * TV Mode is CCIR System B (aka 625-lines) together with * the SECAM Color Encoding. * diff --git a/target/linux/bcm27xx/patches-6.6/950-1051-drm-panel-Add-and-initialise-an-orientation-field-to.patch b/target/linux/bcm27xx/patches-6.6/950-1051-drm-panel-Add-and-initialise-an-orientation-field-to.patch index 6d745f6e9d..9dcdb585b1 100644 --- a/target/linux/bcm27xx/patches-6.6/950-1051-drm-panel-Add-and-initialise-an-orientation-field-to.patch +++ b/target/linux/bcm27xx/patches-6.6/950-1051-drm-panel-Add-and-initialise-an-orientation-field-to.patch @@ -22,7 +22,7 @@ Signed-off-by: Dave Stevenson --- a/drivers/gpu/drm/drm_connector.c +++ b/drivers/gpu/drm/drm_connector.c -@@ -2698,10 +2698,15 @@ int drm_connector_set_orientation_from_p +@@ -2702,10 +2702,15 @@ int drm_connector_set_orientation_from_p { enum drm_panel_orientation orientation; diff --git a/target/linux/generic/backport-6.6/896-01-v6.9-net-dsa-mv88e6xxx-rename-mv88e6xxx_g2_scratch_gpio_s.patch b/target/linux/generic/backport-6.6/896-01-v6.9-net-dsa-mv88e6xxx-rename-mv88e6xxx_g2_scratch_gpio_s.patch index 48dd6ffb67..2c3e99d8e0 100644 --- a/target/linux/generic/backport-6.6/896-01-v6.9-net-dsa-mv88e6xxx-rename-mv88e6xxx_g2_scratch_gpio_s.patch +++ b/target/linux/generic/backport-6.6/896-01-v6.9-net-dsa-mv88e6xxx-rename-mv88e6xxx_g2_scratch_gpio_s.patch @@ -19,7 +19,7 @@ Signed-off-by: Paolo Abeni --- a/drivers/net/dsa/mv88e6xxx/chip.c +++ b/drivers/net/dsa/mv88e6xxx/chip.c -@@ -3669,7 +3669,7 @@ static int mv88e6xxx_mdio_register(struc +@@ -3699,7 +3699,7 @@ static int mv88e6xxx_mdio_register(struc if (external) { mv88e6xxx_reg_lock(chip); diff --git a/target/linux/generic/backport-6.6/896-02-v6.9-net-dsa-mv88e6xxx-add-Amethyst-specific-SMI-GPIO-fun.patch b/target/linux/generic/backport-6.6/896-02-v6.9-net-dsa-mv88e6xxx-add-Amethyst-specific-SMI-GPIO-fun.patch index e5931573f7..875acd3ba1 100644 --- a/target/linux/generic/backport-6.6/896-02-v6.9-net-dsa-mv88e6xxx-add-Amethyst-specific-SMI-GPIO-fun.patch +++ b/target/linux/generic/backport-6.6/896-02-v6.9-net-dsa-mv88e6xxx-add-Amethyst-specific-SMI-GPIO-fun.patch @@ -27,7 +27,7 @@ Signed-off-by: Paolo Abeni --- a/drivers/net/dsa/mv88e6xxx/chip.c +++ b/drivers/net/dsa/mv88e6xxx/chip.c -@@ -3669,7 +3669,10 @@ static int mv88e6xxx_mdio_register(struc +@@ -3699,7 +3699,10 @@ static int mv88e6xxx_mdio_register(struc if (external) { mv88e6xxx_reg_lock(chip); diff --git a/target/linux/generic/backport-6.6/901-v6.13-net-dsa-mv88e6xxx-Support-LED-control.patch b/target/linux/generic/backport-6.6/901-v6.13-net-dsa-mv88e6xxx-Support-LED-control.patch index 711246da61..1674359d26 100644 --- a/target/linux/generic/backport-6.6/901-v6.13-net-dsa-mv88e6xxx-Support-LED-control.patch +++ b/target/linux/generic/backport-6.6/901-v6.13-net-dsa-mv88e6xxx-Support-LED-control.patch @@ -127,7 +127,7 @@ Signed-off-by: Linus Walleij #include #include #include -@@ -3235,14 +3236,43 @@ static int mv88e6xxx_setup_upstream_port +@@ -3265,14 +3266,43 @@ static int mv88e6xxx_setup_upstream_port static int mv88e6xxx_setup_port(struct mv88e6xxx_chip *chip, int port) { struct device_node *phy_handle = NULL; @@ -173,7 +173,7 @@ Signed-off-by: Linus Walleij err = mv88e6xxx_port_setup_mac(chip, port, LINK_UNFORCED, SPEED_UNFORCED, DUPLEX_UNFORCED, -@@ -4461,6 +4491,7 @@ static const struct mv88e6xxx_ops mv88e6 +@@ -4491,6 +4521,7 @@ static const struct mv88e6xxx_ops mv88e6 .port_disable_learn_limit = mv88e6xxx_port_disable_learn_limit, .port_disable_pri_override = mv88e6xxx_port_disable_pri_override, .port_get_cmode = mv88e6352_port_get_cmode, @@ -181,7 +181,7 @@ Signed-off-by: Linus Walleij .port_setup_message_port = mv88e6xxx_setup_message_port, .stats_snapshot = mv88e6320_g1_stats_snapshot, .stats_set_histogram = mv88e6095_g1_stats_set_histogram, -@@ -4563,6 +4594,7 @@ static const struct mv88e6xxx_ops mv88e6 +@@ -4593,6 +4624,7 @@ static const struct mv88e6xxx_ops mv88e6 .port_disable_learn_limit = mv88e6xxx_port_disable_learn_limit, .port_disable_pri_override = mv88e6xxx_port_disable_pri_override, .port_get_cmode = mv88e6352_port_get_cmode, @@ -189,7 +189,7 @@ Signed-off-by: Linus Walleij .port_setup_message_port = mv88e6xxx_setup_message_port, .stats_snapshot = mv88e6320_g1_stats_snapshot, .stats_set_histogram = mv88e6095_g1_stats_set_histogram, -@@ -4838,6 +4870,7 @@ static const struct mv88e6xxx_ops mv88e6 +@@ -4868,6 +4900,7 @@ static const struct mv88e6xxx_ops mv88e6 .port_disable_learn_limit = mv88e6xxx_port_disable_learn_limit, .port_disable_pri_override = mv88e6xxx_port_disable_pri_override, .port_get_cmode = mv88e6352_port_get_cmode, @@ -197,7 +197,7 @@ Signed-off-by: Linus Walleij .port_setup_message_port = mv88e6xxx_setup_message_port, .stats_snapshot = mv88e6320_g1_stats_snapshot, .stats_set_histogram = mv88e6095_g1_stats_set_histogram, -@@ -5260,6 +5293,7 @@ static const struct mv88e6xxx_ops mv88e6 +@@ -5290,6 +5323,7 @@ static const struct mv88e6xxx_ops mv88e6 .port_disable_learn_limit = mv88e6xxx_port_disable_learn_limit, .port_disable_pri_override = mv88e6xxx_port_disable_pri_override, .port_get_cmode = mv88e6352_port_get_cmode, diff --git a/target/linux/generic/hack-6.6/711-net-dsa-mv88e6xxx-disable-ATU-violation.patch b/target/linux/generic/hack-6.6/711-net-dsa-mv88e6xxx-disable-ATU-violation.patch index bf93a87e02..ab594a471e 100644 --- a/target/linux/generic/hack-6.6/711-net-dsa-mv88e6xxx-disable-ATU-violation.patch +++ b/target/linux/generic/hack-6.6/711-net-dsa-mv88e6xxx-disable-ATU-violation.patch @@ -9,7 +9,7 @@ Subject: [PATCH] net/dsa/mv88e6xxx: disable ATU violation --- a/drivers/net/dsa/mv88e6xxx/chip.c +++ b/drivers/net/dsa/mv88e6xxx/chip.c -@@ -3405,6 +3405,9 @@ static int mv88e6xxx_setup_port(struct m +@@ -3435,6 +3435,9 @@ static int mv88e6xxx_setup_port(struct m else reg = 1 << port; diff --git a/target/linux/generic/hack-6.6/904-debloat_dma_buf.patch b/target/linux/generic/hack-6.6/904-debloat_dma_buf.patch index 3ca98788ab..4d2ea46212 100644 --- a/target/linux/generic/hack-6.6/904-debloat_dma_buf.patch +++ b/target/linux/generic/hack-6.6/904-debloat_dma_buf.patch @@ -73,7 +73,7 @@ Signed-off-by: Felix Fietkau +MODULE_LICENSE("GPL"); --- a/kernel/sched/core.c +++ b/kernel/sched/core.c -@@ -4485,6 +4485,7 @@ int wake_up_state(struct task_struct *p, +@@ -4486,6 +4486,7 @@ int wake_up_state(struct task_struct *p, { return try_to_wake_up(p, state, 0); } diff --git a/target/linux/generic/pending-6.6/701-netfilter-nf_tables-ignore-EOPNOTSUPP-on-flowtable-d.patch b/target/linux/generic/pending-6.6/701-netfilter-nf_tables-ignore-EOPNOTSUPP-on-flowtable-d.patch index 373b3e87ba..1ae6f89399 100644 --- a/target/linux/generic/pending-6.6/701-netfilter-nf_tables-ignore-EOPNOTSUPP-on-flowtable-d.patch +++ b/target/linux/generic/pending-6.6/701-netfilter-nf_tables-ignore-EOPNOTSUPP-on-flowtable-d.patch @@ -18,7 +18,7 @@ Signed-off-by: Felix Fietkau --- a/net/netfilter/nf_tables_api.c +++ b/net/netfilter/nf_tables_api.c -@@ -8470,7 +8470,7 @@ static int nft_register_flowtable_net_ho +@@ -8469,7 +8469,7 @@ static int nft_register_flowtable_net_ho err = flowtable->data.type->setup(&flowtable->data, hook->ops.dev, FLOW_BLOCK_BIND); From cf3988c266d85a473bb1bc30530c8938a81e0912 Mon Sep 17 00:00:00 2001 From: John Audia Date: Sun, 30 Mar 2025 08:40:06 -0400 Subject: [PATCH 02/49] kernel: bump 6.6 to 6.6.85 Changelog: https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.6.85 Removed upstreamed: bcm27xx/patches-6.6/950-1498-dts-bcm2711-PL011-UARTs-are-actually-r1p5.patch[1] bcm27xx/patches-6.6/950-1551-drm-v3d-Don-t-run-jobs-that-have-errors-flagged-in-i.patch[2] Manually rebased: bcm27xx/patches-6.6/950-1512-dts-bcm2711-Don-t-mark-timer-regs-unconfigured.patch All other patches automatically rebased. 1. https://web.git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.6.85&id=61820187b3ef5a15aed7ef49ed1fcc13398b449c 2. https://web.git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.6.85&id=7cd375d46afcce906cfcddf5aec6b318199d1f16 Build system: x86/64 Build-tested: flogic/xiaomi_redmi-router-ax6000-ubootmod, ramips/tplink_archer-a6-v3, x86/64 Run-tested: flogic/xiaomi_redmi-router-ax6000-ubootmod, ramips/tplink_archer-a6-v3, x86/64 Signed-off-by: John Audia Link: https://github.com/openwrt/openwrt/pull/18379 (cherry picked from commit 2e71e41ce66077515a8c4f5be82c75aeeead659d) Link: https://github.com/openwrt/openwrt/pull/18419 Signed-off-by: Hauke Mehrtens --- include/kernel-6.6 | 4 +- ...gfs-end-points-to-query-GPU-usage-st.patch | 10 +-- ...ix-up-register-addresses-for-V3D-7.x.patch | 12 ++-- ...cm2711-PL011-UARTs-are-actually-r1p5.patch | 60 ------------------ ...1-Don-t-mark-timer-regs-unconfigured.patch | 11 ---- ...n-jobs-that-have-errors-flagged-in-i.patch | 61 ------------------- ...ng-with-source-address-failed-policy.patch | 18 +++--- 7 files changed, 22 insertions(+), 154 deletions(-) delete mode 100644 target/linux/bcm27xx/patches-6.6/950-1498-dts-bcm2711-PL011-UARTs-are-actually-r1p5.patch delete mode 100644 target/linux/bcm27xx/patches-6.6/950-1551-drm-v3d-Don-t-run-jobs-that-have-errors-flagged-in-i.patch diff --git a/include/kernel-6.6 b/include/kernel-6.6 index 250365a50f..2b70664440 100644 --- a/include/kernel-6.6 +++ b/include/kernel-6.6 @@ -1,2 +1,2 @@ -LINUX_VERSION-6.6 = .84 -LINUX_KERNEL_HASH-6.6.84 = 7fd20721551a61db347c5ac6ca05818e24058682be4e4389dc51e88d4ac17ba7 +LINUX_VERSION-6.6 = .85 +LINUX_KERNEL_HASH-6.6.85 = 5ebaccf4ca3428cd26817bae62171f4efd270eed866a3e3d0a1d9e970b7b7529 diff --git a/target/linux/bcm27xx/patches-6.6/950-0464-drm-v3d-New-debugfs-end-points-to-query-GPU-usage-st.patch b/target/linux/bcm27xx/patches-6.6/950-0464-drm-v3d-New-debugfs-end-points-to-query-GPU-usage-st.patch index 6e546e6754..9ff7a6d0ad 100644 --- a/target/linux/bcm27xx/patches-6.6/950-0464-drm-v3d-New-debugfs-end-points-to-query-GPU-usage-st.patch +++ b/target/linux/bcm27xx/patches-6.6/950-0464-drm-v3d-New-debugfs-end-points-to-query-GPU-usage-st.patch @@ -423,7 +423,7 @@ Signed-off-by: Jose Maria Casanova Crespo v3d_switch_perfmon(v3d, &job->base); /* XXX: Set the QCFG */ -@@ -190,6 +301,7 @@ v3d_tfu_job_run(struct drm_sched_job *sc +@@ -194,6 +305,7 @@ v3d_tfu_job_run(struct drm_sched_job *sc trace_v3d_submit_tfu(dev, to_v3d_fence(fence)->seqno); @@ -431,7 +431,7 @@ Signed-off-by: Jose Maria Casanova Crespo V3D_WRITE(V3D_TFU_IIA, job->args.iia); V3D_WRITE(V3D_TFU_IIS, job->args.iis); V3D_WRITE(V3D_TFU_ICA, job->args.ica); -@@ -231,6 +343,7 @@ v3d_csd_job_run(struct drm_sched_job *sc +@@ -238,6 +350,7 @@ v3d_csd_job_run(struct drm_sched_job *sc trace_v3d_submit_csd(dev, to_v3d_fence(fence)->seqno); @@ -439,7 +439,7 @@ Signed-off-by: Jose Maria Casanova Crespo v3d_switch_perfmon(v3d, &job->base); for (i = 1; i <= 6; i++) -@@ -247,7 +360,10 @@ v3d_cache_clean_job_run(struct drm_sched +@@ -254,7 +367,10 @@ v3d_cache_clean_job_run(struct drm_sched struct v3d_job *job = to_v3d_job(sched_job); struct v3d_dev *v3d = job->v3d; @@ -450,7 +450,7 @@ Signed-off-by: Jose Maria Casanova Crespo return NULL; } -@@ -385,8 +501,18 @@ v3d_sched_init(struct v3d_dev *v3d) +@@ -392,8 +508,18 @@ v3d_sched_init(struct v3d_dev *v3d) int hw_jobs_limit = 1; int job_hang_limit = 0; int hang_limit_ms = 500; @@ -469,7 +469,7 @@ Signed-off-by: Jose Maria Casanova Crespo ret = drm_sched_init(&v3d->queue[V3D_BIN].sched, &v3d_bin_sched_ops, hw_jobs_limit, job_hang_limit, -@@ -440,9 +566,20 @@ void +@@ -447,9 +573,20 @@ void v3d_sched_fini(struct v3d_dev *v3d) { enum v3d_queue q; diff --git a/target/linux/bcm27xx/patches-6.6/950-0555-drm-v3d-fix-up-register-addresses-for-V3D-7.x.patch b/target/linux/bcm27xx/patches-6.6/950-0555-drm-v3d-fix-up-register-addresses-for-V3D-7.x.patch index ca8a34e8e1..4e81342876 100644 --- a/target/linux/bcm27xx/patches-6.6/950-0555-drm-v3d-fix-up-register-addresses-for-V3D-7.x.patch +++ b/target/linux/bcm27xx/patches-6.6/950-0555-drm-v3d-fix-up-register-addresses-for-V3D-7.x.patch @@ -600,7 +600,7 @@ v2: fix kernel panic with debug-fs interface to list registers static struct dma_fence * v3d_tfu_job_run(struct drm_sched_job *sched_job) { -@@ -302,20 +304,22 @@ v3d_tfu_job_run(struct drm_sched_job *sc +@@ -306,20 +308,22 @@ v3d_tfu_job_run(struct drm_sched_job *sc trace_v3d_submit_tfu(dev, to_v3d_fence(fence)->seqno); v3d_sched_stats_add_job(&v3d->gpu_queue_stats[V3D_TFU], sched_job); @@ -635,16 +635,16 @@ v2: fix kernel panic with debug-fs interface to list registers return fence; } -@@ -327,7 +331,7 @@ v3d_csd_job_run(struct drm_sched_job *sc +@@ -331,7 +335,7 @@ v3d_csd_job_run(struct drm_sched_job *sc struct v3d_dev *v3d = job->base.v3d; struct drm_device *dev = &v3d->drm; struct dma_fence *fence; - int i; + int i, csd_cfg0_reg, csd_cfg_reg_count; - v3d->csd_job = job; - -@@ -346,10 +350,12 @@ v3d_csd_job_run(struct drm_sched_job *sc + if (unlikely(job->base.base.s_fence->finished.error)) + return NULL; +@@ -353,10 +357,12 @@ v3d_csd_job_run(struct drm_sched_job *sc v3d_sched_stats_add_job(&v3d->gpu_queue_stats[V3D_CSD], sched_job); v3d_switch_perfmon(v3d, &job->base); @@ -660,7 +660,7 @@ v2: fix kernel panic with debug-fs interface to list registers return fence; } -@@ -452,7 +458,8 @@ v3d_csd_job_timedout(struct drm_sched_jo +@@ -459,7 +465,8 @@ v3d_csd_job_timedout(struct drm_sched_jo { struct v3d_csd_job *job = to_csd_job(sched_job); struct v3d_dev *v3d = job->base.v3d; diff --git a/target/linux/bcm27xx/patches-6.6/950-1498-dts-bcm2711-PL011-UARTs-are-actually-r1p5.patch b/target/linux/bcm27xx/patches-6.6/950-1498-dts-bcm2711-PL011-UARTs-are-actually-r1p5.patch deleted file mode 100644 index a184b3134a..0000000000 --- a/target/linux/bcm27xx/patches-6.6/950-1498-dts-bcm2711-PL011-UARTs-are-actually-r1p5.patch +++ /dev/null @@ -1,60 +0,0 @@ -From 87fc066350358ce45f5ad52424c8a2e351b1720c Mon Sep 17 00:00:00 2001 -From: Phil Elwell -Date: Tue, 7 Jan 2025 12:05:41 +0000 -Subject: [PATCH] dts: bcm2711: PL011 UARTs are actually r1p5 - -The ARM PL011 UART instances in BCM2711 are r1p5 spec, which means they -have 32-entry FIFOs. The correct periphid value for this is 0x00341011. -Thanks to N Buchwitz for pointing this out. - -Signed-off-by: Phil Elwell ---- - arch/arm/boot/dts/broadcom/bcm2711.dtsi | 9 +++++---- - 1 file changed, 5 insertions(+), 4 deletions(-) - ---- a/arch/arm/boot/dts/broadcom/bcm2711.dtsi -+++ b/arch/arm/boot/dts/broadcom/bcm2711.dtsi -@@ -134,7 +134,7 @@ - clocks = <&clocks BCM2835_CLOCK_UART>, - <&clocks BCM2835_CLOCK_VPU>; - clock-names = "uartclk", "apb_pclk"; -- arm,primecell-periphid = <0x00241011>; -+ arm,primecell-periphid = <0x00341011>; - status = "disabled"; - }; - -@@ -145,7 +145,7 @@ - clocks = <&clocks BCM2835_CLOCK_UART>, - <&clocks BCM2835_CLOCK_VPU>; - clock-names = "uartclk", "apb_pclk"; -- arm,primecell-periphid = <0x00241011>; -+ arm,primecell-periphid = <0x00341011>; - status = "disabled"; - }; - -@@ -156,7 +156,7 @@ - clocks = <&clocks BCM2835_CLOCK_UART>, - <&clocks BCM2835_CLOCK_VPU>; - clock-names = "uartclk", "apb_pclk"; -- arm,primecell-periphid = <0x00241011>; -+ arm,primecell-periphid = <0x00341011>; - status = "disabled"; - }; - -@@ -167,7 +167,7 @@ - clocks = <&clocks BCM2835_CLOCK_UART>, - <&clocks BCM2835_CLOCK_VPU>; - clock-names = "uartclk", "apb_pclk"; -- arm,primecell-periphid = <0x00241011>; -+ arm,primecell-periphid = <0x00341011>; - status = "disabled"; - }; - -@@ -1155,6 +1155,7 @@ - }; - - &uart0 { -+ arm,primecell-periphid = <0x00341011>; - interrupts = ; - }; - diff --git a/target/linux/bcm27xx/patches-6.6/950-1512-dts-bcm2711-Don-t-mark-timer-regs-unconfigured.patch b/target/linux/bcm27xx/patches-6.6/950-1512-dts-bcm2711-Don-t-mark-timer-regs-unconfigured.patch index 81b37af340..168dd19f16 100644 --- a/target/linux/bcm27xx/patches-6.6/950-1512-dts-bcm2711-Don-t-mark-timer-regs-unconfigured.patch +++ b/target/linux/bcm27xx/patches-6.6/950-1512-dts-bcm2711-Don-t-mark-timer-regs-unconfigured.patch @@ -20,17 +20,6 @@ Signed-off-by: Phil Elwell arch/arm64/boot/dts/broadcom/bcm2712.dtsi | 2 -- 2 files changed, 4 deletions(-) ---- a/arch/arm/boot/dts/broadcom/bcm2711.dtsi -+++ b/arch/arm/boot/dts/broadcom/bcm2711.dtsi -@@ -451,8 +451,6 @@ - IRQ_TYPE_LEVEL_LOW)>, - ; -- /* This only applies to the ARMv7 stub */ -- arm,cpu-registers-not-fw-configured; - }; - - cpus: cpus { --- a/arch/arm64/boot/dts/broadcom/bcm2712.dtsi +++ b/arch/arm64/boot/dts/broadcom/bcm2712.dtsi @@ -741,8 +741,6 @@ diff --git a/target/linux/bcm27xx/patches-6.6/950-1551-drm-v3d-Don-t-run-jobs-that-have-errors-flagged-in-i.patch b/target/linux/bcm27xx/patches-6.6/950-1551-drm-v3d-Don-t-run-jobs-that-have-errors-flagged-in-i.patch deleted file mode 100644 index cdb9ad1888..0000000000 --- a/target/linux/bcm27xx/patches-6.6/950-1551-drm-v3d-Don-t-run-jobs-that-have-errors-flagged-in-i.patch +++ /dev/null @@ -1,61 +0,0 @@ -From 5258ca4ad089548a72657522443b9c3e46fd125b Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Ma=C3=ADra=20Canal?= -Date: Sat, 22 Feb 2025 14:40:21 -0300 -Subject: [PATCH] drm/v3d: Don't run jobs that have errors flagged in its fence -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -The V3D driver still relies on `drm_sched_increase_karma()` and -`drm_sched_resubmit_jobs()` for resubmissions when a timeout occurs. -The function `drm_sched_increase_karma()` marks the job as guilty, while -`drm_sched_resubmit_jobs()` sets an error (-ECANCELED) in the DMA fence of -that guilty job. - -Because of this, we must check whether the job’s DMA fence has been -flagged with an error before executing the job. Otherwise, the same guilty -job may be resubmitted indefinitely, causing repeated GPU resets. - -This patch adds a check for an error on the job's fence to prevent running -a guilty job that was previously flagged when the GPU timed out. - -Note that the CPU and CACHE_CLEAN queues do not require this check, as -their jobs are executed synchronously once the DRM scheduler starts them. - -Cc: stable@vger.kernel.org -Fixes: d223f98f0209 ("drm/v3d: Add support for compute shader dispatch.") -Fixes: 1584f16ca96e ("drm/v3d: Add support for submitting jobs to the TFU.") -Signed-off-by: Maíra Canal ---- - drivers/gpu/drm/v3d/v3d_sched.c | 9 ++++++++- - 1 file changed, 8 insertions(+), 1 deletion(-) - ---- a/drivers/gpu/drm/v3d/v3d_sched.c -+++ b/drivers/gpu/drm/v3d/v3d_sched.c -@@ -292,11 +292,15 @@ v3d_tfu_job_run(struct drm_sched_job *sc - struct drm_device *dev = &v3d->drm; - struct dma_fence *fence; - -+ if (unlikely(job->base.base.s_fence->finished.error)) -+ return NULL; -+ -+ v3d->tfu_job = job; -+ - fence = v3d_fence_create(v3d, V3D_TFU); - if (IS_ERR(fence)) - return NULL; - -- v3d->tfu_job = job; - if (job->base.irq_fence) - dma_fence_put(job->base.irq_fence); - job->base.irq_fence = dma_fence_get(fence); -@@ -333,6 +337,9 @@ v3d_csd_job_run(struct drm_sched_job *sc - struct dma_fence *fence; - int i, csd_cfg0_reg, csd_cfg_reg_count; - -+ if (unlikely(job->base.base.s_fence->finished.error)) -+ return NULL; -+ - v3d->csd_job = job; - - v3d_invalidate_caches(v3d); diff --git a/target/linux/generic/pending-6.6/670-ipv6-allow-rejecting-with-source-address-failed-policy.patch b/target/linux/generic/pending-6.6/670-ipv6-allow-rejecting-with-source-address-failed-policy.patch index 9b76c82a6f..ccafdf2911 100644 --- a/target/linux/generic/pending-6.6/670-ipv6-allow-rejecting-with-source-address-failed-policy.patch +++ b/target/linux/generic/pending-6.6/670-ipv6-allow-rejecting-with-source-address-failed-policy.patch @@ -157,7 +157,7 @@ Signed-off-by: Jonas Gorski case RTN_THROW: case RTN_UNREACHABLE: default: -@@ -4551,6 +4570,17 @@ static int ip6_pkt_prohibit_out(struct n +@@ -4554,6 +4573,17 @@ static int ip6_pkt_prohibit_out(struct n return ip6_pkt_drop(skb, ICMPV6_ADM_PROHIBITED, IPSTATS_MIB_OUTNOROUTES); } @@ -175,7 +175,7 @@ Signed-off-by: Jonas Gorski /* * Allocate a dst for local (unicast / anycast) address. */ -@@ -5042,7 +5072,8 @@ static int rtm_to_fib6_config(struct sk_ +@@ -5045,7 +5075,8 @@ static int rtm_to_fib6_config(struct sk_ if (rtm->rtm_type == RTN_UNREACHABLE || rtm->rtm_type == RTN_BLACKHOLE || rtm->rtm_type == RTN_PROHIBIT || @@ -185,7 +185,7 @@ Signed-off-by: Jonas Gorski cfg->fc_flags |= RTF_REJECT; if (rtm->rtm_type == RTN_LOCAL) -@@ -6304,6 +6335,8 @@ static int ip6_route_dev_notify(struct n +@@ -6307,6 +6338,8 @@ static int ip6_route_dev_notify(struct n #ifdef CONFIG_IPV6_MULTIPLE_TABLES net->ipv6.ip6_prohibit_entry->dst.dev = dev; net->ipv6.ip6_prohibit_entry->rt6i_idev = in6_dev_get(dev); @@ -194,7 +194,7 @@ Signed-off-by: Jonas Gorski net->ipv6.ip6_blk_hole_entry->dst.dev = dev; net->ipv6.ip6_blk_hole_entry->rt6i_idev = in6_dev_get(dev); #endif -@@ -6315,6 +6348,7 @@ static int ip6_route_dev_notify(struct n +@@ -6318,6 +6351,7 @@ static int ip6_route_dev_notify(struct n in6_dev_put_clear(&net->ipv6.ip6_null_entry->rt6i_idev); #ifdef CONFIG_IPV6_MULTIPLE_TABLES in6_dev_put_clear(&net->ipv6.ip6_prohibit_entry->rt6i_idev); @@ -202,7 +202,7 @@ Signed-off-by: Jonas Gorski in6_dev_put_clear(&net->ipv6.ip6_blk_hole_entry->rt6i_idev); #endif } -@@ -6515,6 +6549,8 @@ static int __net_init ip6_route_net_init +@@ -6518,6 +6552,8 @@ static int __net_init ip6_route_net_init #ifdef CONFIG_IPV6_MULTIPLE_TABLES net->ipv6.fib6_has_custom_rules = false; @@ -211,7 +211,7 @@ Signed-off-by: Jonas Gorski net->ipv6.ip6_prohibit_entry = kmemdup(&ip6_prohibit_entry_template, sizeof(*net->ipv6.ip6_prohibit_entry), GFP_KERNEL); -@@ -6525,11 +6561,21 @@ static int __net_init ip6_route_net_init +@@ -6528,11 +6564,21 @@ static int __net_init ip6_route_net_init ip6_template_metrics, true); INIT_LIST_HEAD(&net->ipv6.ip6_prohibit_entry->dst.rt_uncached); @@ -234,7 +234,7 @@ Signed-off-by: Jonas Gorski net->ipv6.ip6_blk_hole_entry->dst.ops = &net->ipv6.ip6_dst_ops; dst_init_metrics(&net->ipv6.ip6_blk_hole_entry->dst, ip6_template_metrics, true); -@@ -6556,6 +6602,8 @@ out: +@@ -6559,6 +6605,8 @@ out: return ret; #ifdef CONFIG_IPV6_MULTIPLE_TABLES @@ -243,7 +243,7 @@ Signed-off-by: Jonas Gorski out_ip6_prohibit_entry: kfree(net->ipv6.ip6_prohibit_entry); out_ip6_null_entry: -@@ -6575,6 +6623,7 @@ static void __net_exit ip6_route_net_exi +@@ -6578,6 +6626,7 @@ static void __net_exit ip6_route_net_exi kfree(net->ipv6.ip6_null_entry); #ifdef CONFIG_IPV6_MULTIPLE_TABLES kfree(net->ipv6.ip6_prohibit_entry); @@ -251,7 +251,7 @@ Signed-off-by: Jonas Gorski kfree(net->ipv6.ip6_blk_hole_entry); #endif dst_entries_destroy(&net->ipv6.ip6_dst_ops); -@@ -6658,6 +6707,9 @@ void __init ip6_route_init_special_entri +@@ -6661,6 +6710,9 @@ void __init ip6_route_init_special_entri init_net.ipv6.ip6_prohibit_entry->rt6i_idev = in6_dev_get(init_net.loopback_dev); init_net.ipv6.ip6_blk_hole_entry->dst.dev = init_net.loopback_dev; init_net.ipv6.ip6_blk_hole_entry->rt6i_idev = in6_dev_get(init_net.loopback_dev); From 872966692642f435f2915c678952c07cc8d1836e Mon Sep 17 00:00:00 2001 From: Jan Hoffmann Date: Thu, 27 Feb 2025 20:43:26 +0100 Subject: [PATCH 03/49] realtek: refactor RTL930x MAC config to fix PHY ports Currently, network ports using PHYs get a link, but there is no traffic. Make it work again by moving the MAC config to phylink_mac_link_up. A similiar change has been previously applied for RTL83xx in commit cd958d945be0 ("realtek: 6.6: refactor mac config and link up for RTL83xx"). Fixes: https://github.com/openwrt/openwrt/issues/17010 Signed-off-by: Jan Hoffmann Tested-by: Christoph Krapp Link: https://github.com/openwrt/openwrt/pull/18268 Signed-off-by: Sander Vanheule (cherry picked from commit a7e1e138172a1e4f9c35db93c11d026bb3338e24) --- .../files-6.6/drivers/net/dsa/rtl83xx/dsa.c | 86 +++++++++---------- .../drivers/net/dsa/rtl83xx/rtl838x.h | 5 ++ 2 files changed, 44 insertions(+), 47 deletions(-) diff --git a/target/linux/realtek/files-6.6/drivers/net/dsa/rtl83xx/dsa.c b/target/linux/realtek/files-6.6/drivers/net/dsa/rtl83xx/dsa.c index f9d37fb3bd..b47a2f075e 100644 --- a/target/linux/realtek/files-6.6/drivers/net/dsa/rtl83xx/dsa.c +++ b/target/linux/realtek/files-6.6/drivers/net/dsa/rtl83xx/dsa.c @@ -797,10 +797,6 @@ static void rtl93xx_phylink_mac_config(struct dsa_switch *ds, int port, { struct rtl838x_switch_priv *priv = ds->priv; int sds_num; - u32 reg; - - pr_info("%s port %d, mode %x, phy-mode: %s, speed %d, link %d\n", __func__, - port, mode, phy_modes(state->interface), state->speed, state->link); /* Nothing to be done for the CPU-port */ if (port == priv->cpu_port) @@ -815,48 +811,6 @@ static void rtl93xx_phylink_mac_config(struct dsa_switch *ds, int port, (state->interface == PHY_INTERFACE_MODE_1000BASEX || state->interface == PHY_INTERFACE_MODE_10GBASER)) rtl9300_serdes_setup(port, sds_num, state->interface); - - reg = sw_r32(priv->r->mac_force_mode_ctrl(port)); - reg &= ~(0xf << 3); - - switch (state->speed) { - case SPEED_10000: - reg |= 4 << 3; - break; - case SPEED_5000: - reg |= 6 << 3; - break; - case SPEED_2500: - reg |= 5 << 3; - break; - case SPEED_1000: - reg |= 2 << 3; - break; - case SPEED_100: - reg |= 1 << 3; - break; - default: - /* Also covers 10M */ - break; - } - - if (state->link) - reg |= RTL930X_FORCE_LINK_EN; - - if (priv->lagmembers & BIT_ULL(port)) - reg |= RTL930X_DUPLEX_MODE | RTL930X_FORCE_LINK_EN; - - if (state->duplex == DUPLEX_FULL) - reg |= RTL930X_DUPLEX_MODE; - else - reg &= ~RTL930X_DUPLEX_MODE; /* Clear duplex bit otherwise */ - - if (priv->ports[port].phy_is_integrated) - reg &= ~RTL930X_FORCE_EN; /* Clear MAC_FORCE_EN to allow SDS-MAC link */ - else - reg |= RTL930X_FORCE_EN; - - sw_w32(reg, priv->r->mac_force_mode_ctrl(port)); } static void rtl83xx_phylink_mac_link_down(struct dsa_switch *ds, int port, @@ -962,11 +916,49 @@ static void rtl93xx_phylink_mac_link_up(struct dsa_switch *ds, int port, int speed, int duplex, bool tx_pause, bool rx_pause) { + struct dsa_port *dp = dsa_to_port(ds, port); struct rtl838x_switch_priv *priv = ds->priv; + u32 mcr, spdsel; + + if (speed == SPEED_10000) + spdsel = RTL_SPEED_10000; + else if (speed == SPEED_5000) + spdsel = RTL_SPEED_5000; + else if (speed == SPEED_2500) + spdsel = RTL_SPEED_2500; + else if (speed == SPEED_1000) + spdsel = RTL_SPEED_1000; + else if (speed == SPEED_100) + spdsel = RTL_SPEED_100; + else + spdsel = RTL_SPEED_10; + + mcr = sw_r32(priv->r->mac_force_mode_ctrl(port)); + + if (priv->family_id == RTL9300_FAMILY_ID) { + mcr &= ~RTL930X_RX_PAUSE_EN; + mcr &= ~RTL930X_TX_PAUSE_EN; + mcr &= ~RTL930X_DUPLEX_MODE; + mcr &= ~RTL930X_SPEED_MASK; + mcr |= RTL930X_FORCE_LINK_EN; + mcr |= spdsel << RTL930X_SPEED_SHIFT; + + if (tx_pause) + mcr |= RTL930X_TX_PAUSE_EN; + if (rx_pause) + mcr |= RTL930X_RX_PAUSE_EN; + if (duplex == DUPLEX_FULL || priv->lagmembers & BIT_ULL(port)) + mcr |= RTL930X_DUPLEX_MODE; + if (dsa_port_is_cpu(dp) || !priv->ports[port].phy_is_integrated) + mcr |= RTL930X_FORCE_EN; + } + + pr_debug("%s port %d, mode %x, speed %d, duplex %d, txpause %d, rxpause %d: set mcr=%08x\n", + __func__, port, mode, speed, duplex, tx_pause, rx_pause, mcr); + sw_w32(mcr, priv->r->mac_force_mode_ctrl(port)); /* Restart TX/RX to port */ sw_w32_mask(0, 0x3, priv->r->mac_port_ctrl(port)); - /* TODO: Set speed/duplex/pauses */ } static void rtl83xx_get_strings(struct dsa_switch *ds, diff --git a/target/linux/realtek/files-6.6/drivers/net/dsa/rtl83xx/rtl838x.h b/target/linux/realtek/files-6.6/drivers/net/dsa/rtl83xx/rtl838x.h index 13a0bb5ffa..16c6098378 100644 --- a/target/linux/realtek/files-6.6/drivers/net/dsa/rtl83xx/rtl838x.h +++ b/target/linux/realtek/files-6.6/drivers/net/dsa/rtl83xx/rtl838x.h @@ -147,6 +147,9 @@ #define RTL_SPEED_10 0 #define RTL_SPEED_100 1 #define RTL_SPEED_1000 2 +#define RTL_SPEED_2500 5 +#define RTL_SPEED_5000 6 +#define RTL_SPEED_10000 4 #define RTL83XX_FORCE_EN (1 << 0) #define RTL83XX_FORCE_LINK_EN (1 << 1) @@ -169,6 +172,8 @@ #define RTL930X_FORCE_EN (1 << 0) #define RTL930X_FORCE_LINK_EN (1 << 1) #define RTL930X_DUPLEX_MODE (1 << 2) +#define RTL930X_SPEED_SHIFT (3) +#define RTL930X_SPEED_MASK (15 << RTL930X_SPEED_SHIFT) #define RTL930X_TX_PAUSE_EN (1 << 7) #define RTL930X_RX_PAUSE_EN (1 << 8) #define RTL930X_MAC_FORCE_FC_EN (1 << 9) From eb1f411036ff239cc998c9dd872a9ba9d85add7a Mon Sep 17 00:00:00 2001 From: Matthias Schiffer Date: Sat, 29 Mar 2025 21:31:49 +0100 Subject: [PATCH 04/49] generic: qca8k: backport bridge port isolation support Bridge port isolation offload support has been added to the bridge core and many DSA drivers. mt7530 support was backported in OpenWrt commit c4e6a147a6c0 ("generic: 6.6: mt7530: add support for bridge port isolation"). Backport qca8k support as well. Signed-off-by: Matthias Schiffer Link: https://github.com/openwrt/openwrt/pull/18375 Signed-off-by: Christian Marangi (cherry picked from commit 5d1dedd9f7fc7a7c893e14ec6c1548e2be7a1a13) --- ...-not-write-port-mask-twice-in-bridge.patch | 58 +++++++ ...k-factor-out-bridge-join-leave-logic.patch | 153 ++++++++++++++++++ ...dd-support-for-bridge-port-isolation.patch | 91 +++++++++++ ...-qca8k-implement-lag_fdb_add-del-ops.patch | 4 +- ...-add-IPQ4019-built-in-switch-support.patch | 23 +-- 5 files changed, 311 insertions(+), 18 deletions(-) create mode 100644 target/linux/generic/backport-6.6/793-01-v6.11-net-dsa-qca8k-do-not-write-port-mask-twice-in-bridge.patch create mode 100644 target/linux/generic/backport-6.6/793-02-v6.11-net-dsa-qca8k-factor-out-bridge-join-leave-logic.patch create mode 100644 target/linux/generic/backport-6.6/793-03-v6.11-net-dsa-qca8k-add-support-for-bridge-port-isolation.patch diff --git a/target/linux/generic/backport-6.6/793-01-v6.11-net-dsa-qca8k-do-not-write-port-mask-twice-in-bridge.patch b/target/linux/generic/backport-6.6/793-01-v6.11-net-dsa-qca8k-do-not-write-port-mask-twice-in-bridge.patch new file mode 100644 index 0000000000..22b544c433 --- /dev/null +++ b/target/linux/generic/backport-6.6/793-01-v6.11-net-dsa-qca8k-do-not-write-port-mask-twice-in-bridge.patch @@ -0,0 +1,58 @@ +From e85d3e6fea05c8ae21a40809a3c6b7adc97411c7 Mon Sep 17 00:00:00 2001 +Message-ID: +From: Matthias Schiffer +Date: Thu, 20 Jun 2024 19:25:48 +0200 +Subject: [PATCH] net: dsa: qca8k: do not write port mask twice in bridge + join/leave + +qca8k_port_bridge_join() set QCA8K_PORT_LOOKUP_CTRL() for i == port twice, +once in the loop handling all other port's masks, and finally at the end +with the accumulated port_mask. + +The first time it would incorrectly set the port's own bit in the mask, +only to correct the mistake a moment later. qca8k_port_bridge_leave() had +the same issue, but here the regmap_clear_bits() was a no-op rather than +setting an unintended value. + +Remove the duplicate assignment by skipping the whole loop iteration for +i == port. The unintended bit setting doesn't seem to have any negative +effects (even when not reverted right away), so the change is submitted +as a simple cleanup rather than a fix. + +Signed-off-by: Matthias Schiffer +Reviewed-by: Wojciech Drewek +Signed-off-by: David S. Miller +--- + drivers/net/dsa/qca/qca8k-common.c | 7 +++++-- + 1 file changed, 5 insertions(+), 2 deletions(-) + +--- a/drivers/net/dsa/qca/qca8k-common.c ++++ b/drivers/net/dsa/qca/qca8k-common.c +@@ -654,6 +654,8 @@ int qca8k_port_bridge_join(struct dsa_sw + port_mask = BIT(cpu_port); + + for (i = 0; i < QCA8K_NUM_PORTS; i++) { ++ if (i == port) ++ continue; + if (dsa_is_cpu_port(ds, i)) + continue; + if (!dsa_port_offloads_bridge(dsa_to_port(ds, i), &bridge)) +@@ -666,8 +668,7 @@ int qca8k_port_bridge_join(struct dsa_sw + BIT(port)); + if (ret) + return ret; +- if (i != port) +- port_mask |= BIT(i); ++ port_mask |= BIT(i); + } + + /* Add all other ports to this ports portvlan mask */ +@@ -686,6 +687,8 @@ void qca8k_port_bridge_leave(struct dsa_ + cpu_port = dsa_to_port(ds, port)->cpu_dp->index; + + for (i = 0; i < QCA8K_NUM_PORTS; i++) { ++ if (i == port) ++ continue; + if (dsa_is_cpu_port(ds, i)) + continue; + if (!dsa_port_offloads_bridge(dsa_to_port(ds, i), &bridge)) diff --git a/target/linux/generic/backport-6.6/793-02-v6.11-net-dsa-qca8k-factor-out-bridge-join-leave-logic.patch b/target/linux/generic/backport-6.6/793-02-v6.11-net-dsa-qca8k-factor-out-bridge-join-leave-logic.patch new file mode 100644 index 0000000000..fdb7e7b8b6 --- /dev/null +++ b/target/linux/generic/backport-6.6/793-02-v6.11-net-dsa-qca8k-factor-out-bridge-join-leave-logic.patch @@ -0,0 +1,153 @@ +From 412e1775f413c944b8c51bdadb675be957d83dc8 Mon Sep 17 00:00:00 2001 +Message-ID: <412e1775f413c944b8c51bdadb675be957d83dc8.1728674648.git.mschiffer@universe-factory.net> +In-Reply-To: +References: +From: Matthias Schiffer +Date: Thu, 20 Jun 2024 19:25:49 +0200 +Subject: [PATCH] net: dsa: qca8k: factor out bridge join/leave logic + +Most of the logic in qca8k_port_bridge_join() and qca8k_port_bridge_leave() +is the same. Refactor to reduce duplication and prepare for reusing the +code for implementing bridge port isolation. + +dsa_port_offloads_bridge_dev() is used instead of +dsa_port_offloads_bridge(), passing the bridge in as a struct netdevice *, +as we won't have a struct dsa_bridge in qca8k_port_bridge_flags(). + +The error handling is changed slightly in the bridge leave case, +returning early and emitting an error message when a regmap access fails. +This shouldn't matter in practice, as there isn't much we can do if +communication with the switch breaks down in the middle of reconfiguration. + +Signed-off-by: Matthias Schiffer +Reviewed-by: Wojciech Drewek +Signed-off-by: David S. Miller +--- + drivers/net/dsa/qca/qca8k-common.c | 101 ++++++++++++++--------------- + 1 file changed, 50 insertions(+), 51 deletions(-) + +--- a/drivers/net/dsa/qca/qca8k-common.c ++++ b/drivers/net/dsa/qca/qca8k-common.c +@@ -615,6 +615,49 @@ void qca8k_port_stp_state_set(struct dsa + qca8k_port_configure_learning(ds, port, learning); + } + ++static int qca8k_update_port_member(struct qca8k_priv *priv, int port, ++ const struct net_device *bridge_dev, ++ bool join) ++{ ++ struct dsa_port *dp = dsa_to_port(priv->ds, port), *other_dp; ++ u32 port_mask = BIT(dp->cpu_dp->index); ++ int i, ret; ++ ++ for (i = 0; i < QCA8K_NUM_PORTS; i++) { ++ if (i == port) ++ continue; ++ if (dsa_is_cpu_port(priv->ds, i)) ++ continue; ++ ++ other_dp = dsa_to_port(priv->ds, i); ++ if (!dsa_port_offloads_bridge_dev(other_dp, bridge_dev)) ++ continue; ++ ++ /* Add/remove this port to/from the portvlan mask of the other ++ * ports in the bridge ++ */ ++ if (join) { ++ port_mask |= BIT(i); ++ ret = regmap_set_bits(priv->regmap, ++ QCA8K_PORT_LOOKUP_CTRL(i), ++ BIT(port)); ++ } else { ++ ret = regmap_clear_bits(priv->regmap, ++ QCA8K_PORT_LOOKUP_CTRL(i), ++ BIT(port)); ++ } ++ ++ if (ret) ++ return ret; ++ } ++ ++ /* Add/remove all other ports to/from this port's portvlan mask */ ++ ret = qca8k_rmw(priv, QCA8K_PORT_LOOKUP_CTRL(port), ++ QCA8K_PORT_LOOKUP_MEMBER, port_mask); ++ ++ return ret; ++} ++ + int qca8k_port_pre_bridge_flags(struct dsa_switch *ds, int port, + struct switchdev_brport_flags flags, + struct netlink_ext_ack *extack) +@@ -647,65 +690,21 @@ int qca8k_port_bridge_join(struct dsa_sw + struct netlink_ext_ack *extack) + { + struct qca8k_priv *priv = ds->priv; +- int port_mask, cpu_port; +- int i, ret; +- +- cpu_port = dsa_to_port(ds, port)->cpu_dp->index; +- port_mask = BIT(cpu_port); + +- for (i = 0; i < QCA8K_NUM_PORTS; i++) { +- if (i == port) +- continue; +- if (dsa_is_cpu_port(ds, i)) +- continue; +- if (!dsa_port_offloads_bridge(dsa_to_port(ds, i), &bridge)) +- continue; +- /* Add this port to the portvlan mask of the other ports +- * in the bridge +- */ +- ret = regmap_set_bits(priv->regmap, +- QCA8K_PORT_LOOKUP_CTRL(i), +- BIT(port)); +- if (ret) +- return ret; +- port_mask |= BIT(i); +- } +- +- /* Add all other ports to this ports portvlan mask */ +- ret = qca8k_rmw(priv, QCA8K_PORT_LOOKUP_CTRL(port), +- QCA8K_PORT_LOOKUP_MEMBER, port_mask); +- +- return ret; ++ return qca8k_update_port_member(priv, port, bridge.dev, true); + } + + void qca8k_port_bridge_leave(struct dsa_switch *ds, int port, + struct dsa_bridge bridge) + { + struct qca8k_priv *priv = ds->priv; +- int cpu_port, i; +- +- cpu_port = dsa_to_port(ds, port)->cpu_dp->index; +- +- for (i = 0; i < QCA8K_NUM_PORTS; i++) { +- if (i == port) +- continue; +- if (dsa_is_cpu_port(ds, i)) +- continue; +- if (!dsa_port_offloads_bridge(dsa_to_port(ds, i), &bridge)) +- continue; +- /* Remove this port to the portvlan mask of the other ports +- * in the bridge +- */ +- regmap_clear_bits(priv->regmap, +- QCA8K_PORT_LOOKUP_CTRL(i), +- BIT(port)); +- } ++ int err; + +- /* Set the cpu port to be the only one in the portvlan mask of +- * this port +- */ +- qca8k_rmw(priv, QCA8K_PORT_LOOKUP_CTRL(port), +- QCA8K_PORT_LOOKUP_MEMBER, BIT(cpu_port)); ++ err = qca8k_update_port_member(priv, port, bridge.dev, false); ++ if (err) ++ dev_err(priv->dev, ++ "Failed to update switch config for bridge leave: %d\n", ++ err); + } + + void qca8k_port_fast_age(struct dsa_switch *ds, int port) diff --git a/target/linux/generic/backport-6.6/793-03-v6.11-net-dsa-qca8k-add-support-for-bridge-port-isolation.patch b/target/linux/generic/backport-6.6/793-03-v6.11-net-dsa-qca8k-add-support-for-bridge-port-isolation.patch new file mode 100644 index 0000000000..263fe10d4b --- /dev/null +++ b/target/linux/generic/backport-6.6/793-03-v6.11-net-dsa-qca8k-add-support-for-bridge-port-isolation.patch @@ -0,0 +1,91 @@ +From 422b64025ec10981c48f9367311846bf4bd38042 Mon Sep 17 00:00:00 2001 +Message-ID: <422b64025ec10981c48f9367311846bf4bd38042.1728674648.git.mschiffer@universe-factory.net> +In-Reply-To: +References: +From: Matthias Schiffer +Date: Thu, 20 Jun 2024 19:25:50 +0200 +Subject: [PATCH] net: dsa: qca8k: add support for bridge port isolation + +Remove a pair of ports from the port matrix when both ports have the +isolated flag set. + +Signed-off-by: Matthias Schiffer +Reviewed-by: Wojciech Drewek +Signed-off-by: David S. Miller +--- + drivers/net/dsa/qca/qca8k-common.c | 22 ++++++++++++++++++++-- + drivers/net/dsa/qca/qca8k.h | 1 + + 2 files changed, 21 insertions(+), 2 deletions(-) + +--- a/drivers/net/dsa/qca/qca8k-common.c ++++ b/drivers/net/dsa/qca/qca8k-common.c +@@ -619,6 +619,7 @@ static int qca8k_update_port_member(stru + const struct net_device *bridge_dev, + bool join) + { ++ bool isolated = !!(priv->port_isolated_map & BIT(port)), other_isolated; + struct dsa_port *dp = dsa_to_port(priv->ds, port), *other_dp; + u32 port_mask = BIT(dp->cpu_dp->index); + int i, ret; +@@ -633,10 +634,12 @@ static int qca8k_update_port_member(stru + if (!dsa_port_offloads_bridge_dev(other_dp, bridge_dev)) + continue; + ++ other_isolated = !!(priv->port_isolated_map & BIT(i)); ++ + /* Add/remove this port to/from the portvlan mask of the other + * ports in the bridge + */ +- if (join) { ++ if (join && !(isolated && other_isolated)) { + port_mask |= BIT(i); + ret = regmap_set_bits(priv->regmap, + QCA8K_PORT_LOOKUP_CTRL(i), +@@ -662,7 +665,7 @@ int qca8k_port_pre_bridge_flags(struct d + struct switchdev_brport_flags flags, + struct netlink_ext_ack *extack) + { +- if (flags.mask & ~BR_LEARNING) ++ if (flags.mask & ~(BR_LEARNING | BR_ISOLATED)) + return -EINVAL; + + return 0; +@@ -672,6 +675,7 @@ int qca8k_port_bridge_flags(struct dsa_s + struct switchdev_brport_flags flags, + struct netlink_ext_ack *extack) + { ++ struct qca8k_priv *priv = ds->priv; + int ret; + + if (flags.mask & BR_LEARNING) { +@@ -680,6 +684,20 @@ int qca8k_port_bridge_flags(struct dsa_s + if (ret) + return ret; + } ++ ++ if (flags.mask & BR_ISOLATED) { ++ struct dsa_port *dp = dsa_to_port(ds, port); ++ struct net_device *bridge_dev = dsa_port_bridge_dev_get(dp); ++ ++ if (flags.val & BR_ISOLATED) ++ priv->port_isolated_map |= BIT(port); ++ else ++ priv->port_isolated_map &= ~BIT(port); ++ ++ ret = qca8k_update_port_member(priv, port, bridge_dev, true); ++ if (ret) ++ return ret; ++ } + + return 0; + } +--- a/drivers/net/dsa/qca/qca8k.h ++++ b/drivers/net/dsa/qca/qca8k.h +@@ -451,6 +451,7 @@ struct qca8k_priv { + * Bit 1: port enabled. Bit 0: port disabled. + */ + u8 port_enabled_map; ++ u8 port_isolated_map; + struct qca8k_ports_config ports_config; + struct regmap *regmap; + struct mii_bus *bus; diff --git a/target/linux/generic/pending-6.6/711-01-net-dsa-qca8k-implement-lag_fdb_add-del-ops.patch b/target/linux/generic/pending-6.6/711-01-net-dsa-qca8k-implement-lag_fdb_add-del-ops.patch index 3197aea091..8d815dd2f2 100644 --- a/target/linux/generic/pending-6.6/711-01-net-dsa-qca8k-implement-lag_fdb_add-del-ops.patch +++ b/target/linux/generic/pending-6.6/711-01-net-dsa-qca8k-implement-lag_fdb_add-del-ops.patch @@ -27,7 +27,7 @@ Signed-off-by: Christian Marangi .port_mirror_add = qca8k_port_mirror_add, --- a/drivers/net/dsa/qca/qca8k-common.c +++ b/drivers/net/dsa/qca/qca8k-common.c -@@ -1215,6 +1215,42 @@ int qca8k_port_lag_leave(struct dsa_swit +@@ -1235,6 +1235,42 @@ int qca8k_port_lag_leave(struct dsa_swit return qca8k_lag_refresh_portmap(ds, port, lag, true); } @@ -72,7 +72,7 @@ Signed-off-by: Christian Marangi u32 val; --- a/drivers/net/dsa/qca/qca8k.h +++ b/drivers/net/dsa/qca/qca8k.h -@@ -590,5 +590,11 @@ int qca8k_port_lag_join(struct dsa_switc +@@ -591,5 +591,11 @@ int qca8k_port_lag_join(struct dsa_switc struct netlink_ext_ack *extack); int qca8k_port_lag_leave(struct dsa_switch *ds, int port, struct dsa_lag lag); diff --git a/target/linux/ipq40xx/patches-6.6/706-net-dsa-qca8k-add-IPQ4019-built-in-switch-support.patch b/target/linux/ipq40xx/patches-6.6/706-net-dsa-qca8k-add-IPQ4019-built-in-switch-support.patch index 9bd5ca515e..76539cea88 100644 --- a/target/linux/ipq40xx/patches-6.6/706-net-dsa-qca8k-add-IPQ4019-built-in-switch-support.patch +++ b/target/linux/ipq40xx/patches-6.6/706-net-dsa-qca8k-add-IPQ4019-built-in-switch-support.patch @@ -67,24 +67,15 @@ Signed-off-by: Robert Marko mask = QCA8K_VTU_FUNC0_EG_MODE_PORT_NOT(i); if ((reg & mask) != mask) { -@@ -653,7 +653,7 @@ int qca8k_port_bridge_join(struct dsa_sw - cpu_port = dsa_to_port(ds, port)->cpu_dp->index; - port_mask = BIT(cpu_port); +@@ -624,7 +624,7 @@ static int qca8k_update_port_member(stru + u32 port_mask = BIT(dp->cpu_dp->index); + int i, ret; - for (i = 0; i < QCA8K_NUM_PORTS; i++) { -+ for (i = 0; i < ds->num_ports; i++) { - if (dsa_is_cpu_port(ds, i)) ++ for (i = 0; i < priv->ds->num_ports; i++) { + if (i == port) continue; - if (!dsa_port_offloads_bridge(dsa_to_port(ds, i), &bridge)) -@@ -685,7 +685,7 @@ void qca8k_port_bridge_leave(struct dsa_ - - cpu_port = dsa_to_port(ds, port)->cpu_dp->index; - -- for (i = 0; i < QCA8K_NUM_PORTS; i++) { -+ for (i = 0; i < ds->num_ports; i++) { - if (dsa_is_cpu_port(ds, i)) - continue; - if (!dsa_port_offloads_bridge(dsa_to_port(ds, i), &bridge)) + if (dsa_is_cpu_port(priv->ds, i)) --- /dev/null +++ b/drivers/net/dsa/qca/qca8k-ipq4019.c @@ -0,0 +1,948 @@ @@ -1119,7 +1110,7 @@ Signed-off-by: Robert Marko enum { QCA8K_PORT_SPEED_10M = 0, QCA8K_PORT_SPEED_100M = 1, -@@ -466,6 +518,10 @@ struct qca8k_priv { +@@ -467,6 +519,10 @@ struct qca8k_priv { struct qca8k_pcs pcs_port_6; const struct qca8k_match_data *info; struct qca8k_led ports_led[QCA8K_LED_COUNT]; From 2868202df3898481004570175a9e4a015da9b491 Mon Sep 17 00:00:00 2001 From: Matthias Schiffer Date: Sat, 29 Mar 2025 21:32:08 +0100 Subject: [PATCH 05/49] ipq40xx: qca8k: hook up IPQ4019 bridge flag offloading Adds support for setting bridge port learning and isolation flags on ipq40xx. Signed-off-by: Matthias Schiffer Link: https://github.com/openwrt/openwrt/pull/18375 Signed-off-by: Christian Marangi (cherry picked from commit af93874f4e5e4f6a8646964fecf385711d527e89) --- ...06-net-dsa-qca8k-add-IPQ4019-built-in-switch-support.patch | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/target/linux/ipq40xx/patches-6.6/706-net-dsa-qca8k-add-IPQ4019-built-in-switch-support.patch b/target/linux/ipq40xx/patches-6.6/706-net-dsa-qca8k-add-IPQ4019-built-in-switch-support.patch index 76539cea88..73e99f2bdc 100644 --- a/target/linux/ipq40xx/patches-6.6/706-net-dsa-qca8k-add-IPQ4019-built-in-switch-support.patch +++ b/target/linux/ipq40xx/patches-6.6/706-net-dsa-qca8k-add-IPQ4019-built-in-switch-support.patch @@ -78,7 +78,7 @@ Signed-off-by: Robert Marko if (dsa_is_cpu_port(priv->ds, i)) --- /dev/null +++ b/drivers/net/dsa/qca/qca8k-ipq4019.c -@@ -0,0 +1,948 @@ +@@ -0,0 +1,950 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * Copyright (C) 2009 Felix Fietkau @@ -870,6 +870,8 @@ Signed-off-by: Robert Marko + .port_change_mtu = qca8k_port_change_mtu, + .port_max_mtu = qca8k_port_max_mtu, + .port_stp_state_set = qca8k_port_stp_state_set, ++ .port_pre_bridge_flags = qca8k_port_pre_bridge_flags, ++ .port_bridge_flags = qca8k_port_bridge_flags, + .port_bridge_join = qca8k_port_bridge_join, + .port_bridge_leave = qca8k_port_bridge_leave, + .port_fast_age = qca8k_port_fast_age, From dc7933e77fcc7a388dfa2785b57b5b7c46b8a588 Mon Sep 17 00:00:00 2001 From: Matthias Schiffer Date: Sat, 5 Apr 2025 13:30:12 +0200 Subject: [PATCH 06/49] build: bpf: drop clang-11 lookup CLANG_MIN_VER is 12, so there is no point in looking for clang-11. Signed-off-by: Matthias Schiffer Link: https://github.com/openwrt/openwrt/pull/18422 Signed-off-by: Robert Marko (cherry picked from commit 45f0eb106bed8868c02e0ccfb545b7e1c4279841) --- include/bpf.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/bpf.mk b/include/bpf.mk index 8a0121aabe..915662a4fe 100644 --- a/include/bpf.mk +++ b/include/bpf.mk @@ -10,7 +10,7 @@ ifneq ($(CONFIG_USE_LLVM_HOST),) else BPF_PATH:=$(PATH) endif - CLANG:=$(firstword $(shell PATH='$(BPF_PATH)' command -v clang clang-13 clang-12 clang-11)) + CLANG:=$(firstword $(shell PATH='$(BPF_PATH)' command -v clang clang-13 clang-12)) LLVM_VER:=$(subst clang,,$(notdir $(CLANG))) endif ifneq ($(CONFIG_USE_LLVM_PREBUILT),) From a51b1a98e026887ea4dd8f09a6fdc8138941e2ac Mon Sep 17 00:00:00 2001 From: Matthias Schiffer Date: Sat, 5 Apr 2025 12:23:44 +0200 Subject: [PATCH 07/49] build: bpf: fix LLVM tool paths with host toolchain Do not assume that the various tools like llc can be found under the same path as clang; instead, look them up through BPF_PATH (while still preferring ones found next to clang). This fixes build in common setups with ccache, where clang resolves to a path like /usr/lib/ccache/bin/clang, but no other tools can be found at that location. Signed-off-by: Matthias Schiffer Link: https://github.com/openwrt/openwrt/pull/18422 Signed-off-by: Robert Marko (cherry picked from commit 89f1d56a7eab7d530be4bbb5cf21dfc80b3485b1) --- include/bpf.mk | 38 ++++++++++++++++++++++++-------------- 1 file changed, 24 insertions(+), 14 deletions(-) diff --git a/include/bpf.mk b/include/bpf.mk index 915662a4fe..b9c8034c68 100644 --- a/include/bpf.mk +++ b/include/bpf.mk @@ -1,30 +1,40 @@ BPF_DEPENDS := @HAS_BPF_TOOLCHAIN +@NEED_BPF_TOOLCHAIN -LLVM_VER:= CLANG_MIN_VER:=12 ifneq ($(CONFIG_USE_LLVM_HOST),) + find-llvm-tool=$(firstword $(shell PATH='$(BPF_PATH)' command -v $(1) || echo '$(firstword $(1))-not-found')) + BPF_TOOLCHAIN_HOST_PATH:=$(call qstrip,$(CONFIG_BPF_TOOLCHAIN_HOST_PATH)) ifneq ($(BPF_TOOLCHAIN_HOST_PATH),) BPF_PATH:=$(BPF_TOOLCHAIN_HOST_PATH)/bin:$(PATH) else BPF_PATH:=$(PATH) endif - CLANG:=$(firstword $(shell PATH='$(BPF_PATH)' command -v clang clang-13 clang-12)) + CLANG:=$(call find-llvm-tool,clang clang-13 clang-12) LLVM_VER:=$(subst clang,,$(notdir $(CLANG))) -endif -ifneq ($(CONFIG_USE_LLVM_PREBUILT),) - CLANG:=$(TOPDIR)/llvm-bpf/bin/clang -endif -ifneq ($(CONFIG_USE_LLVM_BUILD),) - CLANG:=$(STAGING_DIR_HOST)/llvm-bpf/bin/clang -endif -LLVM_PATH:=$(dir $(CLANG)) -LLVM_LLC:=$(LLVM_PATH)/llc$(LLVM_VER) -LLVM_DIS:=$(LLVM_PATH)/llvm-dis$(LLVM_VER) -LLVM_OPT:=$(LLVM_PATH)/opt$(LLVM_VER) -LLVM_STRIP:=$(LLVM_PATH)/llvm-strip$(LLVM_VER) + BPF_PATH:=$(dir $(CLANG)):$(BPF_PATH) + LLVM_LLC:=$(call find-llvm-tool,llc$(LLVM_VER)) + LLVM_DIS:=$(call find-llvm-tool,llvm-dis$(LLVM_VER)) + LLVM_OPT:=$(call find-llvm-tool,opt$(LLVM_VER)) + LLVM_STRIP:=$(call find-llvm-tool,llvm-strip$(LLVM_VER)) +else + LLVM_PATH:=/invalid + + ifneq ($(CONFIG_USE_LLVM_PREBUILT),) + LLVM_PATH:=$(TOPDIR)/llvm-bpf/bin + endif + ifneq ($(CONFIG_USE_LLVM_BUILD),) + LLVM_PATH:=$(STAGING_DIR_HOST)/llvm-bpf/bin + endif + + CLANG:=$(LLVM_PATH)/clang + LLVM_LLC:=$(LLVM_PATH)/llc + LLVM_DIS:=$(LLVM_PATH)/llvm-dis + LLVM_OPT:=$(LLVM_PATH)/opt + LLVM_STRIP:=$(LLVM_PATH)/llvm-strip +endif BPF_KARCH:=mips BPF_ARCH:=mips$(if $(CONFIG_ARCH_64BIT),64)$(if $(CONFIG_BIG_ENDIAN),,el) From 2b1847c78116b4b8da9f18a7d685f112d46c126a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=81lvaro=20Fern=C3=A1ndez=20Rojas?= Date: Thu, 10 Apr 2025 10:32:56 +0200 Subject: [PATCH 08/49] bcm27xx: pull 6.6 patches from RPi repo MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Adds latest 6.6 patches from the Raspberry Pi repository. These patches were generated from: https://github.com/raspberrypi/linux/commits/rpi-6.6.y/ With the following command: git format-patch -N v6.6.85..HEAD (HEAD -> bba53a117a4a5c29da892962332ff1605990e17a) Signed-off-by: Álvaro Fernández Rojas (cherry picked from commit 4618d09587c4e3d5fdc7643494474be602710815) --- ...7-Add-further-link-frequency-options.patch | 77 +++++++++++++++++ ...overlays-Fix-some-unusable-fragments.patch | 82 +++++++++++++++++++ ...560-dts-rp1-Don-t-use-DMA-with-UARTs.patch | 33 ++++++++ 3 files changed, 192 insertions(+) create mode 100644 target/linux/bcm27xx/patches-6.6/950-1558-media-i2c-imx477-Add-further-link-frequency-options.patch create mode 100644 target/linux/bcm27xx/patches-6.6/950-1559-overlays-Fix-some-unusable-fragments.patch create mode 100644 target/linux/bcm27xx/patches-6.6/950-1560-dts-rp1-Don-t-use-DMA-with-UARTs.patch diff --git a/target/linux/bcm27xx/patches-6.6/950-1558-media-i2c-imx477-Add-further-link-frequency-options.patch b/target/linux/bcm27xx/patches-6.6/950-1558-media-i2c-imx477-Add-further-link-frequency-options.patch new file mode 100644 index 0000000000..8ed80cd201 --- /dev/null +++ b/target/linux/bcm27xx/patches-6.6/950-1558-media-i2c-imx477-Add-further-link-frequency-options.patch @@ -0,0 +1,77 @@ +From 0553897d77e849a86e836ddf1e0c0dbbd8e64f83 Mon Sep 17 00:00:00 2001 +From: Dave Stevenson +Date: Mon, 20 Jan 2025 10:40:09 +0000 +Subject: [PATCH] media: i2c: imx477: Add further link frequency options + +https://github.com/raspberrypi/linux/issues/6004 reports further +issues with GPS interference. + +Untested, but adds further link frequency options. + +Signed-off-by: Dave Stevenson +--- + drivers/media/i2c/imx477.c | 33 +++++++++++++++++++++++++++++++++ + 1 file changed, 33 insertions(+) + +--- a/drivers/media/i2c/imx477.c ++++ b/drivers/media/i2c/imx477.c +@@ -169,12 +169,18 @@ enum { + IMX477_LINK_FREQ_450MHZ, + IMX477_LINK_FREQ_453MHZ, + IMX477_LINK_FREQ_456MHZ, ++ IMX477_LINK_FREQ_459MHZ, ++ IMX477_LINK_FREQ_462MHZ, ++ IMX477_LINK_FREQ_498MHZ, + }; + + static const s64 link_freqs[] = { + [IMX477_LINK_FREQ_450MHZ] = 450000000, + [IMX477_LINK_FREQ_453MHZ] = 453000000, + [IMX477_LINK_FREQ_456MHZ] = 456000000, ++ [IMX477_LINK_FREQ_459MHZ] = 459000000, ++ [IMX477_LINK_FREQ_462MHZ] = 462000000, ++ [IMX477_LINK_FREQ_498MHZ] = 498000000, + }; + + /* 450MHz is the nominal "default" link frequency */ +@@ -193,6 +199,21 @@ static const struct imx477_reg link_456M + {0x030F, 0x98}, + }; + ++static const struct imx477_reg link_459Mhz_regs[] = { ++ {0x030E, 0x00}, ++ {0x030F, 0x99}, ++}; ++ ++static const struct imx477_reg link_462Mhz_regs[] = { ++ {0x030E, 0x00}, ++ {0x030F, 0x9a}, ++}; ++ ++static const struct imx477_reg link_498Mhz_regs[] = { ++ {0x030E, 0x00}, ++ {0x030F, 0xa6}, ++}; ++ + static const struct imx477_reg_list link_freq_regs[] = { + [IMX477_LINK_FREQ_450MHZ] = { + .regs = link_450Mhz_regs, +@@ -206,6 +227,18 @@ static const struct imx477_reg_list link + .regs = link_456Mhz_regs, + .num_of_regs = ARRAY_SIZE(link_456Mhz_regs) + }, ++ [IMX477_LINK_FREQ_459MHZ] = { ++ .regs = link_459Mhz_regs, ++ .num_of_regs = ARRAY_SIZE(link_459Mhz_regs) ++ }, ++ [IMX477_LINK_FREQ_462MHZ] = { ++ .regs = link_462Mhz_regs, ++ .num_of_regs = ARRAY_SIZE(link_462Mhz_regs) ++ }, ++ [IMX477_LINK_FREQ_498MHZ] = { ++ .regs = link_498Mhz_regs, ++ .num_of_regs = ARRAY_SIZE(link_498Mhz_regs) ++ }, + }; + + static const struct imx477_reg mode_common_regs[] = { diff --git a/target/linux/bcm27xx/patches-6.6/950-1559-overlays-Fix-some-unusable-fragments.patch b/target/linux/bcm27xx/patches-6.6/950-1559-overlays-Fix-some-unusable-fragments.patch new file mode 100644 index 0000000000..bebe055552 --- /dev/null +++ b/target/linux/bcm27xx/patches-6.6/950-1559-overlays-Fix-some-unusable-fragments.patch @@ -0,0 +1,82 @@ +From 9da8d6df2051478f0ba16d73c65995955c19cb3a Mon Sep 17 00:00:00 2001 +From: Phil Elwell +Date: Tue, 18 Mar 2025 13:09:11 +0000 +Subject: [PATCH] overlays: Fix some unusable fragments + +A forthcoming overlaycheck update looks for dormant fragments with no +parameters to enable them. The test discovered some real errors, which +this patch fixes, and one case where some fragments aren't yet being +used, which this comments out until they are. + +Signed-off-by: Phil Elwell +--- + arch/arm/boot/dts/overlays/rpi-poe-overlay.dts | 2 +- + arch/arm/boot/dts/overlays/rpi-poe-plus-overlay.dts | 2 +- + arch/arm/boot/dts/overlays/sx150x-overlay.dts | 2 +- + arch/arm/boot/dts/overlays/vc4-kms-dpi-panel-overlay.dts | 4 ++++ + 4 files changed, 7 insertions(+), 3 deletions(-) + +--- a/arch/arm/boot/dts/overlays/rpi-poe-overlay.dts ++++ b/arch/arm/boot/dts/overlays/rpi-poe-overlay.dts +@@ -145,7 +145,7 @@ + poe_fan_temp2_hyst = <&trip2>,"hysteresis:0"; + poe_fan_temp3 = <&trip3>,"temperature:0"; + poe_fan_temp3_hyst = <&trip3>,"hysteresis:0"; +- i2c = <0>, "+5+6", ++ i2c = <0>, "+7+8", + <&fwpwm>,"status=disabled", + <&i2c_bus>,"status=okay", + <&poe_mfd>,"status=okay", +--- a/arch/arm/boot/dts/overlays/rpi-poe-plus-overlay.dts ++++ b/arch/arm/boot/dts/overlays/rpi-poe-plus-overlay.dts +@@ -28,7 +28,7 @@ + }; + + __overrides__ { +- i2c = <0>, "+5+6", ++ i2c = <0>, "+7+8", + <&fwpwm>,"status=disabled", + <&rpi_poe_power_supply>,"status=disabled", + <&i2c_bus>,"status=okay", +--- a/arch/arm/boot/dts/overlays/sx150x-overlay.dts ++++ b/arch/arm/boot/dts/overlays/sx150x-overlay.dts +@@ -1681,7 +1681,7 @@ + sx1507-1-3E-int-gpio = <0>,"+67+99", <&sx150x_1_3E_pins>,"brcm,pins:0", <&sx1507_1_3E>,"interrupts:0"; + sx1507-0-3F-int-gpio = <0>,"+68+100", <&sx150x_0_3F_pins>,"brcm,pins:0", <&sx1507_0_3F>,"interrupts:0"; + sx1507-1-3F-int-gpio = <0>,"+69+101", <&sx150x_1_3F_pins>,"brcm,pins:0", <&sx1507_1_3F>,"interrupts:0"; +- sx1507-0-70-int-gpio = <0>,"+60+102", <&sx150x_0_70_pins>,"brcm,pins:0", <&sx1507_0_70>,"interrupts:0"; ++ sx1507-0-70-int-gpio = <0>,"+70+102", <&sx150x_0_70_pins>,"brcm,pins:0", <&sx1507_0_70>,"interrupts:0"; + sx1507-1-70-int-gpio = <0>,"+71+103", <&sx150x_1_70_pins>,"brcm,pins:0", <&sx1507_1_70>,"interrupts:0"; + sx1507-0-71-int-gpio = <0>,"+72+104", <&sx150x_0_71_pins>,"brcm,pins:0", <&sx1507_0_71>,"interrupts:0"; + sx1507-1-71-int-gpio = <0>,"+73+105", <&sx150x_1_71_pins>,"brcm,pins:0", <&sx1507_1_71>,"interrupts:0"; +--- a/arch/arm/boot/dts/overlays/vc4-kms-dpi-panel-overlay.dts ++++ b/arch/arm/boot/dts/overlays/vc4-kms-dpi-panel-overlay.dts +@@ -42,24 +42,28 @@ + pinctrl-0 = <&dpi_18bit_gpio0>; + }; + }; ++#if 0 + fragment@92 { + target = <&dpi>; + __dormant__ { + pinctrl-0 = <&dpi_gpio0>; + }; + }; ++#endif + fragment@93 { + target = <&dpi>; + __dormant__ { + pinctrl-0 = <&dpi_16bit_cpadhi_gpio0>; + }; + }; ++#if 0 + fragment@94 { + target = <&dpi>; + __dormant__ { + pinctrl-0 = <&dpi_16bit_gpio0>; + }; + }; ++#endif + + __overrides__ { + at056tn53v1 = <0>, "+0+90"; diff --git a/target/linux/bcm27xx/patches-6.6/950-1560-dts-rp1-Don-t-use-DMA-with-UARTs.patch b/target/linux/bcm27xx/patches-6.6/950-1560-dts-rp1-Don-t-use-DMA-with-UARTs.patch new file mode 100644 index 0000000000..df19f4cac6 --- /dev/null +++ b/target/linux/bcm27xx/patches-6.6/950-1560-dts-rp1-Don-t-use-DMA-with-UARTs.patch @@ -0,0 +1,33 @@ +From bba53a117a4a5c29da892962332ff1605990e17a Mon Sep 17 00:00:00 2001 +From: Phil Elwell +Date: Wed, 26 Mar 2025 11:28:28 +0000 +Subject: [PATCH] dts: rp1: Don't use DMA with UARTs + +DMA has been enabled on RP1's UART0, but with mixed success. Transmits +seem to work, but the DMA interface is not well suited to receiving +arbitrary amounts of data. In particular, the PL011 driver is slow to +pass on the received data, batching it into large blocks. + +On balance, it's better to just disable the DMA support. As with the +other UARTs, the required runes are left in the DTS as comments. + +Signed-off-by: Phil Elwell +--- + arch/arm64/boot/dts/broadcom/rp1.dtsi | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +--- a/arch/arm64/boot/dts/broadcom/rp1.dtsi ++++ b/arch/arm64/boot/dts/broadcom/rp1.dtsi +@@ -65,9 +65,9 @@ + interrupts = ; + clocks = <&rp1_clocks RP1_CLK_UART &rp1_clocks RP1_PLL_SYS_PRI_PH>; + clock-names = "uartclk", "apb_pclk"; +- dmas = <&rp1_dma RP1_DMA_UART0_TX>, +- <&rp1_dma RP1_DMA_UART0_RX>; +- dma-names = "tx", "rx"; ++ // dmas = <&rp1_dma RP1_DMA_UART0_TX>, ++ // <&rp1_dma RP1_DMA_UART0_RX>; ++ // dma-names = "tx", "rx"; + pinctrl-names = "default"; + arm,primecell-periphid = <0x00341011>; + uart-has-rtscts; From b16a42159b34890e40fefe13350b82952b79c902 Mon Sep 17 00:00:00 2001 From: Mieczyslaw Nalewaj Date: Tue, 8 Apr 2025 17:37:59 +0200 Subject: [PATCH 09/49] kernel: bump 6.6 to 6.6.86 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Changelog: https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.6.86 Removed upstreamed: generic/pending-6.6/155-usbnet-restore-usb%d-name-exception-for-local-mac-addresses.patch[1] 1. https://web.git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.6.86&id=2beb999f73b48f3cb04d7cb9c4b5400d59f80f89 Signed-off-by: Mieczyslaw Nalewaj Link: https://github.com/openwrt/openwrt/pull/18443 Signed-off-by: Álvaro Fernández Rojas (cherry picked from commit f7c0331c50f1bb123255e76fd544021576b4e477) Link: https://github.com/openwrt/openwrt/pull/18451 Signed-off-by: Hauke Mehrtens --- include/kernel-6.6 | 4 +- ...me-exception-for-local-mac-addresses.patch | 63 ------------------- 2 files changed, 2 insertions(+), 65 deletions(-) delete mode 100644 target/linux/generic/pending-6.6/155-usbnet-restore-usb%d-name-exception-for-local-mac-addresses.patch diff --git a/include/kernel-6.6 b/include/kernel-6.6 index 2b70664440..9fd98c3046 100644 --- a/include/kernel-6.6 +++ b/include/kernel-6.6 @@ -1,2 +1,2 @@ -LINUX_VERSION-6.6 = .85 -LINUX_KERNEL_HASH-6.6.85 = 5ebaccf4ca3428cd26817bae62171f4efd270eed866a3e3d0a1d9e970b7b7529 +LINUX_VERSION-6.6 = .86 +LINUX_KERNEL_HASH-6.6.86 = 49e3ad7423e40735faada0cd39665c071d47efd84ec3548acf119c9704f13e68 diff --git a/target/linux/generic/pending-6.6/155-usbnet-restore-usb%d-name-exception-for-local-mac-addresses.patch b/target/linux/generic/pending-6.6/155-usbnet-restore-usb%d-name-exception-for-local-mac-addresses.patch deleted file mode 100644 index 0d32800cbc..0000000000 --- a/target/linux/generic/pending-6.6/155-usbnet-restore-usb%d-name-exception-for-local-mac-addresses.patch +++ /dev/null @@ -1,63 +0,0 @@ -From linux-netdev Tue Dec 03 13:04:55 2024 -From: Dominique Martinet -Date: Tue, 03 Dec 2024 13:04:55 +0000 -To: linux-netdev -Subject: [PATCH] net: usb: usbnet: restore usb%d name exception for local mac addresses -Message-Id: <20241203130457.904325-1-asmadeus () codewreck ! org> -X-MARC-Message: https://marc.info/?l=linux-netdev&m=173323431631309 - -From: Dominique Martinet - -The previous commit assumed that local addresses always came from the -kernel, but some devices hand out local mac addresses so we ended up -with point-to-point devices with a mac set by the driver, renaming to -eth%d when they used to be named usb%d. - -Userspace should not rely on device name, but for the sake of stability -restore the local mac address check portion of the naming exception: -point to point devices which either have no mac set by the driver or -have a local mac handed out by the driver will keep the usb%d name. - -Fixes: 8a7d12d674ac ("net: usb: usbnet: fix name regression") -Signed-off-by: Dominique Martinet ---- - drivers/net/usb/usbnet.c | 20 ++++++++++++++------ - 1 file changed, 14 insertions(+), 6 deletions(-) - ---- a/drivers/net/usb/usbnet.c -+++ b/drivers/net/usb/usbnet.c -@@ -178,6 +178,17 @@ int usbnet_get_ethernet_addr(struct usbn - } - EXPORT_SYMBOL_GPL(usbnet_get_ethernet_addr); - -+static bool usbnet_needs_usb_name_format(struct usbnet *dev, struct net_device *net) -+{ -+ /* Point to point devices which don't have a real MAC address -+ * (or report a fake local one) have historically used the usb%d -+ * naming. Preserve this.. -+ */ -+ return (dev->driver_info->flags & FLAG_POINTTOPOINT) != 0 && -+ (is_zero_ether_addr(net->dev_addr) || -+ is_local_ether_addr(net->dev_addr)); -+} -+ - static void intr_complete (struct urb *urb) - { - struct usbnet *dev = urb->context; -@@ -1766,13 +1777,10 @@ usbnet_probe (struct usb_interface *udev - if (status < 0) - goto out1; - -- // heuristic: "usb%d" for links we know are two-host, -- // else "eth%d" when there's reasonable doubt. userspace -- // can rename the link if it knows better. -+ /* heuristic: rename to "eth%d" if we are not sure this link -+ * is two-host (these links keep "usb%d") */ - if ((dev->driver_info->flags & FLAG_ETHER) != 0 && -- ((dev->driver_info->flags & FLAG_POINTTOPOINT) == 0 || -- /* somebody touched it*/ -- !is_zero_ether_addr(net->dev_addr))) -+ !usbnet_needs_usb_name_format(dev, net)) - strscpy(net->name, "eth%d", sizeof(net->name)); - /* WLAN devices should always be named "wlan%d" */ - if ((dev->driver_info->flags & FLAG_WLAN) != 0) From 8e8cafcd0e7354f6c2db09c4549fe901b843f12d Mon Sep 17 00:00:00 2001 From: Mikhail Zhilkin Date: Sat, 22 Mar 2025 17:33:39 +0000 Subject: [PATCH 10/49] mediatek: add support for netis NX31 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This PR adds support for netis NX31 router. Specification ------------- - SoC : MediaTek MT7981BA dual-core ARM Cortex-A53 1.3 GHz - RAM : 256 MiB DDR3 - Flash : SPI-NAND 128 MiB (ESMT) - WLAN : MediaTek MT7976CN dual-band WiFi 6 - 2.4 GHz : b/g/n/ax, MIMO 2x2 - 5 GHz : a/n/ac/ax, MIMO 2x2 - Ethernet : 10/100/1000 Mbps x3 (LAN, MediaTek MT7531AE) 10/100/1000 Mbps x1 (WAN, SoC internal phy) - USB : No - Buttons : Mesh, Reset - LEDs : 1x Power (blue), unmanaged 1x Status (blue), gpio-controlled 1x WiFi 2.4 GHz (blue), gpio-controlled 1x WiFi 5 GHz (blue), gpio-controlled 3x LAN activity (blue), switch-controlled 1x WAN activity (blue), gpio-controlled - Power : 12 VDC, 1 A Installation ------------ 1. Connect to the router using ssh (user: admin, pass: web interface password) 2. Make mtd backup: cat /dev/mtd0 | gzip -1 -c > /tmp/mtd0_spi0.0.bin.gz cat /dev/mtd1 | gzip -1 -c > /tmp/mtd1_BL2.bin.gz cat /dev/mtd2 | gzip -1 -c > /tmp/mtd2_u-boot-env.bin.gz cat /dev/mtd3 | gzip -1 -c > /tmp/mtd3_Factory.bin.gz cat /dev/mtd4 | gzip -1 -c > /tmp/mtd4_FIP.bin.gz cat /dev/mtd5 | gzip -1 -c > /tmp/mtd5_ubi.bin.gz 3. Download mtd backup from the /tmp dir of the router to your PC using scp protocol 4. Upload OpenWrt 'bl31-uboot.fip', 'preloader.bin' images to the /tmp dir of the router using scp protocol 5. Write FIP and BL2 (replace bootloader): mtd write /tmp/openwrt-mediatek-filogic-netis_nx31-bl31-uboot.fip FIP mtd write /tmp/openwrt-mediatek-filogic-netis_nx31-preloader.bin BL2 6. Place OpenWrt 'openwrt-mediatek-filogic-netis_nx31-initramfs-recovery.itb' image on the tftp server (IP: 192.168.1.254) 7. Erase 'ubi' partition and reboot the router: mtd erase ubi reboot 8. U-Boot automatically boot OpenWrt recovery image from tftp server to the RAM 9. Upload OpenWrt 'sysupgrade.itb' image to the /tmp dir of the router (IP: 192.168.1.1) using scp protocol 10. Connect to the router using ssh and run: sysupgrade -n openwrt-mediatek-filogic-netis_nx31-squashfs-sysupgrade.itb Return to stock --------------- 1. Unpack stock BL2 and FIP partitions backup 2. Upload stock BL2 and FIP partitions backup to the /tmp dir of the router using scp protocol 3. Connect to the router using ssh and run: apk update && apk add kmod-mtd-rw insmod mtd-rw i_want_a_brick=1 mtd unlock BL2 mtd unlock FIP 4. Restore backup: mtd write /tmp/mtd4_FIP.bin FIP mtd write /tmp/mtd1_BL2.bin BL2 5. Erase ubi and reboot: mtd erase ubi reboot 6. Power off the router 7. Press Reset button and power on the router. Release the button after ~10 sec 8. Navigate to U-Boot recovery web server (http://192.168.1.1/) and upload the OEM firmware Recovery -------- 1. Place OpenWrt 'openwrt-mediatek-filogic-netis_nx31-initramfs-recovery.itb' image on the tftp server (IP: 192.168.1.254) 2. Press “Reset” button and power on the router. After ~10 sec release the button. 3. Use OpenWrt initramfs system for recovery MAC addresses ------------- +---------+-------------------+-----------+ | | MAC | Algorithm | +---------+-------------------+-----------+ | LAN | dc:xx:xx:d1:xx:18 | label | | WAN | dc:xx:xx:d1:xx:1a | label+2 | | WLAN 2g | de:xx:xx:11:xx:19 | | | WLAN 5g | de:xx:xx:71:xx:19 | | +---------+-------------------+-----------+ The LAN MAC was found in 'Factory', 0x1fef20 The WAN MAC was found in 'Factory', 0x1fef26 The WLAN 2g/5g MAC prototype was found in 'Factory', 0x4 Signed-off-by: Mikhail Zhilkin Link: https://github.com/openwrt/openwrt/pull/18324 (cherry picked from commit d8002cb627edcbef27dedf9768a45ab0435ac55e) Signed-off-by: Mikhail Zhilkin Link: https://github.com/openwrt/openwrt/pull/18438 Signed-off-by: Hauke Mehrtens --- .../uboot-envtools/files/mediatek_filogic | 1 + package/boot/uboot-mediatek/Makefile | 13 + .../patches/445-add-netis-nx31.patch | 334 ++++++++++++++++++ .../linux/mediatek/dts/mt7981b-netis-nx31.dts | 301 ++++++++++++++++ .../filogic/base-files/etc/board.d/01_leds | 3 + .../filogic/base-files/etc/board.d/02_network | 1 + .../etc/hotplug.d/ieee80211/11_fix_wifi_mac | 8 + .../base-files/lib/upgrade/platform.sh | 1 + target/linux/mediatek/image/filogic.mk | 25 ++ 9 files changed, 687 insertions(+) create mode 100644 package/boot/uboot-mediatek/patches/445-add-netis-nx31.patch create mode 100644 target/linux/mediatek/dts/mt7981b-netis-nx31.dts diff --git a/package/boot/uboot-envtools/files/mediatek_filogic b/package/boot/uboot-envtools/files/mediatek_filogic index 67363b0f42..b43a5dcfcd 100644 --- a/package/boot/uboot-envtools/files/mediatek_filogic +++ b/package/boot/uboot-envtools/files/mediatek_filogic @@ -39,6 +39,7 @@ h3c,magic-nx30-pro|\ jcg,q30-pro|\ mercusys,mr90x-v1-ubi|\ netcore,n60|\ +netis,nx31|\ nokia,ea0326gmp|\ qihoo,360t7|\ routerich,ax3000-ubootmod|\ diff --git a/package/boot/uboot-mediatek/Makefile b/package/boot/uboot-mediatek/Makefile index b1285f9ca3..c7f47a70c0 100644 --- a/package/boot/uboot-mediatek/Makefile +++ b/package/boot/uboot-mediatek/Makefile @@ -315,6 +315,18 @@ define U-Boot/mt7981_jcg_q30-pro DEPENDS:=+trusted-firmware-a-mt7981-spim-nand-ddr3 endef +define U-Boot/mt7981_netis_nx31 + NAME:=netis NX31 + BUILD_SUBTARGET:=filogic + BUILD_DEVICES:=netis_nx31 + UBOOT_CONFIG:=mt7981_netis_nx31 + UBOOT_IMAGE:=u-boot.fip + BL2_BOOTDEV:=spim-nand + BL2_SOC:=mt7981 + BL2_DDRTYPE:=ddr3 + DEPENDS:=+trusted-firmware-a-mt7981-spim-nand-ddr3 +endef + define U-Boot/mt7981_nokia_ea0326gmp NAME:=Nokia EA0326GMP BUILD_SUBTARGET:=filogic @@ -852,6 +864,7 @@ UBOOT_TARGETS := \ mt7981_glinet_gl-xe3000 \ mt7981_h3c_magic-nx30-pro \ mt7981_jcg_q30-pro \ + mt7981_netis_nx31 \ mt7981_nokia_ea0326gmp \ mt7981_openwrt_one-snand \ mt7981_openwrt_one-nor \ diff --git a/package/boot/uboot-mediatek/patches/445-add-netis-nx31.patch b/package/boot/uboot-mediatek/patches/445-add-netis-nx31.patch new file mode 100644 index 0000000000..55a94189d3 --- /dev/null +++ b/package/boot/uboot-mediatek/patches/445-add-netis-nx31.patch @@ -0,0 +1,334 @@ +--- /dev/null ++++ b/configs/mt7981_netis_nx31_defconfig +@@ -0,0 +1,106 @@ ++CONFIG_ARM=y ++CONFIG_SYS_HAS_NONCACHED_MEMORY=y ++CONFIG_POSITION_INDEPENDENT=y ++CONFIG_ARCH_MEDIATEK=y ++CONFIG_TEXT_BASE=0x41e00000 ++CONFIG_SYS_MALLOC_F_LEN=0x4000 ++CONFIG_NR_DRAM_BANKS=1 ++CONFIG_DEFAULT_DEVICE_TREE="mt7981-netis_nx31" ++CONFIG_OF_LIBFDT_OVERLAY=y ++CONFIG_TARGET_MT7981=y ++CONFIG_SYS_LOAD_ADDR=0x46000000 ++CONFIG_PRE_CON_BUF_ADDR=0x4007ef00 ++CONFIG_DEBUG_UART_BASE=0x11002000 ++CONFIG_DEBUG_UART_CLOCK=40000000 ++CONFIG_DEBUG_UART=y ++CONFIG_FIT=y ++CONFIG_BOOTDELAY=30 ++CONFIG_AUTOBOOT_KEYED=y ++CONFIG_AUTOBOOT_MENU_SHOW=y ++CONFIG_DEFAULT_FDT_FILE="mediatek/mt7981-netis_nx31.dtb" ++CONFIG_LOGLEVEL=7 ++CONFIG_PRE_CONSOLE_BUFFER=y ++CONFIG_LOG=y ++CONFIG_BOARD_LATE_INIT=y ++CONFIG_HUSH_PARSER=y ++CONFIG_SYS_PROMPT="MT7981> " ++CONFIG_CMD_CPU=y ++CONFIG_CMD_LICENSE=y ++CONFIG_CMD_BOOTMENU=y ++CONFIG_CMD_ASKENV=y ++CONFIG_CMD_ERASEENV=y ++CONFIG_CMD_ENV_FLAGS=y ++CONFIG_CMD_STRINGS=y ++CONFIG_CMD_DM=y ++CONFIG_CMD_GPIO=y ++CONFIG_CMD_GPT=y ++CONFIG_CMD_MTD=y ++CONFIG_CMD_PART=y ++CONFIG_CMD_TFTPSRV=y ++CONFIG_CMD_RARP=y ++CONFIG_CMD_CDP=y ++CONFIG_CMD_SNTP=y ++CONFIG_CMD_LINK_LOCAL=y ++CONFIG_CMD_DHCP=y ++CONFIG_CMD_DNS=y ++CONFIG_CMD_PING=y ++CONFIG_CMD_PXE=y ++CONFIG_CMD_CACHE=y ++CONFIG_CMD_PSTORE=y ++CONFIG_CMD_PSTORE_MEM_ADDR=0x42ff0000 ++CONFIG_CMD_UUID=y ++CONFIG_CMD_HASH=y ++CONFIG_CMD_SMC=y ++CONFIG_CMD_UBI=y ++CONFIG_CMD_UBI_RENAME=y ++CONFIG_OF_EMBED=y ++CONFIG_ENV_OVERWRITE=y ++CONFIG_ENV_IS_IN_UBI=y ++CONFIG_SYS_REDUNDAND_ENVIRONMENT=y ++CONFIG_ENV_UBI_PART="ubi" ++CONFIG_ENV_UBI_VOLUME="ubootenv" ++CONFIG_ENV_UBI_VOLUME_REDUND="ubootenv2" ++CONFIG_SYS_RELOC_GD_ENV_ADDR=y ++CONFIG_USE_DEFAULT_ENV_FILE=y ++CONFIG_DEFAULT_ENV_FILE="defenvs/netis_nx31_env" ++CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y ++CONFIG_VERSION_VARIABLE=y ++CONFIG_NETCONSOLE=y ++CONFIG_USE_IPADDR=y ++CONFIG_IPADDR="192.168.1.1" ++CONFIG_USE_SERVERIP=y ++CONFIG_SERVERIP="192.168.1.254" ++CONFIG_NET_RANDOM_ETHADDR=y ++CONFIG_BUTTON=y ++CONFIG_BUTTON_GPIO=y ++CONFIG_CLK=y ++CONFIG_GPIO_HOG=y ++CONFIG_LED=y ++CONFIG_LED_BLINK=y ++CONFIG_LED_GPIO=y ++# CONFIG_MMC is not set ++CONFIG_MTD=y ++CONFIG_DM_MTD=y ++CONFIG_MTD_SPI_NAND=y ++CONFIG_MTD_UBI_FASTMAP=y ++CONFIG_PHY_FIXED=y ++CONFIG_MEDIATEK_ETH=y ++CONFIG_PHY=y ++CONFIG_PHY_MTK_TPHY=y ++CONFIG_PINCTRL=y ++CONFIG_PINCONF=y ++CONFIG_PINCTRL_MT7981=y ++CONFIG_POWER_DOMAIN=y ++CONFIG_MTK_POWER_DOMAIN=y ++CONFIG_DM_REGULATOR=y ++CONFIG_DM_REGULATOR_FIXED=y ++CONFIG_DM_REGULATOR_GPIO=y ++CONFIG_RAM=y ++CONFIG_DM_SERIAL=y ++CONFIG_SERIAL_RX_BUFFER=y ++CONFIG_MTK_SERIAL=y ++CONFIG_SPI=y ++CONFIG_DM_SPI=y ++CONFIG_MTK_SPIM=y ++CONFIG_ZSTD=y ++CONFIG_HEXDUMP=y +--- /dev/null ++++ b/arch/arm/dts/mt7981-netis_nx31.dts +@@ -0,0 +1,162 @@ ++// SPDX-License-Identifier: GPL-2.0 ++/* ++ * Copyright (c) 2025 ++ * Author: Mikhail Zhilkin ++ */ ++ ++/dts-v1/; ++#include "mt7981.dtsi" ++#include ++#include ++ ++/ { ++ #address-cells = <1>; ++ #size-cells = <1>; ++ model = "netis NX31"; ++ compatible = "netis,nx31", "mediatek,mt7981"; ++ ++ chosen { ++ stdout-path = &uart0; ++ tick-timer = &timer0; ++ }; ++ ++ memory@40000000 { ++ device_type = "memory"; ++ reg = <0x40000000 0x10000000>; ++ }; ++ ++ keys { ++ compatible = "gpio-keys"; ++ ++ button-0 { ++ label = "mesh"; ++ linux,code = ; ++ gpios = <&gpio 1 GPIO_ACTIVE_LOW>; ++ }; ++ ++ button-1 { ++ label = "reset"; ++ linux,code = ; ++ gpios = <&gpio 1 GPIO_ACTIVE_LOW>; ++ }; ++ }; ++ ++ leds { ++ compatible = "gpio-leds"; ++ ++ led-0 { ++ label = "blue:wlan2g"; ++ gpios = <&gpio 5 GPIO_ACTIVE_LOW>; ++ }; ++ ++ led-1 { ++ label = "blue:status"; ++ gpios = <&gpio 7 GPIO_ACTIVE_LOW>; ++ }; ++ ++ led-2 { ++ label = "blue:wan"; ++ gpios = <&gpio 8 GPIO_ACTIVE_LOW>; ++ }; ++ ++ led-3 { ++ label = "blue:wlan5g"; ++ gpios = <&gpio 34 GPIO_ACTIVE_LOW>; ++ }; ++ }; ++}; ++ ++&uart0 { ++ mediatek,force-highspeed; ++ status = "okay"; ++}; ++ ++ð { ++ status = "okay"; ++ mediatek,gmac-id = <0>; ++ phy-mode = "2500base-x"; ++ mediatek,switch = "mt7531"; ++ reset-gpios = <&gpio 39 GPIO_ACTIVE_HIGH>; ++ ++ fixed-link { ++ speed = <2500>; ++ full-duplex; ++ }; ++}; ++ ++&pinctrl { ++ spi_flash_pins: spi0-pins-func-1 { ++ mux { ++ function = "flash"; ++ groups = "spi0", "spi0_wp_hold"; ++ }; ++ ++ conf-pu { ++ pins = "SPI0_CS", "SPI0_HOLD", "SPI0_WP"; ++ drive-strength = ; ++ bias-pull-up = ; ++ }; ++ ++ conf-pd { ++ pins = "SPI0_CLK", "SPI0_MOSI", "SPI0_MISO"; ++ drive-strength = ; ++ bias-pull-down = ; ++ }; ++ }; ++}; ++ ++&spi0 { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&spi_flash_pins>; ++ status = "okay"; ++ must_tx; ++ enhance_timing; ++ dma_ext; ++ ipm_design; ++ support_quad; ++ tick_dly = <2>; ++ sample_sel = <0>; ++ ++ spi_nand@0 { ++ compatible = "spi-nand"; ++ reg = <0>; ++ spi-max-frequency = <52000000>; ++ ++ partitions { ++ compatible = "fixed-partitions"; ++ #address-cells = <1>; ++ #size-cells = <1>; ++ ++ partition@0 { ++ label = "BL2"; ++ reg = <0x0 0x100000>; ++ }; ++ ++ partition@100000 { ++ label = "u-boot-env (unused)"; ++ reg = <0x100000 0x80000>; ++ }; ++ ++ partition@160000 { ++ label = "Factory"; ++ reg = <0x180000 0x200000>; ++ }; ++ ++ partition@380000 { ++ label = "FIP"; ++ reg = <0x380000 0x200000>; ++ }; ++ ++ partition@580000 { ++ label = "ubi"; ++ reg = <0x580000 0x7a80000>; ++ }; ++ }; ++ }; ++}; ++ ++&watchdog { ++ status = "disabled"; ++}; +--- /dev/null ++++ b/defenvs/netis_nx31_env +@@ -0,0 +1,57 @@ ++ipaddr=192.168.1.1 ++serverip=192.168.1.254 ++loadaddr=0x46000000 ++console=earlycon=uart8250,mmio32,0x11002000 console=ttyS0 ++bootcmd=run check_buttons ; if pstore check ; then run boot_recovery ; else run boot_ubi ; fi ++bootconf=config-1 ++bootdelay=0 ++bootfile=openwrt-mediatek-filogic-netis_nx31-initramfs-recovery.itb ++bootfile_bl2=openwrt-mediatek-filogic-netis_nx31-preloader.bin ++bootfile_fip=openwrt-mediatek-filogic-netis_nx31-bl31-uboot.fip ++bootfile_upg=openwrt-mediatek-filogic-netis_nx31-squashfs-sysupgrade.itb ++bootled_status=blue:status ++bootmenu_confirm_return=askenv - Press ENTER to return to menu ; bootmenu 60 ++bootmenu_default=0 ++bootmenu_delay=0 ++bootmenu_title= ( ( ( OpenWrt ) ) ) ++bootmenu_0=Initialize environment.=run _firstboot ++bootmenu_0d=Run default boot command.=run boot_default ++bootmenu_1=Boot system via TFTP.=run boot_tftp ; run bootmenu_confirm_return ++bootmenu_2=Boot production system from NAND.=run boot_production ; run bootmenu_confirm_return ++bootmenu_3=Boot recovery system from NAND.=run boot_recovery ; run bootmenu_confirm_return ++bootmenu_4=Load production system via TFTP then write to NAND.=setenv noboot 1 ; setenv replacevol 1 ; run boot_tftp_production ; setenv noboot ; setenv replacevol ; run bootmenu_confirm_return ++bootmenu_5=Load recovery system via TFTP then write to NAND.=setenv noboot 1 ; setenv replacevol 1 ; run boot_tftp_recovery ; setenv noboot ; setenv replacevol ; run bootmenu_confirm_return ++bootmenu_6=Load BL31+U-Boot FIP via TFTP then write to NAND.=run boot_tftp_write_fip ; run bootmenu_confirm_return ++bootmenu_7=Load BL2 preloader via TFTP then write to NAND.=run boot_tftp_write_bl2 ; run bootmenu_confirm_return ++bootmenu_8=Reboot.=reset ++bootmenu_9=Reset all settings to factory defaults.=run reset_factory ; reset ++boot_first=if button reset ; then led $bootled_status on ; run boot_default ; fi ; bootmenu ++boot_default=if env exists flag_recover ; then else run bootcmd ; fi ; run boot_recovery ; setenv replacevol 1 ; run boot_tftp_forever ++boot_production=led $bootled_status on ; run ubi_read_production && bootm $loadaddr#$bootconf ; led bootled_status off ++boot_recovery=led $bootled_status on ; run ubi_read_recovery && bootm $loadaddr#$bootconf ; led bootled_status off ++boot_ubi=run boot_production ; run boot_recovery ; run boot_tftp_forever ++boot_tftp_forever=led $bootled_status on ; while true ; do run boot_tftp ; sleep 1 ; done ++boot_tftp_production=tftpboot $loadaddr $bootfile_upg && env exists replacevol && iminfo $loadaddr && run ubi_write_production ; if env exists noboot ; then else bootm $loadaddr#$bootconf ; fi ++boot_tftp_recovery=tftpboot $loadaddr $bootfile && env exists replacevol && iminfo $loadaddr && run ubi_write_recovery ; if env exists noboot ; then else bootm $loadaddr#$bootconf ; fi ++boot_tftp=tftpboot $loadaddr $bootfile && bootm $loadaddr#$bootconf ++boot_tftp_write_fip=tftpboot $loadaddr $bootfile_fip && run mtd_write_fip && run reset_factory ++boot_tftp_write_bl2=tftpboot $loadaddr $bootfile_bl2 && run mtd_write_bl2 ++check_buttons=if button reset ; then run boot_tftp ; fi ++ethaddr_factory=mtd read Factory 0x40080000 0x1e0000 0x20000 && env readmem -b ethaddr 0x4009ef20 0x6 ; setenv ethaddr_factory ++part_default=production ++part_recovery=recovery ++reset_factory=ubi part ubi ; mw $loadaddr 0x0 0x800 ; ubi write $loadaddr ubootenv 0x800 ; ubi write $loadaddr ubootenv2 0x800 ++mtd_write_fip=mtd erase FIP && mtd write FIP $loadaddr ++mtd_write_bl2=mtd erase BL2 && mtd write BL2 $loadaddr ++ubi_create_env=ubi check ubootenv || ubi create ubootenv 0x100000 dynamic || run ubi_format ; ubi check ubootenv2 || ubi create ubootenv2 0x100000 dynamic || run ubi_format ++ubi_format=ubi detach ; mtd erase ubi && ubi part ubi ; reset ++ubi_prepare_rootfs=if ubi check rootfs_data ; then else if env exists rootfs_data_max ; then ubi create rootfs_data $rootfs_data_max dynamic || ubi create rootfs_data - dynamic ; else ubi create rootfs_data - dynamic ; fi ; fi ++ubi_read_production=ubi read $loadaddr fit && iminfo $loadaddr && run ubi_prepare_rootfs ++ubi_read_recovery=ubi check recovery && ubi read $loadaddr recovery ++ubi_remove_rootfs=ubi check rootfs_data && ubi remove rootfs_data ++ubi_write_production=ubi check fit && ubi remove fit ; run ubi_remove_rootfs ; ubi create fit $filesize dynamic && ubi write $loadaddr fit $filesize ++ubi_write_recovery=ubi check recovery && ubi remove recovery ; run ubi_remove_rootfs ; ubi create recovery $filesize dynamic && ubi write $loadaddr recovery $filesize ++_init_env=setenv _init_env ; run ubi_create_env ; saveenv ; saveenv ++_firstboot=setenv _firstboot ; run ethaddr_factory ; run _switch_to_menu ; run _init_env ; run boot_first ++_switch_to_menu=setenv _switch_to_menu ; setenv bootdelay 3 ; setenv bootmenu_delay 3 ; setenv bootmenu_0 $bootmenu_0d ; setenv bootmenu_0d ; run _bootmenu_update_title ++_bootmenu_update_title=setenv _bootmenu_update_title ; setenv bootmenu_title "$bootmenu_title $ver" diff --git a/target/linux/mediatek/dts/mt7981b-netis-nx31.dts b/target/linux/mediatek/dts/mt7981b-netis-nx31.dts new file mode 100644 index 0000000000..82f666df79 --- /dev/null +++ b/target/linux/mediatek/dts/mt7981b-netis-nx31.dts @@ -0,0 +1,301 @@ +// SPDX-License-Identifier: GPL-2.0-only OR MIT + +/dts-v1/; +#include +#include +#include + +#include "mt7981.dtsi" + +/ { + model = "netis NX31"; + compatible = "netis,nx31", "mediatek,mt7981"; + + aliases { + label-mac-device = &gmac0; + + led-boot = &led_status_blue; + led-failsafe = &led_status_blue; + led-running = &led_status_blue; + led-upgrade = &led_status_blue; + + serial0 = &uart0; + }; + + chosen { + rootdisk = <&ubi_fit_volume>; + stdout-path = "serial0:115200n8"; + }; + + gpio-keys { + compatible = "gpio-keys"; + + button-0 { + label = "mesh"; + gpios = <&pio 0 GPIO_ACTIVE_LOW>; + linux,code = ; + debounce-interval = <60>; + }; + + button-1 { + label = "reset"; + gpios = <&pio 1 GPIO_ACTIVE_LOW>; + linux,code = ; + debounce-interval = <60>; + }; + }; + + leds { + compatible = "gpio-leds"; + + led-0 { + color = ; + function = LED_FUNCTION_WLAN_2GHZ; + gpios = <&pio 5 GPIO_ACTIVE_LOW>; + linux,default-trigger = "phy0tpt"; + }; + + led_status_blue: led-1 { + color = ; + function = LED_FUNCTION_STATUS; + gpios = <&pio 7 GPIO_ACTIVE_LOW>; + }; + + led-2 { + color = ; + function = LED_FUNCTION_WAN; + gpios = <&pio 8 GPIO_ACTIVE_LOW>; + }; + + led-3 { + color = ; + function = LED_FUNCTION_WLAN_5GHZ; + gpios = <&pio 34 GPIO_ACTIVE_LOW>; + linux,default-trigger = "phy1tpt"; + }; + }; +}; + +ð { + status = "okay"; + + gmac0: mac@0 { + compatible = "mediatek,eth-mac"; + reg = <0>; + phy-mode = "2500base-x"; + + nvmem-cell-names = "mac-address"; + nvmem-cells = <&macaddr_factory_1fef20 0>; + + fixed-link { + speed = <2500>; + full-duplex; + pause; + }; + }; + + gmac1: mac@1 { + compatible = "mediatek,eth-mac"; + reg = <1>; + phy-mode = "gmii"; + phy-handle = <&int_gbe_phy>; + + nvmem-cell-names = "mac-address"; + nvmem-cells = <&macaddr_factory_1fef26 0>; + }; +}; + +&mdio_bus { + switch: switch@1f { + compatible = "mediatek,mt7531"; + reg = <0x1f>; + reset-gpios = <&pio 39 GPIO_ACTIVE_HIGH>; + interrupt-controller; + #interrupt-cells = <1>; + interrupt-parent = <&pio>; + interrupts = <38 IRQ_TYPE_LEVEL_HIGH>; + }; +}; + +&spi0 { + pinctrl-names = "default"; + pinctrl-0 = <&spi0_flash_pins>; + status = "okay"; + + spi_nand@0 { + #address-cells = <1>; + #size-cells = <1>; + compatible = "spi-nand"; + reg = <0>; + + spi-max-frequency = <52000000>; + spi-tx-bus-width = <4>; + spi-rx-bus-width = <4>; + + spi-cal-enable; + spi-cal-mode = "read-data"; + spi-cal-datalen = <7>; + spi-cal-data = /bits/ 8 <0x53 0x50 0x49 0x4e 0x41 0x4e 0x44>; + spi-cal-addrlen = <5>; + spi-cal-addr = /bits/ 32 <0x0 0x0 0x0 0x0 0x0>; + + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + partition@0 { + label = "BL2"; + reg = <0x0 0x100000>; + read-only; + }; + + partition@100000 { + label = "u-boot-env (unused)"; + reg = <0x100000 0x80000>; + read-only; + }; + + partition@180000 { + label = "Factory"; + reg = <0x180000 0x200000>; + read-only; + + nvmem-layout { + compatible = "fixed-layout"; + #address-cells = <1>; + #size-cells = <1>; + + eeprom_factory_0: eeprom@0 { + reg = <0x0 0x1000>; + }; + + macaddr_factory_4: macaddr@4 { + compatible = "mac-base"; + reg = <0x4 0x6>; + #nvmem-cell-cells = <1>; + }; + + macaddr_factory_1fef20: macaddr@1fef20 { + compatible = "mac-base"; + reg = <0x1fef20 0x6>; + #nvmem-cell-cells = <1>; + }; + + macaddr_factory_1fef26: macaddr@1fef26 { + compatible = "mac-base"; + reg = <0x1fef26 0x6>; + #nvmem-cell-cells = <1>; + }; + }; + }; + + partition@380000 { + label = "FIP"; + reg = <0x380000 0x200000>; + read-only; + }; + + partition@580000 { + label = "ubi"; + reg = <0x580000 0x7a80000>; + compatible = "linux,ubi"; + + volumes { + ubi_fit_volume: ubi-volume-fit { + volname = "fit"; + }; + + ubi_ubootenv: ubi-volume-ubootenv { + volname = "ubootenv"; + }; + + ubi_ubootenv2: ubi-volume-ubootenv2 { + volname = "ubootenv2"; + }; + }; + }; + }; + }; +}; + +&switch { + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@1 { + reg = <1>; + label = "lan3"; + }; + + port@2 { + reg = <2>; + label = "lan2"; + }; + + port@3 { + reg = <3>; + label = "lan1"; + }; + + port@6 { + reg = <6>; + ethernet = <&gmac0>; + phy-mode = "2500base-x"; + + fixed-link { + speed = <2500>; + full-duplex; + pause; + }; + }; + }; +}; + +&pio { + spi0_flash_pins: spi0-pins { + mux { + function = "spi"; + groups = "spi0", "spi0_wp_hold"; + }; + + conf-pu { + pins = "SPI0_CS", "SPI0_HOLD", "SPI0_WP"; + drive-strength = ; + bias-pull-up = ; + }; + + conf-pd { + pins = "SPI0_CLK", "SPI0_MOSI", "SPI0_MISO"; + drive-strength = ; + bias-pull-down = ; + }; + }; +}; + +&uart0 { + status = "okay"; +}; + +&ubi_ubootenv { + nvmem-layout { + compatible = "u-boot,env-redundant-bool"; + }; +}; + +&ubi_ubootenv2 { + nvmem-layout { + compatible = "u-boot,env-redundant-bool"; + }; +}; + +&watchdog { + status = "okay"; +}; + +&wifi { + status = "okay"; + nvmem-cell-names = "eeprom"; + nvmem-cells = <&eeprom_factory_0>; +}; diff --git a/target/linux/mediatek/filogic/base-files/etc/board.d/01_leds b/target/linux/mediatek/filogic/base-files/etc/board.d/01_leds index c2d9971f6f..73d91ee244 100644 --- a/target/linux/mediatek/filogic/base-files/etc/board.d/01_leds +++ b/target/linux/mediatek/filogic/base-files/etc/board.d/01_leds @@ -59,6 +59,9 @@ mercusys,mr90x-v1-ubi) netgear,wax220) ucidef_set_led_netdev "eth0" "LAN" "green:lan" "eth0" ;; +netis,nx31) + ucidef_set_led_netdev "wan" "wan" "blue:wan" "eth1" "link tx rx" + ;; nokia,ea0326gmp) ucidef_set_led_netdev "wan" "WAN" "green:wan" "eth1" "link" ucidef_set_led_netdev "lan" "LAN" "green:lan" "br-lan" "link" diff --git a/target/linux/mediatek/filogic/base-files/etc/board.d/02_network b/target/linux/mediatek/filogic/base-files/etc/board.d/02_network index 6da6316823..a97cd37c58 100644 --- a/target/linux/mediatek/filogic/base-files/etc/board.d/02_network +++ b/target/linux/mediatek/filogic/base-files/etc/board.d/02_network @@ -11,6 +11,7 @@ mediatek_setup_interfaces() abt,asr3000|\ cmcc,rax3000m|\ h3c,magic-nx30-pro|\ + netis,nx31|\ nokia,ea0326gmp|\ zbtlink,zbt-z8103ax) ucidef_set_interfaces_lan_wan "lan1 lan2 lan3" eth1 diff --git a/target/linux/mediatek/filogic/base-files/etc/hotplug.d/ieee80211/11_fix_wifi_mac b/target/linux/mediatek/filogic/base-files/etc/hotplug.d/ieee80211/11_fix_wifi_mac index a9d06f9b84..8b9499b319 100644 --- a/target/linux/mediatek/filogic/base-files/etc/hotplug.d/ieee80211/11_fix_wifi_mac +++ b/target/linux/mediatek/filogic/base-files/etc/hotplug.d/ieee80211/11_fix_wifi_mac @@ -128,6 +128,14 @@ case "$board" in [ "$PHYNBR" = "0" ] && macaddr_add $hw_mac_addr 2 > /sys${DEVPATH}/macaddress [ "$PHYNBR" = "1" ] && macaddr_add $hw_mac_addr 3 > /sys${DEVPATH}/macaddress ;; + netis,nx31) + addr=$(mtd_get_mac_binary "Factory" 0x4) + addr=$(macaddr_unsetbit $(macaddr_setbit_la $addr) 25) + addr_2g=$(macaddr_unsetbit $(macaddr_unsetbit $addr 26) 27) + addr_5g=$(macaddr_setbit $(macaddr_setbit $addr 26) 27) + [ "$PHYNBR" = "0" ] && echo "$addr_2g" > /sys${DEVPATH}/macaddress + [ "$PHYNBR" = "1" ] && echo "$addr_5g" > /sys${DEVPATH}/macaddress + ;; nokia,ea0326gmp) addr=$(cat /sys/class/net/eth0/address) [ "$PHYNBR" = "0" ] && macaddr_add $addr 1 > /sys${DEVPATH}/macaddress diff --git a/target/linux/mediatek/filogic/base-files/lib/upgrade/platform.sh b/target/linux/mediatek/filogic/base-files/lib/upgrade/platform.sh index a13b46d4c1..2a8029dd18 100755 --- a/target/linux/mediatek/filogic/base-files/lib/upgrade/platform.sh +++ b/target/linux/mediatek/filogic/base-files/lib/upgrade/platform.sh @@ -80,6 +80,7 @@ platform_do_upgrade() { mediatek,mt7981-rfb|\ mediatek,mt7988a-rfb|\ mercusys,mr90x-v1-ubi|\ + netis,nx31|\ nokia,ea0326gmp|\ openwrt,one|\ netcore,n60|\ diff --git a/target/linux/mediatek/image/filogic.mk b/target/linux/mediatek/image/filogic.mk index 0de101df99..248593ede7 100644 --- a/target/linux/mediatek/image/filogic.mk +++ b/target/linux/mediatek/image/filogic.mk @@ -1257,6 +1257,31 @@ define Device/netgear_wax220 endef TARGET_DEVICES += netgear_wax220 +define Device/netis_nx31 + DEVICE_VENDOR := netis + DEVICE_MODEL := NX31 + DEVICE_DTS := mt7981b-netis-nx31 + DEVICE_DTS_DIR := ../dts + UBINIZE_OPTS := -E 5 + BLOCKSIZE := 128k + PAGESIZE := 2048 + KERNEL_IN_UBI := 1 + UBOOTENV_IN_UBI := 1 + IMAGES := sysupgrade.itb + KERNEL_INITRAMFS_SUFFIX := -recovery.itb + KERNEL := kernel-bin | gzip + KERNEL_INITRAMFS := kernel-bin | lzma | \ + fit lzma $$(KDIR)/image-$$(firstword $$(DEVICE_DTS)).dtb with-initrd | pad-to 64k + IMAGE/sysupgrade.itb := append-kernel | \ + fit gzip $$(KDIR)/image-$$(firstword $$(DEVICE_DTS)).dtb external-static-with-rootfs | \ + append-metadata + DEVICE_PACKAGES := kmod-mt7915e kmod-mt7981-firmware mt7981-wo-firmware + ARTIFACTS := preloader.bin bl31-uboot.fip + ARTIFACT/preloader.bin := mt7981-bl2 spim-nand-ddr3 + ARTIFACT/bl31-uboot.fip := mt7981-bl31-uboot netis_nx31 +endef +TARGET_DEVICES += netis_nx31 + define Device/nokia_ea0326gmp DEVICE_VENDOR := Nokia DEVICE_MODEL := EA0326GMP From d47f6a365fff307058f17bef94d89009ad482273 Mon Sep 17 00:00:00 2001 From: Fil Dunsky Date: Tue, 11 Mar 2025 06:57:43 +0700 Subject: [PATCH 11/49] mediatek: filogic: add support for Huasifei WH3000 **Huasifei WH3000 eMMC / Fudy MT3000** Portable Wi-Fi 6 travel router based on MediaTek MT7981A SoC. MT7981B+MT7976CN+RTL8221B Dual Core 1.3GHZ **Specifications** SoC: Filogic 820 MT7981A (1.3GHz) RAM: DDR4 1GB Flash: eMMC 8GB WiFi: 2.4GHz and 5GHz with 3 antennas Ethernet: 1x WAN (10/100/1000M) 1x LAN (10/100/1000/2500M) USB: 1x USB 3.0 port Two buttons: power/reset and mode (BTN_0) LEDS: blue, red, blue+red=pink UART: 3.3V, TX, RX, GND / 115200 8N1 **Installation via U-Boot rescue** 1. Set static IP 192.168.1.2 on your computer and default route as 192.168.1.1 2. Connect to the WAN port and hold the reset button while booting the device. 3. Wait for the LED to blink 5 times, and release the reset button. 4. Open U-boot web page on your browser at http://192.168.1.1 5. Select the OpenWRT sysupgrade image, upload it, and start the upgrade. 6. Wait for the router to flash the new firmware. 7. Wait for the router to reboot itself. **Installation via sysupgrade** Just flash sysupgrade file via [LuCI upgrade page](http://192.168.1.1/cgi-bin/luci/admin/system/flash) without saving the settings. **Installation via SSH** Upload the file to the router `/tmp` directory, `ssh root@192.168.1.1` and issue a command: ``` sysupgrade -n /tmp/openwrt-mediatek-filogic-huasifei_wh3000-emmc-squashfs-sysupgrade.bin ``` **Factory MAC** You can find your Factory MAC which is mentioned on the box at `/dev/mmcblck0p2` partition `factory` starting from `0x4` ``` dd if=/dev/mmcblk0p2 bs=1 skip=4 count=6 | hexdump -C ``` **Enlarging a partition** Though device has 8GB eMMC, it uses only 2GB `/dev/mmcblck0p6` as `rootfs` for `/rom` and `/overlay` leaving `/dev/mmcblck0p7` as empty unused space. ``` sgdisk -p /dev/mmcblk0 ``` ``` Disk /dev/mmcblk0: 15269888 sectors, 7.3 GiB Sector size (logical/physical): 512/512 bytes Disk identifier (GUID): 2BD17853-102B-4500-AA1A-8A21D4D7984D Partition table holds up to 128 entries Main partition table begins at sector 2 and ends at sector 33 First usable sector is 34, last usable sector is 14942174 Partitions will be aligned on 1024-sector boundaries Total free space is 11197 sectors (5.5 MiB) Number Start (sector) End (sector) Size Code Name 1 8192 9215 512.0 KiB 8300 u-boot-env 2 9216 13311 2.0 MiB 8300 factory 3 13312 21503 4.0 MiB 8300 fip 4 21504 29695 4.0 MiB 8300 config 5 29696 62463 16.0 MiB 8300 kernel 6 62464 4256767 2.0 GiB 8300 rootfs 7 4257792 14940159 5.1 GiB 8300 ``` You can fix that by loading into `initramfs-kernel`, deleting empty `mmcblck0p7` partition and resizing `mmcblck0p6` ``` sysupgrade -F /tmp/openwrt-initramfs-kernel.bin ``` Install and run cfdisk ``` opkg update && opkg install cfdisk cfdisk /dev/mmcblck0 ``` - Select `mmcblck0p7` -> Delete - Select `mmcblck0p6` -> Resize -> Write -> yes -> Quit You will not see any difference in `cat /proc/partitions` after that but just flash a `sysupgrade` and you'll get the whole 7.3GB space for the `/overlay`. Co-developed-by: hecatae Signed-off-by: Fil Dunsky Link: https://github.com/openwrt/openwrt/pull/18220 (cherry picked from commit 99ea96c297305c632a23e966df6aea1bfac241f9) Link: https://github.com/openwrt/openwrt/pull/18434 Signed-off-by: Hauke Mehrtens --- .../uboot-envtools/files/mediatek_filogic | 3 +- .../mediatek/dts/mt7981b-huasifei-wh3000.dts | 190 ++++++++++++++++++ .../filogic/base-files/etc/board.d/01_leds | 3 + .../filogic/base-files/etc/board.d/02_network | 3 +- .../base-files/lib/upgrade/platform.sh | 2 + target/linux/mediatek/image/filogic.mk | 15 ++ 6 files changed, 214 insertions(+), 2 deletions(-) create mode 100644 target/linux/mediatek/dts/mt7981b-huasifei-wh3000.dts diff --git a/package/boot/uboot-envtools/files/mediatek_filogic b/package/boot/uboot-envtools/files/mediatek_filogic index b43a5dcfcd..add5dbb3d3 100644 --- a/package/boot/uboot-envtools/files/mediatek_filogic +++ b/package/boot/uboot-envtools/files/mediatek_filogic @@ -59,7 +59,8 @@ acer,vero-w6m|\ glinet,gl-mt2500|\ glinet,gl-mt6000|\ glinet,gl-x3000|\ -glinet,gl-xe3000) +glinet,gl-xe3000|\ +huasifei,wh3000) local envdev=$(find_mmc_part "u-boot-env") ubootenv_add_uci_config "$envdev" "0x0" "0x80000" ;; diff --git a/target/linux/mediatek/dts/mt7981b-huasifei-wh3000.dts b/target/linux/mediatek/dts/mt7981b-huasifei-wh3000.dts new file mode 100644 index 0000000000..c12367b84a --- /dev/null +++ b/target/linux/mediatek/dts/mt7981b-huasifei-wh3000.dts @@ -0,0 +1,190 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT + +/dts-v1/; +#include +#include +#include + +#include "mt7981.dtsi" + +/ { + model = "Huasifei WH3000"; + compatible = "huasifei,wh3000", "mediatek,mt7981"; + + aliases { + serial0 = &uart0; + led-boot = &wlan_led; + led-failsafe = &wlan_led; + led-upgrade = &wlan_led; + }; + + chosen { + bootargs = "root=PARTLABEL=rootfs rootwait"; + stdout-path = "serial0:115200n8"; + }; + + gpio-keys { + compatible = "gpio-keys"; + + button-mode { + label = "mode"; + linux,code = ; + linux,input-type = ; + gpios = <&pio 0 GPIO_ACTIVE_LOW>; + debounce-interval = <60>; + }; + + button-reset { + label = "reset"; + linux,code = ; + gpios = <&pio 1 GPIO_ACTIVE_LOW>; + }; + }; + + gpio-leds { + compatible = "gpio-leds"; + + wan_led: led-0 { + function = LED_FUNCTION_WAN; + color = ; + gpios = <&pio 11 GPIO_ACTIVE_LOW>; + }; + + wlan_led: led-1 { + function = LED_FUNCTION_WLAN; + color = ; + gpios = <&pio 10 GPIO_ACTIVE_LOW>; + linux,default-trigger = "phy1tpt"; + }; + }; + + memory@40000000 { + reg = <0 0x40000000 0 0x40000000>; + }; +}; + +ð { + pinctrl-names = "default"; + pinctrl-0 = <&mdio_pins>; + status = "okay"; + + gmac0: mac@0 { + compatible = "mediatek,eth-mac"; + reg = <0>; + nvmem-cells = <&macaddr_factory_4 2>; + nvmem-cell-names = "mac-address"; + phy-mode = "2500base-x"; + phy-handle = <&phy1>; + }; + + gmac1: mac@1 { + compatible = "mediatek,eth-mac"; + reg = <1>; + nvmem-cells = <&macaddr_factory_4 3>; + nvmem-cell-names = "mac-address"; + phy-mode = "gmii"; + phy-handle = <&int_gbe_phy>; + }; +}; + +&mdio_bus { + phy1: ethernet-phy@1 { + compatible = "ethernet-phy-ieee802.3-c45"; + reg = <1>; + interrupts = <38 IRQ_TYPE_LEVEL_LOW>; + interrupt-parent = <&pio>; + reset-assert-us = <100000>; + reset-deassert-us = <100000>; + reset-gpios = <&pio 39 GPIO_ACTIVE_LOW>; + realtek,aldps-enable; + }; +}; + +&mmc0 { + bus-width = <8>; + cap-mmc-highspeed; + max-frequency = <52000000>; + no-sd; + no-sdio; + non-removable; + pinctrl-names = "default", "state_uhs"; + pinctrl-0 = <&mmc0_pins_default>; + pinctrl-1 = <&mmc0_pins_uhs>; + vmmc-supply = <®_3p3v>; + status = "okay"; + + card@0 { + compatible = "mmc-card"; + reg = <0>; + + block { + compatible = "block-device"; + + partitions { + block-partition-factory { + partname = "factory"; + + nvmem-layout { + compatible = "fixed-layout"; + #address-cells = <1>; + #size-cells = <1>; + + eeprom_factory_0: eeprom@0 { + reg = <0x0 0x1000>; + }; + + macaddr_factory_4: macaddr@4 { + compatible = "mac-base"; + reg = <0x4 0x6>; + #nvmem-cell-cells = <1>; + }; + }; + }; + }; + }; + }; +}; + +&pio { + mmc0_pins_default: mmc0-pins-default { + mux { + function = "flash"; + groups = "emmc_45"; + }; + }; + + mmc0_pins_uhs: mmc0-pins-uhs { + mux { + function = "flash"; + groups = "emmc_45"; + }; + }; +}; + +&uart0 { + status = "okay"; +}; + +&usb_phy { + status = "okay"; +}; + +&watchdog { + status = "okay"; +}; + +&wifi { + nvmem-cells = <&eeprom_factory_0>; + nvmem-cell-names = "eeprom"; + status = "okay"; + + band@1 { + reg = <1>; + nvmem-cells = <&macaddr_factory_4 1>; + nvmem-cell-names = "mac-address"; + }; +}; + +&xhci { + status = "okay"; +}; diff --git a/target/linux/mediatek/filogic/base-files/etc/board.d/01_leds b/target/linux/mediatek/filogic/base-files/etc/board.d/01_leds index 73d91ee244..840072a556 100644 --- a/target/linux/mediatek/filogic/base-files/etc/board.d/01_leds +++ b/target/linux/mediatek/filogic/base-files/etc/board.d/01_leds @@ -49,6 +49,9 @@ glinet,gl-xe3000) ucidef_set_led_netdev "wlan2g" "WLAN2G" "green:wifi2g" "phy0-ap0" ucidef_set_led_netdev "wlan5g" "WLAN5G" "green:wifi5g" "phy1-ap0" ;; +huasifei,wh3000) + ucidef_set_led_netdev "wan" "WAN" "red:wan" "eth1" "link tx rx" + ;; mercusys,mr90x-v1|\ mercusys,mr90x-v1-ubi) ucidef_set_led_netdev "lan-0" "lan-0" "green:lan-0" "lan0" "link tx rx" diff --git a/target/linux/mediatek/filogic/base-files/etc/board.d/02_network b/target/linux/mediatek/filogic/base-files/etc/board.d/02_network index a97cd37c58..7d9610d62c 100644 --- a/target/linux/mediatek/filogic/base-files/etc/board.d/02_network +++ b/target/linux/mediatek/filogic/base-files/etc/board.d/02_network @@ -64,7 +64,8 @@ mediatek_setup_interfaces() ucidef_set_interfaces_lan_wan "lan1 lan2 lan3 lan4 sfp2" "eth1 wan" ;; bananapi,bpi-r3-mini|\ - edgecore,eap111) + edgecore,eap111|\ + huasifei,wh3000) ucidef_set_interfaces_lan_wan eth0 eth1 ;; bananapi,bpi-r4|\ diff --git a/target/linux/mediatek/filogic/base-files/lib/upgrade/platform.sh b/target/linux/mediatek/filogic/base-files/lib/upgrade/platform.sh index 2a8029dd18..89aeaadedb 100755 --- a/target/linux/mediatek/filogic/base-files/lib/upgrade/platform.sh +++ b/target/linux/mediatek/filogic/base-files/lib/upgrade/platform.sh @@ -104,6 +104,7 @@ platform_do_upgrade() { glinet,gl-mt6000|\ glinet,gl-x3000|\ glinet,gl-xe3000|\ + huasifei,wh3000|\ smartrg,sdg-8612|\ smartrg,sdg-8614|\ smartrg,sdg-8622|\ @@ -220,6 +221,7 @@ platform_copy_config() { glinet,gl-mt6000|\ glinet,gl-x3000|\ glinet,gl-xe3000|\ + huasifei,wh3000|\ jdcloud,re-cp-03|\ smartrg,sdg-8612|\ smartrg,sdg-8614|\ diff --git a/target/linux/mediatek/image/filogic.mk b/target/linux/mediatek/image/filogic.mk index 248593ede7..60f45a73e6 100644 --- a/target/linux/mediatek/image/filogic.mk +++ b/target/linux/mediatek/image/filogic.mk @@ -925,6 +925,21 @@ define Device/h3c_magic-nx30-pro endef TARGET_DEVICES += h3c_magic-nx30-pro +define Device/huasifei_wh3000 + DEVICE_VENDOR := Huasifei + DEVICE_MODEL := WH3000 + DEVICE_DTS := mt7981b-huasifei-wh3000 + DEVICE_DTS_DIR := ../dts + DEVICE_PACKAGES := kmod-mt7915e kmod-mt7981-firmware mt7981-wo-firmware \ + kmod-usb3 f2fsck mkf2fs + SUPPORTED_DEVICES += huasifei,wh3000-emmc + KERNEL := kernel-bin | lzma | fit lzma $$(KDIR)/image-$$(firstword $$(DEVICE_DTS)).dtb + KERNEL_INITRAMFS := kernel-bin | lzma | \ + fit lzma $$(KDIR)/image-$$(firstword $$(DEVICE_DTS)).dtb with-initrd | pad-to 64k + IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata +endef +TARGET_DEVICES += huasifei_wh3000 + define Device/jcg_q30-pro DEVICE_VENDOR := JCG DEVICE_MODEL := Q30 PRO From 7145b85295b9b593c474028364d3f573d1c838b3 Mon Sep 17 00:00:00 2001 From: Mieczyslaw Nalewaj Date: Sun, 6 Apr 2025 18:33:59 +0200 Subject: [PATCH 12/49] kernel: modules: ixgbe,ixgbevf,i40e: remove unused settings and depends Remove settings and depends that are not used anywhere. Signed-off-by: Mieczyslaw Nalewaj Link: #18291 (cherry picked from commit b6ff3d9afa0ff8e9ae68812ac7aa6f9be168db95) Link: https://github.com/openwrt/openwrt/pull/18431 Signed-off-by: Hauke Mehrtens --- package/kernel/linux/modules/netdevices.mk | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/package/kernel/linux/modules/netdevices.mk b/package/kernel/linux/modules/netdevices.mk index 86ca7c93a1..32499e2e5e 100644 --- a/package/kernel/linux/modules/netdevices.mk +++ b/package/kernel/linux/modules/netdevices.mk @@ -1098,7 +1098,6 @@ define KernelPackage/ixgbe TITLE:=Intel(R) 82598/82599 PCI-Express 10 Gigabit Ethernet support DEPENDS:=@PCI_SUPPORT +kmod-mdio +kmod-ptp +kmod-hwmon-core +kmod-libphy +kmod-mdio-devres KCONFIG:=CONFIG_IXGBE \ - CONFIG_IXGBE_VXLAN=n \ CONFIG_IXGBE_HWMON=y \ CONFIG_IXGBE_DCA=n FILES:=$(LINUX_DIR)/drivers/net/ethernet/intel/ixgbe/ixgbe.ko @@ -1117,7 +1116,6 @@ define KernelPackage/ixgbevf TITLE:=Intel(R) 82599 Virtual Function Ethernet support DEPENDS:=@PCI_SUPPORT +kmod-ixgbe KCONFIG:=CONFIG_IXGBEVF \ - CONFIG_IXGBE_VXLAN=n \ CONFIG_IXGBE_HWMON=y \ CONFIG_IXGBE_DCA=n FILES:=$(LINUX_DIR)/drivers/net/ethernet/intel/ixgbevf/ixgbevf.ko @@ -1134,10 +1132,8 @@ $(eval $(call KernelPackage,ixgbevf)) define KernelPackage/i40e SUBMENU:=$(NETWORK_DEVICES_MENU) TITLE:=Intel(R) Ethernet Controller XL710 Family support - DEPENDS:=@PCI_SUPPORT +kmod-mdio +kmod-ptp +kmod-hwmon-core +kmod-libphy + DEPENDS:=@PCI_SUPPORT +kmod-ptp KCONFIG:=CONFIG_I40E \ - CONFIG_I40E_VXLAN=n \ - CONFIG_I40E_HWMON=y \ CONFIG_I40E_DCA=n FILES:=$(LINUX_DIR)/drivers/net/ethernet/intel/i40e/i40e.ko AUTOLOAD:=$(call AutoProbe,i40e) From 30c1c6d7c31e031aea1d4dc082c8d137f5653a0a Mon Sep 17 00:00:00 2001 From: Shiji Yang Date: Sat, 29 Mar 2025 00:00:50 +0800 Subject: [PATCH 13/49] ath10k-ct: silence some harmless noisy logs Users feel anxious about some ath10k driver logs. After further investigation, in fact these logs are harmless. Only developers need to care about them in order to optimize some parameters. Let's just silence them to reduce these similar user reports. Closes: https://github.com/openwrt/openwrt/issues/13148 Closes: https://github.com/openwrt/openwrt/issues/14422 Closes: https://github.com/openwrt/openwrt/issues/15959 Closes: https://github.com/openwrt/openwrt/issues/15997 Closes: https://github.com/openwrt/openwrt/issues/16896 Closes: https://github.com/openwrt/openwrt/issues/18046 Signed-off-by: Shiji Yang Link: https://github.com/openwrt/openwrt/pull/18368 Signed-off-by: Robert Marko (cherry picked from commit 88234a03bc645d327016cc807c35972fcb6834eb) [Apply to ath10k-ct 6.10] Signed-off-by: Hauke Mehrtens --- ...e-warning-caused-by-unsupported-retr.patch | 34 +++++++++++++++++++ ...e-noisy-log-caused-by-flushing-queue.patch | 31 +++++++++++++++++ ...k-always-use-mac80211-loss-detection.patch | 2 +- 3 files changed, 66 insertions(+), 1 deletion(-) create mode 100644 package/kernel/ath10k-ct/patches/205-ath10k-ct-silence-warning-caused-by-unsupported-retr.patch create mode 100644 package/kernel/ath10k-ct/patches/206-ath10k-ct-silence-noisy-log-caused-by-flushing-queue.patch diff --git a/package/kernel/ath10k-ct/patches/205-ath10k-ct-silence-warning-caused-by-unsupported-retr.patch b/package/kernel/ath10k-ct/patches/205-ath10k-ct-silence-warning-caused-by-unsupported-retr.patch new file mode 100644 index 0000000000..9d6b0954ff --- /dev/null +++ b/package/kernel/ath10k-ct/patches/205-ath10k-ct-silence-warning-caused-by-unsupported-retr.patch @@ -0,0 +1,34 @@ +From: Shiji Yang +Date: Fri, 28 Mar 2025 20:26:04 +0800 +Subject: [PATCH] ath10k-ct: silence warning caused by unsupported retry_limit + value + +Some retry_limit values are not supported by ath10k wave2 chips. +We can just skip config it for these chips. And it's safe to +return 0 in this case because the hardware is still working. + +Suggested-by: Ben Greear +Signed-off-by: Shiji Yang +--- + ath10k-6.14/mac.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +--- a/ath10k-6.10/mac.c ++++ b/ath10k-6.10/mac.c +@@ -5395,7 +5395,7 @@ static int ath10k_config_retry_limit(str + */ + ath10k_warn(ar, "Firmware lacks feature flag indicating a retry limit of > 2 is OK, requested limit: %d\n", + limit); +- return -EINVAL; ++ goto skip_retry_limit; + } + + list_for_each_entry(arvif, &ar->arvifs, list) { +@@ -5406,6 +5406,7 @@ static int ath10k_config_retry_limit(str + } + } + ++skip_retry_limit: + return ret; + } + diff --git a/package/kernel/ath10k-ct/patches/206-ath10k-ct-silence-noisy-log-caused-by-flushing-queue.patch b/package/kernel/ath10k-ct/patches/206-ath10k-ct-silence-noisy-log-caused-by-flushing-queue.patch new file mode 100644 index 0000000000..8b8042e5d7 --- /dev/null +++ b/package/kernel/ath10k-ct/patches/206-ath10k-ct-silence-noisy-log-caused-by-flushing-queue.patch @@ -0,0 +1,31 @@ +From: Shiji Yang +Date: Fri, 28 Mar 2025 21:02:27 +0800 +Subject: [PATCH] ath10k-ct: silence noisy log caused by flushing queue + +.flush() is a regular mac80211 operation aims to clear all pending +frames from the hardware queue. Only developers need to care about it. + +Signed-off-by: Shiji Yang +--- + ath10k-6.14/mac.c | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +--- a/ath10k-6.10/mac.c ++++ b/ath10k-6.10/mac.c +@@ -9061,12 +9061,12 @@ static void ath10k_flush(struct ieee8021 + if (vif) { + arvif = (void *)vif->drv_priv; + vid = arvif->vdev_id; +- ath10k_info(ar, "mac flush vdev %d drop %d queues 0x%x ar->paused: 0x%lx arvif->paused: 0x%lx\n", +- arvif->vdev_id, drop, queues, ar->tx_paused, arvif->tx_paused); ++ ath10k_dbg(ar, ATH10K_DBG_MAC, "mac flush vdev %d drop %d queues 0x%x ar->paused: 0x%lx arvif->paused: 0x%lx\n", ++ arvif->vdev_id, drop, queues, ar->tx_paused, arvif->tx_paused); + } + else { +- ath10k_info(ar, "mac flush null vif, drop %d queues 0x%x\n", +- drop, queues); ++ ath10k_dbg(ar, ATH10K_DBG_MAC, "mac flush null vif, drop %d queues 0x%x\n", ++ drop, queues); + } + + diff --git a/package/kernel/ath10k-ct/patches/988-ath10k-always-use-mac80211-loss-detection.patch b/package/kernel/ath10k-ct/patches/988-ath10k-always-use-mac80211-loss-detection.patch index 35026cc0f9..1f9f38c2b0 100644 --- a/package/kernel/ath10k-ct/patches/988-ath10k-always-use-mac80211-loss-detection.patch +++ b/package/kernel/ath10k-ct/patches/988-ath10k-always-use-mac80211-loss-detection.patch @@ -18,7 +18,7 @@ Signed-off-by: David Bauer --- a/ath10k-6.10/mac.c +++ b/ath10k-6.10/mac.c -@@ -11316,7 +11316,6 @@ int ath10k_mac_register(struct ath10k *a +@@ -11317,7 +11317,6 @@ int ath10k_mac_register(struct ath10k *a ieee80211_hw_set(ar->hw, CHANCTX_STA_CSA); ieee80211_hw_set(ar->hw, QUEUE_CONTROL); ieee80211_hw_set(ar->hw, SUPPORTS_TX_FRAG); From ced823497ade50b4997fcb08d3671830e05ee8df Mon Sep 17 00:00:00 2001 From: Shiji Yang Date: Wed, 2 Apr 2025 08:10:29 +0800 Subject: [PATCH 14/49] ath10k-ct: remove "qcom,coexist-support" property type hack The ath10k dt-binding property "qcom,coexist-support" was explicitly defined as type uint8 since upstream commit ed09c61eb19d ("dt-bindings: net: Convert ath10k to YAML"). Therefore, this hack patch no longer makes sense. Link: https://github.com/torvalds/linux/commit/ed09c61eb19d9889780c791cb316ac76468f5186 Signed-off-by: Shiji Yang Link: https://github.com/openwrt/openwrt/pull/18393 Signed-off-by: Robert Marko (cherry picked from commit da13174aa1736f571a808173a1e8159202d7af95) --- ...k-read-qcom-coexist-support-as-a-u32.patch | 60 ------------------- 1 file changed, 60 deletions(-) delete mode 100644 package/kernel/ath10k-ct/patches/130-ath10k-read-qcom-coexist-support-as-a-u32.patch diff --git a/package/kernel/ath10k-ct/patches/130-ath10k-read-qcom-coexist-support-as-a-u32.patch b/package/kernel/ath10k-ct/patches/130-ath10k-read-qcom-coexist-support-as-a-u32.patch deleted file mode 100644 index 61090a49d0..0000000000 --- a/package/kernel/ath10k-ct/patches/130-ath10k-read-qcom-coexist-support-as-a-u32.patch +++ /dev/null @@ -1,60 +0,0 @@ -From 630df9786fdaeb78c21f1e28c9b70ac83a1b482c Mon Sep 17 00:00:00 2001 -From: Vincent Tremblay -Date: Sat, 31 Dec 2022 09:24:00 -0500 -Subject: [PATCH] ath10k: read qcom,coexist-support as a u32 - -Read qcom,coexist-support as a u32 instead of a u8 - -When we set the property to <1> in the DT (as specified in the doc), -"of_property_read_u8" read 0 instead of 1. This is because of the data format. - -By default <1> is written with 32 bits. -The problem is that the driver is trying to read a u8. - -The difference can be visualized using hexdump in a running device: -Default 32 bits output: -======================= -0000000 0000 0100 -0000004 - -8 bits output: -============== -0000000 0001 -0000001 - -By changing "of_property_read_u8" by "of_property_read_u32", the driver -is aligned with the documentation and is able to read the value without -modifying the DT. - -The other solution would be to force the value in the DT to be saved as -an 8 bits value (qcom,coexist-support = /bits/ 8 <1>), -which is against the doc and less intuitive. - -Validation: -=========== -The patch was tested on a real device and we can see in the debug logs -that the feature is properly initialized: - -[ 109.102097] ath10k_ahb a000000.wifi: boot coex_support 1 coex_gpio_pin 52 - -Signed-off-by: Vincent Tremblay - ---- a/ath10k-6.10/core.c -+++ b/ath10k-6.10/core.c -@@ -2871,14 +2871,14 @@ done: - static void ath10k_core_fetch_btcoex_dt(struct ath10k *ar) - { - struct device_node *node; -- u8 coex_support = 0; -+ u32 coex_support = 0; - int ret; - - node = ar->dev->of_node; - if (!node) - goto out; - -- ret = of_property_read_u8(node, "qcom,coexist-support", &coex_support); -+ ret = of_property_read_u32(node, "qcom,coexist-support", &coex_support); - if (ret) { - ar->coex_support = true; - goto out; From 31c3ab3b458c058eeac06e8b83355b1564ee321c Mon Sep 17 00:00:00 2001 From: Shiji Yang Date: Wed, 2 Apr 2025 08:10:29 +0800 Subject: [PATCH 15/49] ipq40xx: dts: fix "qcom,coexist-support" property type Convert the property variable type of "qcom,coexist-support" from u32 to u8 to match the definition in the dt-bindings document. Signed-off-by: Shiji Yang Link: https://github.com/openwrt/openwrt/pull/18393 Signed-off-by: Robert Marko (cherry picked from commit 3526dbabdc63c6ac8a932333ab989d1f99b6945b) --- .../files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-whw03.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-whw03.dtsi b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-whw03.dtsi index 6c9eaadd77..9da7e44547 100644 --- a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-whw03.dtsi +++ b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-whw03.dtsi @@ -274,7 +274,7 @@ pinctrl-0 = <&wifi_0_pins>; pinctrl-names = "default"; - qcom,coexist-support = <1>; + qcom,coexist-support = /bits/ 8 <1>; qcom,coexist-gpio-pin = <52>; }; From 3f00d6ba01036bee3572b805f1b1e1acff817f91 Mon Sep 17 00:00:00 2001 From: Ming Kuang Date: Fri, 21 Mar 2025 23:21:05 +0800 Subject: [PATCH 16/49] wifi-scripts: mac80211.sh: add EHT and HE160 support to iw_htmode For WIFI7 devices (such as mt7925e), the dev width is currently always "20 MHz (no HT)" in monitor mode. Add EHT and HE160 support to iw_htmode to fix this issue. Additionally, the following changes are made: 1. Set iw_htmode to 160MHz for VHT160. The reason for the current VHT160 setting is unclear and seems to have been in place for over a decade (ibss_htmode [1]). If anyone knows its impact, please inform me so I can restore it. 2. Modify MHZ to MHz. The original matching table in the current iw tool uses MHz. Although the match is case-insensitive, correcting this won't hurt. [1]: https://github.com/openwrt/openwrt/commit/768d09be8781228d3553142c0f1e1231c6aacc7c Signed-off-by: Ming Kuang Link: https://github.com/openwrt/openwrt/pull/18319 Signed-off-by: Hauke Mehrtens (cherry picked from commit 86eb1c0b5add1e0b493b25508c45b2df9d722c78) --- .../files/lib/netifd/wireless/mac80211.sh | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/package/network/config/wifi-scripts/files/lib/netifd/wireless/mac80211.sh b/package/network/config/wifi-scripts/files/lib/netifd/wireless/mac80211.sh index b4aa19bf52..059fd9b8c8 100755 --- a/package/network/config/wifi-scripts/files/lib/netifd/wireless/mac80211.sh +++ b/package/network/config/wifi-scripts/files/lib/netifd/wireless/mac80211.sh @@ -740,8 +740,10 @@ mac80211_prepare_vif() { mac80211_prepare_iw_htmode() { case "$htmode" in - VHT20|HT20|HE20) iw_htmode=HT20;; - HT40*|VHT40|VHT160|HE40) + HT20|VHT20|HE20|EHT20) + iw_htmode=HT20 + ;; + HT40*|VHT40|HE40|EHT40) case "$band" in 2g) case "$htmode" in @@ -765,8 +767,11 @@ mac80211_prepare_iw_htmode() { esac [ "$auto_channel" -gt 0 ] && iw_htmode="HT40+" ;; - VHT80|HE80) - iw_htmode="80MHZ" + VHT80|HE80|EHT80) + iw_htmode="80MHz" + ;; + VHT160|HE160|EHT160) + iw_htmode="160MHz" ;; NONE|NOHT) iw_htmode="NOHT" From eed88d4f10b456355216103b6f57c1c1ad03caff Mon Sep 17 00:00:00 2001 From: Matthias Franck Date: Fri, 31 Jan 2025 10:00:46 +0100 Subject: [PATCH 17/49] busybox: use external libtirpc when using glibc In recent glibc versions rpc functionality has been moved to a separate library instead of glibc itself. Depend on this library when rpc functionality is needed and glibc is used. Signed-off-by: Matthias Franck Link: https://github.com/openwrt/openwrt/pull/17796 Signed-off-by: Hauke Mehrtens (cherry picked from commit 84e090086795a45d5580138436ce74b6170584ab) --- package/utils/busybox/Makefile | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/package/utils/busybox/Makefile b/package/utils/busybox/Makefile index 7d302bd159..e3b9f256e0 100644 --- a/package/utils/busybox/Makefile +++ b/package/utils/busybox/Makefile @@ -48,7 +48,7 @@ define Package/busybox/Default MAINTAINER:=Felix Fietkau TITLE:=Core utilities for embedded Linux URL:=http://busybox.net/ - DEPENDS:=+BUSYBOX_CONFIG_PAM:libpam +BUSYBOX_CONFIG_NTPD:jsonfilter + DEPENDS:=+BUSYBOX_CONFIG_PAM:libpam +BUSYBOX_CONFIG_NTPD:jsonfilter +(USE_GLIBC&&BUSYBOX_CONFIG_FEATURE_MOUNT_NFS)||(USE_GLIBC&&BUSYBOX_CONFIG_FEATURE_INETD_RPC):libtirpc USERID:=ntp=123:ntp=123 endef @@ -104,6 +104,13 @@ ifeq ($(CONFIG_USE_GLIBC),y) LDLIBS += $(call BUSYBOX_IF_ENABLED,NSLOOKUP,resolv) endif +ifneq ($(CONFIG_BUSYBOX_$(BUSYBOX_SYM)_FEATURE_MOUNT_NFS)$(CONFIG_BUSYBOX_$(BUSYBOX_SYM)_FEATURE_INETD_RPC),) +ifndef CONFIG_USE_MUSL + TARGET_CFLAGS += -I$(STAGING_DIR)/usr/include/tirpc + LDLIBS += tirpc +endif +endif + ifeq ($(BUILD_VARIANT),selinux) LDLIBS += selinux sepol endif From b4af5bbcf7f5282cb03632188fb1acf8ca83ecad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=81lvaro=20Fern=C3=A1ndez=20Rojas?= Date: Thu, 10 Apr 2025 14:01:33 +0200 Subject: [PATCH 18/49] package: add kmod-r8127 ethernet driver MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit r8127 is an out of tree driver provided by Realtek for RTL8127 devices. Signed-off-by: Álvaro Fernández Rojas (cherry picked from commit 851ea69d8ebf4bdc80b29562123b96cd94387e9e) --- package/kernel/r8127/Makefile | 47 ++++++++ ...127-print-link-speed-and-duplex-mode.patch | 107 ++++++++++++++++++ 2 files changed, 154 insertions(+) create mode 100644 package/kernel/r8127/Makefile create mode 100644 package/kernel/r8127/patches/200-r8127-print-link-speed-and-duplex-mode.patch diff --git a/package/kernel/r8127/Makefile b/package/kernel/r8127/Makefile new file mode 100644 index 0000000000..bb0c5e0a6c --- /dev/null +++ b/package/kernel/r8127/Makefile @@ -0,0 +1,47 @@ +include $(TOPDIR)/rules.mk + +PKG_NAME:=r8127 +PKG_VERSION:=11.014.00 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 +PKG_SOURCE_URL:=https://github.com/openwrt/rtl8127/releases/download/$(PKG_VERSION) +PKG_HASH:=f496bc16c32d2e8f9482c57d006604c70d9e8d55b4f1f999b88c602de9104094 + +PKG_BUILD_PARALLEL:=1 +PKG_LICENSE:=GPLv2 +PKG_MAINTAINER:=Alvaro Fernandez Rojas + +include $(INCLUDE_DIR)/kernel.mk +include $(INCLUDE_DIR)/package.mk + +define KernelPackage/r8127 + SUBMENU:=Network Devices + TITLE:=Realtek RTL8127 PCI 10 Gigabit Ethernet driver + DEPENDS:=@PCI_SUPPORT +kmod-libphy + FILES:=$(PKG_BUILD_DIR)/src/r8127.ko + AUTOLOAD:=$(call AutoProbe,r8127) + PROVIDES:=kmod-r8169 + VARIANT:=regular +endef + +define KernelPackage/r8127-rss +$(call KernelPackage/r8127) + CONFLICTS:=kmod-r8127 + TITLE+= (RSS) + VARIANT:=rss +endef + +ifeq ($(BUILD_VARIANT),rss) + PKG_MAKE_FLAGS += ENABLE_RSS_SUPPORT=y +endif + +define Build/Compile + +$(KERNEL_MAKE) $(PKG_JOBS) \ + $(PKG_MAKE_FLAGS) \ + M="$(PKG_BUILD_DIR)/src" \ + modules +endef + +$(eval $(call KernelPackage,r8127)) +$(eval $(call KernelPackage,r8127-rss)) diff --git a/package/kernel/r8127/patches/200-r8127-print-link-speed-and-duplex-mode.patch b/package/kernel/r8127/patches/200-r8127-print-link-speed-and-duplex-mode.patch new file mode 100644 index 0000000000..2a42820785 --- /dev/null +++ b/package/kernel/r8127/patches/200-r8127-print-link-speed-and-duplex-mode.patch @@ -0,0 +1,107 @@ +From 5ca1d47e065c0318774a946ffdf76010c78cc164 Mon Sep 17 00:00:00 2001 +From: Chukun Pan +Date: Sat, 10 Aug 2024 20:16:32 +0800 +Subject: [PATCH] r8127: print link speed and duplex mode +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Like other Ethernet drivers, print link speed and duplex mode +when the interface is up. Formatting output at the same time. + +Signed-off-by: Chukun Pan +Signed-off-by: Álvaro Fernández Rojas +--- + src/r8127.h | 2 ++ + src/r8127_n.c | 48 +++++++++++++++++++++++++++++++++++++++++++++--- + 2 files changed, 47 insertions(+), 3 deletions(-) + +--- a/src/r8127.h ++++ b/src/r8127.h +@@ -1753,6 +1753,11 @@ enum RTL8127_register_content { + LinkStatus = 0x02, + FullDup = 0x01, + ++#define RTL8127_FULL_DUPLEX_MASK (_10000bpsF | _5000bpsF | _2500bpsF | _1000bpsF | FullDup) ++#define RTL8127_SPEED_1000_MASK (_1000bpsF | _1000bpsL | _2500bpsL) ++#define RTL8127_SPEED_2500_MASK (_2500bpsF | _5000bpsL) ++#define RTL8127_SPEED_5000_MASK (_5000bpsF | _10000bpsL) ++ + /* DBG_reg */ + Fix_Nak_1 = (1 << 4), + Fix_Nak_2 = (1 << 3), +--- a/src/r8127_n.c ++++ b/src/r8127_n.c +@@ -39,6 +39,7 @@ + #include + #include + #include ++#include + #include + #include + #include +@@ -4746,6 +4747,42 @@ rtl8127_link_down_patch(struct net_devic + #endif + } + ++static unsigned int rtl8127_phy_duplex(u32 status) ++{ ++ unsigned int duplex = DUPLEX_UNKNOWN; ++ ++ if (status & LinkStatus) { ++ if (status & RTL8127_FULL_DUPLEX_MASK) ++ duplex = DUPLEX_FULL; ++ else ++ duplex = DUPLEX_HALF; ++ } ++ ++ return duplex; ++} ++ ++static int rtl8127_phy_speed(u32 status) ++{ ++ int speed = SPEED_UNKNOWN; ++ ++ if (status & LinkStatus) { ++ if (status & _10000bpsF) ++ speed = SPEED_10000; ++ else if (status & RTL8127_SPEED_5000_MASK) ++ speed = SPEED_5000; ++ else if (status & RTL8127_SPEED_2500_MASK) ++ speed = SPEED_2500; ++ else if (status & RTL8127_SPEED_1000_MASK) ++ speed = SPEED_1000; ++ else if (status & _100bps) ++ speed = SPEED_100; ++ else if (status & _10bps) ++ speed = SPEED_10; ++ } ++ ++ return speed; ++} ++ + static void + _rtl8127_check_link_status(struct net_device *dev, unsigned int link_state) + { +@@ -4758,11 +4795,18 @@ _rtl8127_check_link_status(struct net_de + if (link_state == R8127_LINK_STATE_ON) { + rtl8127_link_on_patch(dev); + +- if (netif_msg_ifup(tp)) +- printk(KERN_INFO PFX "%s: link up\n", dev->name); ++ if (netif_msg_ifup(tp)) { ++ const u32 phy_status = RTL_R32(tp, PHYstatus); ++ const unsigned int phy_duplex = rtl8127_phy_duplex(phy_status); ++ const int phy_speed = rtl8127_phy_speed(phy_status); ++ printk(KERN_INFO PFX "%s: Link is Up - %s/%s\n", ++ dev->name, ++ phy_speed_to_str(phy_speed), ++ phy_duplex_to_str(phy_duplex)); ++ } + } else { + if (netif_msg_ifdown(tp)) +- printk(KERN_INFO PFX "%s: link down\n", dev->name); ++ printk(KERN_INFO PFX "%s: Link is Down\n", dev->name); + + rtl8127_link_down_patch(dev); + } From c0ae5d207173328113188e2919735cfffaf47d95 Mon Sep 17 00:00:00 2001 From: INAGAKI Hiroshi Date: Sun, 13 Apr 2025 19:41:19 +0900 Subject: [PATCH 19/49] ath79: fix initramfs execution for NEC Aterm devices Fix execution of initramfs image on NEC Aterm devices by increasing available memory for lzma extraction of lzma-loader. The size of initramfs image of v24.10.0 exceeds available memory (LZMA_TEXT_START - LOADADDR) and loader data running at LZMA_TEXT_START will be overwritten by extracted data. As a result, LZMA extraction will be broken and stuck (or unexpectedly reset). Fix that issue by setting higher LZMA_TEXT_START address to increase available memory for LZMA extraction by lzma-loader. log (v24.10.0): boot> tftpd tftpd start 192.168.0.1 boot> start tftp load openwrt-24.10.0-ath79-generic-ne end tftp load length = 6569768 start memory load ... memory load complete begin : 0x80040000 length : 6567044 startup: 0x80040000 boot> boot begin : 0x80040000 length : 6567044 startup: 0x80040000 option: 0x0 NEC Aterm series (QCA9558) Calibrating SGMII SGMII cal value = 0xe Configuring SGMII force mode SGMII_CONFIG : 0x000000a2 MR_AN_CONTROL: 0x00008140 MR_AN_CONTROL: 0x00000140 OpenWrt kernel loader for AR7XXX/AR9XXX Copyright (C) 2011 Gabor Juhos Decompressing kernel... [:]');retu <--- (stuck) IPL:SOFT-RESET <--- (reset by WDT) memory test ... ok flinstall OK boot version: 1.0.0 ... Signed-off-by: INAGAKI Hiroshi Link: https://github.com/openwrt/openwrt/pull/18476 Signed-off-by: Robert Marko (cherry picked from commit 10a674d27738020384a1bfcca693200999a9e406) --- target/linux/ath79/image/common-nec.mk | 1 + 1 file changed, 1 insertion(+) diff --git a/target/linux/ath79/image/common-nec.mk b/target/linux/ath79/image/common-nec.mk index 7981a72d8e..23671e215d 100644 --- a/target/linux/ath79/image/common-nec.mk +++ b/target/linux/ath79/image/common-nec.mk @@ -8,6 +8,7 @@ endef define Device/nec-netbsd-aterm DEVICE_VENDOR := NEC LOADER_TYPE := bin + LZMA_TEXT_START := 0x82800000 KERNEL := kernel-bin | append-dtb | lzma | loader-kernel | uImage none KERNEL_INITRAMFS := kernel-bin | append-dtb | lzma | loader-kernel | uImage none ARTIFACTS := uboot.bin From 04256646797da82a3a0c419d298ca7719192d128 Mon Sep 17 00:00:00 2001 From: Hannu Nyman Date: Sat, 12 Apr 2025 19:47:28 +0300 Subject: [PATCH 20/49] ca-certificates: Update to 20241223 Update ca-certificates to version 20241223 * Update Mozilla certificate authority bundle to version 2.70. The following certificate authorities were added (+): + Telekom Security TLS ECC Root 2020 + Telekom Security TLS RSA Root 2023 + FIRMAPROFESIONAL CA ROOT-A WEB + TWCA CYBER Root CA + SecureSign Root CA12 + SecureSign Root CA14 + SecureSign Root CA15 The following certificate authorities were removed (-): - Security Communication Root CA (closes: #1063093) Signed-off-by: Hannu Nyman Link: https://github.com/openwrt/openwrt/pull/18468 Signed-off-by: Robert Marko (cherry picked from commit c79572210fa47d015b3bdc03f38c25ef5262a318) --- package/system/ca-certificates/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package/system/ca-certificates/Makefile b/package/system/ca-certificates/Makefile index 254d7b5178..5b282c339e 100644 --- a/package/system/ca-certificates/Makefile +++ b/package/system/ca-certificates/Makefile @@ -7,7 +7,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=ca-certificates -PKG_VERSION:=20240203 +PKG_VERSION:=20241223 PKG_RELEASE:=1 PKG_MAINTAINER:= @@ -16,7 +16,7 @@ PKG_LICENSE_FILES:=debian/copyright PKG_SOURCE:=$(PKG_NAME)_$(PKG_VERSION).tar.xz PKG_SOURCE_URL:=@DEBIAN/pool/main/c/ca-certificates -PKG_HASH:=3286d3fc42c4d11b7086711a85f865b44065ce05cf1fb5376b2abed07622a9c6 +PKG_HASH:=dd8286d0a9dd35c756fea5f1df3fed1510fb891f376903891b003cd9b1ad7e03 PKG_INSTALL:=1 include $(INCLUDE_DIR)/package.mk From d183d7bb7827a469f09bf77f2f22fd9d70ac0ed6 Mon Sep 17 00:00:00 2001 From: Hauke Mehrtens Date: Mon, 14 Apr 2025 01:07:35 +0200 Subject: [PATCH 21/49] OpenWrt v24.10.1: adjust config defaults Signed-off-by: Hauke Mehrtens --- feeds.conf.default | 8 ++++---- include/version.mk | 6 +++--- package/base-files/image-config.in | 4 ++-- version | 1 + version.date | 1 + 5 files changed, 11 insertions(+), 9 deletions(-) create mode 100644 version create mode 100644 version.date diff --git a/feeds.conf.default b/feeds.conf.default index 581de056c4..30fa22a128 100644 --- a/feeds.conf.default +++ b/feeds.conf.default @@ -1,4 +1,4 @@ -src-git packages https://git.openwrt.org/feed/packages.git;openwrt-24.10 -src-git luci https://git.openwrt.org/project/luci.git;openwrt-24.10 -src-git routing https://git.openwrt.org/feed/routing.git;openwrt-24.10 -src-git telephony https://git.openwrt.org/feed/telephony.git;openwrt-24.10 +src-git packages https://git.openwrt.org/feed/packages.git^d8cd30f4e281d6853b3de134c4f147a807583e43 +src-git luci https://git.openwrt.org/project/luci.git^2ac26e56cc55102cb10e7b0867c2b78e0f6d5fd8 +src-git routing https://git.openwrt.org/feed/routing.git^c9b636698881059a3c981032770968f5a98ff201 +src-git telephony https://git.openwrt.org/feed/telephony.git^fd605af7143165a2490681ec1752f259873b9147 diff --git a/include/version.mk b/include/version.mk index a6ebe58779..bcbe1ea1ca 100644 --- a/include/version.mk +++ b/include/version.mk @@ -23,13 +23,13 @@ PKG_CONFIG_DEPENDS += \ sanitize = $(call tolower,$(subst _,-,$(subst $(space),-,$(1)))) VERSION_NUMBER:=$(call qstrip,$(CONFIG_VERSION_NUMBER)) -VERSION_NUMBER:=$(if $(VERSION_NUMBER),$(VERSION_NUMBER),24.10-SNAPSHOT) +VERSION_NUMBER:=$(if $(VERSION_NUMBER),$(VERSION_NUMBER),24.10.1) VERSION_CODE:=$(call qstrip,$(CONFIG_VERSION_CODE)) -VERSION_CODE:=$(if $(VERSION_CODE),$(VERSION_CODE),$(REVISION)) +VERSION_CODE:=$(if $(VERSION_CODE),$(VERSION_CODE),r28597-0425664679) VERSION_REPO:=$(call qstrip,$(CONFIG_VERSION_REPO)) -VERSION_REPO:=$(if $(VERSION_REPO),$(VERSION_REPO),https://downloads.openwrt.org/releases/24.10-SNAPSHOT) +VERSION_REPO:=$(if $(VERSION_REPO),$(VERSION_REPO),https://downloads.openwrt.org/releases/24.10.1) VERSION_DIST:=$(call qstrip,$(CONFIG_VERSION_DIST)) VERSION_DIST:=$(if $(VERSION_DIST),$(VERSION_DIST),OpenWrt) diff --git a/package/base-files/image-config.in b/package/base-files/image-config.in index 80db993d46..08a6e1c4e1 100644 --- a/package/base-files/image-config.in +++ b/package/base-files/image-config.in @@ -190,7 +190,7 @@ if VERSIONOPT config VERSION_REPO string prompt "Release repository" - default "https://downloads.openwrt.org/releases/24.10-SNAPSHOT" + default "https://downloads.openwrt.org/releases/24.10.1" help This is the repository address embedded in the image, it defaults to the trunk snapshot repo; the url may contain the following placeholders: @@ -266,7 +266,7 @@ if VERSIONOPT config VERSION_CODE_FILENAMES bool prompt "Revision code in filenames" - default y + default n help Enable this to include the revision identifier or the configured version code into the firmware image, SDK- and Image Builder archive diff --git a/version b/version new file mode 100644 index 0000000000..05eac7c668 --- /dev/null +++ b/version @@ -0,0 +1 @@ +r28597-0425664679 diff --git a/version.date b/version.date new file mode 100644 index 0000000000..8b33b85f10 --- /dev/null +++ b/version.date @@ -0,0 +1 @@ +1744562312 From 6271b14140609bfb7480c231ff57ce4e68b2744d Mon Sep 17 00:00:00 2001 From: Hauke Mehrtens Date: Mon, 14 Apr 2025 01:07:39 +0200 Subject: [PATCH 22/49] OpenWrt v24.10.1: revert to branch defaults Signed-off-by: Hauke Mehrtens --- feeds.conf.default | 8 ++++---- include/version.mk | 6 +++--- package/base-files/image-config.in | 4 ++-- version | 1 - version.date | 1 - 5 files changed, 9 insertions(+), 11 deletions(-) delete mode 100644 version delete mode 100644 version.date diff --git a/feeds.conf.default b/feeds.conf.default index 30fa22a128..581de056c4 100644 --- a/feeds.conf.default +++ b/feeds.conf.default @@ -1,4 +1,4 @@ -src-git packages https://git.openwrt.org/feed/packages.git^d8cd30f4e281d6853b3de134c4f147a807583e43 -src-git luci https://git.openwrt.org/project/luci.git^2ac26e56cc55102cb10e7b0867c2b78e0f6d5fd8 -src-git routing https://git.openwrt.org/feed/routing.git^c9b636698881059a3c981032770968f5a98ff201 -src-git telephony https://git.openwrt.org/feed/telephony.git^fd605af7143165a2490681ec1752f259873b9147 +src-git packages https://git.openwrt.org/feed/packages.git;openwrt-24.10 +src-git luci https://git.openwrt.org/project/luci.git;openwrt-24.10 +src-git routing https://git.openwrt.org/feed/routing.git;openwrt-24.10 +src-git telephony https://git.openwrt.org/feed/telephony.git;openwrt-24.10 diff --git a/include/version.mk b/include/version.mk index bcbe1ea1ca..a6ebe58779 100644 --- a/include/version.mk +++ b/include/version.mk @@ -23,13 +23,13 @@ PKG_CONFIG_DEPENDS += \ sanitize = $(call tolower,$(subst _,-,$(subst $(space),-,$(1)))) VERSION_NUMBER:=$(call qstrip,$(CONFIG_VERSION_NUMBER)) -VERSION_NUMBER:=$(if $(VERSION_NUMBER),$(VERSION_NUMBER),24.10.1) +VERSION_NUMBER:=$(if $(VERSION_NUMBER),$(VERSION_NUMBER),24.10-SNAPSHOT) VERSION_CODE:=$(call qstrip,$(CONFIG_VERSION_CODE)) -VERSION_CODE:=$(if $(VERSION_CODE),$(VERSION_CODE),r28597-0425664679) +VERSION_CODE:=$(if $(VERSION_CODE),$(VERSION_CODE),$(REVISION)) VERSION_REPO:=$(call qstrip,$(CONFIG_VERSION_REPO)) -VERSION_REPO:=$(if $(VERSION_REPO),$(VERSION_REPO),https://downloads.openwrt.org/releases/24.10.1) +VERSION_REPO:=$(if $(VERSION_REPO),$(VERSION_REPO),https://downloads.openwrt.org/releases/24.10-SNAPSHOT) VERSION_DIST:=$(call qstrip,$(CONFIG_VERSION_DIST)) VERSION_DIST:=$(if $(VERSION_DIST),$(VERSION_DIST),OpenWrt) diff --git a/package/base-files/image-config.in b/package/base-files/image-config.in index 08a6e1c4e1..80db993d46 100644 --- a/package/base-files/image-config.in +++ b/package/base-files/image-config.in @@ -190,7 +190,7 @@ if VERSIONOPT config VERSION_REPO string prompt "Release repository" - default "https://downloads.openwrt.org/releases/24.10.1" + default "https://downloads.openwrt.org/releases/24.10-SNAPSHOT" help This is the repository address embedded in the image, it defaults to the trunk snapshot repo; the url may contain the following placeholders: @@ -266,7 +266,7 @@ if VERSIONOPT config VERSION_CODE_FILENAMES bool prompt "Revision code in filenames" - default n + default y help Enable this to include the revision identifier or the configured version code into the firmware image, SDK- and Image Builder archive diff --git a/version b/version deleted file mode 100644 index 05eac7c668..0000000000 --- a/version +++ /dev/null @@ -1 +0,0 @@ -r28597-0425664679 diff --git a/version.date b/version.date deleted file mode 100644 index 8b33b85f10..0000000000 --- a/version.date +++ /dev/null @@ -1 +0,0 @@ -1744562312 From 045fcef30e7307006ae5c405077113926a840362 Mon Sep 17 00:00:00 2001 From: Tianling Shen Date: Mon, 14 Apr 2025 17:30:35 +0800 Subject: [PATCH 23/49] r8127: enable rss support by default Signed-off-by: Tianling Shen (cherry picked from commit 637cb5d990ac4b76175fe9491d2f78325d0cab5e) --- package/kernel/r8127/Makefile | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) diff --git a/package/kernel/r8127/Makefile b/package/kernel/r8127/Makefile index bb0c5e0a6c..7e9325e109 100644 --- a/package/kernel/r8127/Makefile +++ b/package/kernel/r8127/Makefile @@ -21,27 +21,14 @@ define KernelPackage/r8127 DEPENDS:=@PCI_SUPPORT +kmod-libphy FILES:=$(PKG_BUILD_DIR)/src/r8127.ko AUTOLOAD:=$(call AutoProbe,r8127) - PROVIDES:=kmod-r8169 - VARIANT:=regular + PROVIDES:=kmod-r8169 kmod-r8127-rss endef -define KernelPackage/r8127-rss -$(call KernelPackage/r8127) - CONFLICTS:=kmod-r8127 - TITLE+= (RSS) - VARIANT:=rss -endef - -ifeq ($(BUILD_VARIANT),rss) - PKG_MAKE_FLAGS += ENABLE_RSS_SUPPORT=y -endif - define Build/Compile +$(KERNEL_MAKE) $(PKG_JOBS) \ - $(PKG_MAKE_FLAGS) \ M="$(PKG_BUILD_DIR)/src" \ + ENABLE_RSS_SUPPORT=y \ modules endef $(eval $(call KernelPackage,r8127)) -$(eval $(call KernelPackage,r8127-rss)) From 132b97e4253b681a852e71f941cb7f4e2a24033e Mon Sep 17 00:00:00 2001 From: Tianling Shen Date: Mon, 14 Apr 2025 17:39:23 +0800 Subject: [PATCH 24/49] r8152: remove unnecessary dependency It does not depend on kmod-usb-net. Signed-off-by: Tianling Shen (cherry picked from commit 57c24aaa31e283d7c68b85971ba1fb370666b501) --- package/kernel/r8152/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package/kernel/r8152/Makefile b/package/kernel/r8152/Makefile index 177d2b98ee..3129b56671 100644 --- a/package/kernel/r8152/Makefile +++ b/package/kernel/r8152/Makefile @@ -24,7 +24,7 @@ include $(INCLUDE_DIR)/package.mk define KernelPackage/usb-net-rtl8152-vendor TITLE:=Kernel module for USB-to-Ethernet Realtek convertors SUBMENU:=USB Support - DEPENDS:=+kmod-usb-net + DEPENDS:=+kmod-usb-core CONFLICTS:=kmod-usb-net-rtl8152 FILES:=$(PKG_BUILD_DIR)/r8152.ko AUTOLOAD:=$(call AutoProbe,r8152) From be1b2548882fc04237e67882dc84449678019f7f Mon Sep 17 00:00:00 2001 From: Daniel Golle Date: Tue, 18 Mar 2025 14:20:52 +0000 Subject: [PATCH 25/49] kernel: move accepted patch from pending-6.6 to backport-6.6 742-net-phy-air_en8811h-reset-netdev-rules-when-LED-is-s.patch has been accepted a while ago as https://git.kernel.org/torvalds/linux/c/87bfdbbb1992 Signed-off-by: Daniel Golle (cherry picked from commit 7a303d861a58bdcdd37430fcbf54bdd76b7cf6e0) --- ...01-net-phy-air_en8811h-Add-the-Airoha-EN8811H-PHY-drive.patch} | 0 ...> 798-v6.10-02-net-phy-air_en8811h-fix-some-error-codes.patch} | 0 ...03-net-phy-air_en8811h-reset-netdev-rules-when-LED-is-s.patch} | 0 3 files changed, 0 insertions(+), 0 deletions(-) rename target/linux/generic/backport-6.6/{798-v6.10-net-phy-air_en8811h-Add-the-Airoha-EN8811H-PHY-drive.patch => 798-v6.10-01-net-phy-air_en8811h-Add-the-Airoha-EN8811H-PHY-drive.patch} (100%) rename target/linux/generic/backport-6.6/{799-v6.10-net-phy-air_en8811h-fix-some-error-codes.patch => 798-v6.10-02-net-phy-air_en8811h-fix-some-error-codes.patch} (100%) rename target/linux/generic/{pending-6.6/742-net-phy-air_en8811h-reset-netdev-rules-when-LED-is-s.patch => backport-6.6/798-v6.10-03-net-phy-air_en8811h-reset-netdev-rules-when-LED-is-s.patch} (100%) diff --git a/target/linux/generic/backport-6.6/798-v6.10-net-phy-air_en8811h-Add-the-Airoha-EN8811H-PHY-drive.patch b/target/linux/generic/backport-6.6/798-v6.10-01-net-phy-air_en8811h-Add-the-Airoha-EN8811H-PHY-drive.patch similarity index 100% rename from target/linux/generic/backport-6.6/798-v6.10-net-phy-air_en8811h-Add-the-Airoha-EN8811H-PHY-drive.patch rename to target/linux/generic/backport-6.6/798-v6.10-01-net-phy-air_en8811h-Add-the-Airoha-EN8811H-PHY-drive.patch diff --git a/target/linux/generic/backport-6.6/799-v6.10-net-phy-air_en8811h-fix-some-error-codes.patch b/target/linux/generic/backport-6.6/798-v6.10-02-net-phy-air_en8811h-fix-some-error-codes.patch similarity index 100% rename from target/linux/generic/backport-6.6/799-v6.10-net-phy-air_en8811h-fix-some-error-codes.patch rename to target/linux/generic/backport-6.6/798-v6.10-02-net-phy-air_en8811h-fix-some-error-codes.patch diff --git a/target/linux/generic/pending-6.6/742-net-phy-air_en8811h-reset-netdev-rules-when-LED-is-s.patch b/target/linux/generic/backport-6.6/798-v6.10-03-net-phy-air_en8811h-reset-netdev-rules-when-LED-is-s.patch similarity index 100% rename from target/linux/generic/pending-6.6/742-net-phy-air_en8811h-reset-netdev-rules-when-LED-is-s.patch rename to target/linux/generic/backport-6.6/798-v6.10-03-net-phy-air_en8811h-reset-netdev-rules-when-LED-is-s.patch From 9e9f6875bcc576946f37dce8d88742d259065f0b Mon Sep 17 00:00:00 2001 From: Daniel Golle Date: Fri, 28 Mar 2025 15:40:28 +0000 Subject: [PATCH 26/49] generic: fitblk: close block device if mapping image failed In case a broken fit image is present on flash the fitblk driver would not map any /dev/fit* devices, but also not always close the block device the image resides on. In case of ubiblock devices this is fatal as one then cannot remove the ubiblock device (-EBUSY), and hence cannot replace the broken image. Always close the block device in case no sub-image was mapped. Signed-off-by: Daniel Golle (cherry picked from commit 2b9c81d1cbc65eeb9304b7274058418efa8a9c78) --- .../510-block-add-uImage.FIT-subimage-block-driver.patch | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/target/linux/generic/pending-6.6/510-block-add-uImage.FIT-subimage-block-driver.patch b/target/linux/generic/pending-6.6/510-block-add-uImage.FIT-subimage-block-driver.patch index b06c29ffaf..5a88631513 100644 --- a/target/linux/generic/pending-6.6/510-block-add-uImage.FIT-subimage-block-driver.patch +++ b/target/linux/generic/pending-6.6/510-block-add-uImage.FIT-subimage-block-driver.patch @@ -656,7 +656,7 @@ Signed-off-by: Daniel Golle + add_fit_subimage_device(bdev, slot++, start_sect, nr_sects, true); + } + -+ if (!found || !slot) ++ if (!slot) + goto out_bootconf; + + dev_info(dev, "mapped %u uImage.FIT filesystem sub-image%s as /dev/fit%s%u%s\n", @@ -675,7 +675,7 @@ Signed-off-by: Daniel Golle + kfree(bootconf); + kfree(fit); +out_blkdev: -+ if (!found || ret) ++ if (!slot) + blkdev_put(bdev, &_fitblk_claim_ptr); + + return ret; From ef066c128e17157e76c9b098ca20e1339bdff8e2 Mon Sep 17 00:00:00 2001 From: Tianling Shen Date: Tue, 15 Apr 2025 13:34:10 +0800 Subject: [PATCH 27/49] rockchip: change to use upstream driver for rtl8111 Signed-off-by: Tianling Shen (cherry picked from commit d36e763056ad5deb79bf68b3d81162ef8e4d2a68) --- target/linux/rockchip/image/armv8.mk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/target/linux/rockchip/image/armv8.mk b/target/linux/rockchip/image/armv8.mk index 6114d47c0a..0559064ab1 100644 --- a/target/linux/rockchip/image/armv8.mk +++ b/target/linux/rockchip/image/armv8.mk @@ -139,7 +139,7 @@ define Device/friendlyarm_nanopi-r3s DEVICE_MODEL := NanoPi R3S SOC := rk3566 BOOT_FLOW := pine64-img - DEVICE_PACKAGES := kmod-r8168 + DEVICE_PACKAGES := kmod-r8169 endef TARGET_DEVICES += friendlyarm_nanopi-r3s @@ -212,7 +212,7 @@ define Device/huake_guangmiao-g4c DEVICE_MODEL := GuangMiao G4C SOC := rk3399 BOOT_FLOW := pine64-bin - DEVICE_PACKAGES := kmod-r8168 + DEVICE_PACKAGES := kmod-r8169 endef TARGET_DEVICES += huake_guangmiao-g4c From 062916e675d181b6e5e8c136f4f66ee4fa249746 Mon Sep 17 00:00:00 2001 From: Tianling Shen Date: Tue, 15 Apr 2025 16:30:21 +0800 Subject: [PATCH 28/49] rockchip: add phy leds setup script Signed-off-by: Tianling Shen (cherry picked from commit 55f9aa693a87240eec3db552e90e585dd6d30d49) --- .../armv8/base-files/etc/init.d/phy-leds | 33 +++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100755 target/linux/rockchip/armv8/base-files/etc/init.d/phy-leds diff --git a/target/linux/rockchip/armv8/base-files/etc/init.d/phy-leds b/target/linux/rockchip/armv8/base-files/etc/init.d/phy-leds new file mode 100755 index 0000000000..1e5ab28939 --- /dev/null +++ b/target/linux/rockchip/armv8/base-files/etc/init.d/phy-leds @@ -0,0 +1,33 @@ +#!/bin/sh /etc/rc.common + +START=30 + +led_set() { + local path="/sys/class/leds/$1" + local params="$2" + local value="$3" + + [ -d "$path" ] || return 1 + + for param in $params; do + echo "$value" > "$path/$param" + done +} + +boot() { + case "$(board_name)" in + friendlyarm,nanopi-r3s|\ + friendlyarm,nanopi-r4s) + led_set "enp1s0-1::lan" "link_10 link_100 link_1000" "1" + led_set "enp1s0-1::lan" "rx tx" "0" + led_set "enp1s0-2::lan" "link_10 link_100 link_1000" "0" + led_set "enp1s0-2::lan" "rx tx" "1" + ;; + huake,guangmiao-g4c) + led_set "enp1s0-0::lan" "link_10 link_100 link_1000" "1" + led_set "enp1s0-0::lan" "rx tx" "0" + led_set "enp1s0-1::lan" "link_10 link_100 link_1000" "0" + led_set "enp1s0-1::lan" "rx tx" "1" + ;; + esac +} From eaeac309a73e5153532d33daa8fc9be7108be0bf Mon Sep 17 00:00:00 2001 From: Tianling Shen Date: Wed, 16 Apr 2025 19:25:26 +0800 Subject: [PATCH 29/49] ImmortalWrt v24.10.1: adjust config defaults Signed-off-by: Tianling Shen --- feeds.conf.default | 8 ++++---- include/version.mk | 6 +++--- package/base-files/image-config.in | 4 ++-- version | 1 + version.date | 1 + 5 files changed, 11 insertions(+), 9 deletions(-) create mode 100644 version create mode 100644 version.date diff --git a/feeds.conf.default b/feeds.conf.default index 226dc094b3..cbe63b1d13 100644 --- a/feeds.conf.default +++ b/feeds.conf.default @@ -1,4 +1,4 @@ -src-git packages https://github.com/immortalwrt/packages.git;openwrt-24.10 -src-git luci https://github.com/immortalwrt/luci.git;openwrt-24.10 -src-git routing https://github.com/openwrt/routing.git;openwrt-24.10 -src-git telephony https://github.com/openwrt/telephony.git;openwrt-24.10 +src-git packages https://github.com/immortalwrt/packages.git^91619482df935954227e1fc12444fdb306bab585 +src-git luci https://github.com/immortalwrt/luci.git^401c185da643f376e9a2d2a6970b43ed9416560c +src-git routing https://github.com/openwrt/routing.git^c9b636698881059a3c981032770968f5a98ff201 +src-git telephony https://github.com/openwrt/telephony.git^fd605af7143165a2490681ec1752f259873b9147 diff --git a/include/version.mk b/include/version.mk index 80b1c1e570..27d78a2028 100644 --- a/include/version.mk +++ b/include/version.mk @@ -23,13 +23,13 @@ PKG_CONFIG_DEPENDS += \ sanitize = $(call tolower,$(subst _,-,$(subst $(space),-,$(1)))) VERSION_NUMBER:=$(call qstrip,$(CONFIG_VERSION_NUMBER)) -VERSION_NUMBER:=$(if $(VERSION_NUMBER),$(VERSION_NUMBER),24.10-SNAPSHOT) +VERSION_NUMBER:=$(if $(VERSION_NUMBER),$(VERSION_NUMBER),24.10.1) VERSION_CODE:=$(call qstrip,$(CONFIG_VERSION_CODE)) -VERSION_CODE:=$(if $(VERSION_CODE),$(VERSION_CODE),$(REVISION)) +VERSION_CODE:=$(if $(VERSION_CODE),$(VERSION_CODE),r33048-cc720ea55a71) VERSION_REPO:=$(call qstrip,$(CONFIG_VERSION_REPO)) -VERSION_REPO:=$(if $(VERSION_REPO),$(VERSION_REPO),https://downloads.immortalwrt.org/releases/24.10-SNAPSHOT) +VERSION_REPO:=$(if $(VERSION_REPO),$(VERSION_REPO),https://downloads.immortalwrt.org/releases/24.10.1) VERSION_DIST:=$(call qstrip,$(CONFIG_VERSION_DIST)) VERSION_DIST:=$(if $(VERSION_DIST),$(VERSION_DIST),ImmortalWrt) diff --git a/package/base-files/image-config.in b/package/base-files/image-config.in index 6a85139d6e..0f5ac40094 100644 --- a/package/base-files/image-config.in +++ b/package/base-files/image-config.in @@ -190,7 +190,7 @@ if VERSIONOPT config VERSION_REPO string prompt "Release repository" - default "https://downloads.immortalwrt.org/releases/24.10-SNAPSHOT" + default "https://downloads.immortalwrt.org/releases/24.10.1" help This is the repository address embedded in the image, it defaults to the trunk snapshot repo; the url may contain the following placeholders: @@ -266,7 +266,7 @@ if VERSIONOPT config VERSION_CODE_FILENAMES bool prompt "Revision code in filenames" - default y + default n help Enable this to include the revision identifier or the configured version code into the firmware image, SDK- and Image Builder archive diff --git a/version b/version new file mode 100644 index 0000000000..0703420674 --- /dev/null +++ b/version @@ -0,0 +1 @@ +r33048-cc720ea55a71 diff --git a/version.date b/version.date new file mode 100644 index 0000000000..c0450e2de4 --- /dev/null +++ b/version.date @@ -0,0 +1 @@ +1744717122 From 2ee21f9ccd09544ba68e3d17558233490cdc835c Mon Sep 17 00:00:00 2001 From: Tianling Shen Date: Wed, 16 Apr 2025 19:25:27 +0800 Subject: [PATCH 30/49] ImmortalWrt v24.10.1: revert to branch defaults Signed-off-by: Tianling Shen --- feeds.conf.default | 8 ++++---- include/version.mk | 6 +++--- package/base-files/image-config.in | 4 ++-- version | 1 - version.date | 1 - 5 files changed, 9 insertions(+), 11 deletions(-) delete mode 100644 version delete mode 100644 version.date diff --git a/feeds.conf.default b/feeds.conf.default index cbe63b1d13..226dc094b3 100644 --- a/feeds.conf.default +++ b/feeds.conf.default @@ -1,4 +1,4 @@ -src-git packages https://github.com/immortalwrt/packages.git^91619482df935954227e1fc12444fdb306bab585 -src-git luci https://github.com/immortalwrt/luci.git^401c185da643f376e9a2d2a6970b43ed9416560c -src-git routing https://github.com/openwrt/routing.git^c9b636698881059a3c981032770968f5a98ff201 -src-git telephony https://github.com/openwrt/telephony.git^fd605af7143165a2490681ec1752f259873b9147 +src-git packages https://github.com/immortalwrt/packages.git;openwrt-24.10 +src-git luci https://github.com/immortalwrt/luci.git;openwrt-24.10 +src-git routing https://github.com/openwrt/routing.git;openwrt-24.10 +src-git telephony https://github.com/openwrt/telephony.git;openwrt-24.10 diff --git a/include/version.mk b/include/version.mk index 27d78a2028..80b1c1e570 100644 --- a/include/version.mk +++ b/include/version.mk @@ -23,13 +23,13 @@ PKG_CONFIG_DEPENDS += \ sanitize = $(call tolower,$(subst _,-,$(subst $(space),-,$(1)))) VERSION_NUMBER:=$(call qstrip,$(CONFIG_VERSION_NUMBER)) -VERSION_NUMBER:=$(if $(VERSION_NUMBER),$(VERSION_NUMBER),24.10.1) +VERSION_NUMBER:=$(if $(VERSION_NUMBER),$(VERSION_NUMBER),24.10-SNAPSHOT) VERSION_CODE:=$(call qstrip,$(CONFIG_VERSION_CODE)) -VERSION_CODE:=$(if $(VERSION_CODE),$(VERSION_CODE),r33048-cc720ea55a71) +VERSION_CODE:=$(if $(VERSION_CODE),$(VERSION_CODE),$(REVISION)) VERSION_REPO:=$(call qstrip,$(CONFIG_VERSION_REPO)) -VERSION_REPO:=$(if $(VERSION_REPO),$(VERSION_REPO),https://downloads.immortalwrt.org/releases/24.10.1) +VERSION_REPO:=$(if $(VERSION_REPO),$(VERSION_REPO),https://downloads.immortalwrt.org/releases/24.10-SNAPSHOT) VERSION_DIST:=$(call qstrip,$(CONFIG_VERSION_DIST)) VERSION_DIST:=$(if $(VERSION_DIST),$(VERSION_DIST),ImmortalWrt) diff --git a/package/base-files/image-config.in b/package/base-files/image-config.in index 0f5ac40094..6a85139d6e 100644 --- a/package/base-files/image-config.in +++ b/package/base-files/image-config.in @@ -190,7 +190,7 @@ if VERSIONOPT config VERSION_REPO string prompt "Release repository" - default "https://downloads.immortalwrt.org/releases/24.10.1" + default "https://downloads.immortalwrt.org/releases/24.10-SNAPSHOT" help This is the repository address embedded in the image, it defaults to the trunk snapshot repo; the url may contain the following placeholders: @@ -266,7 +266,7 @@ if VERSIONOPT config VERSION_CODE_FILENAMES bool prompt "Revision code in filenames" - default n + default y help Enable this to include the revision identifier or the configured version code into the firmware image, SDK- and Image Builder archive diff --git a/version b/version deleted file mode 100644 index 0703420674..0000000000 --- a/version +++ /dev/null @@ -1 +0,0 @@ -r33048-cc720ea55a71 diff --git a/version.date b/version.date deleted file mode 100644 index c0450e2de4..0000000000 --- a/version.date +++ /dev/null @@ -1 +0,0 @@ -1744717122 From 24395c3ec30d6d4e411807dc61c6e00af8a56bca Mon Sep 17 00:00:00 2001 From: Tianling Shen Date: Thu, 17 Apr 2025 17:30:01 +0800 Subject: [PATCH 31/49] ramips: add support for Huasifei WHF283 Signed-off-by: Tianling Shen (cherry picked from commit 6a921f15b8ef1b802cdbc0037b0509599178f0d8) --- package/boot/uboot-envtools/files/ramips | 1 + .../ramips/dts/mt7628an_huasifei_shf283.dts | 150 ++++++++++++++++++ target/linux/ramips/image/mt76x8.mk | 9 ++ .../mt76x8/base-files/etc/board.d/01_leds | 3 + .../mt76x8/base-files/etc/board.d/02_network | 15 +- .../lib/preinit/82_fixup_model_name | 12 ++ 6 files changed, 185 insertions(+), 5 deletions(-) create mode 100644 target/linux/ramips/dts/mt7628an_huasifei_shf283.dts create mode 100644 target/linux/ramips/mt76x8/base-files/lib/preinit/82_fixup_model_name diff --git a/package/boot/uboot-envtools/files/ramips b/package/boot/uboot-envtools/files/ramips index b6107eb011..9edf9c4cdb 100644 --- a/package/boot/uboot-envtools/files/ramips +++ b/package/boot/uboot-envtools/files/ramips @@ -30,6 +30,7 @@ alfa-network,ax1800rm|\ allnet,all0256n-4m|\ allnet,all0256n-8m|\ allnet,all5002|\ +huasifei,shf283|\ jdcloud,re-cp-02|\ yuncore,ax820) ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x10000" "0x10000" diff --git a/target/linux/ramips/dts/mt7628an_huasifei_shf283.dts b/target/linux/ramips/dts/mt7628an_huasifei_shf283.dts new file mode 100644 index 0000000000..e9dde9db71 --- /dev/null +++ b/target/linux/ramips/dts/mt7628an_huasifei_shf283.dts @@ -0,0 +1,150 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT + +#include "mt7628an.dtsi" + +#include +#include +#include + +/ { + model = "Huasifei SHF283"; + compatible = "huasifei,shf283", "mediatek,mt7628an-soc"; + + aliases { + led-boot = &led_power; + led-failsafe = &led_power; + led-running = &led_power; + led-upgrade = &led_power; + }; + + chosen { + bootargs = "console=ttyS0,115200"; + }; + + gpio-keys { + compatible = "gpio-keys"; + + button-reset { + label = "reset"; + gpios = <&gpio 38 GPIO_ACTIVE_LOW>; + linux,code = ; + }; + }; + + gpio-leds { + compatible = "gpio-leds"; + + led-0 { + color = ; + function = LED_FUNCTION_STATUS; + gpios = <&gpio 11 GPIO_ACTIVE_LOW>; + }; + + led-1 { + color = ; + function = LED_FUNCTION_WLAN; + gpios = <&gpio 35 GPIO_ACTIVE_LOW>; + linux,default-trigger = "phy0tpt"; + }; + + led_power: led-2 { + color = ; + function = LED_FUNCTION_POWER; + gpios = <&gpio 37 GPIO_ACTIVE_LOW>; + }; + + led-3 { + color = ; + function = LED_FUNCTION_WAN; + gpios = <&gpio 43 GPIO_ACTIVE_LOW>; + }; + }; + + gpio-export { + compatible = "gpio-export"; + + modem-reset { + gpio-export,name = "modem_reset"; + gpio-export,output = <0>; + gpios = <&gpio 2 GPIO_ACTIVE_HIGH>; + }; + }; +}; + +ðernet { + nvmem-cells = <&macaddr_factory_28 0>; + nvmem-cell-names = "mac-address"; +}; + +&pcie { + status = "okay"; +}; + +&spi0 { + status = "okay"; + + flash@0 { + compatible = "jedec,spi-nor"; + reg = <0>; + spi-max-frequency = <12000000>; + + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + partition@0 { + label = "bootloader"; + reg = <0x0 0x30000>; + read-only; + }; + + partition@30000 { + label = "config"; + reg = <0x30000 0x10000>; + read-only; + }; + + partition@40000 { + label = "factory"; + reg = <0x40000 0x10000>; + read-only; + + nvmem-layout { + eeprom_factory_0: eeprom@0 { + reg = <0x0 0x400>; + }; + + macaddr_factory_28: macaddr@28 { + compatible = "mac-base"; + reg = <0x28 0x6>; + #nvmem-cell-cells = <1>; + }; + }; + }; + + partition@50000 { + compatible = "denx,uimage"; + label = "firmware"; + reg = <0x50000 0xfb0000>; + }; + }; + }; +}; + +&state_default { + gpio { + groups = "i2c"; + function = "gpio"; + }; +}; + +&uart1 { + status = "okay"; +}; + +&wmac { + nvmem-cells = <&eeprom_factory_0>; + nvmem-cell-names = "eeprom"; + status = "okay"; +}; diff --git a/target/linux/ramips/image/mt76x8.mk b/target/linux/ramips/image/mt76x8.mk index 2af96f3956..ee1cb23d1e 100644 --- a/target/linux/ramips/image/mt76x8.mk +++ b/target/linux/ramips/image/mt76x8.mk @@ -322,6 +322,15 @@ define Device/hiwifi_hc5861b endef TARGET_DEVICES += hiwifi_hc5861b +define Device/huasifei_shf283 + IMAGE_SIZE := 16064k + DEVICE_VENDOR := Huasifei + DEVICE_MODEL := SHF283 + DEVICE_PACKAGES := kmod-usb2 kmod-usb-ohci kmod-usb-net-cdc-mbim \ + kmod-usb-net-qmi-wwan kmod-usb-net-rndis kmod-usb-serial-option uqmi +endef +TARGET_DEVICES += huasifei_shf283 + define Device/iptime_a3 IMAGE_SIZE := 7936k UIMAGE_NAME := a3 diff --git a/target/linux/ramips/mt76x8/base-files/etc/board.d/01_leds b/target/linux/ramips/mt76x8/base-files/etc/board.d/01_leds index 00e5086bb3..ae8c9e33a9 100644 --- a/target/linux/ramips/mt76x8/base-files/etc/board.d/01_leds +++ b/target/linux/ramips/mt76x8/base-files/etc/board.d/01_leds @@ -58,6 +58,9 @@ hiwifi,hc5661a|\ hiwifi,hc5761a) ucidef_set_led_switch "internet" "internet" "blue:internet" "switch0" "0x10" ;; +huasifei,shf283) + ucidef_set_led_switch "wan" "WAN" "green:wan" "switch0" "0x01" + ;; keenetic,kn-1613) ucidef_set_led_switch "internet" "internet" "green:internet" "switch0" "0x01" ;; diff --git a/target/linux/ramips/mt76x8/base-files/etc/board.d/02_network b/target/linux/ramips/mt76x8/base-files/etc/board.d/02_network index 56266e473c..86c91445da 100644 --- a/target/linux/ramips/mt76x8/base-files/etc/board.d/02_network +++ b/target/linux/ramips/mt76x8/base-files/etc/board.d/02_network @@ -115,6 +115,10 @@ ramips_setup_interfaces() ucidef_add_switch "switch0" \ "0:lan" "1:lan" "4:wan" "6@eth0" ;; + huasifei,shf283) + ucidef_add_switch "switch0" \ + "2:lan" "3:lan" "4:lan" "1:wan" "6@eth0" + ;; iptime,a3|\ totolink,a3) ucidef_add_switch "switch0" \ @@ -268,6 +272,12 @@ ramips_setup_macs() [ -n "$lan_mac" ] || lan_mac=$(cat /sys/class/net/eth0/address) wan_mac=$(macaddr_add "$lan_mac" 1) ;; + huasifei,shf283|\ + rakwireless,rak633|\ + unielec,u7628-01-16m|\ + wavlink,wl-wn575a3) + wan_mac=$(macaddr_add "$(mtd_get_mac_binary factory 0x28)" 1) + ;; iptime,a3|\ iptime,a604m|\ totolink,a3) @@ -301,11 +311,6 @@ ramips_setup_macs() wavlink,wl-wn576a2) label_mac=$(mtd_get_mac_binary factory 0x4) ;; - rakwireless,rak633|\ - unielec,u7628-01-16m|\ - wavlink,wl-wn575a3) - wan_mac=$(macaddr_add "$(mtd_get_mac_binary factory 0x28)" 1) - ;; tplink,archer-c20-v4|\ tplink,archer-c50-v3|\ tplink,tl-mr3420-v5|\ diff --git a/target/linux/ramips/mt76x8/base-files/lib/preinit/82_fixup_model_name b/target/linux/ramips/mt76x8/base-files/lib/preinit/82_fixup_model_name new file mode 100644 index 0000000000..01489aee1b --- /dev/null +++ b/target/linux/ramips/mt76x8/base-files/lib/preinit/82_fixup_model_name @@ -0,0 +1,12 @@ +. /lib/functions.sh + +preinit_fixup_model_name() { + case "$(board_name)" in + huasifei,shf283) + local model_name="$(fw_printenv -n model_name 2>/dev/null)" + [ -n "$model_name" ] && echo "$model_name" > "/tmp/sysinfo/model" + ;; + esac +} + +boot_hook_add preinit_main preinit_fixup_model_name From f0a9dbba8abe95fcbd63acee6f0dc5f3b7c57d53 Mon Sep 17 00:00:00 2001 From: fujr Date: Thu, 17 Apr 2025 22:56:09 +0800 Subject: [PATCH 32/49] rockchip: fix cyber3588 pwm fan Signed-off-by: fujr [refine cooling-maps, add kmod-hwmon-pwmfan to dependencies] Signed-off-by: Tianling Shen (cherry picked from commit 924c10db758afd7e17ab2dc08a56526821fdb037) --- .../dts/rockchip/rk3588-cyber3588-aib.dts | 75 ++++++++++++++++++- target/linux/rockchip/image/armv8.mk | 3 +- 2 files changed, 73 insertions(+), 5 deletions(-) diff --git a/target/linux/rockchip/files/arch/arm64/boot/dts/rockchip/rk3588-cyber3588-aib.dts b/target/linux/rockchip/files/arch/arm64/boot/dts/rockchip/rk3588-cyber3588-aib.dts index 3ab8639904..b1fb0b2c0d 100644 --- a/target/linux/rockchip/files/arch/arm64/boot/dts/rockchip/rk3588-cyber3588-aib.dts +++ b/target/linux/rockchip/files/arch/arm64/boot/dts/rockchip/rk3588-cyber3588-aib.dts @@ -11,6 +11,7 @@ #include #include #include +#include #include #include "rk3588.dtsi" @@ -58,9 +59,11 @@ fan: pwm-fan { compatible = "pwm-fan"; - cooling-levels = <0 50 80 120 160 220>; - fan-supply = <&vcc5v0_sys>; - pwms = <&pwm1 0 10000 0>; + cooling-levels = <0 72 117 162 229 255>; + fan-supply = <&vcc12v_dcin>; + interrupt-parent = <&gpio1>; + interrupts = ; + pwms = <&pwm1 0 10000 PWM_POLARITY_INVERTED>; #cooling-cells = <2>; }; @@ -469,6 +472,70 @@ }; }; +&package_thermal { + polling-delay = <1000>; + polling-delay-passive = <2000>; + + trips { + cpu_trip_active_cool: cpu-trip-active-cool { + temperature = <45000>; + hysteresis = <2000>; + type = "passive"; + }; + + cpu_trip_active_low: cpu-trip-active-low { + temperature = <55000>; + hysteresis = <2000>; + type = "active"; + }; + + cpu_trip_active_med: cpu-trip-active-med { + temperature = <65000>; + hysteresis = <2000>; + type = "active"; + }; + + cpu_trip_active_high: cpu-trip-active-high { + temperature = <80000>; + hysteresis = <2000>; + type = "active"; + }; + + cpu_trip_active_hot: cpu-trip-active-hot { + temperature = <90000>; + hysteresis = <2000>; + type = "hot"; + }; + }; + + cooling-maps { + cpu-active-cool { + cooling-device = <&fan THERMAL_NO_LIMIT 1>; + trip = <&cpu_trip_active_cool>; + }; + + cpu-active-low { + cooling-device = <&fan 1 2>; + trip = <&cpu_trip_active_low>; + }; + + cpu-active-med { + cooling-device = <&fan 2 3>; + trip = <&cpu_trip_active_med>; + }; + + cpu-active-high { + cooling-device = <&fan 3 4>; + trip = <&cpu_trip_active_high>; + }; + + cpu-active-hot { + cooling-device = <&fan 4 THERMAL_NO_LIMIT>; + trip = <&cpu_trip_active_hot>; + }; + }; +}; + /* M.2 M-Key */ &pcie2x1l0 { max-link-speed = <3>; @@ -598,7 +665,7 @@ }; &pwm1 { - pinctrl-names = "active"; + pinctrl-names = "default"; pinctrl-0 = <&pwm1m1_pins>; status = "okay"; }; diff --git a/target/linux/rockchip/image/armv8.mk b/target/linux/rockchip/image/armv8.mk index 0559064ab1..025788bdce 100644 --- a/target/linux/rockchip/image/armv8.mk +++ b/target/linux/rockchip/image/armv8.mk @@ -50,7 +50,8 @@ define Device/cyber_cyber3588-aib SOC := rk3588 BOOT_FLOW := pine64-img DEVICE_PACKAGES := kmod-ata-ahci-dwc kmod-r8125 kmod-mt7921e wpad-openssl \ - kmod-usb-net-cdc-mbim kmod-usb-net-qmi-wwan kmod-usb-serial-option uqmi + kmod-hwmon-pwmfan kmod-usb-net-cdc-mbim kmod-usb-net-qmi-wwan \ + kmod-usb-serial-option uqmi endef TARGET_DEVICES += cyber_cyber3588-aib From 4ee8c2dd1be2c1cbabe324c237e9da7c418c7976 Mon Sep 17 00:00:00 2001 From: Mieczyslaw Nalewaj Date: Sat, 15 Mar 2025 12:14:12 +0100 Subject: [PATCH 33/49] generic: rename backport patches to names containing version Rename 770-net-introduce-napi_is_scheduled-helper.patch to 770-v6.7-net-introduce-napi_is_scheduled-helper.patch because it is used since kernel 6.7 (https://lore.kernel.org/lkml/20231028011741.2400327-1-kuba@kernel.org/). Link: https://web.git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=linux-6.7.y&id=7f3eb2174512fe6c9c0f062e96eccb0d3cc6d5cd Rename 751-01-STABLE-net-ethernet-mediatek-split-tx-and-rx-fields-in-mtk_.patch to 751-01-v6.8-net-ethernet-mediatek-split-tx-and-rx-fields-in-mtk_.patch because it is used since kernel 6.8.12 (https://lore.kernel.org/lkml/2024053036-matron-confess-13e0@gregkh/). Link: https://web.git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=linux-6.8.y&id=b411384df5814fe6fd861d4869607577bcec73a1 Rename 751-02-STABLE-net-ethernet-mediatek-use-QDMA-instead-of-ADMAv2-on-.patch to 751-02-v6.8-net-ethernet-mediatek-use-QDMA-instead-of-ADMAv2-on-.patch because it is used since kernel 6.8.12 (https://lore.kernel.org/lkml/2024053036-matron-confess-13e0@gregkh/). Link: https://web.git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=linux-6.8.y&id=0849f56b5146b70f2da328b1d178d0a3c53d6846 Signed-off-by: Mieczyslaw Nalewaj Link: https://github.com/openwrt/openwrt/pull/18253 (cherry picked from commit 0991d2f06d09f0aa5788e099e3cec15c9043bcb5) Link: https://github.com/openwrt/openwrt/pull/18428 Signed-off-by: Hauke Mehrtens --- ....8-net-ethernet-mediatek-split-tx-and-rx-fields-in-mtk_.patch} | 0 ....8-net-ethernet-mediatek-use-QDMA-instead-of-ADMAv2-on-.patch} | 0 ...atch => 770-v6.7-net-introduce-napi_is_scheduled-helper.patch} | 0 3 files changed, 0 insertions(+), 0 deletions(-) rename target/linux/generic/backport-6.6/{751-01-STABLE-net-ethernet-mediatek-split-tx-and-rx-fields-in-mtk_.patch => 751-01-v6.8-net-ethernet-mediatek-split-tx-and-rx-fields-in-mtk_.patch} (100%) rename target/linux/generic/backport-6.6/{751-02-STABLE-net-ethernet-mediatek-use-QDMA-instead-of-ADMAv2-on-.patch => 751-02-v6.8-net-ethernet-mediatek-use-QDMA-instead-of-ADMAv2-on-.patch} (100%) rename target/linux/generic/backport-6.6/{770-net-introduce-napi_is_scheduled-helper.patch => 770-v6.7-net-introduce-napi_is_scheduled-helper.patch} (100%) diff --git a/target/linux/generic/backport-6.6/751-01-STABLE-net-ethernet-mediatek-split-tx-and-rx-fields-in-mtk_.patch b/target/linux/generic/backport-6.6/751-01-v6.8-net-ethernet-mediatek-split-tx-and-rx-fields-in-mtk_.patch similarity index 100% rename from target/linux/generic/backport-6.6/751-01-STABLE-net-ethernet-mediatek-split-tx-and-rx-fields-in-mtk_.patch rename to target/linux/generic/backport-6.6/751-01-v6.8-net-ethernet-mediatek-split-tx-and-rx-fields-in-mtk_.patch diff --git a/target/linux/generic/backport-6.6/751-02-STABLE-net-ethernet-mediatek-use-QDMA-instead-of-ADMAv2-on-.patch b/target/linux/generic/backport-6.6/751-02-v6.8-net-ethernet-mediatek-use-QDMA-instead-of-ADMAv2-on-.patch similarity index 100% rename from target/linux/generic/backport-6.6/751-02-STABLE-net-ethernet-mediatek-use-QDMA-instead-of-ADMAv2-on-.patch rename to target/linux/generic/backport-6.6/751-02-v6.8-net-ethernet-mediatek-use-QDMA-instead-of-ADMAv2-on-.patch diff --git a/target/linux/generic/backport-6.6/770-net-introduce-napi_is_scheduled-helper.patch b/target/linux/generic/backport-6.6/770-v6.7-net-introduce-napi_is_scheduled-helper.patch similarity index 100% rename from target/linux/generic/backport-6.6/770-net-introduce-napi_is_scheduled-helper.patch rename to target/linux/generic/backport-6.6/770-v6.7-net-introduce-napi_is_scheduled-helper.patch From 687d713e799955491da6efa6dc1915fd4a3be903 Mon Sep 17 00:00:00 2001 From: Mieczyslaw Nalewaj Date: Sun, 16 Mar 2025 17:30:37 +0100 Subject: [PATCH 34/49] generic: rename backport patch 752-03 to name with correct version Rename 752-03-v6.6-net-ethernet-mtk_eth_soc-rely-on-mtk_pse_port-defini.patch to 752-03-v6.7-net-ethernet-mtk_eth_soc-rely-on-mtk_pse_port-defini.patch because it is used since kernel 6.7 (https://lore.kernel.org/lkml/20231028011741.2400327-1-kuba@kernel.org/). Link: https://web.git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=linux-6.7.y&id=5c33c09c89789ea45d2aac2471a28c9f90b04c95 Signed-off-by: Mieczyslaw Nalewaj Link: https://github.com/openwrt/openwrt/pull/18253 (cherry picked from commit a81099bca25fc6a6476d55f0ca8fa1d3f5e458e4) Link: https://github.com/openwrt/openwrt/pull/18428 Signed-off-by: Hauke Mehrtens --- ....7-net-ethernet-mtk_eth_soc-rely-on-mtk_pse_port-defini.patch} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename target/linux/generic/backport-6.6/{752-03-v6.6-net-ethernet-mtk_eth_soc-rely-on-mtk_pse_port-defini.patch => 752-03-v6.7-net-ethernet-mtk_eth_soc-rely-on-mtk_pse_port-defini.patch} (100%) diff --git a/target/linux/generic/backport-6.6/752-03-v6.6-net-ethernet-mtk_eth_soc-rely-on-mtk_pse_port-defini.patch b/target/linux/generic/backport-6.6/752-03-v6.7-net-ethernet-mtk_eth_soc-rely-on-mtk_pse_port-defini.patch similarity index 100% rename from target/linux/generic/backport-6.6/752-03-v6.6-net-ethernet-mtk_eth_soc-rely-on-mtk_pse_port-defini.patch rename to target/linux/generic/backport-6.6/752-03-v6.7-net-ethernet-mtk_eth_soc-rely-on-mtk_pse_port-defini.patch From c5abbe71d9d236c366e05e748c4713c82d87f3c5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=81lvaro=20Fern=C3=A1ndez=20Rojas?= Date: Tue, 22 Apr 2025 12:54:16 +0200 Subject: [PATCH 35/49] generic: backport pmdomain dummy release patch MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes the following warning trace on bcm27xx devices when bcm2835-power is deferred: [ 0.216800] ------------[ cut here ]------------ [ 0.216807] Device 'grafx' does not have a release() function, it is broken and must be fixed. See Documentation/core-api/kobject.rst. [ 0.216863] WARNING: CPU: 0 PID: 1 at drivers/base/core.c:2516 device_release+0x80/0x90 [ 0.216887] Modules linked in: [ 0.216896] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 6.6.85 #0 [ 0.216905] Hardware name: Raspberry Pi 4 Model B Rev 1.1 (DT) [ 0.216911] pstate: 60400005 (nZCv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--) [ 0.216919] pc : device_release+0x80/0x90 [ 0.216928] lr : device_release+0x80/0x90 [ 0.216936] sp : ffffffc080ccb6d0 [ 0.216940] x29: ffffffc080ccb6d0 x28: 0000000000000000 x27: ffffff8040d49810 [ 0.216953] x26: ffffff8040c904b8 x25: ffffff8040c904a0 x24: ffffffc0808a7f08 [ 0.216964] x23: ffffffc080a1a6d8 x22: 0000000000000000 x21: ffffffc080a1afe0 [ 0.216976] x20: 0000000000000000 x19: ffffff8040c900b8 x18: 000000000000009f [ 0.216987] x17: 206e656b6f726220 x16: 7369207469202c6e x15: ffffffc080b4ee88 [ 0.216998] x14: 00000000000001dd x13: 000000000000009f x12: 00000000ffffffea [ 0.217009] x11: 00000000ffffefff x10: ffffffc080ba6e88 x9 : ffffffc080b4ee30 [ 0.217020] x8 : 0000000000017fe8 x7 : c0000000ffffefff x6 : 0000000000057fa8 [ 0.217031] x5 : 0000000000000fff x4 : 0000000000000000 x3 : ffffffc080ccb4d0 [ 0.217042] x2 : ffffffc080b4edc8 x1 : ffffffc080b4edc8 x0 : 000000000000007a [ 0.217053] Call trace: [ 0.217058] device_release+0x80/0x90 [ 0.217067] kobject_put+0xac/0x100 [ 0.217078] put_device+0x14/0x24 [ 0.217086] genpd_remove+0x16c/0x244 [ 0.217093] pm_genpd_remove+0x2c/0x50 [ 0.217099] bcm2835_power_probe+0x1f8/0x2b8 [ 0.217107] platform_probe+0x68/0xc4 [ 0.217118] really_probe+0x148/0x2b0 [ 0.217125] __driver_probe_device+0x78/0x128 [ 0.217131] driver_probe_device+0x40/0xdc [ 0.217138] __device_attach_driver+0xb8/0xf8 [ 0.217145] bus_for_each_drv+0x70/0xb8 [ 0.217151] __device_attach+0xa0/0x184 [ 0.217158] device_initial_probe+0x14/0x20 [ 0.217165] bus_probe_device+0xac/0xb0 [ 0.217171] device_add+0x5a8/0x760 [ 0.217177] platform_device_add+0x184/0x240 [ 0.217184] mfd_add_device+0x3e8/0x4c0 [ 0.217195] devm_mfd_add_devices+0xa0/0x118 [ 0.217202] bcm2835_pm_probe+0x144/0x1d8 [ 0.217210] platform_probe+0x68/0xc4 [ 0.217217] really_probe+0x148/0x2b0 [ 0.217224] __driver_probe_device+0x78/0x128 [ 0.217230] driver_probe_device+0x40/0xdc [ 0.217237] __driver_attach+0x90/0x160 [ 0.217243] bus_for_each_dev+0x64/0xa4 [ 0.217249] driver_attach+0x24/0x30 [ 0.217256] bus_add_driver+0xe4/0x208 [ 0.217262] driver_register+0x5c/0x124 [ 0.217269] __platform_driver_register+0x28/0x34 [ 0.217276] bcm2835_pm_driver_init+0x1c/0x28 [ 0.217286] do_one_initcall+0x6c/0x1fc [ 0.217294] kernel_init_freeable+0x208/0x2e4 [ 0.217306] kernel_init+0x28/0x1e4 [ 0.217313] ret_from_fork+0x10/0x20 [ 0.217320] ---[ end trace 0000000000000000 ]--- This issue was introduced in v6.6.69 with the following backport: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=36a6e8aeae4a41767bb59f56b100c8cc9ffae2cb The upstream patch has been adapted to v6.6: https://github.com/torvalds/linux/commit/f64f610ec6ab59dd0391b03842cea3a4cd8ee34f More info: https://github.com/raspberrypi/linux/issues/6777 Signed-off-by: Álvaro Fernández Rojas (cherry picked from commit f65c44f67f5d435cb552310f2d455fbfdac935c2) --- ...d-dummy-release-function-to-genpd-de.patch | 46 +++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 target/linux/generic/backport-6.6/910-v6.13-pmdomain-core-add-dummy-release-function-to-genpd-de.patch diff --git a/target/linux/generic/backport-6.6/910-v6.13-pmdomain-core-add-dummy-release-function-to-genpd-de.patch b/target/linux/generic/backport-6.6/910-v6.13-pmdomain-core-add-dummy-release-function-to-genpd-de.patch new file mode 100644 index 0000000000..b392bd0d0c --- /dev/null +++ b/target/linux/generic/backport-6.6/910-v6.13-pmdomain-core-add-dummy-release-function-to-genpd-de.patch @@ -0,0 +1,46 @@ +From f64f610ec6ab59dd0391b03842cea3a4cd8ee34f Mon Sep 17 00:00:00 2001 +From: Lucas Stach +Date: Wed, 18 Dec 2024 19:44:33 +0100 +Subject: [PATCH] pmdomain: core: add dummy release function to genpd device + +The genpd device, which is really only used as a handle to lookup +OPP, but not even registered to the device core otherwise and thus +lifetime linked to the genpd struct it is contained in, is missing +a release function. After b8f7bbd1f4ec ("pmdomain: core: Add +missing put_device()") the device will be cleaned up going through +the driver core device_release() function, which will warn when no +release callback is present for the device. Add a dummy release +function to shut up the warning. + +Signed-off-by: Lucas Stach +Tested-by: Luca Ceresoli +Fixes: b8f7bbd1f4ec ("pmdomain: core: Add missing put_device()") +Cc: stable@vger.kernel.org +Message-ID: <20241218184433.1930532-1-l.stach@pengutronix.de> +Signed-off-by: Ulf Hansson +--- + drivers/base/power/domain.c | 6 ++++++ + 1 file changed, 6 insertions(+) + +--- a/drivers/base/power/domain.c ++++ b/drivers/base/power/domain.c +@@ -2040,6 +2040,11 @@ static void genpd_lock_init(struct gener + } + } + ++static void genpd_provider_release(struct device *dev) ++{ ++ /* nothing to be done here */ ++} ++ + /** + * pm_genpd_init - Initialize a generic I/O PM domain object. + * @genpd: PM domain object to initialize. +@@ -2106,6 +2111,7 @@ int pm_genpd_init(struct generic_pm_doma + return ret; + + device_initialize(&genpd->dev); ++ genpd->dev.release = genpd_provider_release; + dev_set_name(&genpd->dev, "%s", genpd->name); + + mutex_lock(&gpd_list_lock); From 5663f8e1669a6fb73092ae9f020ebd996bb405a7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=81lvaro=20Fern=C3=A1ndez=20Rojas?= Date: Tue, 22 Apr 2025 14:36:49 +0200 Subject: [PATCH 36/49] generic: 6.6: backport upstream v6.15 r8169 patches MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit b48688ea3c9ac r8169: disable RTL8126 ZRX-DC timeout 3d9b8ac534126 r8169: enable RTL8168H/RTL8168EP/RTL8168FP ASPM support 473367a5ffe16 r8169: increase max jumbo packet size on RTL8125/RTL8126 853e80369cfce r8169: add PHY c45 ops for MDIO_MMD_VENDOR2 registers d30460f42675f r8169: add support for Intel Killer E5000 faac69a4ae5ab r8169: don't scan PHY addresses > 0 135c3c86a7cef r8169: make Kconfig option for LED support user-visible Signed-off-by: Álvaro Fernández Rojas (cherry picked from commit 36623119b3e6532a3d051a37e93b2fbaa3dd1f6d) --- ...ig-option-for-LED-support-user-visib.patch | 28 ++++++++ ....15-r8169-don-t-scan-PHY-addresses-0.patch | 26 +++++++ ...9-add-support-for-Intel-Killer-E5000.patch | 25 +++++++ ...5-ops-for-MDIO_MMD_VENDOR2-registers.patch | 67 +++++++++++++++++++ ...ax-jumbo-packet-size-on-RTL8125-RTL8.patch | 40 +++++++++++ ...8168H-RTL8168EP-RTL8168FP-ASPM-suppo.patch | 27 ++++++++ ...r8169-disable-RTL8126-ZRX-DC-timeout.patch | 60 +++++++++++++++++ 7 files changed, 273 insertions(+) create mode 100644 target/linux/generic/backport-6.6/780-50-v6.15-r8169-make-Kconfig-option-for-LED-support-user-visib.patch create mode 100644 target/linux/generic/backport-6.6/780-51-v6.15-r8169-don-t-scan-PHY-addresses-0.patch create mode 100644 target/linux/generic/backport-6.6/780-52-v6.15-r8169-add-support-for-Intel-Killer-E5000.patch create mode 100644 target/linux/generic/backport-6.6/780-53-v6.15-r8169-add-PHY-c45-ops-for-MDIO_MMD_VENDOR2-registers.patch create mode 100644 target/linux/generic/backport-6.6/780-54-v6.15-r8169-increase-max-jumbo-packet-size-on-RTL8125-RTL8.patch create mode 100644 target/linux/generic/backport-6.6/780-55-v6.15-r8169-enable-RTL8168H-RTL8168EP-RTL8168FP-ASPM-suppo.patch create mode 100644 target/linux/generic/backport-6.6/780-56-v6.15-r8169-disable-RTL8126-ZRX-DC-timeout.patch diff --git a/target/linux/generic/backport-6.6/780-50-v6.15-r8169-make-Kconfig-option-for-LED-support-user-visib.patch b/target/linux/generic/backport-6.6/780-50-v6.15-r8169-make-Kconfig-option-for-LED-support-user-visib.patch new file mode 100644 index 0000000000..62acd26963 --- /dev/null +++ b/target/linux/generic/backport-6.6/780-50-v6.15-r8169-make-Kconfig-option-for-LED-support-user-visib.patch @@ -0,0 +1,28 @@ +From 135c3c86a7cef4ba3d368da15b16c275b74582d3 Mon Sep 17 00:00:00 2001 +From: Heiner Kallweit +Date: Mon, 3 Feb 2025 21:35:24 +0100 +Subject: [PATCH] r8169: make Kconfig option for LED support user-visible + +Make config option R8169_LEDS user-visible, so that users can remove +support if not needed. + +Signed-off-by: Heiner Kallweit +Reviewed-by: Simon Horman +Link: https://patch.msgid.link/d29f0cdb-32bf-435f-b59d-dc96bca1e3ab@gmail.com +Signed-off-by: Jakub Kicinski +--- + drivers/net/ethernet/realtek/Kconfig | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +--- a/drivers/net/ethernet/realtek/Kconfig ++++ b/drivers/net/ethernet/realtek/Kconfig +@@ -114,7 +114,8 @@ config R8169 + will be called r8169. This is recommended. + + config R8169_LEDS +- def_bool R8169 && LEDS_TRIGGER_NETDEV ++ bool "Support for controlling the NIC LEDs" ++ depends on R8169 && LEDS_TRIGGER_NETDEV + depends on !(R8169=y && LEDS_CLASS=m) + help + Optional support for controlling the NIC LED's with the netdev diff --git a/target/linux/generic/backport-6.6/780-51-v6.15-r8169-don-t-scan-PHY-addresses-0.patch b/target/linux/generic/backport-6.6/780-51-v6.15-r8169-don-t-scan-PHY-addresses-0.patch new file mode 100644 index 0000000000..735f3ff4f9 --- /dev/null +++ b/target/linux/generic/backport-6.6/780-51-v6.15-r8169-don-t-scan-PHY-addresses-0.patch @@ -0,0 +1,26 @@ +From faac69a4ae5abb49e62c79c66b51bb905c9aa5ec Mon Sep 17 00:00:00 2001 +From: Heiner Kallweit +Date: Tue, 4 Feb 2025 07:58:17 +0100 +Subject: [PATCH] r8169: don't scan PHY addresses > 0 + +The PHY address is a dummy, because r8169 PHY access registers +don't support a PHY address. Therefore scan address 0 only. + +Signed-off-by: Heiner Kallweit +Reviewed-by: Andrew Lunn +Link: https://patch.msgid.link/830637dd-4016-4a68-92b3-618fcac6589d@gmail.com +Signed-off-by: Jakub Kicinski +--- + drivers/net/ethernet/realtek/r8169_main.c | 1 + + 1 file changed, 1 insertion(+) + +--- a/drivers/net/ethernet/realtek/r8169_main.c ++++ b/drivers/net/ethernet/realtek/r8169_main.c +@@ -5230,6 +5230,7 @@ static int r8169_mdio_register(struct rt + new_bus->priv = tp; + new_bus->parent = &pdev->dev; + new_bus->irq[0] = PHY_MAC_INTERRUPT; ++ new_bus->phy_mask = GENMASK(31, 1); + snprintf(new_bus->id, MII_BUS_ID_SIZE, "r8169-%x-%x", + pci_domain_nr(pdev->bus), pci_dev_id(pdev)); + diff --git a/target/linux/generic/backport-6.6/780-52-v6.15-r8169-add-support-for-Intel-Killer-E5000.patch b/target/linux/generic/backport-6.6/780-52-v6.15-r8169-add-support-for-Intel-Killer-E5000.patch new file mode 100644 index 0000000000..d741d193ab --- /dev/null +++ b/target/linux/generic/backport-6.6/780-52-v6.15-r8169-add-support-for-Intel-Killer-E5000.patch @@ -0,0 +1,25 @@ +From d30460f42675fef5cd4b44ffbc49b545524555e3 Mon Sep 17 00:00:00 2001 +From: Heiner Kallweit +Date: Wed, 12 Feb 2025 08:03:56 +0100 +Subject: [PATCH] r8169: add support for Intel Killer E5000 + +This adds support for the Intel Killer E5000 which seems to be a +rebranded RTL8126. Copied from r8126 vendor driver. + +Signed-off-by: Heiner Kallweit +Link: https://patch.msgid.link/9db73e9b-e2e8-45de-97a5-041c5f71d774@gmail.com +Signed-off-by: Jakub Kicinski +--- + drivers/net/ethernet/realtek/r8169_main.c | 1 + + 1 file changed, 1 insertion(+) + +--- a/drivers/net/ethernet/realtek/r8169_main.c ++++ b/drivers/net/ethernet/realtek/r8169_main.c +@@ -169,6 +169,7 @@ static const struct pci_device_id rtl816 + { PCI_VDEVICE(REALTEK, 0x8125) }, + { PCI_VDEVICE(REALTEK, 0x8126) }, + { PCI_VDEVICE(REALTEK, 0x3000) }, ++ { PCI_VDEVICE(REALTEK, 0x5000) }, + {} + }; + diff --git a/target/linux/generic/backport-6.6/780-53-v6.15-r8169-add-PHY-c45-ops-for-MDIO_MMD_VENDOR2-registers.patch b/target/linux/generic/backport-6.6/780-53-v6.15-r8169-add-PHY-c45-ops-for-MDIO_MMD_VENDOR2-registers.patch new file mode 100644 index 0000000000..010a8abc02 --- /dev/null +++ b/target/linux/generic/backport-6.6/780-53-v6.15-r8169-add-PHY-c45-ops-for-MDIO_MMD_VENDOR2-registers.patch @@ -0,0 +1,67 @@ +From 853e80369cfceb2331bf34f251ba11c6602cc67f Mon Sep 17 00:00:00 2001 +From: Heiner Kallweit +Date: Thu, 13 Feb 2025 20:15:42 +0100 +Subject: [PATCH] r8169: add PHY c45 ops for MDIO_MMD_VENDOR2 registers + +The integrated PHYs on chip versions from RTL8168g allow to address +MDIO_MMD_VEND2 registers. All c22 standard registers are mapped to +MDIO_MMD_VEND2 registers. So far the paging mechanism is used to +address PHY registers. Add support for c45 ops to address MDIO_MMD_VEND2 +registers directly, w/o the paging. + +Signed-off-by: Heiner Kallweit +Reviewed-by: Andrew Lunn +Link: https://patch.msgid.link/d6f97eaa-0f13-468f-89cb-75a41087bc4a@gmail.com +Signed-off-by: Jakub Kicinski +--- + drivers/net/ethernet/realtek/r8169_main.c | 32 +++++++++++++++++++++++ + 1 file changed, 32 insertions(+) + +--- a/drivers/net/ethernet/realtek/r8169_main.c ++++ b/drivers/net/ethernet/realtek/r8169_main.c +@@ -5208,6 +5208,33 @@ static int r8169_mdio_write_reg(struct m + return 0; + } + ++static int r8169_mdio_read_reg_c45(struct mii_bus *mii_bus, int addr, ++ int devnum, int regnum) ++{ ++ struct rtl8169_private *tp = mii_bus->priv; ++ ++ if (addr > 0) ++ return -ENODEV; ++ ++ if (devnum == MDIO_MMD_VEND2 && regnum > MDIO_STAT2) ++ return r8168_phy_ocp_read(tp, regnum); ++ ++ return 0; ++} ++ ++static int r8169_mdio_write_reg_c45(struct mii_bus *mii_bus, int addr, ++ int devnum, int regnum, u16 val) ++{ ++ struct rtl8169_private *tp = mii_bus->priv; ++ ++ if (addr > 0 || devnum != MDIO_MMD_VEND2 || regnum <= MDIO_STAT2) ++ return -ENODEV; ++ ++ r8168_phy_ocp_write(tp, regnum, val); ++ ++ return 0; ++} ++ + static int r8169_mdio_register(struct rtl8169_private *tp) + { + struct pci_dev *pdev = tp->pci_dev; +@@ -5238,6 +5265,11 @@ static int r8169_mdio_register(struct rt + new_bus->read = r8169_mdio_read_reg; + new_bus->write = r8169_mdio_write_reg; + ++ if (tp->mac_version >= RTL_GIGA_MAC_VER_40) { ++ new_bus->read_c45 = r8169_mdio_read_reg_c45; ++ new_bus->write_c45 = r8169_mdio_write_reg_c45; ++ } ++ + ret = devm_mdiobus_register(&pdev->dev, new_bus); + if (ret) + return ret; diff --git a/target/linux/generic/backport-6.6/780-54-v6.15-r8169-increase-max-jumbo-packet-size-on-RTL8125-RTL8.patch b/target/linux/generic/backport-6.6/780-54-v6.15-r8169-increase-max-jumbo-packet-size-on-RTL8125-RTL8.patch new file mode 100644 index 0000000000..f8d7e8008a --- /dev/null +++ b/target/linux/generic/backport-6.6/780-54-v6.15-r8169-increase-max-jumbo-packet-size-on-RTL8125-RTL8.patch @@ -0,0 +1,40 @@ +From 473367a5ffe1607a61be481e2feda684eb5faea9 Mon Sep 17 00:00:00 2001 +From: Heiner Kallweit +Date: Fri, 7 Mar 2025 08:29:47 +0100 +Subject: [PATCH] r8169: increase max jumbo packet size on RTL8125/RTL8126 + +Realtek confirmed that all RTL8125/RTL8126 chip versions support up to +16K jumbo packets. Reflect this in the driver. + +Tested by Rui on RTL8125B with 12K jumbo packets. + +Suggested-by: Rui Salvaterra +Tested-by: Rui Salvaterra +Signed-off-by: Heiner Kallweit +Reviewed-by: Simon Horman +Link: https://patch.msgid.link/396762ad-cc65-4e60-b01e-8847db89e98b@gmail.com +Signed-off-by: Jakub Kicinski +--- + drivers/net/ethernet/realtek/r8169_main.c | 4 ++++ + 1 file changed, 4 insertions(+) + +--- a/drivers/net/ethernet/realtek/r8169_main.c ++++ b/drivers/net/ethernet/realtek/r8169_main.c +@@ -89,6 +89,7 @@ + #define JUMBO_6K (6 * SZ_1K - VLAN_ETH_HLEN - ETH_FCS_LEN) + #define JUMBO_7K (7 * SZ_1K - VLAN_ETH_HLEN - ETH_FCS_LEN) + #define JUMBO_9K (9 * SZ_1K - VLAN_ETH_HLEN - ETH_FCS_LEN) ++#define JUMBO_16K (SZ_16K - VLAN_ETH_HLEN - ETH_FCS_LEN) + + static const struct { + const char *name; +@@ -5368,6 +5369,9 @@ static int rtl_jumbo_max(struct rtl8169_ + /* RTL8168c */ + case RTL_GIGA_MAC_VER_18 ... RTL_GIGA_MAC_VER_24: + return JUMBO_6K; ++ /* RTL8125/8126 */ ++ case RTL_GIGA_MAC_VER_61 ... RTL_GIGA_MAC_VER_71: ++ return JUMBO_16K; + default: + return JUMBO_9K; + } diff --git a/target/linux/generic/backport-6.6/780-55-v6.15-r8169-enable-RTL8168H-RTL8168EP-RTL8168FP-ASPM-suppo.patch b/target/linux/generic/backport-6.6/780-55-v6.15-r8169-enable-RTL8168H-RTL8168EP-RTL8168FP-ASPM-suppo.patch new file mode 100644 index 0000000000..32623e2358 --- /dev/null +++ b/target/linux/generic/backport-6.6/780-55-v6.15-r8169-enable-RTL8168H-RTL8168EP-RTL8168FP-ASPM-suppo.patch @@ -0,0 +1,27 @@ +From 3d9b8ac5341269d31e59fd5d58d47266ac78bc32 Mon Sep 17 00:00:00 2001 +From: ChunHao Lin +Date: Tue, 18 Mar 2025 16:37:20 +0800 +Subject: [PATCH] r8169: enable RTL8168H/RTL8168EP/RTL8168FP ASPM support + +This patch will enable RTL8168H/RTL8168EP/RTL8168FP ASPM support on +the platforms that have tested with ASPM enabled. + +Signed-off-by: ChunHao Lin +Reviewed-by: Heiner Kallweit +Link: https://patch.msgid.link/20250318083721.4127-2-hau@realtek.com +Signed-off-by: Jakub Kicinski +--- + drivers/net/ethernet/realtek/r8169_main.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/drivers/net/ethernet/realtek/r8169_main.c ++++ b/drivers/net/ethernet/realtek/r8169_main.c +@@ -5406,7 +5406,7 @@ done: + /* register is set if system vendor successfully tested ASPM 1.2 */ + static bool rtl_aspm_is_safe(struct rtl8169_private *tp) + { +- if (tp->mac_version >= RTL_GIGA_MAC_VER_61 && ++ if (tp->mac_version >= RTL_GIGA_MAC_VER_46 && + r8168_mac_ocp_read(tp, 0xc0b2) & 0xf) + return true; + diff --git a/target/linux/generic/backport-6.6/780-56-v6.15-r8169-disable-RTL8126-ZRX-DC-timeout.patch b/target/linux/generic/backport-6.6/780-56-v6.15-r8169-disable-RTL8126-ZRX-DC-timeout.patch new file mode 100644 index 0000000000..3f81f4b54b --- /dev/null +++ b/target/linux/generic/backport-6.6/780-56-v6.15-r8169-disable-RTL8126-ZRX-DC-timeout.patch @@ -0,0 +1,60 @@ +From b48688ea3c9ac8d5d910c6e91fb7f80d846581f0 Mon Sep 17 00:00:00 2001 +From: ChunHao Lin +Date: Tue, 18 Mar 2025 16:37:21 +0800 +Subject: [PATCH] r8169: disable RTL8126 ZRX-DC timeout + +Disable it due to it dose not meet ZRX-DC specification. If it is enabled, +device will exit L1 substate every 100ms. Disable it for saving more power +in L1 substate. + +Signed-off-by: ChunHao Lin +Reviewed-by: Heiner Kallweit +Link: https://patch.msgid.link/20250318083721.4127-3-hau@realtek.com +Signed-off-by: Jakub Kicinski +--- + drivers/net/ethernet/realtek/r8169_main.c | 27 +++++++++++++++++++++++ + 1 file changed, 27 insertions(+) + +--- a/drivers/net/ethernet/realtek/r8169_main.c ++++ b/drivers/net/ethernet/realtek/r8169_main.c +@@ -2856,6 +2856,32 @@ static u32 rtl_csi_read(struct rtl8169_p + RTL_R32(tp, CSIDR) : ~0; + } + ++static void rtl_disable_zrxdc_timeout(struct rtl8169_private *tp) ++{ ++ struct pci_dev *pdev = tp->pci_dev; ++ u32 csi; ++ int rc; ++ u8 val; ++ ++#define RTL_GEN3_RELATED_OFF 0x0890 ++#define RTL_GEN3_ZRXDC_NONCOMPL 0x1 ++ if (pdev->cfg_size > RTL_GEN3_RELATED_OFF) { ++ rc = pci_read_config_byte(pdev, RTL_GEN3_RELATED_OFF, &val); ++ if (rc == PCIBIOS_SUCCESSFUL) { ++ val &= ~RTL_GEN3_ZRXDC_NONCOMPL; ++ rc = pci_write_config_byte(pdev, RTL_GEN3_RELATED_OFF, ++ val); ++ if (rc == PCIBIOS_SUCCESSFUL) ++ return; ++ } ++ } ++ ++ netdev_notice_once(tp->dev, ++ "No native access to PCI extended config space, falling back to CSI\n"); ++ csi = rtl_csi_read(tp, RTL_GEN3_RELATED_OFF); ++ rtl_csi_write(tp, RTL_GEN3_RELATED_OFF, csi & ~RTL_GEN3_ZRXDC_NONCOMPL); ++} ++ + static void rtl_set_aspm_entry_latency(struct rtl8169_private *tp, u8 val) + { + struct pci_dev *pdev = tp->pci_dev; +@@ -3828,6 +3854,7 @@ static void rtl_hw_start_8125d(struct rt + + static void rtl_hw_start_8126a(struct rtl8169_private *tp) + { ++ rtl_disable_zrxdc_timeout(tp); + rtl_set_def_aspm_entry_latency(tp); + rtl_hw_start_8125_common(tp); + } From 1eab9b8a9b33b61baa6331a87e4d7b54ac747fa0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=81lvaro=20Fern=C3=A1ndez=20Rojas?= Date: Tue, 22 Apr 2025 14:39:05 +0200 Subject: [PATCH 37/49] generic: 6.6: backport upstream v6.15 Realtek PHY patches MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit bfc17c1658353 net: phy: realtek: disable PHY-mode EEE fabcfd6d10999 net: phy: realtek: add defines for shadowed c45 standard registers 8af2136e77989 net: phy: realtek: add helper RTL822X_VND2_C22_REG 02d3b306ac2f0 net: phy: realtek: switch from paged to MMD ops in rtl822x functions da681ed73fb98 net: phy: realtek: improve mmd register access for internal PHY's 0bea93fdbaf86 net: phy: realtek: use string choices helpers 51773846fab24 net: phy: realtek: make HWMON support a user-visible Kconfig symbol Signed-off-by: Álvaro Fernández Rojas (cherry picked from commit 7673a165a955269773eb604d3678d86d0bb7f49c) --- ...make-HWMON-support-a-user-visible-Kc.patch | 35 +++++ ...y-realtek-use-string-choices-helpers.patch | 54 +++++++ ...improve-mmd-register-access-for-inte.patch | 134 ++++++++++++++++++ ...switch-from-paged-to-MMD-ops-in-rtl8.patch | 52 +++++++ ...ltek-add-helper-RTL822X_VND2_C22_REG.patch | 48 +++++++ ...add-defines-for-shadowed-c45-standar.patch | 113 +++++++++++++++ ...net-phy-realtek-disable-PHY-mode-EEE.patch | 54 +++++++ ...-use-genphy_soft_reset-for-2.5G-PHYs.patch | 16 +-- ...sable-SGMII-in-band-AN-for-2-5G-PHYs.patch | 4 +- ...make-sure-paged-read-is-protected-by.patch | 2 +- .../720-04-net-phy-realtek-setup-aldps.patch | 6 +- ...tek-detect-early-version-of-RTL8221B.patch | 2 +- ...ealtek-support-interrupt-of-RTL8221B.patch | 10 +- ...ealtek-mark-existing-MMDs-as-present.patch | 2 +- ...hy-realtek-work-around-broken-serdes.patch | 6 +- ...t-phy-realtek-disable-MDIO-broadcast.patch | 2 +- 16 files changed, 515 insertions(+), 25 deletions(-) create mode 100644 target/linux/generic/backport-6.6/781-27-v6.15-net-phy-realtek-make-HWMON-support-a-user-visible-Kc.patch create mode 100644 target/linux/generic/backport-6.6/781-28-v6.15-net-phy-realtek-use-string-choices-helpers.patch create mode 100644 target/linux/generic/backport-6.6/781-29-v6.15-net-phy-realtek-improve-mmd-register-access-for-inte.patch create mode 100644 target/linux/generic/backport-6.6/781-30-v6.15-net-phy-realtek-switch-from-paged-to-MMD-ops-in-rtl8.patch create mode 100644 target/linux/generic/backport-6.6/781-31-v6.15-net-phy-realtek-add-helper-RTL822X_VND2_C22_REG.patch create mode 100644 target/linux/generic/backport-6.6/781-32-v6.15-net-phy-realtek-add-defines-for-shadowed-c45-standar.patch create mode 100644 target/linux/generic/backport-6.6/781-33-v6.15-net-phy-realtek-disable-PHY-mode-EEE.patch diff --git a/target/linux/generic/backport-6.6/781-27-v6.15-net-phy-realtek-make-HWMON-support-a-user-visible-Kc.patch b/target/linux/generic/backport-6.6/781-27-v6.15-net-phy-realtek-make-HWMON-support-a-user-visible-Kc.patch new file mode 100644 index 0000000000..821d7ee879 --- /dev/null +++ b/target/linux/generic/backport-6.6/781-27-v6.15-net-phy-realtek-make-HWMON-support-a-user-visible-Kc.patch @@ -0,0 +1,35 @@ +From 51773846fab24a353bed4ebb660997ced4bc32d7 Mon Sep 17 00:00:00 2001 +From: Heiner Kallweit +Date: Mon, 3 Feb 2025 21:33:39 +0100 +Subject: [PATCH] net: phy: realtek: make HWMON support a user-visible Kconfig + symbol + +Make config symbol REALTEK_PHY_HWMON user-visible, so that users can +remove support if not needed. + +Suggested-by: Geert Uytterhoeven +Signed-off-by: Heiner Kallweit +Reviewed-by: Simon Horman +Link: https://patch.msgid.link/3466ee92-166a-4b0f-9ae7-42b9e046f333@gmail.com +Signed-off-by: Jakub Kicinski +--- + drivers/net/phy/realtek/Kconfig | 8 ++++++-- + 1 file changed, 6 insertions(+), 2 deletions(-) + +--- a/drivers/net/phy/realtek/Kconfig ++++ b/drivers/net/phy/realtek/Kconfig +@@ -4,8 +4,12 @@ config REALTEK_PHY + help + Currently supports RTL821x/RTL822x and fast ethernet PHYs + ++if REALTEK_PHY ++ + config REALTEK_PHY_HWMON +- def_bool REALTEK_PHY && HWMON +- depends on !(REALTEK_PHY=y && HWMON=m) ++ bool "HWMON support for Realtek PHYs" ++ depends on HWMON && !(REALTEK_PHY=y && HWMON=m) + help + Optional hwmon support for the temperature sensor ++ ++endif # REALTEK_PHY diff --git a/target/linux/generic/backport-6.6/781-28-v6.15-net-phy-realtek-use-string-choices-helpers.patch b/target/linux/generic/backport-6.6/781-28-v6.15-net-phy-realtek-use-string-choices-helpers.patch new file mode 100644 index 0000000000..d3e09bc7cd --- /dev/null +++ b/target/linux/generic/backport-6.6/781-28-v6.15-net-phy-realtek-use-string-choices-helpers.patch @@ -0,0 +1,54 @@ +From 0bea93fdbaf8675b7e8124bdcaf51497dcc8bcfa Mon Sep 17 00:00:00 2001 +From: Heiner Kallweit +Date: Mon, 3 Feb 2025 21:41:36 +0100 +Subject: [PATCH] net: phy: realtek: use string choices helpers + +Use string choices helpers to simplify the code. + +Reported-by: kernel test robot +Closes: https://lore.kernel.org/oe-kbuild-all/202501190707.qQS8PGHW-lkp@intel.com/ +Signed-off-by: Heiner Kallweit +Reviewed-by: Simon Horman +Signed-off-by: David S. Miller +--- + drivers/net/phy/realtek/realtek_main.c | 9 +++++---- + 1 file changed, 5 insertions(+), 4 deletions(-) + +--- a/drivers/net/phy/realtek/realtek_main.c ++++ b/drivers/net/phy/realtek/realtek_main.c +@@ -13,6 +13,7 @@ + #include + #include + #include ++#include + + #include "realtek.h" + +@@ -422,11 +423,11 @@ static int rtl8211f_config_init(struct p + } else if (ret) { + dev_dbg(dev, + "%s 2ns TX delay (and changing the value from pin-strapping RXD1 or the bootloader)\n", +- val_txdly ? "Enabling" : "Disabling"); ++ str_enable_disable(val_txdly)); + } else { + dev_dbg(dev, + "2ns TX delay was already %s (by pin-strapping RXD1 or bootloader configuration)\n", +- val_txdly ? "enabled" : "disabled"); ++ str_enabled_disabled(val_txdly)); + } + + ret = phy_modify_paged_changed(phydev, 0xd08, 0x15, RTL8211F_RX_DELAY, +@@ -437,11 +438,11 @@ static int rtl8211f_config_init(struct p + } else if (ret) { + dev_dbg(dev, + "%s 2ns RX delay (and changing the value from pin-strapping RXD0 or the bootloader)\n", +- val_rxdly ? "Enabling" : "Disabling"); ++ str_enable_disable(val_rxdly)); + } else { + dev_dbg(dev, + "2ns RX delay was already %s (by pin-strapping RXD0 or bootloader configuration)\n", +- val_rxdly ? "enabled" : "disabled"); ++ str_enabled_disabled(val_rxdly)); + } + + if (priv->has_phycr2) { diff --git a/target/linux/generic/backport-6.6/781-29-v6.15-net-phy-realtek-improve-mmd-register-access-for-inte.patch b/target/linux/generic/backport-6.6/781-29-v6.15-net-phy-realtek-improve-mmd-register-access-for-inte.patch new file mode 100644 index 0000000000..3a3a20d58b --- /dev/null +++ b/target/linux/generic/backport-6.6/781-29-v6.15-net-phy-realtek-improve-mmd-register-access-for-inte.patch @@ -0,0 +1,134 @@ +From da681ed73fb980286fc29de707b35d76bb33e123 Mon Sep 17 00:00:00 2001 +From: Heiner Kallweit +Date: Thu, 13 Feb 2025 20:18:17 +0100 +Subject: [PATCH] net: phy: realtek: improve mmd register access for internal + PHY's + +r8169 provides the MDIO bus for the internal PHY's. It has been extended +with c45 access functions for addressing MDIO_MMD_VEND2 registers. +So we can switch from paged access to directly addressing the +MDIO_MMD_VEND2 registers. + +Signed-off-by: Heiner Kallweit +Reviewed-by: Andrew Lunn +Link: https://patch.msgid.link/a5f2333c-dda9-48ad-9801-77049766e632@gmail.com +Signed-off-by: Jakub Kicinski +--- + drivers/net/phy/realtek/realtek_main.c | 79 +++++++++++--------------- + 1 file changed, 33 insertions(+), 46 deletions(-) + +--- a/drivers/net/phy/realtek/realtek_main.c ++++ b/drivers/net/phy/realtek/realtek_main.c +@@ -735,29 +735,31 @@ static int rtlgen_read_status(struct phy + return 0; + } + ++static int rtlgen_read_vend2(struct phy_device *phydev, int regnum) ++{ ++ return __mdiobus_c45_read(phydev->mdio.bus, 0, MDIO_MMD_VEND2, regnum); ++} ++ ++static int rtlgen_write_vend2(struct phy_device *phydev, int regnum, u16 val) ++{ ++ return __mdiobus_c45_write(phydev->mdio.bus, 0, MDIO_MMD_VEND2, regnum, ++ val); ++} ++ + static int rtlgen_read_mmd(struct phy_device *phydev, int devnum, u16 regnum) + { + int ret; + +- if (devnum == MDIO_MMD_VEND2) { +- rtl821x_write_page(phydev, regnum >> 4); +- ret = __phy_read(phydev, 0x10 + ((regnum & 0xf) >> 1)); +- rtl821x_write_page(phydev, 0); +- } else if (devnum == MDIO_MMD_PCS && regnum == MDIO_PCS_EEE_ABLE) { +- rtl821x_write_page(phydev, 0xa5c); +- ret = __phy_read(phydev, 0x12); +- rtl821x_write_page(phydev, 0); +- } else if (devnum == MDIO_MMD_AN && regnum == MDIO_AN_EEE_ADV) { +- rtl821x_write_page(phydev, 0xa5d); +- ret = __phy_read(phydev, 0x10); +- rtl821x_write_page(phydev, 0); +- } else if (devnum == MDIO_MMD_AN && regnum == MDIO_AN_EEE_LPABLE) { +- rtl821x_write_page(phydev, 0xa5d); +- ret = __phy_read(phydev, 0x11); +- rtl821x_write_page(phydev, 0); +- } else { ++ if (devnum == MDIO_MMD_VEND2) ++ ret = rtlgen_read_vend2(phydev, regnum); ++ else if (devnum == MDIO_MMD_PCS && regnum == MDIO_PCS_EEE_ABLE) ++ ret = rtlgen_read_vend2(phydev, 0xa5c4); ++ else if (devnum == MDIO_MMD_AN && regnum == MDIO_AN_EEE_ADV) ++ ret = rtlgen_read_vend2(phydev, 0xa5d0); ++ else if (devnum == MDIO_MMD_AN && regnum == MDIO_AN_EEE_LPABLE) ++ ret = rtlgen_read_vend2(phydev, 0xa5d2); ++ else + ret = -EOPNOTSUPP; +- } + + return ret; + } +@@ -767,17 +769,12 @@ static int rtlgen_write_mmd(struct phy_d + { + int ret; + +- if (devnum == MDIO_MMD_VEND2) { +- rtl821x_write_page(phydev, regnum >> 4); +- ret = __phy_write(phydev, 0x10 + ((regnum & 0xf) >> 1), val); +- rtl821x_write_page(phydev, 0); +- } else if (devnum == MDIO_MMD_AN && regnum == MDIO_AN_EEE_ADV) { +- rtl821x_write_page(phydev, 0xa5d); +- ret = __phy_write(phydev, 0x10, val); +- rtl821x_write_page(phydev, 0); +- } else { ++ if (devnum == MDIO_MMD_VEND2) ++ ret = rtlgen_write_vend2(phydev, regnum, val); ++ else if (devnum == MDIO_MMD_AN && regnum == MDIO_AN_EEE_ADV) ++ ret = rtlgen_write_vend2(phydev, regnum, 0xa5d0); ++ else + ret = -EOPNOTSUPP; +- } + + return ret; + } +@@ -789,19 +786,12 @@ static int rtl822x_read_mmd(struct phy_d + if (ret != -EOPNOTSUPP) + return ret; + +- if (devnum == MDIO_MMD_PCS && regnum == MDIO_PCS_EEE_ABLE2) { +- rtl821x_write_page(phydev, 0xa6e); +- ret = __phy_read(phydev, 0x16); +- rtl821x_write_page(phydev, 0); +- } else if (devnum == MDIO_MMD_AN && regnum == MDIO_AN_EEE_ADV2) { +- rtl821x_write_page(phydev, 0xa6d); +- ret = __phy_read(phydev, 0x12); +- rtl821x_write_page(phydev, 0); +- } else if (devnum == MDIO_MMD_AN && regnum == MDIO_AN_EEE_LPABLE2) { +- rtl821x_write_page(phydev, 0xa6d); +- ret = __phy_read(phydev, 0x10); +- rtl821x_write_page(phydev, 0); +- } ++ if (devnum == MDIO_MMD_PCS && regnum == MDIO_PCS_EEE_ABLE2) ++ ret = rtlgen_read_vend2(phydev, 0xa6ec); ++ else if (devnum == MDIO_MMD_AN && regnum == MDIO_AN_EEE_ADV2) ++ ret = rtlgen_read_vend2(phydev, 0xa6d4); ++ else if (devnum == MDIO_MMD_AN && regnum == MDIO_AN_EEE_LPABLE2) ++ ret = rtlgen_read_vend2(phydev, 0xa6d0); + + return ret; + } +@@ -814,11 +804,8 @@ static int rtl822x_write_mmd(struct phy_ + if (ret != -EOPNOTSUPP) + return ret; + +- if (devnum == MDIO_MMD_AN && regnum == MDIO_AN_EEE_ADV2) { +- rtl821x_write_page(phydev, 0xa6d); +- ret = __phy_write(phydev, 0x12, val); +- rtl821x_write_page(phydev, 0); +- } ++ if (devnum == MDIO_MMD_AN && regnum == MDIO_AN_EEE_ADV2) ++ ret = rtlgen_write_vend2(phydev, 0xa6d4, val); + + return ret; + } diff --git a/target/linux/generic/backport-6.6/781-30-v6.15-net-phy-realtek-switch-from-paged-to-MMD-ops-in-rtl8.patch b/target/linux/generic/backport-6.6/781-30-v6.15-net-phy-realtek-switch-from-paged-to-MMD-ops-in-rtl8.patch new file mode 100644 index 0000000000..5e3c3ce70a --- /dev/null +++ b/target/linux/generic/backport-6.6/781-30-v6.15-net-phy-realtek-switch-from-paged-to-MMD-ops-in-rtl8.patch @@ -0,0 +1,52 @@ +From 02d3b306ac2f0b174753d1c5b9e4e5fb8ec5057e Mon Sep 17 00:00:00 2001 +From: Heiner Kallweit +Date: Thu, 13 Feb 2025 20:19:14 +0100 +Subject: [PATCH] net: phy: realtek: switch from paged to MMD ops in rtl822x + functions + +The MDIO bus provided by r8169 for the internal PHY's now supports +c45 ops for the MDIO_MMD_VEND2 device. So we can switch to standard +MMD ops here. + +Signed-off-by: Heiner Kallweit +Reviewed-by: Andrew Lunn +Link: https://patch.msgid.link/81416f95-0fac-4225-87b4-828e3738b8ed@gmail.com +Signed-off-by: Jakub Kicinski +--- + drivers/net/phy/realtek/realtek_main.c | 11 +++++------ + 1 file changed, 5 insertions(+), 6 deletions(-) + +--- a/drivers/net/phy/realtek/realtek_main.c ++++ b/drivers/net/phy/realtek/realtek_main.c +@@ -901,7 +901,7 @@ static int rtl822x_get_features(struct p + { + int val; + +- val = phy_read_paged(phydev, 0xa61, 0x13); ++ val = phy_read_mmd(phydev, MDIO_MMD_VEND2, 0xa616); + if (val < 0) + return val; + +@@ -922,10 +922,9 @@ static int rtl822x_config_aneg(struct ph + if (phydev->autoneg == AUTONEG_ENABLE) { + u16 adv = linkmode_adv_to_mii_10gbt_adv_t(phydev->advertising); + +- ret = phy_modify_paged_changed(phydev, 0xa5d, 0x12, +- MDIO_AN_10GBT_CTRL_ADV2_5G | +- MDIO_AN_10GBT_CTRL_ADV5G, +- adv); ++ ret = phy_modify_mmd_changed(phydev, MDIO_MMD_VEND2, 0xa5d4, ++ MDIO_AN_10GBT_CTRL_ADV2_5G | ++ MDIO_AN_10GBT_CTRL_ADV5G, adv); + if (ret < 0) + return ret; + } +@@ -969,7 +968,7 @@ static int rtl822x_read_status(struct ph + !phydev->autoneg_complete) + return 0; + +- lpadv = phy_read_paged(phydev, 0xa5d, 0x13); ++ lpadv = phy_read_mmd(phydev, MDIO_MMD_VEND2, 0xa5d6); + if (lpadv < 0) + return lpadv; + diff --git a/target/linux/generic/backport-6.6/781-31-v6.15-net-phy-realtek-add-helper-RTL822X_VND2_C22_REG.patch b/target/linux/generic/backport-6.6/781-31-v6.15-net-phy-realtek-add-helper-RTL822X_VND2_C22_REG.patch new file mode 100644 index 0000000000..5134d08b1c --- /dev/null +++ b/target/linux/generic/backport-6.6/781-31-v6.15-net-phy-realtek-add-helper-RTL822X_VND2_C22_REG.patch @@ -0,0 +1,48 @@ +From 8af2136e77989a64fae0284bf76fd584e32edd3a Mon Sep 17 00:00:00 2001 +From: Heiner Kallweit +Date: Fri, 14 Feb 2025 21:31:14 +0100 +Subject: [PATCH] net: phy: realtek: add helper RTL822X_VND2_C22_REG + +C22 register space is mapped to 0xa400 in MMD VEND2 register space. +Add a helper to access mapped C22 registers. + +Signed-off-by: Heiner Kallweit +Reviewed-by: Andrew Lunn +Link: https://patch.msgid.link/6344277b-c5c7-449b-ac89-d5425306ca76@gmail.com +Signed-off-by: Jakub Kicinski +--- + drivers/net/phy/realtek/realtek_main.c | 9 ++++----- + 1 file changed, 4 insertions(+), 5 deletions(-) + +--- a/drivers/net/phy/realtek/realtek_main.c ++++ b/drivers/net/phy/realtek/realtek_main.c +@@ -79,9 +79,7 @@ + /* RTL822X_VND2_XXXXX registers are only accessible when phydev->is_c45 + * is set, they cannot be accessed by C45-over-C22. + */ +-#define RTL822X_VND2_GBCR 0xa412 +- +-#define RTL822X_VND2_GANLPAR 0xa414 ++#define RTL822X_VND2_C22_REG(reg) (0xa400 + 2 * (reg)) + + #define RTL8366RB_POWER_SAVE 0x15 + #define RTL8366RB_POWER_SAVE_ON BIT(12) +@@ -1015,7 +1013,8 @@ static int rtl822x_c45_config_aneg(struc + val = linkmode_adv_to_mii_ctrl1000_t(phydev->advertising); + + /* Vendor register as C45 has no standardized support for 1000BaseT */ +- ret = phy_modify_mmd_changed(phydev, MDIO_MMD_VEND2, RTL822X_VND2_GBCR, ++ ret = phy_modify_mmd_changed(phydev, MDIO_MMD_VEND2, ++ RTL822X_VND2_C22_REG(MII_CTRL1000), + ADVERTISE_1000FULL, val); + if (ret < 0) + return ret; +@@ -1032,7 +1031,7 @@ static int rtl822x_c45_read_status(struc + /* Vendor register as C45 has no standardized support for 1000BaseT */ + if (phydev->autoneg == AUTONEG_ENABLE && genphy_c45_aneg_done(phydev)) { + val = phy_read_mmd(phydev, MDIO_MMD_VEND2, +- RTL822X_VND2_GANLPAR); ++ RTL822X_VND2_C22_REG(MII_STAT1000)); + if (val < 0) + return val; + } else { diff --git a/target/linux/generic/backport-6.6/781-32-v6.15-net-phy-realtek-add-defines-for-shadowed-c45-standar.patch b/target/linux/generic/backport-6.6/781-32-v6.15-net-phy-realtek-add-defines-for-shadowed-c45-standar.patch new file mode 100644 index 0000000000..ff7d5b1fb6 --- /dev/null +++ b/target/linux/generic/backport-6.6/781-32-v6.15-net-phy-realtek-add-defines-for-shadowed-c45-standar.patch @@ -0,0 +1,113 @@ +From fabcfd6d10999024a721ae1b965b57eb8a305ace Mon Sep 17 00:00:00 2001 +From: Heiner Kallweit +Date: Sat, 15 Feb 2025 14:29:15 +0100 +Subject: [PATCH] net: phy: realtek: add defines for shadowed c45 standard + registers + +Realtek shadows standard c45 registers in VEND2 device register space. +Add defines for these VEND2 registers, based on the names of the +standard c45 registers. + +Signed-off-by: Heiner Kallweit +Reviewed-by: Andrew Lunn +Link: https://patch.msgid.link/c90bdf76-f8b8-4d06-9656-7a52d5658ee6@gmail.com +Signed-off-by: Jakub Kicinski +--- + drivers/net/phy/realtek/realtek_main.c | 33 +++++++++++++++++--------- + 1 file changed, 22 insertions(+), 11 deletions(-) + +--- a/drivers/net/phy/realtek/realtek_main.c ++++ b/drivers/net/phy/realtek/realtek_main.c +@@ -94,6 +94,16 @@ + #define RTL_VND2_PHYSR_MASTER BIT(11) + #define RTL_VND2_PHYSR_SPEED_MASK (RTL_VND2_PHYSR_SPEEDL | RTL_VND2_PHYSR_SPEEDH) + ++#define RTL_MDIO_PCS_EEE_ABLE 0xa5c4 ++#define RTL_MDIO_AN_EEE_ADV 0xa5d0 ++#define RTL_MDIO_AN_EEE_LPABLE 0xa5d2 ++#define RTL_MDIO_AN_10GBT_CTRL 0xa5d4 ++#define RTL_MDIO_AN_10GBT_STAT 0xa5d6 ++#define RTL_MDIO_PMA_SPEED 0xa616 ++#define RTL_MDIO_AN_EEE_LPABLE2 0xa6d0 ++#define RTL_MDIO_AN_EEE_ADV2 0xa6d4 ++#define RTL_MDIO_PCS_EEE_ABLE2 0xa6ec ++ + #define RTL_GENERIC_PHYID 0x001cc800 + #define RTL_8211FVD_PHYID 0x001cc878 + #define RTL_8221B 0x001cc840 +@@ -751,11 +761,11 @@ static int rtlgen_read_mmd(struct phy_de + if (devnum == MDIO_MMD_VEND2) + ret = rtlgen_read_vend2(phydev, regnum); + else if (devnum == MDIO_MMD_PCS && regnum == MDIO_PCS_EEE_ABLE) +- ret = rtlgen_read_vend2(phydev, 0xa5c4); ++ ret = rtlgen_read_vend2(phydev, RTL_MDIO_PCS_EEE_ABLE); + else if (devnum == MDIO_MMD_AN && regnum == MDIO_AN_EEE_ADV) +- ret = rtlgen_read_vend2(phydev, 0xa5d0); ++ ret = rtlgen_read_vend2(phydev, RTL_MDIO_AN_EEE_ADV); + else if (devnum == MDIO_MMD_AN && regnum == MDIO_AN_EEE_LPABLE) +- ret = rtlgen_read_vend2(phydev, 0xa5d2); ++ ret = rtlgen_read_vend2(phydev, RTL_MDIO_AN_EEE_LPABLE); + else + ret = -EOPNOTSUPP; + +@@ -770,7 +780,7 @@ static int rtlgen_write_mmd(struct phy_d + if (devnum == MDIO_MMD_VEND2) + ret = rtlgen_write_vend2(phydev, regnum, val); + else if (devnum == MDIO_MMD_AN && regnum == MDIO_AN_EEE_ADV) +- ret = rtlgen_write_vend2(phydev, regnum, 0xa5d0); ++ ret = rtlgen_write_vend2(phydev, regnum, RTL_MDIO_AN_EEE_ADV); + else + ret = -EOPNOTSUPP; + +@@ -785,11 +795,11 @@ static int rtl822x_read_mmd(struct phy_d + return ret; + + if (devnum == MDIO_MMD_PCS && regnum == MDIO_PCS_EEE_ABLE2) +- ret = rtlgen_read_vend2(phydev, 0xa6ec); ++ ret = rtlgen_read_vend2(phydev, RTL_MDIO_PCS_EEE_ABLE2); + else if (devnum == MDIO_MMD_AN && regnum == MDIO_AN_EEE_ADV2) +- ret = rtlgen_read_vend2(phydev, 0xa6d4); ++ ret = rtlgen_read_vend2(phydev, RTL_MDIO_AN_EEE_ADV2); + else if (devnum == MDIO_MMD_AN && regnum == MDIO_AN_EEE_LPABLE2) +- ret = rtlgen_read_vend2(phydev, 0xa6d0); ++ ret = rtlgen_read_vend2(phydev, RTL_MDIO_AN_EEE_LPABLE2); + + return ret; + } +@@ -803,7 +813,7 @@ static int rtl822x_write_mmd(struct phy_ + return ret; + + if (devnum == MDIO_MMD_AN && regnum == MDIO_AN_EEE_ADV2) +- ret = rtlgen_write_vend2(phydev, 0xa6d4, val); ++ ret = rtlgen_write_vend2(phydev, RTL_MDIO_AN_EEE_ADV2, val); + + return ret; + } +@@ -899,7 +909,7 @@ static int rtl822x_get_features(struct p + { + int val; + +- val = phy_read_mmd(phydev, MDIO_MMD_VEND2, 0xa616); ++ val = phy_read_mmd(phydev, MDIO_MMD_VEND2, RTL_MDIO_PMA_SPEED); + if (val < 0) + return val; + +@@ -920,7 +930,8 @@ static int rtl822x_config_aneg(struct ph + if (phydev->autoneg == AUTONEG_ENABLE) { + u16 adv = linkmode_adv_to_mii_10gbt_adv_t(phydev->advertising); + +- ret = phy_modify_mmd_changed(phydev, MDIO_MMD_VEND2, 0xa5d4, ++ ret = phy_modify_mmd_changed(phydev, MDIO_MMD_VEND2, ++ RTL_MDIO_AN_10GBT_CTRL, + MDIO_AN_10GBT_CTRL_ADV2_5G | + MDIO_AN_10GBT_CTRL_ADV5G, adv); + if (ret < 0) +@@ -966,7 +977,7 @@ static int rtl822x_read_status(struct ph + !phydev->autoneg_complete) + return 0; + +- lpadv = phy_read_mmd(phydev, MDIO_MMD_VEND2, 0xa5d6); ++ lpadv = phy_read_mmd(phydev, MDIO_MMD_VEND2, RTL_MDIO_AN_10GBT_STAT); + if (lpadv < 0) + return lpadv; + diff --git a/target/linux/generic/backport-6.6/781-33-v6.15-net-phy-realtek-disable-PHY-mode-EEE.patch b/target/linux/generic/backport-6.6/781-33-v6.15-net-phy-realtek-disable-PHY-mode-EEE.patch new file mode 100644 index 0000000000..4d755d4e22 --- /dev/null +++ b/target/linux/generic/backport-6.6/781-33-v6.15-net-phy-realtek-disable-PHY-mode-EEE.patch @@ -0,0 +1,54 @@ +From bfc17c1658353f22843c7c13e27c2d31950f1887 Mon Sep 17 00:00:00 2001 +From: "Russell King (Oracle)" +Date: Sun, 16 Mar 2025 12:39:54 +0000 +Subject: [PATCH] net: phy: realtek: disable PHY-mode EEE + +Realtek RTL8211F has a "PHY-mode" EEE support which interferes with an +IEEE 802.3 compliant implementation. This mode defaults to enabled, and +results in the MAC receive path not seeing the link transition to LPI +state. + +Fix this by disabling PHY-mode EEE. + +Signed-off-by: Russell King (Oracle) +Reviewed-by: Andrew Lunn +Link: https://patch.msgid.link/E1ttnHW-00785s-Uq@rmk-PC.armlinux.org.uk +Signed-off-by: Paolo Abeni +--- + drivers/net/phy/realtek/realtek_main.c | 11 +++++++++-- + 1 file changed, 9 insertions(+), 2 deletions(-) + +--- a/drivers/net/phy/realtek/realtek_main.c ++++ b/drivers/net/phy/realtek/realtek_main.c +@@ -33,6 +33,9 @@ + + #define RTL8211F_PHYCR1 0x18 + #define RTL8211F_PHYCR2 0x19 ++#define RTL8211F_CLKOUT_EN BIT(0) ++#define RTL8211F_PHYCR2_PHY_EEE_ENABLE BIT(5) ++ + #define RTL8211F_INSR 0x1d + + #define RTL8211F_LEDCR 0x10 +@@ -55,8 +58,6 @@ + #define RTL8211E_TX_DELAY BIT(12) + #define RTL8211E_RX_DELAY BIT(11) + +-#define RTL8211F_CLKOUT_EN BIT(0) +- + #define RTL8201F_ISR 0x1e + #define RTL8201F_ISR_ANERR BIT(15) + #define RTL8201F_ISR_DUPLEX BIT(13) +@@ -453,6 +454,12 @@ static int rtl8211f_config_init(struct p + str_enabled_disabled(val_rxdly)); + } + ++ /* Disable PHY-mode EEE so LPI is passed to the MAC */ ++ ret = phy_modify_paged(phydev, 0xa43, RTL8211F_PHYCR2, ++ RTL8211F_PHYCR2_PHY_EEE_ENABLE, 0); ++ if (ret) ++ return ret; ++ + if (priv->has_phycr2) { + ret = phy_modify_paged(phydev, 0xa43, RTL8211F_PHYCR2, + RTL8211F_CLKOUT_EN, priv->phycr2); diff --git a/target/linux/generic/pending-6.6/720-01-net-phy-realtek-use-genphy_soft_reset-for-2.5G-PHYs.patch b/target/linux/generic/pending-6.6/720-01-net-phy-realtek-use-genphy_soft_reset-for-2.5G-PHYs.patch index 24885e3681..6a68ae428c 100644 --- a/target/linux/generic/pending-6.6/720-01-net-phy-realtek-use-genphy_soft_reset-for-2.5G-PHYs.patch +++ b/target/linux/generic/pending-6.6/720-01-net-phy-realtek-use-genphy_soft_reset-for-2.5G-PHYs.patch @@ -15,7 +15,7 @@ Signed-off-by: Daniel Golle --- a/drivers/net/phy/realtek/realtek_main.c +++ b/drivers/net/phy/realtek/realtek_main.c -@@ -1430,6 +1430,7 @@ static struct phy_driver realtek_drvs[] +@@ -1434,6 +1434,7 @@ static struct phy_driver realtek_drvs[] }, { .name = "RTL8226 2.5Gbps PHY", .match_phy_device = rtl8226_match_phy_device, @@ -23,7 +23,7 @@ Signed-off-by: Daniel Golle .get_features = rtl822x_get_features, .config_aneg = rtl822x_config_aneg, .read_status = rtl822x_read_status, -@@ -1440,6 +1441,7 @@ static struct phy_driver realtek_drvs[] +@@ -1444,6 +1445,7 @@ static struct phy_driver realtek_drvs[] }, { .match_phy_device = rtl8221b_match_phy_device, .name = "RTL8226B_RTL8221B 2.5Gbps PHY", @@ -31,7 +31,7 @@ Signed-off-by: Daniel Golle .get_features = rtl822x_get_features, .config_aneg = rtl822x_config_aneg, .config_init = rtl822xb_config_init, -@@ -1452,6 +1454,7 @@ static struct phy_driver realtek_drvs[] +@@ -1456,6 +1458,7 @@ static struct phy_driver realtek_drvs[] }, { PHY_ID_MATCH_EXACT(0x001cc838), .name = "RTL8226-CG 2.5Gbps PHY", @@ -39,7 +39,7 @@ Signed-off-by: Daniel Golle .get_features = rtl822x_get_features, .config_aneg = rtl822x_config_aneg, .read_status = rtl822x_read_status, -@@ -1462,6 +1465,7 @@ static struct phy_driver realtek_drvs[] +@@ -1466,6 +1469,7 @@ static struct phy_driver realtek_drvs[] }, { PHY_ID_MATCH_EXACT(0x001cc848), .name = "RTL8226B-CG_RTL8221B-CG 2.5Gbps PHY", @@ -47,7 +47,7 @@ Signed-off-by: Daniel Golle .get_features = rtl822x_get_features, .config_aneg = rtl822x_config_aneg, .config_init = rtl822xb_config_init, -@@ -1474,6 +1478,7 @@ static struct phy_driver realtek_drvs[] +@@ -1478,6 +1482,7 @@ static struct phy_driver realtek_drvs[] }, { .match_phy_device = rtl8221b_vb_cg_c22_match_phy_device, .name = "RTL8221B-VB-CG 2.5Gbps PHY (C22)", @@ -55,7 +55,7 @@ Signed-off-by: Daniel Golle .probe = rtl822x_probe, .get_features = rtl822x_get_features, .config_aneg = rtl822x_config_aneg, -@@ -1487,6 +1492,7 @@ static struct phy_driver realtek_drvs[] +@@ -1491,6 +1496,7 @@ static struct phy_driver realtek_drvs[] }, { .match_phy_device = rtl8221b_vb_cg_c45_match_phy_device, .name = "RTL8221B-VB-CG 2.5Gbps PHY (C45)", @@ -63,7 +63,7 @@ Signed-off-by: Daniel Golle .probe = rtl822x_probe, .config_init = rtl822xb_config_init, .get_rate_matching = rtl822xb_get_rate_matching, -@@ -1498,6 +1504,7 @@ static struct phy_driver realtek_drvs[] +@@ -1502,6 +1508,7 @@ static struct phy_driver realtek_drvs[] }, { .match_phy_device = rtl8221b_vn_cg_c22_match_phy_device, .name = "RTL8221B-VM-CG 2.5Gbps PHY (C22)", @@ -71,7 +71,7 @@ Signed-off-by: Daniel Golle .probe = rtl822x_probe, .get_features = rtl822x_get_features, .config_aneg = rtl822x_config_aneg, -@@ -1511,6 +1518,7 @@ static struct phy_driver realtek_drvs[] +@@ -1515,6 +1522,7 @@ static struct phy_driver realtek_drvs[] }, { .match_phy_device = rtl8221b_vn_cg_c45_match_phy_device, .name = "RTL8221B-VN-CG 2.5Gbps PHY (C45)", diff --git a/target/linux/generic/pending-6.6/720-02-net-phy-realtek-disable-SGMII-in-band-AN-for-2-5G-PHYs.patch b/target/linux/generic/pending-6.6/720-02-net-phy-realtek-disable-SGMII-in-band-AN-for-2-5G-PHYs.patch index edc03b5575..6ecd7235b4 100644 --- a/target/linux/generic/pending-6.6/720-02-net-phy-realtek-disable-SGMII-in-band-AN-for-2-5G-PHYs.patch +++ b/target/linux/generic/pending-6.6/720-02-net-phy-realtek-disable-SGMII-in-band-AN-for-2-5G-PHYs.patch @@ -20,7 +20,7 @@ Signed-off-by: Daniel Golle --- a/drivers/net/phy/realtek/realtek_main.c +++ b/drivers/net/phy/realtek/realtek_main.c -@@ -834,8 +834,8 @@ static int rtl822x_probe(struct phy_devi +@@ -837,8 +837,8 @@ static int rtl822x_probe(struct phy_devi static int rtl822xb_config_init(struct phy_device *phydev) { bool has_2500, has_sgmii; @@ -30,7 +30,7 @@ Signed-off-by: Daniel Golle has_2500 = test_bit(PHY_INTERFACE_MODE_2500BASEX, phydev->host_interfaces) || -@@ -885,7 +885,29 @@ static int rtl822xb_config_init(struct p +@@ -888,7 +888,29 @@ static int rtl822xb_config_init(struct p if (ret < 0) return ret; diff --git a/target/linux/generic/pending-6.6/720-03-net-phy-realtek-make-sure-paged-read-is-protected-by.patch b/target/linux/generic/pending-6.6/720-03-net-phy-realtek-make-sure-paged-read-is-protected-by.patch index d5f80d1c91..86ba13370a 100644 --- a/target/linux/generic/pending-6.6/720-03-net-phy-realtek-make-sure-paged-read-is-protected-by.patch +++ b/target/linux/generic/pending-6.6/720-03-net-phy-realtek-make-sure-paged-read-is-protected-by.patch @@ -18,7 +18,7 @@ Signed-off-by: Daniel Golle --- a/drivers/net/phy/realtek/realtek_main.c +++ b/drivers/net/phy/realtek/realtek_main.c -@@ -1111,9 +1111,11 @@ static bool rtlgen_supports_2_5gbps(stru +@@ -1115,9 +1115,11 @@ static bool rtlgen_supports_2_5gbps(stru { int val; diff --git a/target/linux/generic/pending-6.6/720-04-net-phy-realtek-setup-aldps.patch b/target/linux/generic/pending-6.6/720-04-net-phy-realtek-setup-aldps.patch index 23b3ca893a..fb9944e8e5 100644 --- a/target/linux/generic/pending-6.6/720-04-net-phy-realtek-setup-aldps.patch +++ b/target/linux/generic/pending-6.6/720-04-net-phy-realtek-setup-aldps.patch @@ -14,8 +14,8 @@ Signed-off-by: Daniel Golle --- a/drivers/net/phy/realtek/realtek_main.c +++ b/drivers/net/phy/realtek/realtek_main.c @@ -82,6 +82,10 @@ - - #define RTL822X_VND2_GANLPAR 0xa414 + */ + #define RTL822X_VND2_C22_REG(reg) (0xa400 + 2 * (reg)) +#define RTL8221B_PHYCR1 0xa430 +#define RTL8221B_PHYCR1_ALDPS_EN BIT(2) @@ -24,7 +24,7 @@ Signed-off-by: Daniel Golle #define RTL8366RB_POWER_SAVE 0x15 #define RTL8366RB_POWER_SAVE_ON BIT(12) -@@ -889,6 +893,15 @@ static int rtl822xb_config_init(struct p +@@ -892,6 +896,15 @@ static int rtl822xb_config_init(struct p if (ret < 0) return ret; diff --git a/target/linux/generic/pending-6.6/720-05-net-phy-realtek-detect-early-version-of-RTL8221B.patch b/target/linux/generic/pending-6.6/720-05-net-phy-realtek-detect-early-version-of-RTL8221B.patch index d7fbf3a2a6..ca08dcafdf 100644 --- a/target/linux/generic/pending-6.6/720-05-net-phy-realtek-detect-early-version-of-RTL8221B.patch +++ b/target/linux/generic/pending-6.6/720-05-net-phy-realtek-detect-early-version-of-RTL8221B.patch @@ -14,7 +14,7 @@ Signed-off-by: Daniel Golle Signed-off-by: Mieczyslaw Nalewaj --- a/drivers/net/phy/realtek/realtek_main.c +++ b/drivers/net/phy/realtek/realtek_main.c -@@ -1166,10 +1166,32 @@ static int rtl8226_match_phy_device(stru +@@ -1170,10 +1170,32 @@ static int rtl8226_match_phy_device(stru static int rtlgen_is_c45_match(struct phy_device *phydev, unsigned int id, bool is_c45) { diff --git a/target/linux/generic/pending-6.6/720-06-net-phy-realtek-support-interrupt-of-RTL8221B.patch b/target/linux/generic/pending-6.6/720-06-net-phy-realtek-support-interrupt-of-RTL8221B.patch index 45ca5413f3..24109d8d54 100644 --- a/target/linux/generic/pending-6.6/720-06-net-phy-realtek-support-interrupt-of-RTL8221B.patch +++ b/target/linux/generic/pending-6.6/720-06-net-phy-realtek-support-interrupt-of-RTL8221B.patch @@ -12,7 +12,7 @@ Signed-off-by: Jianhui Zhao --- a/drivers/net/phy/realtek/realtek_main.c +++ b/drivers/net/phy/realtek/realtek_main.c -@@ -1377,6 +1377,51 @@ static irqreturn_t rtl9000a_handle_inter +@@ -1381,6 +1381,51 @@ static irqreturn_t rtl9000a_handle_inter return IRQ_HANDLED; } @@ -64,7 +64,7 @@ Signed-off-by: Jianhui Zhao static struct phy_driver realtek_drvs[] = { { PHY_ID_MATCH_EXACT(0x00008201), -@@ -1537,6 +1582,8 @@ static struct phy_driver realtek_drvs[] +@@ -1541,6 +1586,8 @@ static struct phy_driver realtek_drvs[] }, { .match_phy_device = rtl8221b_vb_cg_c22_match_phy_device, .name = "RTL8221B-VB-CG 2.5Gbps PHY (C22)", @@ -73,7 +73,7 @@ Signed-off-by: Jianhui Zhao .soft_reset = genphy_soft_reset, .probe = rtl822x_probe, .get_features = rtl822x_get_features, -@@ -1551,6 +1598,8 @@ static struct phy_driver realtek_drvs[] +@@ -1555,6 +1602,8 @@ static struct phy_driver realtek_drvs[] }, { .match_phy_device = rtl8221b_vb_cg_c45_match_phy_device, .name = "RTL8221B-VB-CG 2.5Gbps PHY (C45)", @@ -82,7 +82,7 @@ Signed-off-by: Jianhui Zhao .soft_reset = genphy_soft_reset, .probe = rtl822x_probe, .config_init = rtl822xb_config_init, -@@ -1563,6 +1612,8 @@ static struct phy_driver realtek_drvs[] +@@ -1567,6 +1616,8 @@ static struct phy_driver realtek_drvs[] }, { .match_phy_device = rtl8221b_vn_cg_c22_match_phy_device, .name = "RTL8221B-VM-CG 2.5Gbps PHY (C22)", @@ -91,7 +91,7 @@ Signed-off-by: Jianhui Zhao .soft_reset = genphy_soft_reset, .probe = rtl822x_probe, .get_features = rtl822x_get_features, -@@ -1577,6 +1628,8 @@ static struct phy_driver realtek_drvs[] +@@ -1581,6 +1632,8 @@ static struct phy_driver realtek_drvs[] }, { .match_phy_device = rtl8221b_vn_cg_c45_match_phy_device, .name = "RTL8221B-VN-CG 2.5Gbps PHY (C45)", diff --git a/target/linux/generic/pending-6.6/720-07-net-phy-realtek-mark-existing-MMDs-as-present.patch b/target/linux/generic/pending-6.6/720-07-net-phy-realtek-mark-existing-MMDs-as-present.patch index 555e5905d3..9c93a26b40 100644 --- a/target/linux/generic/pending-6.6/720-07-net-phy-realtek-mark-existing-MMDs-as-present.patch +++ b/target/linux/generic/pending-6.6/720-07-net-phy-realtek-mark-existing-MMDs-as-present.patch @@ -15,7 +15,7 @@ Signed-off-by: Daniel Golle --- a/drivers/net/phy/realtek/realtek_main.c +++ b/drivers/net/phy/realtek/realtek_main.c -@@ -1043,6 +1043,9 @@ static int rtl822x_c45_get_features(stru +@@ -1046,6 +1046,9 @@ static int rtl822x_c45_get_features(stru linkmode_set_bit(ETHTOOL_LINK_MODE_TP_BIT, phydev->supported); diff --git a/target/linux/generic/pending-6.6/720-08-net-phy-realtek-work-around-broken-serdes.patch b/target/linux/generic/pending-6.6/720-08-net-phy-realtek-work-around-broken-serdes.patch index e356a0a6ee..48a9ba08da 100644 --- a/target/linux/generic/pending-6.6/720-08-net-phy-realtek-work-around-broken-serdes.patch +++ b/target/linux/generic/pending-6.6/720-08-net-phy-realtek-work-around-broken-serdes.patch @@ -15,7 +15,7 @@ Signed-off-by: Daniel Golle --- --- a/drivers/net/phy/realtek/realtek_main.c +++ b/drivers/net/phy/realtek/realtek_main.c -@@ -923,6 +923,22 @@ static int rtl822xb_config_init(struct p +@@ -926,6 +926,22 @@ static int rtl822xb_config_init(struct p return 0; } @@ -38,7 +38,7 @@ Signed-off-by: Daniel Golle static int rtl822xb_get_rate_matching(struct phy_device *phydev, phy_interface_t iface) { -@@ -1605,7 +1621,7 @@ static struct phy_driver realtek_drvs[] +@@ -1609,7 +1625,7 @@ static struct phy_driver realtek_drvs[] .handle_interrupt = rtl8221b_handle_interrupt, .soft_reset = genphy_soft_reset, .probe = rtl822x_probe, @@ -47,7 +47,7 @@ Signed-off-by: Daniel Golle .get_rate_matching = rtl822xb_get_rate_matching, .get_features = rtl822x_c45_get_features, .config_aneg = rtl822x_c45_config_aneg, -@@ -1635,7 +1651,7 @@ static struct phy_driver realtek_drvs[] +@@ -1639,7 +1655,7 @@ static struct phy_driver realtek_drvs[] .handle_interrupt = rtl8221b_handle_interrupt, .soft_reset = genphy_soft_reset, .probe = rtl822x_probe, diff --git a/target/linux/generic/pending-6.6/720-09-net-phy-realtek-disable-MDIO-broadcast.patch b/target/linux/generic/pending-6.6/720-09-net-phy-realtek-disable-MDIO-broadcast.patch index b2d26a8780..d783b292e8 100644 --- a/target/linux/generic/pending-6.6/720-09-net-phy-realtek-disable-MDIO-broadcast.patch +++ b/target/linux/generic/pending-6.6/720-09-net-phy-realtek-disable-MDIO-broadcast.patch @@ -13,7 +13,7 @@ Signed-off-by: Daniel Golle --- --- a/drivers/net/phy/realtek/realtek_main.c +++ b/drivers/net/phy/realtek/realtek_main.c -@@ -849,6 +849,11 @@ static int rtl822xb_config_init(struct p +@@ -852,6 +852,11 @@ static int rtl822xb_config_init(struct p phydev->host_interfaces) || phydev->interface == PHY_INTERFACE_MODE_SGMII; From 6c15645a12a3ecbb920cb36e109cd6ee63b431ac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=81lvaro=20Fern=C3=A1ndez=20Rojas?= Date: Wed, 23 Apr 2025 09:11:51 +0200 Subject: [PATCH 38/49] kernel: r8101: load module at boot time MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This allows the network interface naming to be stable, free from any possible interaction from external USB network devices that might claim usb* interface names. Signed-off-by: Álvaro Fernández Rojas (cherry picked from commit 7aeb837bf46acdd68b5ed373741be897bbb2067d) --- package/kernel/r8101/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package/kernel/r8101/Makefile b/package/kernel/r8101/Makefile index 2a09855c05..4b528036a2 100644 --- a/package/kernel/r8101/Makefile +++ b/package/kernel/r8101/Makefile @@ -2,7 +2,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=r8101 PKG_VERSION:=1.039.00 -PKG_RELEASE:=2 +PKG_RELEASE:=3 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 PKG_SOURCE_URL:=https://github.com/openwrt/rtl8101/releases/download/$(PKG_VERSION) @@ -20,7 +20,7 @@ define KernelPackage/r8101 TITLE:=Realtek RTL8101 PCI Fast Ethernet driver DEPENDS:=@PCI_SUPPORT +kmod-libphy FILES:=$(PKG_BUILD_DIR)/src/r8101.ko - AUTOLOAD:=$(call AutoProbe,r8101) + AUTOLOAD:=$(call AutoProbe,r8101,1) PROVIDES:=kmod-r8169 endef From 7bef5367a7e4575d54fc89a9b6ac1cd0c212c014 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=81lvaro=20Fern=C3=A1ndez=20Rojas?= Date: Wed, 23 Apr 2025 09:17:21 +0200 Subject: [PATCH 39/49] kernel: r8168: load module at boot time MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This allows the network interface naming to be stable, free from any possible interaction from external USB network devices that might claim usb* interface names. Signed-off-by: Álvaro Fernández Rojas (cherry picked from commit 617961403c27733de5e9c11b0b2e6ea44d2dcec4) --- package/kernel/r8168/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package/kernel/r8168/Makefile b/package/kernel/r8168/Makefile index 0b846113df..d35f3dc61c 100644 --- a/package/kernel/r8168/Makefile +++ b/package/kernel/r8168/Makefile @@ -2,7 +2,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=r8168 PKG_VERSION:=8.055.00 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 PKG_SOURCE_URL:=https://github.com/openwrt/rtl8168/releases/download/$(PKG_VERSION) @@ -20,7 +20,7 @@ define KernelPackage/r8168 TITLE:=Realtek RTL8168 PCI Gigabit Ethernet driver DEPENDS:=@PCI_SUPPORT +kmod-libphy FILES:=$(PKG_BUILD_DIR)/src/r8168.ko - AUTOLOAD:=$(call AutoProbe,r8168) + AUTOLOAD:=$(call AutoProbe,r8168,1) PROVIDES:=kmod-r8169 endef From 50cf9bbf173b70458566369350268f379e8f199b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=81lvaro=20Fern=C3=A1ndez=20Rojas?= Date: Wed, 23 Apr 2025 09:18:22 +0200 Subject: [PATCH 40/49] kernel: r8125: load module at boot time MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This allows the network interface naming to be stable, free from any possible interaction from external USB network devices that might claim usb* interface names. Signed-off-by: Pavel Kubelun Link: https://github.com/openwrt/openwrt/pull/18509 Signed-off-by: Álvaro Fernández Rojas (cherry picked from commit ce9f539672d2d55cea97e47a0e33459179237781) --- package/kernel/r8125/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package/kernel/r8125/Makefile b/package/kernel/r8125/Makefile index 232cf695b8..9dde19437a 100644 --- a/package/kernel/r8125/Makefile +++ b/package/kernel/r8125/Makefile @@ -2,7 +2,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=r8125 PKG_VERSION:=9.015.00 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 PKG_SOURCE_URL:=https://github.com/openwrt/rtl8125/releases/download/$(PKG_VERSION) @@ -20,7 +20,7 @@ define KernelPackage/r8125 TITLE:=Realtek RTL8125 PCI 2.5 Gigabit Ethernet driver DEPENDS:=@PCI_SUPPORT +kmod-libphy FILES:=$(PKG_BUILD_DIR)/src/r8125.ko - AUTOLOAD:=$(call AutoProbe,r8125) + AUTOLOAD:=$(call AutoProbe,r8125,1) PROVIDES:=kmod-r8169 VARIANT:=regular endef From 111d88e896b7ef778812c1d67fa1433c07fc116d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=81lvaro=20Fern=C3=A1ndez=20Rojas?= Date: Wed, 23 Apr 2025 09:20:18 +0200 Subject: [PATCH 41/49] kernel: r8126: load module at boot time MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This allows the network interface naming to be stable, free from any possible interaction from external USB network devices that might claim usb* interface names. Signed-off-by: Álvaro Fernández Rojas (cherry picked from commit 9bb151d0c635241ceaa29525668cd225a10494d0) --- package/kernel/r8126/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package/kernel/r8126/Makefile b/package/kernel/r8126/Makefile index da43697bfb..9f0f074d62 100644 --- a/package/kernel/r8126/Makefile +++ b/package/kernel/r8126/Makefile @@ -2,7 +2,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=r8126 PKG_VERSION:=10.015.00 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 PKG_SOURCE_URL:=https://github.com/openwrt/rtl8126/releases/download/$(PKG_VERSION) @@ -20,7 +20,7 @@ define KernelPackage/r8126 TITLE:=Realtek RTL8126 PCI 5 Gigabit Ethernet driver DEPENDS:=@PCI_SUPPORT +kmod-libphy FILES:=$(PKG_BUILD_DIR)/src/r8126.ko - AUTOLOAD:=$(call AutoProbe,r8126) + AUTOLOAD:=$(call AutoProbe,r8126,1) PROVIDES:=kmod-r8169 VARIANT:=regular endef From 31292ddc10b188fe12432636cd3e0a0a4ff43537 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=81lvaro=20Fern=C3=A1ndez=20Rojas?= Date: Wed, 23 Apr 2025 09:20:43 +0200 Subject: [PATCH 42/49] kernel: r8127: load module at boot time MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This allows the network interface naming to be stable, free from any possible interaction from external USB network devices that might claim usb* interface names. Signed-off-by: Álvaro Fernández Rojas (cherry picked from commit b5680bd11339b2ed489e1deeaaa2a3432691490a) --- package/kernel/r8127/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package/kernel/r8127/Makefile b/package/kernel/r8127/Makefile index bb0c5e0a6c..b4b1c49eb5 100644 --- a/package/kernel/r8127/Makefile +++ b/package/kernel/r8127/Makefile @@ -2,7 +2,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=r8127 PKG_VERSION:=11.014.00 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 PKG_SOURCE_URL:=https://github.com/openwrt/rtl8127/releases/download/$(PKG_VERSION) @@ -20,7 +20,7 @@ define KernelPackage/r8127 TITLE:=Realtek RTL8127 PCI 10 Gigabit Ethernet driver DEPENDS:=@PCI_SUPPORT +kmod-libphy FILES:=$(PKG_BUILD_DIR)/src/r8127.ko - AUTOLOAD:=$(call AutoProbe,r8127) + AUTOLOAD:=$(call AutoProbe,r8127,1) PROVIDES:=kmod-r8169 VARIANT:=regular endef From ec82f459c9a5d7ed8f55bf5a175e80e8f57c3d63 Mon Sep 17 00:00:00 2001 From: Pavel Kubelun Date: Wed, 16 Apr 2025 21:07:32 +0300 Subject: [PATCH 43/49] kernel: r8125: disable ASPM MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Disable ASPM support for this NIC, fixing strange behavior problems, such as increased latency, strange uneven throughput, etc. With this option disabled the NIC achieves stable performance. Upsteam r8169 driver disables ASPM by default for this NIC. Signed-off-by: Pavel Kubelun Link: https://github.com/openwrt/openwrt/pull/18509 [bump release, fix commit description, split 2nd tx queue part] Signed-off-by: Álvaro Fernández Rojas (cherry picked from commit f99b39fd0caf4ba5f1be06841b772557243c4546) --- package/kernel/r8125/Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/package/kernel/r8125/Makefile b/package/kernel/r8125/Makefile index 9dde19437a..6a97143e17 100644 --- a/package/kernel/r8125/Makefile +++ b/package/kernel/r8125/Makefile @@ -2,7 +2,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=r8125 PKG_VERSION:=9.015.00 -PKG_RELEASE:=2 +PKG_RELEASE:=3 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 PKG_SOURCE_URL:=https://github.com/openwrt/rtl8125/releases/download/$(PKG_VERSION) @@ -23,6 +23,7 @@ define KernelPackage/r8125 AUTOLOAD:=$(call AutoProbe,r8125,1) PROVIDES:=kmod-r8169 VARIANT:=regular + PKG_MAKE_FLAGS += CONFIG_ASPM=n endef define KernelPackage/r8125-rss From a42c06d674769dcb194658cfcec4387b6dc5132a Mon Sep 17 00:00:00 2001 From: Pavel Kubelun Date: Wed, 16 Apr 2025 21:07:32 +0300 Subject: [PATCH 44/49] kernel: r8125: rss: enable ENABLE_MULTIPLE_TX_QUEUE MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit We need both ENABLE_RSS_SUPPORT and ENABLE_MULTIPLE_TX_QUEUE in order to support multiple RX and TX queues. Signed-off-by: Pavel Kubelun Link: https://github.com/openwrt/openwrt/pull/18509 [bump release, improve commit description and package changes] Signed-off-by: Álvaro Fernández Rojas (cherry picked from commit d127963a4676909d2f58eb54859925a25cdaa063) --- package/kernel/r8125/Makefile | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/package/kernel/r8125/Makefile b/package/kernel/r8125/Makefile index 6a97143e17..70b58198cc 100644 --- a/package/kernel/r8125/Makefile +++ b/package/kernel/r8125/Makefile @@ -2,7 +2,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=r8125 PKG_VERSION:=9.015.00 -PKG_RELEASE:=3 +PKG_RELEASE:=4 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 PKG_SOURCE_URL:=https://github.com/openwrt/rtl8125/releases/download/$(PKG_VERSION) @@ -34,7 +34,9 @@ $(call KernelPackage/r8125) endef ifeq ($(BUILD_VARIANT),rss) - PKG_MAKE_FLAGS += ENABLE_RSS_SUPPORT=y + PKG_MAKE_FLAGS += \ + ENABLE_MULTIPLE_TX_QUEUE=y \ + ENABLE_RSS_SUPPORT=y endif define Build/Compile From c46ee416be7d50804143b92a217eb397d3e6797a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=81lvaro=20Fern=C3=A1ndez=20Rojas?= Date: Wed, 23 Apr 2025 09:37:43 +0200 Subject: [PATCH 45/49] kernel: r8126: rss: enable ENABLE_MULTIPLE_TX_QUEUE MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit We need both ENABLE_RSS_SUPPORT and ENABLE_MULTIPLE_TX_QUEUE in order to support multiple RX and TX queues. Signed-off-by: Álvaro Fernández Rojas (cherry picked from commit a3e51a395652ec6b8b827de396b56ebc576d81e8) --- package/kernel/r8126/Makefile | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/package/kernel/r8126/Makefile b/package/kernel/r8126/Makefile index 9f0f074d62..cce9045b23 100644 --- a/package/kernel/r8126/Makefile +++ b/package/kernel/r8126/Makefile @@ -2,7 +2,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=r8126 PKG_VERSION:=10.015.00 -PKG_RELEASE:=2 +PKG_RELEASE:=3 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 PKG_SOURCE_URL:=https://github.com/openwrt/rtl8126/releases/download/$(PKG_VERSION) @@ -33,7 +33,9 @@ $(call KernelPackage/r8126) endef ifeq ($(BUILD_VARIANT),rss) - PKG_MAKE_FLAGS += ENABLE_RSS_SUPPORT=y + PKG_MAKE_FLAGS += \ + ENABLE_MULTIPLE_TX_QUEUE=y \ + ENABLE_RSS_SUPPORT=y endif define Build/Compile From da59bc0a6bdf9d3ec3de5f017ccf73f81e9b64cd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=81lvaro=20Fern=C3=A1ndez=20Rojas?= Date: Wed, 23 Apr 2025 09:38:04 +0200 Subject: [PATCH 46/49] kernel: r8127: rss: enable ENABLE_MULTIPLE_TX_QUEUE MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit We need both ENABLE_RSS_SUPPORT and ENABLE_MULTIPLE_TX_QUEUE in order to support multiple RX and TX queues. Signed-off-by: Álvaro Fernández Rojas (cherry picked from commit 7615de6ef0830d3917de66aaf4d5df6d3ff45c61) --- package/kernel/r8127/Makefile | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/package/kernel/r8127/Makefile b/package/kernel/r8127/Makefile index b4b1c49eb5..4a1035cc4c 100644 --- a/package/kernel/r8127/Makefile +++ b/package/kernel/r8127/Makefile @@ -2,7 +2,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=r8127 PKG_VERSION:=11.014.00 -PKG_RELEASE:=2 +PKG_RELEASE:=3 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 PKG_SOURCE_URL:=https://github.com/openwrt/rtl8127/releases/download/$(PKG_VERSION) @@ -33,7 +33,9 @@ $(call KernelPackage/r8127) endef ifeq ($(BUILD_VARIANT),rss) - PKG_MAKE_FLAGS += ENABLE_RSS_SUPPORT=y + PKG_MAKE_FLAGS += \ + ENABLE_MULTIPLE_TX_QUEUE=y \ + ENABLE_RSS_SUPPORT=y endif define Build/Compile From 49901245e5a958d5f955129006b2481273e71064 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=81lvaro=20Fern=C3=A1ndez=20Rojas?= Date: Wed, 23 Apr 2025 09:39:24 +0200 Subject: [PATCH 47/49] kernel: r8168: add RSS variant MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Instead of enabling RSS support, let's introduce a variant and let users choose between both variants since it can cause network issues. Signed-off-by: Álvaro Fernández Rojas (cherry picked from commit cb3fc1aef9c01f23d7f740bf0c5f4b432d6d0e79) --- package/kernel/r8168/Makefile | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/package/kernel/r8168/Makefile b/package/kernel/r8168/Makefile index d35f3dc61c..98cf5ea35a 100644 --- a/package/kernel/r8168/Makefile +++ b/package/kernel/r8168/Makefile @@ -2,7 +2,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=r8168 PKG_VERSION:=8.055.00 -PKG_RELEASE:=2 +PKG_RELEASE:=3 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 PKG_SOURCE_URL:=https://github.com/openwrt/rtl8168/releases/download/$(PKG_VERSION) @@ -22,8 +22,22 @@ define KernelPackage/r8168 FILES:=$(PKG_BUILD_DIR)/src/r8168.ko AUTOLOAD:=$(call AutoProbe,r8168,1) PROVIDES:=kmod-r8169 + VARIANT:=regular endef +define KernelPackage/r8168-rss +$(call KernelPackage/r8168) + CONFLICTS:=kmod-r8168 + TITLE+= (RSS) + VARIANT:=rss +endef + +ifeq ($(BUILD_VARIANT),rss) + PKG_MAKE_FLAGS += \ + ENABLE_MULTIPLE_TX_QUEUE=y \ + ENABLE_RSS_SUPPORT=y +endif + define Build/Compile +$(KERNEL_MAKE) $(PKG_JOBS) \ M="$(PKG_BUILD_DIR)/src" \ @@ -31,3 +45,4 @@ define Build/Compile endef $(eval $(call KernelPackage,r8168)) +$(eval $(call KernelPackage,r8168-rss)) From 3a481ae21bdc504f7f0325151ee0cb4f25dfd2cd Mon Sep 17 00:00:00 2001 From: Weijie Gao Date: Wed, 23 Apr 2025 02:15:09 +0800 Subject: [PATCH 48/49] toolchain: mold: add PKG_NAME to Makefile In include/host-build.mk, HOST_BUILD_DIR is set by default value: HOST_BUILD_DIR ?= $(BUILD_DIR_HOST)/$(PKG_NAME) However the mold package has no PKG_NAME set at all. This means the HOST_BUILD_DIR is identical to $(BUILD_DIR_HOST). In the Host/Prepare stage, by default, the $(HOST_BUILD_DIR) will be deleted at first unconditionally. Since HOST_BUILD_DIR is identical to $(BUILD_DIR_HOST), the entire build_dir/toolchain-* directory will be removed and this will cause build failure. Adding PKG_NAME:=ld.mold can solve this issue. Signed-off-by: Weijie Gao Link: https://github.com/openwrt/openwrt/pull/18567 Signed-off-by: Robert Marko (cherry picked from commit b9cb07eced1de81b647608ee89a95d925c7c12a8) --- toolchain/mold/Makefile | 3 +++ 1 file changed, 3 insertions(+) diff --git a/toolchain/mold/Makefile b/toolchain/mold/Makefile index a2acba89d3..60361841aa 100644 --- a/toolchain/mold/Makefile +++ b/toolchain/mold/Makefile @@ -3,6 +3,9 @@ # See /LICENSE for more information. # include $(TOPDIR)/rules.mk + +PKG_NAME:=ld.mold + include $(INCLUDE_DIR)/toolchain-build.mk define Host/Configure From 3b3ff50dcda5fa8c3ac72a5f49c951cc1e863489 Mon Sep 17 00:00:00 2001 From: Tianling Shen Date: Fri, 25 Apr 2025 19:01:29 +0800 Subject: [PATCH 49/49] kernel: add missing Kconfig Signed-off-by: Tianling Shen (cherry picked from commit b61d5356a5cf5022663f8ab466eceec4152207fa) --- target/linux/generic/config-6.6 | 1 + 1 file changed, 1 insertion(+) diff --git a/target/linux/generic/config-6.6 b/target/linux/generic/config-6.6 index afb3da85c9..91935ec730 100644 --- a/target/linux/generic/config-6.6 +++ b/target/linux/generic/config-6.6 @@ -4916,6 +4916,7 @@ CONFIG_RCU_STALL_COMMON=y # CONFIG_READABLE_ASM is not set # CONFIG_READ_ONLY_THP_FOR_FS is not set # CONFIG_REALTEK_PHY is not set +# CONFIG_REALTEK_PHY_HWMON is not set # CONFIG_REDWOOD is not set # CONFIG_REED_SOLOMON is not set # CONFIG_REED_SOLOMON_DEC8 is not set