All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v1 0/2] thermal: amlogic: introduce A1 SoC family Thermal Sensor controller
@ 2024-03-28 13:37 ` Dmitry Rokosov
  0 siblings, 0 replies; 18+ messages in thread
From: Dmitry Rokosov @ 2024-03-28 13:37 UTC (permalink / raw)
  To: neil.armstrong, jbrunet, mturquette, khilman,
	martin.blumenstingl, glaroque, rafael, daniel.lezcano, rui.zhang,
	lukasz.luba, robh+dt, krzysztof.kozlowski+dt, conor+dt
  Cc: kernel, rockosov, linux-amlogic, linux-pm, linux-kernel,
	devicetree, linux-arm-kernel, Dmitry Rokosov

It is primarily based on the G12A thermal controller, with only a slight
variation in the offset value of the efuse parameters. Therefore, this
patch series provides appropriate platform data and dt-bindings to
ensure proper support.

Dmitry Rokosov (2):
  dt-bindings: thermal: amlogic: add support for A1 thermal sensor
  thermal: amlogic: support A1 SoC family Thermal Sensor controller

 .../bindings/thermal/amlogic,thermal.yaml          | 14 +++++++++-----
 drivers/thermal/amlogic_thermal.c                  | 10 ++++++++++
 2 files changed, 19 insertions(+), 5 deletions(-)

-- 
2.43.0


^ permalink raw reply	[flat|nested] 18+ messages in thread

* [PATCH v1 0/2] thermal: amlogic: introduce A1 SoC family Thermal Sensor controller
@ 2024-03-28 13:37 ` Dmitry Rokosov
  0 siblings, 0 replies; 18+ messages in thread
From: Dmitry Rokosov @ 2024-03-28 13:37 UTC (permalink / raw)
  To: neil.armstrong, jbrunet, mturquette, khilman,
	martin.blumenstingl, glaroque, rafael, daniel.lezcano, rui.zhang,
	lukasz.luba, robh+dt, krzysztof.kozlowski+dt, conor+dt
  Cc: kernel, rockosov, linux-amlogic, linux-pm, linux-kernel,
	devicetree, linux-arm-kernel, Dmitry Rokosov

It is primarily based on the G12A thermal controller, with only a slight
variation in the offset value of the efuse parameters. Therefore, this
patch series provides appropriate platform data and dt-bindings to
ensure proper support.

Dmitry Rokosov (2):
  dt-bindings: thermal: amlogic: add support for A1 thermal sensor
  thermal: amlogic: support A1 SoC family Thermal Sensor controller

 .../bindings/thermal/amlogic,thermal.yaml          | 14 +++++++++-----
 drivers/thermal/amlogic_thermal.c                  | 10 ++++++++++
 2 files changed, 19 insertions(+), 5 deletions(-)

-- 
2.43.0


_______________________________________________
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

* [PATCH v1 0/2] thermal: amlogic: introduce A1 SoC family Thermal Sensor controller
@ 2024-03-28 13:37 ` Dmitry Rokosov
  0 siblings, 0 replies; 18+ messages in thread
From: Dmitry Rokosov @ 2024-03-28 13:37 UTC (permalink / raw)
  To: neil.armstrong, jbrunet, mturquette, khilman,
	martin.blumenstingl, glaroque, rafael, daniel.lezcano, rui.zhang,
	lukasz.luba, robh+dt, krzysztof.kozlowski+dt, conor+dt
  Cc: kernel, rockosov, linux-amlogic, linux-pm, linux-kernel,
	devicetree, linux-arm-kernel, Dmitry Rokosov

It is primarily based on the G12A thermal controller, with only a slight
variation in the offset value of the efuse parameters. Therefore, this
patch series provides appropriate platform data and dt-bindings to
ensure proper support.

Dmitry Rokosov (2):
  dt-bindings: thermal: amlogic: add support for A1 thermal sensor
  thermal: amlogic: support A1 SoC family Thermal Sensor controller

 .../bindings/thermal/amlogic,thermal.yaml          | 14 +++++++++-----
 drivers/thermal/amlogic_thermal.c                  | 10 ++++++++++
 2 files changed, 19 insertions(+), 5 deletions(-)

-- 
2.43.0


_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic

^ permalink raw reply	[flat|nested] 18+ messages in thread

* [PATCH v1 1/2] dt-bindings: thermal: amlogic: add support for A1 thermal sensor
  2024-03-28 13:37 ` Dmitry Rokosov
  (?)
@ 2024-03-28 13:37   ` Dmitry Rokosov
  -1 siblings, 0 replies; 18+ messages in thread
From: Dmitry Rokosov @ 2024-03-28 13:37 UTC (permalink / raw)
  To: neil.armstrong, jbrunet, mturquette, khilman,
	martin.blumenstingl, glaroque, rafael, daniel.lezcano, rui.zhang,
	lukasz.luba, robh+dt, krzysztof.kozlowski+dt, conor+dt
  Cc: kernel, rockosov, linux-amlogic, linux-pm, linux-kernel,
	devicetree, linux-arm-kernel, Dmitry Rokosov

Provide right compatible properties for Amlogic A1 Thermal Sensor
controller. A1 family supports only one thermal node - CPU thermal
sensor.

Signed-off-by: Dmitry Rokosov <ddrokosov@salutedevices.com>
---
 .../bindings/thermal/amlogic,thermal.yaml          | 14 +++++++++-----
 1 file changed, 9 insertions(+), 5 deletions(-)

diff --git a/Documentation/devicetree/bindings/thermal/amlogic,thermal.yaml b/Documentation/devicetree/bindings/thermal/amlogic,thermal.yaml
index 20f8f9b3b971..0e7f6568d385 100644
--- a/Documentation/devicetree/bindings/thermal/amlogic,thermal.yaml
+++ b/Documentation/devicetree/bindings/thermal/amlogic,thermal.yaml
@@ -13,11 +13,15 @@ description: Binding for Amlogic Thermal
 
 properties:
   compatible:
-    items:
-      - enum:
-          - amlogic,g12a-cpu-thermal
-          - amlogic,g12a-ddr-thermal
-      - const: amlogic,g12a-thermal
+    oneOf:
+      - items:
+          - enum:
+              - amlogic,g12a-cpu-thermal
+              - amlogic,g12a-ddr-thermal
+          - const: amlogic,g12a-thermal
+      - items:
+          - const: amlogic,a1-cpu-thermal
+          - const: amlogic,a1-thermal
 
   reg:
     maxItems: 1
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [PATCH v1 1/2] dt-bindings: thermal: amlogic: add support for A1 thermal sensor
@ 2024-03-28 13:37   ` Dmitry Rokosov
  0 siblings, 0 replies; 18+ messages in thread
From: Dmitry Rokosov @ 2024-03-28 13:37 UTC (permalink / raw)
  To: neil.armstrong, jbrunet, mturquette, khilman,
	martin.blumenstingl, glaroque, rafael, daniel.lezcano, rui.zhang,
	lukasz.luba, robh+dt, krzysztof.kozlowski+dt, conor+dt
  Cc: kernel, rockosov, linux-amlogic, linux-pm, linux-kernel,
	devicetree, linux-arm-kernel, Dmitry Rokosov

Provide right compatible properties for Amlogic A1 Thermal Sensor
controller. A1 family supports only one thermal node - CPU thermal
sensor.

Signed-off-by: Dmitry Rokosov <ddrokosov@salutedevices.com>
---
 .../bindings/thermal/amlogic,thermal.yaml          | 14 +++++++++-----
 1 file changed, 9 insertions(+), 5 deletions(-)

diff --git a/Documentation/devicetree/bindings/thermal/amlogic,thermal.yaml b/Documentation/devicetree/bindings/thermal/amlogic,thermal.yaml
index 20f8f9b3b971..0e7f6568d385 100644
--- a/Documentation/devicetree/bindings/thermal/amlogic,thermal.yaml
+++ b/Documentation/devicetree/bindings/thermal/amlogic,thermal.yaml
@@ -13,11 +13,15 @@ description: Binding for Amlogic Thermal
 
 properties:
   compatible:
-    items:
-      - enum:
-          - amlogic,g12a-cpu-thermal
-          - amlogic,g12a-ddr-thermal
-      - const: amlogic,g12a-thermal
+    oneOf:
+      - items:
+          - enum:
+              - amlogic,g12a-cpu-thermal
+              - amlogic,g12a-ddr-thermal
+          - const: amlogic,g12a-thermal
+      - items:
+          - const: amlogic,a1-cpu-thermal
+          - const: amlogic,a1-thermal
 
   reg:
     maxItems: 1
-- 
2.43.0


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [PATCH v1 1/2] dt-bindings: thermal: amlogic: add support for A1 thermal sensor
@ 2024-03-28 13:37   ` Dmitry Rokosov
  0 siblings, 0 replies; 18+ messages in thread
From: Dmitry Rokosov @ 2024-03-28 13:37 UTC (permalink / raw)
  To: neil.armstrong, jbrunet, mturquette, khilman,
	martin.blumenstingl, glaroque, rafael, daniel.lezcano, rui.zhang,
	lukasz.luba, robh+dt, krzysztof.kozlowski+dt, conor+dt
  Cc: kernel, rockosov, linux-amlogic, linux-pm, linux-kernel,
	devicetree, linux-arm-kernel, Dmitry Rokosov

Provide right compatible properties for Amlogic A1 Thermal Sensor
controller. A1 family supports only one thermal node - CPU thermal
sensor.

Signed-off-by: Dmitry Rokosov <ddrokosov@salutedevices.com>
---
 .../bindings/thermal/amlogic,thermal.yaml          | 14 +++++++++-----
 1 file changed, 9 insertions(+), 5 deletions(-)

diff --git a/Documentation/devicetree/bindings/thermal/amlogic,thermal.yaml b/Documentation/devicetree/bindings/thermal/amlogic,thermal.yaml
index 20f8f9b3b971..0e7f6568d385 100644
--- a/Documentation/devicetree/bindings/thermal/amlogic,thermal.yaml
+++ b/Documentation/devicetree/bindings/thermal/amlogic,thermal.yaml
@@ -13,11 +13,15 @@ description: Binding for Amlogic Thermal
 
 properties:
   compatible:
-    items:
-      - enum:
-          - amlogic,g12a-cpu-thermal
-          - amlogic,g12a-ddr-thermal
-      - const: amlogic,g12a-thermal
+    oneOf:
+      - items:
+          - enum:
+              - amlogic,g12a-cpu-thermal
+              - amlogic,g12a-ddr-thermal
+          - const: amlogic,g12a-thermal
+      - items:
+          - const: amlogic,a1-cpu-thermal
+          - const: amlogic,a1-thermal
 
   reg:
     maxItems: 1
-- 
2.43.0


_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic

^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [PATCH v1 2/2] thermal: amlogic: support A1 SoC family Thermal Sensor controller
  2024-03-28 13:37 ` Dmitry Rokosov
  (?)
