diff mbox series

[RFC,3/3] arm64: dts: qcom: sa8775p-ride: Enable support for firmware managed resources

Message ID 1709657858-8563-4-git-send-email-quic_sriramd@quicinc.com (mailing list archive)
State New
Headers show
Series Enable firmware-managed USB resources on Qcom targets | expand

Commit Message

Sriram Dash March 5, 2024, 4:57 p.m. UTC
Establish the channel and domain mapping for the power domains to connect
with firmware, enabling the firmware to handle the assigned resources.
Since these delegated resources will remain invisible to the operating
system, ensure that any references to them are removed.

Signed-off-by: Sriram Dash <quic_sriramd@quicinc.com>
---
 arch/arm64/boot/dts/qcom/sa8775p-ride.dts | 96 +++++++++++++++++++++++++------
 1 file changed, 77 insertions(+), 19 deletions(-)

Comments

Krzysztof Kozlowski March 5, 2024, 5:08 p.m. UTC | #1
On 05/03/2024 17:57, Sriram Dash wrote:
> Establish the channel and domain mapping for the power domains to connect
> with firmware, enabling the firmware to handle the assigned resources.
> Since these delegated resources will remain invisible to the operating
> system, ensure that any references to them are removed.
> 
> Signed-off-by: Sriram Dash <quic_sriramd@quicinc.com>
> ---
>  arch/arm64/boot/dts/qcom/sa8775p-ride.dts | 96 +++++++++++++++++++++++++------
>  1 file changed, 77 insertions(+), 19 deletions(-)

Do not mix DTS patches with submissions to netdev or USB.

Please put it inside your internal guides, so you will not be repeating
this over and over.

