Re: [PATCH 2/3] arm64: dts: qcom: sa8295p: Enable tertiary controller and its 4 USB ports

From: Dmitry Baryshkov
Date: Tue Feb 06 2024 - 07:30:28 EST


On Tue, 6 Feb 2024 at 14:03, Krishna Kurapati <quic_kriskura@xxxxxxxxxxx> wrote:
>
> Enable tertiary controller for SA8295P (based on SC8280XP).
> Add pinctrl support for usb ports to provide VBUS to connected peripherals.

These are not just pinctrl entries. They hide VBUS regulators. Please
implement them properly as corresponding vbus regulators.

>
> Signed-off-by: Krishna Kurapati <quic_kriskura@xxxxxxxxxxx>
> ---
> arch/arm64/boot/dts/qcom/sa8295p-adp.dts | 49 ++++++++++++++++++++++++
> 1 file changed, 49 insertions(+)
>
> diff --git a/arch/arm64/boot/dts/qcom/sa8295p-adp.dts b/arch/arm64/boot/dts/qcom/sa8295p-adp.dts
> index fd253942e5e5..6da444042f82 100644
> --- a/arch/arm64/boot/dts/qcom/sa8295p-adp.dts
> +++ b/arch/arm64/boot/dts/qcom/sa8295p-adp.dts
> @@ -9,6 +9,7 @@
> #include <dt-bindings/gpio/gpio.h>
> #include <dt-bindings/regulator/qcom,rpmh-regulator.h>
> #include <dt-bindings/spmi/spmi.h>
> +#include <dt-bindings/pinctrl/qcom,pmic-gpio.h>
>
> #include "sa8540p.dtsi"
> #include "sa8540p-pmics.dtsi"
> @@ -584,6 +585,16 @@ &usb_1_qmpphy {
> status = "okay";
> };
>
> +&usb_2 {
> + pinctrl-0 = <&usb2_en>,
> + <&usb3_en>,
> + <&usb4_en>,
> + <&usb5_en>;
> + pinctrl-names = "default";
> +
> + status = "okay";
> +};
> +
> &usb_2_hsphy0 {
> vdda-pll-supply = <&vreg_l5a>;
> vdda18-supply = <&vreg_l7g>;
> @@ -636,6 +647,44 @@ &xo_board_clk {
>
> /* PINCTRL */
>
> +&pmm8540c_gpios {
> + usb2_en: usb2-en-state {
> + pins = "gpio9";
> + function = "normal";
> + qcom,drive-strength = <PMIC_GPIO_STRENGTH_HIGH>;
> + output-high;
> + power-source = <0>;
> + };
> +};
> +
> +&pmm8540e_gpios {
> + usb3_en: usb3-en-state {
> + pins = "gpio5";
> + function = "normal";
> + qcom,drive-strength = <PMIC_GPIO_STRENGTH_HIGH>;
> + output-high;
> + power-source = <0>;
> + };
> +};
> +
> +&pmm8540g_gpios {
> + usb4_en: usb4-en-state {
> + pins = "gpio5";
> + function = "normal";
> + qcom,drive-strength = <PMIC_GPIO_STRENGTH_HIGH>;
> + output-high;
> + power-source = <0>;
> + };
> +
> + usb5_en: usb5-en-state {
> + pins = "gpio9";
> + function = "normal";
> + qcom,drive-strength = <PMIC_GPIO_STRENGTH_HIGH>;
> + output-high;
> + power-source = <0>;
> + };
> +};
> +
> &tlmm {
> pcie2a_default: pcie2a-default-state {
> clkreq-n-pins {
> --
> 2.34.1
>
>


--
With best wishes
Dmitry