Message ID | 20231127-refclk_always_on-v3-1-26d969fa8f1d@quicinc.com (mailing list archive) |
---|---|
State | Not Applicable |
Headers | show |
Series | phy: qcom-qmp-pcie: Add support to keep refclk always on | expand |
On 27/11/2023 13:13, Krishna chaitanya chundru wrote: > Document qcom,refclk-always-on property which is needed in some platforms > to supply refclk even in PCIe low power states. > > Signed-off-by: Krishna chaitanya chundru <quic_krichai@quicinc.com> > --- > .../devicetree/bindings/phy/qcom,sc8280xp-qmp-pcie-phy.yaml | 7 +++++++ > 1 file changed, 7 insertions(+) > > diff --git a/Documentation/devicetree/bindings/phy/qcom,sc8280xp-qmp-pcie-phy.yaml b/Documentation/devicetree/bindings/phy/qcom,sc8280xp-qmp-pcie-phy.yaml > index 2c3d6553a7ba..c747c9f35795 100644 > --- a/Documentation/devicetree/bindings/phy/qcom,sc8280xp-qmp-pcie-phy.yaml > +++ b/Documentation/devicetree/bindings/phy/qcom,sc8280xp-qmp-pcie-phy.yaml > @@ -93,6 +93,13 @@ properties: > "#phy-cells": > const: 0 > > + qcom,refclk-always-on: > + type: boolean > + description: In some platform where PCIe switch is connected, pcie switch due to some design You received a comment to use proper wrapping: 80. Please implement it. > + limitation fails to propage clkreq signal to the host and due to that host will not send > + refclk, which results in linkdown in L1.2 or L1.1 exit initiated by EP. > + This property if set keeps refclk always on even in Low power states. The property name suggests that's the state of hardware - refclk is always on. Description suggests you want to instruct OS to do something. Again, third time (once from Bjorn, once from Dmitry), rephrase property name and description to describe the hardware issue. I see description improved, but not the property name. Again in the end of description you say what Linux should do. Bindings do not describe Linux OS. Best regards, Krzysztof
On 11/28/2023 2:26 PM, Krzysztof Kozlowski wrote: > On 27/11/2023 13:13, Krishna chaitanya chundru wrote: >> Document qcom,refclk-always-on property which is needed in some platforms >> to supply refclk even in PCIe low power states. >> >> Signed-off-by: Krishna chaitanya chundru <quic_krichai@quicinc.com> >> --- >> .../devicetree/bindings/phy/qcom,sc8280xp-qmp-pcie-phy.yaml | 7 +++++++ >> 1 file changed, 7 insertions(+) >> >> diff --git a/Documentation/devicetree/bindings/phy/qcom,sc8280xp-qmp-pcie-phy.yaml b/Documentation/devicetree/bindings/phy/qcom,sc8280xp-qmp-pcie-phy.yaml >> index 2c3d6553a7ba..c747c9f35795 100644 >> --- a/Documentation/devicetree/bindings/phy/qcom,sc8280xp-qmp-pcie-phy.yaml >> +++ b/Documentation/devicetree/bindings/phy/qcom,sc8280xp-qmp-pcie-phy.yaml >> @@ -93,6 +93,13 @@ properties: >> "#phy-cells": >> const: 0 >> >> + qcom,refclk-always-on: >> + type: boolean >> + description: In some platform where PCIe switch is connected, pcie switch due to some design > You received a comment to use proper wrapping: 80. Please implement it. I will update this. >> + limitation fails to propage clkreq signal to the host and due to that host will not send >> + refclk, which results in linkdown in L1.2 or L1.1 exit initiated by EP. >> + This property if set keeps refclk always on even in Low power states. > The property name suggests that's the state of hardware - refclk is > always on. Description suggests you want to instruct OS to do something. > > Again, third time (once from Bjorn, once from Dmitry), rephrase property > name and description to describe the hardware issue. I see description > improved, but not the property name. Again in the end of description you Both bjorn and Dmitry gave comments to change the description only, and not the property name, correct if I am wrong. > say what Linux should do. Bindings do not describe Linux OS. I will remove the last line in the next patch. - Krishna Chaitanya. > > Best regards, > Krzysztof
On Tue, Nov 28, 2023 at 02:49:18PM +0530, Krishna Chaitanya Chundru wrote: > > On 11/28/2023 2:26 PM, Krzysztof Kozlowski wrote: > > On 27/11/2023 13:13, Krishna chaitanya chundru wrote: > > > Document qcom,refclk-always-on property which is needed in some platforms > > > to supply refclk even in PCIe low power states. > > > > > > Signed-off-by: Krishna chaitanya chundru <quic_krichai@quicinc.com> > > > --- > > > .../devicetree/bindings/phy/qcom,sc8280xp-qmp-pcie-phy.yaml | 7 +++++++ > > > 1 file changed, 7 insertions(+) > > > > > > diff --git a/Documentation/devicetree/bindings/phy/qcom,sc8280xp-qmp-pcie-phy.yaml b/Documentation/devicetree/bindings/phy/qcom,sc8280xp-qmp-pcie-phy.yaml > > > index 2c3d6553a7ba..c747c9f35795 100644 > > > --- a/Documentation/devicetree/bindings/phy/qcom,sc8280xp-qmp-pcie-phy.yaml > > > +++ b/Documentation/devicetree/bindings/phy/qcom,sc8280xp-qmp-pcie-phy.yaml > > > @@ -93,6 +93,13 @@ properties: > > > "#phy-cells": > > > const: 0 > > > + qcom,refclk-always-on: > > > + type: boolean > > > + description: In some platform where PCIe switch is connected, pcie switch due to some design > > You received a comment to use proper wrapping: 80. Please implement it. > I will update this. > > > + limitation fails to propage clkreq signal to the host and due to that host will not send > > > + refclk, which results in linkdown in L1.2 or L1.1 exit initiated by EP. > > > + This property if set keeps refclk always on even in Low power states. > > The property name suggests that's the state of hardware - refclk is > > always on. Description suggests you want to instruct OS to do something. > > > > Again, third time (once from Bjorn, once from Dmitry), rephrase property > > name and description to describe the hardware issue. I see description > > improved, but not the property name. Again in the end of description you > > Both bjorn and Dmitry gave comments to change the description only, and not > the property name, > > correct if I am wrong. > > > say what Linux should do. Bindings do not describe Linux OS. > > I will remove the last line in the next patch. > You should name the property as, "qcom,keep-refclk-always-on" Also, no need to stuff the binding with "why this property is required", that info should be part of the patch description. Just describe what this property means in binding. - Mani > - Krishna Chaitanya. > > > > > Best regards, > > Krzysztof >
On 01/12/2023 07:07, Manivannan Sadhasivam wrote: > On Tue, Nov 28, 2023 at 02:49:18PM +0530, Krishna Chaitanya Chundru wrote: >> >> On 11/28/2023 2:26 PM, Krzysztof Kozlowski wrote: >>> On 27/11/2023 13:13, Krishna chaitanya chundru wrote: >>>> Document qcom,refclk-always-on property which is needed in some platforms >>>> to supply refclk even in PCIe low power states. >>>> >>>> Signed-off-by: Krishna chaitanya chundru <quic_krichai@quicinc.com> >>>> --- >>>> .../devicetree/bindings/phy/qcom,sc8280xp-qmp-pcie-phy.yaml | 7 +++++++ >>>> 1 file changed, 7 insertions(+) >>>> >>>> diff --git a/Documentation/devicetree/bindings/phy/qcom,sc8280xp-qmp-pcie-phy.yaml b/Documentation/devicetree/bindings/phy/qcom,sc8280xp-qmp-pcie-phy.yaml >>>> index 2c3d6553a7ba..c747c9f35795 100644 >>>> --- a/Documentation/devicetree/bindings/phy/qcom,sc8280xp-qmp-pcie-phy.yaml >>>> +++ b/Documentation/devicetree/bindings/phy/qcom,sc8280xp-qmp-pcie-phy.yaml >>>> @@ -93,6 +93,13 @@ properties: >>>> "#phy-cells": >>>> const: 0 >>>> + qcom,refclk-always-on: >>>> + type: boolean >>>> + description: In some platform where PCIe switch is connected, pcie switch due to some design >>> You received a comment to use proper wrapping: 80. Please implement it. >> I will update this. >>>> + limitation fails to propage clkreq signal to the host and due to that host will not send >>>> + refclk, which results in linkdown in L1.2 or L1.1 exit initiated by EP. >>>> + This property if set keeps refclk always on even in Low power states. >>> The property name suggests that's the state of hardware - refclk is >>> always on. Description suggests you want to instruct OS to do something. >>> >>> Again, third time (once from Bjorn, once from Dmitry), rephrase property >>> name and description to describe the hardware issue. I see description >>> improved, but not the property name. Again in the end of description you >> >> Both bjorn and Dmitry gave comments to change the description only, and not >> the property name, >> >> correct if I am wrong. >> >>> say what Linux should do. Bindings do not describe Linux OS. >> >> I will remove the last line in the next patch. >> > > You should name the property as, "qcom,keep-refclk-always-on" Keep the clock by who? By driver? Then not, property should describe physical phenomena or hardware issue being fixed here, not what driver should do. Best regards, Krzysztof
On Fri, Dec 01, 2023 at 09:01:43AM +0100, Krzysztof Kozlowski wrote: > On 01/12/2023 07:07, Manivannan Sadhasivam wrote: > > On Tue, Nov 28, 2023 at 02:49:18PM +0530, Krishna Chaitanya Chundru wrote: > >> > >> On 11/28/2023 2:26 PM, Krzysztof Kozlowski wrote: > >>> On 27/11/2023 13:13, Krishna chaitanya chundru wrote: > >>>> Document qcom,refclk-always-on property which is needed in some platforms > >>>> to supply refclk even in PCIe low power states. > >>>> > >>>> Signed-off-by: Krishna chaitanya chundru <quic_krichai@quicinc.com> > >>>> --- > >>>> .../devicetree/bindings/phy/qcom,sc8280xp-qmp-pcie-phy.yaml | 7 +++++++ > >>>> 1 file changed, 7 insertions(+) > >>>> > >>>> diff --git a/Documentation/devicetree/bindings/phy/qcom,sc8280xp-qmp-pcie-phy.yaml b/Documentation/devicetree/bindings/phy/qcom,sc8280xp-qmp-pcie-phy.yaml > >>>> index 2c3d6553a7ba..c747c9f35795 100644 > >>>> --- a/Documentation/devicetree/bindings/phy/qcom,sc8280xp-qmp-pcie-phy.yaml > >>>> +++ b/Documentation/devicetree/bindings/phy/qcom,sc8280xp-qmp-pcie-phy.yaml > >>>> @@ -93,6 +93,13 @@ properties: > >>>> "#phy-cells": > >>>> const: 0 > >>>> + qcom,refclk-always-on: > >>>> + type: boolean > >>>> + description: In some platform where PCIe switch is connected, pcie switch due to some design > >>> You received a comment to use proper wrapping: 80. Please implement it. > >> I will update this. > >>>> + limitation fails to propage clkreq signal to the host and due to that host will not send > >>>> + refclk, which results in linkdown in L1.2 or L1.1 exit initiated by EP. > >>>> + This property if set keeps refclk always on even in Low power states. > >>> The property name suggests that's the state of hardware - refclk is > >>> always on. Description suggests you want to instruct OS to do something. > >>> > >>> Again, third time (once from Bjorn, once from Dmitry), rephrase property > >>> name and description to describe the hardware issue. I see description > >>> improved, but not the property name. Again in the end of description you > >> > >> Both bjorn and Dmitry gave comments to change the description only, and not > >> the property name, > >> > >> correct if I am wrong. > >> > >>> say what Linux should do. Bindings do not describe Linux OS. > >> > >> I will remove the last line in the next patch. > >> > > > > You should name the property as, "qcom,keep-refclk-always-on" > > Keep the clock by who? By driver? Then not, property should describe > physical phenomena or hardware issue being fixed here, not what driver > should do. > This property indeed fixes the hardware issue (though in board level) and I see a plenty of properties similar to this one instructing the OS to keep some resource ON to workaround hardware issues. So they are all wrong? - Mani > > Best regards, > Krzysztof >
On 01/12/2023 12:10, Manivannan Sadhasivam wrote: > On Fri, Dec 01, 2023 at 09:01:43AM +0100, Krzysztof Kozlowski wrote: >> On 01/12/2023 07:07, Manivannan Sadhasivam wrote: >>> On Tue, Nov 28, 2023 at 02:49:18PM +0530, Krishna Chaitanya Chundru wrote: >>>> >>>> On 11/28/2023 2:26 PM, Krzysztof Kozlowski wrote: >>>>> On 27/11/2023 13:13, Krishna chaitanya chundru wrote: >>>>>> Document qcom,refclk-always-on property which is needed in some platforms >>>>>> to supply refclk even in PCIe low power states. >>>>>> >>>>>> Signed-off-by: Krishna chaitanya chundru <quic_krichai@quicinc.com> >>>>>> --- >>>>>> .../devicetree/bindings/phy/qcom,sc8280xp-qmp-pcie-phy.yaml | 7 +++++++ >>>>>> 1 file changed, 7 insertions(+) >>>>>> >>>>>> diff --git a/Documentation/devicetree/bindings/phy/qcom,sc8280xp-qmp-pcie-phy.yaml b/Documentation/devicetree/bindings/phy/qcom,sc8280xp-qmp-pcie-phy.yaml >>>>>> index 2c3d6553a7ba..c747c9f35795 100644 >>>>>> --- a/Documentation/devicetree/bindings/phy/qcom,sc8280xp-qmp-pcie-phy.yaml >>>>>> +++ b/Documentation/devicetree/bindings/phy/qcom,sc8280xp-qmp-pcie-phy.yaml >>>>>> @@ -93,6 +93,13 @@ properties: >>>>>> "#phy-cells": >>>>>> const: 0 >>>>>> + qcom,refclk-always-on: >>>>>> + type: boolean >>>>>> + description: In some platform where PCIe switch is connected, pcie switch due to some design >>>>> You received a comment to use proper wrapping: 80. Please implement it. >>>> I will update this. >>>>>> + limitation fails to propage clkreq signal to the host and due to that host will not send >>>>>> + refclk, which results in linkdown in L1.2 or L1.1 exit initiated by EP. >>>>>> + This property if set keeps refclk always on even in Low power states. >>>>> The property name suggests that's the state of hardware - refclk is >>>>> always on. Description suggests you want to instruct OS to do something. >>>>> >>>>> Again, third time (once from Bjorn, once from Dmitry), rephrase property >>>>> name and description to describe the hardware issue. I see description >>>>> improved, but not the property name. Again in the end of description you >>>> >>>> Both bjorn and Dmitry gave comments to change the description only, and not >>>> the property name, >>>> >>>> correct if I am wrong. >>>> >>>>> say what Linux should do. Bindings do not describe Linux OS. >>>> >>>> I will remove the last line in the next patch. >>>> >>> >>> You should name the property as, "qcom,keep-refclk-always-on" >> >> Keep the clock by who? By driver? Then not, property should describe >> physical phenomena or hardware issue being fixed here, not what driver >> should do. >> > > This property indeed fixes the hardware issue (though in board level) and I see > a plenty of properties similar to this one instructing the OS to keep some > resource ON to workaround hardware issues. So they are all wrong? What I said before: "Again, third time (once from Bjorn, once from Dmitry), rephrase property name and description to describe the hardware issue. I see description improved, but not the property name. Again in the end of description you say what Linux should do. Bindings do not describe Linux OS." Best regards, Krzysztof
On Fri, Dec 01, 2023 at 01:10:48PM +0100, Krzysztof Kozlowski wrote: > On 01/12/2023 12:10, Manivannan Sadhasivam wrote: > > On Fri, Dec 01, 2023 at 09:01:43AM +0100, Krzysztof Kozlowski wrote: > >> On 01/12/2023 07:07, Manivannan Sadhasivam wrote: > >>> On Tue, Nov 28, 2023 at 02:49:18PM +0530, Krishna Chaitanya Chundru wrote: > >>>> > >>>> On 11/28/2023 2:26 PM, Krzysztof Kozlowski wrote: > >>>>> On 27/11/2023 13:13, Krishna chaitanya chundru wrote: > >>>>>> Document qcom,refclk-always-on property which is needed in some platforms > >>>>>> to supply refclk even in PCIe low power states. > >>>>>> > >>>>>> Signed-off-by: Krishna chaitanya chundru <quic_krichai@quicinc.com> > >>>>>> --- > >>>>>> .../devicetree/bindings/phy/qcom,sc8280xp-qmp-pcie-phy.yaml | 7 +++++++ > >>>>>> 1 file changed, 7 insertions(+) > >>>>>> > >>>>>> diff --git a/Documentation/devicetree/bindings/phy/qcom,sc8280xp-qmp-pcie-phy.yaml b/Documentation/devicetree/bindings/phy/qcom,sc8280xp-qmp-pcie-phy.yaml > >>>>>> index 2c3d6553a7ba..c747c9f35795 100644 > >>>>>> --- a/Documentation/devicetree/bindings/phy/qcom,sc8280xp-qmp-pcie-phy.yaml > >>>>>> +++ b/Documentation/devicetree/bindings/phy/qcom,sc8280xp-qmp-pcie-phy.yaml > >>>>>> @@ -93,6 +93,13 @@ properties: > >>>>>> "#phy-cells": > >>>>>> const: 0 > >>>>>> + qcom,refclk-always-on: > >>>>>> + type: boolean > >>>>>> + description: In some platform where PCIe switch is connected, pcie switch due to some design > >>>>> You received a comment to use proper wrapping: 80. Please implement it. > >>>> I will update this. > >>>>>> + limitation fails to propage clkreq signal to the host and due to that host will not send > >>>>>> + refclk, which results in linkdown in L1.2 or L1.1 exit initiated by EP. > >>>>>> + This property if set keeps refclk always on even in Low power states. > >>>>> The property name suggests that's the state of hardware - refclk is > >>>>> always on. Description suggests you want to instruct OS to do something. > >>>>> > >>>>> Again, third time (once from Bjorn, once from Dmitry), rephrase property > >>>>> name and description to describe the hardware issue. I see description > >>>>> improved, but not the property name. Again in the end of description you > >>>> > >>>> Both bjorn and Dmitry gave comments to change the description only, and not > >>>> the property name, > >>>> > >>>> correct if I am wrong. > >>>> > >>>>> say what Linux should do. Bindings do not describe Linux OS. > >>>> > >>>> I will remove the last line in the next patch. > >>>> > >>> > >>> You should name the property as, "qcom,keep-refclk-always-on" > >> > >> Keep the clock by who? By driver? Then not, property should describe > >> physical phenomena or hardware issue being fixed here, not what driver > >> should do. > >> > > > > This property indeed fixes the hardware issue (though in board level) and I see > > a plenty of properties similar to this one instructing the OS to keep some > > resource ON to workaround hardware issues. So they are all wrong? > > What I said before: > "Again, third time (once from Bjorn, once from Dmitry), rephrase > property name and description to describe the hardware issue. I see > description improved, but not the property name. Again in the end of > description you say what Linux should do. Bindings do not describe Linux > OS." > You didn't answer my question: "I see a plenty of properties similar to this one instructing the OS to keep some resource ON to workaround hardware issues. So they are all wrong?" If you say they are wrong, why are they approved in the first place? - Mani > > Best regards, > Krzysztof >
On 01/12/2023 13:30, Manivannan Sadhasivam wrote: >> What I said before: >> "Again, third time (once from Bjorn, once from Dmitry), rephrase >> property name and description to describe the hardware issue. I see >> description improved, but not the property name. Again in the end of >> description you say what Linux should do. Bindings do not describe Linux >> OS." >> > > You didn't answer my question: > > "I see a plenty of properties similar to this one instructing the OS to keep some > resource ON to workaround hardware issues. So they are all wrong?" They are not the best, but it all depends on the individual case. > > If you say they are wrong, why are they approved in the first place? Because we don't have time to keep digging what the driver is doing and what is claimed in DT. Some people don't even CC us on the driver. Best regards, Krzysztof
On 1.12.2023 14:25, Krzysztof Kozlowski wrote: > On 01/12/2023 13:30, Manivannan Sadhasivam wrote: >>> What I said before: >>> "Again, third time (once from Bjorn, once from Dmitry), rephrase >>> property name and description to describe the hardware issue. I see >>> description improved, but not the property name. Again in the end of >>> description you say what Linux should do. Bindings do not describe Linux >>> OS." >>> >> >> You didn't answer my question: >> >> "I see a plenty of properties similar to this one instructing the OS to keep some >> resource ON to workaround hardware issues. So they are all wrong?" > > They are not the best, but it all depends on the individual case. > >> >> If you say they are wrong, why are they approved in the first place? > Because we don't have time to keep digging what the driver is doing and > what is claimed in DT. Some people don't even CC us on the driver. Not sure if I asked this before, but can this not be set in the config struct inside the driver? Konrad
On Fri, Dec 01, 2023 at 10:29:11PM +0100, Konrad Dybcio wrote: > On 1.12.2023 14:25, Krzysztof Kozlowski wrote: > > On 01/12/2023 13:30, Manivannan Sadhasivam wrote: > >>> What I said before: > >>> "Again, third time (once from Bjorn, once from Dmitry), rephrase > >>> property name and description to describe the hardware issue. I see > >>> description improved, but not the property name. Again in the end of > >>> description you say what Linux should do. Bindings do not describe Linux > >>> OS." > >>> > >> > >> You didn't answer my question: > >> > >> "I see a plenty of properties similar to this one instructing the OS to keep some > >> resource ON to workaround hardware issues. So they are all wrong?" > > > > They are not the best, but it all depends on the individual case. > > > >> > >> If you say they are wrong, why are they approved in the first place? > > Because we don't have time to keep digging what the driver is doing and > > what is claimed in DT. Some people don't even CC us on the driver. > Not sure if I asked this before, but can this not be set in the config > struct inside the driver? > This cannot be the default config for any platform as keeping refclk always on will have some power penalty. Only if the hardware (EP or board design) has any issue, we can turn on this option. - Mani > Konrad
On Fri, Dec 01, 2023 at 02:25:44PM +0100, Krzysztof Kozlowski wrote: > On 01/12/2023 13:30, Manivannan Sadhasivam wrote: > >> What I said before: > >> "Again, third time (once from Bjorn, once from Dmitry), rephrase > >> property name and description to describe the hardware issue. I see > >> description improved, but not the property name. Again in the end of > >> description you say what Linux should do. Bindings do not describe Linux > >> OS." > >> > > > > You didn't answer my question: > > > > "I see a plenty of properties similar to this one instructing the OS to keep some > > resource ON to workaround hardware issues. So they are all wrong?" > > They are not the best, but it all depends on the individual case. > > > > > If you say they are wrong, why are they approved in the first place? > Because we don't have time to keep digging what the driver is doing and > what is claimed in DT. Some people don't even CC us on the driver. > OK. How about, "qcom,broken-refclk"? This reflects the fact that the default refclk operation is broken on this platform, so the OS should be prepared for it (by keeping it always on). - Mani > > Best regards, > Krzysztof >
On 06/12/2023 14:10, Manivannan Sadhasivam wrote: >>> >>> If you say they are wrong, why are they approved in the first place? >> Because we don't have time to keep digging what the driver is doing and >> what is claimed in DT. Some people don't even CC us on the driver. >> > > OK. How about, "qcom,broken-refclk"? This reflects the fact that the default > refclk operation is broken on this platform, so the OS should be prepared for > it (by keeping it always on). > Sounds very good to me. Best regards, Krzysztof
On Wed, Dec 06, 2023 at 06:40:09PM +0530, Manivannan Sadhasivam wrote: > OK. How about, "qcom,broken-refclk"? This reflects the fact that the default > refclk operation is broken on this platform, so the OS should be prepared for > it (by keeping it always on). Shouldn't that be qcom,broken-clkreq since its the CLKREQ# signal used to request REFCLK that is broken, not the REFCLK itself? Johan
On Thu, Dec 07, 2023 at 10:51:09AM +0100, Johan Hovold wrote: > On Wed, Dec 06, 2023 at 06:40:09PM +0530, Manivannan Sadhasivam wrote: > > > OK. How about, "qcom,broken-refclk"? This reflects the fact that the default > > refclk operation is broken on this platform, so the OS should be prepared for > > it (by keeping it always on). > > Shouldn't that be > > qcom,broken-clkreq > > since its the CLKREQ# signal used to request REFCLK that is broken, not > the REFCLK itself? > Darn... You are right. I got carried away by the initial property name. Thanks for spotting! - Mani > Johan
On 12/6/23 14:07, Manivannan Sadhasivam wrote: > On Fri, Dec 01, 2023 at 10:29:11PM +0100, Konrad Dybcio wrote: >> On 1.12.2023 14:25, Krzysztof Kozlowski wrote: >>> On 01/12/2023 13:30, Manivannan Sadhasivam wrote: >>>>> What I said before: >>>>> "Again, third time (once from Bjorn, once from Dmitry), rephrase >>>>> property name and description to describe the hardware issue. I see >>>>> description improved, but not the property name. Again in the end of >>>>> description you say what Linux should do. Bindings do not describe Linux >>>>> OS." >>>>> >>>> >>>> You didn't answer my question: >>>> >>>> "I see a plenty of properties similar to this one instructing the OS to keep some >>>> resource ON to workaround hardware issues. So they are all wrong?" >>> >>> They are not the best, but it all depends on the individual case. >>> >>>> >>>> If you say they are wrong, why are they approved in the first place? >>> Because we don't have time to keep digging what the driver is doing and >>> what is claimed in DT. Some people don't even CC us on the driver. >> Not sure if I asked this before, but can this not be set in the config >> struct inside the driver? >> > > This cannot be the default config for any platform as keeping refclk always on > will have some power penalty. Only if the hardware (EP or board design) has any > issue, we can turn on this option. So, if I'm reading this right, this concerns some but not all 8280 boards? Konrad
On Thu, Dec 07, 2023 at 03:42:52PM +0530, Manivannan Sadhasivam wrote: > On Thu, Dec 07, 2023 at 10:51:09AM +0100, Johan Hovold wrote: > > On Wed, Dec 06, 2023 at 06:40:09PM +0530, Manivannan Sadhasivam wrote: > > > > > OK. How about, "qcom,broken-refclk"? This reflects the fact that the default > > > refclk operation is broken on this platform, so the OS should be prepared for > > > it (by keeping it always on). > > > > Shouldn't that be > > > > qcom,broken-clkreq > > > > since its the CLKREQ# signal used to request REFCLK that is broken, not > > the REFCLK itself? > > > > Darn... You are right. I got carried away by the initial property name. Thanks > for spotting! Thinking some more on this after hitting send: It may still be wrong with a 'broken-clkreq' property in the PHY instead of in the controller (or endpoint). Could there not be other ways to handle a broken clkreq signal so that this really should be a decision made by the OS, for example, to disable L1 substates and clock PM? Simply leaving the refclk always on in the PHY seems like a bit of a hack and I'm not even sure that can be considered correct. Having a property that maps directly to that behaviour has rightly been rejected, but it seems that simply renaming the flag but keeping it in the PHY may still not be the right thing to do here. Johan
On Thu, Dec 07, 2023 at 02:05:12PM +0100, Johan Hovold wrote: > On Thu, Dec 07, 2023 at 03:42:52PM +0530, Manivannan Sadhasivam wrote: > > On Thu, Dec 07, 2023 at 10:51:09AM +0100, Johan Hovold wrote: > > > On Wed, Dec 06, 2023 at 06:40:09PM +0530, Manivannan Sadhasivam wrote: > > > > > > > OK. How about, "qcom,broken-refclk"? This reflects the fact that the default > > > > refclk operation is broken on this platform, so the OS should be prepared for > > > > it (by keeping it always on). > > > > > > Shouldn't that be > > > > > > qcom,broken-clkreq > > > > > > since its the CLKREQ# signal used to request REFCLK that is broken, not > > > the REFCLK itself? > > > > > > > Darn... You are right. I got carried away by the initial property name. Thanks > > for spotting! > > Thinking some more on this after hitting send: It may still be wrong > with a 'broken-clkreq' property in the PHY instead of in the controller > (or endpoint). > > Could there not be other ways to handle a broken clkreq signal so that > this really should be a decision made by the OS, for example, to disable > L1 substates and clock PM? > One has to weigh the power consumption between keeping refclk always on and disabling L1SS. Chaitanya, can you measure power consumption in both cases? > Simply leaving the refclk always on in the PHY seems like a bit of a > hack and I'm not even sure that can be considered correct. > I wouldn't agree it is a hack, even though it may sound like one. The option to keep refclk always on in the PHY is precisely there for usecase like this. - Mani > Having a property that maps directly to that behaviour has rightly been > rejected, but it seems that simply renaming the flag but keeping it in > the PHY may still not be the right thing to do here. > > Johan
On Thu, Dec 07, 2023 at 06:50:32PM +0530, Manivannan Sadhasivam wrote: > On Thu, Dec 07, 2023 at 02:05:12PM +0100, Johan Hovold wrote: > > On Thu, Dec 07, 2023 at 03:42:52PM +0530, Manivannan Sadhasivam wrote: > > > On Thu, Dec 07, 2023 at 10:51:09AM +0100, Johan Hovold wrote: > > > > Shouldn't that be > > > > > > > > qcom,broken-clkreq > > > > > > > > since its the CLKREQ# signal used to request REFCLK that is broken, not > > > > the REFCLK itself? > > > > > > > > > > Darn... You are right. I got carried away by the initial property name. Thanks > > > for spotting! > > > > Thinking some more on this after hitting send: It may still be wrong > > with a 'broken-clkreq' property in the PHY instead of in the controller > > (or endpoint). > > > > Could there not be other ways to handle a broken clkreq signal so that > > this really should be a decision made by the OS, for example, to disable > > L1 substates and clock PM? > > One has to weigh the power consumption between keeping refclk always on and > disabling L1SS. Chaitanya, can you measure power consumption in both cases? Sure, my point was just that that's a policy decision and not something that should be encoded in the devicetree (as was initially proposed). And that the right place for the renamed property is not necessarily in the PHY node either. > > Simply leaving the refclk always on in the PHY seems like a bit of a > > hack and I'm not even sure that can be considered correct. > > I wouldn't agree it is a hack, even though it may sound like one. The option to > keep refclk always on in the PHY is precisely there for usecase like this. I just skimmed the spec so perhaps I'm missing something, but there's definitely wordings in there that explicitly says that L1 PM substates must not be enabling unless you have a functioning CLKREQ# signal. Johan
On Thu, Dec 07, 2023 at 02:36:49PM +0100, Johan Hovold wrote: > On Thu, Dec 07, 2023 at 06:50:32PM +0530, Manivannan Sadhasivam wrote: > > On Thu, Dec 07, 2023 at 02:05:12PM +0100, Johan Hovold wrote: > > > On Thu, Dec 07, 2023 at 03:42:52PM +0530, Manivannan Sadhasivam wrote: > > > > On Thu, Dec 07, 2023 at 10:51:09AM +0100, Johan Hovold wrote: > > > > > > Shouldn't that be > > > > > > > > > > qcom,broken-clkreq > > > > > > > > > > since its the CLKREQ# signal used to request REFCLK that is broken, not > > > > > the REFCLK itself? > > > > > > > > > > > > > Darn... You are right. I got carried away by the initial property name. Thanks > > > > for spotting! > > > > > > Thinking some more on this after hitting send: It may still be wrong > > > with a 'broken-clkreq' property in the PHY instead of in the controller > > > (or endpoint). > > > > > > Could there not be other ways to handle a broken clkreq signal so that > > > this really should be a decision made by the OS, for example, to disable > > > L1 substates and clock PM? > > > > One has to weigh the power consumption between keeping refclk always on and > > disabling L1SS. Chaitanya, can you measure power consumption in both cases? > > Sure, my point was just that that's a policy decision and not something > that should be encoded in the devicetree (as was initially proposed). > > And that the right place for the renamed property is not necessarily in > the PHY node either. > > > > Simply leaving the refclk always on in the PHY seems like a bit of a > > > hack and I'm not even sure that can be considered correct. > > > > I wouldn't agree it is a hack, even though it may sound like one. The option to > > keep refclk always on in the PHY is precisely there for usecase like this. > > I just skimmed the spec so perhaps I'm missing something, but there's > definitely wordings in there that explicitly says that L1 PM substates > must not be enabling unless you have a functioning CLKREQ# signal. > I checked 'PCI Express Base spec 4.0', and there is a wording in 'Section 5.5 L1 PM Substates': For L1 PM ... each port must have a unique instance of the signal (CLKREQ#) and the upstream and downstream port CLKREQ# signals must be connected. So yes, we should not enable L1 PM substates in this case. And also it appears to me that the property should be part of the controller node, since CLKREQ# is handled by the controller instance. - Mani > Johan
diff --git a/Documentation/devicetree/bindings/phy/qcom,sc8280xp-qmp-pcie-phy.yaml b/Documentation/devicetree/bindings/phy/qcom,sc8280xp-qmp-pcie-phy.yaml index 2c3d6553a7ba..c747c9f35795 100644 --- a/Documentation/devicetree/bindings/phy/qcom,sc8280xp-qmp-pcie-phy.yaml +++ b/Documentation/devicetree/bindings/phy/qcom,sc8280xp-qmp-pcie-phy.yaml @@ -93,6 +93,13 @@ properties: "#phy-cells": const: 0 + qcom,refclk-always-on: + type: boolean + description: In some platform where PCIe switch is connected, pcie switch due to some design + limitation fails to propage clkreq signal to the host and due to that host will not send + refclk, which results in linkdown in L1.2 or L1.1 exit initiated by EP. + This property if set keeps refclk always on even in Low power states. + required: - compatible - reg
Document qcom,refclk-always-on property which is needed in some platforms to supply refclk even in PCIe low power states. Signed-off-by: Krishna chaitanya chundru <quic_krichai@quicinc.com> --- .../devicetree/bindings/phy/qcom,sc8280xp-qmp-pcie-phy.yaml | 7 +++++++ 1 file changed, 7 insertions(+)