Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3bc20703 authored by Bar Weiner's avatar Bar Weiner
Browse files

usb: dwc3-msm: DBM refactoring



Refactoring of DBM code to allow easy support for future
DBM versions.
All DBM specific operation are now defined in dbm.h,
and implemented in a dbm specific version module.

Note that only a single instance of DBM is currently
supported.

Change-Id: I751300240951a84a42358c3b8b5222e73c537653
Signed-off-by: default avatarBar Weiner <bweiner@codeaurora.org>
parent f82aaf71
Loading
Loading
Loading
Loading
+11 −0
Original line number Diff line number Diff line
MSM DBM (Device Bus Manager)

Required properties :
- compatible : should be "qcom,usb-dbm-<dbm version number>"
- reg : offset and length of the register set in the memory map.

Example MSM DBM (Device Bus Manager) device node :
	dbm_1p4: dbm@f92f8000 {
		compatible = "qcom,usb-dbm-1p4";
		reg = <0xf92f8000 0x1000>;
	};
+2 −4
Original line number Diff line number Diff line
@@ -11,10 +11,6 @@ Required properties :
	"vbus_dwc3" : vbus supply for host mode when DWC3 operating as DRD.
	This can be left as optional if "host-only-mode" is selected in the
	'dwc3' sub node for "DWC3-USB3 Core device".
- qcom,dwc-usb3-msm-dbm-eps: Number of endpoints avaliable for
  the DBM (Device Bus Manager). The DBM is HW unit which is part of
  the MSM USB3.0 core (which also includes the Synopsys DesignWare
  USB3.0 controller)

Optional properties :
- Refer to "Documentation/devicetree/bindings/arm/msm/msm_bus.txt" for
@@ -52,6 +48,7 @@ Optional properties :
  being reset in initialization.
- qcom,no-suspend-resume: If present, the device will not perform any activity
		during suspend/resume
- qcom,usb-dbm : phandle for the DBM device

Sub nodes:
- Sub node for "DWC3- USB3 controller".
@@ -71,6 +68,7 @@ Example MSM USB3.0 controller device node :
		qcom,dwc_usb3-adc_tm = <&pm8941_adc_tm>;
		qcom,dwc-usb3-msm-tx-fifo-size = <29696>;
		qcom,dwc-usb3-msm-qdss-tx-fifo-size = <16384>;
		qcom,usb-dbm = <&dbm_1p4>;

		qcom,msm_bus,name = "usb3";
		qcom,msm_bus,num_cases = <2>;
+6 −1
Original line number Diff line number Diff line
@@ -1928,12 +1928,12 @@
		interrupt-names = "hs_phy_irq", "pmic_id_irq";

		USB3_GDSC-supply = <&gdsc_usb30>;
		qcom,dwc-usb3-msm-dbm-eps = <4>;
		qcom,dwc-usb3-msm-tx-fifo-size = <29696>;
		qcom,dwc-usb3-msm-qdss-tx-fifo-size = <8192>;
		qcom,otg-capability;
		qcom,misc-ref = <&pma8084_misc>;
		qcom,restore-sec-cfg-for-scm-dev-id = <9>;
		qcom,usb-dbm = <&dbm0_1p4>;

		qcom,msm-bus,name = "usb3";
		qcom,msm-bus,num-cases = <2>;
@@ -2006,6 +2006,11 @@
		qcom,vbus-valid-override;
	};

	dbm0_1p4: dbm@f92f8000 {
		compatible = "qcom,usb-dbm-1p4";
		reg = <0xf92f8000 0x1000>;
	};

	hsphy1: hsphy@f94f8800 {
		compatible = "qcom,usb-hsphy";
		reg = <0xf94f8800 0x3ff>;
+6 −1
Original line number Diff line number Diff line
@@ -301,9 +301,9 @@

		vbus_dwc3-supply = <&usb3_otg>;
		qcom,charging-disabled;
		qcom,dwc-usb3-msm-dbm-eps = <4>;
		qcom,dwc-usb3-msm-tx-fifo-size = <29696>;
		qcom,dwc-usb3-msm-qdss-tx-fifo-size = <8192>;
		qcom,usb-dbm = <&dbm0_1p4>;

		qcom,msm-bus,name = "usb3";
		qcom,msm-bus,num-cases = <2>;
@@ -343,6 +343,11 @@
		qcom,vdd-voltage-level = <1 5 7>;
	};

	dbm0_1p4: dbm@f92f8000 {
		compatible = "qcom,usb-dbm-1p4";
		reg = <0xf92f8000 0x1000>;
	};

	spmi_bus: qcom,spmi@fc4c0000 {
		cell-index = <0>;
		compatible = "qcom,spmi-pmic-arb";
+5 −1
Original line number Diff line number Diff line
@@ -1647,11 +1647,11 @@
		interrupt-names = "hs_phy_irq", "pmic_id_irq";

		vbus_dwc3-supply = <&pm8941_mvs1>;
		qcom,dwc-usb3-msm-dbm-eps = <4>;
		qcom,misc-ref = <&pm8941_misc>;
		dwc_usb3-adc_tm = <&pm8941_adc_tm>;
		qcom,dwc-usb3-msm-tx-fifo-size = <29696>;
		qcom,dwc-usb3-msm-qdss-tx-fifo-size = <8192>;
		qcom,usb-dbm = <&dbm_1p4>;

		qcom,msm-bus,name = "usb3";
		qcom,msm-bus,num-cases = <2>;
@@ -1689,6 +1689,10 @@
		qcom,vdd-voltage-level = <1 5 7>;
	};

	dbm_1p4: dbm@f92f8000 {
		compatible = "qcom,usb-dbm-1p4";
		reg = <0xf92f8000 0x1000>;
	};
	ehci: qcom,ehci-host@f9a55000 {
		compatible = "qcom,ehci-host";
		status = "disabled";
Loading