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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6D80EC433EF for ; Wed, 29 Sep 2021 15:05:17 +0000 (UTC) Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id C3298613CE for ; Wed, 29 Sep 2021 15:05:16 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org C3298613CE Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=nxp.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=lists.denx.de Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 0C45A81194; Wed, 29 Sep 2021 17:05:13 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=nxp.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=nxp.com header.i=@nxp.com header.b="NyqjT5vA"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 4E70980F6A; Wed, 29 Sep 2021 17:05:07 +0200 (CEST) Received: from EUR04-HE1-obe.outbound.protection.outlook.com (mail-he1eur04on0604.outbound.protection.outlook.com [IPv6:2a01:111:f400:fe0d::604]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 62D1B80607 for ; Wed, 29 Sep 2021 17:05:02 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=nxp.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=vladimir.oltean@nxp.com ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ZKXH55pDu6OvGJUxATt79fj+4h2/HSF86NbbwcGSrroYYIzuwXxH8ICgy5IVaACT3zFEtIcZ7PkSvXx0PLVyO0SmQmtoA7hLT4aQ/jepBoOxJslWFiSu4x67N20O/AGSxD5aNNKy8RptwmlnpcSJbQP3yUBPct9ZiGikjhH//4Xp/QhAtC57O63klQN45tJ07rq6WsY+7ESiCnxso1jUsS901WYAi23+UVBVfwe+1r+JoN7Vgih5/CX+jkDGvHuqq9oLQs1PYPm+NVnqoOqzTU1WJqQbiKvordKIHrHEuQ6iumjCGYOIU/9AGbMbTiZQqic8vHo8N2pH0wwBqsHtIA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=0R70tsu1iBx1otR7d7gD4Wv+j4GvBnkB3QWRVep/UFk=; b=g9msEkTDOJpq0Y1jsQfUyi2E9uTxy2AhIsssyiIJHpGONelx/6U3IToRQ21hfGujsx6+8z59O/aKtLxeAqJ0Qncxu99u6X+bDuESHepzMbNvOPYPJC+Vfcs4RVTweVgmAmFY7YEQH1ugJIhMUEZ1Hkh3KLRKPkfPoPHgXBcHvBVPy7XdxCwucOrUycAD99cO9H0Pmv5NMh+v3c1RNXNpC2tWXI2muGI8qFSiclfdR+rWbXqMSvGaDbQom9kZd2Y9TJafJg84cddUOBe31h6MXQAQtVObKl59aa0o5YTLVHTBmv0jhuOVT8idJKOQzSBFdPeAyehmAtWBGO6XKlqfrA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=0R70tsu1iBx1otR7d7gD4Wv+j4GvBnkB3QWRVep/UFk=; b=NyqjT5vAehbSm9LYKS2qYDFdIbS+9GSOG4bVrSGR1hMKkg+QOKIVNXD1fxXdoMVml6e/QUy1vhu/KneNYyFFJ5RjSrG0kNf4fMjBsvJFn9PXC5loKmL87U0ODorT96NmRvWQDWyBKq1hymQsb1conwMQvSd0yMTI9BLRlAqdEgA= Authentication-Results: lists.denx.de; dkim=none (message not signed) header.d=none;lists.denx.de; dmarc=none action=none header.from=nxp.com; Received: from VI1PR04MB5136.eurprd04.prod.outlook.com (2603:10a6:803:55::19) by VI1PR0402MB3550.eurprd04.prod.outlook.com (2603:10a6:803:3::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4544.20; Wed, 29 Sep 2021 15:05:00 +0000 Received: from VI1PR04MB5136.eurprd04.prod.outlook.com ([fe80::e157:3280:7bc3:18c4]) by VI1PR04MB5136.eurprd04.prod.outlook.com ([fe80::e157:3280:7bc3:18c4%5]) with mapi id 15.20.4544.022; Wed, 29 Sep 2021 15:05:00 +0000 From: Vladimir Oltean To: u-boot@lists.denx.de, Joe Hershberger , Ramon Fried Cc: Priyanka Jain , Bin Meng , Michael Walle Subject: [PATCH v2 00/10] Support the SJA1105 DSA switch on the NXP LS1021A-TSN board Date: Wed, 29 Sep 2021 18:04:35 +0300 Message-Id: <20210929150445.1593364-1-vladimir.oltean@nxp.com> X-Mailer: git-send-email 2.25.1 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: AM0PR01CA0171.eurprd01.prod.exchangelabs.com (2603:10a6:208:aa::40) To VI1PR04MB5136.eurprd04.prod.outlook.com (2603:10a6:803:55::19) MIME-Version: 1.0 Received: from localhost.localdomain (188.26.53.217) by AM0PR01CA0171.eurprd01.prod.exchangelabs.com (2603:10a6:208:aa::40) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4566.14 via Frontend Transport; Wed, 29 Sep 2021 15:04:59 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: aa5f4bb0-280b-4e8f-37f7-08d9835a8238 X-MS-TrafficTypeDiagnostic: VI1PR0402MB3550: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:7219; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 3j4m+7k70SPWihfVzq4oM8q+63vbaDNFiKO5WD6bFAHpLgLnpjCmqnL1TWFxkZXwUag6woXu828HAvbPTUp1V+Qa9dh0xsJYqIXDr4qvaTLV1YBMbvOTtZ//hNTiaYLebYqz0864/QJFEmqHBDjc08AjbUux7/UJW5rAaAaWABabUOMX72Hr7NdM8z6NFGfJpVnxLV5KT33o/AYyznGfyB9PfTz1WgRjwwOgeNdX7l2rgUFW3Aqc3oFICBJPVWpEPGnoeUf68j4iRsPmefjlmQU6w+GLCWKsGHyWHiBoP8ovTUuPVQuO22zikJOHZoeBpCpvRQwK1C2p+tLR5z2cAC5HiK7qZTqjxxur/CzU0jIUUcqvi2g0z2FQaDyJB6tM29m1R20tCYlm7usbGLorIIFlvgyChBhm8Usuwl0asI5Pnsc9Ey6eB7F/xqrQxynhkLBqhZSHt/p9NHHoGVVR9pXM06M1/1eB3larJ3ROp8qnz0F3qnFi1m0ohJqGVhxkx0lHOK+07/Q//IUtEVv8oADQ5RKdyDydWEdMtjAreHPpONVlg27vWxPsDUApRNkBpY67iNXMsC9Hnx7WTRk/xrq1VSnG4id+0E3Z/eEzvgCO5sRhmHTRLrggP1EMdSYvAT5k/SVTrHKlsv0MwVxt0ePYfydRdoD35xmXXQRZPBEhUGZmkt4hr6YWZU6T4RT9lr/IRgYSeBnJTbhA/NQkcg== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:VI1PR04MB5136.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(366004)(8936002)(54906003)(83380400001)(66476007)(508600001)(6512007)(2906002)(4326008)(2616005)(44832011)(86362001)(956004)(1076003)(316002)(66946007)(110136005)(36756003)(186003)(6486002)(8676002)(5660300002)(52116002)(38100700002)(6506007)(38350700002)(6666004)(26005)(66556008); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?6M8HFHsSR8xwB58GyK2MzxG+4zcSFx12ZGbYbtHbsKIXQ9AFCZEwlnqryE+D?= =?us-ascii?Q?RfyXdvEyhhy4XipOpCqrAKq9GvsBG7OndVZ32oIQbbKVLuAa12c+u0oOrvcN?= =?us-ascii?Q?oOntKIZ06x2mne5VR9dAfyy7et9NdFJX+/HsvHlZGmrWljMJ6+DV8joD2n+q?= =?us-ascii?Q?G3PPIAiN8/5BazStWcnugfiwcnoDRR6+jVxgOClhqEBKc/IoYd9k1BRChjV7?= =?us-ascii?Q?k9tuPyIcG0mn+piKnUVusr+xmuueqFHuwwkQ9ucOVlx9RoHwY2LUwHGHq9/0?= =?us-ascii?Q?1gn7L71nMZgjwf/qg1y06rc/seQ7k8UTq2+C3xgdCXWUuNXRebU+okb9AHaU?= =?us-ascii?Q?52amZK1Ld8FTkoaXO/0IKc7i/5zGOI1zFGCqm9UR5Ax48javg8cNxVhZYdDo?= =?us-ascii?Q?GzX80U3BbwXLLI6NiCEh7wOc3dyGfIagCPaE/OIwKml3/nCKtzImwHyAWz89?= =?us-ascii?Q?RZzgb9z0MTYzgFUsKFEOXdssITf+mTUsdY63Dwlu4WByrWQxXuj1i0pbSw9h?= =?us-ascii?Q?ny4ZhrlA9+BKhHKAUXa75Y9LSSBhe+KfdpZNS/HlUEqkdkQIVlhtXgkd7jMY?= =?us-ascii?Q?ycWvzaLT98tAA5kUXV+5hvYly7B0gzbI5WK/W7QIyZ2EvleBSJ4JGIACkwEO?= =?us-ascii?Q?46MRbseCHijv3UKUOfwloyS6cylBWEKOyaXct0KKasjqmvEqXYh2ogvscnfq?= =?us-ascii?Q?U2CUIUB5d/JTkYfYPzIXga3VPGCduzxXi8NEerVOsQ0iziYAjuySL+v2zAe0?= =?us-ascii?Q?gZxk97Z/9L/ZXHO6AqbEBAkZ0RyCE1usGFEYiy/P0nHIIFe5fqMRmyKvfuBe?= =?us-ascii?Q?lW2aZjB7BvBPaECyjncgbVCA2iWkccEjoJ2bwjat9+F0lpqGUZRAg8KG2C9b?= =?us-ascii?Q?kAiUHyO5/5KV+kY1T8zEtEHgK6RoGhwaUpFaGvhhKcgHToq76D2eUhRDS5aO?= =?us-ascii?Q?CfC/ySd75ctma8oaBl/txcEH8h9DgDiv31QaWz8X3YBc8rySgDwLLLyuUlD6?= =?us-ascii?Q?ppaErgi/JIdF85wT7kPh9WqczDD/mkaxf1jLk+aah/0fhvjJAgrymBdgJIjj?= =?us-ascii?Q?7sgoHhkHbLaHEH5LJHvLXCE6zIVKCz9NQ23FGFxYldWHb7v5Q3GY6Itgky4E?= =?us-ascii?Q?DHarAzPLdy1pQ6hLHJVqhcp48mNMSjayIiU25CnMG4VDXXJX0N8PS4QbErFm?= =?us-ascii?Q?mf3Jeae5hW7URYDJAo+fT8GPuP2NsmG3aZwIfEp7uAmZNdfQnZ5WeAX/NywR?= =?us-ascii?Q?Kny7bqVxtRbAhWm9xQuXSev/hQ7ipsG33IlAgRuSgFiFrb3nPIcX/iF1UwhA?= =?us-ascii?Q?CBVOgAbd4oYLaTl3H0T/jLEl?= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: aa5f4bb0-280b-4e8f-37f7-08d9835a8238 X-MS-Exchange-CrossTenant-AuthSource: VI1PR04MB5136.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Sep 2021 15:05:00.6362 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: rZx5jL2lrjFlab0tKFJPCIoopTkjEX/mt6xOtgE3FoGPfHUcyZe4V8//+4wf98c4z2JZSkpuZvn3TVvw9yIBAA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR0402MB3550 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.2 at phobos.denx.de X-Virus-Status: Clean The NXP LS1021A-TSN board (and many others) contains an automotive Ethernet switch. Some boards only have Ethernet ports routed through the switch, and it is therefore desirable to have TFTP functional. These patches add support for the SJA1105 and SJA1110 switch family (tested on first-gen SJA1105T, second-gen SJA1105S, but not on third-gen SJA1110A yet, the support for that is blind). Along the way, fixes and improvements to the DSA framework are also made. I have not added documentation for the device tree bindings, the driver is compatible with the device tree bindings from Linux, for which a YAML schema-based validator exists. Changes in v2: - split sja1105 driver in 2 patches: basic driver and SGMII support - rebased on top of the "sgmii-2500" -> "2500base-x" change in felix - improved the sja1105 xpcs initialization sequence to work with in-band autoneg enabled as well Vladimir Oltean (10): net: tsec: add support for promiscuous mode include: import if_vlan.h from Linux net: dsa: allow drivers to get the port OF node net: introduce a helper to determine whether to use in-band autoneg net: dsa: felix: configure the in-band autoneg property based on OF node info net: dsa: add driver for NXP SJA1105 L2 switch net: dsa: sja1105: add support for SGMII arm: dts: ls1021a-tsn: add sja1105 and eth2 bindings configs: ls1021a-tsn: enable sja1105 switch driver configs: ls1021a-tsn: enable the generation of random Ethernet MAC addresses arch/arm/dts/ls1021a-tsn.dts | 103 + configs/ls1021atsn_qspi_defconfig | 3 + configs/ls1021atsn_sdcard_defconfig | 3 + drivers/core/of_extra.c | 12 + drivers/net/Kconfig | 16 + drivers/net/Makefile | 1 + drivers/net/mscc_eswitch/felix_switch.c | 10 +- drivers/net/sja1105.c | 3376 +++++++++++++++++++++++ drivers/net/tsec.c | 20 +- include/dm/of_extra.h | 14 + include/linux/if_vlan.h | 26 + include/net/dsa.h | 12 + include/tsec.h | 2 + net/dsa-uclass.c | 20 + 14 files changed, 3608 insertions(+), 10 deletions(-) create mode 100644 drivers/net/sja1105.c create mode 100644 include/linux/if_vlan.h -- 2.25.1