Skip to content

Commit

Permalink
test V3 patch
Browse files Browse the repository at this point in the history
  • Loading branch information
dissent1 committed Nov 22, 2016
1 parent 08d9b8d commit 88e0baa
Show file tree
Hide file tree
Showing 7 changed files with 1,569 additions and 3 deletions.
1 change: 1 addition & 0 deletions target/linux/ipq806x/config-4.4
Expand Up @@ -363,6 +363,7 @@ CONFIG_QCOM_SCM=y
CONFIG_QCOM_SCM_32=y
# CONFIG_QCOM_SMD is not set
CONFIG_QCOM_SMEM=y
CONFIG_QCOM_TSENS=y
CONFIG_QCOM_WDT=y
CONFIG_RAS=y
CONFIG_RATIONAL=y
Expand Down
99 changes: 96 additions & 3 deletions target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8065.dtsi
Expand Up @@ -119,6 +119,88 @@
};
};

thermal-zones {
cpu-thermal0 {
polling-delay-passive = <250>;
polling-delay = <1000>;

thermal-sensors = <&gcc 7>;

trips {
cpu_alert0: trip@0 {
temperature = <75000>;
hysteresis = <2000>;
type = "passive";
};
cpu_crit0: trip@1 {
temperature = <95000>;
hysteresis = <2000>;
type = "critical";
};
};
};

cpu-thermal1 {
polling-delay-passive = <250>;
polling-delay = <1000>;

thermal-sensors = <&gcc 8>;

trips {
cpu_alert1: trip@0 {
temperature = <75000>;
hysteresis = <2000>;
type = "passive";
};
cpu_crit1: trip@1 {
temperature = <95000>;
hysteresis = <2000>;
type = "critical";
};
};
};

cpu-thermal2 {
polling-delay-passive = <250>;
polling-delay = <1000>;

thermal-sensors = <&gcc 9>;

trips {
cpu_alert2: trip@0 {
temperature = <75000>;
hysteresis = <2000>;
type = "passive";
};
cpu_crit2: trip@1 {
temperature = <95000>;
hysteresis = <2000>;
type = "critical";
};
};
};

cpu-thermal3 {
polling-delay-passive = <250>;
polling-delay = <1000>;

thermal-sensors = <&gcc 10>;

trips {
cpu_alert3: trip@0 {
temperature = <75000>;
hysteresis = <2000>;
type = "passive";
};
cpu_crit3: trip@1 {
temperature = <95000>;
hysteresis = <2000>;
type = "critical";
};
};
};
};

cpu-pmu {
compatible = "qcom,krait-pmu";
interrupts = <1 10 0x304>;
Expand Down Expand Up @@ -245,8 +327,15 @@
reg = <0x00700000 0x1000>;
#address-cells = <1>;
#size-cells = <1>;
stride = <1>;
ranges = <0x0 0x00700000 0x1000>;
ranges;

tsens_calib: calib {
reg = <0x400 0x10>;
};

tsens_backup: backup_calib {
reg = <0x410 0x10>;
};
};

rpm@108000 {
Expand Down Expand Up @@ -727,9 +816,13 @@
gcc: clock-controller@900000 {
compatible = "qcom,gcc-ipq8064";
reg = <0x00900000 0x4000>;
nvmem-cells = <&tsens_calib>, <&tsens_backup>;
nvmem-cell-names = "calib", "calib_backup";
qcom,tsens-slopes = <1176 1176 1154 1176 1111
1132 1132 1199 1132 1199 1132>;
#clock-cells = <1>;
#reset-cells = <1>;
#power-domain-cells = <1>;
#thermal-sensor-cells = <1>;
};

lcc: clock-controller@28000000 {
Expand Down
@@ -0,0 +1,35 @@
From 856371ca1561ca9b3280cc323ff296c7c5e1fa93 Mon Sep 17 00:00:00 2001
From: dissent1 <be.dissent+github@gmail.com>
Date: Tue, 22 Nov 2016 17:37:56 +0300
Subject: [PATCH] Add files via upload

---
drivers/clk/qcom/gcc-ipq806x.c | 8 ++++++++
1 file changed, 8 insertions(+)

diff --git a/drivers/clk/qcom/gcc-ipq806x.c b/drivers/clk/qcom/gcc-ipq806x.c
index 16fc64c..da5f43b 100644
--- a/drivers/clk/qcom/gcc-ipq806x.c
+++ b/drivers/clk/qcom/gcc-ipq806x.c
@@ -3025,6 +3025,7 @@ static int gcc_ipq806x_probe(struct platform_device *pdev)
{
struct clk *clk;
struct device *dev = &pdev->dev;
+ struct platform_device *tsens;
struct regmap *regmap;
int ret;

@@ -3055,6 +3056,13 @@ static int gcc_ipq806x_probe(struct platform_device *pdev)
regmap_write(regmap, 0x3cf8, 8);
regmap_write(regmap, 0x3d18, 8);

+ tsens = platform_device_register_data(&pdev->dev, "qcom-tsens", -1,
+ NULL, 0);
+ if (IS_ERR(tsens))
+ return PTR_ERR(tsens);
+
+ platform_set_drvdata(pdev, tsens);
+
return 0;
}

0 comments on commit 88e0baa

Please sign in to comment.