> 
> diff --git a/arch/arm64/boot/dts/qcom/sa8775p-ride.dts b/arch/arm64/boot/dts/qcom/sa8775p-ride.dts
> index 26ad05b..b6c9cac 100644
> --- a/arch/arm64/boot/dts/qcom/sa8775p-ride.dts
> +++ b/arch/arm64/boot/dts/qcom/sa8775p-ride.dts
> @@ -764,8 +764,18 @@
>  };
>  
>  &usb_0 {
> -	pinctrl-names = "default";
> -	pinctrl-0 = <&usb0_en_state>;
> +	/delete-property/ clocks;
> +	/delete-property/ clock-names;
> +	/delete-property/ assigned-clocks;
> +	/delete-property/ assigned-clock-rates;
> +	/delete-property/ required-opps;
> +	/delete-property/ resets;
> +	/delete-property/ interconnects;
> +	/delete-property/ interconnect-names;
> +
> +	power-domains = <TODO>, <TODO>;

This wasn't even tested.

Best regards,
Krzysztof
Sriram Dash March 5, 2024, 6:03 p.m. UTC | #2
On 3/5/2024 10:38 PM, Krzysztof Kozlowski wrote:
> On 05/03/2024 17:57, Sriram Dash wrote:
>> Establish the channel and domain mapping for the power domains to connect
>> with firmware, enabling the firmware to handle the assigned resources.
>> Since these delegated resources will remain invisible to the operating
>> system, ensure that any references to them are removed.
>>
>> Signed-off-by: Sriram Dash <quic_sriramd@quicinc.com>
>> ---
>>   arch/arm64/boot/dts/qcom/sa8775p-ride.dts | 96 +++++++++++++++++++++++++------
>>   1 file changed, 77 insertions(+), 19 deletions(-)
> 
> Do not mix DTS patches with submissions to netdev or USB.
> 
> Please put it inside your internal guides, so you will not be repeating
> this over and over.
> 

Sure. Will take care. Thanks.

>>
>> diff --git a/arch/arm64/boot/dts/qcom/sa8775p-ride.dts b/arch/arm64/boot/dts/qcom/sa8775p-ride.dts
>> index 26ad05b..b6c9cac 100644
>> --- a/arch/arm64/boot/dts/qcom/sa8775p-ride.dts
>> +++ b/arch/arm64/boot/dts/qcom/sa8775p-ride.dts
>> @@ -764,8 +764,18 @@
>>   };
>>   
>>   &usb_0 {
>> -	pinctrl-names = "default";
>> -	pinctrl-0 = <&usb0_en_state>;
>> +	/delete-property/ clocks;
>> +	/delete-property/ clock-names;
>> +	/delete-property/ assigned-clocks;
>> +	/delete-property/ assigned-clock-rates;
>> +	/delete-property/ required-opps;
>> +	/delete-property/ resets;
>> +	/delete-property/ interconnects;
>> +	/delete-property/ interconnect-names;
>> +
>> +	power-domains = <TODO>, <TODO>;
> 
> This wasn't even tested.
> 

This is tested with the specific power domains in place
of <TODO>. SCMI interface is used for the power domains.

> Best regards,
> Krzysztof
>
Sriram Dash March 5, 2024, 6:25 p.m. UTC | #3
On 3/5/2024 11:33 PM, Sriram Dash wrote:
> On 3/5/2024 10:38 PM, Krzysztof Kozlowski wrote:
>> On 05/03/2024 17:57, Sriram Dash wrote:
>>> Establish the channel and domain mapping for the power domains to 
>>> connect
>>> with firmware, enabling the firmware to handle the assigned resources.
>>> Since these delegated resources will remain invisible to the operating
>>> system, ensure that any references to them are removed.
>>>
>>> Signed-off-by: Sriram Dash <quic_sriramd@quicinc.com>
>>> ---
>>>   arch/arm64/boot/dts/qcom/sa8775p-ride.dts | 96 
>>> +++++++++++++++++++++++++------
>>>   1 file changed, 77 insertions(+), 19 deletions(-)
>>
>> Do not mix DTS patches with submissions to netdev or USB.
>>
>> Please put it inside your internal guides, so you will not be repeating
>> this over and over.
>>
> 
> Sure. Will take care. Thanks.
> 
>>>
>>> diff --git a/arch/arm64/boot/dts/qcom/sa8775p-ride.dts 
>>> b/arch/arm64/boot/dts/qcom/sa8775p-ride.dts
>>> index 26ad05b..b6c9cac 100644
>>> --- a/arch/arm64/boot/dts/qcom/sa8775p-ride.dts
>>> +++ b/arch/arm64/boot/dts/qcom/sa8775p-ride.dts
>>> @@ -764,8 +764,18 @@
>>>   };
>>>   &usb_0 {
>>> -    pinctrl-names = "default";
>>> -    pinctrl-0 = <&usb0_en_state>;
>>> +    /delete-property/ clocks;
>>> +    /delete-property/ clock-names;
>>> +    /delete-property/ assigned-clocks;
>>> +    /delete-property/ assigned-clock-rates;
>>> +    /delete-property/ required-opps;
>>> +    /delete-property/ resets;
>>> +    /delete-property/ interconnects;
>>> +    /delete-property/ interconnect-names;
>>> +
>>> +    power-domains = <TODO>, <TODO>;
>>
>> This wasn't even tested.
>>
> 
> This is tested with the specific power domains in place
> of <TODO>. SCMI interface is used for the power domains.
> 
>> Best regards,
>> Krzysztof
>>
Bjorn Andersson March 5, 2024, 6:47 p.m. UTC | #4
On Tue, Mar 05, 2024 at 11:33:54PM +0530, Sriram Dash wrote:
> On 3/5/2024 10:38 PM, Krzysztof Kozlowski wrote:
> > On 05/03/2024 17:57, Sriram Dash wrote:
> > > Establish the channel and domain mapping for the power domains to connect
> > > with firmware, enabling the firmware to handle the assigned resources.
> > > Since these delegated resources will remain invisible to the operating
> > > system, ensure that any references to them are removed.
> > > 
> > > Signed-off-by: Sriram Dash <quic_sriramd@quicinc.com>
> > > ---
> > >   arch/arm64/boot/dts/qcom/sa8775p-ride.dts | 96 +++++++++++++++++++++++++------
> > >   1 file changed, 77 insertions(+), 19 deletions(-)
> > 
> > Do not mix DTS patches with submissions to netdev or USB.
> > 
> > Please put it inside your internal guides, so you will not be repeating
> > this over and over.
> > 
> 
> Sure. Will take care. Thanks.
> 
> > > 
> > > diff --git a/arch/arm64/boot/dts/qcom/sa8775p-ride.dts b/arch/arm64/boot/dts/qcom/sa8775p-ride.dts
> > > index 26ad05b..b6c9cac 100644
> > > --- a/arch/arm64/boot/dts/qcom/sa8775p-ride.dts
> > > +++ b/arch/arm64/boot/dts/qcom/sa8775p-ride.dts
> > > @@ -764,8 +764,18 @@
> > >   };
> > >   &usb_0 {
> > > -	pinctrl-names = "default";
> > > -	pinctrl-0 = <&usb0_en_state>;
> > > +	/delete-property/ clocks;
> > > +	/delete-property/ clock-names;
> > > +	/delete-property/ assigned-clocks;
> > > +	/delete-property/ assigned-clock-rates;
> > > +	/delete-property/ required-opps;
> > > +	/delete-property/ resets;
> > > +	/delete-property/ interconnects;
> > > +	/delete-property/ interconnect-names;
> > > +
> > > +	power-domains = <TODO>, <TODO>;
> > 
> > This wasn't even tested.
> > 
> 
> This is tested with the specific power domains in place
> of <TODO>. SCMI interface is used for the power domains.
> 

So you tested this on v6.8-rcN, but you're not able to upstream this
dependency? The code wouldn't compile if this patch is applied, so what
do you expect that I should do with it?

Develop on upstream, test on upstream, send code that improves upstream!

Thank you,
Bjorn

> > Best regards,
> > Krzysztof
> >
Konrad Dybcio March 5, 2024, 9:07 p.m. UTC | #5
On 3/5/24 19:25, Sriram Dash wrote:
> On 3/5/2024 11:33 PM, Sriram Dash wrote:
>> On 3/5/2024 10:38 PM, Krzysztof Kozlowski wrote:
>>> On 05/03/2024 17:57, Sriram Dash wrote:
>>>> Establish the channel and domain mapping for the power domains to connect
>>>> with firmware, enabling the firmware to handle the assigned resources.
>>>> Since these delegated resources will remain invisible to the operating
>>>> system, ensure that any references to them are removed.
>>>>
>>>> Signed-off-by: Sriram Dash <quic_sriramd@quicinc.com>
>>>> ---
>>>>   arch/arm64/boot/dts/qcom/sa8775p-ride.dts | 96 +++++++++++++++++++++++++------
>>>>   1 file changed, 77 insertions(+), 19 deletions(-)
>>>
>>> Do not mix DTS patches with submissions to netdev or USB.
>>>
>>> Please put it inside your internal guides, so you will not be repeating
>>> this over and over.
>>>
>>
>> Sure. Will take care. Thanks.
>>
>>>>
>>>> diff --git a/arch/arm64/boot/dts/qcom/sa8775p-ride.dts b/arch/arm64/boot/dts/qcom/sa8775p-ride.dts
>>>> index 26ad05b..b6c9cac 100644
>>>> --- a/arch/arm64/boot/dts/qcom/sa8775p-ride.dts
>>>> +++ b/arch/arm64/boot/dts/qcom/sa8775p-ride.dts
>>>> @@ -764,8 +764,18 @@
>>>>   };
>>>>   &usb_0 {
>>>> -    pinctrl-names = "default";
>>>> -    pinctrl-0 = <&usb0_en_state>;
>>>> +    /delete-property/ clocks;
>>>> +    /delete-property/ clock-names;
>>>> +    /delete-property/ assigned-clocks;
>>>> +    /delete-property/ assigned-clock-rates;
>>>> +    /delete-property/ required-opps;
>>>> +    /delete-property/ resets;
>>>> +    /delete-property/ interconnects;
>>>> +    /delete-property/ interconnect-names;

This is totally unacceptable.. And especially makes no sense given
ride is likely the only sa8775 board in existence..

>>>> +
>>>> +    power-domains = <TODO>, <TODO>;
>>>
>>> This wasn't even tested.
>>>
>>
>> This is tested with the specific power domains in place
>> of <TODO>. SCMI interface is used for the power domains.

I'm sorry, but "break compilation successfully" is not a valid
test result..

Konrad
Sriram Dash March 6, 2024, 3:54 p.m. UTC | #6
On 3/6/2024 12:17 AM, Bjorn Andersson wrote:
> On Tue, Mar 05, 2024 at 11:33:54PM +0530, Sriram Dash wrote:
>> On 3/5/2024 10:38 PM, Krzysztof Kozlowski wrote:
>>> On 05/03/2024 17:57, Sriram Dash wrote:
>>>> Establish the channel and domain mapping for the power domains to connect
>>>> with firmware, enabling the firmware to handle the assigned resources.
>>>> Since these delegated resources will remain invisible to the operating
>>>> system, ensure that any references to them are removed.
>>>>
>>>> Signed-off-by: Sriram Dash <quic_sriramd@quicinc.com>
>>>> ---
>>>>    arch/arm64/boot/dts/qcom/sa8775p-ride.dts | 96 +++++++++++++++++++++++++------
>>>>    1 file changed, 77 insertions(+), 19 deletions(-)
>>>
>>> Do not mix DTS patches with submissions to netdev or USB.
>>>
>>> Please put it inside your internal guides, so you will not be repeating
>>> this over and over.
>>>
>>
>> Sure. Will take care. Thanks.
>>
>>>>
>>>> diff --git a/arch/arm64/boot/dts/qcom/sa8775p-ride.dts b/arch/arm64/boot/dts/qcom/sa8775p-ride.dts
>>>> index 26ad05b..b6c9cac 100644
>>>> --- a/arch/arm64/boot/dts/qcom/sa8775p-ride.dts
>>>> +++ b/arch/arm64/boot/dts/qcom/sa8775p-ride.dts
>>>> @@ -764,8 +764,18 @@
>>>>    };
>>>>    &usb_0 {
>>>> -	pinctrl-names = "default";
>>>> -	pinctrl-0 = <&usb0_en_state>;
>>>> +	/delete-property/ clocks;
>>>> +	/delete-property/ clock-names;
>>>> +	/delete-property/ assigned-clocks;
>>>> +	/delete-property/ assigned-clock-rates;
>>>> +	/delete-property/ required-opps;
>>>> +	/delete-property/ resets;
>>>> +	/delete-property/ interconnects;
>>>> +	/delete-property/ interconnect-names;
>>>> +
>>>> +	power-domains = <TODO>, <TODO>;
>>>
>>> This wasn't even tested.
>>>
>>
>> This is tested with the specific power domains in place
>> of <TODO>. SCMI interface is used for the power domains.
>>
> 
> So you tested this on v6.8-rcN, but you're not able to upstream this
> dependency? The code wouldn't compile if this patch is applied, so what
> do you expect that I should do with it?
> 
> Develop on upstream, test on upstream, send code that improves upstream!
> 

Thanks Bjorn.
Sure. I will wait for the scmi based dt support
for SA8775 and then update the patches on top.

> Thank you,
> Bjorn
> 
>>> Best regards,
>>> Krzysztof
>>>
Sriram Dash March 6, 2024, 4:03 p.m. UTC | #7
On 3/6/2024 2:37 AM, Konrad Dybcio wrote:
> 
> 
> On 3/5/24 19:25, Sriram Dash wrote:
>> On 3/5/2024 11:33 PM, Sriram Dash wrote:
>>> On 3/5/2024 10:38 PM, Krzysztof Kozlowski wrote:
>>>> On 05/03/2024 17:57, Sriram Dash wrote:
>>>>> Establish the channel and domain mapping for the power domains to 
>>>>> connect
>>>>> with firmware, enabling the firmware to handle the assigned resources.
>>>>> Since these delegated resources will remain invisible to the operating
>>>>> system, ensure that any references to them are removed.
>>>>>
>>>>> Signed-off-by: Sriram Dash <quic_sriramd@quicinc.com>
>>>>> ---
>>>>>   arch/arm64/boot/dts/qcom/sa8775p-ride.dts | 96 
>>>>> +++++++++++++++++++++++++------
>>>>>   1 file changed, 77 insertions(+), 19 deletions(-)
>>>>
>>>> Do not mix DTS patches with submissions to netdev or USB.
>>>>
>>>> Please put it inside your internal guides, so you will not be repeating
>>>> this over and over.
>>>>
>>>
>>> Sure. Will take care. Thanks.
>>>
>>>>>
>>>>> diff --git a/arch/arm64/boot/dts/qcom/sa8775p-ride.dts 
>>>>> b/arch/arm64/boot/dts/qcom/sa8775p-ride.dts
>>>>> index 26ad05b..b6c9cac 100644
>>>>> --- a/arch/arm64/boot/dts/qcom/sa8775p-ride.dts
>>>>> +++ b/arch/arm64/boot/dts/qcom/sa8775p-ride.dts
>>>>> @@ -764,8 +764,18 @@
>>>>>   };
>>>>>   &usb_0 {
>>>>> -    pinctrl-names = "default";
>>>>> -    pinctrl-0 = <&usb0_en_state>;
>>>>> +    /delete-property/ clocks;
>>>>> +    /delete-property/ clock-names;
>>>>> +    /delete-property/ assigned-clocks;
>>>>> +    /delete-property/ assigned-clock-rates;
>>>>> +    /delete-property/ required-opps;
>>>>> +    /delete-property/ resets;
>>>>> +    /delete-property/ interconnects;
>>>>> +    /delete-property/ interconnect-names;
> 
> This is totally unacceptable.. And especially makes no sense given
> ride is likely the only sa8775 board in existence..
> 

Sure Konrad.
Will update the patches on top of the scmi based dt
for sa8775.

>>>>> +
>>>>> +    power-domains = <TODO>, <TODO>;
>>>>
>>>> This wasn't even tested.
>>>>
>>>
>>> This is tested with the specific power domains in place
>>> of <TODO>. SCMI interface is used for the power domains.
> 
> I'm sorry, but "break compilation successfully" is not a valid
> test result..
> 
> Konrad
diff mbox series

Patch

diff --git a/arch/arm64/boot/dts/qcom/sa8775p-ride.dts b/arch/arm64/boot/dts/qcom/sa8775p-ride.dts
index 26ad05b..b6c9cac 100644
--- a/arch/arm64/boot/dts/qcom/sa8775p-ride.dts
+++ b/arch/arm64/boot/dts/qcom/sa8775p-ride.dts
@@ -764,8 +764,18 @@ 
 };
 
 &usb_0 {
-	pinctrl-names = "default";
-	pinctrl-0 = <&usb0_en_state>;
+	/delete-property/ clocks;
+	/delete-property/ clock-names;
+	/delete-property/ assigned-clocks;
+	/delete-property/ assigned-clock-rates;
+	/delete-property/ required-opps;
+	/delete-property/ resets;
+	/delete-property/ interconnects;
+	/delete-property/ interconnect-names;
+
+	power-domains = <TODO>, <TODO>;
+	power-domain-names = "usb_transfer", "usb_core";
+	qcom,fw-managed;
 
 	status = "okay";
 };
