[PATCH v3 1/5] dt-bindings: pci: Add Sophgo SG2042 PCIe host

Chen Wang unicorn_wang at outlook.com
Mon Feb 17 00:40:16 PST 2025


Hello, Bjorn, what do you think of my input?

Regards,

Chen

On 2025/2/12 13:54, Chen Wang wrote:
>
> On 2025/2/12 12:25, Bjorn Helgaas wrote:
> [......]
>>> pcie_rc1 and pcie_rc2 share registers in cdns_pcie1_ctrl. By using
>>> different "sophgo,core-id" values, they can distinguish and access
>>> the registers they need in cdns_pcie1_ctrl.
>> Where does cdns_pcie1_ctrl fit in this example?  Does that enclose
>> both pcie_rc1 and pcie_rc2?
>
> cdns_pcie1_ctrl is defined as a syscon node,  which contains registers 
> shared by pcie_rc1 and pcie_rc2. In the binding yaml file, I drew a 
> diagram to describe the relationship between them, copy here for your 
> quick reference:
>
> +                     +-- Core (Link0) <---> pcie_rc1 +-----------------+
> +                     | |                 |
> +      Cadence IP 2 --+                                | 
> cdns_pcie1_ctrl |
> +                     | |                 |
> +                     +-- Core (Link1) <---> pcie_rc2 +-----------------+
>
> The following is an example with cdns_pcie1_ctrl added. For 
> simplicity, I deleted pcie_rc0.
>
> pcie_rc1: pcie at 7062000000 {
>     compatible = "sophgo,sg2042-pcie-host";
>     ...... // host bride level properties
>     linux,pci-domain = <1>;
>     sophgo,core-id = <0>;
>     sophgo,syscon-pcie-ctrl = <&cdns_pcie1_ctrl>;
>     port {
>         // port level properties
>         vendor-id = <0x1f1c>;
>         device-id = <0x2042>;
>         num-lanes = <2>;
>     };
> };
>
> pcie_rc2: pcie at 7062800000 {
>     compatible = "sophgo,sg2042-pcie-host";
>     ...... // host bride level properties
>     linux,pci-domain = <2>;
>     sophgo,core-id = <1>;
>     sophgo,syscon-pcie-ctrl = <&cdns_pcie1_ctrl>;
>     port {
>         // port level properties
>         vendor-id = <0x1f1c>;
>         device-id = <0x2042>;
>         num-lanes = <2>;
>     }
>
> };
>
> cdns_pcie1_ctrl: syscon at 7063800000 {
>     compatible = "sophgo,sg2042-pcie-ctrl", "syscon";
>     reg = <0x70 0x63800000 0x0 0x800000>;
> };
>
>
> _______________________________________________
> linux-riscv mailing list
> linux-riscv at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-riscv



More information about the linux-riscv mailing list