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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0D13CC54EE9 for ; Thu, 8 Sep 2022 14:38:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232042AbiIHOiq (ORCPT ); Thu, 8 Sep 2022 10:38:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57404 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232076AbiIHOio (ORCPT ); Thu, 8 Sep 2022 10:38:44 -0400 Received: from mail-lj1-x22f.google.com (mail-lj1-x22f.google.com [IPv6:2a00:1450:4864:20::22f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2259946633 for ; Thu, 8 Sep 2022 07:38:40 -0700 (PDT) Received: by mail-lj1-x22f.google.com with SMTP id y18so5405347ljh.12 for ; Thu, 08 Sep 2022 07:38:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date; bh=zhDS9KW7sHnj2SLt+jmcaCzMtxvUOZtFt25clbGHtkY=; b=fUundy2rLCNtVjL2ivpaZrq0KS9s4lvGmQUzywYHHgCLaXfAPbOHWd9FVCy2ktr25d odNznrQiMl8TqKL03Fa4DGvcJXprQk22h+zOpAMReZ0CTjpWkTQxrIfSFkfRvx9LHvgP lKcZw4uhVvG3YLYYRJfAT2ht2AKcH9WAKomYAHYX0hECQE+xJ4VrM8G7MtvjqLoZIBYG oxxnBDhXODk1bd6XBj2UHYvwSq4GkepYvwtofh6/9gzYS/k4+9yRwmdk8QDu99mL9tmi 4gYUJOcy8Wm5wb0nHfgh18Nua4r38r6ngIr0XdXRyCBsVih38CyhNh3nsJlIGwbMcCVJ ZmfA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date; bh=zhDS9KW7sHnj2SLt+jmcaCzMtxvUOZtFt25clbGHtkY=; b=UEKeu9lkftv5KSzOTlu7u4GfAfoCADL0y9WoRt37bUJwSSlvY5pMc3DhvXR8ASD4yC Eu521AziOaowHeYzeym38okPsZrBUyaRmRstCInxGFHvq43PPkHEXP7MC9KR+bEUH9Qb L2Al3EKesAfD9OJDmI+ruVoWntLmxIFqpWwhEmC4OOBmTP3Pk+aEGeD7UXzrGVzv9pL/ B+NZ535iKraNmRhIj2HbhQPWsqpkmYtVbjcf98gGTjIjL2nKpPVAEmz+xBXtiU4M193e cXRtXXShwtb4QIOoHlmef26T83zdUr0NlKS9yPQX6P2M2iEz0swJI6GbUVUy/ofsdRdk 4HdA== X-Gm-Message-State: ACgBeo3pBvNm44EK97QB0Y61N+RPHeu+LZCuhoKO7X8xPH58/dQ5xS6I MH5CP8P/jofSqMWmB/geiQ3auQ== X-Google-Smtp-Source: AA6agR5vzAdc+cJBeuLjAIRqX7VvNEKr+wlj1jiYaG17K2Q5ux+bjEGvv33Sp1ddDP7w0YhErAgaOA== X-Received: by 2002:a2e:a549:0:b0:25f:e5b8:a826 with SMTP id e9-20020a2ea549000000b0025fe5b8a826mr2714575ljn.207.1662647917912; Thu, 08 Sep 2022 07:38:37 -0700 (PDT) Received: from [192.168.0.21] (78-11-189-27.static.ip.netia.com.pl. [78.11.189.27]) by smtp.gmail.com with ESMTPSA id m9-20020a056512358900b004979df1c1fasm1582163lfr.61.2022.09.08.07.38.36 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 08 Sep 2022 07:38:37 -0700 (PDT) Message-ID: Date: Thu, 8 Sep 2022 16:38:36 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.13.0 Subject: Re: [PATCH 1/4] dt-bindings: net: qcom,ethqos: Convert bindings to yaml Content-Language: en-US To: Bhupesh Sharma , devicetree@vger.kernel.org Cc: linux-arm-msm@vger.kernel.org, agross@kernel.org, bhupesh.linux@gmail.com, linux-kernel@vger.kernel.org, robh+dt@kernel.org, netdev@vger.kernel.org, Bjorn Andersson , Rob Herring , Vinod Koul , David Miller References: <20220907204924.2040384-1-bhupesh.sharma@linaro.org> <20220907204924.2040384-2-bhupesh.sharma@linaro.org> From: Krzysztof Kozlowski In-Reply-To: <20220907204924.2040384-2-bhupesh.sharma@linaro.org> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org On 07/09/2022 22:49, Bhupesh Sharma wrote: > Convert Qualcomm ETHQOS Ethernet devicetree binding to YAML. > > Cc: Bjorn Andersson > Cc: Rob Herring > Cc: Vinod Koul > Cc: David Miller > Signed-off-by: Bhupesh Sharma Thank you for your patch. There is something to discuss/improve. > --- > .../devicetree/bindings/net/qcom,ethqos.txt | 66 --------- > .../devicetree/bindings/net/qcom,ethqos.yaml | 139 ++++++++++++++++++ You need to update maintainers - old path. > 2 files changed, 139 insertions(+), 66 deletions(-) > delete mode 100644 Documentation/devicetree/bindings/net/qcom,ethqos.txt > create mode 100644 Documentation/devicetree/bindings/net/qcom,ethqos.yaml > > diff --git a/Documentation/devicetree/bindings/net/qcom,ethqos.txt b/Documentation/devicetree/bindings/net/qcom,ethqos.txt > deleted file mode 100644 > index 1f5746849a71..000000000000 > --- a/Documentation/devicetree/bindings/net/qcom,ethqos.txt > +++ /dev/null > @@ -1,66 +0,0 @@ > -Qualcomm Ethernet ETHQOS device > - > -This documents dwmmac based ethernet device which supports Gigabit > -ethernet for version v2.3.0 onwards. > - > -This device has following properties: > - > -Required properties: > - > -- compatible: Should be one of: > - "qcom,qcs404-ethqos" > - "qcom,sm8150-ethqos" > - > -- reg: Address and length of the register set for the device > - > -- reg-names: Should contain register names "stmmaceth", "rgmii" > - > -- clocks: Should contain phandle to clocks > - > -- clock-names: Should contain clock names "stmmaceth", "pclk", > - "ptp_ref", "rgmii" > - > -- interrupts: Should contain phandle to interrupts > - > -- interrupt-names: Should contain interrupt names "macirq", "eth_lpi" > - > -Rest of the properties are defined in stmmac.txt file in same directory > - > - > -Example: > - > -ethernet: ethernet@7a80000 { > - compatible = "qcom,qcs404-ethqos"; > - reg = <0x07a80000 0x10000>, > - <0x07a96000 0x100>; > - reg-names = "stmmaceth", "rgmii"; > - clock-names = "stmmaceth", "pclk", "ptp_ref", "rgmii"; > - clocks = <&gcc GCC_ETH_AXI_CLK>, > - <&gcc GCC_ETH_SLAVE_AHB_CLK>, > - <&gcc GCC_ETH_PTP_CLK>, > - <&gcc GCC_ETH_RGMII_CLK>; > - interrupts = , > - ; > - interrupt-names = "macirq", "eth_lpi"; > - snps,reset-gpio = <&tlmm 60 GPIO_ACTIVE_LOW>; > - snps,reset-active-low; > - > - snps,txpbl = <8>; > - snps,rxpbl = <2>; > - snps,aal; > - snps,tso; > - > - phy-handle = <&phy1>; > - phy-mode = "rgmii"; > - > - mdio { > - #address-cells = <0x1>; > - #size-cells = <0x0>; > - compatible = "snps,dwmac-mdio"; > - phy1: phy@4 { > - device_type = "ethernet-phy"; > - reg = <0x4>; > - }; > - }; > - > -}; > diff --git a/Documentation/devicetree/bindings/net/qcom,ethqos.yaml b/Documentation/devicetree/bindings/net/qcom,ethqos.yaml > new file mode 100644 > index 000000000000..f05df9b0d106 > --- /dev/null > +++ b/Documentation/devicetree/bindings/net/qcom,ethqos.yaml > @@ -0,0 +1,139 @@ > +# SPDX-License-Identifier: GPL-2.0 OR BSD-2-Clause > +%YAML 1.2 > +--- > +$id: http://devicetree.org/schemas/net/qcom,ethqos.yaml# > +$schema: http://devicetree.org/meta-schemas/core.yaml# > + > +title: Qualcomm Ethernet ETHQOS device > + > +maintainers: > + - Bhupesh Sharma > + > +description: > + This binding describes the dwmmac based Qualcomm ethernet devices which > + support Gigabit ethernet (version v2.3.0 onwards). > + > + So, this file documents platform glue layer for dwmmac stmmac based Qualcomm > + ethernet devices. > + > +allOf: > + - $ref: "snps,dwmac.yaml#" No need for quotes. > + > +properties: > + compatible: > + enum: > + - qcom,qcs404-ethqos > + - qcom,sm8150-ethqos > + > + reg: true I think both devices use two reg spaces. > + > + reg-names: > + minItems: 1 Why allowing only one item? > + items: > + - const: stmmaceth > + - const: rgmii > + > + interrupts: true This should be specific/fixed. > + > + interrupt-names: true This should be specific/fixed. > + > + clocks: > + minItems: 1 > + maxItems: 4 Why such flexibility? > + > + clock-names: > + minItems: 1 > + items: > + - const: stmmaceth > + - const: pclk > + - const: ptp_ref > + - const: rgmii > + > + iommus: > + minItems: 1 > + maxItems: 2 Aren't we using only one MMU? > + > + mdio: true > + > + phy-handle: true > + > + phy-mode: true > + > + snps,reset-gpio: true > + > + snps,tso: > + $ref: /schemas/types.yaml#/definitions/flag > + description: > + Enables the TSO feature otherwise it will be managed by MAC HW capability register. > + > + power-domains: true > + > + resets: true > + > + rx-fifo-depth: true > + > + tx-fifo-depth: true You do not list all these properties, because you use unevaluatedProperties. Drop all of these "xxx :true". > + > +required: > + - compatible > + - clocks > + - clock-names Best regards, Krzysztof