diff mbox series

[v2,05/13] dt-bindings: thermal: mediatek: Add LVTS thermal controller definition for MT8186

Message ID 20240318212428.3843952-6-nico@fluxnic.net
State New
Headers show
Series Mediatek thermal sensor driver support for MT8186 and MT8188 | expand

Commit Message

Nicolas Pitre March 18, 2024, 9:22 p.m. UTC
From: Nicolas Pitre <npitre@baylibre.com>

Add LVTS thermal controller definition for MT8186.

Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
---
 .../bindings/thermal/mediatek,lvts-thermal.yaml        |  2 ++
 include/dt-bindings/thermal/mediatek,lvts-thermal.h    | 10 ++++++++++
 2 files changed, 12 insertions(+)

Comments

AngeloGioacchino Del Regno March 19, 2024, 11:45 a.m. UTC | #1
Il 18/03/24 22:22, Nicolas Pitre ha scritto:
> From: Nicolas Pitre <npitre@baylibre.com>
> 
> Add LVTS thermal controller definition for MT8186.
> 
> Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
> ---
>   .../bindings/thermal/mediatek,lvts-thermal.yaml        |  2 ++
>   include/dt-bindings/thermal/mediatek,lvts-thermal.h    | 10 ++++++++++
>   2 files changed, 12 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/thermal/mediatek,lvts-thermal.yaml b/Documentation/devicetree/bindings/thermal/mediatek,lvts-thermal.yaml
> index e6665af52e..4173bae530 100644
> --- a/Documentation/devicetree/bindings/thermal/mediatek,lvts-thermal.yaml
> +++ b/Documentation/devicetree/bindings/thermal/mediatek,lvts-thermal.yaml
> @@ -19,6 +19,7 @@ properties:
>     compatible:
>       enum:
>         - mediatek,mt7988-lvts-ap
> +      - mediatek,mt8186-lvts
>         - mediatek,mt8192-lvts-ap
>         - mediatek,mt8192-lvts-mcu
>         - mediatek,mt8195-lvts-ap
> @@ -75,6 +76,7 @@ allOf:
>           compatible:
>             contains:
>               enum:
> +              - mediatek,mt8186-lvts
>                 - mediatek,mt8195-lvts-ap
>                 - mediatek,mt8195-lvts-mcu
>       then:
> diff --git a/include/dt-bindings/thermal/mediatek,lvts-thermal.h b/include/dt-bindings/thermal/mediatek,lvts-thermal.h
> index 997e2f5512..3197ca6087 100644
> --- a/include/dt-bindings/thermal/mediatek,lvts-thermal.h
> +++ b/include/dt-bindings/thermal/mediatek,lvts-thermal.h
> @@ -16,6 +16,16 @@
>   #define MT7988_ETHWARP_0	6
>   #define MT7988_ETHWARP_1	7
>   
> +#define MT8186_TS1_0		0

TSx_y makes no sense: the LVTS sensors are SoC internal and will never change
what they actually measure.

This comment was repeated on literally all of the definitions that you can
currently see in this file - and I'm repeating that again: please follow what
was already done for all SoCs in this binding and use a meaningful name.

#define SOC_{LVTS_INSTANCE(ap/mcu)}_SENSINGPOINT	0
.....							n+1

Regards,
Angelo

> +#define MT8186_TS1_1		1
> +#define MT8186_TS1_2		2
> +#define MT8186_TS1_3		3
> +#define MT8186_TS2_0		4
> +#define MT8186_TS2_1		5
> +#define MT8186_TS3_0		6
> +#define MT8186_TS3_1		7
> +#define MT8186_TS3_2		8
> +
>   #define MT8195_MCU_BIG_CPU0     0
>   #define MT8195_MCU_BIG_CPU1     1
>   #define MT8195_MCU_BIG_CPU2     2
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/thermal/mediatek,lvts-thermal.yaml b/Documentation/devicetree/bindings/thermal/mediatek,lvts-thermal.yaml
index e6665af52e..4173bae530 100644
--- a/Documentation/devicetree/bindings/thermal/mediatek,lvts-thermal.yaml
+++ b/Documentation/devicetree/bindings/thermal/mediatek,lvts-thermal.yaml
@@ -19,6 +19,7 @@  properties:
   compatible:
     enum:
       - mediatek,mt7988-lvts-ap
+      - mediatek,mt8186-lvts
       - mediatek,mt8192-lvts-ap
       - mediatek,mt8192-lvts-mcu
       - mediatek,mt8195-lvts-ap
@@ -75,6 +76,7 @@  allOf:
         compatible:
           contains:
             enum:
+              - mediatek,mt8186-lvts
               - mediatek,mt8195-lvts-ap
               - mediatek,mt8195-lvts-mcu
     then:
diff --git a/include/dt-bindings/thermal/mediatek,lvts-thermal.h b/include/dt-bindings/thermal/mediatek,lvts-thermal.h
index 997e2f5512..3197ca6087 100644
--- a/include/dt-bindings/thermal/mediatek,lvts-thermal.h
+++ b/include/dt-bindings/thermal/mediatek,lvts-thermal.h
@@ -16,6 +16,16 @@ 
 #define MT7988_ETHWARP_0	6
 #define MT7988_ETHWARP_1	7
 
+#define MT8186_TS1_0		0
+#define MT8186_TS1_1		1
+#define MT8186_TS1_2		2
+#define MT8186_TS1_3		3
+#define MT8186_TS2_0		4
+#define MT8186_TS2_1		5
+#define MT8186_TS3_0		6
+#define MT8186_TS3_1		7
+#define MT8186_TS3_2		8
+
 #define MT8195_MCU_BIG_CPU0     0
 #define MT8195_MCU_BIG_CPU1     1
 #define MT8195_MCU_BIG_CPU2     2