mbox series

[v1,0/4] thermal: tsens: Add support for QCS404 platform

Message ID cover.1539627762.git.amit.kucheria@linaro.org
Headers show
Series thermal: tsens: Add support for QCS404 platform | expand

Message

Amit Kucheria Oct. 15, 2018, 6:40 p.m. UTC
Add support for the Qualcomm QCS404 platform that contains v1 of the TSENS
IP. Introduce a fallback binding to handle "v1" functionality.

These patches apply on top of previous tsens-related patches sent to the
list pending merge along with various qcs404 patches under review
(available in this branch[1] for convenience).

[1] https://git.linaro.org/landing-teams/working/qualcomm/kernel.git/log/?h=integration-linux-qcomlt

Amit Kucheria (4):
  dt: thermal: tsens: Add bindings for qcs404
  drivers: thermal: tsens: Add generic support for TSENS v1 IP
  arm64: dts: qcom: qcs404: Add tsens controller
  arm64: dts: qcom: qcs404: Add thermal zones for each sensor

 .../bindings/thermal/qcom-tsens.txt           |   3 +
 arch/arm64/boot/dts/qcom/qcs404.dtsi          | 226 ++++++++++++++++++
 drivers/thermal/qcom/Makefile                 |   2 +-
 drivers/thermal/qcom/tsens-v1.c               | 196 +++++++++++++++
 drivers/thermal/qcom/tsens.c                  |   3 +
 drivers/thermal/qcom/tsens.h                  |   2 +-
 6 files changed, 430 insertions(+), 2 deletions(-)
 create mode 100644 drivers/thermal/qcom/tsens-v1.c

-- 
2.17.1

Comments

Vinod Koul Oct. 31, 2018, 7:47 a.m. UTC | #1
On 16-10-18, 00:10, Amit Kucheria wrote:
> qcs404 has a single TSENS IP block with 10 sensors. The calibration data

> is stored in an eeprom (qfprom) that is accessed through the nvmem

> framework. We add the qfprom node to allow the tsens sensors to be

> calibrated correctly.


Andy,

These have dependency on the patch series adding The DT file I sent
yesterday[1]. Please apply these on top of that series

[1]: https://patchwork.kernel.org/project/linux-arm-msm/list/?series=36319

Thanks

> 

> Signed-off-by: Amit Kucheria <amit.kucheria@linaro.org>

> ---

>  arch/arm64/boot/dts/qcom/qcs404.dtsi | 20 ++++++++++++++++++++

>  1 file changed, 20 insertions(+)

> 

> diff --git a/arch/arm64/boot/dts/qcom/qcs404.dtsi b/arch/arm64/boot/dts/qcom/qcs404.dtsi

> index e1e2ba9cbfcd..dfd65c53cf5f 100644

> --- a/arch/arm64/boot/dts/qcom/qcs404.dtsi

> +++ b/arch/arm64/boot/dts/qcom/qcs404.dtsi

> @@ -273,6 +273,26 @@

>  			status = "okay";

>  		};

>  

> +		qfprom: qfprom@a4000 {

> +			compatible = "qcom,qfprom";

> +			reg = <0xa4000 0x1000>;

> +			#address-cells = <1>;

> +			#size-cells = <1>;

> +			tsens_caldata: caldata@d0 {

> +				reg = <0x1f8 0x14>;

> +			};

> +		};

> +

> +		tsens: thermal-sensor@4a9000 {

> +			compatible = "qcom,qcs404-tsens", "qcom,tsens-v1";

> +			reg = <0x4a9000 0x1000>, /* TM */

> +			      <0x4a8000 0x1000>; /* SROT */

> +			nvmem-cells = <&tsens_caldata>;

> +			nvmem-cell-names = "calib";

> +			#qcom,sensors = <10>;

> +			#thermal-sensor-cells = <1>;

> +		};

> +

>  		apcs_glb: mailbox@b011000 {

>  			compatible = "qcom,qcs404-apcs-apps-global", "syscon";

>  			reg = <0xb011000 0x1000>;

> -- 

> 2.17.1


-- 
~Vinod