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

Commit 861e64d8 authored by qctecmdr Service's avatar qctecmdr Service Committed by Gerrit - the friendly Code Review server
Browse files

Merge "clk: qcom: Add CPU clock measurement support for QCS405"

parents 73f3802a 9adb03c3
Loading
Loading
Loading
Loading
+23 −3
Original line number Diff line number Diff line
@@ -253,14 +253,34 @@
	clock_debugcc: qcom,cc-debug {
		compatible = "qcom,debugcc-qcs405";
		qcom,gcc = <&clock_gcc>;
		qcom,cpucc = <&cpucc_debug>;
		clocks = <&clock_rpmcc RPM_SMD_XO_CLK_SRC>;
		clock-names = "xo_clk_src";
		#clock-cells = <1>;
	};

	clock_cpu: qcom,cpu {
		compatible = "qcom,dummycc";
		clock-output-names = "cpu_clocks";
	cpucc_debug: syscon@0b01101c {
		compatible = "syscon";
		reg = <0xb01101c 0x4>;
	};

	clock_cpu: qcom,clock-cpu@0b011050 {
		status = "disabled";
		compatible = "qcom,cpu-qcs405";
		clocks = <&clock_rpmcc RPM_SMD_XO_A_CLK_SRC>,
			<&clock_gcc GPLL0_AO_OUT_MAIN>;
		clock-names = "xo_ao", "gpll0_ao" ;
		reg = <0x0b011050 0x8>,
			<0xb016000 0x34>;
		reg-names = "apcs_cmd" , "apcs_pll";
		cpu-vdd-supply = <&apc_vreg_corner>;
		vdd_dig_ao-supply = <&pms405_s1_level>;
		qcom,speed0-bin-v0 =
			< 0         0>,
			< 960000000  1>,
			< 1113600000 2>,
			< 1267200000 3>,
			< 1382400000 4>;
		#clock-cells = <1>;
	};

+6 −0
Original line number Diff line number Diff line
@@ -110,6 +110,7 @@ static const char *const debug_mux_parent_names[] = {
	"gcc_usb_hs_inactivity_timers_clk",
	"gcc_usb_hs_phy_cfg_ahb_clk",
	"gcc_usb_hs_system_clk",
	"apcs_mux_clk",
};

static struct clk_debug_mux gcc_debug_mux = {
@@ -277,6 +278,7 @@ static struct clk_debug_mux gcc_debug_mux = {
		0x64, 0x1FF, 0, 0xF000, 12, 4, 0x74000, 0x74000, 0x74000 },
		{ "gcc_usb_hs_system_clk", 0x60, 4, GCC,
		0x60, 0x1FF, 0, 0xF000, 12, 4, 0x74000, 0x74000, 0x74000 },
		{ "apcs_mux_clk", 0x16A, CPU_CC, 0x000, 0x3, 8, 0x0FF },
	),
	.hw.init = &(struct clk_init_data){
		.name = "gcc_debug_mux",
@@ -331,6 +333,10 @@ static int clk_debug_qcs405_probe(struct platform_device *pdev)
	if (ret)
		return ret;

	ret = map_debug_bases(pdev, "qcom,cpucc", CPU_CC);
	if (ret)
		return ret;

	clk = devm_clk_register(&pdev->dev, &gcc_debug_mux.hw);
	if (IS_ERR(clk)) {
		dev_err(&pdev->dev, "Unable to register GCC debug mux\n");