Update for AP807 thermal data
Subsystems (4)
cover Update for AP807 thermal data
Hi,
This series updates the thermal data for the AP807 die, which has different coefficients to the AP806.
These patches have come from the SolidRun CN913x build repository which can be found at:
https://github.com/SolidRun/cn913x_build/tree/master/patches/linux
.../devicetree/bindings/thermal/armada-thermal.txt | 1 + arch/arm64/boot/dts/marvell/armada-ap807.dtsi | 3 ++ drivers/thermal/armada_thermal.c | 32 ++++++++++++++++++++-- 3 files changed, 34 insertions(+), 2 deletions(-)
Signature · 2 lines
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/ FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!
PATCH 1/3 dt-bindings: armada-thermal: add armada-ap807-thermal compatible
From: Alex Leibovich <[email protected]>
Add marvell,armada-ap807-thermal compatible for the AP807 die.
--- Documentation/devicetree/bindings/thermal/armada-thermal.txt | 1 + 1 file changed, 1 insertion(+)
Documentation/devicetree/bindings/thermal/armada-thermal.txt +1 -0
@@ -8,6 +8,7 @@ * marvell,armada380-thermal * marvell,armadaxp-thermal * marvell,armada-ap806-thermal + * marvell,armada-ap807-thermal * marvell,armada-cp110-thermal Note: these bindings are deprecated for AP806/CP110 and should instead
Signature · 1 line
2.30.2
Re: [PATCH 1/3] dt-bindings: armada-thermal: add armada-ap807-thermal compatible
Quoted 6 lines · Russell King (Oracle)
From: Alex Leibovich <[email protected]>
Add marvell,armada-ap807-thermal compatible for the AP807 die.
Signed-off-by Alex Leibovich <[email protected]>Tested-by sa_ip-sw-jenkins <[email protected]>
This is a TXT file, thus testing by some jenkins seems like a fake tag. Please drop fake tags.
Best regards,
Krzysztof
_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
PATCH 2/3 thermal: armada: add support for AP807 thermal data
In reply to Russell King (Oracle)From: Alex Leibovich <[email protected]>
Add support for the AP807 die thermal data. This is the same as AP806, except for the coefficients.
ap807 values taken from TSENSE_ADC_16FFC spec, which says:
T(in Celsius) = T(code)*TSENE_GAIN+TSENE_OFFSET
where in default:
TSENE_OFFSET = 128.9 TSENE_GAIN = 0.394
--- drivers/thermal/armada_thermal.c | 32 ++++++++++++++++++++++++++++++-- 1 file changed, 30 insertions(+), 2 deletions(-)
drivers/thermal/armada_thermal.c +30 -2
@@ -231,7 +231,7 @@ static void armada380_init(struct platform_device *pdev,regmap_write (priv->syscon, data->syscon_control0_off, reg); } -static void armada_ap806_init (struct platform_device *pdev, +static void armada_ap80x_init (struct platform_device *pdev,struct armada_thermal_priv *priv) {struct armada_thermal_data *data = priv->data;
@@ -620,7 +620,7 @@ static const struct armada_thermal_data armada380_data = { };static const struct armada_thermal_data armada_ap806_data = { - .init = armada_ap806_init, + .init = armada_ap80x_init, .is_valid_bit =BIT (16 ), .temp_shift =0 , .temp_mask =0x3ff ,
@@ -643,6 +643,30 @@ static const struct armada_thermal_data armada_ap806_data = { .cpu_nr = 4, }; +static const struct armada_thermal_data armada_ap807_data = { + .init = armada_ap80x_init, + .is_valid_bit =BIT (16 ), + .temp_shift =0 , + .temp_mask =0x3ff , + .thresh_shift =3 , + .hyst_shift =19 , + .hyst_mask =0x3 , + .coef_b =-128900LL , + .coef_m =394ULL , + .coef_div =1 , + .inverted = true, + .signed_sample = true, + .syscon_control0_off =0x84 , + .syscon_control1_off =0x88 , + .syscon_status_off =0x8C , + .dfx_irq_cause_off =0x108 , + .dfx_irq_mask_off =0x10C , + .dfx_overheat_irq =BIT (22 ), + .dfx_server_irq_mask_off =0x104 , + .dfx_server_irq_en =BIT (1 ), + .cpu_nr =4 , +}; +static const struct armada_thermal_data armada_cp110_data = { .init = armada_cp110_init, .is_valid_bit =BIT (10 ),
@@ -686,6 +710,10 @@ static const struct of_device_id armada_thermal_id_table[] = { .compatible = "marvell,armada-ap806-thermal", .data = &armada_ap806_data, }, + { + .compatible = "marvell,armada-ap807-thermal", + .data = &armada_ap807_data, + }, { .compatible = "marvell,armada-cp110-thermal", .data = &armada_cp110_data,
Signature · 1 line
2.30.2
Re: [PATCH 2/3] thermal: armada: add support for AP807 thermal data
Hi Russell,
[email protected] wrote on Fri, 16 Jun 2023 12:50:42 +0100:
Quoted 8 lines
From: Alex Leibovich <[email protected]>
Add support for the AP807 die thermal data. This is the same as AP806, except for the coefficients.
ap807 values taken from
TSENSE_ADC_16FFCspec, which says:
T(in Celsius) = T(code)*TSENE_GAIN+TSENE_OFFSET
where in default:
Quoted 7 lines
TSENE_OFFSET = 128.9 TSENE_GAIN = 0.394Signed-off-by Alex Leibovich <[email protected]>Tested-by sa_ip-sw-jenkins <[email protected]>Reviewed-by Stefan Chulski <[email protected]>Signed-off-by Russell King (Oracle) <[email protected]>
Quoted 4 lines
--- drivers/thermal/armada_thermal.c | 32 ++++++++++++++++++++++++++++++-- 1 file changed, 30 insertions(+), 2 deletions(-)
Thanks,
Miquèl
PATCH 3/3 arm64: dts: armada-ap807: update thermal compatible
In reply to Russell King (Oracle)From: Alex Leibovich <[email protected]>
Use the correct thermal coefficients for the Armada AP807 dies.
--- arch/arm64/boot/dts/marvell/armada-ap807.dtsi | 3 +++ 1 file changed, 3 insertions(+)
arch/arm64/boot/dts/marvell/armada-ap807.dtsi +3 -0
@@ -33,3 +33,6 @@ &ap_sdhci0 { "marvell,armada-ap806-sdhci"; /* Backward compatibility */ }; +&ap_thermal { + compatible = "marvell,armada-ap807-thermal"; +};
Signature · 1 line
2.30.2
Re: [PATCH 3/3] arm64: dts: armada-ap807: update thermal compatible
Hi Russell and Alex,
Quoted 17 lines · Russell King
From: Alex Leibovich <[email protected]>
Use the correct thermal coefficients for the Armada AP807 dies.
Signed-off-by Alex Leibovich <[email protected]>Reviewed-by Stefan Chulski <[email protected]>Tested-by Stefan Chulski <[email protected]>Signed-off-by Russell King (Oracle) <[email protected]>--- arch/arm64/boot/dts/marvell/armada-ap807.dtsi | 3 +++ 1 file changed, 3 insertions(+)arch/arm64/boot/dts/marvell/armada-ap807.dtsi +0
-0
arch/arm64/boot/dts/marvell/armada-ap807.dtsi &ap_sdhci0 { · line 38
Quoted 6 lines
arch/arm64/boot/dts/marvell/armada-ap807.dtsi +3
-0@@ -33,3 +33,6 @@ &ap_sdhci0 { "marvell,armada-ap806-sdhci"; /* Backward compatibility */ }; +&ap_thermal { + compatible = "marvell,armada-ap807-thermal"; +};
While working on some thermal optimizations, our hardware team discovered that this patch is still missing upstream. Is something missing or did it get lost?
Regards,
Stefan
Andrew Lunn
maintainerRe: [PATCH 3/3] arm64: dts: armada-ap807: update thermal compatible
Quoted 23 lines · Stefan Eichenberger
Hi Russell and Alex,
Quoted 20 lines · Russell King
From: Alex Leibovich <[email protected]>
Use the correct thermal coefficients for the Armada AP807 dies.
Signed-off-by Alex Leibovich <[email protected]>Reviewed-by Stefan Chulski <[email protected]>Tested-by Stefan Chulski <[email protected]>Signed-off-by Russell King (Oracle) <[email protected]>--- arch/arm64/boot/dts/marvell/armada-ap807.dtsi | 3 +++ 1 file changed, 3 insertions(+)arch/arm64/boot/dts/marvell/armada-ap807.dtsi +0
-0@@ -33,3 +33,6 @@ &ap_sdhci0 { "marvell,armada-ap806-sdhci"; /* Backward compatibility */ };
Quoted 7 lines
arch/arm64/boot/dts/marvell/armada-ap807.dtsi &ap_sdhci0 { · line 38
Quoted 3 lines
arch/arm64/boot/dts/marvell/armada-ap807.dtsi +3
-0+&ap_thermal { + compatible = "marvell,armada-ap807-thermal"; +};While working on some thermal optimizations, our hardware team discovered that this patch is still missing upstream. Is something missing or did it get lost?
Patch 1/3 had a change request. Was it ever reposted with the requested change?
It would also be nice to convert the .txt to .yaml. The DT Maintainers might insist on that when it is reposted?
Andrew
Re: [PATCH 3/3] arm64: dts: armada-ap807: update thermal compatible
Quoted 32 lines · Andrew Lunn
Quoted 23 lines · Stefan Eichenberger
Hi Russell and Alex,
Quoted 20 lines · Russell King
From: Alex Leibovich <[email protected]>
Use the correct thermal coefficients for the Armada AP807 dies.
Signed-off-by Alex Leibovich <[email protected]>Reviewed-by Stefan Chulski <[email protected]>Tested-by Stefan Chulski <[email protected]>Signed-off-by Russell King (Oracle) <[email protected]>--- arch/arm64/boot/dts/marvell/armada-ap807.dtsi | 3 +++ 1 file changed, 3 insertions(+)arch/arm64/boot/dts/marvell/armada-ap807.dtsi +0
-0@@ -33,3 +33,6 @@ &ap_sdhci0 { "marvell,armada-ap806-sdhci"; /* Backward compatibility */ };Quoted 7 lines
arch/arm64/boot/dts/marvell/armada-ap807.dtsi &ap_sdhci0 { · line 38
Quoted 3 lines
arch/arm64/boot/dts/marvell/armada-ap807.dtsi +3
-0+&ap_thermal { + compatible = "marvell,armada-ap807-thermal"; +};While working on some thermal optimizations, our hardware team discovered that this patch is still missing upstream. Is something missing or did it get lost?
Quoted 2 lines
Patch 1/3 had a change request. Was it ever reposted with the requested change?
I don't think so, it's just another patch series of many that I have that's basically low priority, and other stuff probably overrode it and I then forgot about it.
Signature · 2 lines
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/ FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!
Re: [PATCH 3/3] arm64: dts: armada-ap807: update thermal compatible
Quoted 7 lines · Russell King (Oracle)
Quoted 6 lines · Andrew Lunn
Quoted 3 lines
While working on some thermal optimizations, our hardware team discovered that this patch is still missing upstream. Is something missing or did it get lost?
Patch 1/3 had a change request. Was it ever reposted with the requested change?
I forgot to mention that the other patches were applied, so it is only the one missing without change request.
Quoted 4 lines
I don't think so, it's just another patch series of many that I have that's basically low priority, and other stuff probably overrode it and I then forgot about it.
No problem at all, thanks a lot for the feedback.
Regards,
Stefan
Andrew Lunn
maintainerRe: [PATCH 3/3] arm64: dts: armada-ap807: update thermal compatible
Quoted 11 lines · Stefan Eichenberger
Quoted 7 lines · Russell King (Oracle)
Quoted 6 lines · Andrew Lunn
Quoted 3 lines
While working on some thermal optimizations, our hardware team discovered that this patch is still missing upstream. Is something missing or did it get lost?
Patch 1/3 had a change request. Was it ever reposted with the requested change?
I forgot to mention that the other patches were applied, so it is only the one missing without change request.
Ah. O.K. Repost it to the MVEBU Maintainers.
Andrew
Daniel Lezcano
AppliedQuoted 5 lines · Russell King (Oracle)
Hi,
This series updates the thermal data for the AP807 die, which has different coefficients to the AP806.
Quoted 8 lines
These patches have come from the SolidRun CN913x build repository which can be found at:
https://github.com/SolidRun/cn913x_build/tree/master/patches/linux.../devicetree/bindings/thermal/armada-thermal.txt | 1 + arch/arm64/boot/dts/marvell/armada-ap807.dtsi | 3 ++ drivers/thermal/armada_thermal.c | 32 ++++++++++++++++++++-- 3 files changed, 34 insertions(+), 2 deletions(-)
Applied, patch 1 and 2.
Dropped the sa_ip-sw-jenkins Tested-by tag
Thanks
Signature · 5 lines
<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