mbox series

[v2,0/2] Add DT support for Multiport controller on SC8280XP

Message ID 20240213082724.1789096-1-quic_kriskura@quicinc.com
Headers show
Series Add DT support for Multiport controller on SC8280XP | expand

Message

Krishna Kurapati Feb. 13, 2024, 8:27 a.m. UTC
Series [1] introduces binding and driver support for DWC3 Multiport
controllers. This series adds support for tertiary controller of SC8280
and enabled multiport controller for SA8295P-ADP platform.

Till v13 the DT was pushed along with driver code. Separate the DT changes
from driver update and pushing it as this series.

Changes in v2:
SA8540 Ride related code changes have been dropped and will pushed later
due to unavailability of hardware with either Andrew or me for testing the
gpio hog changes suggested in v1.
Implemented vbus boost regulators as fixed regulators instead of modelling
their enable pins as pinctrl nodes.

Link to v1:
https://lore.kernel.org/all/20240206114745.1388491-1-quic_kriskura@quicinc.com/

[1]: https://lore.kernel.org/all/20240206051825.1038685-1-quic_kriskura@quicinc.com/

Krishna Kurapati (2):
  arm64: dts: qcom: sc8280xp: Add multiport controller node for SC8280
  arm64: dts: qcom: sa8295p: Enable tertiary controller and its 4 USB
    ports

 arch/arm64/boot/dts/qcom/sa8295p-adp.dts | 83 ++++++++++++++++++++++++
 arch/arm64/boot/dts/qcom/sc8280xp.dtsi   | 82 +++++++++++++++++++++++
 2 files changed, 165 insertions(+)

Comments

Bjorn Andersson Feb. 15, 2024, 2:41 a.m. UTC | #1
On Tue, Feb 13, 2024 at 09:39:51AM +0100, Krzysztof Kozlowski wrote:
> On 13/02/2024 09:27, Krishna Kurapati wrote:
> > Multiport USB controller (host-only) of SA8295 ADP has 4 Type-A ports
> > exposed for connecting peripherals. The VBUS to these peripherals is
> > provided by TPS2559QWDRCTQ1 regulators connected to these ports. Each
> > regulator has an enable pin controlled by PMM8540. Since these regulators
> > are GPIO controlled regulators, model them as fixed regulators and keep
> > them Always-On at boot since we are wakeup capable and we don't need to
> > turn them off on suspend. Also since we don't enter device mode, these
> > regulators can be kept on.
> > 
> > Signed-off-by: Krishna Kurapati <quic_kriskura@quicinc.com>
> > ---
> >  arch/arm64/boot/dts/qcom/sa8295p-adp.dts | 83 ++++++++++++++++++++++++
> >  1 file changed, 83 insertions(+)
> > 
> > diff --git a/arch/arm64/boot/dts/qcom/sa8295p-adp.dts b/arch/arm64/boot/dts/qcom/sa8295p-adp.dts
> > index fd253942e5e5..49418843c214 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"
> > @@ -108,6 +109,46 @@ edp3_connector_in: endpoint {
> >  			};
> >  		};
> >  	};
> > +
> > +	regulator-usb2-vbus {
> > +		compatible = "regulator-fixed";
> > +		regulator-name = "USB2_VBUS";
> > +		gpio = <&pmm8540c_gpios 9 GPIO_ACTIVE_HIGH>;
> > +		pinctrl-0 = <&usb2_en>;
> > +		pinctrl-names = "default";
> > +		enable-active-high;
> > +		regulator-always-on;
> > +	};
> > +
> > +	regulator-usb3-vbus {
> > +		compatible = "regulator-fixed";
> > +		regulator-name = "USB3_VBUS";
> > +		gpio = <&pmm8540e_gpios 5 GPIO_ACTIVE_HIGH>;
> > +		pinctrl-0 = <&usb3_en>;
> > +		pinctrl-names = "default";
> > +		enable-active-high;
> > +		regulator-always-on;
> > +	};
> > +
> > +	regulator-usb4-vbus {
> > +		compatible = "regulator-fixed";
> > +		regulator-name = "USB4_VBUS";
> > +		gpio = <&pmm8540g_gpios 5 GPIO_ACTIVE_HIGH>;
> > +		pinctrl-0 = <&usb4_en>;
> > +		pinctrl-names = "default";
> > +		enable-active-high;
> > +		regulator-always-on;
> > +	};
> > +
> > +	regulator-usb5-vbus {
> > +		compatible = "regulator-fixed";
> > +		regulator-name = "USB5_VBUS";
> > +		gpio = <&pmm8540g_gpios 9 GPIO_ACTIVE_HIGH>;
> > +		pinctrl-0 = <&usb5_en>;
> > +		pinctrl-names = "default";
> > +		enable-active-high;
> > +		regulator-always-on;
> 
> Why all these regulators are always on? If USB controller does not probe
> for any reason, why keeping them enabled? These must not be always-on,
> but instead used by connector as VBUS supply (or by whatever you have
> there for USB).
> 

I'm not too concerned about keeping the lights on in this scenario, but
if we can describe this properly let's do so (and let's do so on other
boards with connectors as well).

We'd have a set of usb-a-connector nodes, that we can tie to the nodes
in the USB/phy, and the supply. But so far we've associated a connector
with a port manager, here we don't have one of those, so where would the
node reside and who should acquire and drive the vbus-supply?

Regards,
Bjorn

> Best regards,
> Krzysztof
>