All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3 0/9] ARM: sunxi: Support cpufreq on sun[457]i
@ 2015-01-12  4:34 ` Chen-Yu Tsai
  0 siblings, 0 replies; 36+ messages in thread
From: Chen-Yu Tsai @ 2015-01-12  4:34 UTC (permalink / raw)
  To: Maxime Ripard, Dmitry Torokhov, Zhang Rui, Eduardo Valentin
  Cc: Chen-Yu Tsai, Hans de Goede, linux-input, linux-arm-kernel, linux-pm

Hi,

This is v3 of the cpufreq support series for sunxi. The series has been
rebased onto the latest sunxi-next. I've dropped all the patches Maxime
merged. This includes "ARM: sunxi: Register cpufreq-dt for sun[45678]i"
which was merged but not published yet.

Individual changes since v2 are listed within each patch.


Original cover letter follows:

This series adds support cpufreq support for sun[457]i using cpufreq-dt.
This also supports passive cpu cooling (thermal throttling) using thermal
zones with the temperature sensor in the SoC.

The operating points for the supported platforms were taken from the
linux-sunxi FEX files repository. The majority of boards use the same
settings. Only with sun7i do we see slight variations, either disabling
some frequencies, or bumping up the voltage a bit. In either case this
can be done by limiting the constraints for the supply regulator, or 
overriding the OPP table in the board dts file.

On sun7i, there is an additional operating point not found in the FEX
files, 960 MHz @ 1.4V, which is the full speed setting in both u-boot-sunxi
and mainline u-boot.

The series has been tested on the 4 boards I have. With cpufreq active,
the effects are visible as a decrease in SoC internal temperature.
Stability for the operating points has been tested using:

  http://linux-sunxi.org/Hardware_Reliability_Tests#Reliability_of_cpufreq_voltage.2Ffrequency_settings

More real world usage feedback is appreciated. Thermal throttling hasn't
been tested much, due to not being able to generate enough load without
the GPU for the SoC to heat up. Also on sun4i, the temperature sensor
still hasn't been calibrated, so the readings are highly inaccurate.


Chen-Yu Tsai (9):
  Input: sun4i-ts: Add thermal zone sensor support
  ARM: dts: sunxi: Add dtsi for AXP209 PMIC
  ARM: dts: sun7i: Add cpu thermal zones to dtsi
  ARM: dts: sun7i: cubieboard2: add axp209 regulator nodes
  ARM: dts: sun7i: cubietruck: add axp209 regulator nodes
  ARM: dts: sun5i: Add cpu thermal zones to dtsi
  ARM: dts: sun5i: hsg-h702: add axp209 regulator nodes
  ARM: dts: sun4i: Add cpu thermal zones to dtsi
  ARM: dts: sun4i: cubieboard: add axp209 regulator nodes

 .../bindings/input/touchscreen/sun4i.txt           |  2 +
 arch/arm/boot/dts/axp209.dtsi                      | 97 ++++++++++++++++++++++
 arch/arm/boot/dts/sun4i-a10-cubieboard.dts         | 35 +++++++-
 arch/arm/boot/dts/sun4i-a10.dtsi                   | 34 ++++++++
 arch/arm/boot/dts/sun5i-a13-hsg-h702.dts           | 46 ++++++++--
 arch/arm/boot/dts/sun5i-a13.dtsi                   | 34 ++++++++
 arch/arm/boot/dts/sun7i-a20-cubieboard2.dts        | 35 +++++++-
 arch/arm/boot/dts/sun7i-a20-cubietruck.dts         | 35 +++++++-
 arch/arm/boot/dts/sun7i-a20.dtsi                   | 33 ++++++++
 drivers/input/touchscreen/sun4i-ts.c               | 54 +++++++++++-
 10 files changed, 381 insertions(+), 24 deletions(-)
 create mode 100644 arch/arm/boot/dts/axp209.dtsi

-- 
2.1.4


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

* [PATCH v3 0/9] ARM: sunxi: Support cpufreq on sun[457]i
@ 2015-01-12  4:34 ` Chen-Yu Tsai
  0 siblings, 0 replies; 36+ messages in thread
From: Chen-Yu Tsai @ 2015-01-12  4:34 UTC (permalink / raw)
  To: linux-arm-kernel

Hi,

This is v3 of the cpufreq support series for sunxi. The series has been
rebased onto the latest sunxi-next. I've dropped all the patches Maxime
merged. This includes "ARM: sunxi: Register cpufreq-dt for sun[45678]i"
which was merged but not published yet.

Individual changes since v2 are listed within each patch.


Original cover letter follows:

This series adds support cpufreq support for sun[457]i using cpufreq-dt.
This also supports passive cpu cooling (thermal throttling) using thermal
zones with the temperature sensor in the SoC.

The operating points for the supported platforms were taken from the
linux-sunxi FEX files repository. The majority of boards use the same
settings. Only with sun7i do we see slight variations, either disabling
some frequencies, or bumping up the voltage a bit. In either case this
can be done by limiting the constraints for the supply regulator, or 
overriding the OPP table in the board dts file.

On sun7i, there is an additional operating point not found in the FEX
files, 960 MHz @ 1.4V, which is the full speed setting in both u-boot-sunxi
and mainline u-boot.

The series has been tested on the 4 boards I have. With cpufreq active,
the effects are visible as a decrease in SoC internal temperature.
Stability for the operating points has been tested using:

  http://linux-sunxi.org/Hardware_Reliability_Tests#Reliability_of_cpufreq_voltage.2Ffrequency_settings

More real world usage feedback is appreciated. Thermal throttling hasn't
been tested much, due to not being able to generate enough load without
the GPU for the SoC to heat up. Also on sun4i, the temperature sensor
still hasn't been calibrated, so the readings are highly inaccurate.


Chen-Yu Tsai (9):
  Input: sun4i-ts: Add thermal zone sensor support
  ARM: dts: sunxi: Add dtsi for AXP209 PMIC
  ARM: dts: sun7i: Add cpu thermal zones to dtsi
  ARM: dts: sun7i: cubieboard2: add axp209 regulator nodes
  ARM: dts: sun7i: cubietruck: add axp209 regulator nodes
  ARM: dts: sun5i: Add cpu thermal zones to dtsi
  ARM: dts: sun5i: hsg-h702: add axp209 regulator nodes
  ARM: dts: sun4i: Add cpu thermal zones to dtsi
  ARM: dts: sun4i: cubieboard: add axp209 regulator nodes

 .../bindings/input/touchscreen/sun4i.txt           |  2 +
 arch/arm/boot/dts/axp209.dtsi                      | 97 ++++++++++++++++++++++
 arch/arm/boot/dts/sun4i-a10-cubieboard.dts         | 35 +++++++-
 arch/arm/boot/dts/sun4i-a10.dtsi                   | 34 ++++++++
 arch/arm/boot/dts/sun5i-a13-hsg-h702.dts           | 46 ++++++++--
 arch/arm/boot/dts/sun5i-a13.dtsi                   | 34 ++++++++
 arch/arm/boot/dts/sun7i-a20-cubieboard2.dts        | 35 +++++++-
 arch/arm/boot/dts/sun7i-a20-cubietruck.dts         | 35 +++++++-
 arch/arm/boot/dts/sun7i-a20.dtsi                   | 33 ++++++++
 drivers/input/touchscreen/sun4i-ts.c               | 54 +++++++++++-
 10 files changed, 381 insertions(+), 24 deletions(-)
 create mode 100644 arch/arm/boot/dts/axp209.dtsi

-- 
2.1.4

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

* [PATCH v3 1/9] Input: sun4i-ts: Add thermal zone sensor support
  2015-01-12  4:34 ` Chen-Yu Tsai
@ 2015-01-12  4:34   ` Chen-Yu Tsai
  -1 siblings, 0 replies; 36+ messages in thread
From: Chen-Yu Tsai @ 2015-01-12  4:34 UTC (permalink / raw)
  To: Maxime Ripard, Dmitry Torokhov, Zhang Rui, Eduardo Valentin
  Cc: Chen-Yu Tsai, Hans de Goede, linux-input, linux-arm-kernel, linux-pm

The touchscreen controller has a temperature sensor embedded in the SoC,
which already has hwmon support in the driver.

Add DT thermal zone support so we can use it with cpufreq for thermal
throttling.

This also adds a comment stating that we do not know the actual formula
for calculating the temperature.

Signed-off-by: Chen-Yu Tsai <wens@csie.org>
---

changes since v2:

    - Use common function for temperature calculation

changes since v1:

    - clean up thermal zone sensor when input device register fails
    - unconditionally unregister thermal zone sensor on removal.
      the unregister function checks the pointers passed in.
    - add comment explaining the lack of documents for the temperature
      calculation formula

---
 .../bindings/input/touchscreen/sun4i.txt           |  2 +
 drivers/input/touchscreen/sun4i-ts.c               | 54 ++++++++++++++++++++--
 2 files changed, 52 insertions(+), 4 deletions(-)

diff --git a/Documentation/devicetree/bindings/input/touchscreen/sun4i.txt b/Documentation/devicetree/bindings/input/touchscreen/sun4i.txt
index aef57791f40b..a8405bab6c00 100644
--- a/Documentation/devicetree/bindings/input/touchscreen/sun4i.txt
+++ b/Documentation/devicetree/bindings/input/touchscreen/sun4i.txt
@@ -5,6 +5,7 @@ Required properties:
  - compatible: "allwinner,sun4i-a10-ts"
  - reg: mmio address range of the chip
  - interrupts: interrupt to which the chip is connected
+ - #thermal-sensor-cells: shall be 0
 
 Optional properties:
  - allwinner,ts-attached: boolean indicating that an actual touchscreen is
@@ -17,4 +18,5 @@ Example:
 		reg = <0x01c25000 0x100>;
 		interrupts = <29>;
 		allwinner,ts-attached;
+		#thermal-sensor-cells = <0>;
 	};
diff --git a/drivers/input/touchscreen/sun4i-ts.c b/drivers/input/touchscreen/sun4i-ts.c
index 28a06749ae42..5851aa0bd78b 100644
--- a/drivers/input/touchscreen/sun4i-ts.c
+++ b/drivers/input/touchscreen/sun4i-ts.c
@@ -34,6 +34,7 @@
 
 #include <linux/err.h>
 #include <linux/hwmon.h>
+#include <linux/thermal.h>
 #include <linux/init.h>
 #include <linux/input.h>
 #include <linux/interrupt.h>
@@ -107,6 +108,7 @@
 struct sun4i_ts_data {
 	struct device *dev;
 	struct input_dev *input;
+	struct thermal_zone_device *tz;
 	void __iomem *base;
 	unsigned int irq;
 	bool ignore_fifo_data;
@@ -180,16 +182,48 @@ static void sun4i_ts_close(struct input_dev *dev)
 	writel(TEMP_IRQ_EN(1), ts->base + TP_INT_FIFOC);
 }
 
+static int get_temp(const struct sun4i_ts_data *ts, long *temp)
+{
+	/* No temp_data until the first irq */
+	if (ts->temp_data == -1)
+		return -EAGAIN;
+
+	/*
+	 * The user manuals do not contain the formula for calculating
+	 * the temperature. The formula used here is from the AXP209,
+	 * which is designed by X-Powers, an affiliate of Allwinner:
+	 *
+	 *     temperature = -144.7 + (value * 0.1)
+	 *
+	 * This should be replaced with the correct one if such information
+	 * becomes available.
+	 */
+	*temp = (ts->temp_data - 1447) * 100;
+
+	return 0;
+}
+
+static int get_tz_temp(void *data, long *temp)
+{
+	return get_temp(data, temp);
+}
+
+static struct thermal_zone_of_device_ops sun4i_ts_tz_ops = {
+	.get_temp = get_tz_temp,
+};
+
 static ssize_t show_temp(struct device *dev, struct device_attribute *devattr,
 			 char *buf)
 {
 	struct sun4i_ts_data *ts = dev_get_drvdata(dev);
+	long temp;
+	int ret;
 
-	/* No temp_data until the first irq */
-	if (ts->temp_data == -1)
-		return -EAGAIN;
+	ret = get_temp(ts, &temp);
+	if (ret)
+		return ret;
 
-	return sprintf(buf, "%d\n", (ts->temp_data - 1447) * 100);
+	return sprintf(buf, "%ld\n", temp);
 }
 
 static ssize_t show_temp_label(struct device *dev,
@@ -283,17 +317,27 @@ static int sun4i_ts_probe(struct platform_device *pdev)
 	writel(STYLUS_UP_DEBOUN(5) | STYLUS_UP_DEBOUN_EN(1) | TP_MODE_EN(1),
 	       ts->base + TP_CTRL1);
 
+	/*
+	 * The thermal core does not register hwmon devices for DT-based
+	 * thermal zone sensors, such as this one.
+	 */
 	hwmon = devm_hwmon_device_register_with_groups(ts->dev, "sun4i_ts",
 						       ts, sun4i_ts_groups);
 	if (IS_ERR(hwmon))
 		return PTR_ERR(hwmon);
 
+	ts->tz = thermal_zone_of_sensor_register(ts->dev, 0, ts,
+						 &sun4i_ts_tz_ops);
+	if (IS_ERR(ts->tz))
+		ts->tz = NULL;
+
 	writel(TEMP_IRQ_EN(1), ts->base + TP_INT_FIFOC);
 
 	if (ts_attached) {
 		error = input_register_device(ts->input);
 		if (error) {
 			writel(0, ts->base + TP_INT_FIFOC);
+			thermal_zone_of_sensor_unregister(ts->dev, ts->tz);
 			return error;
 		}
 	}
@@ -310,6 +354,8 @@ static int sun4i_ts_remove(struct platform_device *pdev)
 	if (ts->input)
 		input_unregister_device(ts->input);
 
+	thermal_zone_of_sensor_unregister(ts->dev, ts->tz);
+
 	/* Deactivate all IRQs */
 	writel(0, ts->base + TP_INT_FIFOC);
 
-- 
2.1.4


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

* [PATCH v3 1/9] Input: sun4i-ts: Add thermal zone sensor support
@ 2015-01-12  4:34   ` Chen-Yu Tsai
  0 siblings, 0 replies; 36+ messages in thread
From: Chen-Yu Tsai @ 2015-01-12  4:34 UTC (permalink / raw)
  To: linux-arm-kernel

The touchscreen controller has a temperature sensor embedded in the SoC,
which already has hwmon support in the driver.

Add DT thermal zone support so we can use it with cpufreq for thermal
throttling.

This also adds a comment stating that we do not know the actual formula
for calculating the temperature.

Signed-off-by: Chen-Yu Tsai <wens@csie.org>
---

changes since v2:

    - Use common function for temperature calculation

changes since v1:

    - clean up thermal zone sensor when input device register fails
    - unconditionally unregister thermal zone sensor on removal.
      the unregister function checks the pointers passed in.
    - add comment explaining the lack of documents for the temperature
      calculation formula

---
 .../bindings/input/touchscreen/sun4i.txt           |  2 +
 drivers/input/touchscreen/sun4i-ts.c               | 54 ++++++++++++++++++++--
 2 files changed, 52 insertions(+), 4 deletions(-)

diff --git a/Documentation/devicetree/bindings/input/touchscreen/sun4i.txt b/Documentation/devicetree/bindings/input/touchscreen/sun4i.txt
index aef57791f40b..a8405bab6c00 100644
--- a/Documentation/devicetree/bindings/input/touchscreen/sun4i.txt
+++ b/Documentation/devicetree/bindings/input/touchscreen/sun4i.txt
@@ -5,6 +5,7 @@ Required properties:
  - compatible: "allwinner,sun4i-a10-ts"
  - reg: mmio address range of the chip
  - interrupts: interrupt to which the chip is connected
+ - #thermal-sensor-cells: shall be 0
 
 Optional properties:
  - allwinner,ts-attached: boolean indicating that an actual touchscreen is
@@ -17,4 +18,5 @@ Example:
 		reg = <0x01c25000 0x100>;
 		interrupts = <29>;
 		allwinner,ts-attached;
+		#thermal-sensor-cells = <0>;
 	};
diff --git a/drivers/input/touchscreen/sun4i-ts.c b/drivers/input/touchscreen/sun4i-ts.c
index 28a06749ae42..5851aa0bd78b 100644
--- a/drivers/input/touchscreen/sun4i-ts.c
+++ b/drivers/input/touchscreen/sun4i-ts.c
@@ -34,6 +34,7 @@
 
 #include <linux/err.h>
 #include <linux/hwmon.h>
+#include <linux/thermal.h>
 #include <linux/init.h>
 #include <linux/input.h>
 #include <linux/interrupt.h>
@@ -107,6 +108,7 @@
 struct sun4i_ts_data {
 	struct device *dev;
 	struct input_dev *input;
+	struct thermal_zone_device *tz;
 	void __iomem *base;
 	unsigned int irq;
 	bool ignore_fifo_data;
@@ -180,16 +182,48 @@ static void sun4i_ts_close(struct input_dev *dev)
 	writel(TEMP_IRQ_EN(1), ts->base + TP_INT_FIFOC);
 }
 
+static int get_temp(const struct sun4i_ts_data *ts, long *temp)
+{
+	/* No temp_data until the first irq */
+	if (ts->temp_data == -1)
+		return -EAGAIN;
+
+	/*
+	 * The user manuals do not contain the formula for calculating
+	 * the temperature. The formula used here is from the AXP209,
+	 * which is designed by X-Powers, an affiliate of Allwinner:
+	 *
+	 *     temperature = -144.7 + (value * 0.1)
+	 *
+	 * This should be replaced with the correct one if such information
+	 * becomes available.
+	 */
+	*temp = (ts->temp_data - 1447) * 100;
+
+	return 0;
+}
+
+static int get_tz_temp(void *data, long *temp)
+{
+	return get_temp(data, temp);
+}
+
+static struct thermal_zone_of_device_ops sun4i_ts_tz_ops = {
+	.get_temp = get_tz_temp,
+};
+
 static ssize_t show_temp(struct device *dev, struct device_attribute *devattr,
 			 char *buf)
 {
 	struct sun4i_ts_data *ts = dev_get_drvdata(dev);
+	long temp;
+	int ret;
 
-	/* No temp_data until the first irq */
-	if (ts->temp_data == -1)
-		return -EAGAIN;
+	ret = get_temp(ts, &temp);
+	if (ret)
+		return ret;
 
-	return sprintf(buf, "%d\n", (ts->temp_data - 1447) * 100);
+	return sprintf(buf, "%ld\n", temp);
 }
 
 static ssize_t show_temp_label(struct device *dev,
@@ -283,17 +317,27 @@ static int sun4i_ts_probe(struct platform_device *pdev)
 	writel(STYLUS_UP_DEBOUN(5) | STYLUS_UP_DEBOUN_EN(1) | TP_MODE_EN(1),
 	       ts->base + TP_CTRL1);
 
+	/*
+	 * The thermal core does not register hwmon devices for DT-based
+	 * thermal zone sensors, such as this one.
+	 */
 	hwmon = devm_hwmon_device_register_with_groups(ts->dev, "sun4i_ts",
 						       ts, sun4i_ts_groups);
 	if (IS_ERR(hwmon))
 		return PTR_ERR(hwmon);
 
+	ts->tz = thermal_zone_of_sensor_register(ts->dev, 0, ts,
+						 &sun4i_ts_tz_ops);
+	if (IS_ERR(ts->tz))
+		ts->tz = NULL;
+
 	writel(TEMP_IRQ_EN(1), ts->base + TP_INT_FIFOC);
 
 	if (ts_attached) {
 		error = input_register_device(ts->input);
 		if (error) {
 			writel(0, ts->base + TP_INT_FIFOC);
+			thermal_zone_of_sensor_unregister(ts->dev, ts->tz);
 			return error;
 		}
 	}
@@ -310,6 +354,8 @@ static int sun4i_ts_remove(struct platform_device *pdev)
 	if (ts->input)
 		input_unregister_device(ts->input);
 
+	thermal_zone_of_sensor_unregister(ts->dev, ts->tz);
+
 	/* Deactivate all IRQs */
 	writel(0, ts->base + TP_INT_FIFOC);
 
-- 
2.1.4

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

* [PATCH v3 2/9] ARM: dts: sunxi: Add dtsi for AXP209 PMIC
  2015-01-12  4:34 ` Chen-Yu Tsai
@ 2015-01-12  4:34   ` Chen-Yu Tsai
  -1 siblings, 0 replies; 36+ messages in thread
From: Chen-Yu Tsai @ 2015-01-12  4:34 UTC (permalink / raw)
  To: Maxime Ripard, Dmitry Torokhov, Zhang Rui, Eduardo Valentin
  Cc: Chen-Yu Tsai, Hans de Goede, linux-input, linux-arm-kernel, linux-pm

The AXP209 PMIC is used with some Allwinner SoCs. This patch adds
a dtsi file listing all the regulator nodes. The regulators are
initialized based on their device node names.

Signed-off-by: Chen-Yu Tsai <wens@csie.org>
---

changes since v2:

    none

changes since v1:

    - Moved interrupt controller properties to this patch
    - Added default names for all the regulators
    - Removed needless comment above regulators section

---
 arch/arm/boot/dts/axp209.dtsi | 97 +++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 97 insertions(+)
 create mode 100644 arch/arm/boot/dts/axp209.dtsi

diff --git a/arch/arm/boot/dts/axp209.dtsi b/arch/arm/boot/dts/axp209.dtsi
new file mode 100644
index 000000000000..c20cf537f5a5
--- /dev/null
+++ b/arch/arm/boot/dts/axp209.dtsi
@@ -0,0 +1,97 @@
+/*
+ * Copyright 2015 Chen-Yu Tsai
+ *
+ * Chen-Yu Tsai <wens@csie.org>
+ *
+ * This file is dual-licensed: you can use it either under the terms
+ * of the GPL or the X11 license, at your option. Note that this dual
+ * licensing only applies to this file, and not this project as a
+ * whole.
+ *
+ *  a) This file is free software; you can redistribute it and/or
+ *     modify it under the terms of the GNU General Public License as
+ *     published by the Free Software Foundation; either version 2 of the
+ *     License, or (at your option) any later version.
+ *
+ *     This file is distributed in the hope that it will be useful,
+ *     but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *     GNU General Public License for more details.
+ *
+ *     You should have received a copy of the GNU General Public
+ *     License along with this file; if not, write to the Free
+ *     Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
+ *     MA 02110-1301 USA
+ *
+ * Or, alternatively,
+ *
+ *  b) Permission is hereby granted, free of charge, to any person
+ *     obtaining a copy of this software and associated documentation
+ *     files (the "Software"), to deal in the Software without
+ *     restriction, including without limitation the rights to use,
+ *     copy, modify, merge, publish, distribute, sublicense, and/or
+ *     sell copies of the Software, and to permit persons to whom the
+ *     Software is furnished to do so, subject to the following
+ *     conditions:
+ *
+ *     The above copyright notice and this permission notice shall be
+ *     included in all copies or substantial portions of the Software.
+ *
+ *     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ *     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+ *     OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ *     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+ *     HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+ *     WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ *     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ *     OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+/*
+ * AXP202/209 Integrated Power Management Chip
+ * http://www.x-powers.com/product/AXP20X.php
+ * http://dl.linux-sunxi.org/AXP/AXP209%20Datasheet%20v1.0_cn.pdf
+ */
+
+&axp209 {
+	compatible = "x-powers,axp209";
+	interrupt-controller;
+	#interrupt-cells = <1>;
+
+	regulators {
+		/* Default work frequency for buck regulators */
+		x-powers,dcdc-freq = <1500>;
+
+		reg_dcdc2: dcdc2 {
+			regulator-name = "dcdc2";
+		};
+
+		reg_dcdc3: dcdc3 {
+			regulator-name = "dcdc3";
+		};
+
+		reg_ldo1: ldo1 {
+			/* LDO1 is a fixed output regulator */
+			regulator-always-on;
+			regulator-min-microvolt = <1300000>;
+			regulator-max-microvolt = <1300000>;
+			regulator-name = "ldo1";
+		};
+
+		reg_ldo2: ldo2 {
+			regulator-name = "ldo2";
+		};
+
+		reg_ldo3: ldo3 {
+			regulator-name = "ldo3";
+		};
+
+		reg_ldo4: ldo4 {
+			regulator-name = "ldo4";
+		};
+
+		reg_ldo5: ldo5 {
+			regulator-name = "ldo5";
+		};
+	};
+};
-- 
2.1.4


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

* [PATCH v3 2/9] ARM: dts: sunxi: Add dtsi for AXP209 PMIC
@ 2015-01-12  4:34   ` Chen-Yu Tsai
  0 siblings, 0 replies; 36+ messages in thread
From: Chen-Yu Tsai @ 2015-01-12  4:34 UTC (permalink / raw)
  To: linux-arm-kernel

The AXP209 PMIC is used with some Allwinner SoCs. This patch adds
a dtsi file listing all the regulator nodes. The regulators are
initialized based on their device node names.

Signed-off-by: Chen-Yu Tsai <wens@csie.org>
---

changes since v2:

    none

changes since v1:

    - Moved interrupt controller properties to this patch
    - Added default names for all the regulators
    - Removed needless comment above regulators section

---
 arch/arm/boot/dts/axp209.dtsi | 97 +++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 97 insertions(+)
 create mode 100644 arch/arm/boot/dts/axp209.dtsi

diff --git a/arch/arm/boot/dts/axp209.dtsi b/arch/arm/boot/dts/axp209.dtsi
new file mode 100644
index 000000000000..c20cf537f5a5
--- /dev/null
+++ b/arch/arm/boot/dts/axp209.dtsi
@@ -0,0 +1,97 @@
+/*
+ * Copyright 2015 Chen-Yu Tsai
+ *
+ * Chen-Yu Tsai <wens@csie.org>
+ *
+ * This file is dual-licensed: you can use it either under the terms
+ * of the GPL or the X11 license, at your option. Note that this dual
+ * licensing only applies to this file, and not this project as a
+ * whole.
+ *
+ *  a) This file is free software; you can redistribute it and/or
+ *     modify it under the terms of the GNU General Public License as
+ *     published by the Free Software Foundation; either version 2 of the
+ *     License, or (at your option) any later version.
+ *
+ *     This file is distributed in the hope that it will be useful,
+ *     but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *     GNU General Public License for more details.
+ *
+ *     You should have received a copy of the GNU General Public
+ *     License along with this file; if not, write to the Free
+ *     Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
+ *     MA 02110-1301 USA
+ *
+ * Or, alternatively,
+ *
+ *  b) Permission is hereby granted, free of charge, to any person
+ *     obtaining a copy of this software and associated documentation
+ *     files (the "Software"), to deal in the Software without
+ *     restriction, including without limitation the rights to use,
+ *     copy, modify, merge, publish, distribute, sublicense, and/or
+ *     sell copies of the Software, and to permit persons to whom the
+ *     Software is furnished to do so, subject to the following
+ *     conditions:
+ *
+ *     The above copyright notice and this permission notice shall be
+ *     included in all copies or substantial portions of the Software.
+ *
+ *     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ *     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+ *     OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ *     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+ *     HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+ *     WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ *     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ *     OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+/*
+ * AXP202/209 Integrated Power Management Chip
+ * http://www.x-powers.com/product/AXP20X.php
+ * http://dl.linux-sunxi.org/AXP/AXP209%20Datasheet%20v1.0_cn.pdf
+ */
+
+&axp209 {
+	compatible = "x-powers,axp209";
+	interrupt-controller;
+	#interrupt-cells = <1>;
+
+	regulators {
+		/* Default work frequency for buck regulators */
+		x-powers,dcdc-freq = <1500>;
+
+		reg_dcdc2: dcdc2 {
+			regulator-name = "dcdc2";
+		};
+
+		reg_dcdc3: dcdc3 {
+			regulator-name = "dcdc3";
+		};
+
+		reg_ldo1: ldo1 {
+			/* LDO1 is a fixed output regulator */
+			regulator-always-on;
+			regulator-min-microvolt = <1300000>;
+			regulator-max-microvolt = <1300000>;
+			regulator-name = "ldo1";
+		};
+
+		reg_ldo2: ldo2 {
+			regulator-name = "ldo2";
+		};
+
+		reg_ldo3: ldo3 {
+			regulator-name = "ldo3";
+		};
+
+		reg_ldo4: ldo4 {
+			regulator-name = "ldo4";
+		};
+
+		reg_ldo5: ldo5 {
+			regulator-name = "ldo5";
+		};
+	};
+};
-- 
2.1.4

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

* [PATCH v3 3/9] ARM: dts: sun7i: Add cpu thermal zones to dtsi
  2015-01-12  4:34 ` Chen-Yu Tsai
@ 2015-01-12  4:34   ` Chen-Yu Tsai
  -1 siblings, 0 replies; 36+ messages in thread
From: Chen-Yu Tsai @ 2015-01-12  4:34 UTC (permalink / raw)
  To: Maxime Ripard, Dmitry Torokhov, Zhang Rui, Eduardo Valentin
  Cc: Chen-Yu Tsai, Hans de Goede, linux-input, linux-arm-kernel, linux-pm

The core temperature sensor now supports thermal zones. Add a thermal
zone mapping for the cpus with passive cooling (cpufreq throttling).

Signed-off-by: Chen-Yu Tsai <wens@csie.org>
Acked-by: Eduardo Valentin <edubezval@gmail.com>
---

changes since v2:

    - Added Acked-by from Eduardo

changes since v1:

    - Use thermal dt bindings macros in cooling-device

---
 arch/arm/boot/dts/sun7i-a20.dtsi | 33 +++++++++++++++++++++++++++++++++
 1 file changed, 33 insertions(+)

diff --git a/arch/arm/boot/dts/sun7i-a20.dtsi b/arch/arm/boot/dts/sun7i-a20.dtsi
index c2e964939991..61780b144745 100644
--- a/arch/arm/boot/dts/sun7i-a20.dtsi
+++ b/arch/arm/boot/dts/sun7i-a20.dtsi
@@ -50,6 +50,7 @@
 #include "skeleton.dtsi"
 
 #include <dt-bindings/interrupt-controller/arm-gic.h>
+#include <dt-bindings/thermal/thermal.h>
 
 #include <dt-bindings/dma/sun4i-a10.h>
 #include <dt-bindings/pinctrl/sun4i-a10.h>
@@ -116,6 +117,38 @@
 		};
 	};
 
+	thermal-zones {
+		cpu_thermal {
+			/* milliseconds */
+			polling-delay-passive = <250>;
+			polling-delay = <1000>;
+			thermal-sensors = <&rtp>;
+
+			cooling-maps {
+				map0 {
+					trip = <&cpu_alert0>;
+					cooling-device = <&cpu0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
+				};
+			};
+
+			trips {
+				cpu_alert0: cpu_alert0 {
+					/* milliCelsius */
+					temperature = <75000>;
+					hysteresis = <2000>;
+					type = "passive";
+				};
+
+				cpu_crit: cpu_crit {
+					/* milliCelsius */
+					temperature = <100000>;
+					hysteresis = <2000>;
+					type = "critical";
+				};
+			};
+		};
+	};
+
 	memory {
 		reg = <0x40000000 0x80000000>;
 	};
-- 
2.1.4


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

* [PATCH v3 3/9] ARM: dts: sun7i: Add cpu thermal zones to dtsi
@ 2015-01-12  4:34   ` Chen-Yu Tsai
  0 siblings, 0 replies; 36+ messages in thread
From: Chen-Yu Tsai @ 2015-01-12  4:34 UTC (permalink / raw)
  To: linux-arm-kernel

The core temperature sensor now supports thermal zones. Add a thermal
zone mapping for the cpus with passive cooling (cpufreq throttling).

Signed-off-by: Chen-Yu Tsai <wens@csie.org>
Acked-by: Eduardo Valentin <edubezval@gmail.com>
---

changes since v2:

    - Added Acked-by from Eduardo

changes since v1:

    - Use thermal dt bindings macros in cooling-device

---
 arch/arm/boot/dts/sun7i-a20.dtsi | 33 +++++++++++++++++++++++++++++++++
 1 file changed, 33 insertions(+)

diff --git a/arch/arm/boot/dts/sun7i-a20.dtsi b/arch/arm/boot/dts/sun7i-a20.dtsi
index c2e964939991..61780b144745 100644
--- a/arch/arm/boot/dts/sun7i-a20.dtsi
+++ b/arch/arm/boot/dts/sun7i-a20.dtsi
@@ -50,6 +50,7 @@
 #include "skeleton.dtsi"
 
 #include <dt-bindings/interrupt-controller/arm-gic.h>
+#include <dt-bindings/thermal/thermal.h>
 
 #include <dt-bindings/dma/sun4i-a10.h>
 #include <dt-bindings/pinctrl/sun4i-a10.h>
@@ -116,6 +117,38 @@
 		};
 	};
 
+	thermal-zones {
+		cpu_thermal {
+			/* milliseconds */
+			polling-delay-passive = <250>;
+			polling-delay = <1000>;
+			thermal-sensors = <&rtp>;
+
+			cooling-maps {
+				map0 {
+					trip = <&cpu_alert0>;
+					cooling-device = <&cpu0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
+				};
+			};
+
+			trips {
+				cpu_alert0: cpu_alert0 {
+					/* milliCelsius */
+					temperature = <75000>;
+					hysteresis = <2000>;
+					type = "passive";
+				};
+
+				cpu_crit: cpu_crit {
+					/* milliCelsius */
+					temperature = <100000>;
+					hysteresis = <2000>;
+					type = "critical";
+				};
+			};
+		};
+	};
+
 	memory {
 		reg = <0x40000000 0x80000000>;
 	};
-- 
2.1.4

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

* [PATCH v3 4/9] ARM: dts: sun7i: cubieboard2: add axp209 regulator nodes
  2015-01-12  4:34 ` Chen-Yu Tsai
@ 2015-01-12  4:34   ` Chen-Yu Tsai
  -1 siblings, 0 replies; 36+ messages in thread
From: Chen-Yu Tsai @ 2015-01-12  4:34 UTC (permalink / raw)
  To: Maxime Ripard, Dmitry Torokhov, Zhang Rui, Eduardo Valentin
  Cc: Chen-Yu Tsai, Hans de Goede, linux-input, linux-arm-kernel, linux-pm

This patch adds the regulator nodes for the axp209 by including
the axp209 dtsi. As the inputs of these regulators are from the
axp209's PS output, which is basically just a mux over the 2
inputs, it is considered to be unregulated. Thus we do not provide
input supply properties for them.

The regulator names and constraints are based on the board
schematics and the SoC datasheet.

DCDC2 is used as the cpu power supply. This patch also references
it from the cpu node.

Also get rid of axp209 properties already set in axp209.dtsi.

Signed-off-by: Chen-Yu Tsai <wens@csie.org>
---

changes since v2

    none

changes since v1:

    - Use preprocessor include for axp209.dtsi
    - Remove incorrectly squashed axp209.dtsi patch

---
 arch/arm/boot/dts/sun7i-a20-cubieboard2.dts | 35 +++++++++++++++++++++++++----
 1 file changed, 31 insertions(+), 4 deletions(-)

diff --git a/arch/arm/boot/dts/sun7i-a20-cubieboard2.dts b/arch/arm/boot/dts/sun7i-a20-cubieboard2.dts
index 18fc5db9c976..ec1fc2c8b3e3 100644
--- a/arch/arm/boot/dts/sun7i-a20-cubieboard2.dts
+++ b/arch/arm/boot/dts/sun7i-a20-cubieboard2.dts
@@ -88,13 +88,9 @@
 			status = "okay";
 
 			axp209: pmic@34 {
-				compatible = "x-powers,axp209";
 				reg = <0x34>;
 				interrupt-parent = <&nmi_intc>;
 				interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
-
-				interrupt-controller;
-				#interrupt-cells = <1>;
 			};
 		};
 
@@ -145,3 +141,34 @@
 		status = "okay";
 	};
 };
+
+#include "axp209.dtsi"
+
+&cpu0 {
+	cpu-supply = <&reg_dcdc2>;
+};
+
+&reg_dcdc2 {
+	regulator-always-on;
+	regulator-min-microvolt = <1000000>;
+	regulator-max-microvolt = <1450000>;
+	regulator-name = "vdd-cpu";
+};
+
+&reg_dcdc3 {
+	regulator-always-on;
+	regulator-min-microvolt = <1000000>;
+	regulator-max-microvolt = <1400000>;
+	regulator-name = "vdd-int-dll";
+};
+
+&reg_ldo1 {
+	regulator-name = "vdd-rtc";
+};
+
+&reg_ldo2 {
+	regulator-always-on;
+	regulator-min-microvolt = <3000000>;
+	regulator-max-microvolt = <3000000>;
+	regulator-name = "avcc";
+};
-- 
2.1.4


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

* [PATCH v3 4/9] ARM: dts: sun7i: cubieboard2: add axp209 regulator nodes
@ 2015-01-12  4:34   ` Chen-Yu Tsai
  0 siblings, 0 replies; 36+ messages in thread
From: Chen-Yu Tsai @ 2015-01-12  4:34 UTC (permalink / raw)
  To: linux-arm-kernel

This patch adds the regulator nodes for the axp209 by including
the axp209 dtsi. As the inputs of these regulators are from the
axp209's PS output, which is basically just a mux over the 2
inputs, it is considered to be unregulated. Thus we do not provide
input supply properties for them.

The regulator names and constraints are based on the board
schematics and the SoC datasheet.

DCDC2 is used as the cpu power supply. This patch also references
it from the cpu node.

Also get rid of axp209 properties already set in axp209.dtsi.

Signed-off-by: Chen-Yu Tsai <wens@csie.org>
---

changes since v2

    none

changes since v1:

    - Use preprocessor include for axp209.dtsi
    - Remove incorrectly squashed axp209.dtsi patch

---
 arch/arm/boot/dts/sun7i-a20-cubieboard2.dts | 35 +++++++++++++++++++++++++----
 1 file changed, 31 insertions(+), 4 deletions(-)

diff --git a/arch/arm/boot/dts/sun7i-a20-cubieboard2.dts b/arch/arm/boot/dts/sun7i-a20-cubieboard2.dts
index 18fc5db9c976..ec1fc2c8b3e3 100644
--- a/arch/arm/boot/dts/sun7i-a20-cubieboard2.dts
+++ b/arch/arm/boot/dts/sun7i-a20-cubieboard2.dts
@@ -88,13 +88,9 @@
 			status = "okay";
 
 			axp209: pmic at 34 {
-				compatible = "x-powers,axp209";
 				reg = <0x34>;
 				interrupt-parent = <&nmi_intc>;
 				interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
-
-				interrupt-controller;
-				#interrupt-cells = <1>;
 			};
 		};
 
@@ -145,3 +141,34 @@
 		status = "okay";
 	};
 };
+
+#include "axp209.dtsi"
+
+&cpu0 {
+	cpu-supply = <&reg_dcdc2>;
+};
+
+&reg_dcdc2 {
+	regulator-always-on;
+	regulator-min-microvolt = <1000000>;
+	regulator-max-microvolt = <1450000>;
+	regulator-name = "vdd-cpu";
+};
+
+&reg_dcdc3 {
+	regulator-always-on;
+	regulator-min-microvolt = <1000000>;
+	regulator-max-microvolt = <1400000>;
+	regulator-name = "vdd-int-dll";
+};
+
+&reg_ldo1 {
+	regulator-name = "vdd-rtc";
+};
+
+&reg_ldo2 {
+	regulator-always-on;
+	regulator-min-microvolt = <3000000>;
+	regulator-max-microvolt = <3000000>;
+	regulator-name = "avcc";
+};
-- 
2.1.4

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

* [PATCH v3 5/9] ARM: dts: sun7i: cubietruck: add axp209 regulator nodes
  2015-01-12  4:34 ` Chen-Yu Tsai
@ 2015-01-12  4:34   ` Chen-Yu Tsai
  -1 siblings, 0 replies; 36+ messages in thread
From: Chen-Yu Tsai @ 2015-01-12  4:34 UTC (permalink / raw)
  To: Maxime Ripard, Dmitry Torokhov, Zhang Rui, Eduardo Valentin
  Cc: Chen-Yu Tsai, Hans de Goede, linux-input, linux-arm-kernel, linux-pm

This patch adds the regulator nodes for the axp209 by including
the axp209 dtsi. As the inputs of these regulators are from the
axp209's PS output, which is basically just a mux over the 2
inputs, it is considered to be unregulated. Thus we do not provide
input supply properties for them.

The regulator names and constraints are based on the board
schematics and the SoC datasheet.

DCDC2 is used as the cpu power supply. This patch also references
it from the cpu node.

Also get rid of axp209 properties already set in axp209.dtsi.

Signed-off-by: Chen-Yu Tsai <wens@csie.org>
---

changes since v2:

    none

changes since v1:

    - Use preprocessor include for axp209.dtsi

---
 arch/arm/boot/dts/sun7i-a20-cubietruck.dts | 35 ++++++++++++++++++++++++++----
 1 file changed, 31 insertions(+), 4 deletions(-)

diff --git a/arch/arm/boot/dts/sun7i-a20-cubietruck.dts b/arch/arm/boot/dts/sun7i-a20-cubietruck.dts
index 77bc7e79cab9..5f817b65ceea 100644
--- a/arch/arm/boot/dts/sun7i-a20-cubietruck.dts
+++ b/arch/arm/boot/dts/sun7i-a20-cubietruck.dts
@@ -130,13 +130,9 @@
 			status = "okay";
 
 			axp209: pmic@34 {
-				compatible = "x-powers,axp209";
 				reg = <0x34>;
 				interrupt-parent = <&nmi_intc>;
 				interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
-
-				interrupt-controller;
-				#interrupt-cells = <1>;
 			};
 		};
 
@@ -222,3 +218,34 @@
 		gpio = <&pio 7 9 GPIO_ACTIVE_HIGH>;
 	};
 };
+
+#include "axp209.dtsi"
+
+&cpu0 {
+	cpu-supply = <&reg_dcdc2>;
+};
+
+&reg_dcdc2 {
+	regulator-always-on;
+	regulator-min-microvolt = <1000000>;
+	regulator-max-microvolt = <1450000>;
+	regulator-name = "vdd-cpu";
+};
+
+&reg_dcdc3 {
+	regulator-always-on;
+	regulator-min-microvolt = <1000000>;
+	regulator-max-microvolt = <1400000>;
+	regulator-name = "vdd-int-dll";
+};
+
+&reg_ldo1 {
+	regulator-name = "vdd-rtc";
+};
+
+&reg_ldo2 {
+	regulator-always-on;
+	regulator-min-microvolt = <3000000>;
+	regulator-max-microvolt = <3000000>;
+	regulator-name = "avcc";
+};
-- 
2.1.4


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

* [PATCH v3 5/9] ARM: dts: sun7i: cubietruck: add axp209 regulator nodes
@ 2015-01-12  4:34   ` Chen-Yu Tsai
  0 siblings, 0 replies; 36+ messages in thread
From: Chen-Yu Tsai @ 2015-01-12  4:34 UTC (permalink / raw)
  To: linux-arm-kernel

This patch adds the regulator nodes for the axp209 by including
the axp209 dtsi. As the inputs of these regulators are from the
axp209's PS output, which is basically just a mux over the 2
inputs, it is considered to be unregulated. Thus we do not provide
input supply properties for them.

The regulator names and constraints are based on the board
schematics and the SoC datasheet.

DCDC2 is used as the cpu power supply. This patch also references
it from the cpu node.

Also get rid of axp209 properties already set in axp209.dtsi.

Signed-off-by: Chen-Yu Tsai <wens@csie.org>
---

changes since v2:

    none

changes since v1:

    - Use preprocessor include for axp209.dtsi

---
 arch/arm/boot/dts/sun7i-a20-cubietruck.dts | 35 ++++++++++++++++++++++++++----
 1 file changed, 31 insertions(+), 4 deletions(-)

diff --git a/arch/arm/boot/dts/sun7i-a20-cubietruck.dts b/arch/arm/boot/dts/sun7i-a20-cubietruck.dts
index 77bc7e79cab9..5f817b65ceea 100644
--- a/arch/arm/boot/dts/sun7i-a20-cubietruck.dts
+++ b/arch/arm/boot/dts/sun7i-a20-cubietruck.dts
@@ -130,13 +130,9 @@
 			status = "okay";
 
 			axp209: pmic at 34 {
-				compatible = "x-powers,axp209";
 				reg = <0x34>;
 				interrupt-parent = <&nmi_intc>;
 				interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
-
-				interrupt-controller;
-				#interrupt-cells = <1>;
 			};
 		};
 
@@ -222,3 +218,34 @@
 		gpio = <&pio 7 9 GPIO_ACTIVE_HIGH>;
 	};
 };
+
+#include "axp209.dtsi"
+
+&cpu0 {
+	cpu-supply = <&reg_dcdc2>;
+};
+
+&reg_dcdc2 {
+	regulator-always-on;
+	regulator-min-microvolt = <1000000>;
+	regulator-max-microvolt = <1450000>;
+	regulator-name = "vdd-cpu";
+};
+
+&reg_dcdc3 {
+	regulator-always-on;
+	regulator-min-microvolt = <1000000>;
+	regulator-max-microvolt = <1400000>;
+	regulator-name = "vdd-int-dll";
+};
+
+&reg_ldo1 {
+	regulator-name = "vdd-rtc";
+};
+
+&reg_ldo2 {
+	regulator-always-on;
+	regulator-min-microvolt = <3000000>;
+	regulator-max-microvolt = <3000000>;
+	regulator-name = "avcc";
+};
-- 
2.1.4

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

* [PATCH v3 6/9] ARM: dts: sun5i: Add cpu thermal zones to dtsi
  2015-01-12  4:34 ` Chen-Yu Tsai
@ 2015-01-12  4:34   ` Chen-Yu Tsai
  -1 siblings, 0 replies; 36+ messages in thread
From: Chen-Yu Tsai @ 2015-01-12  4:34 UTC (permalink / raw)
  To: Maxime Ripard, Dmitry Torokhov, Zhang Rui, Eduardo Valentin
  Cc: Chen-Yu Tsai, Hans de Goede, linux-input, linux-arm-kernel, linux-pm

The core temperature sensor now supports thermal zones. Add a thermal
zone mapping for the cpus with passive cooling (cpufreq throttling).

Signed-off-by: Chen-Yu Tsai <wens@csie.org>
Acked-by: Eduardo Valentin <edubezval@gmail.com>
---

changes since v2:

    - Added Acked-by from Eduardo

changes since v1:

    - Use thermal dt bindings macros in cooling-device

---
 arch/arm/boot/dts/sun5i-a13.dtsi | 34 ++++++++++++++++++++++++++++++++++
 1 file changed, 34 insertions(+)

diff --git a/arch/arm/boot/dts/sun5i-a13.dtsi b/arch/arm/boot/dts/sun5i-a13.dtsi
index dee2aa5bc9ed..c26f58ea0850 100644
--- a/arch/arm/boot/dts/sun5i-a13.dtsi
+++ b/arch/arm/boot/dts/sun5i-a13.dtsi
@@ -13,6 +13,8 @@
 
 #include "skeleton.dtsi"
 
+#include <dt-bindings/thermal/thermal.h>
+
 #include <dt-bindings/dma/sun4i-a10.h>
 #include <dt-bindings/pinctrl/sun4i-a10.h>
 
@@ -50,6 +52,38 @@
 		};
 	};
 
+	thermal-zones {
+		cpu_thermal {
+			/* milliseconds */
+			polling-delay-passive = <250>;
+			polling-delay = <1000>;
+			thermal-sensors = <&rtp>;
+
+			cooling-maps {
+				map0 {
+					trip = <&cpu_alert0>;
+					cooling-device = <&cpu0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
+				};
+			};
+
+			trips {
+				cpu_alert0: cpu_alert0 {
+					/* milliCelsius */
+					temperature = <850000>;
+					hysteresis = <2000>;
+					type = "passive";
+				};
+
+				cpu_crit: cpu_crit {
+					/* milliCelsius */
+					temperature = <100000>;
+					hysteresis = <2000>;
+					type = "critical";
+				};
+			};
+		};
+	};
+
 	memory {
 		reg = <0x40000000 0x20000000>;
 	};
-- 
2.1.4


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

* [PATCH v3 6/9] ARM: dts: sun5i: Add cpu thermal zones to dtsi
@ 2015-01-12  4:34   ` Chen-Yu Tsai
  0 siblings, 0 replies; 36+ messages in thread
From: Chen-Yu Tsai @ 2015-01-12  4:34 UTC (permalink / raw)
  To: linux-arm-kernel

The core temperature sensor now supports thermal zones. Add a thermal
zone mapping for the cpus with passive cooling (cpufreq throttling).

Signed-off-by: Chen-Yu Tsai <wens@csie.org>
Acked-by: Eduardo Valentin <edubezval@gmail.com>
---

changes since v2:

    - Added Acked-by from Eduardo

changes since v1:

    - Use thermal dt bindings macros in cooling-device

---
 arch/arm/boot/dts/sun5i-a13.dtsi | 34 ++++++++++++++++++++++++++++++++++
 1 file changed, 34 insertions(+)

diff --git a/arch/arm/boot/dts/sun5i-a13.dtsi b/arch/arm/boot/dts/sun5i-a13.dtsi
index dee2aa5bc9ed..c26f58ea0850 100644
--- a/arch/arm/boot/dts/sun5i-a13.dtsi
+++ b/arch/arm/boot/dts/sun5i-a13.dtsi
@@ -13,6 +13,8 @@
 
 #include "skeleton.dtsi"
 
+#include <dt-bindings/thermal/thermal.h>
+
 #include <dt-bindings/dma/sun4i-a10.h>
 #include <dt-bindings/pinctrl/sun4i-a10.h>
 
@@ -50,6 +52,38 @@
 		};
 	};
 
+	thermal-zones {
+		cpu_thermal {
+			/* milliseconds */
+			polling-delay-passive = <250>;
+			polling-delay = <1000>;
+			thermal-sensors = <&rtp>;
+
+			cooling-maps {
+				map0 {
+					trip = <&cpu_alert0>;
+					cooling-device = <&cpu0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
+				};
+			};
+
+			trips {
+				cpu_alert0: cpu_alert0 {
+					/* milliCelsius */
+					temperature = <850000>;
+					hysteresis = <2000>;
+					type = "passive";
+				};
+
+				cpu_crit: cpu_crit {
+					/* milliCelsius */
+					temperature = <100000>;
+					hysteresis = <2000>;
+					type = "critical";
+				};
+			};
+		};
+	};
+
 	memory {
 		reg = <0x40000000 0x20000000>;
 	};
-- 
2.1.4

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

* [PATCH v3 7/9] ARM: dts: sun5i: hsg-h702: add axp209 regulator nodes
  2015-01-12  4:34 ` Chen-Yu Tsai
@ 2015-01-12  4:34   ` Chen-Yu Tsai
  -1 siblings, 0 replies; 36+ messages in thread
From: Chen-Yu Tsai @ 2015-01-12  4:34 UTC (permalink / raw)
  To: Maxime Ripard, Dmitry Torokhov, Zhang Rui, Eduardo Valentin
  Cc: Chen-Yu Tsai, Hans de Goede, linux-input, linux-arm-kernel, linux-pm

This patch adds the regulator nodes for the axp209 by including
the axp209 dtsi. As the inputs of these regulators are from the
axp209's PS output, which is basically just a mux over the 2
inputs, it is considered to be unregulated. Thus we do not provide
input supply properties for them.

The regulator names and constraints are based on the board
schematics and the SoC datasheet.

DCDC2 is used as the cpu power supply. This patch also references
it from the cpu node.

LDO3 powers the USB WiFi module. This patch also references it
from the usb-phy node.

Also get rid of axp209 properties already set in axp209.dtsi.

Signed-off-by: Chen-Yu Tsai <wens@csie.org>
---

changes since v2:

    none

changes since v1:

    - Use preprocessor include for axp209.dtsi

---
 arch/arm/boot/dts/sun5i-a13-hsg-h702.dts | 46 ++++++++++++++++++++++++++------
 1 file changed, 38 insertions(+), 8 deletions(-)

diff --git a/arch/arm/boot/dts/sun5i-a13-hsg-h702.dts b/arch/arm/boot/dts/sun5i-a13-hsg-h702.dts
index 99a5968720b4..82637db1c55a 100644
--- a/arch/arm/boot/dts/sun5i-a13-hsg-h702.dts
+++ b/arch/arm/boot/dts/sun5i-a13-hsg-h702.dts
@@ -68,11 +68,7 @@
 		};
 
 		usbphy: phy@01c13400 {
-			/*
-			 * There doesn't seem to be a GPIO for controlling
-			 * usb1 vbus, despite the fex file saying otherwise.
-			 */
-			usb1_vbus-supply = <&reg_vcc5v0>;
+			usb1_vbus-supply = <&reg_ldo3>;
 			status = "okay";
 		};
 
@@ -105,11 +101,8 @@
 			status = "okay";
 
 			axp209: pmic@34 {
-				compatible = "x-powers,axp209";
 				reg = <0x34>;
 				interrupts = <0>;
-				interrupt-controller;
-				#interrupt-cells = <1>;
 			};
 		};
 
@@ -131,3 +124,40 @@
 		};
 	};
 };
+
+#include "axp209.dtsi"
+
+&cpu0 {
+	cpu-supply = <&reg_dcdc2>;
+};
+
+&reg_dcdc2 {
+	regulator-always-on;
+	regulator-min-microvolt = <1000000>;
+	regulator-max-microvolt = <1500000>;
+	regulator-name = "vdd-cpu";
+};
+
+&reg_dcdc3 {
+	regulator-always-on;
+	regulator-min-microvolt = <1000000>;
+	regulator-max-microvolt = <1400000>;
+	regulator-name = "vdd-int-dll";
+};
+
+&reg_ldo1 {
+	regulator-name = "vdd-rtc";
+};
+
+&reg_ldo2 {
+	regulator-always-on;
+	regulator-min-microvolt = <3000000>;
+	regulator-max-microvolt = <3000000>;
+	regulator-name = "avcc";
+};
+
+&reg_ldo3 {
+	regulator-min-microvolt = <3300000>;
+	regulator-max-microvolt = <3300000>;
+	regulator-name = "vcc-wifi";
+};
-- 
2.1.4


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

* [PATCH v3 7/9] ARM: dts: sun5i: hsg-h702: add axp209 regulator nodes
@ 2015-01-12  4:34   ` Chen-Yu Tsai
  0 siblings, 0 replies; 36+ messages in thread
From: Chen-Yu Tsai @ 2015-01-12  4:34 UTC (permalink / raw)
  To: linux-arm-kernel

This patch adds the regulator nodes for the axp209 by including
the axp209 dtsi. As the inputs of these regulators are from the
axp209's PS output, which is basically just a mux over the 2
inputs, it is considered to be unregulated. Thus we do not provide
input supply properties for them.

The regulator names and constraints are based on the board
schematics and the SoC datasheet.

DCDC2 is used as the cpu power supply. This patch also references
it from the cpu node.

LDO3 powers the USB WiFi module. This patch also references it
from the usb-phy node.

Also get rid of axp209 properties already set in axp209.dtsi.

Signed-off-by: Chen-Yu Tsai <wens@csie.org>
---

changes since v2:

    none

changes since v1:

    - Use preprocessor include for axp209.dtsi

---
 arch/arm/boot/dts/sun5i-a13-hsg-h702.dts | 46 ++++++++++++++++++++++++++------
 1 file changed, 38 insertions(+), 8 deletions(-)

diff --git a/arch/arm/boot/dts/sun5i-a13-hsg-h702.dts b/arch/arm/boot/dts/sun5i-a13-hsg-h702.dts
index 99a5968720b4..82637db1c55a 100644
--- a/arch/arm/boot/dts/sun5i-a13-hsg-h702.dts
+++ b/arch/arm/boot/dts/sun5i-a13-hsg-h702.dts
@@ -68,11 +68,7 @@
 		};
 
 		usbphy: phy at 01c13400 {
-			/*
-			 * There doesn't seem to be a GPIO for controlling
-			 * usb1 vbus, despite the fex file saying otherwise.
-			 */
-			usb1_vbus-supply = <&reg_vcc5v0>;
+			usb1_vbus-supply = <&reg_ldo3>;
 			status = "okay";
 		};
 
@@ -105,11 +101,8 @@
 			status = "okay";
 
 			axp209: pmic at 34 {
-				compatible = "x-powers,axp209";
 				reg = <0x34>;
 				interrupts = <0>;
-				interrupt-controller;
-				#interrupt-cells = <1>;
 			};
 		};
 
@@ -131,3 +124,40 @@
 		};
 	};
 };
+
+#include "axp209.dtsi"
+
+&cpu0 {
+	cpu-supply = <&reg_dcdc2>;
+};
+
+&reg_dcdc2 {
+	regulator-always-on;
+	regulator-min-microvolt = <1000000>;
+	regulator-max-microvolt = <1500000>;
+	regulator-name = "vdd-cpu";
+};
+
+&reg_dcdc3 {
+	regulator-always-on;
+	regulator-min-microvolt = <1000000>;
+	regulator-max-microvolt = <1400000>;
+	regulator-name = "vdd-int-dll";
+};
+
+&reg_ldo1 {
+	regulator-name = "vdd-rtc";
+};
+
+&reg_ldo2 {
+	regulator-always-on;
+	regulator-min-microvolt = <3000000>;
+	regulator-max-microvolt = <3000000>;
+	regulator-name = "avcc";
+};
+
+&reg_ldo3 {
+	regulator-min-microvolt = <3300000>;
+	regulator-max-microvolt = <3300000>;
+	regulator-name = "vcc-wifi";
+};
-- 
2.1.4

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

* [PATCH v3 8/9] ARM: dts: sun4i: Add cpu thermal zones to dtsi
  2015-01-12  4:34 ` Chen-Yu Tsai
@ 2015-01-12  4:34   ` Chen-Yu Tsai
  -1 siblings, 0 replies; 36+ messages in thread
From: Chen-Yu Tsai @ 2015-01-12  4:34 UTC (permalink / raw)
  To: Maxime Ripard, Dmitry Torokhov, Zhang Rui, Eduardo Valentin
  Cc: Chen-Yu Tsai, Hans de Goede, linux-input, linux-arm-kernel, linux-pm

The core temperature sensor now supports thermal zones. Add a thermal
zone mapping for the cpus with passive cooling (cpufreq throttling).

Signed-off-by: Chen-Yu Tsai <wens@csie.org>
---

changes since v2:

    none

changes since v1:

    - Use thermal dt bindings macros in cooling-device

---
 arch/arm/boot/dts/sun4i-a10.dtsi | 34 ++++++++++++++++++++++++++++++++++
 1 file changed, 34 insertions(+)

diff --git a/arch/arm/boot/dts/sun4i-a10.dtsi b/arch/arm/boot/dts/sun4i-a10.dtsi
index 7fb4e912f510..f0dc246dc69e 100644
--- a/arch/arm/boot/dts/sun4i-a10.dtsi
+++ b/arch/arm/boot/dts/sun4i-a10.dtsi
@@ -12,6 +12,8 @@
 
 #include "skeleton.dtsi"
 
+#include <dt-bindings/thermal/thermal.h>
+
 #include <dt-bindings/dma/sun4i-a10.h>
 #include <dt-bindings/pinctrl/sun4i-a10.h>
 
@@ -67,6 +69,38 @@
 		};
 	};
 
+	thermal-zones {
+		cpu_thermal {
+			/* milliseconds */
+			polling-delay-passive = <250>;
+			polling-delay = <1000>;
+			thermal-sensors = <&rtp>;
+
+			cooling-maps {
+				map0 {
+					trip = <&cpu_alert0>;
+					cooling-device = <&cpu0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
+				};
+			};
+
+			trips {
+				cpu_alert0: cpu_alert0 {
+					/* milliCelsius */
+					temperature = <850000>;
+					hysteresis = <2000>;
+					type = "passive";
+				};
+
+				cpu_crit: cpu_crit {
+					/* milliCelsius */
+					temperature = <100000>;
+					hysteresis = <2000>;
+					type = "critical";
+				};
+			};
+		};
+	};
+
 	memory {
 		reg = <0x40000000 0x80000000>;
 	};
-- 
2.1.4


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

* [PATCH v3 8/9] ARM: dts: sun4i: Add cpu thermal zones to dtsi
@ 2015-01-12  4:34   ` Chen-Yu Tsai
  0 siblings, 0 replies; 36+ messages in thread
From: Chen-Yu Tsai @ 2015-01-12  4:34 UTC (permalink / raw)
  To: linux-arm-kernel

The core temperature sensor now supports thermal zones. Add a thermal
zone mapping for the cpus with passive cooling (cpufreq throttling).

Signed-off-by: Chen-Yu Tsai <wens@csie.org>
---

changes since v2:

    none

changes since v1:

    - Use thermal dt bindings macros in cooling-device

---
 arch/arm/boot/dts/sun4i-a10.dtsi | 34 ++++++++++++++++++++++++++++++++++
 1 file changed, 34 insertions(+)

diff --git a/arch/arm/boot/dts/sun4i-a10.dtsi b/arch/arm/boot/dts/sun4i-a10.dtsi
index 7fb4e912f510..f0dc246dc69e 100644
--- a/arch/arm/boot/dts/sun4i-a10.dtsi
+++ b/arch/arm/boot/dts/sun4i-a10.dtsi
@@ -12,6 +12,8 @@
 
 #include "skeleton.dtsi"
 
+#include <dt-bindings/thermal/thermal.h>
+
 #include <dt-bindings/dma/sun4i-a10.h>
 #include <dt-bindings/pinctrl/sun4i-a10.h>
 
@@ -67,6 +69,38 @@
 		};
 	};
 
+	thermal-zones {
+		cpu_thermal {
+			/* milliseconds */
+			polling-delay-passive = <250>;
+			polling-delay = <1000>;
+			thermal-sensors = <&rtp>;
+
+			cooling-maps {
+				map0 {
+					trip = <&cpu_alert0>;
+					cooling-device = <&cpu0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
+				};
+			};
+
+			trips {
+				cpu_alert0: cpu_alert0 {
+					/* milliCelsius */
+					temperature = <850000>;
+					hysteresis = <2000>;
+					type = "passive";
+				};
+
+				cpu_crit: cpu_crit {
+					/* milliCelsius */
+					temperature = <100000>;
+					hysteresis = <2000>;
+					type = "critical";
+				};
+			};
+		};
+	};
+
 	memory {
 		reg = <0x40000000 0x80000000>;
 	};
-- 
2.1.4

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

* [PATCH v3 9/9] ARM: dts: sun4i: cubieboard: add axp209 regulator nodes
  2015-01-12  4:34 ` Chen-Yu Tsai
@ 2015-01-12  4:34   ` Chen-Yu Tsai
  -1 siblings, 0 replies; 36+ messages in thread
From: Chen-Yu Tsai @ 2015-01-12  4:34 UTC (permalink / raw)
  To: Maxime Ripard, Dmitry Torokhov, Zhang Rui, Eduardo Valentin
  Cc: Chen-Yu Tsai, Hans de Goede, linux-input, linux-arm-kernel, linux-pm

This patch adds the regulator nodes for the axp209 by including
the axp209 dtsi. As the inputs of these regulators are from the
axp209's PS output, which is basically just a mux over the 2
inputs, it is considered to be unregulated. Thus we do not provide
input supply properties for them.

The regulator names and constraints are based on the board
schematics and the SoC datasheet.

DCDC2 is used as the cpu power supply. This patch also references
it from the cpu node.

Also get rid of axp209 properties already set in axp209.dtsi.

Signed-off-by: Chen-Yu Tsai <wens@csie.org>
---

changes since v2:

    none

changes since v1:

    - Use preprocessor include for axp209.dtsi

---
 arch/arm/boot/dts/sun4i-a10-cubieboard.dts | 35 ++++++++++++++++++++++++++----
 1 file changed, 31 insertions(+), 4 deletions(-)

diff --git a/arch/arm/boot/dts/sun4i-a10-cubieboard.dts b/arch/arm/boot/dts/sun4i-a10-cubieboard.dts
index 87ac84db836d..4260c2b47607 100644
--- a/arch/arm/boot/dts/sun4i-a10-cubieboard.dts
+++ b/arch/arm/boot/dts/sun4i-a10-cubieboard.dts
@@ -137,12 +137,8 @@
 			status = "okay";
 
 			axp209: pmic@34 {
-				compatible = "x-powers,axp209";
 				reg = <0x34>;
 				interrupts = <0>;
-
-				interrupt-controller;
-				#interrupt-cells = <1>;
 			};
 		};
 
@@ -188,3 +184,34 @@
 		status = "okay";
 	};
 };
+
+#include "axp209.dtsi"
+
+&cpu0 {
+	cpu-supply = <&reg_dcdc2>;
+};
+
+&reg_dcdc2 {
+	regulator-always-on;
+	regulator-min-microvolt = <1000000>;
+	regulator-max-microvolt = <1450000>;
+	regulator-name = "vdd-cpu";
+};
+
+&reg_dcdc3 {
+	regulator-always-on;
+	regulator-min-microvolt = <1000000>;
+	regulator-max-microvolt = <1400000>;
+	regulator-name = "vdd-int-dll";
+};
+
+&reg_ldo1 {
+	regulator-name = "vdd-rtc";
+};
+
+&reg_ldo2 {
+	regulator-always-on;
+	regulator-min-microvolt = <3000000>;
+	regulator-max-microvolt = <3000000>;
+	regulator-name = "avcc";
+};
-- 
2.1.4


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

* [PATCH v3 9/9] ARM: dts: sun4i: cubieboard: add axp209 regulator nodes
@ 2015-01-12  4:34   ` Chen-Yu Tsai
  0 siblings, 0 replies; 36+ messages in thread
From: Chen-Yu Tsai @ 2015-01-12  4:34 UTC (permalink / raw)
  To: linux-arm-kernel

This patch adds the regulator nodes for the axp209 by including
the axp209 dtsi. As the inputs of these regulators are from the
axp209's PS output, which is basically just a mux over the 2
inputs, it is considered to be unregulated. Thus we do not provide
input supply properties for them.

The regulator names and constraints are based on the board
schematics and the SoC datasheet.

DCDC2 is used as the cpu power supply. This patch also references
it from the cpu node.

Also get rid of axp209 properties already set in axp209.dtsi.

Signed-off-by: Chen-Yu Tsai <wens@csie.org>
---

changes since v2:

    none

changes since v1:

    - Use preprocessor include for axp209.dtsi

---
 arch/arm/boot/dts/sun4i-a10-cubieboard.dts | 35 ++++++++++++++++++++++++++----
 1 file changed, 31 insertions(+), 4 deletions(-)

diff --git a/arch/arm/boot/dts/sun4i-a10-cubieboard.dts b/arch/arm/boot/dts/sun4i-a10-cubieboard.dts
index 87ac84db836d..4260c2b47607 100644
--- a/arch/arm/boot/dts/sun4i-a10-cubieboard.dts
+++ b/arch/arm/boot/dts/sun4i-a10-cubieboard.dts
@@ -137,12 +137,8 @@
 			status = "okay";
 
 			axp209: pmic at 34 {
-				compatible = "x-powers,axp209";
 				reg = <0x34>;
 				interrupts = <0>;
-
-				interrupt-controller;
-				#interrupt-cells = <1>;
 			};
 		};
 
@@ -188,3 +184,34 @@
 		status = "okay";
 	};
 };
+
+#include "axp209.dtsi"
+
+&cpu0 {
+	cpu-supply = <&reg_dcdc2>;
+};
+
+&reg_dcdc2 {
+	regulator-always-on;
+	regulator-min-microvolt = <1000000>;
+	regulator-max-microvolt = <1450000>;
+	regulator-name = "vdd-cpu";
+};
+
+&reg_dcdc3 {
+	regulator-always-on;
+	regulator-min-microvolt = <1000000>;
+	regulator-max-microvolt = <1400000>;
+	regulator-name = "vdd-int-dll";
+};
+
+&reg_ldo1 {
+	regulator-name = "vdd-rtc";
+};
+
+&reg_ldo2 {
+	regulator-always-on;
+	regulator-min-microvolt = <3000000>;
+	regulator-max-microvolt = <3000000>;
+	regulator-name = "avcc";
+};
-- 
2.1.4

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

* Re: [PATCH v3 4/9] ARM: dts: sun7i: cubieboard2: add axp209 regulator nodes
  2015-01-12  4:34   ` Chen-Yu Tsai
@ 2015-01-12  9:06     ` Maxime Ripard
  -1 siblings, 0 replies; 36+ messages in thread
From: Maxime Ripard @ 2015-01-12  9:06 UTC (permalink / raw)
  To: Chen-Yu Tsai
  Cc: Dmitry Torokhov, Zhang Rui, Eduardo Valentin, Hans de Goede,
	linux-input, linux-arm-kernel, linux-pm

[-- Attachment #1: Type: text/plain, Size: 2681 bytes --]

Hi Chen-Yu,

On Mon, Jan 12, 2015 at 12:34:04PM +0800, Chen-Yu Tsai wrote:
> This patch adds the regulator nodes for the axp209 by including
> the axp209 dtsi. As the inputs of these regulators are from the
> axp209's PS output, which is basically just a mux over the 2
> inputs, it is considered to be unregulated. Thus we do not provide
> input supply properties for them.
> 
> The regulator names and constraints are based on the board
> schematics and the SoC datasheet.
> 
> DCDC2 is used as the cpu power supply. This patch also references
> it from the cpu node.
> 
> Also get rid of axp209 properties already set in axp209.dtsi.
> 
> Signed-off-by: Chen-Yu Tsai <wens@csie.org>
> ---
> 
> changes since v2
> 
>     none
> 
> changes since v1:
> 
>     - Use preprocessor include for axp209.dtsi
>     - Remove incorrectly squashed axp209.dtsi patch
> 
> ---
>  arch/arm/boot/dts/sun7i-a20-cubieboard2.dts | 35 +++++++++++++++++++++++++----
>  1 file changed, 31 insertions(+), 4 deletions(-)
> 
> diff --git a/arch/arm/boot/dts/sun7i-a20-cubieboard2.dts b/arch/arm/boot/dts/sun7i-a20-cubieboard2.dts
> index 18fc5db9c976..ec1fc2c8b3e3 100644
> --- a/arch/arm/boot/dts/sun7i-a20-cubieboard2.dts
> +++ b/arch/arm/boot/dts/sun7i-a20-cubieboard2.dts
> @@ -88,13 +88,9 @@
>  			status = "okay";
>  
>  			axp209: pmic@34 {
> -				compatible = "x-powers,axp209";
>  				reg = <0x34>;
>  				interrupt-parent = <&nmi_intc>;
>  				interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
> -
> -				interrupt-controller;
> -				#interrupt-cells = <1>;
>  			};
>  		};
>  
> @@ -145,3 +141,34 @@
>  		status = "okay";
>  	};
>  };
> +
> +#include "axp209.dtsi"
> +
> +&cpu0 {
> +	cpu-supply = <&reg_dcdc2>;
> +};
> +
> +&reg_dcdc2 {
> +	regulator-always-on;
> +	regulator-min-microvolt = <1000000>;
> +	regulator-max-microvolt = <1450000>;
> +	regulator-name = "vdd-cpu";
> +};
> +
> +&reg_dcdc3 {
> +	regulator-always-on;
> +	regulator-min-microvolt = <1000000>;
> +	regulator-max-microvolt = <1400000>;
> +	regulator-name = "vdd-int-dll";
> +};
> +
> +&reg_ldo1 {
> +	regulator-name = "vdd-rtc";
> +};
> +
> +&reg_ldo2 {
> +	regulator-always-on;
> +	regulator-min-microvolt = <3000000>;
> +	regulator-max-microvolt = <3000000>;
> +	regulator-name = "avcc";
> +};

How do reg_vcc3v3 and the other reg used in this DT (ahci, USB) fit
into that?

Eventually, I think we would be able to remove
sunxi-common-regulators.dtsi, or at least, expose the proper regulator
hierarchy.

Thanks!
Maxime

-- 
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

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

* [PATCH v3 4/9] ARM: dts: sun7i: cubieboard2: add axp209 regulator nodes
@ 2015-01-12  9:06     ` Maxime Ripard
  0 siblings, 0 replies; 36+ messages in thread
From: Maxime Ripard @ 2015-01-12  9:06 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Chen-Yu,

On Mon, Jan 12, 2015 at 12:34:04PM +0800, Chen-Yu Tsai wrote:
> This patch adds the regulator nodes for the axp209 by including
> the axp209 dtsi. As the inputs of these regulators are from the
> axp209's PS output, which is basically just a mux over the 2
> inputs, it is considered to be unregulated. Thus we do not provide
> input supply properties for them.
> 
> The regulator names and constraints are based on the board
> schematics and the SoC datasheet.
> 
> DCDC2 is used as the cpu power supply. This patch also references
> it from the cpu node.
> 
> Also get rid of axp209 properties already set in axp209.dtsi.
> 
> Signed-off-by: Chen-Yu Tsai <wens@csie.org>
> ---
> 
> changes since v2
> 
>     none
> 
> changes since v1:
> 
>     - Use preprocessor include for axp209.dtsi
>     - Remove incorrectly squashed axp209.dtsi patch
> 
> ---
>  arch/arm/boot/dts/sun7i-a20-cubieboard2.dts | 35 +++++++++++++++++++++++++----
>  1 file changed, 31 insertions(+), 4 deletions(-)
> 
> diff --git a/arch/arm/boot/dts/sun7i-a20-cubieboard2.dts b/arch/arm/boot/dts/sun7i-a20-cubieboard2.dts
> index 18fc5db9c976..ec1fc2c8b3e3 100644
> --- a/arch/arm/boot/dts/sun7i-a20-cubieboard2.dts
> +++ b/arch/arm/boot/dts/sun7i-a20-cubieboard2.dts
> @@ -88,13 +88,9 @@
>  			status = "okay";
>  
>  			axp209: pmic at 34 {
> -				compatible = "x-powers,axp209";
>  				reg = <0x34>;
>  				interrupt-parent = <&nmi_intc>;
>  				interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
> -
> -				interrupt-controller;
> -				#interrupt-cells = <1>;
>  			};
>  		};
>  
> @@ -145,3 +141,34 @@
>  		status = "okay";
>  	};
>  };
> +
> +#include "axp209.dtsi"
> +
> +&cpu0 {
> +	cpu-supply = <&reg_dcdc2>;
> +};
> +
> +&reg_dcdc2 {
> +	regulator-always-on;
> +	regulator-min-microvolt = <1000000>;
> +	regulator-max-microvolt = <1450000>;
> +	regulator-name = "vdd-cpu";
> +};
> +
> +&reg_dcdc3 {
> +	regulator-always-on;
> +	regulator-min-microvolt = <1000000>;
> +	regulator-max-microvolt = <1400000>;
> +	regulator-name = "vdd-int-dll";
> +};
> +
> +&reg_ldo1 {
> +	regulator-name = "vdd-rtc";
> +};
> +
> +&reg_ldo2 {
> +	regulator-always-on;
> +	regulator-min-microvolt = <3000000>;
> +	regulator-max-microvolt = <3000000>;
> +	regulator-name = "avcc";
> +};

How do reg_vcc3v3 and the other reg used in this DT (ahci, USB) fit
into that?

Eventually, I think we would be able to remove
sunxi-common-regulators.dtsi, or at least, expose the proper regulator
hierarchy.

Thanks!
Maxime

-- 
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20150112/dc3ee794/attachment-0001.sig>

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

* Re: [PATCH v3 0/9] ARM: sunxi: Support cpufreq on sun[457]i
  2015-01-12  4:34 ` Chen-Yu Tsai
@ 2015-01-12  9:10   ` Maxime Ripard
  -1 siblings, 0 replies; 36+ messages in thread
From: Maxime Ripard @ 2015-01-12  9:10 UTC (permalink / raw)
  To: Chen-Yu Tsai
  Cc: Dmitry Torokhov, Zhang Rui, Eduardo Valentin, Hans de Goede,
	linux-input, linux-arm-kernel, linux-pm

[-- Attachment #1: Type: text/plain, Size: 2173 bytes --]

On Mon, Jan 12, 2015 at 12:34:00PM +0800, Chen-Yu Tsai wrote:
> Hi,
> 
> This is v3 of the cpufreq support series for sunxi. The series has been
> rebased onto the latest sunxi-next. I've dropped all the patches Maxime
> merged. This includes "ARM: sunxi: Register cpufreq-dt for sun[45678]i"
> which was merged but not published yet.
> 
> Individual changes since v2 are listed within each patch.
> 
> 
> Original cover letter follows:
> 
> This series adds support cpufreq support for sun[457]i using cpufreq-dt.
> This also supports passive cpu cooling (thermal throttling) using thermal
> zones with the temperature sensor in the SoC.
> 
> The operating points for the supported platforms were taken from the
> linux-sunxi FEX files repository. The majority of boards use the same
> settings. Only with sun7i do we see slight variations, either disabling
> some frequencies, or bumping up the voltage a bit. In either case this
> can be done by limiting the constraints for the supply regulator, or 
> overriding the OPP table in the board dts file.
> 
> On sun7i, there is an additional operating point not found in the FEX
> files, 960 MHz @ 1.4V, which is the full speed setting in both u-boot-sunxi
> and mainline u-boot.
> 
> The series has been tested on the 4 boards I have. With cpufreq active,
> the effects are visible as a decrease in SoC internal temperature.
> Stability for the operating points has been tested using:
> 
>   http://linux-sunxi.org/Hardware_Reliability_Tests#Reliability_of_cpufreq_voltage.2Ffrequency_settings
> 
> More real world usage feedback is appreciated. Thermal throttling hasn't
> been tested much, due to not being able to generate enough load without
> the GPU for the SoC to heat up. Also on sun4i, the temperature sensor
> still hasn't been calibrated, so the readings are highly inaccurate.

Applied 2, 3, 6 and 8.

There's still some discussions about the boards regulators, that apply
to all of them, even though I commented on one in particular.

Thanks!
Maxime

-- 
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

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

* [PATCH v3 0/9] ARM: sunxi: Support cpufreq on sun[457]i
@ 2015-01-12  9:10   ` Maxime Ripard
  0 siblings, 0 replies; 36+ messages in thread
From: Maxime Ripard @ 2015-01-12  9:10 UTC (permalink / raw)
  To: linux-arm-kernel

On Mon, Jan 12, 2015 at 12:34:00PM +0800, Chen-Yu Tsai wrote:
> Hi,
> 
> This is v3 of the cpufreq support series for sunxi. The series has been
> rebased onto the latest sunxi-next. I've dropped all the patches Maxime
> merged. This includes "ARM: sunxi: Register cpufreq-dt for sun[45678]i"
> which was merged but not published yet.
> 
> Individual changes since v2 are listed within each patch.
> 
> 
> Original cover letter follows:
> 
> This series adds support cpufreq support for sun[457]i using cpufreq-dt.
> This also supports passive cpu cooling (thermal throttling) using thermal
> zones with the temperature sensor in the SoC.
> 
> The operating points for the supported platforms were taken from the
> linux-sunxi FEX files repository. The majority of boards use the same
> settings. Only with sun7i do we see slight variations, either disabling
> some frequencies, or bumping up the voltage a bit. In either case this
> can be done by limiting the constraints for the supply regulator, or 
> overriding the OPP table in the board dts file.
> 
> On sun7i, there is an additional operating point not found in the FEX
> files, 960 MHz @ 1.4V, which is the full speed setting in both u-boot-sunxi
> and mainline u-boot.
> 
> The series has been tested on the 4 boards I have. With cpufreq active,
> the effects are visible as a decrease in SoC internal temperature.
> Stability for the operating points has been tested using:
> 
>   http://linux-sunxi.org/Hardware_Reliability_Tests#Reliability_of_cpufreq_voltage.2Ffrequency_settings
> 
> More real world usage feedback is appreciated. Thermal throttling hasn't
> been tested much, due to not being able to generate enough load without
> the GPU for the SoC to heat up. Also on sun4i, the temperature sensor
> still hasn't been calibrated, so the readings are highly inaccurate.

Applied 2, 3, 6 and 8.

There's still some discussions about the boards regulators, that apply
to all of them, even though I commented on one in particular.

Thanks!
Maxime

-- 
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20150112/85077dc8/attachment.sig>

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

* Re: [PATCH v3 4/9] ARM: dts: sun7i: cubieboard2: add axp209 regulator nodes
  2015-01-12  9:06     ` Maxime Ripard
@ 2015-01-12  9:38       ` Chen-Yu Tsai
  -1 siblings, 0 replies; 36+ messages in thread
From: Chen-Yu Tsai @ 2015-01-12  9:38 UTC (permalink / raw)
  To: Maxime Ripard
  Cc: Dmitry Torokhov, Zhang Rui, Eduardo Valentin, Hans de Goede,
	linux-input, linux-arm-kernel, linux-pm

Hi,

On Mon, Jan 12, 2015 at 5:06 PM, Maxime Ripard
<maxime.ripard@free-electrons.com> wrote:
> Hi Chen-Yu,
>
> On Mon, Jan 12, 2015 at 12:34:04PM +0800, Chen-Yu Tsai wrote:
>> This patch adds the regulator nodes for the axp209 by including
>> the axp209 dtsi. As the inputs of these regulators are from the
>> axp209's PS output, which is basically just a mux over the 2
>> inputs, it is considered to be unregulated. Thus we do not provide
>> input supply properties for them.
>>
>> The regulator names and constraints are based on the board
>> schematics and the SoC datasheet.
>>
>> DCDC2 is used as the cpu power supply. This patch also references
>> it from the cpu node.
>>
>> Also get rid of axp209 properties already set in axp209.dtsi.
>>
>> Signed-off-by: Chen-Yu Tsai <wens@csie.org>
>> ---
>>
>> changes since v2
>>
>>     none
>>
>> changes since v1:
>>
>>     - Use preprocessor include for axp209.dtsi
>>     - Remove incorrectly squashed axp209.dtsi patch
>>
>> ---
>>  arch/arm/boot/dts/sun7i-a20-cubieboard2.dts | 35 +++++++++++++++++++++++++----
>>  1 file changed, 31 insertions(+), 4 deletions(-)
>>
>> diff --git a/arch/arm/boot/dts/sun7i-a20-cubieboard2.dts b/arch/arm/boot/dts/sun7i-a20-cubieboard2.dts
>> index 18fc5db9c976..ec1fc2c8b3e3 100644
>> --- a/arch/arm/boot/dts/sun7i-a20-cubieboard2.dts
>> +++ b/arch/arm/boot/dts/sun7i-a20-cubieboard2.dts
>> @@ -88,13 +88,9 @@
>>                       status = "okay";
>>
>>                       axp209: pmic@34 {
>> -                             compatible = "x-powers,axp209";
>>                               reg = <0x34>;
>>                               interrupt-parent = <&nmi_intc>;
>>                               interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
>> -
>> -                             interrupt-controller;
>> -                             #interrupt-cells = <1>;
>>                       };
>>               };
>>
>> @@ -145,3 +141,34 @@
>>               status = "okay";
>>       };
>>  };
>> +
>> +#include "axp209.dtsi"
>> +
>> +&cpu0 {
>> +     cpu-supply = <&reg_dcdc2>;
>> +};
>> +
>> +&reg_dcdc2 {
>> +     regulator-always-on;
>> +     regulator-min-microvolt = <1000000>;
>> +     regulator-max-microvolt = <1450000>;
>> +     regulator-name = "vdd-cpu";
>> +};
>> +
>> +&reg_dcdc3 {
>> +     regulator-always-on;
>> +     regulator-min-microvolt = <1000000>;
>> +     regulator-max-microvolt = <1400000>;
>> +     regulator-name = "vdd-int-dll";
>> +};
>> +
>> +&reg_ldo1 {
>> +     regulator-name = "vdd-rtc";
>> +};
>> +
>> +&reg_ldo2 {
>> +     regulator-always-on;
>> +     regulator-min-microvolt = <3000000>;
>> +     regulator-max-microvolt = <3000000>;
>> +     regulator-name = "avcc";
>> +};
>
> How do reg_vcc3v3 and the other reg used in this DT (ahci, USB) fit
> into that?

The following applies to boards that use AXP209.

reg_vcc3v3 or reg_vcc3v0 is an external buck regulator with it's
enable pin tied to EXTEN on the AXP. This pin is controllable,
but we do not have the driver for it. It is possible that multiple
regulators are tied to this pin. I suggest not touching it without
the correct schematics.

The source for usb and ahci regulators, or reg_vcc5v if you will,
is either the unregulated 5v from the power supply or the usb otg
port. For the Cubietruck, there's an additional uncontrollable
boost regulator that boosts the lipo battery's power up to 5v.

On some of the Olimex boards that use higher input voltages, they
use an uncontrollable buck regulator to step down the voltage to
5v. The Olinuxino-Micro also has a boost regulator for the battery,
tied to EXTEN.

The AXP209 simply does not have enough outputs for all the needed
voltages.

You could probably chain the regulators in the DT via xxx-supply
if it helps. But beyond that, it is hard to do anything meaningful
at this point. Modeling them as fixed regulators beyond our control
is simpler. We also do not have an IPSOUT regulator for the AXP.

> Eventually, I think we would be able to remove
> sunxi-common-regulators.dtsi, or at least, expose the proper regulator
> hierarchy.

The USB and SATA regulators are just GPIO enabled switches (MOSFETs)
or current limiters. I think these will always exist because of the
reference designs. Or do you want to move them back into the board
dts files? FWIW, I like it the way it is now. Not that I don't like
it to be accurate.


ChenYu

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

* [PATCH v3 4/9] ARM: dts: sun7i: cubieboard2: add axp209 regulator nodes
@ 2015-01-12  9:38       ` Chen-Yu Tsai
  0 siblings, 0 replies; 36+ messages in thread
From: Chen-Yu Tsai @ 2015-01-12  9:38 UTC (permalink / raw)
  To: linux-arm-kernel

Hi,

On Mon, Jan 12, 2015 at 5:06 PM, Maxime Ripard
<maxime.ripard@free-electrons.com> wrote:
> Hi Chen-Yu,
>
> On Mon, Jan 12, 2015 at 12:34:04PM +0800, Chen-Yu Tsai wrote:
>> This patch adds the regulator nodes for the axp209 by including
>> the axp209 dtsi. As the inputs of these regulators are from the
>> axp209's PS output, which is basically just a mux over the 2
>> inputs, it is considered to be unregulated. Thus we do not provide
>> input supply properties for them.
>>
>> The regulator names and constraints are based on the board
>> schematics and the SoC datasheet.
>>
>> DCDC2 is used as the cpu power supply. This patch also references
>> it from the cpu node.
>>
>> Also get rid of axp209 properties already set in axp209.dtsi.
>>
>> Signed-off-by: Chen-Yu Tsai <wens@csie.org>
>> ---
>>
>> changes since v2
>>
>>     none
>>
>> changes since v1:
>>
>>     - Use preprocessor include for axp209.dtsi
>>     - Remove incorrectly squashed axp209.dtsi patch
>>
>> ---
>>  arch/arm/boot/dts/sun7i-a20-cubieboard2.dts | 35 +++++++++++++++++++++++++----
>>  1 file changed, 31 insertions(+), 4 deletions(-)
>>
>> diff --git a/arch/arm/boot/dts/sun7i-a20-cubieboard2.dts b/arch/arm/boot/dts/sun7i-a20-cubieboard2.dts
>> index 18fc5db9c976..ec1fc2c8b3e3 100644
>> --- a/arch/arm/boot/dts/sun7i-a20-cubieboard2.dts
>> +++ b/arch/arm/boot/dts/sun7i-a20-cubieboard2.dts
>> @@ -88,13 +88,9 @@
>>                       status = "okay";
>>
>>                       axp209: pmic at 34 {
>> -                             compatible = "x-powers,axp209";
>>                               reg = <0x34>;
>>                               interrupt-parent = <&nmi_intc>;
>>                               interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
>> -
>> -                             interrupt-controller;
>> -                             #interrupt-cells = <1>;
>>                       };
>>               };
>>
>> @@ -145,3 +141,34 @@
>>               status = "okay";
>>       };
>>  };
>> +
>> +#include "axp209.dtsi"
>> +
>> +&cpu0 {
>> +     cpu-supply = <&reg_dcdc2>;
>> +};
>> +
>> +&reg_dcdc2 {
>> +     regulator-always-on;
>> +     regulator-min-microvolt = <1000000>;
>> +     regulator-max-microvolt = <1450000>;
>> +     regulator-name = "vdd-cpu";
>> +};
>> +
>> +&reg_dcdc3 {
>> +     regulator-always-on;
>> +     regulator-min-microvolt = <1000000>;
>> +     regulator-max-microvolt = <1400000>;
>> +     regulator-name = "vdd-int-dll";
>> +};
>> +
>> +&reg_ldo1 {
>> +     regulator-name = "vdd-rtc";
>> +};
>> +
>> +&reg_ldo2 {
>> +     regulator-always-on;
>> +     regulator-min-microvolt = <3000000>;
>> +     regulator-max-microvolt = <3000000>;
>> +     regulator-name = "avcc";
>> +};
>
> How do reg_vcc3v3 and the other reg used in this DT (ahci, USB) fit
> into that?

The following applies to boards that use AXP209.

reg_vcc3v3 or reg_vcc3v0 is an external buck regulator with it's
enable pin tied to EXTEN on the AXP. This pin is controllable,
but we do not have the driver for it. It is possible that multiple
regulators are tied to this pin. I suggest not touching it without
the correct schematics.

The source for usb and ahci regulators, or reg_vcc5v if you will,
is either the unregulated 5v from the power supply or the usb otg
port. For the Cubietruck, there's an additional uncontrollable
boost regulator that boosts the lipo battery's power up to 5v.

On some of the Olimex boards that use higher input voltages, they
use an uncontrollable buck regulator to step down the voltage to
5v. The Olinuxino-Micro also has a boost regulator for the battery,
tied to EXTEN.

The AXP209 simply does not have enough outputs for all the needed
voltages.

You could probably chain the regulators in the DT via xxx-supply
if it helps. But beyond that, it is hard to do anything meaningful
at this point. Modeling them as fixed regulators beyond our control
is simpler. We also do not have an IPSOUT regulator for the AXP.

> Eventually, I think we would be able to remove
> sunxi-common-regulators.dtsi, or at least, expose the proper regulator
> hierarchy.

The USB and SATA regulators are just GPIO enabled switches (MOSFETs)
or current limiters. I think these will always exist because of the
reference designs. Or do you want to move them back into the board
dts files? FWIW, I like it the way it is now. Not that I don't like
it to be accurate.


ChenYu

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

* Re: [PATCH v3 1/9] Input: sun4i-ts: Add thermal zone sensor support
  2015-01-12  4:34   ` Chen-Yu Tsai
@ 2015-01-12 12:08     ` Eduardo Valentin
  -1 siblings, 0 replies; 36+ messages in thread
From: Eduardo Valentin @ 2015-01-12 12:08 UTC (permalink / raw)
  To: Chen-Yu Tsai
  Cc: Maxime Ripard, Dmitry Torokhov, Zhang Rui, Hans de Goede,
	linux-input, linux-arm-kernel, linux-pm

[-- Attachment #1: Type: text/plain, Size: 5364 bytes --]

On Mon, Jan 12, 2015 at 12:34:01PM +0800, Chen-Yu Tsai wrote:
> The touchscreen controller has a temperature sensor embedded in the SoC,
> which already has hwmon support in the driver.
> 
> Add DT thermal zone support so we can use it with cpufreq for thermal
> throttling.
> 
> This also adds a comment stating that we do not know the actual formula
> for calculating the temperature.
> 
> Signed-off-by: Chen-Yu Tsai <wens@csie.org>

Acked-by: Eduardo Valentin <edubezval@gmail.com>

> ---
> 
> changes since v2:
> 
>     - Use common function for temperature calculation
> 
> changes since v1:
> 
>     - clean up thermal zone sensor when input device register fails
>     - unconditionally unregister thermal zone sensor on removal.
>       the unregister function checks the pointers passed in.
>     - add comment explaining the lack of documents for the temperature
>       calculation formula
> 
> ---
>  .../bindings/input/touchscreen/sun4i.txt           |  2 +
>  drivers/input/touchscreen/sun4i-ts.c               | 54 ++++++++++++++++++++--
>  2 files changed, 52 insertions(+), 4 deletions(-)
> 
> diff --git a/Documentation/devicetree/bindings/input/touchscreen/sun4i.txt b/Documentation/devicetree/bindings/input/touchscreen/sun4i.txt
> index aef57791f40b..a8405bab6c00 100644
> --- a/Documentation/devicetree/bindings/input/touchscreen/sun4i.txt
> +++ b/Documentation/devicetree/bindings/input/touchscreen/sun4i.txt
> @@ -5,6 +5,7 @@ Required properties:
>   - compatible: "allwinner,sun4i-a10-ts"
>   - reg: mmio address range of the chip
>   - interrupts: interrupt to which the chip is connected
> + - #thermal-sensor-cells: shall be 0
>  
>  Optional properties:
>   - allwinner,ts-attached: boolean indicating that an actual touchscreen is
> @@ -17,4 +18,5 @@ Example:
>  		reg = <0x01c25000 0x100>;
>  		interrupts = <29>;
>  		allwinner,ts-attached;
> +		#thermal-sensor-cells = <0>;
>  	};
> diff --git a/drivers/input/touchscreen/sun4i-ts.c b/drivers/input/touchscreen/sun4i-ts.c
> index 28a06749ae42..5851aa0bd78b 100644
> --- a/drivers/input/touchscreen/sun4i-ts.c
> +++ b/drivers/input/touchscreen/sun4i-ts.c
> @@ -34,6 +34,7 @@
>  
>  #include <linux/err.h>
>  #include <linux/hwmon.h>
> +#include <linux/thermal.h>
>  #include <linux/init.h>
>  #include <linux/input.h>
>  #include <linux/interrupt.h>
> @@ -107,6 +108,7 @@
>  struct sun4i_ts_data {
>  	struct device *dev;
>  	struct input_dev *input;
> +	struct thermal_zone_device *tz;
>  	void __iomem *base;
>  	unsigned int irq;
>  	bool ignore_fifo_data;
> @@ -180,16 +182,48 @@ static void sun4i_ts_close(struct input_dev *dev)
>  	writel(TEMP_IRQ_EN(1), ts->base + TP_INT_FIFOC);
>  }
>  
> +static int get_temp(const struct sun4i_ts_data *ts, long *temp)
> +{
> +	/* No temp_data until the first irq */
> +	if (ts->temp_data == -1)
> +		return -EAGAIN;
> +
> +	/*
> +	 * The user manuals do not contain the formula for calculating
> +	 * the temperature. The formula used here is from the AXP209,
> +	 * which is designed by X-Powers, an affiliate of Allwinner:
> +	 *
> +	 *     temperature = -144.7 + (value * 0.1)
> +	 *
> +	 * This should be replaced with the correct one if such information
> +	 * becomes available.
> +	 */
> +	*temp = (ts->temp_data - 1447) * 100;
> +
> +	return 0;
> +}
> +
> +static int get_tz_temp(void *data, long *temp)
> +{
> +	return get_temp(data, temp);
> +}
> +
> +static struct thermal_zone_of_device_ops sun4i_ts_tz_ops = {
> +	.get_temp = get_tz_temp,
> +};
> +
>  static ssize_t show_temp(struct device *dev, struct device_attribute *devattr,
>  			 char *buf)
>  {
>  	struct sun4i_ts_data *ts = dev_get_drvdata(dev);
> +	long temp;
> +	int ret;
>  
> -	/* No temp_data until the first irq */
> -	if (ts->temp_data == -1)
> -		return -EAGAIN;
> +	ret = get_temp(ts, &temp);
> +	if (ret)
> +		return ret;
>  
> -	return sprintf(buf, "%d\n", (ts->temp_data - 1447) * 100);
> +	return sprintf(buf, "%ld\n", temp);
>  }
>  
>  static ssize_t show_temp_label(struct device *dev,
> @@ -283,17 +317,27 @@ static int sun4i_ts_probe(struct platform_device *pdev)
>  	writel(STYLUS_UP_DEBOUN(5) | STYLUS_UP_DEBOUN_EN(1) | TP_MODE_EN(1),
>  	       ts->base + TP_CTRL1);
>  
> +	/*
> +	 * The thermal core does not register hwmon devices for DT-based
> +	 * thermal zone sensors, such as this one.
> +	 */
>  	hwmon = devm_hwmon_device_register_with_groups(ts->dev, "sun4i_ts",
>  						       ts, sun4i_ts_groups);
>  	if (IS_ERR(hwmon))
>  		return PTR_ERR(hwmon);
>  
> +	ts->tz = thermal_zone_of_sensor_register(ts->dev, 0, ts,
> +						 &sun4i_ts_tz_ops);
> +	if (IS_ERR(ts->tz))
> +		ts->tz = NULL;
> +
>  	writel(TEMP_IRQ_EN(1), ts->base + TP_INT_FIFOC);
>  
>  	if (ts_attached) {
>  		error = input_register_device(ts->input);
>  		if (error) {
>  			writel(0, ts->base + TP_INT_FIFOC);
> +			thermal_zone_of_sensor_unregister(ts->dev, ts->tz);
>  			return error;
>  		}
>  	}
> @@ -310,6 +354,8 @@ static int sun4i_ts_remove(struct platform_device *pdev)
>  	if (ts->input)
>  		input_unregister_device(ts->input);
>  
> +	thermal_zone_of_sensor_unregister(ts->dev, ts->tz);
> +
>  	/* Deactivate all IRQs */
>  	writel(0, ts->base + TP_INT_FIFOC);
>  
> -- 
> 2.1.4
> 

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 473 bytes --]

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

* [PATCH v3 1/9] Input: sun4i-ts: Add thermal zone sensor support
@ 2015-01-12 12:08     ` Eduardo Valentin
  0 siblings, 0 replies; 36+ messages in thread
From: Eduardo Valentin @ 2015-01-12 12:08 UTC (permalink / raw)
  To: linux-arm-kernel

On Mon, Jan 12, 2015 at 12:34:01PM +0800, Chen-Yu Tsai wrote:
> The touchscreen controller has a temperature sensor embedded in the SoC,
> which already has hwmon support in the driver.
> 
> Add DT thermal zone support so we can use it with cpufreq for thermal
> throttling.
> 
> This also adds a comment stating that we do not know the actual formula
> for calculating the temperature.
> 
> Signed-off-by: Chen-Yu Tsai <wens@csie.org>

Acked-by: Eduardo Valentin <edubezval@gmail.com>

> ---
> 
> changes since v2:
> 
>     - Use common function for temperature calculation
> 
> changes since v1:
> 
>     - clean up thermal zone sensor when input device register fails
>     - unconditionally unregister thermal zone sensor on removal.
>       the unregister function checks the pointers passed in.
>     - add comment explaining the lack of documents for the temperature
>       calculation formula
> 
> ---
>  .../bindings/input/touchscreen/sun4i.txt           |  2 +
>  drivers/input/touchscreen/sun4i-ts.c               | 54 ++++++++++++++++++++--
>  2 files changed, 52 insertions(+), 4 deletions(-)
> 
> diff --git a/Documentation/devicetree/bindings/input/touchscreen/sun4i.txt b/Documentation/devicetree/bindings/input/touchscreen/sun4i.txt
> index aef57791f40b..a8405bab6c00 100644
> --- a/Documentation/devicetree/bindings/input/touchscreen/sun4i.txt
> +++ b/Documentation/devicetree/bindings/input/touchscreen/sun4i.txt
> @@ -5,6 +5,7 @@ Required properties:
>   - compatible: "allwinner,sun4i-a10-ts"
>   - reg: mmio address range of the chip
>   - interrupts: interrupt to which the chip is connected
> + - #thermal-sensor-cells: shall be 0
>  
>  Optional properties:
>   - allwinner,ts-attached: boolean indicating that an actual touchscreen is
> @@ -17,4 +18,5 @@ Example:
>  		reg = <0x01c25000 0x100>;
>  		interrupts = <29>;
>  		allwinner,ts-attached;
> +		#thermal-sensor-cells = <0>;
>  	};
> diff --git a/drivers/input/touchscreen/sun4i-ts.c b/drivers/input/touchscreen/sun4i-ts.c
> index 28a06749ae42..5851aa0bd78b 100644
> --- a/drivers/input/touchscreen/sun4i-ts.c
> +++ b/drivers/input/touchscreen/sun4i-ts.c
> @@ -34,6 +34,7 @@
>  
>  #include <linux/err.h>
>  #include <linux/hwmon.h>
> +#include <linux/thermal.h>
>  #include <linux/init.h>
>  #include <linux/input.h>
>  #include <linux/interrupt.h>
> @@ -107,6 +108,7 @@
>  struct sun4i_ts_data {
>  	struct device *dev;
>  	struct input_dev *input;
> +	struct thermal_zone_device *tz;
>  	void __iomem *base;
>  	unsigned int irq;
>  	bool ignore_fifo_data;
> @@ -180,16 +182,48 @@ static void sun4i_ts_close(struct input_dev *dev)
>  	writel(TEMP_IRQ_EN(1), ts->base + TP_INT_FIFOC);
>  }
>  
> +static int get_temp(const struct sun4i_ts_data *ts, long *temp)
> +{
> +	/* No temp_data until the first irq */
> +	if (ts->temp_data == -1)
> +		return -EAGAIN;
> +
> +	/*
> +	 * The user manuals do not contain the formula for calculating
> +	 * the temperature. The formula used here is from the AXP209,
> +	 * which is designed by X-Powers, an affiliate of Allwinner:
> +	 *
> +	 *     temperature = -144.7 + (value * 0.1)
> +	 *
> +	 * This should be replaced with the correct one if such information
> +	 * becomes available.
> +	 */
> +	*temp = (ts->temp_data - 1447) * 100;
> +
> +	return 0;
> +}
> +
> +static int get_tz_temp(void *data, long *temp)
> +{
> +	return get_temp(data, temp);
> +}
> +
> +static struct thermal_zone_of_device_ops sun4i_ts_tz_ops = {
> +	.get_temp = get_tz_temp,
> +};
> +
>  static ssize_t show_temp(struct device *dev, struct device_attribute *devattr,
>  			 char *buf)
>  {
>  	struct sun4i_ts_data *ts = dev_get_drvdata(dev);
> +	long temp;
> +	int ret;
>  
> -	/* No temp_data until the first irq */
> -	if (ts->temp_data == -1)
> -		return -EAGAIN;
> +	ret = get_temp(ts, &temp);
> +	if (ret)
> +		return ret;
>  
> -	return sprintf(buf, "%d\n", (ts->temp_data - 1447) * 100);
> +	return sprintf(buf, "%ld\n", temp);
>  }
>  
>  static ssize_t show_temp_label(struct device *dev,
> @@ -283,17 +317,27 @@ static int sun4i_ts_probe(struct platform_device *pdev)
>  	writel(STYLUS_UP_DEBOUN(5) | STYLUS_UP_DEBOUN_EN(1) | TP_MODE_EN(1),
>  	       ts->base + TP_CTRL1);
>  
> +	/*
> +	 * The thermal core does not register hwmon devices for DT-based
> +	 * thermal zone sensors, such as this one.
> +	 */
>  	hwmon = devm_hwmon_device_register_with_groups(ts->dev, "sun4i_ts",
>  						       ts, sun4i_ts_groups);
>  	if (IS_ERR(hwmon))
>  		return PTR_ERR(hwmon);
>  
> +	ts->tz = thermal_zone_of_sensor_register(ts->dev, 0, ts,
> +						 &sun4i_ts_tz_ops);
> +	if (IS_ERR(ts->tz))
> +		ts->tz = NULL;
> +
>  	writel(TEMP_IRQ_EN(1), ts->base + TP_INT_FIFOC);
>  
>  	if (ts_attached) {
>  		error = input_register_device(ts->input);
>  		if (error) {
>  			writel(0, ts->base + TP_INT_FIFOC);
> +			thermal_zone_of_sensor_unregister(ts->dev, ts->tz);
>  			return error;
>  		}
>  	}
> @@ -310,6 +354,8 @@ static int sun4i_ts_remove(struct platform_device *pdev)
>  	if (ts->input)
>  		input_unregister_device(ts->input);
>  
> +	thermal_zone_of_sensor_unregister(ts->dev, ts->tz);
> +
>  	/* Deactivate all IRQs */
>  	writel(0, ts->base + TP_INT_FIFOC);
>  
> -- 
> 2.1.4
> 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20150112/4ca2517d/attachment.sig>

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

* Re: [PATCH v3 4/9] ARM: dts: sun7i: cubieboard2: add axp209 regulator nodes
  2015-01-12  9:38       ` Chen-Yu Tsai
@ 2015-01-13  9:40         ` Maxime Ripard
  -1 siblings, 0 replies; 36+ messages in thread
From: Maxime Ripard @ 2015-01-13  9:40 UTC (permalink / raw)
  To: Chen-Yu Tsai
  Cc: Dmitry Torokhov, Zhang Rui, Eduardo Valentin, Hans de Goede,
	linux-input, linux-arm-kernel, linux-pm

[-- Attachment #1: Type: text/plain, Size: 5202 bytes --]

Hi,

On Mon, Jan 12, 2015 at 05:38:12PM +0800, Chen-Yu Tsai wrote:
> Hi,
> 
> On Mon, Jan 12, 2015 at 5:06 PM, Maxime Ripard
> <maxime.ripard@free-electrons.com> wrote:
> > Hi Chen-Yu,
> >
> > On Mon, Jan 12, 2015 at 12:34:04PM +0800, Chen-Yu Tsai wrote:
> >> This patch adds the regulator nodes for the axp209 by including
> >> the axp209 dtsi. As the inputs of these regulators are from the
> >> axp209's PS output, which is basically just a mux over the 2
> >> inputs, it is considered to be unregulated. Thus we do not provide
> >> input supply properties for them.
> >>
> >> The regulator names and constraints are based on the board
> >> schematics and the SoC datasheet.
> >>
> >> DCDC2 is used as the cpu power supply. This patch also references
> >> it from the cpu node.
> >>
> >> Also get rid of axp209 properties already set in axp209.dtsi.
> >>
> >> Signed-off-by: Chen-Yu Tsai <wens@csie.org>
> >> ---
> >>
> >> changes since v2
> >>
> >>     none
> >>
> >> changes since v1:
> >>
> >>     - Use preprocessor include for axp209.dtsi
> >>     - Remove incorrectly squashed axp209.dtsi patch
> >>
> >> ---
> >>  arch/arm/boot/dts/sun7i-a20-cubieboard2.dts | 35 +++++++++++++++++++++++++----
> >>  1 file changed, 31 insertions(+), 4 deletions(-)
> >>
> >> diff --git a/arch/arm/boot/dts/sun7i-a20-cubieboard2.dts b/arch/arm/boot/dts/sun7i-a20-cubieboard2.dts
> >> index 18fc5db9c976..ec1fc2c8b3e3 100644
> >> --- a/arch/arm/boot/dts/sun7i-a20-cubieboard2.dts
> >> +++ b/arch/arm/boot/dts/sun7i-a20-cubieboard2.dts
> >> @@ -88,13 +88,9 @@
> >>                       status = "okay";
> >>
> >>                       axp209: pmic@34 {
> >> -                             compatible = "x-powers,axp209";
> >>                               reg = <0x34>;
> >>                               interrupt-parent = <&nmi_intc>;
> >>                               interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
> >> -
> >> -                             interrupt-controller;
> >> -                             #interrupt-cells = <1>;
> >>                       };
> >>               };
> >>
> >> @@ -145,3 +141,34 @@
> >>               status = "okay";
> >>       };
> >>  };
> >> +
> >> +#include "axp209.dtsi"
> >> +
> >> +&cpu0 {
> >> +     cpu-supply = <&reg_dcdc2>;
> >> +};
> >> +
> >> +&reg_dcdc2 {
> >> +     regulator-always-on;
> >> +     regulator-min-microvolt = <1000000>;
> >> +     regulator-max-microvolt = <1450000>;
> >> +     regulator-name = "vdd-cpu";
> >> +};
> >> +
> >> +&reg_dcdc3 {
> >> +     regulator-always-on;
> >> +     regulator-min-microvolt = <1000000>;
> >> +     regulator-max-microvolt = <1400000>;
> >> +     regulator-name = "vdd-int-dll";
> >> +};
> >> +
> >> +&reg_ldo1 {
> >> +     regulator-name = "vdd-rtc";
> >> +};
> >> +
> >> +&reg_ldo2 {
> >> +     regulator-always-on;
> >> +     regulator-min-microvolt = <3000000>;
> >> +     regulator-max-microvolt = <3000000>;
> >> +     regulator-name = "avcc";
> >> +};
> >
> > How do reg_vcc3v3 and the other reg used in this DT (ahci, USB) fit
> > into that?
> 
> The following applies to boards that use AXP209.
> 
> reg_vcc3v3 or reg_vcc3v0 is an external buck regulator with it's
> enable pin tied to EXTEN on the AXP. This pin is controllable,
> but we do not have the driver for it. It is possible that multiple
> regulators are tied to this pin. I suggest not touching it without
> the correct schematics.
> 
> The source for usb and ahci regulators, or reg_vcc5v if you will,
> is either the unregulated 5v from the power supply or the usb otg
> port. For the Cubietruck, there's an additional uncontrollable
> boost regulator that boosts the lipo battery's power up to 5v.
> 
> On some of the Olimex boards that use higher input voltages, they
> use an uncontrollable buck regulator to step down the voltage to
> 5v. The Olinuxino-Micro also has a boost regulator for the battery,
> tied to EXTEN.
> 
> The AXP209 simply does not have enough outputs for all the needed
> voltages.

Hmm, yes, ok. It makes sense.

> You could probably chain the regulators in the DT via xxx-supply
> if it helps. But beyond that, it is hard to do anything meaningful
> at this point. Modeling them as fixed regulators beyond our control
> is simpler. We also do not have an IPSOUT regulator for the AXP.
> 
> > Eventually, I think we would be able to remove
> > sunxi-common-regulators.dtsi, or at least, expose the proper regulator
> > hierarchy.
> 
> The USB and SATA regulators are just GPIO enabled switches (MOSFETs)
> or current limiters. I think these will always exist because of the
> reference designs. Or do you want to move them back into the board
> dts files? FWIW, I like it the way it is now. Not that I don't like
> it to be accurate.

At least providing the right hierarchy at the board level would be
great. Adding the -supply property to all our fixed regulators
wouldn't take too much code, and would be enough to model properly the
regulator trees.

Maxime

-- 
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

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

* [PATCH v3 4/9] ARM: dts: sun7i: cubieboard2: add axp209 regulator nodes
@ 2015-01-13  9:40         ` Maxime Ripard
  0 siblings, 0 replies; 36+ messages in thread
From: Maxime Ripard @ 2015-01-13  9:40 UTC (permalink / raw)
  To: linux-arm-kernel

Hi,

On Mon, Jan 12, 2015 at 05:38:12PM +0800, Chen-Yu Tsai wrote:
> Hi,
> 
> On Mon, Jan 12, 2015 at 5:06 PM, Maxime Ripard
> <maxime.ripard@free-electrons.com> wrote:
> > Hi Chen-Yu,
> >
> > On Mon, Jan 12, 2015 at 12:34:04PM +0800, Chen-Yu Tsai wrote:
> >> This patch adds the regulator nodes for the axp209 by including
> >> the axp209 dtsi. As the inputs of these regulators are from the
> >> axp209's PS output, which is basically just a mux over the 2
> >> inputs, it is considered to be unregulated. Thus we do not provide
> >> input supply properties for them.
> >>
> >> The regulator names and constraints are based on the board
> >> schematics and the SoC datasheet.
> >>
> >> DCDC2 is used as the cpu power supply. This patch also references
> >> it from the cpu node.
> >>
> >> Also get rid of axp209 properties already set in axp209.dtsi.
> >>
> >> Signed-off-by: Chen-Yu Tsai <wens@csie.org>
> >> ---
> >>
> >> changes since v2
> >>
> >>     none
> >>
> >> changes since v1:
> >>
> >>     - Use preprocessor include for axp209.dtsi
> >>     - Remove incorrectly squashed axp209.dtsi patch
> >>
> >> ---
> >>  arch/arm/boot/dts/sun7i-a20-cubieboard2.dts | 35 +++++++++++++++++++++++++----
> >>  1 file changed, 31 insertions(+), 4 deletions(-)
> >>
> >> diff --git a/arch/arm/boot/dts/sun7i-a20-cubieboard2.dts b/arch/arm/boot/dts/sun7i-a20-cubieboard2.dts
> >> index 18fc5db9c976..ec1fc2c8b3e3 100644
> >> --- a/arch/arm/boot/dts/sun7i-a20-cubieboard2.dts
> >> +++ b/arch/arm/boot/dts/sun7i-a20-cubieboard2.dts
> >> @@ -88,13 +88,9 @@
> >>                       status = "okay";
> >>
> >>                       axp209: pmic at 34 {
> >> -                             compatible = "x-powers,axp209";
> >>                               reg = <0x34>;
> >>                               interrupt-parent = <&nmi_intc>;
> >>                               interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
> >> -
> >> -                             interrupt-controller;
> >> -                             #interrupt-cells = <1>;
> >>                       };
> >>               };
> >>
> >> @@ -145,3 +141,34 @@
> >>               status = "okay";
> >>       };
> >>  };
> >> +
> >> +#include "axp209.dtsi"
> >> +
> >> +&cpu0 {
> >> +     cpu-supply = <&reg_dcdc2>;
> >> +};
> >> +
> >> +&reg_dcdc2 {
> >> +     regulator-always-on;
> >> +     regulator-min-microvolt = <1000000>;
> >> +     regulator-max-microvolt = <1450000>;
> >> +     regulator-name = "vdd-cpu";
> >> +};
> >> +
> >> +&reg_dcdc3 {
> >> +     regulator-always-on;
> >> +     regulator-min-microvolt = <1000000>;
> >> +     regulator-max-microvolt = <1400000>;
> >> +     regulator-name = "vdd-int-dll";
> >> +};
> >> +
> >> +&reg_ldo1 {
> >> +     regulator-name = "vdd-rtc";
> >> +};
> >> +
> >> +&reg_ldo2 {
> >> +     regulator-always-on;
> >> +     regulator-min-microvolt = <3000000>;
> >> +     regulator-max-microvolt = <3000000>;
> >> +     regulator-name = "avcc";
> >> +};
> >
> > How do reg_vcc3v3 and the other reg used in this DT (ahci, USB) fit
> > into that?
> 
> The following applies to boards that use AXP209.
> 
> reg_vcc3v3 or reg_vcc3v0 is an external buck regulator with it's
> enable pin tied to EXTEN on the AXP. This pin is controllable,
> but we do not have the driver for it. It is possible that multiple
> regulators are tied to this pin. I suggest not touching it without
> the correct schematics.
> 
> The source for usb and ahci regulators, or reg_vcc5v if you will,
> is either the unregulated 5v from the power supply or the usb otg
> port. For the Cubietruck, there's an additional uncontrollable
> boost regulator that boosts the lipo battery's power up to 5v.
> 
> On some of the Olimex boards that use higher input voltages, they
> use an uncontrollable buck regulator to step down the voltage to
> 5v. The Olinuxino-Micro also has a boost regulator for the battery,
> tied to EXTEN.
> 
> The AXP209 simply does not have enough outputs for all the needed
> voltages.

Hmm, yes, ok. It makes sense.

> You could probably chain the regulators in the DT via xxx-supply
> if it helps. But beyond that, it is hard to do anything meaningful
> at this point. Modeling them as fixed regulators beyond our control
> is simpler. We also do not have an IPSOUT regulator for the AXP.
> 
> > Eventually, I think we would be able to remove
> > sunxi-common-regulators.dtsi, or at least, expose the proper regulator
> > hierarchy.
> 
> The USB and SATA regulators are just GPIO enabled switches (MOSFETs)
> or current limiters. I think these will always exist because of the
> reference designs. Or do you want to move them back into the board
> dts files? FWIW, I like it the way it is now. Not that I don't like
> it to be accurate.

At least providing the right hierarchy at the board level would be
great. Adding the -supply property to all our fixed regulators
wouldn't take too much code, and would be enough to model properly the
regulator trees.

Maxime

-- 
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20150113/8911096f/attachment-0001.sig>

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

* Re: [PATCH v3 4/9] ARM: dts: sun7i: cubieboard2: add axp209 regulator nodes
  2015-01-13  9:40         ` Maxime Ripard
@ 2015-01-13 10:30           ` Chen-Yu Tsai
  -1 siblings, 0 replies; 36+ messages in thread
From: Chen-Yu Tsai @ 2015-01-13 10:30 UTC (permalink / raw)
  To: Maxime Ripard
  Cc: Dmitry Torokhov, Zhang Rui, Eduardo Valentin, Hans de Goede,
	linux-input, linux-arm-kernel, linux-pm

On Tue, Jan 13, 2015 at 5:40 PM, Maxime Ripard
<maxime.ripard@free-electrons.com> wrote:
> Hi,
>
> On Mon, Jan 12, 2015 at 05:38:12PM +0800, Chen-Yu Tsai wrote:
>> Hi,
>>
>> On Mon, Jan 12, 2015 at 5:06 PM, Maxime Ripard
>> <maxime.ripard@free-electrons.com> wrote:
>> > Hi Chen-Yu,
>> >
>> > On Mon, Jan 12, 2015 at 12:34:04PM +0800, Chen-Yu Tsai wrote:
>> >> This patch adds the regulator nodes for the axp209 by including
>> >> the axp209 dtsi. As the inputs of these regulators are from the
>> >> axp209's PS output, which is basically just a mux over the 2
>> >> inputs, it is considered to be unregulated. Thus we do not provide
>> >> input supply properties for them.
>> >>
>> >> The regulator names and constraints are based on the board
>> >> schematics and the SoC datasheet.
>> >>
>> >> DCDC2 is used as the cpu power supply. This patch also references
>> >> it from the cpu node.
>> >>
>> >> Also get rid of axp209 properties already set in axp209.dtsi.
>> >>
>> >> Signed-off-by: Chen-Yu Tsai <wens@csie.org>
>> >> ---
>> >>
>> >> changes since v2
>> >>
>> >>     none
>> >>
>> >> changes since v1:
>> >>
>> >>     - Use preprocessor include for axp209.dtsi
>> >>     - Remove incorrectly squashed axp209.dtsi patch
>> >>
>> >> ---
>> >>  arch/arm/boot/dts/sun7i-a20-cubieboard2.dts | 35 +++++++++++++++++++++++++----
>> >>  1 file changed, 31 insertions(+), 4 deletions(-)
>> >>
>> >> diff --git a/arch/arm/boot/dts/sun7i-a20-cubieboard2.dts b/arch/arm/boot/dts/sun7i-a20-cubieboard2.dts
>> >> index 18fc5db9c976..ec1fc2c8b3e3 100644
>> >> --- a/arch/arm/boot/dts/sun7i-a20-cubieboard2.dts
>> >> +++ b/arch/arm/boot/dts/sun7i-a20-cubieboard2.dts
>> >> @@ -88,13 +88,9 @@
>> >>                       status = "okay";
>> >>
>> >>                       axp209: pmic@34 {
>> >> -                             compatible = "x-powers,axp209";
>> >>                               reg = <0x34>;
>> >>                               interrupt-parent = <&nmi_intc>;
>> >>                               interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
>> >> -
>> >> -                             interrupt-controller;
>> >> -                             #interrupt-cells = <1>;
>> >>                       };
>> >>               };
>> >>
>> >> @@ -145,3 +141,34 @@
>> >>               status = "okay";
>> >>       };
>> >>  };
>> >> +
>> >> +#include "axp209.dtsi"
>> >> +
>> >> +&cpu0 {
>> >> +     cpu-supply = <&reg_dcdc2>;
>> >> +};
>> >> +
>> >> +&reg_dcdc2 {
>> >> +     regulator-always-on;
>> >> +     regulator-min-microvolt = <1000000>;
>> >> +     regulator-max-microvolt = <1450000>;
>> >> +     regulator-name = "vdd-cpu";
>> >> +};
>> >> +
>> >> +&reg_dcdc3 {
>> >> +     regulator-always-on;
>> >> +     regulator-min-microvolt = <1000000>;
>> >> +     regulator-max-microvolt = <1400000>;
>> >> +     regulator-name = "vdd-int-dll";
>> >> +};
>> >> +
>> >> +&reg_ldo1 {
>> >> +     regulator-name = "vdd-rtc";
>> >> +};
>> >> +
>> >> +&reg_ldo2 {
>> >> +     regulator-always-on;
>> >> +     regulator-min-microvolt = <3000000>;
>> >> +     regulator-max-microvolt = <3000000>;
>> >> +     regulator-name = "avcc";
>> >> +};
>> >
>> > How do reg_vcc3v3 and the other reg used in this DT (ahci, USB) fit
>> > into that?
>>
>> The following applies to boards that use AXP209.
>>
>> reg_vcc3v3 or reg_vcc3v0 is an external buck regulator with it's
>> enable pin tied to EXTEN on the AXP. This pin is controllable,
>> but we do not have the driver for it. It is possible that multiple
>> regulators are tied to this pin. I suggest not touching it without
>> the correct schematics.
>>
>> The source for usb and ahci regulators, or reg_vcc5v if you will,
>> is either the unregulated 5v from the power supply or the usb otg
>> port. For the Cubietruck, there's an additional uncontrollable
>> boost regulator that boosts the lipo battery's power up to 5v.
>>
>> On some of the Olimex boards that use higher input voltages, they
>> use an uncontrollable buck regulator to step down the voltage to
>> 5v. The Olinuxino-Micro also has a boost regulator for the battery,
>> tied to EXTEN.
>>
>> The AXP209 simply does not have enough outputs for all the needed
>> voltages.
>
> Hmm, yes, ok. It makes sense.

IPSOUT and the battery stuff should be revisited once we have
a power supply driver.

>> You could probably chain the regulators in the DT via xxx-supply
>> if it helps. But beyond that, it is hard to do anything meaningful
>> at this point. Modeling them as fixed regulators beyond our control
>> is simpler. We also do not have an IPSOUT regulator for the AXP.
>>
>> > Eventually, I think we would be able to remove
>> > sunxi-common-regulators.dtsi, or at least, expose the proper regulator
>> > hierarchy.
>>
>> The USB and SATA regulators are just GPIO enabled switches (MOSFETs)
>> or current limiters. I think these will always exist because of the
>> reference designs. Or do you want to move them back into the board
>> dts files? FWIW, I like it the way it is now. Not that I don't like
>> it to be accurate.
>
> At least providing the right hierarchy at the board level would be
> great. Adding the -supply property to all our fixed regulators
> wouldn't take too much code, and would be enough to model properly the
> regulator trees.

These are all unrelated to axp209. You'd end up with

    vin-supply = <&reg_vcc5v>;

for the usb and sata power regulators. You could put these
in sunxi-common-regulators, and override them for boards
that actually have something controllable.

ChenYu

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

* [PATCH v3 4/9] ARM: dts: sun7i: cubieboard2: add axp209 regulator nodes
@ 2015-01-13 10:30           ` Chen-Yu Tsai
  0 siblings, 0 replies; 36+ messages in thread
From: Chen-Yu Tsai @ 2015-01-13 10:30 UTC (permalink / raw)
  To: linux-arm-kernel

On Tue, Jan 13, 2015 at 5:40 PM, Maxime Ripard
<maxime.ripard@free-electrons.com> wrote:
> Hi,
>
> On Mon, Jan 12, 2015 at 05:38:12PM +0800, Chen-Yu Tsai wrote:
>> Hi,
>>
>> On Mon, Jan 12, 2015 at 5:06 PM, Maxime Ripard
>> <maxime.ripard@free-electrons.com> wrote:
>> > Hi Chen-Yu,
>> >
>> > On Mon, Jan 12, 2015 at 12:34:04PM +0800, Chen-Yu Tsai wrote:
>> >> This patch adds the regulator nodes for the axp209 by including
>> >> the axp209 dtsi. As the inputs of these regulators are from the
>> >> axp209's PS output, which is basically just a mux over the 2
>> >> inputs, it is considered to be unregulated. Thus we do not provide
>> >> input supply properties for them.
>> >>
>> >> The regulator names and constraints are based on the board
>> >> schematics and the SoC datasheet.
>> >>
>> >> DCDC2 is used as the cpu power supply. This patch also references
>> >> it from the cpu node.
>> >>
>> >> Also get rid of axp209 properties already set in axp209.dtsi.
>> >>
>> >> Signed-off-by: Chen-Yu Tsai <wens@csie.org>
>> >> ---
>> >>
>> >> changes since v2
>> >>
>> >>     none
>> >>
>> >> changes since v1:
>> >>
>> >>     - Use preprocessor include for axp209.dtsi
>> >>     - Remove incorrectly squashed axp209.dtsi patch
>> >>
>> >> ---
>> >>  arch/arm/boot/dts/sun7i-a20-cubieboard2.dts | 35 +++++++++++++++++++++++++----
>> >>  1 file changed, 31 insertions(+), 4 deletions(-)
>> >>
>> >> diff --git a/arch/arm/boot/dts/sun7i-a20-cubieboard2.dts b/arch/arm/boot/dts/sun7i-a20-cubieboard2.dts
>> >> index 18fc5db9c976..ec1fc2c8b3e3 100644
>> >> --- a/arch/arm/boot/dts/sun7i-a20-cubieboard2.dts
>> >> +++ b/arch/arm/boot/dts/sun7i-a20-cubieboard2.dts
>> >> @@ -88,13 +88,9 @@
>> >>                       status = "okay";
>> >>
>> >>                       axp209: pmic at 34 {
>> >> -                             compatible = "x-powers,axp209";
>> >>                               reg = <0x34>;
>> >>                               interrupt-parent = <&nmi_intc>;
>> >>                               interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
>> >> -
>> >> -                             interrupt-controller;
>> >> -                             #interrupt-cells = <1>;
>> >>                       };
>> >>               };
>> >>
>> >> @@ -145,3 +141,34 @@
>> >>               status = "okay";
>> >>       };
>> >>  };
>> >> +
>> >> +#include "axp209.dtsi"
>> >> +
>> >> +&cpu0 {
>> >> +     cpu-supply = <&reg_dcdc2>;
>> >> +};
>> >> +
>> >> +&reg_dcdc2 {
>> >> +     regulator-always-on;
>> >> +     regulator-min-microvolt = <1000000>;
>> >> +     regulator-max-microvolt = <1450000>;
>> >> +     regulator-name = "vdd-cpu";
>> >> +};
>> >> +
>> >> +&reg_dcdc3 {
>> >> +     regulator-always-on;
>> >> +     regulator-min-microvolt = <1000000>;
>> >> +     regulator-max-microvolt = <1400000>;
>> >> +     regulator-name = "vdd-int-dll";
>> >> +};
>> >> +
>> >> +&reg_ldo1 {
>> >> +     regulator-name = "vdd-rtc";
>> >> +};
>> >> +
>> >> +&reg_ldo2 {
>> >> +     regulator-always-on;
>> >> +     regulator-min-microvolt = <3000000>;
>> >> +     regulator-max-microvolt = <3000000>;
>> >> +     regulator-name = "avcc";
>> >> +};
>> >
>> > How do reg_vcc3v3 and the other reg used in this DT (ahci, USB) fit
>> > into that?
>>
>> The following applies to boards that use AXP209.
>>
>> reg_vcc3v3 or reg_vcc3v0 is an external buck regulator with it's
>> enable pin tied to EXTEN on the AXP. This pin is controllable,
>> but we do not have the driver for it. It is possible that multiple
>> regulators are tied to this pin. I suggest not touching it without
>> the correct schematics.
>>
>> The source for usb and ahci regulators, or reg_vcc5v if you will,
>> is either the unregulated 5v from the power supply or the usb otg
>> port. For the Cubietruck, there's an additional uncontrollable
>> boost regulator that boosts the lipo battery's power up to 5v.
>>
>> On some of the Olimex boards that use higher input voltages, they
>> use an uncontrollable buck regulator to step down the voltage to
>> 5v. The Olinuxino-Micro also has a boost regulator for the battery,
>> tied to EXTEN.
>>
>> The AXP209 simply does not have enough outputs for all the needed
>> voltages.
>
> Hmm, yes, ok. It makes sense.

IPSOUT and the battery stuff should be revisited once we have
a power supply driver.

>> You could probably chain the regulators in the DT via xxx-supply
>> if it helps. But beyond that, it is hard to do anything meaningful
>> at this point. Modeling them as fixed regulators beyond our control
>> is simpler. We also do not have an IPSOUT regulator for the AXP.
>>
>> > Eventually, I think we would be able to remove
>> > sunxi-common-regulators.dtsi, or at least, expose the proper regulator
>> > hierarchy.
>>
>> The USB and SATA regulators are just GPIO enabled switches (MOSFETs)
>> or current limiters. I think these will always exist because of the
>> reference designs. Or do you want to move them back into the board
>> dts files? FWIW, I like it the way it is now. Not that I don't like
>> it to be accurate.
>
> At least providing the right hierarchy at the board level would be
> great. Adding the -supply property to all our fixed regulators
> wouldn't take too much code, and would be enough to model properly the
> regulator trees.

These are all unrelated to axp209. You'd end up with

    vin-supply = <&reg_vcc5v>;

for the usb and sata power regulators. You could put these
in sunxi-common-regulators, and override them for boards
that actually have something controllable.

ChenYu

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

* Re: [PATCH v3 0/9] ARM: sunxi: Support cpufreq on sun[457]i
  2015-01-12  9:10   ` Maxime Ripard
@ 2015-01-13 13:53     ` Maxime Ripard
  -1 siblings, 0 replies; 36+ messages in thread
From: Maxime Ripard @ 2015-01-13 13:53 UTC (permalink / raw)
  To: Chen-Yu Tsai
  Cc: linux-pm, Dmitry Torokhov, Eduardo Valentin, Hans de Goede,
	linux-input, Zhang Rui, linux-arm-kernel

[-- Attachment #1: Type: text/plain, Size: 2210 bytes --]

On Mon, Jan 12, 2015 at 10:10:20AM +0100, Maxime Ripard wrote:
> On Mon, Jan 12, 2015 at 12:34:00PM +0800, Chen-Yu Tsai wrote:
> > Hi,
> > 
> > This is v3 of the cpufreq support series for sunxi. The series has been
> > rebased onto the latest sunxi-next. I've dropped all the patches Maxime
> > merged. This includes "ARM: sunxi: Register cpufreq-dt for sun[45678]i"
> > which was merged but not published yet.
> > 
> > Individual changes since v2 are listed within each patch.
> > 
> > 
> > Original cover letter follows:
> > 
> > This series adds support cpufreq support for sun[457]i using cpufreq-dt.
> > This also supports passive cpu cooling (thermal throttling) using thermal
> > zones with the temperature sensor in the SoC.
> > 
> > The operating points for the supported platforms were taken from the
> > linux-sunxi FEX files repository. The majority of boards use the same
> > settings. Only with sun7i do we see slight variations, either disabling
> > some frequencies, or bumping up the voltage a bit. In either case this
> > can be done by limiting the constraints for the supply regulator, or 
> > overriding the OPP table in the board dts file.
> > 
> > On sun7i, there is an additional operating point not found in the FEX
> > files, 960 MHz @ 1.4V, which is the full speed setting in both u-boot-sunxi
> > and mainline u-boot.
> > 
> > The series has been tested on the 4 boards I have. With cpufreq active,
> > the effects are visible as a decrease in SoC internal temperature.
> > Stability for the operating points has been tested using:
> > 
> >   http://linux-sunxi.org/Hardware_Reliability_Tests#Reliability_of_cpufreq_voltage.2Ffrequency_settings
> > 
> > More real world usage feedback is appreciated. Thermal throttling hasn't
> > been tested much, due to not being able to generate enough load without
> > the GPU for the SoC to heat up. Also on sun4i, the temperature sensor
> > still hasn't been calibrated, so the readings are highly inaccurate.
> 
> Applied 2, 3, 6 and 8.

And I just applied 4, 5, 7 and 9.

Thanks! 

-- 
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

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

* [PATCH v3 0/9] ARM: sunxi: Support cpufreq on sun[457]i
@ 2015-01-13 13:53     ` Maxime Ripard
  0 siblings, 0 replies; 36+ messages in thread
From: Maxime Ripard @ 2015-01-13 13:53 UTC (permalink / raw)
  To: linux-arm-kernel

On Mon, Jan 12, 2015 at 10:10:20AM +0100, Maxime Ripard wrote:
> On Mon, Jan 12, 2015 at 12:34:00PM +0800, Chen-Yu Tsai wrote:
> > Hi,
> > 
> > This is v3 of the cpufreq support series for sunxi. The series has been
> > rebased onto the latest sunxi-next. I've dropped all the patches Maxime
> > merged. This includes "ARM: sunxi: Register cpufreq-dt for sun[45678]i"
> > which was merged but not published yet.
> > 
> > Individual changes since v2 are listed within each patch.
> > 
> > 
> > Original cover letter follows:
> > 
> > This series adds support cpufreq support for sun[457]i using cpufreq-dt.
> > This also supports passive cpu cooling (thermal throttling) using thermal
> > zones with the temperature sensor in the SoC.
> > 
> > The operating points for the supported platforms were taken from the
> > linux-sunxi FEX files repository. The majority of boards use the same
> > settings. Only with sun7i do we see slight variations, either disabling
> > some frequencies, or bumping up the voltage a bit. In either case this
> > can be done by limiting the constraints for the supply regulator, or 
> > overriding the OPP table in the board dts file.
> > 
> > On sun7i, there is an additional operating point not found in the FEX
> > files, 960 MHz @ 1.4V, which is the full speed setting in both u-boot-sunxi
> > and mainline u-boot.
> > 
> > The series has been tested on the 4 boards I have. With cpufreq active,
> > the effects are visible as a decrease in SoC internal temperature.
> > Stability for the operating points has been tested using:
> > 
> >   http://linux-sunxi.org/Hardware_Reliability_Tests#Reliability_of_cpufreq_voltage.2Ffrequency_settings
> > 
> > More real world usage feedback is appreciated. Thermal throttling hasn't
> > been tested much, due to not being able to generate enough load without
> > the GPU for the SoC to heat up. Also on sun4i, the temperature sensor
> > still hasn't been calibrated, so the readings are highly inaccurate.
> 
> Applied 2, 3, 6 and 8.

And I just applied 4, 5, 7 and 9.

Thanks! 

-- 
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20150113/09ad7620/attachment.sig>

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

* Re: [PATCH v3 4/9] ARM: dts: sun7i: cubieboard2: add axp209 regulator nodes
  2015-01-13 10:30           ` Chen-Yu Tsai
@ 2015-01-14 19:30             ` Maxime Ripard
  -1 siblings, 0 replies; 36+ messages in thread
From: Maxime Ripard @ 2015-01-14 19:30 UTC (permalink / raw)
  To: Chen-Yu Tsai
  Cc: Dmitry Torokhov, Zhang Rui, Eduardo Valentin, Hans de Goede,
	linux-input, linux-arm-kernel, linux-pm

[-- Attachment #1: Type: text/plain, Size: 1492 bytes --]

On Tue, Jan 13, 2015 at 06:30:51PM +0800, Chen-Yu Tsai wrote:
> >> You could probably chain the regulators in the DT via xxx-supply
> >> if it helps. But beyond that, it is hard to do anything meaningful
> >> at this point. Modeling them as fixed regulators beyond our control
> >> is simpler. We also do not have an IPSOUT regulator for the AXP.
> >>
> >> > Eventually, I think we would be able to remove
> >> > sunxi-common-regulators.dtsi, or at least, expose the proper regulator
> >> > hierarchy.
> >>
> >> The USB and SATA regulators are just GPIO enabled switches (MOSFETs)
> >> or current limiters. I think these will always exist because of the
> >> reference designs. Or do you want to move them back into the board
> >> dts files? FWIW, I like it the way it is now. Not that I don't like
> >> it to be accurate.
> >
> > At least providing the right hierarchy at the board level would be
> > great. Adding the -supply property to all our fixed regulators
> > wouldn't take too much code, and would be enough to model properly the
> > regulator trees.
> 
> These are all unrelated to axp209. You'd end up with
> 
>     vin-supply = <&reg_vcc5v>;
> 
> for the usb and sata power regulators. You could put these
> in sunxi-common-regulators, and override them for boards
> that actually have something controllable.

Ok. Fine then.

Maxime

-- 
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

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

* [PATCH v3 4/9] ARM: dts: sun7i: cubieboard2: add axp209 regulator nodes
@ 2015-01-14 19:30             ` Maxime Ripard
  0 siblings, 0 replies; 36+ messages in thread
From: Maxime Ripard @ 2015-01-14 19:30 UTC (permalink / raw)
  To: linux-arm-kernel

On Tue, Jan 13, 2015 at 06:30:51PM +0800, Chen-Yu Tsai wrote:
> >> You could probably chain the regulators in the DT via xxx-supply
> >> if it helps. But beyond that, it is hard to do anything meaningful
> >> at this point. Modeling them as fixed regulators beyond our control
> >> is simpler. We also do not have an IPSOUT regulator for the AXP.
> >>
> >> > Eventually, I think we would be able to remove
> >> > sunxi-common-regulators.dtsi, or at least, expose the proper regulator
> >> > hierarchy.
> >>
> >> The USB and SATA regulators are just GPIO enabled switches (MOSFETs)
> >> or current limiters. I think these will always exist because of the
> >> reference designs. Or do you want to move them back into the board
> >> dts files? FWIW, I like it the way it is now. Not that I don't like
> >> it to be accurate.
> >
> > At least providing the right hierarchy at the board level would be
> > great. Adding the -supply property to all our fixed regulators
> > wouldn't take too much code, and would be enough to model properly the
> > regulator trees.
> 
> These are all unrelated to axp209. You'd end up with
> 
>     vin-supply = <&reg_vcc5v>;
> 
> for the usb and sata power regulators. You could put these
> in sunxi-common-regulators, and override them for boards
> that actually have something controllable.

Ok. Fine then.

Maxime

-- 
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20150114/387122b6/attachment.sig>

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

end of thread, other threads:[~2015-01-14 19:35 UTC | newest]

Thread overview: 36+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-01-12  4:34 [PATCH v3 0/9] ARM: sunxi: Support cpufreq on sun[457]i Chen-Yu Tsai
2015-01-12  4:34 ` Chen-Yu Tsai
2015-01-12  4:34 ` [PATCH v3 1/9] Input: sun4i-ts: Add thermal zone sensor support Chen-Yu Tsai
2015-01-12  4:34   ` Chen-Yu Tsai
2015-01-12 12:08   ` Eduardo Valentin
2015-01-12 12:08     ` Eduardo Valentin
2015-01-12  4:34 ` [PATCH v3 2/9] ARM: dts: sunxi: Add dtsi for AXP209 PMIC Chen-Yu Tsai
2015-01-12  4:34   ` Chen-Yu Tsai
2015-01-12  4:34 ` [PATCH v3 3/9] ARM: dts: sun7i: Add cpu thermal zones to dtsi Chen-Yu Tsai
2015-01-12  4:34   ` Chen-Yu Tsai
2015-01-12  4:34 ` [PATCH v3 4/9] ARM: dts: sun7i: cubieboard2: add axp209 regulator nodes Chen-Yu Tsai
2015-01-12  4:34   ` Chen-Yu Tsai
2015-01-12  9:06   ` Maxime Ripard
2015-01-12  9:06     ` Maxime Ripard
2015-01-12  9:38     ` Chen-Yu Tsai
2015-01-12  9:38       ` Chen-Yu Tsai
2015-01-13  9:40       ` Maxime Ripard
2015-01-13  9:40         ` Maxime Ripard
2015-01-13 10:30         ` Chen-Yu Tsai
2015-01-13 10:30           ` Chen-Yu Tsai
2015-01-14 19:30           ` Maxime Ripard
2015-01-14 19:30             ` Maxime Ripard
2015-01-12  4:34 ` [PATCH v3 5/9] ARM: dts: sun7i: cubietruck: " Chen-Yu Tsai
2015-01-12  4:34   ` Chen-Yu Tsai
2015-01-12  4:34 ` [PATCH v3 6/9] ARM: dts: sun5i: Add cpu thermal zones to dtsi Chen-Yu Tsai
2015-01-12  4:34   ` Chen-Yu Tsai
2015-01-12  4:34 ` [PATCH v3 7/9] ARM: dts: sun5i: hsg-h702: add axp209 regulator nodes Chen-Yu Tsai
2015-01-12  4:34   ` Chen-Yu Tsai
2015-01-12  4:34 ` [PATCH v3 8/9] ARM: dts: sun4i: Add cpu thermal zones to dtsi Chen-Yu Tsai
2015-01-12  4:34   ` Chen-Yu Tsai
2015-01-12  4:34 ` [PATCH v3 9/9] ARM: dts: sun4i: cubieboard: add axp209 regulator nodes Chen-Yu Tsai
2015-01-12  4:34   ` Chen-Yu Tsai
2015-01-12  9:10 ` [PATCH v3 0/9] ARM: sunxi: Support cpufreq on sun[457]i Maxime Ripard
2015-01-12  9:10   ` Maxime Ripard
2015-01-13 13:53   ` Maxime Ripard
2015-01-13 13:53     ` Maxime Ripard

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.