@ 2024-03-28 13:37   ` Dmitry Rokosov
  -1 siblings, 0 replies; 18+ messages in thread
From: Dmitry Rokosov @ 2024-03-28 13:37 UTC (permalink / raw)
  To: neil.armstrong, jbrunet, mturquette, khilman,
	martin.blumenstingl, glaroque, rafael, daniel.lezcano, rui.zhang,
	lukasz.luba, robh+dt, krzysztof.kozlowski+dt, conor+dt
  Cc: kernel, rockosov, linux-amlogic, linux-pm, linux-kernel,
	devicetree, linux-arm-kernel, Dmitry Rokosov

In comparison to other Amlogic chips, there is one key difference.
The offset for the sec_ao base, also known as u_efuse_off, is special,
while other aspects remain the same.

Signed-off-by: Dmitry Rokosov <ddrokosov@salutedevices.com>
---
 drivers/thermal/amlogic_thermal.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/drivers/thermal/amlogic_thermal.c b/drivers/thermal/amlogic_thermal.c
index 5877cde25b79..1d23afd32013 100644
--- a/drivers/thermal/amlogic_thermal.c
+++ b/drivers/thermal/amlogic_thermal.c
@@ -222,6 +222,12 @@ static const struct amlogic_thermal_data amlogic_thermal_g12a_ddr_param = {
 	.regmap_config = &amlogic_thermal_regmap_config_g12a,
 };
 
+static const struct amlogic_thermal_data amlogic_thermal_a1_cpu_param = {
+	.u_efuse_off = 0x114,
+	.calibration_parameters = &amlogic_thermal_g12a,
+	.regmap_config = &amlogic_thermal_regmap_config_g12a,
+};
+
 static const struct of_device_id of_amlogic_thermal_match[] = {
 	{
 		.compatible = "amlogic,g12a-ddr-thermal",
@@ -231,6 +237,10 @@ static const struct of_device_id of_amlogic_thermal_match[] = {
 		.compatible = "amlogic,g12a-cpu-thermal",
 		.data = &amlogic_thermal_g12a_cpu_param,
 	},
+	{
+		.compatible = "amlogic,a1-cpu-thermal",
+		.data = &amlogic_thermal_a1_cpu_param,
+	},
 	{ /* sentinel */ }
 };
 MODULE_DEVICE_TABLE(of, of_amlogic_thermal_match);
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [PATCH v1 2/2] thermal: amlogic: support A1 SoC family Thermal Sensor controller
@ 2024-03-28 13:37   ` Dmitry Rokosov
  0 siblings, 0 replies; 18+ messages in thread
From: Dmitry Rokosov @ 2024-03-28 13:37 UTC (permalink / raw)
  To: neil.armstrong, jbrunet, mturquette, khilman,
	martin.blumenstingl, glaroque, rafael, daniel.lezcano, rui.zhang,
	lukasz.luba, robh+dt, krzysztof.kozlowski+dt, conor+dt
  Cc: kernel, rockosov, linux-amlogic, linux-pm, linux-kernel,
	devicetree, linux-arm-kernel, Dmitry Rokosov

In comparison to other Amlogic chips, there is one key difference.
The offset for the sec_ao base, also known as u_efuse_off, is special,
while other aspects remain the same.

Signed-off-by: Dmitry Rokosov <ddrokosov@salutedevices.com>
---
 drivers/thermal/amlogic_thermal.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/drivers/thermal/amlogic_thermal.c b/drivers/thermal/amlogic_thermal.c
index 5877cde25b79..1d23afd32013 100644
--- a/drivers/thermal/amlogic_thermal.c
+++ b/drivers/thermal/amlogic_thermal.c
@@ -222,6 +222,12 @@ static const struct amlogic_thermal_data amlogic_thermal_g12a_ddr_param = {
 	.regmap_config = &amlogic_thermal_regmap_config_g12a,
 };
 
