Re: [PATCH v2 2/2] arm64: dts: qcom: Enable tsens and thermal for sa8775p SoC

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Aug 24, 2023 at 06:00:01PM +0530, Priyansh Jain wrote:
> Add tsens and thermal devicetree node for sa8775p SoC.
> 
> Signed-off-by: Priyansh Jain <quic_priyjain@xxxxxxxxxxx>
> ---
>  arch/arm64/boot/dts/qcom/sa8775p.dtsi | 1096 +++++++++++++++++++++++++
>  1 file changed, 1096 insertions(+)
> 
> diff --git a/arch/arm64/boot/dts/qcom/sa8775p.dtsi b/arch/arm64/boot/dts/qcom/sa8775p.dtsi
> index b130136acffe..abba42ea5946 100644
> --- a/arch/arm64/boot/dts/qcom/sa8775p.dtsi
> +++ b/arch/arm64/boot/dts/qcom/sa8775p.dtsi
> @@ -2306,6 +2306,1102 @@
>  
>  			#freq-domain-cells = <1>;

I believe this would be the tail of the cpufreq_hw node, @0x18591000.

>  		};
> +
> +		tsens0: thermal-sensor@c222000 {
> +			compatible = "qcom,sa8775p-tsens", "qcom,tsens-v2";
> +			reg = <0x0 0x0c263000 0x0 0x1ff>,

If so, then this is not inserted to maintain the sort order (by address)
of the nodes under /soc. Please update the placement of this node.

Also, the unit address above is c222000, but based on this cell it
should be c263000.

> +			      <0x0 0x0c222000 0x0 0x8>;
> +			interrupts = <GIC_SPI 506 IRQ_TYPE_LEVEL_HIGH>,
> +				     <GIC_SPI 508 IRQ_TYPE_LEVEL_HIGH>;
> +			#qcom,sensors = <12>;
> +			interrupt-names = "uplow", "critical";
> +			#thermal-sensor-cells = <1>;
> +		};
> +
> +		tsens1: thermal-sensor@c223000 {
> +			compatible = "qcom,sa8775p-tsens", "qcom,tsens-v2";
> +			reg = <0x0 0x0c265000 0x0 0x1ff>,
> +			      <0x0 0x0c223000 0x0 0x8>;
> +			interrupts = <GIC_SPI 507 IRQ_TYPE_LEVEL_HIGH>,
> +				     <GIC_SPI 509 IRQ_TYPE_LEVEL_HIGH>;
> +			#qcom,sensors = <12>;
> +			interrupt-names = "uplow", "critical";
> +			#thermal-sensor-cells = <1>;
> +		};
> +
> +		tsens2: thermal-sensor@c224000 {
> +			compatible = "qcom,sa8775p-tsens", "qcom,tsens-v2";
> +			reg = <0x0 0x0c251000 0x0 0x1ff>,

0x0c251000 < 0x0c265000, please order them properly.

> +			      <0x0 0x0c224000 0x0 0x8>;
> +			interrupts = <GIC_SPI 572 IRQ_TYPE_LEVEL_HIGH>,
> +				     <GIC_SPI 609 IRQ_TYPE_LEVEL_HIGH>;
> +			#qcom,sensors = <13>;
> +			interrupt-names = "uplow", "critical";
> +			#thermal-sensor-cells = <1>;
> +		};
> +
> +		tsens3: thermal-sensor@c225000 {
> +			compatible = "qcom,sa8775p-tsens", "qcom,tsens-v2";
> +			reg = <0x0 0x0c252000 0x0 0x1ff>,
> +			      <0x0 0x0c225000 0x0 0x8>;
> +			interrupts = <GIC_SPI 573 IRQ_TYPE_LEVEL_HIGH>,
> +				     <GIC_SPI 610 IRQ_TYPE_LEVEL_HIGH>;
> +			#qcom,sensors = <13>;
> +			interrupt-names = "uplow", "critical";
> +			#thermal-sensor-cells = <1>;
> +		};
> +
> +		thermal_zones: thermal-zones {

This does not belong alongside the mmio-devices under /soc, move this
out (and keep / sorted alphabetically on the node name).

> +			aoss-0-thermal {
> +				polling-delay-passive = <0>;
> +				polling-delay = <0>;
> +
> +				thermal-sensors = <&tsens0 0>;
> +
> +				trips {
> +					aoss0_alert0: trip-point0 {

Why does all these nodes have labels?

> +						temperature = <105000>;
> +						hysteresis = <5000>;
> +						type = "passive";
> +					};
> +
> +					aoss0_alert1: trip-point1 {
> +						temperature = <115000>;
> +						hysteresis = <5000>;
> +						type = "passive";
> +					};
> +				};
> +			};
> +
[..]
> +		};

/soc does not end here anymore, please remember to rebase the change on
v6.6-rc1.

Thanks,
Bjorn

>  	};
>  
>  	arch_timer: timer {
> -- 
> 2.17.1
> 



[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [Linux for Sparc]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux