* [PATCH 0/5] thermal: rockchip: add tsadc support in thermal driver and IPA thermal control for RV1108 in dts @ 2017-08-24 10:27 Rocky Hao 2017-08-24 10:27 ` [PATCH 1/5] dt-bindings: rockchip-thermal: Support the RV1108 SoC compatible Rocky Hao ` (4 more replies) 0 siblings, 5 replies; 18+ messages in thread From: Rocky Hao @ 2017-08-24 10:27 UTC (permalink / raw) To: rui.zhang-ral2JQCrhuEAvxtiuMwx3w, edubezval-Re5JQEeQqe8AvxtiuMwx3w, heiko-4mtYJXux2i+zQB+pC5nmwQ, robh+dt-DgEjT+Ai2ygdnm+yROfE0A, mark.rutland-5wv7dgnIgG8, catalin.marinas-5wv7dgnIgG8, will.deacon-5wv7dgnIgG8 Cc: shawn.lin-TNX95d0MmH7DzftRWevZcw, cl-TNX95d0MmH7DzftRWevZcw, william.wu-TNX95d0MmH7DzftRWevZcw, linux-pm-u79uwXL29TY76Z2rM5mHXA, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, linux-kernel-u79uwXL29TY76Z2rM5mHXA, devicetree-u79uwXL29TY76Z2rM5mHXA, xxx-TNX95d0MmH7DzftRWevZcw, jay.xu-TNX95d0MmH7DzftRWevZcw, wxt-TNX95d0MmH7DzftRWevZcw, huangtao-TNX95d0MmH7DzftRWevZcw, rocky.hao-TNX95d0MmH7DzftRWevZcw This series patches add the tsadc support in thermal driver and in devicetree for RV1108. Also add thermal control with Intelligent Power Allocation (IPA) policy by default. Please refer to https://developer.arm.com/open-source/intelligent-power-allocation for more information about IPA. Rocky Hao (5): dt-bindings: rockchip-thermal: Support the RV1108 SoC compatible thermal: rockchip: Support the RV1108 SoC in thermal driver arm: dts: rockchip: add tsadc node for RV1108 SoC arm: dts: rockchip: add thermal nodes for RV1108 SoC arm: dts: rockchip: enable tsadc module on RV1108 evaluation board .../bindings/thermal/rockchip-thermal.txt | 1 + arch/arm/boot/dts/rv1108-evb.dts | 4 ++ arch/arm/boot/dts/rv1108.dtsi | 69 ++++++++++++++++++++++ drivers/thermal/rockchip_thermal.c | 67 +++++++++++++++++++++ 4 files changed, 141 insertions(+) -- 1.9.1 -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 18+ messages in thread
* [PATCH 1/5] dt-bindings: rockchip-thermal: Support the RV1108 SoC compatible 2017-08-24 10:27 [PATCH 0/5] thermal: rockchip: add tsadc support in thermal driver and IPA thermal control for RV1108 in dts Rocky Hao @ 2017-08-24 10:27 ` Rocky Hao 2017-08-31 17:57 ` Rob Herring 2017-09-15 1:49 ` Caesar Wang 2017-08-24 10:27 ` [PATCH 2/5] thermal: rockchip: Support the RV1108 SoC in thermal driver Rocky Hao ` (3 subsequent siblings) 4 siblings, 2 replies; 18+ messages in thread From: Rocky Hao @ 2017-08-24 10:27 UTC (permalink / raw) To: rui.zhang, edubezval, heiko, robh+dt, mark.rutland, catalin.marinas, will.deacon Cc: shawn.lin, cl, william.wu, linux-pm, linux-arm-kernel, linux-rockchip, linux-kernel, devicetree, xxx, jay.xu, wxt, huangtao, rocky.hao Add a new compatible for thermal founding on RV1108 SoCs. Signed-off-by: Rocky Hao <rocky.hao@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 e3a6234fb1ac..43d744e5305e 100644 --- a/Documentation/devicetree/bindings/thermal/rockchip-thermal.txt +++ b/Documentation/devicetree/bindings/thermal/rockchip-thermal.txt @@ -2,6 +2,7 @@ Required properties: - compatible : should be "rockchip,<name>-tsadc" + "rockchip,rv1108-tsadc": found on RV1108 SoCs "rockchip,rk3228-tsadc": found on RK3228 SoCs "rockchip,rk3288-tsadc": found on RK3288 SoCs "rockchip,rk3328-tsadc": found on RK3328 SoCs -- 1.9.1 ^ permalink raw reply related [flat|nested] 18+ messages in thread
* Re: [PATCH 1/5] dt-bindings: rockchip-thermal: Support the RV1108 SoC compatible 2017-08-24 10:27 ` [PATCH 1/5] dt-bindings: rockchip-thermal: Support the RV1108 SoC compatible Rocky Hao @ 2017-08-31 17:57 ` Rob Herring 2017-09-15 1:49 ` Caesar Wang 1 sibling, 0 replies; 18+ messages in thread From: Rob Herring @ 2017-08-31 17:57 UTC (permalink / raw) To: Rocky Hao Cc: rui.zhang, edubezval, heiko, mark.rutland, catalin.marinas, will.deacon, shawn.lin, cl, william.wu, linux-pm, linux-arm-kernel, linux-rockchip, linux-kernel, devicetree, xxx, jay.xu, wxt, huangtao On Thu, Aug 24, 2017 at 06:27:51PM +0800, Rocky Hao wrote: > Add a new compatible for thermal founding on RV1108 SoCs. > > Signed-off-by: Rocky Hao <rocky.hao@rock-chips.com> > --- > Documentation/devicetree/bindings/thermal/rockchip-thermal.txt | 1 + > 1 file changed, 1 insertion(+) Acked-by: Rob Herring <robh@kernel.org> ^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH 1/5] dt-bindings: rockchip-thermal: Support the RV1108 SoC compatible 2017-08-24 10:27 ` [PATCH 1/5] dt-bindings: rockchip-thermal: Support the RV1108 SoC compatible Rocky Hao 2017-08-31 17:57 ` Rob Herring @ 2017-09-15 1:49 ` Caesar Wang [not found] ` <12073627-41af-3480-6379-839e07f5e8f3-TNX95d0MmH7DzftRWevZcw@public.gmane.org> 1 sibling, 1 reply; 18+ messages in thread From: Caesar Wang @ 2017-09-15 1:49 UTC (permalink / raw) To: Rocky Hao Cc: rui.zhang, edubezval, heiko, robh+dt, mark.rutland, catalin.marinas, will.deacon, huangtao, devicetree, linux-pm, shawn.lin, linux-kernel, linux-rockchip, cl, william.wu, jay.xu, xxx, linux-arm-kernel, wxt Hi Rocky, 在 2017年08月24日 18:27, Rocky Hao 写道: > Add a new compatible for thermal founding on RV1108 SoCs. > > Signed-off-by: Rocky Hao <rocky.hao@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 e3a6234fb1ac..43d744e5305e 100644 > --- a/Documentation/devicetree/bindings/thermal/rockchip-thermal.txt > +++ b/Documentation/devicetree/bindings/thermal/rockchip-thermal.txt > @@ -2,6 +2,7 @@ > > Required properties: > - compatible : should be "rockchip,<name>-tsadc" > + "rockchip,rv1108-tsadc": found on RV1108 SoCs According to the order, we should put the string after the "rockchip,rk3399-tsadc"..., not here. > "rockchip,rk3228-tsadc": found on RK3228 SoCs > "rockchip,rk3288-tsadc": found on RK3288 SoCs > "rockchip,rk3328-tsadc": found on RK3328 SoCs ^ permalink raw reply [flat|nested] 18+ messages in thread
[parent not found: <12073627-41af-3480-6379-839e07f5e8f3-TNX95d0MmH7DzftRWevZcw@public.gmane.org>]
* Re: [PATCH 1/5] dt-bindings: rockchip-thermal: Support the RV1108 SoC compatible [not found] ` <12073627-41af-3480-6379-839e07f5e8f3-TNX95d0MmH7DzftRWevZcw@public.gmane.org> @ 2017-09-15 3:20 ` rocky.hao 0 siblings, 0 replies; 18+ messages in thread From: rocky.hao @ 2017-09-15 3:20 UTC (permalink / raw) To: Caesar Wang Cc: rui.zhang-ral2JQCrhuEAvxtiuMwx3w, edubezval-Re5JQEeQqe8AvxtiuMwx3w, heiko-4mtYJXux2i+zQB+pC5nmwQ, robh+dt-DgEjT+Ai2ygdnm+yROfE0A, mark.rutland-5wv7dgnIgG8, catalin.marinas-5wv7dgnIgG8, will.deacon-5wv7dgnIgG8, huangtao-TNX95d0MmH7DzftRWevZcw, devicetree-u79uwXL29TY76Z2rM5mHXA, linux-pm-u79uwXL29TY76Z2rM5mHXA, shawn.lin-TNX95d0MmH7DzftRWevZcw, linux-kernel-u79uwXL29TY76Z2rM5mHXA, linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, cl-TNX95d0MmH7DzftRWevZcw, william.wu-TNX95d0MmH7DzftRWevZcw, jay.xu-TNX95d0MmH7DzftRWevZcw, xxx-TNX95d0MmH7DzftRWevZcw, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r Hi Caesar, Thanks for the reply. 在 2017/9/15 9:49, Caesar Wang 写道: > Hi Rocky, > > 在 2017年08月24日 18:27, Rocky Hao 写道: >> Add a new compatible for thermal founding on RV1108 SoCs. >> >> Signed-off-by: Rocky Hao <rocky.hao-TNX95d0MmH7DzftRWevZcw@public.gmane.org> >> --- >> 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 e3a6234fb1ac..43d744e5305e 100644 >> --- a/Documentation/devicetree/bindings/thermal/rockchip-thermal.txt >> +++ b/Documentation/devicetree/bindings/thermal/rockchip-thermal.txt >> @@ -2,6 +2,7 @@ >> Required properties: >> - compatible : should be "rockchip,<name>-tsadc" >> + "rockchip,rv1108-tsadc": found on RV1108 SoCs > > According to the order, we should put the string after the > "rockchip,rk3399-tsadc"..., not here. It is okay for me. >> "rockchip,rk3228-tsadc": found on RK3228 SoCs >> "rockchip,rk3288-tsadc": found on RK3288 SoCs >> "rockchip,rk3328-tsadc": found on RK3328 SoCs > > > > -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 18+ messages in thread
* [PATCH 2/5] thermal: rockchip: Support the RV1108 SoC in thermal driver 2017-08-24 10:27 [PATCH 0/5] thermal: rockchip: add tsadc support in thermal driver and IPA thermal control for RV1108 in dts Rocky Hao 2017-08-24 10:27 ` [PATCH 1/5] dt-bindings: rockchip-thermal: Support the RV1108 SoC compatible Rocky Hao @ 2017-08-24 10:27 ` Rocky Hao 2017-09-15 2:10 ` Caesar Wang [not found] ` <1503570475-7850-1-git-send-email-rocky.hao-TNX95d0MmH7DzftRWevZcw@public.gmane.org> ` (2 subsequent siblings) 4 siblings, 1 reply; 18+ messages in thread From: Rocky Hao @ 2017-08-24 10:27 UTC (permalink / raw) To: rui.zhang, edubezval, heiko, robh+dt, mark.rutland, catalin.marinas, will.deacon Cc: huangtao, devicetree, linux-pm, shawn.lin, linux-kernel, linux-rockchip, cl, william.wu, rocky.hao, jay.xu, xxx, linux-arm-kernel, wxt RV1108 SOC has one Temperature Sensor for CPU. Signed-off-by: Rocky Hao <rocky.hao@rock-chips.com> --- drivers/thermal/rockchip_thermal.c | 67 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 67 insertions(+) diff --git a/drivers/thermal/rockchip_thermal.c b/drivers/thermal/rockchip_thermal.c index 9da3e1819210..299a8ade71fa 100644 --- a/drivers/thermal/rockchip_thermal.c +++ b/drivers/thermal/rockchip_thermal.c @@ -242,6 +242,45 @@ struct tsadc_table { int temp; }; +static const struct tsadc_table rv1108_table[] = { + {0, -40000}, + {374, -40000}, + {382, -35000}, + {389, -30000}, + {397, -25000}, + {405, -20000}, + {413, -15000}, + {421, -10000}, + {429, -5000}, + {436, 0}, + {444, 5000}, + {452, 10000}, + {460, 15000}, + {468, 20000}, + {476, 25000}, + {483, 30000}, + {491, 35000}, + {499, 40000}, + {507, 45000}, + {515, 50000}, + {523, 55000}, + {531, 60000}, + {539, 65000}, + {547, 70000}, + {555, 75000}, + {562, 80000}, + {570, 85000}, + {578, 90000}, + {586, 95000}, + {594, 100000}, + {602, 105000}, + {610, 110000}, + {618, 115000}, + {626, 120000}, + {634, 125000}, + {TSADCV2_DATA_MASK, 125000}, +}; + static const struct tsadc_table rk3228_code_table[] = { {0, -40000}, {588, -40000}, @@ -779,6 +818,30 @@ static void rk_tsadcv2_tshut_mode(int chn, void __iomem *regs, writel_relaxed(val, regs + TSADCV2_INT_EN); } +static const struct rockchip_tsadc_chip rv1108_tsadc_data = { + .chn_id[SENSOR_CPU] = 0, /* cpu sensor is channel 0 */ + .chn_num = 1, /* one channel for tsadc */ + + .tshut_mode = TSHUT_MODE_GPIO, /* default TSHUT via GPIO give PMIC */ + .tshut_polarity = TSHUT_LOW_ACTIVE, /* default TSHUT LOW ACTIVE */ + .tshut_temp = 95000, + + .initialize = rk_tsadcv2_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 = rv1108_table, + .length = ARRAY_SIZE(rv1108_table), + .data_mask = TSADCV2_DATA_MASK, + .mode = ADC_INCREMENT, + }, +}; + static const struct rockchip_tsadc_chip rk3228_tsadc_data = { .chn_id[SENSOR_CPU] = 0, /* cpu sensor is channel 0 */ .chn_num = 1, /* one channel for tsadc */ @@ -928,6 +991,10 @@ static void rk_tsadcv2_tshut_mode(int chn, void __iomem *regs, static const struct of_device_id of_rockchip_thermal_match[] = { { + .compatible = "rockchip,rv1108-tsadc", + .data = (void *)&rv1108_tsadc_data, + }, + { .compatible = "rockchip,rk3228-tsadc", .data = (void *)&rk3228_tsadc_data, }, -- 1.9.1 ^ permalink raw reply related [flat|nested] 18+ messages in thread
* Re: [PATCH 2/5] thermal: rockchip: Support the RV1108 SoC in thermal driver 2017-08-24 10:27 ` [PATCH 2/5] thermal: rockchip: Support the RV1108 SoC in thermal driver Rocky Hao @ 2017-09-15 2:10 ` Caesar Wang [not found] ` <341e8e9b-21c7-f418-b744-8c18737cb026-TNX95d0MmH7DzftRWevZcw@public.gmane.org> 0 siblings, 1 reply; 18+ messages in thread From: Caesar Wang @ 2017-09-15 2:10 UTC (permalink / raw) To: Rocky Hao Cc: mark.rutland, huangtao, heiko, devicetree, catalin.marinas, shawn.lin, linux-pm, will.deacon, linux-kernel, edubezval, linux-rockchip, robh+dt, linux-arm-kernel, william.wu, rui.zhang, jay.xu, xxx, cl, wxt Hi Rocky, 在 2017年08月24日 18:27, Rocky Hao 写道: > RV1108 SOC has one Temperature Sensor for CPU. > > Signed-off-by: Rocky Hao <rocky.hao@rock-chips.com> > --- > drivers/thermal/rockchip_thermal.c | 67 ++++++++++++++++++++++++++++++++++++++ > 1 file changed, 67 insertions(+) > > diff --git a/drivers/thermal/rockchip_thermal.c b/drivers/thermal/rockchip_thermal.c > index 9da3e1819210..299a8ade71fa 100644 > --- a/drivers/thermal/rockchip_thermal.c > +++ b/drivers/thermal/rockchip_thermal.c > @@ -242,6 +242,45 @@ struct tsadc_table { > int temp; > }; > > +static const struct tsadc_table rv1108_table[] = { > + {0, -40000}, > + {374, -40000}, > + {382, -35000}, > + {389, -30000}, > + {397, -25000}, > + {405, -20000}, > + {413, -15000}, > + {421, -10000}, > + {429, -5000}, > + {436, 0}, > + {444, 5000}, > + {452, 10000}, > + {460, 15000}, > + {468, 20000}, > + {476, 25000}, > + {483, 30000}, > + {491, 35000}, > + {499, 40000}, > + {507, 45000}, > + {515, 50000}, > + {523, 55000}, > + {531, 60000}, > + {539, 65000}, > + {547, 70000}, > + {555, 75000}, > + {562, 80000}, > + {570, 85000}, > + {578, 90000}, > + {586, 95000}, > + {594, 100000}, > + {602, 105000}, > + {610, 110000}, > + {618, 115000}, > + {626, 120000}, > + {634, 125000}, > + {TSADCV2_DATA_MASK, 125000}, > +}; > + From the RV1108 TRM said, this table was used for the negative temperature coefficient. But the default table is positive temperature coefficient, why? I think you don't need to use the negative temperature coefficient. > static const struct tsadc_table rk3228_code_table[] = { > {0, -40000}, > {588, -40000}, > @@ -779,6 +818,30 @@ static void rk_tsadcv2_tshut_mode(int chn, void __iomem *regs, > writel_relaxed(val, regs + TSADCV2_INT_EN); > } > > +static const struct rockchip_tsadc_chip rv1108_tsadc_data = { > + .chn_id[SENSOR_CPU] = 0, /* cpu sensor is channel 0 */ > + .chn_num = 1, /* one channel for tsadc */ > + > + .tshut_mode = TSHUT_MODE_GPIO, /* default TSHUT via GPIO give PMIC */ > + .tshut_polarity = TSHUT_LOW_ACTIVE, /* default TSHUT LOW ACTIVE */ > + .tshut_temp = 95000, > + > + .initialize = rk_tsadcv2_initialize, > + .irq_ack = rk_tsadcv3_irq_ack, > + .control = rk_tsadcv3_control, If you will use the positive temperature coefficient, we need change it. .control = rk_tsadcv2_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 = rv1108_table, > + .length = ARRAY_SIZE(rv1108_table), > + .data_mask = TSADCV2_DATA_MASK, > + .mode = ADC_INCREMENT, Ditto -Caesar > + }, > +}; > + > static const struct rockchip_tsadc_chip rk3228_tsadc_data = { > .chn_id[SENSOR_CPU] = 0, /* cpu sensor is channel 0 */ > .chn_num = 1, /* one channel for tsadc */ > @@ -928,6 +991,10 @@ static void rk_tsadcv2_tshut_mode(int chn, void __iomem *regs, > > static const struct of_device_id of_rockchip_thermal_match[] = { > { > + .compatible = "rockchip,rv1108-tsadc", > + .data = (void *)&rv1108_tsadc_data, > + }, > + { > .compatible = "rockchip,rk3228-tsadc", > .data = (void *)&rk3228_tsadc_data, > }, _______________________________________________ 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] 18+ messages in thread
[parent not found: <341e8e9b-21c7-f418-b744-8c18737cb026-TNX95d0MmH7DzftRWevZcw@public.gmane.org>]
* Re: [PATCH 2/5] thermal: rockchip: Support the RV1108 SoC in thermal driver [not found] ` <341e8e9b-21c7-f418-b744-8c18737cb026-TNX95d0MmH7DzftRWevZcw@public.gmane.org> @ 2017-09-15 3:19 ` Caesar Wang 0 siblings, 0 replies; 18+ messages in thread From: Caesar Wang @ 2017-09-15 3:19 UTC (permalink / raw) To: Caesar Wang Cc: Rocky Hao, mark.rutland-5wv7dgnIgG8, huangtao-TNX95d0MmH7DzftRWevZcw, heiko-4mtYJXux2i+zQB+pC5nmwQ, devicetree-u79uwXL29TY76Z2rM5mHXA, catalin.marinas-5wv7dgnIgG8, shawn.lin-TNX95d0MmH7DzftRWevZcw, linux-pm-u79uwXL29TY76Z2rM5mHXA, will.deacon-5wv7dgnIgG8, linux-kernel-u79uwXL29TY76Z2rM5mHXA, edubezval-Re5JQEeQqe8AvxtiuMwx3w, linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, robh+dt-DgEjT+Ai2ygdnm+yROfE0A, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, william.wu-TNX95d0MmH7DzftRWevZcw, rui.zhang-ral2JQCrhuEAvxtiuMwx3w, jay.xu-TNX95d0MmH7DzftRWevZcw, xxx-TNX95d0MmH7DzftRWevZcw, cl-TNX95d0MmH7DzftRWevZcw 在 2017年09月15日 10:10, Caesar Wang 写道: > Hi Rocky, > > 在 2017年08月24日 18:27, Rocky Hao 写道: >> RV1108 SOC has one Temperature Sensor for CPU. >> >> Signed-off-by: Rocky Hao <rocky.hao-TNX95d0MmH7DzftRWevZcw@public.gmane.org> Reviewed-by: Caesar Wang <wxt-TNX95d0MmH7DzftRWevZcw@public.gmane.org> >> --- >> drivers/thermal/rockchip_thermal.c | 67 >> ++++++++++++++++++++++++++++++++++++++ >> 1 file changed, 67 insertions(+) >> >> diff --git a/drivers/thermal/rockchip_thermal.c >> b/drivers/thermal/rockchip_thermal.c >> index 9da3e1819210..299a8ade71fa 100644 >> --- a/drivers/thermal/rockchip_thermal.c >> +++ b/drivers/thermal/rockchip_thermal.c >> @@ -242,6 +242,45 @@ struct tsadc_table { >> int temp; >> }; >> +static const struct tsadc_table rv1108_table[] = { >> + {0, -40000}, >> + {374, -40000}, >> + {382, -35000}, >> + {389, -30000}, >> + {397, -25000}, >> + {405, -20000}, >> + {413, -15000}, >> + {421, -10000}, >> + {429, -5000}, >> + {436, 0}, >> + {444, 5000}, >> + {452, 10000}, >> + {460, 15000}, >> + {468, 20000}, >> + {476, 25000}, >> + {483, 30000}, >> + {491, 35000}, >> + {499, 40000}, >> + {507, 45000}, >> + {515, 50000}, >> + {523, 55000}, >> + {531, 60000}, >> + {539, 65000}, >> + {547, 70000}, >> + {555, 75000}, >> + {562, 80000}, >> + {570, 85000}, >> + {578, 90000}, >> + {586, 95000}, >> + {594, 100000}, >> + {602, 105000}, >> + {610, 110000}, >> + {618, 115000}, >> + {626, 120000}, >> + {634, 125000}, >> + {TSADCV2_DATA_MASK, 125000}, >> +}; >> + > > From the RV1108 TRM said, this table was used for the negative > temperature coefficient. > But the default table is positive temperature coefficient, why? > I think you don't need to use the negative temperature coefficient. Sorry, the RV1108 TRM document is old on my hand, from the lastest document Rockchip RV1108 TRM V1.0 Part1-20170505.pdf said, The RV1108 is negative temprature coefficient, so please set this bit as 1'b1 :( > >> static const struct tsadc_table rk3228_code_table[] = { >> {0, -40000}, >> {588, -40000}, >> @@ -779,6 +818,30 @@ static void rk_tsadcv2_tshut_mode(int chn, void >> __iomem *regs, >> writel_relaxed(val, regs + TSADCV2_INT_EN); >> } >> +static const struct rockchip_tsadc_chip rv1108_tsadc_data = { >> + .chn_id[SENSOR_CPU] = 0, /* cpu sensor is channel 0 */ >> + .chn_num = 1, /* one channel for tsadc */ >> + >> + .tshut_mode = TSHUT_MODE_GPIO, /* default TSHUT via GPIO give >> PMIC */ >> + .tshut_polarity = TSHUT_LOW_ACTIVE, /* default TSHUT LOW ACTIVE */ >> + .tshut_temp = 95000, >> + >> + .initialize = rk_tsadcv2_initialize, >> + .irq_ack = rk_tsadcv3_irq_ack, >> + .control = rk_tsadcv3_control, > > If you will use the positive temperature coefficient, we need change it. > > .control = rk_tsadcv2_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 = rv1108_table, >> + .length = ARRAY_SIZE(rv1108_table), >> + .data_mask = TSADCV2_DATA_MASK, >> + .mode = ADC_INCREMENT, > > Ditto > > -Caesar > > >> + }, >> +}; >> + >> static const struct rockchip_tsadc_chip rk3228_tsadc_data = { >> .chn_id[SENSOR_CPU] = 0, /* cpu sensor is channel 0 */ >> .chn_num = 1, /* one channel for tsadc */ >> @@ -928,6 +991,10 @@ static void rk_tsadcv2_tshut_mode(int chn, void >> __iomem *regs, >> static const struct of_device_id of_rockchip_thermal_match[] = { >> { >> + .compatible = "rockchip,rv1108-tsadc", >> + .data = (void *)&rv1108_tsadc_data, >> + }, >> + { >> .compatible = "rockchip,rk3228-tsadc", >> .data = (void *)&rk3228_tsadc_data, >> }, > > > > _______________________________________________ > Linux-rockchip mailing list > Linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org > http://lists.infradead.org/mailman/listinfo/linux-rockchip -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 18+ messages in thread
[parent not found: <1503570475-7850-1-git-send-email-rocky.hao-TNX95d0MmH7DzftRWevZcw@public.gmane.org>]
* [PATCH 3/5] arm: dts: rockchip: add tsadc node for RV1108 SoC [not found] ` <1503570475-7850-1-git-send-email-rocky.hao-TNX95d0MmH7DzftRWevZcw@public.gmane.org> @ 2017-08-24 10:27 ` Rocky Hao 2017-09-15 2:25 ` Caesar Wang 2017-10-17 19:00 ` Heiko Stuebner 2017-08-24 10:27 ` [PATCH 4/5] arm: dts: rockchip: add thermal nodes " Rocky Hao 1 sibling, 2 replies; 18+ messages in thread From: Rocky Hao @ 2017-08-24 10:27 UTC (permalink / raw) To: rui.zhang-ral2JQCrhuEAvxtiuMwx3w, edubezval-Re5JQEeQqe8AvxtiuMwx3w, heiko-4mtYJXux2i+zQB+pC5nmwQ, robh+dt-DgEjT+Ai2ygdnm+yROfE0A, mark.rutland-5wv7dgnIgG8, catalin.marinas-5wv7dgnIgG8, will.deacon-5wv7dgnIgG8 Cc: shawn.lin-TNX95d0MmH7DzftRWevZcw, cl-TNX95d0MmH7DzftRWevZcw, william.wu-TNX95d0MmH7DzftRWevZcw, linux-pm-u79uwXL29TY76Z2rM5mHXA, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, linux-kernel-u79uwXL29TY76Z2rM5mHXA, devicetree-u79uwXL29TY76Z2rM5mHXA, xxx-TNX95d0MmH7DzftRWevZcw, jay.xu-TNX95d0MmH7DzftRWevZcw, wxt-TNX95d0MmH7DzftRWevZcw, huangtao-TNX95d0MmH7DzftRWevZcw, rocky.hao-TNX95d0MmH7DzftRWevZcw Add tsadc needed main information for RV1108 SoC. 750000Hz is the max clock rate supported by tsadc module. Signed-off-by: Rocky Hao <rocky.hao-TNX95d0MmH7DzftRWevZcw@public.gmane.org> --- arch/arm/boot/dts/rv1108.dtsi | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/arch/arm/boot/dts/rv1108.dtsi b/arch/arm/boot/dts/rv1108.dtsi index 25fab0b80f53..dbdd8c2180e7 100644 --- a/arch/arm/boot/dts/rv1108.dtsi +++ b/arch/arm/boot/dts/rv1108.dtsi @@ -275,6 +275,25 @@ status = "disabled"; }; + tsadc: tsadc@10370000 { + compatible = "rockchip,rv1108-tsadc"; + reg = <0x10370000 0x100>; + interrupts = <GIC_SPI 47 IRQ_TYPE_LEVEL_HIGH>; + assigned-clocks = <&cru SCLK_TSADC>; + assigned-clock-rates = <750000>; + clocks = <&cru SCLK_TSADC>, <&cru PCLK_TSADC>; + clock-names = "tsadc", "apb_pclk"; + pinctrl-names = "init", "default", "sleep"; + pinctrl-0 = <&otp_gpio>; + pinctrl-1 = <&otp_out>; + pinctrl-2 = <&otp_gpio>; + resets = <&cru SRST_TSADC>; + reset-names = "tsadc-apb"; + rockchip,hw-tshut-temp = <120000>; + #thermal-sensor-cells = <1>; + status = "disabled"; + }; + adc: adc@1038c000 { compatible = "rockchip,rv1108-saradc", "rockchip,rk3399-saradc"; reg = <0x1038c000 0x100>; @@ -642,6 +661,16 @@ }; }; + tsadc { + otp_out: otp-out { + rockchip,pins = <0 RK_PB7 RK_FUNC_1 &pcfg_pull_none>; + }; + + otp_gpio: otp-gpio { + rockchip,pins = <0 RK_PB7 RK_FUNC_GPIO &pcfg_pull_none>; + }; + }; + uart0 { uart0_xfer: uart0-xfer { rockchip,pins = <3 RK_PA6 RK_FUNC_1 &pcfg_pull_up>, -- 1.9.1 -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply related [flat|nested] 18+ messages in thread
* Re: [PATCH 3/5] arm: dts: rockchip: add tsadc node for RV1108 SoC 2017-08-24 10:27 ` [PATCH 3/5] arm: dts: rockchip: add tsadc node for RV1108 SoC Rocky Hao @ 2017-09-15 2:25 ` Caesar Wang 2017-09-15 3:52 ` rocky.hao 2017-10-17 19:00 ` Heiko Stuebner 1 sibling, 1 reply; 18+ messages in thread From: Caesar Wang @ 2017-09-15 2:25 UTC (permalink / raw) To: Rocky Hao Cc: rui.zhang, edubezval, heiko, robh+dt, mark.rutland, catalin.marinas, will.deacon, huangtao, devicetree, linux-pm, shawn.lin, linux-kernel, linux-rockchip, cl, william.wu, jay.xu, xxx, linux-arm-kernel, wxt Rocky, 在 2017年08月24日 18:27, Rocky Hao 写道: > Add tsadc needed main information for RV1108 SoC. > 750000Hz is the max clock rate supported by tsadc module. > > Signed-off-by: Rocky Hao <rocky.hao@rock-chips.com> > --- > arch/arm/boot/dts/rv1108.dtsi | 29 +++++++++++++++++++++++++++++ > 1 file changed, 29 insertions(+) > > diff --git a/arch/arm/boot/dts/rv1108.dtsi b/arch/arm/boot/dts/rv1108.dtsi > index 25fab0b80f53..dbdd8c2180e7 100644 > --- a/arch/arm/boot/dts/rv1108.dtsi > +++ b/arch/arm/boot/dts/rv1108.dtsi > @@ -275,6 +275,25 @@ > status = "disabled"; > }; > > + tsadc: tsadc@10370000 { > + compatible = "rockchip,rv1108-tsadc"; > + reg = <0x10370000 0x100>; > + interrupts = <GIC_SPI 47 IRQ_TYPE_LEVEL_HIGH>; > + assigned-clocks = <&cru SCLK_TSADC>; > + assigned-clock-rates = <750000>; > + clocks = <&cru SCLK_TSADC>, <&cru PCLK_TSADC>; > + clock-names = "tsadc", "apb_pclk"; > + pinctrl-names = "init", "default", "sleep"; > + pinctrl-0 = <&otp_gpio>; > + pinctrl-1 = <&otp_out>; > + pinctrl-2 = <&otp_gpio>; > + resets = <&cru SRST_TSADC>; > + reset-names = "tsadc-apb"; > + rockchip,hw-tshut-temp = <120000>; From the Patch[4/5], you set the critial temperature is 95 degree. I will suggest the Tshut temperature is 100 degree. Think about the the peripherial devices, the 120 degree will damage some chips. > + #thermal-sensor-cells = <1>; > + status = "disabled"; > + }; > + > adc: adc@1038c000 { > compatible = "rockchip,rv1108-saradc", "rockchip,rk3399-saradc"; > reg = <0x1038c000 0x100>; > @@ -642,6 +661,16 @@ > }; > }; > > + tsadc { > + otp_out: otp-out { > + rockchip,pins = <0 RK_PB7 RK_FUNC_1 &pcfg_pull_none>; > + }; > + > + otp_gpio: otp-gpio { > + rockchip,pins = <0 RK_PB7 RK_FUNC_GPIO &pcfg_pull_none>; > + }; > + }; > + > uart0 { > uart0_xfer: uart0-xfer { > rockchip,pins = <3 RK_PA6 RK_FUNC_1 &pcfg_pull_up>, ^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH 3/5] arm: dts: rockchip: add tsadc node for RV1108 SoC 2017-09-15 2:25 ` Caesar Wang @ 2017-09-15 3:52 ` rocky.hao 0 siblings, 0 replies; 18+ messages in thread From: rocky.hao @ 2017-09-15 3:52 UTC (permalink / raw) To: Caesar Wang Cc: rui.zhang, edubezval, heiko, robh+dt, mark.rutland, catalin.marinas, will.deacon, huangtao, devicetree, linux-pm, shawn.lin, linux-kernel, linux-rockchip, cl, william.wu, jay.xu, xxx, linux-arm-kernel Hi Caesar, Thanks for the reply. 在 2017/9/15 10:25, Caesar Wang 写道: > Rocky, > > 在 2017年08月24日 18:27, Rocky Hao 写道: >> Add tsadc needed main information for RV1108 SoC. >> 750000Hz is the max clock rate supported by tsadc module. >> >> Signed-off-by: Rocky Hao <rocky.hao@rock-chips.com> >> --- >> arch/arm/boot/dts/rv1108.dtsi | 29 +++++++++++++++++++++++++++++ >> 1 file changed, 29 insertions(+) >> >> diff --git a/arch/arm/boot/dts/rv1108.dtsi >> b/arch/arm/boot/dts/rv1108.dtsi >> index 25fab0b80f53..dbdd8c2180e7 100644 >> --- a/arch/arm/boot/dts/rv1108.dtsi >> +++ b/arch/arm/boot/dts/rv1108.dtsi >> @@ -275,6 +275,25 @@ >> status = "disabled"; >> }; >> + tsadc: tsadc@10370000 { >> + compatible = "rockchip,rv1108-tsadc"; >> + reg = <0x10370000 0x100>; >> + interrupts = <GIC_SPI 47 IRQ_TYPE_LEVEL_HIGH>; >> + assigned-clocks = <&cru SCLK_TSADC>; >> + assigned-clock-rates = <750000>; >> + clocks = <&cru SCLK_TSADC>, <&cru PCLK_TSADC>; >> + clock-names = "tsadc", "apb_pclk"; >> + pinctrl-names = "init", "default", "sleep"; >> + pinctrl-0 = <&otp_gpio>; >> + pinctrl-1 = <&otp_out>; >> + pinctrl-2 = <&otp_gpio>; >> + resets = <&cru SRST_TSADC>; >> + reset-names = "tsadc-apb"; >> + rockchip,hw-tshut-temp = <120000>; > > From the Patch[4/5], you set the critial temperature is 95 degree. I > will suggest the Tshut temperature is 100 degree. Setting rockchip,hw-tshut-temp = <120000>; is not a problem. Maybe we should change the critial temperature (soc_crit: soc-crit) to 115 degree. I will explain more in another thread Patch[4/5] arm: dts: rockchip: add thermal nodes for RV1108 SoC @ https://patchwork.kernel.org/patch/9919757/ > Think about the the peripherial devices, the 120 degree will damage > some chips. > >> + #thermal-sensor-cells = <1>; >> + status = "disabled"; >> + }; >> + >> adc: adc@1038c000 { >> compatible = "rockchip,rv1108-saradc", >> "rockchip,rk3399-saradc"; >> reg = <0x1038c000 0x100>; >> @@ -642,6 +661,16 @@ >> }; >> }; >> + tsadc { >> + otp_out: otp-out { >> + rockchip,pins = <0 RK_PB7 RK_FUNC_1 &pcfg_pull_none>; >> + }; >> + >> + otp_gpio: otp-gpio { >> + rockchip,pins = <0 RK_PB7 RK_FUNC_GPIO &pcfg_pull_none>; >> + }; >> + }; >> + >> uart0 { >> uart0_xfer: uart0-xfer { >> rockchip,pins = <3 RK_PA6 RK_FUNC_1 &pcfg_pull_up>, > > > > ^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH 3/5] arm: dts: rockchip: add tsadc node for RV1108 SoC 2017-08-24 10:27 ` [PATCH 3/5] arm: dts: rockchip: add tsadc node for RV1108 SoC Rocky Hao 2017-09-15 2:25 ` Caesar Wang @ 2017-10-17 19:00 ` Heiko Stuebner 1 sibling, 0 replies; 18+ messages in thread From: Heiko Stuebner @ 2017-10-17 19:00 UTC (permalink / raw) To: Rocky Hao Cc: rui.zhang, edubezval, robh+dt, mark.rutland, catalin.marinas, will.deacon, shawn.lin, cl, william.wu, linux-pm, linux-arm-kernel, linux-rockchip, linux-kernel, devicetree, xxx, jay.xu, wxt, huangtao Am Donnerstag, 24. August 2017, 18:27:53 CEST schrieb Rocky Hao: > Add tsadc needed main information for RV1108 SoC. > 750000Hz is the max clock rate supported by tsadc module. > > Signed-off-by: Rocky Hao <rocky.hao@rock-chips.com> applied for 4.15 with Eduardo's Ack. Please make further adjustments for things like temperatures in follow-up patches. Thanks Heiko ^ permalink raw reply [flat|nested] 18+ messages in thread
* [PATCH 4/5] arm: dts: rockchip: add thermal nodes for RV1108 SoC [not found] ` <1503570475-7850-1-git-send-email-rocky.hao-TNX95d0MmH7DzftRWevZcw@public.gmane.org> 2017-08-24 10:27 ` [PATCH 3/5] arm: dts: rockchip: add tsadc node for RV1108 SoC Rocky Hao @ 2017-08-24 10:27 ` Rocky Hao 2017-09-15 6:32 ` rocky.hao [not found] ` <1503570475-7850-5-git-send-email-rocky.hao-TNX95d0MmH7DzftRWevZcw@public.gmane.org> 1 sibling, 2 replies; 18+ messages in thread From: Rocky Hao @ 2017-08-24 10:27 UTC (permalink / raw) To: rui.zhang-ral2JQCrhuEAvxtiuMwx3w, edubezval-Re5JQEeQqe8AvxtiuMwx3w, heiko-4mtYJXux2i+zQB+pC5nmwQ, robh+dt-DgEjT+Ai2ygdnm+yROfE0A, mark.rutland-5wv7dgnIgG8, catalin.marinas-5wv7dgnIgG8, will.deacon-5wv7dgnIgG8 Cc: huangtao-TNX95d0MmH7DzftRWevZcw, devicetree-u79uwXL29TY76Z2rM5mHXA, linux-pm-u79uwXL29TY76Z2rM5mHXA, shawn.lin-TNX95d0MmH7DzftRWevZcw, linux-kernel-u79uwXL29TY76Z2rM5mHXA, linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, cl-TNX95d0MmH7DzftRWevZcw, william.wu-TNX95d0MmH7DzftRWevZcw, rocky.hao-TNX95d0MmH7DzftRWevZcw, jay.xu-TNX95d0MmH7DzftRWevZcw, xxx-TNX95d0MmH7DzftRWevZcw, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, wxt-TNX95d0MmH7DzftRWevZcw Add thermal zone and dynamic CPU power coefficients for RV1108 Signed-off-by: Rocky Hao <rocky.hao-TNX95d0MmH7DzftRWevZcw@public.gmane.org> --- arch/arm/boot/dts/rv1108.dtsi | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/arch/arm/boot/dts/rv1108.dtsi b/arch/arm/boot/dts/rv1108.dtsi index dbdd8c2180e7..cae920b6a145 100644 --- a/arch/arm/boot/dts/rv1108.dtsi +++ b/arch/arm/boot/dts/rv1108.dtsi @@ -43,6 +43,7 @@ #include <dt-bindings/interrupt-controller/arm-gic.h> #include <dt-bindings/clock/rv1108-cru.h> #include <dt-bindings/pinctrl/rockchip.h> +#include <dt-bindings/thermal/thermal.h> / { #address-cells = <1>; #size-cells = <1>; @@ -69,6 +70,8 @@ device_type = "cpu"; compatible = "arm,cortex-a7"; reg = <0xf00>; + #cooling-cells = <2>; /* min followed by max */ + dynamic-power-coefficient = <75>; }; }; @@ -275,6 +278,43 @@ status = "disabled"; }; + thermal-zones { + soc_thermal: soc-thermal { + polling-delay-passive = <20>; + polling-delay = <1000>; + sustainable-power = <50>; + + thermal-sensors = <&tsadc 0>; + + trips { + threshold: trip-point0 { + temperature = <70000>; + hysteresis = <2000>; + type = "passive"; + }; + target: trip-point1 { + temperature = <85000>; + hysteresis = <2000>; + type = "passive"; + }; + soc_crit: soc-crit { + temperature = <95000>; + hysteresis = <2000>; + type = "critical"; + }; + }; + + cooling-maps { + map0 { + trip = <&target>; + cooling-device = <&cpu0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; + contribution = <4096>; + }; + }; + }; + + }; + tsadc: tsadc@10370000 { compatible = "rockchip,rv1108-tsadc"; reg = <0x10370000 0x100>; -- 1.9.1 ^ permalink raw reply related [flat|nested] 18+ messages in thread
* Re: [PATCH 4/5] arm: dts: rockchip: add thermal nodes for RV1108 SoC 2017-08-24 10:27 ` [PATCH 4/5] arm: dts: rockchip: add thermal nodes " Rocky Hao @ 2017-09-15 6:32 ` rocky.hao [not found] ` <1503570475-7850-5-git-send-email-rocky.hao-TNX95d0MmH7DzftRWevZcw@public.gmane.org> 1 sibling, 0 replies; 18+ messages in thread From: rocky.hao @ 2017-09-15 6:32 UTC (permalink / raw) To: rui.zhang, edubezval, heiko, robh+dt, mark.rutland, catalin.marinas, will.deacon Cc: shawn.lin, cl, william.wu, linux-pm, linux-arm-kernel, linux-rockchip, linux-kernel, devicetree, xxx, jay.xu, wxt, huangtao 在 2017/8/24 18:27, Rocky Hao 写道: > Add thermal zone and dynamic CPU power coefficients for RV1108 > > Signed-off-by: Rocky Hao <rocky.hao@rock-chips.com> > --- > arch/arm/boot/dts/rv1108.dtsi | 40 ++++++++++++++++++++++++++++++++++++++++ > 1 file changed, 40 insertions(+) > > diff --git a/arch/arm/boot/dts/rv1108.dtsi b/arch/arm/boot/dts/rv1108.dtsi > index dbdd8c2180e7..cae920b6a145 100644 > --- a/arch/arm/boot/dts/rv1108.dtsi > +++ b/arch/arm/boot/dts/rv1108.dtsi > @@ -43,6 +43,7 @@ > #include <dt-bindings/interrupt-controller/arm-gic.h> > #include <dt-bindings/clock/rv1108-cru.h> > #include <dt-bindings/pinctrl/rockchip.h> > +#include <dt-bindings/thermal/thermal.h> > / { > #address-cells = <1>; > #size-cells = <1>; > @@ -69,6 +70,8 @@ > device_type = "cpu"; > compatible = "arm,cortex-a7"; > reg = <0xf00>; > + #cooling-cells = <2>; /* min followed by max */ > + dynamic-power-coefficient = <75>; > }; > }; > > @@ -275,6 +278,43 @@ > status = "disabled"; > }; > > + thermal-zones { > + soc_thermal: soc-thermal { > + polling-delay-passive = <20>; > + polling-delay = <1000>; > + sustainable-power = <50>; > + > + thermal-sensors = <&tsadc 0>; > + > + trips { > + threshold: trip-point0 { > + temperature = <70000>; > + hysteresis = <2000>; > + type = "passive"; > + }; > + target: trip-point1 { > + temperature = <85000>; > + hysteresis = <2000>; > + type = "passive"; > + }; > + soc_crit: soc-crit { > + temperature = <95000>; Hi Caesar, For now, dsp is not supported by upstream code, 95000 is proper setting for arm core. Arm core is the only cooling device controlled by IPA(a good thermal control policy) policy. Once dsp is supported by upstream code one day in the feature, its heating is controlled by userspace code, initially. So we should change soc-crit from 95000 to 115000. If dsp is added and control also by IPA(thermal control policy ) policy in kernel space, we should update threshold, target, soc_crit settings. Hi Heiko, Considering the dsp may be supported, changing soc_crit from 95000 to 115000 is okay for me. Still it looks strange why target is 85000 but soc_crit is 115000. Thanks & Best Wishes, Rocky > + hysteresis = <2000>; > + type = "critical"; > + }; > + }; > + > + cooling-maps { > + map0 { > + trip = <&target>; > + cooling-device = <&cpu0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; > + contribution = <4096>; > + }; > + }; > + }; > + > + }; > + > tsadc: tsadc@10370000 { > compatible = "rockchip,rv1108-tsadc"; > reg = <0x10370000 0x100>; > ^ permalink raw reply [flat|nested] 18+ messages in thread
[parent not found: <1503570475-7850-5-git-send-email-rocky.hao-TNX95d0MmH7DzftRWevZcw@public.gmane.org>]
* Re: [PATCH 4/5] arm: dts: rockchip: add thermal nodes for RV1108 SoC [not found] ` <1503570475-7850-5-git-send-email-rocky.hao-TNX95d0MmH7DzftRWevZcw@public.gmane.org> @ 2017-10-17 19:00 ` Heiko Stuebner 0 siblings, 0 replies; 18+ messages in thread From: Heiko Stuebner @ 2017-10-17 19:00 UTC (permalink / raw) To: Rocky Hao Cc: rui.zhang-ral2JQCrhuEAvxtiuMwx3w, edubezval-Re5JQEeQqe8AvxtiuMwx3w, robh+dt-DgEjT+Ai2ygdnm+yROfE0A, mark.rutland-5wv7dgnIgG8, catalin.marinas-5wv7dgnIgG8, will.deacon-5wv7dgnIgG8, shawn.lin-TNX95d0MmH7DzftRWevZcw, cl-TNX95d0MmH7DzftRWevZcw, william.wu-TNX95d0MmH7DzftRWevZcw, linux-pm-u79uwXL29TY76Z2rM5mHXA, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, linux-kernel-u79uwXL29TY76Z2rM5mHXA, devicetree-u79uwXL29TY76Z2rM5mHXA, xxx-TNX95d0MmH7DzftRWevZcw, jay.xu-TNX95d0MmH7DzftRWevZcw, wxt-TNX95d0MmH7DzftRWevZcw, huangtao-TNX95d0MmH7DzftRWevZcw Am Donnerstag, 24. August 2017, 18:27:54 CEST schrieb Rocky Hao: > Add thermal zone and dynamic CPU power coefficients for RV1108 > > Signed-off-by: Rocky Hao <rocky.hao-TNX95d0MmH7DzftRWevZcw@public.gmane.org> applied for 4.15 with Eduardo's Ack. Please make further adjustments for things like temperatures in follow-up patches. Thanks Heiko -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 18+ messages in thread
* [PATCH 5/5] arm: dts: rockchip: enable tsadc module on RV1108 evaluation board 2017-08-24 10:27 [PATCH 0/5] thermal: rockchip: add tsadc support in thermal driver and IPA thermal control for RV1108 in dts Rocky Hao ` (2 preceding siblings ...) [not found] ` <1503570475-7850-1-git-send-email-rocky.hao-TNX95d0MmH7DzftRWevZcw@public.gmane.org> @ 2017-08-24 10:32 ` Rocky Hao 2017-10-17 19:01 ` Heiko Stuebner 2017-10-17 0:15 ` [PATCH 0/5] thermal: rockchip: add tsadc support in thermal driver and IPA thermal control for RV1108 in dts Eduardo Valentin 4 siblings, 1 reply; 18+ messages in thread From: Rocky Hao @ 2017-08-24 10:32 UTC (permalink / raw) To: rui.zhang, edubezval, heiko, robh+dt, mark.rutland, catalin.marinas, will.deacon Cc: shawn.lin, cl, william.wu, linux-pm, linux-arm-kernel, linux-rockchip, linux-kernel, devicetree, xxx, jay.xu, wxt, huangtao, rocky.hao Enable tsadc module on RV1108 evaluation board Signed-off-by: Rocky Hao <rocky.hao@rock-chips.com> --- arch/arm/boot/dts/rv1108-evb.dts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/arch/arm/boot/dts/rv1108-evb.dts b/arch/arm/boot/dts/rv1108-evb.dts index 39197c3e9e0e..885f760d8ca1 100644 --- a/arch/arm/boot/dts/rv1108-evb.dts +++ b/arch/arm/boot/dts/rv1108-evb.dts @@ -218,6 +218,10 @@ status = "okay"; }; +&tsadc { + status = "okay"; +}; + &uart0 { status = "okay"; }; -- 1.9.1 ^ permalink raw reply related [flat|nested] 18+ messages in thread
* Re: [PATCH 5/5] arm: dts: rockchip: enable tsadc module on RV1108 evaluation board 2017-08-24 10:32 ` [PATCH 5/5] arm: dts: rockchip: enable tsadc module on RV1108 evaluation board Rocky Hao @ 2017-10-17 19:01 ` Heiko Stuebner 0 siblings, 0 replies; 18+ messages in thread From: Heiko Stuebner @ 2017-10-17 19:01 UTC (permalink / raw) To: Rocky Hao Cc: rui.zhang, edubezval, robh+dt, mark.rutland, catalin.marinas, will.deacon, shawn.lin, cl, william.wu, linux-pm, linux-arm-kernel, linux-rockchip, linux-kernel, devicetree, xxx, jay.xu, wxt, huangtao Am Donnerstag, 24. August 2017, 18:32:14 CEST schrieb Rocky Hao: > Enable tsadc module on RV1108 evaluation board > > Signed-off-by: Rocky Hao <rocky.hao@rock-chips.com> applied for 4.15 with Eduardo's Ack. Thanks Heiko ^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH 0/5] thermal: rockchip: add tsadc support in thermal driver and IPA thermal control for RV1108 in dts 2017-08-24 10:27 [PATCH 0/5] thermal: rockchip: add tsadc support in thermal driver and IPA thermal control for RV1108 in dts Rocky Hao ` (3 preceding siblings ...) 2017-08-24 10:32 ` [PATCH 5/5] arm: dts: rockchip: enable tsadc module on RV1108 evaluation board Rocky Hao @ 2017-10-17 0:15 ` Eduardo Valentin 4 siblings, 0 replies; 18+ messages in thread From: Eduardo Valentin @ 2017-10-17 0:15 UTC (permalink / raw) To: Rocky Hao Cc: rui.zhang, heiko, robh+dt, mark.rutland, catalin.marinas, will.deacon, shawn.lin, cl, william.wu, linux-pm, linux-arm-kernel, linux-rockchip, linux-kernel, devicetree, xxx, jay.xu, wxt, huangtao Hello, On Thu, Aug 24, 2017 at 06:27:50PM +0800, Rocky Hao wrote: > This series patches add the tsadc support in thermal driver and in devicetree for RV1108. > Also add thermal control with Intelligent Power Allocation (IPA) policy by default. Please > refer to https://developer.arm.com/open-source/intelligent-power-allocation for more information > about IPA. > > Rocky Hao (5): > dt-bindings: rockchip-thermal: Support the RV1108 SoC compatible > thermal: rockchip: Support the RV1108 SoC in thermal driver Applied patches 1 and 2. > arm: dts: rockchip: add tsadc node for RV1108 SoC > arm: dts: rockchip: add thermal nodes for RV1108 SoC > arm: dts: rockchip: enable tsadc module on RV1108 evaluation board > Acked-by: Eduardo Valentin <edubezval@gmail.com> for the DT changes. > .../bindings/thermal/rockchip-thermal.txt | 1 + > arch/arm/boot/dts/rv1108-evb.dts | 4 ++ > arch/arm/boot/dts/rv1108.dtsi | 69 ++++++++++++++++++++++ > drivers/thermal/rockchip_thermal.c | 67 +++++++++++++++++++++ > 4 files changed, 141 insertions(+) > > -- > 1.9.1 > > ^ permalink raw reply [flat|nested] 18+ messages in thread
end of thread, other threads:[~2017-10-17 19:01 UTC | newest] Thread overview: 18+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2017-08-24 10:27 [PATCH 0/5] thermal: rockchip: add tsadc support in thermal driver and IPA thermal control for RV1108 in dts Rocky Hao 2017-08-24 10:27 ` [PATCH 1/5] dt-bindings: rockchip-thermal: Support the RV1108 SoC compatible Rocky Hao 2017-08-31 17:57 ` Rob Herring 2017-09-15 1:49 ` Caesar Wang [not found] ` <12073627-41af-3480-6379-839e07f5e8f3-TNX95d0MmH7DzftRWevZcw@public.gmane.org> 2017-09-15 3:20 ` rocky.hao 2017-08-24 10:27 ` [PATCH 2/5] thermal: rockchip: Support the RV1108 SoC in thermal driver Rocky Hao 2017-09-15 2:10 ` Caesar Wang [not found] ` <341e8e9b-21c7-f418-b744-8c18737cb026-TNX95d0MmH7DzftRWevZcw@public.gmane.org> 2017-09-15 3:19 ` Caesar Wang [not found] ` <1503570475-7850-1-git-send-email-rocky.hao-TNX95d0MmH7DzftRWevZcw@public.gmane.org> 2017-08-24 10:27 ` [PATCH 3/5] arm: dts: rockchip: add tsadc node for RV1108 SoC Rocky Hao 2017-09-15 2:25 ` Caesar Wang 2017-09-15 3:52 ` rocky.hao 2017-10-17 19:00 ` Heiko Stuebner 2017-08-24 10:27 ` [PATCH 4/5] arm: dts: rockchip: add thermal nodes " Rocky Hao 2017-09-15 6:32 ` rocky.hao [not found] ` <1503570475-7850-5-git-send-email-rocky.hao-TNX95d0MmH7DzftRWevZcw@public.gmane.org> 2017-10-17 19:00 ` Heiko Stuebner 2017-08-24 10:32 ` [PATCH 5/5] arm: dts: rockchip: enable tsadc module on RV1108 evaluation board Rocky Hao 2017-10-17 19:01 ` Heiko Stuebner 2017-10-17 0:15 ` [PATCH 0/5] thermal: rockchip: add tsadc support in thermal driver and IPA thermal control for RV1108 in dts Eduardo Valentin
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).