diff mbox series

[v7,8/9] arm64: dts: qcom: sa8295p: Enable tertiary controller and its 4 USB ports

Message ID 20230501143445.3851-9-quic_kriskura@quicinc.com (mailing list archive)
State Superseded
Headers show
Series Add multiport support for DWC3 controllers | expand

Commit Message

Krishna Kurapati May 1, 2023, 2:34 p.m. UTC
Enable tertiary controller for SA8295P (based on SC8280XP).
Add pinctrl support for usb ports to provide VBUS to connected peripherals.

Signed-off-by: Krishna Kurapati <quic_kriskura@quicinc.com>
---
 arch/arm64/boot/dts/qcom/sa8295p-adp.dts | 47 ++++++++++++++++++++++++
 1 file changed, 47 insertions(+)

Comments

Konrad Dybcio May 2, 2023, 11:06 a.m. UTC | #1
On 1.05.2023 16:34, Krishna Kurapati wrote:
> Enable tertiary controller for SA8295P (based on SC8280XP).
> Add pinctrl support for usb ports to provide VBUS to connected peripherals.
> 
> Signed-off-by: Krishna Kurapati <quic_kriskura@quicinc.com>
> ---
>  arch/arm64/boot/dts/qcom/sa8295p-adp.dts | 47 ++++++++++++++++++++++++
>  1 file changed, 47 insertions(+)
> 
> diff --git a/arch/arm64/boot/dts/qcom/sa8295p-adp.dts b/arch/arm64/boot/dts/qcom/sa8295p-adp.dts
> index fd253942e5e5..7e6061c43835 100644
> --- a/arch/arm64/boot/dts/qcom/sa8295p-adp.dts
> +++ b/arch/arm64/boot/dts/qcom/sa8295p-adp.dts
> @@ -584,6 +584,19 @@ &usb_1_qmpphy {
>  	status = "okay";
>  };
>  
> +&usb_2 {
> +	pinctrl-names = "default";
> +	pinctrl-0 = <&usb2_en_state>,
> +			<&usb3_en_state>,
> +			<&usb4_en_state>,
> +			<&usb5_en_state>;
This is misaligned. Also, please do property-n before property-names.

> +	status = "okay";
> +};
> +
> +&usb_2_dwc3 {
> +	dr_mode = "host";
> +};
> +
>  &usb_2_hsphy0 {
>  	vdda-pll-supply = <&vreg_l5a>;
>  	vdda18-supply = <&vreg_l7g>;
> @@ -729,3 +742,37 @@ wake-n-pins {
>  		};
>  	};
>  };
> +
> +&pmm8540c_gpios {
> +	usb2_en_state: usb2-en-state {
> +		pins = "gpio9";
> +		function = "normal";
> +		output-high;
> +		power-source = <0>;
No drive-strength values?

Konrad
> +	};
> +};
> +
> +&pmm8540e_gpios {
> +	usb3_en_state: usb3-en-state {
> +		pins = "gpio5";
> +		function = "normal";
> +		output-high;
> +		power-source = <0>;
> +	};
> +};
> +
> +&pmm8540g_gpios {
> +	usb4_en_state: usb4-en-state {
> +		pins = "gpio5";
> +		function = "normal";
> +		output-high;
> +		power-source = <0>;
> +	};
> +
> +	usb5_en_state: usb5-en-state {
> +		pins = "gpio9";
> +		function = "normal";
> +		output-high;
> +		power-source = <0>;
> +	};
> +};
Krishna Kurapati May 3, 2023, 3:55 a.m. UTC | #2
On 5/2/2023 4:36 PM, Konrad Dybcio wrote:
> 
> 
> On 1.05.2023 16:34, Krishna Kurapati wrote:
>> Enable tertiary controller for SA8295P (based on SC8280XP).
>> Add pinctrl support for usb ports to provide VBUS to connected peripherals.
>>
>> Signed-off-by: Krishna Kurapati <quic_kriskura@quicinc.com>
>> ---
>>   arch/arm64/boot/dts/qcom/sa8295p-adp.dts | 47 ++++++++++++++++++++++++
>>   1 file changed, 47 insertions(+)
>>
>> diff --git a/arch/arm64/boot/dts/qcom/sa8295p-adp.dts b/arch/arm64/boot/dts/qcom/sa8295p-adp.dts
>> index fd253942e5e5..7e6061c43835 100644
>> --- a/arch/arm64/boot/dts/qcom/sa8295p-adp.dts
>> +++ b/arch/arm64/boot/dts/qcom/sa8295p-adp.dts
>> @@ -584,6 +584,19 @@ &usb_1_qmpphy {
>>   	status = "okay";
>>   };
>>   
>> +&usb_2 {
>> +	pinctrl-names = "default";
>> +	pinctrl-0 = <&usb2_en_state>,
>> +			<&usb3_en_state>,
>> +			<&usb4_en_state>,
>> +			<&usb5_en_state>;
> This is misaligned. Also, please do property-n before property-names.
> 
>> +	status = "okay";
>> +};
>> +
>> +&usb_2_dwc3 {
>> +	dr_mode = "host";
>> +};
>> +
>>   &usb_2_hsphy0 {
>>   	vdda-pll-supply = <&vreg_l5a>;
>>   	vdda18-supply = <&vreg_l7g>;
>> @@ -729,3 +742,37 @@ wake-n-pins {
>>   		};
>>   	};
>>   };
>> +
>> +&pmm8540c_gpios {
>> +	usb2_en_state: usb2-en-state {
>> +		pins = "gpio9";
>> +		function = "normal";
>> +		output-high;
>> +		power-source = <0>;
> No drive-strength values?
> 
> Konrad

Hi Konrad,

  TBH, I didn't add the drive strength values as things worked out of 
the box with the current changes (may be the default value of drive 
strength is sufficient for us).

Let me know if it is mandatory, I will add it up in the next version.

Regards,
Krishna,

>> +	};
>> +};
>> +
>> +&pmm8540e_gpios {
>> +	usb3_en_state: usb3-en-state {
>> +		pins = "gpio5";
>> +		function = "normal";
>> +		output-high;
>> +		power-source = <0>;
>> +	};
>> +};
>> +
>> +&pmm8540g_gpios {
>> +	usb4_en_state: usb4-en-state {
>> +		pins = "gpio5";
>> +		function = "normal";
>> +		output-high;
>> +		power-source = <0>;
>> +	};
>> +
>> +	usb5_en_state: usb5-en-state {
>> +		pins = "gpio9";
>> +		function = "normal";
>> +		output-high;
>> +		power-source = <0>;
>> +	};
>> +};
Konrad Dybcio May 4, 2023, 6:37 a.m. UTC | #3
On 3.05.2023 05:55, Krishna Kurapati PSSNV wrote:
> 
> 
> On 5/2/2023 4:36 PM, Konrad Dybcio wrote:
>>
>>
>> On 1.05.2023 16:34, Krishna Kurapati wrote:
>>> Enable tertiary controller for SA8295P (based on SC8280XP).
>>> Add pinctrl support for usb ports to provide VBUS to connected peripherals.
>>>
>>> Signed-off-by: Krishna Kurapati <quic_kriskura@quicinc.com>
>>> ---
>>>   arch/arm64/boot/dts/qcom/sa8295p-adp.dts | 47 ++++++++++++++++++++++++
>>>   1 file changed, 47 insertions(+)
>>>
>>> diff --git a/arch/arm64/boot/dts/qcom/sa8295p-adp.dts b/arch/arm64/boot/dts/qcom/sa8295p-adp.dts
>>> index fd253942e5e5..7e6061c43835 100644
>>> --- a/arch/arm64/boot/dts/qcom/sa8295p-adp.dts
>>> +++ b/arch/arm64/boot/dts/qcom/sa8295p-adp.dts
>>> @@ -584,6 +584,19 @@ &usb_1_qmpphy {
>>>       status = "okay";
>>>   };
>>>   +&usb_2 {
>>> +    pinctrl-names = "default";
>>> +    pinctrl-0 = <&usb2_en_state>,
>>> +            <&usb3_en_state>,
>>> +            <&usb4_en_state>,
>>> +            <&usb5_en_state>;
>> This is misaligned. Also, please do property-n before property-names.
>>
>>> +    status = "okay";
>>> +};
>>> +
>>> +&usb_2_dwc3 {
>>> +    dr_mode = "host";
>>> +};
>>> +
>>>   &usb_2_hsphy0 {
>>>       vdda-pll-supply = <&vreg_l5a>;
>>>       vdda18-supply = <&vreg_l7g>;
>>> @@ -729,3 +742,37 @@ wake-n-pins {
>>>           };
>>>       };
>>>   };
>>> +
>>> +&pmm8540c_gpios {
>>> +    usb2_en_state: usb2-en-state {
>>> +        pins = "gpio9";
>>> +        function = "normal";
>>> +        output-high;
>>> +        power-source = <0>;
>> No drive-strength values?
>>
>> Konrad
> 
> Hi Konrad,
> 
>  TBH, I didn't add the drive strength values as things worked out of the box with the current changes (may be the default value of drive strength is sufficient for us).
> 
> Let me know if it is mandatory, I will add it up in the next version.
It's not, but it helps eliminate one more potential inconsistency

Konrad
> 
> Regards,
> Krishna,
> 
>>> +    };
>>> +};
>>> +
>>> +&pmm8540e_gpios {
>>> +    usb3_en_state: usb3-en-state {
>>> +        pins = "gpio5";
>>> +        function = "normal";
>>> +        output-high;
>>> +        power-source = <0>;
>>> +    };
>>> +};
>>> +
>>> +&pmm8540g_gpios {
>>> +    usb4_en_state: usb4-en-state {
>>> +        pins = "gpio5";
>>> +        function = "normal";
>>> +        output-high;
>>> +        power-source = <0>;
>>> +    };
>>> +
>>> +    usb5_en_state: usb5-en-state {
>>> +        pins = "gpio9";
>>> +        function = "normal";
>>> +        output-high;
>>> +        power-source = <0>;
>>> +    };
>>> +};
diff mbox series

