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

Commit 8fe91863 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge changes I76beed1b,I60d7f72c,Ic9484af7 into msm-next

* changes:
  defconfig: msm: Enable the GCC clock driver for SDM855
  ARM: dts: msm: add required clocks to USB node for sdm855
  usb: dwc3: of-simple: add support for GDSC regulator
parents 82f9b2a3 60267c39
Loading
Loading
Loading
Loading
+12 −0
Original line number Diff line number Diff line
@@ -674,6 +674,18 @@
		#size-cells = <1>;
		ranges;

		USB3_GDSC-supply = <&usb30_prim_gdsc>;

		clocks = <&clock_gcc GCC_USB30_PRIM_MASTER_CLK>,
			 <&clock_gcc GCC_CFG_NOC_USB3_PRIM_AXI_CLK>,
			 <&clock_gcc GCC_AGGRE_USB3_PRIM_AXI_CLK>,
			 <&clock_gcc GCC_USB30_PRIM_MOCK_UTMI_CLK>,
			 <&clock_gcc GCC_USB30_PRIM_SLEEP_CLK>,
			 <&clock_gcc GCC_USB3_PRIM_CLKREF_CLK>;

		clock-names = "core_clk", "iface_clk", "bus_aggr_clk",
			"utmi_clk", "sleep_clk", "xo";

		dwc3@a600000 {
			compatible = "snps,dwc3";
			reg = <0x0a600000 0xcd00>;
+1 −0
Original line number Diff line number Diff line
@@ -316,6 +316,7 @@ CONFIG_STAGING=y
CONFIG_ASHMEM=y
CONFIG_ION=y
CONFIG_ION_MSM=y
CONFIG_MSM_GCC_SDM855=y
CONFIG_HWSPINLOCK=y
CONFIG_HWSPINLOCK_QCOM=y
CONFIG_MAILBOX=y
+1 −0
Original line number Diff line number Diff line
@@ -326,6 +326,7 @@ CONFIG_STAGING=y
CONFIG_ASHMEM=y
CONFIG_ION=y
CONFIG_ION_MSM=y
CONFIG_MSM_GCC_SDM855=y
CONFIG_HWSPINLOCK=y
CONFIG_HWSPINLOCK_QCOM=y
CONFIG_MAILBOX=y
+16 −0
Original line number Diff line number Diff line
@@ -29,11 +29,13 @@
#include <linux/of.h>
#include <linux/of_platform.h>
#include <linux/pm_runtime.h>
#include <linux/regulator/consumer.h>

struct dwc3_of_simple {
	struct device		*dev;
	struct clk		**clks;
	int			num_clocks;
	struct regulator	*gdsc;
};

static int dwc3_of_simple_clk_init(struct dwc3_of_simple *simple, int count)
@@ -96,6 +98,17 @@ static int dwc3_of_simple_probe(struct platform_device *pdev)
	platform_set_drvdata(pdev, simple);
	simple->dev = dev;

	simple->gdsc = devm_regulator_get(dev, "USB3_GDSC");
	if (IS_ERR(simple->gdsc)) {
		simple->gdsc = NULL;
	} else {
		ret = regulator_enable(simple->gdsc);
		if (ret) {
			dev_err(dev, "unable to enable usb3 gdsc\n");
			return ret;
		}
	}

	ret = dwc3_of_simple_clk_init(simple, of_clk_get_parent_count(np));
	if (ret)
		return ret;
@@ -128,6 +141,9 @@ static int dwc3_of_simple_remove(struct platform_device *pdev)
		clk_put(simple->clks[i]);
	}

	if (simple->gdsc)
		regulator_disable(simple->gdsc);

	of_platform_depopulate(dev);

	pm_runtime_put_sync(dev);