From 6a64eb2664c13bc7d6800747066603c27fcad8e0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= Date: Mon, 7 Nov 2022 23:39:52 +0100 Subject: [PATCH 01/62] kernel: split out mtd hack for CONFIG_FIT_PARTITION + rootfs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This is some hack on top of our old hack. Use separated patch for it so it's easier to understand and actually possible to describe. We should ideally get rid of this (and we actually did with kernels 5.15+). Signed-off-by: Rafał Miłecki --- .../420-mtd-set-rootfs-to-be-root-dev.patch | 5 +---- ...-root-on-targets-with-CONFIG_FIT_PAR.patch | 19 +++++++++++++++++++ ...rs-add-nvmem-support-to-cmdlinepart.patch} | 0 3 files changed, 20 insertions(+), 4 deletions(-) create mode 100644 target/linux/generic/hack-5.10/421-mtd-fix-squashfs-root-on-targets-with-CONFIG_FIT_PAR.patch rename target/linux/generic/hack-5.10/{421-drivers-mtd-parsers-add-nvmem-support-to-cmdlinepart.patch => 422-drivers-mtd-parsers-add-nvmem-support-to-cmdlinepart.patch} (100%) diff --git a/target/linux/generic/hack-5.10/420-mtd-set-rootfs-to-be-root-dev.patch b/target/linux/generic/hack-5.10/420-mtd-set-rootfs-to-be-root-dev.patch index fa3b175dcf..a70d8af4c2 100644 --- a/target/linux/generic/hack-5.10/420-mtd-set-rootfs-to-be-root-dev.patch +++ b/target/linux/generic/hack-5.10/420-mtd-set-rootfs-to-be-root-dev.patch @@ -20,7 +20,7 @@ Signed-off-by: Gabor Juhos #include #include -@@ -759,6 +760,19 @@ int add_mtd_device(struct mtd_info *mtd) +@@ -759,6 +760,16 @@ int add_mtd_device(struct mtd_info *mtd) of this try_ nonsense, and no bitching about it either. :) */ __module_get(THIS_MODULE); @@ -31,9 +31,6 @@ Signed-off-by: Gabor Juhos + unsigned int index = mtd->index; + pr_notice("mtd: device %d (%s) set to be root filesystem\n", + mtd->index, mtd->name); -+#ifdef CONFIG_FIT_PARTITION -+ index <<= 2; -+#endif + ROOT_DEV = MKDEV(MTD_BLOCK_MAJOR, index); + } + diff --git a/target/linux/generic/hack-5.10/421-mtd-fix-squashfs-root-on-targets-with-CONFIG_FIT_PAR.patch b/target/linux/generic/hack-5.10/421-mtd-fix-squashfs-root-on-targets-with-CONFIG_FIT_PAR.patch new file mode 100644 index 0000000000..2f7da2aaba --- /dev/null +++ b/target/linux/generic/hack-5.10/421-mtd-fix-squashfs-root-on-targets-with-CONFIG_FIT_PAR.patch @@ -0,0 +1,19 @@ +From: Felix Fietkau +Date: Sat Apr 10 17:00:57 2021 +0200 +Subject: [PATCH] mtd: fix squashfs root on targets with CONFIG_FIT_PARTITION + +Fix assumption about the block device index +--- + +--- a/drivers/mtd/mtdcore.c ++++ b/drivers/mtd/mtdcore.c +@@ -767,6 +767,9 @@ int add_mtd_device(struct mtd_info *mtd) + unsigned int index = mtd->index; + pr_notice("mtd: device %d (%s) set to be root filesystem\n", + mtd->index, mtd->name); ++#ifdef CONFIG_FIT_PARTITION ++ index <<= 2; ++#endif + ROOT_DEV = MKDEV(MTD_BLOCK_MAJOR, index); + } + diff --git a/target/linux/generic/hack-5.10/421-drivers-mtd-parsers-add-nvmem-support-to-cmdlinepart.patch b/target/linux/generic/hack-5.10/422-drivers-mtd-parsers-add-nvmem-support-to-cmdlinepart.patch similarity index 100% rename from target/linux/generic/hack-5.10/421-drivers-mtd-parsers-add-nvmem-support-to-cmdlinepart.patch rename to target/linux/generic/hack-5.10/422-drivers-mtd-parsers-add-nvmem-support-to-cmdlinepart.patch From d33e49857e3ad76586ebe55334996b15cd45ca1b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= Date: Mon, 7 Nov 2022 19:24:48 +0100 Subject: [PATCH 02/62] kernel: backport support for "linux,rootfs" in DT MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This DT property allows marking flash partition that Linux should use as a root device. It's useful for devices that don't use U-Boot and cmdline parser for partitioning. It may be used with "fixed-partitions" or some dynamic partitioning based on flash content. Signed-off-by: Rafał Miłecki --- ...or-support-mtd-name-from-device-tree.patch | 2 +- ...or-support-mtd-name-from-device-tree.patch | 2 +- ...T_DEV-for-partitions-marked-as-rootf.patch | 47 +++++++++++++++++++ ...T_DEV-for-partitions-marked-as-rootf.patch | 47 +++++++++++++++++++ ...rans-call-add-disks-after-mtd-device.patch | 4 +- .../420-mtd-set-rootfs-to-be-root-dev.patch | 39 --------------- ...upport-OpenWrt-s-MTD_ROOTFS_ROOT_DEV.patch | 24 ++++++++++ ...-root-on-targets-with-CONFIG_FIT_PAR.patch | 22 +++++++-- ...rans-call-add-disks-after-mtd-device.patch | 4 +- .../420-mtd-set-rootfs-to-be-root-dev.patch | 39 --------------- ...upport-OpenWrt-s-MTD_ROOTFS_ROOT_DEV.patch | 24 ++++++++++ ...support-for-minor-aligned-partitions.patch | 4 +- ...support-for-minor-aligned-partitions.patch | 4 +- ...or-support-mtd-name-from-device-tree.patch | 2 +- 14 files changed, 170 insertions(+), 94 deletions(-) create mode 100644 target/linux/generic/backport-5.10/418-v6.2-mtd-core-set-ROOT_DEV-for-partitions-marked-as-rootf.patch create mode 100644 target/linux/generic/backport-5.15/408-v6.2-mtd-core-set-ROOT_DEV-for-partitions-marked-as-rootf.patch delete mode 100644 target/linux/generic/hack-5.10/420-mtd-set-rootfs-to-be-root-dev.patch create mode 100644 target/linux/generic/hack-5.10/420-mtd-support-OpenWrt-s-MTD_ROOTFS_ROOT_DEV.patch delete mode 100644 target/linux/generic/hack-5.15/420-mtd-set-rootfs-to-be-root-dev.patch create mode 100644 target/linux/generic/hack-5.15/420-mtd-support-OpenWrt-s-MTD_ROOTFS_ROOT_DEV.patch diff --git a/target/linux/ath79/patches-5.10/401-mtd-nor-support-mtd-name-from-device-tree.patch b/target/linux/ath79/patches-5.10/401-mtd-nor-support-mtd-name-from-device-tree.patch index 5b14d1f8cb..cf8ef1b880 100644 --- a/target/linux/ath79/patches-5.10/401-mtd-nor-support-mtd-name-from-device-tree.patch +++ b/target/linux/ath79/patches-5.10/401-mtd-nor-support-mtd-name-from-device-tree.patch @@ -34,7 +34,7 @@ Signed-off-by: Abhimanyu Vishwakarma mtd->type = MTD_NORFLASH; --- a/drivers/mtd/mtdcore.c +++ b/drivers/mtd/mtdcore.c -@@ -843,6 +843,17 @@ out_error: +@@ -848,6 +848,17 @@ out_error: */ static void mtd_set_dev_defaults(struct mtd_info *mtd) { diff --git a/target/linux/ath79/patches-5.15/401-mtd-nor-support-mtd-name-from-device-tree.patch b/target/linux/ath79/patches-5.15/401-mtd-nor-support-mtd-name-from-device-tree.patch index 5ff2a61c7a..98939ac9e3 100644 --- a/target/linux/ath79/patches-5.15/401-mtd-nor-support-mtd-name-from-device-tree.patch +++ b/target/linux/ath79/patches-5.15/401-mtd-nor-support-mtd-name-from-device-tree.patch @@ -34,7 +34,7 @@ Signed-off-by: Abhimanyu Vishwakarma mtd->type = MTD_NORFLASH; --- a/drivers/mtd/mtdcore.c +++ b/drivers/mtd/mtdcore.c -@@ -843,6 +843,17 @@ out_error: +@@ -845,6 +845,17 @@ out_error: */ static void mtd_set_dev_defaults(struct mtd_info *mtd) { diff --git a/target/linux/generic/backport-5.10/418-v6.2-mtd-core-set-ROOT_DEV-for-partitions-marked-as-rootf.patch b/target/linux/generic/backport-5.10/418-v6.2-mtd-core-set-ROOT_DEV-for-partitions-marked-as-rootf.patch new file mode 100644 index 0000000000..ac5b438e6d --- /dev/null +++ b/target/linux/generic/backport-5.10/418-v6.2-mtd-core-set-ROOT_DEV-for-partitions-marked-as-rootf.patch @@ -0,0 +1,47 @@ +From 26422ac78e9d8767bd4aabfbae616b15edbf6a1b Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= +Date: Sat, 22 Oct 2022 23:13:18 +0200 +Subject: [PATCH] mtd: core: set ROOT_DEV for partitions marked as rootfs in DT +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +This adds support for "linux,rootfs" binding that is used to mark flash +partition containing rootfs. It's useful for devices using device tree +that don't have bootloader passing root info in cmdline. + +Signed-off-by: Rafał Miłecki +Signed-off-by: Miquel Raynal +Link: https://lore.kernel.org/linux-mtd/20221022211318.32009-2-zajec5@gmail.com +--- + drivers/mtd/mtdcore.c | 12 ++++++++++++ + 1 file changed, 12 insertions(+) + +--- a/drivers/mtd/mtdcore.c ++++ b/drivers/mtd/mtdcore.c +@@ -28,6 +28,7 @@ + #include + #include + #include ++#include + + #include + #include +@@ -743,6 +744,17 @@ int add_mtd_device(struct mtd_info *mtd) + not->add(mtd); + + mutex_unlock(&mtd_table_mutex); ++ ++ if (of_find_property(mtd_get_of_node(mtd), "linux,rootfs", NULL)) { ++ if (IS_BUILTIN(CONFIG_MTD)) { ++ pr_info("mtd: setting mtd%d (%s) as root device\n", mtd->index, mtd->name); ++ ROOT_DEV = MKDEV(MTD_BLOCK_MAJOR, mtd->index); ++ } else { ++ pr_warn("mtd: can't set mtd%d (%s) as root device - mtd must be builtin\n", ++ mtd->index, mtd->name); ++ } ++ } ++ + /* We _know_ we aren't being removed, because + our caller is still holding us here. So none + of this try_ nonsense, and no bitching about it diff --git a/target/linux/generic/backport-5.15/408-v6.2-mtd-core-set-ROOT_DEV-for-partitions-marked-as-rootf.patch b/target/linux/generic/backport-5.15/408-v6.2-mtd-core-set-ROOT_DEV-for-partitions-marked-as-rootf.patch new file mode 100644 index 0000000000..60b1764252 --- /dev/null +++ b/target/linux/generic/backport-5.15/408-v6.2-mtd-core-set-ROOT_DEV-for-partitions-marked-as-rootf.patch @@ -0,0 +1,47 @@ +From 26422ac78e9d8767bd4aabfbae616b15edbf6a1b Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= +Date: Sat, 22 Oct 2022 23:13:18 +0200 +Subject: [PATCH] mtd: core: set ROOT_DEV for partitions marked as rootfs in DT +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +This adds support for "linux,rootfs" binding that is used to mark flash +partition containing rootfs. It's useful for devices using device tree +that don't have bootloader passing root info in cmdline. + +Signed-off-by: Rafał Miłecki +Signed-off-by: Miquel Raynal +Link: https://lore.kernel.org/linux-mtd/20221022211318.32009-2-zajec5@gmail.com +--- + drivers/mtd/mtdcore.c | 12 ++++++++++++ + 1 file changed, 12 insertions(+) + +--- a/drivers/mtd/mtdcore.c ++++ b/drivers/mtd/mtdcore.c +@@ -28,6 +28,7 @@ + #include + #include + #include ++#include + + #include + #include +@@ -746,6 +747,17 @@ int add_mtd_device(struct mtd_info *mtd) + not->add(mtd); + + mutex_unlock(&mtd_table_mutex); ++ ++ if (of_find_property(mtd_get_of_node(mtd), "linux,rootfs", NULL)) { ++ if (IS_BUILTIN(CONFIG_MTD)) { ++ pr_info("mtd: setting mtd%d (%s) as root device\n", mtd->index, mtd->name); ++ ROOT_DEV = MKDEV(MTD_BLOCK_MAJOR, mtd->index); ++ } else { ++ pr_warn("mtd: can't set mtd%d (%s) as root device - mtd must be builtin\n", ++ mtd->index, mtd->name); ++ } ++ } ++ + /* We _know_ we aren't being removed, because + our caller is still holding us here. So none + of this try_ nonsense, and no bitching about it diff --git a/target/linux/generic/hack-5.10/402-mtd-blktrans-call-add-disks-after-mtd-device.patch b/target/linux/generic/hack-5.10/402-mtd-blktrans-call-add-disks-after-mtd-device.patch index a650320cd0..dc342da831 100644 --- a/target/linux/generic/hack-5.10/402-mtd-blktrans-call-add-disks-after-mtd-device.patch +++ b/target/linux/generic/hack-5.10/402-mtd-blktrans-call-add-disks-after-mtd-device.patch @@ -69,7 +69,7 @@ Signed-off-by: Daniel Golle unsigned long flags; --- a/drivers/mtd/mtdcore.c +++ b/drivers/mtd/mtdcore.c -@@ -31,6 +31,7 @@ +@@ -32,6 +32,7 @@ #include #include @@ -77,7 +77,7 @@ Signed-off-by: Daniel Golle #include "mtdcore.h" -@@ -916,6 +917,8 @@ int mtd_device_parse_register(struct mtd +@@ -928,6 +929,8 @@ int mtd_device_parse_register(struct mtd register_reboot_notifier(&mtd->reboot_notifier); } diff --git a/target/linux/generic/hack-5.10/420-mtd-set-rootfs-to-be-root-dev.patch b/target/linux/generic/hack-5.10/420-mtd-set-rootfs-to-be-root-dev.patch deleted file mode 100644 index a70d8af4c2..0000000000 --- a/target/linux/generic/hack-5.10/420-mtd-set-rootfs-to-be-root-dev.patch +++ /dev/null @@ -1,39 +0,0 @@ -From: Gabor Juhos -Subject: kernel/3.1[02]: move MTD root device setup code to mtdcore - -The current code only allows to automatically set -root device on MTD partitions. Move the code to MTD -core to allow to use it with all MTD devices. - -Signed-off-by: Gabor Juhos ---- - drivers/mtd/mtdcore.c | 10 ++++++++++ - 1 file changed, 10 insertions(+) - ---- a/drivers/mtd/mtdcore.c -+++ b/drivers/mtd/mtdcore.c -@@ -27,6 +27,7 @@ - #include - #include - #include -+#include - #include - - #include -@@ -759,6 +760,16 @@ int add_mtd_device(struct mtd_info *mtd) - of this try_ nonsense, and no bitching about it - either. :) */ - __module_get(THIS_MODULE); -+ -+ if (!strcmp(mtd->name, "rootfs") && -+ IS_ENABLED(CONFIG_MTD_ROOTFS_ROOT_DEV) && -+ ROOT_DEV == 0) { -+ unsigned int index = mtd->index; -+ pr_notice("mtd: device %d (%s) set to be root filesystem\n", -+ mtd->index, mtd->name); -+ ROOT_DEV = MKDEV(MTD_BLOCK_MAJOR, index); -+ } -+ - return 0; - - fail_nvmem_add: diff --git a/target/linux/generic/hack-5.10/420-mtd-support-OpenWrt-s-MTD_ROOTFS_ROOT_DEV.patch b/target/linux/generic/hack-5.10/420-mtd-support-OpenWrt-s-MTD_ROOTFS_ROOT_DEV.patch new file mode 100644 index 0000000000..89ac3cb9fe --- /dev/null +++ b/target/linux/generic/hack-5.10/420-mtd-support-OpenWrt-s-MTD_ROOTFS_ROOT_DEV.patch @@ -0,0 +1,24 @@ +From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= +Date: Mon, 7 Nov 2022 23:48:24 +0100 +Subject: [PATCH] mtd: support OpenWrt's MTD_ROOTFS_ROOT_DEV +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +This allows setting ROOT_DEV to MTD partition named "rootfs". + +Signed-off-by: Rafał Miłecki +--- + +--- a/drivers/mtd/mtdcore.c ++++ b/drivers/mtd/mtdcore.c +@@ -756,7 +756,8 @@ int add_mtd_device(struct mtd_info *mtd) + + mutex_unlock(&mtd_table_mutex); + +- if (of_find_property(mtd_get_of_node(mtd), "linux,rootfs", NULL)) { ++ if (of_find_property(mtd_get_of_node(mtd), "linux,rootfs", NULL) || ++ (IS_ENABLED(CONFIG_MTD_ROOTFS_ROOT_DEV) && !strcmp(mtd->name, "rootfs") && ROOT_DEV == 0)) { + if (IS_BUILTIN(CONFIG_MTD)) { + pr_info("mtd: setting mtd%d (%s) as root device\n", mtd->index, mtd->name); + ROOT_DEV = MKDEV(MTD_BLOCK_MAJOR, mtd->index); diff --git a/target/linux/generic/hack-5.10/421-mtd-fix-squashfs-root-on-targets-with-CONFIG_FIT_PAR.patch b/target/linux/generic/hack-5.10/421-mtd-fix-squashfs-root-on-targets-with-CONFIG_FIT_PAR.patch index 2f7da2aaba..1cd0efd624 100644 --- a/target/linux/generic/hack-5.10/421-mtd-fix-squashfs-root-on-targets-with-CONFIG_FIT_PAR.patch +++ b/target/linux/generic/hack-5.10/421-mtd-fix-squashfs-root-on-targets-with-CONFIG_FIT_PAR.patch @@ -7,13 +7,25 @@ Fix assumption about the block device index --- a/drivers/mtd/mtdcore.c +++ b/drivers/mtd/mtdcore.c -@@ -767,6 +767,9 @@ int add_mtd_device(struct mtd_info *mtd) - unsigned int index = mtd->index; - pr_notice("mtd: device %d (%s) set to be root filesystem\n", - mtd->index, mtd->name); +@@ -758,12 +758,18 @@ int add_mtd_device(struct mtd_info *mtd) + + if (of_find_property(mtd_get_of_node(mtd), "linux,rootfs", NULL) || + (IS_ENABLED(CONFIG_MTD_ROOTFS_ROOT_DEV) && !strcmp(mtd->name, "rootfs") && ROOT_DEV == 0)) { ++ unsigned int index = mtd->index; ++ +#ifdef CONFIG_FIT_PARTITION + index <<= 2; +#endif - ROOT_DEV = MKDEV(MTD_BLOCK_MAJOR, index); ++ + if (IS_BUILTIN(CONFIG_MTD)) { +- pr_info("mtd: setting mtd%d (%s) as root device\n", mtd->index, mtd->name); +- ROOT_DEV = MKDEV(MTD_BLOCK_MAJOR, mtd->index); ++ pr_info("mtd: setting mtd%d (%s) as root device\n", index, mtd->name); ++ ROOT_DEV = MKDEV(MTD_BLOCK_MAJOR, index); + } else { + pr_warn("mtd: can't set mtd%d (%s) as root device - mtd must be builtin\n", +- mtd->index, mtd->name); ++ index, mtd->name); + } } diff --git a/target/linux/generic/hack-5.15/402-mtd-blktrans-call-add-disks-after-mtd-device.patch b/target/linux/generic/hack-5.15/402-mtd-blktrans-call-add-disks-after-mtd-device.patch index dcb1aaa6e4..65772cc195 100644 --- a/target/linux/generic/hack-5.15/402-mtd-blktrans-call-add-disks-after-mtd-device.patch +++ b/target/linux/generic/hack-5.15/402-mtd-blktrans-call-add-disks-after-mtd-device.patch @@ -69,7 +69,7 @@ Signed-off-by: Daniel Golle unsigned long flags; --- a/drivers/mtd/mtdcore.c +++ b/drivers/mtd/mtdcore.c -@@ -31,6 +31,7 @@ +@@ -32,6 +32,7 @@ #include #include @@ -77,7 +77,7 @@ Signed-off-by: Daniel Golle #include "mtdcore.h" -@@ -1067,6 +1068,8 @@ int mtd_device_parse_register(struct mtd +@@ -1079,6 +1080,8 @@ int mtd_device_parse_register(struct mtd ret = mtd_otp_nvmem_add(mtd); diff --git a/target/linux/generic/hack-5.15/420-mtd-set-rootfs-to-be-root-dev.patch b/target/linux/generic/hack-5.15/420-mtd-set-rootfs-to-be-root-dev.patch deleted file mode 100644 index f3004b60fd..0000000000 --- a/target/linux/generic/hack-5.15/420-mtd-set-rootfs-to-be-root-dev.patch +++ /dev/null @@ -1,39 +0,0 @@ -From: Gabor Juhos -Subject: kernel/3.1[02]: move MTD root device setup code to mtdcore - -The current code only allows to automatically set -root device on MTD partitions. Move the code to MTD -core to allow to use it with all MTD devices. - -Signed-off-by: Gabor Juhos ---- - drivers/mtd/mtdcore.c | 10 ++++++++++ - 1 file changed, 10 insertions(+) - ---- a/drivers/mtd/mtdcore.c -+++ b/drivers/mtd/mtdcore.c -@@ -27,6 +27,7 @@ - #include - #include - #include -+#include - #include - - #include -@@ -762,6 +763,16 @@ int add_mtd_device(struct mtd_info *mtd) - of this try_ nonsense, and no bitching about it - either. :) */ - __module_get(THIS_MODULE); -+ -+ if (!strcmp(mtd->name, "rootfs") && -+ IS_ENABLED(CONFIG_MTD_ROOTFS_ROOT_DEV) && -+ ROOT_DEV == 0) { -+ unsigned int index = mtd->index; -+ pr_notice("mtd: device %d (%s) set to be root filesystem\n", -+ mtd->index, mtd->name); -+ ROOT_DEV = MKDEV(MTD_BLOCK_MAJOR, index); -+ } -+ - return 0; - - fail_nvmem_add: diff --git a/target/linux/generic/hack-5.15/420-mtd-support-OpenWrt-s-MTD_ROOTFS_ROOT_DEV.patch b/target/linux/generic/hack-5.15/420-mtd-support-OpenWrt-s-MTD_ROOTFS_ROOT_DEV.patch new file mode 100644 index 0000000000..15531df49e --- /dev/null +++ b/target/linux/generic/hack-5.15/420-mtd-support-OpenWrt-s-MTD_ROOTFS_ROOT_DEV.patch @@ -0,0 +1,24 @@ +From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= +Date: Mon, 7 Nov 2022 23:48:24 +0100 +Subject: [PATCH] mtd: support OpenWrt's MTD_ROOTFS_ROOT_DEV +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +This allows setting ROOT_DEV to MTD partition named "rootfs". + +Signed-off-by: Rafał Miłecki +--- + +--- a/drivers/mtd/mtdcore.c ++++ b/drivers/mtd/mtdcore.c +@@ -759,7 +759,8 @@ int add_mtd_device(struct mtd_info *mtd) + + mutex_unlock(&mtd_table_mutex); + +- if (of_find_property(mtd_get_of_node(mtd), "linux,rootfs", NULL)) { ++ if (of_find_property(mtd_get_of_node(mtd), "linux,rootfs", NULL) || ++ (IS_ENABLED(CONFIG_MTD_ROOTFS_ROOT_DEV) && !strcmp(mtd->name, "rootfs") && ROOT_DEV == 0)) { + if (IS_BUILTIN(CONFIG_MTD)) { + pr_info("mtd: setting mtd%d (%s) as root device\n", mtd->index, mtd->name); + ROOT_DEV = MKDEV(MTD_BLOCK_MAJOR, mtd->index); diff --git a/target/linux/generic/pending-5.10/402-mtd-spi-nor-write-support-for-minor-aligned-partitions.patch b/target/linux/generic/pending-5.10/402-mtd-spi-nor-write-support-for-minor-aligned-partitions.patch index 53d5637e41..498876ef2f 100644 --- a/target/linux/generic/pending-5.10/402-mtd-spi-nor-write-support-for-minor-aligned-partitions.patch +++ b/target/linux/generic/pending-5.10/402-mtd-spi-nor-write-support-for-minor-aligned-partitions.patch @@ -80,7 +80,7 @@ Reported-by: Dan Carpenter --- a/drivers/mtd/mtdcore.c +++ b/drivers/mtd/mtdcore.c -@@ -163,6 +163,15 @@ static ssize_t mtd_erasesize_show(struct +@@ -164,6 +164,15 @@ static ssize_t mtd_erasesize_show(struct } static DEVICE_ATTR(erasesize, S_IRUGO, mtd_erasesize_show, NULL); @@ -96,7 +96,7 @@ Reported-by: Dan Carpenter static ssize_t mtd_writesize_show(struct device *dev, struct device_attribute *attr, char *buf) { -@@ -312,6 +321,7 @@ static struct attribute *mtd_attrs[] = { +@@ -313,6 +322,7 @@ static struct attribute *mtd_attrs[] = { &dev_attr_flags.attr, &dev_attr_size.attr, &dev_attr_erasesize.attr, diff --git a/target/linux/generic/pending-5.15/402-mtd-spi-nor-write-support-for-minor-aligned-partitions.patch b/target/linux/generic/pending-5.15/402-mtd-spi-nor-write-support-for-minor-aligned-partitions.patch index ed9d1c9dc1..b4fa08f0ea 100644 --- a/target/linux/generic/pending-5.15/402-mtd-spi-nor-write-support-for-minor-aligned-partitions.patch +++ b/target/linux/generic/pending-5.15/402-mtd-spi-nor-write-support-for-minor-aligned-partitions.patch @@ -80,7 +80,7 @@ Reported-by: Dan Carpenter --- a/drivers/mtd/mtdcore.c +++ b/drivers/mtd/mtdcore.c -@@ -168,6 +168,15 @@ static ssize_t mtd_erasesize_show(struct +@@ -169,6 +169,15 @@ static ssize_t mtd_erasesize_show(struct } MTD_DEVICE_ATTR_RO(erasesize); @@ -96,7 +96,7 @@ Reported-by: Dan Carpenter static ssize_t mtd_writesize_show(struct device *dev, struct device_attribute *attr, char *buf) { -@@ -313,6 +322,7 @@ static struct attribute *mtd_attrs[] = { +@@ -314,6 +323,7 @@ static struct attribute *mtd_attrs[] = { &dev_attr_flags.attr, &dev_attr_size.attr, &dev_attr_erasesize.attr, diff --git a/target/linux/pistachio/patches-5.10/401-mtd-nor-support-mtd-name-from-device-tree.patch b/target/linux/pistachio/patches-5.10/401-mtd-nor-support-mtd-name-from-device-tree.patch index 5b14d1f8cb..cf8ef1b880 100644 --- a/target/linux/pistachio/patches-5.10/401-mtd-nor-support-mtd-name-from-device-tree.patch +++ b/target/linux/pistachio/patches-5.10/401-mtd-nor-support-mtd-name-from-device-tree.patch @@ -34,7 +34,7 @@ Signed-off-by: Abhimanyu Vishwakarma mtd->type = MTD_NORFLASH; --- a/drivers/mtd/mtdcore.c +++ b/drivers/mtd/mtdcore.c -@@ -843,6 +843,17 @@ out_error: +@@ -848,6 +848,17 @@ out_error: */ static void mtd_set_dev_defaults(struct mtd_info *mtd) { From b066ad7d9aa5221bfd334a3017abe9bcd171b33f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= Date: Wed, 2 Nov 2022 20:26:33 +0100 Subject: [PATCH 03/62] kernel: improve description of NTFS kernel packages MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This helps choosing the right NTFS driver from two available options. Signed-off-by: Rafał Miłecki --- package/kernel/linux/modules/fs.mk | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/package/kernel/linux/modules/fs.mk b/package/kernel/linux/modules/fs.mk index d7f36ba4e0..ac2131e04a 100644 --- a/package/kernel/linux/modules/fs.mk +++ b/package/kernel/linux/modules/fs.mk @@ -510,7 +510,7 @@ $(eval $(call KernelPackage,fs-nfsd)) define KernelPackage/fs-ntfs SUBMENU:=$(FS_MENU) - TITLE:=NTFS filesystem support + TITLE:=NTFS filesystem read-only (old driver) support KCONFIG:=CONFIG_NTFS_FS FILES:=$(LINUX_DIR)/fs/ntfs/ntfs.ko AUTOLOAD:=$(call AutoLoad,30,ntfs) @@ -518,7 +518,8 @@ define KernelPackage/fs-ntfs endef define KernelPackage/fs-ntfs/description - Kernel module for NTFS filesystem support + Kernel module for limited NTFS filesystem support. Support for writing + is extremely limited and disabled as a result. endef $(eval $(call KernelPackage,fs-ntfs)) @@ -526,7 +527,7 @@ $(eval $(call KernelPackage,fs-ntfs)) define KernelPackage/fs-ntfs3 SUBMENU:=$(FS_MENU) - TITLE:=Ntfs3 support + TITLE:=NTFS filesystem read & write (new driver) support KCONFIG:= CONFIG_NTFS3_FS CONFIG_NTFS3_FS_POSIX_ACL=y FILES:=$(LINUX_DIR)/fs/ntfs3/ntfs3.ko $(call AddDepends/nls) @@ -535,7 +536,10 @@ define KernelPackage/fs-ntfs3 endef define KernelPackage/fuse/description - Kernel module for new NTFS3 filesystem support + Kernel module for fully functional NTFS filesystem support. It allows + reading as well as writing. + + It supports NTFS versions up to 3.1. endef $(eval $(call KernelPackage,fs-ntfs3)) From a208f0a9bec723e8bec3c45cc10931494d65156b Mon Sep 17 00:00:00 2001 From: David Bauer Date: Mon, 7 Nov 2022 00:42:40 +0100 Subject: [PATCH 04/62] mkits: support definition of DTB loadaddr Support defining a per-device loadaddress for the DTB. This is required for devices which to not align the DTB from the bootloader correctly. Signed-off-by: David Bauer --- include/image-commands.mk | 1 + include/image.mk | 2 ++ scripts/mkits.sh | 8 +++++++- 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/include/image-commands.mk b/include/image-commands.mk index 492e6933f1..1f6ba1c15a 100644 --- a/include/image-commands.mk +++ b/include/image-commands.mk @@ -296,6 +296,7 @@ define Build/fit -a $(KERNEL_LOADADDR) -e $(if $(KERNEL_ENTRY),$(KERNEL_ENTRY),$(KERNEL_LOADADDR)) \ $(if $(DEVICE_FDT_NUM),-n $(DEVICE_FDT_NUM)) \ $(if $(DEVICE_DTS_DELIMITER),-l $(DEVICE_DTS_DELIMITER)) \ + $(if $(DEVICE_DTS_LOADADDR),-s $(DEVICE_DTS_LOADADDR)) \ $(if $(DEVICE_DTS_OVERLAY),$(foreach dtso,$(DEVICE_DTS_OVERLAY), -O $(dtso):$(KERNEL_BUILD_DIR)/image-$(dtso).dtb)) \ -c $(if $(DEVICE_DTS_CONFIG),$(DEVICE_DTS_CONFIG),"config-1") \ -A $(LINUX_KARCH) -v $(LINUX_VERSION) diff --git a/include/image.mk b/include/image.mk index b3dfc9019a..e9dc53f82e 100644 --- a/include/image.mk +++ b/include/image.mk @@ -388,6 +388,7 @@ define Device/Init DEVICE_DTS_CONFIG := DEVICE_DTS_DELIMITER := DEVICE_DTS_DIR := + DEVICE_DTS_LOADADDR := DEVICE_DTS_OVERLAY := DEVICE_FDT_NUM := SOC := @@ -413,6 +414,7 @@ DEFAULT_DEVICE_VARS := \ CMDLINE UBOOTENV_IN_UBI KERNEL_IN_UBI BLOCKSIZE PAGESIZE SUBPAGESIZE \ VID_HDR_OFFSET UBINIZE_OPTS UBINIZE_PARTS MKUBIFS_OPTS DEVICE_DTS \ DEVICE_DTS_CONFIG DEVICE_DTS_DELIMITER DEVICE_DTS_DIR DEVICE_DTS_OVERLAY \ + DEVICE_DTS_LOADADDR \ DEVICE_FDT_NUM DEVICE_IMG_PREFIX SOC BOARD_NAME UIMAGE_MAGIC UIMAGE_NAME \ SUPPORTED_DEVICES IMAGE_METADATA KERNEL_ENTRY KERNEL_LOADADDR \ UBOOT_PATH IMAGE_SIZE \ diff --git a/scripts/mkits.sh b/scripts/mkits.sh index 7bf5681add..58c879cd62 100755 --- a/scripts/mkits.sh +++ b/scripts/mkits.sh @@ -35,6 +35,7 @@ usage() { printf "\n\t-l ==> legacy mode character (@ etc otherwise -)" printf "\n\t-o ==> create output file 'its_file'" printf "\n\t-O ==> create config with dt overlay 'name:dtb'" + printf "\n\t-s ==> set FDT load address to 'addr' (hex)" printf "\n\t\t(can be specified more than once)\n" exit 1 } @@ -48,7 +49,7 @@ LOADABLES= DTOVERLAY= DTADDR= -while getopts ":A:a:c:C:D:d:e:f:i:k:l:n:o:O:v:r:H:" OPTION +while getopts ":A:a:c:C:D:d:e:f:i:k:l:n:o:O:v:r:s:H:" OPTION do case $OPTION in A ) ARCH=$OPTARG;; @@ -66,6 +67,7 @@ do o ) OUTPUT=$OPTARG;; O ) DTOVERLAY="$DTOVERLAY ${OPTARG}";; r ) ROOTFS=$OPTARG;; + s ) FDTADDR=$OPTARG;; H ) HASH=$OPTARG;; v ) VERSION=$OPTARG;; * ) echo "Invalid option passed to '$0' (options:$*)" @@ -91,6 +93,10 @@ fi DTADDR=$(printf "0x%08x" $(($LOAD_ADDR - $dtbsize)) ) } +[ "$FDTADDR" ] && { + DTADDR="$FDTADDR" +} + # Conditionally create fdt information if [ -n "${DTB}" ]; then FDT_NODE=" From 10ba380ec3a9d0462026120ecd5f5f4fa61b5d21 Mon Sep 17 00:00:00 2001 From: David Bauer Date: Mon, 7 Nov 2022 00:42:57 +0100 Subject: [PATCH 05/62] ramips: define loadaddr for U6 Lite DTB The Ubiquiti UniFi 6 Lite does not correctly align the FDT by always setting fdt_high to 0xffffffff when invoking the bootubnt command. Work around this issue by loading the DTB to a valid,aligned address, so the bootloader does not have to relocate the FDT automatically. Note: The device does read the kernel before invoking bootm on the FIT image to 0x86000000. Signed-off-by: David Bauer --- target/linux/ramips/image/mt7621.mk | 1 + 1 file changed, 1 insertion(+) diff --git a/target/linux/ramips/image/mt7621.mk b/target/linux/ramips/image/mt7621.mk index 35817d0317..222809dbbe 100644 --- a/target/linux/ramips/image/mt7621.mk +++ b/target/linux/ramips/image/mt7621.mk @@ -2016,6 +2016,7 @@ define Device/ubnt_unifi-6-lite DEVICE_VENDOR := Ubiquiti DEVICE_MODEL := UniFi 6 Lite DEVICE_DTS_CONFIG := config@1 + DEVICE_DTS_LOADADDR := 0x87000000 DEVICE_PACKAGES += kmod-mt7603 kmod-mt7915e KERNEL := kernel-bin | lzma | fit lzma $$(KDIR)/image-$$(firstword $$(DEVICE_DTS)).dtb IMAGE_SIZE := 15424k From 2964e5024c09fa4b576ecb41269cc65061ae835c Mon Sep 17 00:00:00 2001 From: Edward Matijevic Date: Sun, 6 Nov 2022 13:12:36 -0600 Subject: [PATCH 06/62] ipq806x: kernel ramoops storage for C2600/AD7200 Define the kernel crash log storage ramoops/pstore feature for C2600/AD7200 and add kmod-ramoops to default. Tested with C2600 only. Signed-off-by: Edward Matijevic --- .../arch/arm/boot/dts/qcom-ipq8064-ad7200-c2600.dtsi | 9 +++++++++ target/linux/ipq806x/image/generic.mk | 4 ++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/target/linux/ipq806x/files-5.15/arch/arm/boot/dts/qcom-ipq8064-ad7200-c2600.dtsi b/target/linux/ipq806x/files-5.15/arch/arm/boot/dts/qcom-ipq8064-ad7200-c2600.dtsi index dd57fc02b4..576393015a 100644 --- a/target/linux/ipq806x/files-5.15/arch/arm/boot/dts/qcom-ipq8064-ad7200-c2600.dtsi +++ b/target/linux/ipq806x/files-5.15/arch/arm/boot/dts/qcom-ipq8064-ad7200-c2600.dtsi @@ -10,6 +10,15 @@ device_type = "memory"; }; + ramoops@42100000 { + compatible = "ramoops"; + reg = <0x42100000 0x40000>; + record-size = <0x4000>; + console-size = <0x4000>; + ftrace-size = <0x4000>; + pmsg-size = <0x4000>; + }; + aliases { mdio-gpio0 = &mdio0; label-mac-device = &gmac2; diff --git a/target/linux/ipq806x/image/generic.mk b/target/linux/ipq806x/image/generic.mk index 02f5aad545..936febc762 100644 --- a/target/linux/ipq806x/image/generic.mk +++ b/target/linux/ipq806x/image/generic.mk @@ -409,7 +409,7 @@ define Device/tplink_ad7200 BLOCKSIZE := 128k PAGESIZE := 2048 TPLINK_BOARD_ID := AD7200 - DEVICE_PACKAGES := ath10k-firmware-qca99x0-ct kmod-wil6210 + DEVICE_PACKAGES := ath10k-firmware-qca99x0-ct kmod-ramoops kmod-wil6210 endef TARGET_DEVICES += tplink_ad7200 @@ -424,7 +424,7 @@ define Device/tplink_c2600 BOARD_NAME := c2600 SUPPORTED_DEVICES += c2600 TPLINK_BOARD_ID := C2600 - DEVICE_PACKAGES := ath10k-firmware-qca99x0-ct + DEVICE_PACKAGES := ath10k-firmware-qca99x0-ct kmod-ramoops endef TARGET_DEVICES += tplink_c2600 From c47f8dacb85a1be97f240e10873cda4678b90c2e Mon Sep 17 00:00:00 2001 From: Nick Hainke Date: Sun, 6 Nov 2022 15:14:58 +0100 Subject: [PATCH 07/62] mac80211: ath10k: add tags for upstreamed patches Add tags to already upstreamed patches. Signed-off-by: Nick Hainke --- ...patch => 081-01-v6.0-ath10k-improve-tx-status-reporting.patch} | 0 ...atch => 081-02-v6.0-ath10k-turn-rawmode-into-frame-mode.patch} | 0 ...-v6.0-ath10k-htt-tx-do-not-interpret-Eth-frames-as-WiFi.patch} | 0 ...081-04-v6.0-ath10k-add-encapsulation-offloading-support.patch} | 0 ...19-ath10k-support-bus-and-device-specific-API-1-BDF-sel.patch} | 0 ...v5.17-ath10k-fetch-calibration-data-via-nvmem-subsystem.patch} | 0 6 files changed, 0 insertions(+), 0 deletions(-) rename package/kernel/mac80211/patches/ath10k/{081-01-ath10k-improve-tx-status-reporting.patch => 081-01-v6.0-ath10k-improve-tx-status-reporting.patch} (100%) rename package/kernel/mac80211/patches/ath10k/{081-02-ath10k-turn-rawmode-into-frame-mode.patch => 081-02-v6.0-ath10k-turn-rawmode-into-frame-mode.patch} (100%) rename package/kernel/mac80211/patches/ath10k/{081-03-ath10k-htt-tx-do-not-interpret-Eth-frames-as-WiFi.patch => 081-03-v6.0-ath10k-htt-tx-do-not-interpret-Eth-frames-as-WiFi.patch} (100%) rename package/kernel/mac80211/patches/ath10k/{081-04-ath10k-add-encapsulation-offloading-support.patch => 081-04-v6.0-ath10k-add-encapsulation-offloading-support.patch} (100%) rename package/kernel/mac80211/patches/ath10k/{100-ath10k-support-bus-and-device-specific-API-1-BDF-sel.patch => 100-v5.19-ath10k-support-bus-and-device-specific-API-1-BDF-sel.patch} (100%) rename package/kernel/mac80211/patches/ath10k/{120-ath10k-fetch-calibration-data-via-nvmem-subsystem.patch => 120-v5.17-ath10k-fetch-calibration-data-via-nvmem-subsystem.patch} (100%) diff --git a/package/kernel/mac80211/patches/ath10k/081-01-ath10k-improve-tx-status-reporting.patch b/package/kernel/mac80211/patches/ath10k/081-01-v6.0-ath10k-improve-tx-status-reporting.patch similarity index 100% rename from package/kernel/mac80211/patches/ath10k/081-01-ath10k-improve-tx-status-reporting.patch rename to package/kernel/mac80211/patches/ath10k/081-01-v6.0-ath10k-improve-tx-status-reporting.patch diff --git a/package/kernel/mac80211/patches/ath10k/081-02-ath10k-turn-rawmode-into-frame-mode.patch b/package/kernel/mac80211/patches/ath10k/081-02-v6.0-ath10k-turn-rawmode-into-frame-mode.patch similarity index 100% rename from package/kernel/mac80211/patches/ath10k/081-02-ath10k-turn-rawmode-into-frame-mode.patch rename to package/kernel/mac80211/patches/ath10k/081-02-v6.0-ath10k-turn-rawmode-into-frame-mode.patch diff --git a/package/kernel/mac80211/patches/ath10k/081-03-ath10k-htt-tx-do-not-interpret-Eth-frames-as-WiFi.patch b/package/kernel/mac80211/patches/ath10k/081-03-v6.0-ath10k-htt-tx-do-not-interpret-Eth-frames-as-WiFi.patch similarity index 100% rename from package/kernel/mac80211/patches/ath10k/081-03-ath10k-htt-tx-do-not-interpret-Eth-frames-as-WiFi.patch rename to package/kernel/mac80211/patches/ath10k/081-03-v6.0-ath10k-htt-tx-do-not-interpret-Eth-frames-as-WiFi.patch diff --git a/package/kernel/mac80211/patches/ath10k/081-04-ath10k-add-encapsulation-offloading-support.patch b/package/kernel/mac80211/patches/ath10k/081-04-v6.0-ath10k-add-encapsulation-offloading-support.patch similarity index 100% rename from package/kernel/mac80211/patches/ath10k/081-04-ath10k-add-encapsulation-offloading-support.patch rename to package/kernel/mac80211/patches/ath10k/081-04-v6.0-ath10k-add-encapsulation-offloading-support.patch diff --git a/package/kernel/mac80211/patches/ath10k/100-ath10k-support-bus-and-device-specific-API-1-BDF-sel.patch b/package/kernel/mac80211/patches/ath10k/100-v5.19-ath10k-support-bus-and-device-specific-API-1-BDF-sel.patch similarity index 100% rename from package/kernel/mac80211/patches/ath10k/100-ath10k-support-bus-and-device-specific-API-1-BDF-sel.patch rename to package/kernel/mac80211/patches/ath10k/100-v5.19-ath10k-support-bus-and-device-specific-API-1-BDF-sel.patch diff --git a/package/kernel/mac80211/patches/ath10k/120-ath10k-fetch-calibration-data-via-nvmem-subsystem.patch b/package/kernel/mac80211/patches/ath10k/120-v5.17-ath10k-fetch-calibration-data-via-nvmem-subsystem.patch similarity index 100% rename from package/kernel/mac80211/patches/ath10k/120-ath10k-fetch-calibration-data-via-nvmem-subsystem.patch rename to package/kernel/mac80211/patches/ath10k/120-v5.17-ath10k-fetch-calibration-data-via-nvmem-subsystem.patch From 6f5e1df5972c82cbc3c9c14d235342dc2957c4d1 Mon Sep 17 00:00:00 2001 From: Nick Hainke Date: Sun, 6 Nov 2022 15:37:05 +0100 Subject: [PATCH 08/62] mac80211: ath9k: add tag to upstreamed patch Add tag to upstreamed patch. Signed-off-by: Nick Hainke --- ...16-ath9k-support-DT-ieee80211-freq-limit-property-to-li.patch} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename package/kernel/mac80211/patches/ath9k/{040-ath9k-support-DT-ieee80211-freq-limit-property-to-li.patch => 040-v5.16-ath9k-support-DT-ieee80211-freq-limit-property-to-li.patch} (100%) diff --git a/package/kernel/mac80211/patches/ath9k/040-ath9k-support-DT-ieee80211-freq-limit-property-to-li.patch b/package/kernel/mac80211/patches/ath9k/040-v5.16-ath9k-support-DT-ieee80211-freq-limit-property-to-li.patch similarity index 100% rename from package/kernel/mac80211/patches/ath9k/040-ath9k-support-DT-ieee80211-freq-limit-property-to-li.patch rename to package/kernel/mac80211/patches/ath9k/040-v5.16-ath9k-support-DT-ieee80211-freq-limit-property-to-li.patch From f472a2fb15cb76e53c71b17a6f8cbf2931a2d0e7 Mon Sep 17 00:00:00 2001 From: Nick Hainke Date: Sun, 6 Nov 2022 15:48:45 +0100 Subject: [PATCH 09/62] mac80211: brcm: add tag to upstreamed patch Add tag to upstreamed patch. Signed-off-by: Nick Hainke --- ...19-brcmfmac-allow-setting-wlan-MAC-address-using-device.patch} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename package/kernel/mac80211/patches/brcm/{001-brcmfmac-allow-setting-wlan-MAC-address-using-device.patch => 001-v5.19-brcmfmac-allow-setting-wlan-MAC-address-using-device.patch} (100%) diff --git a/package/kernel/mac80211/patches/brcm/001-brcmfmac-allow-setting-wlan-MAC-address-using-device.patch b/package/kernel/mac80211/patches/brcm/001-v5.19-brcmfmac-allow-setting-wlan-MAC-address-using-device.patch similarity index 100% rename from package/kernel/mac80211/patches/brcm/001-brcmfmac-allow-setting-wlan-MAC-address-using-device.patch rename to package/kernel/mac80211/patches/brcm/001-v5.19-brcmfmac-allow-setting-wlan-MAC-address-using-device.patch From b2272c6194666a299210a0ee1bf307c83abc278b Mon Sep 17 00:00:00 2001 From: Nick Hainke Date: Sun, 6 Nov 2022 16:05:44 +0100 Subject: [PATCH 10/62] mac80211: rt2x00: add tags to upstreamed patches Some patches are already upstreamed. Signed-off-by: Nick Hainke --- ...=> 001-v6.1-rt2x00-define-RF5592-in-init_eeprom-routine.patch} | 0 ...ger.patch => 002-v6.1-rt2x00-add-throughput-LED-trigger.patch} | 0 ...> 003-v6.1-rt2x00-add-support-for-external-PA-on-MT7620.patch} | 0 ...> 004-v6.1-rt2x00-move-up-and-reuse-busy-wait-functions.patch} | 0 ...005-v6.1-rt2x00-add-RF-self-TXDC-calibration-for-MT7620.patch} | 0 ...0.patch => 006-v6.1-rt2x00-add-r-calibration-for-MT7620.patch} | 0 ...ch => 007-v6.1-rt2x00-add-RXDCOC-calibration-for-MT7620.patch} | 0 ...atch => 008-v6.1-rt2x00-add-RXIQ-calibration-for-MT7620.patch} | 0 ...9-v6.1-rt2x00-don-t-run-Rt5592-IQ-calibration-on-MT7620.patch} | 0 ...h => 010-v6.1-rt2x00-add-TX-LOFT-calibration-for-MT7620.patch} | 0 ...tch => 011-v6.1-rt2x00-move-helper-functions-up-in-file.patch} | 0 ...12-v6.1-rt2x00-fix-HT20-HT40-bandwidth-switch-on-MT7620.patch} | 0 ...1-rt2x00-set-correct-TX_SW_CFG1-MAC-register-for-MT7620.patch} | 0 ... 014-v6.1-rt2x00-set-VGC-gain-for-both-chains-of-MT7620.patch} | 0 ...er.patch => 015-v6.1-rt2x00-set-SoC-wmac-clock-register.patch} | 0 ...16-v6.1-rt2x00-correctly-set-BBP-register-86-for-MT7620.patch} | 0 16 files changed, 0 insertions(+), 0 deletions(-) rename package/kernel/mac80211/patches/rt2x00/{001-rt2x00-define-RF5592-in-init_eeprom-routine.patch => 001-v6.1-rt2x00-define-RF5592-in-init_eeprom-routine.patch} (100%) rename package/kernel/mac80211/patches/rt2x00/{002-rt2x00-add-throughput-LED-trigger.patch => 002-v6.1-rt2x00-add-throughput-LED-trigger.patch} (100%) rename package/kernel/mac80211/patches/rt2x00/{003-rt2x00-add-support-for-external-PA-on-MT7620.patch => 003-v6.1-rt2x00-add-support-for-external-PA-on-MT7620.patch} (100%) rename package/kernel/mac80211/patches/rt2x00/{004-rt2x00-move-up-and-reuse-busy-wait-functions.patch => 004-v6.1-rt2x00-move-up-and-reuse-busy-wait-functions.patch} (100%) rename package/kernel/mac80211/patches/rt2x00/{005-rt2x00-add-RF-self-TXDC-calibration-for-MT7620.patch => 005-v6.1-rt2x00-add-RF-self-TXDC-calibration-for-MT7620.patch} (100%) rename package/kernel/mac80211/patches/rt2x00/{006-rt2x00-add-r-calibration-for-MT7620.patch => 006-v6.1-rt2x00-add-r-calibration-for-MT7620.patch} (100%) rename package/kernel/mac80211/patches/rt2x00/{007-rt2x00-add-RXDCOC-calibration-for-MT7620.patch => 007-v6.1-rt2x00-add-RXDCOC-calibration-for-MT7620.patch} (100%) rename package/kernel/mac80211/patches/rt2x00/{008-rt2x00-add-RXIQ-calibration-for-MT7620.patch => 008-v6.1-rt2x00-add-RXIQ-calibration-for-MT7620.patch} (100%) rename package/kernel/mac80211/patches/rt2x00/{009-rt2x00-don-t-run-Rt5592-IQ-calibration-on-MT7620.patch => 009-v6.1-rt2x00-don-t-run-Rt5592-IQ-calibration-on-MT7620.patch} (100%) rename package/kernel/mac80211/patches/rt2x00/{010-rt2x00-add-TX-LOFT-calibration-for-MT7620.patch => 010-v6.1-rt2x00-add-TX-LOFT-calibration-for-MT7620.patch} (100%) rename package/kernel/mac80211/patches/rt2x00/{011-rt2x00-move-helper-functions-up-in-file.patch => 011-v6.1-rt2x00-move-helper-functions-up-in-file.patch} (100%) rename package/kernel/mac80211/patches/rt2x00/{012-rt2x00-fix-HT20-HT40-bandwidth-switch-on-MT7620.patch => 012-v6.1-rt2x00-fix-HT20-HT40-bandwidth-switch-on-MT7620.patch} (100%) rename package/kernel/mac80211/patches/rt2x00/{013-rt2x00-set-correct-TX_SW_CFG1-MAC-register-for-MT7620.patch => 013-v6.1-rt2x00-set-correct-TX_SW_CFG1-MAC-register-for-MT7620.patch} (100%) rename package/kernel/mac80211/patches/rt2x00/{014-rt2x00-set-VGC-gain-for-both-chains-of-MT7620.patch => 014-v6.1-rt2x00-set-VGC-gain-for-both-chains-of-MT7620.patch} (100%) rename package/kernel/mac80211/patches/rt2x00/{015-rt2x00-set-SoC-wmac-clock-register.patch => 015-v6.1-rt2x00-set-SoC-wmac-clock-register.patch} (100%) rename package/kernel/mac80211/patches/rt2x00/{016-rt2x00-correctly-set-BBP-register-86-for-MT7620.patch => 016-v6.1-rt2x00-correctly-set-BBP-register-86-for-MT7620.patch} (100%) diff --git a/package/kernel/mac80211/patches/rt2x00/001-rt2x00-define-RF5592-in-init_eeprom-routine.patch b/package/kernel/mac80211/patches/rt2x00/001-v6.1-rt2x00-define-RF5592-in-init_eeprom-routine.patch similarity index 100% rename from package/kernel/mac80211/patches/rt2x00/001-rt2x00-define-RF5592-in-init_eeprom-routine.patch rename to package/kernel/mac80211/patches/rt2x00/001-v6.1-rt2x00-define-RF5592-in-init_eeprom-routine.patch diff --git a/package/kernel/mac80211/patches/rt2x00/002-rt2x00-add-throughput-LED-trigger.patch b/package/kernel/mac80211/patches/rt2x00/002-v6.1-rt2x00-add-throughput-LED-trigger.patch similarity index 100% rename from package/kernel/mac80211/patches/rt2x00/002-rt2x00-add-throughput-LED-trigger.patch rename to package/kernel/mac80211/patches/rt2x00/002-v6.1-rt2x00-add-throughput-LED-trigger.patch diff --git a/package/kernel/mac80211/patches/rt2x00/003-rt2x00-add-support-for-external-PA-on-MT7620.patch b/package/kernel/mac80211/patches/rt2x00/003-v6.1-rt2x00-add-support-for-external-PA-on-MT7620.patch similarity index 100% rename from package/kernel/mac80211/patches/rt2x00/003-rt2x00-add-support-for-external-PA-on-MT7620.patch rename to package/kernel/mac80211/patches/rt2x00/003-v6.1-rt2x00-add-support-for-external-PA-on-MT7620.patch diff --git a/package/kernel/mac80211/patches/rt2x00/004-rt2x00-move-up-and-reuse-busy-wait-functions.patch b/package/kernel/mac80211/patches/rt2x00/004-v6.1-rt2x00-move-up-and-reuse-busy-wait-functions.patch similarity index 100% rename from package/kernel/mac80211/patches/rt2x00/004-rt2x00-move-up-and-reuse-busy-wait-functions.patch rename to package/kernel/mac80211/patches/rt2x00/004-v6.1-rt2x00-move-up-and-reuse-busy-wait-functions.patch diff --git a/package/kernel/mac80211/patches/rt2x00/005-rt2x00-add-RF-self-TXDC-calibration-for-MT7620.patch b/package/kernel/mac80211/patches/rt2x00/005-v6.1-rt2x00-add-RF-self-TXDC-calibration-for-MT7620.patch similarity index 100% rename from package/kernel/mac80211/patches/rt2x00/005-rt2x00-add-RF-self-TXDC-calibration-for-MT7620.patch rename to package/kernel/mac80211/patches/rt2x00/005-v6.1-rt2x00-add-RF-self-TXDC-calibration-for-MT7620.patch diff --git a/package/kernel/mac80211/patches/rt2x00/006-rt2x00-add-r-calibration-for-MT7620.patch b/package/kernel/mac80211/patches/rt2x00/006-v6.1-rt2x00-add-r-calibration-for-MT7620.patch similarity index 100% rename from package/kernel/mac80211/patches/rt2x00/006-rt2x00-add-r-calibration-for-MT7620.patch rename to package/kernel/mac80211/patches/rt2x00/006-v6.1-rt2x00-add-r-calibration-for-MT7620.patch diff --git a/package/kernel/mac80211/patches/rt2x00/007-rt2x00-add-RXDCOC-calibration-for-MT7620.patch b/package/kernel/mac80211/patches/rt2x00/007-v6.1-rt2x00-add-RXDCOC-calibration-for-MT7620.patch similarity index 100% rename from package/kernel/mac80211/patches/rt2x00/007-rt2x00-add-RXDCOC-calibration-for-MT7620.patch rename to package/kernel/mac80211/patches/rt2x00/007-v6.1-rt2x00-add-RXDCOC-calibration-for-MT7620.patch diff --git a/package/kernel/mac80211/patches/rt2x00/008-rt2x00-add-RXIQ-calibration-for-MT7620.patch b/package/kernel/mac80211/patches/rt2x00/008-v6.1-rt2x00-add-RXIQ-calibration-for-MT7620.patch similarity index 100% rename from package/kernel/mac80211/patches/rt2x00/008-rt2x00-add-RXIQ-calibration-for-MT7620.patch rename to package/kernel/mac80211/patches/rt2x00/008-v6.1-rt2x00-add-RXIQ-calibration-for-MT7620.patch diff --git a/package/kernel/mac80211/patches/rt2x00/009-rt2x00-don-t-run-Rt5592-IQ-calibration-on-MT7620.patch b/package/kernel/mac80211/patches/rt2x00/009-v6.1-rt2x00-don-t-run-Rt5592-IQ-calibration-on-MT7620.patch similarity index 100% rename from package/kernel/mac80211/patches/rt2x00/009-rt2x00-don-t-run-Rt5592-IQ-calibration-on-MT7620.patch rename to package/kernel/mac80211/patches/rt2x00/009-v6.1-rt2x00-don-t-run-Rt5592-IQ-calibration-on-MT7620.patch diff --git a/package/kernel/mac80211/patches/rt2x00/010-rt2x00-add-TX-LOFT-calibration-for-MT7620.patch b/package/kernel/mac80211/patches/rt2x00/010-v6.1-rt2x00-add-TX-LOFT-calibration-for-MT7620.patch similarity index 100% rename from package/kernel/mac80211/patches/rt2x00/010-rt2x00-add-TX-LOFT-calibration-for-MT7620.patch rename to package/kernel/mac80211/patches/rt2x00/010-v6.1-rt2x00-add-TX-LOFT-calibration-for-MT7620.patch diff --git a/package/kernel/mac80211/patches/rt2x00/011-rt2x00-move-helper-functions-up-in-file.patch b/package/kernel/mac80211/patches/rt2x00/011-v6.1-rt2x00-move-helper-functions-up-in-file.patch similarity index 100% rename from package/kernel/mac80211/patches/rt2x00/011-rt2x00-move-helper-functions-up-in-file.patch rename to package/kernel/mac80211/patches/rt2x00/011-v6.1-rt2x00-move-helper-functions-up-in-file.patch diff --git a/package/kernel/mac80211/patches/rt2x00/012-rt2x00-fix-HT20-HT40-bandwidth-switch-on-MT7620.patch b/package/kernel/mac80211/patches/rt2x00/012-v6.1-rt2x00-fix-HT20-HT40-bandwidth-switch-on-MT7620.patch similarity index 100% rename from package/kernel/mac80211/patches/rt2x00/012-rt2x00-fix-HT20-HT40-bandwidth-switch-on-MT7620.patch rename to package/kernel/mac80211/patches/rt2x00/012-v6.1-rt2x00-fix-HT20-HT40-bandwidth-switch-on-MT7620.patch diff --git a/package/kernel/mac80211/patches/rt2x00/013-rt2x00-set-correct-TX_SW_CFG1-MAC-register-for-MT7620.patch b/package/kernel/mac80211/patches/rt2x00/013-v6.1-rt2x00-set-correct-TX_SW_CFG1-MAC-register-for-MT7620.patch similarity index 100% rename from package/kernel/mac80211/patches/rt2x00/013-rt2x00-set-correct-TX_SW_CFG1-MAC-register-for-MT7620.patch rename to package/kernel/mac80211/patches/rt2x00/013-v6.1-rt2x00-set-correct-TX_SW_CFG1-MAC-register-for-MT7620.patch diff --git a/package/kernel/mac80211/patches/rt2x00/014-rt2x00-set-VGC-gain-for-both-chains-of-MT7620.patch b/package/kernel/mac80211/patches/rt2x00/014-v6.1-rt2x00-set-VGC-gain-for-both-chains-of-MT7620.patch similarity index 100% rename from package/kernel/mac80211/patches/rt2x00/014-rt2x00-set-VGC-gain-for-both-chains-of-MT7620.patch rename to package/kernel/mac80211/patches/rt2x00/014-v6.1-rt2x00-set-VGC-gain-for-both-chains-of-MT7620.patch diff --git a/package/kernel/mac80211/patches/rt2x00/015-rt2x00-set-SoC-wmac-clock-register.patch b/package/kernel/mac80211/patches/rt2x00/015-v6.1-rt2x00-set-SoC-wmac-clock-register.patch similarity index 100% rename from package/kernel/mac80211/patches/rt2x00/015-rt2x00-set-SoC-wmac-clock-register.patch rename to package/kernel/mac80211/patches/rt2x00/015-v6.1-rt2x00-set-SoC-wmac-clock-register.patch diff --git a/package/kernel/mac80211/patches/rt2x00/016-rt2x00-correctly-set-BBP-register-86-for-MT7620.patch b/package/kernel/mac80211/patches/rt2x00/016-v6.1-rt2x00-correctly-set-BBP-register-86-for-MT7620.patch similarity index 100% rename from package/kernel/mac80211/patches/rt2x00/016-rt2x00-correctly-set-BBP-register-86-for-MT7620.patch rename to package/kernel/mac80211/patches/rt2x00/016-v6.1-rt2x00-correctly-set-BBP-register-86-for-MT7620.patch From 2426dbb73402599d43c4c16146bd031a81c0bbc7 Mon Sep 17 00:00:00 2001 From: Nick Hainke Date: Sun, 6 Nov 2022 16:48:32 +0100 Subject: [PATCH 11/62] mac80211: subsys: add tags to upstreamed patches Some patches were already upstreamed. Signed-off-by: Nick Hainke --- ....16-mac80211-set-up-the-fwd_skb-dev-for-mesh-forwarding.patch} | 0 ...17-mac80211-use-coarse-boottime-for-airtime-fairness-co.patch} | 0 ...8-v5.17-mac80211-add-support-for-.ndo_fill_forward_path.patch} | 0 ... => 312-v5.16-mac80211-split-beacon-retrieval-functions.patch} | 0 ... => 313-v5.16-nl80211-MBSSID-and-EMA-support-in-AP-mode.patch} | 0 ...17-cfg80211-implement-APIs-for-dedicated-radar-detectio.patch} | 0 ....17-cfg80211-move-offchan_cac_event-to-a-dedicated-work.patch} | 0 ...17-cfg80211-fix-possible-NULL-pointer-dereference-in-cf.patch} | 0 ...17-cfg80211-schedule-offchan_cac_abort_wk-in-cfg80211_r.patch} | 0 ...17-cfg80211-allow-continuous-radar-monitoring-on-offcha.patch} | 0 ...319-v5.17-mac80211-introduce-set_radar_offchan-callback.patch} | 0 ...17-cfg80211-rename-offchannel_chain-structs-to-backgrou.patch} | 0 ...323-v5.16-mac80211-MBSSID-support-in-interface-handling.patch} | 0 ...=> 324-v5.18-mac80211-MBSSID-beacon-handling-in-AP-mode.patch} | 0 ...witch.patch => 325-v5.18-mac80211-MBSSID-channel-switch.patch} | 0 ...18-mac80211-update-bssid_indicator-in-ieee80211_assign_.patch} | 0 ...19-mac80211-do-not-wake-queues-on-a-vif-that-is-being-s.patch} | 0 ....0-mac80211-switch-airtime-fairness-back-to-deficit-rou.patch} | 0 ....0-mac80211-make-sta-airtime-deficit-field-s32-instead-.patch} | 0 ....0-mac80211-consider-aql_tx_pending-when-checking-airti.patch} | 0 ....0-mac80211-keep-recently-active-tx-queues-in-schedulin.patch} | 0 ....0-mac80211-add-a-per-PHY-AQL-limit-to-improve-fairness.patch} | 0 ....0-mac80211-add-debugfs-file-to-display-per-phy-AQL-pen.patch} | 0 ....0-mac80211-only-accumulate-airtime-deficit-for-active-.patch} | 0 ....0-mac80211-exclude-multicast-packets-from-AQL-pending-.patch} | 0 ...19-wifi-mac80211-do-not-abuse-fq.lock-in-ieee80211_do_s.patch} | 0 ....0-mac80211-Fix-deadlock-Don-t-start-TX-while-holding-f.patch} | 0 ....0-mac80211-Ensure-vif-queues-are-operational-after-sta.patch} | 0 ....1-wifi-mac80211-fix-decap-offload-for-stations-on-AP_V.patch} | 0 ....1-wifi-cfg80211-fix-ieee80211_data_to_8023_exthdr-hand.patch} | 0 ....1-wifi-mac80211-do-not-drop-packets-smaller-than-the-L.patch} | 0 ...-color-collision.patch => 363-v5.19-bss-color-collision.patch} | 0 32 files changed, 0 insertions(+), 0 deletions(-) rename package/kernel/mac80211/patches/subsys/{303-mac80211-set-up-the-fwd_skb-dev-for-mesh-forwarding.patch => 303-v5.16-mac80211-set-up-the-fwd_skb-dev-for-mesh-forwarding.patch} (100%) rename package/kernel/mac80211/patches/subsys/{306-mac80211-use-coarse-boottime-for-airtime-fairness-co.patch => 306-v5.17-mac80211-use-coarse-boottime-for-airtime-fairness-co.patch} (100%) rename package/kernel/mac80211/patches/subsys/{308-mac80211-add-support-for-.ndo_fill_forward_path.patch => 308-v5.17-mac80211-add-support-for-.ndo_fill_forward_path.patch} (100%) rename package/kernel/mac80211/patches/subsys/{312-mac80211-split-beacon-retrieval-functions.patch => 312-v5.16-mac80211-split-beacon-retrieval-functions.patch} (100%) rename package/kernel/mac80211/patches/subsys/{313-nl80211-MBSSID-and-EMA-support-in-AP-mode.patch => 313-v5.16-nl80211-MBSSID-and-EMA-support-in-AP-mode.patch} (100%) rename package/kernel/mac80211/patches/subsys/{314-cfg80211-implement-APIs-for-dedicated-radar-detectio.patch => 314-v5.17-cfg80211-implement-APIs-for-dedicated-radar-detectio.patch} (100%) rename package/kernel/mac80211/patches/subsys/{315-cfg80211-move-offchan_cac_event-to-a-dedicated-work.patch => 315-v5.17-cfg80211-move-offchan_cac_event-to-a-dedicated-work.patch} (100%) rename package/kernel/mac80211/patches/subsys/{316-cfg80211-fix-possible-NULL-pointer-dereference-in-cf.patch => 316-v5.17-cfg80211-fix-possible-NULL-pointer-dereference-in-cf.patch} (100%) rename package/kernel/mac80211/patches/subsys/{317-cfg80211-schedule-offchan_cac_abort_wk-in-cfg80211_r.patch => 317-v5.17-cfg80211-schedule-offchan_cac_abort_wk-in-cfg80211_r.patch} (100%) rename package/kernel/mac80211/patches/subsys/{318-cfg80211-allow-continuous-radar-monitoring-on-offcha.patch => 318-v5.17-cfg80211-allow-continuous-radar-monitoring-on-offcha.patch} (100%) rename package/kernel/mac80211/patches/subsys/{319-mac80211-introduce-set_radar_offchan-callback.patch => 319-v5.17-mac80211-introduce-set_radar_offchan-callback.patch} (100%) rename package/kernel/mac80211/patches/subsys/{320-cfg80211-rename-offchannel_chain-structs-to-backgrou.patch => 320-v5.17-cfg80211-rename-offchannel_chain-structs-to-backgrou.patch} (100%) rename package/kernel/mac80211/patches/subsys/{323-mac80211-MBSSID-support-in-interface-handling.patch => 323-v5.16-mac80211-MBSSID-support-in-interface-handling.patch} (100%) rename package/kernel/mac80211/patches/subsys/{324-mac80211-MBSSID-beacon-handling-in-AP-mode.patch => 324-v5.18-mac80211-MBSSID-beacon-handling-in-AP-mode.patch} (100%) rename package/kernel/mac80211/patches/subsys/{325-mac80211-MBSSID-channel-switch.patch => 325-v5.18-mac80211-MBSSID-channel-switch.patch} (100%) rename package/kernel/mac80211/patches/subsys/{326-mac80211-update-bssid_indicator-in-ieee80211_assign_.patch => 326-v5.18-mac80211-update-bssid_indicator-in-ieee80211_assign_.patch} (100%) rename package/kernel/mac80211/patches/subsys/{328-mac80211-do-not-wake-queues-on-a-vif-that-is-being-s.patch => 328-v5.19-mac80211-do-not-wake-queues-on-a-vif-that-is-being-s.patch} (100%) rename package/kernel/mac80211/patches/subsys/{330-mac80211-switch-airtime-fairness-back-to-deficit-rou.patch => 330-v6.0-mac80211-switch-airtime-fairness-back-to-deficit-rou.patch} (100%) rename package/kernel/mac80211/patches/subsys/{331-mac80211-make-sta-airtime-deficit-field-s32-instead-.patch => 331-v6.0-mac80211-make-sta-airtime-deficit-field-s32-instead-.patch} (100%) rename package/kernel/mac80211/patches/subsys/{332-mac80211-consider-aql_tx_pending-when-checking-airti.patch => 332-v6.0-mac80211-consider-aql_tx_pending-when-checking-airti.patch} (100%) rename package/kernel/mac80211/patches/subsys/{333-mac80211-keep-recently-active-tx-queues-in-schedulin.patch => 333-v6.0-mac80211-keep-recently-active-tx-queues-in-schedulin.patch} (100%) rename package/kernel/mac80211/patches/subsys/{334-mac80211-add-a-per-PHY-AQL-limit-to-improve-fairness.patch => 334-v6.0-mac80211-add-a-per-PHY-AQL-limit-to-improve-fairness.patch} (100%) rename package/kernel/mac80211/patches/subsys/{335-mac80211-add-debugfs-file-to-display-per-phy-AQL-pen.patch => 335-v6.0-mac80211-add-debugfs-file-to-display-per-phy-AQL-pen.patch} (100%) rename package/kernel/mac80211/patches/subsys/{336-mac80211-only-accumulate-airtime-deficit-for-active-.patch => 336-v6.0-mac80211-only-accumulate-airtime-deficit-for-active-.patch} (100%) rename package/kernel/mac80211/patches/subsys/{339-mac80211-exclude-multicast-packets-from-AQL-pending-.patch => 339-v6.0-mac80211-exclude-multicast-packets-from-AQL-pending-.patch} (100%) rename package/kernel/mac80211/patches/subsys/{340-wifi-mac80211-do-not-abuse-fq.lock-in-ieee80211_do_s.patch => 340-v5.19-wifi-mac80211-do-not-abuse-fq.lock-in-ieee80211_do_s.patch} (100%) rename package/kernel/mac80211/patches/subsys/{341-mac80211-Fix-deadlock-Don-t-start-TX-while-holding-f.patch => 341-v6.0-mac80211-Fix-deadlock-Don-t-start-TX-while-holding-f.patch} (100%) rename package/kernel/mac80211/patches/subsys/{342-mac80211-Ensure-vif-queues-are-operational-after-sta.patch => 342-v6.0-mac80211-Ensure-vif-queues-are-operational-after-sta.patch} (100%) rename package/kernel/mac80211/patches/subsys/{343-wifi-mac80211-fix-decap-offload-for-stations-on-AP_V.patch => 343-v6.1-wifi-mac80211-fix-decap-offload-for-stations-on-AP_V.patch} (100%) rename package/kernel/mac80211/patches/subsys/{344-wifi-cfg80211-fix-ieee80211_data_to_8023_exthdr-hand.patch => 344-v6.1-wifi-cfg80211-fix-ieee80211_data_to_8023_exthdr-hand.patch} (100%) rename package/kernel/mac80211/patches/subsys/{345-wifi-mac80211-do-not-drop-packets-smaller-than-the-L.patch => 345-v6.1-wifi-mac80211-do-not-drop-packets-smaller-than-the-L.patch} (100%) rename package/kernel/mac80211/patches/subsys/{363-bss-color-collision.patch => 363-v5.19-bss-color-collision.patch} (100%) diff --git a/package/kernel/mac80211/patches/subsys/303-mac80211-set-up-the-fwd_skb-dev-for-mesh-forwarding.patch b/package/kernel/mac80211/patches/subsys/303-v5.16-mac80211-set-up-the-fwd_skb-dev-for-mesh-forwarding.patch similarity index 100% rename from package/kernel/mac80211/patches/subsys/303-mac80211-set-up-the-fwd_skb-dev-for-mesh-forwarding.patch rename to package/kernel/mac80211/patches/subsys/303-v5.16-mac80211-set-up-the-fwd_skb-dev-for-mesh-forwarding.patch diff --git a/package/kernel/mac80211/patches/subsys/306-mac80211-use-coarse-boottime-for-airtime-fairness-co.patch b/package/kernel/mac80211/patches/subsys/306-v5.17-mac80211-use-coarse-boottime-for-airtime-fairness-co.patch similarity index 100% rename from package/kernel/mac80211/patches/subsys/306-mac80211-use-coarse-boottime-for-airtime-fairness-co.patch rename to package/kernel/mac80211/patches/subsys/306-v5.17-mac80211-use-coarse-boottime-for-airtime-fairness-co.patch diff --git a/package/kernel/mac80211/patches/subsys/308-mac80211-add-support-for-.ndo_fill_forward_path.patch b/package/kernel/mac80211/patches/subsys/308-v5.17-mac80211-add-support-for-.ndo_fill_forward_path.patch similarity index 100% rename from package/kernel/mac80211/patches/subsys/308-mac80211-add-support-for-.ndo_fill_forward_path.patch rename to package/kernel/mac80211/patches/subsys/308-v5.17-mac80211-add-support-for-.ndo_fill_forward_path.patch diff --git a/package/kernel/mac80211/patches/subsys/312-mac80211-split-beacon-retrieval-functions.patch b/package/kernel/mac80211/patches/subsys/312-v5.16-mac80211-split-beacon-retrieval-functions.patch similarity index 100% rename from package/kernel/mac80211/patches/subsys/312-mac80211-split-beacon-retrieval-functions.patch rename to package/kernel/mac80211/patches/subsys/312-v5.16-mac80211-split-beacon-retrieval-functions.patch diff --git a/package/kernel/mac80211/patches/subsys/313-nl80211-MBSSID-and-EMA-support-in-AP-mode.patch b/package/kernel/mac80211/patches/subsys/313-v5.16-nl80211-MBSSID-and-EMA-support-in-AP-mode.patch similarity index 100% rename from package/kernel/mac80211/patches/subsys/313-nl80211-MBSSID-and-EMA-support-in-AP-mode.patch rename to package/kernel/mac80211/patches/subsys/313-v5.16-nl80211-MBSSID-and-EMA-support-in-AP-mode.patch diff --git a/package/kernel/mac80211/patches/subsys/314-cfg80211-implement-APIs-for-dedicated-radar-detectio.patch b/package/kernel/mac80211/patches/subsys/314-v5.17-cfg80211-implement-APIs-for-dedicated-radar-detectio.patch similarity index 100% rename from package/kernel/mac80211/patches/subsys/314-cfg80211-implement-APIs-for-dedicated-radar-detectio.patch rename to package/kernel/mac80211/patches/subsys/314-v5.17-cfg80211-implement-APIs-for-dedicated-radar-detectio.patch diff --git a/package/kernel/mac80211/patches/subsys/315-cfg80211-move-offchan_cac_event-to-a-dedicated-work.patch b/package/kernel/mac80211/patches/subsys/315-v5.17-cfg80211-move-offchan_cac_event-to-a-dedicated-work.patch similarity index 100% rename from package/kernel/mac80211/patches/subsys/315-cfg80211-move-offchan_cac_event-to-a-dedicated-work.patch rename to package/kernel/mac80211/patches/subsys/315-v5.17-cfg80211-move-offchan_cac_event-to-a-dedicated-work.patch diff --git a/package/kernel/mac80211/patches/subsys/316-cfg80211-fix-possible-NULL-pointer-dereference-in-cf.patch b/package/kernel/mac80211/patches/subsys/316-v5.17-cfg80211-fix-possible-NULL-pointer-dereference-in-cf.patch similarity index 100% rename from package/kernel/mac80211/patches/subsys/316-cfg80211-fix-possible-NULL-pointer-dereference-in-cf.patch rename to package/kernel/mac80211/patches/subsys/316-v5.17-cfg80211-fix-possible-NULL-pointer-dereference-in-cf.patch diff --git a/package/kernel/mac80211/patches/subsys/317-cfg80211-schedule-offchan_cac_abort_wk-in-cfg80211_r.patch b/package/kernel/mac80211/patches/subsys/317-v5.17-cfg80211-schedule-offchan_cac_abort_wk-in-cfg80211_r.patch similarity index 100% rename from package/kernel/mac80211/patches/subsys/317-cfg80211-schedule-offchan_cac_abort_wk-in-cfg80211_r.patch rename to package/kernel/mac80211/patches/subsys/317-v5.17-cfg80211-schedule-offchan_cac_abort_wk-in-cfg80211_r.patch diff --git a/package/kernel/mac80211/patches/subsys/318-cfg80211-allow-continuous-radar-monitoring-on-offcha.patch b/package/kernel/mac80211/patches/subsys/318-v5.17-cfg80211-allow-continuous-radar-monitoring-on-offcha.patch similarity index 100% rename from package/kernel/mac80211/patches/subsys/318-cfg80211-allow-continuous-radar-monitoring-on-offcha.patch rename to package/kernel/mac80211/patches/subsys/318-v5.17-cfg80211-allow-continuous-radar-monitoring-on-offcha.patch diff --git a/package/kernel/mac80211/patches/subsys/319-mac80211-introduce-set_radar_offchan-callback.patch b/package/kernel/mac80211/patches/subsys/319-v5.17-mac80211-introduce-set_radar_offchan-callback.patch similarity index 100% rename from package/kernel/mac80211/patches/subsys/319-mac80211-introduce-set_radar_offchan-callback.patch rename to package/kernel/mac80211/patches/subsys/319-v5.17-mac80211-introduce-set_radar_offchan-callback.patch diff --git a/package/kernel/mac80211/patches/subsys/320-cfg80211-rename-offchannel_chain-structs-to-backgrou.patch b/package/kernel/mac80211/patches/subsys/320-v5.17-cfg80211-rename-offchannel_chain-structs-to-backgrou.patch similarity index 100% rename from package/kernel/mac80211/patches/subsys/320-cfg80211-rename-offchannel_chain-structs-to-backgrou.patch rename to package/kernel/mac80211/patches/subsys/320-v5.17-cfg80211-rename-offchannel_chain-structs-to-backgrou.patch diff --git a/package/kernel/mac80211/patches/subsys/323-mac80211-MBSSID-support-in-interface-handling.patch b/package/kernel/mac80211/patches/subsys/323-v5.16-mac80211-MBSSID-support-in-interface-handling.patch similarity index 100% rename from package/kernel/mac80211/patches/subsys/323-mac80211-MBSSID-support-in-interface-handling.patch rename to package/kernel/mac80211/patches/subsys/323-v5.16-mac80211-MBSSID-support-in-interface-handling.patch diff --git a/package/kernel/mac80211/patches/subsys/324-mac80211-MBSSID-beacon-handling-in-AP-mode.patch b/package/kernel/mac80211/patches/subsys/324-v5.18-mac80211-MBSSID-beacon-handling-in-AP-mode.patch similarity index 100% rename from package/kernel/mac80211/patches/subsys/324-mac80211-MBSSID-beacon-handling-in-AP-mode.patch rename to package/kernel/mac80211/patches/subsys/324-v5.18-mac80211-MBSSID-beacon-handling-in-AP-mode.patch diff --git a/package/kernel/mac80211/patches/subsys/325-mac80211-MBSSID-channel-switch.patch b/package/kernel/mac80211/patches/subsys/325-v5.18-mac80211-MBSSID-channel-switch.patch similarity index 100% rename from package/kernel/mac80211/patches/subsys/325-mac80211-MBSSID-channel-switch.patch rename to package/kernel/mac80211/patches/subsys/325-v5.18-mac80211-MBSSID-channel-switch.patch diff --git a/package/kernel/mac80211/patches/subsys/326-mac80211-update-bssid_indicator-in-ieee80211_assign_.patch b/package/kernel/mac80211/patches/subsys/326-v5.18-mac80211-update-bssid_indicator-in-ieee80211_assign_.patch similarity index 100% rename from package/kernel/mac80211/patches/subsys/326-mac80211-update-bssid_indicator-in-ieee80211_assign_.patch rename to package/kernel/mac80211/patches/subsys/326-v5.18-mac80211-update-bssid_indicator-in-ieee80211_assign_.patch diff --git a/package/kernel/mac80211/patches/subsys/328-mac80211-do-not-wake-queues-on-a-vif-that-is-being-s.patch b/package/kernel/mac80211/patches/subsys/328-v5.19-mac80211-do-not-wake-queues-on-a-vif-that-is-being-s.patch similarity index 100% rename from package/kernel/mac80211/patches/subsys/328-mac80211-do-not-wake-queues-on-a-vif-that-is-being-s.patch rename to package/kernel/mac80211/patches/subsys/328-v5.19-mac80211-do-not-wake-queues-on-a-vif-that-is-being-s.patch diff --git a/package/kernel/mac80211/patches/subsys/330-mac80211-switch-airtime-fairness-back-to-deficit-rou.patch b/package/kernel/mac80211/patches/subsys/330-v6.0-mac80211-switch-airtime-fairness-back-to-deficit-rou.patch similarity index 100% rename from package/kernel/mac80211/patches/subsys/330-mac80211-switch-airtime-fairness-back-to-deficit-rou.patch rename to package/kernel/mac80211/patches/subsys/330-v6.0-mac80211-switch-airtime-fairness-back-to-deficit-rou.patch diff --git a/package/kernel/mac80211/patches/subsys/331-mac80211-make-sta-airtime-deficit-field-s32-instead-.patch b/package/kernel/mac80211/patches/subsys/331-v6.0-mac80211-make-sta-airtime-deficit-field-s32-instead-.patch similarity index 100% rename from package/kernel/mac80211/patches/subsys/331-mac80211-make-sta-airtime-deficit-field-s32-instead-.patch rename to package/kernel/mac80211/patches/subsys/331-v6.0-mac80211-make-sta-airtime-deficit-field-s32-instead-.patch diff --git a/package/kernel/mac80211/patches/subsys/332-mac80211-consider-aql_tx_pending-when-checking-airti.patch b/package/kernel/mac80211/patches/subsys/332-v6.0-mac80211-consider-aql_tx_pending-when-checking-airti.patch similarity index 100% rename from package/kernel/mac80211/patches/subsys/332-mac80211-consider-aql_tx_pending-when-checking-airti.patch rename to package/kernel/mac80211/patches/subsys/332-v6.0-mac80211-consider-aql_tx_pending-when-checking-airti.patch diff --git a/package/kernel/mac80211/patches/subsys/333-mac80211-keep-recently-active-tx-queues-in-schedulin.patch b/package/kernel/mac80211/patches/subsys/333-v6.0-mac80211-keep-recently-active-tx-queues-in-schedulin.patch similarity index 100% rename from package/kernel/mac80211/patches/subsys/333-mac80211-keep-recently-active-tx-queues-in-schedulin.patch rename to package/kernel/mac80211/patches/subsys/333-v6.0-mac80211-keep-recently-active-tx-queues-in-schedulin.patch diff --git a/package/kernel/mac80211/patches/subsys/334-mac80211-add-a-per-PHY-AQL-limit-to-improve-fairness.patch b/package/kernel/mac80211/patches/subsys/334-v6.0-mac80211-add-a-per-PHY-AQL-limit-to-improve-fairness.patch similarity index 100% rename from package/kernel/mac80211/patches/subsys/334-mac80211-add-a-per-PHY-AQL-limit-to-improve-fairness.patch rename to package/kernel/mac80211/patches/subsys/334-v6.0-mac80211-add-a-per-PHY-AQL-limit-to-improve-fairness.patch diff --git a/package/kernel/mac80211/patches/subsys/335-mac80211-add-debugfs-file-to-display-per-phy-AQL-pen.patch b/package/kernel/mac80211/patches/subsys/335-v6.0-mac80211-add-debugfs-file-to-display-per-phy-AQL-pen.patch similarity index 100% rename from package/kernel/mac80211/patches/subsys/335-mac80211-add-debugfs-file-to-display-per-phy-AQL-pen.patch rename to package/kernel/mac80211/patches/subsys/335-v6.0-mac80211-add-debugfs-file-to-display-per-phy-AQL-pen.patch diff --git a/package/kernel/mac80211/patches/subsys/336-mac80211-only-accumulate-airtime-deficit-for-active-.patch b/package/kernel/mac80211/patches/subsys/336-v6.0-mac80211-only-accumulate-airtime-deficit-for-active-.patch similarity index 100% rename from package/kernel/mac80211/patches/subsys/336-mac80211-only-accumulate-airtime-deficit-for-active-.patch rename to package/kernel/mac80211/patches/subsys/336-v6.0-mac80211-only-accumulate-airtime-deficit-for-active-.patch diff --git a/package/kernel/mac80211/patches/subsys/339-mac80211-exclude-multicast-packets-from-AQL-pending-.patch b/package/kernel/mac80211/patches/subsys/339-v6.0-mac80211-exclude-multicast-packets-from-AQL-pending-.patch similarity index 100% rename from package/kernel/mac80211/patches/subsys/339-mac80211-exclude-multicast-packets-from-AQL-pending-.patch rename to package/kernel/mac80211/patches/subsys/339-v6.0-mac80211-exclude-multicast-packets-from-AQL-pending-.patch diff --git a/package/kernel/mac80211/patches/subsys/340-wifi-mac80211-do-not-abuse-fq.lock-in-ieee80211_do_s.patch b/package/kernel/mac80211/patches/subsys/340-v5.19-wifi-mac80211-do-not-abuse-fq.lock-in-ieee80211_do_s.patch similarity index 100% rename from package/kernel/mac80211/patches/subsys/340-wifi-mac80211-do-not-abuse-fq.lock-in-ieee80211_do_s.patch rename to package/kernel/mac80211/patches/subsys/340-v5.19-wifi-mac80211-do-not-abuse-fq.lock-in-ieee80211_do_s.patch diff --git a/package/kernel/mac80211/patches/subsys/341-mac80211-Fix-deadlock-Don-t-start-TX-while-holding-f.patch b/package/kernel/mac80211/patches/subsys/341-v6.0-mac80211-Fix-deadlock-Don-t-start-TX-while-holding-f.patch similarity index 100% rename from package/kernel/mac80211/patches/subsys/341-mac80211-Fix-deadlock-Don-t-start-TX-while-holding-f.patch rename to package/kernel/mac80211/patches/subsys/341-v6.0-mac80211-Fix-deadlock-Don-t-start-TX-while-holding-f.patch diff --git a/package/kernel/mac80211/patches/subsys/342-mac80211-Ensure-vif-queues-are-operational-after-sta.patch b/package/kernel/mac80211/patches/subsys/342-v6.0-mac80211-Ensure-vif-queues-are-operational-after-sta.patch similarity index 100% rename from package/kernel/mac80211/patches/subsys/342-mac80211-Ensure-vif-queues-are-operational-after-sta.patch rename to package/kernel/mac80211/patches/subsys/342-v6.0-mac80211-Ensure-vif-queues-are-operational-after-sta.patch diff --git a/package/kernel/mac80211/patches/subsys/343-wifi-mac80211-fix-decap-offload-for-stations-on-AP_V.patch b/package/kernel/mac80211/patches/subsys/343-v6.1-wifi-mac80211-fix-decap-offload-for-stations-on-AP_V.patch similarity index 100% rename from package/kernel/mac80211/patches/subsys/343-wifi-mac80211-fix-decap-offload-for-stations-on-AP_V.patch rename to package/kernel/mac80211/patches/subsys/343-v6.1-wifi-mac80211-fix-decap-offload-for-stations-on-AP_V.patch diff --git a/package/kernel/mac80211/patches/subsys/344-wifi-cfg80211-fix-ieee80211_data_to_8023_exthdr-hand.patch b/package/kernel/mac80211/patches/subsys/344-v6.1-wifi-cfg80211-fix-ieee80211_data_to_8023_exthdr-hand.patch similarity index 100% rename from package/kernel/mac80211/patches/subsys/344-wifi-cfg80211-fix-ieee80211_data_to_8023_exthdr-hand.patch rename to package/kernel/mac80211/patches/subsys/344-v6.1-wifi-cfg80211-fix-ieee80211_data_to_8023_exthdr-hand.patch diff --git a/package/kernel/mac80211/patches/subsys/345-wifi-mac80211-do-not-drop-packets-smaller-than-the-L.patch b/package/kernel/mac80211/patches/subsys/345-v6.1-wifi-mac80211-do-not-drop-packets-smaller-than-the-L.patch similarity index 100% rename from package/kernel/mac80211/patches/subsys/345-wifi-mac80211-do-not-drop-packets-smaller-than-the-L.patch rename to package/kernel/mac80211/patches/subsys/345-v6.1-wifi-mac80211-do-not-drop-packets-smaller-than-the-L.patch diff --git a/package/kernel/mac80211/patches/subsys/363-bss-color-collision.patch b/package/kernel/mac80211/patches/subsys/363-v5.19-bss-color-collision.patch similarity index 100% rename from package/kernel/mac80211/patches/subsys/363-bss-color-collision.patch rename to package/kernel/mac80211/patches/subsys/363-v5.19-bss-color-collision.patch From ceb1451c10c1588fd009021c0226823a9959e266 Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Fri, 28 Oct 2022 13:15:37 +0200 Subject: [PATCH 12/62] kernel: add mediatek soc ethernet performance improvements - implement multiqueue via qdma hardware shaper to deal with ports with different speeds - implement hardware DSA untagging - add NETIF_F_ALL_TSO to reduce unnecessary segmentation Signed-off-by: Felix Fietkau --- ..._eth_soc-account-for-vlan-in-rx-head.patch | 22 + ..._eth_soc-increase-tx-ring-side-for-Q.patch | 143 ++++ ..._eth_soc-avoid-port_mg-assignment-on.patch | 52 ++ ..._eth_soc-implement-multi-queue-suppo.patch | 654 ++++++++++++++++++ ...t-dsa-tag_mtk-assign-per-port-queues.patch | 20 + ...iatek-ppe-assign-per-port-queues-for.patch | 93 +++ ..._eth_soc-compile-out-netsys-v2-code-.patch | 28 + ...ort-for-DSA-rx-offloading-via-metada.patch | 70 ++ ..._eth_soc-fix-VLAN-rx-hardware-accele.patch | 196 ++++++ ..._eth_soc-work-around-issue-with-send.patch | 78 +++ ...rnet-mtk_eth_soc-set-NETIF_F_ALL_TSO.patch | 21 + ..._eth_soc-drop-packets-to-WDMA-if-the.patch | 37 + ..._eth_soc-implement-Clause-45-MDIO-ac.patch | 8 +- ...ethernet-mediatek-support-net-labels.patch | 8 +- 14 files changed, 1422 insertions(+), 8 deletions(-) create mode 100644 target/linux/generic/pending-5.15/732-01-net-ethernet-mtk_eth_soc-account-for-vlan-in-rx-head.patch create mode 100644 target/linux/generic/pending-5.15/732-02-net-ethernet-mtk_eth_soc-increase-tx-ring-side-for-Q.patch create mode 100644 target/linux/generic/pending-5.15/732-03-net-ethernet-mtk_eth_soc-avoid-port_mg-assignment-on.patch create mode 100644 target/linux/generic/pending-5.15/732-04-net-ethernet-mtk_eth_soc-implement-multi-queue-suppo.patch create mode 100644 target/linux/generic/pending-5.15/732-05-net-dsa-tag_mtk-assign-per-port-queues.patch create mode 100644 target/linux/generic/pending-5.15/732-06-net-ethernet-mediatek-ppe-assign-per-port-queues-for.patch create mode 100644 target/linux/generic/pending-5.15/732-07-net-ethernet-mtk_eth_soc-compile-out-netsys-v2-code-.patch create mode 100644 target/linux/generic/pending-5.15/732-08-net-dsa-add-support-for-DSA-rx-offloading-via-metada.patch create mode 100644 target/linux/generic/pending-5.15/732-09-net-ethernet-mtk_eth_soc-fix-VLAN-rx-hardware-accele.patch create mode 100644 target/linux/generic/pending-5.15/732-10-net-ethernet-mtk_eth_soc-work-around-issue-with-send.patch create mode 100644 target/linux/generic/pending-5.15/732-11-net-ethernet-mtk_eth_soc-set-NETIF_F_ALL_TSO.patch create mode 100644 target/linux/generic/pending-5.15/732-12-net-ethernet-mtk_eth_soc-drop-packets-to-WDMA-if-the.patch diff --git a/target/linux/generic/pending-5.15/732-01-net-ethernet-mtk_eth_soc-account-for-vlan-in-rx-head.patch b/target/linux/generic/pending-5.15/732-01-net-ethernet-mtk_eth_soc-account-for-vlan-in-rx-head.patch new file mode 100644 index 0000000000..45af898cf0 --- /dev/null +++ b/target/linux/generic/pending-5.15/732-01-net-ethernet-mtk_eth_soc-account-for-vlan-in-rx-head.patch @@ -0,0 +1,22 @@ +From: Felix Fietkau +Date: Thu, 27 Oct 2022 19:50:31 +0200 +Subject: [PATCH] net: ethernet: mtk_eth_soc: account for vlan in rx + header length + +The network stack assumes that devices can handle an extra VLAN tag without +increasing the MTU + +Signed-off-by: Felix Fietkau +--- + +--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.h ++++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.h +@@ -29,7 +29,7 @@ + #define MTK_TX_DMA_BUF_LEN_V2 0xffff + #define MTK_DMA_SIZE 512 + #define MTK_MAC_COUNT 2 +-#define MTK_RX_ETH_HLEN (ETH_HLEN + ETH_FCS_LEN) ++#define MTK_RX_ETH_HLEN (VLAN_ETH_HLEN + ETH_FCS_LEN) + #define MTK_RX_HLEN (NET_SKB_PAD + MTK_RX_ETH_HLEN + NET_IP_ALIGN) + #define MTK_DMA_DUMMY_DESC 0xffffffff + #define MTK_DEFAULT_MSG_ENABLE (NETIF_MSG_DRV | \ diff --git a/target/linux/generic/pending-5.15/732-02-net-ethernet-mtk_eth_soc-increase-tx-ring-side-for-Q.patch b/target/linux/generic/pending-5.15/732-02-net-ethernet-mtk_eth_soc-increase-tx-ring-side-for-Q.patch new file mode 100644 index 0000000000..c6526a39a8 --- /dev/null +++ b/target/linux/generic/pending-5.15/732-02-net-ethernet-mtk_eth_soc-increase-tx-ring-side-for-Q.patch @@ -0,0 +1,143 @@ +From: Felix Fietkau +Date: Thu, 27 Oct 2022 19:53:57 +0200 +Subject: [PATCH] net: ethernet: mtk_eth_soc: increase tx ring side for + QDMA devices + +In order to use the hardware traffic shaper feature, a larger tx ring is +needed, especially for the scratch ring, which the hardware shaper uses to +reorder packets. + +Signed-off-by: Felix Fietkau +--- + +--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c ++++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c +@@ -894,7 +894,7 @@ static int mtk_init_fq_dma(struct mtk_et + { + const struct mtk_soc_data *soc = eth->soc; + dma_addr_t phy_ring_tail; +- int cnt = MTK_DMA_SIZE; ++ int cnt = MTK_QDMA_RING_SIZE; + dma_addr_t dma_addr; + int i; + +@@ -2148,19 +2148,25 @@ static int mtk_tx_alloc(struct mtk_eth * + struct mtk_tx_ring *ring = ð->tx_ring; + int i, sz = soc->txrx.txd_size; + struct mtk_tx_dma_v2 *txd; ++ int ring_size; + +- ring->buf = kcalloc(MTK_DMA_SIZE, sizeof(*ring->buf), ++ if (MTK_HAS_CAPS(soc->caps, MTK_QDMA)) ++ ring_size = MTK_QDMA_RING_SIZE; ++ else ++ ring_size = MTK_DMA_SIZE; ++ ++ ring->buf = kcalloc(ring_size, sizeof(*ring->buf), + GFP_KERNEL); + if (!ring->buf) + goto no_tx_mem; + +- ring->dma = dma_alloc_coherent(eth->dma_dev, MTK_DMA_SIZE * sz, ++ ring->dma = dma_alloc_coherent(eth->dma_dev, ring_size * sz, + &ring->phys, GFP_KERNEL); + if (!ring->dma) + goto no_tx_mem; + +- for (i = 0; i < MTK_DMA_SIZE; i++) { +- int next = (i + 1) % MTK_DMA_SIZE; ++ for (i = 0; i < ring_size; i++) { ++ int next = (i + 1) % ring_size; + u32 next_ptr = ring->phys + next * sz; + + txd = ring->dma + i * sz; +@@ -2180,22 +2186,22 @@ static int mtk_tx_alloc(struct mtk_eth * + * descriptors in ring->dma_pdma. + */ + if (!MTK_HAS_CAPS(soc->caps, MTK_QDMA)) { +- ring->dma_pdma = dma_alloc_coherent(eth->dma_dev, MTK_DMA_SIZE * sz, ++ ring->dma_pdma = dma_alloc_coherent(eth->dma_dev, ring_size * sz, + &ring->phys_pdma, GFP_KERNEL); + if (!ring->dma_pdma) + goto no_tx_mem; + +- for (i = 0; i < MTK_DMA_SIZE; i++) { ++ for (i = 0; i < ring_size; i++) { + ring->dma_pdma[i].txd2 = TX_DMA_DESP2_DEF; + ring->dma_pdma[i].txd4 = 0; + } + } + +- ring->dma_size = MTK_DMA_SIZE; +- atomic_set(&ring->free_count, MTK_DMA_SIZE - 2); ++ ring->dma_size = ring_size; ++ atomic_set(&ring->free_count, ring_size - 2); + ring->next_free = ring->dma; + ring->last_free = (void *)txd; +- ring->last_free_ptr = (u32)(ring->phys + ((MTK_DMA_SIZE - 1) * sz)); ++ ring->last_free_ptr = (u32)(ring->phys + ((ring_size - 1) * sz)); + ring->thresh = MAX_SKB_FRAGS; + + /* make sure that all changes to the dma ring are flushed before we +@@ -2207,14 +2213,14 @@ static int mtk_tx_alloc(struct mtk_eth * + mtk_w32(eth, ring->phys, soc->reg_map->qdma.ctx_ptr); + mtk_w32(eth, ring->phys, soc->reg_map->qdma.dtx_ptr); + mtk_w32(eth, +- ring->phys + ((MTK_DMA_SIZE - 1) * sz), ++ ring->phys + ((ring_size - 1) * sz), + soc->reg_map->qdma.crx_ptr); + mtk_w32(eth, ring->last_free_ptr, soc->reg_map->qdma.drx_ptr); + mtk_w32(eth, (QDMA_RES_THRES << 8) | QDMA_RES_THRES, + soc->reg_map->qdma.qtx_cfg); + } else { + mtk_w32(eth, ring->phys_pdma, MT7628_TX_BASE_PTR0); +- mtk_w32(eth, MTK_DMA_SIZE, MT7628_TX_MAX_CNT0); ++ mtk_w32(eth, ring_size, MT7628_TX_MAX_CNT0); + mtk_w32(eth, 0, MT7628_TX_CTX_IDX0); + mtk_w32(eth, MT7628_PST_DTX_IDX0, soc->reg_map->pdma.rst_idx); + } +@@ -2232,7 +2238,7 @@ static void mtk_tx_clean(struct mtk_eth + int i; + + if (ring->buf) { +- for (i = 0; i < MTK_DMA_SIZE; i++) ++ for (i = 0; i < ring->dma_size; i++) + mtk_tx_unmap(eth, &ring->buf[i], false); + kfree(ring->buf); + ring->buf = NULL; +@@ -2240,14 +2246,14 @@ static void mtk_tx_clean(struct mtk_eth + + if (ring->dma) { + dma_free_coherent(eth->dma_dev, +- MTK_DMA_SIZE * soc->txrx.txd_size, ++ ring->dma_size * soc->txrx.txd_size, + ring->dma, ring->phys); + ring->dma = NULL; + } + + if (ring->dma_pdma) { + dma_free_coherent(eth->dma_dev, +- MTK_DMA_SIZE * soc->txrx.txd_size, ++ ring->dma_size * soc->txrx.txd_size, + ring->dma_pdma, ring->phys_pdma); + ring->dma_pdma = NULL; + } +@@ -2767,7 +2773,7 @@ static void mtk_dma_free(struct mtk_eth + netdev_reset_queue(eth->netdev[i]); + if (eth->scratch_ring) { + dma_free_coherent(eth->dma_dev, +- MTK_DMA_SIZE * soc->txrx.txd_size, ++ MTK_QDMA_RING_SIZE * soc->txrx.txd_size, + eth->scratch_ring, eth->phy_scratch_ring); + eth->scratch_ring = NULL; + eth->phy_scratch_ring = 0; +--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.h ++++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.h +@@ -27,6 +27,7 @@ + #define MTK_MAX_RX_LENGTH_2K 2048 + #define MTK_TX_DMA_BUF_LEN 0x3fff + #define MTK_TX_DMA_BUF_LEN_V2 0xffff ++#define MTK_QDMA_RING_SIZE 2048 + #define MTK_DMA_SIZE 512 + #define MTK_MAC_COUNT 2 + #define MTK_RX_ETH_HLEN (VLAN_ETH_HLEN + ETH_FCS_LEN) diff --git a/target/linux/generic/pending-5.15/732-03-net-ethernet-mtk_eth_soc-avoid-port_mg-assignment-on.patch b/target/linux/generic/pending-5.15/732-03-net-ethernet-mtk_eth_soc-avoid-port_mg-assignment-on.patch new file mode 100644 index 0000000000..116ae011f0 --- /dev/null +++ b/target/linux/generic/pending-5.15/732-03-net-ethernet-mtk_eth_soc-avoid-port_mg-assignment-on.patch @@ -0,0 +1,52 @@ +From: Felix Fietkau +Date: Fri, 4 Nov 2022 19:49:08 +0100 +Subject: [PATCH] net: ethernet: mtk_eth_soc: avoid port_mg assignment on + MT7622 and newer + +On newer chips, this field is unused and contains some bits related to queue +assignment. Initialize it to 0 in those cases. +Fix offload_version on MT7621 and MT7623, which still need the previous value. + +Signed-off-by: Felix Fietkau +--- + +--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c ++++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c +@@ -4197,7 +4197,7 @@ static const struct mtk_soc_data mt7621_ + .hw_features = MTK_HW_FEATURES, + .required_clks = MT7621_CLKS_BITMAP, + .required_pctl = false, +- .offload_version = 2, ++ .offload_version = 1, + .hash_offset = 2, + .foe_entry_size = sizeof(struct mtk_foe_entry) - 16, + .txrx = { +@@ -4237,7 +4237,7 @@ static const struct mtk_soc_data mt7623_ + .hw_features = MTK_HW_FEATURES, + .required_clks = MT7623_CLKS_BITMAP, + .required_pctl = true, +- .offload_version = 2, ++ .offload_version = 1, + .hash_offset = 2, + .foe_entry_size = sizeof(struct mtk_foe_entry) - 16, + .txrx = { +--- a/drivers/net/ethernet/mediatek/mtk_ppe.c ++++ b/drivers/net/ethernet/mediatek/mtk_ppe.c +@@ -215,6 +215,8 @@ int mtk_foe_entry_prepare(struct mtk_eth + val = FIELD_PREP(MTK_FOE_IB2_DEST_PORT_V2, pse_port) | + FIELD_PREP(MTK_FOE_IB2_PORT_AG_V2, 0xf); + } else { ++ int port_mg = eth->soc->offload_version > 1 ? 0 : 0x3f; ++ + val = FIELD_PREP(MTK_FOE_IB1_STATE, MTK_FOE_STATE_BIND) | + FIELD_PREP(MTK_FOE_IB1_PACKET_TYPE, type) | + FIELD_PREP(MTK_FOE_IB1_UDP, l4proto == IPPROTO_UDP) | +@@ -222,7 +224,7 @@ int mtk_foe_entry_prepare(struct mtk_eth + entry->ib1 = val; + + val = FIELD_PREP(MTK_FOE_IB2_DEST_PORT, pse_port) | +- FIELD_PREP(MTK_FOE_IB2_PORT_MG, 0x3f) | ++ FIELD_PREP(MTK_FOE_IB2_PORT_MG, port_mg) | + FIELD_PREP(MTK_FOE_IB2_PORT_AG, 0x1f); + } + diff --git a/target/linux/generic/pending-5.15/732-04-net-ethernet-mtk_eth_soc-implement-multi-queue-suppo.patch b/target/linux/generic/pending-5.15/732-04-net-ethernet-mtk_eth_soc-implement-multi-queue-suppo.patch new file mode 100644 index 0000000000..fd1898586f --- /dev/null +++ b/target/linux/generic/pending-5.15/732-04-net-ethernet-mtk_eth_soc-implement-multi-queue-suppo.patch @@ -0,0 +1,654 @@ +From: Felix Fietkau +Date: Thu, 27 Oct 2022 20:17:27 +0200 +Subject: [PATCH] net: ethernet: mtk_eth_soc: implement multi-queue + support for per-port queues + +When sending traffic to multiple ports with different link speeds, queued +packets to one port can drown out tx to other ports. +In order to better handle transmission to multiple ports, use the hardware +shaper feature to implement weighted fair queueing between ports. +Weight and maximum rate are automatically adjusted based on the link speed +of the port. +The first 3 queues are unrestricted and reserved for non-DSA direct tx on +GMAC ports. The following queues are automatically assigned by the MTK DSA +tag driver based on the target port number. +The PPE offload code configures the queues for offloaded traffic in the same +way. +This feature is only supported on devices supporting QDMA. All queues still +share the same DMA ring and descriptor pool. + +Signed-off-by: Felix Fietkau +--- + +--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c ++++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c +@@ -54,6 +54,7 @@ static const struct mtk_reg_map mtk_reg_ + }, + .qdma = { + .qtx_cfg = 0x1800, ++ .qtx_sch = 0x1804, + .rx_ptr = 0x1900, + .rx_cnt_cfg = 0x1904, + .qcrx_ptr = 0x1908, +@@ -61,6 +62,7 @@ static const struct mtk_reg_map mtk_reg_ + .rst_idx = 0x1a08, + .delay_irq = 0x1a0c, + .fc_th = 0x1a10, ++ .tx_sch_rate = 0x1a14, + .int_grp = 0x1a20, + .hred = 0x1a44, + .ctx_ptr = 0x1b00, +@@ -113,6 +115,7 @@ static const struct mtk_reg_map mt7986_r + }, + .qdma = { + .qtx_cfg = 0x4400, ++ .qtx_sch = 0x4404, + .rx_ptr = 0x4500, + .rx_cnt_cfg = 0x4504, + .qcrx_ptr = 0x4508, +@@ -130,6 +133,7 @@ static const struct mtk_reg_map mt7986_r + .fq_tail = 0x4724, + .fq_count = 0x4728, + .fq_blen = 0x472c, ++ .tx_sch_rate = 0x4798, + }, + .gdm1_cnt = 0x1c00, + .gdma_to_ppe0 = 0x3333, +@@ -570,6 +574,75 @@ static void mtk_mac_link_down(struct phy + mtk_w32(mac->hw, mcr, MTK_MAC_MCR(mac->id)); + } + ++static void mtk_set_queue_speed(struct mtk_eth *eth, unsigned int idx, ++ int speed) ++{ ++ const struct mtk_soc_data *soc = eth->soc; ++ u32 ofs, val; ++ ++ if (!MTK_HAS_CAPS(soc->caps, MTK_QDMA)) ++ return; ++ ++ val = MTK_QTX_SCH_MIN_RATE_EN | ++ /* minimum: 10 Mbps */ ++ FIELD_PREP(MTK_QTX_SCH_MIN_RATE_MAN, 1) | ++ FIELD_PREP(MTK_QTX_SCH_MIN_RATE_EXP, 4) | ++ MTK_QTX_SCH_LEAKY_BUCKET_SIZE; ++ if (!MTK_HAS_CAPS(eth->soc->caps, MTK_NETSYS_V2)) ++ val |= MTK_QTX_SCH_LEAKY_BUCKET_EN; ++ ++ if (IS_ENABLED(CONFIG_SOC_MT7621)) { ++ switch (speed) { ++ case SPEED_10: ++ val |= MTK_QTX_SCH_MAX_RATE_EN | ++ FIELD_PREP(MTK_QTX_SCH_MAX_RATE_MAN, 103) | ++ FIELD_PREP(MTK_QTX_SCH_MAX_RATE_EXP, 2) | ++ FIELD_PREP(MTK_QTX_SCH_MAX_RATE_WEIGHT, 1); ++ break; ++ case SPEED_100: ++ val |= MTK_QTX_SCH_MAX_RATE_EN | ++ FIELD_PREP(MTK_QTX_SCH_MAX_RATE_MAN, 103) | ++ FIELD_PREP(MTK_QTX_SCH_MAX_RATE_EXP, 3); ++ FIELD_PREP(MTK_QTX_SCH_MAX_RATE_WEIGHT, 1); ++ break; ++ case SPEED_1000: ++ val |= MTK_QTX_SCH_MAX_RATE_EN | ++ FIELD_PREP(MTK_QTX_SCH_MAX_RATE_MAN, 105) | ++ FIELD_PREP(MTK_QTX_SCH_MAX_RATE_EXP, 4) | ++ FIELD_PREP(MTK_QTX_SCH_MAX_RATE_WEIGHT, 10); ++ break; ++ default: ++ break; ++ } ++ } else { ++ switch (speed) { ++ case SPEED_10: ++ val |= MTK_QTX_SCH_MAX_RATE_EN | ++ FIELD_PREP(MTK_QTX_SCH_MAX_RATE_MAN, 1) | ++ FIELD_PREP(MTK_QTX_SCH_MAX_RATE_EXP, 4) | ++ FIELD_PREP(MTK_QTX_SCH_MAX_RATE_WEIGHT, 1); ++ break; ++ case SPEED_100: ++ val |= MTK_QTX_SCH_MAX_RATE_EN | ++ FIELD_PREP(MTK_QTX_SCH_MAX_RATE_MAN, 1) | ++ FIELD_PREP(MTK_QTX_SCH_MAX_RATE_EXP, 5); ++ FIELD_PREP(MTK_QTX_SCH_MAX_RATE_WEIGHT, 1); ++ break; ++ case SPEED_1000: ++ val |= MTK_QTX_SCH_MAX_RATE_EN | ++ FIELD_PREP(MTK_QTX_SCH_MAX_RATE_MAN, 10) | ++ FIELD_PREP(MTK_QTX_SCH_MAX_RATE_EXP, 5) | ++ FIELD_PREP(MTK_QTX_SCH_MAX_RATE_WEIGHT, 10); ++ break; ++ default: ++ break; ++ } ++ } ++ ++ ofs = MTK_QTX_OFFSET * idx; ++ mtk_w32(eth, val, soc->reg_map->qdma.qtx_sch + ofs); ++} ++ + static void mtk_mac_link_up(struct phylink_config *config, + struct phy_device *phy, + unsigned int mode, phy_interface_t interface, +@@ -595,6 +668,8 @@ static void mtk_mac_link_up(struct phyli + break; + } + ++ mtk_set_queue_speed(mac->hw, mac->id, speed); ++ + /* Configure duplex */ + if (duplex == DUPLEX_FULL) + mcr |= MAC_MCR_FORCE_DPX; +@@ -1053,7 +1128,8 @@ static void mtk_tx_set_dma_desc_v1(struc + + WRITE_ONCE(desc->txd1, info->addr); + +- data = TX_DMA_SWC | TX_DMA_PLEN0(info->size); ++ data = TX_DMA_SWC | TX_DMA_PLEN0(info->size) | ++ FIELD_PREP(TX_DMA_PQID, info->qid); + if (info->last) + data |= TX_DMA_LS0; + WRITE_ONCE(desc->txd3, data); +@@ -1087,9 +1163,6 @@ static void mtk_tx_set_dma_desc_v2(struc + data |= TX_DMA_LS0; + WRITE_ONCE(desc->txd3, data); + +- if (!info->qid && mac->id) +- info->qid = MTK_QDMA_GMAC2_QID; +- + data = (mac->id + 1) << TX_DMA_FPORT_SHIFT_V2; /* forward port */ + data |= TX_DMA_SWC_V2 | QID_BITS_V2(info->qid); + WRITE_ONCE(desc->txd4, data); +@@ -1133,11 +1206,12 @@ static int mtk_tx_map(struct sk_buff *sk + .gso = gso, + .csum = skb->ip_summed == CHECKSUM_PARTIAL, + .vlan = skb_vlan_tag_present(skb), +- .qid = skb->mark & MTK_QDMA_TX_MASK, ++ .qid = skb_get_queue_mapping(skb), + .vlan_tci = skb_vlan_tag_get(skb), + .first = true, + .last = !skb_is_nonlinear(skb), + }; ++ struct netdev_queue *txq; + struct mtk_mac *mac = netdev_priv(dev); + struct mtk_eth *eth = mac->hw; + const struct mtk_soc_data *soc = eth->soc; +@@ -1145,8 +1219,10 @@ static int mtk_tx_map(struct sk_buff *sk + struct mtk_tx_dma *itxd_pdma, *txd_pdma; + struct mtk_tx_buf *itx_buf, *tx_buf; + int i, n_desc = 1; ++ int queue = skb_get_queue_mapping(skb); + int k = 0; + ++ txq = netdev_get_tx_queue(dev, queue); + itxd = ring->next_free; + itxd_pdma = qdma_to_pdma(ring, itxd); + if (itxd == ring->last_free) +@@ -1195,7 +1271,7 @@ static int mtk_tx_map(struct sk_buff *sk + memset(&txd_info, 0, sizeof(struct mtk_tx_dma_desc_info)); + txd_info.size = min_t(unsigned int, frag_size, + soc->txrx.dma_max_len); +- txd_info.qid = skb->mark & MTK_QDMA_TX_MASK; ++ txd_info.qid = queue; + txd_info.last = i == skb_shinfo(skb)->nr_frags - 1 && + !(frag_size - txd_info.size); + txd_info.addr = skb_frag_dma_map(eth->dma_dev, frag, +@@ -1234,7 +1310,7 @@ static int mtk_tx_map(struct sk_buff *sk + txd_pdma->txd2 |= TX_DMA_LS1; + } + +- netdev_sent_queue(dev, skb->len); ++ netdev_tx_sent_queue(txq, skb->len); + skb_tx_timestamp(skb); + + ring->next_free = mtk_qdma_phys_to_virt(ring, txd->txd2); +@@ -1246,8 +1322,7 @@ static int mtk_tx_map(struct sk_buff *sk + wmb(); + + if (MTK_HAS_CAPS(soc->caps, MTK_QDMA)) { +- if (netif_xmit_stopped(netdev_get_tx_queue(dev, 0)) || +- !netdev_xmit_more()) ++ if (netif_xmit_stopped(txq) || !netdev_xmit_more()) + mtk_w32(eth, txd->txd2, soc->reg_map->qdma.ctx_ptr); + } else { + int next_idx; +@@ -1316,7 +1391,7 @@ static void mtk_wake_queue(struct mtk_et + for (i = 0; i < MTK_MAC_COUNT; i++) { + if (!eth->netdev[i]) + continue; +- netif_wake_queue(eth->netdev[i]); ++ netif_tx_wake_all_queues(eth->netdev[i]); + } + } + +@@ -1340,7 +1415,7 @@ static netdev_tx_t mtk_start_xmit(struct + + tx_num = mtk_cal_txd_req(eth, skb); + if (unlikely(atomic_read(&ring->free_count) <= tx_num)) { +- netif_stop_queue(dev); ++ netif_tx_stop_all_queues(dev); + netif_err(eth, tx_queued, dev, + "Tx Ring full when queue awake!\n"); + spin_unlock(ð->page_lock); +@@ -1366,7 +1441,7 @@ static netdev_tx_t mtk_start_xmit(struct + goto drop; + + if (unlikely(atomic_read(&ring->free_count) <= ring->thresh)) +- netif_stop_queue(dev); ++ netif_tx_stop_all_queues(dev); + + spin_unlock(ð->page_lock); + +@@ -1533,10 +1608,12 @@ static int mtk_xdp_submit_frame(struct m + struct skb_shared_info *sinfo = xdp_get_shared_info_from_frame(xdpf); + const struct mtk_soc_data *soc = eth->soc; + struct mtk_tx_ring *ring = ð->tx_ring; ++ struct mtk_mac *mac = netdev_priv(dev); + struct mtk_tx_dma_desc_info txd_info = { + .size = xdpf->len, + .first = true, + .last = !xdp_frame_has_frags(xdpf), ++ .qid = mac->id, + }; + int err, index = 0, n_desc = 1, nr_frags; + struct mtk_tx_dma *htxd, *txd, *txd_pdma; +@@ -1587,6 +1664,7 @@ static int mtk_xdp_submit_frame(struct m + memset(&txd_info, 0, sizeof(struct mtk_tx_dma_desc_info)); + txd_info.size = skb_frag_size(&sinfo->frags[index]); + txd_info.last = index + 1 == nr_frags; ++ txd_info.qid = mac->id; + data = skb_frag_address(&sinfo->frags[index]); + + index++; +@@ -1938,8 +2016,46 @@ rx_done: + return done; + } + ++struct mtk_poll_state { ++ struct netdev_queue *txq; ++ unsigned int total; ++ unsigned int done; ++ unsigned int bytes; ++}; ++ ++static void ++mtk_poll_tx_done(struct mtk_eth *eth, struct mtk_poll_state *state, u8 mac, ++ struct sk_buff *skb) ++{ ++ struct netdev_queue *txq; ++ struct net_device *dev; ++ unsigned int bytes = skb->len; ++ ++ state->total++; ++ eth->tx_packets++; ++ eth->tx_bytes += bytes; ++ ++ dev = eth->netdev[mac]; ++ if (!dev) ++ return; ++ ++ txq = netdev_get_tx_queue(dev, skb_get_queue_mapping(skb)); ++ if (state->txq == txq) { ++ state->done++; ++ state->bytes += bytes; ++ return; ++ } ++ ++ if (state->txq) ++ netdev_tx_completed_queue(state->txq, state->done, state->bytes); ++ ++ state->txq = txq; ++ state->done = 1; ++ state->bytes = bytes; ++} ++ + static int mtk_poll_tx_qdma(struct mtk_eth *eth, int budget, +- unsigned int *done, unsigned int *bytes) ++ struct mtk_poll_state *state) + { + const struct mtk_reg_map *reg_map = eth->soc->reg_map; + struct mtk_tx_ring *ring = ð->tx_ring; +@@ -1969,12 +2085,9 @@ static int mtk_poll_tx_qdma(struct mtk_e + break; + + if (tx_buf->data != (void *)MTK_DMA_DUMMY_DESC) { +- if (tx_buf->type == MTK_TYPE_SKB) { +- struct sk_buff *skb = tx_buf->data; ++ if (tx_buf->type == MTK_TYPE_SKB) ++ mtk_poll_tx_done(eth, state, mac, tx_buf->data); + +- bytes[mac] += skb->len; +- done[mac]++; +- } + budget--; + } + mtk_tx_unmap(eth, tx_buf, true); +@@ -1992,7 +2105,7 @@ static int mtk_poll_tx_qdma(struct mtk_e + } + + static int mtk_poll_tx_pdma(struct mtk_eth *eth, int budget, +- unsigned int *done, unsigned int *bytes) ++ struct mtk_poll_state *state) + { + struct mtk_tx_ring *ring = ð->tx_ring; + struct mtk_tx_buf *tx_buf; +@@ -2008,12 +2121,8 @@ static int mtk_poll_tx_pdma(struct mtk_e + break; + + if (tx_buf->data != (void *)MTK_DMA_DUMMY_DESC) { +- if (tx_buf->type == MTK_TYPE_SKB) { +- struct sk_buff *skb = tx_buf->data; +- +- bytes[0] += skb->len; +- done[0]++; +- } ++ if (tx_buf->type == MTK_TYPE_SKB) ++ mtk_poll_tx_done(eth, state, 0, tx_buf->data); + budget--; + } + mtk_tx_unmap(eth, tx_buf, true); +@@ -2034,26 +2143,15 @@ static int mtk_poll_tx(struct mtk_eth *e + { + struct mtk_tx_ring *ring = ð->tx_ring; + struct dim_sample dim_sample = {}; +- unsigned int done[MTK_MAX_DEVS]; +- unsigned int bytes[MTK_MAX_DEVS]; +- int total = 0, i; +- +- memset(done, 0, sizeof(done)); +- memset(bytes, 0, sizeof(bytes)); ++ struct mtk_poll_state state = {}; + + if (MTK_HAS_CAPS(eth->soc->caps, MTK_QDMA)) +- budget = mtk_poll_tx_qdma(eth, budget, done, bytes); ++ budget = mtk_poll_tx_qdma(eth, budget, &state); + else +- budget = mtk_poll_tx_pdma(eth, budget, done, bytes); ++ budget = mtk_poll_tx_pdma(eth, budget, &state); + +- for (i = 0; i < MTK_MAC_COUNT; i++) { +- if (!eth->netdev[i] || !done[i]) +- continue; +- netdev_completed_queue(eth->netdev[i], done[i], bytes[i]); +- total += done[i]; +- eth->tx_packets += done[i]; +- eth->tx_bytes += bytes[i]; +- } ++ if (state.txq) ++ netdev_tx_completed_queue(state.txq, state.done, state.bytes); + + dim_update_sample(eth->tx_events, eth->tx_packets, eth->tx_bytes, + &dim_sample); +@@ -2063,7 +2161,7 @@ static int mtk_poll_tx(struct mtk_eth *e + (atomic_read(&ring->free_count) > ring->thresh)) + mtk_wake_queue(eth); + +- return total; ++ return state.total; + } + + static void mtk_handle_status_irq(struct mtk_eth *eth) +@@ -2149,6 +2247,7 @@ static int mtk_tx_alloc(struct mtk_eth * + int i, sz = soc->txrx.txd_size; + struct mtk_tx_dma_v2 *txd; + int ring_size; ++ u32 ofs, val; + + if (MTK_HAS_CAPS(soc->caps, MTK_QDMA)) + ring_size = MTK_QDMA_RING_SIZE; +@@ -2216,8 +2315,25 @@ static int mtk_tx_alloc(struct mtk_eth * + ring->phys + ((ring_size - 1) * sz), + soc->reg_map->qdma.crx_ptr); + mtk_w32(eth, ring->last_free_ptr, soc->reg_map->qdma.drx_ptr); +- mtk_w32(eth, (QDMA_RES_THRES << 8) | QDMA_RES_THRES, +- soc->reg_map->qdma.qtx_cfg); ++ ++ for (i = 0, ofs = 0; i < MTK_QDMA_NUM_QUEUES; i++) { ++ val = (QDMA_RES_THRES << 8) | QDMA_RES_THRES; ++ mtk_w32(eth, val, soc->reg_map->qdma.qtx_cfg + ofs); ++ ++ val = MTK_QTX_SCH_MIN_RATE_EN | ++ /* minimum: 10 Mbps */ ++ FIELD_PREP(MTK_QTX_SCH_MIN_RATE_MAN, 1) | ++ FIELD_PREP(MTK_QTX_SCH_MIN_RATE_EXP, 4) | ++ MTK_QTX_SCH_LEAKY_BUCKET_SIZE; ++ if (!MTK_HAS_CAPS(eth->soc->caps, MTK_NETSYS_V2)) ++ val |= MTK_QTX_SCH_LEAKY_BUCKET_EN; ++ mtk_w32(eth, val, soc->reg_map->qdma.qtx_sch + ofs); ++ ofs += MTK_QTX_OFFSET; ++ } ++ val = MTK_QDMA_TX_SCH_MAX_WFQ | (MTK_QDMA_TX_SCH_MAX_WFQ << 16); ++ mtk_w32(eth, val, soc->reg_map->qdma.tx_sch_rate); ++ if (MTK_HAS_CAPS(eth->soc->caps, MTK_NETSYS_V2)) ++ mtk_w32(eth, val, soc->reg_map->qdma.tx_sch_rate + 4); + } else { + mtk_w32(eth, ring->phys_pdma, MT7628_TX_BASE_PTR0); + mtk_w32(eth, ring_size, MT7628_TX_MAX_CNT0); +@@ -2882,7 +2998,7 @@ static int mtk_start_dma(struct mtk_eth + if (MTK_HAS_CAPS(eth->soc->caps, MTK_NETSYS_V2)) + val |= MTK_MUTLI_CNT | MTK_RESV_BUF | + MTK_WCOMP_EN | MTK_DMAD_WR_WDONE | +- MTK_CHK_DDONE_EN; ++ MTK_CHK_DDONE_EN | MTK_LEAKY_BUCKET_EN; + else + val |= MTK_RX_BT_32DWORDS; + mtk_w32(eth, val, reg_map->qdma.glo_cfg); +@@ -2928,6 +3044,45 @@ static void mtk_gdm_config(struct mtk_et + mtk_w32(eth, 0, MTK_RST_GL); + } + ++static int mtk_device_event(struct notifier_block *n, unsigned long event, void *ptr) ++{ ++ struct mtk_mac *mac = container_of(n, struct mtk_mac, device_notifier); ++ struct mtk_eth *eth = mac->hw; ++ struct net_device *dev = netdev_notifier_info_to_dev(ptr); ++ struct ethtool_link_ksettings s; ++ struct net_device *ldev; ++ struct list_head *iter; ++ struct dsa_port *dp; ++ ++ if (event != NETDEV_CHANGE) ++ return NOTIFY_DONE; ++ ++ netdev_for_each_lower_dev(dev, ldev, iter) { ++ if (netdev_priv(ldev) == mac) ++ goto found; ++ } ++ ++ return NOTIFY_DONE; ++ ++found: ++ if (!dsa_slave_dev_check(dev)) ++ return NOTIFY_DONE; ++ ++ if (__ethtool_get_link_ksettings(dev, &s)) ++ return NOTIFY_DONE; ++ ++ if (s.base.speed == 0 || s.base.speed == ((__u32)-1)) ++ return NOTIFY_DONE; ++ ++ dp = dsa_port_from_netdev(dev); ++ if (dp->index >= MTK_QDMA_NUM_QUEUES) ++ return NOTIFY_DONE; ++ ++ mtk_set_queue_speed(eth, dp->index + 3, s.base.speed); ++ ++ return NOTIFY_DONE; ++} ++ + static int mtk_open(struct net_device *dev) + { + struct mtk_mac *mac = netdev_priv(dev); +@@ -2970,7 +3125,8 @@ static int mtk_open(struct net_device *d + refcount_inc(ð->dma_refcnt); + + phylink_start(mac->phylink); +- netif_start_queue(dev); ++ netif_tx_start_all_queues(dev); ++ + return 0; + } + +@@ -3486,8 +3642,12 @@ static int mtk_unreg_dev(struct mtk_eth + int i; + + for (i = 0; i < MTK_MAC_COUNT; i++) { ++ struct mtk_mac *mac; + if (!eth->netdev[i]) + continue; ++ mac = netdev_priv(eth->netdev[i]); ++ if (MTK_HAS_CAPS(eth->soc->caps, MTK_QDMA)) ++ unregister_netdevice_notifier(&mac->device_notifier); + unregister_netdev(eth->netdev[i]); + } + +@@ -3703,6 +3863,23 @@ static int mtk_set_rxnfc(struct net_devi + return ret; + } + ++static u16 mtk_select_queue(struct net_device *dev, struct sk_buff *skb, ++ struct net_device *sb_dev) ++{ ++ struct mtk_mac *mac = netdev_priv(dev); ++ unsigned int queue = 0; ++ ++ if (netdev_uses_dsa(dev)) ++ queue = skb_get_queue_mapping(skb) + 3; ++ else ++ queue = mac->id; ++ ++ if (queue >= dev->num_tx_queues) ++ queue = 0; ++ ++ return queue; ++} ++ + static const struct ethtool_ops mtk_ethtool_ops = { + .get_link_ksettings = mtk_get_link_ksettings, + .set_link_ksettings = mtk_set_link_ksettings, +@@ -3738,6 +3915,7 @@ static const struct net_device_ops mtk_n + .ndo_setup_tc = mtk_eth_setup_tc, + .ndo_bpf = mtk_xdp, + .ndo_xdp_xmit = mtk_xdp_xmit, ++ .ndo_select_queue = mtk_select_queue, + }; + + static int mtk_add_mac(struct mtk_eth *eth, struct device_node *np) +@@ -3747,6 +3925,7 @@ static int mtk_add_mac(struct mtk_eth *e + struct phylink *phylink; + struct mtk_mac *mac; + int id, err; ++ int txqs = 1; + + if (!_id) { + dev_err(eth->dev, "missing mac id\n"); +@@ -3764,7 +3943,10 @@ static int mtk_add_mac(struct mtk_eth *e + return -EINVAL; + } + +- eth->netdev[id] = alloc_etherdev(sizeof(*mac)); ++ if (MTK_HAS_CAPS(eth->soc->caps, MTK_QDMA)) ++ txqs = MTK_QDMA_NUM_QUEUES; ++ ++ eth->netdev[id] = alloc_etherdev_mqs(sizeof(*mac), txqs, 1); + if (!eth->netdev[id]) { + dev_err(eth->dev, "alloc_etherdev failed\n"); + return -ENOMEM; +@@ -3861,6 +4043,11 @@ static int mtk_add_mac(struct mtk_eth *e + else + eth->netdev[id]->max_mtu = MTK_MAX_RX_LENGTH_2K - MTK_RX_ETH_HLEN; + ++ if (MTK_HAS_CAPS(eth->soc->caps, MTK_QDMA)) { ++ mac->device_notifier.notifier_call = mtk_device_event; ++ register_netdevice_notifier(&mac->device_notifier); ++ } ++ + return 0; + + free_netdev: +--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.h ++++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.h +@@ -22,6 +22,7 @@ + #include + #include "mtk_ppe.h" + ++#define MTK_QDMA_NUM_QUEUES 16 + #define MTK_QDMA_PAGE_SIZE 2048 + #define MTK_MAX_RX_LENGTH 1536 + #define MTK_MAX_RX_LENGTH_2K 2048 +@@ -203,8 +204,26 @@ + #define MTK_RING_MAX_AGG_CNT_H ((MTK_HW_LRO_MAX_AGG_CNT >> 6) & 0x3) + + /* QDMA TX Queue Configuration Registers */ ++#define MTK_QTX_OFFSET 0x10 + #define QDMA_RES_THRES 4 + ++/* QDMA Tx Queue Scheduler Configuration Registers */ ++#define MTK_QTX_SCH_TX_SEL BIT(31) ++#define MTK_QTX_SCH_TX_SEL_V2 GENMASK(31, 30) ++ ++#define MTK_QTX_SCH_LEAKY_BUCKET_EN BIT(30) ++#define MTK_QTX_SCH_LEAKY_BUCKET_SIZE GENMASK(29, 28) ++#define MTK_QTX_SCH_MIN_RATE_EN BIT(27) ++#define MTK_QTX_SCH_MIN_RATE_MAN GENMASK(26, 20) ++#define MTK_QTX_SCH_MIN_RATE_EXP GENMASK(19, 16) ++#define MTK_QTX_SCH_MAX_RATE_WEIGHT GENMASK(15, 12) ++#define MTK_QTX_SCH_MAX_RATE_EN BIT(11) ++#define MTK_QTX_SCH_MAX_RATE_MAN GENMASK(10, 4) ++#define MTK_QTX_SCH_MAX_RATE_EXP GENMASK(3, 0) ++ ++/* QDMA TX Scheduler Rate Control Register */ ++#define MTK_QDMA_TX_SCH_MAX_WFQ BIT(15) ++ + /* QDMA Global Configuration Register */ + #define MTK_RX_2B_OFFSET BIT(31) + #define MTK_RX_BT_32DWORDS (3 << 11) +@@ -223,6 +242,7 @@ + #define MTK_WCOMP_EN BIT(24) + #define MTK_RESV_BUF (0x40 << 16) + #define MTK_MUTLI_CNT (0x4 << 12) ++#define MTK_LEAKY_BUCKET_EN BIT(11) + + /* QDMA Flow Control Register */ + #define FC_THRES_DROP_MODE BIT(20) +@@ -251,8 +271,6 @@ + #define MTK_STAT_OFFSET 0x40 + + /* QDMA TX NUM */ +-#define MTK_QDMA_TX_NUM 16 +-#define MTK_QDMA_TX_MASK (MTK_QDMA_TX_NUM - 1) + #define QID_BITS_V2(x) (((x) & 0x3f) << 16) + #define MTK_QDMA_GMAC2_QID 8 + +@@ -282,6 +300,7 @@ + #define TX_DMA_PLEN0(x) (((x) & eth->soc->txrx.dma_max_len) << eth->soc->txrx.dma_len_offset) + #define TX_DMA_PLEN1(x) ((x) & eth->soc->txrx.dma_max_len) + #define TX_DMA_SWC BIT(14) ++#define TX_DMA_PQID GENMASK(3, 0) + + /* PDMA on MT7628 */ + #define TX_DMA_DONE BIT(31) +@@ -930,6 +949,7 @@ struct mtk_reg_map { + } pdma; + struct { + u32 qtx_cfg; /* tx queue configuration */ ++ u32 qtx_sch; /* tx queue scheduler configuration */ + u32 rx_ptr; /* rx base pointer */ + u32 rx_cnt_cfg; /* rx max count configuration */ + u32 qcrx_ptr; /* rx cpu pointer */ +@@ -947,6 +967,7 @@ struct mtk_reg_map { + u32 fq_tail; /* fq tail pointer */ + u32 fq_count; /* fq free page count */ + u32 fq_blen; /* fq free page buffer length */ ++ u32 tx_sch_rate; /* tx scheduler rate control registers */ + } qdma; + u32 gdm1_cnt; + u32 gdma_to_ppe0; +@@ -1139,6 +1160,7 @@ struct mtk_mac { + __be32 hwlro_ip[MTK_MAX_LRO_IP_CNT]; + int hwlro_ip_cnt; + unsigned int syscfg0; ++ struct notifier_block device_notifier; + }; + + /* the struct describing the SoC. these are declared in the soc_xyz.c files */ diff --git a/target/linux/generic/pending-5.15/732-05-net-dsa-tag_mtk-assign-per-port-queues.patch b/target/linux/generic/pending-5.15/732-05-net-dsa-tag_mtk-assign-per-port-queues.patch new file mode 100644 index 0000000000..7739366ade --- /dev/null +++ b/target/linux/generic/pending-5.15/732-05-net-dsa-tag_mtk-assign-per-port-queues.patch @@ -0,0 +1,20 @@ +From: Felix Fietkau +Date: Fri, 28 Oct 2022 18:16:03 +0200 +Subject: [PATCH] net: dsa: tag_mtk: assign per-port queues + +Keeps traffic sent to the switch within link speed limits + +Signed-off-by: Felix Fietkau +--- + +--- a/net/dsa/tag_mtk.c ++++ b/net/dsa/tag_mtk.c +@@ -33,6 +33,8 @@ static struct sk_buff *mtk_tag_xmit(stru + if (__skb_put_padto(skb, ETH_ZLEN + MTK_HDR_LEN, false)) + return NULL; + ++ skb_set_queue_mapping(skb, dp->index); ++ + /* Build the special tag after the MAC Source Address. If VLAN header + * is present, it's required that VLAN header and special tag is + * being combined. Only in this way we can allow the switch can parse diff --git a/target/linux/generic/pending-5.15/732-06-net-ethernet-mediatek-ppe-assign-per-port-queues-for.patch b/target/linux/generic/pending-5.15/732-06-net-ethernet-mediatek-ppe-assign-per-port-queues-for.patch new file mode 100644 index 0000000000..05161c3479 --- /dev/null +++ b/target/linux/generic/pending-5.15/732-06-net-ethernet-mediatek-ppe-assign-per-port-queues-for.patch @@ -0,0 +1,93 @@ +From: Felix Fietkau +Date: Thu, 3 Nov 2022 17:49:44 +0100 +Subject: [PATCH] net: ethernet: mediatek: ppe: assign per-port queues + for offloaded traffic + +Keeps traffic sent to the switch within link speed limits + +Signed-off-by: Felix Fietkau +--- + +--- a/drivers/net/ethernet/mediatek/mtk_ppe.c ++++ b/drivers/net/ethernet/mediatek/mtk_ppe.c +@@ -445,6 +445,24 @@ static inline bool mtk_foe_entry_usable( + FIELD_GET(MTK_FOE_IB1_STATE, entry->ib1) != MTK_FOE_STATE_BIND; + } + ++int mtk_foe_entry_set_queue(struct mtk_eth *eth, struct mtk_foe_entry *entry, ++ unsigned int queue) ++{ ++ u32 *ib2 = mtk_foe_entry_ib2(eth, entry); ++ ++ if (MTK_HAS_CAPS(eth->soc->caps, MTK_NETSYS_V2)) { ++ *ib2 &= ~MTK_FOE_IB2_QID_V2; ++ *ib2 |= FIELD_PREP(MTK_FOE_IB2_QID_V2, queue); ++ *ib2 |= MTK_FOE_IB2_PSE_QOS_V2; ++ } else { ++ *ib2 &= ~MTK_FOE_IB2_QID; ++ *ib2 |= FIELD_PREP(MTK_FOE_IB2_QID, queue); ++ *ib2 |= MTK_FOE_IB2_PSE_QOS; ++ } ++ ++ return 0; ++} ++ + static bool + mtk_flow_entry_match(struct mtk_eth *eth, struct mtk_flow_entry *entry, + struct mtk_foe_entry *data) +--- a/drivers/net/ethernet/mediatek/mtk_ppe.h ++++ b/drivers/net/ethernet/mediatek/mtk_ppe.h +@@ -69,7 +69,9 @@ enum { + #define MTK_FOE_IB2_DSCP GENMASK(31, 24) + + /* CONFIG_MEDIATEK_NETSYS_V2 */ ++#define MTK_FOE_IB2_QID_V2 GENMASK(6, 0) + #define MTK_FOE_IB2_PORT_MG_V2 BIT(7) ++#define MTK_FOE_IB2_PSE_QOS_V2 BIT(8) + #define MTK_FOE_IB2_DEST_PORT_V2 GENMASK(12, 9) + #define MTK_FOE_IB2_MULTICAST_V2 BIT(13) + #define MTK_FOE_IB2_WDMA_WINFO_V2 BIT(19) +@@ -369,6 +371,8 @@ int mtk_foe_entry_set_pppoe(struct mtk_e + int sid); + int mtk_foe_entry_set_wdma(struct mtk_eth *eth, struct mtk_foe_entry *entry, + int wdma_idx, int txq, int bss, int wcid); ++int mtk_foe_entry_set_queue(struct mtk_eth *eth, struct mtk_foe_entry *entry, ++ unsigned int queue); + int mtk_foe_entry_commit(struct mtk_ppe *ppe, struct mtk_flow_entry *entry); + void mtk_foe_entry_clear(struct mtk_ppe *ppe, struct mtk_flow_entry *entry); + int mtk_foe_entry_idle_time(struct mtk_ppe *ppe, struct mtk_flow_entry *entry); +--- a/drivers/net/ethernet/mediatek/mtk_ppe_offload.c ++++ b/drivers/net/ethernet/mediatek/mtk_ppe_offload.c +@@ -188,7 +188,7 @@ mtk_flow_set_output_device(struct mtk_et + int *wed_index) + { + struct mtk_wdma_info info = {}; +- int pse_port, dsa_port; ++ int pse_port, dsa_port, queue; + + if (mtk_flow_get_wdma_info(dev, dest_mac, &info) == 0) { + mtk_foe_entry_set_wdma(eth, foe, info.wdma_idx, info.queue, +@@ -212,8 +212,6 @@ mtk_flow_set_output_device(struct mtk_et + } + + dsa_port = mtk_flow_get_dsa_port(&dev); +- if (dsa_port >= 0) +- mtk_foe_entry_set_dsa(eth, foe, dsa_port); + + if (dev == eth->netdev[0]) + pse_port = 1; +@@ -222,6 +220,14 @@ mtk_flow_set_output_device(struct mtk_et + else + return -EOPNOTSUPP; + ++ if (dsa_port >= 0) { ++ mtk_foe_entry_set_dsa(eth, foe, dsa_port); ++ queue = 3 + dsa_port; ++ } else { ++ queue = pse_port - 1; ++ } ++ mtk_foe_entry_set_queue(eth, foe, queue); ++ + out: + mtk_foe_entry_set_pse_port(eth, foe, pse_port); + diff --git a/target/linux/generic/pending-5.15/732-07-net-ethernet-mtk_eth_soc-compile-out-netsys-v2-code-.patch b/target/linux/generic/pending-5.15/732-07-net-ethernet-mtk_eth_soc-compile-out-netsys-v2-code-.patch new file mode 100644 index 0000000000..8c711ba802 --- /dev/null +++ b/target/linux/generic/pending-5.15/732-07-net-ethernet-mtk_eth_soc-compile-out-netsys-v2-code-.patch @@ -0,0 +1,28 @@ +From: Felix Fietkau +Date: Thu, 27 Oct 2022 23:39:52 +0200 +Subject: [PATCH] net: ethernet: mtk_eth_soc: compile out netsys v2 code + on mt7621 + +Avoid some branches in the hot path on low-end devices with limited CPU power, +and reduce code size + +Signed-off-by: Felix Fietkau +--- + +--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.h ++++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.h +@@ -895,7 +895,13 @@ enum mkt_eth_capabilities { + #define MTK_MUX_GMAC12_TO_GEPHY_SGMII \ + (MTK_ETH_MUX_GMAC12_TO_GEPHY_SGMII | MTK_MUX) + +-#define MTK_HAS_CAPS(caps, _x) (((caps) & (_x)) == (_x)) ++#ifdef CONFIG_SOC_MT7621 ++#define MTK_CAP_MASK MTK_NETSYS_V2 ++#else ++#define MTK_CAP_MASK 0 ++#endif ++ ++#define MTK_HAS_CAPS(caps, _x) (((caps) & (_x) & ~(MTK_CAP_MASK)) == (_x)) + + #define MT7621_CAPS (MTK_GMAC1_RGMII | MTK_GMAC1_TRGMII | \ + MTK_GMAC2_RGMII | MTK_SHARED_INT | \ diff --git a/target/linux/generic/pending-5.15/732-08-net-dsa-add-support-for-DSA-rx-offloading-via-metada.patch b/target/linux/generic/pending-5.15/732-08-net-dsa-add-support-for-DSA-rx-offloading-via-metada.patch new file mode 100644 index 0000000000..7fe7e5c07d --- /dev/null +++ b/target/linux/generic/pending-5.15/732-08-net-dsa-add-support-for-DSA-rx-offloading-via-metada.patch @@ -0,0 +1,70 @@ +From: Felix Fietkau +Date: Tue, 8 Nov 2022 15:03:15 +0100 +Subject: [PATCH] net: dsa: add support for DSA rx offloading via + metadata dst + +If a metadata dst is present with the type METADATA_HW_PORT_MUX on a dsa cpu +port netdev, assume that it carries the port number and that there is no DSA +tag present in the skb data. + +Signed-off-by: Felix Fietkau +--- + +--- a/net/core/flow_dissector.c ++++ b/net/core/flow_dissector.c +@@ -941,11 +941,13 @@ bool __skb_flow_dissect(const struct net + if (unlikely(skb->dev && netdev_uses_dsa(skb->dev) && + proto == htons(ETH_P_XDSA))) { + const struct dsa_device_ops *ops; ++ struct metadata_dst *md_dst = skb_metadata_dst(skb); + int offset = 0; + + ops = skb->dev->dsa_ptr->tag_ops; + /* Only DSA header taggers break flow dissection */ +- if (ops->needed_headroom) { ++ if (ops->needed_headroom && ++ (!md_dst || md_dst->type != METADATA_HW_PORT_MUX)) { + if (ops->flow_dissect) + ops->flow_dissect(skb, &proto, &offset); + else +--- a/net/dsa/dsa.c ++++ b/net/dsa/dsa.c +@@ -20,6 +20,7 @@ + #include + #include + #include ++#include + + #include "dsa_priv.h" + +@@ -225,6 +226,7 @@ static bool dsa_skb_defer_rx_timestamp(s + static int dsa_switch_rcv(struct sk_buff *skb, struct net_device *dev, + struct packet_type *pt, struct net_device *unused) + { ++ struct metadata_dst *md_dst = skb_metadata_dst(skb); + struct dsa_port *cpu_dp = dev->dsa_ptr; + struct sk_buff *nskb = NULL; + struct dsa_slave_priv *p; +@@ -238,7 +240,21 @@ static int dsa_switch_rcv(struct sk_buff + if (!skb) + return 0; + +- nskb = cpu_dp->rcv(skb, dev); ++ if (md_dst && md_dst->type == METADATA_HW_PORT_MUX) { ++ unsigned int port = md_dst->u.port_info.port_id; ++ ++ dsa_default_offload_fwd_mark(skb); ++ skb_dst_set(skb, NULL); ++ if (!skb_has_extensions(skb)) ++ skb->slow_gro = 0; ++ ++ skb->dev = dsa_master_find_slave(dev, 0, port); ++ if (skb->dev) ++ nskb = skb; ++ } else { ++ nskb = cpu_dp->rcv(skb, dev); ++ } ++ + if (!nskb) { + kfree_skb(skb); + return 0; diff --git a/target/linux/generic/pending-5.15/732-09-net-ethernet-mtk_eth_soc-fix-VLAN-rx-hardware-accele.patch b/target/linux/generic/pending-5.15/732-09-net-ethernet-mtk_eth_soc-fix-VLAN-rx-hardware-accele.patch new file mode 100644 index 0000000000..d1f82215ca --- /dev/null +++ b/target/linux/generic/pending-5.15/732-09-net-ethernet-mtk_eth_soc-fix-VLAN-rx-hardware-accele.patch @@ -0,0 +1,196 @@ +From: Felix Fietkau +Date: Fri, 28 Oct 2022 11:01:12 +0200 +Subject: [PATCH] net: ethernet: mtk_eth_soc: fix VLAN rx hardware + acceleration + +- enable VLAN untagging for PDMA rx +- make it possible to disable the feature via ethtool +- pass VLAN tag to the DSA driver +- untag special tag on PDMA only if no non-DSA devices are in use +- disable special tag untagging on 7986 for now, since it's not working yet + +Signed-off-by: Felix Fietkau +--- + +--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c ++++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c +@@ -23,6 +23,7 @@ + #include + #include + #include ++#include + + #include "mtk_eth_soc.h" + #include "mtk_wed.h" +@@ -1960,23 +1961,27 @@ static int mtk_poll_rx(struct napi_struc + if (reason == MTK_PPE_CPU_REASON_HIT_UNBIND_RATE_REACHED) + mtk_ppe_check_skb(eth->ppe[0], skb, hash); + +- if (netdev->features & NETIF_F_HW_VLAN_CTAG_RX) { +- if (MTK_HAS_CAPS(eth->soc->caps, MTK_NETSYS_V2)) { +- if (trxd.rxd3 & RX_DMA_VTAG_V2) +- __vlan_hwaccel_put_tag(skb, +- htons(RX_DMA_VPID(trxd.rxd4)), +- RX_DMA_VID(trxd.rxd4)); +- } else if (trxd.rxd2 & RX_DMA_VTAG) { +- __vlan_hwaccel_put_tag(skb, htons(ETH_P_8021Q), +- RX_DMA_VID(trxd.rxd3)); +- } ++ if (MTK_HAS_CAPS(eth->soc->caps, MTK_NETSYS_V2)) { ++ if (trxd.rxd3 & RX_DMA_VTAG_V2) ++ __vlan_hwaccel_put_tag(skb, ++ htons(RX_DMA_VPID(trxd.rxd4)), ++ RX_DMA_VID(trxd.rxd4)); ++ } else if (trxd.rxd2 & RX_DMA_VTAG) { ++ __vlan_hwaccel_put_tag(skb, htons(RX_DMA_VPID(trxd.rxd3)), ++ RX_DMA_VID(trxd.rxd3)); ++ } ++ ++ /* When using VLAN untagging in combination with DSA, the ++ * hardware treats the MTK special tag as a VLAN and untags it. ++ */ ++ if (skb_vlan_tag_present(skb) && netdev_uses_dsa(netdev)) { ++ unsigned int port = ntohs(skb->vlan_proto) & GENMASK(2, 0); ++ ++ if (port < ARRAY_SIZE(eth->dsa_meta) && ++ eth->dsa_meta[port]) ++ skb_dst_set_noref(skb, ð->dsa_meta[port]->dst); + +- /* If the device is attached to a dsa switch, the special +- * tag inserted in VLAN field by hw switch can * be offloaded +- * by RX HW VLAN offload. Clear vlan info. +- */ +- if (netdev_uses_dsa(netdev)) +- __vlan_hwaccel_clear_tag(skb); ++ __vlan_hwaccel_clear_tag(skb); + } + + skb_record_rx_queue(skb, 0); +@@ -2793,15 +2798,19 @@ static netdev_features_t mtk_fix_feature + + static int mtk_set_features(struct net_device *dev, netdev_features_t features) + { +- int err = 0; +- +- if (!((dev->features ^ features) & NETIF_F_LRO)) +- return 0; ++ struct mtk_mac *mac = netdev_priv(dev); ++ struct mtk_eth *eth = mac->hw; ++ netdev_features_t diff = dev->features ^ features; + +- if (!(features & NETIF_F_LRO)) ++ if ((diff & NETIF_F_LRO) && !(features & NETIF_F_LRO)) + mtk_hwlro_netdev_disable(dev); + +- return err; ++ /* Set RX VLAN offloading */ ++ if (diff & NETIF_F_HW_VLAN_CTAG_RX) ++ mtk_w32(eth, !!(features & NETIF_F_HW_VLAN_CTAG_RX), ++ MTK_CDMP_EG_CTRL); ++ ++ return 0; + } + + /* wait for DMA to finish whatever it is doing before we start using it again */ +@@ -3083,11 +3092,45 @@ found: + return NOTIFY_DONE; + } + ++static bool mtk_uses_dsa(struct net_device *dev) ++{ ++#if IS_ENABLED(CONFIG_NET_DSA) ++ return netdev_uses_dsa(dev) && ++ dev->dsa_ptr->tag_ops->proto == DSA_TAG_PROTO_MTK; ++#else ++ return false; ++#endif ++} ++ + static int mtk_open(struct net_device *dev) + { + struct mtk_mac *mac = netdev_priv(dev); + struct mtk_eth *eth = mac->hw; +- int err; ++ int i, err; ++ ++ if (mtk_uses_dsa(dev)) { ++ for (i = 0; i < ARRAY_SIZE(eth->dsa_meta); i++) { ++ struct metadata_dst *md_dst = eth->dsa_meta[i]; ++ ++ if (md_dst) ++ continue; ++ ++ md_dst = metadata_dst_alloc(0, METADATA_HW_PORT_MUX, ++ GFP_KERNEL); ++ if (!md_dst) ++ return -ENOMEM; ++ ++ md_dst->u.port_info.port_id = i; ++ eth->dsa_meta[i] = md_dst; ++ } ++ } else { ++ /* Hardware special tag parsing needs to be disabled if at least ++ * one MAC does not use DSA. ++ */ ++ u32 val = mtk_r32(eth, MTK_CDMP_IG_CTRL); ++ val &= ~MTK_CDMP_STAG_EN; ++ mtk_w32(eth, val, MTK_CDMP_IG_CTRL); ++ } + + err = phylink_of_phy_connect(mac->phylink, mac->of_node, 0); + if (err) { +@@ -3417,6 +3460,10 @@ static int mtk_hw_init(struct mtk_eth *e + */ + val = mtk_r32(eth, MTK_CDMQ_IG_CTRL); + mtk_w32(eth, val | MTK_CDMQ_STAG_EN, MTK_CDMQ_IG_CTRL); ++ if (!MTK_HAS_CAPS(eth->soc->caps, MTK_NETSYS_V2)) { ++ val = mtk_r32(eth, MTK_CDMP_IG_CTRL); ++ mtk_w32(eth, val | MTK_CDMP_STAG_EN, MTK_CDMP_IG_CTRL); ++ } + + /* Enable RX VLan Offloading */ + mtk_w32(eth, 1, MTK_CDMP_EG_CTRL); +@@ -3634,6 +3681,12 @@ static int mtk_free_dev(struct mtk_eth * + free_netdev(eth->netdev[i]); + } + ++ for (i = 0; i < ARRAY_SIZE(eth->dsa_meta); i++) { ++ if (!eth->dsa_meta[i]) ++ break; ++ metadata_dst_free(eth->dsa_meta[i]); ++ } ++ + return 0; + } + +--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.h ++++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.h +@@ -22,6 +22,9 @@ + #include + #include "mtk_ppe.h" + ++#define MTK_MAX_DSA_PORTS 7 ++#define MTK_DSA_PORT_MASK GENMASK(2, 0) ++ + #define MTK_QDMA_NUM_QUEUES 16 + #define MTK_QDMA_PAGE_SIZE 2048 + #define MTK_MAX_RX_LENGTH 1536 +@@ -93,6 +96,9 @@ + #define MTK_CDMQ_IG_CTRL 0x1400 + #define MTK_CDMQ_STAG_EN BIT(0) + ++/* CDMQ Exgress Control Register */ ++#define MTK_CDMQ_EG_CTRL 0x1404 ++ + /* CDMP Ingress Control Register */ + #define MTK_CDMP_IG_CTRL 0x400 + #define MTK_CDMP_STAG_EN BIT(0) +@@ -1140,6 +1146,8 @@ struct mtk_eth { + + int ip_align; + ++ struct metadata_dst *dsa_meta[MTK_MAX_DSA_PORTS]; ++ + struct mtk_ppe *ppe[2]; + struct rhashtable flow_table; + diff --git a/target/linux/generic/pending-5.15/732-10-net-ethernet-mtk_eth_soc-work-around-issue-with-send.patch b/target/linux/generic/pending-5.15/732-10-net-ethernet-mtk_eth_soc-work-around-issue-with-send.patch new file mode 100644 index 0000000000..ba86686eeb --- /dev/null +++ b/target/linux/generic/pending-5.15/732-10-net-ethernet-mtk_eth_soc-work-around-issue-with-send.patch @@ -0,0 +1,78 @@ +From: Felix Fietkau +Date: Thu, 3 Nov 2022 12:38:49 +0100 +Subject: [PATCH] net: ethernet: mtk_eth_soc: work around issue with + sending small fragments + +When frames are sent with very small fragments, the DMA engine appears to +lock up and transmit attempts time out. Fix this by detecting the presence +of small fragments and use skb_gso_segment + skb_linearize to deal with +them + +Signed-off-by: Felix Fietkau +--- + +--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c ++++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c +@@ -1396,12 +1396,28 @@ static void mtk_wake_queue(struct mtk_et + } + } + ++static bool mtk_skb_has_small_frag(struct sk_buff *skb) ++{ ++ int min_size = 16; ++ int i; ++ ++ if (skb_headlen(skb) < min_size) ++ return true; ++ ++ for (i = 0; i < skb_shinfo(skb)->nr_frags; i++) ++ if (skb_frag_size(&skb_shinfo(skb)->frags[i]) < min_size) ++ return true; ++ ++ return false; ++} ++ + static netdev_tx_t mtk_start_xmit(struct sk_buff *skb, struct net_device *dev) + { + struct mtk_mac *mac = netdev_priv(dev); + struct mtk_eth *eth = mac->hw; + struct mtk_tx_ring *ring = ð->tx_ring; + struct net_device_stats *stats = &dev->stats; ++ struct sk_buff *segs, *next; + bool gso = false; + int tx_num; + +@@ -1423,6 +1439,17 @@ static netdev_tx_t mtk_start_xmit(struct + return NETDEV_TX_BUSY; + } + ++ if (skb_is_gso(skb) && mtk_skb_has_small_frag(skb)) { ++ segs = skb_gso_segment(skb, dev->features & ~NETIF_F_ALL_TSO); ++ if (IS_ERR(segs)) ++ goto drop; ++ ++ if (segs) { ++ consume_skb(skb); ++ skb = segs; ++ } ++ } ++ + /* TSO: fill MSS info in tcp checksum field */ + if (skb_is_gso(skb)) { + if (skb_cow_head(skb, 0)) { +@@ -1438,8 +1465,13 @@ static netdev_tx_t mtk_start_xmit(struct + } + } + +- if (mtk_tx_map(skb, dev, tx_num, ring, gso) < 0) +- goto drop; ++ skb_list_walk_safe(skb, skb, next) { ++ if ((mtk_skb_has_small_frag(skb) && skb_linearize(skb)) || ++ mtk_tx_map(skb, dev, tx_num, ring, gso) < 0) { ++ stats->tx_dropped++; ++ dev_kfree_skb_any(skb); ++ } ++ } + + if (unlikely(atomic_read(&ring->free_count) <= ring->thresh)) + netif_tx_stop_all_queues(dev); diff --git a/target/linux/generic/pending-5.15/732-11-net-ethernet-mtk_eth_soc-set-NETIF_F_ALL_TSO.patch b/target/linux/generic/pending-5.15/732-11-net-ethernet-mtk_eth_soc-set-NETIF_F_ALL_TSO.patch new file mode 100644 index 0000000000..f89ad6adb1 --- /dev/null +++ b/target/linux/generic/pending-5.15/732-11-net-ethernet-mtk_eth_soc-set-NETIF_F_ALL_TSO.patch @@ -0,0 +1,21 @@ +From: Felix Fietkau +Date: Fri, 28 Oct 2022 12:54:48 +0200 +Subject: [PATCH] net: ethernet: mtk_eth_soc: set NETIF_F_ALL_TSO + +Significantly improves performance by avoiding unnecessary segmentation + +Signed-off-by: Felix Fietkau +--- + +--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.h ++++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.h +@@ -49,8 +49,7 @@ + NETIF_F_RXCSUM | \ + NETIF_F_HW_VLAN_CTAG_TX | \ + NETIF_F_HW_VLAN_CTAG_RX | \ +- NETIF_F_SG | NETIF_F_TSO | \ +- NETIF_F_TSO6 | \ ++ NETIF_F_SG | NETIF_F_ALL_TSO | \ + NETIF_F_IPV6_CSUM |\ + NETIF_F_HW_TC) + #define MTK_HW_FEATURES_MT7628 (NETIF_F_SG | NETIF_F_RXCSUM) diff --git a/target/linux/generic/pending-5.15/732-12-net-ethernet-mtk_eth_soc-drop-packets-to-WDMA-if-the.patch b/target/linux/generic/pending-5.15/732-12-net-ethernet-mtk_eth_soc-drop-packets-to-WDMA-if-the.patch new file mode 100644 index 0000000000..85937fa9a0 --- /dev/null +++ b/target/linux/generic/pending-5.15/732-12-net-ethernet-mtk_eth_soc-drop-packets-to-WDMA-if-the.patch @@ -0,0 +1,37 @@ +From: Felix Fietkau +Date: Thu, 3 Nov 2022 17:46:25 +0100 +Subject: [PATCH] net: ethernet: mtk_eth_soc: drop packets to WDMA if the + ring is full + +Improves handling of DMA ring overflow. +Clarify other WDMA drop related comment. + +Signed-off-by: Felix Fietkau +--- + +--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c ++++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c +@@ -3516,9 +3516,12 @@ static int mtk_hw_init(struct mtk_eth *e + mtk_w32(eth, 0x21021000, MTK_FE_INT_GRP); + + if (MTK_HAS_CAPS(eth->soc->caps, MTK_NETSYS_V2)) { +- /* PSE should not drop port8 and port9 packets */ ++ /* PSE should not drop port8 and port9 packets from WDMA Tx */ + mtk_w32(eth, 0x00000300, PSE_DROP_CFG); + ++ /* PSE should drop packets to port 8/9 on WDMA Rx ring full */ ++ mtk_w32(eth, 0x00000300, PSE_PPE0_DROP); ++ + /* PSE Free Queue Flow Control */ + mtk_w32(eth, 0x01fa01f4, PSE_FQFC_CFG2); + +--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.h ++++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.h +@@ -127,6 +127,7 @@ + #define PSE_FQFC_CFG1 0x100 + #define PSE_FQFC_CFG2 0x104 + #define PSE_DROP_CFG 0x108 ++#define PSE_PPE0_DROP 0x110 + + /* PSE Input Queue Reservation Register*/ + #define PSE_IQ_REV(x) (0x140 + (((x) - 1) << 2)) diff --git a/target/linux/mediatek/patches-5.15/703-v5.17-net-ethernet-mtk_eth_soc-implement-Clause-45-MDIO-ac.patch b/target/linux/mediatek/patches-5.15/703-v5.17-net-ethernet-mtk_eth_soc-implement-Clause-45-MDIO-ac.patch index 9667930aa1..9c8f2746c8 100644 --- a/target/linux/mediatek/patches-5.15/703-v5.17-net-ethernet-mtk_eth_soc-implement-Clause-45-MDIO-ac.patch +++ b/target/linux/mediatek/patches-5.15/703-v5.17-net-ethernet-mtk_eth_soc-implement-Clause-45-MDIO-ac.patch @@ -20,7 +20,7 @@ Signed-off-by: David S. Miller --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c -@@ -219,13 +219,35 @@ static int _mtk_mdio_write(struct mtk_et +@@ -224,13 +224,35 @@ static int _mtk_mdio_write(struct mtk_et if (ret < 0) return ret; @@ -63,7 +63,7 @@ Signed-off-by: David S. Miller ret = mtk_mdio_busy_wait(eth); if (ret < 0) -@@ -242,12 +264,33 @@ static int _mtk_mdio_read(struct mtk_eth +@@ -247,12 +269,33 @@ static int _mtk_mdio_read(struct mtk_eth if (ret < 0) return ret; @@ -103,7 +103,7 @@ Signed-off-by: David S. Miller ret = mtk_mdio_busy_wait(eth); if (ret < 0) -@@ -644,6 +687,7 @@ static int mtk_mdio_init(struct mtk_eth +@@ -720,6 +763,7 @@ static int mtk_mdio_init(struct mtk_eth eth->mii_bus->name = "mdio"; eth->mii_bus->read = mtk_mdio_read; eth->mii_bus->write = mtk_mdio_write; @@ -113,7 +113,7 @@ Signed-off-by: David S. Miller --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.h +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.h -@@ -330,9 +330,12 @@ +@@ -356,9 +356,12 @@ #define PHY_IAC_ADDR_MASK GENMASK(24, 20) #define PHY_IAC_ADDR(x) FIELD_PREP(PHY_IAC_ADDR_MASK, (x)) #define PHY_IAC_CMD_MASK GENMASK(19, 18) diff --git a/target/linux/ramips/patches-5.15/700-net-ethernet-mediatek-support-net-labels.patch b/target/linux/ramips/patches-5.15/700-net-ethernet-mediatek-support-net-labels.patch index d8ce3051b7..74e8f999ab 100644 --- a/target/linux/ramips/patches-5.15/700-net-ethernet-mediatek-support-net-labels.patch +++ b/target/linux/ramips/patches-5.15/700-net-ethernet-mediatek-support-net-labels.patch @@ -14,7 +14,7 @@ Signed-off-by: René van Dorst --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c -@@ -3736,6 +3736,7 @@ static const struct net_device_ops mtk_n +@@ -3918,6 +3918,7 @@ static const struct net_device_ops mtk_n static int mtk_add_mac(struct mtk_eth *eth, struct device_node *np) { @@ -22,9 +22,9 @@ Signed-off-by: René van Dorst const __be32 *_id = of_get_property(np, "reg", NULL); phy_interface_t phy_mode; struct phylink *phylink; -@@ -3855,6 +3856,9 @@ static int mtk_add_mac(struct mtk_eth *e - else - eth->netdev[id]->max_mtu = MTK_MAX_RX_LENGTH_2K - MTK_RX_ETH_HLEN; +@@ -4046,6 +4047,9 @@ static int mtk_add_mac(struct mtk_eth *e + register_netdevice_notifier(&mac->device_notifier); + } + if (name) + strlcpy(eth->netdev[id]->name, name, IFNAMSIZ); From 94d0cb9d2ec23fb15acd1fc17a351983f8771d13 Mon Sep 17 00:00:00 2001 From: Andrew Powers-Holmes Date: Tue, 1 Nov 2022 17:06:32 +1100 Subject: [PATCH 13/62] mt76: add firmware package for mt7916 Add kernel package 'mt7916-firmware' with firmware files for MT7916E devices. These share the same driver as the MT7915 chipset, but use their own firmware. Tested using a pair of AsiaRF AW7916-NPD cards. Signed-off-by: Andrew Powers-Holmes --- package/kernel/mt76/Makefile | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/package/kernel/mt76/Makefile b/package/kernel/mt76/Makefile index 628ea79ec9..5b71a91a3a 100644 --- a/package/kernel/mt76/Makefile +++ b/package/kernel/mt76/Makefile @@ -226,6 +226,12 @@ define KernelPackage/mt7915e AUTOLOAD:=$(call AutoProbe,mt7915e) endef +define KernelPackage/mt7916-firmware + $(KernelPackage/mt76-default) + DEPENDS+=+kmod-mt7915e + TITLE:=MediaTek MT7916 firmware +endef + define KernelPackage/mt7986-firmware $(KernelPackage/mt76-default) DEPENDS:=@TARGET_mediatek_filogic @@ -460,6 +466,15 @@ define KernelPackage/mt7915e/install $(1)/lib/firmware/mediatek endef +define KernelPackage/mt7916-firmware/install + $(INSTALL_DIR) $(1)/lib/firmware/mediatek + cp \ + $(PKG_BUILD_DIR)/firmware/mt7916_wa.bin \ + $(PKG_BUILD_DIR)/firmware/mt7916_wm.bin \ + $(PKG_BUILD_DIR)/firmware/mt7916_rom_patch.bin \ + $(1)/lib/firmware/mediatek +endef + define KernelPackage/mt7986-firmware/install $(INSTALL_DIR) $(1)/lib/firmware/mediatek cp \ @@ -508,6 +523,7 @@ $(eval $(call KernelPackage,mt7663-usb-sdio)) $(eval $(call KernelPackage,mt7663u)) $(eval $(call KernelPackage,mt7663s)) $(eval $(call KernelPackage,mt7915e)) +$(eval $(call KernelPackage,mt7916-firmware)) $(eval $(call KernelPackage,mt7986-firmware)) $(eval $(call KernelPackage,mt7921-common)) $(eval $(call KernelPackage,mt7921u)) From b8bf27e4cb2d4c6ff4c75274c0e1d1619eef7f10 Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Sat, 29 Oct 2022 19:01:48 +0200 Subject: [PATCH 14/62] scripts/mkits.sh: fix portability issue BSD wc can output more whitespaces, which breaks the cut usage. Replace the cut invocation with awk, which is more portable. Signed-off-by: Felix Fietkau --- scripts/mkits.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/mkits.sh b/scripts/mkits.sh index 58c879cd62..bf75d69f09 100755 --- a/scripts/mkits.sh +++ b/scripts/mkits.sh @@ -89,7 +89,7 @@ if [ -n "${COMPATIBLE}" ]; then fi [ "$DTOVERLAY" ] && { - dtbsize=$(wc -c "$DTB" | cut -d' ' -f1) + dtbsize=$(wc -c "$DTB" | awk '{print $1}') DTADDR=$(printf "0x%08x" $(($LOAD_ADDR - $dtbsize)) ) } @@ -168,7 +168,7 @@ OVCONFIGS="" overlay_blob=${overlay##*:} ovname=${overlay%%:*} ovnode="fdt-$ovname" - ovsize=$(wc -c "$overlay_blob" | cut -d' ' -f1) + ovsize=$(wc -c "$overlay_blob" | awk '{print $1}') echo "$ovname ($overlay_blob) : $ovsize" >&2 DTADDR=$(printf "0x%08x" $(($DTADDR - $ovsize))) FDTOVERLAY_NODE="$FDTOVERLAY_NODE From 4f1e54801ef9d43c6202f007f0ce8fcbee2ed369 Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Sat, 29 Oct 2022 23:03:08 +0200 Subject: [PATCH 15/62] mediatek: drop the use of device tree overlays on mt7986a-rfb board The boot loader does not support it. Instead make NAND the default image for this board Signed-off-by: Felix Fietkau --- .../dts/mediatek/mt7986a-rfb-spim-nand.dts | 85 ++++++++++--------- .../dts/mediatek/mt7986a-rfb-spim-nor.dts | 83 +++++++++--------- .../{mt7986a-rfb.dts => mt7986a-rfb.dtsi} | 0 target/linux/mediatek/image/filogic.mk | 15 ++-- 4 files changed, 92 insertions(+), 91 deletions(-) rename target/linux/mediatek/files-5.15/arch/arm64/boot/dts/mediatek/{mt7986a-rfb.dts => mt7986a-rfb.dtsi} (100%) diff --git a/target/linux/mediatek/files-5.15/arch/arm64/boot/dts/mediatek/mt7986a-rfb-spim-nand.dts b/target/linux/mediatek/files-5.15/arch/arm64/boot/dts/mediatek/mt7986a-rfb-spim-nand.dts index 72b8923b41..938dd181b9 100644 --- a/target/linux/mediatek/files-5.15/arch/arm64/boot/dts/mediatek/mt7986a-rfb-spim-nand.dts +++ b/target/linux/mediatek/files-5.15/arch/arm64/boot/dts/mediatek/mt7986a-rfb-spim-nand.dts @@ -1,51 +1,52 @@ /* SPDX-License-Identifier: (GPL-2.0-only OR MIT) */ -/dts-v1/; -/plugin/; +#include "mt7986a-rfb.dtsi" / { - compatible = "mediatek,mt7986a-spim-snand-rfb"; + compatible = "mediatek,mt7986a-rfb-snand"; +}; - fragment@0 { - target-path = "/soc/spi@1100a000"; - __overlay__ { - status = "okay"; - spi_nand: spi_nand@0 { - #address-cells = <1>; - #size-cells = <1>; - compatible = "spi-nand"; - reg = <1>; - spi-max-frequency = <10000000>; - spi-tx-buswidth = <4>; - spi-rx-buswidth = <4>; +&spi0 { + status = "okay"; - partitions { - compatible = "fixed-partitions"; - #address-cells = <1>; - #size-cells = <1>; - partition@0 { - label = "BL2"; - reg = <0x00000 0x0100000>; - read-only; - }; - partition@100000 { - label = "u-boot-env"; - reg = <0x0100000 0x0080000>; - }; - factory: partition@180000 { - label = "Factory"; - reg = <0x180000 0x0200000>; - }; - partition@380000 { - label = "FIP"; - reg = <0x380000 0x0200000>; - }; - partition@580000 { - label = "ubi"; - reg = <0x580000 0x4000000>; - }; - }; + spi_nand: spi_nand@0 { + #address-cells = <1>; + #size-cells = <1>; + compatible = "spi-nand"; + reg = <1>; + spi-max-frequency = <10000000>; + spi-tx-buswidth = <4>; + spi-rx-buswidth = <4>; + + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + partition@0 { + label = "BL2"; + reg = <0x00000 0x0100000>; + read-only; + }; + partition@100000 { + label = "u-boot-env"; + reg = <0x0100000 0x0080000>; + }; + factory: partition@180000 { + label = "Factory"; + reg = <0x180000 0x0200000>; + }; + partition@380000 { + label = "FIP"; + reg = <0x380000 0x0200000>; + }; + partition@580000 { + label = "ubi"; + reg = <0x580000 0x4000000>; }; }; - }; + }; +}; + +&wmac { + mediatek,mtd-eeprom = <&factory 0>; }; diff --git a/target/linux/mediatek/files-5.15/arch/arm64/boot/dts/mediatek/mt7986a-rfb-spim-nor.dts b/target/linux/mediatek/files-5.15/arch/arm64/boot/dts/mediatek/mt7986a-rfb-spim-nor.dts index b847e48455..8d94069dcf 100644 --- a/target/linux/mediatek/files-5.15/arch/arm64/boot/dts/mediatek/mt7986a-rfb-spim-nor.dts +++ b/target/linux/mediatek/files-5.15/arch/arm64/boot/dts/mediatek/mt7986a-rfb-spim-nor.dts @@ -1,50 +1,51 @@ /* SPDX-License-Identifier: (GPL-2.0-only OR MIT) */ -/dts-v1/; -/plugin/; +#include "mt7986a-rfb.dtsi" / { - compatible = "mediatek,mt7986a-snor-rfb"; + compatible = "mediatek,mt7986a-rfb-snor"; +}; - fragment@0 { - target-path = "/soc/spi@1100a000"; - __overlay__ { - status = "okay"; - spi_nor: spi_nor@0 { - #address-cells = <1>; - #size-cells = <1>; - compatible = "jedec,spi-nor"; - reg = <0>; - spi-max-frequency = <52000000>; - spi-tx-buswidth = <4>; - spi-rx-buswidth = <4>; - partitions { - compatible = "fixed-partitions"; - #address-cells = <1>; - #size-cells = <1>; +&spi0 { + status = "okay"; - partition@00000 { - label = "BL2"; - reg = <0x00000 0x0040000>; - }; - partition@40000 { - label = "u-boot-env"; - reg = <0x40000 0x0010000>; - }; - factory: partition@50000 { - label = "Factory"; - reg = <0x50000 0x00B0000>; - }; - partition@100000 { - label = "FIP"; - reg = <0x100000 0x0080000>; - }; - partition@180000 { - label = "firmware"; - reg = <0x180000 0xE00000>; - }; - }; + spi_nor: spi_nor@0 { + #address-cells = <1>; + #size-cells = <1>; + compatible = "jedec,spi-nor"; + reg = <0>; + spi-max-frequency = <52000000>; + spi-tx-buswidth = <4>; + spi-rx-buswidth = <4>; + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + partition@00000 { + label = "BL2"; + reg = <0x00000 0x0040000>; + }; + partition@40000 { + label = "u-boot-env"; + reg = <0x40000 0x0010000>; + }; + factory: partition@50000 { + label = "Factory"; + reg = <0x50000 0x00B0000>; + }; + partition@100000 { + label = "FIP"; + reg = <0x100000 0x0080000>; + }; + partition@180000 { + label = "firmware"; + reg = <0x180000 0xE00000>; }; }; - }; + }; +}; + +&wmac { + mediatek,mtd-eeprom = <&factory 0>; }; diff --git a/target/linux/mediatek/files-5.15/arch/arm64/boot/dts/mediatek/mt7986a-rfb.dts b/target/linux/mediatek/files-5.15/arch/arm64/boot/dts/mediatek/mt7986a-rfb.dtsi similarity index 100% rename from target/linux/mediatek/files-5.15/arch/arm64/boot/dts/mediatek/mt7986a-rfb.dts rename to target/linux/mediatek/files-5.15/arch/arm64/boot/dts/mediatek/mt7986a-rfb.dtsi diff --git a/target/linux/mediatek/image/filogic.mk b/target/linux/mediatek/image/filogic.mk index f7fc9e30d1..1ece1465c2 100644 --- a/target/linux/mediatek/image/filogic.mk +++ b/target/linux/mediatek/image/filogic.mk @@ -84,14 +84,13 @@ define Device/bananapi_bpi-r3 endef TARGET_DEVICES += bananapi_bpi-r3 -define Device/mediatek_mt7986a-rfb +define Device/mediatek_mt7986a-rfb-nand DEVICE_VENDOR := MediaTek - DEVICE_MODEL := MTK7986 rfba AP - DEVICE_DTS := mt7986a-rfb + DEVICE_MODEL := MT7986 rfba AP (NAND) + DEVICE_DTS := mt7986a-rfb-spim-nand DEVICE_DTS_DIR := $(DTS_DIR)/ KERNEL_LOADADDR := 0x48000000 - DEVICE_DTS_OVERLAY := mt7986a-rfb-spim-nand mt7986a-rfb-spim-nor - SUPPORTED_DEVICES := mediatek,mt7986a-rfb + SUPPORTED_DEVICES := mediatek,mt7986a-rfb-snand UBINIZE_OPTS := -E 5 BLOCKSIZE := 128k PAGESIZE := 2048 @@ -101,12 +100,12 @@ define Device/mediatek_mt7986a-rfb IMAGE/factory.bin := append-ubi | check-size $$$$(IMAGE_SIZE) IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata KERNEL = kernel-bin | lzma | \ - fit lzma $$(KDIR)/$$(firstword $$(DEVICE_DTS)).dtb + fit lzma $$(KDIR)/image-$$(firstword $$(DEVICE_DTS)).dtb KERNEL_INITRAMFS = kernel-bin | lzma | \ - fit lzma $$(KDIR)/$$(firstword $$(DEVICE_DTS)).dtb with-initrd + fit lzma $$(KDIR)/image-$$(firstword $$(DEVICE_DTS)).dtb with-initrd DTC_FLAGS += -@ --space 32768 endef -TARGET_DEVICES += mediatek_mt7986a-rfb +TARGET_DEVICES += mediatek_mt7986a-rfb-nand define Device/mediatek_mt7986b-rfb DEVICE_VENDOR := MediaTek From 5faff99c7b1e1da1901e539f3c677e5b31454045 Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Sun, 30 Oct 2022 07:15:36 +0100 Subject: [PATCH 16/62] mediatek: filogic: fix mt7986a ethernet devicetree entries Add all ports, rename DSA ports to start at lan1 Signed-off-by: Felix Fietkau --- .../arm64/boot/dts/mediatek/mt7986a-rfb.dtsi | 36 ++++++++++++------- 1 file changed, 24 insertions(+), 12 deletions(-) diff --git a/target/linux/mediatek/files-5.15/arch/arm64/boot/dts/mediatek/mt7986a-rfb.dtsi b/target/linux/mediatek/files-5.15/arch/arm64/boot/dts/mediatek/mt7986a-rfb.dtsi index 41ae5f171c..3fbe288dae 100644 --- a/target/linux/mediatek/files-5.15/arch/arm64/boot/dts/mediatek/mt7986a-rfb.dtsi +++ b/target/linux/mediatek/files-5.15/arch/arm64/boot/dts/mediatek/mt7986a-rfb.dtsi @@ -70,12 +70,6 @@ compatible = "mediatek,eth-mac"; reg = <1>; phy-mode = "2500base-x"; - - fixed-link { - speed = <2500>; - full-duplex; - pause; - }; }; mdio: mdio-bus { @@ -95,15 +89,14 @@ phy5: phy@5 { compatible = "ethernet-phy-id67c9.de0a"; reg = <5>; + reset-gpios = <&pio 6 1>; reset-deassert-us = <20000>; - phy-mode = "2500base-x"; }; phy6: phy@6 { compatible = "ethernet-phy-id67c9.de0a"; reg = <6>; - phy-mode = "2500base-x"; }; switch: switch@0 { @@ -311,6 +304,12 @@ }; }; +&gmac1 { + phy-mode = "2500base-x"; + phy-connection-type = "2500base-x"; + phy-handle = <&phy6>; +}; + &switch { ports { #address-cells = <1>; @@ -318,22 +317,35 @@ port@0 { reg = <0>; - label = "lan0"; + label = "lan1"; }; port@1 { reg = <1>; - label = "lan1"; + label = "lan2"; }; port@2 { reg = <2>; - label = "lan2"; + label = "lan3"; }; port@3 { reg = <3>; - label = "lan3"; + label = "lan4"; + }; + + port@4 { + reg = <4>; + label = "wan"; + }; + + port@5 { + reg = <5>; + label = "lan6"; + + phy-mode = "2500base-x"; + phy-handle = <&phy5>; }; port@6 { From f753316f4aa4764e80c4dbf6f2cc88922052da1e Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Sun, 30 Oct 2022 18:23:00 +0100 Subject: [PATCH 17/62] mediatek: filogic: enable maxlinear PHY support, refresh config Needed for the 7986 RFB1 board Signed-off-by: Felix Fietkau --- target/linux/mediatek/filogic/config-5.15 | 1 + 1 file changed, 1 insertion(+) diff --git a/target/linux/mediatek/filogic/config-5.15 b/target/linux/mediatek/filogic/config-5.15 index 469542e219..ad3111a6e3 100644 --- a/target/linux/mediatek/filogic/config-5.15 +++ b/target/linux/mediatek/filogic/config-5.15 @@ -198,6 +198,7 @@ CONFIG_LOCK_SPIN_ON_OWNER=y CONFIG_LZO_COMPRESS=y CONFIG_LZO_DECOMPRESS=y CONFIG_MAGIC_SYSRQ=y +CONFIG_MAXLINEAR_GPHY=y CONFIG_MDIO_BUS=y CONFIG_MDIO_DEVICE=y CONFIG_MDIO_DEVRES=y From a06e023b4e124dad2b2ddf3db87cb804b7043b26 Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Wed, 12 Oct 2022 12:54:30 +0200 Subject: [PATCH 18/62] mac80211: remove old legacy legacy drivers Get rid of drivers that are either limited to 802.11b/g or don't even support cfg80211/mac80211. Most of these are either limited to boards that we don't even support anymore because of firmware size, or were only used for custom hacks by a really small number of users in the past. Let's get rid of those to reduce the maintenance effort and the number of useless packages Signed-off-by: Felix Fietkau --- package/firmware/b43legacy-firmware/Makefile | 74 ----- package/kernel/acx-mac80211/Makefile | 255 ------------------ .../acx-mac80211/patches/100-compat.patch | 16 -- .../patches/200-initial-macaddr.patch | 29 -- .../acx-mac80211/patches/300-api_sync.patch | 112 -------- package/kernel/mac80211/Makefile | 167 +----------- package/kernel/mac80211/broadcom.mk | 22 +- package/kernel/mac80211/intel.mk | 126 +-------- package/kernel/mac80211/marvell.mk | 42 --- package/kernel/mac80211/ralink.mk | 43 +-- package/kernel/mac80211/realtek.mk | 27 -- .../generic/profiles/100-Broadcom-b43.mk | 6 +- .../generic/profiles/200-Broadcom-b44-b43.mk | 4 +- target/linux/bcm47xx/image/legacy.mk | 12 +- .../legacy/profiles/100-Broadcom-b43.mk | 4 +- tools/Makefile | 2 +- 16 files changed, 19 insertions(+), 922 deletions(-) delete mode 100644 package/firmware/b43legacy-firmware/Makefile delete mode 100644 package/kernel/acx-mac80211/Makefile delete mode 100644 package/kernel/acx-mac80211/patches/100-compat.patch delete mode 100644 package/kernel/acx-mac80211/patches/200-initial-macaddr.patch delete mode 100644 package/kernel/acx-mac80211/patches/300-api_sync.patch diff --git a/package/firmware/b43legacy-firmware/Makefile b/package/firmware/b43legacy-firmware/Makefile deleted file mode 100644 index 43c530cc71..0000000000 --- a/package/firmware/b43legacy-firmware/Makefile +++ /dev/null @@ -1,74 +0,0 @@ -# -# Copyright (C) 2016 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=b43legacy-firmware -PKG_VERSION:=3.130.20.0 -PKG_RELEASE:=1 - -DL_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) - -PKG_SOURCE:=wl_apsta-$(PKG_VERSION).o -PKG_SOURCE_URL:=@OPENWRT -PKG_HASH:=7dba610b1d96dd14e901bcbce14cd6ecd1b1ac6f5c0035b0d6b6dc46a7c3ef90 - -include $(INCLUDE_DIR)/package.mk - -define Package/b43legacy-firmware - SECTION:=firmware - CATEGORY:=Firmware - URL:=$(PKG_SOURCE_URL) - TITLE:=Broadcom bcm43xx b43legacy firmware -endef - -define Package/b43legacy-firmware/config - if PACKAGE_b43legacy-firmware - - config B43LEGACY_FW_SQUASH - bool "Remove unnecessary firmware files" - default y - help - This options allows you to remove unnecessary b43legacy firmware files - from the final rootfs image. This can reduce the rootfs size by - up to 50k. - - If unsure, say Y. - - config B43LEGACY_FW_SQUASH_COREREVS - string "Core revisions to include" - depends on B43LEGACY_FW_SQUASH - default "1,2,3,4" - help - This is a comma separated list of core revision numbers. - - Example (keep files for rev4 only): - 4 - - Example (keep files for rev2 and rev4): - 2,4 - - endif -endef - -define Build/Prepare - mkdir -p $(PKG_BUILD_DIR) -endef - -define Build/Compile - -endef - -define Package/b43legacy-firmware/install - $(INSTALL_DIR) $(1)/lib/firmware - b43-fwcutter --unsupported -w $(1)/lib/firmware/ $(DL_DIR)/$(PKG_SOURCE) - ifneq ($(CONFIG_B43LEGACY_FW_SQUASH),) - b43-fwsquash.py "G" "$(CONFIG_B43LEGACY_FW_SQUASH_COREREVS)" "$(1)/lib/firmware/b43legacy" - endif -endef - -$(eval $(call BuildPackage,b43legacy-firmware)) diff --git a/package/kernel/acx-mac80211/Makefile b/package/kernel/acx-mac80211/Makefile deleted file mode 100644 index 240f171d1e..0000000000 --- a/package/kernel/acx-mac80211/Makefile +++ /dev/null @@ -1,255 +0,0 @@ -# -# Copyright (C) 2007-2012 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk -include $(INCLUDE_DIR)/kernel.mk - -PKG_NAME:=acx-mac80211 -PKG_RELEASE:=1 - -PKG_SOURCE_URL:=http://git.code.sf.net/p/acx100/acx-mac80211 -PKG_SOURCE_PROTO:=git -PKG_SOURCE_DATE:=2014-02-16 -PKG_SOURCE_VERSION:=b6fc31491020cb01d2cd1acc170cfa03ced7e726 -PKG_MIRROR_HASH:=58590245715f0e5fb4b57aab6d91071dfb6a97d3273f5aee0b97b1edee030ed0 - -DL_SUBDIR:=$(PKG_NAME)-$(PKG_SOURCE_DATE) - -PKG_CONFIG_DEPENDS:= \ - CONFIG_PACKAGE_MAC80211_DEBUGFS \ - CONFIG_PACKAGE_MAC80211_MESH \ - -include $(INCLUDE_DIR)/package.mk - -define KernelPackage/acx-mac80211 - SUBMENU:=Wireless Drivers - TITLE:=ACX1xx mac80211 driver - DEPENDS:=@PCI_SUPPORT @mipsel +kmod-mac80211 - FILES:=$(PKG_BUILD_DIR)/acx-mac80211.ko - AUTOLOAD:=$(call AutoProbe,acx-mac80211) - MENU:=1 -endef - -define KernelPackage/acx-mac80211/config - menu "Configuration" - depends on PACKAGE_kmod-acx-mac80211 - - config ACX_ID_0D - bool "ACX1xx Radio ID 0D firmware" - help - Download and install firmware for: - ACX1xx cards with Radio ID 0D into /lib/firmware. - - config ACX_ID_11 - bool "ACX1xx Radio ID 11 firmware" - help - Download and install firmware for: - ACX1xx cards with Radio ID 11 into /lib/firmware. - - config ACX_ID_15 - bool "ACX1xx Radio ID 15 firmware" - help - Download and install firmware for: - ACX1xx cards with Radio ID 15 into /lib/firmware. - - config ACX_ID_16 - bool "ACX1xx Radio ID 16 firmware" - default y - help - Download and install firmware for: - ACX1xx cards with Radio ID 16 into /lib/firmware. - - choice - prompt "ACX111 firmware version" - depends on ACX_ID_16 - default ACX_DEFAULT - help - This option allows you to select the version of the acx firmware. - - config ACX_DEFAULT - bool "Default" - help - Default firmware for ACX111 devices. - - If unsure, select this. - - config ACX_1_2_1_34 - bool "1.2.1_34" - help - 1.2.1_34 firmware for ACX111 devices. Works with Zyxel P-334WT. - - If unsure, select the "default" firmware. - - endchoice - - config ACX_ID_17 - bool "ACX1xx Radio ID 17 firmware" - help - Download and install firmware for: - ACX1xx cards with Radio ID 17 into /lib/firmware. - - config ACX_ID_19 - bool "ACX1xx Radio ID 19 firmware" - default y - help - Download and install firmware for: - ACX1xx cards with Radio ID 19 into /lib/firmware. - - config ACX_ID_1B - bool "ACX1xx Radio ID 1B firmware" - help - Download and install firmware for: - ACX1xx cards with Radio ID 1b into /lib/firmware. - - endmenu -endef - -define KernelPackage/acx-mac80211/description - Driver for acx111 cards (mac80211 version) -endef - -define Download/tiacx100 - FILE:=tiacx100 - URL:=@OPENWRT - HASH:=4f05913c940c2455b267545b12d93ad81fa5eebb0cbee22a2c7588c50525b4f0 -endef - -define Download/tiacx100r0d - FILE:=tiacx100r0D - URL:=@OPENWRT - HASH:=6a4a7fbb24a328a88261bc2a507b2a0bf63c91e831e3f1a8caa4f6599b2215e6 -endef - -define Download/tiacx100r11 - FILE:=tiacx100r11 - URL:=@OPENWRT - HASH:=e005a93a0b463e01edba2b79038b54c29a7932efee61c851a2ac644b8a4e5dd4 -endef - -define Download/tiacx100r15 - FILE:=tiacx100r15 - URL:=@OPENWRT - HASH:=c6f40bead5ef45720e2d72bbe4d998367c2c7857eb7716234aedeb2ad98bcdde -endef - -define Download/tiacx111c16 - FILE:=tiacx111c16 - URL:=@OPENWRT - HASH:=cc6108d577ebc55b924ff6bab44eeee3456d284c63819277cb5460338b2f1bd7 -endef - -define Download/tiacx111c16_1 - FILE:=tiacx111c16_1.2.1_34 - URL:=@OPENWRT - HASH:=672ed9d02565ab44da450c52f0ced3be99a3a3901f73454455da8e1f98ada220 -endef - -define Download/tiacx111c17 - FILE:=tiacx111c17 - URL:=@OPENWRT - HASH:=2bb900a5886dbea2d3504623d9f3ac8abbb2e9fdfcf0fe233e77951dff748a40 -endef - -define Download/tiacx111c19 - FILE:=tiacx111c19 - URL:=@OPENWRT - HASH:=383d86a8cfddf92400d661b4e43a9b855350fa656edd4f75b4aff7fab2d00e90 -endef - -define Download/tiacx111usbc1b - FILE:=tiacx111usbc1B - URL:=@OPENWRT - HASH:=f3c9e574de7073014ab6eef9a0f6412c53ae521b67723360af753c41401ed4d5 -endef - -PKG_EXTRA_KCONFIG:= \ - CONFIG_ACX_MAC80211=m \ - CONFIG_ACX_MAC80211_PCI=m \ - -PKG_EXTRA_CFLAGS:= \ - $(patsubst CONFIG_%, -DCONFIG_%=1, $(patsubst %=m,%,$(filter %=m,$(PKG_EXTRA_KCONFIG)))) \ - $(patsubst CONFIG_%, -DCONFIG_%=1, $(patsubst %=y,%,$(filter %=y,$(PKG_EXTRA_KCONFIG)))) \ - $(if $(CONFIG_LEDS_TRIGGERS), -DCONFIG_MAC80211_LEDS -DCONFIG_LEDS_TRIGGERS) \ - $(if $(CONFIG_PACKAGE_MAC80211_DEBUGFS), -DCONFIG_CFG80211_DEBUGFS -DCONFIG_MAC80211_DEBUGFS) \ - $(if $(CONFIG_PACKAGE_MAC80211_MESH), -DCONFIG_MAC80211_MESH) \ - -DBACKPORTED_KERNEL_NAME=\\\"$(PKG_SOURCE)\\\" \ - -DBACKPORTED_KERNEL_VERSION=\\\"$(PKG_SOURCE_VERSION)\\\" \ - -DBACKPORTS_VERSION=\\\"unknown\\\" \ - -define Build/Compile - $(MAKE) -C "$(LINUX_DIR)" \ - $(KERNEL_MAKE_FLAGS) \ - M="$(PKG_BUILD_DIR)" \ - $(PKG_EXTRA_KCONFIG) \ - EXTRA_CFLAGS="$(PKG_EXTRA_CFLAGS) -DCONFIG_ACX_MAC80211_VERSION=\"KERNEL_VERSION(4,2,0)\"" \ - LINUXINCLUDE="-I$(STAGING_DIR)/usr/include/mac80211-backport/uapi -I$(STAGING_DIR)/usr/include/mac80211-backport \ - -I$(STAGING_DIR)/usr/include/mac80211/uapi -I$(STAGING_DIR)/usr/include/mac80211 \ - -I$(LINUX_DIR)/include -I$(LINUX_DIR)/include/$(LINUX_UAPI_DIR) \ - -I$(LINUX_DIR)/include/generated/uapi/ -Iarch/$(LINUX_KARCH)/include \ - -Iarch/$(LINUX_KARCH)/include/$(LINUX_UAPI_DIR) \ - -Iarch/$(LINUX_KARCH)/include/generated \ - -Iarch/$(LINUX_KARCH)/include/generated/$(LINUX_UAPI_DIR) \ - -include generated/autoconf.h \ - -include backport/backport.h " \ - V="$(V)" \ - modules -endef - -define Build/Configure -endef - -define KernelPackage/acx-mac80211/install - $(INSTALL_DIR) $(1)/lib/firmware - -ifneq ($(CONFIG_ACX_ID_0D)$(CONFIG_ACX_ID_11)$(CONFIG_ACX_ID_15),) - $(INSTALL_DATA) $(DL_DIR)/tiacx100 $(1)/lib/firmware/ -endif - -ifneq ($(CONFIG_ACX_ID_0D),) - $(INSTALL_DATA) $(DL_DIR)/tiacx100r0D $(1)/lib/firmware/ -endif - -ifneq ($(CONFIG_ACX_ID_11),) - $(INSTALL_DATA) $(DL_DIR)/tiacx100r11 $(1)/lib/firmware/ -endif - -ifneq ($(CONFIG_ACX_ID_15),) - $(INSTALL_DATA) $(DL_DIR)/tiacx100r15 $(1)/lib/firmware/ -endif - -ifneq ($(CONFIG_ACX_DEFAULT),) - $(INSTALL_DATA) $(DL_DIR)/tiacx111c16 $(1)/lib/firmware/ -endif - -ifneq ($(CONFIG_ACX_1_2_1_34),) - $(INSTALL_DATA) $(DL_DIR)/tiacx111c16_1.2.1_34 $(1)/lib/firmware/tiacx111c16 -endif - -ifneq ($(CONFIG_ACX_ID_17),) - $(INSTALL_DATA) $(DL_DIR)/tiacx111c17 $(1)/lib/firmware/ -endif - -ifneq ($(CONFIG_ACX_ID_19),) - $(INSTALL_DATA) $(DL_DIR)/tiacx111c19 $(1)/lib/firmware/ -endif - -ifneq ($(CONFIG_ACX_ID_1B),) - $(INSTALL_DATA) $(DL_DIR)/tiacx111usbc1B $(1)/lib/firmware/ -endif - -endef - -$(eval $(call KernelPackage,acx-mac80211)) -$(eval $(call Download,tiacx100)) -$(eval $(call Download,tiacx100r0d)) -$(eval $(call Download,tiacx100r11)) -$(eval $(call Download,tiacx100r15)) -$(eval $(call Download,tiacx111c16)) -$(eval $(call Download,tiacx111c16_1)) -$(eval $(call Download,tiacx111c17)) -$(eval $(call Download,tiacx111c19)) -$(eval $(call Download,tiacx111usbc1b)) diff --git a/package/kernel/acx-mac80211/patches/100-compat.patch b/package/kernel/acx-mac80211/patches/100-compat.patch deleted file mode 100644 index 6fcab5ea43..0000000000 --- a/package/kernel/acx-mac80211/patches/100-compat.patch +++ /dev/null @@ -1,16 +0,0 @@ -diff --git a/pci.c b/pci.c -index ae07f5a..72d542f 100644 ---- a/pci.c -+++ b/pci.c -@@ -1495,7 +1495,11 @@ static struct acxpci_device_info acxpci_info_tbl[] __devinitdata = { - #endif - - #ifdef CONFIG_PCI -+#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 8, 0) - static DEFINE_PCI_DEVICE_TABLE(acxpci_id_tbl) = { -+#else -+static const struct pci_device_id acxpci_id_tbl[] = { -+#endif - { PCI_VDEVICE(TI, PCI_DEVICE_ID_TI_TNETW1100A), - .driver_data = CHIPTYPE_ACX100, - }, diff --git a/package/kernel/acx-mac80211/patches/200-initial-macaddr.patch b/package/kernel/acx-mac80211/patches/200-initial-macaddr.patch deleted file mode 100644 index c0fdd433b3..0000000000 --- a/package/kernel/acx-mac80211/patches/200-initial-macaddr.patch +++ /dev/null @@ -1,29 +0,0 @@ ---- a/cardsetting.c -+++ b/cardsetting.c -@@ -715,10 +715,25 @@ int acx1xx_get_station_id(acx_device_t * - u8 *stationID = adev->ie_cmd_buf; - const u8 *paddr; - int i, res; -+ const char *prom_addr; -+ char *prom_getenv(const char *name); - - res = acx_interrogate(adev, stationID, ACX1xx_IE_DOT11_STATION_ID); - paddr = &stationID[4]; -- for (i = 0; i < ETH_ALEN; i++) { -+ prom_addr = NULL; -+#ifdef CONFIG_VLYNQ -+ prom_addr = prom_getenv("macwlan"); -+ if (prom_addr == NULL) -+ prom_addr = prom_getenv("mac_ap"); -+#endif -+ if (prom_addr) -+ sscanf(prom_addr, "%hhx:%hhx:%hhx:%hhx:%hhx:%hhx", adev->dev_addr, -+ adev->dev_addr + 1, -+ adev->dev_addr + 2, -+ adev->dev_addr + 3, -+ adev->dev_addr + 4, -+ adev->dev_addr + 5); -+ else for (i = 0; i < ETH_ALEN; i++) { - /* we copy the MAC address (reversed in the card) to - * the netdevice's MAC address, and on ifup it will be - * copied into iwadev->dev_addr */ diff --git a/package/kernel/acx-mac80211/patches/300-api_sync.patch b/package/kernel/acx-mac80211/patches/300-api_sync.patch deleted file mode 100644 index d055271f60..0000000000 --- a/package/kernel/acx-mac80211/patches/300-api_sync.patch +++ /dev/null @@ -1,112 +0,0 @@ ---- a/main.c -+++ b/main.c -@@ -497,7 +497,7 @@ int acx_free_mechanics(acx_device_t *ade - - int acx_init_ieee80211(acx_device_t *adev, struct ieee80211_hw *hw) - { -- hw->flags &= ~IEEE80211_HW_RX_INCLUDES_FCS; -+ __clear_bit(IEEE80211_HW_RX_INCLUDES_FCS, hw->flags); - hw->queues = 1; - hw->wiphy->max_scan_ssids = 1; - -@@ -525,14 +525,14 @@ int acx_init_ieee80211(acx_device_t *ade - /* We base signal quality on winlevel approach of previous driver - * TODO OW 20100615 This should into a common init code - */ -- hw->flags |= IEEE80211_HW_SIGNAL_UNSPEC; -+ __set_bit(IEEE80211_HW_SIGNAL_UNSPEC, hw->flags); - hw->max_signal = 100; - - if (IS_ACX100(adev)) { -- adev->hw->wiphy->bands[IEEE80211_BAND_2GHZ] = -+ adev->hw->wiphy->bands[NL80211_BAND_2GHZ] = - &acx100_band_2GHz; - } else if (IS_ACX111(adev)) -- adev->hw->wiphy->bands[IEEE80211_BAND_2GHZ] = -+ adev->hw->wiphy->bands[NL80211_BAND_2GHZ] = - &acx111_band_2GHz; - else { - log(L_ANY, "Error: Unknown device"); -@@ -945,8 +945,8 @@ void acx_op_configure_filter(struct ieee - changed_flags, *total_flags); - - /* OWI TODO: Set also FIF_PROBE_REQ ? */ -- *total_flags &= (FIF_PROMISC_IN_BSS | FIF_ALLMULTI | FIF_FCSFAIL -- | FIF_CONTROL | FIF_OTHER_BSS); -+ *total_flags &= (FIF_ALLMULTI | FIF_FCSFAIL | FIF_CONTROL -+ | FIF_OTHER_BSS); - - logf1(L_DEBUG, "2: *total_flags=0x%08x\n", *total_flags); - -@@ -1045,9 +1045,10 @@ void acx_op_tx(struct ieee80211_hw *hw, - } - - int acx_op_hw_scan(struct ieee80211_hw *hw, struct ieee80211_vif *vif, -- struct cfg80211_scan_request *req) -+ struct ieee80211_scan_request *hw_req) - { - acx_device_t *adev = hw2adev(hw); -+ struct cfg80211_scan_request *req = &hw_req->req; - struct sk_buff *skb; - size_t ssid_len = 0; - u8 *ssid = NULL; -@@ -1082,7 +1083,7 @@ int acx_op_hw_scan(struct ieee80211_hw * - goto out; - } - #else -- skb = ieee80211_probereq_get(adev->hw, adev->vif, ssid, ssid_len, -+ skb = ieee80211_probereq_get(adev->hw, vif->addr, ssid, ssid_len, - req->ie_len); - if (!skb) { - ret = -ENOMEM; ---- a/main.h -+++ b/main.h -@@ -62,7 +62,7 @@ void acx_op_tx(struct ieee80211_hw *hw, - #endif - - int acx_op_hw_scan(struct ieee80211_hw *hw, struct ieee80211_vif *vif, -- struct cfg80211_scan_request *req); -+ struct ieee80211_scan_request *req); - - int acx_recover_hw(acx_device_t *adev); - ---- a/cardsetting.c -+++ b/cardsetting.c -@@ -159,7 +159,7 @@ int acx_set_channel(acx_device_t *adev, - int res = 0; - - adev->rx_status.freq = freq; -- adev->rx_status.band = IEEE80211_BAND_2GHZ; -+ adev->rx_status.band = NL80211_BAND_2GHZ; - - adev->channel = channel; - ---- a/merge.c -+++ b/merge.c -@@ -2776,7 +2776,10 @@ void acx_irq_work(struct work_struct *wo - /* HOST_INT_SCAN_COMPLETE */ - if (irqmasked & HOST_INT_SCAN_COMPLETE) { - if (test_bit(ACX_FLAG_SCANNING, &adev->flags)) { -- ieee80211_scan_completed(adev->hw, false); -+ struct cfg80211_scan_info info = { -+ .aborted = false -+ }; -+ ieee80211_scan_completed(adev->hw, &info); - log(L_INIT, "scan completed\n"); - clear_bit(ACX_FLAG_SCANNING, &adev->flags); - } -@@ -3138,10 +3141,13 @@ int acx_op_start(struct ieee80211_hw *hw - - void acx_stop(acx_device_t *adev) - { -+ struct cfg80211_scan_info info = { -+ .aborted = true -+ }; - acxmem_lock_flags; - - if (test_bit(ACX_FLAG_SCANNING, &adev->flags)) { -- ieee80211_scan_completed(adev->hw, true); -+ ieee80211_scan_completed(adev->hw, &info); - acx_issue_cmd(adev, ACX1xx_CMD_STOP_SCAN, NULL, 0); - clear_bit(ACX_FLAG_SCANNING, &adev->flags); - } diff --git a/package/kernel/mac80211/Makefile b/package/kernel/mac80211/Makefile index 91dad18254..ec35bf67ec 100644 --- a/package/kernel/mac80211/Makefile +++ b/package/kernel/mac80211/Makefile @@ -22,15 +22,10 @@ PKG_BUILD_PARALLEL:=1 PKG_MAINTAINER:=Felix Fietkau PKG_DRIVERS = \ - adm8211 \ - hermes hermes-pci hermes-pcmcia hermes-plx\ - lib80211 \ mac80211-hwsim \ mt7601u \ - p54-common p54-pci p54-usb \ rsi91x rsi91x-usb rsi91x-sdio\ - wlcore wl12xx wl18xx \ - zd1211rw + wlcore wl12xx wl18xx PKG_CONFIG_DEPENDS:= \ CONFIG_PACKAGE_kmod-mac80211 \ @@ -164,92 +159,6 @@ define KernelPackage/mac80211/description Generic IEEE 802.11 Networking Stack (mac80211) endef -define KernelPackage/adm8211 - $(call KernelPackage/mac80211/Default) - TITLE:=ADMTek 8211 support - DEPENDS+=@PCI_SUPPORT +kmod-mac80211 +kmod-eeprom-93cx6 - FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/admtek/adm8211.ko - AUTOLOAD:=$(call AutoProbe,adm8211) -endef - -define KernelPackage/hermes - $(call KernelPackage/mac80211/Default) - TITLE:=Hermes 802.11b chipset support - DEPENDS:=@PCI_SUPPORT||PCMCIA_SUPPORT +kmod-cfg80211 +@DRIVER_WEXT_SUPPORT +kmod-crypto-michael-mic - DEFAULT:=n - FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/intersil/orinoco/orinoco.ko - AUTOLOAD:=$(call AutoProbe,orinoco) -endef - -define KernelPackage/hermes/description - Kernel support for Hermes 802.11b chipsets -endef - -define KernelPackage/hermes-pci - $(call KernelPackage/mac80211/Default) - TITLE:=Intersil Prism 2.5 PCI support - DEPENDS:=@PCI_SUPPORT +kmod-hermes - FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/intersil/orinoco/orinoco_pci.ko - AUTOLOAD:=$(call AutoProbe,orinoco_pci) -endef - -define KernelPackage/hermes-pci/description - Kernel modules for Intersil Prism 2.5 PCI support -endef - -define KernelPackage/hermes-plx - $(call KernelPackage/mac80211/Default) - TITLE:=PLX9052 based PCI adaptor - DEPENDS:=@PCI_SUPPORT +kmod-hermes - FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/intersil/orinoco/orinoco_plx.ko - AUTOLOAD:=$(call AutoProbe,orinoco_plx) -endef - -define KernelPackage/hermes-plx/description - Kernel modules for Hermes in PLX9052 based PCI adaptors -endef - -define KernelPackage/hermes-pcmcia - $(call KernelPackage/mac80211/Default) - TITLE:=Hermes based PCMCIA adaptors - DEPENDS:=@PCMCIA_SUPPORT +kmod-hermes +kmod-pcmcia-core - FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/intersil/orinoco/orinoco_cs.ko - AUTOLOAD:=$(call AutoProbe,orinoco_cs) -endef - -define KernelPackage/hermes-pcmcia/description - Kernel modules for Hermes based PCMCIA adaptors -endef - - -define KernelPackage/lib80211 - $(call KernelPackage/mac80211/Default) - TITLE:=802.11 Networking stack - DEPENDS:=+kmod-cfg80211 +kmod-crypto-hash +kmod-crypto-ccm - HIDDEN:=1 - FILES:= \ - $(PKG_BUILD_DIR)/net/wireless/lib80211.ko \ - $(PKG_BUILD_DIR)/net/wireless/lib80211_crypt_wep.ko \ - $(PKG_BUILD_DIR)/net/wireless/lib80211_crypt_ccmp.ko \ - $(PKG_BUILD_DIR)/net/wireless/lib80211_crypt_tkip.ko - AUTOLOAD:=$(call AutoProbe, \ - lib80211 \ - lib80211_crypt_wep \ - lib80211_crypt_ccmp \ - lib80211_crypt_tkip \ - ) -endef - -define KernelPackage/lib80211/description - Kernel modules for 802.11 Networking stack - Includes: - - lib80211 - - lib80211_crypt_wep - - lib80211_crypt_tkip - - lib80211_crytp_ccmp -endef - - define KernelPackage/mac80211-hwsim $(call KernelPackage/mac80211/Default) TITLE:=mac80211 HW simulation device @@ -267,38 +176,6 @@ define KernelPackage/mt7601u AUTOLOAD:=$(call AutoProbe,mt7601u) endef -define KernelPackage/p54/Default - $(call KernelPackage/mac80211/Default) - TITLE:=Prism54 Drivers -endef - -define KernelPackage/p54/description - Kernel module for Prism54 chipsets (mac80211) -endef - -define KernelPackage/p54-common - $(call KernelPackage/p54/Default) - DEPENDS+= @(PCI_SUPPORT||USB_SUPPORT) +kmod-mac80211 +kmod-lib-crc-ccitt - TITLE+= (COMMON) - FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/intersil/p54/p54common.ko -endef - -define KernelPackage/p54-pci - $(call KernelPackage/p54/Default) - TITLE+= (PCI) - DEPENDS+= @PCI_SUPPORT +kmod-p54-common +p54-pci-firmware - FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/intersil/p54/p54pci.ko - AUTOLOAD:=$(call AutoProbe,p54pci) -endef - -define KernelPackage/p54-usb - $(call KernelPackage/p54/Default) - TITLE+= (USB) - DEPENDS+= @USB_SUPPORT +kmod-usb-core +kmod-p54-common +p54-usb-firmware - FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/intersil/p54/p54usb.ko - AUTOLOAD:=$(call AutoProbe,p54usb) -endef - define KernelPackage/rsi91x $(call KernelPackage/mac80211/Default) TITLE:=Redpine Signals Inc 91x WLAN driver support @@ -364,23 +241,6 @@ define KernelPackage/wl18xx/description endef -ZD1211FW_NAME:=zd1211-firmware -ZD1211FW_VERSION:=1.4 -define Download/zd1211rw - FILE:=$(ZD1211FW_NAME)-$(ZD1211FW_VERSION).tar.bz2 - URL:=@SF/zd1211/ - HASH:=866308f6f59f7075f075d4959dff2ede47735c751251fecd1496df1ba4d338e1 -endef -$(eval $(call Download,zd1211rw)) - -define KernelPackage/zd1211rw - $(call KernelPackage/mac80211/Default) - TITLE:=Zydas ZD1211 support - DEPENDS+= @USB_SUPPORT +kmod-usb-core +kmod-mac80211 - FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/zydas/zd1211rw/zd1211rw.ko - AUTOLOAD:=$(call AutoProbe,zd1211rw) -endef - ifdef CONFIG_PACKAGE_MAC80211_DEBUGFS config-y += \ CFG80211_DEBUGFS \ @@ -392,28 +252,14 @@ ifdef CONFIG_PACKAGE_MAC80211_TRACING IWLWIFI_DEVICE_TRACING endif -config-$(call config_package,lib80211) += LIB80211 LIB80211_CRYPT_WEP LIB80211_CRYPT_CCMP LIB80211_CRYPT_TKIP - config-$(call config_package,mac80211-hwsim) += MAC80211_HWSIM config-$(call config_package,mt7601u) += MT7601U config-y += WL_MEDIATEK -config-$(call config_package,p54-common) += P54_COMMON -config-$(call config_package,p54-pci) += P54_PCI -config-$(call config_package,p54-usb) += P54_USB - -config-$(call config_package,hermes) += HERMES -config-$(call config_package,hermes-pci) += PCI_HERMES -config-$(call config_package,hermes-plx) += PLX_HERMES -config-$(call config_package,hermes-pcmcia) += PCMCIA_HERMES -config-y += HERMES_PRISM - -config-$(call config_package,adm8211) += ADM8211 config-$(call config_package,wlcore) += WLCORE WLCORE_SDIO config-$(call config_package,wl12xx) += WL12XX config-$(call config_package,wl18xx) += WL18XX config-y += WL_TI WILINK_PLATFORM_DATA -config-$(call config_package,zd1211rw) += ZD1211RW config-$(call config_package,rsi91x) += RSI_91X config-$(call config_package,rsi91x-usb) += RSI_USB config-$(call config_package,rsi91x-sdio) += RSI_SDIO @@ -450,9 +296,6 @@ define Build/Prepare mkdir -p $(PKG_BUILD_DIR) $(PKG_UNPACK) $(Build/Patch) - $(TAR) -C $(PKG_BUILD_DIR) -xzf $(DL_DIR)/$(IPW2100_NAME)-$(IPW2100_VERSION).tgz - $(TAR) -C $(PKG_BUILD_DIR) -xzf $(DL_DIR)/$(IPW2200_NAME)-$(IPW2200_VERSION).tgz - $(TAR) -C $(PKG_BUILD_DIR) -xjf $(DL_DIR)/$(ZD1211FW_NAME)-$(ZD1211FW_VERSION).tar.bz2 rm -rf \ $(PKG_BUILD_DIR)/include/linux/ssb \ $(PKG_BUILD_DIR)/include/linux/bcma \ @@ -463,14 +306,13 @@ define Build/Prepare $(PKG_BUILD_DIR)/include/linux/crc8.h \ $(PKG_BUILD_DIR)/include/linux/eeprom_93cx6.h \ $(PKG_BUILD_DIR)/include/linux/wl12xx.h \ - $(PKG_BUILD_DIR)/include/linux/spi/libertas_spi.h \ $(PKG_BUILD_DIR)/include/net/ieee80211.h \ $(PKG_BUILD_DIR)/backport-include/linux/bcm47xx_nvram.h echo 'compat-wireless-$(PKG_VERSION)-$(PKG_RELEASE)-$(REVISION)' > $(PKG_BUILD_DIR)/compat_version endef -ifneq ($(CONFIG_PACKAGE_kmod-cfg80211)$(CONFIG_PACKAGE_kmod-lib80211),) +ifneq ($(CONFIG_PACKAGE_kmod-cfg80211),) define Build/Compile/kmod rm -rf $(PKG_BUILD_DIR)/modules +$(MAKE) $(PKG_JOBS) $(MAKE_OPTS) modules @@ -546,11 +388,6 @@ define KernelPackage/cfg80211/install $(INSTALL_DATA) ./files/mac80211.hotplug $(1)/etc/hotplug.d/ieee80211/10-wifi-detect endef -define KernelPackage/zd1211rw/install - $(INSTALL_DIR) $(1)/lib/firmware/zd1211 - $(INSTALL_DATA) $(PKG_BUILD_DIR)/$(ZD1211FW_NAME)/zd1211* $(1)/lib/firmware/zd1211 -endef - $(eval $(foreach drv,$(PKG_DRIVERS),$(call KernelPackage,$(drv)))) $(eval $(call KernelPackage,cfg80211)) $(eval $(call KernelPackage,mac80211)) diff --git a/package/kernel/mac80211/broadcom.mk b/package/kernel/mac80211/broadcom.mk index 5548f6e661..b426ec2b19 100644 --- a/package/kernel/mac80211/broadcom.mk +++ b/package/kernel/mac80211/broadcom.mk @@ -1,5 +1,5 @@ PKG_DRIVERS += \ - b43 b43legacy brcmsmac brcmfmac brcmutil + b43 brcmsmac brcmfmac brcmutil PKG_CONFIG_DEPENDS += \ CONFIG_PACKAGE_B43_DEBUG \ @@ -24,9 +24,6 @@ config-$(CONFIG_PACKAGE_B43_PHY_HT) += B43_PHY_HT config-$(CONFIG_PACKAGE_B43_PIO) += B43_PIO config-$(CONFIG_PACKAGE_B43_DEBUG) += B43_DEBUG -config-$(call config_package,b43legacy) += B43LEGACY -config-y += B43LEGACY_DMA_MODE - config-$(call config_package,brcmutil) += BRCMUTIL config-$(call config_package,brcmsmac) += BRCMSMAC config-$(call config_package,brcmfmac) += BRCMFMAC @@ -341,23 +338,6 @@ define KernelPackage/b43/description Kernel module for Broadcom 43xx wireless support (mac80211 stack) new endef -define KernelPackage/b43legacy - $(call KernelPackage/mac80211/Default) - TITLE:=Broadcom 43xx-legacy wireless support - URL:=https://wireless.wiki.kernel.org/en/users/drivers/b43 - KCONFIG:= \ - CONFIG_HW_RANDOM=y - DEPENDS+= +kmod-mac80211 +!(TARGET_bcm47xx||TARGET_bcm63xx):kmod-ssb @!TARGET_bcm47xx_mips74k +b43legacy-firmware - FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/broadcom/b43legacy/b43legacy.ko - AUTOLOAD:=$(call AutoProbe,b43legacy) - MENU:=1 -endef - -define KernelPackage/b43legacy/description -Kernel module for Broadcom 43xx-legacy wireless support (mac80211 stack) new -endef - - define KernelPackage/brcmutil $(call KernelPackage/mac80211/Default) TITLE:=Broadcom IEEE802.11n common driver parts diff --git a/package/kernel/mac80211/intel.mk b/package/kernel/mac80211/intel.mk index eca4a574be..50eb561d18 100644 --- a/package/kernel/mac80211/intel.mk +++ b/package/kernel/mac80211/intel.mk @@ -1,18 +1,9 @@ -PKG_DRIVERS += \ - iwl-legacy iwl3945 iwl4965 iwlwifi \ - libipw ipw2100 ipw2200 \ +PKG_DRIVERS += iwlwifi -config-$(call config_package,iwl-legacy) += IWLEGACY -config-$(call config_package,iwl3945) += IWL3945 -config-$(call config_package,iwl4965) += IWL4965 config-$(call config_package,iwlwifi) += IWLWIFI IWLDVM IWLMVM config-$(CONFIG_PACKAGE_IWLWIFI_DEBUG)+= IWLWIFI_DEBUG config-$(CONFIG_PACKAGE_IWLWIFI_DEBUGFS)+= IWLWIFI_DEBUGFS -config-$(call config_package,libipw) += LIBIPW -config-$(call config_package,ipw2100) += IPW2100 -config-$(call config_package,ipw2200) += IPW2200 - define KernelPackage/iwlwifi $(call KernelPackage/mac80211/Default) DEPENDS:= +kmod-mac80211 @PCI_SUPPORT +@DRIVER_11N_SUPPORT +@DRIVER_11AC_SUPPORT +@DRIVER_11AX_SUPPORT @@ -84,118 +75,3 @@ define KernelPackage/iwlwifi/config endif endef -define KernelPackage/iwl-legacy - $(call KernelPackage/mac80211/Default) - DEPENDS:= +kmod-mac80211 @PCI_SUPPORT - TITLE:=Intel legacy Wireless support - FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/intel/iwlegacy/iwlegacy.ko - AUTOLOAD:=$(call AutoProbe,iwlegacy) -endef - -define KernelPackage/iwl-legacy/description - iwl-legacy kernel module for legacy Intel wireless support -endef - -define KernelPackage/iwl3945 - $(call KernelPackage/mac80211/Default) - DEPENDS:= +kmod-mac80211 +kmod-iwl-legacy +iwl3945-firmware - TITLE:=Intel iwl3945 Wireless support - FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/intel/iwlegacy/iwl3945.ko - AUTOLOAD:=$(call AutoProbe,iwl3945) -endef - -define KernelPackage/iwl3945/description - iwl3945 kernel module for Intel 3945 support -endef - -define KernelPackage/iwl4965 - $(call KernelPackage/mac80211/Default) - DEPENDS:= +kmod-mac80211 +kmod-iwl-legacy +@DRIVER_11N_SUPPORT +iwl4965-firmware - TITLE:=Intel iwl4965 Wireless support - FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/intel/iwlegacy/iwl4965.ko - AUTOLOAD:=$(call AutoProbe,iwl4965) -endef - -define KernelPackage/iwl4965/description - iwl4965 kernel module for Intel 4965 support -endef - - -define KernelPackage/libipw - $(call KernelPackage/mac80211/Default) - TITLE:=libipw for ipw2100 and ipw2200 - DEPENDS:=@PCI_SUPPORT +kmod-crypto-michael-mic +kmod-crypto-ecb +kmod-lib80211 +kmod-cfg80211 +@DRIVER_WEXT_SUPPORT @!BIG_ENDIAN - DEFAULT:=n - FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/intel/ipw2x00/libipw.ko - AUTOLOAD:=$(call AutoProbe,libipw) -endef - -define KernelPackage/libipw/description - Hardware independent IEEE 802.11 networking stack for ipw2100 and ipw2200. -endef - -IPW2100_NAME:=ipw2100-fw -IPW2100_VERSION:=1.3 - -define Download/ipw2100 - URL:= \ - https://src.fedoraproject.org/repo/pkgs/ipw2100-firmware/ipw2100-fw-1.3.tgz/46aa75bcda1a00efa841f9707bbbd113/ \ - https://archlinux.mirror.pkern.at/other/packages/ipw2100-fw/ \ - http://mirror.ox.ac.uk/sites/ftp.openbsd.org/pub/OpenBSD/distfiles/firmware/ \ - http://firmware.openbsd.org/firmware-dist/ - FILE:=$(IPW2100_NAME)-$(IPW2100_VERSION).tgz - HASH:=e1107c455e48d324a616b47a622593bc8413dcce72026f72731c0b03dae3a7a2 -endef -$(eval $(call Download,ipw2100)) - -define KernelPackage/ipw2100 - $(call KernelPackage/mac80211/Default) - TITLE:=Intel IPW2100 driver - DEPENDS:=@PCI_SUPPORT +kmod-libipw - FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/intel/ipw2x00/ipw2100.ko - AUTOLOAD:=$(call AutoProbe,ipw2100) -endef - -define KernelPackage/ipw2100/description - Kernel support for Intel IPW2100 - Includes: - - ipw2100 -endef - -IPW2200_NAME:=ipw2200-fw -IPW2200_VERSION:=3.1 - -define Download/ipw2200 - URL:= \ - https://src.fedoraproject.org/repo/pkgs/ipw2200-firmware/ipw2200-fw-3.1.tgz/eaba788643c7cc7483dd67ace70f6e99/ \ - https://archlinux.mirror.pkern.at/other/packages/ipw2200-fw/ \ - http://mirror.ox.ac.uk/sites/ftp.openbsd.org/pub/OpenBSD/distfiles/firmware/ \ - http://firmware.openbsd.org/firmware-dist/ - FILE:=$(IPW2200_NAME)-$(IPW2200_VERSION).tgz - HASH:=c6818c11c18cc030d55ff83f64b2bad8feef485e7742f84f94a61d811a6258bd -endef -$(eval $(call Download,ipw2200)) - -define KernelPackage/ipw2200 - $(call KernelPackage/mac80211/Default) - TITLE:=Intel IPW2200 driver - DEPENDS:=@PCI_SUPPORT +kmod-libipw - FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/intel/ipw2x00/ipw2200.ko - AUTOLOAD:=$(call AutoProbe,ipw2200) -endef - -define KernelPackage/ipw2200/description - Kernel support for Intel IPW2200 - Includes: - - ipw2200 -endef - -define KernelPackage/ipw2100/install - $(INSTALL_DIR) $(1)/lib/firmware - $(INSTALL_DATA) $(PKG_BUILD_DIR)/ipw2100-$(IPW2100_VERSION)*.fw $(1)/lib/firmware -endef - -define KernelPackage/ipw2200/install - $(INSTALL_DIR) $(1)/lib/firmware - $(INSTALL_DATA) $(PKG_BUILD_DIR)/$(IPW2200_NAME)-$(IPW2200_VERSION)/ipw2200*.fw $(1)/lib/firmware -endef diff --git a/package/kernel/mac80211/marvell.mk b/package/kernel/mac80211/marvell.mk index 254395932d..764d7f1f84 100644 --- a/package/kernel/mac80211/marvell.mk +++ b/package/kernel/mac80211/marvell.mk @@ -1,52 +1,10 @@ PKG_DRIVERS += \ - libertas-sdio libertas-usb libertas-spi \ mwl8k mwifiex-pcie mwifiex-sdio -config-$(call config_package,libertas-sdio) += LIBERTAS LIBERTAS_SDIO -config-$(call config_package,libertas-usb) += LIBERTAS LIBERTAS_USB -config-$(call config_package,libertas-spi) += LIBERTAS LIBERTAS_SPI config-$(call config_package,mwl8k) += MWL8K config-$(call config_package,mwifiex-pcie) += MWIFIEX MWIFIEX_PCIE config-$(call config_package,mwifiex-sdio) += MWIFIEX MWIFIEX_SDIO -define KernelPackage/libertas-usb - $(call KernelPackage/mac80211/Default) - DEPENDS+= @USB_SUPPORT +kmod-cfg80211 +kmod-usb-core +kmod-lib80211 +@DRIVER_WEXT_SUPPORT +libertas-usb-firmware - TITLE:=Marvell 88W8015 Wireless Driver - DEFAULT:=n - FILES:= \ - $(PKG_BUILD_DIR)/drivers/net/wireless/marvell/libertas/libertas.ko \ - $(PKG_BUILD_DIR)/drivers/net/wireless/marvell/libertas/usb8xxx.ko - AUTOLOAD:=$(call AutoProbe,libertas usb8xxx) -endef - -define KernelPackage/libertas-sdio - $(call KernelPackage/mac80211/Default) - DEPENDS+= +kmod-cfg80211 +kmod-lib80211 +kmod-mmc +@DRIVER_WEXT_SUPPORT @!TARGET_uml +libertas-sdio-firmware - TITLE:=Marvell 88W8686 Wireless Driver - DEFAULT:=n - FILES:= \ - $(PKG_BUILD_DIR)/drivers/net/wireless/marvell/libertas/libertas.ko \ - $(PKG_BUILD_DIR)/drivers/net/wireless/marvell/libertas/libertas_sdio.ko - AUTOLOAD:=$(call AutoProbe,libertas libertas_sdio) -endef - -define KernelPackage/libertas-spi - $(call KernelPackage/mac80211/Default) - SUBMENU:=Wireless Drivers - DEPENDS+= +kmod-cfg80211 +kmod-lib80211 +@DRIVER_WEXT_SUPPORT @!TARGET_uml +libertas-spi-firmware - DEFAULT:=n - KCONFIG := \ - CONFIG_SPI=y \ - CONFIG_SPI_MASTER=y - TITLE:=Marvell 88W8686 SPI Wireless Driver - FILES:= \ - $(PKG_BUILD_DIR)/drivers/net/wireless/marvell/libertas/libertas.ko \ - $(PKG_BUILD_DIR)/drivers/net/wireless/marvell/libertas/libertas_spi.ko - AUTOLOAD:=$(call AutoProbe,libertas libertas_spi) -endef - - define KernelPackage/mwl8k $(call KernelPackage/mac80211/Default) TITLE:=Driver for Marvell TOPDOG 802.11 Wireless cards diff --git a/package/kernel/mac80211/ralink.mk b/package/kernel/mac80211/ralink.mk index 7bbdc1c22c..6646c09ee2 100644 --- a/package/kernel/mac80211/ralink.mk +++ b/package/kernel/mac80211/ralink.mk @@ -1,8 +1,6 @@ PKG_DRIVERS += \ rt2x00-lib rt2x00-pci rt2x00-usb rt2x00-mmio \ - rt2400-pci rt2500-pci rt2500-usb \ - rt2800-lib rt2800-mmio rt2800-pci rt2800-soc rt2800-usb \ - rt61-pci rt73-usb + rt2800-lib rt2800-mmio rt2800-pci rt2800-soc rt2800-usb PKG_CONFIG_DEPENDS += \ CONFIG_PACKAGE_RT2X00_LIB_DEBUGFS \ @@ -96,30 +94,6 @@ $(call KernelPackage/rt2x00/Default) FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/ralink/rt2x00/rt2800lib.ko endef -define KernelPackage/rt2400-pci -$(call KernelPackage/rt2x00/Default) - DEPENDS+= @PCI_SUPPORT +kmod-rt2x00-pci +kmod-eeprom-93cx6 - TITLE+= (RT2400 PCI) - FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/ralink/rt2x00/rt2400pci.ko - AUTOLOAD:=$(call AutoProbe,rt2400pci) -endef - -define KernelPackage/rt2500-pci -$(call KernelPackage/rt2x00/Default) - DEPENDS+= @PCI_SUPPORT +kmod-rt2x00-pci +kmod-eeprom-93cx6 - TITLE+= (RT2500 PCI) - FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/ralink/rt2x00/rt2500pci.ko - AUTOLOAD:=$(call AutoProbe,rt2500pci) -endef - -define KernelPackage/rt2500-usb -$(call KernelPackage/rt2x00/Default) - DEPENDS+= @USB_SUPPORT +kmod-rt2x00-usb - TITLE+= (RT2500 USB) - FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/ralink/rt2x00/rt2500usb.ko - AUTOLOAD:=$(call AutoProbe,rt2500usb) -endef - define KernelPackage/rt2800-mmio $(call KernelPackage/rt2x00/Default) TITLE += (RT28xx/RT3xxx MMIO) @@ -155,18 +129,3 @@ $(call KernelPackage/rt2x00/Default) endef -define KernelPackage/rt61-pci -$(call KernelPackage/rt2x00/Default) - DEPENDS+= @PCI_SUPPORT +kmod-rt2x00-pci +kmod-eeprom-93cx6 +kmod-lib-crc-itu-t +rt61-pci-firmware - TITLE+= (RT2x61 PCI) - FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/ralink/rt2x00/rt61pci.ko - AUTOLOAD:=$(call AutoProbe,rt61pci) -endef - -define KernelPackage/rt73-usb - $(call KernelPackage/rt2x00/Default) - DEPENDS+= @USB_SUPPORT +kmod-rt2x00-usb +kmod-lib-crc-itu-t +rt73-usb-firmware - TITLE+= (RT73 USB) - FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/ralink/rt2x00/rt73usb.ko - AUTOLOAD:=$(call AutoProbe,rt73usb) -endef diff --git a/package/kernel/mac80211/realtek.mk b/package/kernel/mac80211/realtek.mk index 44c6c25b08..5aa9171bd3 100644 --- a/package/kernel/mac80211/realtek.mk +++ b/package/kernel/mac80211/realtek.mk @@ -1,12 +1,8 @@ PKG_DRIVERS += \ - rtl8180 rtl8187 \ rtlwifi rtlwifi-pci rtlwifi-btcoexist rtlwifi-usb rtl8192c-common \ rtl8192ce rtl8192se rtl8192de rtl8192cu rtl8723bs rtl8821ae \ rtl8xxxu rtw88 -config-$(call config_package,rtl8180) += RTL8180 -config-$(call config_package,rtl8187) += RTL8187 - config-$(call config_package,rtlwifi) += RTL_CARDS RTLWIFI config-$(call config_package,rtlwifi-pci) += RTLWIFI_PCI config-$(call config_package,rtlwifi-btcoexist) += RTLBTCOEXIST @@ -30,29 +26,6 @@ config-y += RTW88_8822BE RTW88_8822CE RTW88_8723DE config-$(CONFIG_PACKAGE_RTW88_DEBUG) += RTW88_DEBUG config-$(CONFIG_PACKAGE_RTW88_DEBUGFS) += RTW88_DEBUGFS -define KernelPackage/rtl818x/Default - $(call KernelPackage/mac80211/Default) - TITLE:=Realtek Drivers for RTL818x devices - URL:=https://wireless.wiki.kernel.org/en/users/drivers/rtl8187 - DEPENDS+= +kmod-eeprom-93cx6 +kmod-mac80211 -endef - -define KernelPackage/rtl8180 - $(call KernelPackage/rtl818x/Default) - DEPENDS+= @PCI_SUPPORT - TITLE+= (RTL8180 PCI) - FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/realtek/rtl818x/rtl8180/rtl818x_pci.ko - AUTOLOAD:=$(call AutoProbe,rtl818x_pci) -endef - -define KernelPackage/rtl8187 -$(call KernelPackage/rtl818x/Default) - DEPENDS+= @USB_SUPPORT +kmod-usb-core - TITLE+= (RTL8187 USB) - FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/realtek/rtl818x/rtl8187/rtl8187.ko - AUTOLOAD:=$(call AutoProbe,rtl8187) -endef - define KernelPackage/rtlwifi/config config PACKAGE_RTLWIFI_DEBUG bool "Realtek wireless debugging" diff --git a/target/linux/bcm47xx/generic/profiles/100-Broadcom-b43.mk b/target/linux/bcm47xx/generic/profiles/100-Broadcom-b43.mk index 8ff95b4dd9..a6c14cb33c 100644 --- a/target/linux/bcm47xx/generic/profiles/100-Broadcom-b43.mk +++ b/target/linux/bcm47xx/generic/profiles/100-Broadcom-b43.mk @@ -4,13 +4,13 @@ define Profile/Broadcom-b43 NAME:=Broadcom SoC, all Ethernet, BCM43xx WiFi (b43, default) - PACKAGES:=kmod-b44 kmod-tg3 kmod-bgmac kmod-b43 kmod-b43legacy + PACKAGES:=kmod-b44 kmod-tg3 kmod-bgmac kmod-b43 endef define Profile/Broadcom-b43/Description Package set compatible with hardware any Broadcom BCM47xx or BCM535x - SoC with Broadcom BCM43xx Wifi cards using the mac80211, b43 and - b43legacy drivers and b44, tg3 or bgmac Ethernet driver. + SoC with Broadcom BCM43xx Wifi cards using the mac80211, b43 and b44, + tg3 or bgmac Ethernet driver. endef $(eval $(call Profile,Broadcom-b43)) diff --git a/target/linux/bcm47xx/generic/profiles/200-Broadcom-b44-b43.mk b/target/linux/bcm47xx/generic/profiles/200-Broadcom-b44-b43.mk index 0231bff642..a1f8a0efb3 100644 --- a/target/linux/bcm47xx/generic/profiles/200-Broadcom-b44-b43.mk +++ b/target/linux/bcm47xx/generic/profiles/200-Broadcom-b44-b43.mk @@ -4,13 +4,13 @@ define Profile/Broadcom-b44-b43 NAME:=Broadcom SoC, b44 Ethernet, BCM43xx WiFi (b43, default) - PACKAGES:=kmod-b44 kmod-b43 kmod-b43legacy + PACKAGES:=kmod-b44 kmod-b43 endef define Profile/Broadcom-b44-b43/Description Package set compatible with hardware older Broadcom BCM47xx or BCM535x SoC with Broadcom BCM43xx Wifi cards using the mac80211, b43 and - b43legacy drivers and b44 Ethernet driver. + b44 Ethernet driver. endef $(eval $(call Profile,Broadcom-b44-b43)) diff --git a/target/linux/bcm47xx/image/legacy.mk b/target/linux/bcm47xx/image/legacy.mk index 4538813b91..448c5206f4 100644 --- a/target/linux/bcm47xx/image/legacy.mk +++ b/target/linux/bcm47xx/image/legacy.mk @@ -4,7 +4,7 @@ define Device/asus_wl-300g DEVICE_MODEL := WL-300g - DEVICE_PACKAGES := kmod-b43 kmod-b43legacy + DEVICE_PACKAGES := kmod-b43 $(Device/asus) PRODUCTID := "WL300g " endef @@ -78,7 +78,7 @@ TARGET_DEVICES += asus_wl-550ge define Device/asus_wl-hdd25 DEVICE_MODEL := WL-HDD25 - DEVICE_PACKAGES := kmod-b43 kmod-b43legacy $(USB1_PACKAGES) + DEVICE_PACKAGES := kmod-b43 $(USB1_PACKAGES) $(Device/asus) PRODUCTID := "WLHDD " endef @@ -145,7 +145,7 @@ TARGET_DEVICES += linksys_wrt54g3gv2-vf define Device/linksys_wrt54g DEVICE_MODEL := WRT54G - DEVICE_PACKAGES := kmod-b43 kmod-b43legacy + DEVICE_PACKAGES := kmod-b43 $(Device/linksys) DEVICE_ID := W54G VERSION := 4.71.1 @@ -218,7 +218,7 @@ TARGET_DEVICES += linksys_wrt300n-v1 define Device/motorola_wa840g DEVICE_MODEL := WA840G - DEVICE_PACKAGES := kmod-b43 kmod-b43legacy + DEVICE_PACKAGES := kmod-b43 $(Device/motorola) MOTOROLA_DEVICE := 2 endef @@ -226,7 +226,7 @@ TARGET_DEVICES += motorola_wa840g define Device/motorola_we800g DEVICE_MODEL := WE800G - DEVICE_PACKAGES := kmod-b43 kmod-b43legacy + DEVICE_PACKAGES := kmod-b43 $(Device/motorola) MOTOROLA_DEVICE := 3 endef @@ -234,7 +234,7 @@ TARGET_DEVICES += motorola_we800g define Device/motorola_wr850g DEVICE_MODEL := WR850G - DEVICE_PACKAGES := kmod-b43 kmod-b43legacy + DEVICE_PACKAGES := kmod-b43 $(Device/motorola) MOTOROLA_DEVICE := 1 endef diff --git a/target/linux/bcm47xx/legacy/profiles/100-Broadcom-b43.mk b/target/linux/bcm47xx/legacy/profiles/100-Broadcom-b43.mk index c54f11bb89..691513728c 100644 --- a/target/linux/bcm47xx/legacy/profiles/100-Broadcom-b43.mk +++ b/target/linux/bcm47xx/legacy/profiles/100-Broadcom-b43.mk @@ -4,13 +4,13 @@ define Profile/Broadcom-b43 NAME:=Broadcom SoC, all Ethernet, BCM43xx WiFi (b43, default) - PACKAGES:=kmod-b43 kmod-b43legacy + PACKAGES:=kmod-b43 endef define Profile/Broadcom-b43/Description Package set compatible with hardware any Broadcom BCM47xx or BCM535x SoC with Broadcom BCM43xx Wifi cards using the mac80211, b43 and - b43legacy drivers and b44, tg3 or bgmac Ethernet driver. + b44, tg3 or bgmac Ethernet driver. endef $(eval $(call Profile,Broadcom-b43)) diff --git a/tools/Makefile b/tools/Makefile index 1a65afdfca..5ba15c641b 100644 --- a/tools/Makefile +++ b/tools/Makefile @@ -17,7 +17,7 @@ ifeq ($(CONFIG_EXTERNAL_TOOLCHAIN),) BUILD_ISL = y endif endif -ifneq ($(CONFIG_SDK)$(CONFIG_PACKAGE_kmod-b43)$(CONFIG_PACKAGE_b43legacy-firmware)$(CONFIG_BRCMSMAC_USE_FW_FROM_WL),) +ifneq ($(CONFIG_SDK)$(CONFIG_PACKAGE_kmod-b43)$(CONFIG_BRCMSMAC_USE_FW_FROM_WL),) BUILD_B43_TOOLS = y endif From ce1346a8fc0ce9640a4ecbc37bc1686a25c1165d Mon Sep 17 00:00:00 2001 From: Prasun Maiti Date: Wed, 12 Oct 2022 14:02:43 +0530 Subject: [PATCH 19/62] build: fix for sourcing target image config a when target is being replaced Sourcing of image/Config.in will not happen When a target is installed from target/linux/feeds/ Signed-off-by: Prasun Maiti --- config/Config-images.in | 1 + 1 file changed, 1 insertion(+) diff --git a/config/Config-images.in b/config/Config-images.in index dcd7575c3e..832e672172 100644 --- a/config/Config-images.in +++ b/config/Config-images.in @@ -286,6 +286,7 @@ menu "Target Images" comment "Image Options" source "target/linux/*/image/Config.in" + source "target/linux/feeds/*/image/Config.in" config TARGET_KERNEL_PARTSIZE int "Kernel partition size (in MiB)" From 901366ad66ff904f2aa02fba1e1411580aedebc1 Mon Sep 17 00:00:00 2001 From: Christian Marangi Date: Wed, 9 Nov 2022 22:28:53 +0100 Subject: [PATCH 20/62] Revert "build: fix for sourcing target image config a when target is being replaced" This reverts commit ce1346a8fc0ce9640a4ecbc37bc1686a25c1165d. Seems to cause buildbot compilation to fail and require more testing. Signed-off-by: Christian Marangi --- config/Config-images.in | 1 - 1 file changed, 1 deletion(-) diff --git a/config/Config-images.in b/config/Config-images.in index 832e672172..dcd7575c3e 100644 --- a/config/Config-images.in +++ b/config/Config-images.in @@ -286,7 +286,6 @@ menu "Target Images" comment "Image Options" source "target/linux/*/image/Config.in" - source "target/linux/feeds/*/image/Config.in" config TARGET_KERNEL_PARTSIZE int "Kernel partition size (in MiB)" From 520c90854ca73eb6c3d8feeda59766c90bdd4144 Mon Sep 17 00:00:00 2001 From: Shiji Yang Date: Sat, 8 Oct 2022 16:06:00 +0800 Subject: [PATCH 21/62] ath79: move reference clock node to SoC dtsi AR7161, AR724x, AR9132 and QCA95xx only support fixed frequency external crystal oscillator, so move reference clock node to SoC dtsi files. Signed-off-by: Shiji Yang --- target/linux/ath79/dts/ar7100.dtsi | 9 ++++++++- target/linux/ath79/dts/ar7161_aruba_ap-105.dts | 7 ------- .../linux/ath79/dts/ar7161_buffalo_wzr-hp-ag300h.dtsi | 11 ----------- target/linux/ath79/dts/ar7161_dlink_dir-825-b1.dts | 11 ----------- target/linux/ath79/dts/ar7161_jjplus_ja76pf2.dts | 7 ------- target/linux/ath79/dts/ar7161_meraki_mr16.dts | 11 ----------- target/linux/ath79/dts/ar7161_netgear_wndap360.dts | 7 ------- target/linux/ath79/dts/ar7161_netgear_wndr.dtsi | 7 ------- target/linux/ath79/dts/ar7161_siemens_ws-ap3610.dts | 7 ------- target/linux/ath79/dts/ar7161_trendnet_tew-673gru.dts | 11 ----------- target/linux/ath79/dts/ar7161_ubnt_routerstation.dtsi | 7 ------- target/linux/ath79/dts/ar7241_ubnt_unifi.dtsi | 10 ---------- target/linux/ath79/dts/ar7242_buffalo_wzr-bhr.dtsi | 10 ---------- .../ath79/dts/ar7242_buffalo_wzr-hp-g302h-a1a0.dts | 10 ---------- target/linux/ath79/dts/ar7242_meraki_mr12.dts | 11 ----------- target/linux/ath79/dts/ar7242_tplink_tl-wr2543-v1.dts | 10 ---------- target/linux/ath79/dts/ar724x.dtsi | 9 ++++++++- target/linux/ath79/dts/ar9132.dtsi | 9 ++++++++- .../linux/ath79/dts/ar9132_buffalo_wzr-hp-g300nh.dtsi | 10 ---------- .../linux/ath79/dts/ar9132_tplink_tl-wa901nd-v2.dts | 10 ---------- .../linux/ath79/dts/ar9132_tplink_tl-wr1043nd-v1.dts | 10 ---------- target/linux/ath79/dts/qca9558_netgear_ex7300.dtsi | 4 ---- target/linux/ath79/dts/qca9558_ocedo_koala.dts | 4 ---- target/linux/ath79/dts/qca9558_ocedo_ursus.dts | 4 ---- target/linux/ath79/dts/qcn5502_netgear_ex7300-v2.dts | 4 ---- 25 files changed, 24 insertions(+), 186 deletions(-) diff --git a/target/linux/ath79/dts/ar7100.dtsi b/target/linux/ath79/dts/ar7100.dtsi index 12ab7e5039..d91ef91ebd 100644 --- a/target/linux/ath79/dts/ar7100.dtsi +++ b/target/linux/ath79/dts/ar7100.dtsi @@ -21,6 +21,13 @@ }; }; + extosc: ref { + compatible = "fixed-clock"; + #clock-cells = <0>; + clock-output-names = "ref"; + clock-frequency = <40000000>; + }; + ahb { apb { ddr_ctrl: memory-controller@18000000 { @@ -73,8 +80,8 @@ compatible = "qca,ar7100-pll", "syscon"; reg = <0x18050000 0x20>; + clocks = <&extosc>; clock-names = "ref"; - /* The board must provides the ref clock */ #clock-cells = <1>; clock-output-names = "cpu", "ddr", "ahb"; diff --git a/target/linux/ath79/dts/ar7161_aruba_ap-105.dts b/target/linux/ath79/dts/ar7161_aruba_ap-105.dts index da68ada2c0..949d70ec07 100644 --- a/target/linux/ath79/dts/ar7161_aruba_ap-105.dts +++ b/target/linux/ath79/dts/ar7161_aruba_ap-105.dts @@ -21,13 +21,6 @@ label-mac-device = ð0; }; - extosc: ref { - compatible = "fixed-clock"; - #clock-cells = <0>; - clock-output-names = "ref"; - clock-frequency = <40000000>; - }; - leds { compatible = "gpio-leds"; diff --git a/target/linux/ath79/dts/ar7161_buffalo_wzr-hp-ag300h.dtsi b/target/linux/ath79/dts/ar7161_buffalo_wzr-hp-ag300h.dtsi index 35e083bc61..4fe8d51a00 100644 --- a/target/linux/ath79/dts/ar7161_buffalo_wzr-hp-ag300h.dtsi +++ b/target/linux/ath79/dts/ar7161_buffalo_wzr-hp-ag300h.dtsi @@ -12,13 +12,6 @@ led-upgrade = &led_diag; }; - extosc: ref { - compatible = "fixed-clock"; - #clock-cells = <0>; - clock-output-names = "ref"; - clock-frequency = <40000000>; - }; - leds { compatible = "gpio-leds"; @@ -218,10 +211,6 @@ }; }; -&pll { - clocks = <&extosc>; -}; - &spi { status = "okay"; diff --git a/target/linux/ath79/dts/ar7161_dlink_dir-825-b1.dts b/target/linux/ath79/dts/ar7161_dlink_dir-825-b1.dts index b701f15421..fb5ab1adcb 100644 --- a/target/linux/ath79/dts/ar7161_dlink_dir-825-b1.dts +++ b/target/linux/ath79/dts/ar7161_dlink_dir-825-b1.dts @@ -16,13 +16,6 @@ led-upgrade = &led_power_orange; }; - extosc: ref { - compatible = "fixed-clock"; - #clock-cells = <0>; - clock-output-names = "ref"; - clock-frequency = <40000000>; - }; - leds { compatible = "gpio-leds"; @@ -174,10 +167,6 @@ }; }; -&pll { - clocks = <&extosc>; -}; - &spi { status = "okay"; diff --git a/target/linux/ath79/dts/ar7161_jjplus_ja76pf2.dts b/target/linux/ath79/dts/ar7161_jjplus_ja76pf2.dts index dca226d262..7f2a118b84 100644 --- a/target/linux/ath79/dts/ar7161_jjplus_ja76pf2.dts +++ b/target/linux/ath79/dts/ar7161_jjplus_ja76pf2.dts @@ -26,13 +26,6 @@ led-upgrade = &led_d2; }; - extosc: ref { - compatible = "fixed-clock"; - #clock-cells = <0>; - clock-output-names = "ref"; - clock-frequency = <40000000>; - }; - i2c { compatible = "i2c-gpio"; sda-gpios = <&gpio 1 GPIO_ACTIVE_HIGH>; diff --git a/target/linux/ath79/dts/ar7161_meraki_mr16.dts b/target/linux/ath79/dts/ar7161_meraki_mr16.dts index eb27e16e56..7a19da82e3 100644 --- a/target/linux/ath79/dts/ar7161_meraki_mr16.dts +++ b/target/linux/ath79/dts/ar7161_meraki_mr16.dts @@ -16,13 +16,6 @@ led-upgrade = &led_power_orange; }; - extosc: ref { - compatible = "fixed-clock"; - #clock-cells = <0>; - clock-output-names = "ref"; - clock-frequency = <40000000>; - }; - leds { compatible = "gpio-leds"; @@ -100,10 +93,6 @@ }; }; -&pll { - clocks = <&extosc>; -}; - &mdio0 { status = "okay"; diff --git a/target/linux/ath79/dts/ar7161_netgear_wndap360.dts b/target/linux/ath79/dts/ar7161_netgear_wndap360.dts index 37a475d3ac..35c5dd36d2 100644 --- a/target/linux/ath79/dts/ar7161_netgear_wndap360.dts +++ b/target/linux/ath79/dts/ar7161_netgear_wndap360.dts @@ -16,13 +16,6 @@ led-upgrade = &led_power_orange; }; - extosc: ref { - compatible = "fixed-clock"; - #clock-cells = <0>; - clock-output-names = "ref"; - clock-frequency = <40000000>; - }; - leds { compatible = "gpio-leds"; diff --git a/target/linux/ath79/dts/ar7161_netgear_wndr.dtsi b/target/linux/ath79/dts/ar7161_netgear_wndr.dtsi index c66348e71e..d3d22b5d2d 100644 --- a/target/linux/ath79/dts/ar7161_netgear_wndr.dtsi +++ b/target/linux/ath79/dts/ar7161_netgear_wndr.dtsi @@ -14,13 +14,6 @@ led-upgrade = &led_power_orange; }; - extosc: ref { - compatible = "fixed-clock"; - #clock-cells = <0>; - clock-output-names = "ref"; - clock-frequency = <40000000>; - }; - reset-leds { compatible = "reset-leds"; diff --git a/target/linux/ath79/dts/ar7161_siemens_ws-ap3610.dts b/target/linux/ath79/dts/ar7161_siemens_ws-ap3610.dts index 2cdcce0d15..56a2cfab67 100644 --- a/target/linux/ath79/dts/ar7161_siemens_ws-ap3610.dts +++ b/target/linux/ath79/dts/ar7161_siemens_ws-ap3610.dts @@ -17,13 +17,6 @@ label-mac-device = ð0; }; - extosc: ref { - compatible = "fixed-clock"; - #clock-cells = <0>; - clock-output-names = "ref"; - clock-frequency = <40000000>; - }; - leds { compatible = "gpio-leds"; diff --git a/target/linux/ath79/dts/ar7161_trendnet_tew-673gru.dts b/target/linux/ath79/dts/ar7161_trendnet_tew-673gru.dts index 8657e291bd..b6d66a08a5 100644 --- a/target/linux/ath79/dts/ar7161_trendnet_tew-673gru.dts +++ b/target/linux/ath79/dts/ar7161_trendnet_tew-673gru.dts @@ -16,13 +16,6 @@ led-upgrade = &led_wps; }; - extosc: ref { - compatible = "fixed-clock"; - #clock-cells = <0>; - clock-output-names = "ref"; - clock-frequency = <40000000>; - }; - leds { compatible = "gpio-leds"; @@ -112,10 +105,6 @@ }; }; -&pll { - clocks = <&extosc>; -}; - &spi { status = "okay"; diff --git a/target/linux/ath79/dts/ar7161_ubnt_routerstation.dtsi b/target/linux/ath79/dts/ar7161_ubnt_routerstation.dtsi index 172b0af1eb..b12723beb2 100644 --- a/target/linux/ath79/dts/ar7161_ubnt_routerstation.dtsi +++ b/target/linux/ath79/dts/ar7161_ubnt_routerstation.dtsi @@ -14,13 +14,6 @@ led-upgrade = &led_rf; }; - extosc: ref { - compatible = "fixed-clock"; - #clock-cells = <0>; - clock-output-names = "ref"; - clock-frequency = <40000000>; - }; - leds { compatible = "gpio-leds"; diff --git a/target/linux/ath79/dts/ar7241_ubnt_unifi.dtsi b/target/linux/ath79/dts/ar7241_ubnt_unifi.dtsi index d05ed080a8..ec8c6381e7 100644 --- a/target/linux/ath79/dts/ar7241_ubnt_unifi.dtsi +++ b/target/linux/ath79/dts/ar7241_ubnt_unifi.dtsi @@ -10,12 +10,6 @@ label-mac-device = ð0; }; - extosc: ref { - compatible = "fixed-clock"; - #clock-cells = <0>; - clock-frequency = <40000000>; - }; - keys { compatible = "gpio-keys"; @@ -27,10 +21,6 @@ }; }; -&pll { - clocks = <&extosc>; -}; - &pcie { status = "okay"; diff --git a/target/linux/ath79/dts/ar7242_buffalo_wzr-bhr.dtsi b/target/linux/ath79/dts/ar7242_buffalo_wzr-bhr.dtsi index 18e524f802..e9d1eafe24 100644 --- a/target/linux/ath79/dts/ar7242_buffalo_wzr-bhr.dtsi +++ b/target/linux/ath79/dts/ar7242_buffalo_wzr-bhr.dtsi @@ -12,12 +12,6 @@ led-upgrade = &led_diag; }; - extosc: ref { - compatible = "fixed-clock"; - #clock-cells = <0>; - clock-frequency = <40000000>; - }; - keys: keys { compatible = "gpio-keys"; @@ -136,10 +130,6 @@ phy-handle = <&phy0>; }; -&pll { - clocks = <&extosc>; -}; - &usb_phy { status = "okay"; }; diff --git a/target/linux/ath79/dts/ar7242_buffalo_wzr-hp-g302h-a1a0.dts b/target/linux/ath79/dts/ar7242_buffalo_wzr-hp-g302h-a1a0.dts index f454725f6a..b8aa2aa210 100644 --- a/target/linux/ath79/dts/ar7242_buffalo_wzr-hp-g302h-a1a0.dts +++ b/target/linux/ath79/dts/ar7242_buffalo_wzr-hp-g302h-a1a0.dts @@ -15,12 +15,6 @@ led-upgrade = &led_diag; }; - extosc: ref { - compatible = "fixed-clock"; - #clock-cells = <0>; - clock-frequency = <40000000>; - }; - keys { compatible = "gpio-keys"; @@ -211,10 +205,6 @@ }; }; -&pll { - clocks = <&extosc>; -}; - &usb_phy { status = "okay"; }; diff --git a/target/linux/ath79/dts/ar7242_meraki_mr12.dts b/target/linux/ath79/dts/ar7242_meraki_mr12.dts index 5e82b5bb6b..42b4966e74 100644 --- a/target/linux/ath79/dts/ar7242_meraki_mr12.dts +++ b/target/linux/ath79/dts/ar7242_meraki_mr12.dts @@ -16,13 +16,6 @@ led-upgrade = &led_power_orange; }; - extosc: ref { - compatible = "fixed-clock"; - #clock-cells = <0>; - clock-output-names = "ref"; - clock-frequency = <40000000>; - }; - leds { compatible = "gpio-leds"; @@ -87,10 +80,6 @@ }; }; -&pll { - clocks = <&extosc>; -}; - &mdio0 { status = "okay"; diff --git a/target/linux/ath79/dts/ar7242_tplink_tl-wr2543-v1.dts b/target/linux/ath79/dts/ar7242_tplink_tl-wr2543-v1.dts index ae4867521a..b524ea1996 100644 --- a/target/linux/ath79/dts/ar7242_tplink_tl-wr2543-v1.dts +++ b/target/linux/ath79/dts/ar7242_tplink_tl-wr2543-v1.dts @@ -21,12 +21,6 @@ bootargs = "console=ttyS0,115200n8"; }; - extosc: ref { - compatible = "fixed-clock"; - #clock-cells = <0>; - clock-frequency = <40000000>; - }; - keys { compatible = "gpio-keys"; @@ -95,10 +89,6 @@ }; }; -&pll { - clocks = <&extosc>; -}; - &spi { status = "okay"; diff --git a/target/linux/ath79/dts/ar724x.dtsi b/target/linux/ath79/dts/ar724x.dtsi index 882b0bc51a..c090eb5e0f 100644 --- a/target/linux/ath79/dts/ar724x.dtsi +++ b/target/linux/ath79/dts/ar724x.dtsi @@ -24,6 +24,13 @@ }; }; + extosc: ref { + compatible = "fixed-clock"; + #clock-cells = <0>; + clock-output-names = "ref"; + clock-frequency = <40000000>; + }; + ahb: ahb { apb { ddr_ctrl: memory-controller@18000000 { @@ -89,8 +96,8 @@ compatible = "qca,ar7240-pll", "syscon"; reg = <0x18050000 0x3c>; + clocks = <&extosc>; clock-names = "ref"; - /* The board must provides the ref clock */ #clock-cells = <1>; clock-output-names = "cpu", "ddr", "ahb"; diff --git a/target/linux/ath79/dts/ar9132.dtsi b/target/linux/ath79/dts/ar9132.dtsi index 44a5870ad7..29891ccebb 100644 --- a/target/linux/ath79/dts/ar9132.dtsi +++ b/target/linux/ath79/dts/ar9132.dtsi @@ -24,6 +24,13 @@ }; }; + extosc: ref { + compatible = "fixed-clock"; + #clock-cells = <0>; + clock-output-names = "ref"; + clock-frequency = <40000000>; + }; + cpuintc: interrupt-controller { compatible = "qca,ar9132-cpu-intc", "qca,ar7100-cpu-intc"; @@ -94,8 +101,8 @@ "qca,ar9130-pll", "syscon"; reg = <0x18050000 0x20>; + clocks = <&extosc>; clock-names = "ref"; - /* The board must provides the ref clock */ #clock-cells = <1>; clock-output-names = "cpu", "ddr", "ahb"; diff --git a/target/linux/ath79/dts/ar9132_buffalo_wzr-hp-g300nh.dtsi b/target/linux/ath79/dts/ar9132_buffalo_wzr-hp-g300nh.dtsi index a84e794c0b..f3b13b5d0c 100644 --- a/target/linux/ath79/dts/ar9132_buffalo_wzr-hp-g300nh.dtsi +++ b/target/linux/ath79/dts/ar9132_buffalo_wzr-hp-g300nh.dtsi @@ -11,12 +11,6 @@ led-upgrade = &led_diag; }; - clock40mhz: ref { - compatible = "fixed-clock"; - #clock-cells = <0>; - clock-frequency = <40000000>; - }; - /* There is a GPIO driven NXP 74HC153 dual 4-way multiplexer on board * used for buttons that are on top of the the device. */ @@ -250,10 +244,6 @@ status = "okay"; }; -&pll { - clocks = <&clock40mhz>; -}; - &usb { status = "okay"; diff --git a/target/linux/ath79/dts/ar9132_tplink_tl-wa901nd-v2.dts b/target/linux/ath79/dts/ar9132_tplink_tl-wa901nd-v2.dts index 354213c440..fd4a6c7a4d 100644 --- a/target/linux/ath79/dts/ar9132_tplink_tl-wa901nd-v2.dts +++ b/target/linux/ath79/dts/ar9132_tplink_tl-wa901nd-v2.dts @@ -17,12 +17,6 @@ label-mac-device = ð0; }; - extosc: ref { - compatible = "fixed-clock"; - #clock-cells = <0>; - clock-frequency = <40000000>; - }; - keys { compatible = "gpio-keys"; @@ -62,10 +56,6 @@ }; }; -&pll { - clocks = <&extosc>; -}; - &spi { status = "okay"; diff --git a/target/linux/ath79/dts/ar9132_tplink_tl-wr1043nd-v1.dts b/target/linux/ath79/dts/ar9132_tplink_tl-wr1043nd-v1.dts index 12e417d3a4..7ff2e4f29b 100644 --- a/target/linux/ath79/dts/ar9132_tplink_tl-wr1043nd-v1.dts +++ b/target/linux/ath79/dts/ar9132_tplink_tl-wr1043nd-v1.dts @@ -17,12 +17,6 @@ label-mac-device = ð0; }; - extosc: ref { - compatible = "fixed-clock"; - #clock-cells = <0>; - clock-frequency = <40000000>; - }; - keys { compatible = "gpio-keys"; @@ -79,10 +73,6 @@ }; }; -&pll { - clocks = <&extosc>; -}; - &usb { #address-cells = <1>; #size-cells = <0>; diff --git a/target/linux/ath79/dts/qca9558_netgear_ex7300.dtsi b/target/linux/ath79/dts/qca9558_netgear_ex7300.dtsi index 6c5ed4defb..c266c52dad 100644 --- a/target/linux/ath79/dts/qca9558_netgear_ex7300.dtsi +++ b/target/linux/ath79/dts/qca9558_netgear_ex7300.dtsi @@ -120,10 +120,6 @@ status = "okay"; }; -&pll { - clocks = <&extosc>; -}; - &spi { status = "okay"; diff --git a/target/linux/ath79/dts/qca9558_ocedo_koala.dts b/target/linux/ath79/dts/qca9558_ocedo_koala.dts index 66f8c6589b..8441e5c9a3 100644 --- a/target/linux/ath79/dts/qca9558_ocedo_koala.dts +++ b/target/linux/ath79/dts/qca9558_ocedo_koala.dts @@ -59,10 +59,6 @@ status = "okay"; }; -&pll { - clocks = <&extosc>; -}; - &spi { status = "okay"; diff --git a/target/linux/ath79/dts/qca9558_ocedo_ursus.dts b/target/linux/ath79/dts/qca9558_ocedo_ursus.dts index 2dc4c07e91..e99059df04 100644 --- a/target/linux/ath79/dts/qca9558_ocedo_ursus.dts +++ b/target/linux/ath79/dts/qca9558_ocedo_ursus.dts @@ -30,10 +30,6 @@ status = "okay"; }; -&pll { - clocks = <&extosc>; -}; - &spi { status = "okay"; diff --git a/target/linux/ath79/dts/qcn5502_netgear_ex7300-v2.dts b/target/linux/ath79/dts/qcn5502_netgear_ex7300-v2.dts index e5d897029d..4ebbdcc105 100644 --- a/target/linux/ath79/dts/qcn5502_netgear_ex7300-v2.dts +++ b/target/linux/ath79/dts/qcn5502_netgear_ex7300-v2.dts @@ -124,10 +124,6 @@ }; }; -&pll { - clocks = <&extosc>; -}; - &spi { status = "okay"; From 8d4c22a9561dc43e81cfa15fcfdec86c052792cd Mon Sep 17 00:00:00 2001 From: Shiji Yang Date: Thu, 27 Oct 2022 13:17:12 +0800 Subject: [PATCH 22/62] ath79: add missing clock name strings in SoC dtsi For all SoC in the ath79 target, the PLL controller provides 3 main clocks "cpu", "ddr" and "ahb" through the input clock "ref". Signed-off-by: Shiji Yang --- target/linux/ath79/dts/ar9330.dtsi | 10 ++++++++++ target/linux/ath79/dts/ar9331.dtsi | 5 ----- target/linux/ath79/dts/qca953x.dtsi | 2 ++ target/linux/ath79/dts/qca955x.dtsi | 1 + target/linux/ath79/dts/qca956x.dtsi | 1 + 5 files changed, 14 insertions(+), 5 deletions(-) diff --git a/target/linux/ath79/dts/ar9330.dtsi b/target/linux/ath79/dts/ar9330.dtsi index aed8e205ad..9df80e1d5e 100644 --- a/target/linux/ath79/dts/ar9330.dtsi +++ b/target/linux/ath79/dts/ar9330.dtsi @@ -28,6 +28,12 @@ bootargs = "console=ttyATH0,115200"; }; + ref: ref { + compatible = "fixed-clock"; + #clock-cells = <0>; + clock-output-names = "ref"; + }; + ahb { apb { ddr_ctrl: memory-controller@18000000 { @@ -83,7 +89,11 @@ compatible = "qca,ar9330-pll"; reg = <0x18050000 0x100>; + clocks = <&ref>; + clock-names = "ref"; + #clock-cells = <1>; + clock-output-names = "cpu", "ddr", "ahb"; }; wdt: wdt@18060008 { diff --git a/target/linux/ath79/dts/ar9331.dtsi b/target/linux/ath79/dts/ar9331.dtsi index 2141f33863..d363130278 100644 --- a/target/linux/ath79/dts/ar9331.dtsi +++ b/target/linux/ath79/dts/ar9331.dtsi @@ -4,9 +4,4 @@ / { compatible = "qca,ar9331"; - - ref: ref { - compatible = "fixed-clock"; - #clock-cells = <0>; - }; }; diff --git a/target/linux/ath79/dts/qca953x.dtsi b/target/linux/ath79/dts/qca953x.dtsi index 745c736b74..c155e3419f 100644 --- a/target/linux/ath79/dts/qca953x.dtsi +++ b/target/linux/ath79/dts/qca953x.dtsi @@ -104,7 +104,9 @@ #clock-cells = <1>; clock-output-names = "cpu", "ddr", "ahb"; + clocks = <&extosc>; + clock-names = "ref"; }; wdt: wdt@18060008 { diff --git a/target/linux/ath79/dts/qca955x.dtsi b/target/linux/ath79/dts/qca955x.dtsi index b6e08f9f12..0541c4e373 100644 --- a/target/linux/ath79/dts/qca955x.dtsi +++ b/target/linux/ath79/dts/qca955x.dtsi @@ -119,6 +119,7 @@ clock-output-names = "cpu", "ddr", "ahb"; clocks = <&extosc>; + clock-names = "ref"; }; wdt: wdt@18060008 { diff --git a/target/linux/ath79/dts/qca956x.dtsi b/target/linux/ath79/dts/qca956x.dtsi index f2452e9dc7..0ebd5ff5be 100644 --- a/target/linux/ath79/dts/qca956x.dtsi +++ b/target/linux/ath79/dts/qca956x.dtsi @@ -95,6 +95,7 @@ clock-output-names = "cpu", "ddr", "ahb"; clocks = <&extosc>; + clock-names = "ref"; }; wdt: wdt@18060008 { From 79107116d115c4d96c5cd0446c11b3751e597fce Mon Sep 17 00:00:00 2001 From: Edward Chow Date: Sat, 5 Nov 2022 14:29:03 +0800 Subject: [PATCH 23/62] ath79: calibrate TL-WDR4900 v2 with nvmem-cells Driver for both soc (2.4GHz Wifi) and pci (5 GHz) now pull the calibration data from the nvmem subsystem. This allows us to move the userspace caldata extraction for the pci-e ath9k supported wifi into the device-tree definition of the device. wmac's nodes are also changed over to use nvmem-cells over OpenWrt's custom mtd-cal-data property. Signed-off-by: Edward Chow --- .../dts/qca9558_tplink_tl-wdr4900-v2.dts | 40 +++++++++++-------- .../etc/hotplug.d/firmware/10-ath9k-eeprom | 1 - 2 files changed, 24 insertions(+), 17 deletions(-) diff --git a/target/linux/ath79/dts/qca9558_tplink_tl-wdr4900-v2.dts b/target/linux/ath79/dts/qca9558_tplink_tl-wdr4900-v2.dts index 5b69a1708e..49c0e39492 100644 --- a/target/linux/ath79/dts/qca9558_tplink_tl-wdr4900-v2.dts +++ b/target/linux/ath79/dts/qca9558_tplink_tl-wdr4900-v2.dts @@ -96,10 +96,9 @@ ath9k: wifi@0,0 { compatible = "pci168c,0033"; reg = <0x0000 0 0 0 0>; - nvmem-cells = <&macaddr_uboot_1fc00>; - nvmem-cell-names = "mac-address"; + nvmem-cells = <&macaddr_uboot_1fc00>, <&cal_ath9k_pci>; + nvmem-cell-names = "mac-address", "calibration"; mac-address-increment = <(-2)>; - qca,no-eeprom; #gpio-cells = <2>; gpio-controller; }; @@ -152,6 +151,14 @@ label = "u-boot"; reg = <0x000000 0x020000>; read-only; + + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_uboot_1fc00: macaddr@1fc00 { + reg = <0x1fc00 0x6>; + }; }; partition@20000 { @@ -164,6 +171,18 @@ label = "art"; reg = <0x7f0000 0x010000>; read-only; + + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + cal_ath9k_soc: cal_ath9k@1000 { + reg = <0x1000 0x440>; + }; + + cal_ath9k_pci: cal_ath9k@5000 { + reg = <0x5000 0x440>; + }; }; }; }; @@ -219,18 +238,7 @@ &wmac { status = "okay"; - mtd-cal-data = <&art 0x1000>; - nvmem-cells = <&macaddr_uboot_1fc00>; - nvmem-cell-names = "mac-address"; + nvmem-cells = <&macaddr_uboot_1fc00>, <&cal_ath9k_soc>; + nvmem-cell-names = "mac-address", "calibration"; mac-address-increment = <(-1)>; }; - -&uboot { - compatible = "nvmem-cells"; - #address-cells = <1>; - #size-cells = <1>; - - macaddr_uboot_1fc00: macaddr@1fc00 { - reg = <0x1fc00 0x6>; - }; -}; diff --git a/target/linux/ath79/generic/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom b/target/linux/ath79/generic/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom index 6dd237e1fa..924d6407af 100644 --- a/target/linux/ath79/generic/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom +++ b/target/linux/ath79/generic/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom @@ -94,7 +94,6 @@ case "$FIRMWARE" in tplink,tl-wdr4300-v1|\ tplink,tl-wdr4300-v1-il|\ tplink,tl-wdr4310-v1|\ - tplink,tl-wdr4900-v2|\ ubnt,unifi-ap-pro|\ watchguard,ap100|\ watchguard,ap200|\ From 9945d05171dd5f71c1d288ed63fa4112024d0a85 Mon Sep 17 00:00:00 2001 From: Weiping Yang Date: Mon, 19 Sep 2022 05:47:40 -0400 Subject: [PATCH 24/62] ipq40xx: add support for GL.iNet GL-A1300 Specifications: SOC: Qualcomm IPQ4018 (DAKOTA) ARM Quad-Core RAM: 256 MiB FLASH1: 4 MiB NOR FLASH2: 128 MiB NAND ETH: Qualcomm QCA8075 WLAN1: Qualcomm Atheros QCA4018 2.4GHz 802.11b/g/n 2x2 WLAN2: Qualcomm Atheros QCA4018 5G 802.11n/ac W2 2x2 USB: 1 x USB 3.0 port Button: 1 x Reset button Switch: 1 x Mode switch LED: 1 x Blue LED + 1 x White LED Install via uboot tftp or uboot web failsafe. By uboot tftp: (IPQ40xx) # tftpboot 0x84000000 openwrt-ipq40xx-generic-glinet_gl-a1300-squashfs-nand-factory.ubi (IPQ40xx) # nand erase 0 0x8000000 (IPQ40xx) # nand write 0x84000000 0 $filesize By uboot web failsafe: Push the reset button for 10 seconds util the power led flash faster, then use broswer to access http://192.168.1.1 Afterwards upgrade can use sysupgrade image. Signed-off-by: Weiping Yang --- package/boot/uboot-envtools/files/ipq40xx | 1 + package/firmware/ipq-wifi/Makefile | 2 + .../ipq-wifi/board-glinet_gl-a1300.qca4019 | Bin 0 -> 24308 bytes .../ipq40xx/base-files/etc/board.d/02_network | 1 + .../base-files/lib/upgrade/platform.sh | 1 + .../arm/boot/dts/qcom-ipq4018-gl-a1300.dts | 326 ++++++++++++++++++ target/linux/ipq40xx/image/generic.mk | 14 + 7 files changed, 345 insertions(+) create mode 100644 package/firmware/ipq-wifi/board-glinet_gl-a1300.qca4019 create mode 100644 target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-gl-a1300.dts diff --git a/package/boot/uboot-envtools/files/ipq40xx b/package/boot/uboot-envtools/files/ipq40xx index 823a33ca1b..4ee83bb057 100644 --- a/package/boot/uboot-envtools/files/ipq40xx +++ b/package/boot/uboot-envtools/files/ipq40xx @@ -34,6 +34,7 @@ case "$board" in alfa-network,ap120c-ac|\ devolo,magic-2-wifi-next|\ edgecore,ecw5211|\ +glinet,gl-a1300 |\ glinet,gl-ap1300|\ glinet,gl-b1300|\ glinet,gl-b2200|\ diff --git a/package/firmware/ipq-wifi/Makefile b/package/firmware/ipq-wifi/Makefile index da82e16dde..2096b5f2d6 100644 --- a/package/firmware/ipq-wifi/Makefile +++ b/package/firmware/ipq-wifi/Makefile @@ -30,6 +30,7 @@ ALLWIFIBOARDS:= \ edgecore_ecw5410 \ edgecore_oap100 \ extreme-networks_ws-ap3915i \ + glinet_gl-a1300 \ glinet_gl-ap1300 \ glinet_gl-s1300 \ linksys_ea8300 \ @@ -105,6 +106,7 @@ $(eval $(call generate-ipq-wifi-package,devolo_magic-2-wifi-next,devolo Magic 2 $(eval $(call generate-ipq-wifi-package,edgecore_ecw5410,Edgecore ECW5410)) $(eval $(call generate-ipq-wifi-package,edgecore_oap100,Edgecore OAP100)) $(eval $(call generate-ipq-wifi-package,extreme-networks_ws-ap3915i,Edgecore OAP100)) +$(eval $(call generate-ipq-wifi-package,glinet_gl-a1300,GL.iNet GL-A1300)) $(eval $(call generate-ipq-wifi-package,glinet_gl-ap1300,GL.iNet GL-AP1300)) $(eval $(call generate-ipq-wifi-package,glinet_gl-s1300,GL.iNet GL-S1300)) $(eval $(call generate-ipq-wifi-package,linksys_ea8300,Linksys EA8300)) diff --git a/package/firmware/ipq-wifi/board-glinet_gl-a1300.qca4019 b/package/firmware/ipq-wifi/board-glinet_gl-a1300.qca4019 new file mode 100644 index 0000000000000000000000000000000000000000..d8695c983641b25f4e059f65a0ce8b4f2501338c GIT binary patch literal 24308 zcmeHPdr(tX8b1jj>SE!BfCzXAAv|IsK%g2V@)iT6U{R3(i$E30tx+C^hoKAY_@EFG zfm$#`&@w2GrihG-4~WIu+8Jf{kNsn3|7bh==+3OWwxiu?XLc9&+#4|Rl5NJ>y#T5Ng(kjZ2KN>MPL1F#jQ0(sev{Gx)u z0+}@E%_3=Wko4e=5TaIaEWh+1Ugd`bmgkpB^N$|iu}d5j8yXf8B9qaeFAMg=3KkX7 zXuzh15uSnfxupwcc>t`pcY+E4OaNX9BQ(<)m&?Yx0w63b?E7cWXhP;1@Z(?3MU%+} zb}&!5XYALc8wtFC0*_7ArmVV+t;xD0q1=Du0Gy^?YFR2|AnNfM0RP_0syHiM5HjW9KQq3cs8vDv36q(JDTkSOn69k^luXZTd9`*oXwK^2~b!)J>sqYiO1kcd0bE&=0ZJ4apZk+zBIU#;*c zy7f_cXK;;Iv2)(?LWzo&M8M8|-LEz{BF-)wH+gI(FZc!}evO?=U_bDN2+!zrIt|Zl zY~b7SnklirR+|~(_VDf9e3ZlSfq%YiZ*L#AH=CVdyVmHQgbax)7ZHKX%=AV&wVacCSb?ok|)j3)Dv#W83MB0~8npT~d1N4BHedE3Py zXb2)er-M*mF|AI=Bot0ZMX9sSk0p>eqs~vA5f9XZ=OK1zquh;xdR!;b-g zWu>xf__1+`f8>pS_RV5Z+DgP=2`xpFp~L_LIDf;f1t1joL4J-GWCL*^6^acLUN$j8 z0h{gV$u^Q!*gm_J&CY4z0HJ^ezCQ*)t35)C35Pp9YY`v>LfgDG2%x*r*XO{}$%)u> zG#L}sxH1rUG3dag(+|QO2)MgUw_W=Il*>@a*^NMXnKp4IytsA^e_^il_w(ial1aC7 zr`xO3?aqmJ@6F7~J6NP_YHjQ2>b^EGI6N}?$%8K*TYtb{AJ4iw*JWc3h<#8oqmJAO zCH6qYadqS_D6#)3=GT!spw@$E)??+PyKI)h$_mtyJ>%4j+``5SmwGfewV#{QR~9Pz z*)S)Wh$rgF^As~d!ejy>M#Vg_I01xDh9g2$$Pn;Yi#Unr+wt_P`6Y+>H*d{((lM z)37}KH4Rj9=%8oI{P#7MfCg~ zyW~^ZTnfdvpGLZcH(Q$u&K$u~Q3`NGo zZB2(#j_r|b)7(~Gz)D340zPzTQ5+#1#>V}*VB)UklCm83`Po1l)<6nv2R(EKS709X=W7LX>W3+tp>tTt&jf2s~J($ib3f zn3o}zF#;4G?NC=>@uE$H!vi=6Yh(%D>Qf&@-ppGM`3f{|+_7h>M! zmNNF;?~}Gf*ZLfB%dPI;cPXgOz5JE@zQKwQV;TdhHx?;Xsi#7ZyX@bv^Hy&`^Y$9n zTQ1q3-ct0Xsr=t@m1(ZauSC|f%NYmi+tW^mm%B+EL^t{myf1jyOXiZ>qmgzdoMXw6 zyx#sYweS?X#7Q#TS=tz19Vl~6fB127LtxdWLZ|(`gNM5kn>i<#g>8LDFGbh;RWkFh zwoB`x%|D2&xsrTF%% z`?~~7f4%E?_I{8>(+#OZ90!;n3nm8g@7H&8Yw?skt}hABJl%GRGY@D9kgvZbf>W~e z=Sf9qi~!Duw}pK8%(iO}7K0COJl;ar&GGEX_Fs}~kB?39?e$x8^Ux^1{X9UUT$VNh bmh2gu +#include +#include + +/ { + model = "GL.iNet GL-A1300"; + compatible = "glinet,gl-a1300", "qcom,ipq4019"; + + aliases { + led-boot = &led_run; + led-failsafe = &led_run; + led-running = &led_run; + led-upgrade = &led_run; + label-mac-device = &swport4; + }; + + chosen { + bootargs-append = " ubi.mtd=ubi root=/dev/ubiblock0_1"; + }; + + soc { + tcsr@1949000 { + compatible = "qcom,tcsr"; + reg = <0x1949000 0x100>; + qcom,wifi_glb_cfg = ; + }; + + tcsr@194b000 { + /* select hostmode */ + compatible = "qcom,tcsr"; + reg = <0x194b000 0x100>; + qcom,usb-hsphy-mode-select = ; + status = "okay"; + }; + + ess_tcsr@1953000 { + compatible = "qcom,tcsr"; + reg = <0x1953000 0x1000>; + qcom,ess-interface-select = ; + }; + + tcsr@1957000 { + compatible = "qcom,tcsr"; + reg = <0x1957000 0x100>; + qcom,wifi_noc_memtype_m0_m2 = ; + }; + }; + + keys { + compatible = "gpio-keys"; + + reset { + label = "reset"; + gpios = <&tlmm 63 GPIO_ACTIVE_LOW>; + linux,code = ; + }; + + switch { + label = "switch-button"; + gpios = <&tlmm 0 GPIO_ACTIVE_LOW>; + linux,code = ; + }; + }; + + leds { + compatible = "gpio-leds"; + + led_run: blue { + label = "blue:status"; + gpios = <&tlmm 2 GPIO_ACTIVE_HIGH>; + }; + + white { + label = "white:status"; + gpios = <&tlmm 1 GPIO_ACTIVE_HIGH>; + }; + }; + + gpio_export { + compatible = "gpio-export"; + + usb { + gpio-export,name = "usb_power"; + gpio-export,output = <1>; + gpios = <&tlmm 4 GPIO_ACTIVE_HIGH>; + }; + }; +}; + +&prng { + status = "okay"; +}; + +&mdio { + status = "okay"; +}; + +&blsp_dma { + status = "okay"; +}; + +&watchdog { + status = "okay"; +}; + +&crypto { + status = "okay"; +}; + +&cryptobam { + status = "okay"; +}; + +&blsp1_spi1 { + status = "okay"; + + pinctrl-0 = <&spi0_pins>; + pinctrl-names = "default"; + cs-gpios = <&tlmm 54 GPIO_ACTIVE_HIGH>, <&tlmm 5 GPIO_ACTIVE_HIGH>; + + flash@0 { + compatible = "jedec,spi-nor"; + reg = <0>; + spi-max-frequency = <24000000>; + + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + partition@0 { + label = "SBL1"; + reg = <0x00000000 0x00040000>; + read-only; + }; + + partition@40000 { + label = "MIBIB"; + reg = <0x00040000 0x00020000>; + read-only; + }; + + partition@60000 { + label = "QSEE"; + reg = <0x00060000 0x00060000>; + read-only; + }; + + partition@c0000 { + label = "CDT"; + reg = <0x000c0000 0x00010000>; + read-only; + }; + + partition@d0000 { + label = "DDRPARAMS"; + reg = <0x000d0000 0x00010000>; + read-only; + }; + + partition@e0000 { + label = "APPSBLENV"; /* uboot env*/ + reg = <0x000e0000 0x00010000>; + }; + + partition@f0000 { + label = "APPSBL"; /* uboot */ + reg = <0x000f0000 0x00080000>; + read-only; + }; + + partition@170000 { + label = "ART"; + reg = <0x00170000 0x00010000>; + read-only; + compatible = "nvmem-cells"; + + precal_art_1000: precal@1000 { + reg = <0x1000 0x2f20>; + }; + + precal_art_5000: precal@5000 { + reg = <0x5000 0x2f20>; + }; + + macaddr_gmac0: macaddr@0 { + reg = <0x0 0x6>; + }; + + macaddr_gmac1: macaddr@6 { + reg = <0x6 0x6>; + }; + }; + + partition@180000 { + label = "log"; + reg = <0x00180000 0x00020000>; + }; + }; + }; + + spi-nand@1 { + compatible = "spi-nand"; + reg = <1>; + spi-max-frequency = <24000000>; + + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + partition@0 { + label = "ubi"; + reg = <0x00000000 0x08000000>; + }; + }; + }; +}; + +&blsp1_uart1 { + pinctrl-0 = <&serial_pins>; + pinctrl-names = "default"; + status = "okay"; +}; + +&tlmm { + serial_pins: serial_pinmux { + mux { + pins = "gpio60", "gpio61"; + function = "blsp_uart0"; + bias-disable; + }; + }; + + i2c_0_pins: i2c_0_pinmux { + pinmux { + pins = "gpio58", "gpio59"; + function = "blsp_i2c0"; + bias-disable; + }; + }; + + spi0_pins: spi0_pinmux { + mux_spi { + function = "blsp_spi0"; + pins = "gpio55", "gpio56", "gpio57"; + drive-strength = <12>; + bias-disable; + }; + + mux_cs { + function = "gpio"; + pins = "gpio54", "gpio5"; + drive-strength = <2>; + bias-disable; + output-high; + }; + }; +}; + +&blsp1_i2c3 { + status = "okay"; + pinctrl-0 = <&i2c_0_pins>; + pinctrl-names = "default"; +}; + +&usb2_hs_phy { + status = "okay"; +}; + +&usb3_hs_phy { + status = "okay"; +}; + +&usb3_ss_phy { + status = "okay"; +}; + +&gmac { + status = "okay"; +}; + +&switch { + status = "okay"; +}; + +&swport3 { + status = "okay"; + + label = "lan2"; + nvmem-cell-names = "mac-address"; + nvmem-cells = <&macaddr_gmac0>; + mac-address-increment = <2>; +}; + +&swport4 { + status = "okay"; + + label = "lan1"; + nvmem-cell-names = "mac-address"; + nvmem-cells = <&macaddr_gmac0>; +}; + +&swport5 { + status = "okay"; + + nvmem-cell-names = "mac-address"; + nvmem-cells = <&macaddr_gmac1>; +}; + +&wifi0 { + status = "okay"; + nvmem-cell-names = "pre-calibration"; + nvmem-cells = <&precal_art_1000>; + qcom,ath10k-calibration-variant = "GL-A1300"; +}; + +&wifi1 { + status = "okay"; + nvmem-cell-names = "pre-calibration"; + nvmem-cells = <&precal_art_5000>; + qcom,ath10k-calibration-variant = "GL-A1300"; +}; diff --git a/target/linux/ipq40xx/image/generic.mk b/target/linux/ipq40xx/image/generic.mk index e8e6e29e72..b50d072bec 100644 --- a/target/linux/ipq40xx/image/generic.mk +++ b/target/linux/ipq40xx/image/generic.mk @@ -565,6 +565,20 @@ endef # Missing DSA Setup #TARGET_DEVICES += ezviz_cs-w3-wd1200g-eup +define Device/glinet_gl-a1300 + $(call Device/FitImage) + $(call Device/UbiFit) + DEVICE_VENDOR := GL.iNet + DEVICE_MODEL := GL-A1300 + SOC := qcom-ipq4018 + DEVICE_DTS_CONFIG := config@ap.dk01.1-c2 + BLOCKSIZE := 128k + PAGESIZE := 2048 + IMAGE_SIZE := 131072k + DEVICE_PACKAGE := ipq-wifi-glinet_gl-a1300 +endef +TARGET_DEVICES += glinet_gl-a1300 + define Device/glinet_gl-ap1300 $(call Device/FitImage) $(call Device/UbiFit) From 8cdafa149eda4e343905ccf00cad34ff2b52c85b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= Date: Thu, 10 Nov 2022 09:28:23 +0100 Subject: [PATCH 25/62] bcm53xx: update DTS files with the latest changes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Rafał Miłecki --- ...301X-Update-pin-controller-node-name.patch | 32 + ...M5301X-Fix-DTC-warning-for-NAND-node.patch | 31 + ...-Remove-cell-properties-from-srab-po.patch | 40 + ...-Add-rgmii-to-port-5-of-Broadcom-swi.patch | 29 + ...-Retrieve-gmac1-MAC-address-from-NVR.patch | 43 + ...-Fix-compatible-strings-for-BCM53012.patch | 65 ++ ...-Disable-gmac0-and-enable-port-8-on-.patch | 39 + ...BCM5301X-Add-DT-for-WZR-1166DHP-DHP2.patch | 300 ++++++ ...CM5301X-Fix-DTC-warning-for-NAND-nod.patch | 32 + ...-align-gpio-key-node-names-with-dtsc.patch | 912 ++++++++++++++++++ ...roadcom-correct-gpio-keys-properties.patch | 108 +++ ...-Correct-description-of-TP-Link-part.patch | 99 ++ ...4-Add-devicetree-for-D-Link-DIR-890L.patch | 242 +++++ ...-Add-devicetree-for-D-Link-DWL-8610A.patch | 165 ++++ ...-Specify-switch-ports-for-remaining-.patch | 10 +- ...RM-BCM5301X-Add-DT-for-Netgear-R7900.patch | 2 +- ...M5301X-Fix-DTC-warning-for-NAND-node.patch | 31 + ...-Remove-cell-properties-from-srab-po.patch | 40 + ...-Add-rgmii-to-port-5-of-Broadcom-swi.patch | 29 + ...-Retrieve-gmac1-MAC-address-from-NVR.patch | 43 + ...-Fix-compatible-strings-for-BCM53012.patch | 65 ++ ...-Disable-gmac0-and-enable-port-8-on-.patch | 39 + ...BCM5301X-Add-DT-for-WZR-1166DHP-DHP2.patch | 300 ++++++ ...CM5301X-Fix-DTC-warning-for-NAND-nod.patch | 32 + ...-align-gpio-key-node-names-with-dtsc.patch | 912 ++++++++++++++++++ ...roadcom-correct-gpio-keys-properties.patch | 108 +++ ...-Correct-description-of-TP-Link-part.patch | 99 ++ ...4-Add-devicetree-for-D-Link-DIR-890L.patch | 242 +++++ ...-Add-devicetree-for-D-Link-DWL-8610A.patch | 165 ++++ ...-Specify-switch-ports-for-remaining-.patch | 10 +- ...RM-BCM5301X-Add-DT-for-Netgear-R7900.patch | 2 +- .../331-Meraki-MR32-Status-LEDs.patch | 2 +- 32 files changed, 4255 insertions(+), 13 deletions(-) create mode 100644 target/linux/bcm53xx/patches-5.10/036-v5.19-0001-ARM-dts-BCM5301X-Update-pin-controller-node-name.patch create mode 100644 target/linux/bcm53xx/patches-5.10/036-v5.19-0002-ARM-dts-BCM5301X-Fix-DTC-warning-for-NAND-node.patch create mode 100644 target/linux/bcm53xx/patches-5.10/036-v5.19-0003-ARM-dts-BCM5301X-Remove-cell-properties-from-srab-po.patch create mode 100644 target/linux/bcm53xx/patches-5.10/036-v5.19-0004-ARM-dts-BCM5301X-Add-rgmii-to-port-5-of-Broadcom-swi.patch create mode 100644 target/linux/bcm53xx/patches-5.10/036-v5.19-0005-ARM-dts-BCM5301X-Retrieve-gmac1-MAC-address-from-NVR.patch create mode 100644 target/linux/bcm53xx/patches-5.10/036-v5.19-0006-ARM-dts-BCM5301X-Fix-compatible-strings-for-BCM53012.patch create mode 100644 target/linux/bcm53xx/patches-5.10/036-v5.19-0007-ARM-dts-BCM5301X-Disable-gmac0-and-enable-port-8-on-.patch create mode 100644 target/linux/bcm53xx/patches-5.10/036-v5.19-0008-ARM-dts-BCM5301X-Add-DT-for-WZR-1166DHP-DHP2.patch create mode 100644 target/linux/bcm53xx/patches-5.10/036-v5.19-0009-Revert-ARM-dts-BCM5301X-Fix-DTC-warning-for-NAND-nod.patch create mode 100644 target/linux/bcm53xx/patches-5.10/037-v6.0-0001-ARM-dts-broadcom-align-gpio-key-node-names-with-dtsc.patch create mode 100644 target/linux/bcm53xx/patches-5.10/037-v6.0-0002-ARM-dts-broadcom-correct-gpio-keys-properties.patch create mode 100644 target/linux/bcm53xx/patches-5.10/038-v6.1-0001-ARM-dts-BCM5301X-Correct-description-of-TP-Link-part.patch create mode 100644 target/linux/bcm53xx/patches-5.10/038-v6.1-0001-ARM-dts-bcm47094-Add-devicetree-for-D-Link-DIR-890L.patch create mode 100644 target/linux/bcm53xx/patches-5.10/038-v6.1-0001-ARM-dts-bcm53016-Add-devicetree-for-D-Link-DWL-8610A.patch create mode 100644 target/linux/bcm53xx/patches-5.15/033-v5.19-0002-ARM-dts-BCM5301X-Fix-DTC-warning-for-NAND-node.patch create mode 100644 target/linux/bcm53xx/patches-5.15/033-v5.19-0003-ARM-dts-BCM5301X-Remove-cell-properties-from-srab-po.patch create mode 100644 target/linux/bcm53xx/patches-5.15/033-v5.19-0004-ARM-dts-BCM5301X-Add-rgmii-to-port-5-of-Broadcom-swi.patch create mode 100644 target/linux/bcm53xx/patches-5.15/033-v5.19-0005-ARM-dts-BCM5301X-Retrieve-gmac1-MAC-address-from-NVR.patch create mode 100644 target/linux/bcm53xx/patches-5.15/033-v5.19-0006-ARM-dts-BCM5301X-Fix-compatible-strings-for-BCM53012.patch create mode 100644 target/linux/bcm53xx/patches-5.15/033-v5.19-0007-ARM-dts-BCM5301X-Disable-gmac0-and-enable-port-8-on-.patch create mode 100644 target/linux/bcm53xx/patches-5.15/033-v5.19-0008-ARM-dts-BCM5301X-Add-DT-for-WZR-1166DHP-DHP2.patch create mode 100644 target/linux/bcm53xx/patches-5.15/033-v5.19-0009-Revert-ARM-dts-BCM5301X-Fix-DTC-warning-for-NAND-nod.patch create mode 100644 target/linux/bcm53xx/patches-5.15/034-v6.0-0001-ARM-dts-broadcom-align-gpio-key-node-names-with-dtsc.patch create mode 100644 target/linux/bcm53xx/patches-5.15/034-v6.0-0002-ARM-dts-broadcom-correct-gpio-keys-properties.patch create mode 100644 target/linux/bcm53xx/patches-5.15/035-v6.2-0001-ARM-dts-BCM5301X-Correct-description-of-TP-Link-part.patch create mode 100644 target/linux/bcm53xx/patches-5.15/035-v6.2-0001-ARM-dts-bcm47094-Add-devicetree-for-D-Link-DIR-890L.patch create mode 100644 target/linux/bcm53xx/patches-5.15/035-v6.2-0001-ARM-dts-bcm53016-Add-devicetree-for-D-Link-DWL-8610A.patch diff --git a/target/linux/bcm53xx/patches-5.10/036-v5.19-0001-ARM-dts-BCM5301X-Update-pin-controller-node-name.patch b/target/linux/bcm53xx/patches-5.10/036-v5.19-0001-ARM-dts-BCM5301X-Update-pin-controller-node-name.patch new file mode 100644 index 0000000000..690abb9270 --- /dev/null +++ b/target/linux/bcm53xx/patches-5.10/036-v5.19-0001-ARM-dts-BCM5301X-Update-pin-controller-node-name.patch @@ -0,0 +1,32 @@ +From 130b5e32ba9d2d2313e39cf3f6d0729bff02b76a Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= +Date: Wed, 30 Mar 2022 14:05:27 +0200 +Subject: [PATCH] ARM: dts: BCM5301X: Update pin controller node name +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +This fixes: +arch/arm/boot/dts/bcm4708-asus-rt-ac56u.dtb: cru-bus@100: 'pin-controller@1c0' does not match any of the regexes: '^clock-controller@[a-f0-9]+$', '^phy@[a-f0-9]+$', '^pinctrl@[a-f0-9]+$', '^syscon@[a-f0-9]+$', '^thermal@[a-f0-9]+$' + From schema: Documentation/devicetree/bindings/mfd/brcm,cru.yaml +arch/arm/boot/dts/bcm4708-asus-rt-ac56u.dtb: pin-controller@1c0: $nodename:0: 'pin-controller@1c0' does not match '^(pinctrl|pinmux)(@[0-9a-f]+)?$' + From schema: Documentation/devicetree/bindings/pinctrl/brcm,ns-pinmux.yaml + +Ref: e7391b021e3f ("dt-bindings: mfd: brcm,cru: Rename pinctrl node") +Signed-off-by: Rafał Miłecki +Signed-off-by: Florian Fainelli +--- + arch/arm/boot/dts/bcm5301x.dtsi | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/arch/arm/boot/dts/bcm5301x.dtsi ++++ b/arch/arm/boot/dts/bcm5301x.dtsi +@@ -455,7 +455,7 @@ + reg = <0x180 0x4>; + }; + +- pinctrl: pin-controller@1c0 { ++ pinctrl: pinctrl@1c0 { + compatible = "brcm,bcm4708-pinmux"; + reg = <0x1c0 0x24>; + reg-names = "cru_gpio_control"; diff --git a/target/linux/bcm53xx/patches-5.10/036-v5.19-0002-ARM-dts-BCM5301X-Fix-DTC-warning-for-NAND-node.patch b/target/linux/bcm53xx/patches-5.10/036-v5.19-0002-ARM-dts-BCM5301X-Fix-DTC-warning-for-NAND-node.patch new file mode 100644 index 0000000000..e61fef8aab --- /dev/null +++ b/target/linux/bcm53xx/patches-5.10/036-v5.19-0002-ARM-dts-BCM5301X-Fix-DTC-warning-for-NAND-node.patch @@ -0,0 +1,31 @@ +From 90103611d573c5c238350f9b1d7cb682c62f5681 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Ar=C4=B1n=C3=A7=20=C3=9CNAL?= +Date: Fri, 1 Apr 2022 13:19:58 +0300 +Subject: [PATCH] ARM: dts: BCM5301X: Fix DTC warning for NAND node +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Remove the unnecessary #address-cells and #size-cells properties on the +nand@0 node to fix the warning below. + +Warning (avoid_unnecessary_addr_size): /nand-controller@18028000/nand@0: unnecessary #address-cells/#size-cells without "ranges" or child "reg" property + +Signed-off-by: Arınç ÜNAL +Acked-by: Rafał Miłecki +Signed-off-by: Florian Fainelli +--- + arch/arm/boot/dts/bcm5301x-nand-cs0.dtsi | 2 -- + 1 file changed, 2 deletions(-) + +--- a/arch/arm/boot/dts/bcm5301x-nand-cs0.dtsi ++++ b/arch/arm/boot/dts/bcm5301x-nand-cs0.dtsi +@@ -10,8 +10,6 @@ + nandcs: nand@0 { + compatible = "brcm,nandcs"; + reg = <0>; +- #address-cells = <1>; +- #size-cells = <1>; + + partitions { + compatible = "brcm,bcm947xx-cfe-partitions"; diff --git a/target/linux/bcm53xx/patches-5.10/036-v5.19-0003-ARM-dts-BCM5301X-Remove-cell-properties-from-srab-po.patch b/target/linux/bcm53xx/patches-5.10/036-v5.19-0003-ARM-dts-BCM5301X-Remove-cell-properties-from-srab-po.patch new file mode 100644 index 0000000000..6ef8720b1d --- /dev/null +++ b/target/linux/bcm53xx/patches-5.10/036-v5.19-0003-ARM-dts-BCM5301X-Remove-cell-properties-from-srab-po.patch @@ -0,0 +1,40 @@ +From e5ff0a7aab3ef5dd8ec7636b936c95179aa5ddfa Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Ar=C4=B1n=C3=A7=20=C3=9CNAL?= +Date: Fri, 1 Apr 2022 13:19:59 +0300 +Subject: [PATCH] ARM: dts: BCM5301X: Remove cell properties from srab ports on + Asus RT-AC88U +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Remove #address-cells and #size-cells properties from the ports node of +&srab. They are already defined on bcm5301x.dtsi, there's no need to define +them again. + +Signed-off-by: Arınç ÜNAL +Acked-by: Rafał Miłecki +Signed-off-by: Florian Fainelli +--- + arch/arm/boot/dts/bcm47094-asus-rt-ac88u.dts | 5 +---- + 1 file changed, 1 insertion(+), 4 deletions(-) + +--- a/arch/arm/boot/dts/bcm47094-asus-rt-ac88u.dts ++++ b/arch/arm/boot/dts/bcm47094-asus-rt-ac88u.dts +@@ -1,6 +1,6 @@ + // SPDX-License-Identifier: GPL-2.0-or-later OR MIT + /* +- * Copyright (C) 2021 Arınç ÜNAL ++ * Copyright (C) 2021-2022 Arınç ÜNAL + */ + + /dts-v1/; +@@ -177,9 +177,6 @@ + dsa,member = <0 0>; + + ports { +- #address-cells = <1>; +- #size-cells = <0>; +- + port@0 { + reg = <0>; + label = "lan4"; diff --git a/target/linux/bcm53xx/patches-5.10/036-v5.19-0004-ARM-dts-BCM5301X-Add-rgmii-to-port-5-of-Broadcom-swi.patch b/target/linux/bcm53xx/patches-5.10/036-v5.19-0004-ARM-dts-BCM5301X-Add-rgmii-to-port-5-of-Broadcom-swi.patch new file mode 100644 index 0000000000..aa192b3a11 --- /dev/null +++ b/target/linux/bcm53xx/patches-5.10/036-v5.19-0004-ARM-dts-BCM5301X-Add-rgmii-to-port-5-of-Broadcom-swi.patch @@ -0,0 +1,29 @@ +From 4b7a67420a34ebd8fbf0111221a8bfd8001d418d Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Ar=C4=B1n=C3=A7=20=C3=9CNAL?= +Date: Fri, 1 Apr 2022 13:20:00 +0300 +Subject: [PATCH] ARM: dts: BCM5301X: Add rgmii to port@5 of Broadcom switch on + Asus RT-AC88U +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Define phy-mode of the Broadcom switch's port@5 as rgmii. This doesn't seem +to matter but let's explicitly define it since phy-mode as rgmii is defined +on the other side which is port@6 of the Realtek switch. + +Signed-off-by: Arınç ÜNAL +Signed-off-by: Florian Fainelli +--- + arch/arm/boot/dts/bcm47094-asus-rt-ac88u.dts | 1 + + 1 file changed, 1 insertion(+) + +--- a/arch/arm/boot/dts/bcm47094-asus-rt-ac88u.dts ++++ b/arch/arm/boot/dts/bcm47094-asus-rt-ac88u.dts +@@ -205,6 +205,7 @@ + sw0_p5: port@5 { + reg = <5>; + label = "extsw"; ++ phy-mode = "rgmii"; + + fixed-link { + speed = <1000>; diff --git a/target/linux/bcm53xx/patches-5.10/036-v5.19-0005-ARM-dts-BCM5301X-Retrieve-gmac1-MAC-address-from-NVR.patch b/target/linux/bcm53xx/patches-5.10/036-v5.19-0005-ARM-dts-BCM5301X-Retrieve-gmac1-MAC-address-from-NVR.patch new file mode 100644 index 0000000000..4c0858be0a --- /dev/null +++ b/target/linux/bcm53xx/patches-5.10/036-v5.19-0005-ARM-dts-BCM5301X-Retrieve-gmac1-MAC-address-from-NVR.patch @@ -0,0 +1,43 @@ +From 7f7f8c7b9f3cbae1355fb3b0ce4ea9d6f1552521 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Ar=C4=B1n=C3=A7=20=C3=9CNAL?= +Date: Fri, 1 Apr 2022 13:20:01 +0300 +Subject: [PATCH] ARM: dts: BCM5301X: Retrieve gmac1 MAC address from NVRAM on + Asus RT-AC88U +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +The et1macaddr NVRAM variable contains a MAC address for gmac1 on Asus +RT-AC88U. Add NVMEM cell for it and reference it in the gmac1 node. + +Signed-off-by: Arınç ÜNAL +Acked-by: Rafał Miłecki +Signed-off-by: Florian Fainelli +--- + arch/arm/boot/dts/bcm47094-asus-rt-ac88u.dts | 8 ++++++++ + 1 file changed, 8 insertions(+) + +--- a/arch/arm/boot/dts/bcm47094-asus-rt-ac88u.dts ++++ b/arch/arm/boot/dts/bcm47094-asus-rt-ac88u.dts +@@ -25,6 +25,9 @@ + nvram@1c080000 { + compatible = "brcm,nvram"; + reg = <0x1c080000 0x00180000>; ++ ++ et1macaddr: et1macaddr { ++ }; + }; + + leds { +@@ -239,6 +242,11 @@ + }; + }; + ++&gmac1 { ++ nvmem-cells = <&et1macaddr>; ++ nvmem-cell-names = "mac-address"; ++}; ++ + &usb2 { + vcc-gpio = <&chipcommon 9 GPIO_ACTIVE_HIGH>; + }; diff --git a/target/linux/bcm53xx/patches-5.10/036-v5.19-0006-ARM-dts-BCM5301X-Fix-compatible-strings-for-BCM53012.patch b/target/linux/bcm53xx/patches-5.10/036-v5.19-0006-ARM-dts-BCM5301X-Fix-compatible-strings-for-BCM53012.patch new file mode 100644 index 0000000000..59e99dae62 --- /dev/null +++ b/target/linux/bcm53xx/patches-5.10/036-v5.19-0006-ARM-dts-BCM5301X-Fix-compatible-strings-for-BCM53012.patch @@ -0,0 +1,65 @@ +From 69bb5c6f3f41fe6baa86a775c8a3e69dd27f85d6 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Ar=C4=B1n=C3=A7=20=C3=9CNAL?= +Date: Sat, 2 Apr 2022 23:46:21 +0300 +Subject: [PATCH] ARM: dts: BCM5301X: Fix compatible strings for BCM53012 and + BCM53016 SoC +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Fix compatible strings for devicetrees using the BCM53012 and BCM53016 SoC. + +Signed-off-by: Arınç ÜNAL +Acked-by: Krzysztof Kozlowski +Signed-off-by: Florian Fainelli +--- + arch/arm/boot/dts/bcm53016-meraki-mr32.dts | 2 +- + arch/arm/boot/dts/bcm953012er.dts | 2 +- + arch/arm/boot/dts/bcm953012hr.dts | 2 +- + arch/arm/boot/dts/bcm953012k.dts | 2 +- + 4 files changed, 4 insertions(+), 4 deletions(-) + +--- a/arch/arm/boot/dts/bcm53016-meraki-mr32.dts ++++ b/arch/arm/boot/dts/bcm53016-meraki-mr32.dts +@@ -13,7 +13,7 @@ + #include + + / { +- compatible = "meraki,mr32", "brcm,brcm53016", "brcm,bcm4708"; ++ compatible = "meraki,mr32", "brcm,bcm53016", "brcm,bcm4708"; + model = "Meraki MR32"; + + chosen { +--- a/arch/arm/boot/dts/bcm953012er.dts ++++ b/arch/arm/boot/dts/bcm953012er.dts +@@ -37,7 +37,7 @@ + + / { + model = "NorthStar Enterprise Router (BCM953012ER)"; +- compatible = "brcm,bcm953012er", "brcm,brcm53012", "brcm,bcm4708"; ++ compatible = "brcm,bcm953012er", "brcm,bcm53012", "brcm,bcm4708"; + + memory@0 { + device_type = "memory"; +--- a/arch/arm/boot/dts/bcm953012hr.dts ++++ b/arch/arm/boot/dts/bcm953012hr.dts +@@ -37,7 +37,7 @@ + + / { + model = "NorthStar HR (BCM953012HR)"; +- compatible = "brcm,bcm953012hr", "brcm,brcm53012", "brcm,bcm4708"; ++ compatible = "brcm,bcm953012hr", "brcm,bcm53012", "brcm,bcm4708"; + + aliases { + ethernet0 = &gmac0; +--- a/arch/arm/boot/dts/bcm953012k.dts ++++ b/arch/arm/boot/dts/bcm953012k.dts +@@ -36,7 +36,7 @@ + + / { + model = "NorthStar SVK (BCM953012K)"; +- compatible = "brcm,bcm953012k", "brcm,brcm53012", "brcm,bcm4708"; ++ compatible = "brcm,bcm953012k", "brcm,bcm53012", "brcm,bcm4708"; + + aliases { + serial0 = &uart0; diff --git a/target/linux/bcm53xx/patches-5.10/036-v5.19-0007-ARM-dts-BCM5301X-Disable-gmac0-and-enable-port-8-on-.patch b/target/linux/bcm53xx/patches-5.10/036-v5.19-0007-ARM-dts-BCM5301X-Disable-gmac0-and-enable-port-8-on-.patch new file mode 100644 index 0000000000..f75a53777f --- /dev/null +++ b/target/linux/bcm53xx/patches-5.10/036-v5.19-0007-ARM-dts-BCM5301X-Disable-gmac0-and-enable-port-8-on-.patch @@ -0,0 +1,39 @@ +From b9cff8783439ff1803709128af3a0e04c5f5f047 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Ar=C4=B1n=C3=A7=20=C3=9CNAL?= +Date: Sun, 10 Apr 2022 12:44:55 +0300 +Subject: [PATCH] ARM: dts: BCM5301X: Disable gmac0 and enable port@8 on Asus + RT-AC88U +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Disable gmac0 which is not connected to any switch MAC. Enable port@8 of +the Broadcom switch which is connected to gmac2. + +Signed-off-by: Arınç ÜNAL +Signed-off-by: Florian Fainelli +--- + arch/arm/boot/dts/bcm47094-asus-rt-ac88u.dts | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +--- a/arch/arm/boot/dts/bcm47094-asus-rt-ac88u.dts ++++ b/arch/arm/boot/dts/bcm47094-asus-rt-ac88u.dts +@@ -232,7 +232,6 @@ + reg = <8>; + ethernet = <&gmac2>; + label = "cpu"; +- status = "disabled"; + + fixed-link { + speed = <1000>; +@@ -242,6 +241,10 @@ + }; + }; + ++&gmac0 { ++ status = "disabled"; ++}; ++ + &gmac1 { + nvmem-cells = <&et1macaddr>; + nvmem-cell-names = "mac-address"; diff --git a/target/linux/bcm53xx/patches-5.10/036-v5.19-0008-ARM-dts-BCM5301X-Add-DT-for-WZR-1166DHP-DHP2.patch b/target/linux/bcm53xx/patches-5.10/036-v5.19-0008-ARM-dts-BCM5301X-Add-DT-for-WZR-1166DHP-DHP2.patch new file mode 100644 index 0000000000..bce497bba7 --- /dev/null +++ b/target/linux/bcm53xx/patches-5.10/036-v5.19-0008-ARM-dts-BCM5301X-Add-DT-for-WZR-1166DHP-DHP2.patch @@ -0,0 +1,300 @@ +From 417aea4436bb658d8c5c4dcd0e3c255931d0ee96 Mon Sep 17 00:00:00 2001 +From: SHIMAMOTO Takayoshi +Date: Fri, 22 Apr 2022 00:10:54 +0900 +Subject: [PATCH] ARM: dts: BCM5301X: Add DT for WZR-1166DHP,DHP2 + +Buffalo WZR-1166DHP/WZR-1166DHP2 wireless router with + + - BCM4708A0 + - 128MiB NAND flash + - 2T2R 11ac/a/b/g/n Wi-Fi + - 4x 10/100/1000M ethernet switch + - 1x USB 3.0 port + + WZR-1166DHP and WZR-1166DHP2 have different memory capacity. + + WZR-1166DHP + - 512 MiB DDR2 SDRAM + + WZR-1166DHP2 + - 256 MiB DDR2 SDRAM + + These hardware components are very similar to the WZR-1750DHP + except for the number of antennas. + +Signed-off-by: SHIMAMOTO Takayoshi +Signed-off-by: Florian Fainelli +--- + arch/arm/boot/dts/Makefile | 2 + + .../bcm4708-buffalo-wzr-1166dhp-common.dtsi | 192 ++++++++++++++++++ + .../boot/dts/bcm4708-buffalo-wzr-1166dhp.dts | 26 +++ + .../boot/dts/bcm4708-buffalo-wzr-1166dhp2.dts | 26 +++ + 4 files changed, 246 insertions(+) + create mode 100644 arch/arm/boot/dts/bcm4708-buffalo-wzr-1166dhp-common.dtsi + create mode 100644 arch/arm/boot/dts/bcm4708-buffalo-wzr-1166dhp.dts + create mode 100644 arch/arm/boot/dts/bcm4708-buffalo-wzr-1166dhp2.dts + +--- a/arch/arm/boot/dts/Makefile ++++ b/arch/arm/boot/dts/Makefile +@@ -99,6 +99,8 @@ dtb-$(CONFIG_ARCH_BCM_5301X) += \ + bcm4708-asus-rt-ac56u.dtb \ + bcm4708-asus-rt-ac68u.dtb \ + bcm4708-buffalo-wzr-1750dhp.dtb \ ++ bcm4708-buffalo-wzr-1166dhp.dtb \ ++ bcm4708-buffalo-wzr-1166dhp2.dtb \ + bcm4708-linksys-ea6300-v1.dtb \ + bcm4708-linksys-ea6500-v2.dtb \ + bcm4708-luxul-xap-1510.dtb \ +--- /dev/null ++++ b/arch/arm/boot/dts/bcm4708-buffalo-wzr-1166dhp-common.dtsi +@@ -0,0 +1,192 @@ ++// SPDX-License-Identifier: GPL-2.0-or-later OR MIT ++/* ++ * Broadcom BCM470X / BCM5301X ARM platform code. ++ * DTS for Buffalo WZR-1166DHP and WZR-1166DHP2 ++ * ++ * Copyright (C) 2014 Rafał Miłecki ++ * Copyright (C) 2022 SHIMAMOTO Takayoshi ++ */ ++ ++ ++#include "bcm4708.dtsi" ++#include "bcm5301x-nand-cs0-bch8.dtsi" ++#include ++ ++/ { ++ spi { ++ compatible = "spi-gpio"; ++ num-chipselects = <1>; ++ gpio-sck = <&chipcommon 7 0>; ++ gpio-mosi = <&chipcommon 4 0>; ++ cs-gpios = <&chipcommon 6 0>; ++ #address-cells = <1>; ++ #size-cells = <0>; ++ ++ hc595: gpio_spi@0 { ++ compatible = "fairchild,74hc595"; ++ reg = <0>; ++ registers-number = <1>; ++ spi-max-frequency = <100000>; ++ ++ gpio-controller; ++ #gpio-cells = <2>; ++ ++ }; ++ }; ++ ++ leds { ++ compatible = "gpio-leds"; ++ ++ usb { ++ /* label = "bcm53xx:blue:usb"; */ ++ function = LED_FUNCTION_USB; ++ color = ; ++ gpios = <&hc595 0 GPIO_ACTIVE_HIGH>; ++ trigger-sources = <&ohci_port1>, <&ehci_port1>, ++ <&xhci_port1>, <&ohci_port2>, ++ <&ehci_port2>; ++ linux,default-trigger = "usbport"; ++ }; ++ ++ power0 { ++ /* label = "bcm53xx:red:power"; */ ++ function = LED_FUNCTION_FAULT; ++ color = ; ++ gpios = <&hc595 1 GPIO_ACTIVE_HIGH>; ++ }; ++ ++ power1 { ++ /* label = "bcm53xx:white:power"; */ ++ function = LED_FUNCTION_POWER; ++ color = ; ++ gpios = <&hc595 2 GPIO_ACTIVE_HIGH>; ++ linux,default-trigger = "default-on"; ++ }; ++ ++ router0 { ++ /* label = "bcm53xx:blue:router"; */ ++ function = LED_FUNCTION_STATUS; ++ color = ; ++ gpios = <&hc595 3 GPIO_ACTIVE_HIGH>; ++ linux,default-trigger = "default-on"; ++ }; ++ ++ router1 { ++ /* label = "bcm53xx:amber:router"; */ ++ function = LED_FUNCTION_STATUS; ++ color = ; ++ gpios = <&hc595 4 GPIO_ACTIVE_HIGH>; ++ }; ++ ++ wan { ++ /* label = "bcm53xx:blue:wan"; */ ++ function = LED_FUNCTION_WAN; ++ color = ; ++ gpios = <&hc595 5 GPIO_ACTIVE_HIGH>; ++ linux,default-trigger = "default-on"; ++ }; ++ ++ wireless0 { ++ /* label = "bcm53xx:blue:wireless"; */ ++ function = LED_FUNCTION_WLAN; ++ color = ; ++ gpios = <&hc595 6 GPIO_ACTIVE_HIGH>; ++ }; ++ ++ wireless1 { ++ /* label = "bcm53xx:amber:wireless"; */ ++ function = LED_FUNCTION_WLAN; ++ color = ; ++ gpios = <&hc595 7 GPIO_ACTIVE_HIGH>; ++ }; ++ }; ++ ++ gpio-keys { ++ compatible = "gpio-keys"; ++ ++ restart { ++ label = "Reset"; ++ linux,code = ; ++ gpios = <&chipcommon 11 GPIO_ACTIVE_LOW>; ++ }; ++ ++ aoss { ++ label = "AOSS"; ++ linux,code = ; ++ gpios = <&chipcommon 12 GPIO_ACTIVE_LOW>; ++ }; ++ ++ /* Commit mode set by switch? */ ++ mode { ++ label = "Mode"; ++ linux,code = ; ++ gpios = <&chipcommon 13 GPIO_ACTIVE_LOW>; ++ }; ++ ++ /* Switch: AP mode */ ++ sw_ap { ++ label = "AP"; ++ linux,code = ; ++ gpios = <&chipcommon 14 GPIO_ACTIVE_LOW>; ++ }; ++ ++ eject { ++ label = "USB eject"; ++ linux,code = ; ++ gpios = <&chipcommon 15 GPIO_ACTIVE_LOW>; ++ }; ++ }; ++}; ++ ++&usb2 { ++ vcc-gpio = <&chipcommon 9 GPIO_ACTIVE_HIGH>; ++}; ++ ++&usb3 { ++ vcc-gpio = <&chipcommon 10 GPIO_ACTIVE_LOW>; ++}; ++ ++&spi_nor { ++ status = "okay"; ++}; ++ ++&usb3_phy { ++ status = "okay"; ++}; ++ ++&srab { ++ status = "okay"; ++ ++ ports { ++ port@0 { ++ reg = <0>; ++ label = "lan1"; ++ }; ++ ++ port@1 { ++ reg = <1>; ++ label = "lan2"; ++ }; ++ ++ port@2 { ++ reg = <2>; ++ label = "lan3"; ++ }; ++ ++ port@3 { ++ reg = <3>; ++ label = "lan4"; ++ }; ++ ++ port@4 { ++ reg = <4>; ++ label = "wan"; ++ }; ++ ++ port@5 { ++ reg = <5>; ++ label = "cpu"; ++ ethernet = <&gmac0>; ++ }; ++ }; ++}; +--- /dev/null ++++ b/arch/arm/boot/dts/bcm4708-buffalo-wzr-1166dhp.dts +@@ -0,0 +1,26 @@ ++// SPDX-License-Identifier: GPL-2.0-or-later OR MIT ++/* ++ * Device Tree Bindigs for Buffalo WZR-1166DHP ++ * ++ * Copyright (C) 2022 SHIMAMOTO Takayoshi ++ */ ++ ++/dts-v1/; ++ ++#include "bcm4708-buffalo-wzr-1166dhp-common.dtsi" ++ ++/ { ++ compatible = "buffalo,wzr-1166dhp", "brcm,bcm4708"; ++ model = "Buffalo WZR-1166DHP"; ++ ++ chosen { ++ bootargs = "console=ttyS0,115200"; ++ }; ++ ++ memory@0 { ++ device_type = "memory"; ++ reg = <0x00000000 0x08000000>, ++ <0x88000000 0x18000000>; ++ }; ++ ++}; +--- /dev/null ++++ b/arch/arm/boot/dts/bcm4708-buffalo-wzr-1166dhp2.dts +@@ -0,0 +1,26 @@ ++// SPDX-License-Identifier: GPL-2.0-or-later OR MIT ++/* ++ * Device Tree Bindigs for Buffalo WZR-1166DHP2 ++ * ++ * Copyright (C) 2022 SHIMAMOTO Takayoshi ++ */ ++ ++/dts-v1/; ++ ++#include "bcm4708-buffalo-wzr-1166dhp-common.dtsi" ++ ++/ { ++ compatible = "buffalo,wzr-1166dhp2", "brcm,bcm4708"; ++ model = "Buffalo WZR-1166DHP2"; ++ ++ chosen { ++ bootargs = "console=ttyS0,115200"; ++ }; ++ ++ memory@0 { ++ device_type = "memory"; ++ reg = <0x00000000 0x08000000>, ++ <0x88000000 0x08000000>; ++ }; ++ ++}; diff --git a/target/linux/bcm53xx/patches-5.10/036-v5.19-0009-Revert-ARM-dts-BCM5301X-Fix-DTC-warning-for-NAND-nod.patch b/target/linux/bcm53xx/patches-5.10/036-v5.19-0009-Revert-ARM-dts-BCM5301X-Fix-DTC-warning-for-NAND-nod.patch new file mode 100644 index 0000000000..cc7e9741a7 --- /dev/null +++ b/target/linux/bcm53xx/patches-5.10/036-v5.19-0009-Revert-ARM-dts-BCM5301X-Fix-DTC-warning-for-NAND-nod.patch @@ -0,0 +1,32 @@ +From 18176b9d82eebaf4408dc0440f54d57a8cbced83 Mon Sep 17 00:00:00 2001 +From: Arnd Bergmann +Date: Fri, 13 May 2022 11:11:07 +0200 +Subject: [PATCH] Revert "ARM: dts: BCM5301X: Fix DTC warning for NAND node" + +This reverts commit 90103611d573, which caused a new DTC warning + +arch/arm/boot/dts/bcm953012hr.dts:57.3-33: Warning (reg_format): /nand-controller@18028000/nand@0/partition@0:reg: property has invalid length (8 bytes) (#address-cells == 2, #size-cells == 1) +arch/arm/boot/dts/bcm953012hr.dts:62.3-33: Warning (reg_format): /nand-controller@18028000/nand@0/partition@200000:reg: property has invalid length (8 bytes) (#address-cells == 2, #size-cells == 1) +arch/arm/boot/dts/bcm953012hr.dts:66.3-33: Warning (reg_format): /nand-controller@18028000/nand@0/partition@600000:reg: property has invalid length (8 bytes) (#address-cells == 2, #size-cells == 1) +arch/arm/boot/dts/bcm953012hr.dts:70.3-33: Warning (reg_format): /nand-controller@18028000/nand@0/partition@1000000:reg: property has invalid length (8 bytes) (#address-cells == 2, #size-cells == 1) +arch/arm/boot/dts/bcm953012hr.dtb: Warning (pci_device_reg): Failed prerequisite 'reg_format' +arch/arm/boot/dts/bcm953012hr.dtb: Warning (pci_device_bus_num): Failed prerequisite 'reg_format' +arch/arm/boot/dts/bcm953012hr.dtb: Warning (i2c_bus_reg): Failed prerequisite 'reg_format' +arch/arm/boot/dts/bcm953012hr.dtb: Warning (spi_bus_reg): Failed prerequisite 'reg_format' + +Signed-off-by: Arnd Bergmann +--- + arch/arm/boot/dts/bcm5301x-nand-cs0.dtsi | 2 ++ + 1 file changed, 2 insertions(+) + +--- a/arch/arm/boot/dts/bcm5301x-nand-cs0.dtsi ++++ b/arch/arm/boot/dts/bcm5301x-nand-cs0.dtsi +@@ -10,6 +10,8 @@ + nandcs: nand@0 { + compatible = "brcm,nandcs"; + reg = <0>; ++ #address-cells = <1>; ++ #size-cells = <1>; + + partitions { + compatible = "brcm,bcm947xx-cfe-partitions"; diff --git a/target/linux/bcm53xx/patches-5.10/037-v6.0-0001-ARM-dts-broadcom-align-gpio-key-node-names-with-dtsc.patch b/target/linux/bcm53xx/patches-5.10/037-v6.0-0001-ARM-dts-broadcom-align-gpio-key-node-names-with-dtsc.patch new file mode 100644 index 0000000000..33d675297e --- /dev/null +++ b/target/linux/bcm53xx/patches-5.10/037-v6.0-0001-ARM-dts-broadcom-align-gpio-key-node-names-with-dtsc.patch @@ -0,0 +1,912 @@ +From c5aec5611aec8fb1ca68f68e41acaefccfc93c16 Mon Sep 17 00:00:00 2001 +From: Krzysztof Kozlowski +Date: Thu, 9 Jun 2022 13:39:30 +0200 +Subject: [PATCH] ARM: dts: broadcom: align gpio-key node names with dtschema + +The node names should be generic and DT schema expects certain pattern +(e.g. with key/button/switch). + +Signed-off-by: Krzysztof Kozlowski +Signed-off-by: Florian Fainelli +--- + arch/arm/boot/dts/bcm4708-asus-rt-ac56u.dts | 6 +++--- + arch/arm/boot/dts/bcm4708-asus-rt-ac68u.dts | 8 ++++---- + .../boot/dts/bcm4708-buffalo-wzr-1166dhp-common.dtsi | 10 +++++----- + arch/arm/boot/dts/bcm4708-buffalo-wzr-1750dhp.dts | 10 +++++----- + arch/arm/boot/dts/bcm4708-linksys-ea6300-v1.dts | 4 ++-- + arch/arm/boot/dts/bcm4708-linksys-ea6500-v2.dts | 4 ++-- + arch/arm/boot/dts/bcm4708-luxul-xap-1510.dts | 2 +- + arch/arm/boot/dts/bcm4708-luxul-xwc-1000.dts | 2 +- + arch/arm/boot/dts/bcm4708-netgear-r6250.dts | 6 +++--- + arch/arm/boot/dts/bcm4708-netgear-r6300-v2.dts | 6 +++--- + arch/arm/boot/dts/bcm4708-smartrg-sr400ac.dts | 6 +++--- + arch/arm/boot/dts/bcm47081-asus-rt-n18u.dts | 4 ++-- + arch/arm/boot/dts/bcm47081-buffalo-wzr-600dhp2.dts | 8 ++++---- + arch/arm/boot/dts/bcm47081-buffalo-wzr-900dhp.dts | 2 +- + arch/arm/boot/dts/bcm47081-luxul-xap-1410.dts | 2 +- + arch/arm/boot/dts/bcm47081-luxul-xwr-1200.dts | 2 +- + arch/arm/boot/dts/bcm47081-tplink-archer-c5-v2.dts | 4 ++-- + arch/arm/boot/dts/bcm4709-asus-rt-ac87u.dts | 4 ++-- + arch/arm/boot/dts/bcm4709-buffalo-wxr-1900dhp.dts | 12 ++++++------ + arch/arm/boot/dts/bcm4709-linksys-ea9200.dts | 4 ++-- + arch/arm/boot/dts/bcm4709-netgear-r7000.dts | 6 +++--- + arch/arm/boot/dts/bcm4709-netgear-r8000.dts | 8 ++++---- + arch/arm/boot/dts/bcm4709-tplink-archer-c9-v1.dts | 4 ++-- + arch/arm/boot/dts/bcm47094-asus-rt-ac88u.dts | 8 ++++---- + arch/arm/boot/dts/bcm47094-dlink-dir-885l.dts | 6 +++--- + arch/arm/boot/dts/bcm47094-linksys-panamera.dts | 6 +++--- + arch/arm/boot/dts/bcm47094-luxul-abr-4500.dts | 2 +- + arch/arm/boot/dts/bcm47094-luxul-xap-1610.dts | 2 +- + arch/arm/boot/dts/bcm47094-luxul-xbr-4500.dts | 2 +- + arch/arm/boot/dts/bcm47094-luxul-xwc-2000.dts | 2 +- + arch/arm/boot/dts/bcm47094-luxul-xwr-3100.dts | 2 +- + arch/arm/boot/dts/bcm47094-luxul-xwr-3150-v1.dts | 2 +- + arch/arm/boot/dts/bcm47094-netgear-r8500.dts | 8 ++++---- + arch/arm/boot/dts/bcm47094-phicomm-k3.dts | 2 +- + arch/arm/boot/dts/bcm47189-luxul-xap-1440.dts | 2 +- + arch/arm/boot/dts/bcm47189-luxul-xap-810.dts | 2 +- + arch/arm/boot/dts/bcm47189-tenda-ac9.dts | 6 +++--- + arch/arm/boot/dts/bcm53016-meraki-mr32.dts | 2 +- + arch/arm/boot/dts/bcm911360_entphn.dts | 4 ++-- + arch/arm/boot/dts/bcm947189acdbmr.dts | 4 ++-- + arch/arm/boot/dts/bcm953012er.dts | 4 ++-- + arch/arm/boot/dts/bcm958625-meraki-alamo.dtsi | 2 +- + arch/arm/boot/dts/bcm958625-meraki-kingpin.dtsi | 2 +- + 43 files changed, 97 insertions(+), 97 deletions(-) + +--- a/arch/arm/boot/dts/bcm4708-asus-rt-ac56u.dts ++++ b/arch/arm/boot/dts/bcm4708-asus-rt-ac56u.dts +@@ -70,19 +70,19 @@ + gpio-keys { + compatible = "gpio-keys"; + +- rfkill { ++ button-rfkill { + label = "WiFi"; + linux,code = ; + gpios = <&chipcommon 7 GPIO_ACTIVE_LOW>; + }; + +- restart { ++ button-restart { + label = "Reset"; + linux,code = ; + gpios = <&chipcommon 11 GPIO_ACTIVE_LOW>; + }; + +- wps { ++ button-wps { + label = "WPS"; + linux,code = ; + gpios = <&chipcommon 15 GPIO_ACTIVE_LOW>; +--- a/arch/arm/boot/dts/bcm4708-asus-rt-ac68u.dts ++++ b/arch/arm/boot/dts/bcm4708-asus-rt-ac68u.dts +@@ -54,25 +54,25 @@ + gpio-keys { + compatible = "gpio-keys"; + +- brightness { ++ button-brightness { + label = "Backlight"; + linux,code = ; + gpios = <&chipcommon 5 GPIO_ACTIVE_LOW>; + }; + +- wps { ++ button-wps { + label = "WPS"; + linux,code = ; + gpios = <&chipcommon 7 GPIO_ACTIVE_LOW>; + }; + +- restart { ++ button-restart { + label = "Reset"; + linux,code = ; + gpios = <&chipcommon 11 GPIO_ACTIVE_LOW>; + }; + +- rfkill { ++ button-rfkill { + label = "WiFi"; + linux,code = ; + gpios = <&chipcommon 15 GPIO_ACTIVE_LOW>; +--- a/arch/arm/boot/dts/bcm4708-buffalo-wzr-1166dhp-common.dtsi ++++ b/arch/arm/boot/dts/bcm4708-buffalo-wzr-1166dhp-common.dtsi +@@ -104,33 +104,33 @@ + gpio-keys { + compatible = "gpio-keys"; + +- restart { ++ button-restart { + label = "Reset"; + linux,code = ; + gpios = <&chipcommon 11 GPIO_ACTIVE_LOW>; + }; + +- aoss { ++ button-aoss { + label = "AOSS"; + linux,code = ; + gpios = <&chipcommon 12 GPIO_ACTIVE_LOW>; + }; + + /* Commit mode set by switch? */ +- mode { ++ button-mode { + label = "Mode"; + linux,code = ; + gpios = <&chipcommon 13 GPIO_ACTIVE_LOW>; + }; + + /* Switch: AP mode */ +- sw_ap { ++ button-sw-ap { + label = "AP"; + linux,code = ; + gpios = <&chipcommon 14 GPIO_ACTIVE_LOW>; + }; + +- eject { ++ button-eject { + label = "USB eject"; + linux,code = ; + gpios = <&chipcommon 15 GPIO_ACTIVE_LOW>; +--- a/arch/arm/boot/dts/bcm4708-buffalo-wzr-1750dhp.dts ++++ b/arch/arm/boot/dts/bcm4708-buffalo-wzr-1750dhp.dts +@@ -100,33 +100,33 @@ + gpio-keys { + compatible = "gpio-keys"; + +- restart { ++ button-restart { + label = "Reset"; + linux,code = ; + gpios = <&chipcommon 11 GPIO_ACTIVE_LOW>; + }; + +- aoss { ++ button-aoss { + label = "AOSS"; + linux,code = ; + gpios = <&chipcommon 12 GPIO_ACTIVE_LOW>; + }; + + /* Commit mode set by switch? */ +- mode { ++ button-mode { + label = "Mode"; + linux,code = ; + gpios = <&chipcommon 13 GPIO_ACTIVE_LOW>; + }; + + /* Switch: AP mode */ +- sw_ap { ++ button-sw-ap { + label = "AP"; + linux,code = ; + gpios = <&chipcommon 14 GPIO_ACTIVE_LOW>; + }; + +- eject { ++ button-eject { + label = "USB eject"; + linux,code = ; + gpios = <&chipcommon 15 GPIO_ACTIVE_LOW>; +--- a/arch/arm/boot/dts/bcm4708-linksys-ea6300-v1.dts ++++ b/arch/arm/boot/dts/bcm4708-linksys-ea6300-v1.dts +@@ -29,13 +29,13 @@ + gpio-keys { + compatible = "gpio-keys"; + +- wps { ++ button-wps { + label = "WPS"; + linux,code = ; + gpios = <&chipcommon 7 GPIO_ACTIVE_LOW>; + }; + +- restart { ++ button-restart { + label = "Reset"; + linux,code = ; + gpios = <&chipcommon 11 GPIO_ACTIVE_LOW>; +--- a/arch/arm/boot/dts/bcm4708-linksys-ea6500-v2.dts ++++ b/arch/arm/boot/dts/bcm4708-linksys-ea6500-v2.dts +@@ -25,13 +25,13 @@ + gpio-keys { + compatible = "gpio-keys"; + +- wps { ++ button-wps { + label = "WPS"; + linux,code = ; + gpios = <&chipcommon 7 GPIO_ACTIVE_LOW>; + }; + +- restart { ++ button-restart { + label = "Reset"; + linux,code = ; + gpios = <&chipcommon 11 GPIO_ACTIVE_LOW>; +--- a/arch/arm/boot/dts/bcm4708-luxul-xap-1510.dts ++++ b/arch/arm/boot/dts/bcm4708-luxul-xap-1510.dts +@@ -45,7 +45,7 @@ + gpio-keys { + compatible = "gpio-keys"; + +- restart { ++ button-restart { + label = "Reset"; + linux,code = ; + gpios = <&chipcommon 11 GPIO_ACTIVE_LOW>; +--- a/arch/arm/boot/dts/bcm4708-luxul-xwc-1000.dts ++++ b/arch/arm/boot/dts/bcm4708-luxul-xwc-1000.dts +@@ -52,7 +52,7 @@ + gpio-keys { + compatible = "gpio-keys"; + +- restart { ++ button-restart { + label = "Reset"; + linux,code = ; + gpios = <&chipcommon 7 GPIO_ACTIVE_LOW>; +--- a/arch/arm/boot/dts/bcm4708-netgear-r6250.dts ++++ b/arch/arm/boot/dts/bcm4708-netgear-r6250.dts +@@ -63,19 +63,19 @@ + gpio-keys { + compatible = "gpio-keys"; + +- wps { ++ button-wps { + label = "WPS"; + linux,code = ; + gpios = <&chipcommon 4 GPIO_ACTIVE_LOW>; + }; + +- rfkill { ++ button-rfkill { + label = "WiFi"; + linux,code = ; + gpios = <&chipcommon 5 GPIO_ACTIVE_LOW>; + }; + +- restart { ++ button-restart { + label = "Reset"; + linux,code = ; + gpios = <&chipcommon 6 GPIO_ACTIVE_LOW>; +--- a/arch/arm/boot/dts/bcm4708-netgear-r6300-v2.dts ++++ b/arch/arm/boot/dts/bcm4708-netgear-r6300-v2.dts +@@ -59,19 +59,19 @@ + gpio-keys { + compatible = "gpio-keys"; + +- wps { ++ button-wps { + label = "WPS"; + linux,code = ; + gpios = <&chipcommon 4 GPIO_ACTIVE_LOW>; + }; + +- rfkill { ++ button-rfkill { + label = "WiFi"; + linux,code = ; + gpios = <&chipcommon 5 GPIO_ACTIVE_LOW>; + }; + +- restart { ++ button-restart { + label = "Reset"; + linux,code = ; + gpios = <&chipcommon 6 GPIO_ACTIVE_LOW>; +--- a/arch/arm/boot/dts/bcm4708-smartrg-sr400ac.dts ++++ b/arch/arm/boot/dts/bcm4708-smartrg-sr400ac.dts +@@ -94,19 +94,19 @@ + gpio-keys { + compatible = "gpio-keys"; + +- rfkill { ++ button-rfkill { + label = "WiFi"; + linux,code = ; + gpios = <&chipcommon 0 GPIO_ACTIVE_LOW>; + }; + +- wps { ++ button-wps { + label = "WPS"; + linux,code = ; + gpios = <&chipcommon 7 GPIO_ACTIVE_LOW>; + }; + +- restart { ++ button-restart { + label = "Reset"; + linux,code = ; + gpios = <&chipcommon 11 GPIO_ACTIVE_LOW>; +--- a/arch/arm/boot/dts/bcm47081-asus-rt-n18u.dts ++++ b/arch/arm/boot/dts/bcm47081-asus-rt-n18u.dts +@@ -60,13 +60,13 @@ + gpio-keys { + compatible = "gpio-keys"; + +- restart { ++ button-restart { + label = "Reset"; + linux,code = ; + gpios = <&chipcommon 7 GPIO_ACTIVE_LOW>; + }; + +- wps { ++ button-wps { + label = "WPS"; + linux,code = ; + gpios = <&chipcommon 11 GPIO_ACTIVE_LOW>; +--- a/arch/arm/boot/dts/bcm47081-buffalo-wzr-600dhp2.dts ++++ b/arch/arm/boot/dts/bcm47081-buffalo-wzr-600dhp2.dts +@@ -91,26 +91,26 @@ + gpio-keys { + compatible = "gpio-keys"; + +- aoss { ++ button-aoss { + label = "AOSS"; + linux,code = ; + gpios = <&chipcommon 9 GPIO_ACTIVE_LOW>; + }; + +- restart { ++ button-restart { + label = "Reset"; + linux,code = ; + gpios = <&chipcommon 11 GPIO_ACTIVE_LOW>; + }; + + /* Switch device mode? */ +- mode { ++ button-mode { + label = "Mode"; + linux,code = ; + gpios = <&chipcommon 14 GPIO_ACTIVE_LOW>; + }; + +- eject { ++ button-eject { + label = "USB eject"; + linux,code = ; + gpios = <&chipcommon 15 GPIO_ACTIVE_LOW>; +--- a/arch/arm/boot/dts/bcm47081-buffalo-wzr-900dhp.dts ++++ b/arch/arm/boot/dts/bcm47081-buffalo-wzr-900dhp.dts +@@ -96,7 +96,7 @@ + gpio-keys { + compatible = "gpio-keys"; + +- restart { ++ button-restart { + label = "Reset"; + linux,code = ; + gpios = <&chipcommon 11 GPIO_ACTIVE_LOW>; +--- a/arch/arm/boot/dts/bcm47081-luxul-xap-1410.dts ++++ b/arch/arm/boot/dts/bcm47081-luxul-xap-1410.dts +@@ -45,7 +45,7 @@ + gpio-keys { + compatible = "gpio-keys"; + +- restart { ++ button-restart { + label = "Reset"; + linux,code = ; + gpios = <&chipcommon 11 GPIO_ACTIVE_LOW>; +--- a/arch/arm/boot/dts/bcm47081-luxul-xwr-1200.dts ++++ b/arch/arm/boot/dts/bcm47081-luxul-xwr-1200.dts +@@ -94,7 +94,7 @@ + gpio-keys { + compatible = "gpio-keys"; + +- restart { ++ button-restart { + label = "Reset"; + linux,code = ; + gpios = <&chipcommon 11 GPIO_ACTIVE_LOW>; +--- a/arch/arm/boot/dts/bcm47081-tplink-archer-c5-v2.dts ++++ b/arch/arm/boot/dts/bcm47081-tplink-archer-c5-v2.dts +@@ -77,13 +77,13 @@ + gpio-keys { + compatible = "gpio-keys"; + +- rfkill { ++ button-rfkill { + label = "WiFi"; + linux,code = ; + gpios = <&chipcommon 3 GPIO_ACTIVE_LOW>; + }; + +- restart { ++ button-restart { + label = "Reset"; + linux,code = ; + gpios = <&chipcommon 7 GPIO_ACTIVE_LOW>; +--- a/arch/arm/boot/dts/bcm4709-asus-rt-ac87u.dts ++++ b/arch/arm/boot/dts/bcm4709-asus-rt-ac87u.dts +@@ -50,13 +50,13 @@ + #address-cells = <1>; + #size-cells = <0>; + +- wps { ++ button-wps { + label = "WPS"; + linux,code = ; + gpios = <&chipcommon 2 GPIO_ACTIVE_LOW>; + }; + +- restart { ++ button-restart { + label = "Reset"; + linux,code = ; + gpios = <&chipcommon 11 GPIO_ACTIVE_LOW>; +--- a/arch/arm/boot/dts/bcm4709-buffalo-wxr-1900dhp.dts ++++ b/arch/arm/boot/dts/bcm4709-buffalo-wxr-1900dhp.dts +@@ -80,39 +80,39 @@ + #address-cells = <1>; + #size-cells = <0>; + +- power { ++ button-power { + label = "Power"; + linux,code = ; + gpios = <&chipcommon 1 GPIO_ACTIVE_LOW>; + }; + +- restart { ++ button-restart { + label = "Reset"; + linux,code = ; + gpios = <&chipcommon 15 GPIO_ACTIVE_LOW>; + }; + +- aoss { ++ button-aoss { + label = "AOSS"; + linux,code = ; + gpios = <&chipcommon 16 GPIO_ACTIVE_LOW>; + }; + + /* Commit mode set by switch? */ +- mode { ++ button-mode { + label = "Mode"; + linux,code = ; + gpios = <&chipcommon 17 GPIO_ACTIVE_LOW>; + }; + + /* Switch: AP mode */ +- sw_ap { ++ button-sw-ap { + label = "AP"; + linux,code = ; + gpios = <&chipcommon 18 GPIO_ACTIVE_LOW>; + }; + +- eject { ++ button-eject { + label = "USB eject"; + linux,code = ; + gpios = <&chipcommon 20 GPIO_ACTIVE_LOW>; +--- a/arch/arm/boot/dts/bcm4709-linksys-ea9200.dts ++++ b/arch/arm/boot/dts/bcm4709-linksys-ea9200.dts +@@ -32,13 +32,13 @@ + #address-cells = <1>; + #size-cells = <0>; + +- wps { ++ button-wps { + label = "WPS"; + linux,code = ; + gpios = <&chipcommon 3 GPIO_ACTIVE_LOW>; + }; + +- restart { ++ button-restart { + label = "Reset"; + linux,code = ; + gpios = <&chipcommon 17 GPIO_ACTIVE_LOW>; +--- a/arch/arm/boot/dts/bcm4709-netgear-r7000.dts ++++ b/arch/arm/boot/dts/bcm4709-netgear-r7000.dts +@@ -75,19 +75,19 @@ + #address-cells = <1>; + #size-cells = <0>; + +- wps { ++ button-wps { + label = "WPS"; + linux,code = ; + gpios = <&chipcommon 4 GPIO_ACTIVE_LOW>; + }; + +- rfkill { ++ button-rfkill { + label = "WiFi"; + linux,code = ; + gpios = <&chipcommon 5 GPIO_ACTIVE_LOW>; + }; + +- restart { ++ button-restart { + label = "Reset"; + linux,code = ; + gpios = <&chipcommon 6 GPIO_ACTIVE_LOW>; +--- a/arch/arm/boot/dts/bcm4709-netgear-r8000.dts ++++ b/arch/arm/boot/dts/bcm4709-netgear-r8000.dts +@@ -102,25 +102,25 @@ + #address-cells = <1>; + #size-cells = <0>; + +- rfkill { ++ button-rfkill { + label = "WiFi"; + linux,code = ; + gpios = <&chipcommon 4 GPIO_ACTIVE_LOW>; + }; + +- wps { ++ button-wps { + label = "WPS"; + linux,code = ; + gpios = <&chipcommon 5 GPIO_ACTIVE_LOW>; + }; + +- restart { ++ button-restart { + label = "Reset"; + linux,code = ; + gpios = <&chipcommon 6 GPIO_ACTIVE_LOW>; + }; + +- brightness { ++ button-brightness { + label = "Backlight"; + linux,code = ; + gpios = <&chipcommon 19 GPIO_ACTIVE_LOW>; +--- a/arch/arm/boot/dts/bcm4709-tplink-archer-c9-v1.dts ++++ b/arch/arm/boot/dts/bcm4709-tplink-archer-c9-v1.dts +@@ -80,13 +80,13 @@ + #address-cells = <1>; + #size-cells = <0>; + +- wps { ++ button-wps { + label = "WPS"; + linux,code = ; + gpios = <&chipcommon 0 GPIO_ACTIVE_LOW>; + }; + +- restart { ++ button-restart { + label = "Reset"; + linux,code = ; + gpios = <&chipcommon 3 GPIO_ACTIVE_LOW>; +--- a/arch/arm/boot/dts/bcm47094-asus-rt-ac88u.dts ++++ b/arch/arm/boot/dts/bcm47094-asus-rt-ac88u.dts +@@ -72,25 +72,25 @@ + gpio-keys { + compatible = "gpio-keys"; + +- wps { ++ button-wps { + label = "WPS"; + linux,code = ; + gpios = <&chipcommon 20 GPIO_ACTIVE_LOW>; + }; + +- reset { ++ button-reset { + label = "Reset"; + linux,code = ; + gpios = <&chipcommon 11 GPIO_ACTIVE_LOW>; + }; + +- wifi { ++ button-wifi { + label = "Wi-Fi"; + linux,code = ; + gpios = <&chipcommon 18 GPIO_ACTIVE_LOW>; + }; + +- led { ++ button-led { + label = "Backlight"; + linux,code = ; + gpios = <&chipcommon 4 GPIO_ACTIVE_LOW>; +--- a/arch/arm/boot/dts/bcm47094-dlink-dir-885l.dts ++++ b/arch/arm/boot/dts/bcm47094-dlink-dir-885l.dts +@@ -86,20 +86,20 @@ + gpio-keys { + compatible = "gpio-keys"; + +- wps { ++ button-wps { + label = "WPS"; + linux,code = ; + gpios = <&chipcommon 7 GPIO_ACTIVE_LOW>; + }; + + /* Switch: router / extender */ +- extender { ++ button-extender { + label = "Extender"; + linux,code = ; + gpios = <&chipcommon 10 GPIO_ACTIVE_LOW>; + }; + +- restart { ++ button-restart { + label = "Reset"; + linux,code = ; + gpios = <&chipcommon 17 GPIO_ACTIVE_LOW>; +--- a/arch/arm/boot/dts/bcm47094-linksys-panamera.dts ++++ b/arch/arm/boot/dts/bcm47094-linksys-panamera.dts +@@ -30,19 +30,19 @@ + gpio-keys { + compatible = "gpio-keys"; + +- wps { ++ button-wps { + label = "WPS"; + linux,code = ; + gpios = <&chipcommon 3 GPIO_ACTIVE_LOW>; + }; + +- rfkill { ++ button-rfkill { + label = "WiFi"; + linux,code = ; + gpios = <&chipcommon 16 GPIO_ACTIVE_LOW>; + }; + +- reset { ++ button-reset { + label = "Reset"; + linux,code = ; + gpios = <&chipcommon 17 GPIO_ACTIVE_LOW>; +--- a/arch/arm/boot/dts/bcm47094-luxul-abr-4500.dts ++++ b/arch/arm/boot/dts/bcm47094-luxul-abr-4500.dts +@@ -49,7 +49,7 @@ + gpio-keys { + compatible = "gpio-keys"; + +- restart { ++ button-restart { + label = "Reset"; + linux,code = ; + gpios = <&chipcommon 17 GPIO_ACTIVE_LOW>; +--- a/arch/arm/boot/dts/bcm47094-luxul-xap-1610.dts ++++ b/arch/arm/boot/dts/bcm47094-luxul-xap-1610.dts +@@ -43,7 +43,7 @@ + gpio-keys { + compatible = "gpio-keys"; + +- restart { ++ button-restart { + label = "Reset"; + linux,code = ; + gpios = <&chipcommon 17 GPIO_ACTIVE_LOW>; +--- a/arch/arm/boot/dts/bcm47094-luxul-xbr-4500.dts ++++ b/arch/arm/boot/dts/bcm47094-luxul-xbr-4500.dts +@@ -49,7 +49,7 @@ + gpio-keys { + compatible = "gpio-keys"; + +- restart { ++ button-restart { + label = "Reset"; + linux,code = ; + gpios = <&chipcommon 17 GPIO_ACTIVE_LOW>; +--- a/arch/arm/boot/dts/bcm47094-luxul-xwc-2000.dts ++++ b/arch/arm/boot/dts/bcm47094-luxul-xwc-2000.dts +@@ -37,7 +37,7 @@ + #address-cells = <1>; + #size-cells = <0>; + +- restart { ++ button-restart { + label = "Reset"; + linux,code = ; + gpios = <&chipcommon 19 GPIO_ACTIVE_LOW>; +--- a/arch/arm/boot/dts/bcm47094-luxul-xwr-3100.dts ++++ b/arch/arm/boot/dts/bcm47094-luxul-xwr-3100.dts +@@ -89,7 +89,7 @@ + gpio-keys { + compatible = "gpio-keys"; + +- restart { ++ button-restart { + label = "Reset"; + linux,code = ; + gpios = <&chipcommon 17 GPIO_ACTIVE_LOW>; +--- a/arch/arm/boot/dts/bcm47094-luxul-xwr-3150-v1.dts ++++ b/arch/arm/boot/dts/bcm47094-luxul-xwr-3150-v1.dts +@@ -67,7 +67,7 @@ + gpio-keys { + compatible = "gpio-keys"; + +- restart { ++ button-restart { + label = "Reset"; + linux,code = ; + gpios = <&chipcommon 17 GPIO_ACTIVE_LOW>; +--- a/arch/arm/boot/dts/bcm47094-netgear-r8500.dts ++++ b/arch/arm/boot/dts/bcm47094-netgear-r8500.dts +@@ -65,25 +65,25 @@ + gpio-keys { + compatible = "gpio-keys"; + +- brightness { ++ button-brightness { + label = "Backlight"; + linux,code = ; + gpios = <&chipcommon 1 GPIO_ACTIVE_LOW>; + }; + +- restart { ++ button-restart { + label = "Reset"; + linux,code = ; + gpios = <&chipcommon 10 GPIO_ACTIVE_LOW>; + }; + +- wps { ++ button-wps { + label = "WPS"; + linux,code = ; + gpios = <&chipcommon 14 GPIO_ACTIVE_LOW>; + }; + +- rfkill { ++ button-rfkill { + label = "WiFi"; + linux,code = ; + gpios = <&chipcommon 20 GPIO_ACTIVE_LOW>; +--- a/arch/arm/boot/dts/bcm47094-phicomm-k3.dts ++++ b/arch/arm/boot/dts/bcm47094-phicomm-k3.dts +@@ -22,7 +22,7 @@ + gpio-keys { + compatible = "gpio-keys"; + +- restart { ++ button-restart { + label = "Reset"; + linux,code = ; + gpios = <&chipcommon 17 GPIO_ACTIVE_LOW>; +--- a/arch/arm/boot/dts/bcm47189-luxul-xap-1440.dts ++++ b/arch/arm/boot/dts/bcm47189-luxul-xap-1440.dts +@@ -39,7 +39,7 @@ + gpio-keys { + compatible = "gpio-keys"; + +- restart { ++ button-restart { + label = "Reset"; + linux,code = ; + gpios = <&chipcommon 7 GPIO_ACTIVE_LOW>; +--- a/arch/arm/boot/dts/bcm47189-luxul-xap-810.dts ++++ b/arch/arm/boot/dts/bcm47189-luxul-xap-810.dts +@@ -49,7 +49,7 @@ + gpio-keys { + compatible = "gpio-keys"; + +- restart { ++ button-restart { + label = "Reset"; + linux,code = ; + gpios = <&chipcommon 7 GPIO_ACTIVE_LOW>; +--- a/arch/arm/boot/dts/bcm47189-tenda-ac9.dts ++++ b/arch/arm/boot/dts/bcm47189-tenda-ac9.dts +@@ -59,19 +59,19 @@ + gpio-keys { + compatible = "gpio-keys"; + +- rfkill { ++ button-rfkill { + label = "WiFi"; + linux,code = ; + gpios = <&chipcommon 3 GPIO_ACTIVE_LOW>; + }; + +- restart { ++ button-restart { + label = "Reset"; + linux,code = ; + gpios = <&chipcommon 7 GPIO_ACTIVE_LOW>; + }; + +- wps { ++ button-wps { + label = "WPS"; + linux,code = ; + gpios = <&chipcommon 9 GPIO_ACTIVE_LOW>; +--- a/arch/arm/boot/dts/bcm53016-meraki-mr32.dts ++++ b/arch/arm/boot/dts/bcm53016-meraki-mr32.dts +@@ -50,7 +50,7 @@ + #address-cells = <1>; + #size-cells = <0>; + +- restart { ++ button-restart { + label = "Reset"; + linux,code = ; + gpios = <&chipcommon 21 GPIO_ACTIVE_LOW>; +--- a/arch/arm/boot/dts/bcm911360_entphn.dts ++++ b/arch/arm/boot/dts/bcm911360_entphn.dts +@@ -47,10 +47,10 @@ + stdout-path = "serial0:115200n8"; + }; + +- gpio_keys { ++ gpio-keys { + compatible = "gpio-keys"; + +- hook { ++ button-hook { + label = "HOOK"; + linux,code = ; + gpios = <&gpio_asiu 48 0>; +--- a/arch/arm/boot/dts/bcm947189acdbmr.dts ++++ b/arch/arm/boot/dts/bcm947189acdbmr.dts +@@ -44,13 +44,13 @@ + gpio-keys { + compatible = "gpio-keys"; + +- restart { ++ button-restart { + label = "Reset"; + linux,code = ; + gpios = <&chipcommon 7 GPIO_ACTIVE_HIGH>; + }; + +- wps { ++ button-wps { + label = "WPS"; + linux,code = ; + gpios = <&chipcommon 9 GPIO_ACTIVE_LOW>; +--- a/arch/arm/boot/dts/bcm953012er.dts ++++ b/arch/arm/boot/dts/bcm953012er.dts +@@ -47,13 +47,13 @@ + gpio-keys { + compatible = "gpio-keys"; + +- wps { ++ button-wps { + label = "WPS"; + linux,code = ; + gpios = <&chipcommon 6 GPIO_ACTIVE_LOW>; + }; + +- restart { ++ button-restart { + label = "Reset"; + linux,code = ; + gpios = <&chipcommon 15 GPIO_ACTIVE_LOW>; +--- a/arch/arm/boot/dts/bcm958625-meraki-alamo.dtsi ++++ b/arch/arm/boot/dts/bcm958625-meraki-alamo.dtsi +@@ -13,7 +13,7 @@ + autorepeat; + poll-interval = <20>; + +- reset { ++ button-reset { + label = "reset"; + linux,code = ; + gpios = <&gpioa 8 GPIO_ACTIVE_LOW>; +--- a/arch/arm/boot/dts/bcm958625-meraki-kingpin.dtsi ++++ b/arch/arm/boot/dts/bcm958625-meraki-kingpin.dtsi +@@ -14,7 +14,7 @@ + autorepeat; + poll-interval = <20>; + +- reset { ++ button-reset { + label = "reset"; + linux,code = ; + gpios = <&gpioa 6 GPIO_ACTIVE_LOW>; diff --git a/target/linux/bcm53xx/patches-5.10/037-v6.0-0002-ARM-dts-broadcom-correct-gpio-keys-properties.patch b/target/linux/bcm53xx/patches-5.10/037-v6.0-0002-ARM-dts-broadcom-correct-gpio-keys-properties.patch new file mode 100644 index 0000000000..7bded431b0 --- /dev/null +++ b/target/linux/bcm53xx/patches-5.10/037-v6.0-0002-ARM-dts-broadcom-correct-gpio-keys-properties.patch @@ -0,0 +1,108 @@ +From d634a6969c03803a945fdc2bccbe7d813420e569 Mon Sep 17 00:00:00 2001 +From: Krzysztof Kozlowski +Date: Thu, 9 Jun 2022 13:39:31 +0200 +Subject: [PATCH] ARM: dts: broadcom: correct gpio-keys properties + +gpio-keys children do not use unit addresses. + +Signed-off-by: Krzysztof Kozlowski +Signed-off-by: Florian Fainelli +--- + arch/arm/boot/dts/bcm4709-asus-rt-ac87u.dts | 2 -- + arch/arm/boot/dts/bcm4709-buffalo-wxr-1900dhp.dts | 2 -- + arch/arm/boot/dts/bcm4709-linksys-ea9200.dts | 2 -- + arch/arm/boot/dts/bcm4709-netgear-r7000.dts | 2 -- + arch/arm/boot/dts/bcm4709-netgear-r8000.dts | 2 -- + arch/arm/boot/dts/bcm4709-tplink-archer-c9-v1.dts | 2 -- + arch/arm/boot/dts/bcm47094-luxul-xwc-2000.dts | 2 -- + arch/arm/boot/dts/bcm53016-meraki-mr32.dts | 2 -- + 8 files changed, 16 deletions(-) + +--- a/arch/arm/boot/dts/bcm4709-asus-rt-ac87u.dts ++++ b/arch/arm/boot/dts/bcm4709-asus-rt-ac87u.dts +@@ -47,8 +47,6 @@ + + gpio-keys { + compatible = "gpio-keys"; +- #address-cells = <1>; +- #size-cells = <0>; + + button-wps { + label = "WPS"; +--- a/arch/arm/boot/dts/bcm4709-buffalo-wxr-1900dhp.dts ++++ b/arch/arm/boot/dts/bcm4709-buffalo-wxr-1900dhp.dts +@@ -77,8 +77,6 @@ + + gpio-keys { + compatible = "gpio-keys"; +- #address-cells = <1>; +- #size-cells = <0>; + + button-power { + label = "Power"; +--- a/arch/arm/boot/dts/bcm4709-linksys-ea9200.dts ++++ b/arch/arm/boot/dts/bcm4709-linksys-ea9200.dts +@@ -29,8 +29,6 @@ + + gpio-keys { + compatible = "gpio-keys"; +- #address-cells = <1>; +- #size-cells = <0>; + + button-wps { + label = "WPS"; +--- a/arch/arm/boot/dts/bcm4709-netgear-r7000.dts ++++ b/arch/arm/boot/dts/bcm4709-netgear-r7000.dts +@@ -72,8 +72,6 @@ + + gpio-keys { + compatible = "gpio-keys"; +- #address-cells = <1>; +- #size-cells = <0>; + + button-wps { + label = "WPS"; +--- a/arch/arm/boot/dts/bcm4709-netgear-r8000.dts ++++ b/arch/arm/boot/dts/bcm4709-netgear-r8000.dts +@@ -99,8 +99,6 @@ + + gpio-keys { + compatible = "gpio-keys"; +- #address-cells = <1>; +- #size-cells = <0>; + + button-rfkill { + label = "WiFi"; +--- a/arch/arm/boot/dts/bcm4709-tplink-archer-c9-v1.dts ++++ b/arch/arm/boot/dts/bcm4709-tplink-archer-c9-v1.dts +@@ -77,8 +77,6 @@ + + gpio-keys { + compatible = "gpio-keys"; +- #address-cells = <1>; +- #size-cells = <0>; + + button-wps { + label = "WPS"; +--- a/arch/arm/boot/dts/bcm47094-luxul-xwc-2000.dts ++++ b/arch/arm/boot/dts/bcm47094-luxul-xwc-2000.dts +@@ -34,8 +34,6 @@ + + gpio-keys { + compatible = "gpio-keys"; +- #address-cells = <1>; +- #size-cells = <0>; + + button-restart { + label = "Reset"; +--- a/arch/arm/boot/dts/bcm53016-meraki-mr32.dts ++++ b/arch/arm/boot/dts/bcm53016-meraki-mr32.dts +@@ -47,8 +47,6 @@ + + keys { + compatible = "gpio-keys"; +- #address-cells = <1>; +- #size-cells = <0>; + + button-restart { + label = "Reset"; diff --git a/target/linux/bcm53xx/patches-5.10/038-v6.1-0001-ARM-dts-BCM5301X-Correct-description-of-TP-Link-part.patch b/target/linux/bcm53xx/patches-5.10/038-v6.1-0001-ARM-dts-BCM5301X-Correct-description-of-TP-Link-part.patch new file mode 100644 index 0000000000..4c4ed036b9 --- /dev/null +++ b/target/linux/bcm53xx/patches-5.10/038-v6.1-0001-ARM-dts-BCM5301X-Correct-description-of-TP-Link-part.patch @@ -0,0 +1,99 @@ +From c8ee9f119bfb4244f76c9971c341ec06b49332cd Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= +Date: Tue, 8 Nov 2022 12:07:08 +0100 +Subject: [PATCH] ARM: dts: BCM5301X: Correct description of TP-Link partitions +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +TP-Link routers have flash space partitioned according to the partitions +table. It may look like fixed partitioning but those partitions can be +actually reorganized. New can be added (or some removed), offsets and +sizes may change. + +Fix DT to use binding for the TP-Link SafeLoader partitioning method. + +Signed-off-by: Rafał Miłecki +Link: https://lore.kernel.org/r/20221108110708.13693-1-zajec5@gmail.com +Signed-off-by: Florian Fainelli +--- + .../boot/dts/bcm47081-tplink-archer-c5-v2.dts | 25 ++++--------------- + .../boot/dts/bcm4709-tplink-archer-c9-v1.dts | 25 ++++--------------- + 2 files changed, 10 insertions(+), 40 deletions(-) + +--- a/arch/arm/boot/dts/bcm47081-tplink-archer-c5-v2.dts ++++ b/arch/arm/boot/dts/bcm47081-tplink-archer-c5-v2.dts +@@ -95,30 +95,15 @@ + status = "okay"; + + partitions { +- compatible = "fixed-partitions"; +- #address-cells = <1>; +- #size-cells = <1>; ++ compatible = "tplink,safeloader-partitions"; ++ partitions-table-offset = <0xe50000>; + +- boot@0 { +- label = "boot"; +- reg = <0x000000 0x040000>; +- read-only; +- }; +- +- os-image@100000 { +- label = "os-image"; +- reg = <0x040000 0x200000>; ++ partition-os-image { + compatible = "brcm,trx"; + }; + +- rootfs@240000 { +- label = "rootfs"; +- reg = <0x240000 0xc00000>; +- }; +- +- nvram@ff0000 { +- label = "nvram"; +- reg = <0xff0000 0x010000>; ++ partition-file-system { ++ linux,rootfs; + }; + }; + }; +--- a/arch/arm/boot/dts/bcm4709-tplink-archer-c9-v1.dts ++++ b/arch/arm/boot/dts/bcm4709-tplink-archer-c9-v1.dts +@@ -104,30 +104,15 @@ + status = "okay"; + + partitions { +- compatible = "fixed-partitions"; +- #address-cells = <1>; +- #size-cells = <1>; ++ compatible = "tplink,safeloader-partitions"; ++ partitions-table-offset = <0xe50000>; + +- boot@0 { +- label = "boot"; +- reg = <0x000000 0x040000>; +- read-only; +- }; +- +- os-image@100000 { +- label = "os-image"; +- reg = <0x040000 0x200000>; ++ partition-os-image { + compatible = "brcm,trx"; + }; + +- rootfs@240000 { +- label = "rootfs"; +- reg = <0x240000 0xc00000>; +- }; +- +- nvram@ff0000 { +- label = "nvram"; +- reg = <0xff0000 0x010000>; ++ partition-file-system { ++ linux,rootfs; + }; + }; + }; diff --git a/target/linux/bcm53xx/patches-5.10/038-v6.1-0001-ARM-dts-bcm47094-Add-devicetree-for-D-Link-DIR-890L.patch b/target/linux/bcm53xx/patches-5.10/038-v6.1-0001-ARM-dts-bcm47094-Add-devicetree-for-D-Link-DIR-890L.patch new file mode 100644 index 0000000000..e921e55461 --- /dev/null +++ b/target/linux/bcm53xx/patches-5.10/038-v6.1-0001-ARM-dts-bcm47094-Add-devicetree-for-D-Link-DIR-890L.patch @@ -0,0 +1,242 @@ +From b1ba87897ceda8e49a47aa92832dd7bff8583e21 Mon Sep 17 00:00:00 2001 +From: Linus Walleij +Date: Mon, 7 Nov 2022 14:41:04 +0100 +Subject: [PATCH] ARM: dts: bcm47094: Add devicetree for D-Link DIR-890L + +This adds a device tree for the D-Link DIR-890L. This device +is very similar to D-Link DIR-885L, the differences are detailed +as a comment in the DTS file. + +Signed-off-by: Linus Walleij +Link: https://lore.kernel.org/r/20221107134104.1422169-2-linus.walleij@linaro.org +Signed-off-by: Florian Fainelli +--- + arch/arm/boot/dts/Makefile | 1 + + arch/arm/boot/dts/bcm47094-dlink-dir-890l.dts | 211 ++++++++++++++++++ + 2 files changed, 212 insertions(+) + create mode 100644 arch/arm/boot/dts/bcm47094-dlink-dir-890l.dts + +--- a/arch/arm/boot/dts/Makefile ++++ b/arch/arm/boot/dts/Makefile +@@ -122,6 +122,7 @@ dtb-$(CONFIG_ARCH_BCM_5301X) += \ + bcm4709-tplink-archer-c9-v1.dtb \ + bcm47094-asus-rt-ac88u.dtb \ + bcm47094-dlink-dir-885l.dtb \ ++ bcm47094-dlink-dir-890l.dtb \ + bcm47094-linksys-panamera.dtb \ + bcm47094-luxul-abr-4500.dtb \ + bcm47094-luxul-xap-1610.dtb \ +--- /dev/null ++++ b/arch/arm/boot/dts/bcm47094-dlink-dir-890l.dts +@@ -0,0 +1,211 @@ ++// SPDX-License-Identifier: GPL-2.0-or-later OR MIT ++/* ++ * Device tree for D-Link DIR-890L ++ * D-Link calls this board "WRGAC36" ++ * this router has the same looks and form factor as D-Link DIR-885L. ++ * ++ * Some differences from DIR-885L include a separate USB2 port, separate LEDs ++ * for USB2 and USB3, a separate VCC supply for the USB2 slot and no ++ * router/extender switch is mounted (there is an empty mount point on the ++ * PCB) so this device is a pure router. Also the LAN ports are in the right ++ * order. ++ * ++ * Based on the device tree for DIR-885L ++ * Copyright (C) 2016 Rafał Miłecki ++ * Copyright (C) 2022 Linus Walleij ++ */ ++ ++/dts-v1/; ++ ++#include "bcm47094.dtsi" ++#include "bcm5301x-nand-cs0-bch1.dtsi" ++ ++/ { ++ compatible = "dlink,dir-890l", "brcm,bcm47094", "brcm,bcm4708"; ++ model = "D-Link DIR-890L"; ++ ++ chosen { ++ bootargs = "console=ttyS0,115200 earlycon"; ++ }; ++ ++ memory@0 { ++ device_type = "memory"; ++ reg = <0x00000000 0x08000000>, ++ <0x88000000 0x08000000>; ++ }; ++ ++ leds { ++ /* ++ * LED information is derived from the boot log which ++ * conveniently lists all the LEDs. ++ */ ++ compatible = "gpio-leds"; ++ ++ power-white { ++ label = "bcm53xx:white:power"; ++ gpios = <&chipcommon 0 GPIO_ACTIVE_LOW>; ++ linux,default-trigger = "default-on"; ++ }; ++ ++ wan-white { ++ label = "bcm53xx:white:wan"; ++ gpios = <&chipcommon 1 GPIO_ACTIVE_LOW>; ++ }; ++ ++ power-amber { ++ label = "bcm53xx:amber:power"; ++ gpios = <&chipcommon 2 GPIO_ACTIVE_LOW>; ++ }; ++ ++ wan-amber { ++ label = "bcm53xx:amber:wan"; ++ gpios = <&chipcommon 3 GPIO_ACTIVE_LOW>; ++ }; ++ ++ usb3-white { ++ label = "bcm53xx:white:usb3"; ++ gpios = <&chipcommon 8 GPIO_ACTIVE_LOW>; ++ trigger-sources = <&xhci_port1>; ++ linux,default-trigger = "usbport"; ++ }; ++ ++ usb2-white { ++ label = "bcm53xx:white:usb2"; ++ gpios = <&chipcommon 15 GPIO_ACTIVE_LOW>; ++ trigger-sources = <&ohci_port1>, <&ehci_port1>; ++ linux,default-trigger = "usbport"; ++ }; ++ ++ 2ghz { ++ label = "bcm53xx:white:2ghz"; ++ gpios = <&chipcommon 13 GPIO_ACTIVE_LOW>; ++ }; ++ ++ 5ghz { ++ label = "bcm53xx:white:5ghz"; ++ gpios = <&chipcommon 14 GPIO_ACTIVE_LOW>; ++ }; ++ }; ++ ++ gpio-keys { ++ compatible = "gpio-keys"; ++ ++ button-wps { ++ label = "WPS"; ++ linux,code = ; ++ gpios = <&chipcommon 7 GPIO_ACTIVE_LOW>; ++ }; ++ ++ /* Called "factory reset" in the vendor dmesg */ ++ button-restart { ++ label = "Reset"; ++ linux,code = ; ++ gpios = <&chipcommon 17 GPIO_ACTIVE_LOW>; ++ }; ++ }; ++ ++ /* ++ * The flash memory is memory mapped at 0x1e000000-0x1fffffff ++ * 64KB blocks; total size 2MB, same that can be ++ * found attached to the spi_nor SPI controller. ++ */ ++ nvram@1e1f0000 { ++ compatible = "brcm,nvram"; ++ reg = <0x1e1f0000 0x00010000>; ++ ++ et0macaddr: et0macaddr { ++ }; ++ }; ++}; ++ ++&gmac2 { ++ /* ++ * The NVRAM curiously does not contain a MAC address ++ * for et2 so since that is the only ethernet interface ++ * actually in use on the platform, we use this et0 MAC ++ * address for et2. ++ */ ++ nvmem-cells = <&et0macaddr>; ++ nvmem-cell-names = "mac-address"; ++}; ++ ++&spi_nor { ++ status = "okay"; ++}; ++ ++&nandcs { ++ /* Spansion S34ML01G2, 128MB with 128KB erase blocks */ ++ partitions { ++ compatible = "fixed-partitions"; ++ #address-cells = <1>; ++ #size-cells = <1>; ++ ++ /* ++ * This is called "nflash" in the vendor kernel with ++ * "upgrade" and "rootfs" (probably using OpenWrt ++ * splitpart). We call it "firmware" like standard tools ++ * assume. The CFE loader contains incorrect information ++ * about TRX partitions, ignore this, there are no TRX ++ * partitions: this device uses SEAMA. ++ */ ++ firmware@0 { ++ label = "firmware"; ++ reg = <0x00000000 0x08000000>; ++ }; ++ }; ++}; ++ ++&usb2 { ++ vcc-gpios = <&chipcommon 21 GPIO_ACTIVE_HIGH>; ++}; ++ ++&usb3 { ++ vcc-gpios = <&chipcommon 18 GPIO_ACTIVE_HIGH>; ++}; ++ ++&usb3_phy { ++ status = "okay"; ++}; ++ ++&srab { ++ status = "okay"; ++ ++ ports { ++ port@0 { ++ reg = <0>; ++ label = "lan1"; ++ }; ++ ++ port@1 { ++ reg = <1>; ++ label = "lan2"; ++ }; ++ ++ port@2 { ++ reg = <2>; ++ label = "lan3"; ++ }; ++ ++ port@3 { ++ reg = <3>; ++ label = "lan4"; ++ }; ++ ++ port@4 { ++ reg = <4>; ++ label = "wan"; ++ }; ++ ++ port@8 { ++ reg = <8>; ++ label = "cpu"; ++ ethernet = <&gmac2>; ++ phy-mode = "rgmii"; ++ ++ fixed-link { ++ speed = <1000>; ++ full-duplex; ++ }; ++ }; ++ }; ++}; diff --git a/target/linux/bcm53xx/patches-5.10/038-v6.1-0001-ARM-dts-bcm53016-Add-devicetree-for-D-Link-DWL-8610A.patch b/target/linux/bcm53xx/patches-5.10/038-v6.1-0001-ARM-dts-bcm53016-Add-devicetree-for-D-Link-DWL-8610A.patch new file mode 100644 index 0000000000..c02c80065b --- /dev/null +++ b/target/linux/bcm53xx/patches-5.10/038-v6.1-0001-ARM-dts-bcm53016-Add-devicetree-for-D-Link-DWL-8610A.patch @@ -0,0 +1,165 @@ +From 9f66e1dd82e3186aee95282657512ca2aef1afe0 Mon Sep 17 00:00:00 2001 +From: Linus Walleij +Date: Wed, 19 Oct 2022 21:34:49 +0200 +Subject: [PATCH] ARM: dts: bcm53016: Add devicetree for D-Link DWL-8610AP + +This adds a device tree for the BCM53016-based D-Link DWL-8610AP +access point wireless router. + +The TRX-format partitions had to be named "firmware" due to +an OpenWrt patch that only accepts parting such nodes if they +are named "firmware". + +Signed-off-by: Linus Walleij +Link: https://lore.kernel.org/r/20221019193449.3036010-2-linus.walleij@linaro.org +Signed-off-by: Florian Fainelli +--- + arch/arm/boot/dts/Makefile | 1 + + .../boot/dts/bcm53016-dlink-dwl-8610ap.dts | 131 ++++++++++++++++++ + 2 files changed, 132 insertions(+) + create mode 100644 arch/arm/boot/dts/bcm53016-dlink-dwl-8610ap.dts + +--- a/arch/arm/boot/dts/Makefile ++++ b/arch/arm/boot/dts/Makefile +@@ -133,6 +133,7 @@ dtb-$(CONFIG_ARCH_BCM_5301X) += \ + bcm47094-netgear-r8500.dtb \ + bcm47094-phicomm-k3.dtb \ + bcm53015-meraki-mr26.dtb \ ++ bcm53016-dlink-dwl-8610ap.dtb \ + bcm53016-meraki-mr32.dtb \ + bcm94708.dtb \ + bcm94709.dtb \ +--- /dev/null ++++ b/arch/arm/boot/dts/bcm53016-dlink-dwl-8610ap.dts +@@ -0,0 +1,131 @@ ++// SPDX-License-Identifier: GPL-2.0-or-later OR MIT ++/dts-v1/; ++ ++#include "bcm4709.dtsi" ++#include "bcm5301x-nand-cs0-bch8.dtsi" ++#include ++#include ++ ++/ { ++ model = "D-Link DWL-8610AP"; ++ compatible = "dlink,dwl-8610ap", "brcm,bcm53016", "brcm,bcm4708"; ++ ++ memory@0 { ++ device_type = "memory"; ++ /* 512 MB RAM in 2 x Macronix D9PSH chips */ ++ reg = <0x00000000 0x08000000>, ++ <0x88000000 0x08000000>; ++ }; ++ ++ leds { ++ compatible = "gpio-leds"; ++ ++ power { ++ function = LED_FUNCTION_POWER; ++ color = ; ++ gpios = <&chipcommon 0 GPIO_ACTIVE_LOW>; ++ default-state = "on"; ++ }; ++ ++ diag { ++ /* Actually "diag" unclear what this means */ ++ function = LED_FUNCTION_INDICATOR; ++ color = ; ++ gpios = <&chipcommon 1 GPIO_ACTIVE_LOW>; ++ default-state = "on"; ++ linux,default-trigger = "heartbeat"; ++ }; ++ ++ wlan-2g { ++ function = LED_FUNCTION_WLAN; ++ color = ; ++ gpios = <&chipcommon 5 GPIO_ACTIVE_LOW>; ++ }; ++ ++ wlan-5g { ++ function = LED_FUNCTION_WLAN; ++ color = ; ++ gpios = <&chipcommon 8 GPIO_ACTIVE_LOW>; ++ }; ++ }; ++ ++ gpio_keys { ++ compatible = "gpio-keys"; ++ ++ button-reset { ++ debounce-interval = <100>; ++ wakeup-source; ++ linux,code = ; ++ label = "reset"; ++ /* This GPIO is actually stored in NVRAM, but it's not gonna change */ ++ gpios = <&chipcommon 4 GPIO_ACTIVE_LOW>; ++ }; ++ }; ++ ++ /* ++ * Flash memory at 0x1e000000-0x1fffffff ++ * Macronix 32 64KB blocks; total size 2MB, same that can be ++ * found attached to the spi_nor SPI controller. ++ */ ++ nvram@1e080000 { ++ compatible = "brcm,nvram"; ++ reg = <0x1e080000 0x00020000>; ++ ++ et0macaddr: et0macaddr { ++ }; ++ ++ et1macaddr: et1macaddr { ++ }; ++ }; ++}; ++ ++&gmac0 { ++ nvmem-cells = <&et0macaddr>; ++ nvmem-cell-names = "mac-address"; ++}; ++ ++&gmac1 { ++ nvmem-cells = <&et1macaddr>; ++ nvmem-cell-names = "mac-address"; ++}; ++ ++&spi_nor { ++ /* Serial SPI NOR Flash MX 25L1606E */ ++ status = "okay"; ++}; ++ ++&nandcs { ++ /* ++ * Spansion S34ML01G100TFI00 128 MB NAND Flash memory ++ * ++ * This ECC is a bit unorthodox but it is what the stock firmware ++ * is using, so to be able to mount the original partitions ++ * this is necessary. ++ */ ++ nand-ecc-strength = <5>; ++ partitions { ++ compatible = "fixed-partitions"; ++ #address-cells = <1>; ++ #size-cells = <1>; ++ ++ /* This is named nflash1.trx in CFE */ ++ trx@0 { ++ label = "firmware"; ++ reg = <0x00000000 0x02800000>; ++ compatible = "brcm,trx"; ++ }; ++ ++ /* This is named nflash1.trx2 in CFE */ ++ trx2@2800000 { ++ label = "firmware2"; ++ reg = <0x02800000 0x02800000>; ++ compatible = "brcm,trx"; ++ }; ++ ++ /* This is named nflash1.rwfs in CFE */ ++ free@5000000 { ++ label = "free"; ++ reg = <0x05000000 0x03000000>; ++ }; ++ }; ++}; diff --git a/target/linux/bcm53xx/patches-5.10/304-ARM-dts-BCM5301X-Specify-switch-ports-for-remaining-.patch b/target/linux/bcm53xx/patches-5.10/304-ARM-dts-BCM5301X-Specify-switch-ports-for-remaining-.patch index d20fe71d48..0fb29e99d3 100644 --- a/target/linux/bcm53xx/patches-5.10/304-ARM-dts-BCM5301X-Specify-switch-ports-for-remaining-.patch +++ b/target/linux/bcm53xx/patches-5.10/304-ARM-dts-BCM5301X-Specify-switch-ports-for-remaining-.patch @@ -311,7 +311,7 @@ Signed-off-by: Rafał Miłecki +}; --- a/arch/arm/boot/dts/bcm4709-asus-rt-ac87u.dts +++ b/arch/arm/boot/dts/bcm4709-asus-rt-ac87u.dts -@@ -68,6 +68,38 @@ +@@ -66,6 +66,38 @@ status = "okay"; }; @@ -352,7 +352,7 @@ Signed-off-by: Rafał Miłecki compatible = "fixed-partitions"; --- a/arch/arm/boot/dts/bcm4709-buffalo-wxr-1900dhp.dts +++ b/arch/arm/boot/dts/bcm4709-buffalo-wxr-1900dhp.dts -@@ -132,3 +132,40 @@ +@@ -130,3 +130,40 @@ &usb3_phy { status = "okay"; }; @@ -395,7 +395,7 @@ Signed-off-by: Rafał Miłecki +}; --- a/arch/arm/boot/dts/bcm4709-linksys-ea9200.dts +++ b/arch/arm/boot/dts/bcm4709-linksys-ea9200.dts -@@ -49,3 +49,45 @@ +@@ -47,3 +47,45 @@ &usb3_phy { status = "okay"; }; @@ -443,7 +443,7 @@ Signed-off-by: Rafał Miłecki +}; --- a/arch/arm/boot/dts/bcm4709-netgear-r7000.dts +++ b/arch/arm/boot/dts/bcm4709-netgear-r7000.dts -@@ -106,3 +106,40 @@ +@@ -104,3 +104,40 @@ &usb3_phy { status = "okay"; }; @@ -621,7 +621,7 @@ Signed-off-by: Rafał Miłecki --- a/arch/arm/boot/dts/bcm4709-tplink-archer-c9-v1.dts +++ b/arch/arm/boot/dts/bcm4709-tplink-archer-c9-v1.dts -@@ -102,6 +102,43 @@ +@@ -100,6 +100,43 @@ vcc-gpio = <&chipcommon 12 GPIO_ACTIVE_HIGH>; }; diff --git a/target/linux/bcm53xx/patches-5.10/310-ARM-BCM5301X-Add-DT-for-Netgear-R7900.patch b/target/linux/bcm53xx/patches-5.10/310-ARM-BCM5301X-Add-DT-for-Netgear-R7900.patch index 7c2dad6ae2..923b4a0f37 100644 --- a/target/linux/bcm53xx/patches-5.10/310-ARM-BCM5301X-Add-DT-for-Netgear-R7900.patch +++ b/target/linux/bcm53xx/patches-5.10/310-ARM-BCM5301X-Add-DT-for-Netgear-R7900.patch @@ -9,7 +9,7 @@ Signed-off-by: Rafał Miłecki --- a/arch/arm/boot/dts/Makefile +++ b/arch/arm/boot/dts/Makefile -@@ -116,6 +116,7 @@ dtb-$(CONFIG_ARCH_BCM_5301X) += \ +@@ -118,6 +118,7 @@ dtb-$(CONFIG_ARCH_BCM_5301X) += \ bcm4709-buffalo-wxr-1900dhp.dtb \ bcm4709-linksys-ea9200.dtb \ bcm4709-netgear-r7000.dtb \ diff --git a/target/linux/bcm53xx/patches-5.15/033-v5.19-0002-ARM-dts-BCM5301X-Fix-DTC-warning-for-NAND-node.patch b/target/linux/bcm53xx/patches-5.15/033-v5.19-0002-ARM-dts-BCM5301X-Fix-DTC-warning-for-NAND-node.patch new file mode 100644 index 0000000000..e61fef8aab --- /dev/null +++ b/target/linux/bcm53xx/patches-5.15/033-v5.19-0002-ARM-dts-BCM5301X-Fix-DTC-warning-for-NAND-node.patch @@ -0,0 +1,31 @@ +From 90103611d573c5c238350f9b1d7cb682c62f5681 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Ar=C4=B1n=C3=A7=20=C3=9CNAL?= +Date: Fri, 1 Apr 2022 13:19:58 +0300 +Subject: [PATCH] ARM: dts: BCM5301X: Fix DTC warning for NAND node +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Remove the unnecessary #address-cells and #size-cells properties on the +nand@0 node to fix the warning below. + +Warning (avoid_unnecessary_addr_size): /nand-controller@18028000/nand@0: unnecessary #address-cells/#size-cells without "ranges" or child "reg" property + +Signed-off-by: Arınç ÜNAL +Acked-by: Rafał Miłecki +Signed-off-by: Florian Fainelli +--- + arch/arm/boot/dts/bcm5301x-nand-cs0.dtsi | 2 -- + 1 file changed, 2 deletions(-) + +--- a/arch/arm/boot/dts/bcm5301x-nand-cs0.dtsi ++++ b/arch/arm/boot/dts/bcm5301x-nand-cs0.dtsi +@@ -10,8 +10,6 @@ + nandcs: nand@0 { + compatible = "brcm,nandcs"; + reg = <0>; +- #address-cells = <1>; +- #size-cells = <1>; + + partitions { + compatible = "brcm,bcm947xx-cfe-partitions"; diff --git a/target/linux/bcm53xx/patches-5.15/033-v5.19-0003-ARM-dts-BCM5301X-Remove-cell-properties-from-srab-po.patch b/target/linux/bcm53xx/patches-5.15/033-v5.19-0003-ARM-dts-BCM5301X-Remove-cell-properties-from-srab-po.patch new file mode 100644 index 0000000000..6ef8720b1d --- /dev/null +++ b/target/linux/bcm53xx/patches-5.15/033-v5.19-0003-ARM-dts-BCM5301X-Remove-cell-properties-from-srab-po.patch @@ -0,0 +1,40 @@ +From e5ff0a7aab3ef5dd8ec7636b936c95179aa5ddfa Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Ar=C4=B1n=C3=A7=20=C3=9CNAL?= +Date: Fri, 1 Apr 2022 13:19:59 +0300 +Subject: [PATCH] ARM: dts: BCM5301X: Remove cell properties from srab ports on + Asus RT-AC88U +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Remove #address-cells and #size-cells properties from the ports node of +&srab. They are already defined on bcm5301x.dtsi, there's no need to define +them again. + +Signed-off-by: Arınç ÜNAL +Acked-by: Rafał Miłecki +Signed-off-by: Florian Fainelli +--- + arch/arm/boot/dts/bcm47094-asus-rt-ac88u.dts | 5 +---- + 1 file changed, 1 insertion(+), 4 deletions(-) + +--- a/arch/arm/boot/dts/bcm47094-asus-rt-ac88u.dts ++++ b/arch/arm/boot/dts/bcm47094-asus-rt-ac88u.dts +@@ -1,6 +1,6 @@ + // SPDX-License-Identifier: GPL-2.0-or-later OR MIT + /* +- * Copyright (C) 2021 Arınç ÜNAL ++ * Copyright (C) 2021-2022 Arınç ÜNAL + */ + + /dts-v1/; +@@ -177,9 +177,6 @@ + dsa,member = <0 0>; + + ports { +- #address-cells = <1>; +- #size-cells = <0>; +- + port@0 { + reg = <0>; + label = "lan4"; diff --git a/target/linux/bcm53xx/patches-5.15/033-v5.19-0004-ARM-dts-BCM5301X-Add-rgmii-to-port-5-of-Broadcom-swi.patch b/target/linux/bcm53xx/patches-5.15/033-v5.19-0004-ARM-dts-BCM5301X-Add-rgmii-to-port-5-of-Broadcom-swi.patch new file mode 100644 index 0000000000..aa192b3a11 --- /dev/null +++ b/target/linux/bcm53xx/patches-5.15/033-v5.19-0004-ARM-dts-BCM5301X-Add-rgmii-to-port-5-of-Broadcom-swi.patch @@ -0,0 +1,29 @@ +From 4b7a67420a34ebd8fbf0111221a8bfd8001d418d Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Ar=C4=B1n=C3=A7=20=C3=9CNAL?= +Date: Fri, 1 Apr 2022 13:20:00 +0300 +Subject: [PATCH] ARM: dts: BCM5301X: Add rgmii to port@5 of Broadcom switch on + Asus RT-AC88U +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Define phy-mode of the Broadcom switch's port@5 as rgmii. This doesn't seem +to matter but let's explicitly define it since phy-mode as rgmii is defined +on the other side which is port@6 of the Realtek switch. + +Signed-off-by: Arınç ÜNAL +Signed-off-by: Florian Fainelli +--- + arch/arm/boot/dts/bcm47094-asus-rt-ac88u.dts | 1 + + 1 file changed, 1 insertion(+) + +--- a/arch/arm/boot/dts/bcm47094-asus-rt-ac88u.dts ++++ b/arch/arm/boot/dts/bcm47094-asus-rt-ac88u.dts +@@ -205,6 +205,7 @@ + sw0_p5: port@5 { + reg = <5>; + label = "extsw"; ++ phy-mode = "rgmii"; + + fixed-link { + speed = <1000>; diff --git a/target/linux/bcm53xx/patches-5.15/033-v5.19-0005-ARM-dts-BCM5301X-Retrieve-gmac1-MAC-address-from-NVR.patch b/target/linux/bcm53xx/patches-5.15/033-v5.19-0005-ARM-dts-BCM5301X-Retrieve-gmac1-MAC-address-from-NVR.patch new file mode 100644 index 0000000000..4c0858be0a --- /dev/null +++ b/target/linux/bcm53xx/patches-5.15/033-v5.19-0005-ARM-dts-BCM5301X-Retrieve-gmac1-MAC-address-from-NVR.patch @@ -0,0 +1,43 @@ +From 7f7f8c7b9f3cbae1355fb3b0ce4ea9d6f1552521 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Ar=C4=B1n=C3=A7=20=C3=9CNAL?= +Date: Fri, 1 Apr 2022 13:20:01 +0300 +Subject: [PATCH] ARM: dts: BCM5301X: Retrieve gmac1 MAC address from NVRAM on + Asus RT-AC88U +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +The et1macaddr NVRAM variable contains a MAC address for gmac1 on Asus +RT-AC88U. Add NVMEM cell for it and reference it in the gmac1 node. + +Signed-off-by: Arınç ÜNAL +Acked-by: Rafał Miłecki +Signed-off-by: Florian Fainelli +--- + arch/arm/boot/dts/bcm47094-asus-rt-ac88u.dts | 8 ++++++++ + 1 file changed, 8 insertions(+) + +--- a/arch/arm/boot/dts/bcm47094-asus-rt-ac88u.dts ++++ b/arch/arm/boot/dts/bcm47094-asus-rt-ac88u.dts +@@ -25,6 +25,9 @@ + nvram@1c080000 { + compatible = "brcm,nvram"; + reg = <0x1c080000 0x00180000>; ++ ++ et1macaddr: et1macaddr { ++ }; + }; + + leds { +@@ -239,6 +242,11 @@ + }; + }; + ++&gmac1 { ++ nvmem-cells = <&et1macaddr>; ++ nvmem-cell-names = "mac-address"; ++}; ++ + &usb2 { + vcc-gpio = <&chipcommon 9 GPIO_ACTIVE_HIGH>; + }; diff --git a/target/linux/bcm53xx/patches-5.15/033-v5.19-0006-ARM-dts-BCM5301X-Fix-compatible-strings-for-BCM53012.patch b/target/linux/bcm53xx/patches-5.15/033-v5.19-0006-ARM-dts-BCM5301X-Fix-compatible-strings-for-BCM53012.patch new file mode 100644 index 0000000000..59e99dae62 --- /dev/null +++ b/target/linux/bcm53xx/patches-5.15/033-v5.19-0006-ARM-dts-BCM5301X-Fix-compatible-strings-for-BCM53012.patch @@ -0,0 +1,65 @@ +From 69bb5c6f3f41fe6baa86a775c8a3e69dd27f85d6 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Ar=C4=B1n=C3=A7=20=C3=9CNAL?= +Date: Sat, 2 Apr 2022 23:46:21 +0300 +Subject: [PATCH] ARM: dts: BCM5301X: Fix compatible strings for BCM53012 and + BCM53016 SoC +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Fix compatible strings for devicetrees using the BCM53012 and BCM53016 SoC. + +Signed-off-by: Arınç ÜNAL +Acked-by: Krzysztof Kozlowski +Signed-off-by: Florian Fainelli +--- + arch/arm/boot/dts/bcm53016-meraki-mr32.dts | 2 +- + arch/arm/boot/dts/bcm953012er.dts | 2 +- + arch/arm/boot/dts/bcm953012hr.dts | 2 +- + arch/arm/boot/dts/bcm953012k.dts | 2 +- + 4 files changed, 4 insertions(+), 4 deletions(-) + +--- a/arch/arm/boot/dts/bcm53016-meraki-mr32.dts ++++ b/arch/arm/boot/dts/bcm53016-meraki-mr32.dts +@@ -13,7 +13,7 @@ + #include + + / { +- compatible = "meraki,mr32", "brcm,brcm53016", "brcm,bcm4708"; ++ compatible = "meraki,mr32", "brcm,bcm53016", "brcm,bcm4708"; + model = "Meraki MR32"; + + chosen { +--- a/arch/arm/boot/dts/bcm953012er.dts ++++ b/arch/arm/boot/dts/bcm953012er.dts +@@ -37,7 +37,7 @@ + + / { + model = "NorthStar Enterprise Router (BCM953012ER)"; +- compatible = "brcm,bcm953012er", "brcm,brcm53012", "brcm,bcm4708"; ++ compatible = "brcm,bcm953012er", "brcm,bcm53012", "brcm,bcm4708"; + + memory@0 { + device_type = "memory"; +--- a/arch/arm/boot/dts/bcm953012hr.dts ++++ b/arch/arm/boot/dts/bcm953012hr.dts +@@ -37,7 +37,7 @@ + + / { + model = "NorthStar HR (BCM953012HR)"; +- compatible = "brcm,bcm953012hr", "brcm,brcm53012", "brcm,bcm4708"; ++ compatible = "brcm,bcm953012hr", "brcm,bcm53012", "brcm,bcm4708"; + + aliases { + ethernet0 = &gmac0; +--- a/arch/arm/boot/dts/bcm953012k.dts ++++ b/arch/arm/boot/dts/bcm953012k.dts +@@ -36,7 +36,7 @@ + + / { + model = "NorthStar SVK (BCM953012K)"; +- compatible = "brcm,bcm953012k", "brcm,brcm53012", "brcm,bcm4708"; ++ compatible = "brcm,bcm953012k", "brcm,bcm53012", "brcm,bcm4708"; + + aliases { + serial0 = &uart0; diff --git a/target/linux/bcm53xx/patches-5.15/033-v5.19-0007-ARM-dts-BCM5301X-Disable-gmac0-and-enable-port-8-on-.patch b/target/linux/bcm53xx/patches-5.15/033-v5.19-0007-ARM-dts-BCM5301X-Disable-gmac0-and-enable-port-8-on-.patch new file mode 100644 index 0000000000..f75a53777f --- /dev/null +++ b/target/linux/bcm53xx/patches-5.15/033-v5.19-0007-ARM-dts-BCM5301X-Disable-gmac0-and-enable-port-8-on-.patch @@ -0,0 +1,39 @@ +From b9cff8783439ff1803709128af3a0e04c5f5f047 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Ar=C4=B1n=C3=A7=20=C3=9CNAL?= +Date: Sun, 10 Apr 2022 12:44:55 +0300 +Subject: [PATCH] ARM: dts: BCM5301X: Disable gmac0 and enable port@8 on Asus + RT-AC88U +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Disable gmac0 which is not connected to any switch MAC. Enable port@8 of +the Broadcom switch which is connected to gmac2. + +Signed-off-by: Arınç ÜNAL +Signed-off-by: Florian Fainelli +--- + arch/arm/boot/dts/bcm47094-asus-rt-ac88u.dts | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +--- a/arch/arm/boot/dts/bcm47094-asus-rt-ac88u.dts ++++ b/arch/arm/boot/dts/bcm47094-asus-rt-ac88u.dts +@@ -232,7 +232,6 @@ + reg = <8>; + ethernet = <&gmac2>; + label = "cpu"; +- status = "disabled"; + + fixed-link { + speed = <1000>; +@@ -242,6 +241,10 @@ + }; + }; + ++&gmac0 { ++ status = "disabled"; ++}; ++ + &gmac1 { + nvmem-cells = <&et1macaddr>; + nvmem-cell-names = "mac-address"; diff --git a/target/linux/bcm53xx/patches-5.15/033-v5.19-0008-ARM-dts-BCM5301X-Add-DT-for-WZR-1166DHP-DHP2.patch b/target/linux/bcm53xx/patches-5.15/033-v5.19-0008-ARM-dts-BCM5301X-Add-DT-for-WZR-1166DHP-DHP2.patch new file mode 100644 index 0000000000..c6f1cbd5e2 --- /dev/null +++ b/target/linux/bcm53xx/patches-5.15/033-v5.19-0008-ARM-dts-BCM5301X-Add-DT-for-WZR-1166DHP-DHP2.patch @@ -0,0 +1,300 @@ +From 417aea4436bb658d8c5c4dcd0e3c255931d0ee96 Mon Sep 17 00:00:00 2001 +From: SHIMAMOTO Takayoshi +Date: Fri, 22 Apr 2022 00:10:54 +0900 +Subject: [PATCH] ARM: dts: BCM5301X: Add DT for WZR-1166DHP,DHP2 + +Buffalo WZR-1166DHP/WZR-1166DHP2 wireless router with + + - BCM4708A0 + - 128MiB NAND flash + - 2T2R 11ac/a/b/g/n Wi-Fi + - 4x 10/100/1000M ethernet switch + - 1x USB 3.0 port + + WZR-1166DHP and WZR-1166DHP2 have different memory capacity. + + WZR-1166DHP + - 512 MiB DDR2 SDRAM + + WZR-1166DHP2 + - 256 MiB DDR2 SDRAM + + These hardware components are very similar to the WZR-1750DHP + except for the number of antennas. + +Signed-off-by: SHIMAMOTO Takayoshi +Signed-off-by: Florian Fainelli +--- + arch/arm/boot/dts/Makefile | 2 + + .../bcm4708-buffalo-wzr-1166dhp-common.dtsi | 192 ++++++++++++++++++ + .../boot/dts/bcm4708-buffalo-wzr-1166dhp.dts | 26 +++ + .../boot/dts/bcm4708-buffalo-wzr-1166dhp2.dts | 26 +++ + 4 files changed, 246 insertions(+) + create mode 100644 arch/arm/boot/dts/bcm4708-buffalo-wzr-1166dhp-common.dtsi + create mode 100644 arch/arm/boot/dts/bcm4708-buffalo-wzr-1166dhp.dts + create mode 100644 arch/arm/boot/dts/bcm4708-buffalo-wzr-1166dhp2.dts + +--- a/arch/arm/boot/dts/Makefile ++++ b/arch/arm/boot/dts/Makefile +@@ -98,6 +98,8 @@ dtb-$(CONFIG_ARCH_BCM_5301X) += \ + bcm4708-asus-rt-ac56u.dtb \ + bcm4708-asus-rt-ac68u.dtb \ + bcm4708-buffalo-wzr-1750dhp.dtb \ ++ bcm4708-buffalo-wzr-1166dhp.dtb \ ++ bcm4708-buffalo-wzr-1166dhp2.dtb \ + bcm4708-linksys-ea6300-v1.dtb \ + bcm4708-linksys-ea6500-v2.dtb \ + bcm4708-luxul-xap-1510.dtb \ +--- /dev/null ++++ b/arch/arm/boot/dts/bcm4708-buffalo-wzr-1166dhp-common.dtsi +@@ -0,0 +1,192 @@ ++// SPDX-License-Identifier: GPL-2.0-or-later OR MIT ++/* ++ * Broadcom BCM470X / BCM5301X ARM platform code. ++ * DTS for Buffalo WZR-1166DHP and WZR-1166DHP2 ++ * ++ * Copyright (C) 2014 Rafał Miłecki ++ * Copyright (C) 2022 SHIMAMOTO Takayoshi ++ */ ++ ++ ++#include "bcm4708.dtsi" ++#include "bcm5301x-nand-cs0-bch8.dtsi" ++#include ++ ++/ { ++ spi { ++ compatible = "spi-gpio"; ++ num-chipselects = <1>; ++ gpio-sck = <&chipcommon 7 0>; ++ gpio-mosi = <&chipcommon 4 0>; ++ cs-gpios = <&chipcommon 6 0>; ++ #address-cells = <1>; ++ #size-cells = <0>; ++ ++ hc595: gpio_spi@0 { ++ compatible = "fairchild,74hc595"; ++ reg = <0>; ++ registers-number = <1>; ++ spi-max-frequency = <100000>; ++ ++ gpio-controller; ++ #gpio-cells = <2>; ++ ++ }; ++ }; ++ ++ leds { ++ compatible = "gpio-leds"; ++ ++ usb { ++ /* label = "bcm53xx:blue:usb"; */ ++ function = LED_FUNCTION_USB; ++ color = ; ++ gpios = <&hc595 0 GPIO_ACTIVE_HIGH>; ++ trigger-sources = <&ohci_port1>, <&ehci_port1>, ++ <&xhci_port1>, <&ohci_port2>, ++ <&ehci_port2>; ++ linux,default-trigger = "usbport"; ++ }; ++ ++ power0 { ++ /* label = "bcm53xx:red:power"; */ ++ function = LED_FUNCTION_FAULT; ++ color = ; ++ gpios = <&hc595 1 GPIO_ACTIVE_HIGH>; ++ }; ++ ++ power1 { ++ /* label = "bcm53xx:white:power"; */ ++ function = LED_FUNCTION_POWER; ++ color = ; ++ gpios = <&hc595 2 GPIO_ACTIVE_HIGH>; ++ linux,default-trigger = "default-on"; ++ }; ++ ++ router0 { ++ /* label = "bcm53xx:blue:router"; */ ++ function = LED_FUNCTION_STATUS; ++ color = ; ++ gpios = <&hc595 3 GPIO_ACTIVE_HIGH>; ++ linux,default-trigger = "default-on"; ++ }; ++ ++ router1 { ++ /* label = "bcm53xx:amber:router"; */ ++ function = LED_FUNCTION_STATUS; ++ color = ; ++ gpios = <&hc595 4 GPIO_ACTIVE_HIGH>; ++ }; ++ ++ wan { ++ /* label = "bcm53xx:blue:wan"; */ ++ function = LED_FUNCTION_WAN; ++ color = ; ++ gpios = <&hc595 5 GPIO_ACTIVE_HIGH>; ++ linux,default-trigger = "default-on"; ++ }; ++ ++ wireless0 { ++ /* label = "bcm53xx:blue:wireless"; */ ++ function = LED_FUNCTION_WLAN; ++ color = ; ++ gpios = <&hc595 6 GPIO_ACTIVE_HIGH>; ++ }; ++ ++ wireless1 { ++ /* label = "bcm53xx:amber:wireless"; */ ++ function = LED_FUNCTION_WLAN; ++ color = ; ++ gpios = <&hc595 7 GPIO_ACTIVE_HIGH>; ++ }; ++ }; ++ ++ gpio-keys { ++ compatible = "gpio-keys"; ++ ++ restart { ++ label = "Reset"; ++ linux,code = ; ++ gpios = <&chipcommon 11 GPIO_ACTIVE_LOW>; ++ }; ++ ++ aoss { ++ label = "AOSS"; ++ linux,code = ; ++ gpios = <&chipcommon 12 GPIO_ACTIVE_LOW>; ++ }; ++ ++ /* Commit mode set by switch? */ ++ mode { ++ label = "Mode"; ++ linux,code = ; ++ gpios = <&chipcommon 13 GPIO_ACTIVE_LOW>; ++ }; ++ ++ /* Switch: AP mode */ ++ sw_ap { ++ label = "AP"; ++ linux,code = ; ++ gpios = <&chipcommon 14 GPIO_ACTIVE_LOW>; ++ }; ++ ++ eject { ++ label = "USB eject"; ++ linux,code = ; ++ gpios = <&chipcommon 15 GPIO_ACTIVE_LOW>; ++ }; ++ }; ++}; ++ ++&usb2 { ++ vcc-gpio = <&chipcommon 9 GPIO_ACTIVE_HIGH>; ++}; ++ ++&usb3 { ++ vcc-gpio = <&chipcommon 10 GPIO_ACTIVE_LOW>; ++}; ++ ++&spi_nor { ++ status = "okay"; ++}; ++ ++&usb3_phy { ++ status = "okay"; ++}; ++ ++&srab { ++ status = "okay"; ++ ++ ports { ++ port@0 { ++ reg = <0>; ++ label = "lan1"; ++ }; ++ ++ port@1 { ++ reg = <1>; ++ label = "lan2"; ++ }; ++ ++ port@2 { ++ reg = <2>; ++ label = "lan3"; ++ }; ++ ++ port@3 { ++ reg = <3>; ++ label = "lan4"; ++ }; ++ ++ port@4 { ++ reg = <4>; ++ label = "wan"; ++ }; ++ ++ port@5 { ++ reg = <5>; ++ label = "cpu"; ++ ethernet = <&gmac0>; ++ }; ++ }; ++}; +--- /dev/null ++++ b/arch/arm/boot/dts/bcm4708-buffalo-wzr-1166dhp.dts +@@ -0,0 +1,26 @@ ++// SPDX-License-Identifier: GPL-2.0-or-later OR MIT ++/* ++ * Device Tree Bindigs for Buffalo WZR-1166DHP ++ * ++ * Copyright (C) 2022 SHIMAMOTO Takayoshi ++ */ ++ ++/dts-v1/; ++ ++#include "bcm4708-buffalo-wzr-1166dhp-common.dtsi" ++ ++/ { ++ compatible = "buffalo,wzr-1166dhp", "brcm,bcm4708"; ++ model = "Buffalo WZR-1166DHP"; ++ ++ chosen { ++ bootargs = "console=ttyS0,115200"; ++ }; ++ ++ memory@0 { ++ device_type = "memory"; ++ reg = <0x00000000 0x08000000>, ++ <0x88000000 0x18000000>; ++ }; ++ ++}; +--- /dev/null ++++ b/arch/arm/boot/dts/bcm4708-buffalo-wzr-1166dhp2.dts +@@ -0,0 +1,26 @@ ++// SPDX-License-Identifier: GPL-2.0-or-later OR MIT ++/* ++ * Device Tree Bindigs for Buffalo WZR-1166DHP2 ++ * ++ * Copyright (C) 2022 SHIMAMOTO Takayoshi ++ */ ++ ++/dts-v1/; ++ ++#include "bcm4708-buffalo-wzr-1166dhp-common.dtsi" ++ ++/ { ++ compatible = "buffalo,wzr-1166dhp2", "brcm,bcm4708"; ++ model = "Buffalo WZR-1166DHP2"; ++ ++ chosen { ++ bootargs = "console=ttyS0,115200"; ++ }; ++ ++ memory@0 { ++ device_type = "memory"; ++ reg = <0x00000000 0x08000000>, ++ <0x88000000 0x08000000>; ++ }; ++ ++}; diff --git a/target/linux/bcm53xx/patches-5.15/033-v5.19-0009-Revert-ARM-dts-BCM5301X-Fix-DTC-warning-for-NAND-nod.patch b/target/linux/bcm53xx/patches-5.15/033-v5.19-0009-Revert-ARM-dts-BCM5301X-Fix-DTC-warning-for-NAND-nod.patch new file mode 100644 index 0000000000..cc7e9741a7 --- /dev/null +++ b/target/linux/bcm53xx/patches-5.15/033-v5.19-0009-Revert-ARM-dts-BCM5301X-Fix-DTC-warning-for-NAND-nod.patch @@ -0,0 +1,32 @@ +From 18176b9d82eebaf4408dc0440f54d57a8cbced83 Mon Sep 17 00:00:00 2001 +From: Arnd Bergmann +Date: Fri, 13 May 2022 11:11:07 +0200 +Subject: [PATCH] Revert "ARM: dts: BCM5301X: Fix DTC warning for NAND node" + +This reverts commit 90103611d573, which caused a new DTC warning + +arch/arm/boot/dts/bcm953012hr.dts:57.3-33: Warning (reg_format): /nand-controller@18028000/nand@0/partition@0:reg: property has invalid length (8 bytes) (#address-cells == 2, #size-cells == 1) +arch/arm/boot/dts/bcm953012hr.dts:62.3-33: Warning (reg_format): /nand-controller@18028000/nand@0/partition@200000:reg: property has invalid length (8 bytes) (#address-cells == 2, #size-cells == 1) +arch/arm/boot/dts/bcm953012hr.dts:66.3-33: Warning (reg_format): /nand-controller@18028000/nand@0/partition@600000:reg: property has invalid length (8 bytes) (#address-cells == 2, #size-cells == 1) +arch/arm/boot/dts/bcm953012hr.dts:70.3-33: Warning (reg_format): /nand-controller@18028000/nand@0/partition@1000000:reg: property has invalid length (8 bytes) (#address-cells == 2, #size-cells == 1) +arch/arm/boot/dts/bcm953012hr.dtb: Warning (pci_device_reg): Failed prerequisite 'reg_format' +arch/arm/boot/dts/bcm953012hr.dtb: Warning (pci_device_bus_num): Failed prerequisite 'reg_format' +arch/arm/boot/dts/bcm953012hr.dtb: Warning (i2c_bus_reg): Failed prerequisite 'reg_format' +arch/arm/boot/dts/bcm953012hr.dtb: Warning (spi_bus_reg): Failed prerequisite 'reg_format' + +Signed-off-by: Arnd Bergmann +--- + arch/arm/boot/dts/bcm5301x-nand-cs0.dtsi | 2 ++ + 1 file changed, 2 insertions(+) + +--- a/arch/arm/boot/dts/bcm5301x-nand-cs0.dtsi ++++ b/arch/arm/boot/dts/bcm5301x-nand-cs0.dtsi +@@ -10,6 +10,8 @@ + nandcs: nand@0 { + compatible = "brcm,nandcs"; + reg = <0>; ++ #address-cells = <1>; ++ #size-cells = <1>; + + partitions { + compatible = "brcm,bcm947xx-cfe-partitions"; diff --git a/target/linux/bcm53xx/patches-5.15/034-v6.0-0001-ARM-dts-broadcom-align-gpio-key-node-names-with-dtsc.patch b/target/linux/bcm53xx/patches-5.15/034-v6.0-0001-ARM-dts-broadcom-align-gpio-key-node-names-with-dtsc.patch new file mode 100644 index 0000000000..33d675297e --- /dev/null +++ b/target/linux/bcm53xx/patches-5.15/034-v6.0-0001-ARM-dts-broadcom-align-gpio-key-node-names-with-dtsc.patch @@ -0,0 +1,912 @@ +From c5aec5611aec8fb1ca68f68e41acaefccfc93c16 Mon Sep 17 00:00:00 2001 +From: Krzysztof Kozlowski +Date: Thu, 9 Jun 2022 13:39:30 +0200 +Subject: [PATCH] ARM: dts: broadcom: align gpio-key node names with dtschema + +The node names should be generic and DT schema expects certain pattern +(e.g. with key/button/switch). + +Signed-off-by: Krzysztof Kozlowski +Signed-off-by: Florian Fainelli +--- + arch/arm/boot/dts/bcm4708-asus-rt-ac56u.dts | 6 +++--- + arch/arm/boot/dts/bcm4708-asus-rt-ac68u.dts | 8 ++++---- + .../boot/dts/bcm4708-buffalo-wzr-1166dhp-common.dtsi | 10 +++++----- + arch/arm/boot/dts/bcm4708-buffalo-wzr-1750dhp.dts | 10 +++++----- + arch/arm/boot/dts/bcm4708-linksys-ea6300-v1.dts | 4 ++-- + arch/arm/boot/dts/bcm4708-linksys-ea6500-v2.dts | 4 ++-- + arch/arm/boot/dts/bcm4708-luxul-xap-1510.dts | 2 +- + arch/arm/boot/dts/bcm4708-luxul-xwc-1000.dts | 2 +- + arch/arm/boot/dts/bcm4708-netgear-r6250.dts | 6 +++--- + arch/arm/boot/dts/bcm4708-netgear-r6300-v2.dts | 6 +++--- + arch/arm/boot/dts/bcm4708-smartrg-sr400ac.dts | 6 +++--- + arch/arm/boot/dts/bcm47081-asus-rt-n18u.dts | 4 ++-- + arch/arm/boot/dts/bcm47081-buffalo-wzr-600dhp2.dts | 8 ++++---- + arch/arm/boot/dts/bcm47081-buffalo-wzr-900dhp.dts | 2 +- + arch/arm/boot/dts/bcm47081-luxul-xap-1410.dts | 2 +- + arch/arm/boot/dts/bcm47081-luxul-xwr-1200.dts | 2 +- + arch/arm/boot/dts/bcm47081-tplink-archer-c5-v2.dts | 4 ++-- + arch/arm/boot/dts/bcm4709-asus-rt-ac87u.dts | 4 ++-- + arch/arm/boot/dts/bcm4709-buffalo-wxr-1900dhp.dts | 12 ++++++------ + arch/arm/boot/dts/bcm4709-linksys-ea9200.dts | 4 ++-- + arch/arm/boot/dts/bcm4709-netgear-r7000.dts | 6 +++--- + arch/arm/boot/dts/bcm4709-netgear-r8000.dts | 8 ++++---- + arch/arm/boot/dts/bcm4709-tplink-archer-c9-v1.dts | 4 ++-- + arch/arm/boot/dts/bcm47094-asus-rt-ac88u.dts | 8 ++++---- + arch/arm/boot/dts/bcm47094-dlink-dir-885l.dts | 6 +++--- + arch/arm/boot/dts/bcm47094-linksys-panamera.dts | 6 +++--- + arch/arm/boot/dts/bcm47094-luxul-abr-4500.dts | 2 +- + arch/arm/boot/dts/bcm47094-luxul-xap-1610.dts | 2 +- + arch/arm/boot/dts/bcm47094-luxul-xbr-4500.dts | 2 +- + arch/arm/boot/dts/bcm47094-luxul-xwc-2000.dts | 2 +- + arch/arm/boot/dts/bcm47094-luxul-xwr-3100.dts | 2 +- + arch/arm/boot/dts/bcm47094-luxul-xwr-3150-v1.dts | 2 +- + arch/arm/boot/dts/bcm47094-netgear-r8500.dts | 8 ++++---- + arch/arm/boot/dts/bcm47094-phicomm-k3.dts | 2 +- + arch/arm/boot/dts/bcm47189-luxul-xap-1440.dts | 2 +- + arch/arm/boot/dts/bcm47189-luxul-xap-810.dts | 2 +- + arch/arm/boot/dts/bcm47189-tenda-ac9.dts | 6 +++--- + arch/arm/boot/dts/bcm53016-meraki-mr32.dts | 2 +- + arch/arm/boot/dts/bcm911360_entphn.dts | 4 ++-- + arch/arm/boot/dts/bcm947189acdbmr.dts | 4 ++-- + arch/arm/boot/dts/bcm953012er.dts | 4 ++-- + arch/arm/boot/dts/bcm958625-meraki-alamo.dtsi | 2 +- + arch/arm/boot/dts/bcm958625-meraki-kingpin.dtsi | 2 +- + 43 files changed, 97 insertions(+), 97 deletions(-) + +--- a/arch/arm/boot/dts/bcm4708-asus-rt-ac56u.dts ++++ b/arch/arm/boot/dts/bcm4708-asus-rt-ac56u.dts +@@ -70,19 +70,19 @@ + gpio-keys { + compatible = "gpio-keys"; + +- rfkill { ++ button-rfkill { + label = "WiFi"; + linux,code = ; + gpios = <&chipcommon 7 GPIO_ACTIVE_LOW>; + }; + +- restart { ++ button-restart { + label = "Reset"; + linux,code = ; + gpios = <&chipcommon 11 GPIO_ACTIVE_LOW>; + }; + +- wps { ++ button-wps { + label = "WPS"; + linux,code = ; + gpios = <&chipcommon 15 GPIO_ACTIVE_LOW>; +--- a/arch/arm/boot/dts/bcm4708-asus-rt-ac68u.dts ++++ b/arch/arm/boot/dts/bcm4708-asus-rt-ac68u.dts +@@ -54,25 +54,25 @@ + gpio-keys { + compatible = "gpio-keys"; + +- brightness { ++ button-brightness { + label = "Backlight"; + linux,code = ; + gpios = <&chipcommon 5 GPIO_ACTIVE_LOW>; + }; + +- wps { ++ button-wps { + label = "WPS"; + linux,code = ; + gpios = <&chipcommon 7 GPIO_ACTIVE_LOW>; + }; + +- restart { ++ button-restart { + label = "Reset"; + linux,code = ; + gpios = <&chipcommon 11 GPIO_ACTIVE_LOW>; + }; + +- rfkill { ++ button-rfkill { + label = "WiFi"; + linux,code = ; + gpios = <&chipcommon 15 GPIO_ACTIVE_LOW>; +--- a/arch/arm/boot/dts/bcm4708-buffalo-wzr-1166dhp-common.dtsi ++++ b/arch/arm/boot/dts/bcm4708-buffalo-wzr-1166dhp-common.dtsi +@@ -104,33 +104,33 @@ + gpio-keys { + compatible = "gpio-keys"; + +- restart { ++ button-restart { + label = "Reset"; + linux,code = ; + gpios = <&chipcommon 11 GPIO_ACTIVE_LOW>; + }; + +- aoss { ++ button-aoss { + label = "AOSS"; + linux,code = ; + gpios = <&chipcommon 12 GPIO_ACTIVE_LOW>; + }; + + /* Commit mode set by switch? */ +- mode { ++ button-mode { + label = "Mode"; + linux,code = ; + gpios = <&chipcommon 13 GPIO_ACTIVE_LOW>; + }; + + /* Switch: AP mode */ +- sw_ap { ++ button-sw-ap { + label = "AP"; + linux,code = ; + gpios = <&chipcommon 14 GPIO_ACTIVE_LOW>; + }; + +- eject { ++ button-eject { + label = "USB eject"; + linux,code = ; + gpios = <&chipcommon 15 GPIO_ACTIVE_LOW>; +--- a/arch/arm/boot/dts/bcm4708-buffalo-wzr-1750dhp.dts ++++ b/arch/arm/boot/dts/bcm4708-buffalo-wzr-1750dhp.dts +@@ -100,33 +100,33 @@ + gpio-keys { + compatible = "gpio-keys"; + +- restart { ++ button-restart { + label = "Reset"; + linux,code = ; + gpios = <&chipcommon 11 GPIO_ACTIVE_LOW>; + }; + +- aoss { ++ button-aoss { + label = "AOSS"; + linux,code = ; + gpios = <&chipcommon 12 GPIO_ACTIVE_LOW>; + }; + + /* Commit mode set by switch? */ +- mode { ++ button-mode { + label = "Mode"; + linux,code = ; + gpios = <&chipcommon 13 GPIO_ACTIVE_LOW>; + }; + + /* Switch: AP mode */ +- sw_ap { ++ button-sw-ap { + label = "AP"; + linux,code = ; + gpios = <&chipcommon 14 GPIO_ACTIVE_LOW>; + }; + +- eject { ++ button-eject { + label = "USB eject"; + linux,code = ; + gpios = <&chipcommon 15 GPIO_ACTIVE_LOW>; +--- a/arch/arm/boot/dts/bcm4708-linksys-ea6300-v1.dts ++++ b/arch/arm/boot/dts/bcm4708-linksys-ea6300-v1.dts +@@ -29,13 +29,13 @@ + gpio-keys { + compatible = "gpio-keys"; + +- wps { ++ button-wps { + label = "WPS"; + linux,code = ; + gpios = <&chipcommon 7 GPIO_ACTIVE_LOW>; + }; + +- restart { ++ button-restart { + label = "Reset"; + linux,code = ; + gpios = <&chipcommon 11 GPIO_ACTIVE_LOW>; +--- a/arch/arm/boot/dts/bcm4708-linksys-ea6500-v2.dts ++++ b/arch/arm/boot/dts/bcm4708-linksys-ea6500-v2.dts +@@ -25,13 +25,13 @@ + gpio-keys { + compatible = "gpio-keys"; + +- wps { ++ button-wps { + label = "WPS"; + linux,code = ; + gpios = <&chipcommon 7 GPIO_ACTIVE_LOW>; + }; + +- restart { ++ button-restart { + label = "Reset"; + linux,code = ; + gpios = <&chipcommon 11 GPIO_ACTIVE_LOW>; +--- a/arch/arm/boot/dts/bcm4708-luxul-xap-1510.dts ++++ b/arch/arm/boot/dts/bcm4708-luxul-xap-1510.dts +@@ -45,7 +45,7 @@ + gpio-keys { + compatible = "gpio-keys"; + +- restart { ++ button-restart { + label = "Reset"; + linux,code = ; + gpios = <&chipcommon 11 GPIO_ACTIVE_LOW>; +--- a/arch/arm/boot/dts/bcm4708-luxul-xwc-1000.dts ++++ b/arch/arm/boot/dts/bcm4708-luxul-xwc-1000.dts +@@ -52,7 +52,7 @@ + gpio-keys { + compatible = "gpio-keys"; + +- restart { ++ button-restart { + label = "Reset"; + linux,code = ; + gpios = <&chipcommon 7 GPIO_ACTIVE_LOW>; +--- a/arch/arm/boot/dts/bcm4708-netgear-r6250.dts ++++ b/arch/arm/boot/dts/bcm4708-netgear-r6250.dts +@@ -63,19 +63,19 @@ + gpio-keys { + compatible = "gpio-keys"; + +- wps { ++ button-wps { + label = "WPS"; + linux,code = ; + gpios = <&chipcommon 4 GPIO_ACTIVE_LOW>; + }; + +- rfkill { ++ button-rfkill { + label = "WiFi"; + linux,code = ; + gpios = <&chipcommon 5 GPIO_ACTIVE_LOW>; + }; + +- restart { ++ button-restart { + label = "Reset"; + linux,code = ; + gpios = <&chipcommon 6 GPIO_ACTIVE_LOW>; +--- a/arch/arm/boot/dts/bcm4708-netgear-r6300-v2.dts ++++ b/arch/arm/boot/dts/bcm4708-netgear-r6300-v2.dts +@@ -59,19 +59,19 @@ + gpio-keys { + compatible = "gpio-keys"; + +- wps { ++ button-wps { + label = "WPS"; + linux,code = ; + gpios = <&chipcommon 4 GPIO_ACTIVE_LOW>; + }; + +- rfkill { ++ button-rfkill { + label = "WiFi"; + linux,code = ; + gpios = <&chipcommon 5 GPIO_ACTIVE_LOW>; + }; + +- restart { ++ button-restart { + label = "Reset"; + linux,code = ; + gpios = <&chipcommon 6 GPIO_ACTIVE_LOW>; +--- a/arch/arm/boot/dts/bcm4708-smartrg-sr400ac.dts ++++ b/arch/arm/boot/dts/bcm4708-smartrg-sr400ac.dts +@@ -94,19 +94,19 @@ + gpio-keys { + compatible = "gpio-keys"; + +- rfkill { ++ button-rfkill { + label = "WiFi"; + linux,code = ; + gpios = <&chipcommon 0 GPIO_ACTIVE_LOW>; + }; + +- wps { ++ button-wps { + label = "WPS"; + linux,code = ; + gpios = <&chipcommon 7 GPIO_ACTIVE_LOW>; + }; + +- restart { ++ button-restart { + label = "Reset"; + linux,code = ; + gpios = <&chipcommon 11 GPIO_ACTIVE_LOW>; +--- a/arch/arm/boot/dts/bcm47081-asus-rt-n18u.dts ++++ b/arch/arm/boot/dts/bcm47081-asus-rt-n18u.dts +@@ -60,13 +60,13 @@ + gpio-keys { + compatible = "gpio-keys"; + +- restart { ++ button-restart { + label = "Reset"; + linux,code = ; + gpios = <&chipcommon 7 GPIO_ACTIVE_LOW>; + }; + +- wps { ++ button-wps { + label = "WPS"; + linux,code = ; + gpios = <&chipcommon 11 GPIO_ACTIVE_LOW>; +--- a/arch/arm/boot/dts/bcm47081-buffalo-wzr-600dhp2.dts ++++ b/arch/arm/boot/dts/bcm47081-buffalo-wzr-600dhp2.dts +@@ -91,26 +91,26 @@ + gpio-keys { + compatible = "gpio-keys"; + +- aoss { ++ button-aoss { + label = "AOSS"; + linux,code = ; + gpios = <&chipcommon 9 GPIO_ACTIVE_LOW>; + }; + +- restart { ++ button-restart { + label = "Reset"; + linux,code = ; + gpios = <&chipcommon 11 GPIO_ACTIVE_LOW>; + }; + + /* Switch device mode? */ +- mode { ++ button-mode { + label = "Mode"; + linux,code = ; + gpios = <&chipcommon 14 GPIO_ACTIVE_LOW>; + }; + +- eject { ++ button-eject { + label = "USB eject"; + linux,code = ; + gpios = <&chipcommon 15 GPIO_ACTIVE_LOW>; +--- a/arch/arm/boot/dts/bcm47081-buffalo-wzr-900dhp.dts ++++ b/arch/arm/boot/dts/bcm47081-buffalo-wzr-900dhp.dts +@@ -96,7 +96,7 @@ + gpio-keys { + compatible = "gpio-keys"; + +- restart { ++ button-restart { + label = "Reset"; + linux,code = ; + gpios = <&chipcommon 11 GPIO_ACTIVE_LOW>; +--- a/arch/arm/boot/dts/bcm47081-luxul-xap-1410.dts ++++ b/arch/arm/boot/dts/bcm47081-luxul-xap-1410.dts +@@ -45,7 +45,7 @@ + gpio-keys { + compatible = "gpio-keys"; + +- restart { ++ button-restart { + label = "Reset"; + linux,code = ; + gpios = <&chipcommon 11 GPIO_ACTIVE_LOW>; +--- a/arch/arm/boot/dts/bcm47081-luxul-xwr-1200.dts ++++ b/arch/arm/boot/dts/bcm47081-luxul-xwr-1200.dts +@@ -94,7 +94,7 @@ + gpio-keys { + compatible = "gpio-keys"; + +- restart { ++ button-restart { + label = "Reset"; + linux,code = ; + gpios = <&chipcommon 11 GPIO_ACTIVE_LOW>; +--- a/arch/arm/boot/dts/bcm47081-tplink-archer-c5-v2.dts ++++ b/arch/arm/boot/dts/bcm47081-tplink-archer-c5-v2.dts +@@ -77,13 +77,13 @@ + gpio-keys { + compatible = "gpio-keys"; + +- rfkill { ++ button-rfkill { + label = "WiFi"; + linux,code = ; + gpios = <&chipcommon 3 GPIO_ACTIVE_LOW>; + }; + +- restart { ++ button-restart { + label = "Reset"; + linux,code = ; + gpios = <&chipcommon 7 GPIO_ACTIVE_LOW>; +--- a/arch/arm/boot/dts/bcm4709-asus-rt-ac87u.dts ++++ b/arch/arm/boot/dts/bcm4709-asus-rt-ac87u.dts +@@ -50,13 +50,13 @@ + #address-cells = <1>; + #size-cells = <0>; + +- wps { ++ button-wps { + label = "WPS"; + linux,code = ; + gpios = <&chipcommon 2 GPIO_ACTIVE_LOW>; + }; + +- restart { ++ button-restart { + label = "Reset"; + linux,code = ; + gpios = <&chipcommon 11 GPIO_ACTIVE_LOW>; +--- a/arch/arm/boot/dts/bcm4709-buffalo-wxr-1900dhp.dts ++++ b/arch/arm/boot/dts/bcm4709-buffalo-wxr-1900dhp.dts +@@ -80,39 +80,39 @@ + #address-cells = <1>; + #size-cells = <0>; + +- power { ++ button-power { + label = "Power"; + linux,code = ; + gpios = <&chipcommon 1 GPIO_ACTIVE_LOW>; + }; + +- restart { ++ button-restart { + label = "Reset"; + linux,code = ; + gpios = <&chipcommon 15 GPIO_ACTIVE_LOW>; + }; + +- aoss { ++ button-aoss { + label = "AOSS"; + linux,code = ; + gpios = <&chipcommon 16 GPIO_ACTIVE_LOW>; + }; + + /* Commit mode set by switch? */ +- mode { ++ button-mode { + label = "Mode"; + linux,code = ; + gpios = <&chipcommon 17 GPIO_ACTIVE_LOW>; + }; + + /* Switch: AP mode */ +- sw_ap { ++ button-sw-ap { + label = "AP"; + linux,code = ; + gpios = <&chipcommon 18 GPIO_ACTIVE_LOW>; + }; + +- eject { ++ button-eject { + label = "USB eject"; + linux,code = ; + gpios = <&chipcommon 20 GPIO_ACTIVE_LOW>; +--- a/arch/arm/boot/dts/bcm4709-linksys-ea9200.dts ++++ b/arch/arm/boot/dts/bcm4709-linksys-ea9200.dts +@@ -32,13 +32,13 @@ + #address-cells = <1>; + #size-cells = <0>; + +- wps { ++ button-wps { + label = "WPS"; + linux,code = ; + gpios = <&chipcommon 3 GPIO_ACTIVE_LOW>; + }; + +- restart { ++ button-restart { + label = "Reset"; + linux,code = ; + gpios = <&chipcommon 17 GPIO_ACTIVE_LOW>; +--- a/arch/arm/boot/dts/bcm4709-netgear-r7000.dts ++++ b/arch/arm/boot/dts/bcm4709-netgear-r7000.dts +@@ -75,19 +75,19 @@ + #address-cells = <1>; + #size-cells = <0>; + +- wps { ++ button-wps { + label = "WPS"; + linux,code = ; + gpios = <&chipcommon 4 GPIO_ACTIVE_LOW>; + }; + +- rfkill { ++ button-rfkill { + label = "WiFi"; + linux,code = ; + gpios = <&chipcommon 5 GPIO_ACTIVE_LOW>; + }; + +- restart { ++ button-restart { + label = "Reset"; + linux,code = ; + gpios = <&chipcommon 6 GPIO_ACTIVE_LOW>; +--- a/arch/arm/boot/dts/bcm4709-netgear-r8000.dts ++++ b/arch/arm/boot/dts/bcm4709-netgear-r8000.dts +@@ -102,25 +102,25 @@ + #address-cells = <1>; + #size-cells = <0>; + +- rfkill { ++ button-rfkill { + label = "WiFi"; + linux,code = ; + gpios = <&chipcommon 4 GPIO_ACTIVE_LOW>; + }; + +- wps { ++ button-wps { + label = "WPS"; + linux,code = ; + gpios = <&chipcommon 5 GPIO_ACTIVE_LOW>; + }; + +- restart { ++ button-restart { + label = "Reset"; + linux,code = ; + gpios = <&chipcommon 6 GPIO_ACTIVE_LOW>; + }; + +- brightness { ++ button-brightness { + label = "Backlight"; + linux,code = ; + gpios = <&chipcommon 19 GPIO_ACTIVE_LOW>; +--- a/arch/arm/boot/dts/bcm4709-tplink-archer-c9-v1.dts ++++ b/arch/arm/boot/dts/bcm4709-tplink-archer-c9-v1.dts +@@ -80,13 +80,13 @@ + #address-cells = <1>; + #size-cells = <0>; + +- wps { ++ button-wps { + label = "WPS"; + linux,code = ; + gpios = <&chipcommon 0 GPIO_ACTIVE_LOW>; + }; + +- restart { ++ button-restart { + label = "Reset"; + linux,code = ; + gpios = <&chipcommon 3 GPIO_ACTIVE_LOW>; +--- a/arch/arm/boot/dts/bcm47094-asus-rt-ac88u.dts ++++ b/arch/arm/boot/dts/bcm47094-asus-rt-ac88u.dts +@@ -72,25 +72,25 @@ + gpio-keys { + compatible = "gpio-keys"; + +- wps { ++ button-wps { + label = "WPS"; + linux,code = ; + gpios = <&chipcommon 20 GPIO_ACTIVE_LOW>; + }; + +- reset { ++ button-reset { + label = "Reset"; + linux,code = ; + gpios = <&chipcommon 11 GPIO_ACTIVE_LOW>; + }; + +- wifi { ++ button-wifi { + label = "Wi-Fi"; + linux,code = ; + gpios = <&chipcommon 18 GPIO_ACTIVE_LOW>; + }; + +- led { ++ button-led { + label = "Backlight"; + linux,code = ; + gpios = <&chipcommon 4 GPIO_ACTIVE_LOW>; +--- a/arch/arm/boot/dts/bcm47094-dlink-dir-885l.dts ++++ b/arch/arm/boot/dts/bcm47094-dlink-dir-885l.dts +@@ -86,20 +86,20 @@ + gpio-keys { + compatible = "gpio-keys"; + +- wps { ++ button-wps { + label = "WPS"; + linux,code = ; + gpios = <&chipcommon 7 GPIO_ACTIVE_LOW>; + }; + + /* Switch: router / extender */ +- extender { ++ button-extender { + label = "Extender"; + linux,code = ; + gpios = <&chipcommon 10 GPIO_ACTIVE_LOW>; + }; + +- restart { ++ button-restart { + label = "Reset"; + linux,code = ; + gpios = <&chipcommon 17 GPIO_ACTIVE_LOW>; +--- a/arch/arm/boot/dts/bcm47094-linksys-panamera.dts ++++ b/arch/arm/boot/dts/bcm47094-linksys-panamera.dts +@@ -30,19 +30,19 @@ + gpio-keys { + compatible = "gpio-keys"; + +- wps { ++ button-wps { + label = "WPS"; + linux,code = ; + gpios = <&chipcommon 3 GPIO_ACTIVE_LOW>; + }; + +- rfkill { ++ button-rfkill { + label = "WiFi"; + linux,code = ; + gpios = <&chipcommon 16 GPIO_ACTIVE_LOW>; + }; + +- reset { ++ button-reset { + label = "Reset"; + linux,code = ; + gpios = <&chipcommon 17 GPIO_ACTIVE_LOW>; +--- a/arch/arm/boot/dts/bcm47094-luxul-abr-4500.dts ++++ b/arch/arm/boot/dts/bcm47094-luxul-abr-4500.dts +@@ -49,7 +49,7 @@ + gpio-keys { + compatible = "gpio-keys"; + +- restart { ++ button-restart { + label = "Reset"; + linux,code = ; + gpios = <&chipcommon 17 GPIO_ACTIVE_LOW>; +--- a/arch/arm/boot/dts/bcm47094-luxul-xap-1610.dts ++++ b/arch/arm/boot/dts/bcm47094-luxul-xap-1610.dts +@@ -43,7 +43,7 @@ + gpio-keys { + compatible = "gpio-keys"; + +- restart { ++ button-restart { + label = "Reset"; + linux,code = ; + gpios = <&chipcommon 17 GPIO_ACTIVE_LOW>; +--- a/arch/arm/boot/dts/bcm47094-luxul-xbr-4500.dts ++++ b/arch/arm/boot/dts/bcm47094-luxul-xbr-4500.dts +@@ -49,7 +49,7 @@ + gpio-keys { + compatible = "gpio-keys"; + +- restart { ++ button-restart { + label = "Reset"; + linux,code = ; + gpios = <&chipcommon 17 GPIO_ACTIVE_LOW>; +--- a/arch/arm/boot/dts/bcm47094-luxul-xwc-2000.dts ++++ b/arch/arm/boot/dts/bcm47094-luxul-xwc-2000.dts +@@ -37,7 +37,7 @@ + #address-cells = <1>; + #size-cells = <0>; + +- restart { ++ button-restart { + label = "Reset"; + linux,code = ; + gpios = <&chipcommon 19 GPIO_ACTIVE_LOW>; +--- a/arch/arm/boot/dts/bcm47094-luxul-xwr-3100.dts ++++ b/arch/arm/boot/dts/bcm47094-luxul-xwr-3100.dts +@@ -89,7 +89,7 @@ + gpio-keys { + compatible = "gpio-keys"; + +- restart { ++ button-restart { + label = "Reset"; + linux,code = ; + gpios = <&chipcommon 17 GPIO_ACTIVE_LOW>; +--- a/arch/arm/boot/dts/bcm47094-luxul-xwr-3150-v1.dts ++++ b/arch/arm/boot/dts/bcm47094-luxul-xwr-3150-v1.dts +@@ -67,7 +67,7 @@ + gpio-keys { + compatible = "gpio-keys"; + +- restart { ++ button-restart { + label = "Reset"; + linux,code = ; + gpios = <&chipcommon 17 GPIO_ACTIVE_LOW>; +--- a/arch/arm/boot/dts/bcm47094-netgear-r8500.dts ++++ b/arch/arm/boot/dts/bcm47094-netgear-r8500.dts +@@ -65,25 +65,25 @@ + gpio-keys { + compatible = "gpio-keys"; + +- brightness { ++ button-brightness { + label = "Backlight"; + linux,code = ; + gpios = <&chipcommon 1 GPIO_ACTIVE_LOW>; + }; + +- restart { ++ button-restart { + label = "Reset"; + linux,code = ; + gpios = <&chipcommon 10 GPIO_ACTIVE_LOW>; + }; + +- wps { ++ button-wps { + label = "WPS"; + linux,code = ; + gpios = <&chipcommon 14 GPIO_ACTIVE_LOW>; + }; + +- rfkill { ++ button-rfkill { + label = "WiFi"; + linux,code = ; + gpios = <&chipcommon 20 GPIO_ACTIVE_LOW>; +--- a/arch/arm/boot/dts/bcm47094-phicomm-k3.dts ++++ b/arch/arm/boot/dts/bcm47094-phicomm-k3.dts +@@ -22,7 +22,7 @@ + gpio-keys { + compatible = "gpio-keys"; + +- restart { ++ button-restart { + label = "Reset"; + linux,code = ; + gpios = <&chipcommon 17 GPIO_ACTIVE_LOW>; +--- a/arch/arm/boot/dts/bcm47189-luxul-xap-1440.dts ++++ b/arch/arm/boot/dts/bcm47189-luxul-xap-1440.dts +@@ -39,7 +39,7 @@ + gpio-keys { + compatible = "gpio-keys"; + +- restart { ++ button-restart { + label = "Reset"; + linux,code = ; + gpios = <&chipcommon 7 GPIO_ACTIVE_LOW>; +--- a/arch/arm/boot/dts/bcm47189-luxul-xap-810.dts ++++ b/arch/arm/boot/dts/bcm47189-luxul-xap-810.dts +@@ -49,7 +49,7 @@ + gpio-keys { + compatible = "gpio-keys"; + +- restart { ++ button-restart { + label = "Reset"; + linux,code = ; + gpios = <&chipcommon 7 GPIO_ACTIVE_LOW>; +--- a/arch/arm/boot/dts/bcm47189-tenda-ac9.dts ++++ b/arch/arm/boot/dts/bcm47189-tenda-ac9.dts +@@ -59,19 +59,19 @@ + gpio-keys { + compatible = "gpio-keys"; + +- rfkill { ++ button-rfkill { + label = "WiFi"; + linux,code = ; + gpios = <&chipcommon 3 GPIO_ACTIVE_LOW>; + }; + +- restart { ++ button-restart { + label = "Reset"; + linux,code = ; + gpios = <&chipcommon 7 GPIO_ACTIVE_LOW>; + }; + +- wps { ++ button-wps { + label = "WPS"; + linux,code = ; + gpios = <&chipcommon 9 GPIO_ACTIVE_LOW>; +--- a/arch/arm/boot/dts/bcm53016-meraki-mr32.dts ++++ b/arch/arm/boot/dts/bcm53016-meraki-mr32.dts +@@ -50,7 +50,7 @@ + #address-cells = <1>; + #size-cells = <0>; + +- restart { ++ button-restart { + label = "Reset"; + linux,code = ; + gpios = <&chipcommon 21 GPIO_ACTIVE_LOW>; +--- a/arch/arm/boot/dts/bcm911360_entphn.dts ++++ b/arch/arm/boot/dts/bcm911360_entphn.dts +@@ -47,10 +47,10 @@ + stdout-path = "serial0:115200n8"; + }; + +- gpio_keys { ++ gpio-keys { + compatible = "gpio-keys"; + +- hook { ++ button-hook { + label = "HOOK"; + linux,code = ; + gpios = <&gpio_asiu 48 0>; +--- a/arch/arm/boot/dts/bcm947189acdbmr.dts ++++ b/arch/arm/boot/dts/bcm947189acdbmr.dts +@@ -44,13 +44,13 @@ + gpio-keys { + compatible = "gpio-keys"; + +- restart { ++ button-restart { + label = "Reset"; + linux,code = ; + gpios = <&chipcommon 7 GPIO_ACTIVE_HIGH>; + }; + +- wps { ++ button-wps { + label = "WPS"; + linux,code = ; + gpios = <&chipcommon 9 GPIO_ACTIVE_LOW>; +--- a/arch/arm/boot/dts/bcm953012er.dts ++++ b/arch/arm/boot/dts/bcm953012er.dts +@@ -47,13 +47,13 @@ + gpio-keys { + compatible = "gpio-keys"; + +- wps { ++ button-wps { + label = "WPS"; + linux,code = ; + gpios = <&chipcommon 6 GPIO_ACTIVE_LOW>; + }; + +- restart { ++ button-restart { + label = "Reset"; + linux,code = ; + gpios = <&chipcommon 15 GPIO_ACTIVE_LOW>; +--- a/arch/arm/boot/dts/bcm958625-meraki-alamo.dtsi ++++ b/arch/arm/boot/dts/bcm958625-meraki-alamo.dtsi +@@ -13,7 +13,7 @@ + autorepeat; + poll-interval = <20>; + +- reset { ++ button-reset { + label = "reset"; + linux,code = ; + gpios = <&gpioa 8 GPIO_ACTIVE_LOW>; +--- a/arch/arm/boot/dts/bcm958625-meraki-kingpin.dtsi ++++ b/arch/arm/boot/dts/bcm958625-meraki-kingpin.dtsi +@@ -14,7 +14,7 @@ + autorepeat; + poll-interval = <20>; + +- reset { ++ button-reset { + label = "reset"; + linux,code = ; + gpios = <&gpioa 6 GPIO_ACTIVE_LOW>; diff --git a/target/linux/bcm53xx/patches-5.15/034-v6.0-0002-ARM-dts-broadcom-correct-gpio-keys-properties.patch b/target/linux/bcm53xx/patches-5.15/034-v6.0-0002-ARM-dts-broadcom-correct-gpio-keys-properties.patch new file mode 100644 index 0000000000..7bded431b0 --- /dev/null +++ b/target/linux/bcm53xx/patches-5.15/034-v6.0-0002-ARM-dts-broadcom-correct-gpio-keys-properties.patch @@ -0,0 +1,108 @@ +From d634a6969c03803a945fdc2bccbe7d813420e569 Mon Sep 17 00:00:00 2001 +From: Krzysztof Kozlowski +Date: Thu, 9 Jun 2022 13:39:31 +0200 +Subject: [PATCH] ARM: dts: broadcom: correct gpio-keys properties + +gpio-keys children do not use unit addresses. + +Signed-off-by: Krzysztof Kozlowski +Signed-off-by: Florian Fainelli +--- + arch/arm/boot/dts/bcm4709-asus-rt-ac87u.dts | 2 -- + arch/arm/boot/dts/bcm4709-buffalo-wxr-1900dhp.dts | 2 -- + arch/arm/boot/dts/bcm4709-linksys-ea9200.dts | 2 -- + arch/arm/boot/dts/bcm4709-netgear-r7000.dts | 2 -- + arch/arm/boot/dts/bcm4709-netgear-r8000.dts | 2 -- + arch/arm/boot/dts/bcm4709-tplink-archer-c9-v1.dts | 2 -- + arch/arm/boot/dts/bcm47094-luxul-xwc-2000.dts | 2 -- + arch/arm/boot/dts/bcm53016-meraki-mr32.dts | 2 -- + 8 files changed, 16 deletions(-) + +--- a/arch/arm/boot/dts/bcm4709-asus-rt-ac87u.dts ++++ b/arch/arm/boot/dts/bcm4709-asus-rt-ac87u.dts +@@ -47,8 +47,6 @@ + + gpio-keys { + compatible = "gpio-keys"; +- #address-cells = <1>; +- #size-cells = <0>; + + button-wps { + label = "WPS"; +--- a/arch/arm/boot/dts/bcm4709-buffalo-wxr-1900dhp.dts ++++ b/arch/arm/boot/dts/bcm4709-buffalo-wxr-1900dhp.dts +@@ -77,8 +77,6 @@ + + gpio-keys { + compatible = "gpio-keys"; +- #address-cells = <1>; +- #size-cells = <0>; + + button-power { + label = "Power"; +--- a/arch/arm/boot/dts/bcm4709-linksys-ea9200.dts ++++ b/arch/arm/boot/dts/bcm4709-linksys-ea9200.dts +@@ -29,8 +29,6 @@ + + gpio-keys { + compatible = "gpio-keys"; +- #address-cells = <1>; +- #size-cells = <0>; + + button-wps { + label = "WPS"; +--- a/arch/arm/boot/dts/bcm4709-netgear-r7000.dts ++++ b/arch/arm/boot/dts/bcm4709-netgear-r7000.dts +@@ -72,8 +72,6 @@ + + gpio-keys { + compatible = "gpio-keys"; +- #address-cells = <1>; +- #size-cells = <0>; + + button-wps { + label = "WPS"; +--- a/arch/arm/boot/dts/bcm4709-netgear-r8000.dts ++++ b/arch/arm/boot/dts/bcm4709-netgear-r8000.dts +@@ -99,8 +99,6 @@ + + gpio-keys { + compatible = "gpio-keys"; +- #address-cells = <1>; +- #size-cells = <0>; + + button-rfkill { + label = "WiFi"; +--- a/arch/arm/boot/dts/bcm4709-tplink-archer-c9-v1.dts ++++ b/arch/arm/boot/dts/bcm4709-tplink-archer-c9-v1.dts +@@ -77,8 +77,6 @@ + + gpio-keys { + compatible = "gpio-keys"; +- #address-cells = <1>; +- #size-cells = <0>; + + button-wps { + label = "WPS"; +--- a/arch/arm/boot/dts/bcm47094-luxul-xwc-2000.dts ++++ b/arch/arm/boot/dts/bcm47094-luxul-xwc-2000.dts +@@ -34,8 +34,6 @@ + + gpio-keys { + compatible = "gpio-keys"; +- #address-cells = <1>; +- #size-cells = <0>; + + button-restart { + label = "Reset"; +--- a/arch/arm/boot/dts/bcm53016-meraki-mr32.dts ++++ b/arch/arm/boot/dts/bcm53016-meraki-mr32.dts +@@ -47,8 +47,6 @@ + + keys { + compatible = "gpio-keys"; +- #address-cells = <1>; +- #size-cells = <0>; + + button-restart { + label = "Reset"; diff --git a/target/linux/bcm53xx/patches-5.15/035-v6.2-0001-ARM-dts-BCM5301X-Correct-description-of-TP-Link-part.patch b/target/linux/bcm53xx/patches-5.15/035-v6.2-0001-ARM-dts-BCM5301X-Correct-description-of-TP-Link-part.patch new file mode 100644 index 0000000000..4c4ed036b9 --- /dev/null +++ b/target/linux/bcm53xx/patches-5.15/035-v6.2-0001-ARM-dts-BCM5301X-Correct-description-of-TP-Link-part.patch @@ -0,0 +1,99 @@ +From c8ee9f119bfb4244f76c9971c341ec06b49332cd Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= +Date: Tue, 8 Nov 2022 12:07:08 +0100 +Subject: [PATCH] ARM: dts: BCM5301X: Correct description of TP-Link partitions +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +TP-Link routers have flash space partitioned according to the partitions +table. It may look like fixed partitioning but those partitions can be +actually reorganized. New can be added (or some removed), offsets and +sizes may change. + +Fix DT to use binding for the TP-Link SafeLoader partitioning method. + +Signed-off-by: Rafał Miłecki +Link: https://lore.kernel.org/r/20221108110708.13693-1-zajec5@gmail.com +Signed-off-by: Florian Fainelli +--- + .../boot/dts/bcm47081-tplink-archer-c5-v2.dts | 25 ++++--------------- + .../boot/dts/bcm4709-tplink-archer-c9-v1.dts | 25 ++++--------------- + 2 files changed, 10 insertions(+), 40 deletions(-) + +--- a/arch/arm/boot/dts/bcm47081-tplink-archer-c5-v2.dts ++++ b/arch/arm/boot/dts/bcm47081-tplink-archer-c5-v2.dts +@@ -95,30 +95,15 @@ + status = "okay"; + + partitions { +- compatible = "fixed-partitions"; +- #address-cells = <1>; +- #size-cells = <1>; ++ compatible = "tplink,safeloader-partitions"; ++ partitions-table-offset = <0xe50000>; + +- boot@0 { +- label = "boot"; +- reg = <0x000000 0x040000>; +- read-only; +- }; +- +- os-image@100000 { +- label = "os-image"; +- reg = <0x040000 0x200000>; ++ partition-os-image { + compatible = "brcm,trx"; + }; + +- rootfs@240000 { +- label = "rootfs"; +- reg = <0x240000 0xc00000>; +- }; +- +- nvram@ff0000 { +- label = "nvram"; +- reg = <0xff0000 0x010000>; ++ partition-file-system { ++ linux,rootfs; + }; + }; + }; +--- a/arch/arm/boot/dts/bcm4709-tplink-archer-c9-v1.dts ++++ b/arch/arm/boot/dts/bcm4709-tplink-archer-c9-v1.dts +@@ -104,30 +104,15 @@ + status = "okay"; + + partitions { +- compatible = "fixed-partitions"; +- #address-cells = <1>; +- #size-cells = <1>; ++ compatible = "tplink,safeloader-partitions"; ++ partitions-table-offset = <0xe50000>; + +- boot@0 { +- label = "boot"; +- reg = <0x000000 0x040000>; +- read-only; +- }; +- +- os-image@100000 { +- label = "os-image"; +- reg = <0x040000 0x200000>; ++ partition-os-image { + compatible = "brcm,trx"; + }; + +- rootfs@240000 { +- label = "rootfs"; +- reg = <0x240000 0xc00000>; +- }; +- +- nvram@ff0000 { +- label = "nvram"; +- reg = <0xff0000 0x010000>; ++ partition-file-system { ++ linux,rootfs; + }; + }; + }; diff --git a/target/linux/bcm53xx/patches-5.15/035-v6.2-0001-ARM-dts-bcm47094-Add-devicetree-for-D-Link-DIR-890L.patch b/target/linux/bcm53xx/patches-5.15/035-v6.2-0001-ARM-dts-bcm47094-Add-devicetree-for-D-Link-DIR-890L.patch new file mode 100644 index 0000000000..4842e16649 --- /dev/null +++ b/target/linux/bcm53xx/patches-5.15/035-v6.2-0001-ARM-dts-bcm47094-Add-devicetree-for-D-Link-DIR-890L.patch @@ -0,0 +1,242 @@ +From b1ba87897ceda8e49a47aa92832dd7bff8583e21 Mon Sep 17 00:00:00 2001 +From: Linus Walleij +Date: Mon, 7 Nov 2022 14:41:04 +0100 +Subject: [PATCH] ARM: dts: bcm47094: Add devicetree for D-Link DIR-890L + +This adds a device tree for the D-Link DIR-890L. This device +is very similar to D-Link DIR-885L, the differences are detailed +as a comment in the DTS file. + +Signed-off-by: Linus Walleij +Link: https://lore.kernel.org/r/20221107134104.1422169-2-linus.walleij@linaro.org +Signed-off-by: Florian Fainelli +--- + arch/arm/boot/dts/Makefile | 1 + + arch/arm/boot/dts/bcm47094-dlink-dir-890l.dts | 211 ++++++++++++++++++ + 2 files changed, 212 insertions(+) + create mode 100644 arch/arm/boot/dts/bcm47094-dlink-dir-890l.dts + +--- a/arch/arm/boot/dts/Makefile ++++ b/arch/arm/boot/dts/Makefile +@@ -121,6 +121,7 @@ dtb-$(CONFIG_ARCH_BCM_5301X) += \ + bcm4709-tplink-archer-c9-v1.dtb \ + bcm47094-asus-rt-ac88u.dtb \ + bcm47094-dlink-dir-885l.dtb \ ++ bcm47094-dlink-dir-890l.dtb \ + bcm47094-linksys-panamera.dtb \ + bcm47094-luxul-abr-4500.dtb \ + bcm47094-luxul-xap-1610.dtb \ +--- /dev/null ++++ b/arch/arm/boot/dts/bcm47094-dlink-dir-890l.dts +@@ -0,0 +1,211 @@ ++// SPDX-License-Identifier: GPL-2.0-or-later OR MIT ++/* ++ * Device tree for D-Link DIR-890L ++ * D-Link calls this board "WRGAC36" ++ * this router has the same looks and form factor as D-Link DIR-885L. ++ * ++ * Some differences from DIR-885L include a separate USB2 port, separate LEDs ++ * for USB2 and USB3, a separate VCC supply for the USB2 slot and no ++ * router/extender switch is mounted (there is an empty mount point on the ++ * PCB) so this device is a pure router. Also the LAN ports are in the right ++ * order. ++ * ++ * Based on the device tree for DIR-885L ++ * Copyright (C) 2016 Rafał Miłecki ++ * Copyright (C) 2022 Linus Walleij ++ */ ++ ++/dts-v1/; ++ ++#include "bcm47094.dtsi" ++#include "bcm5301x-nand-cs0-bch1.dtsi" ++ ++/ { ++ compatible = "dlink,dir-890l", "brcm,bcm47094", "brcm,bcm4708"; ++ model = "D-Link DIR-890L"; ++ ++ chosen { ++ bootargs = "console=ttyS0,115200 earlycon"; ++ }; ++ ++ memory@0 { ++ device_type = "memory"; ++ reg = <0x00000000 0x08000000>, ++ <0x88000000 0x08000000>; ++ }; ++ ++ leds { ++ /* ++ * LED information is derived from the boot log which ++ * conveniently lists all the LEDs. ++ */ ++ compatible = "gpio-leds"; ++ ++ power-white { ++ label = "bcm53xx:white:power"; ++ gpios = <&chipcommon 0 GPIO_ACTIVE_LOW>; ++ linux,default-trigger = "default-on"; ++ }; ++ ++ wan-white { ++ label = "bcm53xx:white:wan"; ++ gpios = <&chipcommon 1 GPIO_ACTIVE_LOW>; ++ }; ++ ++ power-amber { ++ label = "bcm53xx:amber:power"; ++ gpios = <&chipcommon 2 GPIO_ACTIVE_LOW>; ++ }; ++ ++ wan-amber { ++ label = "bcm53xx:amber:wan"; ++ gpios = <&chipcommon 3 GPIO_ACTIVE_LOW>; ++ }; ++ ++ usb3-white { ++ label = "bcm53xx:white:usb3"; ++ gpios = <&chipcommon 8 GPIO_ACTIVE_LOW>; ++ trigger-sources = <&xhci_port1>; ++ linux,default-trigger = "usbport"; ++ }; ++ ++ usb2-white { ++ label = "bcm53xx:white:usb2"; ++ gpios = <&chipcommon 15 GPIO_ACTIVE_LOW>; ++ trigger-sources = <&ohci_port1>, <&ehci_port1>; ++ linux,default-trigger = "usbport"; ++ }; ++ ++ 2ghz { ++ label = "bcm53xx:white:2ghz"; ++ gpios = <&chipcommon 13 GPIO_ACTIVE_LOW>; ++ }; ++ ++ 5ghz { ++ label = "bcm53xx:white:5ghz"; ++ gpios = <&chipcommon 14 GPIO_ACTIVE_LOW>; ++ }; ++ }; ++ ++ gpio-keys { ++ compatible = "gpio-keys"; ++ ++ button-wps { ++ label = "WPS"; ++ linux,code = ; ++ gpios = <&chipcommon 7 GPIO_ACTIVE_LOW>; ++ }; ++ ++ /* Called "factory reset" in the vendor dmesg */ ++ button-restart { ++ label = "Reset"; ++ linux,code = ; ++ gpios = <&chipcommon 17 GPIO_ACTIVE_LOW>; ++ }; ++ }; ++ ++ /* ++ * The flash memory is memory mapped at 0x1e000000-0x1fffffff ++ * 64KB blocks; total size 2MB, same that can be ++ * found attached to the spi_nor SPI controller. ++ */ ++ nvram@1e1f0000 { ++ compatible = "brcm,nvram"; ++ reg = <0x1e1f0000 0x00010000>; ++ ++ et0macaddr: et0macaddr { ++ }; ++ }; ++}; ++ ++&gmac2 { ++ /* ++ * The NVRAM curiously does not contain a MAC address ++ * for et2 so since that is the only ethernet interface ++ * actually in use on the platform, we use this et0 MAC ++ * address for et2. ++ */ ++ nvmem-cells = <&et0macaddr>; ++ nvmem-cell-names = "mac-address"; ++}; ++ ++&spi_nor { ++ status = "okay"; ++}; ++ ++&nandcs { ++ /* Spansion S34ML01G2, 128MB with 128KB erase blocks */ ++ partitions { ++ compatible = "fixed-partitions"; ++ #address-cells = <1>; ++ #size-cells = <1>; ++ ++ /* ++ * This is called "nflash" in the vendor kernel with ++ * "upgrade" and "rootfs" (probably using OpenWrt ++ * splitpart). We call it "firmware" like standard tools ++ * assume. The CFE loader contains incorrect information ++ * about TRX partitions, ignore this, there are no TRX ++ * partitions: this device uses SEAMA. ++ */ ++ firmware@0 { ++ label = "firmware"; ++ reg = <0x00000000 0x08000000>; ++ }; ++ }; ++}; ++ ++&usb2 { ++ vcc-gpios = <&chipcommon 21 GPIO_ACTIVE_HIGH>; ++}; ++ ++&usb3 { ++ vcc-gpios = <&chipcommon 18 GPIO_ACTIVE_HIGH>; ++}; ++ ++&usb3_phy { ++ status = "okay"; ++}; ++ ++&srab { ++ status = "okay"; ++ ++ ports { ++ port@0 { ++ reg = <0>; ++ label = "lan1"; ++ }; ++ ++ port@1 { ++ reg = <1>; ++ label = "lan2"; ++ }; ++ ++ port@2 { ++ reg = <2>; ++ label = "lan3"; ++ }; ++ ++ port@3 { ++ reg = <3>; ++ label = "lan4"; ++ }; ++ ++ port@4 { ++ reg = <4>; ++ label = "wan"; ++ }; ++ ++ port@8 { ++ reg = <8>; ++ label = "cpu"; ++ ethernet = <&gmac2>; ++ phy-mode = "rgmii"; ++ ++ fixed-link { ++ speed = <1000>; ++ full-duplex; ++ }; ++ }; ++ }; ++}; diff --git a/target/linux/bcm53xx/patches-5.15/035-v6.2-0001-ARM-dts-bcm53016-Add-devicetree-for-D-Link-DWL-8610A.patch b/target/linux/bcm53xx/patches-5.15/035-v6.2-0001-ARM-dts-bcm53016-Add-devicetree-for-D-Link-DWL-8610A.patch new file mode 100644 index 0000000000..b7528e9f71 --- /dev/null +++ b/target/linux/bcm53xx/patches-5.15/035-v6.2-0001-ARM-dts-bcm53016-Add-devicetree-for-D-Link-DWL-8610A.patch @@ -0,0 +1,165 @@ +From 9f66e1dd82e3186aee95282657512ca2aef1afe0 Mon Sep 17 00:00:00 2001 +From: Linus Walleij +Date: Wed, 19 Oct 2022 21:34:49 +0200 +Subject: [PATCH] ARM: dts: bcm53016: Add devicetree for D-Link DWL-8610AP + +This adds a device tree for the BCM53016-based D-Link DWL-8610AP +access point wireless router. + +The TRX-format partitions had to be named "firmware" due to +an OpenWrt patch that only accepts parting such nodes if they +are named "firmware". + +Signed-off-by: Linus Walleij +Link: https://lore.kernel.org/r/20221019193449.3036010-2-linus.walleij@linaro.org +Signed-off-by: Florian Fainelli +--- + arch/arm/boot/dts/Makefile | 1 + + .../boot/dts/bcm53016-dlink-dwl-8610ap.dts | 131 ++++++++++++++++++ + 2 files changed, 132 insertions(+) + create mode 100644 arch/arm/boot/dts/bcm53016-dlink-dwl-8610ap.dts + +--- a/arch/arm/boot/dts/Makefile ++++ b/arch/arm/boot/dts/Makefile +@@ -132,6 +132,7 @@ dtb-$(CONFIG_ARCH_BCM_5301X) += \ + bcm47094-netgear-r8500.dtb \ + bcm47094-phicomm-k3.dtb \ + bcm53015-meraki-mr26.dtb \ ++ bcm53016-dlink-dwl-8610ap.dtb \ + bcm53016-meraki-mr32.dtb \ + bcm94708.dtb \ + bcm94709.dtb \ +--- /dev/null ++++ b/arch/arm/boot/dts/bcm53016-dlink-dwl-8610ap.dts +@@ -0,0 +1,131 @@ ++// SPDX-License-Identifier: GPL-2.0-or-later OR MIT ++/dts-v1/; ++ ++#include "bcm4709.dtsi" ++#include "bcm5301x-nand-cs0-bch8.dtsi" ++#include ++#include ++ ++/ { ++ model = "D-Link DWL-8610AP"; ++ compatible = "dlink,dwl-8610ap", "brcm,bcm53016", "brcm,bcm4708"; ++ ++ memory@0 { ++ device_type = "memory"; ++ /* 512 MB RAM in 2 x Macronix D9PSH chips */ ++ reg = <0x00000000 0x08000000>, ++ <0x88000000 0x08000000>; ++ }; ++ ++ leds { ++ compatible = "gpio-leds"; ++ ++ power { ++ function = LED_FUNCTION_POWER; ++ color = ; ++ gpios = <&chipcommon 0 GPIO_ACTIVE_LOW>; ++ default-state = "on"; ++ }; ++ ++ diag { ++ /* Actually "diag" unclear what this means */ ++ function = LED_FUNCTION_INDICATOR; ++ color = ; ++ gpios = <&chipcommon 1 GPIO_ACTIVE_LOW>; ++ default-state = "on"; ++ linux,default-trigger = "heartbeat"; ++ }; ++ ++ wlan-2g { ++ function = LED_FUNCTION_WLAN; ++ color = ; ++ gpios = <&chipcommon 5 GPIO_ACTIVE_LOW>; ++ }; ++ ++ wlan-5g { ++ function = LED_FUNCTION_WLAN; ++ color = ; ++ gpios = <&chipcommon 8 GPIO_ACTIVE_LOW>; ++ }; ++ }; ++ ++ gpio_keys { ++ compatible = "gpio-keys"; ++ ++ button-reset { ++ debounce-interval = <100>; ++ wakeup-source; ++ linux,code = ; ++ label = "reset"; ++ /* This GPIO is actually stored in NVRAM, but it's not gonna change */ ++ gpios = <&chipcommon 4 GPIO_ACTIVE_LOW>; ++ }; ++ }; ++ ++ /* ++ * Flash memory at 0x1e000000-0x1fffffff ++ * Macronix 32 64KB blocks; total size 2MB, same that can be ++ * found attached to the spi_nor SPI controller. ++ */ ++ nvram@1e080000 { ++ compatible = "brcm,nvram"; ++ reg = <0x1e080000 0x00020000>; ++ ++ et0macaddr: et0macaddr { ++ }; ++ ++ et1macaddr: et1macaddr { ++ }; ++ }; ++}; ++ ++&gmac0 { ++ nvmem-cells = <&et0macaddr>; ++ nvmem-cell-names = "mac-address"; ++}; ++ ++&gmac1 { ++ nvmem-cells = <&et1macaddr>; ++ nvmem-cell-names = "mac-address"; ++}; ++ ++&spi_nor { ++ /* Serial SPI NOR Flash MX 25L1606E */ ++ status = "okay"; ++}; ++ ++&nandcs { ++ /* ++ * Spansion S34ML01G100TFI00 128 MB NAND Flash memory ++ * ++ * This ECC is a bit unorthodox but it is what the stock firmware ++ * is using, so to be able to mount the original partitions ++ * this is necessary. ++ */ ++ nand-ecc-strength = <5>; ++ partitions { ++ compatible = "fixed-partitions"; ++ #address-cells = <1>; ++ #size-cells = <1>; ++ ++ /* This is named nflash1.trx in CFE */ ++ trx@0 { ++ label = "firmware"; ++ reg = <0x00000000 0x02800000>; ++ compatible = "brcm,trx"; ++ }; ++ ++ /* This is named nflash1.trx2 in CFE */ ++ trx2@2800000 { ++ label = "firmware2"; ++ reg = <0x02800000 0x02800000>; ++ compatible = "brcm,trx"; ++ }; ++ ++ /* This is named nflash1.rwfs in CFE */ ++ free@5000000 { ++ label = "free"; ++ reg = <0x05000000 0x03000000>; ++ }; ++ }; ++}; diff --git a/target/linux/bcm53xx/patches-5.15/304-ARM-dts-BCM5301X-Specify-switch-ports-for-remaining-.patch b/target/linux/bcm53xx/patches-5.15/304-ARM-dts-BCM5301X-Specify-switch-ports-for-remaining-.patch index d20fe71d48..0fb29e99d3 100644 --- a/target/linux/bcm53xx/patches-5.15/304-ARM-dts-BCM5301X-Specify-switch-ports-for-remaining-.patch +++ b/target/linux/bcm53xx/patches-5.15/304-ARM-dts-BCM5301X-Specify-switch-ports-for-remaining-.patch @@ -311,7 +311,7 @@ Signed-off-by: Rafał Miłecki +}; --- a/arch/arm/boot/dts/bcm4709-asus-rt-ac87u.dts +++ b/arch/arm/boot/dts/bcm4709-asus-rt-ac87u.dts -@@ -68,6 +68,38 @@ +@@ -66,6 +66,38 @@ status = "okay"; }; @@ -352,7 +352,7 @@ Signed-off-by: Rafał Miłecki compatible = "fixed-partitions"; --- a/arch/arm/boot/dts/bcm4709-buffalo-wxr-1900dhp.dts +++ b/arch/arm/boot/dts/bcm4709-buffalo-wxr-1900dhp.dts -@@ -132,3 +132,40 @@ +@@ -130,3 +130,40 @@ &usb3_phy { status = "okay"; }; @@ -395,7 +395,7 @@ Signed-off-by: Rafał Miłecki +}; --- a/arch/arm/boot/dts/bcm4709-linksys-ea9200.dts +++ b/arch/arm/boot/dts/bcm4709-linksys-ea9200.dts -@@ -49,3 +49,45 @@ +@@ -47,3 +47,45 @@ &usb3_phy { status = "okay"; }; @@ -443,7 +443,7 @@ Signed-off-by: Rafał Miłecki +}; --- a/arch/arm/boot/dts/bcm4709-netgear-r7000.dts +++ b/arch/arm/boot/dts/bcm4709-netgear-r7000.dts -@@ -106,3 +106,40 @@ +@@ -104,3 +104,40 @@ &usb3_phy { status = "okay"; }; @@ -621,7 +621,7 @@ Signed-off-by: Rafał Miłecki --- a/arch/arm/boot/dts/bcm4709-tplink-archer-c9-v1.dts +++ b/arch/arm/boot/dts/bcm4709-tplink-archer-c9-v1.dts -@@ -102,6 +102,43 @@ +@@ -100,6 +100,43 @@ vcc-gpio = <&chipcommon 12 GPIO_ACTIVE_HIGH>; }; diff --git a/target/linux/bcm53xx/patches-5.15/310-ARM-BCM5301X-Add-DT-for-Netgear-R7900.patch b/target/linux/bcm53xx/patches-5.15/310-ARM-BCM5301X-Add-DT-for-Netgear-R7900.patch index c4de90760e..e76a12fe1b 100644 --- a/target/linux/bcm53xx/patches-5.15/310-ARM-BCM5301X-Add-DT-for-Netgear-R7900.patch +++ b/target/linux/bcm53xx/patches-5.15/310-ARM-BCM5301X-Add-DT-for-Netgear-R7900.patch @@ -9,7 +9,7 @@ Signed-off-by: Rafał Miłecki --- a/arch/arm/boot/dts/Makefile +++ b/arch/arm/boot/dts/Makefile -@@ -115,6 +115,7 @@ dtb-$(CONFIG_ARCH_BCM_5301X) += \ +@@ -117,6 +117,7 @@ dtb-$(CONFIG_ARCH_BCM_5301X) += \ bcm4709-buffalo-wxr-1900dhp.dtb \ bcm4709-linksys-ea9200.dtb \ bcm4709-netgear-r7000.dtb \ diff --git a/target/linux/bcm53xx/patches-5.15/331-Meraki-MR32-Status-LEDs.patch b/target/linux/bcm53xx/patches-5.15/331-Meraki-MR32-Status-LEDs.patch index fb78ee93c4..92a71e58fe 100644 --- a/target/linux/bcm53xx/patches-5.15/331-Meraki-MR32-Status-LEDs.patch +++ b/target/linux/bcm53xx/patches-5.15/331-Meraki-MR32-Status-LEDs.patch @@ -17,7 +17,7 @@ Signed-off-by: Christian Lamparter }; leds { -@@ -68,7 +69,7 @@ +@@ -66,7 +67,7 @@ max-brightness = <255>; }; From e4770db163a9585c43bb70dc5d6d1e45ef848e4a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= Date: Tue, 8 Nov 2022 12:22:51 +0100 Subject: [PATCH 26/62] kernel: support "linux,rootfs" DT property for splitting rootfs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit OpenWrt's support for splitting rootfs (to create an extra "rootfs_data" partition) is limited to partitions called "rootfs". Upstream kernel allows any name partition to be rootfs if it has "linux,rootfs" property set. Add split support to such partitions in OpenWrt code. Signed-off-by: Rafał Miłecki --- .../pending-5.10/400-mtd-mtdsplit-support.patch | 11 ++++++----- .../pending-5.15/400-mtd-mtdsplit-support.patch | 11 ++++++----- 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/target/linux/generic/pending-5.10/400-mtd-mtdsplit-support.patch b/target/linux/generic/pending-5.10/400-mtd-mtdsplit-support.patch index b34c041df0..89cac88717 100644 --- a/target/linux/generic/pending-5.10/400-mtd-mtdsplit-support.patch +++ b/target/linux/generic/pending-5.10/400-mtd-mtdsplit-support.patch @@ -64,7 +64,7 @@ SVN-Revision: 38002 /* * MTD methods which simply translate the effective address and pass through -@@ -237,6 +239,146 @@ static int mtd_add_partition_attrs(struc +@@ -237,6 +239,147 @@ static int mtd_add_partition_attrs(struc return ret; } @@ -196,7 +196,8 @@ SVN-Revision: 38002 + if (rootfs_found) + return; + -+ if (!strcmp(part->name, "rootfs")) { ++ if (of_find_property(mtd_get_of_node(part), "linux,rootfs", NULL) || ++ !strcmp(part->name, "rootfs")) { + run_parsers_by_type(part, MTD_PARSER_TYPE_ROOTFS); + + rootfs_found = 1; @@ -211,7 +212,7 @@ SVN-Revision: 38002 int mtd_add_partition(struct mtd_info *parent, const char *name, long long offset, long long length) { -@@ -275,6 +417,7 @@ int mtd_add_partition(struct mtd_info *p +@@ -275,6 +418,7 @@ int mtd_add_partition(struct mtd_info *p if (ret) goto err_remove_part; @@ -219,7 +220,7 @@ SVN-Revision: 38002 mtd_add_partition_attrs(child); return 0; -@@ -423,6 +566,7 @@ int add_mtd_partitions(struct mtd_info * +@@ -423,6 +567,7 @@ int add_mtd_partitions(struct mtd_info * goto err_del_partitions; } @@ -227,7 +228,7 @@ SVN-Revision: 38002 mtd_add_partition_attrs(child); /* Look for subpartitions */ -@@ -439,31 +583,6 @@ err_del_partitions: +@@ -439,31 +584,6 @@ err_del_partitions: return ret; } diff --git a/target/linux/generic/pending-5.15/400-mtd-mtdsplit-support.patch b/target/linux/generic/pending-5.15/400-mtd-mtdsplit-support.patch index d07afd70ee..bf82bb3950 100644 --- a/target/linux/generic/pending-5.15/400-mtd-mtdsplit-support.patch +++ b/target/linux/generic/pending-5.15/400-mtd-mtdsplit-support.patch @@ -66,7 +66,7 @@ Subject: [PATCH] mtd: mtdsplit support /* * MTD methods which simply translate the effective address and pass through -@@ -236,6 +238,146 @@ static int mtd_add_partition_attrs(struc +@@ -236,6 +238,147 @@ static int mtd_add_partition_attrs(struc return ret; } @@ -198,7 +198,8 @@ Subject: [PATCH] mtd: mtdsplit support + if (rootfs_found) + return; + -+ if (!strcmp(part->name, "rootfs")) { ++ if (of_find_property(mtd_get_of_node(part), "linux,rootfs", NULL) || ++ !strcmp(part->name, "rootfs")) { + run_parsers_by_type(part, MTD_PARSER_TYPE_ROOTFS); + + rootfs_found = 1; @@ -213,7 +214,7 @@ Subject: [PATCH] mtd: mtdsplit support int mtd_add_partition(struct mtd_info *parent, const char *name, long long offset, long long length) { -@@ -274,6 +416,7 @@ int mtd_add_partition(struct mtd_info *p +@@ -274,6 +417,7 @@ int mtd_add_partition(struct mtd_info *p if (ret) goto err_remove_part; @@ -221,7 +222,7 @@ Subject: [PATCH] mtd: mtdsplit support mtd_add_partition_attrs(child); return 0; -@@ -422,6 +565,7 @@ int add_mtd_partitions(struct mtd_info * +@@ -422,6 +566,7 @@ int add_mtd_partitions(struct mtd_info * goto err_del_partitions; } @@ -229,7 +230,7 @@ Subject: [PATCH] mtd: mtdsplit support mtd_add_partition_attrs(child); /* Look for subpartitions */ -@@ -438,31 +582,6 @@ err_del_partitions: +@@ -438,31 +583,6 @@ err_del_partitions: return ret; } From ddf736e543d4a214f563dc008b6fb5ee5e0d1b66 Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Thu, 10 Nov 2022 13:08:28 +0100 Subject: [PATCH 27/62] hostapd: remove invalid dtim_period option processing dtim_period is a bss property, not a device one. It is already handled properly in mac80211.sh Fixes: 30c64825c7ed ("hostapd: add dtim_period, local_pwr_constraint, spectrum_mgmt_required") Signed-off-by: Felix Fietkau --- package/network/services/hostapd/files/hostapd.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/package/network/services/hostapd/files/hostapd.sh b/package/network/services/hostapd/files/hostapd.sh index 7eeb74e984..79daa915ad 100644 --- a/package/network/services/hostapd/files/hostapd.sh +++ b/package/network/services/hostapd/files/hostapd.sh @@ -131,7 +131,7 @@ hostapd_prepare_device_config() { local base_cfg= - json_get_vars country country3 country_ie beacon_int:100 dtim_period:2 doth require_mode legacy_rates \ + json_get_vars country country3 country_ie beacon_int:100 doth require_mode legacy_rates \ acs_chan_bias local_pwr_constraint spectrum_mgmt_required airtime_mode cell_density \ rts_threshold beacon_rate rssi_reject_assoc_rssi rssi_ignore_probe_request maxassoc @@ -232,7 +232,6 @@ hostapd_prepare_device_config() { [ -n "$brlist" ] && append base_cfg "basic_rates=$brlist" "$N" append base_cfg "beacon_int=$beacon_int" "$N" [ -n "$rts_threshold" ] && append base_cfg "rts_threshold=$rts_threshold" "$N" - append base_cfg "dtim_period=$dtim_period" "$N" [ "$airtime_mode" -gt 0 ] && append base_cfg "airtime_mode=$airtime_mode" "$N" [ -n "$maxassoc" ] && append base_cfg "iface_max_num_sta=$maxassoc" "$N" From 7bd314a577b172a5a9d591fe93e89cde1f4065a0 Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Thu, 10 Nov 2022 13:20:55 +0100 Subject: [PATCH 28/62] kernel: fix vlan parsing issue in mediatek ethernet driver Check the vlan rx offload flag Sync features across netdevs Signed-off-by: Felix Fietkau --- ..._eth_soc-fix-VLAN-rx-hardware-accele.patch | 50 ++++++++----------- ..._eth_soc-drop-packets-to-WDMA-if-the.patch | 2 +- 2 files changed, 22 insertions(+), 30 deletions(-) diff --git a/target/linux/generic/pending-5.15/732-09-net-ethernet-mtk_eth_soc-fix-VLAN-rx-hardware-accele.patch b/target/linux/generic/pending-5.15/732-09-net-ethernet-mtk_eth_soc-fix-VLAN-rx-hardware-accele.patch index d1f82215ca..a065ea8257 100644 --- a/target/linux/generic/pending-5.15/732-09-net-ethernet-mtk_eth_soc-fix-VLAN-rx-hardware-accele.patch +++ b/target/linux/generic/pending-5.15/732-09-net-ethernet-mtk_eth_soc-fix-VLAN-rx-hardware-accele.patch @@ -22,28 +22,14 @@ Signed-off-by: Felix Fietkau #include "mtk_eth_soc.h" #include "mtk_wed.h" -@@ -1960,23 +1961,27 @@ static int mtk_poll_rx(struct napi_struc - if (reason == MTK_PPE_CPU_REASON_HIT_UNBIND_RATE_REACHED) - mtk_ppe_check_skb(eth->ppe[0], skb, hash); - -- if (netdev->features & NETIF_F_HW_VLAN_CTAG_RX) { -- if (MTK_HAS_CAPS(eth->soc->caps, MTK_NETSYS_V2)) { -- if (trxd.rxd3 & RX_DMA_VTAG_V2) -- __vlan_hwaccel_put_tag(skb, -- htons(RX_DMA_VPID(trxd.rxd4)), -- RX_DMA_VID(trxd.rxd4)); -- } else if (trxd.rxd2 & RX_DMA_VTAG) { +@@ -1967,16 +1968,22 @@ static int mtk_poll_rx(struct napi_struc + htons(RX_DMA_VPID(trxd.rxd4)), + RX_DMA_VID(trxd.rxd4)); + } else if (trxd.rxd2 & RX_DMA_VTAG) { - __vlan_hwaccel_put_tag(skb, htons(ETH_P_8021Q), -- RX_DMA_VID(trxd.rxd3)); -- } -+ if (MTK_HAS_CAPS(eth->soc->caps, MTK_NETSYS_V2)) { -+ if (trxd.rxd3 & RX_DMA_VTAG_V2) -+ __vlan_hwaccel_put_tag(skb, -+ htons(RX_DMA_VPID(trxd.rxd4)), -+ RX_DMA_VID(trxd.rxd4)); -+ } else if (trxd.rxd2 & RX_DMA_VTAG) { -+ __vlan_hwaccel_put_tag(skb, htons(RX_DMA_VPID(trxd.rxd3)), -+ RX_DMA_VID(trxd.rxd3)); ++ __vlan_hwaccel_put_tag(skb, htons(RX_DMA_VPID(trxd.rxd3)), + RX_DMA_VID(trxd.rxd3)); + } + } + + /* When using VLAN untagging in combination with DSA, the @@ -51,10 +37,6 @@ Signed-off-by: Felix Fietkau + */ + if (skb_vlan_tag_present(skb) && netdev_uses_dsa(netdev)) { + unsigned int port = ntohs(skb->vlan_proto) & GENMASK(2, 0); -+ -+ if (port < ARRAY_SIZE(eth->dsa_meta) && -+ eth->dsa_meta[port]) -+ skb_dst_set_noref(skb, ð->dsa_meta[port]->dst); - /* If the device is attached to a dsa switch, the special - * tag inserted in VLAN field by hw switch can * be offloaded @@ -62,11 +44,15 @@ Signed-off-by: Felix Fietkau - */ - if (netdev_uses_dsa(netdev)) - __vlan_hwaccel_clear_tag(skb); ++ if (port < ARRAY_SIZE(eth->dsa_meta) && ++ eth->dsa_meta[port]) ++ skb_dst_set_noref(skb, ð->dsa_meta[port]->dst); ++ + __vlan_hwaccel_clear_tag(skb); } skb_record_rx_queue(skb, 0); -@@ -2793,15 +2798,19 @@ static netdev_features_t mtk_fix_feature +@@ -2793,15 +2800,25 @@ static netdev_features_t mtk_fix_feature static int mtk_set_features(struct net_device *dev, netdev_features_t features) { @@ -77,6 +63,7 @@ Signed-off-by: Felix Fietkau + struct mtk_mac *mac = netdev_priv(dev); + struct mtk_eth *eth = mac->hw; + netdev_features_t diff = dev->features ^ features; ++ int i; - if (!(features & NETIF_F_LRO)) + if ((diff & NETIF_F_LRO) && !(features & NETIF_F_LRO)) @@ -88,11 +75,16 @@ Signed-off-by: Felix Fietkau + mtk_w32(eth, !!(features & NETIF_F_HW_VLAN_CTAG_RX), + MTK_CDMP_EG_CTRL); + ++ /* sync features with other MAC */ ++ for (i = 0; i < MTK_MAC_COUNT; i++) ++ if (eth->netdev[i] && eth->netdev[i] != dev) ++ eth->netdev[i]->features = features; ++ + return 0; } /* wait for DMA to finish whatever it is doing before we start using it again */ -@@ -3083,11 +3092,45 @@ found: +@@ -3083,11 +3100,45 @@ found: return NOTIFY_DONE; } @@ -139,7 +131,7 @@ Signed-off-by: Felix Fietkau err = phylink_of_phy_connect(mac->phylink, mac->of_node, 0); if (err) { -@@ -3417,6 +3460,10 @@ static int mtk_hw_init(struct mtk_eth *e +@@ -3417,6 +3468,10 @@ static int mtk_hw_init(struct mtk_eth *e */ val = mtk_r32(eth, MTK_CDMQ_IG_CTRL); mtk_w32(eth, val | MTK_CDMQ_STAG_EN, MTK_CDMQ_IG_CTRL); @@ -150,7 +142,7 @@ Signed-off-by: Felix Fietkau /* Enable RX VLan Offloading */ mtk_w32(eth, 1, MTK_CDMP_EG_CTRL); -@@ -3634,6 +3681,12 @@ static int mtk_free_dev(struct mtk_eth * +@@ -3634,6 +3689,12 @@ static int mtk_free_dev(struct mtk_eth * free_netdev(eth->netdev[i]); } diff --git a/target/linux/generic/pending-5.15/732-12-net-ethernet-mtk_eth_soc-drop-packets-to-WDMA-if-the.patch b/target/linux/generic/pending-5.15/732-12-net-ethernet-mtk_eth_soc-drop-packets-to-WDMA-if-the.patch index 85937fa9a0..2ab647537b 100644 --- a/target/linux/generic/pending-5.15/732-12-net-ethernet-mtk_eth_soc-drop-packets-to-WDMA-if-the.patch +++ b/target/linux/generic/pending-5.15/732-12-net-ethernet-mtk_eth_soc-drop-packets-to-WDMA-if-the.patch @@ -11,7 +11,7 @@ Signed-off-by: Felix Fietkau --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c -@@ -3516,9 +3516,12 @@ static int mtk_hw_init(struct mtk_eth *e +@@ -3524,9 +3524,12 @@ static int mtk_hw_init(struct mtk_eth *e mtk_w32(eth, 0x21021000, MTK_FE_INT_GRP); if (MTK_HAS_CAPS(eth->soc->caps, MTK_NETSYS_V2)) { From 8a4537d2a9493f917fd04231fc1081e24e8be50a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= Date: Thu, 10 Nov 2022 13:58:19 +0100 Subject: [PATCH 29/62] fstools: update to git HEAD MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 3affe9e block: try multiple NTFS filesystem implementations Signed-off-by: Rafał Miłecki --- package/system/fstools/Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package/system/fstools/Makefile b/package/system/fstools/Makefile index fcb79e0f32..f7cb17461c 100644 --- a/package/system/fstools/Makefile +++ b/package/system/fstools/Makefile @@ -12,9 +12,9 @@ PKG_RELEASE:=$(AUTORELEASE) PKG_SOURCE_PROTO:=git PKG_SOURCE_URL=$(PROJECT_GIT)/project/fstools.git -PKG_MIRROR_HASH:=dd8467092b30ea15a3568fea567e34f7d0b60d5c6ee0d1353e93a4df110ab1ab -PKG_SOURCE_DATE:=2022-10-18 -PKG_SOURCE_VERSION:=ee54c6bce17c48a725eadcc313b6ca8445f9ec8c +PKG_MIRROR_HASH:=28be14a1e28fc62e80681e1b5e7f2435692ee326b66afcc1f3d158764df686d5 +PKG_SOURCE_DATE:=2022-11-10 +PKG_SOURCE_VERSION:=3affe9ea5098c8bb90111ce97d50ad976ef0c034 CMAKE_INSTALL:=1 PKG_LICENSE:=GPL-2.0 From 161b22d103decd82868e8e3c3fe09b88cf64724c Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Thu, 10 Nov 2022 14:46:21 +0100 Subject: [PATCH 30/62] mac80211: fix mesh airtime link metric estimation fix reading the per-packet rate on devices with firmware rate control Signed-off-by: Felix Fietkau --- ...x-mesh-airtime-link-metric-estimatin.patch | 36 +++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 package/kernel/mac80211/patches/subsys/346-v6.0-wifi-mac80211-fix-mesh-airtime-link-metric-estimatin.patch diff --git a/package/kernel/mac80211/patches/subsys/346-v6.0-wifi-mac80211-fix-mesh-airtime-link-metric-estimatin.patch b/package/kernel/mac80211/patches/subsys/346-v6.0-wifi-mac80211-fix-mesh-airtime-link-metric-estimatin.patch new file mode 100644 index 0000000000..7185a7fed6 --- /dev/null +++ b/package/kernel/mac80211/patches/subsys/346-v6.0-wifi-mac80211-fix-mesh-airtime-link-metric-estimatin.patch @@ -0,0 +1,36 @@ +From: Aditya Kumar Singh +Date: Fri, 1 Jul 2022 19:06:11 +0530 +Subject: [PATCH] wifi: mac80211: fix mesh airtime link metric estimating + +ieee80211s_update_metric function uses sta_set_rate_info_tx +function to get struct rate_info data from ieee80211_tx_rate +struct, present in ieee80211_sta->deflink.tx_stats. However, +drivers can skip tx rate calculation by setting rate idx as +-1. Such drivers provides rate_info directly and hence +ieee80211s metric is updated incorrectly since ieee80211_tx_rate +has inconsistent data. + +Add fix to use rate_info directly if present instead of +sta_set_rate_info_tx for updating ieee80211s metric. + +Signed-off-by: Aditya Kumar Singh +Link: https://lore.kernel.org/r/20220701133611.544-1-quic_adisi@quicinc.com +Signed-off-by: Johannes Berg +--- + +--- a/net/mac80211/mesh_hwmp.c ++++ b/net/mac80211/mesh_hwmp.c +@@ -310,7 +310,12 @@ void ieee80211s_update_metric(struct iee + LINK_FAIL_THRESH) + mesh_plink_broken(sta); + +- sta_set_rate_info_tx(sta, &sta->tx_stats.last_rate, &rinfo); ++ /* use rate info set by the driver directly if present */ ++ if (st->rate) ++ rinfo = sta->tx_stats.last_rate_info; ++ else ++ sta_set_rate_info_tx(sta, &sta->tx_stats.last_rate, &rinfo); ++ + ewma_mesh_tx_rate_avg_add(&sta->mesh->tx_rate_avg, + cfg80211_calculate_bitrate(&rinfo)); + } From 04b8ad60fd92b375cf661a56afb853344c95ca99 Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Thu, 10 Nov 2022 22:24:54 +0100 Subject: [PATCH 31/62] kernel: more fixes for mtk_eth_soc performance optimization - fix features sync between netdevs - fix crash in dsa_switch_rcv Fixes: ceb1451c10c1 ("kernel: add mediatek soc ethernet performance improvements") Signed-off-by: Felix Fietkau --- ...ort-for-DSA-rx-offloading-via-metada.patch | 7 ++-- ..._eth_soc-fix-VLAN-rx-hardware-accele.patch | 38 ++++++++++--------- ...ethernet-mediatek-support-net-labels.patch | 4 +- 3 files changed, 27 insertions(+), 22 deletions(-) diff --git a/target/linux/generic/pending-5.15/732-08-net-dsa-add-support-for-DSA-rx-offloading-via-metada.patch b/target/linux/generic/pending-5.15/732-08-net-dsa-add-support-for-DSA-rx-offloading-via-metada.patch index 7fe7e5c07d..f6799f2949 100644 --- a/target/linux/generic/pending-5.15/732-08-net-dsa-add-support-for-DSA-rx-offloading-via-metada.patch +++ b/target/linux/generic/pending-5.15/732-08-net-dsa-add-support-for-DSA-rx-offloading-via-metada.patch @@ -45,7 +45,7 @@ Signed-off-by: Felix Fietkau struct dsa_port *cpu_dp = dev->dsa_ptr; struct sk_buff *nskb = NULL; struct dsa_slave_priv *p; -@@ -238,7 +240,21 @@ static int dsa_switch_rcv(struct sk_buff +@@ -238,7 +240,22 @@ static int dsa_switch_rcv(struct sk_buff if (!skb) return 0; @@ -53,14 +53,15 @@ Signed-off-by: Felix Fietkau + if (md_dst && md_dst->type == METADATA_HW_PORT_MUX) { + unsigned int port = md_dst->u.port_info.port_id; + -+ dsa_default_offload_fwd_mark(skb); + skb_dst_set(skb, NULL); + if (!skb_has_extensions(skb)) + skb->slow_gro = 0; + + skb->dev = dsa_master_find_slave(dev, 0, port); -+ if (skb->dev) ++ if (likely(skb->dev)) { ++ dsa_default_offload_fwd_mark(skb); + nskb = skb; ++ } + } else { + nskb = cpu_dp->rcv(skb, dev); + } diff --git a/target/linux/generic/pending-5.15/732-09-net-ethernet-mtk_eth_soc-fix-VLAN-rx-hardware-accele.patch b/target/linux/generic/pending-5.15/732-09-net-ethernet-mtk_eth_soc-fix-VLAN-rx-hardware-accele.patch index a065ea8257..8a20202131 100644 --- a/target/linux/generic/pending-5.15/732-09-net-ethernet-mtk_eth_soc-fix-VLAN-rx-hardware-accele.patch +++ b/target/linux/generic/pending-5.15/732-09-net-ethernet-mtk_eth_soc-fix-VLAN-rx-hardware-accele.patch @@ -52,39 +52,43 @@ Signed-off-by: Felix Fietkau } skb_record_rx_queue(skb, 0); -@@ -2793,15 +2800,25 @@ static netdev_features_t mtk_fix_feature +@@ -2793,15 +2800,30 @@ static netdev_features_t mtk_fix_feature static int mtk_set_features(struct net_device *dev, netdev_features_t features) { - int err = 0; -- -- if (!((dev->features ^ features) & NETIF_F_LRO)) -- return 0; + struct mtk_mac *mac = netdev_priv(dev); + struct mtk_eth *eth = mac->hw; + netdev_features_t diff = dev->features ^ features; + int i; ++ ++ if ((diff & NETIF_F_LRO) && !(features & NETIF_F_LRO)) ++ mtk_hwlro_netdev_disable(dev); + +- if (!((dev->features ^ features) & NETIF_F_LRO)) ++ /* Set RX VLAN offloading */ ++ if (!(diff & NETIF_F_HW_VLAN_CTAG_RX)) + return 0; - if (!(features & NETIF_F_LRO)) -+ if ((diff & NETIF_F_LRO) && !(features & NETIF_F_LRO)) - mtk_hwlro_netdev_disable(dev); +- mtk_hwlro_netdev_disable(dev); ++ mtk_w32(eth, !!(features & NETIF_F_HW_VLAN_CTAG_RX), ++ MTK_CDMP_EG_CTRL); - return err; -+ /* Set RX VLAN offloading */ -+ if (diff & NETIF_F_HW_VLAN_CTAG_RX) -+ mtk_w32(eth, !!(features & NETIF_F_HW_VLAN_CTAG_RX), -+ MTK_CDMP_EG_CTRL); -+ + /* sync features with other MAC */ -+ for (i = 0; i < MTK_MAC_COUNT; i++) -+ if (eth->netdev[i] && eth->netdev[i] != dev) -+ eth->netdev[i]->features = features; ++ for (i = 0; i < MTK_MAC_COUNT; i++) { ++ if (!eth->netdev[i] || eth->netdev[i] == dev) ++ continue; ++ eth->netdev[i]->features &= ~NETIF_F_HW_VLAN_CTAG_RX; ++ eth->netdev[i]->features |= features & NETIF_F_HW_VLAN_CTAG_RX; ++ } + + return 0; } /* wait for DMA to finish whatever it is doing before we start using it again */ -@@ -3083,11 +3100,45 @@ found: +@@ -3083,11 +3105,45 @@ found: return NOTIFY_DONE; } @@ -131,7 +135,7 @@ Signed-off-by: Felix Fietkau err = phylink_of_phy_connect(mac->phylink, mac->of_node, 0); if (err) { -@@ -3417,6 +3468,10 @@ static int mtk_hw_init(struct mtk_eth *e +@@ -3417,6 +3473,10 @@ static int mtk_hw_init(struct mtk_eth *e */ val = mtk_r32(eth, MTK_CDMQ_IG_CTRL); mtk_w32(eth, val | MTK_CDMQ_STAG_EN, MTK_CDMQ_IG_CTRL); @@ -142,7 +146,7 @@ Signed-off-by: Felix Fietkau /* Enable RX VLan Offloading */ mtk_w32(eth, 1, MTK_CDMP_EG_CTRL); -@@ -3634,6 +3689,12 @@ static int mtk_free_dev(struct mtk_eth * +@@ -3634,6 +3694,12 @@ static int mtk_free_dev(struct mtk_eth * free_netdev(eth->netdev[i]); } diff --git a/target/linux/ramips/patches-5.15/700-net-ethernet-mediatek-support-net-labels.patch b/target/linux/ramips/patches-5.15/700-net-ethernet-mediatek-support-net-labels.patch index 74e8f999ab..c447793eae 100644 --- a/target/linux/ramips/patches-5.15/700-net-ethernet-mediatek-support-net-labels.patch +++ b/target/linux/ramips/patches-5.15/700-net-ethernet-mediatek-support-net-labels.patch @@ -14,7 +14,7 @@ Signed-off-by: René van Dorst --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c -@@ -3918,6 +3918,7 @@ static const struct net_device_ops mtk_n +@@ -4021,6 +4021,7 @@ static const struct net_device_ops mtk_n static int mtk_add_mac(struct mtk_eth *eth, struct device_node *np) { @@ -22,7 +22,7 @@ Signed-off-by: René van Dorst const __be32 *_id = of_get_property(np, "reg", NULL); phy_interface_t phy_mode; struct phylink *phylink; -@@ -4046,6 +4047,9 @@ static int mtk_add_mac(struct mtk_eth *e +@@ -4149,6 +4150,9 @@ static int mtk_add_mac(struct mtk_eth *e register_netdevice_notifier(&mac->device_notifier); } From e586de8dbf00fac72a37177ba08f74bb1091dd86 Mon Sep 17 00:00:00 2001 From: Daniel Golle Date: Thu, 10 Nov 2022 14:16:32 +0000 Subject: [PATCH 32/62] ath79: add support for Teltonika RUT300 Add support for the Teltonika RUT300 rugged industrial Ethernet router Hardware -------- SoC: Qualcomm Atheros QCA9531 RAM: 64M DDR2 (EtronTech EM68B16CWQK-25IH) FLASH: 16M SPI-NOR (Winbond W25Q128) ETH: 4x 100M LAN (QCA9533 internal AR8229 switch, eth0) 1x 100M WAN (QCA9533 internal PHY, eth1) UART: 115200 8n1, same debug port as other Teltonika devices USB: 1 single USB 2.0 host port BUTTON: Reset LED: 1x green power LED (always on) 5x yellow Ethernet port LED (controlled by Linux) WAN port LED is used as boot status and upgrade indicator as the power LED cannot be controlled in software. Use the *-factory.bin file to intially flash the device using the vendor firmware's Web-UI. Signed-off-by: Daniel Golle --- .../ath79/dts/qca9531_teltonika_rut300.dts | 164 ++++++++++++++++++ .../generic/base-files/etc/board.d/01_leds | 7 + .../generic/base-files/etc/board.d/02_network | 5 + target/linux/ath79/image/generic.mk | 47 +++++ 4 files changed, 223 insertions(+) create mode 100644 target/linux/ath79/dts/qca9531_teltonika_rut300.dts diff --git a/target/linux/ath79/dts/qca9531_teltonika_rut300.dts b/target/linux/ath79/dts/qca9531_teltonika_rut300.dts new file mode 100644 index 0000000000..a4f5fb543b --- /dev/null +++ b/target/linux/ath79/dts/qca9531_teltonika_rut300.dts @@ -0,0 +1,164 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT +/dts-v1/; + +#include +#include +#include "qca953x.dtsi" + +/ { + compatible = "teltonika,rut300", "teltonika,rut30x", "qca,qca9531"; + model = "TELTONIKA RUT300"; + + aliases { + label-mac-device = ð1; + led-boot = &led_wan; + led-failsafe = &led_wan; + led-running = &led_wan; + led-upgrade = &led_wan; + serial0 = &uart; + }; + + leds { + compatible = "gpio-leds"; + pinctrl-names = "default"; + pinctrl-0 = <&pmx_leds_switch>, <&jtag_disable_pins>; + + led_wan: wan { + label = "yellow:wan"; + gpios = <&gpio 0 GPIO_ACTIVE_HIGH>; + }; + + lan1 { + label = "yellow:lan1"; + gpios = <&gpio 4 GPIO_ACTIVE_HIGH>; + }; + + lan2 { + label = "yellow:lan2"; + gpios = <&gpio 3 GPIO_ACTIVE_HIGH>; + }; + + lan3 { + label = "yellow:lan3"; + gpios = <&gpio 2 GPIO_ACTIVE_HIGH>; + }; + + lan4 { + label = "yellow:lan4"; + gpios = <&gpio 1 GPIO_ACTIVE_HIGH>; + }; + }; + + keys { + compatible = "gpio-keys"; + + reset { + label = "reset"; + linux,code = ; + gpios = <&gpio 17 GPIO_ACTIVE_LOW>; + }; + }; +}; + +&spi { + status = "okay"; + num-cs = <1>; + + flash@0 { + compatible = "jedec,spi-nor"; + reg = <0>; + spi-max-frequency = <25000000>; + + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + partition@0 { + label = "u-boot"; + reg = <0x000000 0x020000>; + read-only; + }; + + config: partition@20000 { + label = "config"; + reg = <0x020000 0x010000>; + read-only; + }; + + partition@30000 { + label = "art"; + reg = <0x030000 0x010000>; + read-only; + }; + + partition@40000 { + compatible = "denx,uimage"; + label = "firmware"; + reg = <0x040000 0xf30000>; + }; + + partition@f70000 { + label = "event-log"; + reg = <0xf70000 0x090000>; + }; + }; + }; +}; + +&usb0 { + #address-cells = <1>; + #size-cells = <0>; + status = "okay"; + + hub_port0: port@1 { + reg = <1>; + #trigger-source-cells = <0>; + }; +}; + +&usb_phy { + status = "okay"; +}; + +&uart { + status = "okay"; +}; + +&config { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_config_0: macaddr@0 { + reg = <0x0 0x6>; + }; +}; + +ð0 { + status = "okay"; + phy-handle = <&swphy0>; + + nvmem-cells = <&macaddr_config_0>; + nvmem-cell-names = "mac-address"; + mac-address-increment = <1>; +}; + +ð1 { + phy-handle = <&swphy4>; + nvmem-cells = <&macaddr_config_0>; + nvmem-cell-names = "mac-address"; + + gmac-config { + device = <&gmac>; + switch-phy-swap = <1>; + }; +}; + +&pinmux { + pmx_leds_switch: leds_switch { + // switch port LEDs on GPIO 0~4 + pinctrl-single,bits = <0x0 0x00000000 0xffffffff>, + <0x4 0x00000000 0x000000ff>; + }; +}; diff --git a/target/linux/ath79/generic/base-files/etc/board.d/01_leds b/target/linux/ath79/generic/base-files/etc/board.d/01_leds index 606a194f7e..7fe9343876 100644 --- a/target/linux/ath79/generic/base-files/etc/board.d/01_leds +++ b/target/linux/ath79/generic/base-files/etc/board.d/01_leds @@ -337,6 +337,13 @@ teltonika,rut230-v1) ucidef_set_led_netdev "wan" "WAN" "green:wan" "eth1" ucidef_set_led_switch "lan" "LAN" "green:lan" "switch0" "0x04" ;; +teltonika,rut300) + ucidef_set_led_netdev "wan" "WAN" "yellow:wan" "eth1" + ucidef_set_led_switch "lan1" "LAN1" "yellow:lan1" "switch0" "0x02" + ucidef_set_led_switch "lan2" "LAN2" "yellow:lan2" "switch0" "0x10" + ucidef_set_led_switch "lan3" "LAN3" "yellow:lan3" "switch0" "0x08" + ucidef_set_led_switch "lan4" "LAN4" "yellow:lan4" "switch0" "0x04" + ;; tplink,archer-a7-v5|\ tplink,archer-c7-v4|\ tplink,archer-c7-v5) diff --git a/target/linux/ath79/generic/base-files/etc/board.d/02_network b/target/linux/ath79/generic/base-files/etc/board.d/02_network index e47f66c2f2..339005f051 100644 --- a/target/linux/ath79/generic/base-files/etc/board.d/02_network +++ b/target/linux/ath79/generic/base-files/etc/board.d/02_network @@ -193,6 +193,11 @@ ath79_setup_interfaces() ucidef_add_switch "switch0" \ "0@eth0" "1:lan:4" "2:lan:3" "3:lan:2" "4:lan:1" ;; + teltonika,rut300) + ucidef_set_interface_wan "eth1" + ucidef_add_switch "switch0" \ + "0@eth0" "1:lan:1" "2:lan:4" "3:lan:3" "4:lan:2" + ;; buffalo,wzr-hp-g300nh-rb|\ buffalo,wzr-hp-g300nh-s|\ dlink,dir-825-b1|\ diff --git a/target/linux/ath79/image/generic.mk b/target/linux/ath79/image/generic.mk index 11c5669fe4..e5bc73e5a6 100644 --- a/target/linux/ath79/image/generic.mk +++ b/target/linux/ath79/image/generic.mk @@ -10,6 +10,7 @@ DEVICE_VARS += SEAMA_SIGNATURE SEAMA_MTDBLOCK DEVICE_VARS += KERNEL_INITRAMFS_PREFIX DAP_SIGNATURE DEVICE_VARS += EDIMAX_HEADER_MAGIC EDIMAX_HEADER_MODEL DEVICE_VARS += OPENMESH_CE_TYPE ZYXEL_MODEL_STRING +DEVICE_VARS += SUPPORTED_TELTONIKA_DEVICES define Build/addpattern -$(STAGING_DIR_HOST)/bin/addpattern -B $(ADDPATTERN_ID) \ @@ -139,6 +140,35 @@ define Build/teltonika-v1-header @mv $@.new $@ endef +metadata_json_teltonika = \ + '{ $(if $(IMAGE_METADATA),$(IMAGE_METADATA)$(comma)) \ + "metadata_version": "1.1", \ + "compat_version": "$(call json_quote,$(compat_version))", \ + "version":"$(call json_quote,$(VERSION_DIST))-$(call json_quote,$(VERSION_NUMBER))-$(call json_quote,$(REVISION))", \ + "device_code": [".*"], \ + "hwver": [".*"], \ + "batch": [".*"], \ + "serial": [".*"], \ + $(if $(DEVICE_COMPAT_MESSAGE),"compat_message": "$(call json_quote,$(DEVICE_COMPAT_MESSAGE))"$(comma)) \ + $(if $(filter-out 1.0,$(compat_version)),"new_supported_devices": \ + [$(call metadata_devices,$(SUPPORTED_TELTONIKA_DEVICES))]$(comma) \ + "supported_devices": ["$(call json_quote,$(legacy_supported_message))"]$(comma)) \ + $(if $(filter 1.0,$(compat_version)),"supported_devices":[$(call metadata_devices,$(SUPPORTED_TELTONIKA_DEVICES))]$(comma)) \ + "version_wrt": { \ + "dist": "$(call json_quote,$(VERSION_DIST))", \ + "version": "$(call json_quote,$(VERSION_NUMBER))", \ + "revision": "$(call json_quote,$(REVISION))", \ + "target": "$(call json_quote,$(TARGETID))", \ + "board": "$(call json_quote,$(if $(BOARD_NAME),$(BOARD_NAME),$(DEVICE_NAME)))" \ + }, \ + "hw_support": {}, \ + "hw_mods": {} \ + }' + +define Build/append-metadata-teltonika + echo $(call metadata_json_teltonika) | fwtool -I - $@ +endef + define Build/wrgg-pad-rootfs $(STAGING_DIR_HOST)/bin/padjffs2 $(IMAGE_ROOTFS) -c 64 >>$@ endef @@ -2527,6 +2557,23 @@ define Device/teltonika_rut230-v1 endef TARGET_DEVICES += teltonika_rut230-v1 +define Device/teltonika_rut300 + SOC := qca9531 + DEVICE_VENDOR := Teltonika + DEVICE_MODEL := RUT300 + SUPPORTED_TELTONIKA_DEVICES := teltonika,rut30x + DEVICE_PACKAGES := -kmod-ath9k -uboot-envtools -wpad-basic-wolfssl kmod-usb2 + IMAGE_SIZE := 15552k + IMAGES += factory.bin + IMAGE/factory.bin = append-kernel | pad-to $$$$(BLOCKSIZE) | \ + append-rootfs | pad-rootfs | append-metadata-teltonika | \ + check-size $$$$(IMAGE_SIZE) + IMAGE/sysupgrade.bin = append-kernel | pad-to $$$$(BLOCKSIZE) | \ + append-rootfs | pad-rootfs | append-metadata | \ + check-size $$$$(IMAGE_SIZE) +endef +TARGET_DEVICES += teltonika_rut300 + define Device/teltonika_rut955 SOC := ar9344 DEVICE_VENDOR := Teltonika From 047d471317b70f00005d03e6f6d21cb403fb6c42 Mon Sep 17 00:00:00 2001 From: Daniel Golle Date: Thu, 10 Nov 2022 20:34:15 +0000 Subject: [PATCH 33/62] procd: update to git HEAD 24f6bc4 jail: correctly check for null pointer 93b2c2d jail: ignore missing .dynamic sect 039b88f sysupgrade: print errno on failure Signed-off-by: Daniel Golle --- package/system/procd/Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package/system/procd/Makefile b/package/system/procd/Makefile index 13d74ad7f6..5e9733675a 100644 --- a/package/system/procd/Makefile +++ b/package/system/procd/Makefile @@ -12,9 +12,9 @@ PKG_RELEASE:=$(AUTORELEASE) PKG_SOURCE_PROTO:=git PKG_SOURCE_URL=$(PROJECT_GIT)/project/procd.git -PKG_MIRROR_HASH:=b03b6cd3321451813bb802647b8d574e25d39434167f36f271fef170ebd2f2c8 -PKG_SOURCE_DATE:=2022-07-17 -PKG_SOURCE_VERSION:=ef5d3e36e8b23ee2e1989c22717b21649dc9a388 +PKG_MIRROR_HASH:=d60b4aa9d47d75e906dfd812528a1bc28e91f5af72a9d9275056b71b19d99f04 +PKG_SOURCE_DATE:=2022-11-10 +PKG_SOURCE_VERSION:=039b88f75367203e540009cc97603b1bce3fafa6 CMAKE_INSTALL:=1 PKG_LICENSE:=GPL-2.0 From 45ac906c6415cebd12281088da6b06668c057f0a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= Date: Fri, 11 Nov 2022 14:54:46 +0100 Subject: [PATCH 34/62] bcm4908: update DTS files with the latest changes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The most affecting change is move of files from bcm4908/ to the bcmbca/. That required updating few paths. Signed-off-by: Rafał Miłecki --- target/linux/bcm4908/image/Makefile | 6 +- target/linux/bcm4908/image/bootfs-bcm4908.its | 2 +- ...cmbca-update-BCM4908-board-dts-files.patch | 66 ++++++++++++++ ...ts-Move-BCM4908-dts-to-bcmbca-folder.patch | 85 +++++++++++++++++++ ...64-dts-Add-BCM4908-generic-board-dts.patch | 62 ++++++++++++++ ...om-bcmbca-bcm4908-add-TWD-block-time.patch | 31 +++++++ ...roadcom-bcmbca-bcm6858-add-TWD-block.patch | 46 ++++++++++ ...m-bcmbca-bcm4908-limit-amount-of-GP.patch} | 8 +- 8 files changed, 298 insertions(+), 8 deletions(-) create mode 100644 target/linux/bcm4908/patches-5.10/038-v6.1-0004-arm64-dts-bcmbca-update-BCM4908-board-dts-files.patch create mode 100644 target/linux/bcm4908/patches-5.10/038-v6.1-0005-arm64-dts-Move-BCM4908-dts-to-bcmbca-folder.patch create mode 100644 target/linux/bcm4908/patches-5.10/038-v6.1-0006-arm64-dts-Add-BCM4908-generic-board-dts.patch create mode 100644 target/linux/bcm4908/patches-5.10/039-v6.2-0001-arm64-dts-broadcom-bcmbca-bcm4908-add-TWD-block-time.patch create mode 100644 target/linux/bcm4908/patches-5.10/039-v6.2-0002-arm64-dts-broadcom-bcmbca-bcm6858-add-TWD-block.patch rename target/linux/bcm4908/patches-5.10/{300-arm64-dts-broadcom-bcm4908-limit-amount-of-GPIOs.patch => 300-arm64-dts-broadcom-bcmbca-bcm4908-limit-amount-of-GP.patch} (71%) diff --git a/target/linux/bcm4908/image/Makefile b/target/linux/bcm4908/image/Makefile index 7116c2a9f1..8e751a8d02 100644 --- a/target/linux/bcm4908/image/Makefile +++ b/target/linux/bcm4908/image/Makefile @@ -77,7 +77,7 @@ endef define Device/asus_gt-ac5300 DEVICE_VENDOR := Asus DEVICE_MODEL := GT-AC5300 - DEVICE_DTS := broadcom/bcm4908/bcm4908-asus-gt-ac5300 + DEVICE_DTS := broadcom/bcmbca/bcm4908-asus-gt-ac5300 IMAGES := bin IMAGE/bin := append-ubi | bcm4908img | bcm4908asus ASUS_PRODUCTID := GT-AC5300 @@ -100,7 +100,7 @@ endef define Device/netgear_r8000p DEVICE_VENDOR := Netgear DEVICE_MODEL := R8000P - DEVICE_DTS := broadcom/bcm4908/bcm4906-netgear-r8000p + DEVICE_DTS := broadcom/bcmbca/bcm4906-netgear-r8000p IMAGES := bin IMAGE/chk := append-ubi | bcm4908img | netgear-chk NETGEAR_BOARD_ID := U12H359T00_NETGEAR @@ -112,7 +112,7 @@ define Device/tplink_archer-c2300-v1 DEVICE_VENDOR := TP-Link DEVICE_MODEL := Archer C2300 DEVICE_VARIANT := v1 - DEVICE_DTS := broadcom/bcm4908/bcm4906-tplink-archer-c2300-v1 + DEVICE_DTS := broadcom/bcmbca/bcm4906-tplink-archer-c2300-v1 IMAGES := bin IMAGE/bin := append-ubi | bcm4908img BROKEN := y diff --git a/target/linux/bcm4908/image/bootfs-bcm4908.its b/target/linux/bcm4908/image/bootfs-bcm4908.its index d5ac21fd6a..2086fc7ec9 100644 --- a/target/linux/bcm4908/image/bootfs-bcm4908.its +++ b/target/linux/bcm4908/image/bootfs-bcm4908.its @@ -25,7 +25,7 @@ fdt_linux_RAX220 { description = "dtb"; - data = /incbin/("${dts_dir}/broadcom/bcm4908/bcm4908-netgear-raxe500.dtb"); + data = /incbin/("${dts_dir}/broadcom/bcmbca/bcm4908-netgear-raxe500.dtb"); arch = "arm64"; type = "flat_dt"; compression = "none"; diff --git a/target/linux/bcm4908/patches-5.10/038-v6.1-0004-arm64-dts-bcmbca-update-BCM4908-board-dts-files.patch b/target/linux/bcm4908/patches-5.10/038-v6.1-0004-arm64-dts-bcmbca-update-BCM4908-board-dts-files.patch new file mode 100644 index 0000000000..d4b7a983de --- /dev/null +++ b/target/linux/bcm4908/patches-5.10/038-v6.1-0004-arm64-dts-bcmbca-update-BCM4908-board-dts-files.patch @@ -0,0 +1,66 @@ +From 4fdcbde682291fba2c3f45a41decd656d92a314f Mon Sep 17 00:00:00 2001 +From: William Zhang +Date: Wed, 3 Aug 2022 10:54:49 -0700 +Subject: [PATCH] arm64: dts: bcmbca: update BCM4908 board dts files +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Append "brcm,bcmbca" to compatible strings based on the new bcmbca +binding rule for BCM4908 family based boards. + +Signed-off-by: William Zhang +Acked-by: Rafał Miłecki +Link: https://lore.kernel.org/r/20220803175455.47638-4-william.zhang@broadcom.com +Signed-off-by: Florian Fainelli +--- + arch/arm64/boot/dts/broadcom/bcm4908/bcm4906-netgear-r8000p.dts | 2 +- + .../dts/broadcom/bcm4908/bcm4906-tplink-archer-c2300-v1.dts | 2 +- + arch/arm64/boot/dts/broadcom/bcm4908/bcm4908-asus-gt-ac5300.dts | 2 +- + .../arm64/boot/dts/broadcom/bcm4908/bcm4908-netgear-raxe500.dts | 2 +- + 4 files changed, 4 insertions(+), 4 deletions(-) + +--- a/arch/arm64/boot/dts/broadcom/bcm4908/bcm4906-netgear-r8000p.dts ++++ b/arch/arm64/boot/dts/broadcom/bcm4908/bcm4906-netgear-r8000p.dts +@@ -7,7 +7,7 @@ + #include "bcm4906.dtsi" + + / { +- compatible = "netgear,r8000p", "brcm,bcm4906", "brcm,bcm4908"; ++ compatible = "netgear,r8000p", "brcm,bcm4906", "brcm,bcm4908", "brcm,bcmbca"; + model = "Netgear R8000P"; + + memory@0 { +--- a/arch/arm64/boot/dts/broadcom/bcm4908/bcm4906-tplink-archer-c2300-v1.dts ++++ b/arch/arm64/boot/dts/broadcom/bcm4908/bcm4906-tplink-archer-c2300-v1.dts +@@ -7,7 +7,7 @@ + #include "bcm4906.dtsi" + + / { +- compatible = "tplink,archer-c2300-v1", "brcm,bcm4906", "brcm,bcm4908"; ++ compatible = "tplink,archer-c2300-v1", "brcm,bcm4906", "brcm,bcm4908", "brcm,bcmbca"; + model = "TP-Link Archer C2300 V1"; + + memory@0 { +--- a/arch/arm64/boot/dts/broadcom/bcm4908/bcm4908-asus-gt-ac5300.dts ++++ b/arch/arm64/boot/dts/broadcom/bcm4908/bcm4908-asus-gt-ac5300.dts +@@ -7,7 +7,7 @@ + #include "bcm4908.dtsi" + + / { +- compatible = "asus,gt-ac5300", "brcm,bcm4908"; ++ compatible = "asus,gt-ac5300", "brcm,bcm4908", "brcm,bcmbca"; + model = "Asus GT-AC5300"; + + memory@0 { +--- a/arch/arm64/boot/dts/broadcom/bcm4908/bcm4908-netgear-raxe500.dts ++++ b/arch/arm64/boot/dts/broadcom/bcm4908/bcm4908-netgear-raxe500.dts +@@ -3,7 +3,7 @@ + #include "bcm4908.dtsi" + + / { +- compatible = "netgear,raxe500", "brcm,bcm4908"; ++ compatible = "netgear,raxe500", "brcm,bcm4908", "brcm,bcmbca"; + model = "Netgear RAXE500"; + + memory@0 { diff --git a/target/linux/bcm4908/patches-5.10/038-v6.1-0005-arm64-dts-Move-BCM4908-dts-to-bcmbca-folder.patch b/target/linux/bcm4908/patches-5.10/038-v6.1-0005-arm64-dts-Move-BCM4908-dts-to-bcmbca-folder.patch new file mode 100644 index 0000000000..d494c5a728 --- /dev/null +++ b/target/linux/bcm4908/patches-5.10/038-v6.1-0005-arm64-dts-Move-BCM4908-dts-to-bcmbca-folder.patch @@ -0,0 +1,85 @@ +From ded8f22945899f4e87dd6d952bbc4abce6e64b7e Mon Sep 17 00:00:00 2001 +From: William Zhang +Date: Wed, 3 Aug 2022 10:54:50 -0700 +Subject: [PATCH] arm64: dts: Move BCM4908 dts to bcmbca folder + +As part of ARCH_BCM4908 to ARCH_BCMBCA migration, move the BCM4908 dts +files to bcmbca folder and use CONFIG_ARCH_BCMBCA to build all the +BCM4908 board dts. Delete bcm4908 folder and its makefile as well. + +Signed-off-by: William Zhang +Link: https://lore.kernel.org/r/20220803175455.47638-5-william.zhang@broadcom.com +Signed-off-by: Florian Fainelli +--- + arch/arm64/boot/dts/broadcom/Makefile | 1 - + arch/arm64/boot/dts/broadcom/bcm4908/Makefile | 5 ----- + arch/arm64/boot/dts/broadcom/bcmbca/Makefile | 4 ++++ + .../broadcom/{bcm4908 => bcmbca}/bcm4906-netgear-r8000p.dts | 0 + .../{bcm4908 => bcmbca}/bcm4906-tplink-archer-c2300-v1.dts | 0 + .../arm64/boot/dts/broadcom/{bcm4908 => bcmbca}/bcm4906.dtsi | 0 + .../broadcom/{bcm4908 => bcmbca}/bcm4908-asus-gt-ac5300.dts | 0 + .../broadcom/{bcm4908 => bcmbca}/bcm4908-netgear-raxe500.dts | 0 + .../arm64/boot/dts/broadcom/{bcm4908 => bcmbca}/bcm4908.dtsi | 0 + 9 files changed, 4 insertions(+), 6 deletions(-) + delete mode 100644 arch/arm64/boot/dts/broadcom/bcm4908/Makefile + rename arch/arm64/boot/dts/broadcom/{bcm4908 => bcmbca}/bcm4906-netgear-r8000p.dts (100%) + rename arch/arm64/boot/dts/broadcom/{bcm4908 => bcmbca}/bcm4906-tplink-archer-c2300-v1.dts (100%) + rename arch/arm64/boot/dts/broadcom/{bcm4908 => bcmbca}/bcm4906.dtsi (100%) + rename arch/arm64/boot/dts/broadcom/{bcm4908 => bcmbca}/bcm4908-asus-gt-ac5300.dts (100%) + rename arch/arm64/boot/dts/broadcom/{bcm4908 => bcmbca}/bcm4908-netgear-raxe500.dts (100%) + rename arch/arm64/boot/dts/broadcom/{bcm4908 => bcmbca}/bcm4908.dtsi (100%) + +--- a/arch/arm64/boot/dts/broadcom/Makefile ++++ b/arch/arm64/boot/dts/broadcom/Makefile +@@ -5,7 +5,6 @@ dtb-$(CONFIG_ARCH_BCM2835) += bcm2711-rp + bcm2837-rpi-3-b-plus.dtb \ + bcm2837-rpi-cm3-io3.dtb + +-subdir-y += bcm4908 + subdir-y += bcmbca + subdir-y += northstar2 + subdir-y += stingray +--- a/arch/arm64/boot/dts/broadcom/bcm4908/Makefile ++++ /dev/null +@@ -1,5 +0,0 @@ +-# SPDX-License-Identifier: GPL-2.0 +-dtb-$(CONFIG_ARCH_BCM4908) += bcm4906-netgear-r8000p.dtb +-dtb-$(CONFIG_ARCH_BCM4908) += bcm4906-tplink-archer-c2300-v1.dtb +-dtb-$(CONFIG_ARCH_BCM4908) += bcm4908-asus-gt-ac5300.dtb +-dtb-$(CONFIG_ARCH_BCM4908) += bcm4908-netgear-raxe500.dtb +--- a/arch/arm64/boot/dts/broadcom/bcmbca/Makefile ++++ b/arch/arm64/boot/dts/broadcom/bcmbca/Makefile +@@ -1,5 +1,9 @@ + # SPDX-License-Identifier: GPL-2.0 + dtb-$(CONFIG_ARCH_BCMBCA) += \ ++ bcm4906-netgear-r8000p.dtb \ ++ bcm4906-tplink-archer-c2300-v1.dtb \ ++ bcm4908-asus-gt-ac5300.dtb \ ++ bcm4908-netgear-raxe500.dtb \ + bcm4912-asus-gt-ax6000.dtb \ + bcm94912.dtb \ + bcm963158.dtb \ +diff --git a/arch/arm64/boot/dts/broadcom/bcm4908/bcm4906-netgear-r8000p.dts b/arch/arm64/boot/dts/broadcom/bcmbca/bcm4906-netgear-r8000p.dts +similarity index 100% +rename from arch/arm64/boot/dts/broadcom/bcm4908/bcm4906-netgear-r8000p.dts +rename to arch/arm64/boot/dts/broadcom/bcmbca/bcm4906-netgear-r8000p.dts +diff --git a/arch/arm64/boot/dts/broadcom/bcm4908/bcm4906-tplink-archer-c2300-v1.dts b/arch/arm64/boot/dts/broadcom/bcmbca/bcm4906-tplink-archer-c2300-v1.dts +similarity index 100% +rename from arch/arm64/boot/dts/broadcom/bcm4908/bcm4906-tplink-archer-c2300-v1.dts +rename to arch/arm64/boot/dts/broadcom/bcmbca/bcm4906-tplink-archer-c2300-v1.dts +diff --git a/arch/arm64/boot/dts/broadcom/bcm4908/bcm4906.dtsi b/arch/arm64/boot/dts/broadcom/bcmbca/bcm4906.dtsi +similarity index 100% +rename from arch/arm64/boot/dts/broadcom/bcm4908/bcm4906.dtsi +rename to arch/arm64/boot/dts/broadcom/bcmbca/bcm4906.dtsi +diff --git a/arch/arm64/boot/dts/broadcom/bcm4908/bcm4908-asus-gt-ac5300.dts b/arch/arm64/boot/dts/broadcom/bcmbca/bcm4908-asus-gt-ac5300.dts +similarity index 100% +rename from arch/arm64/boot/dts/broadcom/bcm4908/bcm4908-asus-gt-ac5300.dts +rename to arch/arm64/boot/dts/broadcom/bcmbca/bcm4908-asus-gt-ac5300.dts +diff --git a/arch/arm64/boot/dts/broadcom/bcm4908/bcm4908-netgear-raxe500.dts b/arch/arm64/boot/dts/broadcom/bcmbca/bcm4908-netgear-raxe500.dts +similarity index 100% +rename from arch/arm64/boot/dts/broadcom/bcm4908/bcm4908-netgear-raxe500.dts +rename to arch/arm64/boot/dts/broadcom/bcmbca/bcm4908-netgear-raxe500.dts +diff --git a/arch/arm64/boot/dts/broadcom/bcm4908/bcm4908.dtsi b/arch/arm64/boot/dts/broadcom/bcmbca/bcm4908.dtsi +similarity index 100% +rename from arch/arm64/boot/dts/broadcom/bcm4908/bcm4908.dtsi +rename to arch/arm64/boot/dts/broadcom/bcmbca/bcm4908.dtsi diff --git a/target/linux/bcm4908/patches-5.10/038-v6.1-0006-arm64-dts-Add-BCM4908-generic-board-dts.patch b/target/linux/bcm4908/patches-5.10/038-v6.1-0006-arm64-dts-Add-BCM4908-generic-board-dts.patch new file mode 100644 index 0000000000..b19c5d33b4 --- /dev/null +++ b/target/linux/bcm4908/patches-5.10/038-v6.1-0006-arm64-dts-Add-BCM4908-generic-board-dts.patch @@ -0,0 +1,62 @@ +From 72e0bdb6d7edb1785d58f2e8e7c80e1d2f93a319 Mon Sep 17 00:00:00 2001 +From: William Zhang +Date: Wed, 3 Aug 2022 10:54:51 -0700 +Subject: [PATCH] arm64: dts: Add BCM4908 generic board dts + +Add generic bare bone bcm94908.dts file to support any 4908 based +design. It supports cpu subsystem, memory and an uart console. This can +be useful for board bring-up and cpu subsystem and memory related kernel +test as well. + +Signed-off-by: William Zhang +Link: https://lore.kernel.org/r/20220803175455.47638-6-william.zhang@broadcom.com +Signed-off-by: Florian Fainelli +--- + arch/arm64/boot/dts/broadcom/bcmbca/Makefile | 1 + + .../boot/dts/broadcom/bcmbca/bcm94908.dts | 30 +++++++++++++++++++ + 2 files changed, 31 insertions(+) + create mode 100644 arch/arm64/boot/dts/broadcom/bcmbca/bcm94908.dts + +--- a/arch/arm64/boot/dts/broadcom/bcmbca/Makefile ++++ b/arch/arm64/boot/dts/broadcom/bcmbca/Makefile +@@ -4,6 +4,7 @@ dtb-$(CONFIG_ARCH_BCMBCA) += \ + bcm4906-tplink-archer-c2300-v1.dtb \ + bcm4908-asus-gt-ac5300.dtb \ + bcm4908-netgear-raxe500.dtb \ ++ bcm94908.dtb \ + bcm4912-asus-gt-ax6000.dtb \ + bcm94912.dtb \ + bcm963158.dtb \ +--- /dev/null ++++ b/arch/arm64/boot/dts/broadcom/bcmbca/bcm94908.dts +@@ -0,0 +1,30 @@ ++// SPDX-License-Identifier: (GPL-2.0+ OR MIT) ++/* ++ * Copyright 2022 Broadcom Ltd. ++ */ ++ ++/dts-v1/; ++ ++#include "bcm4908.dtsi" ++ ++/ { ++ model = "Broadcom BCM94908 Reference Board"; ++ compatible = "brcm,bcm94908", "brcm,bcm4908", "brcm,bcmbca"; ++ ++ aliases { ++ serial0 = &uart0; ++ }; ++ ++ chosen { ++ stdout-path = "serial0:115200n8"; ++ }; ++ ++ memory@0 { ++ device_type = "memory"; ++ reg = <0x0 0x0 0x0 0x08000000>; ++ }; ++}; ++ ++&uart0 { ++ status = "okay"; ++}; diff --git a/target/linux/bcm4908/patches-5.10/039-v6.2-0001-arm64-dts-broadcom-bcmbca-bcm4908-add-TWD-block-time.patch b/target/linux/bcm4908/patches-5.10/039-v6.2-0001-arm64-dts-broadcom-bcmbca-bcm4908-add-TWD-block-time.patch new file mode 100644 index 0000000000..a3f49ca440 --- /dev/null +++ b/target/linux/bcm4908/patches-5.10/039-v6.2-0001-arm64-dts-broadcom-bcmbca-bcm4908-add-TWD-block-time.patch @@ -0,0 +1,31 @@ +From 68064196cffea33f090bd2e8d81cd5e20107ecf1 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= +Date: Thu, 3 Nov 2022 11:53:16 +0100 +Subject: [PATCH] arm64: dts: broadcom: bcmbca: bcm4908: add TWD block timer +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +BCM4908 TWD contains block with 4 timers. Add binding for it. + +Signed-off-by: Rafał Miłecki +Link: https://lore.kernel.org/r/20221103105316.21294-1-zajec5@gmail.com +Signed-off-by: Florian Fainelli +--- + arch/arm64/boot/dts/broadcom/bcmbca/bcm4908.dtsi | 5 +++++ + 1 file changed, 5 insertions(+) + +--- a/arch/arm64/boot/dts/broadcom/bcmbca/bcm4908.dtsi ++++ b/arch/arm64/boot/dts/broadcom/bcmbca/bcm4908.dtsi +@@ -283,6 +283,11 @@ + #address-cells = <1>; + #size-cells = <1>; + ++ timer@0 { ++ compatible = "brcm,bcm63138-timer"; ++ reg = <0x0 0x28>; ++ }; ++ + watchdog@28 { + compatible = "brcm,bcm6345-wdt"; + reg = <0x28 0x8>; diff --git a/target/linux/bcm4908/patches-5.10/039-v6.2-0002-arm64-dts-broadcom-bcmbca-bcm6858-add-TWD-block.patch b/target/linux/bcm4908/patches-5.10/039-v6.2-0002-arm64-dts-broadcom-bcmbca-bcm6858-add-TWD-block.patch new file mode 100644 index 0000000000..e8e81ae544 --- /dev/null +++ b/target/linux/bcm4908/patches-5.10/039-v6.2-0002-arm64-dts-broadcom-bcmbca-bcm6858-add-TWD-block.patch @@ -0,0 +1,46 @@ +From 4f9fb09175e87a233787a2dee1e5dabb14deb022 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= +Date: Thu, 3 Nov 2022 12:00:15 +0100 +Subject: [PATCH] arm64: dts: broadcom: bcmbca: bcm6858: add TWD block +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +BCM6858 contains TWD block with timers, watchdog, and reset subblocks. +Describe it. + +Signed-off-by: Rafał Miłecki +Link: https://lore.kernel.org/r/20221103110015.21761-1-zajec5@gmail.com +Signed-off-by: Florian Fainelli +--- + .../boot/dts/broadcom/bcmbca/bcm6858.dtsi | 19 +++++++++++++++++++ + 1 file changed, 19 insertions(+) + +--- a/arch/arm64/boot/dts/broadcom/bcmbca/bcm6858.dtsi ++++ b/arch/arm64/boot/dts/broadcom/bcmbca/bcm6858.dtsi +@@ -109,6 +109,25 @@ + #size-cells = <1>; + ranges = <0x0 0x0 0xff800000 0x62000>; + ++ twd: timer-mfd@400 { ++ compatible = "brcm,bcm4908-twd", "simple-mfd", "syscon"; ++ reg = <0x400 0x4c>; ++ ranges = <0x0 0x400 0x4c>; ++ ++ #address-cells = <1>; ++ #size-cells = <1>; ++ ++ timer@0 { ++ compatible = "brcm,bcm63138-timer"; ++ reg = <0x0 0x28>; ++ }; ++ ++ watchdog@28 { ++ compatible = "brcm,bcm6345-wdt"; ++ reg = <0x28 0x8>; ++ }; ++ }; ++ + uart0: serial@640 { + compatible = "brcm,bcm6345-uart"; + reg = <0x640 0x18>; diff --git a/target/linux/bcm4908/patches-5.10/300-arm64-dts-broadcom-bcm4908-limit-amount-of-GPIOs.patch b/target/linux/bcm4908/patches-5.10/300-arm64-dts-broadcom-bcmbca-bcm4908-limit-amount-of-GP.patch similarity index 71% rename from target/linux/bcm4908/patches-5.10/300-arm64-dts-broadcom-bcm4908-limit-amount-of-GPIOs.patch rename to target/linux/bcm4908/patches-5.10/300-arm64-dts-broadcom-bcmbca-bcm4908-limit-amount-of-GP.patch index 93c89ffa30..bc0743c800 100644 --- a/target/linux/bcm4908/patches-5.10/300-arm64-dts-broadcom-bcm4908-limit-amount-of-GPIOs.patch +++ b/target/linux/bcm4908/patches-5.10/300-arm64-dts-broadcom-bcmbca-bcm4908-limit-amount-of-GP.patch @@ -1,6 +1,6 @@ From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= Date: Mon, 15 Feb 2021 22:01:03 +0100 -Subject: [PATCH] arm64: dts: broadcom: bcm4908: limit amount of GPIOs +Subject: [PATCH] arm64: dts: broadcom: bcmbca: bcm4908: limit amount of GPIOs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -10,9 +10,9 @@ Linux driver can't handle more than 64 GPIOs Signed-off-by: Rafał Miłecki --- ---- a/arch/arm64/boot/dts/broadcom/bcm4908/bcm4908.dtsi -+++ b/arch/arm64/boot/dts/broadcom/bcm4908/bcm4908.dtsi -@@ -292,7 +292,7 @@ +--- a/arch/arm64/boot/dts/broadcom/bcmbca/bcm4908.dtsi ++++ b/arch/arm64/boot/dts/broadcom/bcmbca/bcm4908.dtsi +@@ -297,7 +297,7 @@ gpio0: gpio-controller@500 { compatible = "brcm,bcm6345-gpio"; reg-names = "dirout", "dat"; From 66b6414a20aaa4e129843f71c7f25e212c39b2b1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= Date: Fri, 11 Nov 2022 16:51:29 +0100 Subject: [PATCH 35/62] bcm4908: prepare support for kernel 5.15 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Rafał Miłecki --- target/linux/bcm4908/Makefile | 1 + target/linux/bcm4908/config-5.15 | 234 +++++++ ...-broadcom-bcm4908-Fix-NAND-node-name.patch | 27 + ...bcm-document-Netgear-RAXE500-binding.patch | 27 + ...om-bcm4908-add-DT-for-Netgear-RAXE50.patch | 81 +++ ...broadcom-bcm4908-add-pinctrl-binding.patch | 160 +++++ ...-broadcom-bcm4908-add-watchdog-block.patch | 35 + ...4-dts-broadcom-bcm4908-add-I2C-block.patch | 34 + ...DTS-files-for-bcmbca-SoC-BCM63158.patchgit | 199 ++++++ ...-DTS-files-for-bcmbca-SoC-BCM4912.patchgit | 191 ++++++ ...-DTS-files-for-bcmbca-SoC-BCM6858.patchgit | 184 +++++ ...DTS-files-for-bcmbca-SoC-BCM63146.patchgit | 174 +++++ ...-DTS-files-for-bcmbca-SoC-BCM6856.patchgit | 167 +++++ ...-DTS-files-for-bcmbca-SoC-BCM6813.patchgit | 192 ++++++ ...align-gpio-key-node-names-with-dt.patchgit | 79 +++ ...bcm4908-Fix-timer-node-for-BCM490.patchgit | 33 + ...DTS-file-for-bcmbca-device-Asus-G.patchgit | 54 ++ ...bcmbca-add-arch-bcmbca-machine-entry.patch | 31 + ...adcom-bcm4908-add-remaining-LED-pins.patch | 115 ++++ ...om-bcm4908-add-LEDs-controller-block.patch | 35 + ...dcom-bcm4908-add-Asus-GT-AC5300-LEDs.patch | 81 +++ ...cmbca-update-BCM4908-board-dts-files.patch | 66 ++ ...ts-Move-BCM4908-dts-to-bcmbca-folder.patch | 85 +++ ...64-dts-Add-BCM4908-generic-board-dts.patch | 62 ++ ...om-bcmbca-bcm4908-add-TWD-block-time.patch | 31 + ...roadcom-bcmbca-bcm6858-add-TWD-block.patch | 46 ++ ...parsers-add-Broadcom-s-U-Boot-parser.patch | 137 ++++ ...dsa-bcm_sf2-refactor-LED-regs-access.patch | 209 ++++++ ...4908_enet-handle-EPROBE_DEFER-when-g.patch | 53 ++ ...-broadcom-bcm4908_enet-use-build_skb.patch | 152 +++++ ...4908_enet-report-queued-and-transmit.patch | 45 ++ ...ctrl-Add-binding-for-BCM4908-pinctrl.patch | 111 ++++ ...rl-bcm-add-driver-for-BCM4908-pinmux.patch | 629 ++++++++++++++++++ ...c-brcmstb-allow-compiling-on-BCM4908.patch | 30 + ...low-building-BCM7038_WDT-for-BCM4908.patch | 32 + ..._wdt-Support-BCM6345-compatible-stri.patch | 34 + ...om-bcmbca-bcm4908-limit-amount-of-GP.patch | 23 + ...wnand-brcmnand-disable-WP-on-BCM4908.patch | 34 + ...m_sf2-enable-GPHY-for-switch-probing.patch | 46 ++ ...sf2-keep-GPHY-enabled-on-the-BCM4908.patch | 30 + 40 files changed, 3989 insertions(+) create mode 100644 target/linux/bcm4908/config-5.15 create mode 100644 target/linux/bcm4908/patches-5.15/030-v5.16-0001-arm64-dts-broadcom-bcm4908-Fix-NAND-node-name.patch create mode 100644 target/linux/bcm4908/patches-5.15/031-v5.17-0001-dt-bindings-arm-bcm-document-Netgear-RAXE500-binding.patch create mode 100644 target/linux/bcm4908/patches-5.15/031-v5.17-0002-arm64-dts-broadcom-bcm4908-add-DT-for-Netgear-RAXE50.patch create mode 100644 target/linux/bcm4908/patches-5.15/032-v5.18-0002-arm64-dts-broadcom-bcm4908-add-pinctrl-binding.patch create mode 100644 target/linux/bcm4908/patches-5.15/032-v5.18-0003-arm64-dts-broadcom-bcm4908-add-watchdog-block.patch create mode 100644 target/linux/bcm4908/patches-5.15/032-v5.18-0004-arm64-dts-broadcom-bcm4908-add-I2C-block.patch create mode 100644 target/linux/bcm4908/patches-5.15/033-v6.0-0001-arm64-dts-Add-DTS-files-for-bcmbca-SoC-BCM63158.patchgit create mode 100644 target/linux/bcm4908/patches-5.15/033-v6.0-0002-arm64-dts-Add-DTS-files-for-bcmbca-SoC-BCM4912.patchgit create mode 100644 target/linux/bcm4908/patches-5.15/033-v6.0-0003-ARM64-dts-Add-DTS-files-for-bcmbca-SoC-BCM6858.patchgit create mode 100644 target/linux/bcm4908/patches-5.15/033-v6.0-0004-arm64-dts-Add-DTS-files-for-bcmbca-SoC-BCM63146.patchgit create mode 100644 target/linux/bcm4908/patches-5.15/033-v6.0-0005-arm64-dts-Add-DTS-files-for-bcmbca-SoC-BCM6856.patchgit create mode 100644 target/linux/bcm4908/patches-5.15/033-v6.0-0006-arm64-dts-Add-DTS-files-for-bcmbca-SoC-BCM6813.patchgit create mode 100644 target/linux/bcm4908/patches-5.15/033-v6.0-0007-arm64-dts-broadcom-align-gpio-key-node-names-with-dt.patchgit create mode 100644 target/linux/bcm4908/patches-5.15/033-v6.0-0008-arm64-dts-broadcom-bcm4908-Fix-timer-node-for-BCM490.patchgit create mode 100644 target/linux/bcm4908/patches-5.15/033-v6.0-0010-arm64-dts-Add-base-DTS-file-for-bcmbca-device-Asus-G.patchgit create mode 100644 target/linux/bcm4908/patches-5.15/033-v6.0-0011-arm64-bcmbca-add-arch-bcmbca-machine-entry.patch create mode 100644 target/linux/bcm4908/patches-5.15/034-v6.1-0001-arm64-dts-broadcom-bcm4908-add-remaining-LED-pins.patch create mode 100644 target/linux/bcm4908/patches-5.15/034-v6.1-0002-arm64-dts-broadcom-bcm4908-add-LEDs-controller-block.patch create mode 100644 target/linux/bcm4908/patches-5.15/034-v6.1-0003-arm64-dts-broadcom-bcm4908-add-Asus-GT-AC5300-LEDs.patch create mode 100644 target/linux/bcm4908/patches-5.15/034-v6.1-0004-arm64-dts-bcmbca-update-BCM4908-board-dts-files.patch create mode 100644 target/linux/bcm4908/patches-5.15/034-v6.1-0005-arm64-dts-Move-BCM4908-dts-to-bcmbca-folder.patch create mode 100644 target/linux/bcm4908/patches-5.15/034-v6.1-0006-arm64-dts-Add-BCM4908-generic-board-dts.patch create mode 100644 target/linux/bcm4908/patches-5.15/035-v6.2-0001-arm64-dts-broadcom-bcmbca-bcm4908-add-TWD-block-time.patch create mode 100644 target/linux/bcm4908/patches-5.15/035-v6.2-0002-arm64-dts-broadcom-bcmbca-bcm6858-add-TWD-block.patch create mode 100644 target/linux/bcm4908/patches-5.15/040-v6.1-mtd-parsers-add-Broadcom-s-U-Boot-parser.patch create mode 100644 target/linux/bcm4908/patches-5.15/070-v5.17-net-dsa-bcm_sf2-refactor-LED-regs-access.patch create mode 100644 target/linux/bcm4908/patches-5.15/071-v6.1-0001-net-broadcom-bcm4908_enet-handle-EPROBE_DEFER-when-g.patch create mode 100644 target/linux/bcm4908/patches-5.15/072-v6.2-0001-net-broadcom-bcm4908_enet-use-build_skb.patch create mode 100644 target/linux/bcm4908/patches-5.15/072-v6.2-0002-net-broadcom-bcm4908_enet-report-queued-and-transmit.patch create mode 100644 target/linux/bcm4908/patches-5.15/080-v5.18-0001-dt-bindings-pinctrl-Add-binding-for-BCM4908-pinctrl.patch create mode 100644 target/linux/bcm4908/patches-5.15/080-v5.18-0002-pinctrl-bcm-add-driver-for-BCM4908-pinmux.patch create mode 100644 target/linux/bcm4908/patches-5.15/081-v5.18-0001-i2c-brcmstb-allow-compiling-on-BCM4908.patch create mode 100644 target/linux/bcm4908/patches-5.15/082-v5.18-watchdog-allow-building-BCM7038_WDT-for-BCM4908.patch create mode 100644 target/linux/bcm4908/patches-5.15/083-v5.20-watchdog-bcm7038_wdt-Support-BCM6345-compatible-stri.patch create mode 100644 target/linux/bcm4908/patches-5.15/300-arm64-dts-broadcom-bcmbca-bcm4908-limit-amount-of-GP.patch create mode 100644 target/linux/bcm4908/patches-5.15/400-mtd-rawnand-brcmnand-disable-WP-on-BCM4908.patch create mode 100644 target/linux/bcm4908/patches-5.15/700-net-dsa-bcm_sf2-enable-GPHY-for-switch-probing.patch create mode 100644 target/linux/bcm4908/patches-5.15/701-net-dsa-bcm_sf2-keep-GPHY-enabled-on-the-BCM4908.patch diff --git a/target/linux/bcm4908/Makefile b/target/linux/bcm4908/Makefile index fcfe04962b..b5f98a29da 100644 --- a/target/linux/bcm4908/Makefile +++ b/target/linux/bcm4908/Makefile @@ -10,6 +10,7 @@ CPU_TYPE:=cortex-a53 SUBTARGETS:=generic KERNEL_PATCHVER:=5.10 +KERNEL_TESTING_PATCHVER:=5.15 define Target/Description Build firmware images for Broadcom BCM4908 SoC family routers. diff --git a/target/linux/bcm4908/config-5.15 b/target/linux/bcm4908/config-5.15 new file mode 100644 index 0000000000..2e8b3df71b --- /dev/null +++ b/target/linux/bcm4908/config-5.15 @@ -0,0 +1,234 @@ +CONFIG_64BIT=y +CONFIG_ARCH_BCM4908=y +CONFIG_ARCH_BCMBCA=y +CONFIG_ARCH_DMA_ADDR_T_64BIT=y +CONFIG_ARCH_KEEP_MEMBLOCK=y +CONFIG_ARCH_MMAP_RND_BITS=18 +CONFIG_ARCH_MMAP_RND_BITS_MAX=24 +CONFIG_ARCH_MMAP_RND_BITS_MIN=18 +CONFIG_ARCH_MMAP_RND_COMPAT_BITS_MIN=11 +CONFIG_ARCH_PROC_KCORE_TEXT=y +CONFIG_ARCH_SELECT_MEMORY_MODEL=y +CONFIG_ARCH_SPARSEMEM_DEFAULT=y +CONFIG_ARCH_SPARSEMEM_ENABLE=y +CONFIG_ARCH_STACKWALK=y +CONFIG_ARCH_SUSPEND_POSSIBLE=y +CONFIG_ARM64=y +CONFIG_ARM64_4K_PAGES=y +CONFIG_ARM64_CRYPTO=y +CONFIG_ARM64_PAGE_SHIFT=12 +CONFIG_ARM64_PA_BITS=48 +CONFIG_ARM64_PA_BITS_48=y +CONFIG_ARM64_PTR_AUTH=y +CONFIG_ARM64_PTR_AUTH_KERNEL=y +CONFIG_ARM64_SVE=y +CONFIG_ARM64_TAGGED_ADDR_ABI=y +CONFIG_ARM64_VA_BITS=39 +CONFIG_ARM64_VA_BITS_39=y +CONFIG_ARM_AMBA=y +CONFIG_ARM_ARCH_TIMER=y +CONFIG_ARM_ARCH_TIMER_EVTSTREAM=y +CONFIG_ARM_GIC=y +CONFIG_ARM_GIC_V3=y +CONFIG_ARM_GIC_V3_ITS=y +CONFIG_ARM_PSCI_FW=y +CONFIG_AUDIT_ARCH_COMPAT_GENERIC=y +CONFIG_B53=y +CONFIG_BCM4908_ENET=y +CONFIG_BCM7038_WDT=y +CONFIG_BCM7XXX_PHY=y +CONFIG_BCM_NET_PHYLIB=y +CONFIG_BCM_PMB=y +# CONFIG_BLK_DEV_INITRD is not set +CONFIG_BLK_PM=y +CONFIG_CC_HAVE_STACKPROTECTOR_SYSREG=y +CONFIG_CLKDEV_LOOKUP=y +CONFIG_CLONE_BACKWARDS=y +CONFIG_CMDLINE="earlycon=bcm63xx_uart,0xff800640 console=ttyS0,115200" +CONFIG_COMMON_CLK=y +# CONFIG_COMPAT_32BIT_TIME is not set +CONFIG_CPU_LITTLE_ENDIAN=y +CONFIG_CPU_RMAP=y +CONFIG_CRC16=y +CONFIG_CRYPTO_AES_ARM64=y +CONFIG_CRYPTO_AES_ARM64_CE=y +CONFIG_CRYPTO_AES_ARM64_CE_BLK=y +CONFIG_CRYPTO_AES_ARM64_CE_CCM=y +CONFIG_CRYPTO_BLAKE2S=y +CONFIG_CRYPTO_CRYPTD=y +CONFIG_CRYPTO_DEFLATE=y +CONFIG_CRYPTO_GHASH_ARM64_CE=y +CONFIG_CRYPTO_HASH_INFO=y +CONFIG_CRYPTO_LIB_BLAKE2S_GENERIC=y +CONFIG_CRYPTO_LZO=y +CONFIG_CRYPTO_RNG2=y +CONFIG_CRYPTO_SIMD=y +CONFIG_CRYPTO_ZSTD=y +CONFIG_DCACHE_WORD_ACCESS=y +CONFIG_DMA_DIRECT_REMAP=y +CONFIG_DMA_REMAP=y +CONFIG_DTC=y +CONFIG_EDAC_SUPPORT=y +CONFIG_FIXED_PHY=y +CONFIG_FIX_EARLYCON_MEM=y +CONFIG_FRAME_POINTER=y +CONFIG_FW_LOADER_PAGED_BUF=y +CONFIG_GENERIC_ALLOCATOR=y +CONFIG_GENERIC_ARCH_TOPOLOGY=y +CONFIG_GENERIC_BUG=y +CONFIG_GENERIC_BUG_RELATIVE_POINTERS=y +CONFIG_GENERIC_CLOCKEVENTS=y +CONFIG_GENERIC_CLOCKEVENTS_BROADCAST=y +CONFIG_GENERIC_CPU_AUTOPROBE=y +CONFIG_GENERIC_CPU_VULNERABILITIES=y +CONFIG_GENERIC_CSUM=y +CONFIG_GENERIC_EARLY_IOREMAP=y +CONFIG_GENERIC_GETTIMEOFDAY=y +CONFIG_GENERIC_IDLE_POLL_SETUP=y +CONFIG_GENERIC_IRQ_EFFECTIVE_AFF_MASK=y +CONFIG_GENERIC_IRQ_MULTI_HANDLER=y +CONFIG_GENERIC_IRQ_SHOW=y +CONFIG_GENERIC_IRQ_SHOW_LEVEL=y +CONFIG_GENERIC_MSI_IRQ=y +CONFIG_GENERIC_MSI_IRQ_DOMAIN=y +CONFIG_GENERIC_PCI_IOMAP=y +CONFIG_GENERIC_PHY=y +CONFIG_GENERIC_PINCONF=y +CONFIG_GENERIC_PINCTRL_GROUPS=y +CONFIG_GENERIC_PINMUX_FUNCTIONS=y +CONFIG_GENERIC_SCHED_CLOCK=y +CONFIG_GENERIC_SMP_IDLE_THREAD=y +CONFIG_GENERIC_STRNCPY_FROM_USER=y +CONFIG_GENERIC_STRNLEN_USER=y +CONFIG_GENERIC_TIME_VSYSCALL=y +CONFIG_GPIO_GENERIC=y +CONFIG_GPIO_GENERIC_PLATFORM=y +CONFIG_GRO_CELLS=y +CONFIG_HANDLE_DOMAIN_IRQ=y +CONFIG_HARDIRQS_SW_RESEND=y +CONFIG_HAS_DMA=y +CONFIG_HAS_IOMEM=y +CONFIG_HOLES_IN_ZONE=y +CONFIG_HZ_PERIODIC=y +CONFIG_I2C=y +CONFIG_I2C_BOARDINFO=y +CONFIG_I2C_BRCMSTB=y +CONFIG_ILLEGAL_POINTER_VALUE=0xdead000000000000 +CONFIG_IRQCHIP=y +CONFIG_IRQ_DOMAIN=y +CONFIG_IRQ_DOMAIN_HIERARCHY=y +CONFIG_IRQ_FORCED_THREADING=y +CONFIG_IRQ_WORK=y +CONFIG_LEDS_BCM63138=y +CONFIG_LEDS_GPIO=y +CONFIG_LIBFDT=y +CONFIG_LOCK_DEBUGGING_SUPPORT=y +CONFIG_LOCK_SPIN_ON_OWNER=y +CONFIG_LZO_COMPRESS=y +CONFIG_LZO_DECOMPRESS=y +CONFIG_MDIO_BCM_UNIMAC=y +CONFIG_MDIO_BUS=y +CONFIG_MDIO_DEVICE=y +CONFIG_MDIO_DEVRES=y +CONFIG_MEMFD_CREATE=y +CONFIG_MFD_SYSCON=y +CONFIG_MIGRATION=y +CONFIG_MODULES_USE_ELF_RELA=y +CONFIG_MTD_BRCM_U_BOOT=y +CONFIG_MTD_CMDLINE_PARTS=y +CONFIG_MTD_NAND_BRCMNAND=y +CONFIG_MTD_NAND_CORE=y +CONFIG_MTD_NAND_ECC=y +CONFIG_MTD_NAND_ECC_SW_HAMMING=y +CONFIG_MTD_OF_PARTS_BCM4908=y +# CONFIG_MTD_OF_PARTS_LINKSYS_NS is not set +CONFIG_MTD_RAW_NAND=y +CONFIG_MTD_SPLIT_CFE_BOOTFS=y +# CONFIG_MTD_SPLIT_SQUASHFS_ROOT is not set +CONFIG_MTD_UBI=y +CONFIG_MTD_UBI_BEB_LIMIT=20 +CONFIG_MTD_UBI_BLOCK=y +CONFIG_MTD_UBI_WL_THRESHOLD=4096 +CONFIG_MUTEX_SPIN_ON_OWNER=y +CONFIG_NEED_DMA_MAP_STATE=y +CONFIG_NEED_SG_DMA_LENGTH=y +CONFIG_NET_DEVLINK=y +CONFIG_NET_DSA=y +CONFIG_NET_DSA_BCM_SF2=y +CONFIG_NET_DSA_TAG_BRCM=y +CONFIG_NET_DSA_TAG_BRCM_COMMON=y +CONFIG_NET_DSA_TAG_BRCM_LEGACY=y +CONFIG_NET_DSA_TAG_BRCM_PREPEND=y +CONFIG_NET_FLOW_LIMIT=y +CONFIG_NET_SWITCHDEV=y +CONFIG_NO_IOPORT_MAP=y +CONFIG_NR_CPUS=4 +CONFIG_NVMEM=y +CONFIG_NVMEM_SYSFS=y +CONFIG_NVMEM_U_BOOT_ENV=y +CONFIG_OF=y +CONFIG_OF_ADDRESS=y +CONFIG_OF_EARLY_FLATTREE=y +CONFIG_OF_FLATTREE=y +CONFIG_OF_GPIO=y +CONFIG_OF_IRQ=y +CONFIG_OF_KOBJ=y +CONFIG_OF_MDIO=y +CONFIG_OF_NET=y +CONFIG_PADATA=y +CONFIG_PARTITION_PERCPU=y +CONFIG_PGTABLE_LEVELS=3 +CONFIG_PHYLIB=y +CONFIG_PHYLINK=y +CONFIG_PHYS_ADDR_T_64BIT=y +CONFIG_PHY_BRCM_USB=y +CONFIG_PINCTRL=y +CONFIG_PINCTRL_BCM4908=y +# CONFIG_PINCTRL_SINGLE is not set +CONFIG_PM=y +CONFIG_PM_CLK=y +CONFIG_PM_GENERIC_DOMAINS=y +CONFIG_PM_GENERIC_DOMAINS_OF=y +CONFIG_POWER_RESET=y +CONFIG_POWER_RESET_SYSCON=y +CONFIG_POWER_SUPPLY=y +CONFIG_QUEUED_RWLOCKS=y +CONFIG_QUEUED_SPINLOCKS=y +CONFIG_RATIONAL=y +CONFIG_REGMAP=y +CONFIG_REGMAP_MMIO=y +CONFIG_RELOCATABLE=y +CONFIG_RFS_ACCEL=y +CONFIG_RODATA_FULL_DEFAULT_ENABLED=y +CONFIG_RPS=y +CONFIG_RWSEM_SPIN_ON_OWNER=y +# CONFIG_SERIAL_8250 is not set +CONFIG_SERIAL_BCM63XX=y +CONFIG_SERIAL_BCM63XX_CONSOLE=y +CONFIG_SGL_ALLOC=y +CONFIG_SMP=y +CONFIG_SPARSEMEM_VMEMMAP_ENABLE=y +CONFIG_SPARSE_IRQ=y +CONFIG_SRCU=y +CONFIG_SWIOTLB=y +CONFIG_SWPHY=y +CONFIG_SYSCTL_EXCEPTION_TRACE=y +CONFIG_SYS_SUPPORTS_HUGETLBFS=y +CONFIG_THREAD_INFO_IN_TASK=y +CONFIG_TICK_CPU_ACCOUNTING=y +CONFIG_TIMER_OF=y +CONFIG_TIMER_PROBE=y +CONFIG_TREE_RCU=y +CONFIG_TREE_SRCU=y +CONFIG_UBIFS_FS=y +CONFIG_UNMAP_KERNEL_AT_EL0=y +CONFIG_USB_SUPPORT=y +CONFIG_VMAP_STACK=y +CONFIG_WATCHDOG_CORE=y +CONFIG_XPS=y +CONFIG_XXHASH=y +CONFIG_ZLIB_DEFLATE=y +CONFIG_ZLIB_INFLATE=y +CONFIG_ZONE_DMA32=y +CONFIG_ZSTD_COMPRESS=y +CONFIG_ZSTD_DECOMPRESS=y diff --git a/target/linux/bcm4908/patches-5.15/030-v5.16-0001-arm64-dts-broadcom-bcm4908-Fix-NAND-node-name.patch b/target/linux/bcm4908/patches-5.15/030-v5.16-0001-arm64-dts-broadcom-bcm4908-Fix-NAND-node-name.patch new file mode 100644 index 0000000000..07a0c5f8d0 --- /dev/null +++ b/target/linux/bcm4908/patches-5.15/030-v5.16-0001-arm64-dts-broadcom-bcm4908-Fix-NAND-node-name.patch @@ -0,0 +1,27 @@ +From d0ae9c944b9472c5691a482297df7a57d7fd1199 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= +Date: Thu, 19 Aug 2021 14:11:08 +0200 +Subject: [PATCH] arm64: dts: broadcom: bcm4908: Fix NAND node name +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +This matches nand-controller.yaml requirements. + +Signed-off-by: Rafał Miłecki +Signed-off-by: Florian Fainelli +--- + arch/arm64/boot/dts/broadcom/bcm4908/bcm4908.dtsi | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/arch/arm64/boot/dts/broadcom/bcm4908/bcm4908.dtsi ++++ b/arch/arm64/boot/dts/broadcom/bcm4908/bcm4908.dtsi +@@ -298,7 +298,7 @@ + status = "okay"; + }; + +- nand@1800 { ++ nand-controller@1800 { + #address-cells = <1>; + #size-cells = <0>; + compatible = "brcm,nand-bcm63138", "brcm,brcmnand-v7.1", "brcm,brcmnand"; diff --git a/target/linux/bcm4908/patches-5.15/031-v5.17-0001-dt-bindings-arm-bcm-document-Netgear-RAXE500-binding.patch b/target/linux/bcm4908/patches-5.15/031-v5.17-0001-dt-bindings-arm-bcm-document-Netgear-RAXE500-binding.patch new file mode 100644 index 0000000000..4d5ffcb9e3 --- /dev/null +++ b/target/linux/bcm4908/patches-5.15/031-v5.17-0001-dt-bindings-arm-bcm-document-Netgear-RAXE500-binding.patch @@ -0,0 +1,27 @@ +From 7b0c9ca7f18e8d2e2cf3c342d91f037d436777bf Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= +Date: Fri, 5 Nov 2021 11:14:12 +0100 +Subject: [PATCH] dt-bindings: arm: bcm: document Netgear RAXE500 binding +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +One more BCM4908 based device. + +Signed-off-by: Rafał Miłecki +Acked-by: Rob Herring +Signed-off-by: Florian Fainelli +--- + Documentation/devicetree/bindings/arm/bcm/brcm,bcm4908.yaml | 1 + + 1 file changed, 1 insertion(+) + +--- a/Documentation/devicetree/bindings/arm/bcm/brcm,bcm4908.yaml ++++ b/Documentation/devicetree/bindings/arm/bcm/brcm,bcm4908.yaml +@@ -29,6 +29,7 @@ properties: + items: + - enum: + - asus,gt-ac5300 ++ - netgear,raxe500 + - const: brcm,bcm4908 + + - description: BCM49408 based boards diff --git a/target/linux/bcm4908/patches-5.15/031-v5.17-0002-arm64-dts-broadcom-bcm4908-add-DT-for-Netgear-RAXE50.patch b/target/linux/bcm4908/patches-5.15/031-v5.17-0002-arm64-dts-broadcom-bcm4908-add-DT-for-Netgear-RAXE50.patch new file mode 100644 index 0000000000..9e0236ad0f --- /dev/null +++ b/target/linux/bcm4908/patches-5.15/031-v5.17-0002-arm64-dts-broadcom-bcm4908-add-DT-for-Netgear-RAXE50.patch @@ -0,0 +1,81 @@ +From d0e68d354f345873e15876a7b35be1baaf5e3ec9 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= +Date: Fri, 5 Nov 2021 11:14:13 +0100 +Subject: [PATCH] arm64: dts: broadcom: bcm4908: add DT for Netgear RAXE500 +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +It's a home router based on BCM4908 SoC. It has: 1 GiB of RAM, 512 MiB +NAND flash, 6 Ethernet ports and 3 x BCM43684 (WiFi). One of Ethernet +ports is "2.5 G Multi-Gig port" that isn't described yet (it isn't known +how it's wired up). + +Signed-off-by: Rafał Miłecki +Signed-off-by: Florian Fainelli +--- + arch/arm64/boot/dts/broadcom/bcm4908/Makefile | 1 + + .../bcm4908/bcm4908-netgear-raxe500.dts | 50 +++++++++++++++++++ + 2 files changed, 51 insertions(+) + create mode 100644 arch/arm64/boot/dts/broadcom/bcm4908/bcm4908-netgear-raxe500.dts + +--- a/arch/arm64/boot/dts/broadcom/bcm4908/Makefile ++++ b/arch/arm64/boot/dts/broadcom/bcm4908/Makefile +@@ -2,3 +2,4 @@ + dtb-$(CONFIG_ARCH_BCM4908) += bcm4906-netgear-r8000p.dtb + dtb-$(CONFIG_ARCH_BCM4908) += bcm4906-tplink-archer-c2300-v1.dtb + dtb-$(CONFIG_ARCH_BCM4908) += bcm4908-asus-gt-ac5300.dtb ++dtb-$(CONFIG_ARCH_BCM4908) += bcm4908-netgear-raxe500.dtb +--- /dev/null ++++ b/arch/arm64/boot/dts/broadcom/bcm4908/bcm4908-netgear-raxe500.dts +@@ -0,0 +1,50 @@ ++// SPDX-License-Identifier: GPL-2.0-or-later OR MIT ++ ++#include "bcm4908.dtsi" ++ ++/ { ++ compatible = "netgear,raxe500", "brcm,bcm4908"; ++ model = "Netgear RAXE500"; ++ ++ memory@0 { ++ device_type = "memory"; ++ reg = <0x00 0x00 0x00 0x40000000>; ++ }; ++}; ++ ++&ehci { ++ status = "okay"; ++}; ++ ++&ohci { ++ status = "okay"; ++}; ++ ++&xhci { ++ status = "okay"; ++}; ++ ++&ports { ++ port@0 { ++ label = "lan4"; ++ }; ++ ++ port@1 { ++ label = "lan3"; ++ }; ++ ++ port@2 { ++ label = "lan2"; ++ }; ++ ++ port@3 { ++ label = "lan1"; ++ }; ++ ++ port@7 { ++ reg = <7>; ++ phy-mode = "internal"; ++ phy-handle = <&phy12>; ++ label = "wan"; ++ }; ++}; diff --git a/target/linux/bcm4908/patches-5.15/032-v5.18-0002-arm64-dts-broadcom-bcm4908-add-pinctrl-binding.patch b/target/linux/bcm4908/patches-5.15/032-v5.18-0002-arm64-dts-broadcom-bcm4908-add-pinctrl-binding.patch new file mode 100644 index 0000000000..8560b8ee88 --- /dev/null +++ b/target/linux/bcm4908/patches-5.15/032-v5.18-0002-arm64-dts-broadcom-bcm4908-add-pinctrl-binding.patch @@ -0,0 +1,160 @@ +From 72b1c5da796ec5266f2012c36470e226cb4f09c9 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= +Date: Thu, 30 Dec 2021 12:05:35 +0100 +Subject: [PATCH] arm64: dts: broadcom: bcm4908: add pinctrl binding +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Describe pinmux block with its maps. + +Signed-off-by: Rafał Miłecki +Signed-off-by: Florian Fainelli +--- + .../boot/dts/broadcom/bcm4908/bcm4908.dtsi | 135 ++++++++++++++++++ + 1 file changed, 135 insertions(+) + +--- a/arch/arm64/boot/dts/broadcom/bcm4908/bcm4908.dtsi ++++ b/arch/arm64/boot/dts/broadcom/bcm4908/bcm4908.dtsi +@@ -289,6 +289,141 @@ + gpio-controller; + }; + ++ pinctrl@560 { ++ compatible = "brcm,bcm4908-pinctrl"; ++ reg = <0x560 0x10>; ++ ++ pins_led_0_a: led_0-a-pins { ++ function = "led_0"; ++ groups = "led_0_grp_a"; ++ }; ++ ++ pins_led_1_a: led_1-a-pins { ++ function = "led_1"; ++ groups = "led_1_grp_a"; ++ }; ++ ++ pins_led_2_a: led_2-a-pins { ++ function = "led_2"; ++ groups = "led_2_grp_a"; ++ }; ++ ++ pins_led_3_a: led_3-a-pins { ++ function = "led_3"; ++ groups = "led_3_grp_a"; ++ }; ++ ++ pins_led_4_a: led_4-a-pins { ++ function = "led_4"; ++ groups = "led_4_grp_a"; ++ }; ++ ++ pins_led_5_a: led_5-a-pins { ++ function = "led_5"; ++ groups = "led_5_grp_a"; ++ }; ++ ++ pins_led_6_a: led_6-a-pins { ++ function = "led_6"; ++ groups = "led_6_grp_a"; ++ }; ++ ++ pins_led_7_a: led_7-a-pins { ++ function = "led_7"; ++ groups = "led_7_grp_a"; ++ }; ++ ++ pins_led_8_a: led_8-a-pins { ++ function = "led_8"; ++ groups = "led_8_grp_a"; ++ }; ++ ++ pins_led_9_a: led_9-a-pins { ++ function = "led_9"; ++ groups = "led_9_grp_a"; ++ }; ++ ++ pins_led_21_a: led_21-a-pins { ++ function = "led_21"; ++ groups = "led_21_grp_a"; ++ }; ++ ++ pins_led_22_a: led_22-a-pins { ++ function = "led_22"; ++ groups = "led_22_grp_a"; ++ }; ++ ++ pins_led_26_a: led_26-a-pins { ++ function = "led_26"; ++ groups = "led_26_grp_a"; ++ }; ++ ++ pins_led_27_a: led_27-a-pins { ++ function = "led_27"; ++ groups = "led_27_grp_a"; ++ }; ++ ++ pins_led_28_a: led_28-a-pins { ++ function = "led_28"; ++ groups = "led_28_grp_a"; ++ }; ++ ++ pins_led_29_a: led_29-a-pins { ++ function = "led_29"; ++ groups = "led_29_grp_a"; ++ }; ++ ++ pins_led_30_a: led_30-a-pins { ++ function = "led_30"; ++ groups = "led_30_grp_a"; ++ }; ++ ++ pins_hs_uart: hs_uart-pins { ++ function = "hs_uart"; ++ groups = "hs_uart_grp"; ++ }; ++ ++ pins_i2c_a: i2c-a-pins { ++ function = "i2c"; ++ groups = "i2c_grp_a"; ++ }; ++ ++ pins_i2c_b: i2c-b-pins { ++ function = "i2c"; ++ groups = "i2c_grp_b"; ++ }; ++ ++ pins_i2s: i2s-pins { ++ function = "i2s"; ++ groups = "i2s_grp"; ++ }; ++ ++ pins_nand_ctrl: nand_ctrl-pins { ++ function = "nand_ctrl"; ++ groups = "nand_ctrl_grp"; ++ }; ++ ++ pins_nand_data: nand_data-pins { ++ function = "nand_data"; ++ groups = "nand_data_grp"; ++ }; ++ ++ pins_emmc_ctrl: emmc_ctrl-pins { ++ function = "emmc_ctrl"; ++ groups = "emmc_ctrl_grp"; ++ }; ++ ++ pins_usb0_pwr: usb0_pwr-pins { ++ function = "usb0_pwr"; ++ groups = "usb0_pwr_grp"; ++ }; ++ ++ pins_usb1_pwr: usb1_pwr-pins { ++ function = "usb1_pwr"; ++ groups = "usb1_pwr_grp"; ++ }; ++ }; ++ + uart0: serial@640 { + compatible = "brcm,bcm6345-uart"; + reg = <0x640 0x18>; diff --git a/target/linux/bcm4908/patches-5.15/032-v5.18-0003-arm64-dts-broadcom-bcm4908-add-watchdog-block.patch b/target/linux/bcm4908/patches-5.15/032-v5.18-0003-arm64-dts-broadcom-bcm4908-add-watchdog-block.patch new file mode 100644 index 0000000000..a0329d3276 --- /dev/null +++ b/target/linux/bcm4908/patches-5.15/032-v5.18-0003-arm64-dts-broadcom-bcm4908-add-watchdog-block.patch @@ -0,0 +1,35 @@ +From 47513f6dd93b5b7d91143219c2c1fb883664ed13 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= +Date: Wed, 9 Feb 2022 21:14:17 +0100 +Subject: [PATCH] arm64: dts: broadcom: bcm4908: add watchdog block +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +BCM4908 has the same watchdog as BCM63xx devices. Use "brcm,bcm6345-wdt" +binding which matches the first SoC with that block. + +Signed-off-by: Rafał Miłecki +Signed-off-by: Florian Fainelli +--- + arch/arm64/boot/dts/broadcom/bcm4908/bcm4908.dtsi | 9 +++++++++ + 1 file changed, 9 insertions(+) + +--- a/arch/arm64/boot/dts/broadcom/bcm4908/bcm4908.dtsi ++++ b/arch/arm64/boot/dts/broadcom/bcm4908/bcm4908.dtsi +@@ -278,6 +278,15 @@ + twd: timer-mfd@400 { + compatible = "brcm,bcm4908-twd", "simple-mfd", "syscon"; + reg = <0x400 0x4c>; ++ ranges = <0x0 0x400 0x4c>; ++ ++ #address-cells = <1>; ++ #size-cells = <1>; ++ ++ watchdog@28 { ++ compatible = "brcm,bcm6345-wdt"; ++ reg = <0x28 0x8>; ++ }; + }; + + gpio0: gpio-controller@500 { diff --git a/target/linux/bcm4908/patches-5.15/032-v5.18-0004-arm64-dts-broadcom-bcm4908-add-I2C-block.patch b/target/linux/bcm4908/patches-5.15/032-v5.18-0004-arm64-dts-broadcom-bcm4908-add-I2C-block.patch new file mode 100644 index 0000000000..d86da69893 --- /dev/null +++ b/target/linux/bcm4908/patches-5.15/032-v5.18-0004-arm64-dts-broadcom-bcm4908-add-I2C-block.patch @@ -0,0 +1,34 @@ +From ba5dfa2fd8d0aed4e4b6f650ba9e8ea7cdd6ead1 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= +Date: Tue, 15 Feb 2022 07:36:39 +0100 +Subject: [PATCH] arm64: dts: broadcom: bcm4908: add I2C block +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +BCM4908 uses the same I2C hw as BCM63xx / BCM67xx / BCM68xx SoCs. + +Signed-off-by: Rafał Miłecki +Signed-off-by: Florian Fainelli +--- + arch/arm64/boot/dts/broadcom/bcm4908/bcm4908.dtsi | 9 +++++++++ + 1 file changed, 9 insertions(+) + +--- a/arch/arm64/boot/dts/broadcom/bcm4908/bcm4908.dtsi ++++ b/arch/arm64/boot/dts/broadcom/bcm4908/bcm4908.dtsi +@@ -458,6 +458,15 @@ + }; + }; + ++ i2c@2100 { ++ compatible = "brcm,brcmper-i2c"; ++ reg = <0x2100 0x58>; ++ clock-frequency = <97500>; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&pins_i2c_a>; ++ status = "disabled"; ++ }; ++ + misc@2600 { + compatible = "brcm,misc", "simple-mfd"; + reg = <0x2600 0xe4>; diff --git a/target/linux/bcm4908/patches-5.15/033-v6.0-0001-arm64-dts-Add-DTS-files-for-bcmbca-SoC-BCM63158.patchgit b/target/linux/bcm4908/patches-5.15/033-v6.0-0001-arm64-dts-Add-DTS-files-for-bcmbca-SoC-BCM63158.patchgit new file mode 100644 index 0000000000..908b8c12dc --- /dev/null +++ b/target/linux/bcm4908/patches-5.15/033-v6.0-0001-arm64-dts-Add-DTS-files-for-bcmbca-SoC-BCM63158.patchgit @@ -0,0 +1,199 @@ +From 076dcedc6628c6bf92bd17bfcf8fb7b1af62bfb6 Mon Sep 17 00:00:00 2001 +From: William Zhang +Date: Wed, 1 Jun 2022 15:56:51 -0700 +Subject: [PATCH] arm64: dts: Add DTS files for bcmbca SoC BCM63158 + +Add DTS for ARMv8 based broadband SoC BCM63158. bcm63158.dtsi is the +SoC description DTS header and bcm963158.dts is a simple DTS file for +Broadcom BCM963158 Reference board that only enable the UART port. + +Signed-off-by: William Zhang +Signed-off-by: Florian Fainelli +--- + arch/arm64/boot/dts/broadcom/Makefile | 1 + + arch/arm64/boot/dts/broadcom/bcmbca/Makefile | 2 + + .../boot/dts/broadcom/bcmbca/bcm63158.dtsi | 128 ++++++++++++++++++ + .../boot/dts/broadcom/bcmbca/bcm963158.dts | 30 ++++ + 4 files changed, 161 insertions(+) + create mode 100644 arch/arm64/boot/dts/broadcom/bcmbca/Makefile + create mode 100644 arch/arm64/boot/dts/broadcom/bcmbca/bcm63158.dtsi + create mode 100644 arch/arm64/boot/dts/broadcom/bcmbca/bcm963158.dts + +--- a/arch/arm64/boot/dts/broadcom/Makefile ++++ b/arch/arm64/boot/dts/broadcom/Makefile +@@ -7,5 +7,6 @@ dtb-$(CONFIG_ARCH_BCM2835) += bcm2711-rp + bcm2837-rpi-cm3-io3.dtb + + subdir-y += bcm4908 ++subdir-y += bcmbca + subdir-y += northstar2 + subdir-y += stingray +--- /dev/null ++++ b/arch/arm64/boot/dts/broadcom/bcmbca/Makefile +@@ -0,0 +1,2 @@ ++# SPDX-License-Identifier: GPL-2.0 ++dtb-$(CONFIG_ARCH_BCMBCA) += bcm963158.dtb +--- /dev/null ++++ b/arch/arm64/boot/dts/broadcom/bcmbca/bcm63158.dtsi +@@ -0,0 +1,128 @@ ++// SPDX-License-Identifier: (GPL-2.0+ OR MIT) ++/* ++ * Copyright 2022 Broadcom Ltd. ++ */ ++ ++#include ++#include ++ ++/ { ++ compatible = "brcm,bcm63158", "brcm,bcmbca"; ++ #address-cells = <2>; ++ #size-cells = <2>; ++ ++ interrupt-parent = <&gic>; ++ ++ cpus { ++ #address-cells = <2>; ++ #size-cells = <0>; ++ ++ B53_0: cpu@0 { ++ compatible = "brcm,brahma-b53"; ++ device_type = "cpu"; ++ reg = <0x0 0x0>; ++ next-level-cache = <&L2_0>; ++ enable-method = "psci"; ++ }; ++ ++ B53_1: cpu@1 { ++ compatible = "brcm,brahma-b53"; ++ device_type = "cpu"; ++ reg = <0x0 0x1>; ++ next-level-cache = <&L2_0>; ++ enable-method = "psci"; ++ }; ++ ++ B53_2: cpu@2 { ++ compatible = "brcm,brahma-b53"; ++ device_type = "cpu"; ++ reg = <0x0 0x2>; ++ next-level-cache = <&L2_0>; ++ enable-method = "psci"; ++ }; ++ ++ B53_3: cpu@3 { ++ compatible = "brcm,brahma-b53"; ++ device_type = "cpu"; ++ reg = <0x0 0x3>; ++ next-level-cache = <&L2_0>; ++ enable-method = "psci"; ++ }; ++ ++ L2_0: l2-cache0 { ++ compatible = "cache"; ++ }; ++ }; ++ ++ timer { ++ compatible = "arm,armv8-timer"; ++ interrupts = , ++ , ++ , ++ ; ++ }; ++ ++ pmu: pmu { ++ compatible = "arm,cortex-a53-pmu"; ++ interrupts = , ++ , ++ , ++ ; ++ interrupt-affinity = <&B53_0>, <&B53_1>, ++ <&B53_2>, <&B53_3>; ++ }; ++ ++ clocks: clocks { ++ periph_clk: periph-clk { ++ compatible = "fixed-clock"; ++ #clock-cells = <0>; ++ clock-frequency = <200000000>; ++ }; ++ uart_clk: uart-clk { ++ compatible = "fixed-factor-clock"; ++ #clock-cells = <0>; ++ clocks = <&periph_clk>; ++ clock-div = <4>; ++ clock-mult = <1>; ++ }; ++ }; ++ ++ psci { ++ compatible = "arm,psci-0.2"; ++ method = "smc"; ++ }; ++ ++ axi@81000000 { ++ compatible = "simple-bus"; ++ #address-cells = <1>; ++ #size-cells = <1>; ++ ranges = <0x0 0x0 0x81000000 0x8000>; ++ ++ gic: interrupt-controller@1000 { ++ compatible = "arm,gic-400"; ++ #interrupt-cells = <3>; ++ interrupt-controller; ++ interrupts = ; ++ reg = <0x1000 0x1000>, ++ <0x2000 0x2000>, ++ <0x4000 0x2000>, ++ <0x6000 0x2000>; ++ }; ++ }; ++ ++ bus@ff800000 { ++ compatible = "simple-bus"; ++ #address-cells = <1>; ++ #size-cells = <1>; ++ ranges = <0x0 0x0 0xff800000 0x800000>; ++ ++ uart0: serial@12000 { ++ compatible = "arm,pl011", "arm,primecell"; ++ reg = <0x12000 0x1000>; ++ interrupts = ; ++ clocks = <&uart_clk>, <&uart_clk>; ++ clock-names = "uartclk", "apb_pclk"; ++ status = "disabled"; ++ }; ++ }; ++}; +--- /dev/null ++++ b/arch/arm64/boot/dts/broadcom/bcmbca/bcm963158.dts +@@ -0,0 +1,30 @@ ++// SPDX-License-Identifier: (GPL-2.0+ OR MIT) ++/* ++ * Copyright 2022 Broadcom Ltd. ++ */ ++ ++/dts-v1/; ++ ++#include "bcm63158.dtsi" ++ ++/ { ++ model = "Broadcom BCM963158 Reference Board"; ++ compatible = "brcm,bcm963158", "brcm,bcm63158", "brcm,bcmbca"; ++ ++ aliases { ++ serial0 = &uart0; ++ }; ++ ++ chosen { ++ stdout-path = "serial0:115200n8"; ++ }; ++ ++ memory@0 { ++ device_type = "memory"; ++ reg = <0x0 0x0 0x0 0x08000000>; ++ }; ++}; ++ ++&uart0 { ++ status = "okay"; ++}; diff --git a/target/linux/bcm4908/patches-5.15/033-v6.0-0002-arm64-dts-Add-DTS-files-for-bcmbca-SoC-BCM4912.patchgit b/target/linux/bcm4908/patches-5.15/033-v6.0-0002-arm64-dts-Add-DTS-files-for-bcmbca-SoC-BCM4912.patchgit new file mode 100644 index 0000000000..5cdb9d1df1 --- /dev/null +++ b/target/linux/bcm4908/patches-5.15/033-v6.0-0002-arm64-dts-Add-DTS-files-for-bcmbca-SoC-BCM4912.patchgit @@ -0,0 +1,191 @@ +From 1ba56aeb391401c4cb2126c39f90b3cdbfabdb3f Mon Sep 17 00:00:00 2001 +From: William Zhang +Date: Wed, 1 Jun 2022 13:17:34 -0700 +Subject: [PATCH] arm64: dts: Add DTS files for bcmbca SoC BCM4912 + +Add DTS for ARMv8 based broadband SoC BCM4912. bcm4912.dtsi is the +SoC description DTS header and bcm94912.dts is a simple DTS file for +Broadcom BCM94912 Reference board that only enable the UART port. + +Signed-off-by: William Zhang +Acked-by: Krzysztof Kozlowski +Signed-off-by: Florian Fainelli +--- + arch/arm64/boot/dts/broadcom/bcmbca/Makefile | 3 +- + .../boot/dts/broadcom/bcmbca/bcm4912.dtsi | 128 ++++++++++++++++++ + .../boot/dts/broadcom/bcmbca/bcm94912.dts | 30 ++++ + 3 files changed, 160 insertions(+), 1 deletion(-) + create mode 100644 arch/arm64/boot/dts/broadcom/bcmbca/bcm4912.dtsi + create mode 100644 arch/arm64/boot/dts/broadcom/bcmbca/bcm94912.dts + +--- a/arch/arm64/boot/dts/broadcom/bcmbca/Makefile ++++ b/arch/arm64/boot/dts/broadcom/bcmbca/Makefile +@@ -1,2 +1,3 @@ + # SPDX-License-Identifier: GPL-2.0 +-dtb-$(CONFIG_ARCH_BCMBCA) += bcm963158.dtb ++dtb-$(CONFIG_ARCH_BCMBCA) += bcm94912.dtb \ ++ bcm963158.dtb +--- /dev/null ++++ b/arch/arm64/boot/dts/broadcom/bcmbca/bcm4912.dtsi +@@ -0,0 +1,128 @@ ++// SPDX-License-Identifier: (GPL-2.0+ OR MIT) ++/* ++ * Copyright 2022 Broadcom Ltd. ++ */ ++ ++#include ++#include ++ ++/ { ++ compatible = "brcm,bcm4912", "brcm,bcmbca"; ++ #address-cells = <2>; ++ #size-cells = <2>; ++ ++ interrupt-parent = <&gic>; ++ ++ cpus { ++ #address-cells = <2>; ++ #size-cells = <0>; ++ ++ B53_0: cpu@0 { ++ compatible = "brcm,brahma-b53"; ++ device_type = "cpu"; ++ reg = <0x0 0x0>; ++ next-level-cache = <&L2_0>; ++ enable-method = "psci"; ++ }; ++ ++ B53_1: cpu@1 { ++ compatible = "brcm,brahma-b53"; ++ device_type = "cpu"; ++ reg = <0x0 0x1>; ++ next-level-cache = <&L2_0>; ++ enable-method = "psci"; ++ }; ++ ++ B53_2: cpu@2 { ++ compatible = "brcm,brahma-b53"; ++ device_type = "cpu"; ++ reg = <0x0 0x2>; ++ next-level-cache = <&L2_0>; ++ enable-method = "psci"; ++ }; ++ ++ B53_3: cpu@3 { ++ compatible = "brcm,brahma-b53"; ++ device_type = "cpu"; ++ reg = <0x0 0x3>; ++ next-level-cache = <&L2_0>; ++ enable-method = "psci"; ++ }; ++ ++ L2_0: l2-cache0 { ++ compatible = "cache"; ++ }; ++ }; ++ ++ timer { ++ compatible = "arm,armv8-timer"; ++ interrupts = , ++ , ++ , ++ ; ++ }; ++ ++ pmu: pmu { ++ compatible = "arm,cortex-a53-pmu"; ++ interrupts = , ++ , ++ , ++ ; ++ interrupt-affinity = <&B53_0>, <&B53_1>, ++ <&B53_2>, <&B53_3>; ++ }; ++ ++ clocks: clocks { ++ periph_clk: periph-clk { ++ compatible = "fixed-clock"; ++ #clock-cells = <0>; ++ clock-frequency = <200000000>; ++ }; ++ uart_clk: uart-clk { ++ compatible = "fixed-factor-clock"; ++ #clock-cells = <0>; ++ clocks = <&periph_clk>; ++ clock-div = <4>; ++ clock-mult = <1>; ++ }; ++ }; ++ ++ psci { ++ compatible = "arm,psci-0.2"; ++ method = "smc"; ++ }; ++ ++ axi@81000000 { ++ compatible = "simple-bus"; ++ #address-cells = <1>; ++ #size-cells = <1>; ++ ranges = <0x0 0x0 0x81000000 0x8000>; ++ ++ gic: interrupt-controller@1000 { ++ compatible = "arm,gic-400"; ++ #interrupt-cells = <3>; ++ interrupt-controller; ++ interrupts = ; ++ reg = <0x1000 0x1000>, ++ <0x2000 0x2000>, ++ <0x4000 0x2000>, ++ <0x6000 0x2000>; ++ }; ++ }; ++ ++ bus@ff800000 { ++ compatible = "simple-bus"; ++ #address-cells = <1>; ++ #size-cells = <1>; ++ ranges = <0x0 0x0 0xff800000 0x800000>; ++ ++ uart0: serial@12000 { ++ compatible = "arm,pl011", "arm,primecell"; ++ reg = <0x12000 0x1000>; ++ interrupts = ; ++ clocks = <&uart_clk>, <&uart_clk>; ++ clock-names = "uartclk", "apb_pclk"; ++ status = "disabled"; ++ }; ++ }; ++}; +--- /dev/null ++++ b/arch/arm64/boot/dts/broadcom/bcmbca/bcm94912.dts +@@ -0,0 +1,30 @@ ++// SPDX-License-Identifier: (GPL-2.0+ OR MIT) ++/* ++ * Copyright 2022 Broadcom Ltd. ++ */ ++ ++/dts-v1/; ++ ++#include "bcm4912.dtsi" ++ ++/ { ++ model = "Broadcom BCM94912 Reference Board"; ++ compatible = "brcm,bcm94912", "brcm,bcm4912", "brcm,bcmbca"; ++ ++ aliases { ++ serial0 = &uart0; ++ }; ++ ++ chosen { ++ stdout-path = "serial0:115200n8"; ++ }; ++ ++ memory@0 { ++ device_type = "memory"; ++ reg = <0x0 0x0 0x0 0x08000000>; ++ }; ++}; ++ ++&uart0 { ++ status = "okay"; ++}; diff --git a/target/linux/bcm4908/patches-5.15/033-v6.0-0003-ARM64-dts-Add-DTS-files-for-bcmbca-SoC-BCM6858.patchgit b/target/linux/bcm4908/patches-5.15/033-v6.0-0003-ARM64-dts-Add-DTS-files-for-bcmbca-SoC-BCM6858.patchgit new file mode 100644 index 0000000000..f10a44f890 --- /dev/null +++ b/target/linux/bcm4908/patches-5.15/033-v6.0-0003-ARM64-dts-Add-DTS-files-for-bcmbca-SoC-BCM6858.patchgit @@ -0,0 +1,184 @@ +From e663e06bd3f21e64bc2163910f626af68add6308 Mon Sep 17 00:00:00 2001 +From: Anand Gore +Date: Wed, 1 Jun 2022 13:19:56 -0700 +Subject: [PATCH] ARM64: dts: Add DTS files for bcmbca SoC BCM6858 + +Add DTS for ARMv8 based broadband SoC BCM6858. bcm6858.dtsi is the SoC +description DTS header and bcm96858.dts is a simple DTS file for +Broadcom BCM96858 Reference board that only enables the UART port. + +Signed-off-by: Anand Gore +Signed-off-by: Florian Fainelli +--- + arch/arm64/boot/dts/broadcom/bcmbca/Makefile | 3 +- + .../boot/dts/broadcom/bcmbca/bcm6858.dtsi | 121 ++++++++++++++++++ + .../boot/dts/broadcom/bcmbca/bcm96858.dts | 30 +++++ + 3 files changed, 153 insertions(+), 1 deletion(-) + create mode 100644 arch/arm64/boot/dts/broadcom/bcmbca/bcm6858.dtsi + create mode 100644 arch/arm64/boot/dts/broadcom/bcmbca/bcm96858.dts + +--- a/arch/arm64/boot/dts/broadcom/bcmbca/Makefile ++++ b/arch/arm64/boot/dts/broadcom/bcmbca/Makefile +@@ -1,3 +1,4 @@ + # SPDX-License-Identifier: GPL-2.0 + dtb-$(CONFIG_ARCH_BCMBCA) += bcm94912.dtb \ +- bcm963158.dtb ++ bcm963158.dtb \ ++ bcm96858.dtb +--- /dev/null ++++ b/arch/arm64/boot/dts/broadcom/bcmbca/bcm6858.dtsi +@@ -0,0 +1,121 @@ ++// SPDX-License-Identifier: (GPL-2.0+ OR MIT) ++/* ++ * Copyright 2022 Broadcom Ltd. ++ */ ++ ++#include ++#include ++ ++/ { ++ compatible = "brcm,bcm6858", "brcm,bcmbca"; ++ #address-cells = <2>; ++ #size-cells = <2>; ++ ++ interrupt-parent = <&gic>; ++ ++ cpus { ++ #address-cells = <2>; ++ #size-cells = <0>; ++ ++ B53_0: cpu@0 { ++ compatible = "brcm,brahma-b53"; ++ device_type = "cpu"; ++ reg = <0x0 0x0>; ++ next-level-cache = <&L2_0>; ++ enable-method = "psci"; ++ }; ++ ++ B53_1: cpu@1 { ++ compatible = "brcm,brahma-b53"; ++ device_type = "cpu"; ++ reg = <0x0 0x1>; ++ next-level-cache = <&L2_0>; ++ enable-method = "psci"; ++ }; ++ ++ B53_2: cpu@2 { ++ compatible = "brcm,brahma-b53"; ++ device_type = "cpu"; ++ reg = <0x0 0x2>; ++ next-level-cache = <&L2_0>; ++ enable-method = "psci"; ++ }; ++ ++ B53_3: cpu@3 { ++ compatible = "brcm,brahma-b53"; ++ device_type = "cpu"; ++ reg = <0x0 0x3>; ++ next-level-cache = <&L2_0>; ++ enable-method = "psci"; ++ }; ++ L2_0: l2-cache0 { ++ compatible = "cache"; ++ }; ++ }; ++ ++ timer { ++ compatible = "arm,armv8-timer"; ++ interrupts = , ++ , ++ , ++ ; ++ }; ++ ++ pmu: pmu { ++ compatible = "arm,armv8-pmuv3"; ++ interrupts = , ++ , ++ , ++ ; ++ interrupt-affinity = <&B53_0>, <&B53_1>, ++ <&B53_2>, <&B53_3>; ++ }; ++ ++ clocks: clocks { ++ periph_clk:periph-clk { ++ compatible = "fixed-clock"; ++ #clock-cells = <0>; ++ clock-frequency = <200000000>; ++ }; ++ }; ++ ++ psci { ++ compatible = "arm,psci-0.2"; ++ method = "smc"; ++ }; ++ ++ axi@81000000 { ++ compatible = "simple-bus"; ++ #address-cells = <1>; ++ #size-cells = <1>; ++ ranges = <0x0 0x0 0x81000000 0x8000>; ++ ++ gic: interrupt-controller@1000 { ++ compatible = "arm,gic-400"; ++ #interrupt-cells = <3>; ++ interrupt-controller; ++ reg = <0x1000 0x1000>, /* GICD */ ++ <0x2000 0x2000>, /* GICC */ ++ <0x4000 0x2000>, /* GICH */ ++ <0x6000 0x2000>; /* GICV */ ++ interrupts = ; ++ }; ++ }; ++ ++ bus@ff800000 { ++ compatible = "simple-bus"; ++ #address-cells = <1>; ++ #size-cells = <1>; ++ ranges = <0x0 0x0 0xff800000 0x62000>; ++ ++ uart0: serial@640 { ++ compatible = "brcm,bcm6345-uart"; ++ reg = <0x640 0x18>; ++ interrupts = ; ++ clocks = <&periph_clk>; ++ clock-names = "refclk"; ++ status = "disabled"; ++ }; ++ }; ++}; +--- /dev/null ++++ b/arch/arm64/boot/dts/broadcom/bcmbca/bcm96858.dts +@@ -0,0 +1,30 @@ ++// SPDX-License-Identifier: (GPL-2.0+ OR MIT) ++/* ++ * Copyright 2022 Broadcom Ltd. ++ */ ++ ++/dts-v1/; ++ ++#include "bcm6858.dtsi" ++ ++/ { ++ model = "Broadcom BCM96858 Reference Board"; ++ compatible = "brcm,bcm96858", "brcm,bcm6858", "brcm,bcmbca"; ++ ++ aliases { ++ serial0 = &uart0; ++ }; ++ ++ chosen { ++ stdout-path = "serial0:115200n8"; ++ }; ++ ++ memory@0 { ++ device_type = "memory"; ++ reg = <0x0 0x0 0x0 0x08000000>; ++ }; ++}; ++ ++&uart0 { ++ status = "okay"; ++}; diff --git a/target/linux/bcm4908/patches-5.15/033-v6.0-0004-arm64-dts-Add-DTS-files-for-bcmbca-SoC-BCM63146.patchgit b/target/linux/bcm4908/patches-5.15/033-v6.0-0004-arm64-dts-Add-DTS-files-for-bcmbca-SoC-BCM63146.patchgit new file mode 100644 index 0000000000..793c5af738 --- /dev/null +++ b/target/linux/bcm4908/patches-5.15/033-v6.0-0004-arm64-dts-Add-DTS-files-for-bcmbca-SoC-BCM63146.patchgit @@ -0,0 +1,174 @@ +From 82a58061ada60058ec00113c179380f945914709 Mon Sep 17 00:00:00 2001 +From: William Zhang +Date: Wed, 8 Jun 2022 11:00:59 -0700 +Subject: [PATCH] arm64: dts: Add DTS files for bcmbca SoC BCM63146 + +Add DTS for ARMv8 based broadband SoC BCM63146. bcm63146.dtsi is the +SoC description DTS header and bcm963146.dts is a simple DTS file for +Broadcom BCM963146 Reference board that only enable the UART port. + +Signed-off-by: William Zhang +Signed-off-by: Florian Fainelli +--- + arch/arm64/boot/dts/broadcom/bcmbca/Makefile | 3 +- + .../boot/dts/broadcom/bcmbca/bcm63146.dtsi | 110 ++++++++++++++++++ + .../boot/dts/broadcom/bcmbca/bcm963146.dts | 30 +++++ + 3 files changed, 142 insertions(+), 1 deletion(-) + create mode 100644 arch/arm64/boot/dts/broadcom/bcmbca/bcm63146.dtsi + create mode 100644 arch/arm64/boot/dts/broadcom/bcmbca/bcm963146.dts + +--- a/arch/arm64/boot/dts/broadcom/bcmbca/Makefile ++++ b/arch/arm64/boot/dts/broadcom/bcmbca/Makefile +@@ -1,4 +1,5 @@ + # SPDX-License-Identifier: GPL-2.0 + dtb-$(CONFIG_ARCH_BCMBCA) += bcm94912.dtb \ + bcm963158.dtb \ +- bcm96858.dtb ++ bcm96858.dtb \ ++ bcm963146.dtb +--- /dev/null ++++ b/arch/arm64/boot/dts/broadcom/bcmbca/bcm63146.dtsi +@@ -0,0 +1,110 @@ ++// SPDX-License-Identifier: (GPL-2.0+ OR MIT) ++/* ++ * Copyright 2022 Broadcom Ltd. ++ */ ++ ++#include ++#include ++ ++/ { ++ compatible = "brcm,bcm63146", "brcm,bcmbca"; ++ #address-cells = <2>; ++ #size-cells = <2>; ++ ++ interrupt-parent = <&gic>; ++ ++ cpus { ++ #address-cells = <2>; ++ #size-cells = <0>; ++ ++ B53_0: cpu@0 { ++ compatible = "brcm,brahma-b53"; ++ device_type = "cpu"; ++ reg = <0x0 0x0>; ++ next-level-cache = <&L2_0>; ++ enable-method = "psci"; ++ }; ++ ++ B53_1: cpu@1 { ++ compatible = "brcm,brahma-b53"; ++ device_type = "cpu"; ++ reg = <0x0 0x1>; ++ next-level-cache = <&L2_0>; ++ enable-method = "psci"; ++ }; ++ ++ L2_0: l2-cache0 { ++ compatible = "cache"; ++ }; ++ }; ++ ++ timer { ++ compatible = "arm,armv8-timer"; ++ interrupts = , ++ , ++ , ++ ; ++ }; ++ ++ pmu: pmu { ++ compatible = "arm,cortex-a53-pmu"; ++ interrupts = , ++ ; ++ interrupt-affinity = <&B53_0>, <&B53_1>; ++ }; ++ ++ clocks: clocks { ++ periph_clk: periph-clk { ++ compatible = "fixed-clock"; ++ #clock-cells = <0>; ++ clock-frequency = <200000000>; ++ }; ++ uart_clk: uart-clk { ++ compatible = "fixed-factor-clock"; ++ #clock-cells = <0>; ++ clocks = <&periph_clk>; ++ clock-div = <4>; ++ clock-mult = <1>; ++ }; ++ }; ++ ++ psci { ++ compatible = "arm,psci-0.2"; ++ method = "smc"; ++ }; ++ ++ axi@81000000 { ++ compatible = "simple-bus"; ++ #address-cells = <1>; ++ #size-cells = <1>; ++ ranges = <0x0 0x0 0x81000000 0x8000>; ++ ++ gic: interrupt-controller@1000 { ++ compatible = "arm,gic-400"; ++ #interrupt-cells = <3>; ++ interrupt-controller; ++ reg = <0x1000 0x1000>, ++ <0x2000 0x2000>, ++ <0x4000 0x2000>, ++ <0x6000 0x2000>; ++ interrupts = ; ++ }; ++ }; ++ ++ bus@ff800000 { ++ compatible = "simple-bus"; ++ #address-cells = <1>; ++ #size-cells = <1>; ++ ranges = <0x0 0x0 0xff800000 0x800000>; ++ ++ uart0: serial@12000 { ++ compatible = "arm,pl011", "arm,primecell"; ++ reg = <0x12000 0x1000>; ++ interrupts = ; ++ clocks = <&uart_clk>, <&uart_clk>; ++ clock-names = "uartclk", "apb_pclk"; ++ status = "disabled"; ++ }; ++ }; ++}; +--- /dev/null ++++ b/arch/arm64/boot/dts/broadcom/bcmbca/bcm963146.dts +@@ -0,0 +1,30 @@ ++// SPDX-License-Identifier: (GPL-2.0+ OR MIT) ++/* ++ * Copyright 2022 Broadcom Ltd. ++ */ ++ ++/dts-v1/; ++ ++#include "bcm63146.dtsi" ++ ++/ { ++ model = "Broadcom BCM963146 Reference Board"; ++ compatible = "brcm,bcm963146", "brcm,bcm63146", "brcm,bcmbca"; ++ ++ aliases { ++ serial0 = &uart0; ++ }; ++ ++ chosen { ++ stdout-path = "serial0:115200n8"; ++ }; ++ ++ memory@0 { ++ device_type = "memory"; ++ reg = <0x0 0x0 0x0 0x08000000>; ++ }; ++}; ++ ++&uart0 { ++ status = "okay"; ++}; diff --git a/target/linux/bcm4908/patches-5.15/033-v6.0-0005-arm64-dts-Add-DTS-files-for-bcmbca-SoC-BCM6856.patchgit b/target/linux/bcm4908/patches-5.15/033-v6.0-0005-arm64-dts-Add-DTS-files-for-bcmbca-SoC-BCM6856.patchgit new file mode 100644 index 0000000000..0fdafb7f17 --- /dev/null +++ b/target/linux/bcm4908/patches-5.15/033-v6.0-0005-arm64-dts-Add-DTS-files-for-bcmbca-SoC-BCM6856.patchgit @@ -0,0 +1,167 @@ +From 64eca7ad058cff861b48cdead8dee40dfc284e9e Mon Sep 17 00:00:00 2001 +From: William Zhang +Date: Wed, 8 Jun 2022 11:04:36 -0700 +Subject: [PATCH] arm64: dts: Add DTS files for bcmbca SoC BCM6856 + +Add DTS for ARMv8 based broadband SoC BCM6856. bcm6856.dtsi is the +SoC description DTS header and bcm96856.dts is a simple DTS file for +Broadcom BCM96956 Reference board that only enable the UART port. + +Signed-off-by: William Zhang +Signed-off-by: Florian Fainelli +--- + arch/arm64/boot/dts/broadcom/bcmbca/Makefile | 3 +- + .../boot/dts/broadcom/bcmbca/bcm6856.dtsi | 103 ++++++++++++++++++ + .../boot/dts/broadcom/bcmbca/bcm96856.dts | 30 +++++ + 3 files changed, 135 insertions(+), 1 deletion(-) + create mode 100644 arch/arm64/boot/dts/broadcom/bcmbca/bcm6856.dtsi + create mode 100644 arch/arm64/boot/dts/broadcom/bcmbca/bcm96856.dts + +--- a/arch/arm64/boot/dts/broadcom/bcmbca/Makefile ++++ b/arch/arm64/boot/dts/broadcom/bcmbca/Makefile +@@ -2,4 +2,5 @@ + dtb-$(CONFIG_ARCH_BCMBCA) += bcm94912.dtb \ + bcm963158.dtb \ + bcm96858.dtb \ +- bcm963146.dtb ++ bcm963146.dtb \ ++ bcm96856.dtb +--- /dev/null ++++ b/arch/arm64/boot/dts/broadcom/bcmbca/bcm6856.dtsi +@@ -0,0 +1,103 @@ ++// SPDX-License-Identifier: (GPL-2.0+ OR MIT) ++/* ++ * Copyright 2022 Broadcom Ltd. ++ */ ++ ++#include ++#include ++ ++/ { ++ compatible = "brcm,bcm6856", "brcm,bcmbca"; ++ #address-cells = <2>; ++ #size-cells = <2>; ++ ++ interrupt-parent = <&gic>; ++ ++ cpus { ++ #address-cells = <2>; ++ #size-cells = <0>; ++ ++ B53_0: cpu@0 { ++ compatible = "brcm,brahma-b53"; ++ device_type = "cpu"; ++ reg = <0x0 0x0>; ++ next-level-cache = <&L2_0>; ++ enable-method = "psci"; ++ }; ++ ++ B53_1: cpu@1 { ++ compatible = "brcm,brahma-b53"; ++ device_type = "cpu"; ++ reg = <0x0 0x1>; ++ next-level-cache = <&L2_0>; ++ enable-method = "psci"; ++ }; ++ ++ L2_0: l2-cache0 { ++ compatible = "cache"; ++ }; ++ }; ++ ++ timer { ++ compatible = "arm,armv8-timer"; ++ interrupts = , ++ , ++ , ++ ; ++ }; ++ ++ pmu: pmu { ++ compatible = "arm,cortex-a53-pmu"; ++ interrupts = , ++ ; ++ interrupt-affinity = <&B53_0>, <&B53_1>; ++ }; ++ ++ clocks: clocks { ++ periph_clk:periph-clk { ++ compatible = "fixed-clock"; ++ #clock-cells = <0>; ++ clock-frequency = <200000000>; ++ }; ++ }; ++ ++ psci { ++ compatible = "arm,psci-0.2"; ++ method = "smc"; ++ }; ++ ++ axi@81000000 { ++ compatible = "simple-bus"; ++ #address-cells = <1>; ++ #size-cells = <1>; ++ ranges = <0x0 0x0 0x81000000 0x8000>; ++ ++ gic: interrupt-controller@1000 { ++ compatible = "arm,gic-400"; ++ #interrupt-cells = <3>; ++ interrupt-controller; ++ reg = <0x1000 0x1000>, /* GICD */ ++ <0x2000 0x2000>, /* GICC */ ++ <0x4000 0x2000>, /* GICH */ ++ <0x6000 0x2000>; /* GICV */ ++ interrupts = ; ++ }; ++ }; ++ ++ bus@ff800000 { ++ compatible = "simple-bus"; ++ #address-cells = <1>; ++ #size-cells = <1>; ++ ranges = <0x0 0x0 0xff800000 0x800000>; ++ ++ uart0: serial@640 { ++ compatible = "brcm,bcm6345-uart"; ++ reg = <0x640 0x18>; ++ interrupts = ; ++ clocks = <&periph_clk>; ++ clock-names = "refclk"; ++ status = "disabled"; ++ }; ++ }; ++}; +--- /dev/null ++++ b/arch/arm64/boot/dts/broadcom/bcmbca/bcm96856.dts +@@ -0,0 +1,30 @@ ++// SPDX-License-Identifier: (GPL-2.0+ OR MIT) ++/* ++ * Copyright 2022 Broadcom Ltd. ++ */ ++ ++/dts-v1/; ++ ++#include "bcm6856.dtsi" ++ ++/ { ++ model = "Broadcom BCM96856 Reference Board"; ++ compatible = "brcm,bcm96856", "brcm,bcm6856", "brcm,bcmbca"; ++ ++ aliases { ++ serial0 = &uart0; ++ }; ++ ++ chosen { ++ stdout-path = "serial0:115200n8"; ++ }; ++ ++ memory@0 { ++ device_type = "memory"; ++ reg = <0x0 0x0 0x0 0x08000000>; ++ }; ++}; ++ ++&uart0 { ++ status = "okay"; ++}; diff --git a/target/linux/bcm4908/patches-5.15/033-v6.0-0006-arm64-dts-Add-DTS-files-for-bcmbca-SoC-BCM6813.patchgit b/target/linux/bcm4908/patches-5.15/033-v6.0-0006-arm64-dts-Add-DTS-files-for-bcmbca-SoC-BCM6813.patchgit new file mode 100644 index 0000000000..58af85a68c --- /dev/null +++ b/target/linux/bcm4908/patches-5.15/033-v6.0-0006-arm64-dts-Add-DTS-files-for-bcmbca-SoC-BCM6813.patchgit @@ -0,0 +1,192 @@ +From eab6bb0994b806525fc5e362e8b865f61c4a9e20 Mon Sep 17 00:00:00 2001 +From: William Zhang +Date: Thu, 9 Jun 2022 17:15:33 -0700 +Subject: [PATCH] arm64: dts: Add DTS files for bcmbca SoC BCM6813 + +Add DTS for ARMv8 based broadband SoC BCM6813. bcm6813.dtsi is the +SoC description DTS header and bcm96813.dts is a simple DTS file for +Broadcom BCM96813 Reference board that only enable the UART port. + +Signed-off-by: William Zhang +Signed-off-by: Florian Fainelli +--- + arch/arm64/boot/dts/broadcom/bcmbca/Makefile | 3 +- + .../boot/dts/broadcom/bcmbca/bcm6813.dtsi | 128 ++++++++++++++++++ + .../boot/dts/broadcom/bcmbca/bcm96813.dts | 30 ++++ + 3 files changed, 160 insertions(+), 1 deletion(-) + create mode 100644 arch/arm64/boot/dts/broadcom/bcmbca/bcm6813.dtsi + create mode 100644 arch/arm64/boot/dts/broadcom/bcmbca/bcm96813.dts + +--- a/arch/arm64/boot/dts/broadcom/bcmbca/Makefile ++++ b/arch/arm64/boot/dts/broadcom/bcmbca/Makefile +@@ -3,4 +3,5 @@ dtb-$(CONFIG_ARCH_BCMBCA) += bcm94912.dt + bcm963158.dtb \ + bcm96858.dtb \ + bcm963146.dtb \ +- bcm96856.dtb ++ bcm96856.dtb \ ++ bcm96813.dtb +--- /dev/null ++++ b/arch/arm64/boot/dts/broadcom/bcmbca/bcm6813.dtsi +@@ -0,0 +1,128 @@ ++// SPDX-License-Identifier: (GPL-2.0+ OR MIT) ++/* ++ * Copyright 2022 Broadcom Ltd. ++ */ ++ ++#include ++#include ++ ++/ { ++ compatible = "brcm,bcm6813", "brcm,bcmbca"; ++ #address-cells = <2>; ++ #size-cells = <2>; ++ ++ interrupt-parent = <&gic>; ++ ++ cpus { ++ #address-cells = <2>; ++ #size-cells = <0>; ++ ++ B53_0: cpu@0 { ++ compatible = "brcm,brahma-b53"; ++ device_type = "cpu"; ++ reg = <0x0 0x0>; ++ next-level-cache = <&L2_0>; ++ enable-method = "psci"; ++ }; ++ ++ B53_1: cpu@1 { ++ compatible = "brcm,brahma-b53"; ++ device_type = "cpu"; ++ reg = <0x0 0x1>; ++ next-level-cache = <&L2_0>; ++ enable-method = "psci"; ++ }; ++ ++ B53_2: cpu@2 { ++ compatible = "brcm,brahma-b53"; ++ device_type = "cpu"; ++ reg = <0x0 0x2>; ++ next-level-cache = <&L2_0>; ++ enable-method = "psci"; ++ }; ++ ++ B53_3: cpu@3 { ++ compatible = "brcm,brahma-b53"; ++ device_type = "cpu"; ++ reg = <0x0 0x3>; ++ next-level-cache = <&L2_0>; ++ enable-method = "psci"; ++ }; ++ ++ L2_0: l2-cache0 { ++ compatible = "cache"; ++ }; ++ }; ++ ++ timer { ++ compatible = "arm,armv8-timer"; ++ interrupts = , ++ , ++ , ++ ; ++ }; ++ ++ pmu: pmu { ++ compatible = "arm,cortex-a53-pmu"; ++ interrupts = , ++ , ++ , ++ ; ++ interrupt-affinity = <&B53_0>, <&B53_1>, ++ <&B53_2>, <&B53_3>; ++ }; ++ ++ clocks: clocks { ++ periph_clk: periph-clk { ++ compatible = "fixed-clock"; ++ #clock-cells = <0>; ++ clock-frequency = <200000000>; ++ }; ++ uart_clk: uart-clk { ++ compatible = "fixed-factor-clock"; ++ #clock-cells = <0>; ++ clocks = <&periph_clk>; ++ clock-div = <4>; ++ clock-mult = <1>; ++ }; ++ }; ++ ++ psci { ++ compatible = "arm,psci-0.2"; ++ method = "smc"; ++ }; ++ ++ axi@81000000 { ++ compatible = "simple-bus"; ++ #address-cells = <1>; ++ #size-cells = <1>; ++ ranges = <0x0 0x0 0x81000000 0x8000>; ++ ++ gic: interrupt-controller@1000 { ++ compatible = "arm,gic-400"; ++ #interrupt-cells = <3>; ++ interrupt-controller; ++ interrupts = ; ++ reg = <0x1000 0x1000>, ++ <0x2000 0x2000>, ++ <0x4000 0x2000>, ++ <0x6000 0x2000>; ++ }; ++ }; ++ ++ bus@ff800000 { ++ compatible = "simple-bus"; ++ #address-cells = <1>; ++ #size-cells = <1>; ++ ranges = <0x0 0x0 0xff800000 0x800000>; ++ ++ uart0: serial@12000 { ++ compatible = "arm,pl011", "arm,primecell"; ++ reg = <0x12000 0x1000>; ++ interrupts = ; ++ clocks = <&uart_clk>, <&uart_clk>; ++ clock-names = "uartclk", "apb_pclk"; ++ status = "disabled"; ++ }; ++ }; ++}; +--- /dev/null ++++ b/arch/arm64/boot/dts/broadcom/bcmbca/bcm96813.dts +@@ -0,0 +1,30 @@ ++// SPDX-License-Identifier: (GPL-2.0+ OR MIT) ++/* ++ * Copyright 2022 Broadcom Ltd. ++ */ ++ ++/dts-v1/; ++ ++#include "bcm6813.dtsi" ++ ++/ { ++ model = "Broadcom BCM96813 Reference Board"; ++ compatible = "brcm,bcm96813", "brcm,bcm6813", "brcm,bcmbca"; ++ ++ aliases { ++ serial0 = &uart0; ++ }; ++ ++ chosen { ++ stdout-path = "serial0:115200n8"; ++ }; ++ ++ memory@0 { ++ device_type = "memory"; ++ reg = <0x0 0x0 0x0 0x08000000>; ++ }; ++}; ++ ++&uart0 { ++ status = "okay"; ++}; diff --git a/target/linux/bcm4908/patches-5.15/033-v6.0-0007-arm64-dts-broadcom-align-gpio-key-node-names-with-dt.patchgit b/target/linux/bcm4908/patches-5.15/033-v6.0-0007-arm64-dts-broadcom-align-gpio-key-node-names-with-dt.patchgit new file mode 100644 index 0000000000..d0d6151957 --- /dev/null +++ b/target/linux/bcm4908/patches-5.15/033-v6.0-0007-arm64-dts-broadcom-align-gpio-key-node-names-with-dt.patchgit @@ -0,0 +1,79 @@ +From ea559c81b61603d4044df6f826f10a832c42c98c Mon Sep 17 00:00:00 2001 +From: Krzysztof Kozlowski +Date: Wed, 15 Jun 2022 17:52:59 -0700 +Subject: [PATCH] arm64: dts: broadcom: align gpio-key node names with dtschema + +The node names should be generic and DT schema expects certain pattern +(e.g. with key/button/switch). + +Signed-off-by: Krzysztof Kozlowski +Link: https://lore.kernel.org/r/20220616005333.18491-6-krzysztof.kozlowski@linaro.org +--- + .../broadcom/bcm4908/bcm4906-tplink-archer-c2300-v1.dts | 8 ++++---- + .../boot/dts/broadcom/bcm4908/bcm4908-asus-gt-ac5300.dts | 8 ++++---- + 2 files changed, 8 insertions(+), 8 deletions(-) + +--- a/arch/arm64/boot/dts/broadcom/bcm4908/bcm4906-tplink-archer-c2300-v1.dts ++++ b/arch/arm64/boot/dts/broadcom/bcm4908/bcm4906-tplink-archer-c2300-v1.dts +@@ -83,25 +83,25 @@ + compatible = "gpio-keys-polled"; + poll-interval = <100>; + +- brightness { ++ key-brightness { + label = "LEDs"; + linux,code = ; + gpios = <&gpio0 18 GPIO_ACTIVE_LOW>; + }; + +- wps { ++ key-wps { + label = "WPS"; + linux,code = ; + gpios = <&gpio0 21 GPIO_ACTIVE_LOW>; + }; + +- wifi { ++ key-wifi { + label = "WiFi"; + linux,code = ; + gpios = <&gpio0 22 GPIO_ACTIVE_LOW>; + }; + +- restart { ++ key-restart { + label = "Reset"; + linux,code = ; + gpios = <&gpio0 23 GPIO_ACTIVE_LOW>; +--- a/arch/arm64/boot/dts/broadcom/bcm4908/bcm4908-asus-gt-ac5300.dts ++++ b/arch/arm64/boot/dts/broadcom/bcm4908/bcm4908-asus-gt-ac5300.dts +@@ -18,25 +18,25 @@ + compatible = "gpio-keys-polled"; + poll-interval = <100>; + +- wifi { ++ key-wifi { + label = "WiFi"; + linux,code = ; + gpios = <&gpio0 28 GPIO_ACTIVE_LOW>; + }; + +- wps { ++ key-wps { + label = "WPS"; + linux,code = ; + gpios = <&gpio0 29 GPIO_ACTIVE_LOW>; + }; + +- restart { ++ key-restart { + label = "Reset"; + linux,code = ; + gpios = <&gpio0 30 GPIO_ACTIVE_LOW>; + }; + +- brightness { ++ key-brightness { + label = "LEDs"; + linux,code = ; + gpios = <&gpio0 31 GPIO_ACTIVE_LOW>; diff --git a/target/linux/bcm4908/patches-5.15/033-v6.0-0008-arm64-dts-broadcom-bcm4908-Fix-timer-node-for-BCM490.patchgit b/target/linux/bcm4908/patches-5.15/033-v6.0-0008-arm64-dts-broadcom-bcm4908-Fix-timer-node-for-BCM490.patchgit new file mode 100644 index 0000000000..59fbeea385 --- /dev/null +++ b/target/linux/bcm4908/patches-5.15/033-v6.0-0008-arm64-dts-broadcom-bcm4908-Fix-timer-node-for-BCM490.patchgit @@ -0,0 +1,33 @@ +From b4a544e415e9be33b37d9bfa9d9f9f4d13f553d6 Mon Sep 17 00:00:00 2001 +From: William Zhang +Date: Fri, 8 Jul 2022 11:25:06 -0700 +Subject: [PATCH] arm64: dts: broadcom: bcm4908: Fix timer node for BCM4906 SoC + +The cpu mask value in interrupt property inherits from bcm4908.dtsi +which sets to four cpus. Correct the value to two cpus for dual core +BCM4906 SoC. + +Fixes: c8b404fb05dc ("arm64: dts: broadcom: bcm4908: add BCM4906 Netgear R8000P DTS files") +Signed-off-by: William Zhang +Signed-off-by: Florian Fainelli +--- + arch/arm64/boot/dts/broadcom/bcm4908/bcm4906.dtsi | 8 ++++++++ + 1 file changed, 8 insertions(+) + +--- a/arch/arm64/boot/dts/broadcom/bcm4908/bcm4906.dtsi ++++ b/arch/arm64/boot/dts/broadcom/bcm4908/bcm4906.dtsi +@@ -17,6 +17,14 @@ + ; + }; + ++ timer { ++ compatible = "arm,armv8-timer"; ++ interrupts = , ++ , ++ , ++ ; ++ }; ++ + pmu { + compatible = "arm,cortex-a53-pmu"; + interrupts = , diff --git a/target/linux/bcm4908/patches-5.15/033-v6.0-0010-arm64-dts-Add-base-DTS-file-for-bcmbca-device-Asus-G.patchgit b/target/linux/bcm4908/patches-5.15/033-v6.0-0010-arm64-dts-Add-base-DTS-file-for-bcmbca-device-Asus-G.patchgit new file mode 100644 index 0000000000..6f71c8b5fb --- /dev/null +++ b/target/linux/bcm4908/patches-5.15/033-v6.0-0010-arm64-dts-Add-base-DTS-file-for-bcmbca-device-Asus-G.patchgit @@ -0,0 +1,54 @@ +From f3f575c4bef95384e68de552c7b29938fd0d9201 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= +Date: Wed, 13 Jul 2022 22:03:51 +0200 +Subject: [PATCH] arm64: dts: Add base DTS file for bcmbca device Asus + GT-AX6000 +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +It's a home router with 1 GiB of RAM, 6 Ethernet ports, 2 USB ports. + +Signed-off-by: Rafał Miłecki +Acked-by: William Zhang +Link: https://lore.kernel.org/r/20220713200351.28526-2-zajec5@gmail.com +Signed-off-by: Florian Fainelli +--- + arch/arm64/boot/dts/broadcom/bcmbca/Makefile | 4 +++- + .../bcmbca/bcm4912-asus-gt-ax6000.dts | 19 +++++++++++++++++++ + 2 files changed, 22 insertions(+), 1 deletion(-) + create mode 100644 arch/arm64/boot/dts/broadcom/bcmbca/bcm4912-asus-gt-ax6000.dts + +--- a/arch/arm64/boot/dts/broadcom/bcmbca/Makefile ++++ b/arch/arm64/boot/dts/broadcom/bcmbca/Makefile +@@ -1,5 +1,7 @@ + # SPDX-License-Identifier: GPL-2.0 +-dtb-$(CONFIG_ARCH_BCMBCA) += bcm94912.dtb \ ++dtb-$(CONFIG_ARCH_BCMBCA) += \ ++ bcm4912-asus-gt-ax6000.dtb \ ++ bcm94912.dtb \ + bcm963158.dtb \ + bcm96858.dtb \ + bcm963146.dtb \ +--- /dev/null ++++ b/arch/arm64/boot/dts/broadcom/bcmbca/bcm4912-asus-gt-ax6000.dts +@@ -0,0 +1,19 @@ ++// SPDX-License-Identifier: GPL-2.0-or-later OR MIT ++ ++/dts-v1/; ++ ++#include "bcm4912.dtsi" ++ ++/ { ++ compatible = "asus,gt-ax6000", "brcm,bcm4912", "brcm,bcmbca"; ++ model = "Asus GT-AX6000"; ++ ++ memory@0 { ++ device_type = "memory"; ++ reg = <0x00 0x00 0x00 0x40000000>; ++ }; ++}; ++ ++&uart0 { ++ status = "okay"; ++}; diff --git a/target/linux/bcm4908/patches-5.15/033-v6.0-0011-arm64-bcmbca-add-arch-bcmbca-machine-entry.patch b/target/linux/bcm4908/patches-5.15/033-v6.0-0011-arm64-bcmbca-add-arch-bcmbca-machine-entry.patch new file mode 100644 index 0000000000..603e30cb8a --- /dev/null +++ b/target/linux/bcm4908/patches-5.15/033-v6.0-0011-arm64-bcmbca-add-arch-bcmbca-machine-entry.patch @@ -0,0 +1,31 @@ +From fdcd652ce2b6b819f5c4dc3cead5215c84ee6933 Mon Sep 17 00:00:00 2001 +From: William Zhang +Date: Wed, 1 Jun 2022 15:56:50 -0700 +Subject: [PATCH] arm64: bcmbca: add arch bcmbca machine entry + +Add ARCH_BCMBCA config for Broadcom Broadband SoC chipsets + +Signed-off-by: William Zhang +Signed-off-by: Florian Fainelli +--- + arch/arm64/Kconfig.platforms | 9 +++++++++ + 1 file changed, 9 insertions(+) + +--- a/arch/arm64/Kconfig.platforms ++++ b/arch/arm64/Kconfig.platforms +@@ -65,6 +65,15 @@ config ARCH_BCM_IPROC + help + This enables support for Broadcom iProc based SoCs + ++config ARCH_BCMBCA ++ bool "Broadcom Broadband SoC" ++ help ++ Say Y if you intend to run the kernel on a Broadcom Broadband ARM-based ++ BCA chipset. ++ ++ This enables support for Broadcom BCA ARM-based broadband chipsets, ++ including the DSL, PON and Wireless family of chips. ++ + config ARCH_BERLIN + bool "Marvell Berlin SoC Family" + select DW_APB_ICTL diff --git a/target/linux/bcm4908/patches-5.15/034-v6.1-0001-arm64-dts-broadcom-bcm4908-add-remaining-LED-pins.patch b/target/linux/bcm4908/patches-5.15/034-v6.1-0001-arm64-dts-broadcom-bcm4908-add-remaining-LED-pins.patch new file mode 100644 index 0000000000..437249f2cb --- /dev/null +++ b/target/linux/bcm4908/patches-5.15/034-v6.1-0001-arm64-dts-broadcom-bcm4908-add-remaining-LED-pins.patch @@ -0,0 +1,115 @@ +From 456b6dd1baadd2da10e28ffd1717b06d1fa17a97 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= +Date: Mon, 18 Jul 2022 15:20:58 +0200 +Subject: [PATCH] arm64: dts: broadcom: bcm4908: add remaining LED pins +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Include all 32 pins. + +Signed-off-by: Rafał Miłecki +Link: https://lore.kernel.org/r/20220718132100.13277-1-zajec5@gmail.com +Signed-off-by: Florian Fainelli +--- + .../boot/dts/broadcom/bcm4908/bcm4908.dtsi | 75 +++++++++++++++++++ + 1 file changed, 75 insertions(+) + +--- a/arch/arm64/boot/dts/broadcom/bcm4908/bcm4908.dtsi ++++ b/arch/arm64/boot/dts/broadcom/bcm4908/bcm4908.dtsi +@@ -352,6 +352,61 @@ + groups = "led_9_grp_a"; + }; + ++ pins_led_10_a: led_10-a-pins { ++ function = "led_10"; ++ groups = "led_10_grp_a"; ++ }; ++ ++ pins_led_11_a: led_11-a-pins { ++ function = "led_11"; ++ groups = "led_11_grp_a"; ++ }; ++ ++ pins_led_12_a: led_12-a-pins { ++ function = "led_12"; ++ groups = "led_12_grp_a"; ++ }; ++ ++ pins_led_13_a: led_13-a-pins { ++ function = "led_13"; ++ groups = "led_13_grp_a"; ++ }; ++ ++ pins_led_14_a: led_14-a-pins { ++ function = "led_14"; ++ groups = "led_14_grp_a"; ++ }; ++ ++ pins_led_15_a: led_15-a-pins { ++ function = "led_15"; ++ groups = "led_15_grp_a"; ++ }; ++ ++ pins_led_16_a: led_16-a-pins { ++ function = "led_16"; ++ groups = "led_16_grp_a"; ++ }; ++ ++ pins_led_17_a: led_17-a-pins { ++ function = "led_17"; ++ groups = "led_17_grp_a"; ++ }; ++ ++ pins_led_18_a: led_18-a-pins { ++ function = "led_18"; ++ groups = "led_18_grp_a"; ++ }; ++ ++ pins_led_19_a: led_19-a-pins { ++ function = "led_19"; ++ groups = "led_19_grp_a"; ++ }; ++ ++ pins_led_20_a: led_20-a-pins { ++ function = "led_20"; ++ groups = "led_20_grp_a"; ++ }; ++ + pins_led_21_a: led_21-a-pins { + function = "led_21"; + groups = "led_21_grp_a"; +@@ -362,6 +417,21 @@ + groups = "led_22_grp_a"; + }; + ++ pins_led_23_a: led_23-a-pins { ++ function = "led_23"; ++ groups = "led_23_grp_a"; ++ }; ++ ++ pins_led_24_a: led_24-a-pins { ++ function = "led_24"; ++ groups = "led_24_grp_a"; ++ }; ++ ++ pins_led_25_a: led_25-a-pins { ++ function = "led_25"; ++ groups = "led_25_grp_a"; ++ }; ++ + pins_led_26_a: led_26-a-pins { + function = "led_26"; + groups = "led_26_grp_a"; +@@ -387,6 +457,11 @@ + groups = "led_30_grp_a"; + }; + ++ pins_led_31_a: led_31-a-pins { ++ function = "led_31"; ++ groups = "led_31_grp_a"; ++ }; ++ + pins_hs_uart: hs_uart-pins { + function = "hs_uart"; + groups = "hs_uart_grp"; diff --git a/target/linux/bcm4908/patches-5.15/034-v6.1-0002-arm64-dts-broadcom-bcm4908-add-LEDs-controller-block.patch b/target/linux/bcm4908/patches-5.15/034-v6.1-0002-arm64-dts-broadcom-bcm4908-add-LEDs-controller-block.patch new file mode 100644 index 0000000000..c890340893 --- /dev/null +++ b/target/linux/bcm4908/patches-5.15/034-v6.1-0002-arm64-dts-broadcom-bcm4908-add-LEDs-controller-block.patch @@ -0,0 +1,35 @@ +From 7de56b1dc1149c702d4cc1e89ccc251bfb2bc246 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= +Date: Mon, 18 Jul 2022 15:20:59 +0200 +Subject: [PATCH] arm64: dts: broadcom: bcm4908: add LEDs controller block +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +BCM4908 includes LEDs controller that supports multiple brightness +levels & hardware blinking. + +Signed-off-by: Rafał Miłecki +Link: https://lore.kernel.org/r/20220718132100.13277-2-zajec5@gmail.com +Signed-off-by: Florian Fainelli +--- + arch/arm64/boot/dts/broadcom/bcm4908/bcm4908.dtsi | 8 ++++++++ + 1 file changed, 8 insertions(+) + +--- a/arch/arm64/boot/dts/broadcom/bcm4908/bcm4908.dtsi ++++ b/arch/arm64/boot/dts/broadcom/bcm4908/bcm4908.dtsi +@@ -517,6 +517,14 @@ + status = "okay"; + }; + ++ leds: leds@800 { ++ compatible = "brcm,bcm4908-leds", "brcm,bcm63138-leds"; ++ reg = <0x800 0xdc>; ++ ++ #address-cells = <1>; ++ #size-cells = <0>; ++ }; ++ + nand-controller@1800 { + #address-cells = <1>; + #size-cells = <0>; diff --git a/target/linux/bcm4908/patches-5.15/034-v6.1-0003-arm64-dts-broadcom-bcm4908-add-Asus-GT-AC5300-LEDs.patch b/target/linux/bcm4908/patches-5.15/034-v6.1-0003-arm64-dts-broadcom-bcm4908-add-Asus-GT-AC5300-LEDs.patch new file mode 100644 index 0000000000..3888efb66b --- /dev/null +++ b/target/linux/bcm4908/patches-5.15/034-v6.1-0003-arm64-dts-broadcom-bcm4908-add-Asus-GT-AC5300-LEDs.patch @@ -0,0 +1,81 @@ +From 3bcae3396e986b4ab97a69e8de517e32f9691a4b Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= +Date: Mon, 18 Jul 2022 15:21:00 +0200 +Subject: [PATCH] arm64: dts: broadcom: bcm4908: add Asus GT-AC5300 LEDs +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +There are 5 software-controllable LEDs on PCB. + +Signed-off-by: Rafał Miłecki +Link: https://lore.kernel.org/r/20220718132100.13277-3-zajec5@gmail.com +Signed-off-by: Florian Fainelli +--- + .../bcm4908/bcm4908-asus-gt-ac5300.dts | 48 +++++++++++++++++++ + 1 file changed, 48 insertions(+) + +--- a/arch/arm64/boot/dts/broadcom/bcm4908/bcm4908-asus-gt-ac5300.dts ++++ b/arch/arm64/boot/dts/broadcom/bcm4908/bcm4908-asus-gt-ac5300.dts +@@ -2,6 +2,7 @@ + + #include + #include ++#include + + #include "bcm4908.dtsi" + +@@ -118,6 +119,53 @@ + }; + }; + ++&leds { ++ led-power@11 { ++ reg = <0x11>; ++ function = LED_FUNCTION_POWER; ++ color = ; ++ default-state = "on"; ++ active-low; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&pins_led_17_a>; ++ }; ++ ++ led-wan-red@12 { ++ reg = <0x12>; ++ function = LED_FUNCTION_WAN; ++ color = ; ++ active-low; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&pins_led_18_a>; ++ }; ++ ++ led-wps@14 { ++ reg = <0x14>; ++ function = LED_FUNCTION_WPS; ++ color = ; ++ active-low; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&pins_led_20_a>; ++ }; ++ ++ led-wan-white@15 { ++ reg = <0x15>; ++ function = LED_FUNCTION_WAN; ++ color = ; ++ active-low; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&pins_led_21_a>; ++ }; ++ ++ led-lan@19 { ++ reg = <0x19>; ++ function = LED_FUNCTION_LAN; ++ color = ; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&pins_led_25_a>; ++ }; ++}; ++ + &nandcs { + nand-ecc-strength = <4>; + nand-ecc-step-size = <512>; diff --git a/target/linux/bcm4908/patches-5.15/034-v6.1-0004-arm64-dts-bcmbca-update-BCM4908-board-dts-files.patch b/target/linux/bcm4908/patches-5.15/034-v6.1-0004-arm64-dts-bcmbca-update-BCM4908-board-dts-files.patch new file mode 100644 index 0000000000..d4b7a983de --- /dev/null +++ b/target/linux/bcm4908/patches-5.15/034-v6.1-0004-arm64-dts-bcmbca-update-BCM4908-board-dts-files.patch @@ -0,0 +1,66 @@ +From 4fdcbde682291fba2c3f45a41decd656d92a314f Mon Sep 17 00:00:00 2001 +From: William Zhang +Date: Wed, 3 Aug 2022 10:54:49 -0700 +Subject: [PATCH] arm64: dts: bcmbca: update BCM4908 board dts files +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Append "brcm,bcmbca" to compatible strings based on the new bcmbca +binding rule for BCM4908 family based boards. + +Signed-off-by: William Zhang +Acked-by: Rafał Miłecki +Link: https://lore.kernel.org/r/20220803175455.47638-4-william.zhang@broadcom.com +Signed-off-by: Florian Fainelli +--- + arch/arm64/boot/dts/broadcom/bcm4908/bcm4906-netgear-r8000p.dts | 2 +- + .../dts/broadcom/bcm4908/bcm4906-tplink-archer-c2300-v1.dts | 2 +- + arch/arm64/boot/dts/broadcom/bcm4908/bcm4908-asus-gt-ac5300.dts | 2 +- + .../arm64/boot/dts/broadcom/bcm4908/bcm4908-netgear-raxe500.dts | 2 +- + 4 files changed, 4 insertions(+), 4 deletions(-) + +--- a/arch/arm64/boot/dts/broadcom/bcm4908/bcm4906-netgear-r8000p.dts ++++ b/arch/arm64/boot/dts/broadcom/bcm4908/bcm4906-netgear-r8000p.dts +@@ -7,7 +7,7 @@ + #include "bcm4906.dtsi" + + / { +- compatible = "netgear,r8000p", "brcm,bcm4906", "brcm,bcm4908"; ++ compatible = "netgear,r8000p", "brcm,bcm4906", "brcm,bcm4908", "brcm,bcmbca"; + model = "Netgear R8000P"; + + memory@0 { +--- a/arch/arm64/boot/dts/broadcom/bcm4908/bcm4906-tplink-archer-c2300-v1.dts ++++ b/arch/arm64/boot/dts/broadcom/bcm4908/bcm4906-tplink-archer-c2300-v1.dts +@@ -7,7 +7,7 @@ + #include "bcm4906.dtsi" + + / { +- compatible = "tplink,archer-c2300-v1", "brcm,bcm4906", "brcm,bcm4908"; ++ compatible = "tplink,archer-c2300-v1", "brcm,bcm4906", "brcm,bcm4908", "brcm,bcmbca"; + model = "TP-Link Archer C2300 V1"; + + memory@0 { +--- a/arch/arm64/boot/dts/broadcom/bcm4908/bcm4908-asus-gt-ac5300.dts ++++ b/arch/arm64/boot/dts/broadcom/bcm4908/bcm4908-asus-gt-ac5300.dts +@@ -7,7 +7,7 @@ + #include "bcm4908.dtsi" + + / { +- compatible = "asus,gt-ac5300", "brcm,bcm4908"; ++ compatible = "asus,gt-ac5300", "brcm,bcm4908", "brcm,bcmbca"; + model = "Asus GT-AC5300"; + + memory@0 { +--- a/arch/arm64/boot/dts/broadcom/bcm4908/bcm4908-netgear-raxe500.dts ++++ b/arch/arm64/boot/dts/broadcom/bcm4908/bcm4908-netgear-raxe500.dts +@@ -3,7 +3,7 @@ + #include "bcm4908.dtsi" + + / { +- compatible = "netgear,raxe500", "brcm,bcm4908"; ++ compatible = "netgear,raxe500", "brcm,bcm4908", "brcm,bcmbca"; + model = "Netgear RAXE500"; + + memory@0 { diff --git a/target/linux/bcm4908/patches-5.15/034-v6.1-0005-arm64-dts-Move-BCM4908-dts-to-bcmbca-folder.patch b/target/linux/bcm4908/patches-5.15/034-v6.1-0005-arm64-dts-Move-BCM4908-dts-to-bcmbca-folder.patch new file mode 100644 index 0000000000..21454a8652 --- /dev/null +++ b/target/linux/bcm4908/patches-5.15/034-v6.1-0005-arm64-dts-Move-BCM4908-dts-to-bcmbca-folder.patch @@ -0,0 +1,85 @@ +From ded8f22945899f4e87dd6d952bbc4abce6e64b7e Mon Sep 17 00:00:00 2001 +From: William Zhang +Date: Wed, 3 Aug 2022 10:54:50 -0700 +Subject: [PATCH] arm64: dts: Move BCM4908 dts to bcmbca folder + +As part of ARCH_BCM4908 to ARCH_BCMBCA migration, move the BCM4908 dts +files to bcmbca folder and use CONFIG_ARCH_BCMBCA to build all the +BCM4908 board dts. Delete bcm4908 folder and its makefile as well. + +Signed-off-by: William Zhang +Link: https://lore.kernel.org/r/20220803175455.47638-5-william.zhang@broadcom.com +Signed-off-by: Florian Fainelli +--- + arch/arm64/boot/dts/broadcom/Makefile | 1 - + arch/arm64/boot/dts/broadcom/bcm4908/Makefile | 5 ----- + arch/arm64/boot/dts/broadcom/bcmbca/Makefile | 4 ++++ + .../broadcom/{bcm4908 => bcmbca}/bcm4906-netgear-r8000p.dts | 0 + .../{bcm4908 => bcmbca}/bcm4906-tplink-archer-c2300-v1.dts | 0 + .../arm64/boot/dts/broadcom/{bcm4908 => bcmbca}/bcm4906.dtsi | 0 + .../broadcom/{bcm4908 => bcmbca}/bcm4908-asus-gt-ac5300.dts | 0 + .../broadcom/{bcm4908 => bcmbca}/bcm4908-netgear-raxe500.dts | 0 + .../arm64/boot/dts/broadcom/{bcm4908 => bcmbca}/bcm4908.dtsi | 0 + 9 files changed, 4 insertions(+), 6 deletions(-) + delete mode 100644 arch/arm64/boot/dts/broadcom/bcm4908/Makefile + rename arch/arm64/boot/dts/broadcom/{bcm4908 => bcmbca}/bcm4906-netgear-r8000p.dts (100%) + rename arch/arm64/boot/dts/broadcom/{bcm4908 => bcmbca}/bcm4906-tplink-archer-c2300-v1.dts (100%) + rename arch/arm64/boot/dts/broadcom/{bcm4908 => bcmbca}/bcm4906.dtsi (100%) + rename arch/arm64/boot/dts/broadcom/{bcm4908 => bcmbca}/bcm4908-asus-gt-ac5300.dts (100%) + rename arch/arm64/boot/dts/broadcom/{bcm4908 => bcmbca}/bcm4908-netgear-raxe500.dts (100%) + rename arch/arm64/boot/dts/broadcom/{bcm4908 => bcmbca}/bcm4908.dtsi (100%) + +--- a/arch/arm64/boot/dts/broadcom/Makefile ++++ b/arch/arm64/boot/dts/broadcom/Makefile +@@ -6,7 +6,6 @@ dtb-$(CONFIG_ARCH_BCM2835) += bcm2711-rp + bcm2837-rpi-3-b-plus.dtb \ + bcm2837-rpi-cm3-io3.dtb + +-subdir-y += bcm4908 + subdir-y += bcmbca + subdir-y += northstar2 + subdir-y += stingray +--- a/arch/arm64/boot/dts/broadcom/bcm4908/Makefile ++++ /dev/null +@@ -1,5 +0,0 @@ +-# SPDX-License-Identifier: GPL-2.0 +-dtb-$(CONFIG_ARCH_BCM4908) += bcm4906-netgear-r8000p.dtb +-dtb-$(CONFIG_ARCH_BCM4908) += bcm4906-tplink-archer-c2300-v1.dtb +-dtb-$(CONFIG_ARCH_BCM4908) += bcm4908-asus-gt-ac5300.dtb +-dtb-$(CONFIG_ARCH_BCM4908) += bcm4908-netgear-raxe500.dtb +--- a/arch/arm64/boot/dts/broadcom/bcmbca/Makefile ++++ b/arch/arm64/boot/dts/broadcom/bcmbca/Makefile +@@ -1,5 +1,9 @@ + # SPDX-License-Identifier: GPL-2.0 + dtb-$(CONFIG_ARCH_BCMBCA) += \ ++ bcm4906-netgear-r8000p.dtb \ ++ bcm4906-tplink-archer-c2300-v1.dtb \ ++ bcm4908-asus-gt-ac5300.dtb \ ++ bcm4908-netgear-raxe500.dtb \ + bcm4912-asus-gt-ax6000.dtb \ + bcm94912.dtb \ + bcm963158.dtb \ +diff --git a/arch/arm64/boot/dts/broadcom/bcm4908/bcm4906-netgear-r8000p.dts b/arch/arm64/boot/dts/broadcom/bcmbca/bcm4906-netgear-r8000p.dts +similarity index 100% +rename from arch/arm64/boot/dts/broadcom/bcm4908/bcm4906-netgear-r8000p.dts +rename to arch/arm64/boot/dts/broadcom/bcmbca/bcm4906-netgear-r8000p.dts +diff --git a/arch/arm64/boot/dts/broadcom/bcm4908/bcm4906-tplink-archer-c2300-v1.dts b/arch/arm64/boot/dts/broadcom/bcmbca/bcm4906-tplink-archer-c2300-v1.dts +similarity index 100% +rename from arch/arm64/boot/dts/broadcom/bcm4908/bcm4906-tplink-archer-c2300-v1.dts +rename to arch/arm64/boot/dts/broadcom/bcmbca/bcm4906-tplink-archer-c2300-v1.dts +diff --git a/arch/arm64/boot/dts/broadcom/bcm4908/bcm4906.dtsi b/arch/arm64/boot/dts/broadcom/bcmbca/bcm4906.dtsi +similarity index 100% +rename from arch/arm64/boot/dts/broadcom/bcm4908/bcm4906.dtsi +rename to arch/arm64/boot/dts/broadcom/bcmbca/bcm4906.dtsi +diff --git a/arch/arm64/boot/dts/broadcom/bcm4908/bcm4908-asus-gt-ac5300.dts b/arch/arm64/boot/dts/broadcom/bcmbca/bcm4908-asus-gt-ac5300.dts +similarity index 100% +rename from arch/arm64/boot/dts/broadcom/bcm4908/bcm4908-asus-gt-ac5300.dts +rename to arch/arm64/boot/dts/broadcom/bcmbca/bcm4908-asus-gt-ac5300.dts +diff --git a/arch/arm64/boot/dts/broadcom/bcm4908/bcm4908-netgear-raxe500.dts b/arch/arm64/boot/dts/broadcom/bcmbca/bcm4908-netgear-raxe500.dts +similarity index 100% +rename from arch/arm64/boot/dts/broadcom/bcm4908/bcm4908-netgear-raxe500.dts +rename to arch/arm64/boot/dts/broadcom/bcmbca/bcm4908-netgear-raxe500.dts +diff --git a/arch/arm64/boot/dts/broadcom/bcm4908/bcm4908.dtsi b/arch/arm64/boot/dts/broadcom/bcmbca/bcm4908.dtsi +similarity index 100% +rename from arch/arm64/boot/dts/broadcom/bcm4908/bcm4908.dtsi +rename to arch/arm64/boot/dts/broadcom/bcmbca/bcm4908.dtsi diff --git a/target/linux/bcm4908/patches-5.15/034-v6.1-0006-arm64-dts-Add-BCM4908-generic-board-dts.patch b/target/linux/bcm4908/patches-5.15/034-v6.1-0006-arm64-dts-Add-BCM4908-generic-board-dts.patch new file mode 100644 index 0000000000..b19c5d33b4 --- /dev/null +++ b/target/linux/bcm4908/patches-5.15/034-v6.1-0006-arm64-dts-Add-BCM4908-generic-board-dts.patch @@ -0,0 +1,62 @@ +From 72e0bdb6d7edb1785d58f2e8e7c80e1d2f93a319 Mon Sep 17 00:00:00 2001 +From: William Zhang +Date: Wed, 3 Aug 2022 10:54:51 -0700 +Subject: [PATCH] arm64: dts: Add BCM4908 generic board dts + +Add generic bare bone bcm94908.dts file to support any 4908 based +design. It supports cpu subsystem, memory and an uart console. This can +be useful for board bring-up and cpu subsystem and memory related kernel +test as well. + +Signed-off-by: William Zhang +Link: https://lore.kernel.org/r/20220803175455.47638-6-william.zhang@broadcom.com +Signed-off-by: Florian Fainelli +--- + arch/arm64/boot/dts/broadcom/bcmbca/Makefile | 1 + + .../boot/dts/broadcom/bcmbca/bcm94908.dts | 30 +++++++++++++++++++ + 2 files changed, 31 insertions(+) + create mode 100644 arch/arm64/boot/dts/broadcom/bcmbca/bcm94908.dts + +--- a/arch/arm64/boot/dts/broadcom/bcmbca/Makefile ++++ b/arch/arm64/boot/dts/broadcom/bcmbca/Makefile +@@ -4,6 +4,7 @@ dtb-$(CONFIG_ARCH_BCMBCA) += \ + bcm4906-tplink-archer-c2300-v1.dtb \ + bcm4908-asus-gt-ac5300.dtb \ + bcm4908-netgear-raxe500.dtb \ ++ bcm94908.dtb \ + bcm4912-asus-gt-ax6000.dtb \ + bcm94912.dtb \ + bcm963158.dtb \ +--- /dev/null ++++ b/arch/arm64/boot/dts/broadcom/bcmbca/bcm94908.dts +@@ -0,0 +1,30 @@ ++// SPDX-License-Identifier: (GPL-2.0+ OR MIT) ++/* ++ * Copyright 2022 Broadcom Ltd. ++ */ ++ ++/dts-v1/; ++ ++#include "bcm4908.dtsi" ++ ++/ { ++ model = "Broadcom BCM94908 Reference Board"; ++ compatible = "brcm,bcm94908", "brcm,bcm4908", "brcm,bcmbca"; ++ ++ aliases { ++ serial0 = &uart0; ++ }; ++ ++ chosen { ++ stdout-path = "serial0:115200n8"; ++ }; ++ ++ memory@0 { ++ device_type = "memory"; ++ reg = <0x0 0x0 0x0 0x08000000>; ++ }; ++}; ++ ++&uart0 { ++ status = "okay"; ++}; diff --git a/target/linux/bcm4908/patches-5.15/035-v6.2-0001-arm64-dts-broadcom-bcmbca-bcm4908-add-TWD-block-time.patch b/target/linux/bcm4908/patches-5.15/035-v6.2-0001-arm64-dts-broadcom-bcmbca-bcm4908-add-TWD-block-time.patch new file mode 100644 index 0000000000..a3f49ca440 --- /dev/null +++ b/target/linux/bcm4908/patches-5.15/035-v6.2-0001-arm64-dts-broadcom-bcmbca-bcm4908-add-TWD-block-time.patch @@ -0,0 +1,31 @@ +From 68064196cffea33f090bd2e8d81cd5e20107ecf1 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= +Date: Thu, 3 Nov 2022 11:53:16 +0100 +Subject: [PATCH] arm64: dts: broadcom: bcmbca: bcm4908: add TWD block timer +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +BCM4908 TWD contains block with 4 timers. Add binding for it. + +Signed-off-by: Rafał Miłecki +Link: https://lore.kernel.org/r/20221103105316.21294-1-zajec5@gmail.com +Signed-off-by: Florian Fainelli +--- + arch/arm64/boot/dts/broadcom/bcmbca/bcm4908.dtsi | 5 +++++ + 1 file changed, 5 insertions(+) + +--- a/arch/arm64/boot/dts/broadcom/bcmbca/bcm4908.dtsi ++++ b/arch/arm64/boot/dts/broadcom/bcmbca/bcm4908.dtsi +@@ -283,6 +283,11 @@ + #address-cells = <1>; + #size-cells = <1>; + ++ timer@0 { ++ compatible = "brcm,bcm63138-timer"; ++ reg = <0x0 0x28>; ++ }; ++ + watchdog@28 { + compatible = "brcm,bcm6345-wdt"; + reg = <0x28 0x8>; diff --git a/target/linux/bcm4908/patches-5.15/035-v6.2-0002-arm64-dts-broadcom-bcmbca-bcm6858-add-TWD-block.patch b/target/linux/bcm4908/patches-5.15/035-v6.2-0002-arm64-dts-broadcom-bcmbca-bcm6858-add-TWD-block.patch new file mode 100644 index 0000000000..e8e81ae544 --- /dev/null +++ b/target/linux/bcm4908/patches-5.15/035-v6.2-0002-arm64-dts-broadcom-bcmbca-bcm6858-add-TWD-block.patch @@ -0,0 +1,46 @@ +From 4f9fb09175e87a233787a2dee1e5dabb14deb022 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= +Date: Thu, 3 Nov 2022 12:00:15 +0100 +Subject: [PATCH] arm64: dts: broadcom: bcmbca: bcm6858: add TWD block +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +BCM6858 contains TWD block with timers, watchdog, and reset subblocks. +Describe it. + +Signed-off-by: Rafał Miłecki +Link: https://lore.kernel.org/r/20221103110015.21761-1-zajec5@gmail.com +Signed-off-by: Florian Fainelli +--- + .../boot/dts/broadcom/bcmbca/bcm6858.dtsi | 19 +++++++++++++++++++ + 1 file changed, 19 insertions(+) + +--- a/arch/arm64/boot/dts/broadcom/bcmbca/bcm6858.dtsi ++++ b/arch/arm64/boot/dts/broadcom/bcmbca/bcm6858.dtsi +@@ -109,6 +109,25 @@ + #size-cells = <1>; + ranges = <0x0 0x0 0xff800000 0x62000>; + ++ twd: timer-mfd@400 { ++ compatible = "brcm,bcm4908-twd", "simple-mfd", "syscon"; ++ reg = <0x400 0x4c>; ++ ranges = <0x0 0x400 0x4c>; ++ ++ #address-cells = <1>; ++ #size-cells = <1>; ++ ++ timer@0 { ++ compatible = "brcm,bcm63138-timer"; ++ reg = <0x0 0x28>; ++ }; ++ ++ watchdog@28 { ++ compatible = "brcm,bcm6345-wdt"; ++ reg = <0x28 0x8>; ++ }; ++ }; ++ + uart0: serial@640 { + compatible = "brcm,bcm6345-uart"; + reg = <0x640 0x18>; diff --git a/target/linux/bcm4908/patches-5.15/040-v6.1-mtd-parsers-add-Broadcom-s-U-Boot-parser.patch b/target/linux/bcm4908/patches-5.15/040-v6.1-mtd-parsers-add-Broadcom-s-U-Boot-parser.patch new file mode 100644 index 0000000000..4d4059b17f --- /dev/null +++ b/target/linux/bcm4908/patches-5.15/040-v6.1-mtd-parsers-add-Broadcom-s-U-Boot-parser.patch @@ -0,0 +1,137 @@ +From 002181f5b150e60c77f21de7ad4dd10e4614cd91 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= +Date: Mon, 11 Jul 2022 17:30:41 +0200 +Subject: [PATCH] mtd: parsers: add Broadcom's U-Boot parser +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Broadcom stores environment variables blocks inside U-Boot partition +itself. This driver finds & registers them. + +Signed-off-by: Rafał Miłecki +Signed-off-by: Miquel Raynal +Link: https://lore.kernel.org/linux-mtd/20220711153041.6036-2-zajec5@gmail.com +--- + drivers/mtd/parsers/Kconfig | 10 ++++ + drivers/mtd/parsers/Makefile | 1 + + drivers/mtd/parsers/brcm_u-boot.c | 84 +++++++++++++++++++++++++++++++ + 3 files changed, 95 insertions(+) + create mode 100644 drivers/mtd/parsers/brcm_u-boot.c + +--- a/drivers/mtd/parsers/Kconfig ++++ b/drivers/mtd/parsers/Kconfig +@@ -20,6 +20,16 @@ config MTD_BCM63XX_PARTS + This provides partition parsing for BCM63xx devices with CFE + bootloaders. + ++config MTD_BRCM_U_BOOT ++ tristate "Broadcom's U-Boot partition parser" ++ depends on ARCH_BCM4908 || COMPILE_TEST ++ help ++ Broadcom uses a custom way of storing U-Boot environment variables. ++ They are placed inside U-Boot partition itself at unspecified offset. ++ It's possible to locate them by looking for a custom header with a ++ magic value. This driver does that and creates subpartitions for ++ each found environment variables block. ++ + config MTD_CMDLINE_PARTS + tristate "Command line partition table parsing" + depends on MTD +--- a/drivers/mtd/parsers/Makefile ++++ b/drivers/mtd/parsers/Makefile +@@ -2,6 +2,7 @@ + obj-$(CONFIG_MTD_AR7_PARTS) += ar7part.o + obj-$(CONFIG_MTD_BCM47XX_PARTS) += bcm47xxpart.o + obj-$(CONFIG_MTD_BCM63XX_PARTS) += bcm63xxpart.o ++obj-$(CONFIG_MTD_BRCM_U_BOOT) += brcm_u-boot.o + obj-$(CONFIG_MTD_CMDLINE_PARTS) += cmdlinepart.o + obj-$(CONFIG_MTD_MYLOADER_PARTS) += myloader.o + obj-$(CONFIG_MTD_OF_PARTS) += ofpart.o +--- /dev/null ++++ b/drivers/mtd/parsers/brcm_u-boot.c +@@ -0,0 +1,84 @@ ++// SPDX-License-Identifier: GPL-2.0-only ++/* ++ * Copyright © 2022 Rafał Miłecki ++ */ ++ ++#include ++#include ++#include ++#include ++#include ++ ++#define BRCM_U_BOOT_MAX_OFFSET 0x200000 ++#define BRCM_U_BOOT_STEP 0x1000 ++ ++#define BRCM_U_BOOT_MAX_PARTS 2 ++ ++#define BRCM_U_BOOT_MAGIC 0x75456e76 /* uEnv */ ++ ++struct brcm_u_boot_header { ++ __le32 magic; ++ __le32 length; ++} __packed; ++ ++static const char *names[BRCM_U_BOOT_MAX_PARTS] = { ++ "u-boot-env", ++ "u-boot-env-backup", ++}; ++ ++static int brcm_u_boot_parse(struct mtd_info *mtd, ++ const struct mtd_partition **pparts, ++ struct mtd_part_parser_data *data) ++{ ++ struct brcm_u_boot_header header; ++ struct mtd_partition *parts; ++ size_t bytes_read; ++ size_t offset; ++ int err; ++ int i = 0; ++ ++ parts = kcalloc(BRCM_U_BOOT_MAX_PARTS, sizeof(*parts), GFP_KERNEL); ++ if (!parts) ++ return -ENOMEM; ++ ++ for (offset = 0; ++ offset < min_t(size_t, mtd->size, BRCM_U_BOOT_MAX_OFFSET); ++ offset += BRCM_U_BOOT_STEP) { ++ err = mtd_read(mtd, offset, sizeof(header), &bytes_read, (uint8_t *)&header); ++ if (err && !mtd_is_bitflip(err)) { ++ pr_err("Failed to read from %s at 0x%zx: %d\n", mtd->name, offset, err); ++ continue; ++ } ++ ++ if (le32_to_cpu(header.magic) != BRCM_U_BOOT_MAGIC) ++ continue; ++ ++ parts[i].name = names[i]; ++ parts[i].offset = offset; ++ parts[i].size = sizeof(header) + le32_to_cpu(header.length); ++ i++; ++ pr_info("offset:0x%zx magic:0x%08x BINGO\n", offset, header.magic); ++ ++ if (i == BRCM_U_BOOT_MAX_PARTS) ++ break; ++ } ++ ++ *pparts = parts; ++ ++ return i; ++}; ++ ++static const struct of_device_id brcm_u_boot_of_match_table[] = { ++ { .compatible = "brcm,u-boot" }, ++ {}, ++}; ++MODULE_DEVICE_TABLE(of, brcm_u_boot_of_match_table); ++ ++static struct mtd_part_parser brcm_u_boot_mtd_parser = { ++ .parse_fn = brcm_u_boot_parse, ++ .name = "brcm_u-boot", ++ .of_match_table = brcm_u_boot_of_match_table, ++}; ++module_mtd_part_parser(brcm_u_boot_mtd_parser); ++ ++MODULE_LICENSE("GPL"); diff --git a/target/linux/bcm4908/patches-5.15/070-v5.17-net-dsa-bcm_sf2-refactor-LED-regs-access.patch b/target/linux/bcm4908/patches-5.15/070-v5.17-net-dsa-bcm_sf2-refactor-LED-regs-access.patch new file mode 100644 index 0000000000..fd0b13c17b --- /dev/null +++ b/target/linux/bcm4908/patches-5.15/070-v5.17-net-dsa-bcm_sf2-refactor-LED-regs-access.patch @@ -0,0 +1,209 @@ +From af30f8eaa8fe4ff1987280f716309711997bd979 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= +Date: Wed, 29 Dec 2021 18:16:42 +0100 +Subject: [PATCH] net: dsa: bcm_sf2: refactor LED regs access +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +1. Define more regs. Some switches (e.g. BCM4908) have up to 6 regs. +2. Add helper for handling non-lineral port <-> reg mappings. +3. Add support for 12 B LED reg blocks on BCM4908 (different layout) + +Complete support for LEDs setup will be implemented once Linux receives +a proper design & implementation for "hardware" LEDs. + +Signed-off-by: Rafał Miłecki +Acked-by: Florian Fainelli +Link: https://lore.kernel.org/r/20211229171642.22942-1-zajec5@gmail.com +Signed-off-by: Jakub Kicinski +--- + drivers/net/dsa/bcm_sf2.c | 54 ++++++++++++++++++++++++---- + drivers/net/dsa/bcm_sf2.h | 10 ++++++ + drivers/net/dsa/bcm_sf2_regs.h | 65 +++++++++++++++++++++++++++++++--- + 3 files changed, 119 insertions(+), 10 deletions(-) + +--- a/drivers/net/dsa/bcm_sf2.c ++++ b/drivers/net/dsa/bcm_sf2.c +@@ -62,6 +62,38 @@ static u16 bcm_sf2_reg_rgmii_cntrl(struc + return REG_SWITCH_STATUS; + } + ++static u16 bcm_sf2_reg_led_base(struct bcm_sf2_priv *priv, int port) ++{ ++ switch (port) { ++ case 0: ++ return REG_LED_0_CNTRL; ++ case 1: ++ return REG_LED_1_CNTRL; ++ case 2: ++ return REG_LED_2_CNTRL; ++ } ++ ++ switch (priv->type) { ++ case BCM4908_DEVICE_ID: ++ switch (port) { ++ case 3: ++ return REG_LED_3_CNTRL; ++ case 7: ++ return REG_LED_4_CNTRL; ++ default: ++ break; ++ } ++ break; ++ default: ++ break; ++ } ++ ++ WARN_ONCE(1, "Unsupported port %d\n", port); ++ ++ /* RO fallback reg */ ++ return REG_SWITCH_STATUS; ++} ++ + /* Return the number of active ports, not counting the IMP (CPU) port */ + static unsigned int bcm_sf2_num_active_ports(struct dsa_switch *ds) + { +@@ -187,9 +219,14 @@ static void bcm_sf2_gphy_enable_set(stru + + /* Use PHY-driven LED signaling */ + if (!enable) { +- reg = reg_readl(priv, REG_LED_CNTRL(0)); +- reg |= SPDLNK_SRC_SEL; +- reg_writel(priv, reg, REG_LED_CNTRL(0)); ++ u16 led_ctrl = bcm_sf2_reg_led_base(priv, 0); ++ ++ if (priv->type == BCM7278_DEVICE_ID || ++ priv->type == BCM7445_DEVICE_ID) { ++ reg = reg_led_readl(priv, led_ctrl, 0); ++ reg |= LED_CNTRL_SPDLNK_SRC_SEL; ++ reg_led_writel(priv, reg, led_ctrl, 0); ++ } + } + } + +@@ -1241,9 +1278,14 @@ static const u16 bcm_sf2_4908_reg_offset + [REG_SPHY_CNTRL] = 0x24, + [REG_CROSSBAR] = 0xc8, + [REG_RGMII_11_CNTRL] = 0x014c, +- [REG_LED_0_CNTRL] = 0x40, +- [REG_LED_1_CNTRL] = 0x4c, +- [REG_LED_2_CNTRL] = 0x58, ++ [REG_LED_0_CNTRL] = 0x40, ++ [REG_LED_1_CNTRL] = 0x4c, ++ [REG_LED_2_CNTRL] = 0x58, ++ [REG_LED_3_CNTRL] = 0x64, ++ [REG_LED_4_CNTRL] = 0x88, ++ [REG_LED_5_CNTRL] = 0xa0, ++ [REG_LED_AGGREGATE_CTRL] = 0xb8, ++ + }; + + static const struct bcm_sf2_of_data bcm_sf2_4908_data = { +--- a/drivers/net/dsa/bcm_sf2.h ++++ b/drivers/net/dsa/bcm_sf2.h +@@ -210,6 +210,16 @@ SF2_IO_MACRO(acb); + SWITCH_INTR_L2(0); + SWITCH_INTR_L2(1); + ++static inline u32 reg_led_readl(struct bcm_sf2_priv *priv, u16 off, u16 reg) ++{ ++ return readl_relaxed(priv->reg + priv->reg_offsets[off] + reg); ++} ++ ++static inline void reg_led_writel(struct bcm_sf2_priv *priv, u32 val, u16 off, u16 reg) ++{ ++ writel_relaxed(val, priv->reg + priv->reg_offsets[off] + reg); ++} ++ + /* RXNFC */ + int bcm_sf2_get_rxnfc(struct dsa_switch *ds, int port, + struct ethtool_rxnfc *nfc, u32 *rule_locs); +--- a/drivers/net/dsa/bcm_sf2_regs.h ++++ b/drivers/net/dsa/bcm_sf2_regs.h +@@ -25,6 +25,10 @@ enum bcm_sf2_reg_offs { + REG_LED_0_CNTRL, + REG_LED_1_CNTRL, + REG_LED_2_CNTRL, ++ REG_LED_3_CNTRL, ++ REG_LED_4_CNTRL, ++ REG_LED_5_CNTRL, ++ REG_LED_AGGREGATE_CTRL, + REG_SWITCH_REG_MAX, + }; + +@@ -56,6 +60,63 @@ enum bcm_sf2_reg_offs { + #define CROSSBAR_BCM4908_EXT_GPHY4 1 + #define CROSSBAR_BCM4908_EXT_RGMII 2 + ++/* Relative to REG_LED_*_CNTRL (BCM7278, BCM7445) */ ++#define LED_CNTRL_NO_LINK_ENCODE_SHIFT 0 ++#define LED_CNTRL_M10_ENCODE_SHIFT 2 ++#define LED_CNTRL_M100_ENCODE_SHIFT 4 ++#define LED_CNTRL_M1000_ENCODE_SHIFT 6 ++#define LED_CNTRL_SEL_NO_LINK_ENCODE_SHIFT 8 ++#define LED_CNTRL_SEL_10M_ENCODE_SHIFT 10 ++#define LED_CNTRL_SEL_100M_ENCODE_SHIFT 12 ++#define LED_CNTRL_SEL_1000M_ENCODE_SHIFT 14 ++#define LED_CNTRL_RX_DV_EN (1 << 16) ++#define LED_CNTRL_TX_EN_EN (1 << 17) ++#define LED_CNTRL_SPDLNK_LED0_ACT_SEL_SHIFT 18 ++#define LED_CNTRL_SPDLNK_LED1_ACT_SEL_SHIFT 20 ++#define LED_CNTRL_ACT_LED_ACT_SEL_SHIFT 22 ++#define LED_CNTRL_SPDLNK_SRC_SEL (1 << 24) ++#define LED_CNTRL_SPDLNK_LED0_ACT_POL_SEL (1 << 25) ++#define LED_CNTRL_SPDLNK_LED1_ACT_POL_SEL (1 << 26) ++#define LED_CNTRL_ACT_LED_POL_SEL (1 << 27) ++#define LED_CNTRL_MASK 0x3 ++ ++/* Register relative to REG_LED_*_CNTRL (BCM4908) */ ++#define REG_LED_CTRL 0x0 ++#define LED_CTRL_RX_ACT_EN 0x00000001 ++#define LED_CTRL_TX_ACT_EN 0x00000002 ++#define LED_CTRL_SPDLNK_LED0_ACT_SEL 0x00000004 ++#define LED_CTRL_SPDLNK_LED1_ACT_SEL 0x00000008 ++#define LED_CTRL_SPDLNK_LED2_ACT_SEL 0x00000010 ++#define LED_CTRL_ACT_LED_ACT_SEL 0x00000020 ++#define LED_CTRL_SPDLNK_LED0_ACT_POL_SEL 0x00000040 ++#define LED_CTRL_SPDLNK_LED1_ACT_POL_SEL 0x00000080 ++#define LED_CTRL_SPDLNK_LED2_ACT_POL_SEL 0x00000100 ++#define LED_CTRL_ACT_LED_POL_SEL 0x00000200 ++#define LED_CTRL_LED_SPD_OVRD 0x00001c00 ++#define LED_CTRL_LNK_STATUS_OVRD 0x00002000 ++#define LED_CTRL_SPD_OVRD_EN 0x00004000 ++#define LED_CTRL_LNK_OVRD_EN 0x00008000 ++ ++/* Register relative to REG_LED_*_CNTRL (BCM4908) */ ++#define REG_LED_LINK_SPEED_ENC_SEL 0x4 ++#define LED_LINK_SPEED_ENC_SEL_NO_LINK_SHIFT 0 ++#define LED_LINK_SPEED_ENC_SEL_10M_SHIFT 3 ++#define LED_LINK_SPEED_ENC_SEL_100M_SHIFT 6 ++#define LED_LINK_SPEED_ENC_SEL_1000M_SHIFT 9 ++#define LED_LINK_SPEED_ENC_SEL_2500M_SHIFT 12 ++#define LED_LINK_SPEED_ENC_SEL_10G_SHIFT 15 ++#define LED_LINK_SPEED_ENC_SEL_MASK 0x7 ++ ++/* Register relative to REG_LED_*_CNTRL (BCM4908) */ ++#define REG_LED_LINK_SPEED_ENC 0x8 ++#define LED_LINK_SPEED_ENC_NO_LINK_SHIFT 0 ++#define LED_LINK_SPEED_ENC_M10_SHIFT 3 ++#define LED_LINK_SPEED_ENC_M100_SHIFT 6 ++#define LED_LINK_SPEED_ENC_M1000_SHIFT 9 ++#define LED_LINK_SPEED_ENC_M2500_SHIFT 12 ++#define LED_LINK_SPEED_ENC_M10G_SHIFT 15 ++#define LED_LINK_SPEED_ENC_MASK 0x7 ++ + /* Relative to REG_RGMII_CNTRL */ + #define RGMII_MODE_EN (1 << 0) + #define ID_MODE_DIS (1 << 1) +@@ -73,10 +134,6 @@ enum bcm_sf2_reg_offs { + #define LPI_COUNT_SHIFT 9 + #define LPI_COUNT_MASK 0x3F + +-#define REG_LED_CNTRL(x) (REG_LED_0_CNTRL + (x)) +- +-#define SPDLNK_SRC_SEL (1 << 24) +- + /* Register set relative to 'INTRL2_0' and 'INTRL2_1' */ + #define INTRL2_CPU_STATUS 0x00 + #define INTRL2_CPU_SET 0x04 diff --git a/target/linux/bcm4908/patches-5.15/071-v6.1-0001-net-broadcom-bcm4908_enet-handle-EPROBE_DEFER-when-g.patch b/target/linux/bcm4908/patches-5.15/071-v6.1-0001-net-broadcom-bcm4908_enet-handle-EPROBE_DEFER-when-g.patch new file mode 100644 index 0000000000..1cf761838c --- /dev/null +++ b/target/linux/bcm4908/patches-5.15/071-v6.1-0001-net-broadcom-bcm4908_enet-handle-EPROBE_DEFER-when-g.patch @@ -0,0 +1,53 @@ +From e93a766da57fff3273bcb618edf5dfca1fb86b89 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= +Date: Thu, 15 Sep 2022 15:30:13 +0200 +Subject: [PATCH] net: broadcom: bcm4908_enet: handle -EPROBE_DEFER when + getting MAC +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Reading MAC from OF may return -EPROBE_DEFER if underlaying NVMEM device +isn't ready yet. In such case pass that error code up and "wait" to be +probed later. + +Signed-off-by: Rafał Miłecki +Link: https://lore.kernel.org/r/20220915133013.2243-1-zajec5@gmail.com +Signed-off-by: Jakub Kicinski +--- + drivers/net/ethernet/broadcom/bcm4908_enet.c | 13 +++++++++---- + 1 file changed, 9 insertions(+), 4 deletions(-) + +--- a/drivers/net/ethernet/broadcom/bcm4908_enet.c ++++ b/drivers/net/ethernet/broadcom/bcm4908_enet.c +@@ -720,6 +720,8 @@ static int bcm4908_enet_probe(struct pla + + SET_NETDEV_DEV(netdev, &pdev->dev); + err = of_get_mac_address(dev->of_node, netdev->dev_addr); ++ if (err == -EPROBE_DEFER) ++ goto err_dma_free; + if (err) + eth_hw_addr_random(netdev); + netdev->netdev_ops = &bcm4908_enet_netdev_ops; +@@ -730,14 +732,17 @@ static int bcm4908_enet_probe(struct pla + netif_napi_add(netdev, &enet->rx_ring.napi, bcm4908_enet_poll_rx, NAPI_POLL_WEIGHT); + + err = register_netdev(netdev); +- if (err) { +- bcm4908_enet_dma_free(enet); +- return err; +- } ++ if (err) ++ goto err_dma_free; + + platform_set_drvdata(pdev, enet); + + return 0; ++ ++err_dma_free: ++ bcm4908_enet_dma_free(enet); ++ ++ return err; + } + + static int bcm4908_enet_remove(struct platform_device *pdev) diff --git a/target/linux/bcm4908/patches-5.15/072-v6.2-0001-net-broadcom-bcm4908_enet-use-build_skb.patch b/target/linux/bcm4908/patches-5.15/072-v6.2-0001-net-broadcom-bcm4908_enet-use-build_skb.patch new file mode 100644 index 0000000000..1b4cc9e24c --- /dev/null +++ b/target/linux/bcm4908/patches-5.15/072-v6.2-0001-net-broadcom-bcm4908_enet-use-build_skb.patch @@ -0,0 +1,152 @@ +From 3a1cc23a75abcd9cea585eb84846507363d58397 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= +Date: Tue, 25 Oct 2022 15:22:45 +0200 +Subject: [PATCH] net: broadcom: bcm4908_enet: use build_skb() +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +RX code can be more efficient with the build_skb(). Allocating actual +SKB around eth packet buffer - right before passing it up - results in +a better cache usage. + +Without RPS (echo 0 > rps_cpus) BCM4908 NAT masq performance "jumps" +between two speeds: ~900 Mbps and 940 Mbps (it's a 4 CPUs SoC). This +change bumps the lower speed from 905 Mb/s to 918 Mb/s (tested using +single stream iperf 2.0.5 traffic). + +There are more optimizations to consider. One obvious to try is GRO +however as BCM4908 doesn't do hw csum is may actually lower performance. +Sometimes. Some early testing: + +┌─────────────────────────────────┬─────────────────────┬────────────────────┐ +│ │ netif_receive_skb() │ napi_gro_receive() │ +├─────────────────────────────────┼─────────────────────┼────────────────────┤ +│ netdev_alloc_skb() │ 905 Mb/s │ 892 Mb/s │ +│ napi_alloc_frag() + build_skb() │ 918 Mb/s │ 917 Mb/s │ +└─────────────────────────────────┴─────────────────────┴────────────────────┘ + +Another ideas: +1. napi_build_skb() +2. skb_copy_from_linear_data() for small packets + +Those need proper testing first though. That can be done later. + +Signed-off-by: Rafał Miłecki +Link: https://lore.kernel.org/r/20221025132245.22871-1-zajec5@gmail.com +Signed-off-by: Paolo Abeni +--- + drivers/net/ethernet/broadcom/bcm4908_enet.c | 53 +++++++++++++------- + 1 file changed, 36 insertions(+), 17 deletions(-) + +--- a/drivers/net/ethernet/broadcom/bcm4908_enet.c ++++ b/drivers/net/ethernet/broadcom/bcm4908_enet.c +@@ -36,13 +36,24 @@ + #define ENET_MAX_ETH_OVERHEAD (ETH_HLEN + BRCM_MAX_TAG_LEN + VLAN_HLEN + \ + ETH_FCS_LEN + 4) /* 32 */ + ++#define ENET_RX_SKB_BUF_SIZE (NET_SKB_PAD + NET_IP_ALIGN + \ ++ ETH_HLEN + BRCM_MAX_TAG_LEN + VLAN_HLEN + \ ++ ENET_MTU_MAX + ETH_FCS_LEN + 4) ++#define ENET_RX_SKB_BUF_ALLOC_SIZE (SKB_DATA_ALIGN(ENET_RX_SKB_BUF_SIZE) + \ ++ SKB_DATA_ALIGN(sizeof(struct skb_shared_info))) ++#define ENET_RX_BUF_DMA_OFFSET (NET_SKB_PAD + NET_IP_ALIGN) ++#define ENET_RX_BUF_DMA_SIZE (ENET_RX_SKB_BUF_SIZE - ENET_RX_BUF_DMA_OFFSET) ++ + struct bcm4908_enet_dma_ring_bd { + __le32 ctl; + __le32 addr; + } __packed; + + struct bcm4908_enet_dma_ring_slot { +- struct sk_buff *skb; ++ union { ++ void *buf; /* RX */ ++ struct sk_buff *skb; /* TX */ ++ }; + unsigned int len; + dma_addr_t dma_addr; + }; +@@ -260,22 +271,21 @@ static int bcm4908_enet_dma_alloc_rx_buf + u32 tmp; + int err; + +- slot->len = ENET_MTU_MAX + ENET_MAX_ETH_OVERHEAD; +- +- slot->skb = netdev_alloc_skb(enet->netdev, slot->len); +- if (!slot->skb) ++ slot->buf = napi_alloc_frag(ENET_RX_SKB_BUF_ALLOC_SIZE); ++ if (!slot->buf) + return -ENOMEM; + +- slot->dma_addr = dma_map_single(dev, slot->skb->data, slot->len, DMA_FROM_DEVICE); ++ slot->dma_addr = dma_map_single(dev, slot->buf + ENET_RX_BUF_DMA_OFFSET, ++ ENET_RX_BUF_DMA_SIZE, DMA_FROM_DEVICE); + err = dma_mapping_error(dev, slot->dma_addr); + if (err) { + dev_err(dev, "Failed to map DMA buffer: %d\n", err); +- kfree_skb(slot->skb); +- slot->skb = NULL; ++ skb_free_frag(slot->buf); ++ slot->buf = NULL; + return err; + } + +- tmp = slot->len << DMA_CTL_LEN_DESC_BUFLENGTH_SHIFT; ++ tmp = ENET_RX_BUF_DMA_SIZE << DMA_CTL_LEN_DESC_BUFLENGTH_SHIFT; + tmp |= DMA_CTL_STATUS_OWN; + if (idx == enet->rx_ring.length - 1) + tmp |= DMA_CTL_STATUS_WRAP; +@@ -315,11 +325,11 @@ static void bcm4908_enet_dma_uninit(stru + + for (i = rx_ring->length - 1; i >= 0; i--) { + slot = &rx_ring->slots[i]; +- if (!slot->skb) ++ if (!slot->buf) + continue; + dma_unmap_single(dev, slot->dma_addr, slot->len, DMA_FROM_DEVICE); +- kfree_skb(slot->skb); +- slot->skb = NULL; ++ skb_free_frag(slot->buf); ++ slot->buf = NULL; + } + } + +@@ -575,6 +585,7 @@ static int bcm4908_enet_poll_rx(struct n + while (handled < weight) { + struct bcm4908_enet_dma_ring_bd *buf_desc; + struct bcm4908_enet_dma_ring_slot slot; ++ struct sk_buff *skb; + u32 ctl; + int len; + int err; +@@ -598,16 +609,24 @@ static int bcm4908_enet_poll_rx(struct n + + if (len < ETH_ZLEN || + (ctl & (DMA_CTL_STATUS_SOP | DMA_CTL_STATUS_EOP)) != (DMA_CTL_STATUS_SOP | DMA_CTL_STATUS_EOP)) { +- kfree_skb(slot.skb); ++ skb_free_frag(slot.buf); + enet->netdev->stats.rx_dropped++; + break; + } + +- dma_unmap_single(dev, slot.dma_addr, slot.len, DMA_FROM_DEVICE); ++ dma_unmap_single(dev, slot.dma_addr, ENET_RX_BUF_DMA_SIZE, DMA_FROM_DEVICE); ++ ++ skb = build_skb(slot.buf, ENET_RX_SKB_BUF_ALLOC_SIZE); ++ if (unlikely(!skb)) { ++ skb_free_frag(slot.buf); ++ enet->netdev->stats.rx_dropped++; ++ break; ++ } ++ skb_reserve(skb, ENET_RX_BUF_DMA_OFFSET); ++ skb_put(skb, len - ETH_FCS_LEN); ++ skb->protocol = eth_type_trans(skb, enet->netdev); + +- skb_put(slot.skb, len - ETH_FCS_LEN); +- slot.skb->protocol = eth_type_trans(slot.skb, enet->netdev); +- netif_receive_skb(slot.skb); ++ netif_receive_skb(skb); + + enet->netdev->stats.rx_packets++; + enet->netdev->stats.rx_bytes += len; diff --git a/target/linux/bcm4908/patches-5.15/072-v6.2-0002-net-broadcom-bcm4908_enet-report-queued-and-transmit.patch b/target/linux/bcm4908/patches-5.15/072-v6.2-0002-net-broadcom-bcm4908_enet-report-queued-and-transmit.patch new file mode 100644 index 0000000000..fe85aefa7c --- /dev/null +++ b/target/linux/bcm4908/patches-5.15/072-v6.2-0002-net-broadcom-bcm4908_enet-report-queued-and-transmit.patch @@ -0,0 +1,45 @@ +From 471ef777ec79baadc5cd9773d08f95f49cf5e2b1 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= +Date: Mon, 31 Oct 2022 11:48:56 +0100 +Subject: [PATCH] net: broadcom: bcm4908_enet: report queued and transmitted + bytes +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +This allows BQL to operate avoiding buffer bloat and reducing latency. + +Signed-off-by: Rafał Miłecki +Link: https://lore.kernel.org/r/20221031104856.32388-1-zajec5@gmail.com +Signed-off-by: Jakub Kicinski +--- + drivers/net/ethernet/broadcom/bcm4908_enet.c | 4 ++++ + 1 file changed, 4 insertions(+) + +--- a/drivers/net/ethernet/broadcom/bcm4908_enet.c ++++ b/drivers/net/ethernet/broadcom/bcm4908_enet.c +@@ -505,6 +505,7 @@ static int bcm4908_enet_stop(struct net_ + netif_carrier_off(netdev); + napi_disable(&rx_ring->napi); + napi_disable(&tx_ring->napi); ++ netdev_reset_queue(netdev); + + bcm4908_enet_dma_rx_ring_disable(enet, &enet->rx_ring); + bcm4908_enet_dma_tx_ring_disable(enet, &enet->tx_ring); +@@ -564,6 +565,8 @@ static int bcm4908_enet_start_xmit(struc + if (ring->write_idx + 1 == ring->length - 1) + tmp |= DMA_CTL_STATUS_WRAP; + ++ netdev_sent_queue(enet->netdev, skb->len); ++ + buf_desc->addr = cpu_to_le32((uint32_t)slot->dma_addr); + buf_desc->ctl = cpu_to_le32(tmp); + +@@ -671,6 +674,7 @@ static int bcm4908_enet_poll_tx(struct n + tx_ring->read_idx = 0; + } + ++ netdev_completed_queue(enet->netdev, handled, bytes); + enet->netdev->stats.tx_packets += handled; + enet->netdev->stats.tx_bytes += bytes; + diff --git a/target/linux/bcm4908/patches-5.15/080-v5.18-0001-dt-bindings-pinctrl-Add-binding-for-BCM4908-pinctrl.patch b/target/linux/bcm4908/patches-5.15/080-v5.18-0001-dt-bindings-pinctrl-Add-binding-for-BCM4908-pinctrl.patch new file mode 100644 index 0000000000..946bc79b60 --- /dev/null +++ b/target/linux/bcm4908/patches-5.15/080-v5.18-0001-dt-bindings-pinctrl-Add-binding-for-BCM4908-pinctrl.patch @@ -0,0 +1,111 @@ +From 7b5730f0ff24b0d7d1cb660a482384a807618a46 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= +Date: Mon, 24 Jan 2022 11:22:42 +0100 +Subject: [PATCH] dt-bindings: pinctrl: Add binding for BCM4908 pinctrl +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +It's hardware block that is part of every SoC from BCM4908 family. + +Signed-off-by: Rafał Miłecki +Reviewed-by: Rob Herring +Link: https://lore.kernel.org/r/20220124102243.14912-1-zajec5@gmail.com +Signed-off-by: Linus Walleij +--- + .../pinctrl/brcm,bcm4908-pinctrl.yaml | 72 +++++++++++++++++++ + MAINTAINERS | 7 ++ + 2 files changed, 79 insertions(+) + create mode 100644 Documentation/devicetree/bindings/pinctrl/brcm,bcm4908-pinctrl.yaml + +--- /dev/null ++++ b/Documentation/devicetree/bindings/pinctrl/brcm,bcm4908-pinctrl.yaml +@@ -0,0 +1,72 @@ ++# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause ++%YAML 1.2 ++--- ++$id: http://devicetree.org/schemas/pinctrl/brcm,bcm4908-pinctrl.yaml# ++$schema: http://devicetree.org/meta-schemas/core.yaml# ++ ++title: Broadcom BCM4908 pin controller ++ ++maintainers: ++ - Rafał Miłecki ++ ++description: ++ Binding for pin controller present on BCM4908 family SoCs. ++ ++properties: ++ compatible: ++ const: brcm,bcm4908-pinctrl ++ ++ reg: ++ maxItems: 1 ++ ++patternProperties: ++ '-pins$': ++ type: object ++ $ref: pinmux-node.yaml# ++ ++ properties: ++ function: ++ enum: [ led_0, led_1, led_2, led_3, led_4, led_5, led_6, led_7, led_8, ++ led_9, led_10, led_11, led_12, led_13, led_14, led_15, led_16, ++ led_17, led_18, led_19, led_20, led_21, led_22, led_23, led_24, ++ led_25, led_26, led_27, led_28, led_29, led_30, led_31, ++ hs_uart, i2c, i2s, nand_ctrl, nand_data, emmc_ctrl, usb0_pwr, ++ usb1_pwr ] ++ ++ groups: ++ minItems: 1 ++ maxItems: 2 ++ items: ++ enum: [ led_0_grp_a, led_1_grp_a, led_2_grp_a, led_3_grp_a, ++ led_4_grp_a, led_5_grp_a, led_6_grp_a, led_7_grp_a, ++ led_8_grp_a, led_9_grp_a, led_10_grp_a, led_10_grp_b, ++ led_11_grp_a, led_11_grp_b, led_12_grp_a, led_12_grp_b, ++ led_13_grp_a, led_13_grp_b, led_14_grp_a, led_15_grp_a, ++ led_16_grp_a, led_17_grp_a, led_18_grp_a, led_19_grp_a, ++ led_20_grp_a, led_21_grp_a, led_22_grp_a, led_23_grp_a, ++ led_24_grp_a, led_25_grp_a, led_26_grp_a, led_27_grp_a, ++ led_28_grp_a, led_29_grp_a, led_30_grp_a, led_31_grp_a, ++ led_31_grp_b, hs_uart_grp, i2c_grp_a, i2c_grp_b, i2s_grp, ++ nand_ctrl_grp, nand_data_grp, emmc_ctrl_grp, usb0_pwr_grp, ++ usb1_pwr_grp ] ++ ++allOf: ++ - $ref: pinctrl.yaml# ++ ++required: ++ - compatible ++ - reg ++ ++unevaluatedProperties: false ++ ++examples: ++ - | ++ pinctrl@ff800560 { ++ compatible = "brcm,bcm4908-pinctrl"; ++ reg = <0xff800560 0x10>; ++ ++ led_0-a-pins { ++ function = "led_0"; ++ groups = "led_0_grp_a"; ++ }; ++ }; +--- a/MAINTAINERS ++++ b/MAINTAINERS +@@ -3572,6 +3572,13 @@ F: Documentation/devicetree/bindings/net + F: drivers/net/ethernet/broadcom/bcm4908_enet.* + F: drivers/net/ethernet/broadcom/unimac.h + ++BROADCOM BCM4908 PINMUX DRIVER ++M: Rafał Miłecki ++M: bcm-kernel-feedback-list@broadcom.com ++L: linux-gpio@vger.kernel.org ++S: Maintained ++F: Documentation/devicetree/bindings/pinctrl/brcm,bcm4908-pinctrl.yaml ++ + BROADCOM BCM5301X ARM ARCHITECTURE + M: Hauke Mehrtens + M: Rafał Miłecki diff --git a/target/linux/bcm4908/patches-5.15/080-v5.18-0002-pinctrl-bcm-add-driver-for-BCM4908-pinmux.patch b/target/linux/bcm4908/patches-5.15/080-v5.18-0002-pinctrl-bcm-add-driver-for-BCM4908-pinmux.patch new file mode 100644 index 0000000000..5bd380f67a --- /dev/null +++ b/target/linux/bcm4908/patches-5.15/080-v5.18-0002-pinctrl-bcm-add-driver-for-BCM4908-pinmux.patch @@ -0,0 +1,629 @@ +From f7e322d99f1180270fb4a3e1ae992b3116cfcf34 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= +Date: Mon, 24 Jan 2022 11:22:43 +0100 +Subject: [PATCH] pinctrl: bcm: add driver for BCM4908 pinmux +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +BCM4908 has its own pins layout so it needs a custom binding and a Linux +driver. + +Signed-off-by: Rafał Miłecki +Reviewed-by: Andy Shevchenko +Link: https://lore.kernel.org/r/20220124102243.14912-2-zajec5@gmail.com +Signed-off-by: Linus Walleij +--- + MAINTAINERS | 1 + + drivers/pinctrl/bcm/Kconfig | 14 + + drivers/pinctrl/bcm/Makefile | 1 + + drivers/pinctrl/bcm/pinctrl-bcm4908.c | 563 ++++++++++++++++++++++++++ + 4 files changed, 579 insertions(+) + create mode 100644 drivers/pinctrl/bcm/pinctrl-bcm4908.c + +--- a/MAINTAINERS ++++ b/MAINTAINERS +@@ -3578,6 +3578,7 @@ M: bcm-kernel-feedback-list@broadcom.com + L: linux-gpio@vger.kernel.org + S: Maintained + F: Documentation/devicetree/bindings/pinctrl/brcm,bcm4908-pinctrl.yaml ++F: drivers/pinctrl/bcm/pinctrl-bcm4908.c + + BROADCOM BCM5301X ARM ARCHITECTURE + M: Hauke Mehrtens +--- a/drivers/pinctrl/bcm/Kconfig ++++ b/drivers/pinctrl/bcm/Kconfig +@@ -29,6 +29,20 @@ config PINCTRL_BCM2835 + help + Say Y here to enable the Broadcom BCM2835 GPIO driver. + ++config PINCTRL_BCM4908 ++ tristate "Broadcom BCM4908 pinmux driver" ++ depends on OF && (ARCH_BCM4908 || COMPILE_TEST) ++ select PINMUX ++ select PINCONF ++ select GENERIC_PINCONF ++ select GENERIC_PINCTRL_GROUPS ++ select GENERIC_PINMUX_FUNCTIONS ++ default ARCH_BCM4908 ++ help ++ Driver for BCM4908 family SoCs with integrated pin controller. ++ ++ If compiled as module it will be called pinctrl-bcm4908. ++ + config PINCTRL_BCM63XX + bool + select PINMUX +--- a/drivers/pinctrl/bcm/Makefile ++++ b/drivers/pinctrl/bcm/Makefile +@@ -3,6 +3,7 @@ + + obj-$(CONFIG_PINCTRL_BCM281XX) += pinctrl-bcm281xx.o + obj-$(CONFIG_PINCTRL_BCM2835) += pinctrl-bcm2835.o ++obj-$(CONFIG_PINCTRL_BCM4908) += pinctrl-bcm4908.o + obj-$(CONFIG_PINCTRL_BCM63XX) += pinctrl-bcm63xx.o + obj-$(CONFIG_PINCTRL_BCM6318) += pinctrl-bcm6318.o + obj-$(CONFIG_PINCTRL_BCM6328) += pinctrl-bcm6328.o +--- /dev/null ++++ b/drivers/pinctrl/bcm/pinctrl-bcm4908.c +@@ -0,0 +1,560 @@ ++// SPDX-License-Identifier: GPL-2.0 ++/* Copyright (C) 2021 Rafał Miłecki */ ++ ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++ ++#include "../core.h" ++#include "../pinmux.h" ++ ++#define BCM4908_NUM_PINS 86 ++ ++#define BCM4908_TEST_PORT_BLOCK_EN_LSB 0x00 ++#define BCM4908_TEST_PORT_BLOCK_DATA_MSB 0x04 ++#define BCM4908_TEST_PORT_BLOCK_DATA_LSB 0x08 ++#define BCM4908_TEST_PORT_LSB_PINMUX_DATA_SHIFT 12 ++#define BCM4908_TEST_PORT_COMMAND 0x0c ++#define BCM4908_TEST_PORT_CMD_LOAD_MUX_REG 0x00000021 ++ ++struct bcm4908_pinctrl { ++ struct device *dev; ++ void __iomem *base; ++ struct mutex mutex; ++ struct pinctrl_dev *pctldev; ++ struct pinctrl_desc pctldesc; ++}; ++ ++/* ++ * Groups ++ */ ++ ++struct bcm4908_pinctrl_pin_setup { ++ unsigned int number; ++ unsigned int function; ++}; ++ ++static const struct bcm4908_pinctrl_pin_setup led_0_pins_a[] = { ++ { 0, 3 }, ++}; ++ ++static const struct bcm4908_pinctrl_pin_setup led_1_pins_a[] = { ++ { 1, 3 }, ++}; ++ ++static const struct bcm4908_pinctrl_pin_setup led_2_pins_a[] = { ++ { 2, 3 }, ++}; ++ ++static const struct bcm4908_pinctrl_pin_setup led_3_pins_a[] = { ++ { 3, 3 }, ++}; ++ ++static const struct bcm4908_pinctrl_pin_setup led_4_pins_a[] = { ++ { 4, 3 }, ++}; ++ ++static const struct bcm4908_pinctrl_pin_setup led_5_pins_a[] = { ++ { 5, 3 }, ++}; ++ ++static const struct bcm4908_pinctrl_pin_setup led_6_pins_a[] = { ++ { 6, 3 }, ++}; ++ ++static const struct bcm4908_pinctrl_pin_setup led_7_pins_a[] = { ++ { 7, 3 }, ++}; ++ ++static const struct bcm4908_pinctrl_pin_setup led_8_pins_a[] = { ++ { 8, 3 }, ++}; ++ ++static const struct bcm4908_pinctrl_pin_setup led_9_pins_a[] = { ++ { 9, 3 }, ++}; ++ ++static const struct bcm4908_pinctrl_pin_setup led_10_pins_a[] = { ++ { 10, 3 }, ++}; ++ ++static const struct bcm4908_pinctrl_pin_setup led_11_pins_a[] = { ++ { 11, 3 }, ++}; ++ ++static const struct bcm4908_pinctrl_pin_setup led_12_pins_a[] = { ++ { 12, 3 }, ++}; ++ ++static const struct bcm4908_pinctrl_pin_setup led_13_pins_a[] = { ++ { 13, 3 }, ++}; ++ ++static const struct bcm4908_pinctrl_pin_setup led_14_pins_a[] = { ++ { 14, 3 }, ++}; ++ ++static const struct bcm4908_pinctrl_pin_setup led_15_pins_a[] = { ++ { 15, 3 }, ++}; ++ ++static const struct bcm4908_pinctrl_pin_setup led_16_pins_a[] = { ++ { 16, 3 }, ++}; ++ ++static const struct bcm4908_pinctrl_pin_setup led_17_pins_a[] = { ++ { 17, 3 }, ++}; ++ ++static const struct bcm4908_pinctrl_pin_setup led_18_pins_a[] = { ++ { 18, 3 }, ++}; ++ ++static const struct bcm4908_pinctrl_pin_setup led_19_pins_a[] = { ++ { 19, 3 }, ++}; ++ ++static const struct bcm4908_pinctrl_pin_setup led_20_pins_a[] = { ++ { 20, 3 }, ++}; ++ ++static const struct bcm4908_pinctrl_pin_setup led_21_pins_a[] = { ++ { 21, 3 }, ++}; ++ ++static const struct bcm4908_pinctrl_pin_setup led_22_pins_a[] = { ++ { 22, 3 }, ++}; ++ ++static const struct bcm4908_pinctrl_pin_setup led_23_pins_a[] = { ++ { 23, 3 }, ++}; ++ ++static const struct bcm4908_pinctrl_pin_setup led_24_pins_a[] = { ++ { 24, 3 }, ++}; ++ ++static const struct bcm4908_pinctrl_pin_setup led_25_pins_a[] = { ++ { 25, 3 }, ++}; ++ ++static const struct bcm4908_pinctrl_pin_setup led_26_pins_a[] = { ++ { 26, 3 }, ++}; ++ ++static const struct bcm4908_pinctrl_pin_setup led_27_pins_a[] = { ++ { 27, 3 }, ++}; ++ ++static const struct bcm4908_pinctrl_pin_setup led_28_pins_a[] = { ++ { 28, 3 }, ++}; ++ ++static const struct bcm4908_pinctrl_pin_setup led_29_pins_a[] = { ++ { 29, 3 }, ++}; ++ ++static const struct bcm4908_pinctrl_pin_setup led_30_pins_a[] = { ++ { 30, 3 }, ++}; ++ ++static const struct bcm4908_pinctrl_pin_setup led_31_pins_a[] = { ++ { 31, 3 }, ++}; ++ ++static const struct bcm4908_pinctrl_pin_setup led_10_pins_b[] = { ++ { 8, 2 }, ++}; ++ ++static const struct bcm4908_pinctrl_pin_setup led_11_pins_b[] = { ++ { 9, 2 }, ++}; ++ ++static const struct bcm4908_pinctrl_pin_setup led_12_pins_b[] = { ++ { 0, 2 }, ++}; ++ ++static const struct bcm4908_pinctrl_pin_setup led_13_pins_b[] = { ++ { 1, 2 }, ++}; ++ ++static const struct bcm4908_pinctrl_pin_setup led_31_pins_b[] = { ++ { 30, 2 }, ++}; ++ ++static const struct bcm4908_pinctrl_pin_setup hs_uart_pins[] = { ++ { 10, 0 }, /* CTS */ ++ { 11, 0 }, /* RTS */ ++ { 12, 0 }, /* RXD */ ++ { 13, 0 }, /* TXD */ ++}; ++ ++static const struct bcm4908_pinctrl_pin_setup i2c_pins_a[] = { ++ { 18, 0 }, /* SDA */ ++ { 19, 0 }, /* SCL */ ++}; ++ ++static const struct bcm4908_pinctrl_pin_setup i2c_pins_b[] = { ++ { 22, 0 }, /* SDA */ ++ { 23, 0 }, /* SCL */ ++}; ++ ++static const struct bcm4908_pinctrl_pin_setup i2s_pins[] = { ++ { 27, 0 }, /* MCLK */ ++ { 28, 0 }, /* LRCK */ ++ { 29, 0 }, /* SDATA */ ++ { 30, 0 }, /* SCLK */ ++}; ++ ++static const struct bcm4908_pinctrl_pin_setup nand_ctrl_pins[] = { ++ { 32, 0 }, ++ { 33, 0 }, ++ { 34, 0 }, ++ { 43, 0 }, ++ { 44, 0 }, ++ { 45, 0 }, ++ { 56, 1 }, ++}; ++ ++static const struct bcm4908_pinctrl_pin_setup nand_data_pins[] = { ++ { 35, 0 }, ++ { 36, 0 }, ++ { 37, 0 }, ++ { 38, 0 }, ++ { 39, 0 }, ++ { 40, 0 }, ++ { 41, 0 }, ++ { 42, 0 }, ++}; ++ ++static const struct bcm4908_pinctrl_pin_setup emmc_ctrl_pins[] = { ++ { 46, 0 }, ++ { 47, 0 }, ++}; ++ ++static const struct bcm4908_pinctrl_pin_setup usb0_pwr_pins[] = { ++ { 63, 0 }, ++ { 64, 0 }, ++}; ++ ++static const struct bcm4908_pinctrl_pin_setup usb1_pwr_pins[] = { ++ { 66, 0 }, ++ { 67, 0 }, ++}; ++ ++struct bcm4908_pinctrl_grp { ++ const char *name; ++ const struct bcm4908_pinctrl_pin_setup *pins; ++ const unsigned int num_pins; ++}; ++ ++static const struct bcm4908_pinctrl_grp bcm4908_pinctrl_grps[] = { ++ { "led_0_grp_a", led_0_pins_a, ARRAY_SIZE(led_0_pins_a) }, ++ { "led_1_grp_a", led_1_pins_a, ARRAY_SIZE(led_1_pins_a) }, ++ { "led_2_grp_a", led_2_pins_a, ARRAY_SIZE(led_2_pins_a) }, ++ { "led_3_grp_a", led_3_pins_a, ARRAY_SIZE(led_3_pins_a) }, ++ { "led_4_grp_a", led_4_pins_a, ARRAY_SIZE(led_4_pins_a) }, ++ { "led_5_grp_a", led_5_pins_a, ARRAY_SIZE(led_5_pins_a) }, ++ { "led_6_grp_a", led_6_pins_a, ARRAY_SIZE(led_6_pins_a) }, ++ { "led_7_grp_a", led_7_pins_a, ARRAY_SIZE(led_7_pins_a) }, ++ { "led_8_grp_a", led_8_pins_a, ARRAY_SIZE(led_8_pins_a) }, ++ { "led_9_grp_a", led_9_pins_a, ARRAY_SIZE(led_9_pins_a) }, ++ { "led_10_grp_a", led_10_pins_a, ARRAY_SIZE(led_10_pins_a) }, ++ { "led_11_grp_a", led_11_pins_a, ARRAY_SIZE(led_11_pins_a) }, ++ { "led_12_grp_a", led_12_pins_a, ARRAY_SIZE(led_12_pins_a) }, ++ { "led_13_grp_a", led_13_pins_a, ARRAY_SIZE(led_13_pins_a) }, ++ { "led_14_grp_a", led_14_pins_a, ARRAY_SIZE(led_14_pins_a) }, ++ { "led_15_grp_a", led_15_pins_a, ARRAY_SIZE(led_15_pins_a) }, ++ { "led_16_grp_a", led_16_pins_a, ARRAY_SIZE(led_16_pins_a) }, ++ { "led_17_grp_a", led_17_pins_a, ARRAY_SIZE(led_17_pins_a) }, ++ { "led_18_grp_a", led_18_pins_a, ARRAY_SIZE(led_18_pins_a) }, ++ { "led_19_grp_a", led_19_pins_a, ARRAY_SIZE(led_19_pins_a) }, ++ { "led_20_grp_a", led_20_pins_a, ARRAY_SIZE(led_20_pins_a) }, ++ { "led_21_grp_a", led_21_pins_a, ARRAY_SIZE(led_21_pins_a) }, ++ { "led_22_grp_a", led_22_pins_a, ARRAY_SIZE(led_22_pins_a) }, ++ { "led_23_grp_a", led_23_pins_a, ARRAY_SIZE(led_23_pins_a) }, ++ { "led_24_grp_a", led_24_pins_a, ARRAY_SIZE(led_24_pins_a) }, ++ { "led_25_grp_a", led_25_pins_a, ARRAY_SIZE(led_25_pins_a) }, ++ { "led_26_grp_a", led_26_pins_a, ARRAY_SIZE(led_26_pins_a) }, ++ { "led_27_grp_a", led_27_pins_a, ARRAY_SIZE(led_27_pins_a) }, ++ { "led_28_grp_a", led_28_pins_a, ARRAY_SIZE(led_28_pins_a) }, ++ { "led_29_grp_a", led_29_pins_a, ARRAY_SIZE(led_29_pins_a) }, ++ { "led_30_grp_a", led_30_pins_a, ARRAY_SIZE(led_30_pins_a) }, ++ { "led_31_grp_a", led_31_pins_a, ARRAY_SIZE(led_31_pins_a) }, ++ { "led_10_grp_b", led_10_pins_b, ARRAY_SIZE(led_10_pins_b) }, ++ { "led_11_grp_b", led_11_pins_b, ARRAY_SIZE(led_11_pins_b) }, ++ { "led_12_grp_b", led_12_pins_b, ARRAY_SIZE(led_12_pins_b) }, ++ { "led_13_grp_b", led_13_pins_b, ARRAY_SIZE(led_13_pins_b) }, ++ { "led_31_grp_b", led_31_pins_b, ARRAY_SIZE(led_31_pins_b) }, ++ { "hs_uart_grp", hs_uart_pins, ARRAY_SIZE(hs_uart_pins) }, ++ { "i2c_grp_a", i2c_pins_a, ARRAY_SIZE(i2c_pins_a) }, ++ { "i2c_grp_b", i2c_pins_b, ARRAY_SIZE(i2c_pins_b) }, ++ { "i2s_grp", i2s_pins, ARRAY_SIZE(i2s_pins) }, ++ { "nand_ctrl_grp", nand_ctrl_pins, ARRAY_SIZE(nand_ctrl_pins) }, ++ { "nand_data_grp", nand_data_pins, ARRAY_SIZE(nand_data_pins) }, ++ { "emmc_ctrl_grp", emmc_ctrl_pins, ARRAY_SIZE(emmc_ctrl_pins) }, ++ { "usb0_pwr_grp", usb0_pwr_pins, ARRAY_SIZE(usb0_pwr_pins) }, ++ { "usb1_pwr_grp", usb1_pwr_pins, ARRAY_SIZE(usb1_pwr_pins) }, ++}; ++ ++/* ++ * Functions ++ */ ++ ++struct bcm4908_pinctrl_function { ++ const char *name; ++ const char * const *groups; ++ const unsigned int num_groups; ++}; ++ ++static const char * const led_0_groups[] = { "led_0_grp_a" }; ++static const char * const led_1_groups[] = { "led_1_grp_a" }; ++static const char * const led_2_groups[] = { "led_2_grp_a" }; ++static const char * const led_3_groups[] = { "led_3_grp_a" }; ++static const char * const led_4_groups[] = { "led_4_grp_a" }; ++static const char * const led_5_groups[] = { "led_5_grp_a" }; ++static const char * const led_6_groups[] = { "led_6_grp_a" }; ++static const char * const led_7_groups[] = { "led_7_grp_a" }; ++static const char * const led_8_groups[] = { "led_8_grp_a" }; ++static const char * const led_9_groups[] = { "led_9_grp_a" }; ++static const char * const led_10_groups[] = { "led_10_grp_a", "led_10_grp_b" }; ++static const char * const led_11_groups[] = { "led_11_grp_a", "led_11_grp_b" }; ++static const char * const led_12_groups[] = { "led_12_grp_a", "led_12_grp_b" }; ++static const char * const led_13_groups[] = { "led_13_grp_a", "led_13_grp_b" }; ++static const char * const led_14_groups[] = { "led_14_grp_a" }; ++static const char * const led_15_groups[] = { "led_15_grp_a" }; ++static const char * const led_16_groups[] = { "led_16_grp_a" }; ++static const char * const led_17_groups[] = { "led_17_grp_a" }; ++static const char * const led_18_groups[] = { "led_18_grp_a" }; ++static const char * const led_19_groups[] = { "led_19_grp_a" }; ++static const char * const led_20_groups[] = { "led_20_grp_a" }; ++static const char * const led_21_groups[] = { "led_21_grp_a" }; ++static const char * const led_22_groups[] = { "led_22_grp_a" }; ++static const char * const led_23_groups[] = { "led_23_grp_a" }; ++static const char * const led_24_groups[] = { "led_24_grp_a" }; ++static const char * const led_25_groups[] = { "led_25_grp_a" }; ++static const char * const led_26_groups[] = { "led_26_grp_a" }; ++static const char * const led_27_groups[] = { "led_27_grp_a" }; ++static const char * const led_28_groups[] = { "led_28_grp_a" }; ++static const char * const led_29_groups[] = { "led_29_grp_a" }; ++static const char * const led_30_groups[] = { "led_30_grp_a" }; ++static const char * const led_31_groups[] = { "led_31_grp_a", "led_31_grp_b" }; ++static const char * const hs_uart_groups[] = { "hs_uart_grp" }; ++static const char * const i2c_groups[] = { "i2c_grp_a", "i2c_grp_b" }; ++static const char * const i2s_groups[] = { "i2s_grp" }; ++static const char * const nand_ctrl_groups[] = { "nand_ctrl_grp" }; ++static const char * const nand_data_groups[] = { "nand_data_grp" }; ++static const char * const emmc_ctrl_groups[] = { "emmc_ctrl_grp" }; ++static const char * const usb0_pwr_groups[] = { "usb0_pwr_grp" }; ++static const char * const usb1_pwr_groups[] = { "usb1_pwr_grp" }; ++ ++static const struct bcm4908_pinctrl_function bcm4908_pinctrl_functions[] = { ++ { "led_0", led_0_groups, ARRAY_SIZE(led_0_groups) }, ++ { "led_1", led_1_groups, ARRAY_SIZE(led_1_groups) }, ++ { "led_2", led_2_groups, ARRAY_SIZE(led_2_groups) }, ++ { "led_3", led_3_groups, ARRAY_SIZE(led_3_groups) }, ++ { "led_4", led_4_groups, ARRAY_SIZE(led_4_groups) }, ++ { "led_5", led_5_groups, ARRAY_SIZE(led_5_groups) }, ++ { "led_6", led_6_groups, ARRAY_SIZE(led_6_groups) }, ++ { "led_7", led_7_groups, ARRAY_SIZE(led_7_groups) }, ++ { "led_8", led_8_groups, ARRAY_SIZE(led_8_groups) }, ++ { "led_9", led_9_groups, ARRAY_SIZE(led_9_groups) }, ++ { "led_10", led_10_groups, ARRAY_SIZE(led_10_groups) }, ++ { "led_11", led_11_groups, ARRAY_SIZE(led_11_groups) }, ++ { "led_12", led_12_groups, ARRAY_SIZE(led_12_groups) }, ++ { "led_13", led_13_groups, ARRAY_SIZE(led_13_groups) }, ++ { "led_14", led_14_groups, ARRAY_SIZE(led_14_groups) }, ++ { "led_15", led_15_groups, ARRAY_SIZE(led_15_groups) }, ++ { "led_16", led_16_groups, ARRAY_SIZE(led_16_groups) }, ++ { "led_17", led_17_groups, ARRAY_SIZE(led_17_groups) }, ++ { "led_18", led_18_groups, ARRAY_SIZE(led_18_groups) }, ++ { "led_19", led_19_groups, ARRAY_SIZE(led_19_groups) }, ++ { "led_20", led_20_groups, ARRAY_SIZE(led_20_groups) }, ++ { "led_21", led_21_groups, ARRAY_SIZE(led_21_groups) }, ++ { "led_22", led_22_groups, ARRAY_SIZE(led_22_groups) }, ++ { "led_23", led_23_groups, ARRAY_SIZE(led_23_groups) }, ++ { "led_24", led_24_groups, ARRAY_SIZE(led_24_groups) }, ++ { "led_25", led_25_groups, ARRAY_SIZE(led_25_groups) }, ++ { "led_26", led_26_groups, ARRAY_SIZE(led_26_groups) }, ++ { "led_27", led_27_groups, ARRAY_SIZE(led_27_groups) }, ++ { "led_28", led_28_groups, ARRAY_SIZE(led_28_groups) }, ++ { "led_29", led_29_groups, ARRAY_SIZE(led_29_groups) }, ++ { "led_30", led_30_groups, ARRAY_SIZE(led_30_groups) }, ++ { "led_31", led_31_groups, ARRAY_SIZE(led_31_groups) }, ++ { "hs_uart", hs_uart_groups, ARRAY_SIZE(hs_uart_groups) }, ++ { "i2c", i2c_groups, ARRAY_SIZE(i2c_groups) }, ++ { "i2s", i2s_groups, ARRAY_SIZE(i2s_groups) }, ++ { "nand_ctrl", nand_ctrl_groups, ARRAY_SIZE(nand_ctrl_groups) }, ++ { "nand_data", nand_data_groups, ARRAY_SIZE(nand_data_groups) }, ++ { "emmc_ctrl", emmc_ctrl_groups, ARRAY_SIZE(emmc_ctrl_groups) }, ++ { "usb0_pwr", usb0_pwr_groups, ARRAY_SIZE(usb0_pwr_groups) }, ++ { "usb1_pwr", usb1_pwr_groups, ARRAY_SIZE(usb1_pwr_groups) }, ++}; ++ ++/* ++ * Groups code ++ */ ++ ++static const struct pinctrl_ops bcm4908_pinctrl_ops = { ++ .get_groups_count = pinctrl_generic_get_group_count, ++ .get_group_name = pinctrl_generic_get_group_name, ++ .get_group_pins = pinctrl_generic_get_group_pins, ++ .dt_node_to_map = pinconf_generic_dt_node_to_map_group, ++ .dt_free_map = pinconf_generic_dt_free_map, ++}; ++ ++/* ++ * Functions code ++ */ ++ ++static int bcm4908_pinctrl_set_mux(struct pinctrl_dev *pctrl_dev, ++ unsigned int func_selector, ++ unsigned int group_selector) ++{ ++ struct bcm4908_pinctrl *bcm4908_pinctrl = pinctrl_dev_get_drvdata(pctrl_dev); ++ const struct bcm4908_pinctrl_grp *group; ++ struct group_desc *group_desc; ++ int i; ++ ++ group_desc = pinctrl_generic_get_group(pctrl_dev, group_selector); ++ if (!group_desc) ++ return -EINVAL; ++ group = group_desc->data; ++ ++ mutex_lock(&bcm4908_pinctrl->mutex); ++ for (i = 0; i < group->num_pins; i++) { ++ u32 lsb = 0; ++ ++ lsb |= group->pins[i].number; ++ lsb |= group->pins[i].function << BCM4908_TEST_PORT_LSB_PINMUX_DATA_SHIFT; ++ ++ writel(0x0, bcm4908_pinctrl->base + BCM4908_TEST_PORT_BLOCK_DATA_MSB); ++ writel(lsb, bcm4908_pinctrl->base + BCM4908_TEST_PORT_BLOCK_DATA_LSB); ++ writel(BCM4908_TEST_PORT_CMD_LOAD_MUX_REG, ++ bcm4908_pinctrl->base + BCM4908_TEST_PORT_COMMAND); ++ } ++ mutex_unlock(&bcm4908_pinctrl->mutex); ++ ++ return 0; ++} ++ ++static const struct pinmux_ops bcm4908_pinctrl_pmxops = { ++ .get_functions_count = pinmux_generic_get_function_count, ++ .get_function_name = pinmux_generic_get_function_name, ++ .get_function_groups = pinmux_generic_get_function_groups, ++ .set_mux = bcm4908_pinctrl_set_mux, ++}; ++ ++/* ++ * Controller code ++ */ ++ ++static struct pinctrl_desc bcm4908_pinctrl_desc = { ++ .name = "bcm4908-pinctrl", ++ .pctlops = &bcm4908_pinctrl_ops, ++ .pmxops = &bcm4908_pinctrl_pmxops, ++}; ++ ++static const struct of_device_id bcm4908_pinctrl_of_match_table[] = { ++ { .compatible = "brcm,bcm4908-pinctrl", }, ++ { } ++}; ++ ++static int bcm4908_pinctrl_probe(struct platform_device *pdev) ++{ ++ struct device *dev = &pdev->dev; ++ struct bcm4908_pinctrl *bcm4908_pinctrl; ++ struct pinctrl_desc *pctldesc; ++ struct pinctrl_pin_desc *pins; ++ int i; ++ ++ bcm4908_pinctrl = devm_kzalloc(dev, sizeof(*bcm4908_pinctrl), GFP_KERNEL); ++ if (!bcm4908_pinctrl) ++ return -ENOMEM; ++ pctldesc = &bcm4908_pinctrl->pctldesc; ++ platform_set_drvdata(pdev, bcm4908_pinctrl); ++ ++ /* Set basic properties */ ++ ++ bcm4908_pinctrl->dev = dev; ++ ++ bcm4908_pinctrl->base = devm_platform_ioremap_resource(pdev, 0); ++ if (IS_ERR(bcm4908_pinctrl->base)) ++ return PTR_ERR(bcm4908_pinctrl->base); ++ ++ mutex_init(&bcm4908_pinctrl->mutex); ++ ++ memcpy(pctldesc, &bcm4908_pinctrl_desc, sizeof(*pctldesc)); ++ ++ /* Set pinctrl properties */ ++ ++ pins = devm_kcalloc(dev, BCM4908_NUM_PINS, sizeof(*pins), GFP_KERNEL); ++ if (!pins) ++ return -ENOMEM; ++ for (i = 0; i < BCM4908_NUM_PINS; i++) { ++ pins[i].number = i; ++ pins[i].name = devm_kasprintf(dev, GFP_KERNEL, "pin-%d", i); ++ if (!pins[i].name) ++ return -ENOMEM; ++ } ++ pctldesc->pins = pins; ++ pctldesc->npins = BCM4908_NUM_PINS; ++ ++ /* Register */ ++ ++ bcm4908_pinctrl->pctldev = devm_pinctrl_register(dev, pctldesc, bcm4908_pinctrl); ++ if (IS_ERR(bcm4908_pinctrl->pctldev)) ++ return dev_err_probe(dev, PTR_ERR(bcm4908_pinctrl->pctldev), ++ "Failed to register pinctrl\n"); ++ ++ /* Groups */ ++ ++ for (i = 0; i < ARRAY_SIZE(bcm4908_pinctrl_grps); i++) { ++ const struct bcm4908_pinctrl_grp *group = &bcm4908_pinctrl_grps[i]; ++ int *pins; ++ int j; ++ ++ pins = devm_kcalloc(dev, group->num_pins, sizeof(*pins), GFP_KERNEL); ++ if (!pins) ++ return -ENOMEM; ++ for (j = 0; j < group->num_pins; j++) ++ pins[j] = group->pins[j].number; ++ ++ pinctrl_generic_add_group(bcm4908_pinctrl->pctldev, group->name, ++ pins, group->num_pins, (void *)group); ++ } ++ ++ /* Functions */ ++ ++ for (i = 0; i < ARRAY_SIZE(bcm4908_pinctrl_functions); i++) { ++ const struct bcm4908_pinctrl_function *function = &bcm4908_pinctrl_functions[i]; ++ ++ pinmux_generic_add_function(bcm4908_pinctrl->pctldev, ++ function->name, ++ function->groups, ++ function->num_groups, NULL); ++ } ++ ++ return 0; ++} ++ ++static struct platform_driver bcm4908_pinctrl_driver = { ++ .probe = bcm4908_pinctrl_probe, ++ .driver = { ++ .name = "bcm4908-pinctrl", ++ .of_match_table = bcm4908_pinctrl_of_match_table, ++ }, ++}; ++ ++module_platform_driver(bcm4908_pinctrl_driver); ++ ++MODULE_AUTHOR("Rafał Miłecki"); ++MODULE_LICENSE("GPL v2"); ++MODULE_DEVICE_TABLE(of, bcm4908_pinctrl_of_match_table); diff --git a/target/linux/bcm4908/patches-5.15/081-v5.18-0001-i2c-brcmstb-allow-compiling-on-BCM4908.patch b/target/linux/bcm4908/patches-5.15/081-v5.18-0001-i2c-brcmstb-allow-compiling-on-BCM4908.patch new file mode 100644 index 0000000000..246f249413 --- /dev/null +++ b/target/linux/bcm4908/patches-5.15/081-v5.18-0001-i2c-brcmstb-allow-compiling-on-BCM4908.patch @@ -0,0 +1,30 @@ +From d0aee048d648ec2d9aa7af43b127ebf847d497d5 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= +Date: Fri, 11 Feb 2022 11:58:06 +0100 +Subject: [PATCH] i2c: brcmstb: allow compiling on BCM4908 +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +BCM4908 SoCs use the same I2C hardware block as STB and BCM63xx devices. + +Signed-off-by: Rafał Miłecki +Acked-by: Florian Fainelli +Signed-off-by: Wolfram Sang +--- + drivers/i2c/busses/Kconfig | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +--- a/drivers/i2c/busses/Kconfig ++++ b/drivers/i2c/busses/Kconfig +@@ -477,8 +477,8 @@ config I2C_BCM_KONA + + config I2C_BRCMSTB + tristate "BRCM Settop/DSL I2C controller" +- depends on ARCH_BCM2835 || ARCH_BRCMSTB || BMIPS_GENERIC || \ +- ARCH_BCM_63XX || COMPILE_TEST ++ depends on ARCH_BCM2835 || ARCH_BCM4908 || ARCH_BCM_63XX || \ ++ ARCH_BRCMSTB || BMIPS_GENERIC || COMPILE_TEST + default y + help + If you say yes to this option, support will be included for the diff --git a/target/linux/bcm4908/patches-5.15/082-v5.18-watchdog-allow-building-BCM7038_WDT-for-BCM4908.patch b/target/linux/bcm4908/patches-5.15/082-v5.18-watchdog-allow-building-BCM7038_WDT-for-BCM4908.patch new file mode 100644 index 0000000000..0717436ffa --- /dev/null +++ b/target/linux/bcm4908/patches-5.15/082-v5.18-watchdog-allow-building-BCM7038_WDT-for-BCM4908.patch @@ -0,0 +1,32 @@ +From cd91fb2776967b2b2dea27307a3f23ba3d9bbb32 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= +Date: Wed, 9 Feb 2022 21:32:02 +0100 +Subject: [PATCH] watchdog: allow building BCM7038_WDT for BCM4908 +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +BCM4908 is a SoCs family that shares a lot of hardware with BCM63xx +including the watchdog block. Allow building this driver for it. + +Signed-off-by: Rafał Miłecki +Acked-by: Florian Fainelli +Reviewed-by: Guenter Roeck +Link: https://lore.kernel.org/r/20220209203202.26395-1-zajec5@gmail.com +Signed-off-by: Guenter Roeck +Signed-off-by: Wim Van Sebroeck +--- + drivers/watchdog/Kconfig | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/drivers/watchdog/Kconfig ++++ b/drivers/watchdog/Kconfig +@@ -1756,7 +1756,7 @@ config BCM7038_WDT + tristate "BCM7038 Watchdog" + select WATCHDOG_CORE + depends on HAS_IOMEM +- depends on ARCH_BRCMSTB || BMIPS_GENERIC || COMPILE_TEST ++ depends on ARCH_BCM4908 || ARCH_BRCMSTB || BMIPS_GENERIC || COMPILE_TEST + help + Watchdog driver for the built-in hardware in Broadcom 7038 and + later SoCs used in set-top boxes. BCM7038 was made public diff --git a/target/linux/bcm4908/patches-5.15/083-v5.20-watchdog-bcm7038_wdt-Support-BCM6345-compatible-stri.patch b/target/linux/bcm4908/patches-5.15/083-v5.20-watchdog-bcm7038_wdt-Support-BCM6345-compatible-stri.patch new file mode 100644 index 0000000000..14b6c61bac --- /dev/null +++ b/target/linux/bcm4908/patches-5.15/083-v5.20-watchdog-bcm7038_wdt-Support-BCM6345-compatible-stri.patch @@ -0,0 +1,34 @@ +From 2dd441f16d6ad6104d85c4e5dfeb6dde4df26869 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= +Date: Wed, 16 Feb 2022 07:34:08 +0100 +Subject: [PATCH] watchdog: bcm7038_wdt: Support BCM6345 compatible string +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +A new "compatible" value has been added in the commit 17fffe91ba36 +("dt-bindings: watchdog: Add BCM6345 compatible to BCM7038 binding"). +It's meant to be used for BCM63xx SoCs family but hardware block can be +programmed just like the 7038 one. + +Cc: Florian Fainelli +Signed-off-by: Rafał Miłecki +Acked-by: Florian Fainelli +Reviewed-by: Guenter Roeck +Link: https://lore.kernel.org/r/20220216063408.23168-1-zajec5@gmail.com +Signed-off-by: Guenter Roeck +Signed-off-by: Wim Van Sebroeck +--- + drivers/watchdog/bcm7038_wdt.c | 1 + + 1 file changed, 1 insertion(+) + +--- a/drivers/watchdog/bcm7038_wdt.c ++++ b/drivers/watchdog/bcm7038_wdt.c +@@ -212,6 +212,7 @@ static SIMPLE_DEV_PM_OPS(bcm7038_wdt_pm_ + bcm7038_wdt_resume); + + static const struct of_device_id bcm7038_wdt_match[] = { ++ { .compatible = "brcm,bcm6345-wdt" }, + { .compatible = "brcm,bcm7038-wdt" }, + {}, + }; diff --git a/target/linux/bcm4908/patches-5.15/300-arm64-dts-broadcom-bcmbca-bcm4908-limit-amount-of-GP.patch b/target/linux/bcm4908/patches-5.15/300-arm64-dts-broadcom-bcmbca-bcm4908-limit-amount-of-GP.patch new file mode 100644 index 0000000000..bc0743c800 --- /dev/null +++ b/target/linux/bcm4908/patches-5.15/300-arm64-dts-broadcom-bcmbca-bcm4908-limit-amount-of-GP.patch @@ -0,0 +1,23 @@ +From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= +Date: Mon, 15 Feb 2021 22:01:03 +0100 +Subject: [PATCH] arm64: dts: broadcom: bcmbca: bcm4908: limit amount of GPIOs +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Linux driver can't handle more than 64 GPIOs + +Signed-off-by: Rafał Miłecki +--- + +--- a/arch/arm64/boot/dts/broadcom/bcmbca/bcm4908.dtsi ++++ b/arch/arm64/boot/dts/broadcom/bcmbca/bcm4908.dtsi +@@ -297,7 +297,7 @@ + gpio0: gpio-controller@500 { + compatible = "brcm,bcm6345-gpio"; + reg-names = "dirout", "dat"; +- reg = <0x500 0x28>, <0x528 0x28>; ++ reg = <0x500 0x8>, <0x528 0x8>; + + #gpio-cells = <2>; + gpio-controller; diff --git a/target/linux/bcm4908/patches-5.15/400-mtd-rawnand-brcmnand-disable-WP-on-BCM4908.patch b/target/linux/bcm4908/patches-5.15/400-mtd-rawnand-brcmnand-disable-WP-on-BCM4908.patch new file mode 100644 index 0000000000..74dddb7f48 --- /dev/null +++ b/target/linux/bcm4908/patches-5.15/400-mtd-rawnand-brcmnand-disable-WP-on-BCM4908.patch @@ -0,0 +1,34 @@ +From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= +Date: Thu, 21 Jan 2021 10:44:53 +0100 +Subject: [PATCH] mtd: rawnand: brcmnand: disable WP on BCM4908 +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +BCM4908 contains NAND controller version 0x0701 (v7.1). It means that +NAND_WP should be available. + +For some reason setting #WP on doesn't result in clearing NAND_STATUS_WP +status bit: +[ 1.077857] bcm63138_nand ff801800.nand: timeout on status poll (expected c0000040 got c00000c0) +[ 1.086832] bcm63138_nand ff801800.nand: nand #WP expected on + +For now try working without touching #WP. + +Signed-off-by: Rafał Miłecki +--- + +--- a/drivers/mtd/nand/raw/brcmnand/brcmnand.c ++++ b/drivers/mtd/nand/raw/brcmnand/brcmnand.c +@@ -37,7 +37,11 @@ + * 1: NAND_WP is set by default, cleared for erase/write operations + * 2: NAND_WP is always cleared + */ ++#if IS_ENABLED(CONFIG_ARCH_BCM4908) ++static int wp_on = 0; ++#else + static int wp_on = 1; ++#endif + module_param(wp_on, int, 0444); + + /*********************************************************************** diff --git a/target/linux/bcm4908/patches-5.15/700-net-dsa-bcm_sf2-enable-GPHY-for-switch-probing.patch b/target/linux/bcm4908/patches-5.15/700-net-dsa-bcm_sf2-enable-GPHY-for-switch-probing.patch new file mode 100644 index 0000000000..af1c9bcefd --- /dev/null +++ b/target/linux/bcm4908/patches-5.15/700-net-dsa-bcm_sf2-enable-GPHY-for-switch-probing.patch @@ -0,0 +1,46 @@ +From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= +Date: Mon, 15 Feb 2021 23:59:26 +0100 +Subject: [PATCH] net: dsa: bcm_sf2: enable GPHY for switch probing +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +GPHY needs to be enabled to succesfully probe & setup switch port +connected to it. Otherwise hardcoding PHY OUI would be required. + +Before: +brcm-sf2 80080000.switch lan4 (uninitialized): PHY [800c05c0.mdio--1:08] driver [Generic PHY] (irq=POLL) +brcm-sf2 80080000.switch lan3 (uninitialized): PHY [800c05c0.mdio--1:09] driver [Generic PHY] (irq=POLL) +brcm-sf2 80080000.switch lan2 (uninitialized): PHY [800c05c0.mdio--1:0a] driver [Generic PHY] (irq=POLL) +brcm-sf2 80080000.switch lan1 (uninitialized): PHY [800c05c0.mdio--1:0b] driver [Generic PHY] (irq=POLL) +brcm-sf2 80080000.switch wan (uninitialized): error -5 setting up PHY for tree 0, switch 0, port 7 + +After: +brcm-sf2 80080000.switch lan4 (uninitialized): PHY [800c05c0.mdio--1:08] driver [Generic PHY] (irq=POLL) +brcm-sf2 80080000.switch lan3 (uninitialized): PHY [800c05c0.mdio--1:09] driver [Generic PHY] (irq=POLL) +brcm-sf2 80080000.switch lan2 (uninitialized): PHY [800c05c0.mdio--1:0a] driver [Generic PHY] (irq=POLL) +brcm-sf2 80080000.switch lan1 (uninitialized): PHY [800c05c0.mdio--1:0b] driver [Generic PHY] (irq=POLL) +brcm-sf2 80080000.switch wan (uninitialized): PHY [800c05c0.mdio--1:0c] driver [Generic PHY] (irq=POLL) + +Signed-off-by: Rafał Miłecki +--- + drivers/net/dsa/bcm_sf2.c | 4 ++++ + 1 file changed, 4 insertions(+) + +--- a/drivers/net/dsa/bcm_sf2.c ++++ b/drivers/net/dsa/bcm_sf2.c +@@ -1538,10 +1538,14 @@ static int bcm_sf2_sw_probe(struct platf + rev = reg_readl(priv, REG_PHY_REVISION); + priv->hw_params.gphy_rev = rev & PHY_REVISION_MASK; + ++ bcm_sf2_gphy_enable_set(priv->dev->ds, true); ++ + ret = b53_switch_register(dev); + if (ret) + goto out_mdio; + ++ bcm_sf2_gphy_enable_set(priv->dev->ds, false); ++ + dev_info(&pdev->dev, + "Starfighter 2 top: %x.%02x, core: %x.%02x, IRQs: %d, %d\n", + priv->hw_params.top_rev >> 8, priv->hw_params.top_rev & 0xff, diff --git a/target/linux/bcm4908/patches-5.15/701-net-dsa-bcm_sf2-keep-GPHY-enabled-on-the-BCM4908.patch b/target/linux/bcm4908/patches-5.15/701-net-dsa-bcm_sf2-keep-GPHY-enabled-on-the-BCM4908.patch new file mode 100644 index 0000000000..e78b4a47d7 --- /dev/null +++ b/target/linux/bcm4908/patches-5.15/701-net-dsa-bcm_sf2-keep-GPHY-enabled-on-the-BCM4908.patch @@ -0,0 +1,30 @@ +From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= +Date: Tue, 16 Feb 2021 00:06:35 +0100 +Subject: [PATCH] net: dsa: bcm_sf2: keep GPHY enabled on the BCM4908 + +Trying to access disabled PHY results in MDIO_READ_FAIL and: +[ 11.962886] brcm-sf2 80080000.switch wan: configuring for phy/internal link mode +[ 11.972500] 8021q: adding VLAN 0 to HW filter on device wan +[ 11.980205] ------------[ cut here ]------------ +[ 11.984885] WARNING: CPU: 0 PID: 7 at phy_error+0x10/0x58 + +Signed-off-by: Rafał Miłecki +--- + drivers/net/dsa/bcm_sf2.c | 6 ++++++ + 1 file changed, 6 insertions(+) + +--- a/drivers/net/dsa/bcm_sf2.c ++++ b/drivers/net/dsa/bcm_sf2.c +@@ -1552,6 +1552,12 @@ static int bcm_sf2_sw_probe(struct platf + priv->hw_params.core_rev >> 8, priv->hw_params.core_rev & 0xff, + priv->irq0, priv->irq1); + ++ /* BCM4908 has 5 GPHYs which means bcm_sf2_port_setup() will not enable ++ * GPHY when needed. Leave it enabled here. ++ */ ++ if (priv->type == BCM4908_DEVICE_ID) ++ bcm_sf2_gphy_enable_set(priv->dev->ds, true); ++ + return 0; + + out_mdio: From ce296b1aeb18b386bd99d25794f26b0233fe2101 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= Date: Fri, 11 Nov 2022 17:04:18 +0100 Subject: [PATCH 36/62] bcm4908: refresh kernel 5.15 config MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Rafał Miłecki --- target/linux/bcm4908/config-5.15 | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/target/linux/bcm4908/config-5.15 b/target/linux/bcm4908/config-5.15 index 2e8b3df71b..892985f7f4 100644 --- a/target/linux/bcm4908/config-5.15 +++ b/target/linux/bcm4908/config-5.15 @@ -3,19 +3,20 @@ CONFIG_ARCH_BCM4908=y CONFIG_ARCH_BCMBCA=y CONFIG_ARCH_DMA_ADDR_T_64BIT=y CONFIG_ARCH_KEEP_MEMBLOCK=y +CONFIG_ARCH_MHP_MEMMAP_ON_MEMORY_ENABLE=y CONFIG_ARCH_MMAP_RND_BITS=18 CONFIG_ARCH_MMAP_RND_BITS_MAX=24 CONFIG_ARCH_MMAP_RND_BITS_MIN=18 CONFIG_ARCH_MMAP_RND_COMPAT_BITS_MIN=11 CONFIG_ARCH_PROC_KCORE_TEXT=y -CONFIG_ARCH_SELECT_MEMORY_MODEL=y -CONFIG_ARCH_SPARSEMEM_DEFAULT=y CONFIG_ARCH_SPARSEMEM_ENABLE=y CONFIG_ARCH_STACKWALK=y CONFIG_ARCH_SUSPEND_POSSIBLE=y +CONFIG_ARCH_WANTS_NO_INSTR=y CONFIG_ARM64=y CONFIG_ARM64_4K_PAGES=y CONFIG_ARM64_CRYPTO=y +CONFIG_ARM64_LD_HAS_FIX_ERRATUM_843419=y CONFIG_ARM64_PAGE_SHIFT=12 CONFIG_ARM64_PA_BITS=48 CONFIG_ARM64_PA_BITS_48=y @@ -42,9 +43,9 @@ CONFIG_BCM_PMB=y # CONFIG_BLK_DEV_INITRD is not set CONFIG_BLK_PM=y CONFIG_CC_HAVE_STACKPROTECTOR_SYSREG=y -CONFIG_CLKDEV_LOOKUP=y CONFIG_CLONE_BACKWARDS=y CONFIG_CMDLINE="earlycon=bcm63xx_uart,0xff800640 console=ttyS0,115200" +CONFIG_CMDLINE_FROM_BOOTLOADER=y CONFIG_COMMON_CLK=y # CONFIG_COMPAT_32BIT_TIME is not set CONFIG_CPU_LITTLE_ENDIAN=y @@ -54,7 +55,6 @@ CONFIG_CRYPTO_AES_ARM64=y CONFIG_CRYPTO_AES_ARM64_CE=y CONFIG_CRYPTO_AES_ARM64_CE_BLK=y CONFIG_CRYPTO_AES_ARM64_CE_CCM=y -CONFIG_CRYPTO_BLAKE2S=y CONFIG_CRYPTO_CRYPTD=y CONFIG_CRYPTO_DEFLATE=y CONFIG_CRYPTO_GHASH_ARM64_CE=y @@ -72,6 +72,7 @@ CONFIG_EDAC_SUPPORT=y CONFIG_FIXED_PHY=y CONFIG_FIX_EARLYCON_MEM=y CONFIG_FRAME_POINTER=y +CONFIG_FWNODE_MDIO=y CONFIG_FW_LOADER_PAGED_BUF=y CONFIG_GENERIC_ALLOCATOR=y CONFIG_GENERIC_ARCH_TOPOLOGY=y @@ -83,12 +84,13 @@ CONFIG_GENERIC_CPU_AUTOPROBE=y CONFIG_GENERIC_CPU_VULNERABILITIES=y CONFIG_GENERIC_CSUM=y CONFIG_GENERIC_EARLY_IOREMAP=y +CONFIG_GENERIC_FIND_FIRST_BIT=y CONFIG_GENERIC_GETTIMEOFDAY=y CONFIG_GENERIC_IDLE_POLL_SETUP=y CONFIG_GENERIC_IRQ_EFFECTIVE_AFF_MASK=y -CONFIG_GENERIC_IRQ_MULTI_HANDLER=y CONFIG_GENERIC_IRQ_SHOW=y CONFIG_GENERIC_IRQ_SHOW_LEVEL=y +CONFIG_GENERIC_LIB_DEVMEM_IS_ALLOWED=y CONFIG_GENERIC_MSI_IRQ=y CONFIG_GENERIC_MSI_IRQ_DOMAIN=y CONFIG_GENERIC_PCI_IOMAP=y @@ -101,6 +103,7 @@ CONFIG_GENERIC_SMP_IDLE_THREAD=y CONFIG_GENERIC_STRNCPY_FROM_USER=y CONFIG_GENERIC_STRNLEN_USER=y CONFIG_GENERIC_TIME_VSYSCALL=y +CONFIG_GPIO_CDEV=y CONFIG_GPIO_GENERIC=y CONFIG_GPIO_GENERIC_PLATFORM=y CONFIG_GRO_CELLS=y @@ -108,7 +111,6 @@ CONFIG_HANDLE_DOMAIN_IRQ=y CONFIG_HARDIRQS_SW_RESEND=y CONFIG_HAS_DMA=y CONFIG_HAS_IOMEM=y -CONFIG_HOLES_IN_ZONE=y CONFIG_HZ_PERIODIC=y CONFIG_I2C=y CONFIG_I2C_BOARDINFO=y @@ -160,6 +162,7 @@ CONFIG_NET_DSA_TAG_BRCM_COMMON=y CONFIG_NET_DSA_TAG_BRCM_LEGACY=y CONFIG_NET_DSA_TAG_BRCM_PREPEND=y CONFIG_NET_FLOW_LIMIT=y +CONFIG_NET_SELFTESTS=y CONFIG_NET_SWITCHDEV=y CONFIG_NO_IOPORT_MAP=y CONFIG_NR_CPUS=4 @@ -174,7 +177,6 @@ CONFIG_OF_GPIO=y CONFIG_OF_IRQ=y CONFIG_OF_KOBJ=y CONFIG_OF_MDIO=y -CONFIG_OF_NET=y CONFIG_PADATA=y CONFIG_PARTITION_PERCPU=y CONFIG_PGTABLE_LEVELS=3 @@ -192,6 +194,7 @@ CONFIG_PM_GENERIC_DOMAINS_OF=y CONFIG_POWER_RESET=y CONFIG_POWER_RESET_SYSCON=y CONFIG_POWER_SUPPLY=y +CONFIG_PTP_1588_CLOCK_OPTIONAL=y CONFIG_QUEUED_RWLOCKS=y CONFIG_QUEUED_SPINLOCKS=y CONFIG_RATIONAL=y @@ -207,17 +210,21 @@ CONFIG_SERIAL_BCM63XX=y CONFIG_SERIAL_BCM63XX_CONSOLE=y CONFIG_SGL_ALLOC=y CONFIG_SMP=y +CONFIG_SOCK_RX_QUEUE_MAPPING=y +CONFIG_SPARSEMEM=y +CONFIG_SPARSEMEM_EXTREME=y +CONFIG_SPARSEMEM_VMEMMAP=y CONFIG_SPARSEMEM_VMEMMAP_ENABLE=y CONFIG_SPARSE_IRQ=y CONFIG_SRCU=y CONFIG_SWIOTLB=y CONFIG_SWPHY=y CONFIG_SYSCTL_EXCEPTION_TRACE=y -CONFIG_SYS_SUPPORTS_HUGETLBFS=y CONFIG_THREAD_INFO_IN_TASK=y CONFIG_TICK_CPU_ACCOUNTING=y CONFIG_TIMER_OF=y CONFIG_TIMER_PROBE=y +CONFIG_TRACE_IRQFLAGS_NMI_SUPPORT=y CONFIG_TREE_RCU=y CONFIG_TREE_SRCU=y CONFIG_UBIFS_FS=y From 2403428c75c25301996567cdde57e2230e14d766 Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Fri, 11 Nov 2022 20:03:45 +0100 Subject: [PATCH 37/62] mt76: update to the latest version 8cc34bdc9ef0 wifi: mt76: mt7921: set MT_DRV_AMSDU_OFFLOAD for USB/SDIO 2182de50a37c wifi: mt76: fix receiving LLC packets on mt7615/mt7915 269df4b01f27 wifi: mt76: fix rx checksum offload on mt7615/mt7915/mt7921 fa4ace8e3b58 ieee80211: add EHT 1K aggregation definitions 176df35e7e80 wifi: mt76: mt7915: improve accuracy of time_busy calculation 94b335fa88e1 wifi: mt76: mt7915: add ack signal support 3365c129f73c wifi: mt76: mt7915: enable use_cts_prot support ad9bd2ba361e wifi: mt76: mt7615: enable use_cts_prot support 68bdcccb0aa7 wifi: mt76: mt7915: fix reporting of TX AGGR histogram 242fece4323f wifi: mt76: mt7921: fix reporting of TX AGGR histogram 75003c69a9bd wifi: mt76: mt7615: rely on mt7615_phy in mt7615_mac_reset_counters 65c70a32f1cf wifi: mt76: move aggr_stats array in mt76_phy b1ddf8bec058 wifi: mt76: mt7915: rework mt7915_dma_reset() 1ad31c3f76f4 wifi: mt76: mt7915: enable full system reset support 6b0668de7a53 wifi: mt76: mt7915: add full system reset into debugfs a5e48378d2a6 wifi: mt76: mt7915: enable coredump support 1e9060420c92 wifi: mt76: mt7915: fix incorrect tx path number configuration 0263711ba362 wifi: mt76: mt7915: fix antenna selection with bad eeprom. 869815e5ef86 wifi: mt76: mt7915: Fix chainmask calculation on mt7915 DBDC fc410557b7e1 wifi: mt76: mt7915: Fix VHT beamforming capabilities with DBDC daa30a31cf70 wifi: mt76: mt7915: don't claim 160MHz support with mt7915 DBDC 80bcecdbc2ff wifi: mt76: connac: update nss calculation in txs 465219c1f56c wifi: mt76: do not run mt76u_status_worker if the device is not running c7db15903e5c wifi: mt76: connac: add mt76_connac_mcu_uni_set_chctx 7a2b1a13b1b0 wifi: mt76: mt7921: add chanctx parameter to mt76_connac_mcu_uni_add_bss signature dece6921e606 wifi: mt76: mt7921: add unified ROC cmd/event support d4da182389b6 wifi: mt76: mt7921: drop ieee80211_[start, stop]_queues in driver 0c3ef988d8dc wifi: mt76: connac: accept hw scan request at a time c477225fd10e mt7615: update cr4 firmware to 20190415154149 413a4bf39513 mt76: mt7915: fix unused-but-set variable f5034abea899 mt76: mt7915: fix format string a9ac73ed8275 wifi: mt76: mt7615: increase eeprom size for mt7663 4a27f23fc4f2 linux-firmware: update firmware for MT7921 WiFi device Signed-off-by: Felix Fietkau --- package/kernel/mt76/Makefile | 6 +++--- .../mt76/patches/100-aggregation-definitions.patch | 13 ------------- 2 files changed, 3 insertions(+), 16 deletions(-) delete mode 100644 package/kernel/mt76/patches/100-aggregation-definitions.patch diff --git a/package/kernel/mt76/Makefile b/package/kernel/mt76/Makefile index 5b71a91a3a..fca92f17e7 100644 --- a/package/kernel/mt76/Makefile +++ b/package/kernel/mt76/Makefile @@ -8,9 +8,9 @@ PKG_LICENSE_FILES:= PKG_SOURCE_URL:=https://github.com/openwrt/mt76 PKG_SOURCE_PROTO:=git -PKG_SOURCE_DATE:=2022-10-01 -PKG_SOURCE_VERSION:=72b87836d368685a093b927229209b61d8272541 -PKG_MIRROR_HASH:=ea4dfe93f7632d5063ac2ccf0f5a3698e2bfeadbbef45910381b5ef07e334cfc +PKG_SOURCE_DATE:=2022-11-11 +PKG_SOURCE_VERSION:=4a27f23fc4f22510db81513680666be7e72ccb61 +PKG_MIRROR_HASH:=2cb9a446c6df7d56efc8ace46227964b492bdc3cae6bdbcc2e03fdd1b836b5a6 PKG_MAINTAINER:=Felix Fietkau PKG_USE_NINJA:=0 diff --git a/package/kernel/mt76/patches/100-aggregation-definitions.patch b/package/kernel/mt76/patches/100-aggregation-definitions.patch deleted file mode 100644 index a88d57133f..0000000000 --- a/package/kernel/mt76/patches/100-aggregation-definitions.patch +++ /dev/null @@ -1,13 +0,0 @@ ---- a/mt7915/init.c -+++ b/mt7915/init.c -@@ -327,8 +327,8 @@ mt7915_init_wiphy(struct ieee80211_hw *h - struct mt7915_dev *dev = phy->dev; - - hw->queues = 4; -- hw->max_rx_aggregation_subframes = IEEE80211_MAX_AMPDU_BUF; -- hw->max_tx_aggregation_subframes = IEEE80211_MAX_AMPDU_BUF; -+ hw->max_rx_aggregation_subframes = IEEE80211_MAX_AMPDU_BUF_HE; -+ hw->max_tx_aggregation_subframes = IEEE80211_MAX_AMPDU_BUF_HE; - hw->netdev_features = NETIF_F_RXCSUM; - - hw->radiotap_timestamp.units_pos = From 797177ad85cbf92b5c1e270751eaca9eb4f34f30 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= Date: Sat, 12 Nov 2022 10:42:51 +0100 Subject: [PATCH 38/62] kernel: update U-Boot nvmem driver to v6.2 release version MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Backport queued patches that 1. Fix CRC32 calculation for redundant images 2. Fix CRC32 on big-endian 3. Fix parting images with Broadcom header Signed-off-by: Rafał Miłecki --- ...-fix-crc32_data_offset-on-redundant-.patch | 56 ++++++++++++++++ ...env-align-endianness-of-crc32-values.patch | 47 ++++++++++++++ ...boot-env-add-Broadcom-format-support.patch | 65 +++++++++++++++++++ ...-fix-crc32_data_offset-on-redundant-.patch | 56 ++++++++++++++++ ...env-align-endianness-of-crc32-values.patch | 47 ++++++++++++++ ...boot-env-add-Broadcom-format-support.patch | 65 +++++++++++++++++++ 6 files changed, 336 insertions(+) create mode 100644 target/linux/generic/backport-5.10/803-v6.2-0001-nvmem-u-boot-env-fix-crc32_data_offset-on-redundant-.patch create mode 100644 target/linux/generic/backport-5.10/803-v6.2-0002-nvmem-u-boot-env-align-endianness-of-crc32-values.patch create mode 100644 target/linux/generic/backport-5.10/803-v6.2-0003-nvmem-u-boot-env-add-Broadcom-format-support.patch create mode 100644 target/linux/generic/backport-5.15/804-v6.2-0001-nvmem-u-boot-env-fix-crc32_data_offset-on-redundant-.patch create mode 100644 target/linux/generic/backport-5.15/804-v6.2-0002-nvmem-u-boot-env-align-endianness-of-crc32-values.patch create mode 100644 target/linux/generic/backport-5.15/804-v6.2-0003-nvmem-u-boot-env-add-Broadcom-format-support.patch diff --git a/target/linux/generic/backport-5.10/803-v6.2-0001-nvmem-u-boot-env-fix-crc32_data_offset-on-redundant-.patch b/target/linux/generic/backport-5.10/803-v6.2-0001-nvmem-u-boot-env-fix-crc32_data_offset-on-redundant-.patch new file mode 100644 index 0000000000..69d5a1b845 --- /dev/null +++ b/target/linux/generic/backport-5.10/803-v6.2-0001-nvmem-u-boot-env-fix-crc32_data_offset-on-redundant-.patch @@ -0,0 +1,56 @@ +From 7a69ff9c9bde03a690ea783970f664782fc303d8 Mon Sep 17 00:00:00 2001 +From: Christian Lamparter +Date: Fri, 4 Nov 2022 17:52:03 +0100 +Subject: [PATCH] nvmem: u-boot-env: fix crc32_data_offset on redundant + u-boot-env + +The Western Digital MyBook Live (PowerPC 464/APM82181) +has a set of redundant u-boot-env. Loading up the driver +the following error: + +| u_boot_env: Invalid calculated CRC32: 0x4f8f2c86 (expected: 0x98b14514) +| u_boot_env: probe of partition@1e000 failed with error -22 + +Looking up the userspace libubootenv utilities source [0], +it looks like the "mark" or "flag" is not part of the +crc32 sum... which is unfortunate :( + +|static int libuboot_load(struct uboot_ctx *ctx) +|{ +|[...] +| if (ctx->redundant) { +| [...] +| offsetdata = offsetof(struct uboot_env_redund, data); +| [...] //-----^^ +| } +| usable_envsize = ctx->size - offsetdata; +| buf[0] = malloc(bufsize); +|[...] +| for (i = 0; i < copies; i++) { +| data = (uint8_t *)(buf[i] + offsetdata); +| uint32_t crc; +| +| ret = devread(ctx, i, buf[i]); +| [...] +| crc = *(uint32_t *)(buf[i] + offsetcrc); +| dev->crc = crc32(0, (uint8_t *)data, usable_envsize); +| + +[0] https://github.com/sbabic/libubootenv/blob/master/src/uboot_env.c#L951 +Fixes: d5542923f200 ("nvmem: add driver handling U-Boot environment variables") +Signed-off-by: Christian Lamparter +--- + drivers/nvmem/u-boot-env.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/drivers/nvmem/u-boot-env.c ++++ b/drivers/nvmem/u-boot-env.c +@@ -135,7 +135,7 @@ static int u_boot_env_parse(struct u_boo + break; + case U_BOOT_FORMAT_REDUNDANT: + crc32_offset = offsetof(struct u_boot_env_image_redundant, crc32); +- crc32_data_offset = offsetof(struct u_boot_env_image_redundant, mark); ++ crc32_data_offset = offsetof(struct u_boot_env_image_redundant, data); + data_offset = offsetof(struct u_boot_env_image_redundant, data); + break; + } diff --git a/target/linux/generic/backport-5.10/803-v6.2-0002-nvmem-u-boot-env-align-endianness-of-crc32-values.patch b/target/linux/generic/backport-5.10/803-v6.2-0002-nvmem-u-boot-env-align-endianness-of-crc32-values.patch new file mode 100644 index 0000000000..7d6723bb8e --- /dev/null +++ b/target/linux/generic/backport-5.10/803-v6.2-0002-nvmem-u-boot-env-align-endianness-of-crc32-values.patch @@ -0,0 +1,47 @@ +From 0e71cac033bb7689c4dfa2e6814191337ef770f5 Mon Sep 17 00:00:00 2001 +From: INAGAKI Hiroshi +Date: Thu, 13 Oct 2022 00:51:33 +0900 +Subject: [PATCH] nvmem: u-boot-env: align endianness of crc32 values +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +This patch fixes crc32 error on Big-Endianness system by conversion of +calculated crc32 value. + +Little-Endianness system: + + obtained crc32: Little +calculated crc32: Little + +Big-Endianness system: + + obtained crc32: Little +calculated crc32: Big + +log (APRESIA ApresiaLightGS120GT-SS, RTL8382M, Big-Endianness): + +[ 8.570000] u_boot_env 18001200.spi:flash@0:partitions:partition@c0000: Invalid calculated CRC32: 0x88cd6f09 (expected: 0x096fcd88) +[ 8.580000] u_boot_env: probe of 18001200.spi:flash@0:partitions:partition@c0000 failed with error -22 + +Fixes: f955dc1445069 ("nvmem: add driver handling U-Boot environment variables") + +Signed-off-by: INAGAKI Hiroshi +Acked-by: Rafał Miłecki +Tested-by: Christian Lamparter +Signed-off-by: Srinivas Kandagatla +--- + drivers/nvmem/u-boot-env.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/drivers/nvmem/u-boot-env.c ++++ b/drivers/nvmem/u-boot-env.c +@@ -143,7 +143,7 @@ static int u_boot_env_parse(struct u_boo + crc32_data_len = priv->mtd->size - crc32_data_offset; + data_len = priv->mtd->size - data_offset; + +- calc = crc32(~0, buf + crc32_data_offset, crc32_data_len) ^ ~0L; ++ calc = le32_to_cpu((__le32)crc32(~0, buf + crc32_data_offset, crc32_data_len) ^ ~0L); + if (calc != crc32) { + dev_err(dev, "Invalid calculated CRC32: 0x%08x (expected: 0x%08x)\n", calc, crc32); + err = -EINVAL; diff --git a/target/linux/generic/backport-5.10/803-v6.2-0003-nvmem-u-boot-env-add-Broadcom-format-support.patch b/target/linux/generic/backport-5.10/803-v6.2-0003-nvmem-u-boot-env-add-Broadcom-format-support.patch new file mode 100644 index 0000000000..429b24f0f3 --- /dev/null +++ b/target/linux/generic/backport-5.10/803-v6.2-0003-nvmem-u-boot-env-add-Broadcom-format-support.patch @@ -0,0 +1,65 @@ +From 5b4eaafbeac472fc19049152f18e88aecb2b2829 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= +Date: Mon, 17 Oct 2022 09:17:22 +0200 +Subject: [PATCH] nvmem: u-boot-env: add Broadcom format support +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Broadcom uses U-Boot for a lot of their bcmbca familiy chipsets. They +decided to store U-Boot environment data inside U-Boot partition and to +use a custom header (with "uEnv" magic and env data length). + +Add support for Broadcom's specific binding and their custom format. + +Ref: 6b0584c19d87 ("dt-bindings: nvmem: u-boot,env: add Broadcom's variant binding") +Signed-off-by: Rafał Miłecki +Signed-off-by: Srinivas Kandagatla +--- + drivers/nvmem/u-boot-env.c | 14 ++++++++++++++ + 1 file changed, 14 insertions(+) + +--- a/drivers/nvmem/u-boot-env.c ++++ b/drivers/nvmem/u-boot-env.c +@@ -16,6 +16,7 @@ + enum u_boot_env_format { + U_BOOT_FORMAT_SINGLE, + U_BOOT_FORMAT_REDUNDANT, ++ U_BOOT_FORMAT_BROADCOM, + }; + + struct u_boot_env { +@@ -40,6 +41,13 @@ struct u_boot_env_image_redundant { + uint8_t data[]; + } __packed; + ++struct u_boot_env_image_broadcom { ++ __le32 magic; ++ __le32 len; ++ __le32 crc32; ++ uint8_t data[0]; ++} __packed; ++ + static int u_boot_env_read(void *context, unsigned int offset, void *val, + size_t bytes) + { +@@ -138,6 +146,11 @@ static int u_boot_env_parse(struct u_boo + crc32_data_offset = offsetof(struct u_boot_env_image_redundant, data); + data_offset = offsetof(struct u_boot_env_image_redundant, data); + break; ++ case U_BOOT_FORMAT_BROADCOM: ++ crc32_offset = offsetof(struct u_boot_env_image_broadcom, crc32); ++ crc32_data_offset = offsetof(struct u_boot_env_image_broadcom, data); ++ data_offset = offsetof(struct u_boot_env_image_broadcom, data); ++ break; + } + crc32 = le32_to_cpu(*(__le32 *)(buf + crc32_offset)); + crc32_data_len = priv->mtd->size - crc32_data_offset; +@@ -202,6 +215,7 @@ static const struct of_device_id u_boot_ + { .compatible = "u-boot,env", .data = (void *)U_BOOT_FORMAT_SINGLE, }, + { .compatible = "u-boot,env-redundant-bool", .data = (void *)U_BOOT_FORMAT_REDUNDANT, }, + { .compatible = "u-boot,env-redundant-count", .data = (void *)U_BOOT_FORMAT_REDUNDANT, }, ++ { .compatible = "brcm,env", .data = (void *)U_BOOT_FORMAT_BROADCOM, }, + {}, + }; + diff --git a/target/linux/generic/backport-5.15/804-v6.2-0001-nvmem-u-boot-env-fix-crc32_data_offset-on-redundant-.patch b/target/linux/generic/backport-5.15/804-v6.2-0001-nvmem-u-boot-env-fix-crc32_data_offset-on-redundant-.patch new file mode 100644 index 0000000000..69d5a1b845 --- /dev/null +++ b/target/linux/generic/backport-5.15/804-v6.2-0001-nvmem-u-boot-env-fix-crc32_data_offset-on-redundant-.patch @@ -0,0 +1,56 @@ +From 7a69ff9c9bde03a690ea783970f664782fc303d8 Mon Sep 17 00:00:00 2001 +From: Christian Lamparter +Date: Fri, 4 Nov 2022 17:52:03 +0100 +Subject: [PATCH] nvmem: u-boot-env: fix crc32_data_offset on redundant + u-boot-env + +The Western Digital MyBook Live (PowerPC 464/APM82181) +has a set of redundant u-boot-env. Loading up the driver +the following error: + +| u_boot_env: Invalid calculated CRC32: 0x4f8f2c86 (expected: 0x98b14514) +| u_boot_env: probe of partition@1e000 failed with error -22 + +Looking up the userspace libubootenv utilities source [0], +it looks like the "mark" or "flag" is not part of the +crc32 sum... which is unfortunate :( + +|static int libuboot_load(struct uboot_ctx *ctx) +|{ +|[...] +| if (ctx->redundant) { +| [...] +| offsetdata = offsetof(struct uboot_env_redund, data); +| [...] //-----^^ +| } +| usable_envsize = ctx->size - offsetdata; +| buf[0] = malloc(bufsize); +|[...] +| for (i = 0; i < copies; i++) { +| data = (uint8_t *)(buf[i] + offsetdata); +| uint32_t crc; +| +| ret = devread(ctx, i, buf[i]); +| [...] +| crc = *(uint32_t *)(buf[i] + offsetcrc); +| dev->crc = crc32(0, (uint8_t *)data, usable_envsize); +| + +[0] https://github.com/sbabic/libubootenv/blob/master/src/uboot_env.c#L951 +Fixes: d5542923f200 ("nvmem: add driver handling U-Boot environment variables") +Signed-off-by: Christian Lamparter +--- + drivers/nvmem/u-boot-env.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/drivers/nvmem/u-boot-env.c ++++ b/drivers/nvmem/u-boot-env.c +@@ -135,7 +135,7 @@ static int u_boot_env_parse(struct u_boo + break; + case U_BOOT_FORMAT_REDUNDANT: + crc32_offset = offsetof(struct u_boot_env_image_redundant, crc32); +- crc32_data_offset = offsetof(struct u_boot_env_image_redundant, mark); ++ crc32_data_offset = offsetof(struct u_boot_env_image_redundant, data); + data_offset = offsetof(struct u_boot_env_image_redundant, data); + break; + } diff --git a/target/linux/generic/backport-5.15/804-v6.2-0002-nvmem-u-boot-env-align-endianness-of-crc32-values.patch b/target/linux/generic/backport-5.15/804-v6.2-0002-nvmem-u-boot-env-align-endianness-of-crc32-values.patch new file mode 100644 index 0000000000..7d6723bb8e --- /dev/null +++ b/target/linux/generic/backport-5.15/804-v6.2-0002-nvmem-u-boot-env-align-endianness-of-crc32-values.patch @@ -0,0 +1,47 @@ +From 0e71cac033bb7689c4dfa2e6814191337ef770f5 Mon Sep 17 00:00:00 2001 +From: INAGAKI Hiroshi +Date: Thu, 13 Oct 2022 00:51:33 +0900 +Subject: [PATCH] nvmem: u-boot-env: align endianness of crc32 values +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +This patch fixes crc32 error on Big-Endianness system by conversion of +calculated crc32 value. + +Little-Endianness system: + + obtained crc32: Little +calculated crc32: Little + +Big-Endianness system: + + obtained crc32: Little +calculated crc32: Big + +log (APRESIA ApresiaLightGS120GT-SS, RTL8382M, Big-Endianness): + +[ 8.570000] u_boot_env 18001200.spi:flash@0:partitions:partition@c0000: Invalid calculated CRC32: 0x88cd6f09 (expected: 0x096fcd88) +[ 8.580000] u_boot_env: probe of 18001200.spi:flash@0:partitions:partition@c0000 failed with error -22 + +Fixes: f955dc1445069 ("nvmem: add driver handling U-Boot environment variables") + +Signed-off-by: INAGAKI Hiroshi +Acked-by: Rafał Miłecki +Tested-by: Christian Lamparter +Signed-off-by: Srinivas Kandagatla +--- + drivers/nvmem/u-boot-env.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/drivers/nvmem/u-boot-env.c ++++ b/drivers/nvmem/u-boot-env.c +@@ -143,7 +143,7 @@ static int u_boot_env_parse(struct u_boo + crc32_data_len = priv->mtd->size - crc32_data_offset; + data_len = priv->mtd->size - data_offset; + +- calc = crc32(~0, buf + crc32_data_offset, crc32_data_len) ^ ~0L; ++ calc = le32_to_cpu((__le32)crc32(~0, buf + crc32_data_offset, crc32_data_len) ^ ~0L); + if (calc != crc32) { + dev_err(dev, "Invalid calculated CRC32: 0x%08x (expected: 0x%08x)\n", calc, crc32); + err = -EINVAL; diff --git a/target/linux/generic/backport-5.15/804-v6.2-0003-nvmem-u-boot-env-add-Broadcom-format-support.patch b/target/linux/generic/backport-5.15/804-v6.2-0003-nvmem-u-boot-env-add-Broadcom-format-support.patch new file mode 100644 index 0000000000..429b24f0f3 --- /dev/null +++ b/target/linux/generic/backport-5.15/804-v6.2-0003-nvmem-u-boot-env-add-Broadcom-format-support.patch @@ -0,0 +1,65 @@ +From 5b4eaafbeac472fc19049152f18e88aecb2b2829 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= +Date: Mon, 17 Oct 2022 09:17:22 +0200 +Subject: [PATCH] nvmem: u-boot-env: add Broadcom format support +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Broadcom uses U-Boot for a lot of their bcmbca familiy chipsets. They +decided to store U-Boot environment data inside U-Boot partition and to +use a custom header (with "uEnv" magic and env data length). + +Add support for Broadcom's specific binding and their custom format. + +Ref: 6b0584c19d87 ("dt-bindings: nvmem: u-boot,env: add Broadcom's variant binding") +Signed-off-by: Rafał Miłecki +Signed-off-by: Srinivas Kandagatla +--- + drivers/nvmem/u-boot-env.c | 14 ++++++++++++++ + 1 file changed, 14 insertions(+) + +--- a/drivers/nvmem/u-boot-env.c ++++ b/drivers/nvmem/u-boot-env.c +@@ -16,6 +16,7 @@ + enum u_boot_env_format { + U_BOOT_FORMAT_SINGLE, + U_BOOT_FORMAT_REDUNDANT, ++ U_BOOT_FORMAT_BROADCOM, + }; + + struct u_boot_env { +@@ -40,6 +41,13 @@ struct u_boot_env_image_redundant { + uint8_t data[]; + } __packed; + ++struct u_boot_env_image_broadcom { ++ __le32 magic; ++ __le32 len; ++ __le32 crc32; ++ uint8_t data[0]; ++} __packed; ++ + static int u_boot_env_read(void *context, unsigned int offset, void *val, + size_t bytes) + { +@@ -138,6 +146,11 @@ static int u_boot_env_parse(struct u_boo + crc32_data_offset = offsetof(struct u_boot_env_image_redundant, data); + data_offset = offsetof(struct u_boot_env_image_redundant, data); + break; ++ case U_BOOT_FORMAT_BROADCOM: ++ crc32_offset = offsetof(struct u_boot_env_image_broadcom, crc32); ++ crc32_data_offset = offsetof(struct u_boot_env_image_broadcom, data); ++ data_offset = offsetof(struct u_boot_env_image_broadcom, data); ++ break; + } + crc32 = le32_to_cpu(*(__le32 *)(buf + crc32_offset)); + crc32_data_len = priv->mtd->size - crc32_data_offset; +@@ -202,6 +215,7 @@ static const struct of_device_id u_boot_ + { .compatible = "u-boot,env", .data = (void *)U_BOOT_FORMAT_SINGLE, }, + { .compatible = "u-boot,env-redundant-bool", .data = (void *)U_BOOT_FORMAT_REDUNDANT, }, + { .compatible = "u-boot,env-redundant-count", .data = (void *)U_BOOT_FORMAT_REDUNDANT, }, ++ { .compatible = "brcm,env", .data = (void *)U_BOOT_FORMAT_BROADCOM, }, + {}, + }; + From 63d5a6decaeae2d224b378ec1a48c5c30435d8f0 Mon Sep 17 00:00:00 2001 From: Nick Hainke Date: Sat, 12 Nov 2022 10:02:37 +0100 Subject: [PATCH 39/62] linux-firmware: update to 20221109 Changes: 712460c linux-firmware: Update firmware file for Intel Bluetooth 9462 90d5f7e linux-firmware: Update firmware file for Intel Bluetooth 9462 48954ba linux-firmware: Update firmware file for Intel Bluetooth 9560 0e205fd linux-firmware: Update firmware file for Intel Bluetooth 9560 06b941e linux-firmware: Update firmware file for Intel Bluetooth AX201 ba958ff linux-firmware: Update firmware file for Intel Bluetooth AX201 02bdea2 linux-firmware: Update firmware file for Intel Bluetooth AX211 7044d46 linux-firmware: Update firmware file for Intel Bluetooth AX211 1b99bcd linux-firmware: Update firmware file for Intel Bluetooth AX210 4668ae9 linux-firmware: Update firmware file for Intel Bluetooth AX200 5bdfdba linux-firmware: Update firmware file for Intel Bluetooth AX201 b0f995c amdgpu: update DMCUB firmware for DCN 3.1.6 d991031 rtl_bt: Update RTL8822C BT UART firmware to 0xFFB8_ABD6 fd62f01 rtl_bt: Update RTL8822C BT USB firmware to 0xFFB8_ABD3 b15fc21 WHENCE: mrvl: prestera: Add WHENCE entries for newly updated 4.1 FW images bf5a337 mrvl: prestera: Update Marvell Prestera Switchdev FW to v4.1 4a733c2 iwlwifi: add new FWs from core74_pv-60 release 7d2bb50 qcom: drop split a530_zap firmware file 7d56713 qcom/vpu-1.0: drop split firmware in favour of the mbn file 1431496 qcom/venus-4.2: drop split firmware in favour of the mbn file cf95783 qcom/venus-4.2: replace split firmware with the mbn file 1fe6f49 qcom/venus-1.8: replace split firmware with the mbn file abc0302 linux-firmware: Add firmware for Cirrus CS35L41 on new ASUS Laptop 20d9516 iwlwifi: add new PNVM binaries from core74-44 release 06dbfbc iwlwifi: add new FWs from core69-81 release 05df8e6 qcom: update venus firmware files for VPU-2.0 cd6fcdb qcom: remove split SC7280 venus firmware images 1612706 qcom: update venus firmware file for v5.4 ad9fdba qcom: replace split SC7180 venus firmware images with symlink dae5d46 rtw89: 8852b: update fw to v0.27.32.1 a8e86ec rtlwifi: update firmware for rtl8192eu to v35.7 9aa8db1 rtlwifi: Add firmware v4.0 for RTL8188FU 8f86b5a i915: Add HuC 7.10.3 for DG2 48407ff cnm: update chips&media wave521c firmware. bd31846 brcm: add symlink for Pi Zero 2 W NVRAM file 771968c linux-firmware: Add firmware for Cirrus CS35L41 on ASUS Laptops 6f9620e linux-firmware: Add firmware for Cirrus CS35L41 on Lenovo Laptops 1d18cb9 linux-firmware: Add firmware for Cirrus CS35L41 on HP Laptops e497757 rtw89: 8852b: add initial fw v0.27.32.0 98b5577 iwlwifi: add new FWs from core72-129 release 604026c iwlwifi: update 9000-family firmwares to core72-129 Signed-off-by: Nick Hainke --- package/firmware/linux-firmware/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package/firmware/linux-firmware/Makefile b/package/firmware/linux-firmware/Makefile index 15120b6bc8..6c5ff542a1 100644 --- a/package/firmware/linux-firmware/Makefile +++ b/package/firmware/linux-firmware/Makefile @@ -8,12 +8,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=linux-firmware -PKG_VERSION:=20221012 +PKG_VERSION:=20221109 PKG_RELEASE:=1 PKG_SOURCE_URL:=@KERNEL/linux/kernel/firmware PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz -PKG_HASH:=e9d174af729511c8cccb60ec4e0b223b3c44b67d813b42d1ab9813acfa667fa5 +PKG_HASH:=c0ddffbbcf30f2e015bddd5c6d3ce1f13976b906aceabda4a57e3c41a3190701 PKG_MAINTAINER:=Felix Fietkau From 6830fb37cb3a03317f567f12a869ea91fcfa4a80 Mon Sep 17 00:00:00 2001 From: Nick Hainke Date: Thu, 10 Nov 2022 16:24:40 +0100 Subject: [PATCH 40/62] libnftnl: update to 1.2.4 Release Announcement: https://lore.kernel.org/netfilter-devel/Y20W+LT%2F+sq%2Fi2rz@salvia/T/#u Signed-off-by: Nick Hainke --- package/libs/libnftnl/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package/libs/libnftnl/Makefile b/package/libs/libnftnl/Makefile index d4b58c99c4..50ad11a2cf 100644 --- a/package/libs/libnftnl/Makefile +++ b/package/libs/libnftnl/Makefile @@ -9,12 +9,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=libnftnl PKG_CPE_ID:=cpe:/a:netfilter:libnftnl -PKG_VERSION:=1.2.3 +PKG_VERSION:=1.2.4 PKG_RELEASE:=$(AUTORELEASE) PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 PKG_SOURCE_URL:=https://netfilter.org/projects/$(PKG_NAME)/files -PKG_HASH:=e916ea9b79f9518560b9a187251a7c042442a9ecbce7f36be7908888605d0255 +PKG_HASH:=c0fe233be4cdfd703e7d5977ef8eb63fcbf1d0052b6044e1b23d47ca3562477f PKG_MAINTAINER:=Steven Barth PKG_LICENSE:=GPL-2.0-or-later From 4979d16fb198c02a6f28a215c8827f98726824df Mon Sep 17 00:00:00 2001 From: Chen Minqiang Date: Mon, 7 Nov 2022 16:20:15 +0800 Subject: [PATCH 41/62] dnsmasq: add support for filter-AAAA/A This add --filter-A and --filter-AAAA options, to remove IPv4 or IPv6 addresses from DNS answers. these options is supported since version 2.87. Co-authored-by: NueXini Signed-off-by: Chen Minqiang --- package/network/services/dnsmasq/files/dhcp.conf | 2 ++ package/network/services/dnsmasq/files/dnsmasq.init | 3 +++ 2 files changed, 5 insertions(+) diff --git a/package/network/services/dnsmasq/files/dhcp.conf b/package/network/services/dnsmasq/files/dhcp.conf index 8c42ef782e..4ddef172e6 100644 --- a/package/network/services/dnsmasq/files/dhcp.conf +++ b/package/network/services/dnsmasq/files/dhcp.conf @@ -21,6 +21,8 @@ config dnsmasq #list bogusnxdomain '64.94.110.11' option localservice 1 # disable to allow DNS requests from non-local subnets option ednspacket_max 1232 + option filter_aaaa 0 + option filter_a 0 config dhcp lan option interface lan diff --git a/package/network/services/dnsmasq/files/dnsmasq.init b/package/network/services/dnsmasq/files/dnsmasq.init index 386b47616e..21910f5fd1 100755 --- a/package/network/services/dnsmasq/files/dnsmasq.init +++ b/package/network/services/dnsmasq/files/dnsmasq.init @@ -960,6 +960,9 @@ dnsmasq_start() append_bool "$cfg" rapidcommit "--dhcp-rapid-commit" append_bool "$cfg" scriptarp "--script-arp" + append_bool "$cfg" filter_aaaa "--filter-AAAA" + append_bool "$cfg" filter_a "--filter-A" + append_parm "$cfg" logfacility "--log-facility" config_get logfacility "$cfg" "logfacility" append_parm "$cfg" cachesize "--cache-size" From bc67c27283e1d0fa468c7fac5de9e864238305c7 Mon Sep 17 00:00:00 2001 From: Quintin Hill Date: Sat, 22 Oct 2022 08:14:42 +0100 Subject: [PATCH 42/62] kernel: support for Realtek USB bluetooth devices USB adaptors with the RTL8761B chipset are cheap and readily available but so far support is missing in Openwrt. Enable the relevant kernel options and add a module to the kmod-bluetooth package. Increases size of kmod-bluetooth ipk from 279140 bytes to 285320 bytes on my ath79 build. Tested on a WNDR3700v4 with rtl8761bu firmware. Signed-off-by: Quintin Hill --- package/kernel/linux/modules/other.mk | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/package/kernel/linux/modules/other.mk b/package/kernel/linux/modules/other.mk index 46f5dea7ae..58dd2d6c25 100644 --- a/package/kernel/linux/modules/other.mk +++ b/package/kernel/linux/modules/other.mk @@ -41,7 +41,7 @@ define KernelPackage/bluetooth CONFIG_BT_HCIBTUSB \ CONFIG_BT_HCIBTUSB_BCM=n \ CONFIG_BT_HCIBTUSB_MTK=y \ - CONFIG_BT_HCIBTUSB_RTL=n \ + CONFIG_BT_HCIBTUSB_RTL=y \ CONFIG_BT_HCIUART \ CONFIG_BT_HCIUART_BCM=n \ CONFIG_BT_HCIUART_INTEL=n \ @@ -56,7 +56,8 @@ define KernelPackage/bluetooth $(LINUX_DIR)/net/bluetooth/hidp/hidp.ko \ $(LINUX_DIR)/drivers/bluetooth/hci_uart.ko \ $(LINUX_DIR)/drivers/bluetooth/btusb.ko \ - $(LINUX_DIR)/drivers/bluetooth/btintel.ko + $(LINUX_DIR)/drivers/bluetooth/btintel.ko \ + $(LINUX_DIR)/drivers/bluetooth/btrtl.ko AUTOLOAD:=$(call AutoProbe,bluetooth rfcomm bnep hidp hci_uart btusb) endef From 0bf512aa86678365aa2c7cd1dd1d6ae506ed7f62 Mon Sep 17 00:00:00 2001 From: Quintin Hill Date: Sat, 22 Oct 2022 08:15:57 +0100 Subject: [PATCH 43/62] linux-firmware: add rtl8761 bluetooth firmware Realtek bluetooth devices need firmware. Add packages for some of these. Tested on a WNDR3700v4 with rtl8761bu firmware. Signed-off-by: Quintin Hill --- package/firmware/linux-firmware/realtek.mk | 23 ++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/package/firmware/linux-firmware/realtek.mk b/package/firmware/linux-firmware/realtek.mk index e06c3a6369..6d9238b8a4 100644 --- a/package/firmware/linux-firmware/realtek.mk +++ b/package/firmware/linux-firmware/realtek.mk @@ -86,6 +86,29 @@ define Package/rtl8723bu-firmware/install endef $(eval $(call BuildPackage,rtl8723bu-firmware)) +Package/rtl8761a-firmware = $(call Package/firmware-default,RealTek RTL8761A firmware) +define Package/rtl8761a-firmware/install + $(INSTALL_DIR) $(1)/lib/firmware/rtl_bt + $(INSTALL_DATA) $(PKG_BUILD_DIR)/rtl_bt/rtl8761a_fw.bin $(1)/lib/firmware/rtl_bt +endef +$(eval $(call BuildPackage,rtl8761a-firmware)) + +Package/rtl8761b-firmware = $(call Package/firmware-default,RealTek RTL8761B firmware) +define Package/rtl8761b-firmware/install + $(INSTALL_DIR) $(1)/lib/firmware/rtl_bt + $(INSTALL_DATA) $(PKG_BUILD_DIR)/rtl_bt/rtl8761b_config.bin $(1)/lib/firmware/rtl_bt + $(INSTALL_DATA) $(PKG_BUILD_DIR)/rtl_bt/rtl8761b_fw.bin $(1)/lib/firmware/rtl_bt +endef +$(eval $(call BuildPackage,rtl8761b-firmware)) + +Package/rtl8761bu-firmware = $(call Package/firmware-default,RealTek RTL8761BU firmware) +define Package/rtl8761bu-firmware/install + $(INSTALL_DIR) $(1)/lib/firmware/rtl_bt + $(INSTALL_DATA) $(PKG_BUILD_DIR)/rtl_bt/rtl8761bu_config.bin $(1)/lib/firmware/rtl_bt + $(INSTALL_DATA) $(PKG_BUILD_DIR)/rtl_bt/rtl8761bu_fw.bin $(1)/lib/firmware/rtl_bt +endef +$(eval $(call BuildPackage,rtl8761bu-firmware)) + Package/rtl8821ae-firmware = $(call Package/firmware-default,RealTek RTL8821AE firmware) define Package/rtl8821ae-firmware/install $(INSTALL_DIR) $(1)/lib/firmware/rtlwifi From 5e6e45b7ff0fee964d52fd57eb89e1a63ef5d8be Mon Sep 17 00:00:00 2001 From: Quintin Hill Date: Sun, 23 Oct 2022 09:22:37 +0100 Subject: [PATCH 44/62] kernel: backport RTL8761B FW name change to v5.10 Make the firmware filenames referenced by the module consistent for v5.10 and v5.15 kernels. Backport two upstream patches a cleanup commit and the commit making the change, the former is required for the latter to apply cleanly. Signed-off-by: Quintin Hill --- ...Refine-the-ic_id_table-for-clearer-a.patch | 183 ++++++++++++++++++ ...ooth-btrtl-rename-USB-fw-for-RTL8761.patch | 39 ++++ 2 files changed, 222 insertions(+) create mode 100644 target/linux/generic/backport-5.10/883-v5.11-Bluetooth-btrtl-Refine-the-ic_id_table-for-clearer-a.patch create mode 100644 target/linux/generic/backport-5.10/884-v5.14-Bluetooth-btrtl-rename-USB-fw-for-RTL8761.patch diff --git a/target/linux/generic/backport-5.10/883-v5.11-Bluetooth-btrtl-Refine-the-ic_id_table-for-clearer-a.patch b/target/linux/generic/backport-5.10/883-v5.11-Bluetooth-btrtl-Refine-the-ic_id_table-for-clearer-a.patch new file mode 100644 index 0000000000..0975033d83 --- /dev/null +++ b/target/linux/generic/backport-5.10/883-v5.11-Bluetooth-btrtl-Refine-the-ic_id_table-for-clearer-a.patch @@ -0,0 +1,183 @@ +From 6f9ff24645f55ffae12ef717b4f221c3e7dfe115 Mon Sep 17 00:00:00 2001 +From: Max Chou +Date: Wed, 4 Nov 2020 20:04:14 +0800 +Subject: [PATCH] Bluetooth: btrtl: Refine the ic_id_table for clearer and more + regular + +Enhance the ic_id_table that it's able to maintain regularly. +To judge which chip should be initialized by LMP subversion, HCI revision, + HCI version and HCI bus which were given in the ic_id_table. +Also, refine the incorrect LMP subversion of ROM for RTL8723D and +RTL8723A. + +Suggested-by: Alex Lu +Signed-off-by: Max Chou +Signed-off-by: Marcel Holtmann +--- + drivers/bluetooth/btrtl.c | 65 ++++++++++++--------------------------- + 1 file changed, 19 insertions(+), 46 deletions(-) + +--- a/drivers/bluetooth/btrtl.c ++++ b/drivers/bluetooth/btrtl.c +@@ -18,10 +18,8 @@ + #define VERSION "0.1" + + #define RTL_EPATCH_SIGNATURE "Realtech" +-#define RTL_ROM_LMP_3499 0x3499 + #define RTL_ROM_LMP_8723A 0x1200 + #define RTL_ROM_LMP_8723B 0x8723 +-#define RTL_ROM_LMP_8723D 0x8873 + #define RTL_ROM_LMP_8821A 0x8821 + #define RTL_ROM_LMP_8761A 0x8761 + #define RTL_ROM_LMP_8822B 0x8822 +@@ -31,10 +29,13 @@ + #define IC_MATCH_FL_HCIREV (1 << 1) + #define IC_MATCH_FL_HCIVER (1 << 2) + #define IC_MATCH_FL_HCIBUS (1 << 3) +-#define IC_INFO(lmps, hcir) \ +- .match_flags = IC_MATCH_FL_LMPSUBV | IC_MATCH_FL_HCIREV, \ ++#define IC_INFO(lmps, hcir, hciv, bus) \ ++ .match_flags = IC_MATCH_FL_LMPSUBV | IC_MATCH_FL_HCIREV | \ ++ IC_MATCH_FL_HCIVER | IC_MATCH_FL_HCIBUS, \ + .lmp_subver = (lmps), \ +- .hci_rev = (hcir) ++ .hci_rev = (hcir), \ ++ .hci_ver = (hciv), \ ++ .hci_bus = (bus) + + struct id_table { + __u16 match_flags; +@@ -58,112 +59,85 @@ struct btrtl_device_info { + }; + + static const struct id_table ic_id_table[] = { +- { IC_MATCH_FL_LMPSUBV, RTL_ROM_LMP_8723A, 0x0, +- .config_needed = false, +- .has_rom_version = false, +- .fw_name = "rtl_bt/rtl8723a_fw.bin", +- .cfg_name = NULL }, +- +- { IC_MATCH_FL_LMPSUBV, RTL_ROM_LMP_3499, 0x0, ++ /* 8723A */ ++ { IC_INFO(RTL_ROM_LMP_8723A, 0xb, 0x6, HCI_USB), + .config_needed = false, + .has_rom_version = false, + .fw_name = "rtl_bt/rtl8723a_fw.bin", + .cfg_name = NULL }, + + /* 8723BS */ +- { .match_flags = IC_MATCH_FL_LMPSUBV | IC_MATCH_FL_HCIREV | +- IC_MATCH_FL_HCIVER | IC_MATCH_FL_HCIBUS, +- .lmp_subver = RTL_ROM_LMP_8723B, +- .hci_rev = 0xb, +- .hci_ver = 6, +- .hci_bus = HCI_UART, ++ { IC_INFO(RTL_ROM_LMP_8723B, 0xb, 0x6, HCI_UART), + .config_needed = true, + .has_rom_version = true, + .fw_name = "rtl_bt/rtl8723bs_fw.bin", + .cfg_name = "rtl_bt/rtl8723bs_config" }, + + /* 8723B */ +- { IC_INFO(RTL_ROM_LMP_8723B, 0xb), ++ { IC_INFO(RTL_ROM_LMP_8723B, 0xb, 0x6, HCI_USB), + .config_needed = false, + .has_rom_version = true, + .fw_name = "rtl_bt/rtl8723b_fw.bin", + .cfg_name = "rtl_bt/rtl8723b_config" }, + + /* 8723D */ +- { IC_INFO(RTL_ROM_LMP_8723B, 0xd), ++ { IC_INFO(RTL_ROM_LMP_8723B, 0xd, 0x8, HCI_USB), + .config_needed = true, + .has_rom_version = true, + .fw_name = "rtl_bt/rtl8723d_fw.bin", + .cfg_name = "rtl_bt/rtl8723d_config" }, + + /* 8723DS */ +- { .match_flags = IC_MATCH_FL_LMPSUBV | IC_MATCH_FL_HCIREV | +- IC_MATCH_FL_HCIVER | IC_MATCH_FL_HCIBUS, +- .lmp_subver = RTL_ROM_LMP_8723B, +- .hci_rev = 0xd, +- .hci_ver = 8, +- .hci_bus = HCI_UART, ++ { IC_INFO(RTL_ROM_LMP_8723B, 0xd, 0x8, HCI_UART), + .config_needed = true, + .has_rom_version = true, + .fw_name = "rtl_bt/rtl8723ds_fw.bin", + .cfg_name = "rtl_bt/rtl8723ds_config" }, + +- /* 8723DU */ +- { IC_INFO(RTL_ROM_LMP_8723D, 0x826C), +- .config_needed = true, +- .has_rom_version = true, +- .fw_name = "rtl_bt/rtl8723d_fw.bin", +- .cfg_name = "rtl_bt/rtl8723d_config" }, +- + /* 8821A */ +- { IC_INFO(RTL_ROM_LMP_8821A, 0xa), ++ { IC_INFO(RTL_ROM_LMP_8821A, 0xa, 0x6, HCI_USB), + .config_needed = false, + .has_rom_version = true, + .fw_name = "rtl_bt/rtl8821a_fw.bin", + .cfg_name = "rtl_bt/rtl8821a_config" }, + + /* 8821C */ +- { IC_INFO(RTL_ROM_LMP_8821A, 0xc), ++ { IC_INFO(RTL_ROM_LMP_8821A, 0xc, 0x8, HCI_USB), + .config_needed = false, + .has_rom_version = true, + .fw_name = "rtl_bt/rtl8821c_fw.bin", + .cfg_name = "rtl_bt/rtl8821c_config" }, + + /* 8761A */ +- { IC_INFO(RTL_ROM_LMP_8761A, 0xa), ++ { IC_INFO(RTL_ROM_LMP_8761A, 0xa, 0x6, HCI_USB), + .config_needed = false, + .has_rom_version = true, + .fw_name = "rtl_bt/rtl8761a_fw.bin", + .cfg_name = "rtl_bt/rtl8761a_config" }, + + /* 8761B */ +- { IC_INFO(RTL_ROM_LMP_8761A, 0xb), ++ { IC_INFO(RTL_ROM_LMP_8761A, 0xb, 0xa, HCI_USB), + .config_needed = false, + .has_rom_version = true, + .fw_name = "rtl_bt/rtl8761b_fw.bin", + .cfg_name = "rtl_bt/rtl8761b_config" }, + + /* 8822C with UART interface */ +- { .match_flags = IC_MATCH_FL_LMPSUBV | IC_MATCH_FL_HCIREV | +- IC_MATCH_FL_HCIBUS, +- .lmp_subver = RTL_ROM_LMP_8822B, +- .hci_rev = 0x000c, +- .hci_ver = 0x0a, +- .hci_bus = HCI_UART, ++ { IC_INFO(RTL_ROM_LMP_8822B, 0xc, 0xa, HCI_UART), + .config_needed = true, + .has_rom_version = true, + .fw_name = "rtl_bt/rtl8822cs_fw.bin", + .cfg_name = "rtl_bt/rtl8822cs_config" }, + + /* 8822C with USB interface */ +- { IC_INFO(RTL_ROM_LMP_8822B, 0xc), ++ { IC_INFO(RTL_ROM_LMP_8822B, 0xc, 0xa, HCI_USB), + .config_needed = false, + .has_rom_version = true, + .fw_name = "rtl_bt/rtl8822cu_fw.bin", + .cfg_name = "rtl_bt/rtl8822cu_config" }, + + /* 8822B */ +- { IC_INFO(RTL_ROM_LMP_8822B, 0xb), ++ { IC_INFO(RTL_ROM_LMP_8822B, 0xb, 0x7, HCI_USB), + .config_needed = true, + .has_rom_version = true, + .fw_name = "rtl_bt/rtl8822b_fw.bin", +@@ -654,7 +628,6 @@ int btrtl_download_firmware(struct hci_d + + switch (btrtl_dev->ic_info->lmp_subver) { + case RTL_ROM_LMP_8723A: +- case RTL_ROM_LMP_3499: + return btrtl_setup_rtl8723a(hdev, btrtl_dev); + case RTL_ROM_LMP_8723B: + case RTL_ROM_LMP_8821A: diff --git a/target/linux/generic/backport-5.10/884-v5.14-Bluetooth-btrtl-rename-USB-fw-for-RTL8761.patch b/target/linux/generic/backport-5.10/884-v5.14-Bluetooth-btrtl-rename-USB-fw-for-RTL8761.patch new file mode 100644 index 0000000000..5372ce874a --- /dev/null +++ b/target/linux/generic/backport-5.10/884-v5.14-Bluetooth-btrtl-rename-USB-fw-for-RTL8761.patch @@ -0,0 +1,39 @@ +From 9fd2e2949b43dea869f7fce0f8f51df44f635d59 Mon Sep 17 00:00:00 2001 +From: Joakim Tjernlund +Date: Fri, 28 May 2021 17:26:44 +0200 +Subject: [PATCH] Bluetooth: btrtl: rename USB fw for RTL8761 + +According Realteks own BT drivers firmware RTL8761B is for UART +and RTL8761BU is for USB. + +Change existing 8761B to UART and add an 8761BU entry for USB + +Signed-off-by: Joakim Tjernlund +Signed-off-by: Marcel Holtmann +--- + drivers/bluetooth/btrtl.c | 9 ++++++++- + 1 file changed, 8 insertions(+), 1 deletion(-) + +--- a/drivers/bluetooth/btrtl.c ++++ b/drivers/bluetooth/btrtl.c +@@ -116,12 +116,19 @@ static const struct id_table ic_id_table + .cfg_name = "rtl_bt/rtl8761a_config" }, + + /* 8761B */ +- { IC_INFO(RTL_ROM_LMP_8761A, 0xb, 0xa, HCI_USB), ++ { IC_INFO(RTL_ROM_LMP_8761A, 0xb, 0xa, HCI_UART), + .config_needed = false, + .has_rom_version = true, + .fw_name = "rtl_bt/rtl8761b_fw.bin", + .cfg_name = "rtl_bt/rtl8761b_config" }, + ++ /* 8761BU */ ++ { IC_INFO(RTL_ROM_LMP_8761A, 0xb, 0xa, HCI_USB), ++ .config_needed = false, ++ .has_rom_version = true, ++ .fw_name = "rtl_bt/rtl8761bu_fw.bin", ++ .cfg_name = "rtl_bt/rtl8761bu_config" }, ++ + /* 8822C with UART interface */ + { IC_INFO(RTL_ROM_LMP_8822B, 0xc, 0xa, HCI_UART), + .config_needed = true, From 4c3f664c2f4466b5a720f31fb74896d29db5d926 Mon Sep 17 00:00:00 2001 From: Quintin Hill Date: Tue, 1 Nov 2022 22:41:18 +0000 Subject: [PATCH 45/62] kernel: backport some Bluetooth RTL8761 USB IDs These USB IDs appear in the 5.15 stable kernel series but not the 5.10 stable series. Signed-off-by: Quintin Hill --- ...Add-0x0b05-0x190e-Realtek-8761BU-ASU.patch | 54 ++++++++++++++++++ ...Add-support-for-TP-Link-UB500-Adapte.patch | 57 +++++++++++++++++++ ...oth-btusb-Add-another-Realtek-8761BU.patch | 55 ++++++++++++++++++ 3 files changed, 166 insertions(+) create mode 100644 target/linux/generic/backport-5.10/885-v5.14-Bluetooth-btusb-Add-0x0b05-0x190e-Realtek-8761BU-ASU.patch create mode 100644 target/linux/generic/backport-5.10/886-v5.16-Bluetooth-btusb-Add-support-for-TP-Link-UB500-Adapte.patch create mode 100644 target/linux/generic/backport-5.10/887-v5.18-Bluetooth-btusb-Add-another-Realtek-8761BU.patch diff --git a/target/linux/generic/backport-5.10/885-v5.14-Bluetooth-btusb-Add-0x0b05-0x190e-Realtek-8761BU-ASU.patch b/target/linux/generic/backport-5.10/885-v5.14-Bluetooth-btusb-Add-0x0b05-0x190e-Realtek-8761BU-ASU.patch new file mode 100644 index 0000000000..f5e5a7ffa4 --- /dev/null +++ b/target/linux/generic/backport-5.10/885-v5.14-Bluetooth-btusb-Add-0x0b05-0x190e-Realtek-8761BU-ASU.patch @@ -0,0 +1,54 @@ +From 33404381c5e875cbd57eec6d9bbacd3b13b404c9 Mon Sep 17 00:00:00 2001 +From: Joakim Tjernlund +Date: Fri, 28 May 2021 17:26:45 +0200 +Subject: [PATCH] Bluetooth: btusb: Add 0x0b05:0x190e Realtek 8761BU (ASUS + BT500) device. + +T: Bus=01 Lev=01 Prnt=01 Port=08 Cnt=04 Dev#= 18 Spd=12 MxCh= 0 +D: Ver= 1.10 Cls=e0(wlcon) Sub=01 Prot=01 MxPS=64 #Cfgs= 1 +P: Vendor=0b05 ProdID=190e Rev= 2.00 +S: Manufacturer=Realtek +S: Product=ASUS USB-BT500 +S: SerialNumber=xxxxxxxx +C:* #Ifs= 2 Cfg#= 1 Atr=e0 MxPwr=500mA +I:* If#= 0 Alt= 0 #EPs= 3 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb +E: Ad=81(I) Atr=03(Int.) MxPS= 16 Ivl=1ms +E: Ad=02(O) Atr=02(Bulk) MxPS= 64 Ivl=0ms +E: Ad=82(I) Atr=02(Bulk) MxPS= 64 Ivl=0ms +I:* If#= 1 Alt= 0 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb +E: Ad=03(O) Atr=01(Isoc) MxPS= 0 Ivl=1ms +E: Ad=83(I) Atr=01(Isoc) MxPS= 0 Ivl=1ms +I: If#= 1 Alt= 1 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb +E: Ad=03(O) Atr=01(Isoc) MxPS= 9 Ivl=1ms +E: Ad=83(I) Atr=01(Isoc) MxPS= 9 Ivl=1ms +I: If#= 1 Alt= 2 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb +E: Ad=03(O) Atr=01(Isoc) MxPS= 17 Ivl=1ms +E: Ad=83(I) Atr=01(Isoc) MxPS= 17 Ivl=1ms +I: If#= 1 Alt= 3 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb +E: Ad=03(O) Atr=01(Isoc) MxPS= 25 Ivl=1ms +E: Ad=83(I) Atr=01(Isoc) MxPS= 25 Ivl=1ms +I: If#= 1 Alt= 4 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb +E: Ad=03(O) Atr=01(Isoc) MxPS= 33 Ivl=1ms +E: Ad=83(I) Atr=01(Isoc) MxPS= 33 Ivl=1ms +I: If#= 1 Alt= 5 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb +E: Ad=03(O) Atr=01(Isoc) MxPS= 49 Ivl=1ms +E: Ad=83(I) Atr=01(Isoc) MxPS= 49 Ivl=1ms +Signed-off-by: Joakim Tjernlund +Signed-off-by: Marcel Holtmann +--- + drivers/bluetooth/btusb.c | 4 ++++ + 1 file changed, 4 insertions(+) + +--- a/drivers/bluetooth/btusb.c ++++ b/drivers/bluetooth/btusb.c +@@ -451,6 +451,10 @@ static const struct usb_device_id blackl + { USB_DEVICE(0x0bda, 0xb009), .driver_info = BTUSB_REALTEK }, + { USB_DEVICE(0x2ff8, 0xb011), .driver_info = BTUSB_REALTEK }, + ++ /* Additional Realtek 8761BU Bluetooth devices */ ++ { USB_DEVICE(0x0b05, 0x190e), .driver_info = BTUSB_REALTEK | ++ BTUSB_WIDEBAND_SPEECH }, ++ + /* Additional Realtek 8821AE Bluetooth devices */ + { USB_DEVICE(0x0b05, 0x17dc), .driver_info = BTUSB_REALTEK }, + { USB_DEVICE(0x13d3, 0x3414), .driver_info = BTUSB_REALTEK }, diff --git a/target/linux/generic/backport-5.10/886-v5.16-Bluetooth-btusb-Add-support-for-TP-Link-UB500-Adapte.patch b/target/linux/generic/backport-5.10/886-v5.16-Bluetooth-btusb-Add-support-for-TP-Link-UB500-Adapte.patch new file mode 100644 index 0000000000..e6826f63b1 --- /dev/null +++ b/target/linux/generic/backport-5.10/886-v5.16-Bluetooth-btusb-Add-support-for-TP-Link-UB500-Adapte.patch @@ -0,0 +1,57 @@ +From 4fd6d490796171bf786090fee782e252186632e4 Mon Sep 17 00:00:00 2001 +From: Nicholas Flintham +Date: Thu, 30 Sep 2021 09:22:39 +0100 +Subject: [PATCH] Bluetooth: btusb: Add support for TP-Link UB500 Adapter + +Add support for TP-Link UB500 Adapter (RTL8761B) + +* /sys/kernel/debug/usb/devices +T: Bus=01 Lev=02 Prnt=05 Port=01 Cnt=01 Dev#= 78 Spd=12 MxCh= 0 +D: Ver= 1.10 Cls=e0(wlcon) Sub=01 Prot=01 MxPS=64 #Cfgs= 1 +P: Vendor=2357 ProdID=0604 Rev= 2.00 +S: Manufacturer= +S: Product=TP-Link UB500 Adapter +S: SerialNumber=E848B8C82000 +C:* #Ifs= 2 Cfg#= 1 Atr=e0 MxPwr=500mA +I:* If#= 0 Alt= 0 #EPs= 3 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb +E: Ad=81(I) Atr=03(Int.) MxPS= 16 Ivl=1ms +E: Ad=02(O) Atr=02(Bulk) MxPS= 64 Ivl=0ms +E: Ad=82(I) Atr=02(Bulk) MxPS= 64 Ivl=0ms +I:* If#= 1 Alt= 0 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb +E: Ad=03(O) Atr=01(Isoc) MxPS= 0 Ivl=1ms +E: Ad=83(I) Atr=01(Isoc) MxPS= 0 Ivl=1ms +I: If#= 1 Alt= 1 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb +E: Ad=03(O) Atr=01(Isoc) MxPS= 9 Ivl=1ms +E: Ad=83(I) Atr=01(Isoc) MxPS= 9 Ivl=1ms +I: If#= 1 Alt= 2 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb +E: Ad=03(O) Atr=01(Isoc) MxPS= 17 Ivl=1ms +E: Ad=83(I) Atr=01(Isoc) MxPS= 17 Ivl=1ms +I: If#= 1 Alt= 3 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb +E: Ad=03(O) Atr=01(Isoc) MxPS= 25 Ivl=1ms +E: Ad=83(I) Atr=01(Isoc) MxPS= 25 Ivl=1ms +I: If#= 1 Alt= 4 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb +E: Ad=03(O) Atr=01(Isoc) MxPS= 33 Ivl=1ms +E: Ad=83(I) Atr=01(Isoc) MxPS= 33 Ivl=1ms +I: If#= 1 Alt= 5 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb +E: Ad=03(O) Atr=01(Isoc) MxPS= 49 Ivl=1ms +E: Ad=83(I) Atr=01(Isoc) MxPS= 49 Ivl=1ms + +Signed-off-by: Nicholas Flintham +Signed-off-by: Marcel Holtmann +--- + drivers/bluetooth/btusb.c | 4 ++++ + 1 file changed, 4 insertions(+) + +--- a/drivers/bluetooth/btusb.c ++++ b/drivers/bluetooth/btusb.c +@@ -451,6 +451,10 @@ static const struct usb_device_id blackl + { USB_DEVICE(0x0bda, 0xb009), .driver_info = BTUSB_REALTEK }, + { USB_DEVICE(0x2ff8, 0xb011), .driver_info = BTUSB_REALTEK }, + ++ /* Additional Realtek 8761B Bluetooth devices */ ++ { USB_DEVICE(0x2357, 0x0604), .driver_info = BTUSB_REALTEK | ++ BTUSB_WIDEBAND_SPEECH }, ++ + /* Additional Realtek 8761BU Bluetooth devices */ + { USB_DEVICE(0x0b05, 0x190e), .driver_info = BTUSB_REALTEK | + BTUSB_WIDEBAND_SPEECH }, diff --git a/target/linux/generic/backport-5.10/887-v5.18-Bluetooth-btusb-Add-another-Realtek-8761BU.patch b/target/linux/generic/backport-5.10/887-v5.18-Bluetooth-btusb-Add-another-Realtek-8761BU.patch new file mode 100644 index 0000000000..fbf8aa7c5d --- /dev/null +++ b/target/linux/generic/backport-5.10/887-v5.18-Bluetooth-btusb-Add-another-Realtek-8761BU.patch @@ -0,0 +1,55 @@ +From 6dfbe29f45fb0bde29213dbd754a79e8bfc6ecef Mon Sep 17 00:00:00 2001 +From: Helmut Grohne +Date: Sat, 26 Feb 2022 16:22:56 +0100 +Subject: [PATCH] Bluetooth: btusb: Add another Realtek 8761BU + +This device is sometimes wrapped with a label "EDUP". + +T: Bus=01 Lev=02 Prnt=02 Port=02 Cnt=03 Dev#=107 Spd=12 MxCh= 0 +D: Ver= 1.10 Cls=e0(wlcon) Sub=01 Prot=01 MxPS=64 #Cfgs= 1 +P: Vendor=2550 ProdID=8761 Rev= 2.00 +S: Manufacturer=Realtek +S: Product=Bluetooth Radio +S: SerialNumber=00E04C239987 +C:* #Ifs= 2 Cfg#= 1 Atr=e0 MxPwr=500mA +I:* If#= 0 Alt= 0 #EPs= 3 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb +E: Ad=81(I) Atr=03(Int.) MxPS= 16 Ivl=1ms +E: Ad=02(O) Atr=02(Bulk) MxPS= 64 Ivl=0ms +E: Ad=82(I) Atr=02(Bulk) MxPS= 64 Ivl=0ms +I:* If#= 1 Alt= 0 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb +E: Ad=03(O) Atr=01(Isoc) MxPS= 0 Ivl=1ms +E: Ad=83(I) Atr=01(Isoc) MxPS= 0 Ivl=1ms +I: If#= 1 Alt= 1 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb +E: Ad=03(O) Atr=01(Isoc) MxPS= 9 Ivl=1ms +E: Ad=83(I) Atr=01(Isoc) MxPS= 9 Ivl=1ms +I: If#= 1 Alt= 2 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb +E: Ad=03(O) Atr=01(Isoc) MxPS= 17 Ivl=1ms +E: Ad=83(I) Atr=01(Isoc) MxPS= 17 Ivl=1ms +I: If#= 1 Alt= 3 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb +E: Ad=03(O) Atr=01(Isoc) MxPS= 25 Ivl=1ms +E: Ad=83(I) Atr=01(Isoc) MxPS= 25 Ivl=1ms +I: If#= 1 Alt= 4 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb +E: Ad=03(O) Atr=01(Isoc) MxPS= 33 Ivl=1ms +E: Ad=83(I) Atr=01(Isoc) MxPS= 33 Ivl=1ms +I: If#= 1 Alt= 5 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb +E: Ad=03(O) Atr=01(Isoc) MxPS= 49 Ivl=1ms +E: Ad=83(I) Atr=01(Isoc) MxPS= 49 Ivl=1ms + +Signed-off-by: Helmut Grohne +Link: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1955351 +Signed-off-by: Marcel Holtmann +--- + drivers/bluetooth/btusb.c | 2 ++ + 1 file changed, 2 insertions(+) + +--- a/drivers/bluetooth/btusb.c ++++ b/drivers/bluetooth/btusb.c +@@ -458,6 +458,8 @@ static const struct usb_device_id blackl + /* Additional Realtek 8761BU Bluetooth devices */ + { USB_DEVICE(0x0b05, 0x190e), .driver_info = BTUSB_REALTEK | + BTUSB_WIDEBAND_SPEECH }, ++ { USB_DEVICE(0x2550, 0x8761), .driver_info = BTUSB_REALTEK | ++ BTUSB_WIDEBAND_SPEECH }, + + /* Additional Realtek 8821AE Bluetooth devices */ + { USB_DEVICE(0x0b05, 0x17dc), .driver_info = BTUSB_REALTEK }, From 0252c0b1bce04d5312b71579582854b3badc3714 Mon Sep 17 00:00:00 2001 From: John Audia Date: Thu, 10 Nov 2022 23:59:20 -0500 Subject: [PATCH 46/62] kernel: bump 5.15 to 5.15.78 All patches automatically rebased Build system: x86_64 Build-tested: bcm2711/RPi4B, mt7622/RT3200 Run-tested: bcm2711/RPi4B, mt7622/RT3200 Signed-off-by: John Audia --- include/kernel-5.15 | 4 ++-- ...hid-usb-Add-device-quirks-for-Freeway-Airmouse-T3-an.patch | 2 +- ...-0419-media-v4l2-subdev-add-subdev-wide-state-struct.patch | 2 +- ...7-net-dsa-introduce-tagger-owned-storage-for-private.patch | 4 ++-- ...ake-tagging-protocols-connect-to-individual-switches.patch | 4 ++-- ...v6-allow-rejecting-with-source-address-failed-policy.patch | 2 +- ...net-ethernet-mtk_eth_soc-drop-packets-to-WDMA-if-the.patch | 2 +- 7 files changed, 10 insertions(+), 10 deletions(-) diff --git a/include/kernel-5.15 b/include/kernel-5.15 index d5dcb11347..d3a43826a6 100644 --- a/include/kernel-5.15 +++ b/include/kernel-5.15 @@ -1,2 +1,2 @@ -LINUX_VERSION-5.15 = .77 -LINUX_KERNEL_HASH-5.15.77 = 142f841f33796a84c62fae2f2b96d2120bd8bbf9e0aac4ce157692cdb0afe9f9 +LINUX_VERSION-5.15 = .78 +LINUX_KERNEL_HASH-5.15.78 = 0db99f7347a38c27b8c155f3c9c8b260011aea0a4ded85ee95e6095b1e69a499 diff --git a/target/linux/bcm27xx/patches-5.15/950-0163-hid-usb-Add-device-quirks-for-Freeway-Airmouse-T3-an.patch b/target/linux/bcm27xx/patches-5.15/950-0163-hid-usb-Add-device-quirks-for-Freeway-Airmouse-T3-an.patch index 1d43bf59e0..99edfa714b 100644 --- a/target/linux/bcm27xx/patches-5.15/950-0163-hid-usb-Add-device-quirks-for-Freeway-Airmouse-T3-an.patch +++ b/target/linux/bcm27xx/patches-5.15/950-0163-hid-usb-Add-device-quirks-for-Freeway-Airmouse-T3-an.patch @@ -33,7 +33,7 @@ Signed-off-by: Jonathan Bell #define USB_VENDOR_ID_BELKIN 0x050d #define USB_DEVICE_ID_FLIP_KVM 0x3201 -@@ -1308,6 +1311,9 @@ +@@ -1310,6 +1313,9 @@ #define USB_VENDOR_ID_XAT 0x2505 #define USB_DEVICE_ID_XAT_CSR 0x0220 diff --git a/target/linux/bcm27xx/patches-5.15/950-0419-media-v4l2-subdev-add-subdev-wide-state-struct.patch b/target/linux/bcm27xx/patches-5.15/950-0419-media-v4l2-subdev-add-subdev-wide-state-struct.patch index 0dc53424b5..30abd463ec 100644 --- a/target/linux/bcm27xx/patches-5.15/950-0419-media-v4l2-subdev-add-subdev-wide-state-struct.patch +++ b/target/linux/bcm27xx/patches-5.15/950-0419-media-v4l2-subdev-add-subdev-wide-state-struct.patch @@ -442,7 +442,7 @@ Signed-off-by: Dom Cobley if (which == V4L2_SUBDEV_FORMAT_TRY) return v4l2_subdev_get_try_crop(&rsz->sd, sd_state, pad); else -@@ -791,6 +803,12 @@ static int rkisp1_rsz_register(struct rk +@@ -795,6 +807,12 @@ static int rkisp1_rsz_register(struct rk struct v4l2_subdev_state state = { .pads = rsz->pad_cfg }; diff --git a/target/linux/generic/backport-5.15/700-v5.17-net-dsa-introduce-tagger-owned-storage-for-private.patch b/target/linux/generic/backport-5.15/700-v5.17-net-dsa-introduce-tagger-owned-storage-for-private.patch index fe47c175a4..f2b651f0c6 100644 --- a/target/linux/generic/backport-5.15/700-v5.17-net-dsa-introduce-tagger-owned-storage-for-private.patch +++ b/target/linux/generic/backport-5.15/700-v5.17-net-dsa-introduce-tagger-owned-storage-for-private.patch @@ -217,14 +217,14 @@ Signed-off-by: David S. Miller rtnl_unlock(); @@ -1257,6 +1315,7 @@ static int dsa_port_parse_cpu(struct dsa + struct dsa_switch *ds = dp->ds; struct dsa_switch_tree *dst = ds->dst; - const struct dsa_device_ops *tag_ops; enum dsa_tag_protocol default_proto; + int err; /* Find out which protocol the switch would prefer. */ default_proto = dsa_get_tag_protocol(dp, master); -@@ -1304,6 +1363,12 @@ static int dsa_port_parse_cpu(struct dsa +@@ -1311,6 +1370,12 @@ static int dsa_port_parse_cpu(struct dsa */ dsa_tag_driver_put(tag_ops); } else { diff --git a/target/linux/generic/backport-5.15/701-v5.17-dsa-make-tagging-protocols-connect-to-individual-switches.patch b/target/linux/generic/backport-5.15/701-v5.17-dsa-make-tagging-protocols-connect-to-individual-switches.patch index f682260699..0c50ae6fb9 100644 --- a/target/linux/generic/backport-5.15/701-v5.17-dsa-make-tagging-protocols-connect-to-individual-switches.patch +++ b/target/linux/generic/backport-5.15/701-v5.17-dsa-make-tagging-protocols-connect-to-individual-switches.patch @@ -168,14 +168,14 @@ Signed-off-by: David S. Miller return err; @@ -1315,7 +1314,6 @@ static int dsa_port_parse_cpu(struct dsa + struct dsa_switch *ds = dp->ds; struct dsa_switch_tree *dst = ds->dst; - const struct dsa_device_ops *tag_ops; enum dsa_tag_protocol default_proto; - int err; /* Find out which protocol the switch would prefer. */ default_proto = dsa_get_tag_protocol(dp, master); -@@ -1363,12 +1361,6 @@ static int dsa_port_parse_cpu(struct dsa +@@ -1370,12 +1368,6 @@ static int dsa_port_parse_cpu(struct dsa */ dsa_tag_driver_put(tag_ops); } else { diff --git a/target/linux/generic/pending-5.15/670-ipv6-allow-rejecting-with-source-address-failed-policy.patch b/target/linux/generic/pending-5.15/670-ipv6-allow-rejecting-with-source-address-failed-policy.patch index ac4396209e..c58e6b545b 100644 --- a/target/linux/generic/pending-5.15/670-ipv6-allow-rejecting-with-source-address-failed-policy.patch +++ b/target/linux/generic/pending-5.15/670-ipv6-allow-rejecting-with-source-address-failed-policy.patch @@ -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); -@@ -6639,6 +6688,9 @@ void __init ip6_route_init_special_entri +@@ -6645,6 +6694,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); diff --git a/target/linux/generic/pending-5.15/732-12-net-ethernet-mtk_eth_soc-drop-packets-to-WDMA-if-the.patch b/target/linux/generic/pending-5.15/732-12-net-ethernet-mtk_eth_soc-drop-packets-to-WDMA-if-the.patch index 2ab647537b..9fa384e6fa 100644 --- a/target/linux/generic/pending-5.15/732-12-net-ethernet-mtk_eth_soc-drop-packets-to-WDMA-if-the.patch +++ b/target/linux/generic/pending-5.15/732-12-net-ethernet-mtk_eth_soc-drop-packets-to-WDMA-if-the.patch @@ -11,7 +11,7 @@ Signed-off-by: Felix Fietkau --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c -@@ -3524,9 +3524,12 @@ static int mtk_hw_init(struct mtk_eth *e +@@ -3529,9 +3529,12 @@ static int mtk_hw_init(struct mtk_eth *e mtk_w32(eth, 0x21021000, MTK_FE_INT_GRP); if (MTK_HAS_CAPS(eth->soc->caps, MTK_NETSYS_V2)) { From e7bd3767a96a8a84be7ea4730798a7a08dbb20d0 Mon Sep 17 00:00:00 2001 From: John Audia Date: Thu, 10 Nov 2022 15:42:42 -0500 Subject: [PATCH 47/62] kernel: bump 5.10 to 5.10.154 All patches automatically rebased. Signed-off-by: John Audia --- include/kernel-5.10 | 4 ++-- .../patches-5.10/802-usb-xhci-force-msi-renesas-xhci.patch | 2 +- ...netfilter-nftables-update-table-flags-from-the-commi.patch | 2 +- ...v6-allow-rejecting-with-source-address-failed-policy.patch | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/include/kernel-5.10 b/include/kernel-5.10 index 9b74446f8e..6420451109 100644 --- a/include/kernel-5.10 +++ b/include/kernel-5.10 @@ -1,2 +1,2 @@ -LINUX_VERSION-5.10 = .153 -LINUX_KERNEL_HASH-5.10.153 = 3cf2e4519fe451caef0ee0a8beac694612267325f7055fc38d6a990a762f1662 +LINUX_VERSION-5.10 = .154 +LINUX_KERNEL_HASH-5.10.154 = c6ae3d4da4324933160260d0f092a40cd27f9ed03449380790afbe6ce91ee688 diff --git a/target/linux/apm821xx/patches-5.10/802-usb-xhci-force-msi-renesas-xhci.patch b/target/linux/apm821xx/patches-5.10/802-usb-xhci-force-msi-renesas-xhci.patch index ced9b6a158..4ca2946481 100644 --- a/target/linux/apm821xx/patches-5.10/802-usb-xhci-force-msi-renesas-xhci.patch +++ b/target/linux/apm821xx/patches-5.10/802-usb-xhci-force-msi-renesas-xhci.patch @@ -13,7 +13,7 @@ produce a noisy warning. --- a/drivers/usb/host/xhci-pci.c +++ b/drivers/usb/host/xhci-pci.c -@@ -291,6 +291,7 @@ static void xhci_pci_quirks(struct devic +@@ -274,6 +274,7 @@ static void xhci_pci_quirks(struct devic pdev->device == 0x0015) { xhci->quirks |= XHCI_RESET_ON_RESUME; xhci->quirks |= XHCI_ZERO_64B_REGS; diff --git a/target/linux/generic/backport-5.10/610-v5.13-10-netfilter-nftables-update-table-flags-from-the-commi.patch b/target/linux/generic/backport-5.10/610-v5.13-10-netfilter-nftables-update-table-flags-from-the-commi.patch index 352c6094da..964a94a58a 100644 --- a/target/linux/generic/backport-5.10/610-v5.13-10-netfilter-nftables-update-table-flags-from-the-commi.patch +++ b/target/linux/generic/backport-5.10/610-v5.13-10-netfilter-nftables-update-table-flags-from-the-commi.patch @@ -70,7 +70,7 @@ Signed-off-by: Pablo Neira Ayuso nft_trans_table_update(trans) = true; list_add_tail(&trans->list, &ctx->net->nft.commit_list); return 0; -@@ -7921,11 +7925,10 @@ static int nf_tables_commit(struct net * +@@ -7918,11 +7922,10 @@ static int nf_tables_commit(struct net * switch (trans->msg_type) { case NFT_MSG_NEWTABLE: if (nft_trans_table_update(trans)) { diff --git a/target/linux/generic/pending-5.10/670-ipv6-allow-rejecting-with-source-address-failed-policy.patch b/target/linux/generic/pending-5.10/670-ipv6-allow-rejecting-with-source-address-failed-policy.patch index b56e780ea6..b0efced825 100644 --- a/target/linux/generic/pending-5.10/670-ipv6-allow-rejecting-with-source-address-failed-policy.patch +++ b/target/linux/generic/pending-5.10/670-ipv6-allow-rejecting-with-source-address-failed-policy.patch @@ -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); -@@ -6474,6 +6523,9 @@ void __init ip6_route_init_special_entri +@@ -6480,6 +6529,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 4778f6e959f5b9a6379968b600d721975238083c Mon Sep 17 00:00:00 2001 From: Shiji Yang Date: Mon, 24 Oct 2022 12:01:12 +0800 Subject: [PATCH 48/62] ath79: move usb led trigger node to SoC dtsi These frequently used usb led triggers are universal. They should be moved to SoC dtsi. Signed-off-by: Shiji Yang --- target/linux/ath79/dts/ar7100.dtsi | 10 +++++++ .../dts/ar7161_buffalo_wzr-hp-ag300h.dtsi | 14 --------- .../ath79/dts/ar7161_dlink_dir-825-b1.dts | 14 --------- .../linux/ath79/dts/ar7161_netgear_wndr.dtsi | 14 --------- .../ath79/dts/ar7161_ubnt_routerstation.dtsi | 14 --------- target/linux/ath79/dts/ar7240.dtsi | 5 ++++ target/linux/ath79/dts/ar7241.dtsi | 5 ++++ .../ath79/dts/ar7241_netgear_wnr2200.dtsi | 7 ----- .../ath79/dts/ar7241_tplink_tl-mr3x20.dtsi | 7 ----- .../ath79/dts/ar7241_tplink_tl-wr842n-v1.dts | 7 ----- target/linux/ath79/dts/ar7242.dtsi | 5 ++++ .../ath79/dts/ar7242_buffalo_wzr-bhr.dtsi | 7 ----- .../dts/ar7242_buffalo_wzr-hp-g302h-a1a0.dts | 7 ----- .../ath79/dts/ar7242_tplink_tl-wr2543-v1.dts | 7 ----- target/linux/ath79/dts/ar7242_ubnt_sw.dtsi | 7 ----- target/linux/ath79/dts/ar9132.dtsi | 8 +++++ .../dts/ar9132_buffalo_wzr-hp-g300nh.dtsi | 8 ----- .../dts/ar9132_tplink_tl-wr1043nd-v1.dts | 7 ----- target/linux/ath79/dts/ar9330.dtsi | 5 ++++ target/linux/ath79/dts/ar9331_arduino_yun.dts | 16 +--------- .../ath79/dts/ar9331_tplink_tl-mr3020-v1.dts | 7 ----- .../ath79/dts/ar9331_tplink_tl-mr3040-v2.dts | 7 ----- .../ath79/dts/ar9341_tplink_tl-mr3420-v2.dts | 7 ----- .../ath79/dts/ar9341_tplink_tl-wr842n-v2.dts | 7 ----- .../linux/ath79/dts/ar9344_atheros_db120.dts | 10 +------ .../ath79/dts/ar9344_dlink_dir-825-c1.dts | 2 +- .../linux/ath79/dts/ar9344_dlink_dir-8x5.dtsi | 7 ----- .../linux/ath79/dts/ar9344_netgear_r6100.dts | 8 ----- .../ath79/dts/ar9344_netgear_wndr_usb.dtsi | 7 ----- target/linux/ath79/dts/ar9344_pcs_cr5000.dts | 7 ----- .../ath79/dts/ar9344_teltonika_rut9xx.dtsi | 29 +++++++++---------- .../ath79/dts/ar9344_tplink_tl-wdr3500-v1.dts | 7 ----- .../ath79/dts/ar9344_tplink_tl-wdr4300.dtsi | 22 ++++++-------- .../linux/ath79/dts/ar9344_wd_mynet-n750.dts | 19 ------------ .../ath79/dts/ar9344_winchannel_wb2000.dts | 21 +------------- target/linux/ath79/dts/ar934x.dtsi | 5 ++++ .../ath79/dts/qca9531_alfa-network_r36a.dtsi | 8 ----- .../linux/ath79/dts/qca9531_comfast_cf-e5.dts | 7 ----- .../ath79/dts/qca9531_comfast_cf-e560ac.dts | 7 ----- .../ath79/dts/qca9531_glinet_gl-ar300m.dtsi | 2 -- .../ath79/dts/qca9531_glinet_gl-x750.dts | 7 ----- .../ath79/dts/qca9531_teltonika_rut300.dts | 7 ----- .../dts/qca9531_tplink_archer-d50-v1.dts | 7 ----- .../ath79/dts/qca9531_tplink_tl-mr3420-v3.dts | 9 +----- .../ath79/dts/qca9531_tplink_tl-mr6400-v1.dts | 7 ----- .../dts/qca9531_tplink_tl-wr902ac-v1.dts | 7 ----- .../ath79/dts/qca9533_tplink_tl-wr842n-v3.dts | 9 +----- target/linux/ath79/dts/qca953x.dtsi | 5 ++++ .../linux/ath79/dts/qca9557_8dev_rambutan.dts | 6 ---- .../ath79/dts/qca9558_belkin_f9x-v2.dtsi | 7 ----- .../ath79/dts/qca9558_domywifi_dw33d.dts | 14 --------- .../qca9558_librerouter_librerouter-v1.dts | 4 --- .../ath79/dts/qca9558_sitecom_wlr-8100.dts | 2 -- target/linux/ath79/dts/qca9558_sophos_ap.dtsi | 5 ---- .../ath79/dts/qca9558_tplink_archer-c.dtsi | 14 --------- .../ath79/dts/qca9558_tplink_archer-d7.dtsi | 14 --------- .../dts/qca9558_tplink_tl-wdr4900-v2.dts | 14 --------- .../ath79/dts/qca9558_tplink_tl-wr1043nd.dtsi | 7 ----- .../ath79/dts/qca9558_trendnet_tew-823dru.dts | 14 --------- target/linux/ath79/dts/qca955x.dtsi | 10 +++++++ .../ath79/dts/qca955x_zyxel_nbg6x16.dtsi | 11 ------- .../dts/qca9561_tplink_archer-c59-v1.dts | 9 +----- .../dts/qca9561_tplink_archer-c59-v2.dts | 9 +----- .../linux/ath79/dts/qca9563_netgear_wndr.dtsi | 7 ----- .../ath79/dts/qca9563_netgear_wndr4500-v3.dts | 7 ----- .../ath79/dts/qca9563_qxwlan_e1700ac.dtsi | 7 ----- .../ath79/dts/qca9563_rosinson_wr818.dts | 14 --------- .../ath79/dts/qca9563_tplink_archer-c7-v4.dts | 14 --------- .../dts/qca9563_tplink_archer-x7-v5.dtsi | 7 ----- .../dts/qca9563_tplink_tl-wr1043nd-v4.dts | 7 ----- target/linux/ath79/dts/qca956x.dtsi | 10 +++++++ .../ath79/dts/qcn5502_tplink_archer-a9-v6.dts | 7 ----- 72 files changed, 98 insertions(+), 550 deletions(-) diff --git a/target/linux/ath79/dts/ar7100.dtsi b/target/linux/ath79/dts/ar7100.dtsi index d91ef91ebd..a03f282a0f 100644 --- a/target/linux/ath79/dts/ar7100.dtsi +++ b/target/linux/ath79/dts/ar7100.dtsi @@ -156,6 +156,11 @@ #address-cells = <1>; #size-cells = <0>; + + usb_ehci_port: port@1 { + reg = <1>; + #trigger-source-cells = <0>; + }; }; usb1: usb@1c000000 { @@ -172,6 +177,11 @@ #address-cells = <1>; #size-cells = <0>; + + usb_ohci_port: port@1 { + reg = <1>; + #trigger-source-cells = <0>; + }; }; spi: spi@1f000000 { diff --git a/target/linux/ath79/dts/ar7161_buffalo_wzr-hp-ag300h.dtsi b/target/linux/ath79/dts/ar7161_buffalo_wzr-hp-ag300h.dtsi index 4fe8d51a00..6e1ba2d47e 100644 --- a/target/linux/ath79/dts/ar7161_buffalo_wzr-hp-ag300h.dtsi +++ b/target/linux/ath79/dts/ar7161_buffalo_wzr-hp-ag300h.dtsi @@ -170,25 +170,11 @@ }; &usb1 { - #address-cells = <1>; - #size-cells = <0>; status = "okay"; - - usb_ohci_port: port@1 { - reg = <1>; - #trigger-source-cells = <0>; - }; }; &usb2 { - #address-cells = <1>; - #size-cells = <0>; status = "okay"; - - usb_ehci_port: port@1 { - reg = <1>; - #trigger-source-cells = <0>; - }; }; &pcie0 { diff --git a/target/linux/ath79/dts/ar7161_dlink_dir-825-b1.dts b/target/linux/ath79/dts/ar7161_dlink_dir-825-b1.dts index fb5ab1adcb..6934a8f952 100644 --- a/target/linux/ath79/dts/ar7161_dlink_dir-825-b1.dts +++ b/target/linux/ath79/dts/ar7161_dlink_dir-825-b1.dts @@ -122,25 +122,11 @@ }; &usb1 { - #address-cells = <1>; - #size-cells = <0>; status = "okay"; - - usb_ohci_port: port@1 { - reg = <1>; - #trigger-source-cells = <0>; - }; }; &usb2 { - #address-cells = <1>; - #size-cells = <0>; status = "okay"; - - usb_ehci_port: port@1 { - reg = <1>; - #trigger-source-cells = <0>; - }; }; &usb_phy { diff --git a/target/linux/ath79/dts/ar7161_netgear_wndr.dtsi b/target/linux/ath79/dts/ar7161_netgear_wndr.dtsi index d3d22b5d2d..296ecc8c4e 100644 --- a/target/linux/ath79/dts/ar7161_netgear_wndr.dtsi +++ b/target/linux/ath79/dts/ar7161_netgear_wndr.dtsi @@ -116,25 +116,11 @@ }; &usb1 { - #address-cells = <1>; - #size-cells = <0>; status = "okay"; - - usb_ohci_port: port@1 { - reg = <1>; - #trigger-source-cells = <0>; - }; }; &usb2 { - #address-cells = <1>; - #size-cells = <0>; status = "okay"; - - usb_ehci_port: port@1 { - reg = <1>; - #trigger-source-cells = <0>; - }; }; &pcie0 { diff --git a/target/linux/ath79/dts/ar7161_ubnt_routerstation.dtsi b/target/linux/ath79/dts/ar7161_ubnt_routerstation.dtsi index b12723beb2..ef4b032377 100644 --- a/target/linux/ath79/dts/ar7161_ubnt_routerstation.dtsi +++ b/target/linux/ath79/dts/ar7161_ubnt_routerstation.dtsi @@ -99,22 +99,8 @@ &usb1 { status = "okay"; - #address-cells = <1>; - #size-cells = <0>; - - usb_ohci_port: port@1 { - reg = <1>; - #trigger-source-cells = <0>; - }; }; &usb2 { status = "okay"; - #address-cells = <1>; - #size-cells = <0>; - - usb_ehci_port: port@1 { - reg = <1>; - #trigger-source-cells = <0>; - }; }; diff --git a/target/linux/ath79/dts/ar7240.dtsi b/target/linux/ath79/dts/ar7240.dtsi index 425d75f0d7..afbae33a80 100644 --- a/target/linux/ath79/dts/ar7240.dtsi +++ b/target/linux/ath79/dts/ar7240.dtsi @@ -32,6 +32,11 @@ #address-cells = <1>; #size-cells = <0>; + + hub_port: port@1 { + reg = <1>; + #trigger-source-cells = <0>; + }; }; }; diff --git a/target/linux/ath79/dts/ar7241.dtsi b/target/linux/ath79/dts/ar7241.dtsi index ff7a61f921..8d0e60da40 100644 --- a/target/linux/ath79/dts/ar7241.dtsi +++ b/target/linux/ath79/dts/ar7241.dtsi @@ -39,6 +39,11 @@ #address-cells = <1>; #size-cells = <0>; + + hub_port: port@1 { + reg = <1>; + #trigger-source-cells = <0>; + }; }; }; diff --git a/target/linux/ath79/dts/ar7241_netgear_wnr2200.dtsi b/target/linux/ath79/dts/ar7241_netgear_wnr2200.dtsi index 6119af4a03..e17a485396 100644 --- a/target/linux/ath79/dts/ar7241_netgear_wnr2200.dtsi +++ b/target/linux/ath79/dts/ar7241_netgear_wnr2200.dtsi @@ -183,12 +183,5 @@ }; &usb { - #address-cells = <1>; - #size-cells = <0>; status = "okay"; - - hub_port: port@1 { - reg = <1>; - #trigger-source-cells = <0>; - }; }; diff --git a/target/linux/ath79/dts/ar7241_tplink_tl-mr3x20.dtsi b/target/linux/ath79/dts/ar7241_tplink_tl-mr3x20.dtsi index 218ea5e429..a4bda13bce 100644 --- a/target/linux/ath79/dts/ar7241_tplink_tl-mr3x20.dtsi +++ b/target/linux/ath79/dts/ar7241_tplink_tl-mr3x20.dtsi @@ -25,14 +25,7 @@ }; &usb { - #address-cells = <1>; - #size-cells = <0>; status = "okay"; - - hub_port: port@1 { - reg = <1>; - #trigger-source-cells = <0>; - }; }; &usb_phy { diff --git a/target/linux/ath79/dts/ar7241_tplink_tl-wr842n-v1.dts b/target/linux/ath79/dts/ar7241_tplink_tl-wr842n-v1.dts index df77ca0fdc..6ee7d9ec4f 100644 --- a/target/linux/ath79/dts/ar7241_tplink_tl-wr842n-v1.dts +++ b/target/linux/ath79/dts/ar7241_tplink_tl-wr842n-v1.dts @@ -78,14 +78,7 @@ }; &usb { - #address-cells = <1>; - #size-cells = <0>; status = "okay"; - - hub_port: port@1 { - reg = <1>; - #trigger-source-cells = <0>; - }; }; &usb_phy { diff --git a/target/linux/ath79/dts/ar7242.dtsi b/target/linux/ath79/dts/ar7242.dtsi index eda1b16309..96b0442614 100644 --- a/target/linux/ath79/dts/ar7242.dtsi +++ b/target/linux/ath79/dts/ar7242.dtsi @@ -39,6 +39,11 @@ #address-cells = <1>; #size-cells = <0>; + + hub_port: port@1 { + reg = <1>; + #trigger-source-cells = <0>; + }; }; }; diff --git a/target/linux/ath79/dts/ar7242_buffalo_wzr-bhr.dtsi b/target/linux/ath79/dts/ar7242_buffalo_wzr-bhr.dtsi index e9d1eafe24..15a808ad2a 100644 --- a/target/linux/ath79/dts/ar7242_buffalo_wzr-bhr.dtsi +++ b/target/linux/ath79/dts/ar7242_buffalo_wzr-bhr.dtsi @@ -135,12 +135,5 @@ }; &usb { - #address-cells = <1>; - #size-cells = <0>; status = "okay"; - - hub_port: port@1 { - reg = <1>; - #trigger-source-cells = <0>; - }; }; diff --git a/target/linux/ath79/dts/ar7242_buffalo_wzr-hp-g302h-a1a0.dts b/target/linux/ath79/dts/ar7242_buffalo_wzr-hp-g302h-a1a0.dts index b8aa2aa210..c6fd220ed1 100644 --- a/target/linux/ath79/dts/ar7242_buffalo_wzr-hp-g302h-a1a0.dts +++ b/target/linux/ath79/dts/ar7242_buffalo_wzr-hp-g302h-a1a0.dts @@ -210,14 +210,7 @@ }; &usb { - #address-cells = <1>; - #size-cells = <0>; status = "okay"; - - hub_port: port@1 { - reg = <1>; - #trigger-source-cells = <0>; - }; }; &art { diff --git a/target/linux/ath79/dts/ar7242_tplink_tl-wr2543-v1.dts b/target/linux/ath79/dts/ar7242_tplink_tl-wr2543-v1.dts index b524ea1996..3acdc9247d 100644 --- a/target/linux/ath79/dts/ar7242_tplink_tl-wr2543-v1.dts +++ b/target/linux/ath79/dts/ar7242_tplink_tl-wr2543-v1.dts @@ -125,14 +125,7 @@ }; &usb { - #address-cells = <1>; - #size-cells = <0>; status = "okay"; - - hub_port: port@1 { - reg = <1>; - #trigger-source-cells = <0>; - }; }; &usb_phy { diff --git a/target/linux/ath79/dts/ar7242_ubnt_sw.dtsi b/target/linux/ath79/dts/ar7242_ubnt_sw.dtsi index c776c8ef6e..0268146b06 100644 --- a/target/linux/ath79/dts/ar7242_ubnt_sw.dtsi +++ b/target/linux/ath79/dts/ar7242_ubnt_sw.dtsi @@ -114,14 +114,7 @@ }; &usb { - #address-cells = <1>; - #size-cells = <0>; status = "okay"; - - hub_port: port@1 { - reg = <1>; - #trigger-source-cells = <0>; - }; }; &pcie { diff --git a/target/linux/ath79/dts/ar9132.dtsi b/target/linux/ath79/dts/ar9132.dtsi index 29891ccebb..71181c46de 100644 --- a/target/linux/ath79/dts/ar9132.dtsi +++ b/target/linux/ath79/dts/ar9132.dtsi @@ -152,6 +152,14 @@ phys = <&usb_phy>; status = "disabled"; + + #address-cells = <1>; + #size-cells = <0>; + + hub_port: port@1 { + reg = <1>; + #trigger-source-cells = <0>; + }; }; spi: spi@1f000000 { diff --git a/target/linux/ath79/dts/ar9132_buffalo_wzr-hp-g300nh.dtsi b/target/linux/ath79/dts/ar9132_buffalo_wzr-hp-g300nh.dtsi index f3b13b5d0c..4443ba583e 100644 --- a/target/linux/ath79/dts/ar9132_buffalo_wzr-hp-g300nh.dtsi +++ b/target/linux/ath79/dts/ar9132_buffalo_wzr-hp-g300nh.dtsi @@ -246,14 +246,6 @@ &usb { status = "okay"; - - #address-cells = <1>; - #size-cells = <0>; - - hub_port: port@1 { - reg = <1>; - #trigger-source-cells = <0>; - }; }; &usb_phy { diff --git a/target/linux/ath79/dts/ar9132_tplink_tl-wr1043nd-v1.dts b/target/linux/ath79/dts/ar9132_tplink_tl-wr1043nd-v1.dts index 7ff2e4f29b..6eb2a0acb5 100644 --- a/target/linux/ath79/dts/ar9132_tplink_tl-wr1043nd-v1.dts +++ b/target/linux/ath79/dts/ar9132_tplink_tl-wr1043nd-v1.dts @@ -74,14 +74,7 @@ }; &usb { - #address-cells = <1>; - #size-cells = <0>; status = "okay"; - - hub_port: port@1 { - reg = <1>; - #trigger-source-cells = <0>; - }; }; &usb_phy { diff --git a/target/linux/ath79/dts/ar9330.dtsi b/target/linux/ath79/dts/ar9330.dtsi index 9df80e1d5e..466e0fb25d 100644 --- a/target/linux/ath79/dts/ar9330.dtsi +++ b/target/linux/ath79/dts/ar9330.dtsi @@ -129,6 +129,11 @@ #address-cells = <1>; #size-cells = <0>; + + hub_port: port@1 { + reg = <1>; + #trigger-source-cells = <0>; + }; }; spi: spi@1f000000 { diff --git a/target/linux/ath79/dts/ar9331_arduino_yun.dts b/target/linux/ath79/dts/ar9331_arduino_yun.dts index 389a83dd22..bf3a46f962 100644 --- a/target/linux/ath79/dts/ar9331_arduino_yun.dts +++ b/target/linux/ath79/dts/ar9331_arduino_yun.dts @@ -57,7 +57,7 @@ usb { label = "white:usb"; gpios = <&gpio 1 GPIO_ACTIVE_HIGH>; - trigger-sources = <&hub_port1>; + trigger-sources = <&hub_port>; linux,default-trigger = "usbport"; }; }; @@ -125,22 +125,8 @@ &usb { status = "okay"; - #address-cells = <1>; - #size-cells = <0>; dr_mode = "host"; vbus-supply = <®_usb_vbus>; - - port@1 { - #address-cells = <1>; - #size-cells = <0>; - reg = <1>; - #trigger-source-cells = <0>; - - hub_port1: port@1 { - reg = <1>; - #trigger-source-cells = <0>; - }; - }; }; &usb_phy { diff --git a/target/linux/ath79/dts/ar9331_tplink_tl-mr3020-v1.dts b/target/linux/ath79/dts/ar9331_tplink_tl-mr3020-v1.dts index c420c1a4cd..c23e5dac51 100644 --- a/target/linux/ath79/dts/ar9331_tplink_tl-mr3020-v1.dts +++ b/target/linux/ath79/dts/ar9331_tplink_tl-mr3020-v1.dts @@ -86,16 +86,9 @@ }; &usb { - #address-cells = <1>; - #size-cells = <0>; dr_mode = "host"; vbus-supply = <®_usb_vbus>; status = "okay"; - - hub_port: port@1 { - reg = <1>; - #trigger-source-cells = <0>; - }; }; &usb_phy { diff --git a/target/linux/ath79/dts/ar9331_tplink_tl-mr3040-v2.dts b/target/linux/ath79/dts/ar9331_tplink_tl-mr3040-v2.dts index 619fd09ee9..b0f24bbfa7 100644 --- a/target/linux/ath79/dts/ar9331_tplink_tl-mr3040-v2.dts +++ b/target/linux/ath79/dts/ar9331_tplink_tl-mr3040-v2.dts @@ -82,16 +82,9 @@ }; &usb { - #address-cells = <1>; - #size-cells = <0>; dr_mode = "host"; vbus-supply = <®_usb_vbus>; status = "okay"; - - hub_port: port@1 { - reg = <1>; - #trigger-source-cells = <0>; - }; }; &usb_phy { diff --git a/target/linux/ath79/dts/ar9341_tplink_tl-mr3420-v2.dts b/target/linux/ath79/dts/ar9341_tplink_tl-mr3420-v2.dts index f86c4423bf..2ccd50d783 100644 --- a/target/linux/ath79/dts/ar9341_tplink_tl-mr3420-v2.dts +++ b/target/linux/ath79/dts/ar9341_tplink_tl-mr3420-v2.dts @@ -82,14 +82,7 @@ }; &usb { - #address-cells = <1>; - #size-cells = <0>; status = "okay"; - - hub_port: port@1 { - reg = <1>; - #trigger-source-cells = <0>; - }; }; &usb_phy { diff --git a/target/linux/ath79/dts/ar9341_tplink_tl-wr842n-v2.dts b/target/linux/ath79/dts/ar9341_tplink_tl-wr842n-v2.dts index 5d20df9261..0fc3488445 100644 --- a/target/linux/ath79/dts/ar9341_tplink_tl-wr842n-v2.dts +++ b/target/linux/ath79/dts/ar9341_tplink_tl-wr842n-v2.dts @@ -83,14 +83,7 @@ }; &usb { - #address-cells = <1>; - #size-cells = <0>; status = "okay"; - - hub_port: port@1 { - reg = <1>; - #trigger-source-cells = <0>; - }; }; &usb_phy { diff --git a/target/linux/ath79/dts/ar9344_atheros_db120.dts b/target/linux/ath79/dts/ar9344_atheros_db120.dts index 906335ed6f..f0173ebdc7 100644 --- a/target/linux/ath79/dts/ar9344_atheros_db120.dts +++ b/target/linux/ath79/dts/ar9344_atheros_db120.dts @@ -41,7 +41,7 @@ usb { label = "green:usb"; gpios = <&gpio 11 GPIO_ACTIVE_LOW>; - trigger-sources = <&hub_port1>; + trigger-sources = <&hub_port>; linux,default-trigger = "usbport"; }; }; @@ -219,14 +219,6 @@ &usb { status = "okay"; - - #address-cells = <1>; - #size-cells = <0>; - - hub_port1: port@1 { - reg = <1>; - #trigger-source-cells = <0>; - }; }; &usb_phy { diff --git a/target/linux/ath79/dts/ar9344_dlink_dir-825-c1.dts b/target/linux/ath79/dts/ar9344_dlink_dir-825-c1.dts index e6f18cea69..35d0e26d85 100644 --- a/target/linux/ath79/dts/ar9344_dlink_dir-825-c1.dts +++ b/target/linux/ath79/dts/ar9344_dlink_dir-825-c1.dts @@ -28,7 +28,7 @@ label = "blue:usb"; gpios = <&gpio 11 GPIO_ACTIVE_LOW>; linux,default-trigger = "usbport"; - trigger-sources = <&hub_port1>; + trigger-sources = <&hub_port>; }; wan_blue { diff --git a/target/linux/ath79/dts/ar9344_dlink_dir-8x5.dtsi b/target/linux/ath79/dts/ar9344_dlink_dir-8x5.dtsi index dded9d6655..33c75f4967 100644 --- a/target/linux/ath79/dts/ar9344_dlink_dir-8x5.dtsi +++ b/target/linux/ath79/dts/ar9344_dlink_dir-8x5.dtsi @@ -119,13 +119,6 @@ &usb { status = "okay"; - #address-cells = <1>; - #size-cells = <0>; - - hub_port1: port@1 { - reg = <1>; - #trigger-source-cells = <0>; - }; }; &usb_phy { diff --git a/target/linux/ath79/dts/ar9344_netgear_r6100.dts b/target/linux/ath79/dts/ar9344_netgear_r6100.dts index 80951d6249..a73ea52de9 100644 --- a/target/linux/ath79/dts/ar9344_netgear_r6100.dts +++ b/target/linux/ath79/dts/ar9344_netgear_r6100.dts @@ -192,14 +192,6 @@ &usb { status = "okay"; - - #address-cells = <1>; - #size-cells = <0>; - - hub_port: port@1 { - reg = <1>; - #trigger-source-cells = <0>; - }; }; &usb_phy { diff --git a/target/linux/ath79/dts/ar9344_netgear_wndr_usb.dtsi b/target/linux/ath79/dts/ar9344_netgear_wndr_usb.dtsi index 0ca3b761bf..bd1eb59f4f 100644 --- a/target/linux/ath79/dts/ar9344_netgear_wndr_usb.dtsi +++ b/target/linux/ath79/dts/ar9344_netgear_wndr_usb.dtsi @@ -24,11 +24,4 @@ &usb { status = "okay"; - #address-cells = <1>; - #size-cells = <0>; - - hub_port: port@1 { - reg = <1>; - #trigger-source-cells = <0>; - }; }; diff --git a/target/linux/ath79/dts/ar9344_pcs_cr5000.dts b/target/linux/ath79/dts/ar9344_pcs_cr5000.dts index d4b198b3f5..b5fef91eac 100644 --- a/target/linux/ath79/dts/ar9344_pcs_cr5000.dts +++ b/target/linux/ath79/dts/ar9344_pcs_cr5000.dts @@ -106,13 +106,6 @@ &usb { status = "okay"; - #address-cells = <1>; - #size-cells = <0>; - - hub_port1: port@1 { - reg = <1>; - #trigger-source-cells = <0>; - }; }; &usb_phy { diff --git a/target/linux/ath79/dts/ar9344_teltonika_rut9xx.dtsi b/target/linux/ath79/dts/ar9344_teltonika_rut9xx.dtsi index c989a30b10..937095959c 100644 --- a/target/linux/ath79/dts/ar9344_teltonika_rut9xx.dtsi +++ b/target/linux/ath79/dts/ar9344_teltonika_rut9xx.dtsi @@ -113,29 +113,26 @@ }; &usb { + status = "okay"; +}; + +&hub_port { #address-cells = <1>; #size-cells = <0>; - status = "okay"; port@1 { - #address-cells = <1>; - #size-cells = <0>; + compatible = "usb-a-connector"; reg = <1>; + }; - port@1 { - compatible = "usb-a-connector"; - reg = <1>; - }; + port@3 { + label = "RS-232 serial adapter"; + reg = <3>; + }; - port@3 { - label = "RS-232 serial adapter"; - reg = <3>; - }; - - port@4 { - label = "internal wwan modem"; - reg = <4>; - }; + port@4 { + label = "internal wwan modem"; + reg = <4>; }; }; diff --git a/target/linux/ath79/dts/ar9344_tplink_tl-wdr3500-v1.dts b/target/linux/ath79/dts/ar9344_tplink_tl-wdr3500-v1.dts index 6c5d013ccd..77f6637188 100644 --- a/target/linux/ath79/dts/ar9344_tplink_tl-wdr3500-v1.dts +++ b/target/linux/ath79/dts/ar9344_tplink_tl-wdr3500-v1.dts @@ -42,14 +42,7 @@ }; &usb { - #address-cells = <1>; - #size-cells = <0>; status = "okay"; - - hub_port: port@1 { - reg = <1>; - #trigger-source-cells = <0>; - }; }; &usb_phy { diff --git a/target/linux/ath79/dts/ar9344_tplink_tl-wdr4300.dtsi b/target/linux/ath79/dts/ar9344_tplink_tl-wdr4300.dtsi index 546cf49f34..55ddb74184 100644 --- a/target/linux/ath79/dts/ar9344_tplink_tl-wdr4300.dtsi +++ b/target/linux/ath79/dts/ar9344_tplink_tl-wdr4300.dtsi @@ -53,25 +53,21 @@ }; &usb { + status = "okay"; +}; + +&hub_port { #address-cells = <1>; #size-cells = <0>; - status = "okay"; - port@1 { - #address-cells = <1>; - #size-cells = <0>; + hub_port1: port@1 { reg = <1>; #trigger-source-cells = <0>; + }; - hub_port1: port@1 { - reg = <1>; - #trigger-source-cells = <0>; - }; - - hub_port2: port@2 { - reg = <2>; - #trigger-source-cells = <0>; - }; + hub_port2: port@2 { + reg = <2>; + #trigger-source-cells = <0>; }; }; diff --git a/target/linux/ath79/dts/ar9344_wd_mynet-n750.dts b/target/linux/ath79/dts/ar9344_wd_mynet-n750.dts index f4a18b051f..d18ffff34d 100644 --- a/target/linux/ath79/dts/ar9344_wd_mynet-n750.dts +++ b/target/linux/ath79/dts/ar9344_wd_mynet-n750.dts @@ -69,26 +69,7 @@ }; &usb { - #address-cells = <1>; - #size-cells = <0>; status = "okay"; - - port@1 { - #address-cells = <1>; - #size-cells = <0>; - reg = <1>; - #trigger-source-cells = <0>; - - hub_port1: port@1 { - reg = <1>; - #trigger-source-cells = <0>; - }; - - hub_port2: port@2 { - reg = <2>; - #trigger-source-cells = <0>; - }; - }; }; &mdio0 { diff --git a/target/linux/ath79/dts/ar9344_winchannel_wb2000.dts b/target/linux/ath79/dts/ar9344_winchannel_wb2000.dts index f27a58b8d7..cb59559426 100644 --- a/target/linux/ath79/dts/ar9344_winchannel_wb2000.dts +++ b/target/linux/ath79/dts/ar9344_winchannel_wb2000.dts @@ -46,7 +46,7 @@ usb { label = "green:usb"; gpios = <&gpio 21 GPIO_ACTIVE_HIGH>; - trigger-sources = <&hub_port1>, <&hub_port2>; + trigger-sources = <&hub_port>; linux,default-trigger = "usbport"; }; @@ -150,26 +150,7 @@ }; &usb { - #address-cells = <1>; - #size-cells = <0>; status = "okay"; - - port@1 { - #address-cells = <1>; - #size-cells = <0>; - reg = <1>; - #trigger-source-cells = <0>; - - hub_port1: port@1 { - reg = <1>; - #trigger-source-cells = <0>; - }; - - hub_port2: port@2 { - reg = <2>; - #trigger-source-cells = <0>; - }; - }; }; &usb_phy { diff --git a/target/linux/ath79/dts/ar934x.dtsi b/target/linux/ath79/dts/ar934x.dtsi index d88c7bfabc..94dfde4125 100644 --- a/target/linux/ath79/dts/ar934x.dtsi +++ b/target/linux/ath79/dts/ar934x.dtsi @@ -178,6 +178,11 @@ #address-cells = <1>; #size-cells = <0>; + + hub_port: port@1 { + reg = <1>; + #trigger-source-cells = <0>; + }; }; nand: nand@1b000200 { diff --git a/target/linux/ath79/dts/qca9531_alfa-network_r36a.dtsi b/target/linux/ath79/dts/qca9531_alfa-network_r36a.dtsi index 9704e69211..406985d576 100644 --- a/target/linux/ath79/dts/qca9531_alfa-network_r36a.dtsi +++ b/target/linux/ath79/dts/qca9531_alfa-network_r36a.dtsi @@ -111,14 +111,6 @@ &usb0 { status = "okay"; - - #address-cells = <1>; - #size-cells = <0>; - - hub_port0: port@1 { - reg = <1>; - #trigger-source-cells = <0>; - }; }; &usb_phy { diff --git a/target/linux/ath79/dts/qca9531_comfast_cf-e5.dts b/target/linux/ath79/dts/qca9531_comfast_cf-e5.dts index d839725258..17cbe1df14 100644 --- a/target/linux/ath79/dts/qca9531_comfast_cf-e5.dts +++ b/target/linux/ath79/dts/qca9531_comfast_cf-e5.dts @@ -62,14 +62,7 @@ }; &usb0 { - #address-cells = <1>; - #size-cells = <0>; status = "okay"; - - hub_port: port@1 { - reg = <1>; - #trigger-source-cells = <0>; - }; }; &usb_phy { diff --git a/target/linux/ath79/dts/qca9531_comfast_cf-e560ac.dts b/target/linux/ath79/dts/qca9531_comfast_cf-e560ac.dts index 477a2bddc6..75e30ff1b7 100644 --- a/target/linux/ath79/dts/qca9531_comfast_cf-e560ac.dts +++ b/target/linux/ath79/dts/qca9531_comfast_cf-e560ac.dts @@ -135,14 +135,7 @@ }; &usb0 { - #address-cells = <1>; - #size-cells = <0>; status = "okay"; - - port@1 { - reg = <1>; - #trigger-source-cells = <0>; - }; }; ð0 { diff --git a/target/linux/ath79/dts/qca9531_glinet_gl-ar300m.dtsi b/target/linux/ath79/dts/qca9531_glinet_gl-ar300m.dtsi index d64ffa7115..6c89db1b8c 100644 --- a/target/linux/ath79/dts/qca9531_glinet_gl-ar300m.dtsi +++ b/target/linux/ath79/dts/qca9531_glinet_gl-ar300m.dtsi @@ -142,8 +142,6 @@ }; &usb0 { - #address-cells = <1>; - #size-cells = <0>; vbus-supply = <®_usb_vbus>; status = "okay"; }; diff --git a/target/linux/ath79/dts/qca9531_glinet_gl-x750.dts b/target/linux/ath79/dts/qca9531_glinet_gl-x750.dts index 7fd622a8c5..0b2030bb49 100644 --- a/target/linux/ath79/dts/qca9531_glinet_gl-x750.dts +++ b/target/linux/ath79/dts/qca9531_glinet_gl-x750.dts @@ -60,14 +60,7 @@ }; &usb0 { - #address-cells = <1>; - #size-cells = <0>; status = "okay"; - - hub_port: port@1 { - reg = <1>; - #trigger-source-cells = <0>; - }; }; &usb_phy { diff --git a/target/linux/ath79/dts/qca9531_teltonika_rut300.dts b/target/linux/ath79/dts/qca9531_teltonika_rut300.dts index a4f5fb543b..f79be8dca5 100644 --- a/target/linux/ath79/dts/qca9531_teltonika_rut300.dts +++ b/target/linux/ath79/dts/qca9531_teltonika_rut300.dts @@ -107,14 +107,7 @@ }; &usb0 { - #address-cells = <1>; - #size-cells = <0>; status = "okay"; - - hub_port0: port@1 { - reg = <1>; - #trigger-source-cells = <0>; - }; }; &usb_phy { diff --git a/target/linux/ath79/dts/qca9531_tplink_archer-d50-v1.dts b/target/linux/ath79/dts/qca9531_tplink_archer-d50-v1.dts index 27b70e082a..0fc2bd3df8 100644 --- a/target/linux/ath79/dts/qca9531_tplink_archer-d50-v1.dts +++ b/target/linux/ath79/dts/qca9531_tplink_archer-d50-v1.dts @@ -178,14 +178,7 @@ }; &usb0 { - #address-cells = <1>; - #size-cells = <0>; status = "okay"; - - hub_port0: port@1 { - reg = <1>; - #trigger-source-cells = <0>; - }; }; &romfile { diff --git a/target/linux/ath79/dts/qca9531_tplink_tl-mr3420-v3.dts b/target/linux/ath79/dts/qca9531_tplink_tl-mr3420-v3.dts index 818ec77695..e6fb852596 100644 --- a/target/linux/ath79/dts/qca9531_tplink_tl-mr3420-v3.dts +++ b/target/linux/ath79/dts/qca9531_tplink_tl-mr3420-v3.dts @@ -102,7 +102,7 @@ usb { label = "green:usb"; gpios = <&led_gpio 7 GPIO_ACTIVE_LOW>; - trigger-sources = <&hub_port>; + trigger-sources = <&hub_port0>; linux,default-trigger = "usbport"; }; @@ -190,14 +190,7 @@ }; &usb0 { - #address-cells = <1>; - #size-cells = <0>; status = "okay"; - - hub_port: port@1 { - reg = <1>; - #trigger-source-cells = <0>; - }; }; &usb_phy { diff --git a/target/linux/ath79/dts/qca9531_tplink_tl-mr6400-v1.dts b/target/linux/ath79/dts/qca9531_tplink_tl-mr6400-v1.dts index ca7832ebd4..5a990fff02 100644 --- a/target/linux/ath79/dts/qca9531_tplink_tl-mr6400-v1.dts +++ b/target/linux/ath79/dts/qca9531_tplink_tl-mr6400-v1.dts @@ -148,14 +148,7 @@ }; &usb0 { - #address-cells = <1>; - #size-cells = <0>; status = "okay"; - - hub_port: port@1 { - reg = <1>; - #trigger-source-cells = <0>; - }; }; &usb_phy { diff --git a/target/linux/ath79/dts/qca9531_tplink_tl-wr902ac-v1.dts b/target/linux/ath79/dts/qca9531_tplink_tl-wr902ac-v1.dts index 7ce8cd30cd..09f086b90d 100644 --- a/target/linux/ath79/dts/qca9531_tplink_tl-wr902ac-v1.dts +++ b/target/linux/ath79/dts/qca9531_tplink_tl-wr902ac-v1.dts @@ -178,14 +178,7 @@ }; &usb0 { - #address-cells = <1>; - #size-cells = <0>; status = "okay"; - - hub_port0: port@1 { - reg = <1>; - #trigger-source-cells = <0>; - }; }; &info { diff --git a/target/linux/ath79/dts/qca9533_tplink_tl-wr842n-v3.dts b/target/linux/ath79/dts/qca9533_tplink_tl-wr842n-v3.dts index e171984511..2d00159909 100644 --- a/target/linux/ath79/dts/qca9533_tplink_tl-wr842n-v3.dts +++ b/target/linux/ath79/dts/qca9533_tplink_tl-wr842n-v3.dts @@ -71,7 +71,7 @@ label = "green:usb"; gpios = <&gpio 16 GPIO_ACTIVE_LOW>; linux,default-trigger = "usbport"; - trigger-sources = <&hub_port>; + trigger-sources = <&hub_port0>; }; }; @@ -95,14 +95,7 @@ }; &usb0 { - #address-cells = <1>; - #size-cells = <0>; status = "okay"; - - hub_port: port@1 { - reg = <1>; - #trigger-source-cells = <0>; - }; }; &usb_phy { diff --git a/target/linux/ath79/dts/qca953x.dtsi b/target/linux/ath79/dts/qca953x.dtsi index c155e3419f..4300c741ad 100644 --- a/target/linux/ath79/dts/qca953x.dtsi +++ b/target/linux/ath79/dts/qca953x.dtsi @@ -206,6 +206,11 @@ #address-cells = <1>; #size-cells = <0>; + + hub_port0: port@1 { + reg = <1>; + #trigger-source-cells = <0>; + }; }; spi: spi@1f000000 { diff --git a/target/linux/ath79/dts/qca9557_8dev_rambutan.dts b/target/linux/ath79/dts/qca9557_8dev_rambutan.dts index 2724c3a1b6..a816874692 100644 --- a/target/linux/ath79/dts/qca9557_8dev_rambutan.dts +++ b/target/linux/ath79/dts/qca9557_8dev_rambutan.dts @@ -110,9 +110,6 @@ &usb0 { status = "okay"; - - #address-cells = <1>; - #size-cells = <0>; }; &usb_phy1 { @@ -121,9 +118,6 @@ &usb1 { status = "okay"; - - #address-cells = <1>; - #size-cells = <0>; }; &art { diff --git a/target/linux/ath79/dts/qca9558_belkin_f9x-v2.dtsi b/target/linux/ath79/dts/qca9558_belkin_f9x-v2.dtsi index 23fe321efb..72e52129a4 100644 --- a/target/linux/ath79/dts/qca9558_belkin_f9x-v2.dtsi +++ b/target/linux/ath79/dts/qca9558_belkin_f9x-v2.dtsi @@ -104,14 +104,7 @@ }; &usb0 { - #address-cells = <1>; - #size-cells = <0>; status = "okay"; - - hub_port0: port@1 { - reg = <1>; - #trigger-source-cells = <0>; - }; }; &spi { diff --git a/target/linux/ath79/dts/qca9558_domywifi_dw33d.dts b/target/linux/ath79/dts/qca9558_domywifi_dw33d.dts index 5b3318b8b2..976ac551f7 100644 --- a/target/linux/ath79/dts/qca9558_domywifi_dw33d.dts +++ b/target/linux/ath79/dts/qca9558_domywifi_dw33d.dts @@ -76,14 +76,7 @@ }; &usb0 { - #address-cells = <1>; - #size-cells = <0>; status = "okay"; - - hub_port0: port@1 { - reg = <1>; - #trigger-source-cells = <0>; - }; }; &usb_phy1 { @@ -91,14 +84,7 @@ }; &usb1 { - #address-cells = <1>; - #size-cells = <0>; status = "okay"; - - hub_port1: port@1 { - reg = <1>; - #trigger-source-cells = <0>; - }; }; &spi { diff --git a/target/linux/ath79/dts/qca9558_librerouter_librerouter-v1.dts b/target/linux/ath79/dts/qca9558_librerouter_librerouter-v1.dts index a9c03b7eda..b3447f8be3 100644 --- a/target/linux/ath79/dts/qca9558_librerouter_librerouter-v1.dts +++ b/target/linux/ath79/dts/qca9558_librerouter_librerouter-v1.dts @@ -84,8 +84,6 @@ }; &usb0 { - #address-cells = <1>; - #size-cells = <0>; status = "okay"; }; @@ -94,8 +92,6 @@ }; &usb1 { - #address-cells = <1>; - #size-cells = <0>; status = "okay"; }; diff --git a/target/linux/ath79/dts/qca9558_sitecom_wlr-8100.dts b/target/linux/ath79/dts/qca9558_sitecom_wlr-8100.dts index eee3e39bc3..01a69fce15 100644 --- a/target/linux/ath79/dts/qca9558_sitecom_wlr-8100.dts +++ b/target/linux/ath79/dts/qca9558_sitecom_wlr-8100.dts @@ -136,8 +136,6 @@ }; &usb0 { - #address-cells = <1>; - #size-cells = <0>; status = "okay"; }; diff --git a/target/linux/ath79/dts/qca9558_sophos_ap.dtsi b/target/linux/ath79/dts/qca9558_sophos_ap.dtsi index c9f3aefbbf..3d38ca79fe 100644 --- a/target/linux/ath79/dts/qca9558_sophos_ap.dtsi +++ b/target/linux/ath79/dts/qca9558_sophos_ap.dtsi @@ -169,9 +169,4 @@ &usb0 { vbus-supply = <®_usb_vbus>; - - hub_port0: port@1 { - reg = <1>; - #trigger-source-cells = <0>; - }; }; diff --git a/target/linux/ath79/dts/qca9558_tplink_archer-c.dtsi b/target/linux/ath79/dts/qca9558_tplink_archer-c.dtsi index f629838f1a..221582e66d 100644 --- a/target/linux/ath79/dts/qca9558_tplink_archer-c.dtsi +++ b/target/linux/ath79/dts/qca9558_tplink_archer-c.dtsi @@ -85,14 +85,7 @@ }; &usb0 { - #address-cells = <1>; - #size-cells = <0>; status = "okay"; - - hub_port0: port@1 { - reg = <1>; - #trigger-source-cells = <0>; - }; }; &usb_phy1 { @@ -100,14 +93,7 @@ }; &usb1 { - #address-cells = <1>; - #size-cells = <0>; status = "okay"; - - hub_port1: port@1 { - reg = <1>; - #trigger-source-cells = <0>; - }; }; &spi { diff --git a/target/linux/ath79/dts/qca9558_tplink_archer-d7.dtsi b/target/linux/ath79/dts/qca9558_tplink_archer-d7.dtsi index f9e8adcc9e..c4d910bf1e 100644 --- a/target/linux/ath79/dts/qca9558_tplink_archer-d7.dtsi +++ b/target/linux/ath79/dts/qca9558_tplink_archer-d7.dtsi @@ -141,16 +141,9 @@ }; &usb0 { - #address-cells = <1>; - #size-cells = <0>; dr_mode = "host"; vbus-supply = <®_usb0_vbus>; status = "okay"; - - hub_port0: port@1 { - reg = <1>; - #trigger-source-cells = <0>; - }; }; &usb_phy1 { @@ -158,14 +151,7 @@ }; &usb1 { - #address-cells = <1>; - #size-cells = <0>; dr_mode = "host"; vbus-supply = <®_usb1_vbus>; status = "okay"; - - hub_port1: port@1 { - reg = <1>; - #trigger-source-cells = <0>; - }; }; diff --git a/target/linux/ath79/dts/qca9558_tplink_tl-wdr4900-v2.dts b/target/linux/ath79/dts/qca9558_tplink_tl-wdr4900-v2.dts index 49c0e39492..c6b9b077da 100644 --- a/target/linux/ath79/dts/qca9558_tplink_tl-wdr4900-v2.dts +++ b/target/linux/ath79/dts/qca9558_tplink_tl-wdr4900-v2.dts @@ -109,14 +109,7 @@ }; &usb0 { - #address-cells = <1>; - #size-cells = <0>; status = "okay"; - - hub_port0: port@1 { - reg = <1>; - #trigger-source-cells = <0>; - }; }; &usb_phy1 { @@ -124,14 +117,7 @@ }; &usb1 { - #address-cells = <1>; - #size-cells = <0>; status = "okay"; - - hub_port1: port@1 { - reg = <1>; - #trigger-source-cells = <0>; - }; }; &spi { diff --git a/target/linux/ath79/dts/qca9558_tplink_tl-wr1043nd.dtsi b/target/linux/ath79/dts/qca9558_tplink_tl-wr1043nd.dtsi index ff7ea7da03..52996bba34 100644 --- a/target/linux/ath79/dts/qca9558_tplink_tl-wr1043nd.dtsi +++ b/target/linux/ath79/dts/qca9558_tplink_tl-wr1043nd.dtsi @@ -77,14 +77,7 @@ }; &usb0 { - #address-cells = <1>; - #size-cells = <0>; status = "okay"; - - hub_port0: port@1 { - reg = <1>; - #trigger-source-cells = <0>; - }; }; &spi { diff --git a/target/linux/ath79/dts/qca9558_trendnet_tew-823dru.dts b/target/linux/ath79/dts/qca9558_trendnet_tew-823dru.dts index 22569bfc1d..176fe97cc0 100644 --- a/target/linux/ath79/dts/qca9558_trendnet_tew-823dru.dts +++ b/target/linux/ath79/dts/qca9558_trendnet_tew-823dru.dts @@ -72,14 +72,7 @@ }; &usb0 { - #address-cells = <1>; - #size-cells = <0>; status = "okay"; - - hub_port0: port@1 { - reg = <1>; - #trigger-source-cells = <0>; - }; }; &usb_phy1 { @@ -87,14 +80,7 @@ }; &usb1 { - #address-cells = <1>; - #size-cells = <0>; status = "okay"; - - hub_port1: port@1 { - reg = <1>; - #trigger-source-cells = <0>; - }; }; &spi { diff --git a/target/linux/ath79/dts/qca955x.dtsi b/target/linux/ath79/dts/qca955x.dtsi index 0541c4e373..e7daa9d827 100644 --- a/target/linux/ath79/dts/qca955x.dtsi +++ b/target/linux/ath79/dts/qca955x.dtsi @@ -268,6 +268,11 @@ #address-cells = <1>; #size-cells = <0>; + + hub_port0: port@1 { + reg = <1>; + #trigger-source-cells = <0>; + }; }; usb1: usb@1b400000 { @@ -289,6 +294,11 @@ #address-cells = <1>; #size-cells = <0>; + + hub_port1: port@1 { + reg = <1>; + #trigger-source-cells = <0>; + }; }; nand: nand@1b800200 { diff --git a/target/linux/ath79/dts/qca955x_zyxel_nbg6x16.dtsi b/target/linux/ath79/dts/qca955x_zyxel_nbg6x16.dtsi index 9e1ce89c46..7de1c4fa69 100644 --- a/target/linux/ath79/dts/qca955x_zyxel_nbg6x16.dtsi +++ b/target/linux/ath79/dts/qca955x_zyxel_nbg6x16.dtsi @@ -116,19 +116,8 @@ &usb0 { status = "okay"; - - hub_port0: port@1 { - reg = <1>; - #trigger-source-cells = <0>; - }; - }; &usb1 { status = "okay"; - - hub_port1: port@1 { - reg = <1>; - #trigger-source-cells = <0>; - }; }; diff --git a/target/linux/ath79/dts/qca9561_tplink_archer-c59-v1.dts b/target/linux/ath79/dts/qca9561_tplink_archer-c59-v1.dts index c385eb1592..f05a290d2f 100644 --- a/target/linux/ath79/dts/qca9561_tplink_archer-c59-v1.dts +++ b/target/linux/ath79/dts/qca9561_tplink_archer-c59-v1.dts @@ -16,19 +16,12 @@ label = "green:usb"; gpios = <&led_gpio 7 GPIO_ACTIVE_LOW>; linux,default-trigger = "usbport"; - trigger-sources = <&hub_port>; + trigger-sources = <&hub_port0>; }; }; &usb0 { - #address-cells = <1>; - #size-cells = <0>; status = "okay"; - - hub_port: port@1 { - reg = <1>; - #trigger-source-cells = <0>; - }; }; &usb_phy0 { diff --git a/target/linux/ath79/dts/qca9561_tplink_archer-c59-v2.dts b/target/linux/ath79/dts/qca9561_tplink_archer-c59-v2.dts index 5a277723e3..4be23ffbc0 100644 --- a/target/linux/ath79/dts/qca9561_tplink_archer-c59-v2.dts +++ b/target/linux/ath79/dts/qca9561_tplink_archer-c59-v2.dts @@ -16,19 +16,12 @@ label = "green:usb"; gpios = <&led_gpio 7 GPIO_ACTIVE_LOW>; linux,default-trigger = "usbport"; - trigger-sources = <&hub_port>; + trigger-sources = <&hub_port0>; }; }; &usb0 { - #address-cells = <1>; - #size-cells = <0>; status = "okay"; - - hub_port: port@1 { - reg = <1>; - #trigger-source-cells = <0>; - }; }; &usb_phy0 { diff --git a/target/linux/ath79/dts/qca9563_netgear_wndr.dtsi b/target/linux/ath79/dts/qca9563_netgear_wndr.dtsi index 0fdabb6f19..726eae5b29 100644 --- a/target/linux/ath79/dts/qca9563_netgear_wndr.dtsi +++ b/target/linux/ath79/dts/qca9563_netgear_wndr.dtsi @@ -235,14 +235,7 @@ }; &usb0 { - #address-cells = <1>; - #size-cells = <0>; status = "okay"; - - hub_port0: port@1 { - reg = <1>; - #trigger-source-cells = <0>; - }; }; &caldata { diff --git a/target/linux/ath79/dts/qca9563_netgear_wndr4500-v3.dts b/target/linux/ath79/dts/qca9563_netgear_wndr4500-v3.dts index 6e25215501..4c33c0197f 100644 --- a/target/linux/ath79/dts/qca9563_netgear_wndr4500-v3.dts +++ b/target/linux/ath79/dts/qca9563_netgear_wndr4500-v3.dts @@ -28,12 +28,5 @@ }; &usb1 { - #address-cells = <1>; - #size-cells = <0>; status = "okay"; - - hub_port1: port@1 { - reg = <1>; - #trigger-source-cells = <0>; - }; }; diff --git a/target/linux/ath79/dts/qca9563_qxwlan_e1700ac.dtsi b/target/linux/ath79/dts/qca9563_qxwlan_e1700ac.dtsi index 8902e1726c..c6c610dbee 100644 --- a/target/linux/ath79/dts/qca9563_qxwlan_e1700ac.dtsi +++ b/target/linux/ath79/dts/qca9563_qxwlan_e1700ac.dtsi @@ -125,14 +125,7 @@ }; &usb0 { - #address-cells = <1>; - #size-cells = <0>; status = "okay"; - - hub_port0: port@1 { - reg = <1>; - #trigger-source-cells = <0>; - }; }; &usb_phy1 { diff --git a/target/linux/ath79/dts/qca9563_rosinson_wr818.dts b/target/linux/ath79/dts/qca9563_rosinson_wr818.dts index c80e1c9d7a..c73d5a6e58 100644 --- a/target/linux/ath79/dts/qca9563_rosinson_wr818.dts +++ b/target/linux/ath79/dts/qca9563_rosinson_wr818.dts @@ -123,14 +123,7 @@ }; &usb0 { - #address-cells = <1>; - #size-cells = <0>; status = "okay"; - - port@1 { - reg = <1>; - #trigger-source-cells = <0>; - }; }; &usb_phy1 { @@ -138,14 +131,7 @@ }; &usb1 { - #address-cells = <1>; - #size-cells = <0>; status = "okay"; - - port@2 { - reg = <2>; - #trigger-source-cells = <0>; - }; }; &info { diff --git a/target/linux/ath79/dts/qca9563_tplink_archer-c7-v4.dts b/target/linux/ath79/dts/qca9563_tplink_archer-c7-v4.dts index 2fdce55d0e..3c6b8c4fb9 100644 --- a/target/linux/ath79/dts/qca9563_tplink_archer-c7-v4.dts +++ b/target/linux/ath79/dts/qca9563_tplink_archer-c7-v4.dts @@ -152,14 +152,7 @@ }; &usb0 { - #address-cells = <1>; - #size-cells = <0>; status = "okay"; - - hub_port0: port@1 { - reg = <1>; - #trigger-source-cells = <0>; - }; }; &usb_phy1 { @@ -167,14 +160,7 @@ }; &usb1 { - #address-cells = <1>; - #size-cells = <0>; status = "okay"; - - hub_port1: port@1 { - reg = <1>; - #trigger-source-cells = <0>; - }; }; &spi { diff --git a/target/linux/ath79/dts/qca9563_tplink_archer-x7-v5.dtsi b/target/linux/ath79/dts/qca9563_tplink_archer-x7-v5.dtsi index fd0f10ff27..f6a959903f 100644 --- a/target/linux/ath79/dts/qca9563_tplink_archer-x7-v5.dtsi +++ b/target/linux/ath79/dts/qca9563_tplink_archer-x7-v5.dtsi @@ -108,14 +108,7 @@ }; &usb0 { - #address-cells = <1>; - #size-cells = <0>; status = "okay"; - - hub_port0: port@1 { - reg = <1>; - #trigger-source-cells = <0>; - }; }; &spi { diff --git a/target/linux/ath79/dts/qca9563_tplink_tl-wr1043nd-v4.dts b/target/linux/ath79/dts/qca9563_tplink_tl-wr1043nd-v4.dts index bf01f06de6..80a63f6efc 100644 --- a/target/linux/ath79/dts/qca9563_tplink_tl-wr1043nd-v4.dts +++ b/target/linux/ath79/dts/qca9563_tplink_tl-wr1043nd-v4.dts @@ -94,14 +94,7 @@ }; &usb0 { - #address-cells = <1>; - #size-cells = <0>; status = "okay"; - - hub_port0: port@1 { - reg = <1>; - #trigger-source-cells = <0>; - }; }; ð0 { diff --git a/target/linux/ath79/dts/qca956x.dtsi b/target/linux/ath79/dts/qca956x.dtsi index 0ebd5ff5be..e46f0676e2 100644 --- a/target/linux/ath79/dts/qca956x.dtsi +++ b/target/linux/ath79/dts/qca956x.dtsi @@ -204,6 +204,11 @@ #address-cells = <1>; #size-cells = <0>; + + hub_port0: port@1 { + reg = <1>; + #trigger-source-cells = <0>; + }; }; usb1: usb@1b400000 { @@ -226,6 +231,11 @@ #address-cells = <1>; #size-cells = <0>; + + hub_port1: port@1 { + reg = <1>; + #trigger-source-cells = <0>; + }; }; spi: spi@1f000000 { diff --git a/target/linux/ath79/dts/qcn5502_tplink_archer-a9-v6.dts b/target/linux/ath79/dts/qcn5502_tplink_archer-a9-v6.dts index 9af119b560..ef0ea321e0 100644 --- a/target/linux/ath79/dts/qcn5502_tplink_archer-a9-v6.dts +++ b/target/linux/ath79/dts/qcn5502_tplink_archer-a9-v6.dts @@ -227,14 +227,7 @@ }; &usb0 { - #address-cells = <1>; - #size-cells = <0>; status = "okay"; - - hub_port0: port@1 { - reg = <1>; - #trigger-source-cells = <0>; - }; }; &wmac { From 5a1af6ed621d4547d8bf486d0d3e4de5443b9b58 Mon Sep 17 00:00:00 2001 From: Will Moss Date: Wed, 3 Aug 2022 11:37:47 +0000 Subject: [PATCH 49/62] ath79: fix MAC address assignment for TP-Link ar7241 devices On TP-Link ar7241 devices LAN and WAN interfaces are swapped. Keeping that in mind fix MAC address assignment as used in vendor firmware: LAN MAC - main MAC stored in u-boot and printed on label WAN MAC - LAN MAC + 1 Signed-off-by: Will Moss --- target/linux/ath79/dts/ar7241_tplink.dtsi | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/target/linux/ath79/dts/ar7241_tplink.dtsi b/target/linux/ath79/dts/ar7241_tplink.dtsi index 84a9a4f63d..0861cc6232 100644 --- a/target/linux/ath79/dts/ar7241_tplink.dtsi +++ b/target/linux/ath79/dts/ar7241_tplink.dtsi @@ -94,18 +94,17 @@ }; }; -ð0 { +ð0 { /* WAN interface, initialized last as eth1 */ status = "okay"; nvmem-cells = <&macaddr_uboot_1fc00>; nvmem-cell-names = "mac-address"; - mac-address-increment = <(-1)>; + mac-address-increment = <1>; }; -ð1 { +ð1 { /* LAN interface, initialized first as eth0 */ nvmem-cells = <&macaddr_uboot_1fc00>; nvmem-cell-names = "mac-address"; - mac-address-increment = <1>; }; &uboot { From ffa4b5283b390099a207dcd22c6e9b0b528ac1e4 Mon Sep 17 00:00:00 2001 From: Arne Zachlod Date: Sat, 6 Aug 2022 15:35:15 +0200 Subject: [PATCH 50/62] ramips: add support for Mikrotik LtAP-2HnD Mikrotik LtAP-2HnD is a outdoor/automotive WLAN 4 router with integrated GPS receiver and two mPCIe slots. Specifications: * SoC: MT7621A * RAM: 128 MiB Nanya NT5CC64M16GP-DI * Flash: 16 MiB winbond W25Q128JV * WLAN: * Atheros AR9382 with power amplifier SKY 85330 (2x2 internal antennas, with RF switches for external connectors) * Ethernet: 1 Gbps, single port * USB Host: USB 2.0 Speeds * Serial: 115200 baud * LEDs: Power, System, GPS, 5* RSSI * mPCIe: * miniPCIe slot 1: PCIe and USB 2.0 Host (via switch shared with USB Host) * miniPCIe slot 2: USB 2.0 and 3.0 * SIM Cards: * Slot 1 Connected to mPCIe slot 1 * Slot 2 and 3 connected to mPCIe slot 2 via switch * GPS: MTK 3333 on serial port 2 (/dev/ttyS1), 115200 baud and PPS on gpio 14 gpios are exposed to /sys/class/gpio: * usb-select: swithes USB 2.0 interface between external port and internal mPCIe slot 1 default is the external USB interface * gps-reset: resets the GPS interface chip * sim-select: switches between sim slot 2 and 3 connected to mPCIe slot 2 * gps-ant-select: switches GPS antenna between internal antenna and SMA connected antenna * lte-reset: resets mPCIe slot 2 Flashing: TFTP boot initramfs image and then perform sysupgrade. Follow common MikroTik procedure as in https://openwrt.org/toh/mikrotik/common. Signed-off-by: Arne Zachlod --- .../ramips/dts/mt7621_mikrotik_ltap-2hnd.dts | 171 ++++++++++++++++++ target/linux/ramips/image/mt7621.mk | 7 + .../mt7621/base-files/etc/board.d/01_leds | 1 + .../mt7621/base-files/etc/board.d/02_network | 4 + .../etc/hotplug.d/firmware/10-ath9k-eeprom | 33 ++++ .../mt7621/base-files/lib/upgrade/platform.sh | 1 + 6 files changed, 217 insertions(+) create mode 100644 target/linux/ramips/dts/mt7621_mikrotik_ltap-2hnd.dts create mode 100644 target/linux/ramips/mt7621/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom diff --git a/target/linux/ramips/dts/mt7621_mikrotik_ltap-2hnd.dts b/target/linux/ramips/dts/mt7621_mikrotik_ltap-2hnd.dts new file mode 100644 index 0000000000..feeda9685e --- /dev/null +++ b/target/linux/ramips/dts/mt7621_mikrotik_ltap-2hnd.dts @@ -0,0 +1,171 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT + +#include "mt7621_mikrotik.dtsi" + +/ { + compatible = "mikrotik,ltap-2hnd", "mediatek,mt7621-soc"; + model = "MikroTik RouterBOARD LtAP-2HnD"; + + aliases { + led-boot = &led_usr; + led-failsafe = &led_usr; + led-running = &led_usr; + led-upgrade = &led_usr; + }; + + ath9k-leds { + compatible = "gpio-leds"; + + rssi0 { + label = "green:rssi0"; + gpios = <&ath9k 0 GPIO_ACTIVE_LOW>; + }; + rssi1 { + label = "green:rssi1"; + gpios = <&ath9k 1 GPIO_ACTIVE_LOW>; + }; + rssi2 { + label = "green:rssi2"; + gpios = <&ath9k 2 GPIO_ACTIVE_LOW>; + }; + rssi3 { + label = "green:rssi3"; + gpios = <&ath9k 3 GPIO_ACTIVE_LOW>; + }; + rssi4 { + label = "green:rssi4"; + gpios = <&ath9k 4 GPIO_ACTIVE_LOW>; + }; + }; + + leds { + compatible = "gpio-leds"; + + pwr { + label = "blue:pwr"; + gpios = <&gpio 23 GPIO_ACTIVE_HIGH>; + default-state = "on"; + }; + + led_usr: usr { + label = "green:usr"; + gpios = <&gpio 0 GPIO_ACTIVE_HIGH>; + }; + + gps { + label = "green:gps"; + gpios = <&gpio 28 GPIO_ACTIVE_LOW>; + }; + }; + + /* TODO: find GPIOs for the WLAN antenna switches */ + gpio-export { + compatible = "gpio-export"; + + usb-select { + gpio-export,name = "usb-select"; + gpio-export,output = <1>; + gpios = <&gpio 12 GPIO_ACTIVE_HIGH>; + }; + gps-reset { + gpio-export,name = "gps-reset"; + gpio-export,output = <1>; + gpios = <&gpio 13 GPIO_ACTIVE_LOW>; + }; + sim-select { + gpio-export,name = "sim-select"; + gpio-export,output = <1>; + gpios = <&gpio 25 GPIO_ACTIVE_HIGH>; + }; + gps-ant-select { + /* internal antenna = 0 */ + gpio-export,name = "gps-ant-select"; + gpio-export,output = <0>; + gpios = <&gpio 27 GPIO_ACTIVE_HIGH>; + }; + lte-reset { + gpio-export,name = "lte-reset"; + gpio-export,output = <1>; + gpios = <&gpio 29 GPIO_ACTIVE_HIGH>; + }; + }; + + pps { + compatible = "pps-gpio"; + gpios = <&gpio 14 GPIO_ACTIVE_HIGH>; + }; + + pcie1_vcc_reg { + compatible = "regulator-fixed"; + regulator-name = "pcie1_vcc"; + + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + gpio = <&gpio 10 GPIO_ACTIVE_HIGH>; + enable-active-high; + regulator-boot-on; + }; + + pcie2_vcc_reg { + compatible = "regulator-fixed"; + regulator-name = "pcie2_vcc"; + + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + gpio = <&gpio 11 GPIO_ACTIVE_HIGH>; + enable-active-high; + regulator-boot-on; + }; +}; + +&partitions { + partition@40000 { + compatible = "mikrotik,minor"; + label = "firmware"; + reg = <0x040000 0xfc0000>; + }; +}; + +ðernet { + pinctrl-0 = <&mdio_pins>, <&rgmii1_pins>; +}; + +&switch0 { + ports { + port@0 { + status = "okay"; + label = "lan"; + }; + }; +}; + +&pcie0 { + status = "okay"; + + ath9k: wifi@0,0 { + compatible = "pci168c,0030"; + reg = <0x0000 0 0 0 0>; + qca,no-eeprom; + gpio-controller; + #gpio-cells = <2>; + }; +}; + +&state_default { + gpio { + groups = "uart2", "wdt", "rgmii2"; + function = "gpio"; + }; +}; + +&i2c { + status = "okay"; +}; + +&pcie { + status = "okay"; +}; + +&uartlite3 { + status = "okay"; +}; diff --git a/target/linux/ramips/image/mt7621.mk b/target/linux/ramips/image/mt7621.mk index 222809dbbe..cf1813f79c 100644 --- a/target/linux/ramips/image/mt7621.mk +++ b/target/linux/ramips/image/mt7621.mk @@ -1350,6 +1350,13 @@ define Device/MikroTik append-metadata endef +define Device/mikrotik_ltap-2hnd + $(Device/MikroTik) + DEVICE_MODEL := LtAP-2HnD + DEVICE_PACKAGES += kmod-ath9k kmod-pps-gpio rssileds +endef +TARGET_DEVICES += mikrotik_ltap-2hnd + define Device/mikrotik_routerboard-750gr3 $(Device/MikroTik) DEVICE_MODEL := RouterBOARD 750Gr3 diff --git a/target/linux/ramips/mt7621/base-files/etc/board.d/01_leds b/target/linux/ramips/mt7621/base-files/etc/board.d/01_leds index 9cf83c357c..a3c233a20f 100644 --- a/target/linux/ramips/mt7621/base-files/etc/board.d/01_leds +++ b/target/linux/ramips/mt7621/base-files/etc/board.d/01_leds @@ -95,6 +95,7 @@ linksys,ea8100-v2) mikrotik,routerboard-760igs) ucidef_set_led_netdev "sfp" "SFP" "blue:sfp" "sfp" ;; +mikrotik,ltap-2hnd|\ mikrotik,routerboard-m11g) ucidef_set_rssimon "wlan0" "200000" "1" ucidef_set_led_rssi "rssilow" "RSSILOW" "green:rssi0" "wlan0" "1" "100" diff --git a/target/linux/ramips/mt7621/base-files/etc/board.d/02_network b/target/linux/ramips/mt7621/base-files/etc/board.d/02_network index bfc654a23a..cef5d55925 100644 --- a/target/linux/ramips/mt7621/base-files/etc/board.d/02_network +++ b/target/linux/ramips/mt7621/base-files/etc/board.d/02_network @@ -12,6 +12,7 @@ ramips_setup_interfaces() asus,rp-ac56|\ asus,rp-ac87|\ edimax,re23s|\ + mikrotik,ltap-2hnd|\ mikrotik,routerboard-m11g|\ netgear,ex6150|\ sercomm,na502|\ @@ -218,6 +219,9 @@ ramips_setup_macs() lan_mac=$(mtd_get_mac_ascii Config lan_hwaddr) wan_mac=$(mtd_get_mac_ascii Config wan_hwaddr) label_mac=$lan_mac + mikrotik,ltap-2hnd) + label_mac=$(cat "/sys/firmware/mikrotik/hard_config/mac_base") + lan_mac=$label_mac ;; tplink,mr600-v2-eu) label_mac=$(cat "/sys/class/net/eth0/address") diff --git a/target/linux/ramips/mt7621/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom b/target/linux/ramips/mt7621/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom new file mode 100644 index 0000000000..0bf5e85cd0 --- /dev/null +++ b/target/linux/ramips/mt7621/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom @@ -0,0 +1,33 @@ +#!/bin/sh + +[ -e /lib/firmware/$FIRMWARE ] && exit 0 + +. /lib/functions/caldata.sh + +caldata_mikrotik_ath9k() { + local offset=$(($1)) + local count=$(($2)) + local macaddr=$3 + local wlan_data="/sys/firmware/mikrotik/hard_config/wlan_data" + + caldata_from_file $wlan_data $offset $count /tmp/$FIRMWARE + ath9k_patch_mac "$macaddr" /tmp/$FIRMWARE + caldata_sysfsload_from_file /tmp/$FIRMWARE 0x0 $count + rm -f /tmp/$FIRMWARE +} + +board=$(board_name) + +case "$FIRMWARE" in +"ath9k-eeprom-pci-0000:01:00.0.bin") + case $board in + mikrotik,ltap-2hnd) + mac_base="$(cat /sys/firmware/mikrotik/hard_config/mac_base)" + caldata_mikrotik_ath9k 0x5000 0x440 $(macaddr_add "$mac_base" 1) + ;; + *) + caldata_die "board $board is not supported yet" + ;; + esac + ;; +esac diff --git a/target/linux/ramips/mt7621/base-files/lib/upgrade/platform.sh b/target/linux/ramips/mt7621/base-files/lib/upgrade/platform.sh index ebe4c638be..d380ea66f7 100755 --- a/target/linux/ramips/mt7621/base-files/lib/upgrade/platform.sh +++ b/target/linux/ramips/mt7621/base-files/lib/upgrade/platform.sh @@ -33,6 +33,7 @@ platform_do_upgrade() { fw_setenv --lock / bootImage 0 || exit 1 fi ;; + mikrotik,ltap-2hnd|\ mikrotik,routerboard-750gr3|\ mikrotik,routerboard-760igs|\ mikrotik,routerboard-m11g|\ From e7ad68d682bdb73b7d13d6c4b8d1d65d9f050138 Mon Sep 17 00:00:00 2001 From: Szabolcs Hubai Date: Mon, 26 Sep 2022 08:42:54 +0200 Subject: [PATCH 51/62] ramips: define lzma-loader recipe for SEAMA devices Define "Device/seama-lzma-loader" recipe for SEAMA devices to help contributors avoid doing recipe mistakes. In a forum topic [0] I was under the impression that the good old uimage-lzma-loader didn't fix the LZMA ERROR 1 for a device. It was found out, that the uimage-lzma-loader never worked because the KERNEL variable was overriden earlier (also an LZMA ERROR 1 related commit, 6fba88de1913), and the "use lzma-loader" fix (commit 09faa73c53bd) didn't catch that to include the "loader-kernel" part. I contributed an LZMA ERROR 1 fix (commit ce1957100411) for the SEAMA device D-Link DIR-860L B1, where I had to duplicate the whole uimage-lzma-loader recipe because of the special needs of the vendor bootloader. This new recipe reuse most of uimage-lzma-loader's KERNEL definiton to avoid duplication. It uses "relocate-kernel" as it needed for D-Link DIR-860L B1 to boot from flash, and it's compatible with D-Link DIR-645 too. It repacks lzma-loader with lzma for kernel (without uImage), because these weird hacked vendor bootloaders accepts only LZMA compressed kernels from flash: We have SEAMA, Image Size = 4759794 Verifying Checksum ... Uncompressing SEAMA linux.lzma ... OK It uses uImage header for initramfs kernel to be little bit verbose. 0: https://forum.openwrt.org/t/136435/10 Signed-off-by: Szabolcs Hubai --- target/linux/ramips/image/Makefile | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/target/linux/ramips/image/Makefile b/target/linux/ramips/image/Makefile index 0992d6ba9f..275251ff6b 100644 --- a/target/linux/ramips/image/Makefile +++ b/target/linux/ramips/image/Makefile @@ -213,7 +213,15 @@ endef define Device/uimage-lzma-loader LOADER_TYPE := bin - KERNEL := kernel-bin | append-dtb | lzma | loader-kernel | uImage none + KERNEL/lzma-loader := kernel-bin | append-dtb | lzma | loader-kernel + KERNEL := $$(KERNEL/lzma-loader) | uImage none +endef + +define Device/seama-lzma-loader + $(Device/seama) + $(Device/uimage-lzma-loader) + KERNEL := $$(KERNEL/lzma-loader) | relocate-kernel | lzma -a0 + KERNEL_INITRAMFS := $$(KERNEL/lzma-loader) | uImage none endef include $(SUBTARGET).mk From c293b492dfa114b67e90d5434edfeba17ba29980 Mon Sep 17 00:00:00 2001 From: Szabolcs Hubai Date: Wed, 28 Sep 2022 00:54:36 +0200 Subject: [PATCH 52/62] ramips: rt3883: use seama-lzma-loader for D-Link DIR-645 In the support topic [0] of the GitHub issue #10634 it was found out (based on boot logs) that the uimage-lzma-loader (commit 09faa73c53bd) never worked, as an earlier workaround (commit 6fba88de1913) negated the recipe: 3: System Boot system code via Flash. ## Booting image at bc050000 ... raspi_read: from:50000 len:40 .raspi_read: from:50000 len:c .raspi_read: from:50000 len:1fa000 ................................We have SEAMA, Image Size = 2072512 Verifying Checksum ... Uncompressing SEAMA linux.lzma ... OK ## Transferring control to Linux (at address 80000000) ... ## Giving linux memsize in MB, 64 Starting kernel ... [ 0.000000] Linux version 5.4.188 (builder@buildhost) (gcc version 8.4.0 (OpenWrt GCC 8.4.0 r16554-1d4dea6d4f)) #0 Sat Apr 16 12:59:34 2022 [ 0.000000] SoC Type: Ralink RT3883 ver:1 eco:5 [ 0.000000] printk: bootconsolde [early0] enabled [ 0.000000] CPU0 revision is: 0001974c (MIPS 74Kc) [ 0.000000] MIPS: machine is D-Link DIR-645 [ 0.000000] Initrd not found or empty - disabling initrd Using the new seama-lzma-loader it's able to boot OpenWrt 22.03 and OpenWrt SNAPSHOT too: 3: System Boot system code via Flash. ## Booting image at bc050000 ... raspi_read: from:50000 len:40 .raspi_read: from:50000 len:c .raspi_read: from:50000 len:48b004 .........................................................................We have SEAMA, Image Size = 4763588 Verifying Checksum ... Uncompressing SEAMA linux.lzma ... OK ## Transferring control to Linux (at address 80000000) ... ## Giving linux memsize in MB, 64 Starting kernel ... OpenWrt kernel loader for MIPS based SoC Copyright (C) 2011 Gabor Juhos Decompressing kernel... done! Starting kernel at 80000000... [ 0.000000] Linux version 5.10.144 (xabolcs@ut2004) (mipsel-openwrt-linux-musl-gcc (OpenWrt GCC 11.3.0 r20774+2-b71affaf8b) 11.3.0, GNU ld (GNU Binutils) 2.37) #0 Tue Sep 27 23:02:30 2022 [ 0.000000] SoC Type: Ralink RT3883 ver:1 eco:5 [ 0.000000] printk: bootconsole [early0] enabled [ 0.000000] CPU0 revision is: 0001974c (MIPS 74Kc) [ 0.000000] MIPS: machine is D-Link DIR-645 [ 0.000000] Initrd not found or empty - disabling initrd [ 0.000000] Primary instruction cache 64kB, VIPT, 4-way, linesize 32 bytes. [ 0.000000] Primary data cache 32kB, 4-way, VIPT, cache aliases, linesize 32 bytes [ 0.000000] Zone ranges: [ 0.000000] Normal [mem 0x0000000000000000-0x0000000003ffffff] [ 0.000000] Movable zone start for each node [ 0.000000] Early memory node ranges [ 0.000000] node 0: [mem 0x0000000000000000-0x0000000003ffffff] [ 0.000000] Initmem setup node 0 [mem 0x0000000000000000-0x0000000003ffffff] [ 0.000000] Built 1 zonelists, mobility grouping on. Total pages: 16256 [ 0.000000] Kernel command line: console=ttyS0,57600 rootfstype=squashfs,jffs2 The OKLI Loader is unable to read the flash on this SoC: Looking for OpenWrt image... not found! ('0xddbaddba' at 0xbc051000) 0: https://forum.openwrt.org/t/136435 Fixes: GitHub issue #10634 ("V22.03.0 release currently does not work on D-Link DIR-645") Fixes: 09faa73c53bd ("ramips: rt3883: use lzma-loader for DIR-645") Tested-by: Glenn Fowler Signed-off-by: Szabolcs Hubai --- target/linux/ramips/image/rt3883.mk | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/target/linux/ramips/image/rt3883.mk b/target/linux/ramips/image/rt3883.mk index f5439bd0a3..8bdcdccd36 100644 --- a/target/linux/ramips/image/rt3883.mk +++ b/target/linux/ramips/image/rt3883.mk @@ -32,12 +32,10 @@ endef TARGET_DEVICES += belkin_f9k1109v1 define Device/dlink_dir-645 - $(Device/seama) - $(Device/uimage-lzma-loader) + $(Device/seama-lzma-loader) SOC := rt3662 BLOCKSIZE := 4k IMAGE_SIZE := 7872k - KERNEL := kernel-bin | append-dtb | lzma -d10 SEAMA_SIGNATURE := wrgn39_dlob.hans_dir645 DEVICE_VENDOR := D-Link DEVICE_MODEL := DIR-645 From 18801f26485e3a0dcb79dc9f9b174aed5821b758 Mon Sep 17 00:00:00 2001 From: Szabolcs Hubai Date: Wed, 28 Sep 2022 02:55:01 +0200 Subject: [PATCH 53/62] ramips: mt7621: use seama-lzma-loader for D-Link DIR-860L B1 Fix the LZMA ERROR 1 with a single line of recipe instead of duplicating "uimage-lzma-loader". While reviewing my original submission of commit ce1957100411 David suggested to use $(Device/uimage-lzma-loader), but due to the specific needs of the vendor bootloader that simple oneliner didn't work. The new $(Device/seama-lzma-loader) is for those SEAMA capable bootloaders. Signed-off-by: Szabolcs Hubai --- target/linux/ramips/image/mt7621.mk | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/target/linux/ramips/image/mt7621.mk b/target/linux/ramips/image/mt7621.mk index cf1813f79c..2e7d0689be 100644 --- a/target/linux/ramips/image/mt7621.mk +++ b/target/linux/ramips/image/mt7621.mk @@ -551,11 +551,8 @@ TARGET_DEVICES += dlink_dir-853-r1 define Device/dlink_dir-860l-b1 $(Device/dsa-migration) - $(Device/seama) + $(Device/seama-lzma-loader) SEAMA_SIGNATURE := wrgac13_dlink.2013gui_dir860lb - LOADER_TYPE := bin - KERNEL := kernel-bin | append-dtb | lzma | loader-kernel | relocate-kernel | \ - lzma -a0 | uImage lzma IMAGE_SIZE := 16064k DEVICE_VENDOR := D-Link DEVICE_MODEL := DIR-860L From 62efb34071cff2e15bff85b00040520dad7d6097 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=93scar=20Garc=C3=ADa=20Amor?= Date: Tue, 20 Sep 2022 13:24:43 +0200 Subject: [PATCH 54/62] ramips: add support for Cudy WR1300 v2 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Specifications: - SoC: MediaTek MT7621AT - RAM: 128 MB (DDR3) - Flash: 16 MB (SPI NOR) - WiFi: MediaTek MT7603E, MediaTek MT7613BE - Switch: 1 WAN, 4 LAN (Gigabit) - Ports: 1 USB 3.0 - Buttons: Reset, WPS - LEDs: System, Wan, Lan 1-4, WiFi 2.4G, WiFi 5G, WPS - Power: DC 12V 1A tip positive Download and flash the manufacturer's built OpenWRT image available at http://www.cudytech.com/openwrt_software_download Install the new OpenWRT image via luci (System -> Backup/Flash firmware) Be sure to NOT keep settings. The force upgrade may need to be checked due to differences in router naming conventions. Recovery: - Loads only signed manufacture firmware due to bootloader RSA verification - serve tftp-recovery image as /recovery.bin on 192.168.1.88/24 - connect to any lan ethernet port - power on the device while holding the reset button - wait at least 8 seconds before releasing reset button for image to download - See http://www.cudytech.com/newsinfo/547425.html Signed-off-by: Óscar García Amor --- ...y_wr1300.dts => mt7621_cudy_wr1300-v1.dts} | 4 +- .../ramips/dts/mt7621_cudy_wr1300-v2.dts | 199 ++++++++++++++++++ target/linux/ramips/image/mt7621.mk | 17 +- 3 files changed, 216 insertions(+), 4 deletions(-) rename target/linux/ramips/dts/{mt7621_cudy_wr1300.dts => mt7621_cudy_wr1300-v1.dts} (97%) create mode 100644 target/linux/ramips/dts/mt7621_cudy_wr1300-v2.dts diff --git a/target/linux/ramips/dts/mt7621_cudy_wr1300.dts b/target/linux/ramips/dts/mt7621_cudy_wr1300-v1.dts similarity index 97% rename from target/linux/ramips/dts/mt7621_cudy_wr1300.dts rename to target/linux/ramips/dts/mt7621_cudy_wr1300-v1.dts index 2398612847..4062c46e3e 100644 --- a/target/linux/ramips/dts/mt7621_cudy_wr1300.dts +++ b/target/linux/ramips/dts/mt7621_cudy_wr1300-v1.dts @@ -6,8 +6,8 @@ #include / { - compatible = "cudy,wr1300", "mediatek,mt7621-soc"; - model = "Cudy WR1300"; + compatible = "cudy,wr1300-v1", "mediatek,mt7621-soc"; + model = "Cudy WR1300 v1"; aliases { led-boot = &led_sys; diff --git a/target/linux/ramips/dts/mt7621_cudy_wr1300-v2.dts b/target/linux/ramips/dts/mt7621_cudy_wr1300-v2.dts new file mode 100644 index 0000000000..5c8b047e76 --- /dev/null +++ b/target/linux/ramips/dts/mt7621_cudy_wr1300-v2.dts @@ -0,0 +1,199 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT + +#include "mt7621.dtsi" + +#include +#include + +/ { + compatible = "cudy,wr1300-v2", "mediatek,mt7621-soc"; + model = "Cudy WR1300 v2"; + + aliases { + led-boot = &led_sys; + led-failsafe = &led_sys; + led-running = &led_sys; + led-upgrade = &led_sys; + label-mac-device = &gmac0; + }; + + chosen { + bootargs = "console=ttyS0,115200"; + }; + + keys { + compatible = "gpio-keys"; + + reset { + label = "reset"; + gpios = <&gpio 18 GPIO_ACTIVE_LOW>; + linux,code = ; + }; + + wps { + label = "wps"; + gpios = <&gpio 7 GPIO_ACTIVE_LOW>; + linux,code = ; + }; + }; + + leds { + compatible = "gpio-leds"; + + led_sys: sys { + label = "green:sys"; + gpios = <&gpio 15 GPIO_ACTIVE_LOW>; + }; + + wps { + label = "green:wps"; + gpios = <&gpio 13 GPIO_ACTIVE_LOW>; + }; + }; +}; + +&spi0 { + status = "okay"; + + flash@0 { + compatible = "jedec,spi-nor"; + reg = <0>; + spi-max-frequency = <80000000>; + m25p,fast-read; + + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + partition@0 { + label = "u-boot"; + reg = <0x0 0x30000>; + read-only; + }; + + partition@30000 { + label = "u-boot-env"; + reg = <0x30000 0x10000>; + read-only; + }; + + factory: partition@40000 { + label = "factory"; + reg = <0x40000 0x10000>; + read-only; + }; + + partition@50000 { + compatible = "denx,uimage"; + label = "firmware"; + reg = <0x50000 0xf80000>; + }; + + partition@fd0000 { + label = "debug"; + reg = <0xfd0000 0x10000>; + read-only; + }; + + partition@fe0000 { + label = "backup"; + reg = <0xfe0000 0x10000>; + read-only; + }; + + bdinfo: partition@ff0000 { + label = "bdinfo"; + reg = <0xff0000 0x10000>; + read-only; + }; + }; + }; +}; + +&pcie { + status = "okay"; +}; + +&pcie1 { + wifi@0,0 { + compatible = "mediatek,mt76"; + reg = <0x0000 0 0 0 0>; + mediatek,mtd-eeprom = <&factory 0x0000>; + nvmem-cells = <&macaddr_bdinfo_de00>; + nvmem-cell-names = "mac-address"; + }; +}; + +&pcie0 { + wifi@0,0 { + compatible = "mediatek,mt76"; + reg = <0x0000 0 0 0 0>; + mediatek,mtd-eeprom = <&factory 0x8000>; + nvmem-cells = <&macaddr_bdinfo_de00>; + nvmem-cell-names = "mac-address"; + mac-address-increment = <2>; + }; +}; + +&gmac0 { + nvmem-cells = <&macaddr_bdinfo_de00>; + nvmem-cell-names = "mac-address"; +}; + +&gmac1 { + status = "okay"; + label = "wan"; + phy-handle = <ðphy4>; + + nvmem-cells = <&macaddr_bdinfo_de00>; + nvmem-cell-names = "mac-address"; + mac-address-increment = <1>; +}; + +&mdio { + ethphy4: ethernet-phy@4 { + reg = <4>; + }; +}; + +&switch0 { + ports { + port@0 { + status = "okay"; + label = "lan4"; + }; + + port@1 { + status = "okay"; + label = "lan3"; + }; + + port@2 { + status = "okay"; + label = "lan2"; + }; + + port@3 { + status = "okay"; + label = "lan1"; + }; + }; +}; + +&state_default { + gpio { + groups = "wdt", "i2c", "jtag"; + function = "gpio"; + }; +}; + +&bdinfo { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_bdinfo_de00: macaddr@de00 { + reg = <0xde00 0x6>; + }; +}; diff --git a/target/linux/ramips/image/mt7621.mk b/target/linux/ramips/image/mt7621.mk index 2e7d0689be..de10da7cb6 100644 --- a/target/linux/ramips/image/mt7621.mk +++ b/target/linux/ramips/image/mt7621.mk @@ -444,15 +444,28 @@ define Device/bolt_arion endef TARGET_DEVICES += bolt_arion -define Device/cudy_wr1300 +define Device/cudy_wr1300-v1 $(Device/dsa-migration) IMAGE_SIZE := 15872k DEVICE_VENDOR := Cudy DEVICE_MODEL := WR1300 + DEVICE_VARIANT := v1 DEVICE_PACKAGES := kmod-mt7603 kmod-mt76x2 kmod-usb2 kmod-usb3 \ kmod-usb-ledtrig-usbport + SUPPORTED_DEVICES += cudy,wr1300 R10 endef -TARGET_DEVICES += cudy_wr1300 +TARGET_DEVICES += cudy_wr1300-v1 + +define Device/cudy_wr1300-v2 + $(Device/dsa-migration) + IMAGE_SIZE := 15872k + DEVICE_VENDOR := Cudy + DEVICE_MODEL := WR1300 + DEVICE_VARIANT := v2 + DEVICE_PACKAGES := kmod-mt7603 kmod-mt7615e kmod-mt7663-firmware-ap + SUPPORTED_DEVICES += cudy,wr1300 R23 +endef +TARGET_DEVICES += cudy_wr1300-v2 define Device/cudy_wr2100 $(Device/dsa-migration) From 65d9a715fc891740a900052be625f60da3a2b6a3 Mon Sep 17 00:00:00 2001 From: Guillaume Lefebvre Date: Wed, 9 Nov 2022 06:52:18 +0100 Subject: [PATCH 55/62] ipq40xx: D-Link DAP-2610: convert to DSA Reenable D-Link DAP-2610, convert it to DSA and label port to 'lan', as shown on the case Reviewed-by: Robert Marko Signed-off-by: Guillaume Lefebvre --- .../ipq40xx/base-files/etc/board.d/02_network | 1 + .../arch/arm/boot/dts/qcom-ipq4018-dap-2610.dts | 14 ++++++++++++++ target/linux/ipq40xx/image/generic.mk | 3 +-- 3 files changed, 16 insertions(+), 2 deletions(-) diff --git a/target/linux/ipq40xx/base-files/etc/board.d/02_network b/target/linux/ipq40xx/base-files/etc/board.d/02_network index 16b0f05a5b..80b7b02e8a 100644 --- a/target/linux/ipq40xx/base-files/etc/board.d/02_network +++ b/target/linux/ipq40xx/base-files/etc/board.d/02_network @@ -43,6 +43,7 @@ ipq40xx_setup_interfaces() ;; aruba,ap-303|\ avm,fritzrepeater-1200|\ + dlink,dap-2610|\ meraki,mr33|\ meraki,mr74|\ mikrotik,lhgg-60ad|\ diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-dap-2610.dts b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-dap-2610.dts index ff8053c42b..724047c469 100644 --- a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-dap-2610.dts +++ b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-dap-2610.dts @@ -181,6 +181,20 @@ status = "okay"; }; +&gmac { + status = "okay"; +}; + +&switch { + status = "okay"; +}; + +&swport5 { + status = "okay"; + + label = "lan"; +}; + &tlmm { serial_pins: serial_pinmux { mux { diff --git a/target/linux/ipq40xx/image/generic.mk b/target/linux/ipq40xx/image/generic.mk index b50d072bec..9fb34a7871 100644 --- a/target/linux/ipq40xx/image/generic.mk +++ b/target/linux/ipq40xx/image/generic.mk @@ -419,8 +419,7 @@ define Device/dlink_dap-2610 IMAGE/factory.bin := append-kernel | pad-offset 6144k 160 | append-rootfs | wrgg-image | check-size IMAGE/sysupgrade.bin := append-kernel | wrgg-image | pad-to $$$$(BLOCKSIZE) | append-rootfs | pad-rootfs | check-size | append-metadata endef -# Missing DSA Setup -#TARGET_DEVICES += dlink_dap-2610 +TARGET_DEVICES += dlink_dap-2610 define Device/edgecore_ecw5211 $(call Device/FitImage) From 66a3c32b47a9c9da155fd04045d7262b005a1de3 Mon Sep 17 00:00:00 2001 From: Sven Eckelmann Date: Mon, 24 Oct 2022 18:55:44 +0200 Subject: [PATCH 56/62] ipq40xx: Convert openmesh,a42 to DSA * ethernet1: - physical port label "Ethernet 1" - can be used to power the device - its mac address is printed on the device label * ethernet2: - physical port label "Ethernet 2" Both ports are not marked by there role (because the vendor firmware automatically detects roles) but the "Ethernet 1" port was used in the past for "WAN" functionality in OpenWrt. Reviewed-by: Robert Marko Signed-off-by: Sven Eckelmann --- .../ipq40xx/base-files/etc/board.d/02_network | 6 +++++ .../lib/preinit/05_set_iface_mac_ipq40xx.sh | 4 +++ .../arch/arm/boot/dts/qcom-ipq4018-a42.dts | 26 ++++++++++++++++--- target/linux/ipq40xx/image/generic.mk | 3 +-- 4 files changed, 33 insertions(+), 6 deletions(-) diff --git a/target/linux/ipq40xx/base-files/etc/board.d/02_network b/target/linux/ipq40xx/base-files/etc/board.d/02_network index 80b7b02e8a..6c6d04a923 100644 --- a/target/linux/ipq40xx/base-files/etc/board.d/02_network +++ b/target/linux/ipq40xx/base-files/etc/board.d/02_network @@ -73,6 +73,9 @@ ipq40xx_setup_interfaces() netgear,srs60) ucidef_set_interfaces_lan_wan "lan1 lan2 lan3" "wan" ;; + openmesh,a42) + ucidef_set_interfaces_lan_wan "ethernet2" "ethernet1" + ;; zte,mf286d) ucidef_set_interfaces_lan_wan "lan2 lan3 lan4" "wan" ;; @@ -159,6 +162,9 @@ ipq40xx_setup_macs() pakedge,wr-1) wan_mac=$(macaddr_add $(get_mac_label) 1) ;; + openmesh,a42) + label_mac="$(mtd_get_mac_binary "0:ART" 0x0)" + ;; esac [ -n "$lan_mac" ] && ucidef_set_interface_macaddr "lan" $lan_mac diff --git a/target/linux/ipq40xx/base-files/lib/preinit/05_set_iface_mac_ipq40xx.sh b/target/linux/ipq40xx/base-files/lib/preinit/05_set_iface_mac_ipq40xx.sh index ddfef1ab2d..4ae4103131 100644 --- a/target/linux/ipq40xx/base-files/lib/preinit/05_set_iface_mac_ipq40xx.sh +++ b/target/linux/ipq40xx/base-files/lib/preinit/05_set_iface_mac_ipq40xx.sh @@ -29,6 +29,10 @@ preinit_set_mac_address() { ip link set dev lan1 address $(macaddr_add "$base_mac" 1) ip link set dev eth0 address $(macaddr_setbit "$base_mac" 7) ;; + openmesh,a42) + ip link set dev ethernet1 address $(mtd_get_mac_binary "0:ART" 0x0) + ip link set dev ethernet2 address $(mtd_get_mac_binary "0:ART" 0x6) + ;; mikrotik,wap-ac) base_mac=$(cat /sys/firmware/mikrotik/hard_config/mac_base) ip link set dev sw-eth1 address "$base_mac" diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-a42.dts b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-a42.dts index 2236edf80b..89f5183045 100644 --- a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-a42.dts +++ b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-a42.dts @@ -17,10 +17,6 @@ status = "okay"; }; - mdio@90000 { - status = "okay"; - }; - tcsr@194b000 { /* select hostmode */ compatible = "qcom,tcsr"; @@ -166,6 +162,28 @@ status = "okay"; }; +&mdio { + status = "okay"; +}; + +&gmac { + status = "okay"; +}; + +&switch { + status = "okay"; +}; + +&swport4 { + status = "okay"; + label = "ethernet2"; +}; + +&swport5 { + status = "okay"; + label = "ethernet1"; +}; + &wifi0 { status = "okay"; qcom,ath10k-calibration-variant = "OM-A42"; diff --git a/target/linux/ipq40xx/image/generic.mk b/target/linux/ipq40xx/image/generic.mk index 9fb34a7871..14a2745719 100644 --- a/target/linux/ipq40xx/image/generic.mk +++ b/target/linux/ipq40xx/image/generic.mk @@ -888,8 +888,7 @@ define Device/openmesh_a42 IMAGE/factory.bin := append-rootfs | pad-rootfs | openmesh-image ce_type=A42 IMAGE/sysupgrade.bin/squashfs := append-rootfs | pad-rootfs | sysupgrade-tar rootfs=$$$$@ | append-metadata endef -# Missing DSA Setup -#TARGET_DEVICES += openmesh_a42 +TARGET_DEVICES += openmesh_a42 define Device/openmesh_a62 $(call Device/FitImageLzma) From c6bef1b83a75d2f69a4d8904882800405df1a7b8 Mon Sep 17 00:00:00 2001 From: Sven Eckelmann Date: Mon, 24 Oct 2022 18:55:44 +0200 Subject: [PATCH 57/62] ipq40xx: Convert openmesh,a62 to DSA MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * ethernet1: - physical port label "Ethernet 1" - can be used to power the device - its mac address is printed on the device label * ethernet2: - physical port label "Ethernet 2" Both ports are not marked by there role (because the vendor firmware automatically detects roles) but the "Ethernet 1" port was used in the past for "WAN" functionality in OpenWrt. Reviewed-by: Robert Marko Tested-by: Michaël BILCOT Signed-off-by: Sven Eckelmann --- .../ipq40xx/base-files/etc/board.d/02_network | 6 +++-- .../lib/preinit/05_set_iface_mac_ipq40xx.sh | 3 ++- .../arch/arm/boot/dts/qcom-ipq4019-a62.dts | 26 ++++++++++++++++--- target/linux/ipq40xx/image/generic.mk | 3 +-- 4 files changed, 29 insertions(+), 9 deletions(-) diff --git a/target/linux/ipq40xx/base-files/etc/board.d/02_network b/target/linux/ipq40xx/base-files/etc/board.d/02_network index 6c6d04a923..b98c85decf 100644 --- a/target/linux/ipq40xx/base-files/etc/board.d/02_network +++ b/target/linux/ipq40xx/base-files/etc/board.d/02_network @@ -73,7 +73,8 @@ ipq40xx_setup_interfaces() netgear,srs60) ucidef_set_interfaces_lan_wan "lan1 lan2 lan3" "wan" ;; - openmesh,a42) + openmesh,a42|\ + openmesh,a62) ucidef_set_interfaces_lan_wan "ethernet2" "ethernet1" ;; zte,mf286d) @@ -162,7 +163,8 @@ ipq40xx_setup_macs() pakedge,wr-1) wan_mac=$(macaddr_add $(get_mac_label) 1) ;; - openmesh,a42) + openmesh,a42|\ + openmesh,a62) label_mac="$(mtd_get_mac_binary "0:ART" 0x0)" ;; esac diff --git a/target/linux/ipq40xx/base-files/lib/preinit/05_set_iface_mac_ipq40xx.sh b/target/linux/ipq40xx/base-files/lib/preinit/05_set_iface_mac_ipq40xx.sh index 4ae4103131..0d19c6bae0 100644 --- a/target/linux/ipq40xx/base-files/lib/preinit/05_set_iface_mac_ipq40xx.sh +++ b/target/linux/ipq40xx/base-files/lib/preinit/05_set_iface_mac_ipq40xx.sh @@ -29,7 +29,8 @@ preinit_set_mac_address() { ip link set dev lan1 address $(macaddr_add "$base_mac" 1) ip link set dev eth0 address $(macaddr_setbit "$base_mac" 7) ;; - openmesh,a42) + openmesh,a42|\ + openmesh,a62) ip link set dev ethernet1 address $(mtd_get_mac_binary "0:ART" 0x0) ip link set dev ethernet2 address $(mtd_get_mac_binary "0:ART" 0x6) ;; diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-a62.dts b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-a62.dts index 799e3cb415..11d27ab339 100644 --- a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-a62.dts +++ b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-a62.dts @@ -17,10 +17,6 @@ status = "okay"; }; - mdio@90000 { - status = "okay"; - }; - tcsr@194b000 { /* select hostmode */ compatible = "qcom,tcsr"; @@ -194,6 +190,28 @@ }; }; +&mdio { + status = "okay"; +}; + +&gmac { + status = "okay"; +}; + +&switch { + status = "okay"; +}; + +&swport4 { + status = "okay"; + label = "ethernet1"; +}; + +&swport5 { + status = "okay"; + label = "ethernet2"; +}; + &wifi0 { status = "okay"; qcom,ath10k-calibration-variant = "OM-A62"; diff --git a/target/linux/ipq40xx/image/generic.mk b/target/linux/ipq40xx/image/generic.mk index 14a2745719..9553931676 100644 --- a/target/linux/ipq40xx/image/generic.mk +++ b/target/linux/ipq40xx/image/generic.mk @@ -904,8 +904,7 @@ define Device/openmesh_a62 IMAGE/sysupgrade.bin/squashfs := append-rootfs | pad-rootfs | sysupgrade-tar rootfs=$$$$@ | append-metadata DEVICE_PACKAGES := ath10k-firmware-qca9888-ct endef -# Missing DSA Setup -#TARGET_DEVICES += openmesh_a62 +TARGET_DEVICES += openmesh_a62 define Device/p2w_r619ac $(call Device/FitzImage) From 2b2f14c959ad883e3859d957f5f8571e9c2ef547 Mon Sep 17 00:00:00 2001 From: Sven Eckelmann Date: Tue, 25 Oct 2022 09:12:16 +0200 Subject: [PATCH 58/62] ipq40xx: utilize nvmem-cells for openmesh,a42 The calibration data and mac addresses on this device are stored in the 0:ART partition. It is therefore possible to move the code to handle them directly to the devicetree instead of the various scripts. But the actual relevant information about the partition layout is provided by the bootloader via bootargs (mtdparts) and not via the devicetree itself. Instead of using a fixed-partition template, the mtd dynamic partitions support from the upstream kernel is used. Reported-by: Robert Marko Reviewed-by: Robert Marko Signed-off-by: Sven Eckelmann --- .../ipq40xx/base-files/etc/board.d/02_network | 1 - .../etc/hotplug.d/firmware/11-ath10k-caldata | 2 - .../lib/preinit/05_set_iface_mac_ipq40xx.sh | 1 - .../arch/arm/boot/dts/qcom-ipq4018-a42.dts | 38 +++++++++++++++++++ 4 files changed, 38 insertions(+), 4 deletions(-) diff --git a/target/linux/ipq40xx/base-files/etc/board.d/02_network b/target/linux/ipq40xx/base-files/etc/board.d/02_network index b98c85decf..46e6a3f9bd 100644 --- a/target/linux/ipq40xx/base-files/etc/board.d/02_network +++ b/target/linux/ipq40xx/base-files/etc/board.d/02_network @@ -163,7 +163,6 @@ ipq40xx_setup_macs() pakedge,wr-1) wan_mac=$(macaddr_add $(get_mac_label) 1) ;; - openmesh,a42|\ openmesh,a62) label_mac="$(mtd_get_mac_binary "0:ART" 0x0)" ;; diff --git a/target/linux/ipq40xx/base-files/etc/hotplug.d/firmware/11-ath10k-caldata b/target/linux/ipq40xx/base-files/etc/hotplug.d/firmware/11-ath10k-caldata index 5d075509b5..559aacea1e 100644 --- a/target/linux/ipq40xx/base-files/etc/hotplug.d/firmware/11-ath10k-caldata +++ b/target/linux/ipq40xx/base-files/etc/hotplug.d/firmware/11-ath10k-caldata @@ -77,7 +77,6 @@ case "$FIRMWARE" in /usr/bin/fritz_cal_extract -i 1 -s 0x3D000 -e 0x207 -l 12064 -o /lib/firmware/$FIRMWARE $(find_mtd_chardev "urlader1") ;; cellc,rtl30vw |\ - openmesh,a42 |\ openmesh,a62 |\ plasmacloud,pa1200 |\ plasmacloud,pa2200) @@ -174,7 +173,6 @@ case "$FIRMWARE" in /usr/bin/fritz_cal_extract -i 1 -s 0x3C000 -e 0x208 -l 12064 -o /lib/firmware/$FIRMWARE $(find_mtd_chardev "urlader1") ;; cellc,rtl30vw |\ - openmesh,a42 |\ openmesh,a62 |\ plasmacloud,pa1200 |\ plasmacloud,pa2200) diff --git a/target/linux/ipq40xx/base-files/lib/preinit/05_set_iface_mac_ipq40xx.sh b/target/linux/ipq40xx/base-files/lib/preinit/05_set_iface_mac_ipq40xx.sh index 0d19c6bae0..81d22686a3 100644 --- a/target/linux/ipq40xx/base-files/lib/preinit/05_set_iface_mac_ipq40xx.sh +++ b/target/linux/ipq40xx/base-files/lib/preinit/05_set_iface_mac_ipq40xx.sh @@ -29,7 +29,6 @@ preinit_set_mac_address() { ip link set dev lan1 address $(macaddr_add "$base_mac" 1) ip link set dev eth0 address $(macaddr_setbit "$base_mac" 7) ;; - openmesh,a42|\ openmesh,a62) ip link set dev ethernet1 address $(mtd_get_mac_binary "0:ART" 0x0) ip link set dev ethernet2 address $(mtd_get_mac_binary "0:ART" 0x6) diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-a42.dts b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-a42.dts index 89f5183045..b6ff09a042 100644 --- a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-a42.dts +++ b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-a42.dts @@ -71,6 +71,7 @@ led-failsafe = &led_status_green; led-running = &led_status_green; led-upgrade = &led_status_green; + label-mac-device = &swport5; }; leds { @@ -144,7 +145,32 @@ compatible = "jedec,spi-nor"; reg = <0>; spi-max-frequency = <24000000>; + /* partitions are passed via bootloader */ + partitions { + partition-art { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + label = "0:ART"; + + precal_art_1000: precal@1000 { + reg = <0x1000 0x2f20>; + }; + + precal_art_5000: precal@5000 { + reg = <0x5000 0x2f20>; + }; + + macaddr_gmac0: macaddr@0 { + reg = <0x0 0x6>; + }; + + macaddr_gmac1: macaddr@6 { + reg = <0x6 0x6>; + }; + }; + }; }; }; @@ -177,19 +203,31 @@ &swport4 { status = "okay"; label = "ethernet2"; + + nvmem-cell-names = "mac-address"; + nvmem-cells = <&macaddr_gmac1>; }; &swport5 { status = "okay"; label = "ethernet1"; + + nvmem-cell-names = "mac-address"; + nvmem-cells = <&macaddr_gmac0>; }; &wifi0 { status = "okay"; qcom,ath10k-calibration-variant = "OM-A42"; + + nvmem-cell-names = "pre-calibration"; + nvmem-cells = <&precal_art_1000>; }; &wifi1 { status = "okay"; qcom,ath10k-calibration-variant = "OM-A42"; + + nvmem-cell-names = "pre-calibration"; + nvmem-cells = <&precal_art_5000>; }; From 087a8e39be56866804b09574b0d63fff7c667ad1 Mon Sep 17 00:00:00 2001 From: Sven Eckelmann Date: Tue, 25 Oct 2022 09:12:16 +0200 Subject: [PATCH 59/62] ipq40xx: utilize nvmem-cells for openmesh,a62 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The calibration data and mac addresses on this device are stored in the 0:ART partition. It is therefore possible to move the code to handle them directly to the devicetree instead of the various scripts. But the actual relevant information about the partition layout is provided by the bootloader via bootargs (mtdparts) and not via the devicetree itself. Instead of using a fixed-partition template, the mtd dynamic partitions support from the upstream kernel is used. Reported-by: Robert Marko Reviewed-by: Robert Marko Tested-by: Michaël BILCOT Signed-off-by: Sven Eckelmann --- .../ipq40xx/base-files/etc/board.d/02_network | 3 -- .../etc/hotplug.d/firmware/11-ath10k-caldata | 3 -- .../lib/preinit/05_set_iface_mac_ipq40xx.sh | 4 -- .../arch/arm/boot/dts/qcom-ipq4019-a62.dts | 45 +++++++++++++++++++ 4 files changed, 45 insertions(+), 10 deletions(-) diff --git a/target/linux/ipq40xx/base-files/etc/board.d/02_network b/target/linux/ipq40xx/base-files/etc/board.d/02_network index 46e6a3f9bd..e682a0fb15 100644 --- a/target/linux/ipq40xx/base-files/etc/board.d/02_network +++ b/target/linux/ipq40xx/base-files/etc/board.d/02_network @@ -163,9 +163,6 @@ ipq40xx_setup_macs() pakedge,wr-1) wan_mac=$(macaddr_add $(get_mac_label) 1) ;; - openmesh,a62) - label_mac="$(mtd_get_mac_binary "0:ART" 0x0)" - ;; esac [ -n "$lan_mac" ] && ucidef_set_interface_macaddr "lan" $lan_mac diff --git a/target/linux/ipq40xx/base-files/etc/hotplug.d/firmware/11-ath10k-caldata b/target/linux/ipq40xx/base-files/etc/hotplug.d/firmware/11-ath10k-caldata index 559aacea1e..9cdbaa3d4e 100644 --- a/target/linux/ipq40xx/base-files/etc/hotplug.d/firmware/11-ath10k-caldata +++ b/target/linux/ipq40xx/base-files/etc/hotplug.d/firmware/11-ath10k-caldata @@ -34,7 +34,6 @@ case "$FIRMWARE" in /usr/bin/fritz_cal_extract -i 1 -s 0x3C800 -e 0x212 -l 12064 -o /lib/firmware/$FIRMWARE $(find_mtd_chardev "urlader1") || \ /usr/bin/fritz_cal_extract -i 1 -s 0x3C000 -e 0x212 -l 12064 -o /lib/firmware/$FIRMWARE $(find_mtd_chardev "urlader1") ;; - openmesh,a62 |\ plasmacloud,pa2200) caldata_extract "0:ART" 0x9000 0x2f20 ;; @@ -77,7 +76,6 @@ case "$FIRMWARE" in /usr/bin/fritz_cal_extract -i 1 -s 0x3D000 -e 0x207 -l 12064 -o /lib/firmware/$FIRMWARE $(find_mtd_chardev "urlader1") ;; cellc,rtl30vw |\ - openmesh,a62 |\ plasmacloud,pa1200 |\ plasmacloud,pa2200) caldata_extract "0:ART" 0x1000 0x2f20 @@ -173,7 +171,6 @@ case "$FIRMWARE" in /usr/bin/fritz_cal_extract -i 1 -s 0x3C000 -e 0x208 -l 12064 -o /lib/firmware/$FIRMWARE $(find_mtd_chardev "urlader1") ;; cellc,rtl30vw |\ - openmesh,a62 |\ plasmacloud,pa1200 |\ plasmacloud,pa2200) caldata_extract "0:ART" 0x5000 0x2f20 diff --git a/target/linux/ipq40xx/base-files/lib/preinit/05_set_iface_mac_ipq40xx.sh b/target/linux/ipq40xx/base-files/lib/preinit/05_set_iface_mac_ipq40xx.sh index 81d22686a3..ddfef1ab2d 100644 --- a/target/linux/ipq40xx/base-files/lib/preinit/05_set_iface_mac_ipq40xx.sh +++ b/target/linux/ipq40xx/base-files/lib/preinit/05_set_iface_mac_ipq40xx.sh @@ -29,10 +29,6 @@ preinit_set_mac_address() { ip link set dev lan1 address $(macaddr_add "$base_mac" 1) ip link set dev eth0 address $(macaddr_setbit "$base_mac" 7) ;; - openmesh,a62) - ip link set dev ethernet1 address $(mtd_get_mac_binary "0:ART" 0x0) - ip link set dev ethernet2 address $(mtd_get_mac_binary "0:ART" 0x6) - ;; mikrotik,wap-ac) base_mac=$(cat /sys/firmware/mikrotik/hard_config/mac_base) ip link set dev sw-eth1 address "$base_mac" diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-a62.dts b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-a62.dts index 11d27ab339..d348101110 100644 --- a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-a62.dts +++ b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-a62.dts @@ -71,6 +71,7 @@ led-failsafe = &led_status_green; led-running = &led_status_green; led-upgrade = &led_status_green; + label-mac-device = &swport4; }; leds { @@ -151,7 +152,36 @@ compatible = "jedec,spi-nor"; reg = <0>; spi-max-frequency = <24000000>; + /* partitions are passed via bootloader */ + partitions { + partition-art { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + label = "0:ART"; + + precal_art_1000: precal@1000 { + reg = <0x1000 0x2f20>; + }; + + precal_art_5000: precal@5000 { + reg = <0x5000 0x2f20>; + }; + + precal_art_9000: precal@9000 { + reg = <0x9000 0x2f20>; + }; + + macaddr_gmac0: macaddr@0 { + reg = <0x0 0x6>; + }; + + macaddr_gmac1: macaddr@6 { + reg = <0x6 0x6>; + }; + }; + }; }; }; @@ -186,6 +216,9 @@ reg = <0x00010000 0 0 0 0>; qcom,ath10k-calibration-variant = "OM-A62"; ieee80211-freq-limit = <5170000 5350000>; + + nvmem-cell-names = "pre-calibration"; + nvmem-cells = <&precal_art_9000>; }; }; }; @@ -205,20 +238,32 @@ &swport4 { status = "okay"; label = "ethernet1"; + + nvmem-cell-names = "mac-address"; + nvmem-cells = <&macaddr_gmac0>; }; &swport5 { status = "okay"; label = "ethernet2"; + + nvmem-cell-names = "mac-address"; + nvmem-cells = <&macaddr_gmac1>; }; &wifi0 { status = "okay"; qcom,ath10k-calibration-variant = "OM-A62"; + + nvmem-cell-names = "pre-calibration"; + nvmem-cells = <&precal_art_1000>; }; &wifi1 { status = "okay"; qcom,ath10k-calibration-variant = "OM-A62"; ieee80211-freq-limit = <5470000 5875000>; + + nvmem-cell-names = "pre-calibration"; + nvmem-cells = <&precal_art_5000>; }; From 9179f484bfcb37e1c59e736b2a64c9583eb00356 Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Sat, 12 Nov 2022 19:18:54 +0100 Subject: [PATCH 60/62] mt76: update to the latest version 4bf2607362fc wifi: mt76: fix dbdc number of spatial streams limit Signed-off-by: Felix Fietkau --- package/kernel/mt76/Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package/kernel/mt76/Makefile b/package/kernel/mt76/Makefile index fca92f17e7..d1a92949a3 100644 --- a/package/kernel/mt76/Makefile +++ b/package/kernel/mt76/Makefile @@ -8,9 +8,9 @@ PKG_LICENSE_FILES:= PKG_SOURCE_URL:=https://github.com/openwrt/mt76 PKG_SOURCE_PROTO:=git -PKG_SOURCE_DATE:=2022-11-11 -PKG_SOURCE_VERSION:=4a27f23fc4f22510db81513680666be7e72ccb61 -PKG_MIRROR_HASH:=2cb9a446c6df7d56efc8ace46227964b492bdc3cae6bdbcc2e03fdd1b836b5a6 +PKG_SOURCE_DATE:=2022-11-12 +PKG_SOURCE_VERSION:=4bf2607362fc64fc4cb7d662feb736b7536c0811 +PKG_MIRROR_HASH:=fd4291ac89e14750073cc8c345772883d756bf32cf19fc7205fa344b5b3b91d0 PKG_MAINTAINER:=Felix Fietkau PKG_USE_NINJA:=0 From 6f729163b18fb5860f1aa5a5a0c8861a8e3f53ad Mon Sep 17 00:00:00 2001 From: Andre Heider Date: Sat, 12 Nov 2022 18:52:14 +0100 Subject: [PATCH 61/62] mt76: move the mt7921 firmware to its own package It's not just required for the PCI version, but for USB and presumably SDIO as well. Tested with 0e8d:7961 Comfast CF-953AX (MT7921AU). Signed-off-by: Andre Heider --- package/kernel/mt76/Makefile | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/package/kernel/mt76/Makefile b/package/kernel/mt76/Makefile index d1a92949a3..4b9a8885e9 100644 --- a/package/kernel/mt76/Makefile +++ b/package/kernel/mt76/Makefile @@ -1,7 +1,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=mt76 -PKG_RELEASE=4 +PKG_RELEASE=5 PKG_LICENSE:=GPLv2 PKG_LICENSE_FILES:= @@ -238,11 +238,16 @@ define KernelPackage/mt7986-firmware TITLE:=MediaTek MT7986 firmware endef +define KernelPackage/mt7921-firmware + $(KernelPackage/mt76-default) + TITLE:=MediaTek MT7921 firmware +endef + define KernelPackage/mt7921-common $(KernelPackage/mt76-default) TITLE:=MediaTek MT7615 wireless driver common code HIDDEN:=1 - DEPENDS+=+kmod-mt76-connac +@DRIVER_11AX_SUPPORT + DEPENDS+=+kmod-mt76-connac +kmod-mt7921-firmware +@DRIVER_11AX_SUPPORT FILES:= $(PKG_BUILD_DIR)/mt7921/mt7921-common.ko endef @@ -488,7 +493,7 @@ define KernelPackage/mt7986-firmware/install $(1)/lib/firmware/mediatek endef -define KernelPackage/mt7921e/install +define KernelPackage/mt7921-firmware/install $(INSTALL_DIR) $(1)/lib/firmware/mediatek cp \ $(PKG_BUILD_DIR)/firmware/WIFI_MT7961_patch_mcu_1_2_hdr.bin \ @@ -525,6 +530,7 @@ $(eval $(call KernelPackage,mt7663s)) $(eval $(call KernelPackage,mt7915e)) $(eval $(call KernelPackage,mt7916-firmware)) $(eval $(call KernelPackage,mt7986-firmware)) +$(eval $(call KernelPackage,mt7921-firmware)) $(eval $(call KernelPackage,mt7921-common)) $(eval $(call KernelPackage,mt7921u)) $(eval $(call KernelPackage,mt7921s)) From b97e5ac785960c13199239dd4821dd53f3801da3 Mon Sep 17 00:00:00 2001 From: Hauke Mehrtens Date: Sat, 12 Nov 2022 22:53:04 +0100 Subject: [PATCH 62/62] bcm4908: Refresh kernel patches Refresh the kernel patches for this target. No manual changes. Fixes: 45ac906c641 ("bcm4908: update DTS files with the latest changes") Signed-off-by: Hauke Mehrtens --- ...ts-Move-BCM4908-dts-to-bcmbca-folder.patch | 2454 +++++++++++++++- ...ts-Move-BCM4908-dts-to-bcmbca-folder.patch | 2470 ++++++++++++++++- 2 files changed, 4876 insertions(+), 48 deletions(-) diff --git a/target/linux/bcm4908/patches-5.10/038-v6.1-0005-arm64-dts-Move-BCM4908-dts-to-bcmbca-folder.patch b/target/linux/bcm4908/patches-5.10/038-v6.1-0005-arm64-dts-Move-BCM4908-dts-to-bcmbca-folder.patch index d494c5a728..70484ab93f 100644 --- a/target/linux/bcm4908/patches-5.10/038-v6.1-0005-arm64-dts-Move-BCM4908-dts-to-bcmbca-folder.patch +++ b/target/linux/bcm4908/patches-5.10/038-v6.1-0005-arm64-dts-Move-BCM4908-dts-to-bcmbca-folder.patch @@ -59,27 +59,2433 @@ Signed-off-by: Florian Fainelli bcm4912-asus-gt-ax6000.dtb \ bcm94912.dtb \ bcm963158.dtb \ -diff --git a/arch/arm64/boot/dts/broadcom/bcm4908/bcm4906-netgear-r8000p.dts b/arch/arm64/boot/dts/broadcom/bcmbca/bcm4906-netgear-r8000p.dts -similarity index 100% -rename from arch/arm64/boot/dts/broadcom/bcm4908/bcm4906-netgear-r8000p.dts -rename to arch/arm64/boot/dts/broadcom/bcmbca/bcm4906-netgear-r8000p.dts -diff --git a/arch/arm64/boot/dts/broadcom/bcm4908/bcm4906-tplink-archer-c2300-v1.dts b/arch/arm64/boot/dts/broadcom/bcmbca/bcm4906-tplink-archer-c2300-v1.dts -similarity index 100% -rename from arch/arm64/boot/dts/broadcom/bcm4908/bcm4906-tplink-archer-c2300-v1.dts -rename to arch/arm64/boot/dts/broadcom/bcmbca/bcm4906-tplink-archer-c2300-v1.dts -diff --git a/arch/arm64/boot/dts/broadcom/bcm4908/bcm4906.dtsi b/arch/arm64/boot/dts/broadcom/bcmbca/bcm4906.dtsi -similarity index 100% -rename from arch/arm64/boot/dts/broadcom/bcm4908/bcm4906.dtsi -rename to arch/arm64/boot/dts/broadcom/bcmbca/bcm4906.dtsi -diff --git a/arch/arm64/boot/dts/broadcom/bcm4908/bcm4908-asus-gt-ac5300.dts b/arch/arm64/boot/dts/broadcom/bcmbca/bcm4908-asus-gt-ac5300.dts -similarity index 100% -rename from arch/arm64/boot/dts/broadcom/bcm4908/bcm4908-asus-gt-ac5300.dts -rename to arch/arm64/boot/dts/broadcom/bcmbca/bcm4908-asus-gt-ac5300.dts -diff --git a/arch/arm64/boot/dts/broadcom/bcm4908/bcm4908-netgear-raxe500.dts b/arch/arm64/boot/dts/broadcom/bcmbca/bcm4908-netgear-raxe500.dts -similarity index 100% -rename from arch/arm64/boot/dts/broadcom/bcm4908/bcm4908-netgear-raxe500.dts -rename to arch/arm64/boot/dts/broadcom/bcmbca/bcm4908-netgear-raxe500.dts -diff --git a/arch/arm64/boot/dts/broadcom/bcm4908/bcm4908.dtsi b/arch/arm64/boot/dts/broadcom/bcmbca/bcm4908.dtsi -similarity index 100% -rename from arch/arm64/boot/dts/broadcom/bcm4908/bcm4908.dtsi -rename to arch/arm64/boot/dts/broadcom/bcmbca/bcm4908.dtsi +--- a/arch/arm64/boot/dts/broadcom/bcm4908/bcm4906-netgear-r8000p.dts ++++ /dev/null +@@ -1,157 +0,0 @@ +-// SPDX-License-Identifier: GPL-2.0-or-later OR MIT +- +-#include +-#include +-#include +- +-#include "bcm4906.dtsi" +- +-/ { +- compatible = "netgear,r8000p", "brcm,bcm4906", "brcm,bcm4908", "brcm,bcmbca"; +- model = "Netgear R8000P"; +- +- memory@0 { +- device_type = "memory"; +- reg = <0x00 0x00 0x00 0x20000000>; +- }; +- +- leds { +- compatible = "gpio-leds"; +- +- led-power-white { +- function = LED_FUNCTION_POWER; +- color = ; +- gpios = <&gpio0 8 GPIO_ACTIVE_LOW>; +- }; +- +- led-power-amber { +- function = LED_FUNCTION_POWER; +- color = ; +- gpios = <&gpio0 9 GPIO_ACTIVE_LOW>; +- }; +- +- led-wps { +- function = LED_FUNCTION_WPS; +- color = ; +- gpios = <&gpio0 10 GPIO_ACTIVE_LOW>; +- }; +- +- led-2ghz { +- function = "2ghz"; +- color = ; +- gpios = <&gpio0 14 GPIO_ACTIVE_LOW>; +- }; +- +- led-5ghz-1 { +- function = "5ghz-1"; +- color = ; +- gpios = <&gpio0 15 GPIO_ACTIVE_LOW>; +- }; +- +- led-5ghz-2 { +- function = "5ghz-2"; +- color = ; +- gpios = <&gpio0 16 GPIO_ACTIVE_LOW>; +- }; +- +- led-usb2 { +- function = "usb2"; +- color = ; +- gpios = <&gpio0 17 GPIO_ACTIVE_LOW>; +- }; +- +- led-usb3 { +- function = "usb3"; +- color = ; +- gpios = <&gpio0 18 GPIO_ACTIVE_LOW>; +- }; +- +- led-wifi { +- function = "wifi"; +- color = ; +- gpios = <&gpio0 56 GPIO_ACTIVE_LOW>; +- }; +- }; +-}; +- +-&enet { +- nvmem-cells = <&base_mac_addr>; +- nvmem-cell-names = "mac-address"; +-}; +- +-&usb_phy { +- brcm,ioc = <1>; +- status = "okay"; +-}; +- +-&ehci { +- status = "okay"; +-}; +- +-&ohci { +- status = "okay"; +-}; +- +-&xhci { +- status = "okay"; +-}; +- +-&ports { +- port@0 { +- label = "lan4"; +- }; +- +- port@1 { +- label = "lan3"; +- }; +- +- port@2 { +- label = "lan2"; +- }; +- +- port@3 { +- label = "lan1"; +- }; +- +- port@7 { +- reg = <7>; +- phy-mode = "internal"; +- phy-handle = <&phy12>; +- label = "wan"; +- }; +-}; +- +-&nandcs { +- nand-ecc-strength = <4>; +- nand-ecc-step-size = <512>; +- nand-on-flash-bbt; +- +- #address-cells = <1>; +- #size-cells = <0>; +- +- partitions { +- compatible = "fixed-partitions"; +- #address-cells = <1>; +- #size-cells = <1>; +- +- partition@0 { +- compatible = "nvmem-cells"; +- label = "cferom"; +- reg = <0x0 0x100000>; +- +- #address-cells = <1>; +- #size-cells = <1>; +- ranges = <0 0x0 0x100000>; +- +- base_mac_addr: mac@106a0 { +- reg = <0x106a0 0x6>; +- }; +- }; +- +- partition@100000 { +- compatible = "brcm,bcm4908-firmware"; +- label = "firmware"; +- reg = <0x100000 0x4400000>; +- }; +- }; +-}; +--- a/arch/arm64/boot/dts/broadcom/bcm4908/bcm4906-tplink-archer-c2300-v1.dts ++++ /dev/null +@@ -1,182 +0,0 @@ +-// SPDX-License-Identifier: GPL-2.0-or-later OR MIT +- +-#include +-#include +-#include +- +-#include "bcm4906.dtsi" +- +-/ { +- compatible = "tplink,archer-c2300-v1", "brcm,bcm4906", "brcm,bcm4908", "brcm,bcmbca"; +- model = "TP-Link Archer C2300 V1"; +- +- memory@0 { +- device_type = "memory"; +- reg = <0x00 0x00 0x00 0x20000000>; +- }; +- +- leds { +- compatible = "gpio-leds"; +- +- led-power { +- function = LED_FUNCTION_POWER; +- color = ; +- gpios = <&gpio0 0 GPIO_ACTIVE_LOW>; +- }; +- +- led-2ghz { +- function = "2ghz"; +- color = ; +- gpios = <&gpio0 2 GPIO_ACTIVE_LOW>; +- }; +- +- led-5ghz { +- function = "5ghz"; +- color = ; +- gpios = <&gpio0 3 GPIO_ACTIVE_LOW>; +- }; +- +- led-wan-amber { +- function = LED_FUNCTION_WAN; +- color = ; +- gpios = <&gpio0 4 GPIO_ACTIVE_HIGH>; +- }; +- +- led-wan-blue { +- function = LED_FUNCTION_WAN; +- color = ; +- gpios = <&gpio0 10 GPIO_ACTIVE_LOW>; +- }; +- +- led-lan { +- function = LED_FUNCTION_LAN; +- color = ; +- gpios = <&gpio0 12 GPIO_ACTIVE_LOW>; +- }; +- +- led-wps { +- function = LED_FUNCTION_WPS; +- color = ; +- gpios = <&gpio0 14 GPIO_ACTIVE_LOW>; +- }; +- +- led-usb2 { +- function = "usb2"; +- color = ; +- gpios = <&gpio0 15 GPIO_ACTIVE_LOW>; +- }; +- +- led-usb3 { +- function = "usbd3"; +- color = ; +- gpios = <&gpio0 17 GPIO_ACTIVE_LOW>; +- }; +- +- led-brightness { +- function = LED_FUNCTION_BACKLIGHT; +- color = ; +- gpios = <&gpio0 19 GPIO_ACTIVE_LOW>; +- }; +- }; +- +- gpio-keys-polled { +- compatible = "gpio-keys-polled"; +- poll-interval = <100>; +- +- key-brightness { +- label = "LEDs"; +- linux,code = ; +- gpios = <&gpio0 18 GPIO_ACTIVE_LOW>; +- }; +- +- key-wps { +- label = "WPS"; +- linux,code = ; +- gpios = <&gpio0 21 GPIO_ACTIVE_LOW>; +- }; +- +- key-wifi { +- label = "WiFi"; +- linux,code = ; +- gpios = <&gpio0 22 GPIO_ACTIVE_LOW>; +- }; +- +- key-restart { +- label = "Reset"; +- linux,code = ; +- gpios = <&gpio0 23 GPIO_ACTIVE_LOW>; +- }; +- }; +-}; +- +-&usb_phy { +- brcm,ioc = <1>; +- status = "okay"; +-}; +- +-&ehci { +- status = "okay"; +-}; +- +-&ohci { +- status = "okay"; +-}; +- +-&xhci { +- status = "okay"; +-}; +- +-&ports { +- port@0 { +- label = "lan4"; +- }; +- +- port@1 { +- label = "lan3"; +- }; +- +- port@2 { +- label = "lan2"; +- }; +- +- port@3 { +- label = "lan1"; +- }; +- +- port@7 { +- reg = <7>; +- phy-mode = "internal"; +- phy-handle = <&phy12>; +- label = "wan"; +- }; +-}; +- +-&nandcs { +- nand-ecc-strength = <4>; +- nand-ecc-step-size = <512>; +- nand-on-flash-bbt; +- +- #address-cells = <1>; +- #size-cells = <0>; +- +- partitions { +- compatible = "brcm,bcm4908-partitions"; +- #address-cells = <1>; +- #size-cells = <1>; +- +- partition@0 { +- label = "cferom"; +- reg = <0x0 0x100000>; +- }; +- +- partition@100000 { +- compatible = "brcm,bcm4908-firmware"; +- reg = <0x100000 0x3900000>; +- }; +- +- partition@5800000 { +- compatible = "brcm,bcm4908-firmware"; +- reg = <0x3a00000 0x3900000>; +- }; +- }; +-}; +--- a/arch/arm64/boot/dts/broadcom/bcm4908/bcm4906.dtsi ++++ /dev/null +@@ -1,26 +0,0 @@ +-// SPDX-License-Identifier: GPL-2.0-or-later OR MIT +- +-#include "bcm4908.dtsi" +- +-/ { +- cpus { +- /delete-node/ cpu@2; +- +- /delete-node/ cpu@3; +- }; +- +- timer { +- compatible = "arm,armv8-timer"; +- interrupts = , +- , +- , +- ; +- }; +- +- pmu { +- compatible = "arm,cortex-a53-pmu"; +- interrupts = , +- ; +- interrupt-affinity = <&cpu0>, <&cpu1>; +- }; +-}; +--- a/arch/arm64/boot/dts/broadcom/bcm4908/bcm4908-asus-gt-ac5300.dts ++++ /dev/null +@@ -1,207 +0,0 @@ +-// SPDX-License-Identifier: GPL-2.0-or-later OR MIT +- +-#include +-#include +-#include +- +-#include "bcm4908.dtsi" +- +-/ { +- compatible = "asus,gt-ac5300", "brcm,bcm4908", "brcm,bcmbca"; +- model = "Asus GT-AC5300"; +- +- memory@0 { +- device_type = "memory"; +- reg = <0x00 0x00 0x00 0x40000000>; +- }; +- +- gpio-keys-polled { +- compatible = "gpio-keys-polled"; +- poll-interval = <100>; +- +- key-wifi { +- label = "WiFi"; +- linux,code = ; +- gpios = <&gpio0 28 GPIO_ACTIVE_LOW>; +- }; +- +- key-wps { +- label = "WPS"; +- linux,code = ; +- gpios = <&gpio0 29 GPIO_ACTIVE_LOW>; +- }; +- +- key-restart { +- label = "Reset"; +- linux,code = ; +- gpios = <&gpio0 30 GPIO_ACTIVE_LOW>; +- }; +- +- key-brightness { +- label = "LEDs"; +- linux,code = ; +- gpios = <&gpio0 31 GPIO_ACTIVE_LOW>; +- }; +- }; +-}; +- +-&enet { +- nvmem-cells = <&base_mac_addr>; +- nvmem-cell-names = "mac-address"; +-}; +- +-&usb_phy { +- brcm,ioc = <1>; +- status = "okay"; +-}; +- +-&ehci { +- status = "okay"; +-}; +- +-&ohci { +- status = "okay"; +-}; +- +-&xhci { +- status = "okay"; +-}; +- +-&ports { +- port@0 { +- label = "lan2"; +- }; +- +- port@1 { +- label = "lan1"; +- }; +- +- port@2 { +- label = "lan6"; +- }; +- +- port@3 { +- label = "lan5"; +- }; +- +- /* External BCM53134S switch */ +- port@7 { +- label = "sw"; +- reg = <7>; +- phy-mode = "rgmii"; +- +- fixed-link { +- speed = <1000>; +- full-duplex; +- }; +- }; +-}; +- +-&mdio { +- /* lan8 */ +- ethernet-phy@0 { +- reg = <0>; +- }; +- +- /* lan7 */ +- ethernet-phy@1 { +- reg = <1>; +- }; +- +- /* lan4 */ +- ethernet-phy@2 { +- reg = <2>; +- }; +- +- /* lan3 */ +- ethernet-phy@3 { +- reg = <3>; +- }; +-}; +- +-&leds { +- led-power@11 { +- reg = <0x11>; +- function = LED_FUNCTION_POWER; +- color = ; +- default-state = "on"; +- active-low; +- pinctrl-names = "default"; +- pinctrl-0 = <&pins_led_17_a>; +- }; +- +- led-wan-red@12 { +- reg = <0x12>; +- function = LED_FUNCTION_WAN; +- color = ; +- active-low; +- pinctrl-names = "default"; +- pinctrl-0 = <&pins_led_18_a>; +- }; +- +- led-wps@14 { +- reg = <0x14>; +- function = LED_FUNCTION_WPS; +- color = ; +- active-low; +- pinctrl-names = "default"; +- pinctrl-0 = <&pins_led_20_a>; +- }; +- +- led-wan-white@15 { +- reg = <0x15>; +- function = LED_FUNCTION_WAN; +- color = ; +- active-low; +- pinctrl-names = "default"; +- pinctrl-0 = <&pins_led_21_a>; +- }; +- +- led-lan@19 { +- reg = <0x19>; +- function = LED_FUNCTION_LAN; +- color = ; +- pinctrl-names = "default"; +- pinctrl-0 = <&pins_led_25_a>; +- }; +-}; +- +-&nandcs { +- nand-ecc-strength = <4>; +- nand-ecc-step-size = <512>; +- nand-on-flash-bbt; +- brcm,nand-has-wp; +- +- #address-cells = <1>; +- #size-cells = <0>; +- +- partitions { +- compatible = "brcm,bcm4908-partitions"; +- #address-cells = <1>; +- #size-cells = <1>; +- +- partition@0 { +- compatible = "nvmem-cells"; +- label = "cferom"; +- reg = <0x0 0x100000>; +- +- #address-cells = <1>; +- #size-cells = <1>; +- ranges = <0 0x0 0x100000>; +- +- base_mac_addr: mac@106a0 { +- reg = <0x106a0 0x6>; +- }; +- }; +- +- partition@100000 { +- compatible = "brcm,bcm4908-firmware"; +- reg = <0x100000 0x5700000>; +- }; +- +- partition@5800000 { +- compatible = "brcm,bcm4908-firmware"; +- reg = <0x5800000 0x5700000>; +- }; +- }; +-}; +--- a/arch/arm64/boot/dts/broadcom/bcm4908/bcm4908-netgear-raxe500.dts ++++ /dev/null +@@ -1,50 +0,0 @@ +-// SPDX-License-Identifier: GPL-2.0-or-later OR MIT +- +-#include "bcm4908.dtsi" +- +-/ { +- compatible = "netgear,raxe500", "brcm,bcm4908", "brcm,bcmbca"; +- model = "Netgear RAXE500"; +- +- memory@0 { +- device_type = "memory"; +- reg = <0x00 0x00 0x00 0x40000000>; +- }; +-}; +- +-&ehci { +- status = "okay"; +-}; +- +-&ohci { +- status = "okay"; +-}; +- +-&xhci { +- status = "okay"; +-}; +- +-&ports { +- port@0 { +- label = "lan4"; +- }; +- +- port@1 { +- label = "lan3"; +- }; +- +- port@2 { +- label = "lan2"; +- }; +- +- port@3 { +- label = "lan1"; +- }; +- +- port@7 { +- reg = <7>; +- phy-mode = "internal"; +- phy-handle = <&phy12>; +- label = "wan"; +- }; +-}; +--- a/arch/arm64/boot/dts/broadcom/bcm4908/bcm4908.dtsi ++++ /dev/null +@@ -1,575 +0,0 @@ +-// SPDX-License-Identifier: GPL-2.0-or-later OR MIT +- +-#include +-#include +-#include +-#include +- +-/dts-v1/; +- +-/ { +- interrupt-parent = <&gic>; +- +- #address-cells = <2>; +- #size-cells = <2>; +- +- aliases { +- serial0 = &uart0; +- }; +- +- chosen { +- stdout-path = "serial0:115200n8"; +- }; +- +- cpus { +- #address-cells = <1>; +- #size-cells = <0>; +- +- cpu0: cpu@0 { +- device_type = "cpu"; +- compatible = "brcm,brahma-b53"; +- reg = <0x0>; +- enable-method = "spin-table"; +- cpu-release-addr = <0x0 0xfff8>; +- next-level-cache = <&l2>; +- }; +- +- cpu1: cpu@1 { +- device_type = "cpu"; +- compatible = "brcm,brahma-b53"; +- reg = <0x1>; +- enable-method = "spin-table"; +- cpu-release-addr = <0x0 0xfff8>; +- next-level-cache = <&l2>; +- }; +- +- cpu2: cpu@2 { +- device_type = "cpu"; +- compatible = "brcm,brahma-b53"; +- reg = <0x2>; +- enable-method = "spin-table"; +- cpu-release-addr = <0x0 0xfff8>; +- next-level-cache = <&l2>; +- }; +- +- cpu3: cpu@3 { +- device_type = "cpu"; +- compatible = "brcm,brahma-b53"; +- reg = <0x3>; +- enable-method = "spin-table"; +- cpu-release-addr = <0x0 0xfff8>; +- next-level-cache = <&l2>; +- }; +- +- l2: l2-cache0 { +- compatible = "cache"; +- }; +- }; +- +- axi@81000000 { +- compatible = "simple-bus"; +- #address-cells = <1>; +- #size-cells = <1>; +- ranges = <0x00 0x00 0x81000000 0x4000>; +- +- gic: interrupt-controller@1000 { +- compatible = "arm,gic-400"; +- #interrupt-cells = <3>; +- #address-cells = <0>; +- interrupt-controller; +- reg = <0x1000 0x1000>, +- <0x2000 0x2000>; +- }; +- }; +- +- timer { +- compatible = "arm,armv8-timer"; +- interrupts = , +- , +- , +- ; +- }; +- +- pmu { +- compatible = "arm,cortex-a53-pmu"; +- interrupts = , +- , +- , +- ; +- interrupt-affinity = <&cpu0>, <&cpu1>, <&cpu2>, <&cpu3>; +- }; +- +- clocks { +- periph_clk: periph_clk { +- compatible = "fixed-clock"; +- #clock-cells = <0>; +- clock-frequency = <50000000>; +- clock-output-names = "periph"; +- }; +- }; +- +- soc { +- compatible = "simple-bus"; +- #address-cells = <1>; +- #size-cells = <1>; +- ranges = <0x00 0x00 0x80000000 0x281000>; +- +- enet: ethernet@2000 { +- compatible = "brcm,bcm4908-enet"; +- reg = <0x2000 0x1000>; +- +- interrupts = , +- ; +- interrupt-names = "rx", "tx"; +- }; +- +- usb_phy: usb-phy@c200 { +- compatible = "brcm,bcm4908-usb-phy"; +- reg = <0xc200 0x100>; +- reg-names = "ctrl"; +- power-domains = <&pmb BCM_PMB_HOST_USB>; +- dr_mode = "host"; +- brcm,has-xhci; +- brcm,has-eohci; +- #phy-cells = <1>; +- status = "disabled"; +- }; +- +- ehci: usb@c300 { +- compatible = "generic-ehci"; +- reg = <0xc300 0x100>; +- interrupts = ; +- phys = <&usb_phy PHY_TYPE_USB2>; +- status = "disabled"; +- }; +- +- ohci: usb@c400 { +- compatible = "generic-ohci"; +- reg = <0xc400 0x100>; +- interrupts = ; +- phys = <&usb_phy PHY_TYPE_USB2>; +- status = "disabled"; +- }; +- +- xhci: usb@d000 { +- compatible = "generic-xhci"; +- reg = <0xd000 0x8c8>; +- interrupts = ; +- phys = <&usb_phy PHY_TYPE_USB3>; +- status = "disabled"; +- }; +- +- bus@80000 { +- compatible = "simple-bus"; +- #size-cells = <1>; +- #address-cells = <1>; +- ranges = <0 0x80000 0x50000>; +- +- ethernet-switch@0 { +- compatible = "brcm,bcm4908-switch"; +- reg = <0x0 0x40000>, +- <0x40000 0x110>, +- <0x40340 0x30>, +- <0x40380 0x30>, +- <0x40600 0x34>, +- <0x40800 0x208>; +- reg-names = "core", "reg", "intrl2_0", +- "intrl2_1", "fcb", "acb"; +- interrupts = , +- ; +- brcm,num-gphy = <5>; +- brcm,num-rgmii-ports = <2>; +- +- #address-cells = <1>; +- #size-cells = <0>; +- +- ports: ports { +- #address-cells = <1>; +- #size-cells = <0>; +- +- port@0 { +- reg = <0>; +- phy-mode = "internal"; +- phy-handle = <&phy8>; +- }; +- +- port@1 { +- reg = <1>; +- phy-mode = "internal"; +- phy-handle = <&phy9>; +- }; +- +- port@2 { +- reg = <2>; +- phy-mode = "internal"; +- phy-handle = <&phy10>; +- }; +- +- port@3 { +- reg = <3>; +- phy-mode = "internal"; +- phy-handle = <&phy11>; +- }; +- +- port@8 { +- reg = <8>; +- phy-mode = "internal"; +- ethernet = <&enet>; +- +- fixed-link { +- speed = <1000>; +- full-duplex; +- }; +- }; +- }; +- }; +- +- mdio: mdio@405c0 { +- compatible = "brcm,unimac-mdio"; +- reg = <0x405c0 0x8>; +- reg-names = "mdio"; +- #size-cells = <0>; +- #address-cells = <1>; +- +- phy8: ethernet-phy@8 { +- reg = <8>; +- }; +- +- phy9: ethernet-phy@9 { +- reg = <9>; +- }; +- +- phy10: ethernet-phy@a { +- reg = <10>; +- }; +- +- phy11: ethernet-phy@b { +- reg = <11>; +- }; +- +- phy12: ethernet-phy@c { +- reg = <12>; +- }; +- }; +- }; +- +- procmon: syscon@280000 { +- compatible = "simple-bus"; +- reg = <0x280000 0x1000>; +- ranges; +- +- #address-cells = <1>; +- #size-cells = <1>; +- +- pmb: power-controller@2800c0 { +- compatible = "brcm,bcm4908-pmb"; +- reg = <0x2800c0 0x40>; +- #power-domain-cells = <1>; +- }; +- }; +- }; +- +- bus@ff800000 { +- compatible = "simple-bus"; +- #address-cells = <1>; +- #size-cells = <1>; +- ranges = <0x00 0x00 0xff800000 0x3000>; +- +- twd: timer-mfd@400 { +- compatible = "brcm,bcm4908-twd", "simple-mfd", "syscon"; +- reg = <0x400 0x4c>; +- ranges = <0x0 0x400 0x4c>; +- +- #address-cells = <1>; +- #size-cells = <1>; +- +- watchdog@28 { +- compatible = "brcm,bcm6345-wdt"; +- reg = <0x28 0x8>; +- }; +- }; +- +- gpio0: gpio-controller@500 { +- compatible = "brcm,bcm6345-gpio"; +- reg-names = "dirout", "dat"; +- reg = <0x500 0x28>, <0x528 0x28>; +- +- #gpio-cells = <2>; +- gpio-controller; +- }; +- +- pinctrl@560 { +- compatible = "brcm,bcm4908-pinctrl"; +- reg = <0x560 0x10>; +- +- pins_led_0_a: led_0-a-pins { +- function = "led_0"; +- groups = "led_0_grp_a"; +- }; +- +- pins_led_1_a: led_1-a-pins { +- function = "led_1"; +- groups = "led_1_grp_a"; +- }; +- +- pins_led_2_a: led_2-a-pins { +- function = "led_2"; +- groups = "led_2_grp_a"; +- }; +- +- pins_led_3_a: led_3-a-pins { +- function = "led_3"; +- groups = "led_3_grp_a"; +- }; +- +- pins_led_4_a: led_4-a-pins { +- function = "led_4"; +- groups = "led_4_grp_a"; +- }; +- +- pins_led_5_a: led_5-a-pins { +- function = "led_5"; +- groups = "led_5_grp_a"; +- }; +- +- pins_led_6_a: led_6-a-pins { +- function = "led_6"; +- groups = "led_6_grp_a"; +- }; +- +- pins_led_7_a: led_7-a-pins { +- function = "led_7"; +- groups = "led_7_grp_a"; +- }; +- +- pins_led_8_a: led_8-a-pins { +- function = "led_8"; +- groups = "led_8_grp_a"; +- }; +- +- pins_led_9_a: led_9-a-pins { +- function = "led_9"; +- groups = "led_9_grp_a"; +- }; +- +- pins_led_10_a: led_10-a-pins { +- function = "led_10"; +- groups = "led_10_grp_a"; +- }; +- +- pins_led_11_a: led_11-a-pins { +- function = "led_11"; +- groups = "led_11_grp_a"; +- }; +- +- pins_led_12_a: led_12-a-pins { +- function = "led_12"; +- groups = "led_12_grp_a"; +- }; +- +- pins_led_13_a: led_13-a-pins { +- function = "led_13"; +- groups = "led_13_grp_a"; +- }; +- +- pins_led_14_a: led_14-a-pins { +- function = "led_14"; +- groups = "led_14_grp_a"; +- }; +- +- pins_led_15_a: led_15-a-pins { +- function = "led_15"; +- groups = "led_15_grp_a"; +- }; +- +- pins_led_16_a: led_16-a-pins { +- function = "led_16"; +- groups = "led_16_grp_a"; +- }; +- +- pins_led_17_a: led_17-a-pins { +- function = "led_17"; +- groups = "led_17_grp_a"; +- }; +- +- pins_led_18_a: led_18-a-pins { +- function = "led_18"; +- groups = "led_18_grp_a"; +- }; +- +- pins_led_19_a: led_19-a-pins { +- function = "led_19"; +- groups = "led_19_grp_a"; +- }; +- +- pins_led_20_a: led_20-a-pins { +- function = "led_20"; +- groups = "led_20_grp_a"; +- }; +- +- pins_led_21_a: led_21-a-pins { +- function = "led_21"; +- groups = "led_21_grp_a"; +- }; +- +- pins_led_22_a: led_22-a-pins { +- function = "led_22"; +- groups = "led_22_grp_a"; +- }; +- +- pins_led_23_a: led_23-a-pins { +- function = "led_23"; +- groups = "led_23_grp_a"; +- }; +- +- pins_led_24_a: led_24-a-pins { +- function = "led_24"; +- groups = "led_24_grp_a"; +- }; +- +- pins_led_25_a: led_25-a-pins { +- function = "led_25"; +- groups = "led_25_grp_a"; +- }; +- +- pins_led_26_a: led_26-a-pins { +- function = "led_26"; +- groups = "led_26_grp_a"; +- }; +- +- pins_led_27_a: led_27-a-pins { +- function = "led_27"; +- groups = "led_27_grp_a"; +- }; +- +- pins_led_28_a: led_28-a-pins { +- function = "led_28"; +- groups = "led_28_grp_a"; +- }; +- +- pins_led_29_a: led_29-a-pins { +- function = "led_29"; +- groups = "led_29_grp_a"; +- }; +- +- pins_led_30_a: led_30-a-pins { +- function = "led_30"; +- groups = "led_30_grp_a"; +- }; +- +- pins_led_31_a: led_31-a-pins { +- function = "led_31"; +- groups = "led_31_grp_a"; +- }; +- +- pins_hs_uart: hs_uart-pins { +- function = "hs_uart"; +- groups = "hs_uart_grp"; +- }; +- +- pins_i2c_a: i2c-a-pins { +- function = "i2c"; +- groups = "i2c_grp_a"; +- }; +- +- pins_i2c_b: i2c-b-pins { +- function = "i2c"; +- groups = "i2c_grp_b"; +- }; +- +- pins_i2s: i2s-pins { +- function = "i2s"; +- groups = "i2s_grp"; +- }; +- +- pins_nand_ctrl: nand_ctrl-pins { +- function = "nand_ctrl"; +- groups = "nand_ctrl_grp"; +- }; +- +- pins_nand_data: nand_data-pins { +- function = "nand_data"; +- groups = "nand_data_grp"; +- }; +- +- pins_emmc_ctrl: emmc_ctrl-pins { +- function = "emmc_ctrl"; +- groups = "emmc_ctrl_grp"; +- }; +- +- pins_usb0_pwr: usb0_pwr-pins { +- function = "usb0_pwr"; +- groups = "usb0_pwr_grp"; +- }; +- +- pins_usb1_pwr: usb1_pwr-pins { +- function = "usb1_pwr"; +- groups = "usb1_pwr_grp"; +- }; +- }; +- +- uart0: serial@640 { +- compatible = "brcm,bcm6345-uart"; +- reg = <0x640 0x18>; +- interrupts = ; +- clocks = <&periph_clk>; +- clock-names = "refclk"; +- status = "okay"; +- }; +- +- leds: leds@800 { +- compatible = "brcm,bcm4908-leds", "brcm,bcm63138-leds"; +- reg = <0x800 0xdc>; +- +- #address-cells = <1>; +- #size-cells = <0>; +- }; +- +- nand-controller@1800 { +- #address-cells = <1>; +- #size-cells = <0>; +- compatible = "brcm,nand-bcm63138", "brcm,brcmnand-v7.1", "brcm,brcmnand"; +- reg = <0x1800 0x600>, <0x2000 0x10>; +- reg-names = "nand", "nand-int-base"; +- interrupts = ; +- interrupt-names = "nand"; +- status = "okay"; +- +- nandcs: nand@0 { +- compatible = "brcm,nandcs"; +- reg = <0>; +- }; +- }; +- +- i2c@2100 { +- compatible = "brcm,brcmper-i2c"; +- reg = <0x2100 0x58>; +- clock-frequency = <97500>; +- pinctrl-names = "default"; +- pinctrl-0 = <&pins_i2c_a>; +- status = "disabled"; +- }; +- +- misc@2600 { +- compatible = "brcm,misc", "simple-mfd"; +- reg = <0x2600 0xe4>; +- +- #address-cells = <1>; +- #size-cells = <1>; +- ranges = <0x00 0x2600 0xe4>; +- +- reset-controller@2644 { +- compatible = "brcm,bcm4908-misc-pcie-reset"; +- reg = <0x44 0x04>; +- #reset-cells = <1>; +- }; +- }; +- }; +- +- reboot { +- compatible = "syscon-reboot"; +- regmap = <&twd>; +- offset = <0x34>; +- mask = <1>; +- }; +-}; +--- /dev/null ++++ b/arch/arm64/boot/dts/broadcom/bcmbca/bcm4906-netgear-r8000p.dts +@@ -0,0 +1,157 @@ ++// SPDX-License-Identifier: GPL-2.0-or-later OR MIT ++ ++#include ++#include ++#include ++ ++#include "bcm4906.dtsi" ++ ++/ { ++ compatible = "netgear,r8000p", "brcm,bcm4906", "brcm,bcm4908", "brcm,bcmbca"; ++ model = "Netgear R8000P"; ++ ++ memory@0 { ++ device_type = "memory"; ++ reg = <0x00 0x00 0x00 0x20000000>; ++ }; ++ ++ leds { ++ compatible = "gpio-leds"; ++ ++ led-power-white { ++ function = LED_FUNCTION_POWER; ++ color = ; ++ gpios = <&gpio0 8 GPIO_ACTIVE_LOW>; ++ }; ++ ++ led-power-amber { ++ function = LED_FUNCTION_POWER; ++ color = ; ++ gpios = <&gpio0 9 GPIO_ACTIVE_LOW>; ++ }; ++ ++ led-wps { ++ function = LED_FUNCTION_WPS; ++ color = ; ++ gpios = <&gpio0 10 GPIO_ACTIVE_LOW>; ++ }; ++ ++ led-2ghz { ++ function = "2ghz"; ++ color = ; ++ gpios = <&gpio0 14 GPIO_ACTIVE_LOW>; ++ }; ++ ++ led-5ghz-1 { ++ function = "5ghz-1"; ++ color = ; ++ gpios = <&gpio0 15 GPIO_ACTIVE_LOW>; ++ }; ++ ++ led-5ghz-2 { ++ function = "5ghz-2"; ++ color = ; ++ gpios = <&gpio0 16 GPIO_ACTIVE_LOW>; ++ }; ++ ++ led-usb2 { ++ function = "usb2"; ++ color = ; ++ gpios = <&gpio0 17 GPIO_ACTIVE_LOW>; ++ }; ++ ++ led-usb3 { ++ function = "usb3"; ++ color = ; ++ gpios = <&gpio0 18 GPIO_ACTIVE_LOW>; ++ }; ++ ++ led-wifi { ++ function = "wifi"; ++ color = ; ++ gpios = <&gpio0 56 GPIO_ACTIVE_LOW>; ++ }; ++ }; ++}; ++ ++&enet { ++ nvmem-cells = <&base_mac_addr>; ++ nvmem-cell-names = "mac-address"; ++}; ++ ++&usb_phy { ++ brcm,ioc = <1>; ++ status = "okay"; ++}; ++ ++&ehci { ++ status = "okay"; ++}; ++ ++&ohci { ++ status = "okay"; ++}; ++ ++&xhci { ++ status = "okay"; ++}; ++ ++&ports { ++ port@0 { ++ label = "lan4"; ++ }; ++ ++ port@1 { ++ label = "lan3"; ++ }; ++ ++ port@2 { ++ label = "lan2"; ++ }; ++ ++ port@3 { ++ label = "lan1"; ++ }; ++ ++ port@7 { ++ reg = <7>; ++ phy-mode = "internal"; ++ phy-handle = <&phy12>; ++ label = "wan"; ++ }; ++}; ++ ++&nandcs { ++ nand-ecc-strength = <4>; ++ nand-ecc-step-size = <512>; ++ nand-on-flash-bbt; ++ ++ #address-cells = <1>; ++ #size-cells = <0>; ++ ++ partitions { ++ compatible = "fixed-partitions"; ++ #address-cells = <1>; ++ #size-cells = <1>; ++ ++ partition@0 { ++ compatible = "nvmem-cells"; ++ label = "cferom"; ++ reg = <0x0 0x100000>; ++ ++ #address-cells = <1>; ++ #size-cells = <1>; ++ ranges = <0 0x0 0x100000>; ++ ++ base_mac_addr: mac@106a0 { ++ reg = <0x106a0 0x6>; ++ }; ++ }; ++ ++ partition@100000 { ++ compatible = "brcm,bcm4908-firmware"; ++ label = "firmware"; ++ reg = <0x100000 0x4400000>; ++ }; ++ }; ++}; +--- /dev/null ++++ b/arch/arm64/boot/dts/broadcom/bcmbca/bcm4906-tplink-archer-c2300-v1.dts +@@ -0,0 +1,182 @@ ++// SPDX-License-Identifier: GPL-2.0-or-later OR MIT ++ ++#include ++#include ++#include ++ ++#include "bcm4906.dtsi" ++ ++/ { ++ compatible = "tplink,archer-c2300-v1", "brcm,bcm4906", "brcm,bcm4908", "brcm,bcmbca"; ++ model = "TP-Link Archer C2300 V1"; ++ ++ memory@0 { ++ device_type = "memory"; ++ reg = <0x00 0x00 0x00 0x20000000>; ++ }; ++ ++ leds { ++ compatible = "gpio-leds"; ++ ++ led-power { ++ function = LED_FUNCTION_POWER; ++ color = ; ++ gpios = <&gpio0 0 GPIO_ACTIVE_LOW>; ++ }; ++ ++ led-2ghz { ++ function = "2ghz"; ++ color = ; ++ gpios = <&gpio0 2 GPIO_ACTIVE_LOW>; ++ }; ++ ++ led-5ghz { ++ function = "5ghz"; ++ color = ; ++ gpios = <&gpio0 3 GPIO_ACTIVE_LOW>; ++ }; ++ ++ led-wan-amber { ++ function = LED_FUNCTION_WAN; ++ color = ; ++ gpios = <&gpio0 4 GPIO_ACTIVE_HIGH>; ++ }; ++ ++ led-wan-blue { ++ function = LED_FUNCTION_WAN; ++ color = ; ++ gpios = <&gpio0 10 GPIO_ACTIVE_LOW>; ++ }; ++ ++ led-lan { ++ function = LED_FUNCTION_LAN; ++ color = ; ++ gpios = <&gpio0 12 GPIO_ACTIVE_LOW>; ++ }; ++ ++ led-wps { ++ function = LED_FUNCTION_WPS; ++ color = ; ++ gpios = <&gpio0 14 GPIO_ACTIVE_LOW>; ++ }; ++ ++ led-usb2 { ++ function = "usb2"; ++ color = ; ++ gpios = <&gpio0 15 GPIO_ACTIVE_LOW>; ++ }; ++ ++ led-usb3 { ++ function = "usbd3"; ++ color = ; ++ gpios = <&gpio0 17 GPIO_ACTIVE_LOW>; ++ }; ++ ++ led-brightness { ++ function = LED_FUNCTION_BACKLIGHT; ++ color = ; ++ gpios = <&gpio0 19 GPIO_ACTIVE_LOW>; ++ }; ++ }; ++ ++ gpio-keys-polled { ++ compatible = "gpio-keys-polled"; ++ poll-interval = <100>; ++ ++ key-brightness { ++ label = "LEDs"; ++ linux,code = ; ++ gpios = <&gpio0 18 GPIO_ACTIVE_LOW>; ++ }; ++ ++ key-wps { ++ label = "WPS"; ++ linux,code = ; ++ gpios = <&gpio0 21 GPIO_ACTIVE_LOW>; ++ }; ++ ++ key-wifi { ++ label = "WiFi"; ++ linux,code = ; ++ gpios = <&gpio0 22 GPIO_ACTIVE_LOW>; ++ }; ++ ++ key-restart { ++ label = "Reset"; ++ linux,code = ; ++ gpios = <&gpio0 23 GPIO_ACTIVE_LOW>; ++ }; ++ }; ++}; ++ ++&usb_phy { ++ brcm,ioc = <1>; ++ status = "okay"; ++}; ++ ++&ehci { ++ status = "okay"; ++}; ++ ++&ohci { ++ status = "okay"; ++}; ++ ++&xhci { ++ status = "okay"; ++}; ++ ++&ports { ++ port@0 { ++ label = "lan4"; ++ }; ++ ++ port@1 { ++ label = "lan3"; ++ }; ++ ++ port@2 { ++ label = "lan2"; ++ }; ++ ++ port@3 { ++ label = "lan1"; ++ }; ++ ++ port@7 { ++ reg = <7>; ++ phy-mode = "internal"; ++ phy-handle = <&phy12>; ++ label = "wan"; ++ }; ++}; ++ ++&nandcs { ++ nand-ecc-strength = <4>; ++ nand-ecc-step-size = <512>; ++ nand-on-flash-bbt; ++ ++ #address-cells = <1>; ++ #size-cells = <0>; ++ ++ partitions { ++ compatible = "brcm,bcm4908-partitions"; ++ #address-cells = <1>; ++ #size-cells = <1>; ++ ++ partition@0 { ++ label = "cferom"; ++ reg = <0x0 0x100000>; ++ }; ++ ++ partition@100000 { ++ compatible = "brcm,bcm4908-firmware"; ++ reg = <0x100000 0x3900000>; ++ }; ++ ++ partition@5800000 { ++ compatible = "brcm,bcm4908-firmware"; ++ reg = <0x3a00000 0x3900000>; ++ }; ++ }; ++}; +--- /dev/null ++++ b/arch/arm64/boot/dts/broadcom/bcmbca/bcm4906.dtsi +@@ -0,0 +1,26 @@ ++// SPDX-License-Identifier: GPL-2.0-or-later OR MIT ++ ++#include "bcm4908.dtsi" ++ ++/ { ++ cpus { ++ /delete-node/ cpu@2; ++ ++ /delete-node/ cpu@3; ++ }; ++ ++ timer { ++ compatible = "arm,armv8-timer"; ++ interrupts = , ++ , ++ , ++ ; ++ }; ++ ++ pmu { ++ compatible = "arm,cortex-a53-pmu"; ++ interrupts = , ++ ; ++ interrupt-affinity = <&cpu0>, <&cpu1>; ++ }; ++}; +--- /dev/null ++++ b/arch/arm64/boot/dts/broadcom/bcmbca/bcm4908-asus-gt-ac5300.dts +@@ -0,0 +1,207 @@ ++// SPDX-License-Identifier: GPL-2.0-or-later OR MIT ++ ++#include ++#include ++#include ++ ++#include "bcm4908.dtsi" ++ ++/ { ++ compatible = "asus,gt-ac5300", "brcm,bcm4908", "brcm,bcmbca"; ++ model = "Asus GT-AC5300"; ++ ++ memory@0 { ++ device_type = "memory"; ++ reg = <0x00 0x00 0x00 0x40000000>; ++ }; ++ ++ gpio-keys-polled { ++ compatible = "gpio-keys-polled"; ++ poll-interval = <100>; ++ ++ key-wifi { ++ label = "WiFi"; ++ linux,code = ; ++ gpios = <&gpio0 28 GPIO_ACTIVE_LOW>; ++ }; ++ ++ key-wps { ++ label = "WPS"; ++ linux,code = ; ++ gpios = <&gpio0 29 GPIO_ACTIVE_LOW>; ++ }; ++ ++ key-restart { ++ label = "Reset"; ++ linux,code = ; ++ gpios = <&gpio0 30 GPIO_ACTIVE_LOW>; ++ }; ++ ++ key-brightness { ++ label = "LEDs"; ++ linux,code = ; ++ gpios = <&gpio0 31 GPIO_ACTIVE_LOW>; ++ }; ++ }; ++}; ++ ++&enet { ++ nvmem-cells = <&base_mac_addr>; ++ nvmem-cell-names = "mac-address"; ++}; ++ ++&usb_phy { ++ brcm,ioc = <1>; ++ status = "okay"; ++}; ++ ++&ehci { ++ status = "okay"; ++}; ++ ++&ohci { ++ status = "okay"; ++}; ++ ++&xhci { ++ status = "okay"; ++}; ++ ++&ports { ++ port@0 { ++ label = "lan2"; ++ }; ++ ++ port@1 { ++ label = "lan1"; ++ }; ++ ++ port@2 { ++ label = "lan6"; ++ }; ++ ++ port@3 { ++ label = "lan5"; ++ }; ++ ++ /* External BCM53134S switch */ ++ port@7 { ++ label = "sw"; ++ reg = <7>; ++ phy-mode = "rgmii"; ++ ++ fixed-link { ++ speed = <1000>; ++ full-duplex; ++ }; ++ }; ++}; ++ ++&mdio { ++ /* lan8 */ ++ ethernet-phy@0 { ++ reg = <0>; ++ }; ++ ++ /* lan7 */ ++ ethernet-phy@1 { ++ reg = <1>; ++ }; ++ ++ /* lan4 */ ++ ethernet-phy@2 { ++ reg = <2>; ++ }; ++ ++ /* lan3 */ ++ ethernet-phy@3 { ++ reg = <3>; ++ }; ++}; ++ ++&leds { ++ led-power@11 { ++ reg = <0x11>; ++ function = LED_FUNCTION_POWER; ++ color = ; ++ default-state = "on"; ++ active-low; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&pins_led_17_a>; ++ }; ++ ++ led-wan-red@12 { ++ reg = <0x12>; ++ function = LED_FUNCTION_WAN; ++ color = ; ++ active-low; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&pins_led_18_a>; ++ }; ++ ++ led-wps@14 { ++ reg = <0x14>; ++ function = LED_FUNCTION_WPS; ++ color = ; ++ active-low; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&pins_led_20_a>; ++ }; ++ ++ led-wan-white@15 { ++ reg = <0x15>; ++ function = LED_FUNCTION_WAN; ++ color = ; ++ active-low; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&pins_led_21_a>; ++ }; ++ ++ led-lan@19 { ++ reg = <0x19>; ++ function = LED_FUNCTION_LAN; ++ color = ; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&pins_led_25_a>; ++ }; ++}; ++ ++&nandcs { ++ nand-ecc-strength = <4>; ++ nand-ecc-step-size = <512>; ++ nand-on-flash-bbt; ++ brcm,nand-has-wp; ++ ++ #address-cells = <1>; ++ #size-cells = <0>; ++ ++ partitions { ++ compatible = "brcm,bcm4908-partitions"; ++ #address-cells = <1>; ++ #size-cells = <1>; ++ ++ partition@0 { ++ compatible = "nvmem-cells"; ++ label = "cferom"; ++ reg = <0x0 0x100000>; ++ ++ #address-cells = <1>; ++ #size-cells = <1>; ++ ranges = <0 0x0 0x100000>; ++ ++ base_mac_addr: mac@106a0 { ++ reg = <0x106a0 0x6>; ++ }; ++ }; ++ ++ partition@100000 { ++ compatible = "brcm,bcm4908-firmware"; ++ reg = <0x100000 0x5700000>; ++ }; ++ ++ partition@5800000 { ++ compatible = "brcm,bcm4908-firmware"; ++ reg = <0x5800000 0x5700000>; ++ }; ++ }; ++}; +--- /dev/null ++++ b/arch/arm64/boot/dts/broadcom/bcmbca/bcm4908-netgear-raxe500.dts +@@ -0,0 +1,50 @@ ++// SPDX-License-Identifier: GPL-2.0-or-later OR MIT ++ ++#include "bcm4908.dtsi" ++ ++/ { ++ compatible = "netgear,raxe500", "brcm,bcm4908", "brcm,bcmbca"; ++ model = "Netgear RAXE500"; ++ ++ memory@0 { ++ device_type = "memory"; ++ reg = <0x00 0x00 0x00 0x40000000>; ++ }; ++}; ++ ++&ehci { ++ status = "okay"; ++}; ++ ++&ohci { ++ status = "okay"; ++}; ++ ++&xhci { ++ status = "okay"; ++}; ++ ++&ports { ++ port@0 { ++ label = "lan4"; ++ }; ++ ++ port@1 { ++ label = "lan3"; ++ }; ++ ++ port@2 { ++ label = "lan2"; ++ }; ++ ++ port@3 { ++ label = "lan1"; ++ }; ++ ++ port@7 { ++ reg = <7>; ++ phy-mode = "internal"; ++ phy-handle = <&phy12>; ++ label = "wan"; ++ }; ++}; +--- /dev/null ++++ b/arch/arm64/boot/dts/broadcom/bcmbca/bcm4908.dtsi +@@ -0,0 +1,575 @@ ++// SPDX-License-Identifier: GPL-2.0-or-later OR MIT ++ ++#include ++#include ++#include ++#include ++ ++/dts-v1/; ++ ++/ { ++ interrupt-parent = <&gic>; ++ ++ #address-cells = <2>; ++ #size-cells = <2>; ++ ++ aliases { ++ serial0 = &uart0; ++ }; ++ ++ chosen { ++ stdout-path = "serial0:115200n8"; ++ }; ++ ++ cpus { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ ++ cpu0: cpu@0 { ++ device_type = "cpu"; ++ compatible = "brcm,brahma-b53"; ++ reg = <0x0>; ++ enable-method = "spin-table"; ++ cpu-release-addr = <0x0 0xfff8>; ++ next-level-cache = <&l2>; ++ }; ++ ++ cpu1: cpu@1 { ++ device_type = "cpu"; ++ compatible = "brcm,brahma-b53"; ++ reg = <0x1>; ++ enable-method = "spin-table"; ++ cpu-release-addr = <0x0 0xfff8>; ++ next-level-cache = <&l2>; ++ }; ++ ++ cpu2: cpu@2 { ++ device_type = "cpu"; ++ compatible = "brcm,brahma-b53"; ++ reg = <0x2>; ++ enable-method = "spin-table"; ++ cpu-release-addr = <0x0 0xfff8>; ++ next-level-cache = <&l2>; ++ }; ++ ++ cpu3: cpu@3 { ++ device_type = "cpu"; ++ compatible = "brcm,brahma-b53"; ++ reg = <0x3>; ++ enable-method = "spin-table"; ++ cpu-release-addr = <0x0 0xfff8>; ++ next-level-cache = <&l2>; ++ }; ++ ++ l2: l2-cache0 { ++ compatible = "cache"; ++ }; ++ }; ++ ++ axi@81000000 { ++ compatible = "simple-bus"; ++ #address-cells = <1>; ++ #size-cells = <1>; ++ ranges = <0x00 0x00 0x81000000 0x4000>; ++ ++ gic: interrupt-controller@1000 { ++ compatible = "arm,gic-400"; ++ #interrupt-cells = <3>; ++ #address-cells = <0>; ++ interrupt-controller; ++ reg = <0x1000 0x1000>, ++ <0x2000 0x2000>; ++ }; ++ }; ++ ++ timer { ++ compatible = "arm,armv8-timer"; ++ interrupts = , ++ , ++ , ++ ; ++ }; ++ ++ pmu { ++ compatible = "arm,cortex-a53-pmu"; ++ interrupts = , ++ , ++ , ++ ; ++ interrupt-affinity = <&cpu0>, <&cpu1>, <&cpu2>, <&cpu3>; ++ }; ++ ++ clocks { ++ periph_clk: periph_clk { ++ compatible = "fixed-clock"; ++ #clock-cells = <0>; ++ clock-frequency = <50000000>; ++ clock-output-names = "periph"; ++ }; ++ }; ++ ++ soc { ++ compatible = "simple-bus"; ++ #address-cells = <1>; ++ #size-cells = <1>; ++ ranges = <0x00 0x00 0x80000000 0x281000>; ++ ++ enet: ethernet@2000 { ++ compatible = "brcm,bcm4908-enet"; ++ reg = <0x2000 0x1000>; ++ ++ interrupts = , ++ ; ++ interrupt-names = "rx", "tx"; ++ }; ++ ++ usb_phy: usb-phy@c200 { ++ compatible = "brcm,bcm4908-usb-phy"; ++ reg = <0xc200 0x100>; ++ reg-names = "ctrl"; ++ power-domains = <&pmb BCM_PMB_HOST_USB>; ++ dr_mode = "host"; ++ brcm,has-xhci; ++ brcm,has-eohci; ++ #phy-cells = <1>; ++ status = "disabled"; ++ }; ++ ++ ehci: usb@c300 { ++ compatible = "generic-ehci"; ++ reg = <0xc300 0x100>; ++ interrupts = ; ++ phys = <&usb_phy PHY_TYPE_USB2>; ++ status = "disabled"; ++ }; ++ ++ ohci: usb@c400 { ++ compatible = "generic-ohci"; ++ reg = <0xc400 0x100>; ++ interrupts = ; ++ phys = <&usb_phy PHY_TYPE_USB2>; ++ status = "disabled"; ++ }; ++ ++ xhci: usb@d000 { ++ compatible = "generic-xhci"; ++ reg = <0xd000 0x8c8>; ++ interrupts = ; ++ phys = <&usb_phy PHY_TYPE_USB3>; ++ status = "disabled"; ++ }; ++ ++ bus@80000 { ++ compatible = "simple-bus"; ++ #size-cells = <1>; ++ #address-cells = <1>; ++ ranges = <0 0x80000 0x50000>; ++ ++ ethernet-switch@0 { ++ compatible = "brcm,bcm4908-switch"; ++ reg = <0x0 0x40000>, ++ <0x40000 0x110>, ++ <0x40340 0x30>, ++ <0x40380 0x30>, ++ <0x40600 0x34>, ++ <0x40800 0x208>; ++ reg-names = "core", "reg", "intrl2_0", ++ "intrl2_1", "fcb", "acb"; ++ interrupts = , ++ ; ++ brcm,num-gphy = <5>; ++ brcm,num-rgmii-ports = <2>; ++ ++ #address-cells = <1>; ++ #size-cells = <0>; ++ ++ ports: ports { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ ++ port@0 { ++ reg = <0>; ++ phy-mode = "internal"; ++ phy-handle = <&phy8>; ++ }; ++ ++ port@1 { ++ reg = <1>; ++ phy-mode = "internal"; ++ phy-handle = <&phy9>; ++ }; ++ ++ port@2 { ++ reg = <2>; ++ phy-mode = "internal"; ++ phy-handle = <&phy10>; ++ }; ++ ++ port@3 { ++ reg = <3>; ++ phy-mode = "internal"; ++ phy-handle = <&phy11>; ++ }; ++ ++ port@8 { ++ reg = <8>; ++ phy-mode = "internal"; ++ ethernet = <&enet>; ++ ++ fixed-link { ++ speed = <1000>; ++ full-duplex; ++ }; ++ }; ++ }; ++ }; ++ ++ mdio: mdio@405c0 { ++ compatible = "brcm,unimac-mdio"; ++ reg = <0x405c0 0x8>; ++ reg-names = "mdio"; ++ #size-cells = <0>; ++ #address-cells = <1>; ++ ++ phy8: ethernet-phy@8 { ++ reg = <8>; ++ }; ++ ++ phy9: ethernet-phy@9 { ++ reg = <9>; ++ }; ++ ++ phy10: ethernet-phy@a { ++ reg = <10>; ++ }; ++ ++ phy11: ethernet-phy@b { ++ reg = <11>; ++ }; ++ ++ phy12: ethernet-phy@c { ++ reg = <12>; ++ }; ++ }; ++ }; ++ ++ procmon: syscon@280000 { ++ compatible = "simple-bus"; ++ reg = <0x280000 0x1000>; ++ ranges; ++ ++ #address-cells = <1>; ++ #size-cells = <1>; ++ ++ pmb: power-controller@2800c0 { ++ compatible = "brcm,bcm4908-pmb"; ++ reg = <0x2800c0 0x40>; ++ #power-domain-cells = <1>; ++ }; ++ }; ++ }; ++ ++ bus@ff800000 { ++ compatible = "simple-bus"; ++ #address-cells = <1>; ++ #size-cells = <1>; ++ ranges = <0x00 0x00 0xff800000 0x3000>; ++ ++ twd: timer-mfd@400 { ++ compatible = "brcm,bcm4908-twd", "simple-mfd", "syscon"; ++ reg = <0x400 0x4c>; ++ ranges = <0x0 0x400 0x4c>; ++ ++ #address-cells = <1>; ++ #size-cells = <1>; ++ ++ watchdog@28 { ++ compatible = "brcm,bcm6345-wdt"; ++ reg = <0x28 0x8>; ++ }; ++ }; ++ ++ gpio0: gpio-controller@500 { ++ compatible = "brcm,bcm6345-gpio"; ++ reg-names = "dirout", "dat"; ++ reg = <0x500 0x28>, <0x528 0x28>; ++ ++ #gpio-cells = <2>; ++ gpio-controller; ++ }; ++ ++ pinctrl@560 { ++ compatible = "brcm,bcm4908-pinctrl"; ++ reg = <0x560 0x10>; ++ ++ pins_led_0_a: led_0-a-pins { ++ function = "led_0"; ++ groups = "led_0_grp_a"; ++ }; ++ ++ pins_led_1_a: led_1-a-pins { ++ function = "led_1"; ++ groups = "led_1_grp_a"; ++ }; ++ ++ pins_led_2_a: led_2-a-pins { ++ function = "led_2"; ++ groups = "led_2_grp_a"; ++ }; ++ ++ pins_led_3_a: led_3-a-pins { ++ function = "led_3"; ++ groups = "led_3_grp_a"; ++ }; ++ ++ pins_led_4_a: led_4-a-pins { ++ function = "led_4"; ++ groups = "led_4_grp_a"; ++ }; ++ ++ pins_led_5_a: led_5-a-pins { ++ function = "led_5"; ++ groups = "led_5_grp_a"; ++ }; ++ ++ pins_led_6_a: led_6-a-pins { ++ function = "led_6"; ++ groups = "led_6_grp_a"; ++ }; ++ ++ pins_led_7_a: led_7-a-pins { ++ function = "led_7"; ++ groups = "led_7_grp_a"; ++ }; ++ ++ pins_led_8_a: led_8-a-pins { ++ function = "led_8"; ++ groups = "led_8_grp_a"; ++ }; ++ ++ pins_led_9_a: led_9-a-pins { ++ function = "led_9"; ++ groups = "led_9_grp_a"; ++ }; ++ ++ pins_led_10_a: led_10-a-pins { ++ function = "led_10"; ++ groups = "led_10_grp_a"; ++ }; ++ ++ pins_led_11_a: led_11-a-pins { ++ function = "led_11"; ++ groups = "led_11_grp_a"; ++ }; ++ ++ pins_led_12_a: led_12-a-pins { ++ function = "led_12"; ++ groups = "led_12_grp_a"; ++ }; ++ ++ pins_led_13_a: led_13-a-pins { ++ function = "led_13"; ++ groups = "led_13_grp_a"; ++ }; ++ ++ pins_led_14_a: led_14-a-pins { ++ function = "led_14"; ++ groups = "led_14_grp_a"; ++ }; ++ ++ pins_led_15_a: led_15-a-pins { ++ function = "led_15"; ++ groups = "led_15_grp_a"; ++ }; ++ ++ pins_led_16_a: led_16-a-pins { ++ function = "led_16"; ++ groups = "led_16_grp_a"; ++ }; ++ ++ pins_led_17_a: led_17-a-pins { ++ function = "led_17"; ++ groups = "led_17_grp_a"; ++ }; ++ ++ pins_led_18_a: led_18-a-pins { ++ function = "led_18"; ++ groups = "led_18_grp_a"; ++ }; ++ ++ pins_led_19_a: led_19-a-pins { ++ function = "led_19"; ++ groups = "led_19_grp_a"; ++ }; ++ ++ pins_led_20_a: led_20-a-pins { ++ function = "led_20"; ++ groups = "led_20_grp_a"; ++ }; ++ ++ pins_led_21_a: led_21-a-pins { ++ function = "led_21"; ++ groups = "led_21_grp_a"; ++ }; ++ ++ pins_led_22_a: led_22-a-pins { ++ function = "led_22"; ++ groups = "led_22_grp_a"; ++ }; ++ ++ pins_led_23_a: led_23-a-pins { ++ function = "led_23"; ++ groups = "led_23_grp_a"; ++ }; ++ ++ pins_led_24_a: led_24-a-pins { ++ function = "led_24"; ++ groups = "led_24_grp_a"; ++ }; ++ ++ pins_led_25_a: led_25-a-pins { ++ function = "led_25"; ++ groups = "led_25_grp_a"; ++ }; ++ ++ pins_led_26_a: led_26-a-pins { ++ function = "led_26"; ++ groups = "led_26_grp_a"; ++ }; ++ ++ pins_led_27_a: led_27-a-pins { ++ function = "led_27"; ++ groups = "led_27_grp_a"; ++ }; ++ ++ pins_led_28_a: led_28-a-pins { ++ function = "led_28"; ++ groups = "led_28_grp_a"; ++ }; ++ ++ pins_led_29_a: led_29-a-pins { ++ function = "led_29"; ++ groups = "led_29_grp_a"; ++ }; ++ ++ pins_led_30_a: led_30-a-pins { ++ function = "led_30"; ++ groups = "led_30_grp_a"; ++ }; ++ ++ pins_led_31_a: led_31-a-pins { ++ function = "led_31"; ++ groups = "led_31_grp_a"; ++ }; ++ ++ pins_hs_uart: hs_uart-pins { ++ function = "hs_uart"; ++ groups = "hs_uart_grp"; ++ }; ++ ++ pins_i2c_a: i2c-a-pins { ++ function = "i2c"; ++ groups = "i2c_grp_a"; ++ }; ++ ++ pins_i2c_b: i2c-b-pins { ++ function = "i2c"; ++ groups = "i2c_grp_b"; ++ }; ++ ++ pins_i2s: i2s-pins { ++ function = "i2s"; ++ groups = "i2s_grp"; ++ }; ++ ++ pins_nand_ctrl: nand_ctrl-pins { ++ function = "nand_ctrl"; ++ groups = "nand_ctrl_grp"; ++ }; ++ ++ pins_nand_data: nand_data-pins { ++ function = "nand_data"; ++ groups = "nand_data_grp"; ++ }; ++ ++ pins_emmc_ctrl: emmc_ctrl-pins { ++ function = "emmc_ctrl"; ++ groups = "emmc_ctrl_grp"; ++ }; ++ ++ pins_usb0_pwr: usb0_pwr-pins { ++ function = "usb0_pwr"; ++ groups = "usb0_pwr_grp"; ++ }; ++ ++ pins_usb1_pwr: usb1_pwr-pins { ++ function = "usb1_pwr"; ++ groups = "usb1_pwr_grp"; ++ }; ++ }; ++ ++ uart0: serial@640 { ++ compatible = "brcm,bcm6345-uart"; ++ reg = <0x640 0x18>; ++ interrupts = ; ++ clocks = <&periph_clk>; ++ clock-names = "refclk"; ++ status = "okay"; ++ }; ++ ++ leds: leds@800 { ++ compatible = "brcm,bcm4908-leds", "brcm,bcm63138-leds"; ++ reg = <0x800 0xdc>; ++ ++ #address-cells = <1>; ++ #size-cells = <0>; ++ }; ++ ++ nand-controller@1800 { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ compatible = "brcm,nand-bcm63138", "brcm,brcmnand-v7.1", "brcm,brcmnand"; ++ reg = <0x1800 0x600>, <0x2000 0x10>; ++ reg-names = "nand", "nand-int-base"; ++ interrupts = ; ++ interrupt-names = "nand"; ++ status = "okay"; ++ ++ nandcs: nand@0 { ++ compatible = "brcm,nandcs"; ++ reg = <0>; ++ }; ++ }; ++ ++ i2c@2100 { ++ compatible = "brcm,brcmper-i2c"; ++ reg = <0x2100 0x58>; ++ clock-frequency = <97500>; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&pins_i2c_a>; ++ status = "disabled"; ++ }; ++ ++ misc@2600 { ++ compatible = "brcm,misc", "simple-mfd"; ++ reg = <0x2600 0xe4>; ++ ++ #address-cells = <1>; ++ #size-cells = <1>; ++ ranges = <0x00 0x2600 0xe4>; ++ ++ reset-controller@2644 { ++ compatible = "brcm,bcm4908-misc-pcie-reset"; ++ reg = <0x44 0x04>; ++ #reset-cells = <1>; ++ }; ++ }; ++ }; ++ ++ reboot { ++ compatible = "syscon-reboot"; ++ regmap = <&twd>; ++ offset = <0x34>; ++ mask = <1>; ++ }; ++}; diff --git a/target/linux/bcm4908/patches-5.15/034-v6.1-0005-arm64-dts-Move-BCM4908-dts-to-bcmbca-folder.patch b/target/linux/bcm4908/patches-5.15/034-v6.1-0005-arm64-dts-Move-BCM4908-dts-to-bcmbca-folder.patch index 21454a8652..4a8279a82e 100644 --- a/target/linux/bcm4908/patches-5.15/034-v6.1-0005-arm64-dts-Move-BCM4908-dts-to-bcmbca-folder.patch +++ b/target/linux/bcm4908/patches-5.15/034-v6.1-0005-arm64-dts-Move-BCM4908-dts-to-bcmbca-folder.patch @@ -59,27 +59,2449 @@ Signed-off-by: Florian Fainelli bcm4912-asus-gt-ax6000.dtb \ bcm94912.dtb \ bcm963158.dtb \ -diff --git a/arch/arm64/boot/dts/broadcom/bcm4908/bcm4906-netgear-r8000p.dts b/arch/arm64/boot/dts/broadcom/bcmbca/bcm4906-netgear-r8000p.dts -similarity index 100% -rename from arch/arm64/boot/dts/broadcom/bcm4908/bcm4906-netgear-r8000p.dts -rename to arch/arm64/boot/dts/broadcom/bcmbca/bcm4906-netgear-r8000p.dts -diff --git a/arch/arm64/boot/dts/broadcom/bcm4908/bcm4906-tplink-archer-c2300-v1.dts b/arch/arm64/boot/dts/broadcom/bcmbca/bcm4906-tplink-archer-c2300-v1.dts -similarity index 100% -rename from arch/arm64/boot/dts/broadcom/bcm4908/bcm4906-tplink-archer-c2300-v1.dts -rename to arch/arm64/boot/dts/broadcom/bcmbca/bcm4906-tplink-archer-c2300-v1.dts -diff --git a/arch/arm64/boot/dts/broadcom/bcm4908/bcm4906.dtsi b/arch/arm64/boot/dts/broadcom/bcmbca/bcm4906.dtsi -similarity index 100% -rename from arch/arm64/boot/dts/broadcom/bcm4908/bcm4906.dtsi -rename to arch/arm64/boot/dts/broadcom/bcmbca/bcm4906.dtsi -diff --git a/arch/arm64/boot/dts/broadcom/bcm4908/bcm4908-asus-gt-ac5300.dts b/arch/arm64/boot/dts/broadcom/bcmbca/bcm4908-asus-gt-ac5300.dts -similarity index 100% -rename from arch/arm64/boot/dts/broadcom/bcm4908/bcm4908-asus-gt-ac5300.dts -rename to arch/arm64/boot/dts/broadcom/bcmbca/bcm4908-asus-gt-ac5300.dts -diff --git a/arch/arm64/boot/dts/broadcom/bcm4908/bcm4908-netgear-raxe500.dts b/arch/arm64/boot/dts/broadcom/bcmbca/bcm4908-netgear-raxe500.dts -similarity index 100% -rename from arch/arm64/boot/dts/broadcom/bcm4908/bcm4908-netgear-raxe500.dts -rename to arch/arm64/boot/dts/broadcom/bcmbca/bcm4908-netgear-raxe500.dts -diff --git a/arch/arm64/boot/dts/broadcom/bcm4908/bcm4908.dtsi b/arch/arm64/boot/dts/broadcom/bcmbca/bcm4908.dtsi -similarity index 100% -rename from arch/arm64/boot/dts/broadcom/bcm4908/bcm4908.dtsi -rename to arch/arm64/boot/dts/broadcom/bcmbca/bcm4908.dtsi +--- a/arch/arm64/boot/dts/broadcom/bcm4908/bcm4906-netgear-r8000p.dts ++++ /dev/null +@@ -1,157 +0,0 @@ +-// SPDX-License-Identifier: GPL-2.0-or-later OR MIT +- +-#include +-#include +-#include +- +-#include "bcm4906.dtsi" +- +-/ { +- compatible = "netgear,r8000p", "brcm,bcm4906", "brcm,bcm4908", "brcm,bcmbca"; +- model = "Netgear R8000P"; +- +- memory@0 { +- device_type = "memory"; +- reg = <0x00 0x00 0x00 0x20000000>; +- }; +- +- leds { +- compatible = "gpio-leds"; +- +- led-power-white { +- function = LED_FUNCTION_POWER; +- color = ; +- gpios = <&gpio0 8 GPIO_ACTIVE_LOW>; +- }; +- +- led-power-amber { +- function = LED_FUNCTION_POWER; +- color = ; +- gpios = <&gpio0 9 GPIO_ACTIVE_LOW>; +- }; +- +- led-wps { +- function = LED_FUNCTION_WPS; +- color = ; +- gpios = <&gpio0 10 GPIO_ACTIVE_LOW>; +- }; +- +- led-2ghz { +- function = "2ghz"; +- color = ; +- gpios = <&gpio0 14 GPIO_ACTIVE_LOW>; +- }; +- +- led-5ghz-1 { +- function = "5ghz-1"; +- color = ; +- gpios = <&gpio0 15 GPIO_ACTIVE_LOW>; +- }; +- +- led-5ghz-2 { +- function = "5ghz-2"; +- color = ; +- gpios = <&gpio0 16 GPIO_ACTIVE_LOW>; +- }; +- +- led-usb2 { +- function = "usb2"; +- color = ; +- gpios = <&gpio0 17 GPIO_ACTIVE_LOW>; +- }; +- +- led-usb3 { +- function = "usb3"; +- color = ; +- gpios = <&gpio0 18 GPIO_ACTIVE_LOW>; +- }; +- +- led-wifi { +- function = "wifi"; +- color = ; +- gpios = <&gpio0 56 GPIO_ACTIVE_LOW>; +- }; +- }; +-}; +- +-&enet { +- nvmem-cells = <&base_mac_addr>; +- nvmem-cell-names = "mac-address"; +-}; +- +-&usb_phy { +- brcm,ioc = <1>; +- status = "okay"; +-}; +- +-&ehci { +- status = "okay"; +-}; +- +-&ohci { +- status = "okay"; +-}; +- +-&xhci { +- status = "okay"; +-}; +- +-&ports { +- port@0 { +- label = "lan4"; +- }; +- +- port@1 { +- label = "lan3"; +- }; +- +- port@2 { +- label = "lan2"; +- }; +- +- port@3 { +- label = "lan1"; +- }; +- +- port@7 { +- reg = <7>; +- phy-mode = "internal"; +- phy-handle = <&phy12>; +- label = "wan"; +- }; +-}; +- +-&nandcs { +- nand-ecc-strength = <4>; +- nand-ecc-step-size = <512>; +- nand-on-flash-bbt; +- +- #address-cells = <1>; +- #size-cells = <0>; +- +- partitions { +- compatible = "fixed-partitions"; +- #address-cells = <1>; +- #size-cells = <1>; +- +- partition@0 { +- compatible = "nvmem-cells"; +- label = "cferom"; +- reg = <0x0 0x100000>; +- +- #address-cells = <1>; +- #size-cells = <1>; +- ranges = <0 0x0 0x100000>; +- +- base_mac_addr: mac@106a0 { +- reg = <0x106a0 0x6>; +- }; +- }; +- +- partition@100000 { +- compatible = "brcm,bcm4908-firmware"; +- label = "firmware"; +- reg = <0x100000 0x4400000>; +- }; +- }; +-}; +--- a/arch/arm64/boot/dts/broadcom/bcm4908/bcm4906-tplink-archer-c2300-v1.dts ++++ /dev/null +@@ -1,182 +0,0 @@ +-// SPDX-License-Identifier: GPL-2.0-or-later OR MIT +- +-#include +-#include +-#include +- +-#include "bcm4906.dtsi" +- +-/ { +- compatible = "tplink,archer-c2300-v1", "brcm,bcm4906", "brcm,bcm4908", "brcm,bcmbca"; +- model = "TP-Link Archer C2300 V1"; +- +- memory@0 { +- device_type = "memory"; +- reg = <0x00 0x00 0x00 0x20000000>; +- }; +- +- leds { +- compatible = "gpio-leds"; +- +- led-power { +- function = LED_FUNCTION_POWER; +- color = ; +- gpios = <&gpio0 0 GPIO_ACTIVE_LOW>; +- }; +- +- led-2ghz { +- function = "2ghz"; +- color = ; +- gpios = <&gpio0 2 GPIO_ACTIVE_LOW>; +- }; +- +- led-5ghz { +- function = "5ghz"; +- color = ; +- gpios = <&gpio0 3 GPIO_ACTIVE_LOW>; +- }; +- +- led-wan-amber { +- function = LED_FUNCTION_WAN; +- color = ; +- gpios = <&gpio0 4 GPIO_ACTIVE_HIGH>; +- }; +- +- led-wan-blue { +- function = LED_FUNCTION_WAN; +- color = ; +- gpios = <&gpio0 10 GPIO_ACTIVE_LOW>; +- }; +- +- led-lan { +- function = LED_FUNCTION_LAN; +- color = ; +- gpios = <&gpio0 12 GPIO_ACTIVE_LOW>; +- }; +- +- led-wps { +- function = LED_FUNCTION_WPS; +- color = ; +- gpios = <&gpio0 14 GPIO_ACTIVE_LOW>; +- }; +- +- led-usb2 { +- function = "usb2"; +- color = ; +- gpios = <&gpio0 15 GPIO_ACTIVE_LOW>; +- }; +- +- led-usb3 { +- function = "usbd3"; +- color = ; +- gpios = <&gpio0 17 GPIO_ACTIVE_LOW>; +- }; +- +- led-brightness { +- function = LED_FUNCTION_BACKLIGHT; +- color = ; +- gpios = <&gpio0 19 GPIO_ACTIVE_LOW>; +- }; +- }; +- +- gpio-keys-polled { +- compatible = "gpio-keys-polled"; +- poll-interval = <100>; +- +- key-brightness { +- label = "LEDs"; +- linux,code = ; +- gpios = <&gpio0 18 GPIO_ACTIVE_LOW>; +- }; +- +- key-wps { +- label = "WPS"; +- linux,code = ; +- gpios = <&gpio0 21 GPIO_ACTIVE_LOW>; +- }; +- +- key-wifi { +- label = "WiFi"; +- linux,code = ; +- gpios = <&gpio0 22 GPIO_ACTIVE_LOW>; +- }; +- +- key-restart { +- label = "Reset"; +- linux,code = ; +- gpios = <&gpio0 23 GPIO_ACTIVE_LOW>; +- }; +- }; +-}; +- +-&usb_phy { +- brcm,ioc = <1>; +- status = "okay"; +-}; +- +-&ehci { +- status = "okay"; +-}; +- +-&ohci { +- status = "okay"; +-}; +- +-&xhci { +- status = "okay"; +-}; +- +-&ports { +- port@0 { +- label = "lan4"; +- }; +- +- port@1 { +- label = "lan3"; +- }; +- +- port@2 { +- label = "lan2"; +- }; +- +- port@3 { +- label = "lan1"; +- }; +- +- port@7 { +- reg = <7>; +- phy-mode = "internal"; +- phy-handle = <&phy12>; +- label = "wan"; +- }; +-}; +- +-&nandcs { +- nand-ecc-strength = <4>; +- nand-ecc-step-size = <512>; +- nand-on-flash-bbt; +- +- #address-cells = <1>; +- #size-cells = <0>; +- +- partitions { +- compatible = "brcm,bcm4908-partitions"; +- #address-cells = <1>; +- #size-cells = <1>; +- +- partition@0 { +- label = "cferom"; +- reg = <0x0 0x100000>; +- }; +- +- partition@100000 { +- compatible = "brcm,bcm4908-firmware"; +- reg = <0x100000 0x3900000>; +- }; +- +- partition@5800000 { +- compatible = "brcm,bcm4908-firmware"; +- reg = <0x3a00000 0x3900000>; +- }; +- }; +-}; +--- a/arch/arm64/boot/dts/broadcom/bcm4908/bcm4906.dtsi ++++ /dev/null +@@ -1,34 +0,0 @@ +-// SPDX-License-Identifier: GPL-2.0-or-later OR MIT +- +-#include "bcm4908.dtsi" +- +-/ { +- cpus { +- /delete-node/ cpu@2; +- +- /delete-node/ cpu@3; +- }; +- +- timer { +- compatible = "arm,armv8-timer"; +- interrupts = , +- , +- , +- ; +- }; +- +- timer { +- compatible = "arm,armv8-timer"; +- interrupts = , +- , +- , +- ; +- }; +- +- pmu { +- compatible = "arm,cortex-a53-pmu"; +- interrupts = , +- ; +- interrupt-affinity = <&cpu0>, <&cpu1>; +- }; +-}; +--- a/arch/arm64/boot/dts/broadcom/bcm4908/bcm4908-asus-gt-ac5300.dts ++++ /dev/null +@@ -1,207 +0,0 @@ +-// SPDX-License-Identifier: GPL-2.0-or-later OR MIT +- +-#include +-#include +-#include +- +-#include "bcm4908.dtsi" +- +-/ { +- compatible = "asus,gt-ac5300", "brcm,bcm4908", "brcm,bcmbca"; +- model = "Asus GT-AC5300"; +- +- memory@0 { +- device_type = "memory"; +- reg = <0x00 0x00 0x00 0x40000000>; +- }; +- +- gpio-keys-polled { +- compatible = "gpio-keys-polled"; +- poll-interval = <100>; +- +- key-wifi { +- label = "WiFi"; +- linux,code = ; +- gpios = <&gpio0 28 GPIO_ACTIVE_LOW>; +- }; +- +- key-wps { +- label = "WPS"; +- linux,code = ; +- gpios = <&gpio0 29 GPIO_ACTIVE_LOW>; +- }; +- +- key-restart { +- label = "Reset"; +- linux,code = ; +- gpios = <&gpio0 30 GPIO_ACTIVE_LOW>; +- }; +- +- key-brightness { +- label = "LEDs"; +- linux,code = ; +- gpios = <&gpio0 31 GPIO_ACTIVE_LOW>; +- }; +- }; +-}; +- +-&enet { +- nvmem-cells = <&base_mac_addr>; +- nvmem-cell-names = "mac-address"; +-}; +- +-&usb_phy { +- brcm,ioc = <1>; +- status = "okay"; +-}; +- +-&ehci { +- status = "okay"; +-}; +- +-&ohci { +- status = "okay"; +-}; +- +-&xhci { +- status = "okay"; +-}; +- +-&ports { +- port@0 { +- label = "lan2"; +- }; +- +- port@1 { +- label = "lan1"; +- }; +- +- port@2 { +- label = "lan6"; +- }; +- +- port@3 { +- label = "lan5"; +- }; +- +- /* External BCM53134S switch */ +- port@7 { +- label = "sw"; +- reg = <7>; +- phy-mode = "rgmii"; +- +- fixed-link { +- speed = <1000>; +- full-duplex; +- }; +- }; +-}; +- +-&mdio { +- /* lan8 */ +- ethernet-phy@0 { +- reg = <0>; +- }; +- +- /* lan7 */ +- ethernet-phy@1 { +- reg = <1>; +- }; +- +- /* lan4 */ +- ethernet-phy@2 { +- reg = <2>; +- }; +- +- /* lan3 */ +- ethernet-phy@3 { +- reg = <3>; +- }; +-}; +- +-&leds { +- led-power@11 { +- reg = <0x11>; +- function = LED_FUNCTION_POWER; +- color = ; +- default-state = "on"; +- active-low; +- pinctrl-names = "default"; +- pinctrl-0 = <&pins_led_17_a>; +- }; +- +- led-wan-red@12 { +- reg = <0x12>; +- function = LED_FUNCTION_WAN; +- color = ; +- active-low; +- pinctrl-names = "default"; +- pinctrl-0 = <&pins_led_18_a>; +- }; +- +- led-wps@14 { +- reg = <0x14>; +- function = LED_FUNCTION_WPS; +- color = ; +- active-low; +- pinctrl-names = "default"; +- pinctrl-0 = <&pins_led_20_a>; +- }; +- +- led-wan-white@15 { +- reg = <0x15>; +- function = LED_FUNCTION_WAN; +- color = ; +- active-low; +- pinctrl-names = "default"; +- pinctrl-0 = <&pins_led_21_a>; +- }; +- +- led-lan@19 { +- reg = <0x19>; +- function = LED_FUNCTION_LAN; +- color = ; +- pinctrl-names = "default"; +- pinctrl-0 = <&pins_led_25_a>; +- }; +-}; +- +-&nandcs { +- nand-ecc-strength = <4>; +- nand-ecc-step-size = <512>; +- nand-on-flash-bbt; +- brcm,nand-has-wp; +- +- #address-cells = <1>; +- #size-cells = <0>; +- +- partitions { +- compatible = "brcm,bcm4908-partitions"; +- #address-cells = <1>; +- #size-cells = <1>; +- +- partition@0 { +- compatible = "nvmem-cells"; +- label = "cferom"; +- reg = <0x0 0x100000>; +- +- #address-cells = <1>; +- #size-cells = <1>; +- ranges = <0 0x0 0x100000>; +- +- base_mac_addr: mac@106a0 { +- reg = <0x106a0 0x6>; +- }; +- }; +- +- partition@100000 { +- compatible = "brcm,bcm4908-firmware"; +- reg = <0x100000 0x5700000>; +- }; +- +- partition@5800000 { +- compatible = "brcm,bcm4908-firmware"; +- reg = <0x5800000 0x5700000>; +- }; +- }; +-}; +--- a/arch/arm64/boot/dts/broadcom/bcm4908/bcm4908-netgear-raxe500.dts ++++ /dev/null +@@ -1,50 +0,0 @@ +-// SPDX-License-Identifier: GPL-2.0-or-later OR MIT +- +-#include "bcm4908.dtsi" +- +-/ { +- compatible = "netgear,raxe500", "brcm,bcm4908", "brcm,bcmbca"; +- model = "Netgear RAXE500"; +- +- memory@0 { +- device_type = "memory"; +- reg = <0x00 0x00 0x00 0x40000000>; +- }; +-}; +- +-&ehci { +- status = "okay"; +-}; +- +-&ohci { +- status = "okay"; +-}; +- +-&xhci { +- status = "okay"; +-}; +- +-&ports { +- port@0 { +- label = "lan4"; +- }; +- +- port@1 { +- label = "lan3"; +- }; +- +- port@2 { +- label = "lan2"; +- }; +- +- port@3 { +- label = "lan1"; +- }; +- +- port@7 { +- reg = <7>; +- phy-mode = "internal"; +- phy-handle = <&phy12>; +- label = "wan"; +- }; +-}; +--- a/arch/arm64/boot/dts/broadcom/bcm4908/bcm4908.dtsi ++++ /dev/null +@@ -1,575 +0,0 @@ +-// SPDX-License-Identifier: GPL-2.0-or-later OR MIT +- +-#include +-#include +-#include +-#include +- +-/dts-v1/; +- +-/ { +- interrupt-parent = <&gic>; +- +- #address-cells = <2>; +- #size-cells = <2>; +- +- aliases { +- serial0 = &uart0; +- }; +- +- chosen { +- stdout-path = "serial0:115200n8"; +- }; +- +- cpus { +- #address-cells = <1>; +- #size-cells = <0>; +- +- cpu0: cpu@0 { +- device_type = "cpu"; +- compatible = "brcm,brahma-b53"; +- reg = <0x0>; +- enable-method = "spin-table"; +- cpu-release-addr = <0x0 0xfff8>; +- next-level-cache = <&l2>; +- }; +- +- cpu1: cpu@1 { +- device_type = "cpu"; +- compatible = "brcm,brahma-b53"; +- reg = <0x1>; +- enable-method = "spin-table"; +- cpu-release-addr = <0x0 0xfff8>; +- next-level-cache = <&l2>; +- }; +- +- cpu2: cpu@2 { +- device_type = "cpu"; +- compatible = "brcm,brahma-b53"; +- reg = <0x2>; +- enable-method = "spin-table"; +- cpu-release-addr = <0x0 0xfff8>; +- next-level-cache = <&l2>; +- }; +- +- cpu3: cpu@3 { +- device_type = "cpu"; +- compatible = "brcm,brahma-b53"; +- reg = <0x3>; +- enable-method = "spin-table"; +- cpu-release-addr = <0x0 0xfff8>; +- next-level-cache = <&l2>; +- }; +- +- l2: l2-cache0 { +- compatible = "cache"; +- }; +- }; +- +- axi@81000000 { +- compatible = "simple-bus"; +- #address-cells = <1>; +- #size-cells = <1>; +- ranges = <0x00 0x00 0x81000000 0x4000>; +- +- gic: interrupt-controller@1000 { +- compatible = "arm,gic-400"; +- #interrupt-cells = <3>; +- #address-cells = <0>; +- interrupt-controller; +- reg = <0x1000 0x1000>, +- <0x2000 0x2000>; +- }; +- }; +- +- timer { +- compatible = "arm,armv8-timer"; +- interrupts = , +- , +- , +- ; +- }; +- +- pmu { +- compatible = "arm,cortex-a53-pmu"; +- interrupts = , +- , +- , +- ; +- interrupt-affinity = <&cpu0>, <&cpu1>, <&cpu2>, <&cpu3>; +- }; +- +- clocks { +- periph_clk: periph_clk { +- compatible = "fixed-clock"; +- #clock-cells = <0>; +- clock-frequency = <50000000>; +- clock-output-names = "periph"; +- }; +- }; +- +- soc { +- compatible = "simple-bus"; +- #address-cells = <1>; +- #size-cells = <1>; +- ranges = <0x00 0x00 0x80000000 0x281000>; +- +- enet: ethernet@2000 { +- compatible = "brcm,bcm4908-enet"; +- reg = <0x2000 0x1000>; +- +- interrupts = , +- ; +- interrupt-names = "rx", "tx"; +- }; +- +- usb_phy: usb-phy@c200 { +- compatible = "brcm,bcm4908-usb-phy"; +- reg = <0xc200 0x100>; +- reg-names = "ctrl"; +- power-domains = <&pmb BCM_PMB_HOST_USB>; +- dr_mode = "host"; +- brcm,has-xhci; +- brcm,has-eohci; +- #phy-cells = <1>; +- status = "disabled"; +- }; +- +- ehci: usb@c300 { +- compatible = "generic-ehci"; +- reg = <0xc300 0x100>; +- interrupts = ; +- phys = <&usb_phy PHY_TYPE_USB2>; +- status = "disabled"; +- }; +- +- ohci: usb@c400 { +- compatible = "generic-ohci"; +- reg = <0xc400 0x100>; +- interrupts = ; +- phys = <&usb_phy PHY_TYPE_USB2>; +- status = "disabled"; +- }; +- +- xhci: usb@d000 { +- compatible = "generic-xhci"; +- reg = <0xd000 0x8c8>; +- interrupts = ; +- phys = <&usb_phy PHY_TYPE_USB3>; +- status = "disabled"; +- }; +- +- bus@80000 { +- compatible = "simple-bus"; +- #size-cells = <1>; +- #address-cells = <1>; +- ranges = <0 0x80000 0x50000>; +- +- ethernet-switch@0 { +- compatible = "brcm,bcm4908-switch"; +- reg = <0x0 0x40000>, +- <0x40000 0x110>, +- <0x40340 0x30>, +- <0x40380 0x30>, +- <0x40600 0x34>, +- <0x40800 0x208>; +- reg-names = "core", "reg", "intrl2_0", +- "intrl2_1", "fcb", "acb"; +- interrupts = , +- ; +- brcm,num-gphy = <5>; +- brcm,num-rgmii-ports = <2>; +- +- #address-cells = <1>; +- #size-cells = <0>; +- +- ports: ports { +- #address-cells = <1>; +- #size-cells = <0>; +- +- port@0 { +- reg = <0>; +- phy-mode = "internal"; +- phy-handle = <&phy8>; +- }; +- +- port@1 { +- reg = <1>; +- phy-mode = "internal"; +- phy-handle = <&phy9>; +- }; +- +- port@2 { +- reg = <2>; +- phy-mode = "internal"; +- phy-handle = <&phy10>; +- }; +- +- port@3 { +- reg = <3>; +- phy-mode = "internal"; +- phy-handle = <&phy11>; +- }; +- +- port@8 { +- reg = <8>; +- phy-mode = "internal"; +- ethernet = <&enet>; +- +- fixed-link { +- speed = <1000>; +- full-duplex; +- }; +- }; +- }; +- }; +- +- mdio: mdio@405c0 { +- compatible = "brcm,unimac-mdio"; +- reg = <0x405c0 0x8>; +- reg-names = "mdio"; +- #size-cells = <0>; +- #address-cells = <1>; +- +- phy8: ethernet-phy@8 { +- reg = <8>; +- }; +- +- phy9: ethernet-phy@9 { +- reg = <9>; +- }; +- +- phy10: ethernet-phy@a { +- reg = <10>; +- }; +- +- phy11: ethernet-phy@b { +- reg = <11>; +- }; +- +- phy12: ethernet-phy@c { +- reg = <12>; +- }; +- }; +- }; +- +- procmon: syscon@280000 { +- compatible = "simple-bus"; +- reg = <0x280000 0x1000>; +- ranges; +- +- #address-cells = <1>; +- #size-cells = <1>; +- +- pmb: power-controller@2800c0 { +- compatible = "brcm,bcm4908-pmb"; +- reg = <0x2800c0 0x40>; +- #power-domain-cells = <1>; +- }; +- }; +- }; +- +- bus@ff800000 { +- compatible = "simple-bus"; +- #address-cells = <1>; +- #size-cells = <1>; +- ranges = <0x00 0x00 0xff800000 0x3000>; +- +- twd: timer-mfd@400 { +- compatible = "brcm,bcm4908-twd", "simple-mfd", "syscon"; +- reg = <0x400 0x4c>; +- ranges = <0x0 0x400 0x4c>; +- +- #address-cells = <1>; +- #size-cells = <1>; +- +- watchdog@28 { +- compatible = "brcm,bcm6345-wdt"; +- reg = <0x28 0x8>; +- }; +- }; +- +- gpio0: gpio-controller@500 { +- compatible = "brcm,bcm6345-gpio"; +- reg-names = "dirout", "dat"; +- reg = <0x500 0x28>, <0x528 0x28>; +- +- #gpio-cells = <2>; +- gpio-controller; +- }; +- +- pinctrl@560 { +- compatible = "brcm,bcm4908-pinctrl"; +- reg = <0x560 0x10>; +- +- pins_led_0_a: led_0-a-pins { +- function = "led_0"; +- groups = "led_0_grp_a"; +- }; +- +- pins_led_1_a: led_1-a-pins { +- function = "led_1"; +- groups = "led_1_grp_a"; +- }; +- +- pins_led_2_a: led_2-a-pins { +- function = "led_2"; +- groups = "led_2_grp_a"; +- }; +- +- pins_led_3_a: led_3-a-pins { +- function = "led_3"; +- groups = "led_3_grp_a"; +- }; +- +- pins_led_4_a: led_4-a-pins { +- function = "led_4"; +- groups = "led_4_grp_a"; +- }; +- +- pins_led_5_a: led_5-a-pins { +- function = "led_5"; +- groups = "led_5_grp_a"; +- }; +- +- pins_led_6_a: led_6-a-pins { +- function = "led_6"; +- groups = "led_6_grp_a"; +- }; +- +- pins_led_7_a: led_7-a-pins { +- function = "led_7"; +- groups = "led_7_grp_a"; +- }; +- +- pins_led_8_a: led_8-a-pins { +- function = "led_8"; +- groups = "led_8_grp_a"; +- }; +- +- pins_led_9_a: led_9-a-pins { +- function = "led_9"; +- groups = "led_9_grp_a"; +- }; +- +- pins_led_10_a: led_10-a-pins { +- function = "led_10"; +- groups = "led_10_grp_a"; +- }; +- +- pins_led_11_a: led_11-a-pins { +- function = "led_11"; +- groups = "led_11_grp_a"; +- }; +- +- pins_led_12_a: led_12-a-pins { +- function = "led_12"; +- groups = "led_12_grp_a"; +- }; +- +- pins_led_13_a: led_13-a-pins { +- function = "led_13"; +- groups = "led_13_grp_a"; +- }; +- +- pins_led_14_a: led_14-a-pins { +- function = "led_14"; +- groups = "led_14_grp_a"; +- }; +- +- pins_led_15_a: led_15-a-pins { +- function = "led_15"; +- groups = "led_15_grp_a"; +- }; +- +- pins_led_16_a: led_16-a-pins { +- function = "led_16"; +- groups = "led_16_grp_a"; +- }; +- +- pins_led_17_a: led_17-a-pins { +- function = "led_17"; +- groups = "led_17_grp_a"; +- }; +- +- pins_led_18_a: led_18-a-pins { +- function = "led_18"; +- groups = "led_18_grp_a"; +- }; +- +- pins_led_19_a: led_19-a-pins { +- function = "led_19"; +- groups = "led_19_grp_a"; +- }; +- +- pins_led_20_a: led_20-a-pins { +- function = "led_20"; +- groups = "led_20_grp_a"; +- }; +- +- pins_led_21_a: led_21-a-pins { +- function = "led_21"; +- groups = "led_21_grp_a"; +- }; +- +- pins_led_22_a: led_22-a-pins { +- function = "led_22"; +- groups = "led_22_grp_a"; +- }; +- +- pins_led_23_a: led_23-a-pins { +- function = "led_23"; +- groups = "led_23_grp_a"; +- }; +- +- pins_led_24_a: led_24-a-pins { +- function = "led_24"; +- groups = "led_24_grp_a"; +- }; +- +- pins_led_25_a: led_25-a-pins { +- function = "led_25"; +- groups = "led_25_grp_a"; +- }; +- +- pins_led_26_a: led_26-a-pins { +- function = "led_26"; +- groups = "led_26_grp_a"; +- }; +- +- pins_led_27_a: led_27-a-pins { +- function = "led_27"; +- groups = "led_27_grp_a"; +- }; +- +- pins_led_28_a: led_28-a-pins { +- function = "led_28"; +- groups = "led_28_grp_a"; +- }; +- +- pins_led_29_a: led_29-a-pins { +- function = "led_29"; +- groups = "led_29_grp_a"; +- }; +- +- pins_led_30_a: led_30-a-pins { +- function = "led_30"; +- groups = "led_30_grp_a"; +- }; +- +- pins_led_31_a: led_31-a-pins { +- function = "led_31"; +- groups = "led_31_grp_a"; +- }; +- +- pins_hs_uart: hs_uart-pins { +- function = "hs_uart"; +- groups = "hs_uart_grp"; +- }; +- +- pins_i2c_a: i2c-a-pins { +- function = "i2c"; +- groups = "i2c_grp_a"; +- }; +- +- pins_i2c_b: i2c-b-pins { +- function = "i2c"; +- groups = "i2c_grp_b"; +- }; +- +- pins_i2s: i2s-pins { +- function = "i2s"; +- groups = "i2s_grp"; +- }; +- +- pins_nand_ctrl: nand_ctrl-pins { +- function = "nand_ctrl"; +- groups = "nand_ctrl_grp"; +- }; +- +- pins_nand_data: nand_data-pins { +- function = "nand_data"; +- groups = "nand_data_grp"; +- }; +- +- pins_emmc_ctrl: emmc_ctrl-pins { +- function = "emmc_ctrl"; +- groups = "emmc_ctrl_grp"; +- }; +- +- pins_usb0_pwr: usb0_pwr-pins { +- function = "usb0_pwr"; +- groups = "usb0_pwr_grp"; +- }; +- +- pins_usb1_pwr: usb1_pwr-pins { +- function = "usb1_pwr"; +- groups = "usb1_pwr_grp"; +- }; +- }; +- +- uart0: serial@640 { +- compatible = "brcm,bcm6345-uart"; +- reg = <0x640 0x18>; +- interrupts = ; +- clocks = <&periph_clk>; +- clock-names = "refclk"; +- status = "okay"; +- }; +- +- leds: leds@800 { +- compatible = "brcm,bcm4908-leds", "brcm,bcm63138-leds"; +- reg = <0x800 0xdc>; +- +- #address-cells = <1>; +- #size-cells = <0>; +- }; +- +- nand-controller@1800 { +- #address-cells = <1>; +- #size-cells = <0>; +- compatible = "brcm,nand-bcm63138", "brcm,brcmnand-v7.1", "brcm,brcmnand"; +- reg = <0x1800 0x600>, <0x2000 0x10>; +- reg-names = "nand", "nand-int-base"; +- interrupts = ; +- interrupt-names = "nand"; +- status = "okay"; +- +- nandcs: nand@0 { +- compatible = "brcm,nandcs"; +- reg = <0>; +- }; +- }; +- +- i2c@2100 { +- compatible = "brcm,brcmper-i2c"; +- reg = <0x2100 0x58>; +- clock-frequency = <97500>; +- pinctrl-names = "default"; +- pinctrl-0 = <&pins_i2c_a>; +- status = "disabled"; +- }; +- +- misc@2600 { +- compatible = "brcm,misc", "simple-mfd"; +- reg = <0x2600 0xe4>; +- +- #address-cells = <1>; +- #size-cells = <1>; +- ranges = <0x00 0x2600 0xe4>; +- +- reset-controller@2644 { +- compatible = "brcm,bcm4908-misc-pcie-reset"; +- reg = <0x44 0x04>; +- #reset-cells = <1>; +- }; +- }; +- }; +- +- reboot { +- compatible = "syscon-reboot"; +- regmap = <&twd>; +- offset = <0x34>; +- mask = <1>; +- }; +-}; +--- /dev/null ++++ b/arch/arm64/boot/dts/broadcom/bcmbca/bcm4906-netgear-r8000p.dts +@@ -0,0 +1,157 @@ ++// SPDX-License-Identifier: GPL-2.0-or-later OR MIT ++ ++#include ++#include ++#include ++ ++#include "bcm4906.dtsi" ++ ++/ { ++ compatible = "netgear,r8000p", "brcm,bcm4906", "brcm,bcm4908", "brcm,bcmbca"; ++ model = "Netgear R8000P"; ++ ++ memory@0 { ++ device_type = "memory"; ++ reg = <0x00 0x00 0x00 0x20000000>; ++ }; ++ ++ leds { ++ compatible = "gpio-leds"; ++ ++ led-power-white { ++ function = LED_FUNCTION_POWER; ++ color = ; ++ gpios = <&gpio0 8 GPIO_ACTIVE_LOW>; ++ }; ++ ++ led-power-amber { ++ function = LED_FUNCTION_POWER; ++ color = ; ++ gpios = <&gpio0 9 GPIO_ACTIVE_LOW>; ++ }; ++ ++ led-wps { ++ function = LED_FUNCTION_WPS; ++ color = ; ++ gpios = <&gpio0 10 GPIO_ACTIVE_LOW>; ++ }; ++ ++ led-2ghz { ++ function = "2ghz"; ++ color = ; ++ gpios = <&gpio0 14 GPIO_ACTIVE_LOW>; ++ }; ++ ++ led-5ghz-1 { ++ function = "5ghz-1"; ++ color = ; ++ gpios = <&gpio0 15 GPIO_ACTIVE_LOW>; ++ }; ++ ++ led-5ghz-2 { ++ function = "5ghz-2"; ++ color = ; ++ gpios = <&gpio0 16 GPIO_ACTIVE_LOW>; ++ }; ++ ++ led-usb2 { ++ function = "usb2"; ++ color = ; ++ gpios = <&gpio0 17 GPIO_ACTIVE_LOW>; ++ }; ++ ++ led-usb3 { ++ function = "usb3"; ++ color = ; ++ gpios = <&gpio0 18 GPIO_ACTIVE_LOW>; ++ }; ++ ++ led-wifi { ++ function = "wifi"; ++ color = ; ++ gpios = <&gpio0 56 GPIO_ACTIVE_LOW>; ++ }; ++ }; ++}; ++ ++&enet { ++ nvmem-cells = <&base_mac_addr>; ++ nvmem-cell-names = "mac-address"; ++}; ++ ++&usb_phy { ++ brcm,ioc = <1>; ++ status = "okay"; ++}; ++ ++&ehci { ++ status = "okay"; ++}; ++ ++&ohci { ++ status = "okay"; ++}; ++ ++&xhci { ++ status = "okay"; ++}; ++ ++&ports { ++ port@0 { ++ label = "lan4"; ++ }; ++ ++ port@1 { ++ label = "lan3"; ++ }; ++ ++ port@2 { ++ label = "lan2"; ++ }; ++ ++ port@3 { ++ label = "lan1"; ++ }; ++ ++ port@7 { ++ reg = <7>; ++ phy-mode = "internal"; ++ phy-handle = <&phy12>; ++ label = "wan"; ++ }; ++}; ++ ++&nandcs { ++ nand-ecc-strength = <4>; ++ nand-ecc-step-size = <512>; ++ nand-on-flash-bbt; ++ ++ #address-cells = <1>; ++ #size-cells = <0>; ++ ++ partitions { ++ compatible = "fixed-partitions"; ++ #address-cells = <1>; ++ #size-cells = <1>; ++ ++ partition@0 { ++ compatible = "nvmem-cells"; ++ label = "cferom"; ++ reg = <0x0 0x100000>; ++ ++ #address-cells = <1>; ++ #size-cells = <1>; ++ ranges = <0 0x0 0x100000>; ++ ++ base_mac_addr: mac@106a0 { ++ reg = <0x106a0 0x6>; ++ }; ++ }; ++ ++ partition@100000 { ++ compatible = "brcm,bcm4908-firmware"; ++ label = "firmware"; ++ reg = <0x100000 0x4400000>; ++ }; ++ }; ++}; +--- /dev/null ++++ b/arch/arm64/boot/dts/broadcom/bcmbca/bcm4906-tplink-archer-c2300-v1.dts +@@ -0,0 +1,182 @@ ++// SPDX-License-Identifier: GPL-2.0-or-later OR MIT ++ ++#include ++#include ++#include ++ ++#include "bcm4906.dtsi" ++ ++/ { ++ compatible = "tplink,archer-c2300-v1", "brcm,bcm4906", "brcm,bcm4908", "brcm,bcmbca"; ++ model = "TP-Link Archer C2300 V1"; ++ ++ memory@0 { ++ device_type = "memory"; ++ reg = <0x00 0x00 0x00 0x20000000>; ++ }; ++ ++ leds { ++ compatible = "gpio-leds"; ++ ++ led-power { ++ function = LED_FUNCTION_POWER; ++ color = ; ++ gpios = <&gpio0 0 GPIO_ACTIVE_LOW>; ++ }; ++ ++ led-2ghz { ++ function = "2ghz"; ++ color = ; ++ gpios = <&gpio0 2 GPIO_ACTIVE_LOW>; ++ }; ++ ++ led-5ghz { ++ function = "5ghz"; ++ color = ; ++ gpios = <&gpio0 3 GPIO_ACTIVE_LOW>; ++ }; ++ ++ led-wan-amber { ++ function = LED_FUNCTION_WAN; ++ color = ; ++ gpios = <&gpio0 4 GPIO_ACTIVE_HIGH>; ++ }; ++ ++ led-wan-blue { ++ function = LED_FUNCTION_WAN; ++ color = ; ++ gpios = <&gpio0 10 GPIO_ACTIVE_LOW>; ++ }; ++ ++ led-lan { ++ function = LED_FUNCTION_LAN; ++ color = ; ++ gpios = <&gpio0 12 GPIO_ACTIVE_LOW>; ++ }; ++ ++ led-wps { ++ function = LED_FUNCTION_WPS; ++ color = ; ++ gpios = <&gpio0 14 GPIO_ACTIVE_LOW>; ++ }; ++ ++ led-usb2 { ++ function = "usb2"; ++ color = ; ++ gpios = <&gpio0 15 GPIO_ACTIVE_LOW>; ++ }; ++ ++ led-usb3 { ++ function = "usbd3"; ++ color = ; ++ gpios = <&gpio0 17 GPIO_ACTIVE_LOW>; ++ }; ++ ++ led-brightness { ++ function = LED_FUNCTION_BACKLIGHT; ++ color = ; ++ gpios = <&gpio0 19 GPIO_ACTIVE_LOW>; ++ }; ++ }; ++ ++ gpio-keys-polled { ++ compatible = "gpio-keys-polled"; ++ poll-interval = <100>; ++ ++ key-brightness { ++ label = "LEDs"; ++ linux,code = ; ++ gpios = <&gpio0 18 GPIO_ACTIVE_LOW>; ++ }; ++ ++ key-wps { ++ label = "WPS"; ++ linux,code = ; ++ gpios = <&gpio0 21 GPIO_ACTIVE_LOW>; ++ }; ++ ++ key-wifi { ++ label = "WiFi"; ++ linux,code = ; ++ gpios = <&gpio0 22 GPIO_ACTIVE_LOW>; ++ }; ++ ++ key-restart { ++ label = "Reset"; ++ linux,code = ; ++ gpios = <&gpio0 23 GPIO_ACTIVE_LOW>; ++ }; ++ }; ++}; ++ ++&usb_phy { ++ brcm,ioc = <1>; ++ status = "okay"; ++}; ++ ++&ehci { ++ status = "okay"; ++}; ++ ++&ohci { ++ status = "okay"; ++}; ++ ++&xhci { ++ status = "okay"; ++}; ++ ++&ports { ++ port@0 { ++ label = "lan4"; ++ }; ++ ++ port@1 { ++ label = "lan3"; ++ }; ++ ++ port@2 { ++ label = "lan2"; ++ }; ++ ++ port@3 { ++ label = "lan1"; ++ }; ++ ++ port@7 { ++ reg = <7>; ++ phy-mode = "internal"; ++ phy-handle = <&phy12>; ++ label = "wan"; ++ }; ++}; ++ ++&nandcs { ++ nand-ecc-strength = <4>; ++ nand-ecc-step-size = <512>; ++ nand-on-flash-bbt; ++ ++ #address-cells = <1>; ++ #size-cells = <0>; ++ ++ partitions { ++ compatible = "brcm,bcm4908-partitions"; ++ #address-cells = <1>; ++ #size-cells = <1>; ++ ++ partition@0 { ++ label = "cferom"; ++ reg = <0x0 0x100000>; ++ }; ++ ++ partition@100000 { ++ compatible = "brcm,bcm4908-firmware"; ++ reg = <0x100000 0x3900000>; ++ }; ++ ++ partition@5800000 { ++ compatible = "brcm,bcm4908-firmware"; ++ reg = <0x3a00000 0x3900000>; ++ }; ++ }; ++}; +--- /dev/null ++++ b/arch/arm64/boot/dts/broadcom/bcmbca/bcm4906.dtsi +@@ -0,0 +1,34 @@ ++// SPDX-License-Identifier: GPL-2.0-or-later OR MIT ++ ++#include "bcm4908.dtsi" ++ ++/ { ++ cpus { ++ /delete-node/ cpu@2; ++ ++ /delete-node/ cpu@3; ++ }; ++ ++ timer { ++ compatible = "arm,armv8-timer"; ++ interrupts = , ++ , ++ , ++ ; ++ }; ++ ++ timer { ++ compatible = "arm,armv8-timer"; ++ interrupts = , ++ , ++ , ++ ; ++ }; ++ ++ pmu { ++ compatible = "arm,cortex-a53-pmu"; ++ interrupts = , ++ ; ++ interrupt-affinity = <&cpu0>, <&cpu1>; ++ }; ++}; +--- /dev/null ++++ b/arch/arm64/boot/dts/broadcom/bcmbca/bcm4908-asus-gt-ac5300.dts +@@ -0,0 +1,207 @@ ++// SPDX-License-Identifier: GPL-2.0-or-later OR MIT ++ ++#include ++#include ++#include ++ ++#include "bcm4908.dtsi" ++ ++/ { ++ compatible = "asus,gt-ac5300", "brcm,bcm4908", "brcm,bcmbca"; ++ model = "Asus GT-AC5300"; ++ ++ memory@0 { ++ device_type = "memory"; ++ reg = <0x00 0x00 0x00 0x40000000>; ++ }; ++ ++ gpio-keys-polled { ++ compatible = "gpio-keys-polled"; ++ poll-interval = <100>; ++ ++ key-wifi { ++ label = "WiFi"; ++ linux,code = ; ++ gpios = <&gpio0 28 GPIO_ACTIVE_LOW>; ++ }; ++ ++ key-wps { ++ label = "WPS"; ++ linux,code = ; ++ gpios = <&gpio0 29 GPIO_ACTIVE_LOW>; ++ }; ++ ++ key-restart { ++ label = "Reset"; ++ linux,code = ; ++ gpios = <&gpio0 30 GPIO_ACTIVE_LOW>; ++ }; ++ ++ key-brightness { ++ label = "LEDs"; ++ linux,code = ; ++ gpios = <&gpio0 31 GPIO_ACTIVE_LOW>; ++ }; ++ }; ++}; ++ ++&enet { ++ nvmem-cells = <&base_mac_addr>; ++ nvmem-cell-names = "mac-address"; ++}; ++ ++&usb_phy { ++ brcm,ioc = <1>; ++ status = "okay"; ++}; ++ ++&ehci { ++ status = "okay"; ++}; ++ ++&ohci { ++ status = "okay"; ++}; ++ ++&xhci { ++ status = "okay"; ++}; ++ ++&ports { ++ port@0 { ++ label = "lan2"; ++ }; ++ ++ port@1 { ++ label = "lan1"; ++ }; ++ ++ port@2 { ++ label = "lan6"; ++ }; ++ ++ port@3 { ++ label = "lan5"; ++ }; ++ ++ /* External BCM53134S switch */ ++ port@7 { ++ label = "sw"; ++ reg = <7>; ++ phy-mode = "rgmii"; ++ ++ fixed-link { ++ speed = <1000>; ++ full-duplex; ++ }; ++ }; ++}; ++ ++&mdio { ++ /* lan8 */ ++ ethernet-phy@0 { ++ reg = <0>; ++ }; ++ ++ /* lan7 */ ++ ethernet-phy@1 { ++ reg = <1>; ++ }; ++ ++ /* lan4 */ ++ ethernet-phy@2 { ++ reg = <2>; ++ }; ++ ++ /* lan3 */ ++ ethernet-phy@3 { ++ reg = <3>; ++ }; ++}; ++ ++&leds { ++ led-power@11 { ++ reg = <0x11>; ++ function = LED_FUNCTION_POWER; ++ color = ; ++ default-state = "on"; ++ active-low; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&pins_led_17_a>; ++ }; ++ ++ led-wan-red@12 { ++ reg = <0x12>; ++ function = LED_FUNCTION_WAN; ++ color = ; ++ active-low; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&pins_led_18_a>; ++ }; ++ ++ led-wps@14 { ++ reg = <0x14>; ++ function = LED_FUNCTION_WPS; ++ color = ; ++ active-low; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&pins_led_20_a>; ++ }; ++ ++ led-wan-white@15 { ++ reg = <0x15>; ++ function = LED_FUNCTION_WAN; ++ color = ; ++ active-low; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&pins_led_21_a>; ++ }; ++ ++ led-lan@19 { ++ reg = <0x19>; ++ function = LED_FUNCTION_LAN; ++ color = ; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&pins_led_25_a>; ++ }; ++}; ++ ++&nandcs { ++ nand-ecc-strength = <4>; ++ nand-ecc-step-size = <512>; ++ nand-on-flash-bbt; ++ brcm,nand-has-wp; ++ ++ #address-cells = <1>; ++ #size-cells = <0>; ++ ++ partitions { ++ compatible = "brcm,bcm4908-partitions"; ++ #address-cells = <1>; ++ #size-cells = <1>; ++ ++ partition@0 { ++ compatible = "nvmem-cells"; ++ label = "cferom"; ++ reg = <0x0 0x100000>; ++ ++ #address-cells = <1>; ++ #size-cells = <1>; ++ ranges = <0 0x0 0x100000>; ++ ++ base_mac_addr: mac@106a0 { ++ reg = <0x106a0 0x6>; ++ }; ++ }; ++ ++ partition@100000 { ++ compatible = "brcm,bcm4908-firmware"; ++ reg = <0x100000 0x5700000>; ++ }; ++ ++ partition@5800000 { ++ compatible = "brcm,bcm4908-firmware"; ++ reg = <0x5800000 0x5700000>; ++ }; ++ }; ++}; +--- /dev/null ++++ b/arch/arm64/boot/dts/broadcom/bcmbca/bcm4908-netgear-raxe500.dts +@@ -0,0 +1,50 @@ ++// SPDX-License-Identifier: GPL-2.0-or-later OR MIT ++ ++#include "bcm4908.dtsi" ++ ++/ { ++ compatible = "netgear,raxe500", "brcm,bcm4908", "brcm,bcmbca"; ++ model = "Netgear RAXE500"; ++ ++ memory@0 { ++ device_type = "memory"; ++ reg = <0x00 0x00 0x00 0x40000000>; ++ }; ++}; ++ ++&ehci { ++ status = "okay"; ++}; ++ ++&ohci { ++ status = "okay"; ++}; ++ ++&xhci { ++ status = "okay"; ++}; ++ ++&ports { ++ port@0 { ++ label = "lan4"; ++ }; ++ ++ port@1 { ++ label = "lan3"; ++ }; ++ ++ port@2 { ++ label = "lan2"; ++ }; ++ ++ port@3 { ++ label = "lan1"; ++ }; ++ ++ port@7 { ++ reg = <7>; ++ phy-mode = "internal"; ++ phy-handle = <&phy12>; ++ label = "wan"; ++ }; ++}; +--- /dev/null ++++ b/arch/arm64/boot/dts/broadcom/bcmbca/bcm4908.dtsi +@@ -0,0 +1,575 @@ ++// SPDX-License-Identifier: GPL-2.0-or-later OR MIT ++ ++#include ++#include ++#include ++#include ++ ++/dts-v1/; ++ ++/ { ++ interrupt-parent = <&gic>; ++ ++ #address-cells = <2>; ++ #size-cells = <2>; ++ ++ aliases { ++ serial0 = &uart0; ++ }; ++ ++ chosen { ++ stdout-path = "serial0:115200n8"; ++ }; ++ ++ cpus { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ ++ cpu0: cpu@0 { ++ device_type = "cpu"; ++ compatible = "brcm,brahma-b53"; ++ reg = <0x0>; ++ enable-method = "spin-table"; ++ cpu-release-addr = <0x0 0xfff8>; ++ next-level-cache = <&l2>; ++ }; ++ ++ cpu1: cpu@1 { ++ device_type = "cpu"; ++ compatible = "brcm,brahma-b53"; ++ reg = <0x1>; ++ enable-method = "spin-table"; ++ cpu-release-addr = <0x0 0xfff8>; ++ next-level-cache = <&l2>; ++ }; ++ ++ cpu2: cpu@2 { ++ device_type = "cpu"; ++ compatible = "brcm,brahma-b53"; ++ reg = <0x2>; ++ enable-method = "spin-table"; ++ cpu-release-addr = <0x0 0xfff8>; ++ next-level-cache = <&l2>; ++ }; ++ ++ cpu3: cpu@3 { ++ device_type = "cpu"; ++ compatible = "brcm,brahma-b53"; ++ reg = <0x3>; ++ enable-method = "spin-table"; ++ cpu-release-addr = <0x0 0xfff8>; ++ next-level-cache = <&l2>; ++ }; ++ ++ l2: l2-cache0 { ++ compatible = "cache"; ++ }; ++ }; ++ ++ axi@81000000 { ++ compatible = "simple-bus"; ++ #address-cells = <1>; ++ #size-cells = <1>; ++ ranges = <0x00 0x00 0x81000000 0x4000>; ++ ++ gic: interrupt-controller@1000 { ++ compatible = "arm,gic-400"; ++ #interrupt-cells = <3>; ++ #address-cells = <0>; ++ interrupt-controller; ++ reg = <0x1000 0x1000>, ++ <0x2000 0x2000>; ++ }; ++ }; ++ ++ timer { ++ compatible = "arm,armv8-timer"; ++ interrupts = , ++ , ++ , ++ ; ++ }; ++ ++ pmu { ++ compatible = "arm,cortex-a53-pmu"; ++ interrupts = , ++ , ++ , ++ ; ++ interrupt-affinity = <&cpu0>, <&cpu1>, <&cpu2>, <&cpu3>; ++ }; ++ ++ clocks { ++ periph_clk: periph_clk { ++ compatible = "fixed-clock"; ++ #clock-cells = <0>; ++ clock-frequency = <50000000>; ++ clock-output-names = "periph"; ++ }; ++ }; ++ ++ soc { ++ compatible = "simple-bus"; ++ #address-cells = <1>; ++ #size-cells = <1>; ++ ranges = <0x00 0x00 0x80000000 0x281000>; ++ ++ enet: ethernet@2000 { ++ compatible = "brcm,bcm4908-enet"; ++ reg = <0x2000 0x1000>; ++ ++ interrupts = , ++ ; ++ interrupt-names = "rx", "tx"; ++ }; ++ ++ usb_phy: usb-phy@c200 { ++ compatible = "brcm,bcm4908-usb-phy"; ++ reg = <0xc200 0x100>; ++ reg-names = "ctrl"; ++ power-domains = <&pmb BCM_PMB_HOST_USB>; ++ dr_mode = "host"; ++ brcm,has-xhci; ++ brcm,has-eohci; ++ #phy-cells = <1>; ++ status = "disabled"; ++ }; ++ ++ ehci: usb@c300 { ++ compatible = "generic-ehci"; ++ reg = <0xc300 0x100>; ++ interrupts = ; ++ phys = <&usb_phy PHY_TYPE_USB2>; ++ status = "disabled"; ++ }; ++ ++ ohci: usb@c400 { ++ compatible = "generic-ohci"; ++ reg = <0xc400 0x100>; ++ interrupts = ; ++ phys = <&usb_phy PHY_TYPE_USB2>; ++ status = "disabled"; ++ }; ++ ++ xhci: usb@d000 { ++ compatible = "generic-xhci"; ++ reg = <0xd000 0x8c8>; ++ interrupts = ; ++ phys = <&usb_phy PHY_TYPE_USB3>; ++ status = "disabled"; ++ }; ++ ++ bus@80000 { ++ compatible = "simple-bus"; ++ #size-cells = <1>; ++ #address-cells = <1>; ++ ranges = <0 0x80000 0x50000>; ++ ++ ethernet-switch@0 { ++ compatible = "brcm,bcm4908-switch"; ++ reg = <0x0 0x40000>, ++ <0x40000 0x110>, ++ <0x40340 0x30>, ++ <0x40380 0x30>, ++ <0x40600 0x34>, ++ <0x40800 0x208>; ++ reg-names = "core", "reg", "intrl2_0", ++ "intrl2_1", "fcb", "acb"; ++ interrupts = , ++ ; ++ brcm,num-gphy = <5>; ++ brcm,num-rgmii-ports = <2>; ++ ++ #address-cells = <1>; ++ #size-cells = <0>; ++ ++ ports: ports { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ ++ port@0 { ++ reg = <0>; ++ phy-mode = "internal"; ++ phy-handle = <&phy8>; ++ }; ++ ++ port@1 { ++ reg = <1>; ++ phy-mode = "internal"; ++ phy-handle = <&phy9>; ++ }; ++ ++ port@2 { ++ reg = <2>; ++ phy-mode = "internal"; ++ phy-handle = <&phy10>; ++ }; ++ ++ port@3 { ++ reg = <3>; ++ phy-mode = "internal"; ++ phy-handle = <&phy11>; ++ }; ++ ++ port@8 { ++ reg = <8>; ++ phy-mode = "internal"; ++ ethernet = <&enet>; ++ ++ fixed-link { ++ speed = <1000>; ++ full-duplex; ++ }; ++ }; ++ }; ++ }; ++ ++ mdio: mdio@405c0 { ++ compatible = "brcm,unimac-mdio"; ++ reg = <0x405c0 0x8>; ++ reg-names = "mdio"; ++ #size-cells = <0>; ++ #address-cells = <1>; ++ ++ phy8: ethernet-phy@8 { ++ reg = <8>; ++ }; ++ ++ phy9: ethernet-phy@9 { ++ reg = <9>; ++ }; ++ ++ phy10: ethernet-phy@a { ++ reg = <10>; ++ }; ++ ++ phy11: ethernet-phy@b { ++ reg = <11>; ++ }; ++ ++ phy12: ethernet-phy@c { ++ reg = <12>; ++ }; ++ }; ++ }; ++ ++ procmon: syscon@280000 { ++ compatible = "simple-bus"; ++ reg = <0x280000 0x1000>; ++ ranges; ++ ++ #address-cells = <1>; ++ #size-cells = <1>; ++ ++ pmb: power-controller@2800c0 { ++ compatible = "brcm,bcm4908-pmb"; ++ reg = <0x2800c0 0x40>; ++ #power-domain-cells = <1>; ++ }; ++ }; ++ }; ++ ++ bus@ff800000 { ++ compatible = "simple-bus"; ++ #address-cells = <1>; ++ #size-cells = <1>; ++ ranges = <0x00 0x00 0xff800000 0x3000>; ++ ++ twd: timer-mfd@400 { ++ compatible = "brcm,bcm4908-twd", "simple-mfd", "syscon"; ++ reg = <0x400 0x4c>; ++ ranges = <0x0 0x400 0x4c>; ++ ++ #address-cells = <1>; ++ #size-cells = <1>; ++ ++ watchdog@28 { ++ compatible = "brcm,bcm6345-wdt"; ++ reg = <0x28 0x8>; ++ }; ++ }; ++ ++ gpio0: gpio-controller@500 { ++ compatible = "brcm,bcm6345-gpio"; ++ reg-names = "dirout", "dat"; ++ reg = <0x500 0x28>, <0x528 0x28>; ++ ++ #gpio-cells = <2>; ++ gpio-controller; ++ }; ++ ++ pinctrl@560 { ++ compatible = "brcm,bcm4908-pinctrl"; ++ reg = <0x560 0x10>; ++ ++ pins_led_0_a: led_0-a-pins { ++ function = "led_0"; ++ groups = "led_0_grp_a"; ++ }; ++ ++ pins_led_1_a: led_1-a-pins { ++ function = "led_1"; ++ groups = "led_1_grp_a"; ++ }; ++ ++ pins_led_2_a: led_2-a-pins { ++ function = "led_2"; ++ groups = "led_2_grp_a"; ++ }; ++ ++ pins_led_3_a: led_3-a-pins { ++ function = "led_3"; ++ groups = "led_3_grp_a"; ++ }; ++ ++ pins_led_4_a: led_4-a-pins { ++ function = "led_4"; ++ groups = "led_4_grp_a"; ++ }; ++ ++ pins_led_5_a: led_5-a-pins { ++ function = "led_5"; ++ groups = "led_5_grp_a"; ++ }; ++ ++ pins_led_6_a: led_6-a-pins { ++ function = "led_6"; ++ groups = "led_6_grp_a"; ++ }; ++ ++ pins_led_7_a: led_7-a-pins { ++ function = "led_7"; ++ groups = "led_7_grp_a"; ++ }; ++ ++ pins_led_8_a: led_8-a-pins { ++ function = "led_8"; ++ groups = "led_8_grp_a"; ++ }; ++ ++ pins_led_9_a: led_9-a-pins { ++ function = "led_9"; ++ groups = "led_9_grp_a"; ++ }; ++ ++ pins_led_10_a: led_10-a-pins { ++ function = "led_10"; ++ groups = "led_10_grp_a"; ++ }; ++ ++ pins_led_11_a: led_11-a-pins { ++ function = "led_11"; ++ groups = "led_11_grp_a"; ++ }; ++ ++ pins_led_12_a: led_12-a-pins { ++ function = "led_12"; ++ groups = "led_12_grp_a"; ++ }; ++ ++ pins_led_13_a: led_13-a-pins { ++ function = "led_13"; ++ groups = "led_13_grp_a"; ++ }; ++ ++ pins_led_14_a: led_14-a-pins { ++ function = "led_14"; ++ groups = "led_14_grp_a"; ++ }; ++ ++ pins_led_15_a: led_15-a-pins { ++ function = "led_15"; ++ groups = "led_15_grp_a"; ++ }; ++ ++ pins_led_16_a: led_16-a-pins { ++ function = "led_16"; ++ groups = "led_16_grp_a"; ++ }; ++ ++ pins_led_17_a: led_17-a-pins { ++ function = "led_17"; ++ groups = "led_17_grp_a"; ++ }; ++ ++ pins_led_18_a: led_18-a-pins { ++ function = "led_18"; ++ groups = "led_18_grp_a"; ++ }; ++ ++ pins_led_19_a: led_19-a-pins { ++ function = "led_19"; ++ groups = "led_19_grp_a"; ++ }; ++ ++ pins_led_20_a: led_20-a-pins { ++ function = "led_20"; ++ groups = "led_20_grp_a"; ++ }; ++ ++ pins_led_21_a: led_21-a-pins { ++ function = "led_21"; ++ groups = "led_21_grp_a"; ++ }; ++ ++ pins_led_22_a: led_22-a-pins { ++ function = "led_22"; ++ groups = "led_22_grp_a"; ++ }; ++ ++ pins_led_23_a: led_23-a-pins { ++ function = "led_23"; ++ groups = "led_23_grp_a"; ++ }; ++ ++ pins_led_24_a: led_24-a-pins { ++ function = "led_24"; ++ groups = "led_24_grp_a"; ++ }; ++ ++ pins_led_25_a: led_25-a-pins { ++ function = "led_25"; ++ groups = "led_25_grp_a"; ++ }; ++ ++ pins_led_26_a: led_26-a-pins { ++ function = "led_26"; ++ groups = "led_26_grp_a"; ++ }; ++ ++ pins_led_27_a: led_27-a-pins { ++ function = "led_27"; ++ groups = "led_27_grp_a"; ++ }; ++ ++ pins_led_28_a: led_28-a-pins { ++ function = "led_28"; ++ groups = "led_28_grp_a"; ++ }; ++ ++ pins_led_29_a: led_29-a-pins { ++ function = "led_29"; ++ groups = "led_29_grp_a"; ++ }; ++ ++ pins_led_30_a: led_30-a-pins { ++ function = "led_30"; ++ groups = "led_30_grp_a"; ++ }; ++ ++ pins_led_31_a: led_31-a-pins { ++ function = "led_31"; ++ groups = "led_31_grp_a"; ++ }; ++ ++ pins_hs_uart: hs_uart-pins { ++ function = "hs_uart"; ++ groups = "hs_uart_grp"; ++ }; ++ ++ pins_i2c_a: i2c-a-pins { ++ function = "i2c"; ++ groups = "i2c_grp_a"; ++ }; ++ ++ pins_i2c_b: i2c-b-pins { ++ function = "i2c"; ++ groups = "i2c_grp_b"; ++ }; ++ ++ pins_i2s: i2s-pins { ++ function = "i2s"; ++ groups = "i2s_grp"; ++ }; ++ ++ pins_nand_ctrl: nand_ctrl-pins { ++ function = "nand_ctrl"; ++ groups = "nand_ctrl_grp"; ++ }; ++ ++ pins_nand_data: nand_data-pins { ++ function = "nand_data"; ++ groups = "nand_data_grp"; ++ }; ++ ++ pins_emmc_ctrl: emmc_ctrl-pins { ++ function = "emmc_ctrl"; ++ groups = "emmc_ctrl_grp"; ++ }; ++ ++ pins_usb0_pwr: usb0_pwr-pins { ++ function = "usb0_pwr"; ++ groups = "usb0_pwr_grp"; ++ }; ++ ++ pins_usb1_pwr: usb1_pwr-pins { ++ function = "usb1_pwr"; ++ groups = "usb1_pwr_grp"; ++ }; ++ }; ++ ++ uart0: serial@640 { ++ compatible = "brcm,bcm6345-uart"; ++ reg = <0x640 0x18>; ++ interrupts = ; ++ clocks = <&periph_clk>; ++ clock-names = "refclk"; ++ status = "okay"; ++ }; ++ ++ leds: leds@800 { ++ compatible = "brcm,bcm4908-leds", "brcm,bcm63138-leds"; ++ reg = <0x800 0xdc>; ++ ++ #address-cells = <1>; ++ #size-cells = <0>; ++ }; ++ ++ nand-controller@1800 { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ compatible = "brcm,nand-bcm63138", "brcm,brcmnand-v7.1", "brcm,brcmnand"; ++ reg = <0x1800 0x600>, <0x2000 0x10>; ++ reg-names = "nand", "nand-int-base"; ++ interrupts = ; ++ interrupt-names = "nand"; ++ status = "okay"; ++ ++ nandcs: nand@0 { ++ compatible = "brcm,nandcs"; ++ reg = <0>; ++ }; ++ }; ++ ++ i2c@2100 { ++ compatible = "brcm,brcmper-i2c"; ++ reg = <0x2100 0x58>; ++ clock-frequency = <97500>; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&pins_i2c_a>; ++ status = "disabled"; ++ }; ++ ++ misc@2600 { ++ compatible = "brcm,misc", "simple-mfd"; ++ reg = <0x2600 0xe4>; ++ ++ #address-cells = <1>; ++ #size-cells = <1>; ++ ranges = <0x00 0x2600 0xe4>; ++ ++ reset-controller@2644 { ++ compatible = "brcm,bcm4908-misc-pcie-reset"; ++ reg = <0x44 0x04>; ++ #reset-cells = <1>; ++ }; ++ }; ++ }; ++ ++ reboot { ++ compatible = "syscon-reboot"; ++ regmap = <&twd>; ++ offset = <0x34>; ++ mask = <1>; ++ }; ++};