Thread (16 messages) 16 messages, 3 authors, 2021-10-29

Re: [RESEND PATCH v2 5/7] dt-bindings: usb: Add Qualcomm PMIC TCPM YAML schema

From: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
Date: 2021-10-28 21:44:21
Also in: linux-arm-msm, linux-usb

On 28/10/2021 21:43, Rob Herring wrote:
I don't understand these ports. The graph binding should be showing data
stream connections. It should look something like a block diagram of the
h/w components.
Two different PHYs which live inside of the pm8150b USB 
typec/pdphy/charger block.

The typec phy and power-delivery phy are not adjacent to each other

typec@1500
charger@1600
pdphy@1700

The typec and pdphy pieces are being brought together into a standard 
Linux TCPM driver.

Rather than have a TCPM device that starts @1500 and spans over the 
charger I've opted to have "virtual" TCPM device that has links to 
typec@1500 and pdphy@1700 via remote-endpoints

That lets the end result dts look like this

pm8150b_tcpm: pmic-tcpm {
     compatible = "qcom,pmic-tcpm";

     status = "disabled";
     ports {

         #address-cells = <1>;
         #size-cells = <0>;

         port@0 {
             reg = <0>;
             pmic_tcpm_typec: endpoint {
                 remote-endpoint = <&pmic_typec>;
             };
         };
         port@1 {
             reg = <1>;
             pmic_tcpm_pdphy: endpoint {
                 remote-endpoint = <&pmic_pdphy>;
             };
         };
     };
};


pm8150b_typec: typec@1500 {
     compatible = "qcom,pm8150b-typec";
     reg = <0x1500>;
     ports {
         #address-cells = <1>;
         #size-cells = <0>;

         port@0 {
             reg = <0>;
             pmic_typec: endpoint {
                 remote-endpoint = <&pmic_tcpm_typec>;
             };
         };
     };
};

pm8150b_pdphy: pdphy@1700 {
     compatible = "qcom,pm8150b-pdphy";
     reg = <0x1700>;
     ports {
         #address-cells = <1>;
         #size-cells = <0>;

         port@0 {
             reg = <0>;
             pmic_pdphy: endpoint {
                 remote-endpoint = <&pmic_tcpm_pdphy>;
             };
         };
     };
};

at a later date we might want to add in the charger but, if we do we 
don't want that to be inside of a Linux TCPM device and I thought it 
would be a mess to have, since we try to keep addresses linear in DTS files


pm8150b_tcpm: pmic-tcpm@1500 {
     compatible = "qcom,pmic-tcpm";


     pm8150b_typec: typec@1500 {
         compatible = "qcom,pm8150b-typec";
         reg = <0x1500>;
         ports {
             #address-cells = <1>;
             #size-cells = <0>;

             port@0 {
                 reg = <0>;
                 pmic_typec: endpoint {
                     remote-endpoint = <&pmic_tcpm_typec>;
                 };
             };
         };
     };

     pm8150b_pdphy: pdphy@1700 {
         compatible = "qcom,pm8150b-pdphy";
         reg = <0x1700>;
         ports {
             #address-cells = <1>;
             #size-cells = <0>;

             port@0 {
                 reg = <0>;
                 pmic_pdphy: endpoint {
                     remote-endpoint = <&pmic_tcpm_pdphy>;
                 };
             };
         };
     };
};

pm8150b_charger: pmic-charger@1600 {
     /* Consume electrons here */
};

---
bod
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help