Skip to content

Commit

Permalink
add a basic cpu thermal-zone on rk3066/bqcurie2
Browse files Browse the repository at this point in the history
  • Loading branch information
mmind committed Aug 28, 2014
1 parent e2eec14 commit c07e02f
Show file tree
Hide file tree
Showing 2 changed files with 56 additions and 0 deletions.
46 changes: 46 additions & 0 deletions arch/arm/boot/dts/rk3066a-bqcurie2.dts
Expand Up @@ -58,6 +58,42 @@
};
/* VOL+ comes somehow thru the ADC */
};

iio_hwmon {
compatible = "iio-hwmon";
io-channels = <&saradc 0>, <&saradc 1>, <&saradc 2>;
};

cpu_temp: iio-thermal {
compatible = "iio-thermal";
io-channels = <&tsadc 0>;
conversion-method = "interpolation";
conversion-values = <
2088 398150
2218 318150
2238 303150
2244 298150
2319 233150
>;
#thermal-sensor-cells = <0>;
};

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

thermal-sensors = <&cpu_temp>;

trips {
core_crit: core_crit {
temperature = <125000>; /* milliCelsius */
hysteresis = <2000>; /* milliCelsius */
type = "critical";
};
};
};
};
};

&i2c1 {
Expand Down Expand Up @@ -168,6 +204,16 @@
disable-wp;
};

&saradc {
status = "okay";
vref-supply = <&vcc_25>;
};

&tsadc {
status = "okay";
vref-supply = <&vcc_25>;
};

&uart0 {
status = "okay";
};
Expand Down
10 changes: 10 additions & 0 deletions arch/arm/boot/dts/rk3066a.dtsi
Expand Up @@ -86,6 +86,16 @@
clock-names = "timer", "pclk";
};

tsadc: saradc@20060000 {
compatible = "rockchip,rk3066-tsadc";
reg = <0x20060000 0x100>;
interrupts = <GIC_SPI 21 IRQ_TYPE_LEVEL_HIGH>;
#io-channel-cells = <1>;
clocks = <&cru SCLK_TSADC>, <&cru PCLK_TSADC>;
clock-names = "saradc", "apb_pclk";
status = "disabled";
};

pinctrl: pinctrl {
compatible = "rockchip,rk3066a-pinctrl";
rockchip,grf = <&grf>;
Expand Down

0 comments on commit c07e02f

Please sign in to comment.