From mboxrd@z Thu Jan 1 00:00:00 1970 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 49A2CC433EF for ; Tue, 14 Jun 2022 20:45:01 +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:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=UEnMBJurT1ClnaH88B4849ag7VriLTBUhbxVZk7cmDM=; b=Vt8YzP0A4tJNW8 DrWqRVZwUg5dvljSi/o0CqjMqdPoozpJB0ZqRUth3EKg+2iZTfRtzOi5Bu0y2WjQJVILKzWcUwhR7 LaoM9S03j00d8J5YtZl9FthjA5/O5KVT1k+p+epRys+STCdNKgKDoj0ard/dnS0HVSWUiZSTdOwOP eLEX4cm3Z1xXPDFHgzx3oXNcZ/YzamfCFb/tMxSqW6Px4yev7hOjDjXHH17LANLnZO/Yr+O+UqFir KcQ7N90+r90NuPYzl/zxBuXVW3O2ycpVg2IKRVEGVDFdrjuwPv1JoL37imnPgyirOSqS88yzo3pxt Os6WRSdvGLdt89+QopNQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1o1DOE-00BCf8-2y; Tue, 14 Jun 2022 20:43:54 +0000 Received: from mail-io1-f50.google.com ([209.85.166.50]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1o1DOA-00BCeH-8S for linux-arm-kernel@lists.infradead.org; Tue, 14 Jun 2022 20:43:52 +0000 Received: by mail-io1-f50.google.com with SMTP id i16so10670010ioa.6 for ; Tue, 14 Jun 2022 13:43:49 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=EWCrP2gVR6iEKu6wld+fLLcPN5tCwcbqGWbRuRjzj3E=; b=vrW9D6VYoafu9f2yoRxNhV4F5i+EETZXp/cpphMdFv61J8bVaJad6U3xy3EnsMzGnc ZJF+9/TtWWZPxu1PG84jxLLgVPL/hSlLwiruANV77jM/k2ABQoYYuXVxEwjpWg9XPClv IG39h6n6Hbe3YcKc6+j87wUoaQUZKBkGUuAcayX7EzutFN6dfcbfozpczGTRw+P5UsmC H0SvkVegJB3U9ZgYn6LNvL0+ILR4cne5Nhu/h+ojf0jo9WfybbpfeMPrACkchstQ+z0d HUJk5VXfQBgQ7XBGO6phBpOY3QeZQaqqBNNb0yPdVWL8dOrWHqZKFMnXlc8VXT0QrVrU p7kw== X-Gm-Message-State: AOAM533nA0/L0fBuTFVlw80n1hYvhu1vJYbgwEWMWNW93nugU6k0lEFQ N3swYbL4mEkJkJIWnoNhmA== X-Google-Smtp-Source: ABdhPJyquQnI3HE8yYQ+8Libvzpe4msNa30paW2QwWTY1sk6eZSq9sHUV4oG33HdAbAGa6d2P4Bo5Q== X-Received: by 2002:a05:6638:1c19:b0:331:d0b7:4cfe with SMTP id ca25-20020a0566381c1900b00331d0b74cfemr3983850jab.311.1655239428886; Tue, 14 Jun 2022 13:43:48 -0700 (PDT) Received: from robh.at.kernel.org ([64.188.179.251]) by smtp.gmail.com with ESMTPSA id n42-20020a02716a000000b0033197f42be0sm5230647jaf.157.2022.06.14.13.43.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 14 Jun 2022 13:43:48 -0700 (PDT) Received: (nullmailer pid 2487460 invoked by uid 1000); Tue, 14 Jun 2022 20:43:45 -0000 Date: Tue, 14 Jun 2022 14:43:45 -0600 From: Rob Herring To: Colin Foster Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, netdev@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-gpio@vger.kernel.org, Vladimir Oltean , Lee Jones , 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: Re: [PATCH v10 net-next 6/7] dt-bindings: mfd: ocelot: add bindings for VSC7512 Message-ID: <20220614204345.GA2419690-robh@kernel.org> References: <20220610202330.799510-1-colin.foster@in-advantage.com> <20220610202330.799510-7-colin.foster@in-advantage.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20220610202330.799510-7-colin.foster@in-advantage.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220614_134350_348073_0C9C9D4A X-CRM114-Status: GOOD ( 25.45 ) 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: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Fri, Jun 10, 2022 at 01:23:29PM -0700, Colin Foster wrote: > 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 '-spi' is redundant as we know what bus this is on looking at the parent. > + > + reg: > + maxItems: 1 > + > + "#address-cells": > + const: 1 > + > + "#size-cells": > + const: 0 No size? That's odd given the child nodes are the same as memory mapped peripherals which expect a size. > + > + 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 { spi { > + #address-cells = <1>; > + #size-cells = <0>; > + > + ocelot-chip@0 { Node names should be generic. I don't think we have a formal definition, but 'switch' seems to be most common. > + compatible = "mscc,vsc7512-spi"; > + spi-max-frequency = <2500000>; > + reg = <0>; > + #address-cells = <1>; > + #size-cells = <0>; > + > + mdio0: mdio@7107009c { Drop unused labels. > + 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 > -- > 2.25.1 > > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel