From: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
To: Yang Xiwen <forbidden405@outlook.com>,
Vinod Koul <vkoul@kernel.org>,
Kishon Vijay Abraham I <kishon@kernel.org>,
Rob Herring <robh+dt@kernel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
Conor Dooley <conor+dt@kernel.org>,
Jiancheng Xue <xuejiancheng@hisilicon.com>,
Pengcheng Li <lpc.li@hisilicon.com>,
Shawn Guo <shawn.guo@linaro.org>
Cc: linux-phy@lists.infradead.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org,
Kishon Vijay Abraham I <kishon@ti.com>,
David Yang <mmyangfl@gmail.com>
Subject: Re: [PATCH RFC 1/4] dt-binding: phy: hisi-inno-usb2: convert to YAML
Date: Sat, 17 Feb 2024 14:40:08 +0100 [thread overview]
Message-ID: <ed97be2e-4a3d-4be6-9a57-5c77d5fffc9c@linaro.org> (raw)
In-Reply-To: <SEZPR06MB69596C83014B1A424F0B376996532@SEZPR06MB6959.apcprd06.prod.outlook.com>
On 17/02/2024 14:14, Yang Xiwen wrote:
> On 2/17/2024 6:14 PM, Krzysztof Kozlowski wrote:
>> On 16/02/2024 16:21, Yang Xiwen via B4 Relay wrote:
>>> From: Yang Xiwen <forbidden405@outlook.com>
>>>
>>> Also rename to hisilicon,inno-usb2-phy.yaml and add this name to
>>> compatible lists.
>> Please use subject prefixes matching the subsystem. You can get them for
>> example with `git log --oneline -- DIRECTORY_OR_FILE` on the directory
>> your patch is touching.
>>
>>> Signed-off-by: Yang Xiwen <forbidden405@outlook.com>
>>> ---
>>> .../bindings/phy/hisilicon,inno-usb2-phy.yaml | 115 +++++++++++++++++++++
>>> .../devicetree/bindings/phy/phy-hisi-inno-usb2.txt | 71 -------------
>>> 2 files changed, 115 insertions(+), 71 deletions(-)
>>>
>>> diff --git a/Documentation/devicetree/bindings/phy/hisilicon,inno-usb2-phy.yaml b/Documentation/devicetree/bindings/phy/hisilicon,inno-usb2-phy.yaml
>>> new file mode 100644
>>> index 000000000000..73256eee10f9
>>> --- /dev/null
>>> +++ b/Documentation/devicetree/bindings/phy/hisilicon,inno-usb2-phy.yaml
>>> @@ -0,0 +1,115 @@
>>> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
>>> +%YAML 1.2
>>> +---
>>> +$id: http://devicetree.org/schemas/phy/hisilicon,inno-usb2-phy.yaml#
>>> +$schema: http://devicetree.org/meta-schemas/core.yaml#
>>> +
>>> +title: HiSilicon HiSTB SoCs INNO USB2 PHY device
>>> +
>>> +maintainers:
>>> + - Yang Xiwen <forbidden405@outlook.com>
>>> +
>>> +properties:
>>> + compatible:
>>> + minItems: 1
>> No, why? Compatibles must be fixed/constrained.
> Hi3798CV200 has only the first compatible listed in its device tree. But
> you are right i can add it to hi3798mv200.dtsi so that `minItems` can be
> removed
>>
>>> + items:
>>> + - enum:
>>> + - hisilicon,hi3798cv200-usb2-phy
>>> + - hisilicon,hi3798mv100-usb2-phy
>> This wasn't here before. Not explained in commit msg.
>>
>>> + - const: hisilicon,inno-usb2-phy
>>> +
>>> + reg:
>>> + maxItems: 1
>>> + description: |
>> Do not need '|' unless you need to preserve formatting.
>>
>>> + Should be the address space for PHY configuration register in peripheral
>>> + controller, e.g. PERI_USB0 for USB 2.0 PHY01 on Hi3798CV200 SoC.
>>> + Or direct MMIO address space.
>>> +
>>> + '#address-cells':
>>> + const: 1
>>> +
>>> + '#size-cells':
>>> + const: 0
>>> +
>>> + clocks:
>>> + maxItems: 1
>>> + description: reference clock
>>> +
>>> + resets:
>>> + maxItems: 1
>>> +
>>> +patternProperties:
>>> + 'phy@[0-9a-f]+':
>>> + type: object
>>> + additionalProperties: false
>>> + description: individual ports provided by INNO PHY
>>> +
>>> + properties:
>>> + reg:
>>> + maxItems: 1
>>> +
>>> + '#phy-cells':
>>> + const: 0
>>> +
>>> + resets:
>>> + maxItems: 1
>>> +
>>> + required: [reg, '#phy-cells', resets]
>> One item per line. Look at other bindings or example-schema.
>>
>>> +
>>> +required:
>>> + - compatible
>>> + - clocks
>>> + - reg
>>> + - '#address-cells'
>>> + - '#size-cells'
>>> + - resets
>>> +
>>> +additionalProperties: false
>>> +
>>> +examples:
>>> + - |
>>> + #include <dt-bindings/clock/histb-clock.h>
>>> +
>>> + peripheral-controller@8a20000 {
>>> + compatible = "hisilicon,hi3798cv200-perictrl", "syscon", "simple-mfd";
>>> + reg = <0x8a20000 0x1000>;
>>> + #address-cells = <1>;
>>> + #size-cells = <1>;
>>> + ranges = <0x0 0x8a20000 0x1000>;
>> Drop the node, not related to this binding. If this binding is supposed
>> to be part of other device in case of MFD devices or some tightly
>> coupled ones, then could be included in the example there.
>>
>>> +
>>> + usb2-phy@120 {
>>> + compatible = "hisilicon,hi3798cv200-usb2-phy";
>>> + reg = <0x120 0x4>;
>>> + clocks = <&crg HISTB_USB2_PHY1_REF_CLK>;
>>> + resets = <&crg 0xbc 4>;
>>> + #address-cells = <1>;
>>> + #size-cells = <0>;
>>> +
>>> + phy@0 {
>>> + reg = <0>;
>>> + #phy-cells = <0>;
>>> + resets = <&crg 0xbc 8>;
>>> + };
>>> +
>>> + phy@1 {
>>> + reg = <1>;
>>> + #phy-cells = <0>;
>>> + resets = <&crg 0xbc 9>;
>>> + };
>>> + };
>>> +
>>> + usb2-phy@124 {
>>> + compatible = "hisilicon,hi3798cv200-usb2-phy";
>> You can keep only one example, because they are basically the same.
>
> It is listed here just because cv200 (and the upcoming mv200) actually
> has two INNO phys in the SoC. And coincidently for both SoCs, one with
> two ports is wired to USB2 controller(EHCI &OHCI), while the other one
> with only one port is wired to DWC3 controller. The example here is
> borrowed directly from hi3798cv200.dtsi.
>
I see the differences and one difference means they are basically the same.
Best regards,
Krzysztof
--
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy
next prev parent reply other threads:[~2024-02-17 13:40 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-16 15:21 [PATCH RFC 0/4] phy: hisi-inno-phy: add support for hi3798mv200-usb2-phy Yang Xiwen via B4 Relay
2024-02-16 15:21 ` [PATCH RFC 1/4] dt-binding: phy: hisi-inno-usb2: convert to YAML Yang Xiwen via B4 Relay
2024-02-17 10:14 ` Krzysztof Kozlowski
2024-02-17 10:24 ` Yang Xiwen
2024-02-17 10:29 ` Krzysztof Kozlowski
2024-02-17 10:54 ` Yang Xiwen
2024-02-17 13:39 ` Krzysztof Kozlowski
2024-02-17 13:46 ` Yang Xiwen
2024-02-17 13:14 ` Yang Xiwen
2024-02-17 13:40 ` Krzysztof Kozlowski [this message]
2024-02-16 15:21 ` [PATCH RFC 2/4] phy: hisilicon: enable clocks for every ports Yang Xiwen via B4 Relay
2024-02-16 15:21 ` [PATCH RFC 3/4] phy: hisi-inno-usb2: add support for direct MMIO Yang Xiwen via B4 Relay
2024-02-16 15:21 ` [PATCH RFC 4/4] dt-binding: phy: hisi-inno-usb2: add compatible of hisilicon,hi3798mv200-usb2-phy Yang Xiwen via B4 Relay
2024-02-17 10:16 ` Krzysztof Kozlowski
2024-02-17 10:18 ` [PATCH RFC 0/4] phy: hisi-inno-phy: add support for hi3798mv200-usb2-phy Krzysztof Kozlowski
2024-02-17 10:58 ` Yang Xiwen
2024-02-17 11:06 ` Yang Xiwen
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=ed97be2e-4a3d-4be6-9a57-5c77d5fffc9c@linaro.org \
--to=krzysztof.kozlowski@linaro.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=forbidden405@outlook.com \
--cc=kishon@kernel.org \
--cc=kishon@ti.com \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-phy@lists.infradead.org \
--cc=lpc.li@hisilicon.com \
--cc=mmyangfl@gmail.com \
--cc=robh+dt@kernel.org \
--cc=shawn.guo@linaro.org \
--cc=vkoul@kernel.org \
--cc=xuejiancheng@hisilicon.com \
/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