Re: [PATCH v5 10/14] dt-bindings: PCI: Add CIX Sky1 PCIe Root Complex bindings
From: Krzysztof Kozlowski
Date: Wed Jul 02 2025 - 16:28:46 EST
On 30/06/2025 17:54, Hans Zhang wrote:
>
>
> On 2025/6/30 15:26, Krzysztof Kozlowski wrote:
>>> + sky1,pcie-ctrl-id:
>>> + description: |
>>> + Specifies the PCIe controller instance identifier (0-4).
>> No, you don't get an instance ID. Drop the property and look how other
>> bindings encoded it (not sure about the purpose and you did not explain
>> it, so cannot advise).
>
>
> Dear Krzysztof,
>
> Sorry, I missed your reply to this in the previous email.
>
> Because our Root Port driver needs to support 5 PCIe ports, and the
> register configuration and offset of each port are different, it is
> necessary to know which port it is currently. Perhaps I can use the
> following method and then delete this attribute.
>
> aliases {
> ......
> pcie_rc0 = &pcie_x8_rc;
> pcie_rc1 = &pcie_x4_rc;
> pcie_rc2 = &pcie_x2_rc;
> pcie_rc3 = &pcie_x1_0_rc;
> pcie_rc4 = &pcie_x1_1_rc;
>
> id = of_alias_get_id(dev->of_node, "pcie_rc");
I think Rob commented pretty strongly about aliases in this thread... or
was it other one? Maybe it was about Tesla FSD PCI PHY... huh, same pattern.
So no, you do not get your own aliases.
Explain the differences in the hardware. If the hardware is different,
then it warrants different compatibles or other properties. But you need
to explain these differences. What is there? Different number of lanes?
Different phy? We have properties for that, use these. Different speed?
All of them have their own properties already, so use them. Maybe
something else... Do the homework and look at schemas and dtschema (yes,
I know that I said other poor solutions are not excuse to copy them, but
look for good solutions).
Best regards,
Krzysztof