From: Bhupesh Sharma <bhupesh.sharma@linaro.org>
To: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>,
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 <andersson@kernel.org>,
Rob Herring <robh@kernel.org>, Vinod Koul <vkoul@kernel.org>,
David Miller <davem@davemloft.net>
Subject: Re: [PATCH 1/4] dt-bindings: net: qcom,ethqos: Convert bindings to yaml
Date: Thu, 29 Sep 2022 11:52:08 +0530 [thread overview]
Message-ID: <0b6db6ce-a74c-66d0-dc05-b87b96b386a2@linaro.org> (raw)
In-Reply-To: <1a683d12-eee9-e35b-3808-4856fe4dc0f2@linaro.org>
On 9/13/22 2:20 PM, Krzysztof Kozlowski wrote:
> On 12/09/2022 19:28, Bhupesh Sharma wrote:
>> Hi Krzysztof,
>>
>> Thanks for your comments.
>>
>> On 9/8/22 8:08 PM, Krzysztof Kozlowski wrote:
>>> On 07/09/2022 22:49, Bhupesh Sharma wrote:
>>>> Convert Qualcomm ETHQOS Ethernet devicetree binding to YAML.
>>>>
>>>> Cc: Bjorn Andersson <andersson@kernel.org>
>>>> Cc: Rob Herring <robh@kernel.org>
>>>> Cc: Vinod Koul <vkoul@kernel.org>
>>>> Cc: David Miller <davem@davemloft.net>
>>>> Signed-off-by: Bhupesh Sharma <bhupesh.sharma@linaro.org>
>>>
>>> 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.
>>
>> Sure, my bad. Will do in v2.
>>
>>>> 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 = <GIC_SPI 56 IRQ_TYPE_LEVEL_HIGH>,
>>>> - <GIC_SPI 55 IRQ_TYPE_LEVEL_HIGH>;
>>>> - 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 <bhupesh.sharma@linaro.org>
>>>> +
>>>> +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.
>>
>> Ok.
>>
>>>> +
>>>> +properties:
>>>> + compatible:
>>>> + enum:
>>>> + - qcom,qcs404-ethqos
>>>> + - qcom,sm8150-ethqos
>>>> +
>>>> + reg: true
>>>
>>> I think both devices use two reg spaces.
>>
>> On this platform the two reg spaces are 64-bit, whereas for other
>> platforms based on dwmmac, for e.g. stm32 have 32-bit address space.
>
> Then for this platform this should be made specific/constrained, so it
> must be two items.
>
>>
>>>> +
>>>> + reg-names:
>>>> + minItems: 1
>>>
>>> Why allowing only one item?
>>
>> Ok, let me remove this in v2.
>
> And then as well you allow only one item... This should be specific. If
> not - why?
>
>>
>>>> + items:
>>>> + - const: stmmaceth
>>>> + - const: rgmii
>>>> +
>>>> + interrupts: true
>>>
>>> This should be specific/fixed.
>>>
>>>> +
>>>> + interrupt-names: true
>>>
>>> This should be specific/fixed.
>>
>> These are same as in $ref: "snps,dwmac.yaml#", so
>> do we really need to specify them here? I remember on the sdhci-msm
>> YAML patch review, Rob mentioned that we should just set the property to
>> true, in such cases.
>
> But it is not specific in dwmac.yaml. You use "xxx: true" when you want
> to accept property from other schema, assuming it is defined there
> properly. However the snps,dwmac does not define it in specific way
> because it expects specific implementation to narrow the details.
>
>>
>> Am I missing something here?
>>
>>>> +
>>>> + clocks:
>>>> + minItems: 1
>>>> + maxItems: 4
>>>
>>> Why such flexibility?
>>
>> Ok, let me just keep 'maxItems: 4' here for now.
>>
>>>> +
>>>> + 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?
>>
>> It was just for future compatibility, but I get your point.
>> Let me keep the 'maxItems: 1' here for now.
>>
>>>> +
>>>> + 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".
>>
>> Same query as above. May be I am missing something here.
>
> You do not list any properties:true from other schema, if you use
> unevaluatedProperties:false.
Ok, let me try and fix these in the v2. I will share the same soon.
Thanks,
Bhupesh
next prev parent reply other threads:[~2022-09-29 6:22 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-07 20:49 [PATCH 0/4] dt-bindings: net: Convert qcom,ethqos bindings to YAML (and related fixes) Bhupesh Sharma
2022-09-07 20:49 ` [PATCH 1/4] dt-bindings: net: qcom,ethqos: Convert bindings to yaml Bhupesh Sharma
2022-09-08 12:35 ` Rob Herring
2022-09-08 14:38 ` Krzysztof Kozlowski
2022-09-12 17:28 ` Bhupesh Sharma
2022-09-13 8:50 ` Krzysztof Kozlowski
2022-09-29 6:22 ` Bhupesh Sharma [this message]
2022-09-07 20:49 ` [PATCH 2/4] dt-bindings: net: snps,dwmac: Add Qualcomm Ethernet ETHQOS compatibles Bhupesh Sharma
2022-09-08 14:39 ` Krzysztof Kozlowski
2022-09-12 18:37 ` Bhupesh Sharma
2022-09-07 20:49 ` [PATCH 3/4] dt-bindings: net: snps,dwmac: Update reg maxitems Bhupesh Sharma
2022-09-08 14:41 ` Krzysztof Kozlowski
2022-09-12 18:53 ` Bhupesh Sharma
2022-09-12 21:14 ` Rob Herring
2022-09-29 6:21 ` Bhupesh Sharma
2022-09-07 20:49 ` [PATCH 4/4] dt-bindings: net: snps,dwmac: Update interrupt-names Bhupesh Sharma
2022-09-08 14:43 ` Krzysztof Kozlowski
2022-09-12 18:39 ` Bhupesh Sharma
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=0b6db6ce-a74c-66d0-dc05-b87b96b386a2@linaro.org \
--to=bhupesh.sharma@linaro.org \
--cc=agross@kernel.org \
--cc=andersson@kernel.org \
--cc=bhupesh.linux@gmail.com \
--cc=davem@davemloft.net \
--cc=devicetree@vger.kernel.org \
--cc=krzysztof.kozlowski@linaro.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=robh+dt@kernel.org \
--cc=robh@kernel.org \
--cc=vkoul@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).