Patch

diff --git a/arch/arm64/boot/dts/qcom/sa8295p-adp.dts b/arch/arm64/boot/dts/qcom/sa8295p-adp.dts
index fd253942e5e5..7e6061c43835 100644
--- a/arch/arm64/boot/dts/qcom/sa8295p-adp.dts
+++ b/arch/arm64/boot/dts/qcom/sa8295p-adp.dts
@@ -584,6 +584,19 @@  &usb_1_qmpphy {
 	status = "okay";
 };
 
+&usb_2 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&usb2_en_state>,
+			<&usb3_en_state>,
+			<&usb4_en_state>,
+			<&usb5_en_state>;
+	status = "okay";
+};
+
+&usb_2_dwc3 {
+	dr_mode = "host";
+};
+
 &usb_2_hsphy0 {
 	vdda-pll-supply = <&vreg_l5a>;
 	vdda18-supply = <&vreg_l7g>;
@@ -729,3 +742,37 @@  wake-n-pins {
 		};
 	};
 };
+
+&pmm8540c_gpios {
+	usb2_en_state: usb2-en-state {
+		pins = "gpio9";
+		function = "normal";
+		output-high;
+		power-source = <0>;
+	};
+};
+
+&pmm8540e_gpios {
+	usb3_en_state: usb3-en-state {
+		pins = "gpio5";
+		function = "normal";
+		output-high;
+		power-source = <0>;
+	};
+};
+
+&pmm8540g_gpios {
+	usb4_en_state: usb4-en-state {
+		pins = "gpio5";
+		function = "normal";
+		output-high;
+		power-source = <0>;
+	};
+
+	usb5_en_state: usb5-en-state {
+		pins = "gpio9";
+		function = "normal";
+		output-high;
+		power-source = <0>;
+	};
+};