From: Weijie Gao Date: Wed, 3 Jan 2024 17:49:26 +0000 (+0800) Subject: generic: 6.6: drop pending patch backported as fixes X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=1057d9b39d1b813705289a274982c194f8bd1a31;p=openwrt%2Fstaging%2F981213.git generic: 6.6: drop pending patch backported as fixes Drop pending patch backported as fixes in later kernel version. Signed-off-by: Weijie Gao --- diff --git a/target/linux/generic/pending-6.6/110-v6.3-0001-spidev-Add-Silicon-Labs-EM3581-device-compatible.patch b/target/linux/generic/pending-6.6/110-v6.3-0001-spidev-Add-Silicon-Labs-EM3581-device-compatible.patch deleted file mode 100644 index ebeeae2f8f..0000000000 --- a/target/linux/generic/pending-6.6/110-v6.3-0001-spidev-Add-Silicon-Labs-EM3581-device-compatible.patch +++ /dev/null @@ -1,32 +0,0 @@ -From f7982c726e02001afc19052fe48f642dfcbc00b2 Mon Sep 17 00:00:00 2001 -From: Vincent Tremblay -Date: Mon, 26 Dec 2022 21:10:37 -0500 -Subject: [PATCH 1/2] spidev: Add Silicon Labs EM3581 device compatible - -Add compatible string for Silicon Labs EM3581 device. - -Note: This patch is adapted from a patch submitted to the for-next branch (v6.3). - -Signed-off-by: Vincent Tremblay ---- - drivers/spi/spidev.c | 2 ++ - 1 file changed, 2 insertions(+) - ---- a/drivers/spi/spidev.c -+++ b/drivers/spi/spidev.c -@@ -700,6 +700,7 @@ static const struct spi_device_id spidev - { .name = "m53cpld" }, - { .name = "spi-petra" }, - { .name = "spi-authenta" }, -+ { .name = "em3581" }, - {}, - }; - MODULE_DEVICE_TABLE(spi, spidev_spi_ids); -@@ -726,6 +727,7 @@ static const struct of_device_id spidev_ - { .compatible = "menlo,m53cpld", .data = &spidev_of_check }, - { .compatible = "cisco,spi-petra", .data = &spidev_of_check }, - { .compatible = "micron,spi-authenta", .data = &spidev_of_check }, -+ { .compatible = "silabs,em3581", .data = &spidev_of_check }, - {}, - }; - MODULE_DEVICE_TABLE(of, spidev_dt_ids); diff --git a/target/linux/generic/pending-6.6/110-v6.3-0002-spidev-Add-Silicon-Labs-SI3210-device-compatible.patch b/target/linux/generic/pending-6.6/110-v6.3-0002-spidev-Add-Silicon-Labs-SI3210-device-compatible.patch deleted file mode 100644 index db5b5800f4..0000000000 --- a/target/linux/generic/pending-6.6/110-v6.3-0002-spidev-Add-Silicon-Labs-SI3210-device-compatible.patch +++ /dev/null @@ -1,32 +0,0 @@ -From 536581825219e97fa2ae0c4de35605d2f6311416 Mon Sep 17 00:00:00 2001 -From: Vincent Tremblay -Date: Tue, 27 Dec 2022 09:00:58 -0500 -Subject: [PATCH 2/2] spidev: Add Silicon Labs SI3210 device compatible - -Add compatible string for Silicon Labs SI3210 device. - -Note: This patch is adapted from a patch submitted to the for-next branch (v6.3). - -Signed-off-by: Vincent Tremblay ---- - drivers/spi/spidev.c | 2 ++ - 1 file changed, 2 insertions(+) - ---- a/drivers/spi/spidev.c -+++ b/drivers/spi/spidev.c -@@ -701,6 +701,7 @@ static const struct spi_device_id spidev - { .name = "spi-petra" }, - { .name = "spi-authenta" }, - { .name = "em3581" }, -+ { .name = "si3210" }, - {}, - }; - MODULE_DEVICE_TABLE(spi, spidev_spi_ids); -@@ -728,6 +729,7 @@ static const struct of_device_id spidev_ - { .compatible = "cisco,spi-petra", .data = &spidev_of_check }, - { .compatible = "micron,spi-authenta", .data = &spidev_of_check }, - { .compatible = "silabs,em3581", .data = &spidev_of_check }, -+ { .compatible = "silabs,si3210", .data = &spidev_of_check }, - {}, - }; - MODULE_DEVICE_TABLE(of, spidev_dt_ids); diff --git a/target/linux/generic/pending-6.6/261-enable_wilink_platform_without_drivers.patch b/target/linux/generic/pending-6.6/261-enable_wilink_platform_without_drivers.patch deleted file mode 100644 index cd31f9d934..0000000000 --- a/target/linux/generic/pending-6.6/261-enable_wilink_platform_without_drivers.patch +++ /dev/null @@ -1,20 +0,0 @@ -From: Imre Kaloz -Subject: [PATCH] hack: net: wireless: make the wl12xx glue code available with - compat-wireless, too - -Signed-off-by: Imre Kaloz ---- - drivers/net/wireless/ti/Kconfig | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - ---- a/drivers/net/wireless/ti/Kconfig -+++ b/drivers/net/wireless/ti/Kconfig -@@ -20,7 +20,7 @@ source "drivers/net/wireless/ti/wlcore/K - - config WILINK_PLATFORM_DATA - bool "TI WiLink platform data" -- depends on WLCORE_SDIO || WL1251_SDIO -+ depends on WLCORE_SDIO || WL1251_SDIO || ARCH_OMAP2PLUS - default y - help - Small platform data bit needed to pass data to the sdio modules. diff --git a/target/linux/generic/pending-6.6/351-irqchip-bcm-6345-l1-request-memory-region.patch b/target/linux/generic/pending-6.6/351-irqchip-bcm-6345-l1-request-memory-region.patch deleted file mode 100644 index 2675ca4791..0000000000 --- a/target/linux/generic/pending-6.6/351-irqchip-bcm-6345-l1-request-memory-region.patch +++ /dev/null @@ -1,113 +0,0 @@ -From patchwork Thu Mar 16 19:28:33 2023 -Content-Type: text/plain; charset="utf-8" -MIME-Version: 1.0 -Content-Transfer-Encoding: 8bit -X-Patchwork-Submitter: =?utf-8?q?=C3=81lvaro_Fern=C3=A1ndez_Rojas?= - -X-Patchwork-Id: 13178238 -Return-Path: -X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on - aws-us-west-2-korg-lkml-1.web.codeaurora.org -Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) - by smtp.lore.kernel.org (Postfix) with ESMTP id 5EF2AC6FD19 - for ; Thu, 16 Mar 2023 19:28:43 +0000 (UTC) -Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand - id S230076AbjCPT2l (ORCPT ); - Thu, 16 Mar 2023 15:28:41 -0400 -Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56412 "EHLO - lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org - with ESMTP id S230039AbjCPT2k (ORCPT - ); Thu, 16 Mar 2023 15:28:40 -0400 -Received: from mail-wr1-x42f.google.com (mail-wr1-x42f.google.com - [IPv6:2a00:1450:4864:20::42f]) - by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7259B7D9F; - Thu, 16 Mar 2023 12:28:38 -0700 (PDT) -Received: by mail-wr1-x42f.google.com with SMTP id y14so2539231wrq.4; - Thu, 16 Mar 2023 12:28:38 -0700 (PDT) -DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; - d=gmail.com; s=20210112; t=1678994917; - h=content-transfer-encoding:mime-version:references:in-reply-to - :message-id:date:subject:cc:to:from:from:to:cc:subject:date - :message-id:reply-to; - bh=j8afldfRZftLeVmekmQfoh01jVdumsVP7nkKoPaU3Q0=; - b=FzMRr5ekh/fDiJqTlezNj6nLjzvn5z92FtYeB8MquVSMB8PuvarccnyqAzsXiccf+v - uwRFIomnTWNLGVjzc1xrB2hGiCKD3jBo5n1u8p/yEV6rpolbxVjfM7eTHXyAHXGXz7ZJ - TPeVbWfAlxiSD6+BPtXr/efehcdI64fIoL6G/U1WHNMo01Tzr/Obf3y5tug17N0fGcXg - CH6E5a2HguZUtwrm26LcK9IOV/7xEx5eIE1cOvTLMxPbGWaZwEjjP16HylJr06xRLhaf - RpiYBT3mXwwuOx0jLOhqavY/2kZ9GVbZRWMMwZrZv9xNO13SBwc1VUVgD4k3FntnSk7Z - AaOQ== -X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; - d=1e100.net; s=20210112; t=1678994917; - h=content-transfer-encoding:mime-version:references:in-reply-to - :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc - :subject:date:message-id:reply-to; - bh=j8afldfRZftLeVmekmQfoh01jVdumsVP7nkKoPaU3Q0=; - b=OaA5DMgqalrfqO5iOtmmxFPsH90MkN7l4EJpyVnzuiO1Wd6rSCpqPOR7xpxZno8OPP - tdfm4vzn9Ie4AUDbFKDTUlPG+tgkmIruo3K9C0VnY9DD2PRZMEYBbWaJKU1otqKt0NKu - IAAHNvxvQvCESKzbXFLYwWbRKFScOSMGmGBTDfgThz51A18Ff1hJy/BmnuZk7M2TLgHO - wQpy9t7oeB/Hkxl41y46emLc/nESsvwvAG/fx/zPzCe9UiaQLrdZq+BKeOwSBedktzK5 - U/ZTfgzU2UGSI67aGRqqGnI0uXq+MAJMK18qzM0VByxj6W+AXJ6BJr5P0quljeQ8upSg - bEUg== -X-Gm-Message-State: AO0yUKWnqTlccBDnqwCSRdqOBGc2FyfiLy1Tg7EjPENlISpzXuDYwW/R - lJSI06rrfq+Vel/SigfpGJI= -X-Google-Smtp-Source: - AK7set/jYfYl9ttVzIXJO+ZQVfa6cE/yOsP8fx4teiTmGNNWyVlIJRzMAlF3IUGqRAXAmY3hAabIuQ== -X-Received: by 2002:a5d:40ce:0:b0:2cd:ceab:df1a with SMTP id - b14-20020a5d40ce000000b002cdceabdf1amr381006wrq.32.1678994916642; - Thu, 16 Mar 2023 12:28:36 -0700 (PDT) -Received: from atlantis.lan (255.red-79-146-124.dynamicip.rima-tde.net. - [79.146.124.255]) - by smtp.gmail.com with ESMTPSA id - l10-20020a5d4bca000000b002cfea3c49d5sm180041wrt.52.2023.03.16.12.28.35 - (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); - Thu, 16 Mar 2023 12:28:35 -0700 (PDT) -From: =?utf-8?q?=C3=81lvaro_Fern=C3=A1ndez_Rojas?= -To: f.fainelli@gmail.com, jonas.gorski@gmail.com, - bcm-kernel-feedback-list@broadcom.com, tglx@linutronix.de, - maz@kernel.org, linux-mips@vger.kernel.org, - linux-kernel@vger.kernel.org -Cc: =?utf-8?q?=C3=81lvaro_Fern=C3=A1ndez_Rojas?= -Subject: [PATCH v2] irqchip/bcm-6345-l1: request memory region -Date: Thu, 16 Mar 2023 20:28:33 +0100 -Message-Id: <20230316192833.1603149-1-noltari@gmail.com> -X-Mailer: git-send-email 2.30.2 -In-Reply-To: <20230316180701.783785-1-noltari@gmail.com> -References: <20230316180701.783785-1-noltari@gmail.com> -MIME-Version: 1.0 -Precedence: bulk -List-ID: -X-Mailing-List: linux-mips@vger.kernel.org - -Request memory region in order to display it in /proc/iomem. -Also stop printing the MMIO address since it just displays (ptrval). - -Signed-off-by: Álvaro Fernández Rojas -Acked-by: Florian Fainelli ---- - v2: request memory region and stop displaying MMIO address. - - drivers/irqchip/irq-bcm6345-l1.c | 6 ++++-- - 1 file changed, 4 insertions(+), 2 deletions(-) - ---- a/drivers/irqchip/irq-bcm6345-l1.c -+++ b/drivers/irqchip/irq-bcm6345-l1.c -@@ -253,6 +253,9 @@ static int __init bcm6345_l1_init_one(st - if (!cpu->map_base) - return -ENOMEM; - -+ if (!request_mem_region(res.start, sz, res.name)) -+ pr_err("failed to request intc memory"); -+ - for (i = 0; i < n_words; i++) { - cpu->enable_cache[i] = 0; - __raw_writel(0, cpu->map_base + reg_enable(intc, i)); -@@ -331,8 +334,7 @@ static int __init bcm6345_l1_of_init(str - for_each_cpu(idx, &intc->cpumask) { - struct bcm6345_l1_cpu *cpu = intc->cpus[idx]; - -- pr_info(" CPU%u at MMIO 0x%p (irq = %d)\n", idx, -- cpu->map_base, cpu->parent_irq); -+ pr_info(" CPU%u (irq = %d)\n", idx, cpu->parent_irq); - } - - return 0; diff --git a/target/linux/generic/pending-6.6/486-01-mtd-spinand-add-support-for-ESMT-F50x1G41LB.patch b/target/linux/generic/pending-6.6/486-01-mtd-spinand-add-support-for-ESMT-F50x1G41LB.patch deleted file mode 100644 index b8116db842..0000000000 --- a/target/linux/generic/pending-6.6/486-01-mtd-spinand-add-support-for-ESMT-F50x1G41LB.patch +++ /dev/null @@ -1,143 +0,0 @@ -From a43b844cb40bf1b783055fdc81b7f991e21e7e76 Mon Sep 17 00:00:00 2001 -From: Chuanhong Guo -Date: Wed, 13 Apr 2022 11:58:17 +0800 -Subject: [PATCH] mtd: spinand: add support for ESMT F50x1G41LB - -This patch adds support for ESMT F50L1G41LB and F50D1G41LB. -It seems that ESMT likes to use random JEDEC ID from other vendors. -Their 1G chips uses 0xc8 from GigaDevice and 2G/4G chips uses 0x2c from -Micron. For this reason, the ESMT entry is named esmt_c8 with explicit -JEDEC ID in variable name. - -Datasheets: -https://www.esmt.com.tw/upload/pdf/ESMT/datasheets/F50L1G41LB(2M).pdf -https://www.esmt.com.tw/upload/pdf/ESMT/datasheets/F50D1G41LB(2M).pdf - -Signed-off-by: Chuanhong Guo ---- - drivers/mtd/nand/spi/Makefile | 2 +- - drivers/mtd/nand/spi/core.c | 1 + - drivers/mtd/nand/spi/esmt.c | 89 +++++++++++++++++++++++++++++++++++ - include/linux/mtd/spinand.h | 1 + - 4 files changed, 92 insertions(+), 1 deletion(-) - create mode 100644 drivers/mtd/nand/spi/esmt.c - ---- a/drivers/mtd/nand/spi/Makefile -+++ b/drivers/mtd/nand/spi/Makefile -@@ -1,3 +1,3 @@ - # SPDX-License-Identifier: GPL-2.0 --spinand-objs := core.o ato.o gigadevice.o macronix.o micron.o paragon.o toshiba.o winbond.o xtx.o -+spinand-objs := core.o ato.o esmt.o gigadevice.o macronix.o micron.o paragon.o toshiba.o winbond.o xtx.o - obj-$(CONFIG_MTD_SPI_NAND) += spinand.o ---- a/drivers/mtd/nand/spi/core.c -+++ b/drivers/mtd/nand/spi/core.c -@@ -938,6 +938,7 @@ static const struct nand_ops spinand_ops - - static const struct spinand_manufacturer *spinand_manufacturers[] = { - &ato_spinand_manufacturer, -+ &esmt_c8_spinand_manufacturer, - &gigadevice_spinand_manufacturer, - ¯onix_spinand_manufacturer, - µn_spinand_manufacturer, ---- /dev/null -+++ b/drivers/mtd/nand/spi/esmt.c -@@ -0,0 +1,89 @@ -+// SPDX-License-Identifier: GPL-2.0 -+/* -+ * Author: -+ * Chuanhong Guo -+ */ -+ -+#include -+#include -+#include -+ -+/* ESMT uses GigaDevice 0xc8 JECDEC ID on some SPI NANDs */ -+#define SPINAND_MFR_ESMT_C8 0xc8 -+ -+static SPINAND_OP_VARIANTS(read_cache_variants, -+ SPINAND_PAGE_READ_FROM_CACHE_QUADIO_OP(0, 2, NULL, 0), -+ SPINAND_PAGE_READ_FROM_CACHE_X4_OP(0, 1, NULL, 0), -+ SPINAND_PAGE_READ_FROM_CACHE_DUALIO_OP(0, 1, NULL, 0), -+ SPINAND_PAGE_READ_FROM_CACHE_X2_OP(0, 1, NULL, 0), -+ SPINAND_PAGE_READ_FROM_CACHE_OP(true, 0, 1, NULL, 0), -+ SPINAND_PAGE_READ_FROM_CACHE_OP(false, 0, 1, NULL, 0)); -+ -+static SPINAND_OP_VARIANTS(write_cache_variants, -+ SPINAND_PROG_LOAD_X4(true, 0, NULL, 0), -+ SPINAND_PROG_LOAD(true, 0, NULL, 0)); -+ -+static SPINAND_OP_VARIANTS(update_cache_variants, -+ SPINAND_PROG_LOAD_X4(false, 0, NULL, 0), -+ SPINAND_PROG_LOAD(false, 0, NULL, 0)); -+ -+static int f50l1g41lb_ooblayout_ecc(struct mtd_info *mtd, int section, -+ struct mtd_oob_region *region) -+{ -+ if (section > 3) -+ return -ERANGE; -+ -+ region->offset = 16 * section + 8; -+ region->length = 8; -+ -+ return 0; -+} -+ -+static int f50l1g41lb_ooblayout_free(struct mtd_info *mtd, int section, -+ struct mtd_oob_region *region) -+{ -+ if (section > 3) -+ return -ERANGE; -+ -+ region->offset = 16 * section + 2; -+ region->length = 6; -+ -+ return 0; -+} -+ -+static const struct mtd_ooblayout_ops f50l1g41lb_ooblayout = { -+ .ecc = f50l1g41lb_ooblayout_ecc, -+ .free = f50l1g41lb_ooblayout_free, -+}; -+ -+static const struct spinand_info esmt_c8_spinand_table[] = { -+ SPINAND_INFO("F50L1G41LB", -+ SPINAND_ID(SPINAND_READID_METHOD_OPCODE_ADDR, 0x01), -+ NAND_MEMORG(1, 2048, 64, 64, 1024, 20, 1, 1, 1), -+ NAND_ECCREQ(1, 512), -+ SPINAND_INFO_OP_VARIANTS(&read_cache_variants, -+ &write_cache_variants, -+ &update_cache_variants), -+ 0, -+ SPINAND_ECCINFO(&f50l1g41lb_ooblayout, NULL)), -+ SPINAND_INFO("F50D1G41LB", -+ SPINAND_ID(SPINAND_READID_METHOD_OPCODE_ADDR, 0x11), -+ NAND_MEMORG(1, 2048, 64, 64, 1024, 20, 1, 1, 1), -+ NAND_ECCREQ(1, 512), -+ SPINAND_INFO_OP_VARIANTS(&read_cache_variants, -+ &write_cache_variants, -+ &update_cache_variants), -+ 0, -+ SPINAND_ECCINFO(&f50l1g41lb_ooblayout, NULL)), -+}; -+ -+static const struct spinand_manufacturer_ops esmt_spinand_manuf_ops = { -+}; -+ -+const struct spinand_manufacturer esmt_c8_spinand_manufacturer = { -+ .id = SPINAND_MFR_ESMT_C8, -+ .name = "ESMT", -+ .chips = esmt_c8_spinand_table, -+ .nchips = ARRAY_SIZE(esmt_c8_spinand_table), -+ .ops = &esmt_spinand_manuf_ops, -+}; ---- a/include/linux/mtd/spinand.h -+++ b/include/linux/mtd/spinand.h -@@ -261,6 +261,7 @@ struct spinand_manufacturer { - - /* SPI NAND manufacturers */ - extern const struct spinand_manufacturer ato_spinand_manufacturer; -+extern const struct spinand_manufacturer esmt_c8_spinand_manufacturer; - extern const struct spinand_manufacturer gigadevice_spinand_manufacturer; - extern const struct spinand_manufacturer macronix_spinand_manufacturer; - extern const struct spinand_manufacturer micron_spinand_manufacturer; diff --git a/target/linux/generic/pending-6.6/732-03-net-ethernet-mtk_eth_soc-fix-remaining-throughput-re.patch b/target/linux/generic/pending-6.6/732-03-net-ethernet-mtk_eth_soc-fix-remaining-throughput-re.patch deleted file mode 100644 index 0a49c75b00..0000000000 --- a/target/linux/generic/pending-6.6/732-03-net-ethernet-mtk_eth_soc-fix-remaining-throughput-re.patch +++ /dev/null @@ -1,42 +0,0 @@ -From: Felix Fietkau -Date: Wed, 29 Mar 2023 16:02:54 +0200 -Subject: [PATCH] net: ethernet: mtk_eth_soc: fix remaining throughput - regression - -Based on further tests, it seems that the QDMA shaper is not able to -perform shaping close to the MAC link rate without throughput loss. -This cannot be compensated by increasing the shaping rate, so it seems -to be an internal limit. - -Fix the remaining throughput regression by detecting that condition and -limiting shaping to ports with lower link speed. - -This patch intentionally ignores link speed gain from TRGMII, because -even on such links, shaping to 1000 Mbit/s incurs some throughput -degradation. - -Fixes: f63959c7eec3 ("net: ethernet: mtk_eth_soc: implement multi-queue support for per-port queues") -Reported-by: Frank Wunderlich -Signed-off-by: Felix Fietkau ---- - ---- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c -+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c -@@ -767,6 +767,7 @@ static void mtk_mac_link_up(struct phyli - MAC_MCR_FORCE_RX_FC); - - /* Configure speed */ -+ mac->speed = speed; - switch (speed) { - case SPEED_2500: - case SPEED_1000: -@@ -3348,6 +3349,9 @@ found: - if (dp->index >= MTK_QDMA_NUM_QUEUES) - return NOTIFY_DONE; - -+ if (mac->speed > 0 && mac->speed <= s.base.speed) -+ s.base.speed = 0; -+ - mtk_set_queue_speed(eth, dp->index + 3, s.base.speed); - - return NOTIFY_DONE; diff --git a/target/linux/generic/pending-6.6/734-net-ethernet-mtk_eth_soc-ppe-fix-L2-offloading-with-.patch b/target/linux/generic/pending-6.6/734-net-ethernet-mtk_eth_soc-ppe-fix-L2-offloading-with-.patch deleted file mode 100644 index 61042c1ad0..0000000000 --- a/target/linux/generic/pending-6.6/734-net-ethernet-mtk_eth_soc-ppe-fix-L2-offloading-with-.patch +++ /dev/null @@ -1,33 +0,0 @@ -From: Felix Fietkau -Date: Tue, 27 Dec 2022 15:02:51 +0100 -Subject: [PATCH] net: ethernet: mtk_eth_soc: ppe: fix L2 offloading with DSA - untagging offload enabled - -Check for skb metadata in order to detect the case where the DSA header is not -present. - -Fixes: 2d7605a72906 ("net: ethernet: mtk_eth_soc: enable hardware DSA untagging") -Signed-off-by: Felix Fietkau ---- - ---- a/drivers/net/ethernet/mediatek/mtk_ppe.c -+++ b/drivers/net/ethernet/mediatek/mtk_ppe.c -@@ -8,6 +8,7 @@ - #include - #include - #include -+#include - #include - #include "mtk_eth_soc.h" - #include "mtk_ppe.h" -@@ -829,7 +830,9 @@ void __mtk_ppe_check_skb(struct mtk_ppe - skb->dev->dsa_ptr->tag_ops->proto != DSA_TAG_PROTO_MTK) - goto out; - -- tag += 4; -+ if (!skb_metadata_dst(skb)) -+ tag += 4; -+ - if (get_unaligned_be16(tag) != ETH_P_8021Q) - break; - diff --git a/target/linux/generic/pending-6.6/738-net-ethernet-mtk_eth_soc-set-coherent-mask-to-get-PP.patch b/target/linux/generic/pending-6.6/738-net-ethernet-mtk_eth_soc-set-coherent-mask-to-get-PP.patch deleted file mode 100644 index b598d15866..0000000000 --- a/target/linux/generic/pending-6.6/738-net-ethernet-mtk_eth_soc-set-coherent-mask-to-get-PP.patch +++ /dev/null @@ -1,46 +0,0 @@ -From dee3f591103910c8d8b2a6d57879ccd2a4be4b10 Mon Sep 17 00:00:00 2001 -Message-ID: -From: Daniel Golle -Date: Wed, 24 Jan 2024 03:19:49 +0000 -Subject: [PATCH net] net: ethernet: mtk_eth_soc: set coherent mask to get PPE - working -To: Felix Fietkau , - Sean Wang , - Mark Lee , - Lorenzo Bianconi , - David S. Miller , - Eric Dumazet , - Jakub Kicinski , - Paolo Abeni , - Matthias Brugger , - AngeloGioacchino Del Regno , - Daniel Golle , - netdev@vger.kernel.org, - linux-kernel@vger.kernel.org, - linux-arm-kernel@lists.infradead.org, - linux-mediatek@lists.infradead.org - -Set DMA coherent mask to 32-bit which makes PPE offloading engine start -working on BPi-R4 which got 4 GiB of RAM. - -Fixes: 2d75891ebc09 ("net: ethernet: mtk_eth_soc: support 36-bit DMA addressing on MT7988") -Suggested-by: Elad Yifee -Signed-off-by: Daniel Golle ---- - drivers/net/ethernet/mediatek/mtk_eth_soc.c | 5 ++++- - 1 file changed, 4 insertions(+), 1 deletion(-) - ---- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c -+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c -@@ -4963,7 +4963,10 @@ static int mtk_probe(struct platform_dev - } - - if (MTK_HAS_CAPS(eth->soc->caps, MTK_36BIT_DMA)) { -- err = dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(36)); -+ err = dma_set_mask(&pdev->dev, DMA_BIT_MASK(36)); -+ if (!err) -+ err = dma_set_coherent_mask(&pdev->dev, DMA_BIT_MASK(32)); -+ - if (err) { - dev_err(&pdev->dev, "Wrong DMA config\n"); - return -EINVAL; diff --git a/target/linux/generic/pending-6.6/772-net-dsa-b53-add-support-for-BCM63xx-RGMIIs.patch b/target/linux/generic/pending-6.6/772-net-dsa-b53-add-support-for-BCM63xx-RGMIIs.patch deleted file mode 100644 index 23859816fa..0000000000 --- a/target/linux/generic/pending-6.6/772-net-dsa-b53-add-support-for-BCM63xx-RGMIIs.patch +++ /dev/null @@ -1,174 +0,0 @@ -From patchwork Sun Mar 19 22:08:05 2023 -Content-Type: text/plain; charset="utf-8" -MIME-Version: 1.0 -Content-Transfer-Encoding: 8bit -X-Patchwork-Submitter: =?utf-8?q?=C3=81lvaro_Fern=C3=A1ndez_Rojas?= - -X-Patchwork-Id: 13180645 -X-Patchwork-Delegate: kuba@kernel.org -Return-Path: -X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on - aws-us-west-2-korg-lkml-1.web.codeaurora.org -Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) - by smtp.lore.kernel.org (Postfix) with ESMTP id A7A46C6FD1F - for ; Sun, 19 Mar 2023 22:08:15 +0000 (UTC) -Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand - id S230223AbjCSWIN (ORCPT ); - Sun, 19 Mar 2023 18:08:13 -0400 -Received: from lindbergh.monkeyblade.net ([23.128.96.19]:32878 "EHLO - lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org - with ESMTP id S229565AbjCSWIM (ORCPT - ); Sun, 19 Mar 2023 18:08:12 -0400 -Received: from mail-wr1-x42e.google.com (mail-wr1-x42e.google.com - [IPv6:2a00:1450:4864:20::42e]) - by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 605D3E062; - Sun, 19 Mar 2023 15:08:10 -0700 (PDT) -Received: by mail-wr1-x42e.google.com with SMTP id h17so8695188wrt.8; - Sun, 19 Mar 2023 15:08:10 -0700 (PDT) -DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; - d=gmail.com; s=20210112; t=1679263689; - h=content-transfer-encoding:mime-version:references:in-reply-to - :message-id:date:subject:cc:to:from:from:to:cc:subject:date - :message-id:reply-to; - bh=GmPK75Q9ZD3h3IYflWYuDwS99V2e532KgDlnNucAoJg=; - b=PSdrywW48P4Lq8z9wOSPXFB/ZdO/JfuyiGlw3Gz1Iriy+Smo/cBnJ0Ve9zKkX3AKTO - Tr7/g8xhSQX8sU5WAOEPC13uVjKpO4VZsamXHTmMKL4mmfII3K/piAsQcMQkkNpgouab - Ci9yr+7ASSmqEUHIbYTM6sl6a47rPwqk3b3DcTIE2CwJsPPNXnpQ/aSVbJAcEdhcZICc - X4rAmjrYjcsl8coFIGHHPlrMH9ShekQWxB84vEb6bO1nXOORNPizOHuY1vJ3wa3WgXsx - YwlvutMFVIUXfgL2ZwCmQAKWJPiAaFk+CCk3oxSeOYoAzkjcbMyapz9VnooStfvR2aV3 - k+2g== -X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; - d=1e100.net; s=20210112; t=1679263689; - h=content-transfer-encoding:mime-version:references:in-reply-to - :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc - :subject:date:message-id:reply-to; - bh=GmPK75Q9ZD3h3IYflWYuDwS99V2e532KgDlnNucAoJg=; - b=NGjqrGERyaxRwINtevHaY97h9X9W+1UY62YYwotqwv5+cfvB8myjBbD3WH2WzaqMes - o9MMER9RE8/arW3jIVlBv4ORDUuEZ7AeGgy5UbFyQZIPHlp+hJ/sxFrGvYUwamg4Qrr9 - ojargh8ORsEiMeqaf+5AkmEagNhrrV3ax0pUuWDzbJ3vXGoHjfCetHz5xyNL46dvXBfb - l/OZqjv9IYob552uUoUmCy/TbEQDqvmjkFrROFK9gtBNxgxUJkwbyiWIOVsf6RR8OarP - f7bbvSJYkvTvzx2u/g0Up7NW5ZyihMGBmDs377M3yW6AnSxW6jlfl30QmMU1aEigYXvy - v3mA== -X-Gm-Message-State: AO0yUKUm1PYmYa4xlHuVD23mZcZm83a+xbhcbs0Xryi3yF/+UnjM4Cho - GAfqSh5MZ/rlOAm3Vnpn//9hOG5Lc8vLYg== -X-Google-Smtp-Source: - AK7set+5pTahGGgk1hF/mHGkGBhsMf0//oQjZd4QFHx+HaeSgP5f6q7g0bRUcTX8kRtgHH0T7l1/hQ== -X-Received: by 2002:a5d:474f:0:b0:2d6:2ae8:70d with SMTP id - o15-20020a5d474f000000b002d62ae8070dmr2382593wrs.39.1679263688549; - Sun, 19 Mar 2023 15:08:08 -0700 (PDT) -Received: from atlantis.lan (255.red-79-146-124.dynamicip.rima-tde.net. - [79.146.124.255]) - by smtp.gmail.com with ESMTPSA id - d6-20020a5d6dc6000000b002c53f6c7599sm7354727wrz.29.2023.03.19.15.08.07 - (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); - Sun, 19 Mar 2023 15:08:07 -0700 (PDT) -From: =?utf-8?q?=C3=81lvaro_Fern=C3=A1ndez_Rojas?= -To: f.fainelli@gmail.com, jonas.gorski@gmail.com, andrew@lunn.ch, - olteanv@gmail.com, davem@davemloft.net, edumazet@google.com, - kuba@kernel.org, pabeni@redhat.com, netdev@vger.kernel.org, - linux-kernel@vger.kernel.org -Cc: =?utf-8?q?=C3=81lvaro_Fern=C3=A1ndez_Rojas?= -Subject: [PATCH v2] net: dsa: b53: add support for BCM63xx RGMIIs -Date: Sun, 19 Mar 2023 23:08:05 +0100 -Message-Id: <20230319220805.124024-1-noltari@gmail.com> -X-Mailer: git-send-email 2.30.2 -In-Reply-To: <20230319183330.761251-1-noltari@gmail.com> -References: <20230319183330.761251-1-noltari@gmail.com> -MIME-Version: 1.0 -Precedence: bulk -List-ID: -X-Mailing-List: netdev@vger.kernel.org -X-Patchwork-Delegate: kuba@kernel.org - -BCM63xx RGMII ports require additional configuration in order to work. - -Signed-off-by: Álvaro Fernández Rojas -Reviewed-by: Andrew Lunn ---- - v2: add changes suggested by Andrew: - - Use a switch statement. - - Use dev_dbg() instead of dev_info(). - - drivers/net/dsa/b53/b53_common.c | 46 ++++++++++++++++++++++++++++++++ - drivers/net/dsa/b53/b53_priv.h | 1 + - 2 files changed, 47 insertions(+) - ---- a/drivers/net/dsa/b53/b53_common.c -+++ b/drivers/net/dsa/b53/b53_common.c -@@ -1209,6 +1209,46 @@ static void b53_force_port_config(struct - b53_write8(dev, B53_CTRL_PAGE, off, reg); - } - -+static void b53_adjust_63xx_rgmii(struct dsa_switch *ds, int port, -+ phy_interface_t interface) -+{ -+ struct b53_device *dev = ds->priv; -+ u8 rgmii_ctrl = 0, off; -+ -+ if (port == dev->imp_port) -+ off = B53_RGMII_CTRL_IMP; -+ else -+ off = B53_RGMII_CTRL_P(port); -+ -+ b53_read8(dev, B53_CTRL_PAGE, off, &rgmii_ctrl); -+ -+ switch (interface) { -+ case PHY_INTERFACE_MODE_RGMII_ID: -+ rgmii_ctrl |= (RGMII_CTRL_DLL_RXC | RGMII_CTRL_DLL_TXC); -+ break; -+ case PHY_INTERFACE_MODE_RGMII_RXID: -+ rgmii_ctrl &= ~(RGMII_CTRL_DLL_TXC); -+ rgmii_ctrl |= RGMII_CTRL_DLL_RXC; -+ break; -+ case PHY_INTERFACE_MODE_RGMII_TXID: -+ rgmii_ctrl &= ~(RGMII_CTRL_DLL_RXC); -+ rgmii_ctrl |= RGMII_CTRL_DLL_TXC; -+ break; -+ case PHY_INTERFACE_MODE_RGMII: -+ default: -+ rgmii_ctrl &= ~(RGMII_CTRL_DLL_RXC | RGMII_CTRL_DLL_TXC); -+ break; -+ } -+ -+ if (port != dev->imp_port) -+ rgmii_ctrl |= RGMII_CTRL_ENABLE_GMII; -+ -+ b53_write8(dev, B53_CTRL_PAGE, off, rgmii_ctrl); -+ -+ dev_dbg(ds->dev, "Configured port %d for %s\n", port, -+ phy_modes(interface)); -+} -+ - static void b53_adjust_link(struct dsa_switch *ds, int port, - struct phy_device *phydev) - { -@@ -1235,6 +1275,9 @@ static void b53_adjust_link(struct dsa_s - tx_pause, rx_pause); - b53_force_link(dev, port, phydev->link); - -+ if (is63xx(dev) && port >= B53_63XX_RGMII0) -+ b53_adjust_63xx_rgmii(ds, port, phydev->interface); -+ - if (is531x5(dev) && phy_interface_is_rgmii(phydev)) { - if (port == dev->imp_port) - off = B53_RGMII_CTRL_IMP; -@@ -1402,6 +1445,9 @@ void b53_phylink_mac_link_up(struct dsa_ - { - struct b53_device *dev = ds->priv; - -+ if (is63xx(dev) && port >= B53_63XX_RGMII0) -+ b53_adjust_63xx_rgmii(ds, port, interface); -+ - if (mode == MLO_AN_PHY) - return; - ---- a/drivers/net/dsa/b53/b53_priv.h -+++ b/drivers/net/dsa/b53/b53_priv.h -@@ -211,6 +211,7 @@ static inline int is58xx(struct b53_devi - dev->chip_id == BCM7278_DEVICE_ID; - } - -+#define B53_63XX_RGMII0 4 - #define B53_CPU_PORT_25 5 - #define B53_CPU_PORT 8 - diff --git a/target/linux/generic/pending-6.6/773-net-dsa-b53-mmap-add-more-63xx-SoCs.patch b/target/linux/generic/pending-6.6/773-net-dsa-b53-mmap-add-more-63xx-SoCs.patch deleted file mode 100644 index 8ab701ef56..0000000000 --- a/target/linux/generic/pending-6.6/773-net-dsa-b53-mmap-add-more-63xx-SoCs.patch +++ /dev/null @@ -1,108 +0,0 @@ -From patchwork Tue Mar 21 17:33:57 2023 -Content-Type: text/plain; charset="utf-8" -MIME-Version: 1.0 -Content-Transfer-Encoding: 8bit -X-Patchwork-Submitter: =?utf-8?q?=C3=81lvaro_Fern=C3=A1ndez_Rojas?= - -X-Patchwork-Id: 13183003 -X-Patchwork-Delegate: kuba@kernel.org -Return-Path: -X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on - aws-us-west-2-korg-lkml-1.web.codeaurora.org -Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) - by smtp.lore.kernel.org (Postfix) with ESMTP id 823A1C761AF - for ; Tue, 21 Mar 2023 17:35:06 +0000 (UTC) -Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand - id S230490AbjCURfE (ORCPT ); - Tue, 21 Mar 2023 13:35:04 -0400 -Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47440 "EHLO - lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org - with ESMTP id S230357AbjCURex (ORCPT - ); Tue, 21 Mar 2023 13:34:53 -0400 -Received: from mail-wr1-x430.google.com (mail-wr1-x430.google.com - [IPv6:2a00:1450:4864:20::430]) - by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C9A45559D8; - Tue, 21 Mar 2023 10:34:26 -0700 (PDT) -Received: by mail-wr1-x430.google.com with SMTP id m2so14547588wrh.6; - Tue, 21 Mar 2023 10:34:26 -0700 (PDT) -DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; - d=gmail.com; s=20210112; t=1679420063; - h=content-transfer-encoding:mime-version:references:in-reply-to - :message-id:date:subject:cc:to:from:from:to:cc:subject:date - :message-id:reply-to; - bh=cUvnluVaZPzfEQB9fMRuYo+4/361t/7po7nyUBBJfxc=; - b=F0pa8JmQZ1FeXVtdpCygur8UmLrgKwxCcjaMn312u5zNvsXsEPeCAIDqP2tvNNTwv/ - UYjaNaoZ77HSvv/gSqeG808AXGyNs1PvLuHZYuUTJRNuLaMixKtkNFi4ypheCdk0WCiE - IWz0DIm6ojmdwMqafDUKQ6Qwkv5R0vo8Wh5vpjimEmCelOyMvfuLZNqubsiGqpnCguBp - uWlmKh95/VubCGgiGG2xK1IXQayL14ENuWseDds7nVpVK50NycrFgJbL17Bd6qJKYkbo - m70IC+9jM0hjwKXpyi6ipCBNcW+1E6JIwILVC04Xi+BTpOGhbUAQ59Yn2hyq7tQM7dzs - 4PLg== -X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; - d=1e100.net; s=20210112; t=1679420063; - h=content-transfer-encoding:mime-version:references:in-reply-to - :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc - :subject:date:message-id:reply-to; - bh=cUvnluVaZPzfEQB9fMRuYo+4/361t/7po7nyUBBJfxc=; - b=SCX78yTuGjdnE5nuL0p7+kxGnOzsCExsigLdaV+x/JswmwxSpZvxn223i1yM95klj9 - Rk0RnXqATLF1wZA7L1YmbeZ66zxUwW/osnCjJHPeEF8AGgjK/qawtLl/HJQHN67NaRNQ - bDsRn2nWQ2GRTRFpvD+iGRy4uyQCDu9HFxLbn43fBsBmRnXWGPQP5cEb90tL83/Onp4D - Lx/XcyZOh9QRfJNhj+G1BAeRCLRA/sdA0W3Ecu5SCFs+LtS6uvLVGWDKEDfnZhYY8Xqf - Mx9evWzdW2OorEN2FI6+xTglvnEBcVhHIJ7XEGAhCG6ocgMZeck++774S8RWumWl8xpy - /K9Q== -X-Gm-Message-State: AO0yUKUORAlGfbkNwnYmQnTWcGPqW6sp4g9WfgQmRZGCV+9tCB0OebSP - ICq6v4YPmUPNRl/WNnVCbps= -X-Google-Smtp-Source: - AK7set8pFDl8fHRwGPhAguqxIfqnQ4PY+b57IHEsybIaQ/HPNwdJ1cs1+IPBGHe3TL14dTS4aVNpHA== -X-Received: by 2002:a5d:6991:0:b0:2ce:aab5:f96b with SMTP id - g17-20020a5d6991000000b002ceaab5f96bmr2965175wru.67.1679420062764; - Tue, 21 Mar 2023 10:34:22 -0700 (PDT) -Received: from atlantis.lan (255.red-79-146-124.dynamicip.rima-tde.net. - [79.146.124.255]) - by smtp.gmail.com with ESMTPSA id - b13-20020a056000054d00b002da1261aa44sm184775wrf.48.2023.03.21.10.34.21 - (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); - Tue, 21 Mar 2023 10:34:21 -0700 (PDT) -From: =?utf-8?q?=C3=81lvaro_Fern=C3=A1ndez_Rojas?= -To: f.fainelli@gmail.com, jonas.gorski@gmail.com, andrew@lunn.ch, - olteanv@gmail.com, davem@davemloft.net, edumazet@google.com, - kuba@kernel.org, pabeni@redhat.com, robh+dt@kernel.org, - krzysztof.kozlowski+dt@linaro.org, netdev@vger.kernel.org, - devicetree@vger.kernel.org, linux-kernel@vger.kernel.org -Cc: =?utf-8?q?=C3=81lvaro_Fern=C3=A1ndez_Rojas?= -Subject: [PATCH v2 2/4] net: dsa: b53: mmap: add more 63xx SoCs -Date: Tue, 21 Mar 2023 18:33:57 +0100 -Message-Id: <20230321173359.251778-3-noltari@gmail.com> -X-Mailer: git-send-email 2.30.2 -In-Reply-To: <20230321173359.251778-1-noltari@gmail.com> -References: <20230320155024.164523-1-noltari@gmail.com> - <20230321173359.251778-1-noltari@gmail.com> -MIME-Version: 1.0 -Precedence: bulk -List-ID: -X-Mailing-List: netdev@vger.kernel.org -X-Patchwork-Delegate: kuba@kernel.org - -BCM6318, BCM6362 and BCM63268 are SoCs with a B53 MMAP switch. - -Signed-off-by: Álvaro Fernández Rojas -Reviewed-by: Florian Fainelli ---- - v2: no changes. - - drivers/net/dsa/b53/b53_mmap.c | 3 +++ - 1 file changed, 3 insertions(+) - ---- a/drivers/net/dsa/b53/b53_mmap.c -+++ b/drivers/net/dsa/b53/b53_mmap.c -@@ -345,8 +345,11 @@ static void b53_mmap_shutdown(struct pla - - static const struct of_device_id b53_mmap_of_table[] = { - { .compatible = "brcm,bcm3384-switch" }, -+ { .compatible = "brcm,bcm6318-switch" }, - { .compatible = "brcm,bcm6328-switch" }, -+ { .compatible = "brcm,bcm6362-switch" }, - { .compatible = "brcm,bcm6368-switch" }, -+ { .compatible = "brcm,bcm63268-switch" }, - { .compatible = "brcm,bcm63xx-switch" }, - { /* sentinel */ }, - }; diff --git a/target/linux/generic/pending-6.6/774-net-dsa-b53-mmap-allow-passing-a-chip-ID.patch b/target/linux/generic/pending-6.6/774-net-dsa-b53-mmap-allow-passing-a-chip-ID.patch deleted file mode 100644 index de237374af..0000000000 --- a/target/linux/generic/pending-6.6/774-net-dsa-b53-mmap-allow-passing-a-chip-ID.patch +++ /dev/null @@ -1,195 +0,0 @@ -From patchwork Tue Mar 21 17:33:58 2023 -Content-Type: text/plain; charset="utf-8" -MIME-Version: 1.0 -Content-Transfer-Encoding: 8bit -X-Patchwork-Submitter: =?utf-8?q?=C3=81lvaro_Fern=C3=A1ndez_Rojas?= - -X-Patchwork-Id: 13183004 -X-Patchwork-Delegate: kuba@kernel.org -Return-Path: -X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on - aws-us-west-2-korg-lkml-1.web.codeaurora.org -Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) - by smtp.lore.kernel.org (Postfix) with ESMTP id B2B12C74A5B - for ; Tue, 21 Mar 2023 17:35:12 +0000 (UTC) -Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand - id S230297AbjCURfK (ORCPT ); - Tue, 21 Mar 2023 13:35:10 -0400 -Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47438 "EHLO - lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org - with ESMTP id S230374AbjCURex (ORCPT - ); Tue, 21 Mar 2023 13:34:53 -0400 -Received: from mail-wr1-x432.google.com (mail-wr1-x432.google.com - [IPv6:2a00:1450:4864:20::432]) - by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C906B5550A; - Tue, 21 Mar 2023 10:34:26 -0700 (PDT) -Received: by mail-wr1-x432.google.com with SMTP id y14so14546846wrq.4; - Tue, 21 Mar 2023 10:34:26 -0700 (PDT) -DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; - d=gmail.com; s=20210112; t=1679420064; - h=content-transfer-encoding:mime-version:references:in-reply-to - :message-id:date:subject:cc:to:from:from:to:cc:subject:date - :message-id:reply-to; - bh=vnvnwWc5Tmg09HBQo/m9RbRM6yM8KLx8r1VA+Abfg3k=; - b=eFv+mwe94Y2YZMiJP5gydXVrGlbIAR5HCrY0rdcoGoMPzQUHLFckZeYCgEKudI55I7 - gMLZYCtLwvDXvKeHM2AUigsq2YuJSeF5QwICPrhTnMwUGBg4yyyltrc3+J0lSd6/4kQv - h0yM1Oo4v0d8CuqjBU6bXienIk34AFVJfsPq+vWQTjAbUL7ht4WHZ2Ez2MFoTvZpkIJA - 5iWMyVoMbugZl6eqNRjvDHFmtBtrZIv8AFs10r2Ca6+Yxm+aq0v33DRkbSVVqgFPNEzy - q5QOXOeLBPL6BvyovOpmVSWGoHf1zFV7lrzcqi+uc+FuYxQ9dyN3ND73DrrhWSkLaSg9 - r8yA== -X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; - d=1e100.net; s=20210112; t=1679420064; - h=content-transfer-encoding:mime-version:references:in-reply-to - :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc - :subject:date:message-id:reply-to; - bh=vnvnwWc5Tmg09HBQo/m9RbRM6yM8KLx8r1VA+Abfg3k=; - b=jIRB8pIlrLA/ovhnEoePs/6SX8fn6l7l4fY2CxX2pLrTbP1JI8AAetPavvrNVQTr2M - Vm0iLbKyL/VpTq9+bSN1SMjaoi4lAMj0pgafoHrwABMVZpFauYvtCfSYTstZ2pw4Dr1j - wYQGj3BUSpFIYHtSIDMkb5449WA3T3TONhaQLRFAUCBD6gAFyEky5fY+DIHrGaj352B6 - 9ST/tkqHgPpuFlmromr42KQWoTFU+Pj0Uhyp7ru4BsnF7tTshWroZZIHUJmSACudEadr - fBPiuurX9jgp9zNqj8Oy0HjiVUnULFCapj8yICGp5s44uDAK/XFqFXpOuJ8ptS6uPazU - xUwg== -X-Gm-Message-State: AO0yUKX2w6QZfaGDHtlZAlY/U8F8VuJa3HwlgXbxgGChgdgvIoFThawv - oDyFAhWbVfe4DxwXTwxgJ/I= -X-Google-Smtp-Source: - AK7set+sH60XiJYup7bqrZTzFJVNe1YGcX/UTfjWV9xfGwNyodc34cHvKpqNagw5J+vEpv6CKvNHaA== -X-Received: by 2002:adf:f344:0:b0:2cd:de25:1c76 with SMTP id - e4-20020adff344000000b002cdde251c76mr12989754wrp.17.1679420064464; - Tue, 21 Mar 2023 10:34:24 -0700 (PDT) -Received: from atlantis.lan (255.red-79-146-124.dynamicip.rima-tde.net. - [79.146.124.255]) - by smtp.gmail.com with ESMTPSA id - b13-20020a056000054d00b002da1261aa44sm184775wrf.48.2023.03.21.10.34.22 - (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); - Tue, 21 Mar 2023 10:34:23 -0700 (PDT) -From: =?utf-8?q?=C3=81lvaro_Fern=C3=A1ndez_Rojas?= -To: f.fainelli@gmail.com, jonas.gorski@gmail.com, andrew@lunn.ch, - olteanv@gmail.com, davem@davemloft.net, edumazet@google.com, - kuba@kernel.org, pabeni@redhat.com, robh+dt@kernel.org, - krzysztof.kozlowski+dt@linaro.org, netdev@vger.kernel.org, - devicetree@vger.kernel.org, linux-kernel@vger.kernel.org -Cc: =?utf-8?q?=C3=81lvaro_Fern=C3=A1ndez_Rojas?= -Subject: [PATCH v2 3/4] net: dsa: b53: mmap: allow passing a chip ID -Date: Tue, 21 Mar 2023 18:33:58 +0100 -Message-Id: <20230321173359.251778-4-noltari@gmail.com> -X-Mailer: git-send-email 2.30.2 -In-Reply-To: <20230321173359.251778-1-noltari@gmail.com> -References: <20230320155024.164523-1-noltari@gmail.com> - <20230321173359.251778-1-noltari@gmail.com> -MIME-Version: 1.0 -Precedence: bulk -List-ID: -X-Mailing-List: netdev@vger.kernel.org -X-Patchwork-Delegate: kuba@kernel.org - -BCM6318 and BCM63268 SoCs require a special handling for their RGMIIs, so we -should be able to identify them as a special BCM63xx switch. - -Signed-off-by: Álvaro Fernández Rojas ---- - v2: - - Add missing chip to b53_switch_chips[]. - - Fix device_get_match_data() casting warning. - - Add BCM63268_DEVICE_ID to BCM6318 too. - - Add BCM6318 in commit description. - - drivers/net/dsa/b53/b53_common.c | 13 +++++++++++++ - drivers/net/dsa/b53/b53_mmap.c | 32 +++++++++++++++++++++++--------- - drivers/net/dsa/b53/b53_priv.h | 9 ++++++++- - 3 files changed, 44 insertions(+), 10 deletions(-) - ---- a/drivers/net/dsa/b53/b53_common.c -+++ b/drivers/net/dsa/b53/b53_common.c -@@ -2466,6 +2466,19 @@ static const struct b53_chip_data b53_sw - .jumbo_size_reg = B53_JUMBO_MAX_SIZE_63XX, - }, - { -+ .chip_id = BCM63268_DEVICE_ID, -+ .dev_name = "BCM63268", -+ .vlans = 4096, -+ .enabled_ports = 0, /* pdata must provide them */ -+ .arl_bins = 4, -+ .arl_buckets = 1024, -+ .imp_port = 8, -+ .vta_regs = B53_VTA_REGS_63XX, -+ .duplex_reg = B53_DUPLEX_STAT_63XX, -+ .jumbo_pm_reg = B53_JUMBO_PORT_MASK_63XX, -+ .jumbo_size_reg = B53_JUMBO_MAX_SIZE_63XX, -+ }, -+ { - .chip_id = BCM53010_DEVICE_ID, - .dev_name = "BCM53010", - .vlans = 4096, ---- a/drivers/net/dsa/b53/b53_mmap.c -+++ b/drivers/net/dsa/b53/b53_mmap.c -@@ -262,7 +262,7 @@ static int b53_mmap_probe_of(struct plat - return -ENOMEM; - - pdata->regs = mem; -- pdata->chip_id = BCM63XX_DEVICE_ID; -+ pdata->chip_id = (u32)(unsigned long)device_get_match_data(dev); - pdata->big_endian = of_property_read_bool(np, "big-endian"); - - of_ports = of_get_child_by_name(np, "ports"); -@@ -344,14 +344,28 @@ static void b53_mmap_shutdown(struct pla - } - - static const struct of_device_id b53_mmap_of_table[] = { -- { .compatible = "brcm,bcm3384-switch" }, -- { .compatible = "brcm,bcm6318-switch" }, -- { .compatible = "brcm,bcm6328-switch" }, -- { .compatible = "brcm,bcm6362-switch" }, -- { .compatible = "brcm,bcm6368-switch" }, -- { .compatible = "brcm,bcm63268-switch" }, -- { .compatible = "brcm,bcm63xx-switch" }, -- { /* sentinel */ }, -+ { -+ .compatible = "brcm,bcm3384-switch", -+ .data = (void *)BCM63XX_DEVICE_ID, -+ }, { -+ .compatible = "brcm,bcm6318-switch", -+ .data = (void *)BCM63268_DEVICE_ID, -+ }, { -+ .compatible = "brcm,bcm6328-switch", -+ .data = (void *)BCM63XX_DEVICE_ID, -+ }, { -+ .compatible = "brcm,bcm6362-switch", -+ .data = (void *)BCM63XX_DEVICE_ID, -+ }, { -+ .compatible = "brcm,bcm6368-switch", -+ .data = (void *)BCM63XX_DEVICE_ID, -+ }, { -+ .compatible = "brcm,bcm63268-switch", -+ .data = (void *)BCM63268_DEVICE_ID, -+ }, { -+ .compatible = "brcm,bcm63xx-switch", -+ .data = (void *)BCM63XX_DEVICE_ID, -+ }, { /* sentinel */ } - }; - MODULE_DEVICE_TABLE(of, b53_mmap_of_table); - ---- a/drivers/net/dsa/b53/b53_priv.h -+++ b/drivers/net/dsa/b53/b53_priv.h -@@ -70,6 +70,7 @@ enum { - BCM53125_DEVICE_ID = 0x53125, - BCM53128_DEVICE_ID = 0x53128, - BCM63XX_DEVICE_ID = 0x6300, -+ BCM63268_DEVICE_ID = 0x63268, - BCM53010_DEVICE_ID = 0x53010, - BCM53011_DEVICE_ID = 0x53011, - BCM53012_DEVICE_ID = 0x53012, -@@ -191,7 +192,13 @@ static inline int is531x5(struct b53_dev - - static inline int is63xx(struct b53_device *dev) - { -- return dev->chip_id == BCM63XX_DEVICE_ID; -+ return dev->chip_id == BCM63XX_DEVICE_ID || -+ dev->chip_id == BCM63268_DEVICE_ID; -+} -+ -+static inline int is63268(struct b53_device *dev) -+{ -+ return dev->chip_id == BCM63268_DEVICE_ID; - } - - static inline int is5301x(struct b53_device *dev) diff --git a/target/linux/generic/pending-6.6/775-net-dsa-b53-add-BCM63268-RGMII-configuration.patch b/target/linux/generic/pending-6.6/775-net-dsa-b53-add-BCM63268-RGMII-configuration.patch deleted file mode 100644 index d90d757fb2..0000000000 --- a/target/linux/generic/pending-6.6/775-net-dsa-b53-add-BCM63268-RGMII-configuration.patch +++ /dev/null @@ -1,123 +0,0 @@ -From patchwork Tue Mar 21 17:33:59 2023 -Content-Type: text/plain; charset="utf-8" -MIME-Version: 1.0 -Content-Transfer-Encoding: 8bit -X-Patchwork-Submitter: =?utf-8?q?=C3=81lvaro_Fern=C3=A1ndez_Rojas?= - -X-Patchwork-Id: 13183005 -X-Patchwork-Delegate: kuba@kernel.org -Return-Path: -X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on - aws-us-west-2-korg-lkml-1.web.codeaurora.org -Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) - by smtp.lore.kernel.org (Postfix) with ESMTP id 31BE4C761A6 - for ; Tue, 21 Mar 2023 17:35:16 +0000 (UTC) -Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand - id S229674AbjCURfN (ORCPT ); - Tue, 21 Mar 2023 13:35:13 -0400 -Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47684 "EHLO - lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org - with ESMTP id S230327AbjCURfB (ORCPT - ); Tue, 21 Mar 2023 13:35:01 -0400 -Received: from mail-wr1-x436.google.com (mail-wr1-x436.google.com - [IPv6:2a00:1450:4864:20::436]) - by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E1D855507D; - Tue, 21 Mar 2023 10:34:27 -0700 (PDT) -Received: by mail-wr1-x436.google.com with SMTP id i9so14537769wrp.3; - Tue, 21 Mar 2023 10:34:27 -0700 (PDT) -DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; - d=gmail.com; s=20210112; t=1679420066; - h=content-transfer-encoding:mime-version:references:in-reply-to - :message-id:date:subject:cc:to:from:from:to:cc:subject:date - :message-id:reply-to; - bh=asmFs22xWYwR1Ql9m/IrNv+MPUNDn8hSjmwDRYvO7mE=; - b=Cqj2C6aG5vEOlhh9N3ybvDA0CV38nhQODnfdnr7utNddd323iDagoJty1Wmi3MAzj1 - 5ORmYT5fQvUnild7C4RhcCNTBn+MoYZ+wDZwZYelu6BKHkW11YFK949ax5B50by+ASR2 - z+rGI3wR5fVXd4VDgmcsT6zF5x69wKyhbhqIfrhG9BVFTctfaBgDS/l+bX1C56kSqv82 - bQkKSSAehSLGpFoCU3q62OGoZVi3jDe6HDb5M1Dp2mgHhqsW19otZpJ57DjtZ1CmtPai - o7T/ew6WoIYSl6whBmV36jeNaDJ3TItOBrKc4nMJBDWaCg4DNzUSe0ei5Xz7Oik5lb3p - y9ew== -X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; - d=1e100.net; s=20210112; t=1679420066; - h=content-transfer-encoding:mime-version:references:in-reply-to - :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc - :subject:date:message-id:reply-to; - bh=asmFs22xWYwR1Ql9m/IrNv+MPUNDn8hSjmwDRYvO7mE=; - b=UdI2iQNBYwRf40ivf3ROR132t95BU/p3RUzXdZLCyz6c6JWtECQ5byyGeEwoX10n5u - HlepoNTJxMFLYrAHGvNLDPpWPuLXMa645S1mCVZ7NyWp8W96XzSynNZPeXHuJdb464QU - A7UTRSW3mlvKe9OR3EcB2CfBZv0yHWR0ldbnxcxGUFw8z78PNqpOVnITtjBdfpGesJ9c - VJw+fiM6hCcahor4nk9LLcAryPm8xmhDLxBKaLILO8wyTUiHY8G9hsXnFCtcpetnF5wS - pW13beAE+odb7ZZaXZUYpWGYhCe/hLzNjbo8YpgzHwadZthxPrT5YvNIYwyrvoViLM0n - KDRQ== -X-Gm-Message-State: AO0yUKW+9H/kqcAUyWeZhZJhiJjsBcYn1THmZaSDrPrk/pNuGXJXGtJd - NgsGZW8iSqLEv81yK+U5Os8= -X-Google-Smtp-Source: - AK7set/lzQZwCSxVaOe5dZ+7TR3xaQty/vg5xvZDpRW8TwTiPQblIbw5kJJTPLp67RySehrPIlCqSg== -X-Received: by 2002:a5d:65c9:0:b0:2ce:ac31:54ff with SMTP id - e9-20020a5d65c9000000b002ceac3154ffmr2776515wrw.2.1679420066191; - Tue, 21 Mar 2023 10:34:26 -0700 (PDT) -Received: from atlantis.lan (255.red-79-146-124.dynamicip.rima-tde.net. - [79.146.124.255]) - by smtp.gmail.com with ESMTPSA id - b13-20020a056000054d00b002da1261aa44sm184775wrf.48.2023.03.21.10.34.24 - (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); - Tue, 21 Mar 2023 10:34:25 -0700 (PDT) -From: =?utf-8?q?=C3=81lvaro_Fern=C3=A1ndez_Rojas?= -To: f.fainelli@gmail.com, jonas.gorski@gmail.com, andrew@lunn.ch, - olteanv@gmail.com, davem@davemloft.net, edumazet@google.com, - kuba@kernel.org, pabeni@redhat.com, robh+dt@kernel.org, - krzysztof.kozlowski+dt@linaro.org, netdev@vger.kernel.org, - devicetree@vger.kernel.org, linux-kernel@vger.kernel.org -Cc: =?utf-8?q?=C3=81lvaro_Fern=C3=A1ndez_Rojas?= , - Simon Horman -Subject: [PATCH v2 4/4] net: dsa: b53: add BCM63268 RGMII configuration -Date: Tue, 21 Mar 2023 18:33:59 +0100 -Message-Id: <20230321173359.251778-5-noltari@gmail.com> -X-Mailer: git-send-email 2.30.2 -In-Reply-To: <20230321173359.251778-1-noltari@gmail.com> -References: <20230320155024.164523-1-noltari@gmail.com> - <20230321173359.251778-1-noltari@gmail.com> -MIME-Version: 1.0 -Precedence: bulk -List-ID: -X-Mailing-List: netdev@vger.kernel.org -X-Patchwork-Delegate: kuba@kernel.org - -BCM63268 requires special RGMII configuration to work. - -Signed-off-by: Álvaro Fernández Rojas -Reviewed-by: Florian Fainelli -Reviewed-by: Simon Horman ---- - v2: no changes. - - drivers/net/dsa/b53/b53_common.c | 6 +++++- - drivers/net/dsa/b53/b53_regs.h | 1 + - 2 files changed, 6 insertions(+), 1 deletion(-) - ---- a/drivers/net/dsa/b53/b53_common.c -+++ b/drivers/net/dsa/b53/b53_common.c -@@ -1240,8 +1240,12 @@ static void b53_adjust_63xx_rgmii(struct - break; - } - -- if (port != dev->imp_port) -+ if (port != dev->imp_port) { -+ if (is63268(dev)) -+ rgmii_ctrl |= RGMII_CTRL_MII_OVERRIDE; -+ - rgmii_ctrl |= RGMII_CTRL_ENABLE_GMII; -+ } - - b53_write8(dev, B53_CTRL_PAGE, off, rgmii_ctrl); - ---- a/drivers/net/dsa/b53/b53_regs.h -+++ b/drivers/net/dsa/b53/b53_regs.h -@@ -138,6 +138,7 @@ - - #define B53_RGMII_CTRL_IMP 0x60 - #define RGMII_CTRL_ENABLE_GMII BIT(7) -+#define RGMII_CTRL_MII_OVERRIDE BIT(6) - #define RGMII_CTRL_TIMING_SEL BIT(2) - #define RGMII_CTRL_DLL_RXC BIT(1) - #define RGMII_CTRL_DLL_TXC BIT(0) diff --git a/target/linux/generic/pending-6.6/777-net-dsa-b53-mdio-add-support-for-BCM53134.patch b/target/linux/generic/pending-6.6/777-net-dsa-b53-mdio-add-support-for-BCM53134.patch deleted file mode 100644 index f0ae2defce..0000000000 --- a/target/linux/generic/pending-6.6/777-net-dsa-b53-mdio-add-support-for-BCM53134.patch +++ /dev/null @@ -1,189 +0,0 @@ -From patchwork Fri Mar 24 08:41:38 2023 -Content-Type: text/plain; charset="utf-8" -MIME-Version: 1.0 -Content-Transfer-Encoding: 8bit -X-Patchwork-Submitter: =?utf-8?q?=C3=81lvaro_Fern=C3=A1ndez_Rojas?= - -X-Patchwork-Id: 13186549 -X-Patchwork-Delegate: kuba@kernel.org -Return-Path: -X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on - aws-us-west-2-korg-lkml-1.web.codeaurora.org -Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) - by smtp.lore.kernel.org (Postfix) with ESMTP id EF744C76195 - for ; Fri, 24 Mar 2023 08:42:01 +0000 (UTC) -Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand - id S231807AbjCXImA (ORCPT ); - Fri, 24 Mar 2023 04:42:00 -0400 -Received: from lindbergh.monkeyblade.net ([23.128.96.19]:32956 "EHLO - lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org - with ESMTP id S231272AbjCXIly (ORCPT - ); Fri, 24 Mar 2023 04:41:54 -0400 -Received: from mail-ed1-x535.google.com (mail-ed1-x535.google.com - [IPv6:2a00:1450:4864:20::535]) - by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 113A517CF3; - Fri, 24 Mar 2023 01:41:46 -0700 (PDT) -Received: by mail-ed1-x535.google.com with SMTP id ek18so4877175edb.6; - Fri, 24 Mar 2023 01:41:45 -0700 (PDT) -DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; - d=gmail.com; s=20210112; t=1679647304; - h=content-transfer-encoding:mime-version:references:in-reply-to - :message-id:date:subject:cc:to:from:from:to:cc:subject:date - :message-id:reply-to; - bh=OfUWRaFIQIQw/lRivER+LHryfdLliXzvabGrcmkQVEU=; - b=JMrl6Eay1FS0JZqgPHsbcVzuNAbFELc0SLNGyzYtOVQXcI+YwKDM9Ls7I9PsQVEPoZ - CthomCTYoz5G9DU7uBuia207rnjOhssZJRu0syrCoU+O/ZiQyGLJDvq61z5oZJxC2S40 - kzRsUsC6MRjn64DKPWmxhsSTMKLzn2+P233LKNFbHtfi3NWF5Qu/85sUkxMurnfUgja0 - qQhl25qYY7ZIvmlFHYefaI5UkITQFuiybrqJW9tztCdHf/gS+f33YkkvQ8njmMQa1DW0 - ppedfOUotX+6kmHZGX1yea2V5ezEGGvRourZtYMoecTiD0E5d1J1bKhktKslVLIDm0ig - oc2g== -X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; - d=1e100.net; s=20210112; t=1679647304; - h=content-transfer-encoding:mime-version:references:in-reply-to - :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc - :subject:date:message-id:reply-to; - bh=OfUWRaFIQIQw/lRivER+LHryfdLliXzvabGrcmkQVEU=; - b=b3Gmga5ZDbnmQfnw1GCz+eU2JwgsVzfciZuSmfYAiVxpW4c6cur3MHbpzDPhi99wzA - ZYAM7ryLv88rXl/tQB5g2Nte5rvMfxUeHXsT/JpsRcSSocFRbRrk0QJyiA/Xj86NiD5N - C1sKz50Im190FmrvPcBh6OHQbv/3MQyE+1fQx+9q3jW5rQiAWQaYk4Ng8GlWA7gtG3jB - fHO6Fuoenn32pgkveJbQLYL/2t2f53wGf3QLQ3IeKW7jdfIHNThwrwqBMxdHoIDaTBT9 - UWMeJuiYtylIibo/3zbORbWOgIERlWxZRf3BCOFpnzUn4eBzio4LgjtNxZ77ITRxsmbk - 3+Hg== -X-Gm-Message-State: AAQBX9dfyBfbR7Sdd5wqxMiAv3Yhk47pK1XzD87MZyAF3AxyoFyKcMaF - EbwJLyRvTGQEFdVWCGw1eMU= -X-Google-Smtp-Source: - AKy350bpDVLq7k1FxG2Mek/VIobZL4KhufiKx8qfmpxpcWmLI3bLg8wfQKEAKJRNJBleo/7CZuCL5g== -X-Received: by 2002:aa7:c711:0:b0:4a2:588f:b3c5 with SMTP id - i17-20020aa7c711000000b004a2588fb3c5mr2261236edq.21.1679647304260; - Fri, 24 Mar 2023 01:41:44 -0700 (PDT) -Received: from atlantis.lan (255.red-79-146-124.dynamicip.rima-tde.net. - [79.146.124.255]) - by smtp.gmail.com with ESMTPSA id - z21-20020a50cd15000000b004acbda55f6bsm10323728edi.27.2023.03.24.01.41.43 - (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); - Fri, 24 Mar 2023 01:41:43 -0700 (PDT) -From: =?utf-8?q?=C3=81lvaro_Fern=C3=A1ndez_Rojas?= -To: paul.geurts@prodrive-technologies.com, f.fainelli@gmail.com, - jonas.gorski@gmail.com, andrew@lunn.ch, olteanv@gmail.com, - davem@davemloft.net, edumazet@google.com, kuba@kernel.org, - pabeni@redhat.com, robh+dt@kernel.org, - krzysztof.kozlowski+dt@linaro.org, netdev@vger.kernel.org, - devicetree@vger.kernel.org, linux-kernel@vger.kernel.org -Cc: =?utf-8?q?=C3=81lvaro_Fern=C3=A1ndez_Rojas?= -Subject: [PATCH v2 2/2] net: dsa: b53: mdio: add support for BCM53134 -Date: Fri, 24 Mar 2023 09:41:38 +0100 -Message-Id: <20230324084138.664285-3-noltari@gmail.com> -X-Mailer: git-send-email 2.30.2 -In-Reply-To: <20230324084138.664285-1-noltari@gmail.com> -References: <20230323121804.2249605-1-noltari@gmail.com> - <20230324084138.664285-1-noltari@gmail.com> -MIME-Version: 1.0 -Precedence: bulk -List-ID: -X-Mailing-List: netdev@vger.kernel.org -X-Patchwork-Delegate: kuba@kernel.org - -From: Paul Geurts - -Add support for the BCM53134 Ethernet switch in the existing b53 dsa driver. -BCM53134 is very similar to the BCM58XX series. - -Signed-off-by: Paul Geurts -Signed-off-by: Álvaro Fernández Rojas ---- - v2: add BCM53134 to is531x5() and remove special RGMII config - - drivers/net/dsa/b53/b53_common.c | 15 +++++++++++++++ - drivers/net/dsa/b53/b53_mdio.c | 5 ++++- - drivers/net/dsa/b53/b53_priv.h | 7 +++++-- - 3 files changed, 24 insertions(+), 3 deletions(-) - ---- a/drivers/net/dsa/b53/b53_common.c -+++ b/drivers/net/dsa/b53/b53_common.c -@@ -2613,6 +2613,20 @@ static const struct b53_chip_data b53_sw - .jumbo_pm_reg = B53_JUMBO_PORT_MASK, - .jumbo_size_reg = B53_JUMBO_MAX_SIZE, - }, -+ { -+ .chip_id = BCM53134_DEVICE_ID, -+ .dev_name = "BCM53134", -+ .vlans = 4096, -+ .enabled_ports = 0x12f, -+ .imp_port = 8, -+ .cpu_port = B53_CPU_PORT, -+ .vta_regs = B53_VTA_REGS, -+ .arl_bins = 4, -+ .arl_buckets = 1024, -+ .duplex_reg = B53_DUPLEX_STAT_GE, -+ .jumbo_pm_reg = B53_JUMBO_PORT_MASK, -+ .jumbo_size_reg = B53_JUMBO_MAX_SIZE, -+ }, - }; - - static int b53_switch_init(struct b53_device *dev) -@@ -2790,6 +2804,7 @@ int b53_switch_detect(struct b53_device - case BCM53012_DEVICE_ID: - case BCM53018_DEVICE_ID: - case BCM53019_DEVICE_ID: -+ case BCM53134_DEVICE_ID: - dev->chip_id = id32; - break; - default: ---- a/drivers/net/dsa/b53/b53_mdio.c -+++ b/drivers/net/dsa/b53/b53_mdio.c -@@ -286,6 +286,7 @@ static const struct b53_io_ops b53_mdio_ - #define B53_BRCM_OUI_2 0x03625c00 - #define B53_BRCM_OUI_3 0x00406000 - #define B53_BRCM_OUI_4 0x01410c00 -+#define B53_BRCM_OUI_5 0xae025000 - - static int b53_mdio_probe(struct mdio_device *mdiodev) - { -@@ -313,7 +314,8 @@ static int b53_mdio_probe(struct mdio_de - if ((phy_id & 0xfffffc00) != B53_BRCM_OUI_1 && - (phy_id & 0xfffffc00) != B53_BRCM_OUI_2 && - (phy_id & 0xfffffc00) != B53_BRCM_OUI_3 && -- (phy_id & 0xfffffc00) != B53_BRCM_OUI_4) { -+ (phy_id & 0xfffffc00) != B53_BRCM_OUI_4 && -+ (phy_id & 0xfffffc00) != B53_BRCM_OUI_5) { - dev_err(&mdiodev->dev, "Unsupported device: 0x%08x\n", phy_id); - return -ENODEV; - } -@@ -375,6 +377,7 @@ static const struct of_device_id b53_of_ - { .compatible = "brcm,bcm53115" }, - { .compatible = "brcm,bcm53125" }, - { .compatible = "brcm,bcm53128" }, -+ { .compatible = "brcm,bcm53134" }, - { .compatible = "brcm,bcm5365" }, - { .compatible = "brcm,bcm5389" }, - { .compatible = "brcm,bcm5395" }, ---- a/drivers/net/dsa/b53/b53_priv.h -+++ b/drivers/net/dsa/b53/b53_priv.h -@@ -80,6 +80,7 @@ enum { - BCM583XX_DEVICE_ID = 0x58300, - BCM7445_DEVICE_ID = 0x7445, - BCM7278_DEVICE_ID = 0x7278, -+ BCM53134_DEVICE_ID = 0x5075, - }; - - struct b53_pcs { -@@ -187,7 +188,8 @@ static inline int is531x5(struct b53_dev - { - return dev->chip_id == BCM53115_DEVICE_ID || - dev->chip_id == BCM53125_DEVICE_ID || -- dev->chip_id == BCM53128_DEVICE_ID; -+ dev->chip_id == BCM53128_DEVICE_ID || -+ dev->chip_id == BCM53134_DEVICE_ID; - } - - static inline int is63xx(struct b53_device *dev) -@@ -215,7 +217,8 @@ static inline int is58xx(struct b53_devi - return dev->chip_id == BCM58XX_DEVICE_ID || - dev->chip_id == BCM583XX_DEVICE_ID || - dev->chip_id == BCM7445_DEVICE_ID || -- dev->chip_id == BCM7278_DEVICE_ID; -+ dev->chip_id == BCM7278_DEVICE_ID || -+ dev->chip_id == BCM53134_DEVICE_ID; - } - - #define B53_63XX_RGMII0 4 diff --git a/target/linux/generic/pending-6.6/796-net-dsa-mt7530-fix-10M-100M-speed-on-MT7988-switch.patch b/target/linux/generic/pending-6.6/796-net-dsa-mt7530-fix-10M-100M-speed-on-MT7988-switch.patch deleted file mode 100644 index 47e3b140c8..0000000000 --- a/target/linux/generic/pending-6.6/796-net-dsa-mt7530-fix-10M-100M-speed-on-MT7988-switch.patch +++ /dev/null @@ -1,45 +0,0 @@ -From a444877c10a665cd8a869e6d37facdb89fd95f79 Mon Sep 17 00:00:00 2001 -Message-ID: -From: Daniel Golle -Date: Wed, 24 Jan 2024 04:17:11 +0000 -Subject: [PATCH net] net: dsa: mt7530: fix 10M/100M speed on MT7988 switch -To: Arınç ÜNAL , - Daniel Golle , - DENG Qingfang , - Sean Wang , - Andrew Lunn , - Florian Fainelli , - Vladimir Oltean , - David S. Miller , - Eric Dumazet , - Jakub Kicinski , - Paolo Abeni , - Matthias Brugger , - AngeloGioacchino Del Regno , - netdev@vger.kernel.org, - linux-kernel@vger.kernel.org, - linux-arm-kernel@lists.infradead.org, - linux-mediatek@lists.infradead.org - -Setup PMCR port register for actual speed and duplex on internally -connected PHYs of the MT7988 built-in switch. This fixes links with -speeds other than 1000M. - -Fixes: ("110c18bfed414 net: dsa: mt7530: introduce driver for MT7988 built-in switch") -Signed-off-by: Daniel Golle ---- - drivers/net/dsa/mt7530.c | 3 +-- - 1 file changed, 1 insertion(+), 2 deletions(-) - ---- a/drivers/net/dsa/mt7530.c -+++ b/drivers/net/dsa/mt7530.c -@@ -2849,8 +2849,7 @@ static void mt753x_phylink_mac_link_up(s - /* MT753x MAC works in 1G full duplex mode for all up-clocked - * variants. - */ -- if (interface == PHY_INTERFACE_MODE_INTERNAL || -- interface == PHY_INTERFACE_MODE_TRGMII || -+ if (interface == PHY_INTERFACE_MODE_TRGMII || - (phy_interface_mode_is_8023z(interface))) { - speed = SPEED_1000; - duplex = DUPLEX_FULL; diff --git a/target/linux/generic/pending-6.6/850-dt-bindings-clk-add-BCM63268-timer-clock-definitions.patch b/target/linux/generic/pending-6.6/850-dt-bindings-clk-add-BCM63268-timer-clock-definitions.patch deleted file mode 100644 index cc6f1e0d9d..0000000000 --- a/target/linux/generic/pending-6.6/850-dt-bindings-clk-add-BCM63268-timer-clock-definitions.patch +++ /dev/null @@ -1,114 +0,0 @@ -From patchwork Wed Mar 22 17:15:12 2023 -Content-Type: text/plain; charset="utf-8" -MIME-Version: 1.0 -Content-Transfer-Encoding: 8bit -X-Patchwork-Submitter: =?utf-8?q?=C3=81lvaro_Fern=C3=A1ndez_Rojas?= - -X-Patchwork-Id: 13184389 -Return-Path: -X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on - aws-us-west-2-korg-lkml-1.web.codeaurora.org -Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) - by smtp.lore.kernel.org (Postfix) with ESMTP id 73F2DC6FD1C - for ; Wed, 22 Mar 2023 17:15:59 +0000 (UTC) -Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand - id S231363AbjCVRP5 (ORCPT ); - Wed, 22 Mar 2023 13:15:57 -0400 -Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58824 "EHLO - lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org - with ESMTP id S231408AbjCVRPy (ORCPT - ); Wed, 22 Mar 2023 13:15:54 -0400 -Received: from mail-wm1-x32d.google.com (mail-wm1-x32d.google.com - [IPv6:2a00:1450:4864:20::32d]) - by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 70E4C64B28; - Wed, 22 Mar 2023 10:15:24 -0700 (PDT) -Received: by mail-wm1-x32d.google.com with SMTP id n19so1740892wms.0; - Wed, 22 Mar 2023 10:15:24 -0700 (PDT) -DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; - d=gmail.com; s=20210112; t=1679505322; - h=content-transfer-encoding:mime-version:references:in-reply-to - :message-id:date:subject:cc:to:from:from:to:cc:subject:date - :message-id:reply-to; - bh=dEknM98Izmc8d/crPsoJ+ejZxfl78958Ei6SPYhYDHs=; - b=LTOQ75W3s5nYo+nEfiJAKqytSopONB4jCtU3zRygzPMasugVOrYFMsUR+WrpsAjuRT - v4HgWpJxEsIWeRXrUN9W21mFXhGgJLJXSxRnrio0CsZZBNMdkebbNOphgKXIWAdm+2iM - PzqAdGm5t38wT2mmm6V/9hCy90+12raHM82tNFdhhiezfg2cukVOKP3j/TeOVCwas0gQ - iFc+CuZB6y73zYXvMUMUpTsqI5vev4xJsSMHIQJVmUxJAwqhOBhN9JCRo7Ao+wayjn2d - Fxo6AV3A8v68nVfoQ0K0I+eWXG48nMCX45iWh/lVvVTOFcR99kn4va7NY1oVnPsh+WQz - WcLA== -X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; - d=1e100.net; s=20210112; t=1679505322; - h=content-transfer-encoding:mime-version:references:in-reply-to - :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc - :subject:date:message-id:reply-to; - bh=dEknM98Izmc8d/crPsoJ+ejZxfl78958Ei6SPYhYDHs=; - b=wv2NSR1B5RnsdoEE7mgJSHAfSs1JHZbQ1HPMldyaGWAk1dcucqh/uDzM3Flz+ADRi1 - 19NoaB2Ur7QaWZejbuplnIOK/nte3PnmqJ9ZNw8HejmuS4eU8mB1V1aJUSKSPGsfUi4a - LYe3HSw87l0jrAC7ptdKvdUtzBoIkX0CeFvfguTQQkDhUTyAFIG144hY6uPXY9Mga96b - gnNe2dLCzHQLbEJpaDaavT7FEEcLDxaq7jNcR2xqEEZaIwfcew+Q05t4xL/3i8GAj9Ru - 6ivQjIbBKfYQF88o7KnOW9o1wjrGsk+Nd4Iy0OLZix3JQasCJGrKV7ib5awI9J39upYV - fa4A== -X-Gm-Message-State: AO0yUKWw75I1M5Vjrd4vXq4GTruQu0H84pycgyi2CT3bczTYRJpWmEWg - +bHDhvp1n5IWW85GI9vKWpbclB13a/S0RQ== -X-Google-Smtp-Source: - AK7set9T/2oJsVetUb2L4mPEWu8YqDrnK8EzHK5bJf1ABIa1Et8f7BFJ7AA3j14ITZuf8cH0HqlRtg== -X-Received: by 2002:a05:600c:2304:b0:3ed:2949:985b with SMTP id - 4-20020a05600c230400b003ed2949985bmr206833wmo.23.1679505322457; - Wed, 22 Mar 2023 10:15:22 -0700 (PDT) -Received: from atlantis.lan (255.red-79-146-124.dynamicip.rima-tde.net. - [79.146.124.255]) - by smtp.gmail.com with ESMTPSA id - v10-20020a05600c470a00b003ee11ac2288sm8414333wmo.21.2023.03.22.10.15.21 - (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); - Wed, 22 Mar 2023 10:15:22 -0700 (PDT) -From: =?utf-8?q?=C3=81lvaro_Fern=C3=A1ndez_Rojas?= -To: mturquette@baylibre.com, sboyd@kernel.org, robh+dt@kernel.org, - krzysztof.kozlowski+dt@linaro.org, p.zabel@pengutronix.de, - f.fainelli@gmail.com, jonas.gorski@gmail.com, - william.zhang@broadcom.com, linux-clk@vger.kernel.org, - devicetree@vger.kernel.org, linux-kernel@vger.kernel.org -Cc: =?utf-8?q?=C3=81lvaro_Fern=C3=A1ndez_Rojas?= , - Rob Herring -Subject: [PATCH v4 1/4] dt-bindings: clk: add BCM63268 timer clock definitions -Date: Wed, 22 Mar 2023 18:15:12 +0100 -Message-Id: <20230322171515.120353-2-noltari@gmail.com> -X-Mailer: git-send-email 2.30.2 -In-Reply-To: <20230322171515.120353-1-noltari@gmail.com> -References: <20230322171515.120353-1-noltari@gmail.com> -MIME-Version: 1.0 -Precedence: bulk -List-ID: -X-Mailing-List: linux-clk@vger.kernel.org - -Add missing timer clock definitions for BCM63268. - -Signed-off-by: Álvaro Fernández Rojas -Acked-by: Rob Herring ---- - v4: no changes - v3: no changes - v2: change commit title, as suggested by Stephen Boyd - - include/dt-bindings/clock/bcm63268-clock.h | 13 +++++++++++++ - 1 file changed, 13 insertions(+) - ---- a/include/dt-bindings/clock/bcm63268-clock.h -+++ b/include/dt-bindings/clock/bcm63268-clock.h -@@ -27,4 +27,17 @@ - #define BCM63268_CLK_TBUS 27 - #define BCM63268_CLK_ROBOSW250 31 - -+#define BCM63268_TCLK_EPHY1 0 -+#define BCM63268_TCLK_EPHY2 1 -+#define BCM63268_TCLK_EPHY3 2 -+#define BCM63268_TCLK_GPHY1 3 -+#define BCM63268_TCLK_DSL 4 -+#define BCM63268_TCLK_WAKEON_EPHY 6 -+#define BCM63268_TCLK_WAKEON_DSL 7 -+#define BCM63268_TCLK_FAP1 11 -+#define BCM63268_TCLK_FAP2 15 -+#define BCM63268_TCLK_UTO_50 16 -+#define BCM63268_TCLK_UTO_EXTIN 17 -+#define BCM63268_TCLK_USB_REF 18 -+ - #endif /* __DT_BINDINGS_CLOCK_BCM63268_H */ diff --git a/target/linux/generic/pending-6.6/851-dt-bindings-reset-add-BCM63268-timer-reset-definitions.patch b/target/linux/generic/pending-6.6/851-dt-bindings-reset-add-BCM63268-timer-reset-definitions.patch deleted file mode 100644 index 5f1be105ac..0000000000 --- a/target/linux/generic/pending-6.6/851-dt-bindings-reset-add-BCM63268-timer-reset-definitions.patch +++ /dev/null @@ -1,107 +0,0 @@ -From patchwork Wed Mar 22 17:15:13 2023 -Content-Type: text/plain; charset="utf-8" -MIME-Version: 1.0 -Content-Transfer-Encoding: 8bit -X-Patchwork-Submitter: =?utf-8?q?=C3=81lvaro_Fern=C3=A1ndez_Rojas?= - -X-Patchwork-Id: 13184390 -Return-Path: -X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on - aws-us-west-2-korg-lkml-1.web.codeaurora.org -Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) - by smtp.lore.kernel.org (Postfix) with ESMTP id D0B1AC6FD1C - for ; Wed, 22 Mar 2023 17:16:08 +0000 (UTC) -Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand - id S231472AbjCVRQI (ORCPT ); - Wed, 22 Mar 2023 13:16:08 -0400 -Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58934 "EHLO - lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org - with ESMTP id S231435AbjCVRP5 (ORCPT - ); Wed, 22 Mar 2023 13:15:57 -0400 -Received: from mail-wm1-x329.google.com (mail-wm1-x329.google.com - [IPv6:2a00:1450:4864:20::329]) - by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9655064863; - Wed, 22 Mar 2023 10:15:25 -0700 (PDT) -Received: by mail-wm1-x329.google.com with SMTP id - v4-20020a05600c470400b003ee4f06428fso2424553wmo.4; - Wed, 22 Mar 2023 10:15:25 -0700 (PDT) -DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; - d=gmail.com; s=20210112; t=1679505324; - h=content-transfer-encoding:mime-version:references:in-reply-to - :message-id:date:subject:cc:to:from:from:to:cc:subject:date - :message-id:reply-to; - bh=C7ykhArT1dO7P8wtmI92eo4c7KtPZI9w182/5+cB3T0=; - b=WRZRU2SM9n1LfUj4SgTPfQczADC2pfvoIrOsNpBLTym2eOfmkTetb/WbGSla5kw2Wb - SH5MIC2fFeScJg6T5FFAUOOLmRVW9xvl8Q3T3NKb3z/9wvPHO767nrdIbffRWMJFs7gW - wT/kuTpn8GYdfY0sZ/dMTkq41DVusEkxfX6GxtG85O98ZP8xMHQog8aPs9fRfUvI5ZKB - eGYcRz/Wn1cHhjey9jtWzQEEmZ/BT3b0HQTF9Tl88oofhiEgbyjFXr91+vRsLbsJpGXH - /1FjjaLG5DnonKubV9rmbuCU8KzwH331gi2KuRjvLD2V+OMewqSa5i+GvgVv8x2zC8y+ - /mLQ== -X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; - d=1e100.net; s=20210112; t=1679505324; - h=content-transfer-encoding:mime-version:references:in-reply-to - :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc - :subject:date:message-id:reply-to; - bh=C7ykhArT1dO7P8wtmI92eo4c7KtPZI9w182/5+cB3T0=; - b=bhd0fNh0jDOMlGSC4F+p5igV8AUlGEPj2cXUwgdgqRfSSuUy9z+Li8cT0MbY/aWH5Z - qInRVA+R1cWV3ubrDyKag6oEc0LDU234bnMFcP9b7MRlrM8Dpit9TFSyqJU4sDUWNDs5 - KOe2k/SNIdat6munC9VOuEBDO0eB/UDMN+repKwXNdHChp/Toq9qMvW4Uy8uHxosbQlD - 8P88GbKFjynb1E8I8croGjfub7+y8PPsWB0xNUcafIv6xs3MnVOP1Mk4KwBCbqS509la - mfjsriXtIybO8XFqtn100ungjvbFWdogEplLdSPVdgAqdfF5J8gHxAoApoeYejYkL5/R - kOhQ== -X-Gm-Message-State: AO0yUKWdzr3dMmjKhD8tF+ec4Dfdq9VGZ/WCU4d85npKQvxSwhNPZZ1J - 5WYRIqivh0suFC1OqEidwenpiJYvXedYjw== -X-Google-Smtp-Source: - AK7set87ew2/mKWeShXTTW/YBbBJNR2zeGFV0CfuqLXhiJEU6tqFuyKcW+vFEoKHIbNUS8wRy1SzLA== -X-Received: by 2002:a05:600c:290:b0:3ee:6d88:774a with SMTP id - 16-20020a05600c029000b003ee6d88774amr160734wmk.14.1679505323514; - Wed, 22 Mar 2023 10:15:23 -0700 (PDT) -Received: from atlantis.lan (255.red-79-146-124.dynamicip.rima-tde.net. - [79.146.124.255]) - by smtp.gmail.com with ESMTPSA id - v10-20020a05600c470a00b003ee11ac2288sm8414333wmo.21.2023.03.22.10.15.22 - (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); - Wed, 22 Mar 2023 10:15:23 -0700 (PDT) -From: =?utf-8?q?=C3=81lvaro_Fern=C3=A1ndez_Rojas?= -To: mturquette@baylibre.com, sboyd@kernel.org, robh+dt@kernel.org, - krzysztof.kozlowski+dt@linaro.org, p.zabel@pengutronix.de, - f.fainelli@gmail.com, jonas.gorski@gmail.com, - william.zhang@broadcom.com, linux-clk@vger.kernel.org, - devicetree@vger.kernel.org, linux-kernel@vger.kernel.org -Cc: =?utf-8?q?=C3=81lvaro_Fern=C3=A1ndez_Rojas?= , - Rob Herring -Subject: [PATCH v4 2/4] dt-bindings: reset: add BCM63268 timer reset - definitions -Date: Wed, 22 Mar 2023 18:15:13 +0100 -Message-Id: <20230322171515.120353-3-noltari@gmail.com> -X-Mailer: git-send-email 2.30.2 -In-Reply-To: <20230322171515.120353-1-noltari@gmail.com> -References: <20230322171515.120353-1-noltari@gmail.com> -MIME-Version: 1.0 -Precedence: bulk -List-ID: -X-Mailing-List: linux-clk@vger.kernel.org - -Add missing timer reset definitions for BCM63268. - -Signed-off-by: Álvaro Fernández Rojas -Acked-by: Rob Herring ---- - v4: no changes - v3: no changes - v2: change commit title, as suggested by Stephen Boyd - - include/dt-bindings/reset/bcm63268-reset.h | 4 ++++ - 1 file changed, 4 insertions(+) - ---- a/include/dt-bindings/reset/bcm63268-reset.h -+++ b/include/dt-bindings/reset/bcm63268-reset.h -@@ -23,4 +23,8 @@ - #define BCM63268_RST_PCIE_HARD 17 - #define BCM63268_RST_GPHY 18 - -+#define BCM63268_TRST_SW 29 -+#define BCM63268_TRST_HW 30 -+#define BCM63268_TRST_POR 31 -+ - #endif /* __DT_BINDINGS_RESET_BCM63268_H */ diff --git a/target/linux/generic/pending-6.6/852-clk-bcm-Add-BCM63268-timer-clock-and-reset-driver.patch b/target/linux/generic/pending-6.6/852-clk-bcm-Add-BCM63268-timer-clock-and-reset-driver.patch deleted file mode 100644 index 7e500cd1b5..0000000000 --- a/target/linux/generic/pending-6.6/852-clk-bcm-Add-BCM63268-timer-clock-and-reset-driver.patch +++ /dev/null @@ -1,345 +0,0 @@ -From patchwork Wed Mar 22 17:15:15 2023 -Content-Type: text/plain; charset="utf-8" -MIME-Version: 1.0 -Content-Transfer-Encoding: 8bit -X-Patchwork-Submitter: =?utf-8?q?=C3=81lvaro_Fern=C3=A1ndez_Rojas?= - -X-Patchwork-Id: 13184392 -Return-Path: -X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on - aws-us-west-2-korg-lkml-1.web.codeaurora.org -Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) - by smtp.lore.kernel.org (Postfix) with ESMTP id 199D9C76196 - for ; Wed, 22 Mar 2023 17:16:11 +0000 (UTC) -Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand - id S231512AbjCVRQJ (ORCPT ); - Wed, 22 Mar 2023 13:16:09 -0400 -Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58942 "EHLO - lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org - with ESMTP id S231442AbjCVRP5 (ORCPT - ); Wed, 22 Mar 2023 13:15:57 -0400 -Received: from mail-wm1-x32c.google.com (mail-wm1-x32c.google.com - [IPv6:2a00:1450:4864:20::32c]) - by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1DDB36487D; - Wed, 22 Mar 2023 10:15:27 -0700 (PDT) -Received: by mail-wm1-x32c.google.com with SMTP id - i5-20020a05600c354500b003edd24054e0so6717370wmq.4; - Wed, 22 Mar 2023 10:15:27 -0700 (PDT) -DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; - d=gmail.com; s=20210112; t=1679505325; - h=content-transfer-encoding:mime-version:references:in-reply-to - :message-id:date:subject:cc:to:from:from:to:cc:subject:date - :message-id:reply-to; - bh=rkv/eZYA1ncHp5FnV2ZWc3hgYnAx28S86QA9vmcXFCY=; - b=Y1mva2Bt3sUbKxLgEUS331CJbGxUc4z8kTQW8qiHWGhYlFKtm+d5z4sT40E5BeZAnU - zmTbCI7jbroe9NYBxGUmSli6LNVDPjND80ChbhWTqbqMQTmeQFWut9KmeBWK6Oze2lC/ - XMSOorUzowjcU2xtHNrzoq2KH2pstW573lsB8WnzFVfhMaRkE9DfRr6WNyA7zC8DyxM5 - ezxlCQtCmgPfCqlyksbIDKrgrRf3GiUR0yUd6xRU+MssyvH1FkYGDCerPctDto6lGHBz - 8Y15jT3l6OnQMT6dkekgpPF5/XrSUY93u9g0B4U8+0dhNj+K7vmDen+jqdess+tpLnq/ - gFrA== -X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; - d=1e100.net; s=20210112; t=1679505325; - h=content-transfer-encoding:mime-version:references:in-reply-to - :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc - :subject:date:message-id:reply-to; - bh=rkv/eZYA1ncHp5FnV2ZWc3hgYnAx28S86QA9vmcXFCY=; - b=Ym4+u8bbTQGNkewUBrLf+89vE0EFJBQp2f1crwUxZFboKTROF9ltZonY1CGepo7b0B - fkx3TbWQy5X65g3ScuieqtClCI8WanPeNBJ48+JipJYO3ODVNBxnVaTuW/0FOIcahfqe - sG5GvggHhzRz+Yeybsbnupmzxnw8Ez0BpMl3p7zcjHL7BGZDdOOX2Zbw3zfyYa5sg2nX - UXYJT36zy2h39gxUsy9QkhQ76CG3w6omniohZpYidpojpiDjbOy0nKFky4kUe+YyA1fF - 4IBhjAm6mH+uh6wHSG1qj+NAXHs0xDDJps16PbJwAgL7Qt9K5WW+R/UAYPmHFgaRIHOw - /seA== -X-Gm-Message-State: AO0yUKXRtoYO8Nfus6Ca8lhM39P1Xn6TGkhatEfoISd1YNOkTJJN2hW+ - xRphLgxlzNfCLcVPlpGK9dk= -X-Google-Smtp-Source: - AK7set9VnMEykugk8ZYnkXuqK41bX1dzlvKsAXHEjr8i2NZBld0buKhQLcGYEcwxnBgVTtC7eRGfXw== -X-Received: by 2002:a1c:7c0b:0:b0:3e2:1dac:b071 with SMTP id - x11-20020a1c7c0b000000b003e21dacb071mr178053wmc.13.1679505325582; - Wed, 22 Mar 2023 10:15:25 -0700 (PDT) -Received: from atlantis.lan (255.red-79-146-124.dynamicip.rima-tde.net. - [79.146.124.255]) - by smtp.gmail.com with ESMTPSA id - v10-20020a05600c470a00b003ee11ac2288sm8414333wmo.21.2023.03.22.10.15.24 - (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); - Wed, 22 Mar 2023 10:15:25 -0700 (PDT) -From: =?utf-8?q?=C3=81lvaro_Fern=C3=A1ndez_Rojas?= -To: mturquette@baylibre.com, sboyd@kernel.org, robh+dt@kernel.org, - krzysztof.kozlowski+dt@linaro.org, p.zabel@pengutronix.de, - f.fainelli@gmail.com, jonas.gorski@gmail.com, - william.zhang@broadcom.com, linux-clk@vger.kernel.org, - devicetree@vger.kernel.org, linux-kernel@vger.kernel.org -Cc: =?utf-8?q?=C3=81lvaro_Fern=C3=A1ndez_Rojas?= -Subject: [PATCH v4 4/4] clk: bcm: Add BCM63268 timer clock and reset driver -Date: Wed, 22 Mar 2023 18:15:15 +0100 -Message-Id: <20230322171515.120353-5-noltari@gmail.com> -X-Mailer: git-send-email 2.30.2 -In-Reply-To: <20230322171515.120353-1-noltari@gmail.com> -References: <20230322171515.120353-1-noltari@gmail.com> -MIME-Version: 1.0 -Precedence: bulk -List-ID: -X-Mailing-List: linux-clk@vger.kernel.org - -Add driver for BCM63268 timer clock and reset controller. - -Signed-off-by: Álvaro Fernández Rojas ---- - v4: add changes suggested by Stephen Boyd: - - Usage of of_device_get_match_data() isn't needed. - - Use devm_clk_hw_register_gate(). - - Drop clk_hw_unregister_gate(). - v3: add missing include to fix build warning - v2: add changes suggested by Stephen Boyd - - drivers/clk/bcm/Kconfig | 9 ++ - drivers/clk/bcm/Makefile | 1 + - drivers/clk/bcm/clk-bcm63268-timer.c | 215 +++++++++++++++++++++++++++ - 3 files changed, 225 insertions(+) - create mode 100644 drivers/clk/bcm/clk-bcm63268-timer.c - ---- a/drivers/clk/bcm/Kconfig -+++ b/drivers/clk/bcm/Kconfig -@@ -37,6 +37,15 @@ config CLK_BCM_63XX_GATE - Enable common clock framework support for Broadcom BCM63xx DSL SoCs - based on the MIPS architecture - -+config CLK_BCM63268_TIMER -+ bool "Broadcom BCM63268 timer clock and reset support" -+ depends on BMIPS_GENERIC || COMPILE_TEST -+ default BMIPS_GENERIC -+ select RESET_CONTROLLER -+ help -+ Enable timer clock and reset support for Broadcom BCM63268 DSL SoCs -+ based on the MIPS architecture. -+ - config CLK_BCM_KONA - bool "Broadcom Kona CCU clock support" - depends on ARCH_BCM_MOBILE || COMPILE_TEST ---- a/drivers/clk/bcm/Makefile -+++ b/drivers/clk/bcm/Makefile -@@ -1,6 +1,7 @@ - # SPDX-License-Identifier: GPL-2.0 - obj-$(CONFIG_CLK_BCM_63XX) += clk-bcm63xx.o - obj-$(CONFIG_CLK_BCM_63XX_GATE) += clk-bcm63xx-gate.o -+obj-$(CONFIG_CLK_BCM63268_TIMER) += clk-bcm63268-timer.o - obj-$(CONFIG_CLK_BCM_KONA) += clk-kona.o - obj-$(CONFIG_CLK_BCM_KONA) += clk-kona-setup.o - obj-$(CONFIG_CLK_BCM_KONA) += clk-bcm281xx.o ---- /dev/null -+++ b/drivers/clk/bcm/clk-bcm63268-timer.c -@@ -0,0 +1,215 @@ -+// SPDX-License-Identifier: GPL-2.0 -+/* -+ * BCM63268 Timer Clock and Reset Controller Driver -+ * -+ * Copyright (C) 2023 Álvaro Fernández Rojas -+ */ -+ -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+ -+#include -+ -+#define BCM63268_TIMER_RESET_SLEEP_MIN_US 10000 -+#define BCM63268_TIMER_RESET_SLEEP_MAX_US 20000 -+ -+struct bcm63268_tclkrst_hw { -+ void __iomem *regs; -+ spinlock_t lock; -+ -+ struct reset_controller_dev rcdev; -+ struct clk_hw_onecell_data data; -+}; -+ -+struct bcm63268_tclk_table_entry { -+ const char * const name; -+ u8 bit; -+}; -+ -+static const struct bcm63268_tclk_table_entry bcm63268_timer_clocks[] = { -+ { -+ .name = "ephy1", -+ .bit = BCM63268_TCLK_EPHY1, -+ }, { -+ .name = "ephy2", -+ .bit = BCM63268_TCLK_EPHY2, -+ }, { -+ .name = "ephy3", -+ .bit = BCM63268_TCLK_EPHY3, -+ }, { -+ .name = "gphy1", -+ .bit = BCM63268_TCLK_GPHY1, -+ }, { -+ .name = "dsl", -+ .bit = BCM63268_TCLK_DSL, -+ }, { -+ .name = "wakeon_ephy", -+ .bit = BCM63268_TCLK_WAKEON_EPHY, -+ }, { -+ .name = "wakeon_dsl", -+ .bit = BCM63268_TCLK_WAKEON_DSL, -+ }, { -+ .name = "fap1_pll", -+ .bit = BCM63268_TCLK_FAP1, -+ }, { -+ .name = "fap2_pll", -+ .bit = BCM63268_TCLK_FAP2, -+ }, { -+ .name = "uto_50", -+ .bit = BCM63268_TCLK_UTO_50, -+ }, { -+ .name = "uto_extin", -+ .bit = BCM63268_TCLK_UTO_EXTIN, -+ }, { -+ .name = "usb_ref", -+ .bit = BCM63268_TCLK_USB_REF, -+ }, { -+ /* sentinel */ -+ } -+}; -+ -+static inline struct bcm63268_tclkrst_hw * -+to_bcm63268_timer_reset(struct reset_controller_dev *rcdev) -+{ -+ return container_of(rcdev, struct bcm63268_tclkrst_hw, rcdev); -+} -+ -+static int bcm63268_timer_reset_update(struct reset_controller_dev *rcdev, -+ unsigned long id, bool assert) -+{ -+ struct bcm63268_tclkrst_hw *reset = to_bcm63268_timer_reset(rcdev); -+ unsigned long flags; -+ uint32_t val; -+ -+ spin_lock_irqsave(&reset->lock, flags); -+ val = __raw_readl(reset->regs); -+ if (assert) -+ val &= ~BIT(id); -+ else -+ val |= BIT(id); -+ __raw_writel(val, reset->regs); -+ spin_unlock_irqrestore(&reset->lock, flags); -+ -+ return 0; -+} -+ -+static int bcm63268_timer_reset_assert(struct reset_controller_dev *rcdev, -+ unsigned long id) -+{ -+ return bcm63268_timer_reset_update(rcdev, id, true); -+} -+ -+static int bcm63268_timer_reset_deassert(struct reset_controller_dev *rcdev, -+ unsigned long id) -+{ -+ return bcm63268_timer_reset_update(rcdev, id, false); -+} -+ -+static int bcm63268_timer_reset_reset(struct reset_controller_dev *rcdev, -+ unsigned long id) -+{ -+ bcm63268_timer_reset_update(rcdev, id, true); -+ usleep_range(BCM63268_TIMER_RESET_SLEEP_MIN_US, -+ BCM63268_TIMER_RESET_SLEEP_MAX_US); -+ -+ bcm63268_timer_reset_update(rcdev, id, false); -+ /* -+ * Ensure component is taken out reset state by sleeping also after -+ * deasserting the reset. Otherwise, the component may not be ready -+ * for operation. -+ */ -+ usleep_range(BCM63268_TIMER_RESET_SLEEP_MIN_US, -+ BCM63268_TIMER_RESET_SLEEP_MAX_US); -+ -+ return 0; -+} -+ -+static int bcm63268_timer_reset_status(struct reset_controller_dev *rcdev, -+ unsigned long id) -+{ -+ struct bcm63268_tclkrst_hw *reset = to_bcm63268_timer_reset(rcdev); -+ -+ return !(__raw_readl(reset->regs) & BIT(id)); -+} -+ -+static struct reset_control_ops bcm63268_timer_reset_ops = { -+ .assert = bcm63268_timer_reset_assert, -+ .deassert = bcm63268_timer_reset_deassert, -+ .reset = bcm63268_timer_reset_reset, -+ .status = bcm63268_timer_reset_status, -+}; -+ -+static int bcm63268_tclk_probe(struct platform_device *pdev) -+{ -+ struct device *dev = &pdev->dev; -+ const struct bcm63268_tclk_table_entry *entry; -+ struct bcm63268_tclkrst_hw *hw; -+ struct clk_hw *clk; -+ u8 maxbit = 0; -+ int i, ret; -+ -+ for (entry = bcm63268_timer_clocks; entry->name; entry++) -+ maxbit = max(maxbit, entry->bit); -+ maxbit++; -+ -+ hw = devm_kzalloc(&pdev->dev, struct_size(hw, data.hws, maxbit), -+ GFP_KERNEL); -+ if (!hw) -+ return -ENOMEM; -+ -+ platform_set_drvdata(pdev, hw); -+ -+ spin_lock_init(&hw->lock); -+ -+ hw->data.num = maxbit; -+ for (i = 0; i < maxbit; i++) -+ hw->data.hws[i] = ERR_PTR(-ENODEV); -+ -+ hw->regs = devm_platform_ioremap_resource(pdev, 0); -+ if (IS_ERR(hw->regs)) -+ return PTR_ERR(hw->regs); -+ -+ for (entry = bcm63268_timer_clocks; entry->name; entry++) { -+ clk = devm_clk_hw_register_gate(dev, entry->name, NULL, 0, -+ hw->regs, entry->bit, -+ CLK_GATE_BIG_ENDIAN, -+ &hw->lock); -+ if (IS_ERR(clk)) -+ return PTR_ERR(clk); -+ -+ hw->data.hws[entry->bit] = clk; -+ } -+ -+ ret = devm_of_clk_add_hw_provider(dev, of_clk_hw_onecell_get, -+ &hw->data); -+ if (ret) -+ return ret; -+ -+ hw->rcdev.of_node = dev->of_node; -+ hw->rcdev.ops = &bcm63268_timer_reset_ops; -+ -+ ret = devm_reset_controller_register(dev, &hw->rcdev); -+ if (ret) -+ dev_err(dev, "Failed to register reset controller\n"); -+ -+ return 0; -+} -+ -+static const struct of_device_id bcm63268_tclk_dt_ids[] = { -+ { .compatible = "brcm,bcm63268-timer-clocks" }, -+ { /* sentinel */ } -+}; -+ -+static struct platform_driver bcm63268_tclk = { -+ .probe = bcm63268_tclk_probe, -+ .driver = { -+ .name = "bcm63268-timer-clock", -+ .of_match_table = bcm63268_tclk_dt_ids, -+ }, -+}; -+builtin_platform_driver(bcm63268_tclk); diff --git a/target/linux/generic/pending-6.6/860-serial-8250_mtk-track-busclk-state-to-avoid-bus-error.patch b/target/linux/generic/pending-6.6/860-serial-8250_mtk-track-busclk-state-to-avoid-bus-error.patch deleted file mode 100644 index c5db5d9491..0000000000 --- a/target/linux/generic/pending-6.6/860-serial-8250_mtk-track-busclk-state-to-avoid-bus-error.patch +++ /dev/null @@ -1,61 +0,0 @@ -From 629c701fc39f1ada9416e0766a86729e83bde86c Mon Sep 17 00:00:00 2001 -Message-ID: <629c701fc39f1ada9416e0766a86729e83bde86c.1694465766.git.daniel@makrotopia.org> -From: Daniel Golle -Date: Mon, 11 Sep 2023 21:27:44 +0100 -Subject: [PATCH] serial: 8250_mtk: track busclk state to avoid bus error -To: Greg Kroah-Hartman , - Jiri Slaby , - Matthias Brugger , - AngeloGioacchino Del Regno , - Daniel Golle , - John Ogness , - Chen-Yu Tsai , - Changqi Hu , - linux-kernel@vger.kernel.org, - linux-serial@vger.kernel.org, - linux-arm-kernel@lists.infradead.org, - linux-mediatek@lists.infradead.org - -Commit e32a83c70cf9 ("serial: 8250-mtk: modify mtk uart power and -clock management") introduced polling a debug register to make sure -the UART is idle before disabling the bus clock. However, at least on -some MediaTek SoCs access to that very debug register requires the bus -clock being enabled. Hence calling the suspend function while already -in suspended state results in that register access triggering a bus -error. In order to avoid that, track the state of the bus clock and -only poll the debug register if not already in suspended state. - -Fixes: e32a83c70cf9 ("serial: 8250-mtk: modify mtk uart power and clock management") -Signed-off-by: Daniel Golle ---- - drivers/tty/serial/8250/8250_mtk.c | 11 ++++++++++- - 1 file changed, 10 insertions(+), 1 deletion(-) - ---- a/drivers/tty/serial/8250/8250_mtk.c -+++ b/drivers/tty/serial/8250/8250_mtk.c -@@ -32,7 +32,7 @@ - #define MTK_UART_RXTRI_AD 0x14 /* RX Trigger address */ - #define MTK_UART_FRACDIV_L 0x15 /* Fractional divider LSB address */ - #define MTK_UART_FRACDIV_M 0x16 /* Fractional divider MSB address */ --#define MTK_UART_DEBUG0 0x18 -+#define MTK_UART_DEBUG0 0x18 - #define MTK_UART_IER_XOFFI 0x20 /* Enable XOFF character interrupt */ - #define MTK_UART_IER_RTSI 0x40 /* Enable RTS Modem status interrupt */ - #define MTK_UART_IER_CTSI 0x80 /* Enable CTS Modem status interrupt */ -@@ -418,13 +418,12 @@ static int __maybe_unused mtk8250_runtim - struct mtk8250_data *data = dev_get_drvdata(dev); - struct uart_8250_port *up = serial8250_get_port(data->line); - -- /* wait until UART in idle status */ -- while -- (serial_in(up, MTK_UART_DEBUG0)); -- - if (data->clk_count == 0U) { - dev_dbg(dev, "%s clock count is 0\n", __func__); - } else { -+ /* wait until UART in idle status */ -+ while -+ (serial_in(up, MTK_UART_DEBUG0)); - clk_disable_unprepare(data->bus_clk); - data->clk_count--; - }