From patchwork Fri Jun 10 20:23:29 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Colin Foster X-Patchwork-Id: 12878093 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 5A588C433EF for ; Fri, 10 Jun 2022 20:27:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=te+6MpBBdZs4lgcR9/BxM4LdG+ZepnEL5uV1M+HFKrA=; b=bSjGWfX+Gaw5sa Jm8qZnlmR4PRS67+DPJk1M2F7mj7hozqdEXiorv6Uke11Pp3yW0YbCL8TmPyHPsztiE76Wy78oFtf 8fEDsPZ9h2hCdx7+RASaKks/yge1zX1yy2ifSYYY7PGGvgwNF1AKkwhIRRDDct3sWiEp9MOBvM5HD L7cC/VVjFdnt2/Vi2PNpt1gpva0zOhSJI0IecHZ8N3LUqdWmwT8wZnnpvcVfsYcSoKrnB86D4V/6i +c6IUrmKKNr5HRpIXf/aBSIoVynpCKPQ4l4wPOaepyi8wcIEFkoI8fZj8ap0xjFAX4QXnYW1hX1xf brA6E/hsmtl1XyWWfSDA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nzlCn-009jG6-JG; Fri, 10 Jun 2022 20:26:05 +0000 Received: from mail-mw2nam10on20707.outbound.protection.outlook.com ([2a01:111:f400:7e89::707] helo=NAM10-MW2-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nzlAk-009i9I-Ee for linux-arm-kernel@lists.infradead.org; Fri, 10 Jun 2022 20:24:00 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=bw7JccKv1Y9s4LZkKj2FoDYbbC98P0E6B9W1IONkluiO66m8Ad4sdRcBNjySjngrEPjjAmYIWY9Dg4TnlTmTes+FSbkxzR/OXGFethDVA1PC4dqcjL+X3Od7gH104czd3vYNwj3DRoJlhS18SIy4ETSvDt4J3Ao+ddbciQDfHXgXYOdUkzxnwpGfauIO0ceTDrHZfurYXoCKX2OuUfAZ+Lvjw5rcGloM+qLEg9zDdC4pmlLk3Se5avwGxZf/6J7blxVU8g/0yMWlsY3/6jWIH9+BAdMXsiKvVpyICJjowNw/UdAUkfdSNCo1fKvuMXqqOhTNQ5v6vZtaNufrjyVkAQ== 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=0TxUElxae3D5rFWa+9Bc7GEjNNlZ/Nwh0pZeDVBhKjA=; b=kABDT7bGkr2CyOWi651fYvI1qOz+/HPVA9kGFeGyDfDc4ic7hyv5qxGm85UglI2J4xpcTNMg0P5XZ6jrseNIk/JcmIW9S9E9Dc9cDH8o1Vk+ZELSAxI2oK2YOaQFcijj6l1jyzu0n4QXV0mYCIZKc42wiIIhUpel350+ygd2WO17IgbOWNpXo1eoRvLMAvzYCYAGa8WicCvB1Xl/hggy7M5wbG79Hb1iURPn5RD0voYNVmFgJ1wpmIM3b2vbKT8uwu71Eoey4v73mYCz4AAg/Qf2nDNbgPbbqxZ+iDtzcPh2c0P2m3NQJb5n7KwHJ9oITXdwHbwdIXZ+3XQQGum9xg== 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=0TxUElxae3D5rFWa+9Bc7GEjNNlZ/Nwh0pZeDVBhKjA=; b=tglPBofd5dUpMoTlcUz4vYVKJjLoGTj6lRpHbj7LCAADO+nuhKQbz1OOL2Pl8F1LOpW616eGRf5+MZsm12i1crVtCqgxa0+FU7wGFRKgl4eEKHCuS4Hzqbrt+4iGAaliLHAfwLrVBUfcEN3xIDGfulxo3ajoU3lNGJRBzbpK0PU= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=in-advantage.com; Received: from MWHPR1001MB2351.namprd10.prod.outlook.com (2603:10b6:301:35::37) by MWHPR10MB1629.namprd10.prod.outlook.com (2603:10b6:301:9::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5332.13; Fri, 10 Jun 2022 20:23:50 +0000 Received: from MWHPR1001MB2351.namprd10.prod.outlook.com ([fe80::b8c0:76a2:4c89:d10f]) by MWHPR1001MB2351.namprd10.prod.outlook.com ([fe80::b8c0:76a2:4c89:d10f%7]) with mapi id 15.20.5332.014; Fri, 10 Jun 2022 20:23:50 +0000 From: Colin Foster To: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, netdev@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-gpio@vger.kernel.org Cc: Vladimir Oltean , Lee Jones , Rob Herring , Krzysztof Kozlowski , Andrew Lunn , Heiner Kallweit , Russell King , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Lars Povlsen , Steen Hegelund , UNGLinuxDriver@microchip.com, Linus Walleij , Wolfram Sang , Terry Bowman , Andy Shevchenko Subject: [PATCH v10 net-next 6/7] dt-bindings: mfd: ocelot: add bindings for VSC7512 Date: Fri, 10 Jun 2022 13:23:29 -0700 Message-Id: <20220610202330.799510-7-colin.foster@in-advantage.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220610202330.799510-1-colin.foster@in-advantage.com> References: <20220610202330.799510-1-colin.foster@in-advantage.com> X-ClientProxiedBy: MW4PR04CA0246.namprd04.prod.outlook.com (2603:10b6:303:88::11) To MWHPR1001MB2351.namprd10.prod.outlook.com (2603:10b6:301:35::37) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: ca206aa0-55ea-4158-98d1-08da4b1f2147 X-MS-TrafficTypeDiagnostic: MWHPR10MB1629:EE_ X-Microsoft-Antispam-PRVS: X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: LWBK7S4JiNp9SDV7qHpncagKk3c69gH36QLUKlXuXQM8PCKGXfU64JNz2uwg5hx/HwzIFzk7Ve6D0+m6KOgWsZdFcVd8tToWaR2mA83Y1fuWkwWk7gE+MThCSyLIpoT99DXMv7jILQhIEUqkAODdw/lDjullQFF6k5a7Nea2qqznjpBnv/YA2M1c0ABFky5phjpv+EmrYXd1TgGzDv43PFVQ2GzB3AIW2n89+36WH9h4SuHfEoIR3B6++dWsFJx+Xk4iJLUIsdFActsrbZo1W/zdwwnCxg8SKmy+cb9TjbOeEx7tl37GCtrL6M0nTI8/ChzqGsQL4DniHt34R/R4g6vDJnHruhOeJAnfNWnCIUofz2PELL3b+makBDOrqi6wnZ7ZVG8/DfVU2jVMBCptQUvlJQBsFr9pmjtilE+uLHa2nOZycDBe7uix+dkcQcbbyG6L+vMX6yCNS6l5OwKgaVSwe8Sgsa59mihYGjCyBv9AUGrUoVfciI+Oo9xwFts4wDmMGYjKYvGAAn9buEAmiW5OG8XmDFj6VbfjDb4N/icCpiHW68B+2nWRLSxpFQ40VJXjivO0RPSbUSGiMGcYbyB3Et/fg6IpzhNq3v2FFXqp6HS/EvnCARHalokxJr0OzXuBL89EqtJDhbu68119iK6iV0K8meolbP/vy0ACMjZ1X/uacPtSap8Lzm0bVHZzv9YAmPwvV3ecu2PL3OYc7gYbUpAihKMIJhmM7T5lL4EmDjWxFZIpUTkyxT35OrRO9y1SMv1XUyEsVFuKNUJ/Qyzixn+LBEcCleT1pndC9ug= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:MWHPR1001MB2351.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230016)(136003)(39830400003)(396003)(366004)(346002)(316002)(83380400001)(2616005)(2906002)(1076003)(6486002)(54906003)(8936002)(36756003)(6666004)(52116002)(6512007)(6506007)(26005)(186003)(41300700001)(86362001)(44832011)(66556008)(66476007)(966005)(38100700002)(38350700002)(5660300002)(4326008)(7416002)(8676002)(508600001)(66946007);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: LQPm//7OrYwJbRBuKftmHa3SWhBZCmXbfTcWNqT07OsaS2E8rKLqUFDNHBIcj92JArCyEjElfrQ26suSXDLudjcRfunL4rf28DtyphuwIMEBBsGt8tAtpPk5dszGgDnN+AQv5nHOFbBwhHOQ8u4wibIuEsMrg8Tq/qQr+5c0hvo66LLj7nkVPJ05nRhyTgNeAYYem4TEQPNLB4EfM0msXQY4LfJZodZKlwNj16npyJR4HrMgVxKe4y6z3z/jR2nYEnfmkpjz7l1nedguTQ8HznZAfbI02SMbU608rmVVoHD8VZQ4SYhHwM3aEc9o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3dxw3Q70dvlZwgOODCHEgCYs9j0QnWMFZqB79EIzLkTzNhMlXvyxrk/e1eIEkhuWxEuYD0OFJIXKVcJaCoX5Zq8SO0gPuEZr0cgMoIAl+hmCI5HHLB7+JWABQaBoDJHJFIsFAlrOPw7LkpDhukprgQRRERn8YjI+E+rjpKtd8418IAMjgk03Z0iM2m2s8/i1oJ4U05QNkelAnuvvQ/EVwO+i0AFw+n0VuRTsjePqptE0eX5BzJeyfksAfiU3824Pcb1SJP7pX2Mg3l2NBXaEwJ7h/ZyMcMrUVEPFsgY1maynCbMr2uVfEvoYT7AyAYVIZbMoYt0XRxTbJIdUtxQ8OvA+63psre9AfkB81mAnmQbBP0YNXBbJ9QwCCOICl9gWcPLJLXggH7fu5o51Dr X-OriginatorOrg: in-advantage.com X-MS-Exchange-CrossTenant-Network-Message-Id: ca206aa0-55ea-4158-98d1-08da4b1f2147 X-MS-Exchange-CrossTenant-AuthSource: MWHPR1001MB2351.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Jun 2022 20:23:50.2474 (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: gZjg6I/hS0P3izRNzoBVxg7ALScMvKXZUtqwefLcA5OAwugaDQ5WWKfKXq14Q+O4XFJvBkXQo3Vn6YlsDp7hgtun948bC0SLC0Hh1x9RWmk= X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR10MB1629 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220610_132358_571319_3EF61DAB X-CRM114-Status: GOOD ( 16.49 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Add devicetree bindings for SPI-controlled Ocelot chips, specifically the VSC7512. Signed-off-by: Colin Foster --- .../devicetree/bindings/mfd/mscc,ocelot.yaml | 160 ++++++++++++++++++ MAINTAINERS | 1 + 2 files changed, 161 insertions(+) create mode 100644 Documentation/devicetree/bindings/mfd/mscc,ocelot.yaml diff --git a/Documentation/devicetree/bindings/mfd/mscc,ocelot.yaml b/Documentation/devicetree/bindings/mfd/mscc,ocelot.yaml new file mode 100644 index 000000000000..e298ca8d616d --- /dev/null +++ b/Documentation/devicetree/bindings/mfd/mscc,ocelot.yaml @@ -0,0 +1,160 @@ +# SPDX-License-Identifier: GPL-2.0 OR BSD-2-Clause */ +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/mfd/mscc,ocelot.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Ocelot Externally-Controlled Ethernet Switch + +maintainers: + - Colin Foster + +description: | + The Ocelot ethernet switch family contains chips that have an internal CPU + (VSC7513, VSC7514) and chips that don't (VSC7511, VSC7512). All switches have + the option to be controlled externally, which is the purpose of this driver. + + The switch family is a multi-port networking switch that supports many + interfaces. Additionally, the device can perform pin control, MDIO buses, and + external GPIO expanders. + +properties: + compatible: + enum: + - mscc,vsc7512-spi + + reg: + maxItems: 1 + + "#address-cells": + const: 1 + + "#size-cells": + const: 0 + + spi-max-frequency: + maxItems: 1 + +patternProperties: + "^pinctrl@[0-9a-f]+$": + type: object + $ref: /schemas/pinctrl/mscc,ocelot-pinctrl.yaml + + "^gpio@[0-9a-f]+$": + type: object + $ref: /schemas/pinctrl/microchip,sparx5-sgpio.yaml + properties: + compatible: + enum: + - mscc,ocelot-sgpio + + "^mdio@[0-9a-f]+$": + type: object + $ref: /schemas/net/mscc,miim.yaml + properties: + compatible: + enum: + - mscc,ocelot-miim + +required: + - compatible + - reg + - '#address-cells' + - '#size-cells' + - spi-max-frequency + +additionalProperties: false + +examples: + - | + ocelot_clock: ocelot-clock { + compatible = "fixed-clock"; + #clock-cells = <0>; + clock-frequency = <125000000>; + }; + + spi0 { + #address-cells = <1>; + #size-cells = <0>; + + ocelot-chip@0 { + compatible = "mscc,vsc7512-spi"; + spi-max-frequency = <2500000>; + reg = <0>; + #address-cells = <1>; + #size-cells = <0>; + + mdio0: mdio@7107009c { + compatible = "mscc,ocelot-miim"; + #address-cells = <1>; + #size-cells = <0>; + reg = <0x7107009c>; + + sw_phy0: ethernet-phy@0 { + reg = <0x0>; + }; + }; + + mdio1: mdio@710700c0 { + compatible = "mscc,ocelot-miim"; + pinctrl-names = "default"; + pinctrl-0 = <&miim1_pins>; + #address-cells = <1>; + #size-cells = <0>; + reg = <0x710700c0>; + + sw_phy4: ethernet-phy@4 { + reg = <0x4>; + }; + }; + + gpio: pinctrl@71070034 { + compatible = "mscc,ocelot-pinctrl"; + gpio-controller; + #gpio-cells = <2>; + gpio-ranges = <&gpio 0 0 22>; + reg = <0x71070034>; + + sgpio_pins: sgpio-pins { + pins = "GPIO_0", "GPIO_1", "GPIO_2", "GPIO_3"; + function = "sg0"; + }; + + miim1_pins: miim1-pins { + pins = "GPIO_14", "GPIO_15"; + function = "miim"; + }; + }; + + sgpio: gpio@710700f8 { + compatible = "mscc,ocelot-sgpio"; + #address-cells = <1>; + #size-cells = <0>; + bus-frequency = <12500000>; + clocks = <&ocelot_clock>; + microchip,sgpio-port-ranges = <0 15>; + pinctrl-names = "default"; + pinctrl-0 = <&sgpio_pins>; + reg = <0x710700f8>; + + sgpio_in0: gpio@0 { + compatible = "microchip,sparx5-sgpio-bank"; + reg = <0>; + gpio-controller; + #gpio-cells = <3>; + ngpios = <64>; + }; + + sgpio_out1: gpio@1 { + compatible = "microchip,sparx5-sgpio-bank"; + reg = <1>; + gpio-controller; + #gpio-cells = <3>; + ngpios = <64>; + }; + }; + }; + }; + +... + diff --git a/MAINTAINERS b/MAINTAINERS index 91b4151c5ad1..119fb4207ba3 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -14355,6 +14355,7 @@ F: tools/testing/selftests/drivers/net/ocelot/* OCELOT EXTERNAL SWITCH CONTROL M: Colin Foster S: Supported +F: Documentation/devicetree/bindings/mfd/mscc,ocelot.yaml F: include/linux/mfd/ocelot.h OCXL (Open Coherent Accelerator Processor Interface OpenCAPI) DRIVER