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

Commit dd65263b authored by Mayank Rana's avatar Mayank Rana
Browse files

USB: Add reg_name usage with SSUSB QMP PHY



This change adds reg_name usage with SSUSB QMP PHY and makes
"qmp_ahb2phy_base" as required address set with "qmp_phy_base".
It updates devicetree documentation accordingly.

Change-Id: I6aad12d8c798ec6d987ffd998749f4368aa25598
Signed-off-by: default avatarMayank Rana <mrana@codeaurora.org>
parent e388465c
Loading
Loading
Loading
Loading
+7 −3
Original line number Diff line number Diff line
@@ -86,6 +86,9 @@ SSUSB-QMP PHY
Required properties:
 - compatible: Should be "qcom,usb-ssphy-qmp"
 - reg: Address and length of the register set for the device
   Required regs are:
   "qmp_phy_base" : QMP PHY Base register set.
   "qmp_ahb2phy_base" : SS AHB2PHY CSR register set.
 - <supply-name>-supply: phandle to the regulator device tree node
   Required "supply-name" examples are:
	"vdd" : vdd supply for SSPHY digital circuit operation
@@ -95,8 +98,6 @@ Required properties:
   microvolts or a value corresponding to voltage corner

Optional properties:
 - reg: An address and length of the AHB2PHY CSR register set. If specified, must
   be the second entry after the base register.
 - qcom,vbus-valid-override: If present, indicates VBUS pin is not connected to
   the USB PHY and the controller must rely on external VBUS notification in
   order to manually relay the notification to the SSPHY.
@@ -107,7 +108,10 @@ Optional properties:
Example:
	ssphy0: ssphy@f9b38000 {
		compatible = "qcom,usb-ssphy-qmp";
		reg = <0xf9b38000 0x16c>;
		reg = <0xf9b38000 0x16c>,
			<0xf9b3e000 0x3ff>;
		reg-names = "qmp_phy_base",
			"qmp_ahb2phy_base";
		vdd-supply = <&pmd9635_l4>;
		vdda18-supply = <&pmd9635_l8>;
		qcom,vdd-voltage-level = <0 900000 1050000>;
+2 −0
Original line number Diff line number Diff line
@@ -540,6 +540,8 @@
		compatible = "qcom,usb-ssphy-qmp";
		reg = <0xf9b38000 0x16c>,
			<0xf9b3e000 0x3ff>;
		reg-names = "qmp_phy_base",
			"qmp_ahb2phy_base";
		vdd-supply = <&pmd9635_l4>;
		vdda18-supply = <&pmd9635_l8>;
		qcom,vdd-voltage-level = <0 900000 1050000>;
+2 −0
Original line number Diff line number Diff line
@@ -1174,6 +1174,8 @@
		status = "disabled";
		reg = <0xf9b38000 0x800>,
			<0xf9b3e000 0x3ff>;
		reg-names = "qmp_phy_base",
			"qmp_ahb2phy_base";
		vdd-supply = <&pm8994_l28>;
		vdda18-supply = <&pm8994_l6>;
		qcom,vdd-voltage-level = <0 1000000 1000000>;
+8 −6
Original line number Diff line number Diff line
@@ -655,15 +655,17 @@ static int msm_ssphy_qmp_probe(struct platform_device *pdev)
	if (!phy)
		return -ENOMEM;

	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
	res = platform_get_resource_byname(pdev, IORESOURCE_MEM,
						"qmp_phy_base");
	phy->base = devm_ioremap_resource(dev, res);
	if (IS_ERR(phy->base))
		return PTR_ERR(phy->base);

	res = platform_get_resource(pdev, IORESOURCE_MEM, 1);
	if (res) {
	res = platform_get_resource_byname(pdev, IORESOURCE_MEM,
						"qmp_ahb2phy_base");
	phy->ahb2phy = devm_ioremap_resource(dev, res);
		if (IS_ERR(phy->ahb2phy))
	if (IS_ERR(phy->ahb2phy)) {
		dev_err(dev, "couldn't find qmp_ahb2phy_base address.\n");
		return PTR_ERR(phy->ahb2phy);
	}