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 96086C433F5 for ; Thu, 31 Mar 2022 15:46:21 +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: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=dlnscbQHzgk9AIVhAwuFlpQ2A0Ag85LdoFQ6cO5vc3A=; b=ubbXLidHOB4QyH jCNPZ4QC4mzTeO1n8ezDzsLZw0rlZ1JzgHOWVwlHhVi8igFwBOUeZt1Usi9xAMJuz2pMqbLwR6Hk2 7jrIOUbzM126TC6KL9lpp4Jsb+eiijyeDLxHF8JsENUeMtXoyHHFtn5l8RqzOu6Yh8USfNXfHT/jo 2Tgdr416+KstAF6gvaebXTanZsfQZtp4OQQbO2g3SF1jtRZYSNxaT25N5hfitc3+2u7RAkFnxCswG y5yur+rPr+t66rRlklVHmbve9lYMB6TVHYV9625Ke4KIRRZtLylLsKQjIcz4yRdc00UrSTfnuMJfo ZRPhOeOZj+M5jdwyy6tw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nZwyy-002mi7-J1; Thu, 31 Mar 2022 15:45:08 +0000 Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nZwyu-002meS-2Q for linux-arm-kernel@lists.infradead.org; Thu, 31 Mar 2022 15:45:06 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 512D2139F; Thu, 31 Mar 2022 08:44:56 -0700 (PDT) Received: from donnerap.cambridge.arm.com (usa-sjc-imap-foss1.foss.arm.com [10.121.207.14]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 3248A3F73B; Thu, 31 Mar 2022 08:44:55 -0700 (PDT) Date: Thu, 31 Mar 2022 16:44:52 +0100 From: Andre Przywara To: Rui Miguel Silva Cc: Liviu Dudau , Sudeep Holla , Lorenzo Pieralisi , Rob Herring , Krzysztof Kozlowski , linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org Subject: Re: [PATCH v3 1/3] dt-bindings: net: smsc,lan91c111 convert to schema Message-ID: <20220331164452.094a9308@donnerap.cambridge.arm.com> In-Reply-To: <20220330131053.1122502-2-rui.silva@linaro.org> References: <20220330131053.1122502-1-rui.silva@linaro.org> <20220330131053.1122502-2-rui.silva@linaro.org> Organization: ARM X-Mailer: Claws Mail 3.18.0 (GTK+ 2.24.32; aarch64-unknown-linux-gnu) MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220331_084504_277770_ED71EB28 X-CRM114-Status: GOOD ( 23.26 ) 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 Wed, 30 Mar 2022 14:10:51 +0100 Rui Miguel Silva wrote: Hi, > Convert the smsc lan91c9x and lan91c1xx controller device tree > bindings documentation to json-schema. > > Signed-off-by: Rui Miguel Silva > --- > .../bindings/net/smsc,lan91c111.yaml | 61 +++++++++++++++++++ > .../bindings/net/smsc-lan91c111.txt | 17 ------ > 2 files changed, 61 insertions(+), 17 deletions(-) > create mode 100644 Documentation/devicetree/bindings/net/smsc,lan91c111.yaml > delete mode 100644 Documentation/devicetree/bindings/net/smsc-lan91c111.txt > > diff --git a/Documentation/devicetree/bindings/net/smsc,lan91c111.yaml b/Documentation/devicetree/bindings/net/smsc,lan91c111.yaml > new file mode 100644 > index 000000000000..1730284430bc > --- /dev/null > +++ b/Documentation/devicetree/bindings/net/smsc,lan91c111.yaml > @@ -0,0 +1,61 @@ > +# SPDX-License-Identifier: GPL-2.0 > +%YAML 1.2 > +--- > +$id: http://devicetree.org/schemas/net/smsc,lan91c111.yaml# > +$schema: http://devicetree.org/meta-schemas/core.yaml# > + > +title: Smart Mixed-Signal Connectivity (SMSC) LAN91C9x/91C1xx Controller > + > +maintainers: > + - Nicolas Pitre > + > +allOf: > + - $ref: ethernet-controller.yaml# > + > +properties: > + compatible: > + const: smsc,lan91c111 > + > + reg: > + maxItems: 1 > + > + interrupts: > + maxItems: 1 > + > + reg-shift: true > + > + reg-io-width: > + enum: [ 1, 2, 4 ] The old binding spoke of a possible mask, so you could have "6" here to signify that your hardware can do both 16 and 32-bit accesses, IIUC. And from quickly glancing through the Linux driver it seems to support this idea as well. So shall this be: minimum: 1 maximum: 7 instead? > + default: 4 The old binding said: "If it's omitted or invalid, the size would be 2 meaning 16-bit access only". That's also what the Linux driver implements. So this shall be: "default: 2" then? > + > + reset-gpios: > + description: GPIO connected to control RESET pin > + maxItems: 1 > + > + power-gpios: > + description: GPIO connect to control PWRDEWN pin connected Rest looks fine to me, and passes dt_binding_check. Cheers, Andre > + maxItems: 1 > + > + pxa-u16-align4: > + description: put in place the workaround the force all u16 writes to be > + 32 bits aligned > + type: boolean > + > +required: > + - compatible > + - reg > + - interrupts > + > +unevaluatedProperties: false > + > +examples: > + - | > + #include > + > + ethernet@4010000 { > + compatible = "smsc,lan91c111"; > + reg = <0x40100000 0x10000>; > + phy-mode = "mii"; > + interrupts = ; > + reg-io-width = <2>; > + }; > diff --git a/Documentation/devicetree/bindings/net/smsc-lan91c111.txt b/Documentation/devicetree/bindings/net/smsc-lan91c111.txt > deleted file mode 100644 > index 309e37eb7c7c..000000000000 > --- a/Documentation/devicetree/bindings/net/smsc-lan91c111.txt > +++ /dev/null > @@ -1,17 +0,0 @@ > -SMSC LAN91c111 Ethernet mac > - > -Required properties: > -- compatible = "smsc,lan91c111"; > -- reg : physical address and size of registers > -- interrupts : interrupt connection > - > -Optional properties: > -- phy-device : see ethernet.txt file in the same directory > -- reg-io-width : Mask of sizes (in bytes) of the IO accesses that > - are supported on the device. Valid value for SMSC LAN91c111 are > - 1, 2 or 4. If it's omitted or invalid, the size would be 2 meaning > - 16-bit access only. > -- power-gpios: GPIO to control the PWRDWN pin > -- reset-gpios: GPIO to control the RESET pin > -- pxa-u16-align4 : Boolean, put in place the workaround the force all > - u16 writes to be 32 bits aligned _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel