All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 00/10] thermal: Armada 375/380 SoC support
@ 2014-04-24 20:23 ` Ezequiel Garcia
  0 siblings, 0 replies; 30+ messages in thread
From: Ezequiel Garcia @ 2014-04-24 20:23 UTC (permalink / raw)
  To: linux-pm, linux-arm-kernel
  Cc: Jason Cooper, Zhang Rui, Sebastian Hesselbarth, Andrew Lunn,
	Thomas Petazzoni, Gregory Clement, Lior Amsalem, Tawfik Bayouk,
	devicetree, Ezequiel Garcia

This patchset adds the support for the thermal sensor in the recently
introduced Armada 375 and 38x SoC. Compared to the previous patchset
version, this v2 introduces the A380 SoC support.

The first five patches are preparation work. They add a generic
infrastructure that allows to support similar thermal sensors in
a non-intrusive way.

Patches six and seven uses this infrastructure to support the 
Armada 375 and 380 SoC thermal sensor.

Since there are some issues in the Armada 375 Z1 SoC thermal sensor,
patch eight adds a quirk to workaround such issues. The Z1 silicon stepping
is detected and the compatible string is updated, so the driver can apply
sensor initialization workarounds.

In addition, the quirk moves the offset of the thermal control register,
and allows to specifiy the correct (A0 stepping) offset in the devicetree.
This quirk is applied only for the A375-DB board, being the only board known
to have the problematic Z1 SoC.

Finally, the last two patches enables the thermal sensor in the devicetree.
for the Armada 375 A0 stepping SoC, and the Armada 380/385 SoCs.

The series applies on v3.15-rc1, and has been tested on A375-DB board
and A385-DB board.

Feedback and comments are welcome!

Changes from v1:

  * Introduced the Armada 380 support. In order to support this in a clean
    way, the 'inverted' field was added.

  * Cleaned the A375 workaround in the thermal driver, by detecting the
    device compatible string, as suggested by Jason Cooper.

  * Added details about the register offset in the Z1 stepping to the
    binding documentation as requested by Jason Cooper.

Ezequiel Garcia (10):
  thermal: armada: Rename armada_thermal_ops struct
  thermal: armada: Add infrastructure to support generic formulas
  thermal: armada: Add generic infrastructure to handle the sensor
  thermal: armada: Pass the platform_device to init_sensor()
  thermal: armada: Allow to specify an 'inverted readout' sensor
  thermal: armada: Support Armada 375 SoC
  thermal: armada: Support Armada 380 SoC
  ARM: mvebu: Add thermal quirk for the Armada 375 DB board
  ARM: mvebu: Enable the thermal sensor in Armada 375 SoC
  ARM: mvebu: Enable the thermal sensor in Armada 380/385 SoC

 .../devicetree/bindings/thermal/armada-thermal.txt |  12 +-
 arch/arm/boot/dts/armada-375.dtsi                  |   6 +
 arch/arm/boot/dts/armada-38x.dtsi                  |   6 +
 arch/arm/mach-mvebu/board-v7.c                     |  57 ++++++++
 arch/arm/mach-mvebu/mvebu-soc-id.h                 |   3 +
 drivers/thermal/armada_thermal.c                   | 158 ++++++++++++++++++---
 6 files changed, 222 insertions(+), 20 deletions(-)

-- 
1.9.1


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

* [PATCH v2 00/10] thermal: Armada 375/380 SoC support
@ 2014-04-24 20:23 ` Ezequiel Garcia
  0 siblings, 0 replies; 30+ messages in thread
From: Ezequiel Garcia @ 2014-04-24 20:23 UTC (permalink / raw)
  To: linux-arm-kernel

This patchset adds the support for the thermal sensor in the recently
introduced Armada 375 and 38x SoC. Compared to the previous patchset
version, this v2 introduces the A380 SoC support.

The first five patches are preparation work. They add a generic
infrastructure that allows to support similar thermal sensors in
a non-intrusive way.

Patches six and seven uses this infrastructure to support the 
Armada 375 and 380 SoC thermal sensor.

Since there are some issues in the Armada 375 Z1 SoC thermal sensor,
patch eight adds a quirk to workaround such issues. The Z1 silicon stepping
is detected and the compatible string is updated, so the driver can apply
sensor initialization workarounds.

In addition, the quirk moves the offset of the thermal control register,
and allows to specifiy the correct (A0 stepping) offset in the devicetree.
This quirk is applied only for the A375-DB board, being the only board known
to have the problematic Z1 SoC.

Finally, the last two patches enables the thermal sensor in the devicetree.
for the Armada 375 A0 stepping SoC, and the Armada 380/385 SoCs.

The series applies on v3.15-rc1, and has been tested on A375-DB board
and A385-DB board.

Feedback and comments are welcome!

Changes from v1:

  * Introduced the Armada 380 support. In order to support this in a clean
    way, the 'inverted' field was added.

  * Cleaned the A375 workaround in the thermal driver, by detecting the
    device compatible string, as suggested by Jason Cooper.

  * Added details about the register offset in the Z1 stepping to the
    binding documentation as requested by Jason Cooper.

Ezequiel Garcia (10):
  thermal: armada: Rename armada_thermal_ops struct
  thermal: armada: Add infrastructure to support generic formulas
  thermal: armada: Add generic infrastructure to handle the sensor
  thermal: armada: Pass the platform_device to init_sensor()
  thermal: armada: Allow to specify an 'inverted readout' sensor
  thermal: armada: Support Armada 375 SoC
  thermal: armada: Support Armada 380 SoC
  ARM: mvebu: Add thermal quirk for the Armada 375 DB board
  ARM: mvebu: Enable the thermal sensor in Armada 375 SoC
  ARM: mvebu: Enable the thermal sensor in Armada 380/385 SoC

 .../devicetree/bindings/thermal/armada-thermal.txt |  12 +-
 arch/arm/boot/dts/armada-375.dtsi                  |   6 +
 arch/arm/boot/dts/armada-38x.dtsi                  |   6 +
 arch/arm/mach-mvebu/board-v7.c                     |  57 ++++++++
 arch/arm/mach-mvebu/mvebu-soc-id.h                 |   3 +
 drivers/thermal/armada_thermal.c                   | 158 ++++++++++++++++++---
 6 files changed, 222 insertions(+), 20 deletions(-)

-- 
1.9.1

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

* [PATCH v2 01/10] thermal: armada: Rename armada_thermal_ops struct
  2014-04-24 20:23 ` Ezequiel Garcia
@ 2014-04-24 20:23   ` Ezequiel Garcia
  -1 siblings, 0 replies; 30+ messages in thread
From: Ezequiel Garcia @ 2014-04-24 20:23 UTC (permalink / raw)
  To: linux-pm, linux-arm-kernel
  Cc: Jason Cooper, Zhang Rui, Sebastian Hesselbarth, Andrew Lunn,
	Thomas Petazzoni, Gregory Clement, Lior Amsalem, Tawfik Bayouk,
	devicetree, Ezequiel Garcia

As preparation work to add a generic infrastructure to support
different SoC variants, the armada_thermal_ops will be used
to host the SoC-specific fields, such as formula values and
register offsets.

For this reason, the name armada_thermal_ops is no longer suitable,
and this commit replaces it with armada_thermal_data.

Signed-off-by: Ezequiel Garcia <ezequiel.garcia@free-electrons.com>
---
 drivers/thermal/armada_thermal.c | 20 ++++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)

diff --git a/drivers/thermal/armada_thermal.c b/drivers/thermal/armada_thermal.c
index 5e53212..c5db071 100644
--- a/drivers/thermal/armada_thermal.c
+++ b/drivers/thermal/armada_thermal.c
@@ -38,16 +38,16 @@
 #define PMU_TDC0_OTF_CAL_MASK		(0x1 << 30)
 #define PMU_TDC0_START_CAL_MASK		(0x1 << 25)
 
-struct armada_thermal_ops;
+struct armada_thermal_data;
 
 /* Marvell EBU Thermal Sensor Dev Structure */
 struct armada_thermal_priv {
 	void __iomem *sensor;
 	void __iomem *control;
-	struct armada_thermal_ops *ops;
+	struct armada_thermal_data *data;
 };
 
-struct armada_thermal_ops {
+struct armada_thermal_data {
 	/* Initialize the sensor */
 	void (*init_sensor)(struct armada_thermal_priv *);
 
@@ -113,7 +113,7 @@ static int armada_get_temp(struct thermal_zone_device *thermal,
 	unsigned long reg;
 
 	/* Valid check */
-	if (priv->ops->is_valid && !priv->ops->is_valid(priv)) {
+	if (priv->data->is_valid && !priv->data->is_valid(priv)) {
 		dev_err(&thermal->device,
 			"Temperature sensor reading not valid\n");
 		return -EIO;
@@ -129,11 +129,11 @@ static struct thermal_zone_device_ops ops = {
 	.get_temp = armada_get_temp,
 };
 
-static const struct armada_thermal_ops armadaxp_ops = {
+static const struct armada_thermal_data armadaxp_data = {
 	.init_sensor = armadaxp_init_sensor,
 };
 
-static const struct armada_thermal_ops armada370_ops = {
+static const struct armada_thermal_data armada370_data = {
 	.is_valid = armada_is_valid,
 	.init_sensor = armada370_init_sensor,
 };
@@ -141,11 +141,11 @@ static const struct armada_thermal_ops armada370_ops = {
 static const struct of_device_id armada_thermal_id_table[] = {
 	{
 		.compatible = "marvell,armadaxp-thermal",
-		.data       = &armadaxp_ops,
+		.data       = &armadaxp_data,
 	},
 	{
 		.compatible = "marvell,armada370-thermal",
-		.data       = &armada370_ops,
+		.data       = &armada370_data,
 	},
 	{
 		/* sentinel */
@@ -178,8 +178,8 @@ static int armada_thermal_probe(struct platform_device *pdev)
 	if (IS_ERR(priv->control))
 		return PTR_ERR(priv->control);
 
-	priv->ops = (struct armada_thermal_ops *)match->data;
-	priv->ops->init_sensor(priv);
+	priv->data = (struct armada_thermal_data *)match->data;
+	priv->data->init_sensor(priv);
 
 	thermal = thermal_zone_device_register("armada_thermal", 0, 0,
 					       priv, &ops, NULL, 0, 0);
-- 
1.9.1


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

* [PATCH v2 01/10] thermal: armada: Rename armada_thermal_ops struct
@ 2014-04-24 20:23   ` Ezequiel Garcia
  0 siblings, 0 replies; 30+ messages in thread
From: Ezequiel Garcia @ 2014-04-24 20:23 UTC (permalink / raw)
  To: linux-arm-kernel

As preparation work to add a generic infrastructure to support
different SoC variants, the armada_thermal_ops will be used
to host the SoC-specific fields, such as formula values and
register offsets.

For this reason, the name armada_thermal_ops is no longer suitable,
and this commit replaces it with armada_thermal_data.

Signed-off-by: Ezequiel Garcia <ezequiel.garcia@free-electrons.com>
---
 drivers/thermal/armada_thermal.c | 20 ++++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)

diff --git a/drivers/thermal/armada_thermal.c b/drivers/thermal/armada_thermal.c
index 5e53212..c5db071 100644
--- a/drivers/thermal/armada_thermal.c
+++ b/drivers/thermal/armada_thermal.c
@@ -38,16 +38,16 @@
 #define PMU_TDC0_OTF_CAL_MASK		(0x1 << 30)
 #define PMU_TDC0_START_CAL_MASK		(0x1 << 25)
 
-struct armada_thermal_ops;
+struct armada_thermal_data;
 
 /* Marvell EBU Thermal Sensor Dev Structure */
 struct armada_thermal_priv {
 	void __iomem *sensor;
 	void __iomem *control;
-	struct armada_thermal_ops *ops;
+	struct armada_thermal_data *data;
 };
 
-struct armada_thermal_ops {
+struct armada_thermal_data {
 	/* Initialize the sensor */
 	void (*init_sensor)(struct armada_thermal_priv *);
 
@@ -113,7 +113,7 @@ static int armada_get_temp(struct thermal_zone_device *thermal,
 	unsigned long reg;
 
 	/* Valid check */
-	if (priv->ops->is_valid && !priv->ops->is_valid(priv)) {
+	if (priv->data->is_valid && !priv->data->is_valid(priv)) {
 		dev_err(&thermal->device,
 			"Temperature sensor reading not valid\n");
 		return -EIO;
@@ -129,11 +129,11 @@ static struct thermal_zone_device_ops ops = {
 	.get_temp = armada_get_temp,
 };
 
-static const struct armada_thermal_ops armadaxp_ops = {
+static const struct armada_thermal_data armadaxp_data = {
 	.init_sensor = armadaxp_init_sensor,
 };
 
-static const struct armada_thermal_ops armada370_ops = {
+static const struct armada_thermal_data armada370_data = {
 	.is_valid = armada_is_valid,
 	.init_sensor = armada370_init_sensor,
 };
@@ -141,11 +141,11 @@ static const struct armada_thermal_ops armada370_ops = {
 static const struct of_device_id armada_thermal_id_table[] = {
 	{
 		.compatible = "marvell,armadaxp-thermal",
-		.data       = &armadaxp_ops,
+		.data       = &armadaxp_data,
 	},
 	{
 		.compatible = "marvell,armada370-thermal",
-		.data       = &armada370_ops,
+		.data       = &armada370_data,
 	},
 	{
 		/* sentinel */
@@ -178,8 +178,8 @@ static int armada_thermal_probe(struct platform_device *pdev)
 	if (IS_ERR(priv->control))
 		return PTR_ERR(priv->control);
 
-	priv->ops = (struct armada_thermal_ops *)match->data;
-	priv->ops->init_sensor(priv);
+	priv->data = (struct armada_thermal_data *)match->data;
+	priv->data->init_sensor(priv);
 
 	thermal = thermal_zone_device_register("armada_thermal", 0, 0,
 					       priv, &ops, NULL, 0, 0);
-- 
1.9.1

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

* [PATCH v2 02/10] thermal: armada: Add infrastructure to support generic formulas
  2014-04-24 20:23 ` Ezequiel Garcia
@ 2014-04-24 20:23   ` Ezequiel Garcia
  -1 siblings, 0 replies; 30+ messages in thread
From: Ezequiel Garcia @ 2014-04-24 20:23 UTC (permalink / raw)
  To: linux-pm, linux-arm-kernel
  Cc: Jason Cooper, Zhang Rui, Sebastian Hesselbarth, Andrew Lunn,
	Thomas Petazzoni, Gregory Clement, Lior Amsalem, Tawfik Bayouk,
	devicetree, Ezequiel Garcia

In order to support other similar SoC, with different sensor
coeficients, this commit adds the coeficients to the per-variant
structure, instead of having the formula hardcoded.

Signed-off-by: Ezequiel Garcia <ezequiel.garcia@free-electrons.com>
---
 drivers/thermal/armada_thermal.c | 20 +++++++++++++++++++-
 1 file changed, 19 insertions(+), 1 deletion(-)

diff --git a/drivers/thermal/armada_thermal.c b/drivers/thermal/armada_thermal.c
index c5db071..4de6e56 100644
--- a/drivers/thermal/armada_thermal.c
+++ b/drivers/thermal/armada_thermal.c
@@ -53,6 +53,11 @@ struct armada_thermal_data {
 
 	/* Test for a valid sensor value (optional) */
 	bool (*is_valid)(struct armada_thermal_priv *);
+
+	/* Formula coeficients: temp = (b + m * reg) / div */
+	unsigned long coef_b;
+	unsigned long coef_m;
+	unsigned long coef_div;
 };
 
 static void armadaxp_init_sensor(struct armada_thermal_priv *priv)
@@ -111,6 +116,7 @@ static int armada_get_temp(struct thermal_zone_device *thermal,
 {
 	struct armada_thermal_priv *priv = thermal->devdata;
 	unsigned long reg;
+	unsigned long m, b, div;
 
 	/* Valid check */
 	if (priv->data->is_valid && !priv->data->is_valid(priv)) {
@@ -121,7 +127,13 @@ static int armada_get_temp(struct thermal_zone_device *thermal,
 
 	reg = readl_relaxed(priv->sensor);
 	reg = (reg >> THERMAL_TEMP_OFFSET) & THERMAL_TEMP_MASK;
-	*temp = (3153000000UL - (10000000UL*reg)) / 13825;
+
+	/* Get formula coeficients */
+	b = priv->data->coef_b;
+	m = priv->data->coef_m;
+	div = priv->data->coef_div;
+
+	*temp = (b - (m * reg)) / div;
 	return 0;
 }
 
@@ -131,11 +143,17 @@ static struct thermal_zone_device_ops ops = {
 
 static const struct armada_thermal_data armadaxp_data = {
 	.init_sensor = armadaxp_init_sensor,
+	.coef_b = 3153000000UL,
+	.coef_m = 10000000UL,
+	.coef_div = 13825,
 };
 
 static const struct armada_thermal_data armada370_data = {
 	.is_valid = armada_is_valid,
 	.init_sensor = armada370_init_sensor,
+	.coef_b = 3153000000UL,
+	.coef_m = 10000000UL,
+	.coef_div = 13825,
 };
 
 static const struct of_device_id armada_thermal_id_table[] = {
-- 
1.9.1


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

* [PATCH v2 02/10] thermal: armada: Add infrastructure to support generic formulas
@ 2014-04-24 20:23   ` Ezequiel Garcia
  0 siblings, 0 replies; 30+ messages in thread
From: Ezequiel Garcia @ 2014-04-24 20:23 UTC (permalink / raw)
  To: linux-arm-kernel

In order to support other similar SoC, with different sensor
coeficients, this commit adds the coeficients to the per-variant
structure, instead of having the formula hardcoded.

Signed-off-by: Ezequiel Garcia <ezequiel.garcia@free-electrons.com>
---
 drivers/thermal/armada_thermal.c | 20 +++++++++++++++++++-
 1 file changed, 19 insertions(+), 1 deletion(-)

diff --git a/drivers/thermal/armada_thermal.c b/drivers/thermal/armada_thermal.c
index c5db071..4de6e56 100644
--- a/drivers/thermal/armada_thermal.c
+++ b/drivers/thermal/armada_thermal.c
@@ -53,6 +53,11 @@ struct armada_thermal_data {
 
 	/* Test for a valid sensor value (optional) */
 	bool (*is_valid)(struct armada_thermal_priv *);
+
+	/* Formula coeficients: temp = (b + m * reg) / div */
+	unsigned long coef_b;
+	unsigned long coef_m;
+	unsigned long coef_div;
 };
 
 static void armadaxp_init_sensor(struct armada_thermal_priv *priv)
@@ -111,6 +116,7 @@ static int armada_get_temp(struct thermal_zone_device *thermal,
 {
 	struct armada_thermal_priv *priv = thermal->devdata;
 	unsigned long reg;
+	unsigned long m, b, div;
 
 	/* Valid check */
 	if (priv->data->is_valid && !priv->data->is_valid(priv)) {
@@ -121,7 +127,13 @@ static int armada_get_temp(struct thermal_zone_device *thermal,
 
 	reg = readl_relaxed(priv->sensor);
 	reg = (reg >> THERMAL_TEMP_OFFSET) & THERMAL_TEMP_MASK;
-	*temp = (3153000000UL - (10000000UL*reg)) / 13825;
+
+	/* Get formula coeficients */
+	b = priv->data->coef_b;
+	m = priv->data->coef_m;
+	div = priv->data->coef_div;
+
+	*temp = (b - (m * reg)) / div;
 	return 0;
 }
 
@@ -131,11 +143,17 @@ static struct thermal_zone_device_ops ops = {
 
 static const struct armada_thermal_data armadaxp_data = {
 	.init_sensor = armadaxp_init_sensor,
+	.coef_b = 3153000000UL,
+	.coef_m = 10000000UL,
+	.coef_div = 13825,
 };
 
 static const struct armada_thermal_data armada370_data = {
 	.is_valid = armada_is_valid,
 	.init_sensor = armada370_init_sensor,
+	.coef_b = 3153000000UL,
+	.coef_m = 10000000UL,
+	.coef_div = 13825,
 };
 
 static const struct of_device_id armada_thermal_id_table[] = {
-- 
1.9.1

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

* [PATCH v2 03/10] thermal: armada: Add generic infrastructure to handle the sensor
  2014-04-24 20:23 ` Ezequiel Garcia
@ 2014-04-24 20:23   ` Ezequiel Garcia
  -1 siblings, 0 replies; 30+ messages in thread
From: Ezequiel Garcia @ 2014-04-24 20:23 UTC (permalink / raw)
  To: linux-pm, linux-arm-kernel
  Cc: Jason Cooper, Zhang Rui, Sebastian Hesselbarth, Andrew Lunn,
	Thomas Petazzoni, Gregory Clement, Lior Amsalem, Tawfik Bayouk,
	devicetree, Ezequiel Garcia

In order to support similar SoC where the sensor value and valid
bit can have different offset and/or mask, we add such fields to the
per-variant structure, instead of having the values hardcoded.

Signed-off-by: Ezequiel Garcia <ezequiel.garcia@free-electrons.com>
---
 drivers/thermal/armada_thermal.c | 17 ++++++++++++-----
 1 file changed, 12 insertions(+), 5 deletions(-)

diff --git a/drivers/thermal/armada_thermal.c b/drivers/thermal/armada_thermal.c
index 4de6e56..3e4d8ef 100644
--- a/drivers/thermal/armada_thermal.c
+++ b/drivers/thermal/armada_thermal.c
@@ -24,10 +24,7 @@
 #include <linux/of_device.h>
 #include <linux/thermal.h>
 
-#define THERMAL_VALID_OFFSET		9
 #define THERMAL_VALID_MASK		0x1
-#define THERMAL_TEMP_OFFSET		10
-#define THERMAL_TEMP_MASK		0x1ff
 
 /* Thermal Manager Control and Status Register */
 #define PMU_TDC0_SW_RST_MASK		(0x1 << 1)
@@ -58,6 +55,11 @@ struct armada_thermal_data {
 	unsigned long coef_b;
 	unsigned long coef_m;
 	unsigned long coef_div;
+
+	/* Offset and mask to access the sensor temperature */
+	unsigned int temp_offset;
+	unsigned int temp_mask;
+	unsigned int is_valid_offset;
 };
 
 static void armadaxp_init_sensor(struct armada_thermal_priv *priv)
@@ -108,7 +110,7 @@ static bool armada_is_valid(struct armada_thermal_priv *priv)
 {
 	unsigned long reg = readl_relaxed(priv->sensor);
 
-	return (reg >> THERMAL_VALID_OFFSET) & THERMAL_VALID_MASK;
+	return (reg >> priv->data->is_valid_offset) & THERMAL_VALID_MASK;
 }
 
 static int armada_get_temp(struct thermal_zone_device *thermal,
@@ -126,7 +128,7 @@ static int armada_get_temp(struct thermal_zone_device *thermal,
 	}
 
 	reg = readl_relaxed(priv->sensor);
-	reg = (reg >> THERMAL_TEMP_OFFSET) & THERMAL_TEMP_MASK;
+	reg = (reg >> priv->data->temp_offset) & priv->data->temp_mask;
 
 	/* Get formula coeficients */
 	b = priv->data->coef_b;
@@ -143,6 +145,8 @@ static struct thermal_zone_device_ops ops = {
 
 static const struct armada_thermal_data armadaxp_data = {
 	.init_sensor = armadaxp_init_sensor,
+	.temp_offset = 10,
+	.temp_mask = 0x1ff,
 	.coef_b = 3153000000UL,
 	.coef_m = 10000000UL,
 	.coef_div = 13825,
@@ -151,6 +155,9 @@ static const struct armada_thermal_data armadaxp_data = {
 static const struct armada_thermal_data armada370_data = {
 	.is_valid = armada_is_valid,
 	.init_sensor = armada370_init_sensor,
+	.is_valid_offset = 9,
+	.temp_offset = 10,
+	.temp_mask = 0x1ff,
 	.coef_b = 3153000000UL,
 	.coef_m = 10000000UL,
 	.coef_div = 13825,
-- 
1.9.1


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

* [PATCH v2 03/10] thermal: armada: Add generic infrastructure to handle the sensor
@ 2014-04-24 20:23   ` Ezequiel Garcia
  0 siblings, 0 replies; 30+ messages in thread
From: Ezequiel Garcia @ 2014-04-24 20:23 UTC (permalink / raw)
  To: linux-arm-kernel

In order to support similar SoC where the sensor value and valid
bit can have different offset and/or mask, we add such fields to the
per-variant structure, instead of having the values hardcoded.

Signed-off-by: Ezequiel Garcia <ezequiel.garcia@free-electrons.com>
---
 drivers/thermal/armada_thermal.c | 17 ++++++++++++-----
 1 file changed, 12 insertions(+), 5 deletions(-)

diff --git a/drivers/thermal/armada_thermal.c b/drivers/thermal/armada_thermal.c
index 4de6e56..3e4d8ef 100644
--- a/drivers/thermal/armada_thermal.c
+++ b/drivers/thermal/armada_thermal.c
@@ -24,10 +24,7 @@
 #include <linux/of_device.h>
 #include <linux/thermal.h>
 
-#define THERMAL_VALID_OFFSET		9
 #define THERMAL_VALID_MASK		0x1
-#define THERMAL_TEMP_OFFSET		10
-#define THERMAL_TEMP_MASK		0x1ff
 
 /* Thermal Manager Control and Status Register */
 #define PMU_TDC0_SW_RST_MASK		(0x1 << 1)
@@ -58,6 +55,11 @@ struct armada_thermal_data {
 	unsigned long coef_b;
 	unsigned long coef_m;
 	unsigned long coef_div;
+
+	/* Offset and mask to access the sensor temperature */
+	unsigned int temp_offset;
+	unsigned int temp_mask;
+	unsigned int is_valid_offset;
 };
 
 static void armadaxp_init_sensor(struct armada_thermal_priv *priv)
@@ -108,7 +110,7 @@ static bool armada_is_valid(struct armada_thermal_priv *priv)
 {
 	unsigned long reg = readl_relaxed(priv->sensor);
 
-	return (reg >> THERMAL_VALID_OFFSET) & THERMAL_VALID_MASK;
+	return (reg >> priv->data->is_valid_offset) & THERMAL_VALID_MASK;
 }
 
 static int armada_get_temp(struct thermal_zone_device *thermal,
@@ -126,7 +128,7 @@ static int armada_get_temp(struct thermal_zone_device *thermal,
 	}
 
 	reg = readl_relaxed(priv->sensor);
-	reg = (reg >> THERMAL_TEMP_OFFSET) & THERMAL_TEMP_MASK;
+	reg = (reg >> priv->data->temp_offset) & priv->data->temp_mask;
 
 	/* Get formula coeficients */
 	b = priv->data->coef_b;
@@ -143,6 +145,8 @@ static struct thermal_zone_device_ops ops = {
 
 static const struct armada_thermal_data armadaxp_data = {
 	.init_sensor = armadaxp_init_sensor,
+	.temp_offset = 10,
+	.temp_mask = 0x1ff,
 	.coef_b = 3153000000UL,
 	.coef_m = 10000000UL,
 	.coef_div = 13825,
@@ -151,6 +155,9 @@ static const struct armada_thermal_data armadaxp_data = {
 static const struct armada_thermal_data armada370_data = {
 	.is_valid = armada_is_valid,
 	.init_sensor = armada370_init_sensor,
+	.is_valid_offset = 9,
+	.temp_offset = 10,
+	.temp_mask = 0x1ff,
 	.coef_b = 3153000000UL,
 	.coef_m = 10000000UL,
 	.coef_div = 13825,
-- 
1.9.1

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

* [PATCH v2 04/10] thermal: armada: Pass the platform_device to init_sensor()
  2014-04-24 20:23 ` Ezequiel Garcia
@ 2014-04-24 20:23   ` Ezequiel Garcia
  -1 siblings, 0 replies; 30+ messages in thread
From: Ezequiel Garcia @ 2014-04-24 20:23 UTC (permalink / raw)
  To: linux-pm, linux-arm-kernel
  Cc: Jason Cooper, Zhang Rui, Sebastian Hesselbarth, Andrew Lunn,
	Thomas Petazzoni, Gregory Clement, Lior Amsalem, Tawfik Bayouk,
	devicetree, Ezequiel Garcia

In order to perform SoC-specific quirks on platforms that need them,
this commit adds a new parameter to the init_sensor() function.
This will be used to support early silicons of the Armada 375 SoC,
to workaround some hardware issues.

Signed-off-by: Ezequiel Garcia <ezequiel.garcia@free-electrons.com>
---
 drivers/thermal/armada_thermal.c | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/drivers/thermal/armada_thermal.c b/drivers/thermal/armada_thermal.c
index 3e4d8ef..aafcc4d 100644
--- a/drivers/thermal/armada_thermal.c
+++ b/drivers/thermal/armada_thermal.c
@@ -46,7 +46,8 @@ struct armada_thermal_priv {
 
 struct armada_thermal_data {
 	/* Initialize the sensor */
-	void (*init_sensor)(struct armada_thermal_priv *);
+	void (*init_sensor)(struct platform_device *pdev,
+			    struct armada_thermal_priv *);
 
 	/* Test for a valid sensor value (optional) */
 	bool (*is_valid)(struct armada_thermal_priv *);
@@ -62,7 +63,8 @@ struct armada_thermal_data {
 	unsigned int is_valid_offset;
 };
 
-static void armadaxp_init_sensor(struct armada_thermal_priv *priv)
+static void armadaxp_init_sensor(struct platform_device *pdev,
+				 struct armada_thermal_priv *priv)
 {
 	unsigned long reg;
 
@@ -87,7 +89,8 @@ static void armadaxp_init_sensor(struct armada_thermal_priv *priv)
 	writel(reg, priv->sensor);
 }
 
-static void armada370_init_sensor(struct armada_thermal_priv *priv)
+static void armada370_init_sensor(struct platform_device *pdev,
+				  struct armada_thermal_priv *priv)
 {
 	unsigned long reg;
 
@@ -204,7 +207,7 @@ static int armada_thermal_probe(struct platform_device *pdev)
 		return PTR_ERR(priv->control);
 
 	priv->data = (struct armada_thermal_data *)match->data;
-	priv->data->init_sensor(priv);
+	priv->data->init_sensor(pdev, priv);
 
 	thermal = thermal_zone_device_register("armada_thermal", 0, 0,
 					       priv, &ops, NULL, 0, 0);
-- 
1.9.1


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

* [PATCH v2 04/10] thermal: armada: Pass the platform_device to init_sensor()
@ 2014-04-24 20:23   ` Ezequiel Garcia
  0 siblings, 0 replies; 30+ messages in thread
From: Ezequiel Garcia @ 2014-04-24 20:23 UTC (permalink / raw)
  To: linux-arm-kernel

In order to perform SoC-specific quirks on platforms that need them,
this commit adds a new parameter to the init_sensor() function.
This will be used to support early silicons of the Armada 375 SoC,
to workaround some hardware issues.

Signed-off-by: Ezequiel Garcia <ezequiel.garcia@free-electrons.com>
---
 drivers/thermal/armada_thermal.c | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/drivers/thermal/armada_thermal.c b/drivers/thermal/armada_thermal.c
index 3e4d8ef..aafcc4d 100644
--- a/drivers/thermal/armada_thermal.c
+++ b/drivers/thermal/armada_thermal.c
@@ -46,7 +46,8 @@ struct armada_thermal_priv {
 
 struct armada_thermal_data {
 	/* Initialize the sensor */
-	void (*init_sensor)(struct armada_thermal_priv *);
+	void (*init_sensor)(struct platform_device *pdev,
+			    struct armada_thermal_priv *);
 
 	/* Test for a valid sensor value (optional) */
 	bool (*is_valid)(struct armada_thermal_priv *);
@@ -62,7 +63,8 @@ struct armada_thermal_data {
 	unsigned int is_valid_offset;
 };
 
-static void armadaxp_init_sensor(struct armada_thermal_priv *priv)
+static void armadaxp_init_sensor(struct platform_device *pdev,
+				 struct armada_thermal_priv *priv)
 {
 	unsigned long reg;
 
@@ -87,7 +89,8 @@ static void armadaxp_init_sensor(struct armada_thermal_priv *priv)
 	writel(reg, priv->sensor);
 }
 
-static void armada370_init_sensor(struct armada_thermal_priv *priv)
+static void armada370_init_sensor(struct platform_device *pdev,
+				  struct armada_thermal_priv *priv)
 {
 	unsigned long reg;
 
@@ -204,7 +207,7 @@ static int armada_thermal_probe(struct platform_device *pdev)
 		return PTR_ERR(priv->control);
 
 	priv->data = (struct armada_thermal_data *)match->data;
-	priv->data->init_sensor(priv);
+	priv->data->init_sensor(pdev, priv);
 
 	thermal = thermal_zone_device_register("armada_thermal", 0, 0,
 					       priv, &ops, NULL, 0, 0);
-- 
1.9.1

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

* [PATCH v2 05/10] thermal: armada: Allow to specify an 'inverted readout' sensor
  2014-04-24 20:23 ` Ezequiel Garcia
@ 2014-04-24 20:23   ` Ezequiel Garcia
  -1 siblings, 0 replies; 30+ messages in thread
From: Ezequiel Garcia @ 2014-04-24 20:23 UTC (permalink / raw)
  To: linux-pm, linux-arm-kernel
  Cc: Jason Cooper, Zhang Rui, Sebastian Hesselbarth, Andrew Lunn,
	Thomas Petazzoni, Gregory Clement, Lior Amsalem, Tawfik Bayouk,
	devicetree, Ezequiel Garcia

In order to support inverted-formula thermal sensor readout, this commit
introduces an 'inverted' field in the SoC-specific structure which
allows to specify an inversion of the temperature formula.

Signed-off-by: Ezequiel Garcia <ezequiel.garcia@free-electrons.com>
---
 drivers/thermal/armada_thermal.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/drivers/thermal/armada_thermal.c b/drivers/thermal/armada_thermal.c
index aafcc4d..e228132 100644
--- a/drivers/thermal/armada_thermal.c
+++ b/drivers/thermal/armada_thermal.c
@@ -56,6 +56,7 @@ struct armada_thermal_data {
 	unsigned long coef_b;
 	unsigned long coef_m;
 	unsigned long coef_div;
+	bool inverted;
 
 	/* Offset and mask to access the sensor temperature */
 	unsigned int temp_offset;
@@ -138,7 +139,10 @@ static int armada_get_temp(struct thermal_zone_device *thermal,
 	m = priv->data->coef_m;
 	div = priv->data->coef_div;
 
-	*temp = (b - (m * reg)) / div;
+	if (priv->data->inverted)
+		*temp = ((m * reg) - b) / div;
+	else
+		*temp = (b - (m * reg)) / div;
 	return 0;
 }
 
-- 
1.9.1


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

* [PATCH v2 05/10] thermal: armada: Allow to specify an 'inverted readout' sensor
@ 2014-04-24 20:23   ` Ezequiel Garcia
  0 siblings, 0 replies; 30+ messages in thread
From: Ezequiel Garcia @ 2014-04-24 20:23 UTC (permalink / raw)
  To: linux-arm-kernel

In order to support inverted-formula thermal sensor readout, this commit
introduces an 'inverted' field in the SoC-specific structure which
allows to specify an inversion of the temperature formula.

Signed-off-by: Ezequiel Garcia <ezequiel.garcia@free-electrons.com>
---
 drivers/thermal/armada_thermal.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/drivers/thermal/armada_thermal.c b/drivers/thermal/armada_thermal.c
index aafcc4d..e228132 100644
--- a/drivers/thermal/armada_thermal.c
+++ b/drivers/thermal/armada_thermal.c
@@ -56,6 +56,7 @@ struct armada_thermal_data {
 	unsigned long coef_b;
 	unsigned long coef_m;
 	unsigned long coef_div;
+	bool inverted;
 
 	/* Offset and mask to access the sensor temperature */
 	unsigned int temp_offset;
@@ -138,7 +139,10 @@ static int armada_get_temp(struct thermal_zone_device *thermal,
 	m = priv->data->coef_m;
 	div = priv->data->coef_div;
 
-	*temp = (b - (m * reg)) / div;
+	if (priv->data->inverted)
+		*temp = ((m * reg) - b) / div;
+	else
+		*temp = (b - (m * reg)) / div;
 	return 0;
 }
 
-- 
1.9.1

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

* [PATCH v2 06/10] thermal: armada: Support Armada 375 SoC
  2014-04-24 20:23 ` Ezequiel Garcia
@ 2014-04-24 20:23   ` Ezequiel Garcia
  -1 siblings, 0 replies; 30+ messages in thread
From: Ezequiel Garcia @ 2014-04-24 20:23 UTC (permalink / raw)
  To: linux-pm, linux-arm-kernel
  Cc: Jason Cooper, Zhang Rui, Sebastian Hesselbarth, Andrew Lunn,
	Thomas Petazzoni, Gregory Clement, Lior Amsalem, Tawfik Bayouk,
	devicetree, Ezequiel Garcia

Now that a generic infrastructure is in place, it's possible to support
the new Armada 375 SoC thermal sensor. This sensor is similar to the one
available in the already supported SoCs, with its specific temperature formula
and specific sensor initialization.

In addition, we also add support for the Z1 SoC stepping, which needs
an initialization-quirk to work properly.

Signed-off-by: Ezequiel Garcia <ezequiel.garcia@free-electrons.com>
---
 .../devicetree/bindings/thermal/armada-thermal.txt | 11 +++-
 drivers/thermal/armada_thermal.c                   | 58 ++++++++++++++++++++++
 2 files changed, 68 insertions(+), 1 deletion(-)

diff --git a/Documentation/devicetree/bindings/thermal/armada-thermal.txt b/Documentation/devicetree/bindings/thermal/armada-thermal.txt
index fff93d5..2a67e51 100644
--- a/Documentation/devicetree/bindings/thermal/armada-thermal.txt
+++ b/Documentation/devicetree/bindings/thermal/armada-thermal.txt
@@ -1,11 +1,20 @@
-* Marvell Armada 370/XP thermal management
+* Marvell Armada 370/375/XP thermal management
 
 Required properties:
 
 - compatible:	Should be set to one of the following:
 		marvell,armada370-thermal
+		marvell,armada375-thermal
+		marvell,armada375-z1-thermal
 		marvell,armadaxp-thermal
 
+		Note: As the name suggests, "marvell,armada375-z1-thermal"
+		applies for the SoC Z1 stepping only. On such stepping
+		some quirks need to be done and the register offset differs
+		from the one in the A0 stepping.
+		The operating system may auto-detect the SoC stepping and
+		update the compatible and register offsets at runtime.
+
 - reg:		Device's register space.
 		Two entries are expected, see the examples below.
 		The first one is required for the sensor register;
diff --git a/drivers/thermal/armada_thermal.c b/drivers/thermal/armada_thermal.c
index e228132..e40cc6e 100644
--- a/drivers/thermal/armada_thermal.c
+++ b/drivers/thermal/armada_thermal.c
@@ -35,6 +35,15 @@
 #define PMU_TDC0_OTF_CAL_MASK		(0x1 << 30)
 #define PMU_TDC0_START_CAL_MASK		(0x1 << 25)
 
+#define A375_Z1_CAL_RESET_LSB		0x8011e214
+#define A375_Z1_CAL_RESET_MSB		0x30a88019
+#define A375_Z1_WORKAROUND_BIT		BIT(9)
+
+#define A375_UNIT_CONTROL_OFFSET	27
+#define A375_UNIT_CONTROL_MASK		0x7
+#define A375_READOUT_INVERT		BIT(15)
+#define A375_HW_RESETn			BIT(8)
+
 struct armada_thermal_data;
 
 /* Marvell EBU Thermal Sensor Dev Structure */
@@ -110,6 +119,36 @@ static void armada370_init_sensor(struct platform_device *pdev,
 	mdelay(10);
 }
 
+static void armada375_init_sensor(struct platform_device *pdev,
+				  struct armada_thermal_priv *priv)
+{
+	unsigned long reg;
+	bool quirk_needed =
+		!!of_device_is_compatible(pdev->dev.of_node,
+					  "marvell,armada375-z1-thermal");
+
+	if (quirk_needed) {
+		/* Ensure these registers have the default (reset) values */
+		writel(A375_Z1_CAL_RESET_LSB, priv->control);
+		writel(A375_Z1_CAL_RESET_MSB, priv->control + 0x4);
+	}
+
+	reg = readl(priv->control + 4);
+	reg &= ~(A375_UNIT_CONTROL_MASK << A375_UNIT_CONTROL_OFFSET);
+	reg &= ~A375_READOUT_INVERT;
+	reg &= ~A375_HW_RESETn;
+
+	if (quirk_needed)
+		reg |= A375_Z1_WORKAROUND_BIT;
+
+	writel(reg, priv->control + 4);
+	mdelay(20);
+
+	reg |= A375_HW_RESETn;
+	writel(reg, priv->control + 4);
+	mdelay(50);
+}
+
 static bool armada_is_valid(struct armada_thermal_priv *priv)
 {
 	unsigned long reg = readl_relaxed(priv->sensor);
@@ -170,6 +209,17 @@ static const struct armada_thermal_data armada370_data = {
 	.coef_div = 13825,
 };
 
+static const struct armada_thermal_data armada375_data = {
+	.is_valid = armada_is_valid,
+	.init_sensor = armada375_init_sensor,
+	.is_valid_offset = 10,
+	.temp_offset = 0,
+	.temp_mask = 0x1ff,
+	.coef_b = 3171900000UL,
+	.coef_m = 10000000UL,
+	.coef_div = 13616,
+};
+
 static const struct of_device_id armada_thermal_id_table[] = {
 	{
 		.compatible = "marvell,armadaxp-thermal",
@@ -180,6 +230,14 @@ static const struct of_device_id armada_thermal_id_table[] = {
 		.data       = &armada370_data,
 	},
 	{
+		.compatible = "marvell,armada375-thermal",
+		.data       = &armada375_data,
+	},
+	{
+		.compatible = "marvell,armada375-z1-thermal",
+		.data       = &armada375_data,
+	},
+	{
 		/* sentinel */
 	},
 };
-- 
1.9.1


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

* [PATCH v2 06/10] thermal: armada: Support Armada 375 SoC
@ 2014-04-24 20:23   ` Ezequiel Garcia
  0 siblings, 0 replies; 30+ messages in thread
From: Ezequiel Garcia @ 2014-04-24 20:23 UTC (permalink / raw)
  To: linux-arm-kernel

Now that a generic infrastructure is in place, it's possible to support
the new Armada 375 SoC thermal sensor. This sensor is similar to the one
available in the already supported SoCs, with its specific temperature formula
and specific sensor initialization.

In addition, we also add support for the Z1 SoC stepping, which needs
an initialization-quirk to work properly.

Signed-off-by: Ezequiel Garcia <ezequiel.garcia@free-electrons.com>
---
 .../devicetree/bindings/thermal/armada-thermal.txt | 11 +++-
 drivers/thermal/armada_thermal.c                   | 58 ++++++++++++++++++++++
 2 files changed, 68 insertions(+), 1 deletion(-)

diff --git a/Documentation/devicetree/bindings/thermal/armada-thermal.txt b/Documentation/devicetree/bindings/thermal/armada-thermal.txt
index fff93d5..2a67e51 100644
--- a/Documentation/devicetree/bindings/thermal/armada-thermal.txt
+++ b/Documentation/devicetree/bindings/thermal/armada-thermal.txt
@@ -1,11 +1,20 @@
-* Marvell Armada 370/XP thermal management
+* Marvell Armada 370/375/XP thermal management
 
 Required properties:
 
 - compatible:	Should be set to one of the following:
 		marvell,armada370-thermal
+		marvell,armada375-thermal
+		marvell,armada375-z1-thermal
 		marvell,armadaxp-thermal
 
+		Note: As the name suggests, "marvell,armada375-z1-thermal"
+		applies for the SoC Z1 stepping only. On such stepping
+		some quirks need to be done and the register offset differs
+		from the one in the A0 stepping.
+		The operating system may auto-detect the SoC stepping and
+		update the compatible and register offsets at runtime.
+
 - reg:		Device's register space.
 		Two entries are expected, see the examples below.
 		The first one is required for the sensor register;
diff --git a/drivers/thermal/armada_thermal.c b/drivers/thermal/armada_thermal.c
index e228132..e40cc6e 100644
--- a/drivers/thermal/armada_thermal.c
+++ b/drivers/thermal/armada_thermal.c
@@ -35,6 +35,15 @@
 #define PMU_TDC0_OTF_CAL_MASK		(0x1 << 30)
 #define PMU_TDC0_START_CAL_MASK		(0x1 << 25)
 
+#define A375_Z1_CAL_RESET_LSB		0x8011e214
+#define A375_Z1_CAL_RESET_MSB		0x30a88019
+#define A375_Z1_WORKAROUND_BIT		BIT(9)
+
+#define A375_UNIT_CONTROL_OFFSET	27
+#define A375_UNIT_CONTROL_MASK		0x7
+#define A375_READOUT_INVERT		BIT(15)
+#define A375_HW_RESETn			BIT(8)
+
 struct armada_thermal_data;
 
 /* Marvell EBU Thermal Sensor Dev Structure */
@@ -110,6 +119,36 @@ static void armada370_init_sensor(struct platform_device *pdev,
 	mdelay(10);
 }
 
+static void armada375_init_sensor(struct platform_device *pdev,
+				  struct armada_thermal_priv *priv)
+{
+	unsigned long reg;
+	bool quirk_needed =
+		!!of_device_is_compatible(pdev->dev.of_node,
+					  "marvell,armada375-z1-thermal");
+
+	if (quirk_needed) {
+		/* Ensure these registers have the default (reset) values */
+		writel(A375_Z1_CAL_RESET_LSB, priv->control);
+		writel(A375_Z1_CAL_RESET_MSB, priv->control + 0x4);
+	}
+
+	reg = readl(priv->control + 4);
+	reg &= ~(A375_UNIT_CONTROL_MASK << A375_UNIT_CONTROL_OFFSET);
+	reg &= ~A375_READOUT_INVERT;
+	reg &= ~A375_HW_RESETn;
+
+	if (quirk_needed)
+		reg |= A375_Z1_WORKAROUND_BIT;
+
+	writel(reg, priv->control + 4);
+	mdelay(20);
+
+	reg |= A375_HW_RESETn;
+	writel(reg, priv->control + 4);
+	mdelay(50);
+}
+
 static bool armada_is_valid(struct armada_thermal_priv *priv)
 {
 	unsigned long reg = readl_relaxed(priv->sensor);
@@ -170,6 +209,17 @@ static const struct armada_thermal_data armada370_data = {
 	.coef_div = 13825,
 };
 
+static const struct armada_thermal_data armada375_data = {
+	.is_valid = armada_is_valid,
+	.init_sensor = armada375_init_sensor,
+	.is_valid_offset = 10,
+	.temp_offset = 0,
+	.temp_mask = 0x1ff,
+	.coef_b = 3171900000UL,
+	.coef_m = 10000000UL,
+	.coef_div = 13616,
+};
+
 static const struct of_device_id armada_thermal_id_table[] = {
 	{
 		.compatible = "marvell,armadaxp-thermal",
@@ -180,6 +230,14 @@ static const struct of_device_id armada_thermal_id_table[] = {
 		.data       = &armada370_data,
 	},
 	{
+		.compatible = "marvell,armada375-thermal",
+		.data       = &armada375_data,
+	},
+	{
+		.compatible = "marvell,armada375-z1-thermal",
+		.data       = &armada375_data,
+	},
+	{
 		/* sentinel */
 	},
 };
-- 
1.9.1

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

* [PATCH v2 07/10] thermal: armada: Support Armada 380 SoC
  2014-04-24 20:23 ` Ezequiel Garcia
@ 2014-04-24 20:23     ` Ezequiel Garcia
  -1 siblings, 0 replies; 30+ messages in thread
From: Ezequiel Garcia @ 2014-04-24 20:23 UTC (permalink / raw)
  To: linux-pm-u79uwXL29TY76Z2rM5mHXA,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r
  Cc: Jason Cooper, Zhang Rui, Sebastian Hesselbarth, Andrew Lunn,
	Thomas Petazzoni, Gregory Clement, Lior Amsalem, Tawfik Bayouk,
	devicetree-u79uwXL29TY76Z2rM5mHXA, Ezequiel Garcia

Now that a generic infrastructure is in place, it's possible to support
the Armada 380 SoC thermal sensor. This sensor is similar to the one
available in the already supported SoCs, with its specific temperature formula
and specific sensor initialization.

Signed-off-by: Ezequiel Garcia <ezequiel.garcia-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>
---
 .../devicetree/bindings/thermal/armada-thermal.txt |  3 ++-
 drivers/thermal/armada_thermal.c                   | 30 ++++++++++++++++++++++
 2 files changed, 32 insertions(+), 1 deletion(-)

diff --git a/Documentation/devicetree/bindings/thermal/armada-thermal.txt b/Documentation/devicetree/bindings/thermal/armada-thermal.txt
index 2a67e51..4cf0249 100644
--- a/Documentation/devicetree/bindings/thermal/armada-thermal.txt
+++ b/Documentation/devicetree/bindings/thermal/armada-thermal.txt
@@ -1,4 +1,4 @@
-* Marvell Armada 370/375/XP thermal management
+* Marvell Armada 370/375/380/XP thermal management
 
 Required properties:
 
@@ -6,6 +6,7 @@ Required properties:
 		marvell,armada370-thermal
 		marvell,armada375-thermal
 		marvell,armada375-z1-thermal
+		marvell,armada380-thermal
 		marvell,armadaxp-thermal
 
 		Note: As the name suggests, "marvell,armada375-z1-thermal"
diff --git a/drivers/thermal/armada_thermal.c b/drivers/thermal/armada_thermal.c
index e40cc6e..a48d0ca 100644
--- a/drivers/thermal/armada_thermal.c
+++ b/drivers/thermal/armada_thermal.c
@@ -43,6 +43,7 @@
 #define A375_UNIT_CONTROL_MASK		0x7
 #define A375_READOUT_INVERT		BIT(15)
 #define A375_HW_RESETn			BIT(8)
+#define A380_HW_RESET			BIT(8)
 
 struct armada_thermal_data;
 
@@ -149,6 +150,19 @@ static void armada375_init_sensor(struct platform_device *pdev,
 	mdelay(50);
 }
 
+static void armada380_init_sensor(struct platform_device *pdev,
+				  struct armada_thermal_priv *priv)
+{
+	unsigned long reg = readl_relaxed(priv->control);
+
+	/* Reset hardware once */
+	if (reg & A380_HW_RESET) {
+		reg |= A380_HW_RESET;
+		writel(reg, priv->control);
+		mdelay(10);
+	}
+}
+
 static bool armada_is_valid(struct armada_thermal_priv *priv)
 {
 	unsigned long reg = readl_relaxed(priv->sensor);
@@ -220,6 +234,18 @@ static const struct armada_thermal_data armada375_data = {
 	.coef_div = 13616,
 };
 
+static const struct armada_thermal_data armada380_data = {
+	.is_valid = armada_is_valid,
+	.init_sensor = armada380_init_sensor,
+	.is_valid_offset = 10,
+	.temp_offset = 0,
+	.temp_mask = 0x3ff,
+	.coef_b = 1169498786UL,
+	.coef_m = 2000000UL,
+	.coef_div = 4289,
+	.inverted = true,
+};
+
 static const struct of_device_id armada_thermal_id_table[] = {
 	{
 		.compatible = "marvell,armadaxp-thermal",
@@ -238,6 +264,10 @@ static const struct of_device_id armada_thermal_id_table[] = {
 		.data       = &armada375_data,
 	},
 	{
+		.compatible = "marvell,armada380-thermal",
+		.data       = &armada380_data,
+	},
+	{
 		/* sentinel */
 	},
 };
-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* [PATCH v2 07/10] thermal: armada: Support Armada 380 SoC
@ 2014-04-24 20:23     ` Ezequiel Garcia
  0 siblings, 0 replies; 30+ messages in thread
From: Ezequiel Garcia @ 2014-04-24 20:23 UTC (permalink / raw)
  To: linux-arm-kernel

Now that a generic infrastructure is in place, it's possible to support
the Armada 380 SoC thermal sensor. This sensor is similar to the one
available in the already supported SoCs, with its specific temperature formula
and specific sensor initialization.

Signed-off-by: Ezequiel Garcia <ezequiel.garcia@free-electrons.com>
---
 .../devicetree/bindings/thermal/armada-thermal.txt |  3 ++-
 drivers/thermal/armada_thermal.c                   | 30 ++++++++++++++++++++++
 2 files changed, 32 insertions(+), 1 deletion(-)

diff --git a/Documentation/devicetree/bindings/thermal/armada-thermal.txt b/Documentation/devicetree/bindings/thermal/armada-thermal.txt
index 2a67e51..4cf0249 100644
--- a/Documentation/devicetree/bindings/thermal/armada-thermal.txt
+++ b/Documentation/devicetree/bindings/thermal/armada-thermal.txt
@@ -1,4 +1,4 @@
-* Marvell Armada 370/375/XP thermal management
+* Marvell Armada 370/375/380/XP thermal management
 
 Required properties:
 
@@ -6,6 +6,7 @@ Required properties:
 		marvell,armada370-thermal
 		marvell,armada375-thermal
 		marvell,armada375-z1-thermal
+		marvell,armada380-thermal
 		marvell,armadaxp-thermal
 
 		Note: As the name suggests, "marvell,armada375-z1-thermal"
diff --git a/drivers/thermal/armada_thermal.c b/drivers/thermal/armada_thermal.c
index e40cc6e..a48d0ca 100644
--- a/drivers/thermal/armada_thermal.c
+++ b/drivers/thermal/armada_thermal.c
@@ -43,6 +43,7 @@
 #define A375_UNIT_CONTROL_MASK		0x7
 #define A375_READOUT_INVERT		BIT(15)
 #define A375_HW_RESETn			BIT(8)
+#define A380_HW_RESET			BIT(8)
 
 struct armada_thermal_data;
 
@@ -149,6 +150,19 @@ static void armada375_init_sensor(struct platform_device *pdev,
 	mdelay(50);
 }
 
+static void armada380_init_sensor(struct platform_device *pdev,
+				  struct armada_thermal_priv *priv)
+{
+	unsigned long reg = readl_relaxed(priv->control);
+
+	/* Reset hardware once */
+	if (reg & A380_HW_RESET) {
+		reg |= A380_HW_RESET;
+		writel(reg, priv->control);
+		mdelay(10);
+	}
+}
+
 static bool armada_is_valid(struct armada_thermal_priv *priv)
 {
 	unsigned long reg = readl_relaxed(priv->sensor);
@@ -220,6 +234,18 @@ static const struct armada_thermal_data armada375_data = {
 	.coef_div = 13616,
 };
 
+static const struct armada_thermal_data armada380_data = {
+	.is_valid = armada_is_valid,
+	.init_sensor = armada380_init_sensor,
+	.is_valid_offset = 10,
+	.temp_offset = 0,
+	.temp_mask = 0x3ff,
+	.coef_b = 1169498786UL,
+	.coef_m = 2000000UL,
+	.coef_div = 4289,
+	.inverted = true,
+};
+
 static const struct of_device_id armada_thermal_id_table[] = {
 	{
 		.compatible = "marvell,armadaxp-thermal",
@@ -238,6 +264,10 @@ static const struct of_device_id armada_thermal_id_table[] = {
 		.data       = &armada375_data,
 	},
 	{
+		.compatible = "marvell,armada380-thermal",
+		.data       = &armada380_data,
+	},
+	{
 		/* sentinel */
 	},
 };
-- 
1.9.1

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

* [PATCH v2 08/10] ARM: mvebu: Add thermal quirk for the Armada 375 DB board
  2014-04-24 20:23 ` Ezequiel Garcia
@ 2014-04-24 20:23   ` Ezequiel Garcia
  -1 siblings, 0 replies; 30+ messages in thread
From: Ezequiel Garcia @ 2014-04-24 20:23 UTC (permalink / raw)
  To: linux-pm, linux-arm-kernel
  Cc: Jason Cooper, Zhang Rui, Sebastian Hesselbarth, Andrew Lunn,
	Thomas Petazzoni, Gregory Clement, Lior Amsalem, Tawfik Bayouk,
	devicetree, Ezequiel Garcia

The initial release of the Armada 375 DB board has an Armada 375
Z1 stepping silicon. This commit introduces a quirk that allows
to workaround a series of issues with the thermal sensor in this
stepping, but updating the devicetree:

  * Updates the compatible string for the thermal, so the driver
    can perform a specific initialization of the sensor.

  * Moves the offset of the thermal control register. This quirk
    allows to specifiy the correct (A0 stepping) offset in the
    devicetree.

Signed-off-by: Ezequiel Garcia <ezequiel.garcia@free-electrons.com>
---
 arch/arm/mach-mvebu/board-v7.c     | 57 ++++++++++++++++++++++++++++++++++++++
 arch/arm/mach-mvebu/mvebu-soc-id.h |  3 ++
 2 files changed, 60 insertions(+)

diff --git a/arch/arm/mach-mvebu/board-v7.c b/arch/arm/mach-mvebu/board-v7.c
index 333fca8..93f50f2 100644
--- a/arch/arm/mach-mvebu/board-v7.c
+++ b/arch/arm/mach-mvebu/board-v7.c
@@ -96,10 +96,66 @@ static void __init i2c_quirk(void)
 	return;
 }
 
+#define A375_Z1_THERMAL_FIXUP_OFFSET 0xc
+
+static void __init thermal_quirk(void)
+{
+	struct device_node *np;
+	u32 dev, rev;
+
+	if (mvebu_get_soc_id(&dev, &rev) && rev > ARMADA_375_Z1_REV)
+		return;
+
+	for_each_compatible_node(np, NULL, "marvell,armada375-thermal") {
+		struct property *prop;
+		__be32 newval, *newprop, *oldprop;
+		int len;
+
+		/*
+		 * The register offset is at a wrong location. This quirk
+		 * creates a new reg property as a clone of the previous
+		 * one and corrects the offset.
+		 */
+		oldprop = (__be32 *)of_get_property(np, "reg", &len);
+		if (!oldprop)
+			continue;
+
+		/* Create a duplicate of the 'reg' property */
+		prop = kzalloc(sizeof(*prop), GFP_KERNEL);
+		prop->length = len;
+		prop->name = kstrdup("reg", GFP_KERNEL);
+		prop->value = kzalloc(len, GFP_KERNEL);
+		memcpy(prop->value, oldprop, len);
+
+		/* Fixup the register offset of the second entry */
+		oldprop += 2;
+		newprop = (__be32 *)prop->value + 2;
+		newval = cpu_to_be32(be32_to_cpu(*oldprop) -
+				     A375_Z1_THERMAL_FIXUP_OFFSET);
+		*newprop = newval;
+		of_update_property(np, prop);
+
+		/*
+		 * The thermal controller needs some quirk too, so let's change
+		 * the compatible string to reflect this.
+		 */
+		prop = kzalloc(sizeof(*prop), GFP_KERNEL);
+		prop->name = kstrdup("compatible", GFP_KERNEL);
+		prop->length = sizeof("marvell,armada375-z1-thermal");
+		prop->value = kstrdup("marvell,armada375-z1-thermal",
+						GFP_KERNEL);
+		of_update_property(np, prop);
+	}
+	return;
+}
+
 static void __init mvebu_dt_init(void)
 {
 	if (of_machine_is_compatible("plathome,openblocks-ax3-4"))
 		i2c_quirk();
+	if (of_machine_is_compatible("marvell,a375-db"))
+		thermal_quirk();
+
 	of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
 }
 
@@ -123,6 +179,7 @@ static const char * const armada_375_dt_compat[] = {
 
 DT_MACHINE_START(ARMADA_375_DT, "Marvell Armada 375 (Device Tree)")
 	.init_time	= mvebu_timer_and_clk_init,
+	.init_machine	= mvebu_dt_init,
 	.restart	= mvebu_restart,
 	.dt_compat	= armada_375_dt_compat,
 MACHINE_END
diff --git a/arch/arm/mach-mvebu/mvebu-soc-id.h b/arch/arm/mach-mvebu/mvebu-soc-id.h
index 3165425..294a443 100644
--- a/arch/arm/mach-mvebu/mvebu-soc-id.h
+++ b/arch/arm/mach-mvebu/mvebu-soc-id.h
@@ -20,6 +20,9 @@
 #define MV78XX0_A0_REV	    0x1
 #define MV78XX0_B0_REV	    0x2
 
+/* Armada 375 */
+#define ARMADA_375_Z1_REV   0x0
+
 #ifdef CONFIG_ARCH_MVEBU
 int mvebu_get_soc_id(u32 *dev, u32 *rev);
 #else
-- 
1.9.1


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

* [PATCH v2 08/10] ARM: mvebu: Add thermal quirk for the Armada 375 DB board
@ 2014-04-24 20:23   ` Ezequiel Garcia
  0 siblings, 0 replies; 30+ messages in thread
From: Ezequiel Garcia @ 2014-04-24 20:23 UTC (permalink / raw)
  To: linux-arm-kernel

The initial release of the Armada 375 DB board has an Armada 375
Z1 stepping silicon. This commit introduces a quirk that allows
to workaround a series of issues with the thermal sensor in this
stepping, but updating the devicetree:

  * Updates the compatible string for the thermal, so the driver
    can perform a specific initialization of the sensor.

  * Moves the offset of the thermal control register. This quirk
    allows to specifiy the correct (A0 stepping) offset in the
    devicetree.

Signed-off-by: Ezequiel Garcia <ezequiel.garcia@free-electrons.com>
---
 arch/arm/mach-mvebu/board-v7.c     | 57 ++++++++++++++++++++++++++++++++++++++
 arch/arm/mach-mvebu/mvebu-soc-id.h |  3 ++
 2 files changed, 60 insertions(+)

diff --git a/arch/arm/mach-mvebu/board-v7.c b/arch/arm/mach-mvebu/board-v7.c
index 333fca8..93f50f2 100644
--- a/arch/arm/mach-mvebu/board-v7.c
+++ b/arch/arm/mach-mvebu/board-v7.c
@@ -96,10 +96,66 @@ static void __init i2c_quirk(void)
 	return;
 }
 
+#define A375_Z1_THERMAL_FIXUP_OFFSET 0xc
+
+static void __init thermal_quirk(void)
+{
+	struct device_node *np;
+	u32 dev, rev;
+
+	if (mvebu_get_soc_id(&dev, &rev) && rev > ARMADA_375_Z1_REV)
+		return;
+
+	for_each_compatible_node(np, NULL, "marvell,armada375-thermal") {
+		struct property *prop;
+		__be32 newval, *newprop, *oldprop;
+		int len;
+
+		/*
+		 * The register offset is at a wrong location. This quirk
+		 * creates a new reg property as a clone of the previous
+		 * one and corrects the offset.
+		 */
+		oldprop = (__be32 *)of_get_property(np, "reg", &len);
+		if (!oldprop)
+			continue;
+
+		/* Create a duplicate of the 'reg' property */
+		prop = kzalloc(sizeof(*prop), GFP_KERNEL);
+		prop->length = len;
+		prop->name = kstrdup("reg", GFP_KERNEL);
+		prop->value = kzalloc(len, GFP_KERNEL);
+		memcpy(prop->value, oldprop, len);
+
+		/* Fixup the register offset of the second entry */
+		oldprop += 2;
+		newprop = (__be32 *)prop->value + 2;
+		newval = cpu_to_be32(be32_to_cpu(*oldprop) -
+				     A375_Z1_THERMAL_FIXUP_OFFSET);
+		*newprop = newval;
+		of_update_property(np, prop);
+
+		/*
+		 * The thermal controller needs some quirk too, so let's change
+		 * the compatible string to reflect this.
+		 */
+		prop = kzalloc(sizeof(*prop), GFP_KERNEL);
+		prop->name = kstrdup("compatible", GFP_KERNEL);
+		prop->length = sizeof("marvell,armada375-z1-thermal");
+		prop->value = kstrdup("marvell,armada375-z1-thermal",
+						GFP_KERNEL);
+		of_update_property(np, prop);
+	}
+	return;
+}
+
 static void __init mvebu_dt_init(void)
 {
 	if (of_machine_is_compatible("plathome,openblocks-ax3-4"))
 		i2c_quirk();
+	if (of_machine_is_compatible("marvell,a375-db"))
+		thermal_quirk();
+
 	of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
 }
 
@@ -123,6 +179,7 @@ static const char * const armada_375_dt_compat[] = {
 
 DT_MACHINE_START(ARMADA_375_DT, "Marvell Armada 375 (Device Tree)")
 	.init_time	= mvebu_timer_and_clk_init,
+	.init_machine	= mvebu_dt_init,
 	.restart	= mvebu_restart,
 	.dt_compat	= armada_375_dt_compat,
 MACHINE_END
diff --git a/arch/arm/mach-mvebu/mvebu-soc-id.h b/arch/arm/mach-mvebu/mvebu-soc-id.h
index 3165425..294a443 100644
--- a/arch/arm/mach-mvebu/mvebu-soc-id.h
+++ b/arch/arm/mach-mvebu/mvebu-soc-id.h
@@ -20,6 +20,9 @@
 #define MV78XX0_A0_REV	    0x1
 #define MV78XX0_B0_REV	    0x2
 
+/* Armada 375 */
+#define ARMADA_375_Z1_REV   0x0
+
 #ifdef CONFIG_ARCH_MVEBU
 int mvebu_get_soc_id(u32 *dev, u32 *rev);
 #else
-- 
1.9.1

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

* [PATCH v2 09/10] ARM: mvebu: Enable the thermal sensor in Armada 375 SoC
  2014-04-24 20:23 ` Ezequiel Garcia
@ 2014-04-24 20:23   ` Ezequiel Garcia
  -1 siblings, 0 replies; 30+ messages in thread
From: Ezequiel Garcia @ 2014-04-24 20:23 UTC (permalink / raw)
  To: linux-pm, linux-arm-kernel
  Cc: Jason Cooper, Zhang Rui, Sebastian Hesselbarth, Andrew Lunn,
	Thomas Petazzoni, Gregory Clement, Lior Amsalem, Tawfik Bayouk,
	devicetree, Ezequiel Garcia

This commit enables the thermal sensor found in Armada 375 SoCs.

Signed-off-by: Ezequiel Garcia <ezequiel.garcia@free-electrons.com>
---
 arch/arm/boot/dts/armada-375.dtsi | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/arch/arm/boot/dts/armada-375.dtsi b/arch/arm/boot/dts/armada-375.dtsi
index 3877693f..7467f9d 100644
--- a/arch/arm/boot/dts/armada-375.dtsi
+++ b/arch/arm/boot/dts/armada-375.dtsi
@@ -391,6 +391,12 @@
 				status = "disabled";
 			};
 
+			thermal@e8078 {
+				compatible = "marvell,armada375-thermal";
+				reg = <0xe8078 0x4>, <0xe807c 0x8>;
+				status = "okay";
+			};
+
 			coreclk: mvebu-sar@e8204 {
 				compatible = "marvell,armada-375-core-clock";
 				reg = <0xe8204 0x04>;
-- 
1.9.1


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

* [PATCH v2 09/10] ARM: mvebu: Enable the thermal sensor in Armada 375 SoC
@ 2014-04-24 20:23   ` Ezequiel Garcia
  0 siblings, 0 replies; 30+ messages in thread
From: Ezequiel Garcia @ 2014-04-24 20:23 UTC (permalink / raw)
  To: linux-arm-kernel

This commit enables the thermal sensor found in Armada 375 SoCs.

Signed-off-by: Ezequiel Garcia <ezequiel.garcia@free-electrons.com>
---
 arch/arm/boot/dts/armada-375.dtsi | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/arch/arm/boot/dts/armada-375.dtsi b/arch/arm/boot/dts/armada-375.dtsi
index 3877693f..7467f9d 100644
--- a/arch/arm/boot/dts/armada-375.dtsi
+++ b/arch/arm/boot/dts/armada-375.dtsi
@@ -391,6 +391,12 @@
 				status = "disabled";
 			};
 
+			thermal at e8078 {
+				compatible = "marvell,armada375-thermal";
+				reg = <0xe8078 0x4>, <0xe807c 0x8>;
+				status = "okay";
+			};
+
 			coreclk: mvebu-sar at e8204 {
 				compatible = "marvell,armada-375-core-clock";
 				reg = <0xe8204 0x04>;
-- 
1.9.1

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

* [PATCH v2 10/10] ARM: mvebu: Enable the thermal sensor in Armada 380/385 SoC
  2014-04-24 20:23 ` Ezequiel Garcia
@ 2014-04-24 20:23   ` Ezequiel Garcia
  -1 siblings, 0 replies; 30+ messages in thread
From: Ezequiel Garcia @ 2014-04-24 20:23 UTC (permalink / raw)
  To: linux-pm, linux-arm-kernel
  Cc: Jason Cooper, Zhang Rui, Sebastian Hesselbarth, Andrew Lunn,
	Thomas Petazzoni, Gregory Clement, Lior Amsalem, Tawfik Bayouk,
	devicetree, Ezequiel Garcia

This commit enables the thermal sensor found in Armada 380/385 SoCs.

Signed-off-by: Ezequiel Garcia <ezequiel.garcia@free-electrons.com>
---
 arch/arm/boot/dts/armada-38x.dtsi | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/arch/arm/boot/dts/armada-38x.dtsi b/arch/arm/boot/dts/armada-38x.dtsi
index a064f59..02c6139 100644
--- a/arch/arm/boot/dts/armada-38x.dtsi
+++ b/arch/arm/boot/dts/armada-38x.dtsi
@@ -346,6 +346,12 @@
 				clock-output-names = "nand";
 			};
 
+			thermal@e8078 {
+				compatible = "marvell,armada380-thermal";
+				reg = <0xe4078 0x4>, <0xe404 0x4>;
+				status = "okay";
+			};
+
 			flash@d0000 {
 				compatible = "marvell,armada370-nand";
 				reg = <0xd0000 0x54>;
-- 
1.9.1


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

* [PATCH v2 10/10] ARM: mvebu: Enable the thermal sensor in Armada 380/385 SoC
@ 2014-04-24 20:23   ` Ezequiel Garcia
  0 siblings, 0 replies; 30+ messages in thread
From: Ezequiel Garcia @ 2014-04-24 20:23 UTC (permalink / raw)
  To: linux-arm-kernel

This commit enables the thermal sensor found in Armada 380/385 SoCs.

Signed-off-by: Ezequiel Garcia <ezequiel.garcia@free-electrons.com>
---
 arch/arm/boot/dts/armada-38x.dtsi | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/arch/arm/boot/dts/armada-38x.dtsi b/arch/arm/boot/dts/armada-38x.dtsi
index a064f59..02c6139 100644
--- a/arch/arm/boot/dts/armada-38x.dtsi
+++ b/arch/arm/boot/dts/armada-38x.dtsi
@@ -346,6 +346,12 @@
 				clock-output-names = "nand";
 			};
 
+			thermal at e8078 {
+				compatible = "marvell,armada380-thermal";
+				reg = <0xe4078 0x4>, <0xe404 0x4>;
+				status = "okay";
+			};
+
 			flash at d0000 {
 				compatible = "marvell,armada370-nand";
 				reg = <0xd0000 0x54>;
-- 
1.9.1

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

* Re: [PATCH v2 00/10] thermal: Armada 375/380 SoC support
  2014-04-24 20:23 ` Ezequiel Garcia
@ 2014-04-26  0:55   ` Jason Cooper
  -1 siblings, 0 replies; 30+ messages in thread
From: Jason Cooper @ 2014-04-26  0:55 UTC (permalink / raw)
  To: Ezequiel Garcia
  Cc: linux-pm, linux-arm-kernel, Thomas Petazzoni, Andrew Lunn,
	Tawfik Bayouk, devicetree, Lior Amsalem, Gregory Clement,
	Zhang Rui, Sebastian Hesselbarth

On Thu, Apr 24, 2014 at 05:23:14PM -0300, Ezequiel Garcia wrote:
> This patchset adds the support for the thermal sensor in the recently
> introduced Armada 375 and 38x SoC. Compared to the previous patchset
> version, this v2 introduces the A380 SoC support.
> 
> The first five patches are preparation work. They add a generic
> infrastructure that allows to support similar thermal sensors in
> a non-intrusive way.
> 
> Patches six and seven uses this infrastructure to support the 
> Armada 375 and 380 SoC thermal sensor.
> 
> Since there are some issues in the Armada 375 Z1 SoC thermal sensor,
> patch eight adds a quirk to workaround such issues. The Z1 silicon stepping
> is detected and the compatible string is updated, so the driver can apply
> sensor initialization workarounds.
> 
> In addition, the quirk moves the offset of the thermal control register,
> and allows to specifiy the correct (A0 stepping) offset in the devicetree.
> This quirk is applied only for the A375-DB board, being the only board known
> to have the problematic Z1 SoC.
> 
> Finally, the last two patches enables the thermal sensor in the devicetree.
> for the Armada 375 A0 stepping SoC, and the Armada 380/385 SoCs.
> 
> The series applies on v3.15-rc1, and has been tested on A375-DB board
> and A385-DB board.
> 
> Feedback and comments are welcome!
> 
> Changes from v1:
> 
>   * Introduced the Armada 380 support. In order to support this in a clean
>     way, the 'inverted' field was added.
> 
>   * Cleaned the A375 workaround in the thermal driver, by detecting the
>     device compatible string, as suggested by Jason Cooper.
> 
>   * Added details about the register offset in the Z1 stepping to the
>     binding documentation as requested by Jason Cooper.
> 
> Ezequiel Garcia (10):
>   thermal: armada: Rename armada_thermal_ops struct
>   thermal: armada: Add infrastructure to support generic formulas
>   thermal: armada: Add generic infrastructure to handle the sensor
>   thermal: armada: Pass the platform_device to init_sensor()
>   thermal: armada: Allow to specify an 'inverted readout' sensor
>   thermal: armada: Support Armada 375 SoC
>   thermal: armada: Support Armada 380 SoC

Thermal series:

Acked-by: Jason Cooper <jason@lakedaemon.net>

>   ARM: mvebu: Add thermal quirk for the Armada 375 DB board

Applied to mvebu/soc

>   ARM: mvebu: Enable the thermal sensor in Armada 375 SoC
>   ARM: mvebu: Enable the thermal sensor in Armada 380/385 SoC

Applied to mvebu/dt

thx,

Jason.

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

* [PATCH v2 00/10] thermal: Armada 375/380 SoC support
@ 2014-04-26  0:55   ` Jason Cooper
  0 siblings, 0 replies; 30+ messages in thread
From: Jason Cooper @ 2014-04-26  0:55 UTC (permalink / raw)
  To: linux-arm-kernel

On Thu, Apr 24, 2014 at 05:23:14PM -0300, Ezequiel Garcia wrote:
> This patchset adds the support for the thermal sensor in the recently
> introduced Armada 375 and 38x SoC. Compared to the previous patchset
> version, this v2 introduces the A380 SoC support.
> 
> The first five patches are preparation work. They add a generic
> infrastructure that allows to support similar thermal sensors in
> a non-intrusive way.
> 
> Patches six and seven uses this infrastructure to support the 
> Armada 375 and 380 SoC thermal sensor.
> 
> Since there are some issues in the Armada 375 Z1 SoC thermal sensor,
> patch eight adds a quirk to workaround such issues. The Z1 silicon stepping
> is detected and the compatible string is updated, so the driver can apply
> sensor initialization workarounds.
> 
> In addition, the quirk moves the offset of the thermal control register,
> and allows to specifiy the correct (A0 stepping) offset in the devicetree.
> This quirk is applied only for the A375-DB board, being the only board known
> to have the problematic Z1 SoC.
> 
> Finally, the last two patches enables the thermal sensor in the devicetree.
> for the Armada 375 A0 stepping SoC, and the Armada 380/385 SoCs.
> 
> The series applies on v3.15-rc1, and has been tested on A375-DB board
> and A385-DB board.
> 
> Feedback and comments are welcome!
> 
> Changes from v1:
> 
>   * Introduced the Armada 380 support. In order to support this in a clean
>     way, the 'inverted' field was added.
> 
>   * Cleaned the A375 workaround in the thermal driver, by detecting the
>     device compatible string, as suggested by Jason Cooper.
> 
>   * Added details about the register offset in the Z1 stepping to the
>     binding documentation as requested by Jason Cooper.
> 
> Ezequiel Garcia (10):
>   thermal: armada: Rename armada_thermal_ops struct
>   thermal: armada: Add infrastructure to support generic formulas
>   thermal: armada: Add generic infrastructure to handle the sensor
>   thermal: armada: Pass the platform_device to init_sensor()
>   thermal: armada: Allow to specify an 'inverted readout' sensor
>   thermal: armada: Support Armada 375 SoC
>   thermal: armada: Support Armada 380 SoC

Thermal series:

Acked-by: Jason Cooper <jason@lakedaemon.net>

>   ARM: mvebu: Add thermal quirk for the Armada 375 DB board

Applied to mvebu/soc

>   ARM: mvebu: Enable the thermal sensor in Armada 375 SoC
>   ARM: mvebu: Enable the thermal sensor in Armada 380/385 SoC

Applied to mvebu/dt

thx,

Jason.

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

* Re: [PATCH v2 00/10] thermal: Armada 375/380 SoC support
  2014-04-26  0:55   ` Jason Cooper
@ 2014-04-26  1:45     ` Ezequiel Garcia
  -1 siblings, 0 replies; 30+ messages in thread
From: Ezequiel Garcia @ 2014-04-26  1:45 UTC (permalink / raw)
  To: Zhang Rui
  Cc: Jason Cooper, linux-pm, linux-arm-kernel, Thomas Petazzoni,
	Andrew Lunn, Tawfik Bayouk, devicetree, Lior Amsalem,
	Gregory Clement, Sebastian Hesselbarth

Hello Zhang,

On Apr 25, Jason Cooper wrote:
> On Thu, Apr 24, 2014 at 05:23:14PM -0300, Ezequiel Garcia wrote:
> > This patchset adds the support for the thermal sensor in the recently
> > introduced Armada 375 and 38x SoC. Compared to the previous patchset
> > version, this v2 introduces the A380 SoC support.
> > 
> > The first five patches are preparation work. They add a generic
> > infrastructure that allows to support similar thermal sensors in
> > a non-intrusive way.
> > 
> > Patches six and seven uses this infrastructure to support the 
> > Armada 375 and 380 SoC thermal sensor.
> > 
> > Since there are some issues in the Armada 375 Z1 SoC thermal sensor,
> > patch eight adds a quirk to workaround such issues. The Z1 silicon stepping
> > is detected and the compatible string is updated, so the driver can apply
> > sensor initialization workarounds.
> > 
> > In addition, the quirk moves the offset of the thermal control register,
> > and allows to specifiy the correct (A0 stepping) offset in the devicetree.
> > This quirk is applied only for the A375-DB board, being the only board known
> > to have the problematic Z1 SoC.
> > 
> > Finally, the last two patches enables the thermal sensor in the devicetree.
> > for the Armada 375 A0 stepping SoC, and the Armada 380/385 SoCs.
> > 
> > The series applies on v3.15-rc1, and has been tested on A375-DB board
> > and A385-DB board.
> > 
> > Feedback and comments are welcome!
> > 
> > Changes from v1:
> > 
> >   * Introduced the Armada 380 support. In order to support this in a clean
> >     way, the 'inverted' field was added.
> > 
> >   * Cleaned the A375 workaround in the thermal driver, by detecting the
> >     device compatible string, as suggested by Jason Cooper.
> > 
> >   * Added details about the register offset in the Z1 stepping to the
> >     binding documentation as requested by Jason Cooper.
> > 
> > Ezequiel Garcia (10):
> >   thermal: armada: Rename armada_thermal_ops struct
> >   thermal: armada: Add infrastructure to support generic formulas
> >   thermal: armada: Add generic infrastructure to handle the sensor
> >   thermal: armada: Pass the platform_device to init_sensor()
> >   thermal: armada: Allow to specify an 'inverted readout' sensor
> >   thermal: armada: Support Armada 375 SoC
> >   thermal: armada: Support Armada 380 SoC
> 
> Thermal series:
> 
> Acked-by: Jason Cooper <jason@lakedaemon.net>
> 

Do you have any comments about this?

Thanks!
-- 
Ezequiel García, Free Electrons
Embedded Linux, Kernel and Android Engineering
http://free-electrons.com

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

* [PATCH v2 00/10] thermal: Armada 375/380 SoC support
@ 2014-04-26  1:45     ` Ezequiel Garcia
  0 siblings, 0 replies; 30+ messages in thread
From: Ezequiel Garcia @ 2014-04-26  1:45 UTC (permalink / raw)
  To: linux-arm-kernel

Hello Zhang,

On Apr 25, Jason Cooper wrote:
> On Thu, Apr 24, 2014 at 05:23:14PM -0300, Ezequiel Garcia wrote:
> > This patchset adds the support for the thermal sensor in the recently
> > introduced Armada 375 and 38x SoC. Compared to the previous patchset
> > version, this v2 introduces the A380 SoC support.
> > 
> > The first five patches are preparation work. They add a generic
> > infrastructure that allows to support similar thermal sensors in
> > a non-intrusive way.
> > 
> > Patches six and seven uses this infrastructure to support the 
> > Armada 375 and 380 SoC thermal sensor.
> > 
> > Since there are some issues in the Armada 375 Z1 SoC thermal sensor,
> > patch eight adds a quirk to workaround such issues. The Z1 silicon stepping
> > is detected and the compatible string is updated, so the driver can apply
> > sensor initialization workarounds.
> > 
> > In addition, the quirk moves the offset of the thermal control register,
> > and allows to specifiy the correct (A0 stepping) offset in the devicetree.
> > This quirk is applied only for the A375-DB board, being the only board known
> > to have the problematic Z1 SoC.
> > 
> > Finally, the last two patches enables the thermal sensor in the devicetree.
> > for the Armada 375 A0 stepping SoC, and the Armada 380/385 SoCs.
> > 
> > The series applies on v3.15-rc1, and has been tested on A375-DB board
> > and A385-DB board.
> > 
> > Feedback and comments are welcome!
> > 
> > Changes from v1:
> > 
> >   * Introduced the Armada 380 support. In order to support this in a clean
> >     way, the 'inverted' field was added.
> > 
> >   * Cleaned the A375 workaround in the thermal driver, by detecting the
> >     device compatible string, as suggested by Jason Cooper.
> > 
> >   * Added details about the register offset in the Z1 stepping to the
> >     binding documentation as requested by Jason Cooper.
> > 
> > Ezequiel Garcia (10):
> >   thermal: armada: Rename armada_thermal_ops struct
> >   thermal: armada: Add infrastructure to support generic formulas
> >   thermal: armada: Add generic infrastructure to handle the sensor
> >   thermal: armada: Pass the platform_device to init_sensor()
> >   thermal: armada: Allow to specify an 'inverted readout' sensor
> >   thermal: armada: Support Armada 375 SoC
> >   thermal: armada: Support Armada 380 SoC
> 
> Thermal series:
> 
> Acked-by: Jason Cooper <jason@lakedaemon.net>
> 

Do you have any comments about this?

Thanks!
-- 
Ezequiel Garc?a, Free Electrons
Embedded Linux, Kernel and Android Engineering
http://free-electrons.com

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

* Re: [PATCH v2 10/10] ARM: mvebu: Enable the thermal sensor in Armada 380/385 SoC
  2014-04-24 20:23   ` Ezequiel Garcia
@ 2014-04-28 16:44     ` Ezequiel Garcia
  -1 siblings, 0 replies; 30+ messages in thread
From: Ezequiel Garcia @ 2014-04-28 16:44 UTC (permalink / raw)
  To: linux-pm, linux-arm-kernel
  Cc: Jason Cooper, Zhang Rui, Sebastian Hesselbarth, Andrew Lunn,
	Thomas Petazzoni, Gregory Clement, Lior Amsalem, Tawfik Bayouk,
	devicetree

On Apr 24, Ezequiel Garcia wrote:
> This commit enables the thermal sensor found in Armada 380/385 SoCs.
> 
> Signed-off-by: Ezequiel Garcia <ezequiel.garcia@free-electrons.com>
> ---
>  arch/arm/boot/dts/armada-38x.dtsi | 6 ++++++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/arch/arm/boot/dts/armada-38x.dtsi b/arch/arm/boot/dts/armada-38x.dtsi
> index a064f59..02c6139 100644
> --- a/arch/arm/boot/dts/armada-38x.dtsi
> +++ b/arch/arm/boot/dts/armada-38x.dtsi
> @@ -346,6 +346,12 @@
>  				clock-output-names = "nand";
>  			};
>  
> +			thermal@e8078 {
> +				compatible = "marvell,armada380-thermal";
> +				reg = <0xe4078 0x4>, <0xe404 0x4>;

Dammit, there's a stupid typo in the register offset. I never noticed this, because
the initialization sequence does not do much, and this register is not really used
(for now). The fix is this:

diff --git a/arch/arm/boot/dts/armada-38x.dtsi b/arch/arm/boot/dts/armada-38x.dtsi
index 02c6139..370220f 100644
--- a/arch/arm/boot/dts/armada-38x.dtsi
+++ b/arch/arm/boot/dts/armada-38x.dtsi
@@ -348,7 +348,7 @@
 
 			thermal@e8078 {
 				compatible = "marvell,armada380-thermal";
-				reg = <0xe4078 0x4>, <0xe404 0x4>;
+				reg = <0xe4078 0x4>, <0xe4074 0x4>;
 				status = "okay";
 			};
 
Want me to send a follow-up patch?
-- 
Ezequiel García, Free Electrons
Embedded Linux, Kernel and Android Engineering
http://free-electrons.com

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

* [PATCH v2 10/10] ARM: mvebu: Enable the thermal sensor in Armada 380/385 SoC
@ 2014-04-28 16:44     ` Ezequiel Garcia
  0 siblings, 0 replies; 30+ messages in thread
From: Ezequiel Garcia @ 2014-04-28 16:44 UTC (permalink / raw)
  To: linux-arm-kernel

On Apr 24, Ezequiel Garcia wrote:
> This commit enables the thermal sensor found in Armada 380/385 SoCs.
> 
> Signed-off-by: Ezequiel Garcia <ezequiel.garcia@free-electrons.com>
> ---
>  arch/arm/boot/dts/armada-38x.dtsi | 6 ++++++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/arch/arm/boot/dts/armada-38x.dtsi b/arch/arm/boot/dts/armada-38x.dtsi
> index a064f59..02c6139 100644
> --- a/arch/arm/boot/dts/armada-38x.dtsi
> +++ b/arch/arm/boot/dts/armada-38x.dtsi
> @@ -346,6 +346,12 @@
>  				clock-output-names = "nand";
>  			};
>  
> +			thermal at e8078 {
> +				compatible = "marvell,armada380-thermal";
> +				reg = <0xe4078 0x4>, <0xe404 0x4>;

Dammit, there's a stupid typo in the register offset. I never noticed this, because
the initialization sequence does not do much, and this register is not really used
(for now). The fix is this:

diff --git a/arch/arm/boot/dts/armada-38x.dtsi b/arch/arm/boot/dts/armada-38x.dtsi
index 02c6139..370220f 100644
--- a/arch/arm/boot/dts/armada-38x.dtsi
+++ b/arch/arm/boot/dts/armada-38x.dtsi
@@ -348,7 +348,7 @@
 
 			thermal at e8078 {
 				compatible = "marvell,armada380-thermal";
-				reg = <0xe4078 0x4>, <0xe404 0x4>;
+				reg = <0xe4078 0x4>, <0xe4074 0x4>;
 				status = "okay";
 			};
 
Want me to send a follow-up patch?
-- 
Ezequiel Garc?a, Free Electrons
Embedded Linux, Kernel and Android Engineering
http://free-electrons.com

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

* Re: [PATCH v2 10/10] ARM: mvebu: Enable the thermal sensor in Armada 380/385 SoC
  2014-04-28 16:44     ` Ezequiel Garcia
@ 2014-04-28 18:33       ` Jason Cooper
  -1 siblings, 0 replies; 30+ messages in thread
From: Jason Cooper @ 2014-04-28 18:33 UTC (permalink / raw)
  To: Ezequiel Garcia
  Cc: Thomas Petazzoni, Andrew Lunn, Tawfik Bayouk, linux-pm,
	devicetree, Lior Amsalem, Gregory Clement, Zhang Rui,
	linux-arm-kernel, Sebastian Hesselbarth

On Mon, Apr 28, 2014 at 01:44:03PM -0300, Ezequiel Garcia wrote:
> On Apr 24, Ezequiel Garcia wrote:
> > This commit enables the thermal sensor found in Armada 380/385 SoCs.
> > 
> > Signed-off-by: Ezequiel Garcia <ezequiel.garcia@free-electrons.com>
> > ---
> >  arch/arm/boot/dts/armada-38x.dtsi | 6 ++++++
> >  1 file changed, 6 insertions(+)
> > 
> > diff --git a/arch/arm/boot/dts/armada-38x.dtsi b/arch/arm/boot/dts/armada-38x.dtsi
> > index a064f59..02c6139 100644
> > --- a/arch/arm/boot/dts/armada-38x.dtsi
> > +++ b/arch/arm/boot/dts/armada-38x.dtsi
> > @@ -346,6 +346,12 @@
> >  				clock-output-names = "nand";
> >  			};
> >  
> > +			thermal@e8078 {
> > +				compatible = "marvell,armada380-thermal";
> > +				reg = <0xe4078 0x4>, <0xe404 0x4>;
> 
> Dammit, there's a stupid typo in the register offset. I never noticed this, because
> the initialization sequence does not do much, and this register is not really used
> (for now). The fix is this:
> 
> diff --git a/arch/arm/boot/dts/armada-38x.dtsi b/arch/arm/boot/dts/armada-38x.dtsi
> index 02c6139..370220f 100644
> --- a/arch/arm/boot/dts/armada-38x.dtsi
> +++ b/arch/arm/boot/dts/armada-38x.dtsi
> @@ -348,7 +348,7 @@
>  
>  			thermal@e8078 {
>  				compatible = "marvell,armada380-thermal";
> -				reg = <0xe4078 0x4>, <0xe404 0x4>;
> +				reg = <0xe4078 0x4>, <0xe4074 0x4>;
>  				status = "okay";
>  			};
>  
> Want me to send a follow-up patch?

Nope, I squashed it in and pushed it out.

thx,

Jason.

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

* [PATCH v2 10/10] ARM: mvebu: Enable the thermal sensor in Armada 380/385 SoC
@ 2014-04-28 18:33       ` Jason Cooper
  0 siblings, 0 replies; 30+ messages in thread
From: Jason Cooper @ 2014-04-28 18:33 UTC (permalink / raw)
  To: linux-arm-kernel

On Mon, Apr 28, 2014 at 01:44:03PM -0300, Ezequiel Garcia wrote:
> On Apr 24, Ezequiel Garcia wrote:
> > This commit enables the thermal sensor found in Armada 380/385 SoCs.
> > 
> > Signed-off-by: Ezequiel Garcia <ezequiel.garcia@free-electrons.com>
> > ---
> >  arch/arm/boot/dts/armada-38x.dtsi | 6 ++++++
> >  1 file changed, 6 insertions(+)
> > 
> > diff --git a/arch/arm/boot/dts/armada-38x.dtsi b/arch/arm/boot/dts/armada-38x.dtsi
> > index a064f59..02c6139 100644
> > --- a/arch/arm/boot/dts/armada-38x.dtsi
> > +++ b/arch/arm/boot/dts/armada-38x.dtsi
> > @@ -346,6 +346,12 @@
> >  				clock-output-names = "nand";
> >  			};
> >  
> > +			thermal at e8078 {
> > +				compatible = "marvell,armada380-thermal";
> > +				reg = <0xe4078 0x4>, <0xe404 0x4>;
> 
> Dammit, there's a stupid typo in the register offset. I never noticed this, because
> the initialization sequence does not do much, and this register is not really used
> (for now). The fix is this:
> 
> diff --git a/arch/arm/boot/dts/armada-38x.dtsi b/arch/arm/boot/dts/armada-38x.dtsi
> index 02c6139..370220f 100644
> --- a/arch/arm/boot/dts/armada-38x.dtsi
> +++ b/arch/arm/boot/dts/armada-38x.dtsi
> @@ -348,7 +348,7 @@
>  
>  			thermal at e8078 {
>  				compatible = "marvell,armada380-thermal";
> -				reg = <0xe4078 0x4>, <0xe404 0x4>;
> +				reg = <0xe4078 0x4>, <0xe4074 0x4>;
>  				status = "okay";
>  			};
>  
> Want me to send a follow-up patch?

Nope, I squashed it in and pushed it out.

thx,

Jason.

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

end of thread, other threads:[~2014-04-28 18:33 UTC | newest]

Thread overview: 30+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-04-24 20:23 [PATCH v2 00/10] thermal: Armada 375/380 SoC support Ezequiel Garcia
2014-04-24 20:23 ` Ezequiel Garcia
2014-04-24 20:23 ` [PATCH v2 01/10] thermal: armada: Rename armada_thermal_ops struct Ezequiel Garcia
2014-04-24 20:23   ` Ezequiel Garcia
2014-04-24 20:23 ` [PATCH v2 02/10] thermal: armada: Add infrastructure to support generic formulas Ezequiel Garcia
2014-04-24 20:23   ` Ezequiel Garcia
2014-04-24 20:23 ` [PATCH v2 03/10] thermal: armada: Add generic infrastructure to handle the sensor Ezequiel Garcia
2014-04-24 20:23   ` Ezequiel Garcia
2014-04-24 20:23 ` [PATCH v2 04/10] thermal: armada: Pass the platform_device to init_sensor() Ezequiel Garcia
2014-04-24 20:23   ` Ezequiel Garcia
2014-04-24 20:23 ` [PATCH v2 05/10] thermal: armada: Allow to specify an 'inverted readout' sensor Ezequiel Garcia
2014-04-24 20:23   ` Ezequiel Garcia
2014-04-24 20:23 ` [PATCH v2 06/10] thermal: armada: Support Armada 375 SoC Ezequiel Garcia
2014-04-24 20:23   ` Ezequiel Garcia
     [not found] ` <1398371004-15807-1-git-send-email-ezequiel.garcia-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>
2014-04-24 20:23   ` [PATCH v2 07/10] thermal: armada: Support Armada 380 SoC Ezequiel Garcia
2014-04-24 20:23     ` Ezequiel Garcia
2014-04-24 20:23 ` [PATCH v2 08/10] ARM: mvebu: Add thermal quirk for the Armada 375 DB board Ezequiel Garcia
2014-04-24 20:23   ` Ezequiel Garcia
2014-04-24 20:23 ` [PATCH v2 09/10] ARM: mvebu: Enable the thermal sensor in Armada 375 SoC Ezequiel Garcia
2014-04-24 20:23   ` Ezequiel Garcia
2014-04-24 20:23 ` [PATCH v2 10/10] ARM: mvebu: Enable the thermal sensor in Armada 380/385 SoC Ezequiel Garcia
2014-04-24 20:23   ` Ezequiel Garcia
2014-04-28 16:44   ` Ezequiel Garcia
2014-04-28 16:44     ` Ezequiel Garcia
2014-04-28 18:33     ` Jason Cooper
2014-04-28 18:33       ` Jason Cooper
2014-04-26  0:55 ` [PATCH v2 00/10] thermal: Armada 375/380 SoC support Jason Cooper
2014-04-26  0:55   ` Jason Cooper
2014-04-26  1:45   ` Ezequiel Garcia
2014-04-26  1:45     ` Ezequiel Garcia

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.