* [PATCH v2 0/4] arm: qcom: qcom-apq8064: add separate device node for tsens
@ 2022-04-06 0:26 Dmitry Baryshkov
2022-04-06 0:26 ` [PATCH v2 1/4] dt-bindings: thermal: qcom-tsens.yaml: add msm8960 compat string Dmitry Baryshkov
` (4 more replies)
0 siblings, 5 replies; 14+ messages in thread
From: Dmitry Baryshkov @ 2022-04-06 0:26 UTC (permalink / raw)
To: Andy Gross, Bjorn Andersson, Amit Kucheria, Thara Gopinath,
Rob Herring, Krzysztof Kozlowski, Michael Turquette, Stephen Boyd
Cc: linux-arm-msm, linux-pm, devicetree, linux-clk
Currently gcc-msm8960 driver manually creates tsens device. Instantiate
the device using DT node instead. This follow the IPQ8064 device tree
schema.
Compatibility with the previous devices trees is kept intact.
Changes since v1:
- populate child devices in gcc-msm8960
- add syscon to the gcc device tree node
Dmitry Baryshkov (4):
dt-bindings: thermal: qcom-tsens.yaml: add msm8960 compat string
thermal/drivers/tsens: add compat string for the qcom,msm8960
clk: qcom: gcc-msm8960: create tsens device if there are no child
nodes
arm: dts: qcom-apq8064: create tsens device node
.../bindings/thermal/qcom-tsens.yaml | 4 ++-
arch/arm/boot/dts/qcom-apq8064.dtsi | 25 +++++++++++++------
drivers/clk/qcom/gcc-msm8960.c | 6 ++++-
drivers/thermal/qcom/tsens.c | 3 +++
4 files changed, 28 insertions(+), 10 deletions(-)
--
2.35.1
^ permalink raw reply [flat|nested] 14+ messages in thread
* [PATCH v2 1/4] dt-bindings: thermal: qcom-tsens.yaml: add msm8960 compat string
2022-04-06 0:26 [PATCH v2 0/4] arm: qcom: qcom-apq8064: add separate device node for tsens Dmitry Baryshkov
@ 2022-04-06 0:26 ` Dmitry Baryshkov
2022-04-06 7:57 ` Krzysztof Kozlowski
2022-04-07 9:02 ` Daniel Lezcano
2022-04-06 0:26 ` [PATCH v2 2/4] thermal/drivers/tsens: add compat string for the qcom,msm8960 Dmitry Baryshkov
` (3 subsequent siblings)
4 siblings, 2 replies; 14+ messages in thread
From: Dmitry Baryshkov @ 2022-04-06 0:26 UTC (permalink / raw)
To: Andy Gross, Bjorn Andersson, Amit Kucheria, Thara Gopinath,
Rob Herring, Krzysztof Kozlowski, Michael Turquette, Stephen Boyd
Cc: linux-arm-msm, linux-pm, devicetree, linux-clk
Add compatibility string for the thermal sensors on MSM8960/APQ8064
platforms.
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
---
Documentation/devicetree/bindings/thermal/qcom-tsens.yaml | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/Documentation/devicetree/bindings/thermal/qcom-tsens.yaml b/Documentation/devicetree/bindings/thermal/qcom-tsens.yaml
index b6406bcc683f..43510b8399ff 100644
--- a/Documentation/devicetree/bindings/thermal/qcom-tsens.yaml
+++ b/Documentation/devicetree/bindings/thermal/qcom-tsens.yaml
@@ -19,10 +19,11 @@ description: |
properties:
compatible:
oneOf:
- - description: msm9860 TSENS based
+ - description: msm8960 TSENS based
items:
- enum:
- qcom,ipq8064-tsens
+ - qcom,msm8960-tsens
- description: v0.1 of TSENS
items:
@@ -116,6 +117,7 @@ allOf:
- qcom,ipq8064-tsens
- qcom,mdm9607-tsens
- qcom,msm8916-tsens
+ - qcom,msm8960-tsens
- qcom,msm8974-tsens
- qcom,msm8976-tsens
- qcom,qcs404-tsens
--
2.35.1
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [PATCH v2 2/4] thermal/drivers/tsens: add compat string for the qcom,msm8960
2022-04-06 0:26 [PATCH v2 0/4] arm: qcom: qcom-apq8064: add separate device node for tsens Dmitry Baryshkov
2022-04-06 0:26 ` [PATCH v2 1/4] dt-bindings: thermal: qcom-tsens.yaml: add msm8960 compat string Dmitry Baryshkov
@ 2022-04-06 0:26 ` Dmitry Baryshkov
2022-04-07 9:02 ` Daniel Lezcano
2022-04-06 0:26 ` [PATCH v2 3/4] clk: qcom: gcc-msm8960: create tsens device if there are no child nodes Dmitry Baryshkov
` (2 subsequent siblings)
4 siblings, 1 reply; 14+ messages in thread
From: Dmitry Baryshkov @ 2022-04-06 0:26 UTC (permalink / raw)
To: Andy Gross, Bjorn Andersson, Amit Kucheria, Thara Gopinath,
Rob Herring, Krzysztof Kozlowski, Michael Turquette, Stephen Boyd
Cc: linux-arm-msm, linux-pm, devicetree, linux-clk
On apq8064 (msm8960) platforms the tsens device is created manually by
the gcc driver. Prepare the tsens driver for the qcom,msm8960-tsens
device instantiated from the device tree.
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
---
drivers/thermal/qcom/tsens.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/thermal/qcom/tsens.c b/drivers/thermal/qcom/tsens.c
index 154d3cb19c88..7963ee33bf75 100644
--- a/drivers/thermal/qcom/tsens.c
+++ b/drivers/thermal/qcom/tsens.c
@@ -979,6 +979,9 @@ static const struct of_device_id tsens_table[] = {
}, {
.compatible = "qcom,msm8939-tsens",
.data = &data_8939,
+ }, {
+ .compatible = "qcom,msm8960-tsens",
+ .data = &data_8960,
}, {
.compatible = "qcom,msm8974-tsens",
.data = &data_8974,
--
2.35.1
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [PATCH v2 3/4] clk: qcom: gcc-msm8960: create tsens device if there are no child nodes
2022-04-06 0:26 [PATCH v2 0/4] arm: qcom: qcom-apq8064: add separate device node for tsens Dmitry Baryshkov
2022-04-06 0:26 ` [PATCH v2 1/4] dt-bindings: thermal: qcom-tsens.yaml: add msm8960 compat string Dmitry Baryshkov
2022-04-06 0:26 ` [PATCH v2 2/4] thermal/drivers/tsens: add compat string for the qcom,msm8960 Dmitry Baryshkov
@ 2022-04-06 0:26 ` Dmitry Baryshkov
2022-04-06 0:26 ` [PATCH v2 4/4] arm: dts: qcom-apq8064: create tsens device node Dmitry Baryshkov
2022-04-06 15:40 ` [PATCH v2 0/4] arm: qcom: qcom-apq8064: add separate device node for tsens Stephen Boyd
4 siblings, 0 replies; 14+ messages in thread
From: Dmitry Baryshkov @ 2022-04-06 0:26 UTC (permalink / raw)
To: Andy Gross, Bjorn Andersson, Amit Kucheria, Thara Gopinath,
Rob Herring, Krzysztof Kozlowski, Michael Turquette, Stephen Boyd
Cc: linux-arm-msm, linux-pm, devicetree, linux-clk
Currently gcc-msm8960 driver manually creates tsens device. Don't create
it in case there are child nodes inside the gcc device (which would
include the tsens).
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
---
drivers/clk/qcom/gcc-msm8960.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/drivers/clk/qcom/gcc-msm8960.c b/drivers/clk/qcom/gcc-msm8960.c
index 051745ef99c8..a6e13b91e4c8 100644
--- a/drivers/clk/qcom/gcc-msm8960.c
+++ b/drivers/clk/qcom/gcc-msm8960.c
@@ -3641,6 +3641,9 @@ static int gcc_msm8960_probe(struct platform_device *pdev)
hfpll_l2.d = &hfpll_l2_8064_data;
}
+ if (of_get_available_child_count(pdev->dev.of_node) != 0)
+ return devm_of_platform_populate(&pdev->dev);
+
tsens = platform_device_register_data(&pdev->dev, "qcom-tsens", -1,
NULL, 0);
if (IS_ERR(tsens))
@@ -3655,7 +3658,8 @@ static int gcc_msm8960_remove(struct platform_device *pdev)
{
struct platform_device *tsens = platform_get_drvdata(pdev);
- platform_device_unregister(tsens);
+ if (tsens)
+ platform_device_unregister(tsens);
return 0;
}
--
2.35.1
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [PATCH v2 4/4] arm: dts: qcom-apq8064: create tsens device node
2022-04-06 0:26 [PATCH v2 0/4] arm: qcom: qcom-apq8064: add separate device node for tsens Dmitry Baryshkov
` (2 preceding siblings ...)
2022-04-06 0:26 ` [PATCH v2 3/4] clk: qcom: gcc-msm8960: create tsens device if there are no child nodes Dmitry Baryshkov
@ 2022-04-06 0:26 ` Dmitry Baryshkov
2022-04-06 15:40 ` [PATCH v2 0/4] arm: qcom: qcom-apq8064: add separate device node for tsens Stephen Boyd
4 siblings, 0 replies; 14+ messages in thread
From: Dmitry Baryshkov @ 2022-04-06 0:26 UTC (permalink / raw)
To: Andy Gross, Bjorn Andersson, Amit Kucheria, Thara Gopinath,
Rob Herring, Krzysztof Kozlowski, Michael Turquette, Stephen Boyd
Cc: linux-arm-msm, linux-pm, devicetree, linux-clk
Create separate device node for thermal sensors on apq8064 platform.
Move related properties to the newly created device tree node.
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
---
arch/arm/boot/dts/qcom-apq8064.dtsi | 25 +++++++++++++++++--------
1 file changed, 17 insertions(+), 8 deletions(-)
diff --git a/arch/arm/boot/dts/qcom-apq8064.dtsi b/arch/arm/boot/dts/qcom-apq8064.dtsi
index b9e9a9f9d3e2..40c65c921f96 100644
--- a/arch/arm/boot/dts/qcom-apq8064.dtsi
+++ b/arch/arm/boot/dts/qcom-apq8064.dtsi
@@ -105,7 +105,7 @@ cpu0-thermal {
polling-delay-passive = <250>;
polling-delay = <1000>;
- thermal-sensors = <&gcc 7>;
+ thermal-sensors = <&tsens 7>;
coefficients = <1199 0>;
trips {
@@ -126,7 +126,7 @@ cpu1-thermal {
polling-delay-passive = <250>;
polling-delay = <1000>;
- thermal-sensors = <&gcc 8>;
+ thermal-sensors = <&tsens 8>;
coefficients = <1132 0>;
trips {
@@ -147,7 +147,7 @@ cpu2-thermal {
polling-delay-passive = <250>;
polling-delay = <1000>;
- thermal-sensors = <&gcc 9>;
+ thermal-sensors = <&tsens 9>;
coefficients = <1199 0>;
trips {
@@ -168,7 +168,7 @@ cpu3-thermal {
polling-delay-passive = <250>;
polling-delay = <1000>;
- thermal-sensors = <&gcc 10>;
+ thermal-sensors = <&tsens 10>;
coefficients = <1132 0>;
trips {
@@ -810,14 +810,23 @@ tsens_backup: backup_calib {
};
gcc: clock-controller@900000 {
- compatible = "qcom,gcc-apq8064";
+ compatible = "qcom,gcc-apq8064", "syscon";
reg = <0x00900000 0x4000>;
- nvmem-cells = <&tsens_calib>, <&tsens_backup>;
- nvmem-cell-names = "calib", "calib_backup";
#clock-cells = <1>;
#power-domain-cells = <1>;
#reset-cells = <1>;
- #thermal-sensor-cells = <1>;
+
+ tsens: thermal-sensor@900000 {
+ compatible = "qcom,msm8960-tsens";
+
+ nvmem-cells = <&tsens_calib>, <&tsens_backup>;
+ nvmem-cell-names = "calib", "calib_backup";
+ interrupts = <GIC_SPI 178 IRQ_TYPE_LEVEL_HIGH>;
+ interrupt-names = "uplow";
+
+ #qcom,sensors = <11>;
+ #thermal-sensor-cells = <1>;
+ };
};
lcc: clock-controller@28000000 {
--
2.35.1
^ permalink raw reply related [flat|nested] 14+ messages in thread
* Re: [PATCH v2 1/4] dt-bindings: thermal: qcom-tsens.yaml: add msm8960 compat string
2022-04-06 0:26 ` [PATCH v2 1/4] dt-bindings: thermal: qcom-tsens.yaml: add msm8960 compat string Dmitry Baryshkov
@ 2022-04-06 7:57 ` Krzysztof Kozlowski
2022-04-07 9:02 ` Daniel Lezcano
1 sibling, 0 replies; 14+ messages in thread
From: Krzysztof Kozlowski @ 2022-04-06 7:57 UTC (permalink / raw)
To: Dmitry Baryshkov, Andy Gross, Bjorn Andersson, Amit Kucheria,
Thara Gopinath, Rob Herring, Krzysztof Kozlowski,
Michael Turquette, Stephen Boyd
Cc: linux-arm-msm, linux-pm, devicetree, linux-clk
On 06/04/2022 02:26, Dmitry Baryshkov wrote:
> Add compatibility string for the thermal sensors on MSM8960/APQ8064
> platforms.
>
> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
> ---
> Documentation/devicetree/bindings/thermal/qcom-tsens.yaml | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH v2 0/4] arm: qcom: qcom-apq8064: add separate device node for tsens
2022-04-06 0:26 [PATCH v2 0/4] arm: qcom: qcom-apq8064: add separate device node for tsens Dmitry Baryshkov
` (3 preceding siblings ...)
2022-04-06 0:26 ` [PATCH v2 4/4] arm: dts: qcom-apq8064: create tsens device node Dmitry Baryshkov
@ 2022-04-06 15:40 ` Stephen Boyd
2022-04-06 19:57 ` Dmitry Baryshkov
4 siblings, 1 reply; 14+ messages in thread
From: Stephen Boyd @ 2022-04-06 15:40 UTC (permalink / raw)
To: Amit Kucheria, Andy Gross, Bjorn Andersson, Dmitry Baryshkov,
Krzysztof Kozlowski, Michael Turquette, Rob Herring,
Thara Gopinath
Cc: linux-arm-msm, linux-pm, devicetree, linux-clk
Quoting Dmitry Baryshkov (2022-04-05 17:26:44)
> Currently gcc-msm8960 driver manually creates tsens device. Instantiate
> the device using DT node instead. This follow the IPQ8064 device tree
> schema.
Why can't the schema be changed?
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH v2 0/4] arm: qcom: qcom-apq8064: add separate device node for tsens
2022-04-06 15:40 ` [PATCH v2 0/4] arm: qcom: qcom-apq8064: add separate device node for tsens Stephen Boyd
@ 2022-04-06 19:57 ` Dmitry Baryshkov
2022-04-12 18:43 ` Stephen Boyd
0 siblings, 1 reply; 14+ messages in thread
From: Dmitry Baryshkov @ 2022-04-06 19:57 UTC (permalink / raw)
To: Stephen Boyd
Cc: Amit Kucheria, Andy Gross, Bjorn Andersson, Krzysztof Kozlowski,
Michael Turquette, Rob Herring, Thara Gopinath, linux-arm-msm,
linux-pm, devicetree, linux-clk
On Wed, 6 Apr 2022 at 18:40, Stephen Boyd <sboyd@kernel.org> wrote:
>
> Quoting Dmitry Baryshkov (2022-04-05 17:26:44)
> > Currently gcc-msm8960 driver manually creates tsens device. Instantiate
> > the device using DT node instead. This follow the IPQ8064 device tree
> > schema.
>
> Why can't the schema be changed?
But these commits change the schema. They make apq8064 follow more
logical scheme of ipq8064.
--
With best wishes
Dmitry
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH v2 1/4] dt-bindings: thermal: qcom-tsens.yaml: add msm8960 compat string
2022-04-06 0:26 ` [PATCH v2 1/4] dt-bindings: thermal: qcom-tsens.yaml: add msm8960 compat string Dmitry Baryshkov
2022-04-06 7:57 ` Krzysztof Kozlowski
@ 2022-04-07 9:02 ` Daniel Lezcano
1 sibling, 0 replies; 14+ messages in thread
From: Daniel Lezcano @ 2022-04-07 9:02 UTC (permalink / raw)
To: Dmitry Baryshkov, Andy Gross, Bjorn Andersson, Amit Kucheria,
Thara Gopinath, Rob Herring, Krzysztof Kozlowski,
Michael Turquette, Stephen Boyd
Cc: linux-arm-msm, linux-pm, devicetree, linux-clk
On 06/04/2022 02:26, Dmitry Baryshkov wrote:
> Add compatibility string for the thermal sensors on MSM8960/APQ8064
> platforms.
>
> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Applied, thanks
--
<http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs
Follow Linaro: <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH v2 2/4] thermal/drivers/tsens: add compat string for the qcom,msm8960
2022-04-06 0:26 ` [PATCH v2 2/4] thermal/drivers/tsens: add compat string for the qcom,msm8960 Dmitry Baryshkov
@ 2022-04-07 9:02 ` Daniel Lezcano
0 siblings, 0 replies; 14+ messages in thread
From: Daniel Lezcano @ 2022-04-07 9:02 UTC (permalink / raw)
To: Dmitry Baryshkov, Andy Gross, Bjorn Andersson, Amit Kucheria,
Thara Gopinath, Rob Herring, Krzysztof Kozlowski,
Michael Turquette, Stephen Boyd
Cc: linux-arm-msm, linux-pm, devicetree, linux-clk
On 06/04/2022 02:26, Dmitry Baryshkov wrote:
> On apq8064 (msm8960) platforms the tsens device is created manually by
> the gcc driver. Prepare the tsens driver for the qcom,msm8960-tsens
> device instantiated from the device tree.
>
> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
> ---
> drivers/thermal/qcom/tsens.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/drivers/thermal/qcom/tsens.c b/drivers/thermal/qcom/tsens.c
> index 154d3cb19c88..7963ee33bf75 100644
> --- a/drivers/thermal/qcom/tsens.c
> +++ b/drivers/thermal/qcom/tsens.c
> @@ -979,6 +979,9 @@ static const struct of_device_id tsens_table[] = {
> }, {
> .compatible = "qcom,msm8939-tsens",
> .data = &data_8939,
> + }, {
> + .compatible = "qcom,msm8960-tsens",
> + .data = &data_8960,
> }, {
> .compatible = "qcom,msm8974-tsens",
> .data = &data_8974,
Applied, thanks
--
<http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs
Follow Linaro: <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH v2 0/4] arm: qcom: qcom-apq8064: add separate device node for tsens
2022-04-06 19:57 ` Dmitry Baryshkov
@ 2022-04-12 18:43 ` Stephen Boyd
2022-04-12 19:20 ` Dmitry Baryshkov
0 siblings, 1 reply; 14+ messages in thread
From: Stephen Boyd @ 2022-04-12 18:43 UTC (permalink / raw)
To: Dmitry Baryshkov
Cc: Amit Kucheria, Andy Gross, Bjorn Andersson, Krzysztof Kozlowski,
Michael Turquette, Rob Herring, Thara Gopinath, linux-arm-msm,
linux-pm, devicetree, linux-clk
Quoting Dmitry Baryshkov (2022-04-06 12:57:30)
> On Wed, 6 Apr 2022 at 18:40, Stephen Boyd <sboyd@kernel.org> wrote:
> >
> > Quoting Dmitry Baryshkov (2022-04-05 17:26:44)
> > > Currently gcc-msm8960 driver manually creates tsens device. Instantiate
> > > the device using DT node instead. This follow the IPQ8064 device tree
> > > schema.
> >
> > Why can't the schema be changed?
>
> But these commits change the schema. They make apq8064 follow more
> logical scheme of ipq8064.
>
Sounds like ipq8064 and apq8064 follow different schemas. Is there any
benefit to harmonizing the two vs. just leaving it as it is in the dts
and making the schema match whatever the dts has?
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH v2 0/4] arm: qcom: qcom-apq8064: add separate device node for tsens
2022-04-12 18:43 ` Stephen Boyd
@ 2022-04-12 19:20 ` Dmitry Baryshkov
2022-04-12 20:08 ` Bjorn Andersson
0 siblings, 1 reply; 14+ messages in thread
From: Dmitry Baryshkov @ 2022-04-12 19:20 UTC (permalink / raw)
To: Stephen Boyd
Cc: Amit Kucheria, Andy Gross, Bjorn Andersson, Krzysztof Kozlowski,
Michael Turquette, Rob Herring, Thara Gopinath, linux-arm-msm,
linux-pm, devicetree, linux-clk
On Tue, 12 Apr 2022 at 21:43, Stephen Boyd <sboyd@kernel.org> wrote:
>
> Quoting Dmitry Baryshkov (2022-04-06 12:57:30)
> > On Wed, 6 Apr 2022 at 18:40, Stephen Boyd <sboyd@kernel.org> wrote:
> > >
> > > Quoting Dmitry Baryshkov (2022-04-05 17:26:44)
> > > > Currently gcc-msm8960 driver manually creates tsens device. Instantiate
> > > > the device using DT node instead. This follow the IPQ8064 device tree
> > > > schema.
> > >
> > > Why can't the schema be changed?
> >
> > But these commits change the schema. They make apq8064 follow more
> > logical scheme of ipq8064.
> >
>
> Sounds like ipq8064 and apq8064 follow different schemas. Is there any
> benefit to harmonizing the two vs. just leaving it as it is in the dts
> and making the schema match whatever the dts has?
I'd prefer to harmonize them. It makes no sense to have two different
approaches for the single IP block (shared between ipq and apq/msm).
And having a separate device tree node for the tsens removes a
dependency from gcc on the nvmem/qfprom.
Note, upstream qcom-msm8960.dtsi doesn't describe tsens at all, so we
don't have to worry about it.
--
With best wishes
Dmitry
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH v2 0/4] arm: qcom: qcom-apq8064: add separate device node for tsens
2022-04-12 19:20 ` Dmitry Baryshkov
@ 2022-04-12 20:08 ` Bjorn Andersson
2022-04-12 20:57 ` Dmitry Baryshkov
0 siblings, 1 reply; 14+ messages in thread
From: Bjorn Andersson @ 2022-04-12 20:08 UTC (permalink / raw)
To: Dmitry Baryshkov
Cc: Stephen Boyd, Amit Kucheria, Andy Gross, Krzysztof Kozlowski,
Michael Turquette, Rob Herring, Thara Gopinath, linux-arm-msm,
linux-pm, devicetree, linux-clk
On Tue 12 Apr 12:20 PDT 2022, Dmitry Baryshkov wrote:
> On Tue, 12 Apr 2022 at 21:43, Stephen Boyd <sboyd@kernel.org> wrote:
> >
> > Quoting Dmitry Baryshkov (2022-04-06 12:57:30)
> > > On Wed, 6 Apr 2022 at 18:40, Stephen Boyd <sboyd@kernel.org> wrote:
> > > >
> > > > Quoting Dmitry Baryshkov (2022-04-05 17:26:44)
> > > > > Currently gcc-msm8960 driver manually creates tsens device. Instantiate
> > > > > the device using DT node instead. This follow the IPQ8064 device tree
> > > > > schema.
> > > >
> > > > Why can't the schema be changed?
> > >
> > > But these commits change the schema. They make apq8064 follow more
> > > logical scheme of ipq8064.
> > >
> >
> > Sounds like ipq8064 and apq8064 follow different schemas. Is there any
> > benefit to harmonizing the two vs. just leaving it as it is in the dts
> > and making the schema match whatever the dts has?
>
> I'd prefer to harmonize them. It makes no sense to have two different
> approaches for the single IP block (shared between ipq and apq/msm).
> And having a separate device tree node for the tsens removes a
> dependency from gcc on the nvmem/qfprom.
> Note, upstream qcom-msm8960.dtsi doesn't describe tsens at all, so we
> don't have to worry about it.
>
The apq8064 design was chosen in order to make the dts represent the GCC
being a single hardware block, and the fact that this is a clock and a
thermal driver in Linux is an implementation decision.
Seems like we forgot about this decision when we introduce the
ipq8064...
I'm not against harmonizing the two, but I don't see any changes to
Documentation/devicetree/bindings/clock/qcom,gcc-apq8064.yaml and the
clock patch describes what happens, but not why (i.e. if it's to
harmonize the implementations the commit message should say so).
Regards,
Bjorn
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH v2 0/4] arm: qcom: qcom-apq8064: add separate device node for tsens
2022-04-12 20:08 ` Bjorn Andersson
@ 2022-04-12 20:57 ` Dmitry Baryshkov
0 siblings, 0 replies; 14+ messages in thread
From: Dmitry Baryshkov @ 2022-04-12 20:57 UTC (permalink / raw)
To: Bjorn Andersson
Cc: Stephen Boyd, Amit Kucheria, Andy Gross, Krzysztof Kozlowski,
Michael Turquette, Rob Herring, Thara Gopinath, linux-arm-msm,
linux-pm, devicetree, linux-clk
On 12/04/2022 23:08, Bjorn Andersson wrote:
> On Tue 12 Apr 12:20 PDT 2022, Dmitry Baryshkov wrote:
>
>> On Tue, 12 Apr 2022 at 21:43, Stephen Boyd <sboyd@kernel.org> wrote:
>>>
>>> Quoting Dmitry Baryshkov (2022-04-06 12:57:30)
>>>> On Wed, 6 Apr 2022 at 18:40, Stephen Boyd <sboyd@kernel.org> wrote:
>>>>>
>>>>> Quoting Dmitry Baryshkov (2022-04-05 17:26:44)
>>>>>> Currently gcc-msm8960 driver manually creates tsens device. Instantiate
>>>>>> the device using DT node instead. This follow the IPQ8064 device tree
>>>>>> schema.
>>>>>
>>>>> Why can't the schema be changed?
>>>>
>>>> But these commits change the schema. They make apq8064 follow more
>>>> logical scheme of ipq8064.
>>>>
>>>
>>> Sounds like ipq8064 and apq8064 follow different schemas. Is there any
>>> benefit to harmonizing the two vs. just leaving it as it is in the dts
>>> and making the schema match whatever the dts has?
>>
>> I'd prefer to harmonize them. It makes no sense to have two different
>> approaches for the single IP block (shared between ipq and apq/msm).
>> And having a separate device tree node for the tsens removes a
>> dependency from gcc on the nvmem/qfprom.
>> Note, upstream qcom-msm8960.dtsi doesn't describe tsens at all, so we
>> don't have to worry about it.
>>
>
> The apq8064 design was chosen in order to make the dts represent the GCC
> being a single hardware block, and the fact that this is a clock and a
> thermal driver in Linux is an implementation decision.
>
> Seems like we forgot about this decision when we introduce the
> ipq8064...
>
>
> I'm not against harmonizing the two, but I don't see any changes to
> Documentation/devicetree/bindings/clock/qcom,gcc-apq8064.yaml and the
> clock patch describes what happens, but not why (i.e. if it's to
> harmonize the implementations the commit message should say so).
Nice catch. I forgot about the gcc-apq8064 schema. Will fix in the next
iteration.
--
With best wishes
Dmitry
^ permalink raw reply [flat|nested] 14+ messages in thread
end of thread, other threads:[~2022-04-12 22:24 UTC | newest]
Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-04-06 0:26 [PATCH v2 0/4] arm: qcom: qcom-apq8064: add separate device node for tsens Dmitry Baryshkov
2022-04-06 0:26 ` [PATCH v2 1/4] dt-bindings: thermal: qcom-tsens.yaml: add msm8960 compat string Dmitry Baryshkov
2022-04-06 7:57 ` Krzysztof Kozlowski
2022-04-07 9:02 ` Daniel Lezcano
2022-04-06 0:26 ` [PATCH v2 2/4] thermal/drivers/tsens: add compat string for the qcom,msm8960 Dmitry Baryshkov
2022-04-07 9:02 ` Daniel Lezcano
2022-04-06 0:26 ` [PATCH v2 3/4] clk: qcom: gcc-msm8960: create tsens device if there are no child nodes Dmitry Baryshkov
2022-04-06 0:26 ` [PATCH v2 4/4] arm: dts: qcom-apq8064: create tsens device node Dmitry Baryshkov
2022-04-06 15:40 ` [PATCH v2 0/4] arm: qcom: qcom-apq8064: add separate device node for tsens Stephen Boyd
2022-04-06 19:57 ` Dmitry Baryshkov
2022-04-12 18:43 ` Stephen Boyd
2022-04-12 19:20 ` Dmitry Baryshkov
2022-04-12 20:08 ` Bjorn Andersson
2022-04-12 20:57 ` Dmitry Baryshkov
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).