+static const struct amlogic_thermal_data amlogic_thermal_a1_cpu_param = {
+	.u_efuse_off = 0x114,
+	.calibration_parameters = &amlogic_thermal_g12a,
+	.regmap_config = &amlogic_thermal_regmap_config_g12a,
+};
+
 static const struct of_device_id of_amlogic_thermal_match[] = {
 	{
 		.compatible = "amlogic,g12a-ddr-thermal",
@@ -231,6 +237,10 @@ static const struct of_device_id of_amlogic_thermal_match[] = {
 		.compatible = "amlogic,g12a-cpu-thermal",
 		.data = &amlogic_thermal_g12a_cpu_param,
 	},
+	{
+		.compatible = "amlogic,a1-cpu-thermal",
+		.data = &amlogic_thermal_a1_cpu_param,
+	},
 	{ /* sentinel */ }
 };
 MODULE_DEVICE_TABLE(of, of_amlogic_thermal_match);
-- 
2.43.0


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [PATCH v1 2/2] thermal: amlogic: support A1 SoC family Thermal Sensor controller
@ 2024-03-28 13:37   ` Dmitry Rokosov
  0 siblings, 0 replies; 18+ messages in thread
From: Dmitry Rokosov @ 2024-03-28 13:37 UTC (permalink / raw)
  To: neil.armstrong, jbrunet, mturquette, khilman,
	martin.blumenstingl, glaroque, rafael, daniel.lezcano, rui.zhang,
	lukasz.luba, robh+dt, krzysztof.kozlowski+dt, conor+dt
  Cc: kernel, rockosov, linux-amlogic, linux-pm, linux-kernel,
	devicetree, linux-arm-kernel, Dmitry Rokosov

In comparison to other Amlogic chips, there is one key difference.
The offset for the sec_ao base, also known as u_efuse_off, is special,
while other aspects remain the same.

Signed-off-by: Dmitry Rokosov <ddrokosov@salutedevices.com>
---
 drivers/thermal/amlogic_thermal.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/drivers/thermal/amlogic_thermal.c b/drivers/thermal/amlogic_thermal.c
index 5877cde25b79..1d23afd32013 100644
--- a/drivers/thermal/amlogic_thermal.c
+++ b/drivers/thermal/amlogic_thermal.c
@@ -222,6 +222,12 @@ static const struct amlogic_thermal_data amlogic_thermal_g12a_ddr_param = {
 	.regmap_config = &amlogic_thermal_regmap_config_g12a,
 };
 
+static const struct amlogic_thermal_data amlogic_thermal_a1_cpu_param = {
+	.u_efuse_off = 0x114,
+	.calibration_parameters = &amlogic_thermal_g12a,
+	.regmap_config = &amlogic_thermal_regmap_config_g12a,
+};
+
 static const struct of_device_id of_amlogic_thermal_match[] = {
 	{
 		.compatible = "amlogic,g12a-ddr-thermal",
@@ -231,6 +237,10 @@ static const struct of_device_id of_amlogic_thermal_match[] = {
 		.compatible = "amlogic,g12a-cpu-thermal",
 		.data = &amlogic_thermal_g12a_cpu_param,
 	},
+	{
+		.compatible = "amlogic,a1-cpu-thermal",
+		.data = &amlogic_thermal_a1_cpu_param,
+	},
 	{ /* sentinel */ }
 };
 MODULE_DEVICE_TABLE(of, of_amlogic_thermal_match);
-- 
2.43.0


_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic

^ permalink raw reply related	[flat|nested] 18+ messages in thread

* Re: [PATCH v1 1/2] dt-bindings: thermal: amlogic: add support for A1 thermal sensor
  2024-03-28 13:37   ` Dmitry Rokosov
  (?)
@ 2024-03-28 14:07     ` neil.armstrong
  -1 siblings, 0 replies; 18+ messages in thread
From: neil.armstrong @ 2024-03-28 14:07 UTC (permalink / raw)
  To: Dmitry Rokosov, jbrunet, mturquette, khilman,
	martin.blumenstingl, glaroque, rafael, daniel.lezcano, rui.zhang,
	lukasz.luba, robh+dt, krzysztof.kozlowski+dt, conor+dt
  Cc: kernel, rockosov, linux-amlogic, linux-pm, linux-kernel,
	devicetree, linux-arm-kernel

Hi,

On 28/03/2024 14:37, Dmitry Rokosov wrote:
> Provide right compatible properties for Amlogic A1 Thermal Sensor
> controller. A1 family supports only one thermal node - CPU thermal
> sensor.
> 
> Signed-off-by: Dmitry Rokosov <ddrokosov@salutedevices.com>
> ---
>   .../bindings/thermal/amlogic,thermal.yaml          | 14 +++++++++-----
>   1 file changed, 9 insertions(+), 5 deletions(-)
> 
> diff --git a/Documentation/devicetree/bindings/thermal/amlogic,thermal.yaml b/Documentation/devicetree/bindings/thermal/amlogic,thermal.yaml
> index 20f8f9b3b971..0e7f6568d385 100644
> --- a/Documentation/devicetree/bindings/thermal/amlogic,thermal.yaml
> +++ b/Documentation/devicetree/bindings/thermal/amlogic,thermal.yaml
> @@ -13,11 +13,15 @@ description: Binding for Amlogic Thermal
>   
>   properties:
>     compatible:
> -    items:
> -      - enum:
> -          - amlogic,g12a-cpu-thermal
> -          - amlogic,g12a-ddr-thermal
> -      - const: amlogic,g12a-thermal
> +    oneOf:
> +      - items:
> +          - enum:
> +              - amlogic,g12a-cpu-thermal
> +              - amlogic,g12a-ddr-thermal
> +          - const: amlogic,g12a-thermal
> +      - items:
> +          - const: amlogic,a1-cpu-thermal
> +          - const: amlogic,a1-thermal

In this case you can just use "amlogic,a1-cpu-thermal" or "amlogic,a1-thermal", no need for a fallback.

Thanks,
Neil

>   
>     reg:
>       maxItems: 1


^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH v1 1/2] dt-bindings: thermal: amlogic: add support for A1 thermal sensor
@ 2024-03-28 14:07     ` neil.armstrong
  0 siblings, 0 replies; 18+ messages in thread
From: neil.armstrong @ 2024-03-28 14:07 UTC (permalink / raw)
  To: Dmitry Rokosov, jbrunet, mturquette, khilman,
	martin.blumenstingl, glaroque, rafael, daniel.lezcano, rui.zhang,
	lukasz.luba, robh+dt, krzysztof.kozlowski+dt, conor+dt
  Cc: kernel, rockosov, linux-amlogic, linux-pm, linux-kernel,
	devicetree, linux-arm-kernel

Hi,

On 28/03/2024 14:37, Dmitry Rokosov wrote:
> Provide right compatible properties for Amlogic A1 Thermal Sensor
> controller. A1 family supports only one thermal node - CPU thermal
> sensor.
> 
> Signed-off-by: Dmitry Rokosov <ddrokosov@salutedevices.com>
> ---
>   .../bindings/thermal/amlogic,thermal.yaml          | 14 +++++++++-----
>   1 file changed, 9 insertions(+), 5 deletions(-)
> 
> diff --git a/Documentation/devicetree/bindings/thermal/amlogic,thermal.yaml b/Documentation/devicetree/bindings/thermal/amlogic,thermal.yaml
> index 20f8f9b3b971..0e7f6568d385 100644
> --- a/Documentation/devicetree/bindings/thermal/amlogic,thermal.yaml
> +++ b/Documentation/devicetree/bindings/thermal/amlogic,thermal.yaml
> @@ -13,11 +13,15 @@ description: Binding for Amlogic Thermal
>   
>   properties:
>     compatible:
> -    items:
> -      - enum:
> -          - amlogic,g12a-cpu-thermal
> -          - amlogic,g12a-ddr-thermal
> -      - const: amlogic,g12a-thermal
> +    oneOf:
> +      - items:
> +          - enum:
> +              - amlogic,g12a-cpu-thermal
> +              - amlogic,g12a-ddr-thermal
> +          - const: amlogic,g12a-thermal
> +      - items:
> +          - const: amlogic,a1-cpu-thermal
> +          - const: amlogic,a1-thermal

In this case you can just use "amlogic,a1-cpu-thermal" or "amlogic,a1-thermal", no need for a fallback.

Thanks,
Neil

>   
>     reg:
>       maxItems: 1


_______________________________________________
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

* Re: [PATCH v1 1/2] dt-bindings: thermal: amlogic: add support for A1 thermal sensor
@ 2024-03-28 14:07     ` neil.armstrong
  0 siblings, 0 replies; 18+ messages in thread
From: neil.armstrong @ 2024-03-28 14:07 UTC (permalink / raw)
  To: Dmitry Rokosov, jbrunet, mturquette, khilman,
	martin.blumenstingl, glaroque, rafael, daniel.lezcano, rui.zhang,
	lukasz.luba, robh+dt, krzysztof.kozlowski+dt, conor+dt
  Cc: kernel, rockosov, linux-amlogic, linux-pm, linux-kernel,
	devicetree, linux-arm-kernel

Hi,

On 28/03/2024 14:37, Dmitry Rokosov wrote:
> Provide right compatible properties for Amlogic A1 Thermal Sensor
> controller. A1 family supports only one thermal node - CPU thermal
> sensor.
> 
> Signed-off-by: Dmitry Rokosov <ddrokosov@salutedevices.com>
> ---
>   .../bindings/thermal/amlogic,thermal.yaml          | 14 +++++++++-----
>   1 file changed, 9 insertions(+), 5 deletions(-)
> 
> diff --git a/Documentation/devicetree/bindings/thermal/amlogic,thermal.yaml b/Documentation/devicetree/bindings/thermal/amlogic,thermal.yaml
> index 20f8f9b3b971..0e7f6568d385 100644
> --- a/Documentation/devicetree/bindings/thermal/amlogic,thermal.yaml
> +++ b/Documentation/devicetree/bindings/thermal/amlogic,thermal.yaml
> @@ -13,11 +13,15 @@ description: Binding for Amlogic Thermal
>   
>   properties:
>     compatible:
> -    items:
> -      - enum:
> -          - amlogic,g12a-cpu-thermal
> -          - amlogic,g12a-ddr-thermal
> -      - const: amlogic,g12a-thermal
> +    oneOf:
> +      - items:
> +          - enum:
> +              - amlogic,g12a-cpu-thermal
> +              - amlogic,g12a-ddr-thermal
> +          - const: amlogic,g12a-thermal
> +      - items:
> +          - const: amlogic,a1-cpu-thermal
> +          - const: amlogic,a1-thermal

In this case you can just use "amlogic,a1-cpu-thermal" or "amlogic,a1-thermal", no need for a fallback.

Thanks,
Neil

>   
>     reg:
>       maxItems: 1


_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH v1 2/2] thermal: amlogic: support A1 SoC family Thermal Sensor controller
  2024-03-28 13:37   ` Dmitry Rokosov
  (?)
@ 2024-03-28 14:08     ` neil.armstrong
  -1 siblings, 0 replies; 18+ messages in thread
From: neil.armstrong @ 2024-03-28 14:08 UTC (permalink / raw)
  To: Dmitry Rokosov, jbrunet, mturquette, khilman,
	martin.blumenstingl, glaroque, rafael, daniel.lezcano, rui.zhang,
	lukasz.luba, robh+dt, krzysztof.kozlowski+dt, conor+dt
  Cc: kernel, rockosov, linux-amlogic, linux-pm, linux-kernel,
	devicetree, linux-arm-kernel

On 28/03/2024 14:37, Dmitry Rokosov wrote:
> In comparison to other Amlogic chips, there is one key difference.
> The offset for the sec_ao base, also known as u_efuse_off, is special,
> while other aspects remain the same.
> 
> Signed-off-by: Dmitry Rokosov <ddrokosov@salutedevices.com>
> ---
>   drivers/thermal/amlogic_thermal.c | 10 ++++++++++
>   1 file changed, 10 insertions(+)
> 
> diff --git a/drivers/thermal/amlogic_thermal.c b/drivers/thermal/amlogic_thermal.c
> index 5877cde25b79..1d23afd32013 100644
> --- a/drivers/thermal/amlogic_thermal.c
> +++ b/drivers/thermal/amlogic_thermal.c
> @@ -222,6 +222,12 @@ static const struct amlogic_thermal_data amlogic_thermal_g12a_ddr_param = {
>   	.regmap_config = &amlogic_thermal_regmap_config_g12a,
>   };
>   
> +static const struct amlogic_thermal_data amlogic_thermal_a1_cpu_param = {
> +	.u_efuse_off = 0x114,
> +	.calibration_parameters = &amlogic_thermal_g12a,
> +	.regmap_config = &amlogic_thermal_regmap_config_g12a,
> +};
> +
>   static const struct of_device_id of_amlogic_thermal_match[] = {
>   	{
>   		.compatible = "amlogic,g12a-ddr-thermal",
> @@ -231,6 +237,10 @@ static const struct of_device_id of_amlogic_thermal_match[] = {
>   		.compatible = "amlogic,g12a-cpu-thermal",
>   		.data = &amlogic_thermal_g12a_cpu_param,
>   	},
> +	{
> +		.compatible = "amlogic,a1-cpu-thermal",
> +		.data = &amlogic_thermal_a1_cpu_param,
> +	},
>   	{ /* sentinel */ }
>   };
>   MODULE_DEVICE_TABLE(of, of_amlogic_thermal_match);

Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>

Keep it even it you change the compatible,

Thanks,
Neil

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH v1 2/2] thermal: amlogic: support A1 SoC family Thermal Sensor controller
@ 2024-03-28 14:08     ` neil.armstrong
  0 siblings, 0 replies; 18+ messages in thread
From: neil.armstrong @ 2024-03-28 14:08 UTC (permalink / raw)
  To: Dmitry Rokosov, jbrunet, mturquette, khilman,
	martin.blumenstingl, glaroque, rafael, daniel.lezcano, rui.zhang,
	lukasz.luba, robh+dt, krzysztof.kozlowski+dt, conor+dt
  Cc: kernel, rockosov, linux-amlogic, linux-pm, linux-kernel,
	devicetree, linux-arm-kernel

On 28/03/2024 14:37, Dmitry Rokosov wrote:
> In comparison to other Amlogic chips, there is one key difference.
> The offset for the sec_ao base, also known as u_efuse_off, is special,
> while other aspects remain the same.
> 
> Signed-off-by: Dmitry Rokosov <ddrokosov@salutedevices.com>
> ---
>   drivers/thermal/amlogic_thermal.c | 10 ++++++++++
>   1 file changed, 10 insertions(+)
> 
> diff --git a/drivers/thermal/amlogic_thermal.c b/drivers/thermal/amlogic_thermal.c
> index 5877cde25b79..1d23afd32013 100644
> --- a/drivers/thermal/amlogic_thermal.c
> +++ b/drivers/thermal/amlogic_thermal.c
> @@ -222,6 +222,12 @@ static const struct amlogic_thermal_data amlogic_thermal_g12a_ddr_param = {
>   	.regmap_config = &amlogic_thermal_regmap_config_g12a,
>   };
>   
> +static const struct amlogic_thermal_data amlogic_thermal_a1_cpu_param = {
> +	.u_efuse_off = 0x114,
> +	.calibration_parameters = &amlogic_thermal_g12a,
> +	.regmap_config = &amlogic_thermal_regmap_config_g12a,
> +};
> +
>   static const struct of_device_id of_amlogic_thermal_match[] = {
>   	{
>   		.compatible = "amlogic,g12a-ddr-thermal",
> @@ -231,6 +237,10 @@ static const struct of_device_id of_amlogic_thermal_match[] = {
>   		.compatible = "amlogic,g12a-cpu-thermal",
>   		.data = &amlogic_thermal_g12a_cpu_param,
>   	},
> +	{
> +		.compatible = "amlogic,a1-cpu-thermal",
> +		.data = &amlogic_thermal_a1_cpu_param,
> +	},
>   	{ /* sentinel */ }
>   };
>   MODULE_DEVICE_TABLE(of, of_amlogic_thermal_match);

Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>

Keep it even it you change the compatible,

Thanks,
Neil

_______________________________________________
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

* Re: [PATCH v1 2/2] thermal: amlogic: support A1 SoC family Thermal Sensor controller
@ 2024-03-28 14:08     ` neil.armstrong
  0 siblings, 0 replies; 18+ messages in thread
From: neil.armstrong @ 2024-03-28 14:08 UTC (permalink / raw)
  To: Dmitry Rokosov, jbrunet, mturquette, khilman,
	martin.blumenstingl, glaroque, rafael, daniel.lezcano, rui.zhang,
	lukasz.luba, robh+dt, krzysztof.kozlowski+dt, conor+dt
  Cc: kernel, rockosov, linux-amlogic, linux-pm, linux-kernel,
	devicetree, linux-arm-kernel

On 28/03/2024 14:37, Dmitry Rokosov wrote:
> In comparison to other Amlogic chips, there is one key difference.
> The offset for the sec_ao base, also known as u_efuse_off, is special,
> while other aspects remain the same.
> 
> Signed-off-by: Dmitry Rokosov <ddrokosov@salutedevices.com>
> ---
>   drivers/thermal/amlogic_thermal.c | 10 ++++++++++
>   1 file changed, 10 insertions(+)
> 
> diff --git a/drivers/thermal/amlogic_thermal.c b/drivers/thermal/amlogic_thermal.c
> index 5877cde25b79..1d23afd32013 100644
> --- a/drivers/thermal/amlogic_thermal.c
> +++ b/drivers/thermal/amlogic_thermal.c
> @@ -222,6 +222,12 @@ static const struct amlogic_thermal_data amlogic_thermal_g12a_ddr_param = {
>   	.regmap_config = &amlogic_thermal_regmap_config_g12a,
>   };
>   
> +static const struct amlogic_thermal_data amlogic_thermal_a1_cpu_param = {
> +	.u_efuse_off = 0x114,
> +	.calibration_parameters = &amlogic_thermal_g12a,
> +	.regmap_config = &amlogic_thermal_regmap_config_g12a,
> +};
> +
>   static const struct of_device_id of_amlogic_thermal_match[] = {
>   	{
>   		.compatible = "amlogic,g12a-ddr-thermal",
> @@ -231,6 +237,10 @@ static const struct of_device_id of_amlogic_thermal_match[] = {
>   		.compatible = "amlogic,g12a-cpu-thermal",
>   		.data = &amlogic_thermal_g12a_cpu_param,
>   	},
> +	{
> +		.compatible = "amlogic,a1-cpu-thermal",
> +		.data = &amlogic_thermal_a1_cpu_param,
> +	},
>   	{ /* sentinel */ }
>   };
>   MODULE_DEVICE_TABLE(of, of_amlogic_thermal_match);

Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>

Keep it even it you change the compatible,

Thanks,
Neil

_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH v1 1/2] dt-bindings: thermal: amlogic: add support for A1 thermal sensor
  2024-03-28 14:07     ` neil.armstrong
  (?)
@ 2024-03-28 14:29       ` Dmitry Rokosov
  -1 siblings, 0 replies; 18+ messages in thread
From: Dmitry Rokosov @ 2024-03-28 14:29 UTC (permalink / raw)
  To: neil.armstrong
  Cc: jbrunet, mturquette, khilman, martin.blumenstingl, glaroque,
	rafael, daniel.lezcano, rui.zhang, lukasz.luba, robh+dt,
	krzysztof.kozlowski+dt, conor+dt, kernel, rockosov,
	linux-amlogic, linux-pm, linux-kernel, devicetree,
	linux-arm-kernel

Hello Neil,

Thank you for quick feedback.

On Thu, Mar 28, 2024 at 03:07:52PM +0100, neil.armstrong@linaro.org wrote:
> Hi,
> 
> On 28/03/2024 14:37, Dmitry Rokosov wrote:
> > Provide right compatible properties for Amlogic A1 Thermal Sensor
> > controller. A1 family supports only one thermal node - CPU thermal
> > sensor.
> > 
> > Signed-off-by: Dmitry Rokosov <ddrokosov@salutedevices.com>
> > ---
> >   .../bindings/thermal/amlogic,thermal.yaml          | 14 +++++++++-----
> >   1 file changed, 9 insertions(+), 5 deletions(-)
> > 
> > diff --git a/Documentation/devicetree/bindings/thermal/amlogic,thermal.yaml b/Documentation/devicetree/bindings/thermal/amlogic,thermal.yaml
> > index 20f8f9b3b971..0e7f6568d385 100644
> > --- a/Documentation/devicetree/bindings/thermal/amlogic,thermal.yaml
> > +++ b/Documentation/devicetree/bindings/thermal/amlogic,thermal.yaml
> > @@ -13,11 +13,15 @@ description: Binding for Amlogic Thermal
> >   properties:
> >     compatible:
> > -    items:
> > -      - enum:
> > -          - amlogic,g12a-cpu-thermal
> > -          - amlogic,g12a-ddr-thermal
> > -      - const: amlogic,g12a-thermal
> > +    oneOf:
> > +      - items:
> > +          - enum:
> > +              - amlogic,g12a-cpu-thermal
> > +              - amlogic,g12a-ddr-thermal
> > +          - const: amlogic,g12a-thermal
> > +      - items:
> > +          - const: amlogic,a1-cpu-thermal
> > +          - const: amlogic,a1-thermal
> 
> In this case you can just use "amlogic,a1-cpu-thermal" or "amlogic,a1-thermal", no need for a fallback.

Okay, I will send v2 with only one compatible w/o fallback.

-- 
Thank you,
Dmitry

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH v1 1/2] dt-bindings: thermal: amlogic: add support for A1 thermal sensor
@ 2024-03-28 14:29       ` Dmitry Rokosov
  0 siblings, 0 replies; 18+ messages in thread
From: Dmitry Rokosov @ 2024-03-28 14:29 UTC (permalink / raw)
  To: neil.armstrong
  Cc: jbrunet, mturquette, khilman, martin.blumenstingl, glaroque,
	rafael, daniel.lezcano, rui.zhang, lukasz.luba, robh+dt,
	krzysztof.kozlowski+dt, conor+dt, kernel, rockosov,
	linux-amlogic, linux-pm, linux-kernel, devicetree,
	linux-arm-kernel

Hello Neil,

Thank you for quick feedback.

On Thu, Mar 28, 2024 at 03:07:52PM +0100, neil.armstrong@linaro.org wrote:
> Hi,
> 
> On 28/03/2024 14:37, Dmitry Rokosov wrote:
> > Provide right compatible properties for Amlogic A1 Thermal Sensor
> > controller. A1 family supports only one thermal node - CPU thermal
> > sensor.
> > 
> > Signed-off-by: Dmitry Rokosov <ddrokosov@salutedevices.com>
> > ---
> >   .../bindings/thermal/amlogic,thermal.yaml          | 14 +++++++++-----
> >   1 file changed, 9 insertions(+), 5 deletions(-)
> > 
> > diff --git a/Documentation/devicetree/bindings/thermal/amlogic,thermal.yaml b/Documentation/devicetree/bindings/thermal/amlogic,thermal.yaml
> > index 20f8f9b3b971..0e7f6568d385 100644
> > --- a/Documentation/devicetree/bindings/thermal/amlogic,thermal.yaml
> > +++ b/Documentation/devicetree/bindings/thermal/amlogic,thermal.yaml
> > @@ -13,11 +13,15 @@ description: Binding for Amlogic Thermal
> >   properties:
> >     compatible:
> > -    items:
> > -      - enum:
> > -          - amlogic,g12a-cpu-thermal
> > -          - amlogic,g12a-ddr-thermal
> > -      - const: amlogic,g12a-thermal
> > +    oneOf:
> > +      - items:
> > +          - enum:
> > +              - amlogic,g12a-cpu-thermal
> > +              - amlogic,g12a-ddr-thermal
> > +          - const: amlogic,g12a-thermal
> > +      - items:
> > +          - const: amlogic,a1-cpu-thermal
> > +          - const: amlogic,a1-thermal
> 
> In this case you can just use "amlogic,a1-cpu-thermal" or "amlogic,a1-thermal", no need for a fallback.

Okay, I will send v2 with only one compatible w/o fallback.

-- 
Thank you,
Dmitry

_______________________________________________
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

* Re: [PATCH v1 1/2] dt-bindings: thermal: amlogic: add support for A1 thermal sensor
@ 2024-03-28 14:29       ` Dmitry Rokosov
  0 siblings, 0 replies; 18+ messages in thread
From: Dmitry Rokosov @ 2024-03-28 14:29 UTC (permalink / raw)
  To: neil.armstrong
  Cc: jbrunet, mturquette, khilman, martin.blumenstingl, glaroque,
	rafael, daniel.lezcano, rui.zhang, lukasz.luba, robh+dt,
	krzysztof.kozlowski+dt, conor+dt, kernel, rockosov,
	linux-amlogic, linux-pm, linux-kernel, devicetree,
	linux-arm-kernel

Hello Neil,

Thank you for quick feedback.

On Thu, Mar 28, 2024 at 03:07:52PM +0100, neil.armstrong@linaro.org wrote:
> Hi,
> 
> On 28/03/2024 14:37, Dmitry Rokosov wrote:
> > Provide right compatible properties for Amlogic A1 Thermal Sensor
> > controller. A1 family supports only one thermal node - CPU thermal
> > sensor.
> > 
> > Signed-off-by: Dmitry Rokosov <ddrokosov@salutedevices.com>
> > ---
> >   .../bindings/thermal/amlogic,thermal.yaml          | 14 +++++++++-----
> >   1 file changed, 9 insertions(+), 5 deletions(-)
> > 
> > diff --git a/Documentation/devicetree/bindings/thermal/amlogic,thermal.yaml b/Documentation/devicetree/bindings/thermal/amlogic,thermal.yaml
> > index 20f8f9b3b971..0e7f6568d385 100644
> > --- a/Documentation/devicetree/bindings/thermal/amlogic,thermal.yaml
> > +++ b/Documentation/devicetree/bindings/thermal/amlogic,thermal.yaml
> > @@ -13,11 +13,15 @@ description: Binding for Amlogic Thermal
> >   properties:
> >     compatible:
> > -    items:
> > -      - enum:
> > -          - amlogic,g12a-cpu-thermal
> > -          - amlogic,g12a-ddr-thermal
> > -      - const: amlogic,g12a-thermal
> > +    oneOf:
> > +      - items:
> > +          - enum:
> > +              - amlogic,g12a-cpu-thermal
> > +              - amlogic,g12a-ddr-thermal
> > +          - const: amlogic,g12a-thermal
> > +      - items:
> > +          - const: amlogic,a1-cpu-thermal
> > +          - const: amlogic,a1-thermal
> 
> In this case you can just use "amlogic,a1-cpu-thermal" or "amlogic,a1-thermal", no need for a fallback.

Okay, I will send v2 with only one compatible w/o fallback.

-- 
Thank you,
Dmitry

_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic

^ permalink raw reply	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2024-03-28 15:18 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-03-28 13:37 [PATCH v1 0/2] thermal: amlogic: introduce A1 SoC family Thermal Sensor controller Dmitry Rokosov
2024-03-28 13:37 ` Dmitry Rokosov
2024-03-28 13:37 ` Dmitry Rokosov
2024-03-28 13:37 ` [PATCH v1 1/2] dt-bindings: thermal: amlogic: add support for A1 thermal sensor Dmitry Rokosov
2024-03-28 13:37   ` Dmitry Rokosov
2024-03-28 13:37   ` Dmitry Rokosov
2024-03-28 14:07   ` neil.armstrong
2024-03-28 14:07     ` neil.armstrong
2024-03-28 14:07     ` neil.armstrong
2024-03-28 14:29     ` Dmitry Rokosov
2024-03-28 14:29       ` Dmitry Rokosov
2024-03-28 14:29       ` Dmitry Rokosov
2024-03-28 13:37 ` [PATCH v1 2/2] thermal: amlogic: support A1 SoC family Thermal Sensor controller Dmitry Rokosov
2024-03-28 13:37   ` Dmitry Rokosov
2024-03-28 13:37   ` Dmitry Rokosov
2024-03-28 14:08   ` neil.armstrong
2024-03-28 14:08     ` neil.armstrong
2024-03-28 14:08     ` neil.armstrong

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.