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 71D27C433F5 for ; Thu, 31 Mar 2022 20:12:59 +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=QQBSu/5r0ayGyUh/XsOQu84mfy1p8dnfTIZlTWr8Xq0=; b=WpLELTrV1Dtx+D FaMtx3ly+126MEGf8j5n9q6X6K3M1Up4OaWh5wmxggCMyjKeF3PtUKYrJoCoP8+B4i/xGqvAAbZXP HfmJ4cwVbtMNIOwAKO593a18Djzcrtsm3VGVacinbNTJG1IPGjRZVG62ysskH8Q5EFDh1YEkW8gqy uDpOEk2Yt90R9zIZ65UY5PCEJF6/Ewvb+oIBy6HMg8VDSHaV8/JGjTqXXiHpPOU2XNx/h8aXccrOb Qf1jJWnsn+nD7pAdrePwo853EfFqnj8O3swlXm/8Q4VsmCbgdHLDeJnBqvzyl1POJZ9bswWJrvfFf cf/Q6hcknCufewKSeWIA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1na197-003WjZ-Jx; Thu, 31 Mar 2022 20:11:53 +0000 Received: from mail-wr1-x429.google.com ([2a00:1450:4864:20::429]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1na194-003Wj0-Es for linux-arm-kernel@lists.infradead.org; Thu, 31 Mar 2022 20:11:52 +0000 Received: by mail-wr1-x429.google.com with SMTP id h23so1280028wrb.8 for ; Thu, 31 Mar 2022 13:11:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=jV2wOLp9BmusE6pAb/TmAA+lgOQxLqgNkv2OV7Oa6iQ=; b=fKLnujCYuNQ5MRXULPczqOHbF7auF7w9aemFefow0YsuKIoykN0fTbVTIaXjWDdcEn 95/GkQqjPK+H8keNjflM+foGbLlk0p8qI/1JrguJKJ+l3Nr50VrRdkf2qIWYozxQXDyj 544aPblGxXpOplGFUcIVDKYsUfp3DFBpdKyvbAfW6Aq3E7HD08roARpxZy+i4p2NuK7H VNvzR2u7ti/mC6ElPTU3Yuqha70Nc/uXcaMgBXo6MVNiMfTNRd1XltP+a5Xoqon2mXfP KDVbg4jX5FIafLWKVQ33AbbXwVh0vjUhbx2xy+YAbp6q6wkS6rZ33SNw50pOCbJLDJpk ORpw== 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=jV2wOLp9BmusE6pAb/TmAA+lgOQxLqgNkv2OV7Oa6iQ=; b=fehxr37R5sxmm8S2aR5gd7v9oWvVY9jR7aPjf73e2A9Ja3AyIXVPl0XQQy0yzNckN4 DPt7t0Nu1wGpwVxU3TP+1D2VEp62YUGe9H40Jl0crY9nIFc+1ZEn2eKPOCxR1tegeZwI JxCEznzxaKQwRgHmLGn10i2mH/MdSkUVqscLd5OXQ5Y25vWesfZCB8uq7WLSXz2ZFkWg 1U3h0AFdozw87eZTX2BEW8Z2/SbfKPX1nnmRNODdJEaTn7rmCfEACzlgcvNohszhTufZ zRo7T7J+CZ3uR9r60N9re6cgGcDAHUGyoKwcO49Y0oFO3VCHN/5W+N65/oHtAVZW5ue5 FGJw== X-Gm-Message-State: AOAM533vrJvHUcC2SGH+t2Yo05NfEkEEBNRtRtSSB3yygYwunmyo9hpS 39gcfSlD+N8vrJ6OtovrTyIeJQ== X-Google-Smtp-Source: ABdhPJzCQTWPmosE1Ibmtzhd4PWcVNWVcQHfVXpUwkfAMuOU4asDc8DATTR1UOwpNecd4lUm0LmDgQ== X-Received: by 2002:adf:f14e:0:b0:203:e049:6829 with SMTP id y14-20020adff14e000000b00203e0496829mr5056895wro.386.1648757508832; Thu, 31 Mar 2022 13:11:48 -0700 (PDT) Received: from arch-thunder (a109-49-33-111.cpe.netcabo.pt. [109.49.33.111]) by smtp.gmail.com with ESMTPSA id 2-20020a056000154200b00203ee1fd1desm325268wry.64.2022.03.31.13.11.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 31 Mar 2022 13:11:48 -0700 (PDT) Date: Thu, 31 Mar 2022 21:11:46 +0100 From: Rui Miguel Silva To: Andre Przywara 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: <20220331201146.5auaglrviyco24cr@arch-thunder> References: <20220330131053.1122502-1-rui.silva@linaro.org> <20220330131053.1122502-2-rui.silva@linaro.org> <20220331164452.094a9308@donnerap.cambridge.arm.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20220331164452.094a9308@donnerap.cambridge.arm.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220331_131150_540936_A73EC3FC X-CRM114-Status: GOOD ( 29.86 ) 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 Hi Andre, Thanks for your review. On Thu, Mar 31, 2022 at 04:44:52PM +0100, Andre Przywara wrote: > 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? I see your point, but going down that rabbit hole, in the smc91x.h which define the macros for register access, I see, IIUC: 1. 8 or 16 bit access are mandatory (means value 4 only for reg-io-width is not valid) 2. All 8 and 16 bit are exclusive, so I think value 3 and 7 here don't make sense either. So, possible values enum: [ 1, 2, 5, 6 ] let me know your thoughts on this Cheers, Rui > > > + 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