RE: [PATCH 1/2] dt-bindings: phy: realtek: Add Realtek DHC RTD SoC PCIe PHY

From: TY_Chang[張子逸]
Date: Thu Dec 07 2023 - 05:10:07 EST



Hi Conor,

Thank you for the review.

>> +properties:
>> + compatible:
>> + enum:
>
>> + - realtek,rtd1319-pcie0-phy
>> + - realtek,rtd1319-pcie1-phy
>> + - realtek,rtd1319-pcie2-phy
>> + - realtek,rtd1619b-pcie1-phy
>> + - realtek,rtd1619b-pcie2-phy
>
>Please explain why different PHYs on the same SoC need different compatibles.
>

I hadn't thought this clearly. I added the compatible for each PCIe ports. However,
only one compatible is needed for the PHY driver on each SoC.
I will revise it in the next version.

There are multiple ports for PCIe on different SoCs. RTD1319 has three PCIe ports (port 0, port1, port2).
RTD1619B has two PCIe ports. Both RTD1319D and RTD1315E have one PCIe port.

>> + - realtek,rtd1319d-pcie1-phy
>> + - realtek,rtd1315e-pcie1-phy
>
>And why bother with the 1 here given there is no 0 or 2?
>

I'm sorry for the confusion caused by the naming. The PCIe controller register address on
RTD1319D and RTD1315E is the same as RTD1319's PCIe port1, so I named it as pcie1.
I'll refrain from using such naming in the future.

>This looks suspiciously like abuse of the compatible - especially since most of
>the ops are the same despite the differing compatibles. The case where that
>does not apply, it looks like the issue is down to the portion of the nvmem cell
>corresponding to the PHY, which has nothing to do with the programming model
>of the PHY itself IMO.

Thanks,
Tzuyi Chang