From patchwork Fri Jan 27 19:35:56 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Colin Foster X-Patchwork-Id: 13119240 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 2ABDEC61DA4 for ; Fri, 27 Jan 2023 19:38:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229742AbjA0Tiw (ORCPT ); Fri, 27 Jan 2023 14:38:52 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44496 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229737AbjA0Ti0 (ORCPT ); Fri, 27 Jan 2023 14:38:26 -0500 Received: from NAM10-DM6-obe.outbound.protection.outlook.com (mail-dm6nam10on20724.outbound.protection.outlook.com [IPv6:2a01:111:f400:7e88::724]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1178E83043; Fri, 27 Jan 2023 11:37:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=SChus37wt3S3OUhrVAsYkkntgiyPxoGqoZCAcxQv6tsIfXLH/BN+BNq6wV+yVy1oMuz6PpNQSaS1uOfPPQ7+JcWKeOF8JUEDVbl9djcSSHRUX/UbdLzH0skI1qIi/zGz79wX0Ap84V3qCCUtMFIWBJ6xo5dJejxEeuWcAan6qTwHSy0aMErujo+e9ZxENS5NHmToenfWRFXmXmYN+tVqPrOTH9Eak19e3tA/RRPTU5BbYeuMEDRy3HiVvMNhoKEFMzXuwtxTeOTnsqpcZ7ZEGUq5KJLB1Br0zSWTRZrzGP0E6IyOi6ynYuGoGJtlyZZz64ESZqGojDExildHRjip0Q== 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:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=kSo1894uCctiM+9QIhhTWhfsqGu/wViz5Ii3s7C61XI=; b=XAPWpUQnPSBtZmePy7TBYA/Fnj73U0c3CV7l9+WCWq09FIJbKCkR+yRZ7ywDBYkTkVuTnIAl7TiM4ciyqoVjoJmccS9Hit3DfkbXQWYxxmMC7b8KYlPUf0N5GE5dTn5j+UaERK1pQo9NDlSMMixK7hZxVof0vmb8a1HbadtWFUhwOC0Ry2C51qwfHz5juhLv5mg29Qpz2vJ2gSHQQLzjavFPDlRhhEtC12kOMUOnfgRgtJYJta9HwXjGVt26NCu3aPcDtG1fRBHGLMSRW5qR/mnubpEQfFzWgthRLU36RN8dcTRuOVEL7ZzlY/9Vj262jrUJhHQGfZN4gZKEcuX7CQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=in-advantage.com; dmarc=pass action=none header.from=in-advantage.com; dkim=pass header.d=in-advantage.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=inadvantage.onmicrosoft.com; s=selector2-inadvantage-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=kSo1894uCctiM+9QIhhTWhfsqGu/wViz5Ii3s7C61XI=; b=wQaO4nSj29ogbG1mFHSdbFfbuT2YKjNmH2te3McvdGjF5ycY/sG8JnIQchwFtuCUB0Bb2H5eRpjVXYy9e1jjRAy2EzlvxETtjt+9dUsfofzKTQUGOr16boGZ+/Hzr/GfaHENg9Sye+1wfxv/NY1MeomgTJm9JgYdvgmda0mxbuE= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=in-advantage.com; Received: from DM5PR1001MB2345.namprd10.prod.outlook.com (2603:10b6:4:2d::31) by SA2PR10MB4636.namprd10.prod.outlook.com (2603:10b6:806:11e::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6064.13; Fri, 27 Jan 2023 19:36:28 +0000 Received: from DM5PR1001MB2345.namprd10.prod.outlook.com ([fe80::221:4186:6ea3:9097]) by DM5PR1001MB2345.namprd10.prod.outlook.com ([fe80::221:4186:6ea3:9097%7]) with mapi id 15.20.6064.010; Fri, 27 Jan 2023 19:36:28 +0000 From: Colin Foster To: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org Cc: Russell King , Richard Cochran , Florian Fainelli , Andrew Lunn , UNGLinuxDriver@microchip.com, Alexandre Belloni , Claudiu Manoil , Vladimir Oltean , Paolo Abeni , Jakub Kicinski , Eric Dumazet , "David S. Miller" , Krzysztof Kozlowski , Rob Herring , Lee Jones Subject: [PATCH v5 net-next 10/13] dt-bindings: net: mscc,vsc7514-switch: add dsa binding for the vsc7512 Date: Fri, 27 Jan 2023 11:35:56 -0800 Message-Id: <20230127193559.1001051-11-colin.foster@in-advantage.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230127193559.1001051-1-colin.foster@in-advantage.com> References: <20230127193559.1001051-1-colin.foster@in-advantage.com> X-ClientProxiedBy: BYAPR02CA0011.namprd02.prod.outlook.com (2603:10b6:a02:ee::24) To DM5PR1001MB2345.namprd10.prod.outlook.com (2603:10b6:4:2d::31) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DM5PR1001MB2345:EE_|SA2PR10MB4636:EE_ X-MS-Office365-Filtering-Correlation-Id: f9bb4e86-2fc0-4630-32d4-08db009dc8ce X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: bNXWJxebKRUeRb2+kuKDTOheUZ2jeUzfHN7fFsYRbKQyjr8oMlNvjJ4sZN4cQ3CNpxZS/ELRECsnWnfXr94Fu+yDPg47JqGNXcHU+LrJrykYA0/ZKCWj4+GMNDk/n2h07E+OjIS2p5+YHHrAMWp+SoEcfoO3siWfDban6hsr0L6dYv6ympUdu1t62wp4R17Jnbj+XwsE8I74/S5VPS5Yp8expEStFo0l+tcZMj15TaARi4nfd5LMXmEotaYLWi89RodOtRitintYTE0gcg4kXRfCOvX4B+FqSdgF6I/3cTWuv2NX7H03CZOkGQitjay+8L0trwIgObVf9fMSumrLFWXNoso3Vo8UZOH9WFb+/kmll7LGgveqsO71SnpV/r10E1sT53bRkunGPXsAX7dAoZRbZqUjG/7lH5nnK42vCIg2ZrofzNpsMILuwHO9PNubvNvLHJWGmF4h/sVJwQ5pGcHu29VTyZ+L1Va4PABrNOJI7ZUu4qpUZydOtLyAzPNAYxD/Q7QJZVPCE+cn4/KcBfq62FdJOvU5KPydCFf0v02aMnF7wPY3QbjstnbKZHL4mJ3GWUQMEk4UCdyv5A8dl88RKUpmq1dlg6NUQrnAaMi4W4lhA6lZ6YckGGhetKbU21yceor5FjwzAb2umYJdBYR34vuk6/IexnIDtIH7wpo8JKAc9poZQpUFHlLMZnyQ1kMFXPzpLTA6pgvbjehmTQ== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DM5PR1001MB2345.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230025)(376002)(136003)(39840400004)(396003)(346002)(366004)(451199018)(36756003)(86362001)(2906002)(2616005)(6512007)(26005)(186003)(66946007)(66556008)(8676002)(4326008)(66476007)(52116002)(316002)(54906003)(6666004)(1076003)(6506007)(6486002)(478600001)(38350700002)(38100700002)(5660300002)(44832011)(41300700001)(7416002)(8936002)(83380400001);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 5f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VOMf2FPHi85wq7kPHpV5OoB7Ju35gawEAyHcWnetMjcpltMDnLMxQz2k2bTPEsGHT2LIlmWx88INNIED3eiwWbBhLNDhfp6fgDNJm9yl5wL0rLCsTdqYzEFABR9oaTlPV0T0L0bNtrQBa7L8Aa7+y6AAS0cq1pKq+41R3nJb1n4u9Sz3REQiCPEp2I5cHBiTYcFOVvPwc4GHBVNJmoX++r4Weni1zzcRII3/38ZKIsOBhc3S9xDzYOfCxBaA7HLPBSV6150IpGo2ziH0+0gGxKHbCcWxjQ/vqUKbtbBDAIEOc0MxEb6UfNRzoaF4sSc7m33w6qSOeXADergEaeiSxyK4DiXKX75e68yL9Edt7BHmmVQpBMVrEj91hRlqX8b1FGIXPtSUQJsEnQ5PcF5M3MCO+a/wbcVdOk/SoBGbVs4BvBVzvVTP4hSSN7Cdlhaub3gkgP6pRBBVgcfz4uJE+fAoZvqJjVtLH11EM2kfZBhO5SZ8Nu8qRw3q9HIH+FOL4MeKinRuO6ybLsIU8lbnUq3yiJi1OkpL+O9rukw9GE36L5M= X-OriginatorOrg: in-advantage.com X-MS-Exchange-CrossTenant-Network-Message-Id: f9bb4e86-2fc0-4630-32d4-08db009dc8ce X-MS-Exchange-CrossTenant-AuthSource: DM5PR1001MB2345.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Jan 2023 19:36:28.5941 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 48e842ca-fbd8-4633-a79d-0c955a7d3aae X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: P5k/GgYaa4QH9kQAho1+YK1aKV5eV2ejYkYE4ciGpLRqcChW8ngLyCVcmBSgpxyscCCAnvdPPcaV1GNeAZT7hd/BfQtkjJXlH2EIxzYUh4M= X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA2PR10MB4636 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@kernel.org The VSC7511, VSC7512, VSC7513 and VSC7514 all have the ability to be controlled either internally by a memory-mapped CPU, or externally via interfaces like SPI and PCIe. The internal CPU of the VSC7511 and 7512 don't have the resources to run Linux, so must be controlled via these external interfaces in a DSA configuration. Add mscc,vsc7512-switch compatible string to indicate that the chips are being controlled externally in a DSA configuration. Signed-off-by: Colin Foster Reviewed-by: Rob Herring --- v5 * New patch after a documentation overhaul series --- .../bindings/net/mscc,vsc7514-switch.yaml | 113 ++++++++++++++---- 1 file changed, 90 insertions(+), 23 deletions(-) diff --git a/Documentation/devicetree/bindings/net/mscc,vsc7514-switch.yaml b/Documentation/devicetree/bindings/net/mscc,vsc7514-switch.yaml index 5ffe831e59e4..8ee2c7d7ff42 100644 --- a/Documentation/devicetree/bindings/net/mscc,vsc7514-switch.yaml +++ b/Documentation/devicetree/bindings/net/mscc,vsc7514-switch.yaml @@ -18,13 +18,52 @@ description: | packets using CPU. Additionally, PTP is supported as well as FDMA for faster packet extraction/injection. -$ref: ethernet-switch.yaml# +allOf: + - if: + properties: + compatible: + const: mscc,vsc7514-switch + then: + $ref: ethernet-switch.yaml# + required: + - interrupts + - interrupt-names + properties: + reg: + minItems: 21 + reg-names: + minItems: 21 + ethernet-ports: + patternProperties: + "^port@[0-9a-f]+$": + $ref: ethernet-switch-port.yaml# + unevaluatedProperties: false + + - if: + properties: + compatible: + const: mscc,vsc7512-switch + then: + $ref: /schemas/net/dsa/dsa.yaml# + properties: + reg: + maxItems: 20 + reg-names: + maxItems: 20 + ethernet-ports: + patternProperties: + "^port@[0-9a-f]+$": + $ref: /schemas/net/dsa/dsa-port.yaml# + unevaluatedProperties: false properties: compatible: - const: mscc,vsc7514-switch + enum: + - mscc,vsc7512-switch + - mscc,vsc7514-switch reg: + minItems: 20 items: - description: system target - description: rewriter target @@ -49,6 +88,7 @@ properties: - description: fdma target reg-names: + minItems: 20 items: - const: sys - const: rew @@ -86,35 +126,16 @@ properties: - const: xtr - const: fdma - ethernet-ports: - type: object - - properties: - '#address-cells': - const: 1 - '#size-cells': - const: 0 - - additionalProperties: false - - patternProperties: - "^port@[0-9a-f]+$": - - $ref: ethernet-switch-port.yaml# - - unevaluatedProperties: false - required: - compatible - reg - reg-names - - interrupts - - interrupt-names - ethernet-ports -additionalProperties: false +unevaluatedProperties: false examples: + # VSC7514 (Switchdev) - | switch@1010000 { compatible = "mscc,vsc7514-switch"; @@ -162,5 +183,51 @@ examples: }; }; }; + # VSC7512 (DSA) + - | + ethernet-switch@1{ + compatible = "mscc,vsc7512-switch"; + reg = <0x71010000 0x10000>, + <0x71030000 0x10000>, + <0x71080000 0x100>, + <0x710e0000 0x10000>, + <0x711e0000 0x100>, + <0x711f0000 0x100>, + <0x71200000 0x100>, + <0x71210000 0x100>, + <0x71220000 0x100>, + <0x71230000 0x100>, + <0x71240000 0x100>, + <0x71250000 0x100>, + <0x71260000 0x100>, + <0x71270000 0x100>, + <0x71280000 0x100>, + <0x71800000 0x80000>, + <0x71880000 0x10000>, + <0x71040000 0x10000>, + <0x71050000 0x10000>, + <0x71060000 0x10000>; + reg-names = "sys", "rew", "qs", "ptp", "port0", "port1", + "port2", "port3", "port4", "port5", "port6", + "port7", "port8", "port9", "port10", "qsys", + "ana", "s0", "s1", "s2"; + + ethernet-ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + ethernet = <&mac_sw>; + phy-handle = <&phy0>; + phy-mode = "internal"; + }; + port@1 { + reg = <1>; + phy-handle = <&phy1>; + phy-mode = "internal"; + }; + }; + }; ...