@@ -775,23 +785,45 @@ 
 };
 
 &usb_0_hsphy {
-	vdda-pll-supply = <&vreg_l7a>;
-	vdda18-supply = <&vreg_l6c>;
-	vdda33-supply = <&vreg_l9a>;
+	/delete-property/ clocks;
+	/delete-property/ clock-names;
+	/delete-property/ resets;
+
+	power-domains = <TODO>, <TODO>;
+	power-domain-names = "usb_transfer", "usb_core";
+	hsphy,fw-managed;
 
 	status = "okay";
 };
 
 &usb_0_qmpphy {
-	vdda-phy-supply = <&vreg_l1c>;
-	vdda-pll-supply = <&vreg_l7a>;
+	/delete-property/ clocks;
+	/delete-property/ clock-names;
+	/delete-property/ resets;
+	/delete-property/ reset-names;
+	/delete-property/ #clock-cells;
+	/delete-property/ clock-output-names;
+
+	power-domains = <TODO>, <TODO>;
+	power-domain-names = "usb_transfer", "usb_core";
+	qmp,fw-managed;
 
 	status = "okay";
 };
 
 &usb_1 {
-	pinctrl-names = "default";
-	pinctrl-0 = <&usb1_en_state>;
+	/delete-property/ clocks;
+	/delete-property/ clock-names;
+	/delete-property/ assigned-clocks;
+	/delete-property/ assigned-clock-rates;
+	/delete-property/ required-opps;
+	/delete-property/ resets;
+	/delete-property/ interconnects;
+	/delete-property/ interconnect-names;
+
+	power-domains = <TODO>, <TODO>;
+	power-domain-names = "usb_transfer", "usb_core";
+	qcom,fw-managed;
 
 	status = "okay";
 };
