* [PATCH v1 0/3] thermal: rockchip: Support the RK3308 SoC in thermal driver
@ 2019-11-05 3:17 Elaine Zhang
2019-11-05 3:17 ` [PATCH v1 1/3] dt-bindings: rockchip-thermal: Support the RK3308 SoC compatible Elaine Zhang
` (2 more replies)
0 siblings, 3 replies; 7+ messages in thread
From: Elaine Zhang @ 2019-11-05 3:17 UTC (permalink / raw)
To: heiko
Cc: mark.rutland, devicetree, amit.kucheria, Elaine Zhang, huangtao,
linux-pm, xxx, daniel.lezcano, linux-kernel, xf, edubezval,
linux-rockchip, robh+dt, andy.yan, rui.zhang, linux-arm-kernel
RK3308 SOC has two Temperature Sensors for CPU and GPU.
Elaine Zhang (3):
dt-bindings: rockchip-thermal: Support the RK3308 SoC compatible
thermal: rockchip: Support the RK3308 SoC in thermal driver
ARM64: dts: rockchip: rk3308: add tsadc node
.../bindings/thermal/rockchip-thermal.txt | 1 +
arch/arm64/boot/dts/rockchip/rk3308.dtsi | 20 ++++++++++++++++
drivers/thermal/rockchip_thermal.c | 28 ++++++++++++++++++++++
3 files changed, 49 insertions(+)
--
1.9.1
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH v1 1/3] dt-bindings: rockchip-thermal: Support the RK3308 SoC compatible
2019-11-05 3:17 [PATCH v1 0/3] thermal: rockchip: Support the RK3308 SoC in thermal driver Elaine Zhang
@ 2019-11-05 3:17 ` Elaine Zhang
2019-11-05 7:58 ` Heiko Stübner
2019-11-07 0:25 ` Rob Herring
2019-11-05 3:17 ` [PATCH v1 2/3] thermal: rockchip: Support the RK3308 SoC in thermal driver Elaine Zhang
2019-11-05 3:17 ` [PATCH v1 3/3] ARM64: dts: rockchip: rk3308: add tsadc node Elaine Zhang
2 siblings, 2 replies; 7+ messages in thread
From: Elaine Zhang @ 2019-11-05 3:17 UTC (permalink / raw)
To: heiko
Cc: mark.rutland, devicetree, amit.kucheria, Elaine Zhang, huangtao,
linux-pm, xxx, daniel.lezcano, linux-kernel, xf, edubezval,
linux-rockchip, robh+dt, andy.yan, rui.zhang, linux-arm-kernel
Add a new compatible for thermal founding on RK3308 SoCs.
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
---
Documentation/devicetree/bindings/thermal/rockchip-thermal.txt | 1 +
1 file changed, 1 insertion(+)
diff --git a/Documentation/devicetree/bindings/thermal/rockchip-thermal.txt b/Documentation/devicetree/bindings/thermal/rockchip-thermal.txt
index c6aac9bcacf1..3a0a9556680e 100644
--- a/Documentation/devicetree/bindings/thermal/rockchip-thermal.txt
+++ b/Documentation/devicetree/bindings/thermal/rockchip-thermal.txt
@@ -6,6 +6,7 @@ Required properties:
"rockchip,rv1108-tsadc": found on RV1108 SoCs
"rockchip,rk3228-tsadc": found on RK3228 SoCs
"rockchip,rk3288-tsadc": found on RK3288 SoCs
+ "rockchip,rk3308-tsadc": found on RK3308 SoCs
"rockchip,rk3328-tsadc": found on RK3328 SoCs
"rockchip,rk3368-tsadc": found on RK3368 SoCs
"rockchip,rk3399-tsadc": found on RK3399 SoCs
--
1.9.1
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH v1 2/3] thermal: rockchip: Support the RK3308 SoC in thermal driver
2019-11-05 3:17 [PATCH v1 0/3] thermal: rockchip: Support the RK3308 SoC in thermal driver Elaine Zhang
2019-11-05 3:17 ` [PATCH v1 1/3] dt-bindings: rockchip-thermal: Support the RK3308 SoC compatible Elaine Zhang
@ 2019-11-05 3:17 ` Elaine Zhang
2019-11-05 7:59 ` Heiko Stübner
2019-11-05 3:17 ` [PATCH v1 3/3] ARM64: dts: rockchip: rk3308: add tsadc node Elaine Zhang
2 siblings, 1 reply; 7+ messages in thread
From: Elaine Zhang @ 2019-11-05 3:17 UTC (permalink / raw)
To: heiko
Cc: mark.rutland, devicetree, amit.kucheria, Elaine Zhang, huangtao,
linux-pm, xxx, daniel.lezcano, linux-kernel, xf, edubezval,
linux-rockchip, robh+dt, andy.yan, rui.zhang, linux-arm-kernel
RK3308 SOC has two Temperature Sensors for CPU and GPU.
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
---
drivers/thermal/rockchip_thermal.c | 28 ++++++++++++++++++++++++++++
1 file changed, 28 insertions(+)
diff --git a/drivers/thermal/rockchip_thermal.c b/drivers/thermal/rockchip_thermal.c
index 343c2f5c5a25..c50ff6314389 100644
--- a/drivers/thermal/rockchip_thermal.c
+++ b/drivers/thermal/rockchip_thermal.c
@@ -918,6 +918,30 @@ static void rk_tsadcv2_tshut_mode(int chn, void __iomem *regs,
},
};
+static const struct rockchip_tsadc_chip rk3308_tsadc_data = {
+ .chn_id[SENSOR_CPU] = 0, /* cpu sensor is channel 0 */
+ .chn_id[SENSOR_GPU] = 1, /* gpu sensor is channel 1 */
+ .chn_num = 2, /* 2 channels for tsadc */
+
+ .tshut_mode = TSHUT_MODE_CRU, /* default TSHUT via CRU */
+ .tshut_temp = 95000,
+
+ .initialize = rk_tsadcv4_initialize,
+ .irq_ack = rk_tsadcv3_irq_ack,
+ .control = rk_tsadcv3_control,
+ .get_temp = rk_tsadcv2_get_temp,
+ .set_alarm_temp = rk_tsadcv2_alarm_temp,
+ .set_tshut_temp = rk_tsadcv2_tshut_temp,
+ .set_tshut_mode = rk_tsadcv2_tshut_mode,
+
+ .table = {
+ .id = rk3328_code_table,
+ .length = ARRAY_SIZE(rk3328_code_table),
+ .data_mask = TSADCV2_DATA_MASK,
+ .mode = ADC_INCREMENT,
+ },
+};
+
static const struct rockchip_tsadc_chip rk3328_tsadc_data = {
.chn_id[SENSOR_CPU] = 0, /* cpu sensor is channel 0 */
.chn_num = 1, /* one channels for tsadc */
@@ -1033,6 +1057,10 @@ static void rk_tsadcv2_tshut_mode(int chn, void __iomem *regs,
.data = (void *)&rk3288_tsadc_data,
},
{
+ .compatible = "rockchip,rk3308-tsadc",
+ .data = (void *)&rk3308_tsadc_data,
+ },
+ {
.compatible = "rockchip,rk3328-tsadc",
.data = (void *)&rk3328_tsadc_data,
},
--
1.9.1
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH v1 3/3] ARM64: dts: rockchip: rk3308: add tsadc node
2019-11-05 3:17 [PATCH v1 0/3] thermal: rockchip: Support the RK3308 SoC in thermal driver Elaine Zhang
2019-11-05 3:17 ` [PATCH v1 1/3] dt-bindings: rockchip-thermal: Support the RK3308 SoC compatible Elaine Zhang
2019-11-05 3:17 ` [PATCH v1 2/3] thermal: rockchip: Support the RK3308 SoC in thermal driver Elaine Zhang
@ 2019-11-05 3:17 ` Elaine Zhang
2 siblings, 0 replies; 7+ messages in thread
From: Elaine Zhang @ 2019-11-05 3:17 UTC (permalink / raw)
To: heiko
Cc: mark.rutland, devicetree, amit.kucheria, Elaine Zhang, huangtao,
linux-pm, xxx, daniel.lezcano, linux-kernel, xf, edubezval,
linux-rockchip, robh+dt, andy.yan, rui.zhang, linux-arm-kernel
This patch add a tsadc device node for rk3308.
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
---
arch/arm64/boot/dts/rockchip/rk3308.dtsi | 20 ++++++++++++++++++++
1 file changed, 20 insertions(+)
diff --git a/arch/arm64/boot/dts/rockchip/rk3308.dtsi b/arch/arm64/boot/dts/rockchip/rk3308.dtsi
index 8bdc66c62975..7023df31046d 100644
--- a/arch/arm64/boot/dts/rockchip/rk3308.dtsi
+++ b/arch/arm64/boot/dts/rockchip/rk3308.dtsi
@@ -513,6 +513,26 @@
status = "disabled";
};
+ tsadc: tsadc@ff1f0000 {
+ compatible = "rockchip,rk3308-tsadc";
+ reg = <0x0 0xff1f0000 0x0 0x100>;
+ interrupts = <GIC_SPI 38 IRQ_TYPE_LEVEL_HIGH>;
+ rockchip,grf = <&grf>;
+ clocks = <&cru SCLK_TSADC>, <&cru PCLK_TSADC>;
+ clock-names = "tsadc", "apb_pclk";
+ assigned-clocks = <&cru SCLK_TSADC>;
+ assigned-clock-rates = <50000>;
+ resets = <&cru SRST_TSADC>;
+ reset-names = "tsadc-apb";
+ pinctrl-names = "init", "default", "sleep";
+ pinctrl-0 = <&tsadc_otp_gpio>;
+ pinctrl-1 = <&tsadc_otp_gpio>;
+ pinctrl-2 = <&tsadc_otp_gpio>;
+ #thermal-sensor-cells = <1>;
+ rockchip,hw-tshut-temp = <120000>;
+ status = "disabled";
+ };
+
amba {
compatible = "simple-bus";
#address-cells = <2>;
--
1.9.1
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH v1 1/3] dt-bindings: rockchip-thermal: Support the RK3308 SoC compatible
2019-11-05 3:17 ` [PATCH v1 1/3] dt-bindings: rockchip-thermal: Support the RK3308 SoC compatible Elaine Zhang
@ 2019-11-05 7:58 ` Heiko Stübner
2019-11-07 0:25 ` Rob Herring
1 sibling, 0 replies; 7+ messages in thread
From: Heiko Stübner @ 2019-11-05 7:58 UTC (permalink / raw)
To: Elaine Zhang
Cc: mark.rutland, devicetree, amit.kucheria, huangtao, linux-pm, xxx,
daniel.lezcano, linux-kernel, xf, edubezval, linux-rockchip,
robh+dt, andy.yan, rui.zhang, linux-arm-kernel
Am Dienstag, 5. November 2019, 04:17:24 CET schrieb Elaine Zhang:
> Add a new compatible for thermal founding on RK3308 SoCs.
>
> Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
Reviewed-by: Heiko Stuebner <heiko@sntech.de>
> ---
> Documentation/devicetree/bindings/thermal/rockchip-thermal.txt | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/Documentation/devicetree/bindings/thermal/rockchip-thermal.txt b/Documentation/devicetree/bindings/thermal/rockchip-thermal.txt
> index c6aac9bcacf1..3a0a9556680e 100644
> --- a/Documentation/devicetree/bindings/thermal/rockchip-thermal.txt
> +++ b/Documentation/devicetree/bindings/thermal/rockchip-thermal.txt
> @@ -6,6 +6,7 @@ Required properties:
> "rockchip,rv1108-tsadc": found on RV1108 SoCs
> "rockchip,rk3228-tsadc": found on RK3228 SoCs
> "rockchip,rk3288-tsadc": found on RK3288 SoCs
> + "rockchip,rk3308-tsadc": found on RK3308 SoCs
> "rockchip,rk3328-tsadc": found on RK3328 SoCs
> "rockchip,rk3368-tsadc": found on RK3368 SoCs
> "rockchip,rk3399-tsadc": found on RK3399 SoCs
>
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH v1 2/3] thermal: rockchip: Support the RK3308 SoC in thermal driver
2019-11-05 3:17 ` [PATCH v1 2/3] thermal: rockchip: Support the RK3308 SoC in thermal driver Elaine Zhang
@ 2019-11-05 7:59 ` Heiko Stübner
0 siblings, 0 replies; 7+ messages in thread
From: Heiko Stübner @ 2019-11-05 7:59 UTC (permalink / raw)
To: Elaine Zhang
Cc: mark.rutland, devicetree, amit.kucheria, huangtao, linux-pm, xxx,
daniel.lezcano, linux-kernel, xf, edubezval, linux-rockchip,
robh+dt, andy.yan, rui.zhang, linux-arm-kernel
Am Dienstag, 5. November 2019, 04:17:25 CET schrieb Elaine Zhang:
> RK3308 SOC has two Temperature Sensors for CPU and GPU.
>
> Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
Reviewed-by: Heiko Stuebner <heiko@sntech.de>
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH v1 1/3] dt-bindings: rockchip-thermal: Support the RK3308 SoC compatible
2019-11-05 3:17 ` [PATCH v1 1/3] dt-bindings: rockchip-thermal: Support the RK3308 SoC compatible Elaine Zhang
2019-11-05 7:58 ` Heiko Stübner
@ 2019-11-07 0:25 ` Rob Herring
1 sibling, 0 replies; 7+ messages in thread
From: Rob Herring @ 2019-11-07 0:25 UTC (permalink / raw)
To: Elaine Zhang
Cc: mark.rutland, devicetree, amit.kucheria, daniel.lezcano,
huangtao, heiko, linux-pm, xxx, Elaine Zhang, linux-kernel, xf,
edubezval, linux-rockchip, robh+dt, andy.yan, rui.zhang,
linux-arm-kernel
On Tue, 5 Nov 2019 11:17:24 +0800, Elaine Zhang wrote:
> Add a new compatible for thermal founding on RK3308 SoCs.
>
> Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
> ---
> Documentation/devicetree/bindings/thermal/rockchip-thermal.txt | 1 +
> 1 file changed, 1 insertion(+)
>
Acked-by: Rob Herring <robh@kernel.org>
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2019-11-07 0:25 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-05 3:17 [PATCH v1 0/3] thermal: rockchip: Support the RK3308 SoC in thermal driver Elaine Zhang
2019-11-05 3:17 ` [PATCH v1 1/3] dt-bindings: rockchip-thermal: Support the RK3308 SoC compatible Elaine Zhang
2019-11-05 7:58 ` Heiko Stübner
2019-11-07 0:25 ` Rob Herring
2019-11-05 3:17 ` [PATCH v1 2/3] thermal: rockchip: Support the RK3308 SoC in thermal driver Elaine Zhang
2019-11-05 7:59 ` Heiko Stübner
2019-11-05 3:17 ` [PATCH v1 3/3] ARM64: dts: rockchip: rk3308: add tsadc node Elaine Zhang
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).