From patchwork Mon Sep 5 16:21:31 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Colin Foster X-Patchwork-Id: 12966408 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 4F803ECAAD5 for ; Mon, 5 Sep 2022 18:30:40 +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=wsZ4C3J/J0gzdSbm/zzKpMqH18mFCZUdVeF2zgW7Syg=; b=vm5mNMnv0iOZ1z hClOr3HM1W+lLu/O4TcywhjoXS9fR9sBDiGvmySA8QnRN9LJJRUAfcXM0VHzLrhrJC622EoMro5MN 0Wu4V8H/pLCiuTrsGwpvXcE0O8Vfe3Dgwm4xWeEaOnap5RoSlouOMxjy/2X/G8wa99eDLYO4aV4eZ iP7PwVSzrV176S/Zg9fBmEUfwef2XjyK4x0eIPynElX4dCc9wWIqP3EMX5oeP+UG5hz3SMPT1SEtH i0xPlh3YLmEtFPz8H74nSO1DYw5f/rmR99L+jbhAjnJ7gno8vaE/tchHije6yrsq6KoqS0DHkekFg aYwRbHYaeMF06QckDCrA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oVGqM-008PwH-Ne; Mon, 05 Sep 2022 18:29:12 +0000 Received: from desiato.infradead.org ([2001:8b0:10b:1:d65d:64ff:fe57:4e05]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oVF1F-006tEb-7g for linux-arm-kernel@bombadil.infradead.org; Mon, 05 Sep 2022 16:32:18 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; h=MIME-Version:Content-Type: Content-Transfer-Encoding:References:In-Reply-To:Message-Id:Date:Subject:Cc: To:From:Sender:Reply-To:Content-ID:Content-Description; bh=7ugWM/t7mNaTvEKz3aMsWhD90NlTeDCnSdjabF2ck04=; b=bMazcSazFPKKB4IvNIZDxV5Ae6 19l5V3tGP4gUbQk30797IokoEsi1+oEtv4SvB15cXd5Ai3eUyi9TWo0WsVVmxHk/d7hJocVP2DgFf PDgvBQzCt9DUkmUvBRqnVauacbqJuQccvEDq2wCTnXrnaV15CJHaOtuOKHxPyI9HlgjX3TXWnhCMt r1S4C6OuQAuFzyBl9WEeVGWjqVxFVxro26Nb2mktDBmxBcVh7Svx0sCZeS1voNHR30/050k12GH6N MhHFqs2fSk3KOuJV1RIKjdjDDUDEDfWkDOv7mJ57z0g5qLMPFhXAjN6FVxBzbbWcIEq5fgzkWMmDh 43qpOK7w==; Received: from mail-dm6nam04on2108.outbound.protection.outlook.com ([40.107.102.108] helo=NAM04-DM6-obe.outbound.protection.outlook.com) by desiato.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oVErO-009oho-Ur for linux-arm-kernel@lists.infradead.org; Mon, 05 Sep 2022 16:22:10 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=b1FVmPjJ/sAro5JylIQUXKkN8eTdbnk+evz+ebbANord2MBlA2vb7sxaB2eAx8/LNZqpaQstz7h85Ggei3V7DefyhHN8ojbCl8F05qbVy440KJ8oOnQJ34qsoOrCJdOyVZQhTE2HKxqJ0WwC+D042KIyvkYCYDf817wZ96vYiXAeVhO0drTsZU+1SWo8jQoOXXWGg/Jpb9NcGNbzX3fAO/pak2ETdCs9f+NyKbP/Le2PdSqxV4hOr/nlKdUWZ2s6a6vZ2XZxQijdcmfVSX/K7Fx3k7sq6o3AJnA5Z/SsRPvKLPvMJRz+hMB0sWuPzHndMQvFd6oPa7M9NUUI4wPB5Q== 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=7ugWM/t7mNaTvEKz3aMsWhD90NlTeDCnSdjabF2ck04=; b=UdiYEV2yfsEGavP1Nxr93yEexyTD7eOtzJLSUBNcFZnv9sPnsmx9xSfu1zCdgBe9IPqmN4IDYjv2xHwEf2tOmoUP3NnWQpRQ+iKBRfu8d/4TeIpybpK2Ny27v49D9fOWpARIHaVeREKfRe4HQnAMcm84UGxBzRNGxORStw+Sbz6Sn4iNasbsUFgqGWdzvS7y37mW+tPtUV6NkOLeljcepRBcEA5X+M79rKH+Xq6Zutt8QJNQymuO6WOddeN/eg7FsE0Q2DNKlAhRFDI9jewIu4PXbkFxDmjEJWuVYE83fiWu2FighRdxTUEj0hKx2get8R+8F1UyhZVDK3R5L94jBA== 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=7ugWM/t7mNaTvEKz3aMsWhD90NlTeDCnSdjabF2ck04=; b=V5rYyjNaEMi4sTpTccdHKYceO1aH4ucf1X7NeQGDH1ZO344diDylLwmF3GWUWC5Ff6n9xKF2InjqEXvxhRBN+aABB3BH5IOUVr3/xHfnvrb9JThJPge3akCov5nY1b+k00CNZ0Ole2999oixc6UiB3k6YQjSUk0KJOOG20OxTQw= 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 PH0PR10MB5848.namprd10.prod.outlook.com (2603:10b6:510:149::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5588.14; Mon, 5 Sep 2022 16:21:55 +0000 Received: from MWHPR1001MB2351.namprd10.prod.outlook.com ([fe80::38ee:4bfb:c7b8:72e1]) by MWHPR1001MB2351.namprd10.prod.outlook.com ([fe80::38ee:4bfb:c7b8:72e1%7]) with mapi id 15.20.5588.012; Mon, 5 Sep 2022 16:21:55 +0000 From: Colin Foster To: linux-arm-kernel@lists.infradead.org, linux-gpio@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org Cc: Terry Bowman , Vladimir Oltean , Greg Kroah-Hartman , Andy Shevchenko , Dan Williams , Jonathan Cameron , UNGLinuxDriver@microchip.com, Steen Hegelund , Lars Povlsen , Linus Walleij , Paolo Abeni , Jakub Kicinski , Eric Dumazet , "David S. Miller" , Russell King , Heiner Kallweit , Andrew Lunn , Krzysztof Kozlowski , Rob Herring , Lee Jones , katie.morris@in-advantage.com, Rob Herring Subject: [RESEND PATCH v16 mfd 7/8] dt-bindings: mfd: ocelot: add bindings for VSC7512 Date: Mon, 5 Sep 2022 09:21:31 -0700 Message-Id: <20220905162132.2943088-8-colin.foster@in-advantage.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220905162132.2943088-1-colin.foster@in-advantage.com> References: <20220905162132.2943088-1-colin.foster@in-advantage.com> X-ClientProxiedBy: MW4PR04CA0263.namprd04.prod.outlook.com (2603:10b6:303:88::28) 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: c342be6f-6947-4521-cd6e-08da8f5abfa0 X-MS-TrafficTypeDiagnostic: PH0PR10MB5848:EE_ X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: KwFzavfRLdZFKsALKivFhOQC8Vdj3xamA5a+gd5XdFXmIhZm/shPQxveTtJsGsPV5FKu72FcwDqC2e3EwaW7jGSFg6o3Q2Fiak+cBZzYtbnxIjDvNc3/T7ESujuavX/wNkLFS0Pzmd6uu4dlSAYMoXRfJAm+nS3+oQO9fmKegnp2/KYHjuBwo9IX0WWW76Ao/cJ6bWiq2uNHJbs7gAkcaGHJ4HBOBySPU9gbUlvlVItavza81BdhpAz0rDNNn9kuEV2/zYo5afO7vttAPKeBhQTvR7ThdYAxuazBIogmkZC+m6zFa3jN7lMKRXfJVQZN9oiU1+ZgQNB8ToH40BU7dTunD0bPMfA3deko/A0l0Riz9U8bMn9pdH1L8XvFhv7kUY4MLEZkHvAqGZK/OwnCD/CZFSUPKEWdqjKHTh//OlrHJJPSwNX9Q+GNUVcDnK5fv8avNw42Mn0umAlvahRpY1Vo879o+kqcSFZKNMvtCemC6ZejsbKVGmd97m6+UhVzpEVpqVkkWeAE48hT1x8qmgz41LPENtPjd9zqgXZ0vBpGjMXhxLNah5xxqaNLrJA7UWeVnz+AXJ6F/uitj2xvY+9sGVzjyejRiiWRtm7wPb1EncqHv1jCsuqA2CzRx/6bXhqNHb/y93F8dVdCfVQTE1B1wyXthY62D5K/8XGxaqEzQuXBmEYmz0MyJm4cGplpw8PNIiqTg6mWoLLI7Bvy8PBy+JUC5O0dGKKJMXf4R1Uhk+ncLm0w/2IBlwM63VnK8tNcEV0BEGoExLBA+JUh798/SBKInRiJM7Ale8RE36Y= 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)(396003)(346002)(376002)(39830400003)(136003)(366004)(66946007)(5660300002)(8936002)(66556008)(54906003)(6486002)(966005)(41300700001)(6666004)(52116002)(186003)(2906002)(1076003)(7416002)(2616005)(44832011)(6512007)(36756003)(6506007)(316002)(83380400001)(26005)(38350700002)(38100700002)(4326008)(86362001)(66476007)(8676002)(478600001);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: nYwG7/gf6BgKDtvQ/lg6HI/Om4JocBOJo6isRL8y1sYDgK8XZSOhxKdiN4fl0iAtHxLmLBMFh0+Qat2RHd3Sgp3BUgJqs77NEO2aEwZtxZzOGZ93h6sZh+0/h/KBlAEPowV7jA/w870EZqgiDaldhDs4cVtKLl4UwdxqIO5GYvba687lze1y/eXXVs1P301iNIrW2eMjlMXp029SLcEXiEOtnuguxhp3VIU8YwQnFGb/0UF8vwpPOrrTmdaPKcs2RF7pStGXs7fQEadUDjXYNpqE+vxedih9HiFvQ6vM8QHUIAbiUOYnM4roW9+PY0koKvVh2Zutp21FFxeMtHDTBejqXnJk74okDvZU47w6x8bboBbGhvldsf38VDHuw1pCoXv2zrM0GQGVOMyeFecKE7oGcuZoVlIG/ZVolxSakFfNLjxlOdKwcm8QS+nFY3Q6JKn8azOp2Qx+4D2Rc0NqU5rtDHXyo9wKzK4VwU9d8ByOD+vQjz64E/hPfkLCrOESEb2imD0ZRCmGf1xHdcLmfUZXI8gvoktzP0RsPe6jQsOf4Vl1x1O77fpdmu80VEo8tku4IhxRr+skwmkqD6d96/0BvP/5Bbr4fXp9zQFXPD4Je8L9djmUx9aWlrFfIfHFLTo/fZi9TzwYo5jQ4VETLWBs0aNJo+6iJ1I/XCDE8d3r5y2MZm/0KvniY/wKkZpkzU2gMlIGjPxk5qFwCq0PelDXt4s7bvSrYDYMPnk9wiWCYZDArkfTayXMVYOlnbwuPvynLWPrXXCj+WGjsC6iYJOLRTuG1SolEhQ9B0msva/T9k7F21+vjHKioh29sOUyuSHXtQzCO3RH4ZrutnKig8gdGhIiVYCDXvUPsrVL+WiW3ABJRyycannrkG+gPP2nIRj8BT9AQ7Avg6CQq4Eewli1A0q5HdXAj9rfBXU1bcDrlglzWd1uQX8FZnhAV8bKAciCKGi3LwJe8Nn8uFtIY4wptlqDecsKh/gS7N6jJohmBFYlNwNglnxDIPy7MnzLFgDwmHMgYT4utVPrdn3d6GaHPO74oH018uYMin2BcJGsb0O7sJN+jcTFk54FaUUzefTetdD50GsmoXjqtmEIVyu1SfK3wU1lYf0lLl+LFSYmsPv17n46hK6+1YFmMF9sxV/G6/PVCy9EO7WnxckmyufQZuMdnvwOGx9t3s8ccB7ir+rGAJsabwTBI9EPjm7GGdefqO0EqhH8vvYBbWJM2AA2S58/0HsgdJdDNAH+nO2/zXJw0a8AGwu2UmjHRDZaft19Fmc3pF/7TT6bODZCvUreMfoR0gAtcjzJxvqnRAsRgHi2P4VPgW6KcLOX0nY5KulTWx3OtzUSjbHOIfVsYpDj5znZD1657r2oTB8sjaI8UguV/jL2gm9K+bHLIcBgaTNAtKoY2ez1o2Ykrq0BQwgof2e95Y6UBkE5qdab123LJaFHnor7OYQON1/s10/Nqd6zNjT7mJXNK+R/EW6ny8HcmqidVZMDu3K0McipXWF1I2CzsPH2JGu0Ndq/9racYYQfpRDNDZVtXygt+n+/beWQ32zS6tRgKvuB9SViX+5cnrJ4jA9osqxU6EIic64wh2cl8yTJpJ2AJvLvw8kHBg== X-OriginatorOrg: in-advantage.com X-MS-Exchange-CrossTenant-Network-Message-Id: c342be6f-6947-4521-cd6e-08da8f5abfa0 X-MS-Exchange-CrossTenant-AuthSource: MWHPR1001MB2351.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Sep 2022 16:21:55.2724 (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: 0w3oh/xXNNBEecXHvVaPmreE/l4iQ9T0KDH6hG3V2UA30BXwKZVGi97Wu0TiJnP5JKcAnCijXB0f/kj6Mur+UwZlO5bdGR4ajE2dTcGkF2c= X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH0PR10MB5848 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220905_172207_063578_38F5F32F X-CRM114-Status: GOOD ( 15.85 ) 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 Reviewed-by: Rob Herring Reviewed-by: Vladimir Oltean --- (No changes since v14) v14 * Add Vladimir Reviewed tag --- .../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..8bf45a5673a4 --- /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 + + reg: + maxItems: 1 + + "#address-cells": + const: 1 + + "#size-cells": + const: 1 + + 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>; + }; + + spi { + #address-cells = <1>; + #size-cells = <0>; + + soc@0 { + compatible = "mscc,vsc7512"; + spi-max-frequency = <2500000>; + reg = <0>; + #address-cells = <1>; + #size-cells = <1>; + + mdio@7107009c { + compatible = "mscc,ocelot-miim"; + #address-cells = <1>; + #size-cells = <0>; + reg = <0x7107009c 0x24>; + + sw_phy0: ethernet-phy@0 { + reg = <0x0>; + }; + }; + + mdio@710700c0 { + compatible = "mscc,ocelot-miim"; + pinctrl-names = "default"; + pinctrl-0 = <&miim1_pins>; + #address-cells = <1>; + #size-cells = <0>; + reg = <0x710700c0 0x24>; + + 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 0x6c>; + + 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"; + }; + }; + + 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 0x100>; + + 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 e0732e9f9090..a5df3b0b9601 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -14744,6 +14744,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