@@ -801,23 +833,45 @@ 
 };
 
 &usb_1_hsphy {
-	vdda-pll-supply = <&vreg_l7a>;
-	vdda18-supply = <&vreg_l6c>;
-	vdda33-supply = <&vreg_l9a>;
+	/delete-property/ clocks;
+	/delete-property/ clock-names;
+	/delete-property/ resets;
+
+	power-domains = <TODO>, <TODO>;
+	power-domain-names = "usb_transfer", "usb_core";
+	hsphy,fw-managed;
 
 	status = "okay";
 };
 
 &usb_1_qmpphy {
-	vdda-phy-supply = <&vreg_l1c>;
-	vdda-pll-supply = <&vreg_l7a>;
+	/delete-property/ clocks;
+	/delete-property/ clock-names;
+	/delete-property/ resets;
+	/delete-property/ reset-names;
+	/delete-property/ #clock-cells;
+	/delete-property/ clock-output-names;
+
+	power-domains = <TODO>, <TODO>;
+	power-domain-names = "usb_transfer", "usb_core";
+	qmp,fw-managed;
 
 	status = "okay";
 };
 
 &usb_2 {
-	pinctrl-names = "default";
-	pinctrl-0 = <&usb2_en_state>;
+	/delete-property/ clocks;
+	/delete-property/ clock-names;
+	/delete-property/ assigned-clocks;
+	/delete-property/ assigned-clock-rates;
+	/delete-property/ required-opps;
+	/delete-property/ resets;
+	/delete-property/ interconnects;
+	/delete-property/ interconnect-names;
+
+	power-domains = <TODO>, <TODO>;
+	power-domain-names = "usb_transfer", "usb_core";
+	qcom,fw-managed;
 
 	status = "okay";
 };
@@ -827,9 +881,13 @@ 
 };
 
 &usb_2_hsphy {
-	vdda-pll-supply = <&vreg_l7a>;
-	vdda18-supply = <&vreg_l6c>;
-	vdda33-supply = <&vreg_l9a>;
+	/delete-property/ clocks;
+	/delete-property/ clock-names;
+	/delete-property/ resets;
+
+	power-domains = <TODO>, <TODO>;
+	power-domain-names = "usb_transfer", "usb_core";
+	hsphy,fw-managed;
 
 	status = "okay";
 };