linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 00/17] ARM: sunxi: Support cpufreq on sun[457]i
@ 2015-01-06  2:35 Chen-Yu Tsai
  2015-01-06  2:35 ` [PATCH 01/17] ARM: sunxi: Register cpufreq-dt for sun[45678]i Chen-Yu Tsai
                   ` (16 more replies)
  0 siblings, 17 replies; 41+ messages in thread
From: Chen-Yu Tsai @ 2015-01-06  2:35 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 everyone,

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.


Patch 1 registers the cpufreq-dt platform device for all known single
cluster (all cores sharing the same supply and clock line) sunxi
platforms with a late init call.

Patch 2 makes the sunxi mux clocks propagate clk_set_rate calls to
parents. This is needed as the cpu clocks are simple mux clocks. The
actual changing part is the parent PLL.

Patch 3 adds thermal zone sensor support to sun4i-ts, which already
has hwmon support. This is used for thermal throttling.

Patch 4 adds a dtsi file for the AXP209 PMIC, which holds a list of
regulators and some common properties.

Patch 5 adds #thermal-sensor-cells to sun[457]i dtsi files for the
thermal framework.

Patch 6 adds the cpu clock and OPP to sun7i dtsi. At this point cpufreq
is usable. However the OPP does have points with over-voltage (> 1.4V).
Without the regulator reference, bumping the frequency up may be
unstable.

Patch 7 adds thermal zones for passive cooling to sun7i dtsi. This
includes a constant which should be a macro. Maxime is working on
cleaning up the sunxi dts files, so I'll leave this bit for later
to avoid repeated work and conflicts.

Patch 8 and 9 adds the axp209 regulator constraints and references
for cubieboard2 and cubietruck.

Patches 10~15 do the same as 7~9, except for sun4i and sun5i.

Patch 16 enables support for cpufreq and thermal throttling in
sunxi_defconfig.

Patch 17 does the same for multi_v7_defconfig.


The thermal sensor bits are pretty standard. Nevertheless I've included
the thermal subsystem supporters.

Dmitry, could you pick up patch 3?

Maxime, could you take a look at the rest?


Thanks
ChenYu


Chen-Yu Tsai (17):
  ARM: sunxi: Register cpufreq-dt for sun[45678]i
  clk: sunxi: Propagate rate changes to parent for mux clocks
  Input: sun4i-ts: Add thermal zone sensor support
  ARM: dts: sunxi: Add dtsi for AXP209 PMIC
  ARM: dts: sunxi: Enable thermal sensor support for RTP on sun[457]i
  ARM: dts: sun7i: Add cpu clock reference and operating points to dtsi
  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 clock reference and operating points to dtsi
  ARM: dts: sun5i: Add cpu thermal zones to dtsi
  ARM: dts: sun5i: hsg-h702: add axp209 regulator nodes
  ARM: dts: sun4i: Add cpu clock reference and operating points to dtsi
  ARM: dts: sun4i: Add cpu thermal zones to dtsi
  ARM: dts: sun4i: cubieboard: add axp209 regulator nodes
  ARM: sunxi_defconfig: Enable TOUCHSCREEN_SUN4I, CPUFREQ_DT,
    CPU_THERMAL
  ARM: multi_v7_defconfig: Enable TOUCHSCREEN_SUN4I, CPU_THERMAL

 .../bindings/input/touchscreen/sun4i.txt           |  1 +
 arch/arm/boot/dts/axp209.dtsi                      | 91 ++++++++++++++++++++++
 arch/arm/boot/dts/sun4i-a10-cubieboard.dts         | 35 ++++++++-
 arch/arm/boot/dts/sun4i-a10.dtsi                   | 48 +++++++++++-
 arch/arm/boot/dts/sun5i-a10s.dtsi                  |  1 +
 arch/arm/boot/dts/sun5i-a13-hsg-h702.dts           | 46 +++++++++--
 arch/arm/boot/dts/sun5i-a13.dtsi                   | 51 +++++++++++-
 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                   | 51 +++++++++++-
 arch/arm/configs/multi_v7_defconfig                |  2 +
 arch/arm/configs/sunxi_defconfig                   |  7 +-
 arch/arm/mach-sunxi/sunxi.c                        | 10 +++
 drivers/clk/sunxi/clk-sunxi.c                      |  2 +-
 drivers/input/touchscreen/sun4i-ts.c               | 27 +++++++
 15 files changed, 417 insertions(+), 25 deletions(-)
 create mode 100644 arch/arm/boot/dts/axp209.dtsi

-- 
2.1.4


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

* [PATCH 01/17] ARM: sunxi: Register cpufreq-dt for sun[45678]i
  2015-01-06  2:35 [PATCH 00/17] ARM: sunxi: Support cpufreq on sun[457]i Chen-Yu Tsai
@ 2015-01-06  2:35 ` Chen-Yu Tsai
  2015-01-06 15:55   ` Maxime Ripard
  2015-01-07 10:23   ` Maxime Ripard
  2015-01-06  2:35 ` [PATCH 02/17] clk: sunxi: Propagate rate changes to parent for mux clocks Chen-Yu Tsai
                   ` (15 subsequent siblings)
  16 siblings, 2 replies; 41+ messages in thread
From: Chen-Yu Tsai @ 2015-01-06  2:35 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

On sun[45678]i, we have one cluster of identical cores sharing a
clock, which is ideal for using cpufreq-dt. Register a platform
device for cpufreq-dt.

Signed-off-by: Chen-Yu Tsai <wens@csie.org>
---
 arch/arm/mach-sunxi/sunxi.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/arch/arm/mach-sunxi/sunxi.c b/arch/arm/mach-sunxi/sunxi.c
index d4bb2395d39c..1bc811a74a9f 100644
--- a/arch/arm/mach-sunxi/sunxi.c
+++ b/arch/arm/mach-sunxi/sunxi.c
@@ -13,9 +13,15 @@
 #include <linux/clk-provider.h>
 #include <linux/clocksource.h>
 #include <linux/init.h>
+#include <linux/platform_device.h>
 
 #include <asm/mach/arch.h>
 
+static void __init sunxi_dt_cpufreq_init(void)
+{
+	platform_device_register_simple("cpufreq-dt", -1, NULL, 0);
+}
+
 static const char * const sunxi_board_dt_compat[] = {
 	"allwinner,sun4i-a10",
 	"allwinner,sun5i-a10s",
@@ -25,6 +31,7 @@ static const char * const sunxi_board_dt_compat[] = {
 
 DT_MACHINE_START(SUNXI_DT, "Allwinner A1X (Device Tree)")
 	.dt_compat	= sunxi_board_dt_compat,
+	.init_late	= sunxi_dt_cpufreq_init,
 MACHINE_END
 
 static const char * const sun6i_board_dt_compat[] = {
@@ -45,6 +52,7 @@ static void __init sun6i_timer_init(void)
 DT_MACHINE_START(SUN6I_DT, "Allwinner sun6i (A31) Family")
 	.init_time	= sun6i_timer_init,
 	.dt_compat	= sun6i_board_dt_compat,
+	.init_late	= sunxi_dt_cpufreq_init,
 MACHINE_END
 
 static const char * const sun7i_board_dt_compat[] = {
@@ -54,6 +62,7 @@ static const char * const sun7i_board_dt_compat[] = {
 
 DT_MACHINE_START(SUN7I_DT, "Allwinner sun7i (A20) Family")
 	.dt_compat	= sun7i_board_dt_compat,
+	.init_late	= sunxi_dt_cpufreq_init,
 MACHINE_END
 
 static const char * const sun8i_board_dt_compat[] = {
@@ -63,6 +72,7 @@ static const char * const sun8i_board_dt_compat[] = {
 
 DT_MACHINE_START(SUN8I_DT, "Allwinner sun8i (A23) Family")
 	.dt_compat	= sun8i_board_dt_compat,
+	.init_late	= sunxi_dt_cpufreq_init,
 MACHINE_END
 
 static const char * const sun9i_board_dt_compat[] = {
-- 
2.1.4


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

* [PATCH 02/17] clk: sunxi: Propagate rate changes to parent for mux clocks
  2015-01-06  2:35 [PATCH 00/17] ARM: sunxi: Support cpufreq on sun[457]i Chen-Yu Tsai
  2015-01-06  2:35 ` [PATCH 01/17] ARM: sunxi: Register cpufreq-dt for sun[45678]i Chen-Yu Tsai
@ 2015-01-06  2:35 ` Chen-Yu Tsai
  2015-01-06 16:00   ` Maxime Ripard
  2015-01-06  2:35 ` [PATCH 03/17] Input: sun4i-ts: Add thermal zone sensor support Chen-Yu Tsai
                   ` (14 subsequent siblings)
  16 siblings, 1 reply; 41+ messages in thread
From: Chen-Yu Tsai @ 2015-01-06  2:35 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 cpu clock on sunxi machines is just a mux clock, which is normally
fed by the main PLL, but can be muxed to the main or low power oscillator.

Make the mux clock propagate rate changes to its parent, so we can
change the clock rate of the PLL, and thus actually implement rate
changing on the cpu clock.

This patch also removes the no reparenting limit.

Signed-off-by: Chen-Yu Tsai <wens@csie.org>
---
 drivers/clk/sunxi/clk-sunxi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/clk/sunxi/clk-sunxi.c b/drivers/clk/sunxi/clk-sunxi.c
index d8f17bbcb8e3..df18a2af33ad 100644
--- a/drivers/clk/sunxi/clk-sunxi.c
+++ b/drivers/clk/sunxi/clk-sunxi.c
@@ -778,7 +778,7 @@ static void __init sunxi_mux_clk_setup(struct device_node *node,
 	of_property_read_string(node, "clock-output-names", &clk_name);
 
 	clk = clk_register_mux(NULL, clk_name, parents, i,
-			       CLK_SET_RATE_NO_REPARENT, reg,
+			       CLK_SET_RATE_PARENT, reg,
 			       data->shift, SUNXI_MUX_GATE_WIDTH,
 			       0, &clk_lock);
 
-- 
2.1.4


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

* [PATCH 03/17] Input: sun4i-ts: Add thermal zone sensor support
  2015-01-06  2:35 [PATCH 00/17] ARM: sunxi: Support cpufreq on sun[457]i Chen-Yu Tsai
  2015-01-06  2:35 ` [PATCH 01/17] ARM: sunxi: Register cpufreq-dt for sun[45678]i Chen-Yu Tsai
  2015-01-06  2:35 ` [PATCH 02/17] clk: sunxi: Propagate rate changes to parent for mux clocks Chen-Yu Tsai
@ 2015-01-06  2:35 ` Chen-Yu Tsai
  2015-01-06 15:24   ` Eduardo Valentin
  2015-01-06  2:35 ` [PATCH 04/17] ARM: dts: sunxi: Add dtsi for AXP209 PMIC Chen-Yu Tsai
                   ` (13 subsequent siblings)
  16 siblings, 1 reply; 41+ messages in thread
From: Chen-Yu Tsai @ 2015-01-06  2:35 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.

Signed-off-by: Chen-Yu Tsai <wens@csie.org>
---
 .../bindings/input/touchscreen/sun4i.txt           |  1 +
 drivers/input/touchscreen/sun4i-ts.c               | 27 ++++++++++++++++++++++
 2 files changed, 28 insertions(+)

diff --git a/Documentation/devicetree/bindings/input/touchscreen/sun4i.txt b/Documentation/devicetree/bindings/input/touchscreen/sun4i.txt
index aef57791f40b..7f1110adbd24 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
diff --git a/drivers/input/touchscreen/sun4i-ts.c b/drivers/input/touchscreen/sun4i-ts.c
index 28a06749ae42..b6e9043446d6 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,6 +182,23 @@ static void sun4i_ts_close(struct input_dev *dev)
 	writel(TEMP_IRQ_EN(1), ts->base + TP_INT_FIFOC);
 }
 
+static int get_temp(void *data, long *temp)
+{
+	struct sun4i_ts_data *ts = data;
+
+	/* No temp_data until the first irq */
+	if (ts->temp_data == -1)
+		return -EAGAIN;
+
+	*temp = (ts->temp_data - 1447) * 100;
+
+	return 0;
+}
+
+static struct thermal_zone_of_device_ops sun4i_ts_tz_ops = {
+	.get_temp = get_temp,
+};
+
 static ssize_t show_temp(struct device *dev, struct device_attribute *devattr,
 			 char *buf)
 {
@@ -288,6 +307,11 @@ static int sun4i_ts_probe(struct platform_device *pdev)
 	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) {
@@ -310,6 +334,9 @@ static int sun4i_ts_remove(struct platform_device *pdev)
 	if (ts->input)
 		input_unregister_device(ts->input);
 
+	if (ts->tz)
+		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] 41+ messages in thread

* [PATCH 04/17] ARM: dts: sunxi: Add dtsi for AXP209 PMIC
  2015-01-06  2:35 [PATCH 00/17] ARM: sunxi: Support cpufreq on sun[457]i Chen-Yu Tsai
                   ` (2 preceding siblings ...)
  2015-01-06  2:35 ` [PATCH 03/17] Input: sun4i-ts: Add thermal zone sensor support Chen-Yu Tsai
@ 2015-01-06  2:35 ` Chen-Yu Tsai
  2015-01-06 15:58   ` Maxime Ripard
  2015-01-06  2:35 ` [PATCH 05/17] ARM: dts: sunxi: Enable thermal sensor support for RTP on sun[457]i Chen-Yu Tsai
                   ` (12 subsequent siblings)
  16 siblings, 1 reply; 41+ messages in thread
From: Chen-Yu Tsai @ 2015-01-06  2:35 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>
---
 arch/arm/boot/dts/axp209.dtsi | 87 +++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 87 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..3c38cbafe285
--- /dev/null
+++ b/arch/arm/boot/dts/axp209.dtsi
@@ -0,0 +1,87 @@
+/*
+ * 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 {
+	regulators {
+		/* Default work frequency for buck regulators */
+		x-powers,dcdc-freq = <1500>;
+
+		/* This section lists all the regulators */
+		reg_dcdc2: dcdc2 {
+		};
+
+		reg_dcdc3: dcdc3 {
+		};
+
+		reg_ldo1: ldo1 {
+			/* LDO1 is a fixed output regulator */
+			regulator-always-on;
+			regulator-min-microvolt = <1300000>;
+			regulator-max-microvolt = <1300000>;
+		};
+
+		reg_ldo2: ldo2 {
+		};
+
+		reg_ldo3: ldo3 {
+		};
+
+		reg_ldo4: ldo4 {
+		};
+
+		reg_ldo5: ldo5 {
+		};
+	};
+};
-- 
2.1.4


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

* [PATCH 05/17] ARM: dts: sunxi: Enable thermal sensor support for RTP on sun[457]i
  2015-01-06  2:35 [PATCH 00/17] ARM: sunxi: Support cpufreq on sun[457]i Chen-Yu Tsai
                   ` (3 preceding siblings ...)
  2015-01-06  2:35 ` [PATCH 04/17] ARM: dts: sunxi: Add dtsi for AXP209 PMIC Chen-Yu Tsai
@ 2015-01-06  2:35 ` Chen-Yu Tsai
  2015-01-06 15:25   ` Eduardo Valentin
  2015-01-06 15:52   ` Maxime Ripard
  2015-01-06  2:35 ` [PATCH 06/17] ARM: dts: sun7i: Add cpu clock reference and operating points to dtsi Chen-Yu Tsai
                   ` (11 subsequent siblings)
  16 siblings, 2 replies; 41+ messages in thread
From: Chen-Yu Tsai @ 2015-01-06  2:35 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

Now that the resistive touchpanel driver supports thermal sensors,
add the "#thermal-sensor-cells" property as required by the thermal
framework.

Signed-off-by: Chen-Yu Tsai <wens@csie.org>
---
 arch/arm/boot/dts/sun4i-a10.dtsi  | 1 +
 arch/arm/boot/dts/sun5i-a10s.dtsi | 1 +
 arch/arm/boot/dts/sun5i-a13.dtsi  | 1 +
 arch/arm/boot/dts/sun7i-a20.dtsi  | 1 +
 4 files changed, 4 insertions(+)

diff --git a/arch/arm/boot/dts/sun4i-a10.dtsi b/arch/arm/boot/dts/sun4i-a10.dtsi
index 847d5e09fcfb..f92635ecb937 100644
--- a/arch/arm/boot/dts/sun4i-a10.dtsi
+++ b/arch/arm/boot/dts/sun4i-a10.dtsi
@@ -712,6 +712,7 @@
 			compatible = "allwinner,sun4i-a10-ts";
 			reg = <0x01c25000 0x100>;
 			interrupts = <29>;
+			#thermal-sensor-cells = <0>;
 		};
 
 		uart0: serial@01c28000 {
diff --git a/arch/arm/boot/dts/sun5i-a10s.dtsi b/arch/arm/boot/dts/sun5i-a10s.dtsi
index 3c3c1920788a..8d324ef7e46e 100644
--- a/arch/arm/boot/dts/sun5i-a10s.dtsi
+++ b/arch/arm/boot/dts/sun5i-a10s.dtsi
@@ -535,6 +535,7 @@
 			compatible = "allwinner,sun4i-a10-ts";
 			reg = <0x01c25000 0x100>;
 			interrupts = <29>;
+			#thermal-sensor-cells = <0>;
 		};
 
 		uart0: serial@01c28000 {
diff --git a/arch/arm/boot/dts/sun5i-a13.dtsi b/arch/arm/boot/dts/sun5i-a13.dtsi
index 2448d7f38d6b..4fe0bd192e29 100644
--- a/arch/arm/boot/dts/sun5i-a13.dtsi
+++ b/arch/arm/boot/dts/sun5i-a13.dtsi
@@ -469,6 +469,7 @@
 			compatible = "allwinner,sun4i-a10-ts";
 			reg = <0x01c25000 0x100>;
 			interrupts = <29>;
+			#thermal-sensor-cells = <0>;
 		};
 
 		uart1: serial@01c28400 {
diff --git a/arch/arm/boot/dts/sun7i-a20.dtsi b/arch/arm/boot/dts/sun7i-a20.dtsi
index e21ce5992d56..01c7133e699c 100644
--- a/arch/arm/boot/dts/sun7i-a20.dtsi
+++ b/arch/arm/boot/dts/sun7i-a20.dtsi
@@ -926,6 +926,7 @@
 			compatible = "allwinner,sun4i-a10-ts";
 			reg = <0x01c25000 0x100>;
 			interrupts = <0 29 4>;
+			#thermal-sensor-cells = <0>;
 		};
 
 		uart0: serial@01c28000 {
-- 
2.1.4


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

* [PATCH 06/17] ARM: dts: sun7i: Add cpu clock reference and operating points to dtsi
  2015-01-06  2:35 [PATCH 00/17] ARM: sunxi: Support cpufreq on sun[457]i Chen-Yu Tsai
                   ` (4 preceding siblings ...)
  2015-01-06  2:35 ` [PATCH 05/17] ARM: dts: sunxi: Enable thermal sensor support for RTP on sun[457]i Chen-Yu Tsai
@ 2015-01-06  2:35 ` Chen-Yu Tsai
  2015-01-06 16:07   ` Maxime Ripard
  2015-01-06  2:35 ` [PATCH 07/17] ARM: dts: sun7i: Add cpu thermal zones " Chen-Yu Tsai
                   ` (10 subsequent siblings)
  16 siblings, 1 reply; 41+ messages in thread
From: Chen-Yu Tsai @ 2015-01-06  2:35 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 cpu core is clocked from the "cpu" clock. Add a reference to it
in the first cpu node. Also add "cpu0" label to the node.

The operating points were taken from the A20 FEX files in the
sunxi-boards repository. Not all boards have the same settings. The
settings in this patch are the most generic ones.

Signed-off-by: Chen-Yu Tsai <wens@csie.org>
---
 arch/arm/boot/dts/sun7i-a20.dtsi | 18 +++++++++++++++++-
 1 file changed, 17 insertions(+), 1 deletion(-)

diff --git a/arch/arm/boot/dts/sun7i-a20.dtsi b/arch/arm/boot/dts/sun7i-a20.dtsi
index 01c7133e699c..887b0521bbfb 100644
--- a/arch/arm/boot/dts/sun7i-a20.dtsi
+++ b/arch/arm/boot/dts/sun7i-a20.dtsi
@@ -82,10 +82,26 @@
 		#address-cells = <1>;
 		#size-cells = <0>;
 
-		cpu@0 {
+		cpu0: cpu@0 {
 			compatible = "arm,cortex-a7";
 			device_type = "cpu";
 			reg = <0>;
+			clocks = <&cpu>;
+			clock-latency = <244144>; /* 8 32k periods */
+			operating-points = <
+				/* kHz    uV */
+				1008000 1450000
+				960000  1400000
+				912000  1400000
+				864000  1300000
+				720000  1200000
+				528000  1100000
+				312000  1000000
+				144000  900000
+				>;
+			#cooling-cells = <2>;
+			cooling-min-level = <0>;
+			cooling-max-level = <7>;
 		};
 
 		cpu@1 {
-- 
2.1.4


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

* [PATCH 07/17] ARM: dts: sun7i: Add cpu thermal zones to dtsi
  2015-01-06  2:35 [PATCH 00/17] ARM: sunxi: Support cpufreq on sun[457]i Chen-Yu Tsai
                   ` (5 preceding siblings ...)
  2015-01-06  2:35 ` [PATCH 06/17] ARM: dts: sun7i: Add cpu clock reference and operating points to dtsi Chen-Yu Tsai
@ 2015-01-06  2:35 ` Chen-Yu Tsai
  2015-01-06 15:28   ` Eduardo Valentin
  2015-01-06  2:35 ` [PATCH 08/17] ARM: dts: sun7i: cubieboard2: add axp209 regulator nodes Chen-Yu Tsai
                   ` (9 subsequent siblings)
  16 siblings, 1 reply; 41+ messages in thread
From: Chen-Yu Tsai @ 2015-01-06  2:35 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>
---
 arch/arm/boot/dts/sun7i-a20.dtsi | 32 ++++++++++++++++++++++++++++++++
 1 file changed, 32 insertions(+)

diff --git a/arch/arm/boot/dts/sun7i-a20.dtsi b/arch/arm/boot/dts/sun7i-a20.dtsi
index 887b0521bbfb..951e99ed3aa9 100644
--- a/arch/arm/boot/dts/sun7i-a20.dtsi
+++ b/arch/arm/boot/dts/sun7i-a20.dtsi
@@ -111,6 +111,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 (-1) (-1)>;
+				};
+			};
+
+			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] 41+ messages in thread

* [PATCH 08/17] ARM: dts: sun7i: cubieboard2: add axp209 regulator nodes
  2015-01-06  2:35 [PATCH 00/17] ARM: sunxi: Support cpufreq on sun[457]i Chen-Yu Tsai
                   ` (6 preceding siblings ...)
  2015-01-06  2:35 ` [PATCH 07/17] ARM: dts: sun7i: Add cpu thermal zones " Chen-Yu Tsai
@ 2015-01-06  2:35 ` Chen-Yu Tsai
  2015-01-06 16:11   ` Maxime Ripard
  2015-01-06  2:35 ` [PATCH 09/17] ARM: dts: sun7i: cubietruck: " Chen-Yu Tsai
                   ` (8 subsequent siblings)
  16 siblings, 1 reply; 41+ messages in thread
From: Chen-Yu Tsai @ 2015-01-06  2:35 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>
---
 arch/arm/boot/dts/axp209.dtsi               |  4 ++++
 arch/arm/boot/dts/sun7i-a20-cubieboard2.dts | 35 +++++++++++++++++++++++++----
 2 files changed, 35 insertions(+), 4 deletions(-)

diff --git a/arch/arm/boot/dts/axp209.dtsi b/arch/arm/boot/dts/axp209.dtsi
index 3c38cbafe285..fec3364b2110 100644
--- a/arch/arm/boot/dts/axp209.dtsi
+++ b/arch/arm/boot/dts/axp209.dtsi
@@ -54,6 +54,10 @@
  */
 
 &axp209 {
+	compatible = "x-powers,axp209";
+	interrupt-controller;
+	#interrupt-cells = <1>;
+
 	regulators {
 		/* Default work frequency for buck regulators */
 		x-powers,dcdc-freq = <1500>;
diff --git a/arch/arm/boot/dts/sun7i-a20-cubieboard2.dts b/arch/arm/boot/dts/sun7i-a20-cubieboard2.dts
index 53680983461a..61e61c0eb829 100644
--- a/arch/arm/boot/dts/sun7i-a20-cubieboard2.dts
+++ b/arch/arm/boot/dts/sun7i-a20-cubieboard2.dts
@@ -84,13 +84,9 @@
 			status = "okay";
 
 			axp209: pmic@34 {
-				compatible = "x-powers,axp209";
 				reg = <0x34>;
 				interrupt-parent = <&nmi_intc>;
 				interrupts = <0 8>;
-
-				interrupt-controller;
-				#interrupt-cells = <1>;
 			};
 		};
 
@@ -141,3 +137,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] 41+ messages in thread

* [PATCH 09/17] ARM: dts: sun7i: cubietruck: add axp209 regulator nodes
  2015-01-06  2:35 [PATCH 00/17] ARM: sunxi: Support cpufreq on sun[457]i Chen-Yu Tsai
                   ` (7 preceding siblings ...)
  2015-01-06  2:35 ` [PATCH 08/17] ARM: dts: sun7i: cubieboard2: add axp209 regulator nodes Chen-Yu Tsai
@ 2015-01-06  2:35 ` Chen-Yu Tsai
  2015-01-06  2:35 ` [PATCH 10/17] ARM: dts: sun5i: Add cpu clock reference and operating points to dtsi Chen-Yu Tsai
                   ` (7 subsequent siblings)
  16 siblings, 0 replies; 41+ messages in thread
From: Chen-Yu Tsai @ 2015-01-06  2:35 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>
---
 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 a281d259b9b8..48ceb4130b3b 100644
--- a/arch/arm/boot/dts/sun7i-a20-cubietruck.dts
+++ b/arch/arm/boot/dts/sun7i-a20-cubietruck.dts
@@ -126,13 +126,9 @@
 			status = "okay";
 
 			axp209: pmic@34 {
-				compatible = "x-powers,axp209";
 				reg = <0x34>;
 				interrupt-parent = <&nmi_intc>;
 				interrupts = <0 8>;
-
-				interrupt-controller;
-				#interrupt-cells = <1>;
 			};
 		};
 
@@ -218,3 +214,34 @@
 		gpio = <&pio 7 9 0>;
 	};
 };
+
+/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] 41+ messages in thread

* [PATCH 10/17] ARM: dts: sun5i: Add cpu clock reference and operating points to dtsi
  2015-01-06  2:35 [PATCH 00/17] ARM: sunxi: Support cpufreq on sun[457]i Chen-Yu Tsai
                   ` (8 preceding siblings ...)
  2015-01-06  2:35 ` [PATCH 09/17] ARM: dts: sun7i: cubietruck: " Chen-Yu Tsai
@ 2015-01-06  2:35 ` Chen-Yu Tsai
  2015-01-06  2:35 ` [PATCH 11/17] ARM: dts: sun5i: Add cpu thermal zones " Chen-Yu Tsai
                   ` (6 subsequent siblings)
  16 siblings, 0 replies; 41+ messages in thread
From: Chen-Yu Tsai @ 2015-01-06  2:35 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 cpu core is clocked from the "cpu" clock. Add a reference to it
in the first cpu node. Also add "cpu0" label to the node.

The operating points were taken from the A13 FEX files in the
sunxi-boards repository. All FEX files have the same settings.

Signed-off-by: Chen-Yu Tsai <wens@csie.org>
---
 arch/arm/boot/dts/sun5i-a13.dtsi | 18 +++++++++++++++++-
 1 file changed, 17 insertions(+), 1 deletion(-)

diff --git a/arch/arm/boot/dts/sun5i-a13.dtsi b/arch/arm/boot/dts/sun5i-a13.dtsi
index 4fe0bd192e29..dd93d227865e 100644
--- a/arch/arm/boot/dts/sun5i-a13.dtsi
+++ b/arch/arm/boot/dts/sun5i-a13.dtsi
@@ -24,10 +24,26 @@
 	cpus {
 		#address-cells = <1>;
 		#size-cells = <0>;
-		cpu@0 {
+
+		cpu0: cpu@0 {
 			device_type = "cpu";
 			compatible = "arm,cortex-a8";
 			reg = <0x0>;
+			clocks = <&cpu>;
+			clock-latency = <244144>; /* 8 32k periods */
+			operating-points = <
+				/* kHz    uV */
+				1104000	1500000
+				1008000 1400000
+				912000  1350000
+				864000  1300000
+				624000  1200000
+				576000  1200000
+				432000  1200000
+				>;
+			#cooling-cells = <2>;
+			cooling-min-level = <0>;
+			cooling-max-level = <6>;
 		};
 	};
 
-- 
2.1.4


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

* [PATCH 11/17] ARM: dts: sun5i: Add cpu thermal zones to dtsi
  2015-01-06  2:35 [PATCH 00/17] ARM: sunxi: Support cpufreq on sun[457]i Chen-Yu Tsai
                   ` (9 preceding siblings ...)
  2015-01-06  2:35 ` [PATCH 10/17] ARM: dts: sun5i: Add cpu clock reference and operating points to dtsi Chen-Yu Tsai
@ 2015-01-06  2:35 ` Chen-Yu Tsai
  2015-01-06 15:30   ` Eduardo Valentin
  2015-01-06  2:35 ` [PATCH 12/17] ARM: dts: sun5i: hsg-h702: add axp209 regulator nodes Chen-Yu Tsai
                   ` (5 subsequent siblings)
  16 siblings, 1 reply; 41+ messages in thread
From: Chen-Yu Tsai @ 2015-01-06  2:35 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>
---
 arch/arm/boot/dts/sun5i-a13.dtsi | 32 ++++++++++++++++++++++++++++++++
 1 file changed, 32 insertions(+)

diff --git a/arch/arm/boot/dts/sun5i-a13.dtsi b/arch/arm/boot/dts/sun5i-a13.dtsi
index dd93d227865e..9140cc7c8944 100644
--- a/arch/arm/boot/dts/sun5i-a13.dtsi
+++ b/arch/arm/boot/dts/sun5i-a13.dtsi
@@ -47,6 +47,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 (-1) (-1)>;
+				};
+			};
+
+			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] 41+ messages in thread

* [PATCH 12/17] ARM: dts: sun5i: hsg-h702: add axp209 regulator nodes
  2015-01-06  2:35 [PATCH 00/17] ARM: sunxi: Support cpufreq on sun[457]i Chen-Yu Tsai
                   ` (10 preceding siblings ...)
  2015-01-06  2:35 ` [PATCH 11/17] ARM: dts: sun5i: Add cpu thermal zones " Chen-Yu Tsai
@ 2015-01-06  2:35 ` Chen-Yu Tsai
  2015-01-06  2:35 ` [PATCH 13/17] ARM: dts: sun4i: Add cpu clock reference and operating points to dtsi Chen-Yu Tsai
                   ` (4 subsequent siblings)
  16 siblings, 0 replies; 41+ messages in thread
From: Chen-Yu Tsai @ 2015-01-06  2:35 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>
---
 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 eeed1f236ee8..ec9b2e4e25ee 100644
--- a/arch/arm/boot/dts/sun5i-a13-hsg-h702.dts
+++ b/arch/arm/boot/dts/sun5i-a13-hsg-h702.dts
@@ -65,11 +65,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";
 		};
 
@@ -102,11 +98,8 @@
 			status = "okay";
 
 			axp209: pmic@34 {
-				compatible = "x-powers,axp209";
 				reg = <0x34>;
 				interrupts = <0>;
-				interrupt-controller;
-				#interrupt-cells = <1>;
 			};
 		};
 
@@ -128,3 +121,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] 41+ messages in thread

* [PATCH 13/17] ARM: dts: sun4i: Add cpu clock reference and operating points to dtsi
  2015-01-06  2:35 [PATCH 00/17] ARM: sunxi: Support cpufreq on sun[457]i Chen-Yu Tsai
                   ` (11 preceding siblings ...)
  2015-01-06  2:35 ` [PATCH 12/17] ARM: dts: sun5i: hsg-h702: add axp209 regulator nodes Chen-Yu Tsai
@ 2015-01-06  2:35 ` Chen-Yu Tsai
  2015-01-06  2:35 ` [PATCH 14/17] ARM: dts: sun4i: Add cpu thermal zones " Chen-Yu Tsai
                   ` (3 subsequent siblings)
  16 siblings, 0 replies; 41+ messages in thread
From: Chen-Yu Tsai @ 2015-01-06  2:35 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 cpu core is clocked from the "cpu" clock. Add a reference to it
in the first cpu node. Also add "cpu0" label to the node.

The operating points were taken from the A10 FEX files in the
sunxi-boards repository. All FEX files have the same settings.

Signed-off-by: Chen-Yu Tsai <wens@csie.org>
---
 arch/arm/boot/dts/sun4i-a10.dtsi | 15 ++++++++++++++-
 1 file changed, 14 insertions(+), 1 deletion(-)

diff --git a/arch/arm/boot/dts/sun4i-a10.dtsi b/arch/arm/boot/dts/sun4i-a10.dtsi
index f92635ecb937..ce3af83dd80b 100644
--- a/arch/arm/boot/dts/sun4i-a10.dtsi
+++ b/arch/arm/boot/dts/sun4i-a10.dtsi
@@ -44,10 +44,23 @@
 	cpus {
 		#address-cells = <1>;
 		#size-cells = <0>;
-		cpu@0 {
+		cpu0: cpu@0 {
 			device_type = "cpu";
 			compatible = "arm,cortex-a8";
 			reg = <0x0>;
+			clocks = <&cpu>;
+			clock-latency = <244144>; /* 8 32k periods */
+			operating-points = <
+				/* kHz    uV */
+				1056000 1500000
+				1008000 1400000
+				912000  1350000
+				864000  1300000
+				624000  1250000
+				>;
+			#cooling-cells = <2>;
+			cooling-min-level = <0>;
+			cooling-max-level = <4>;
 		};
 	};
 
-- 
2.1.4


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

* [PATCH 14/17] ARM: dts: sun4i: Add cpu thermal zones to dtsi
  2015-01-06  2:35 [PATCH 00/17] ARM: sunxi: Support cpufreq on sun[457]i Chen-Yu Tsai
                   ` (12 preceding siblings ...)
  2015-01-06  2:35 ` [PATCH 13/17] ARM: dts: sun4i: Add cpu clock reference and operating points to dtsi Chen-Yu Tsai
@ 2015-01-06  2:35 ` Chen-Yu Tsai
  2015-01-06 15:29   ` Eduardo Valentin
  2015-01-06  2:35 ` [PATCH 15/17] ARM: dts: sun4i: cubieboard: add axp209 regulator nodes Chen-Yu Tsai
                   ` (2 subsequent siblings)
  16 siblings, 1 reply; 41+ messages in thread
From: Chen-Yu Tsai @ 2015-01-06  2:35 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>
---
 arch/arm/boot/dts/sun4i-a10.dtsi | 32 ++++++++++++++++++++++++++++++++
 1 file changed, 32 insertions(+)

diff --git a/arch/arm/boot/dts/sun4i-a10.dtsi b/arch/arm/boot/dts/sun4i-a10.dtsi
index ce3af83dd80b..eb626833ac86 100644
--- a/arch/arm/boot/dts/sun4i-a10.dtsi
+++ b/arch/arm/boot/dts/sun4i-a10.dtsi
@@ -64,6 +64,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 (-1) (-1)>;
+				};
+			};
+
+			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] 41+ messages in thread

* [PATCH 15/17] ARM: dts: sun4i: cubieboard: add axp209 regulator nodes
  2015-01-06  2:35 [PATCH 00/17] ARM: sunxi: Support cpufreq on sun[457]i Chen-Yu Tsai
                   ` (13 preceding siblings ...)
  2015-01-06  2:35 ` [PATCH 14/17] ARM: dts: sun4i: Add cpu thermal zones " Chen-Yu Tsai
@ 2015-01-06  2:35 ` Chen-Yu Tsai
  2015-01-06  2:35 ` [PATCH 16/17] ARM: sunxi_defconfig: Enable TOUCHSCREEN_SUN4I, CPUFREQ_DT, CPU_THERMAL Chen-Yu Tsai
  2015-01-06  2:35 ` [PATCH 17/17] ARM: multi_v7_defconfig: Enable TOUCHSCREEN_SUN4I, CPU_THERMAL Chen-Yu Tsai
  16 siblings, 0 replies; 41+ messages in thread
From: Chen-Yu Tsai @ 2015-01-06  2:35 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>
---
 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 140e3ee0c15f..312bb288d764 100644
--- a/arch/arm/boot/dts/sun4i-a10-cubieboard.dts
+++ b/arch/arm/boot/dts/sun4i-a10-cubieboard.dts
@@ -134,12 +134,8 @@
 			status = "okay";
 
 			axp209: pmic@34 {
-				compatible = "x-powers,axp209";
 				reg = <0x34>;
 				interrupts = <0>;
-
-				interrupt-controller;
-				#interrupt-cells = <1>;
 			};
 		};
 
@@ -185,3 +181,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] 41+ messages in thread

* [PATCH 16/17] ARM: sunxi_defconfig: Enable TOUCHSCREEN_SUN4I, CPUFREQ_DT, CPU_THERMAL
  2015-01-06  2:35 [PATCH 00/17] ARM: sunxi: Support cpufreq on sun[457]i Chen-Yu Tsai
                   ` (14 preceding siblings ...)
  2015-01-06  2:35 ` [PATCH 15/17] ARM: dts: sun4i: cubieboard: add axp209 regulator nodes Chen-Yu Tsai
@ 2015-01-06  2:35 ` Chen-Yu Tsai
  2015-01-06 15:32   ` Eduardo Valentin
  2015-01-06 16:13   ` Maxime Ripard
  2015-01-06  2:35 ` [PATCH 17/17] ARM: multi_v7_defconfig: Enable TOUCHSCREEN_SUN4I, CPU_THERMAL Chen-Yu Tsai
  16 siblings, 2 replies; 41+ messages in thread
From: Chen-Yu Tsai @ 2015-01-06  2:35 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 enables TOUCHSCREEN_SUN4I, CPUFREQ_DT, and CPU_THERMAL to
enable cpufreq support with passive cpu cooling (thermal throttling)
by default.

Signed-off-by: Chen-Yu Tsai <wens@csie.org>
---
 arch/arm/configs/sunxi_defconfig | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/arch/arm/configs/sunxi_defconfig b/arch/arm/configs/sunxi_defconfig
index 7a342d2780a8..46a8688bd49a 100644
--- a/arch/arm/configs/sunxi_defconfig
+++ b/arch/arm/configs/sunxi_defconfig
@@ -9,6 +9,8 @@ CONFIG_HIGHMEM=y
 CONFIG_HIGHPTE=y
 CONFIG_ARM_APPENDED_DTB=y
 CONFIG_ARM_ATAG_DTB_COMPAT=y
+CONFIG_CPU_FREQ=y
+CONFIG_CPUFREQ_DT=y
 CONFIG_VFP=y
 CONFIG_NEON=y
 CONFIG_PM=y
@@ -54,6 +56,8 @@ CONFIG_STMMAC_ETH=y
 # CONFIG_INPUT_MOUSEDEV is not set
 # CONFIG_INPUT_KEYBOARD is not set
 # CONFIG_INPUT_MOUSE is not set
+CONFIG_INPUT_TOUCHSCREEN=y
+CONFIG_TOUCHSCREEN_SUN4I=y
 CONFIG_SERIAL_8250=y
 CONFIG_SERIAL_8250_CONSOLE=y
 CONFIG_SERIAL_8250_NR_UARTS=8
@@ -71,7 +75,8 @@ CONFIG_GPIO_SYSFS=y
 CONFIG_POWER_SUPPLY=y
 CONFIG_POWER_RESET=y
 CONFIG_POWER_RESET_SUN6I=y
-# CONFIG_HWMON is not set
+CONFIG_THERMAL=y
+CONFIG_CPU_THERMAL=y
 CONFIG_WATCHDOG=y
 CONFIG_SUNXI_WATCHDOG=y
 CONFIG_MFD_AXP20X=y
-- 
2.1.4


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

* [PATCH 17/17] ARM: multi_v7_defconfig: Enable TOUCHSCREEN_SUN4I, CPU_THERMAL
  2015-01-06  2:35 [PATCH 00/17] ARM: sunxi: Support cpufreq on sun[457]i Chen-Yu Tsai
                   ` (15 preceding siblings ...)
  2015-01-06  2:35 ` [PATCH 16/17] ARM: sunxi_defconfig: Enable TOUCHSCREEN_SUN4I, CPUFREQ_DT, CPU_THERMAL Chen-Yu Tsai
@ 2015-01-06  2:35 ` Chen-Yu Tsai
  2015-01-06 15:31   ` Eduardo Valentin
  2015-01-06 16:12   ` Maxime Ripard
  16 siblings, 2 replies; 41+ messages in thread
From: Chen-Yu Tsai @ 2015-01-06  2:35 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 enables TOUCHSCREEN_SUN4I and CPU_THERMAL to enable cpufreq
support with passive cpu cooling (thermal throttling) on sunxi by default.

Signed-off-by: Chen-Yu Tsai <wens@csie.org>
---
 arch/arm/configs/multi_v7_defconfig | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/arch/arm/configs/multi_v7_defconfig b/arch/arm/configs/multi_v7_defconfig
index 2328fe752e9c..0e7159ad269b 100644
--- a/arch/arm/configs/multi_v7_defconfig
+++ b/arch/arm/configs/multi_v7_defconfig
@@ -189,6 +189,7 @@ CONFIG_MOUSE_PS2_ELANTECH=y
 CONFIG_INPUT_TOUCHSCREEN=y
 CONFIG_TOUCHSCREEN_ATMEL_MXT=y
 CONFIG_TOUCHSCREEN_STMPE=y
+CONFIG_TOUCHSCREEN_SUN4I=y
 CONFIG_INPUT_MISC=y
 CONFIG_INPUT_MPU3050=y
 CONFIG_SERIO_AMBAKMI=y
@@ -267,6 +268,7 @@ CONFIG_POWER_RESET_SUN6I=y
 CONFIG_SENSORS_LM90=y
 CONFIG_SENSORS_LM95245=y
 CONFIG_THERMAL=y
+CONFIG_CPU_THERMAL=y
 CONFIG_ARMADA_THERMAL=y
 CONFIG_ST_THERMAL_SYSCFG=y
 CONFIG_ST_THERMAL_MEMMAP=y
-- 
2.1.4


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

* Re: [PATCH 03/17] Input: sun4i-ts: Add thermal zone sensor support
  2015-01-06  2:35 ` [PATCH 03/17] Input: sun4i-ts: Add thermal zone sensor support Chen-Yu Tsai
@ 2015-01-06 15:24   ` Eduardo Valentin
  2015-01-07 16:24     ` Chen-Yu Tsai
  0 siblings, 1 reply; 41+ messages in thread
From: Eduardo Valentin @ 2015-01-06 15:24 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: 3720 bytes --]

Hello Chen-Yu,


On Tue, Jan 06, 2015 at 10:35:13AM +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.
> 
> Signed-off-by: Chen-Yu Tsai <wens@csie.org>
> ---
>  .../bindings/input/touchscreen/sun4i.txt           |  1 +
>  drivers/input/touchscreen/sun4i-ts.c               | 27 ++++++++++++++++++++++
>  2 files changed, 28 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/input/touchscreen/sun4i.txt b/Documentation/devicetree/bindings/input/touchscreen/sun4i.txt
> index aef57791f40b..7f1110adbd24 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
>  

You may want to update your Example section too, below.
Example:

	rtp: rtp@01c25000 {
		compatible = "allwinner,sun4i-a10-ts";
		reg = <0x01c25000 0x100>;
		interrupts = <29>;
		allwinner,ts-attached;
		#thermal-sensor-cells = <0>;
	};


>  Optional properties:
>   - allwinner,ts-attached: boolean indicating that an actual touchscreen is
> diff --git a/drivers/input/touchscreen/sun4i-ts.c b/drivers/input/touchscreen/sun4i-ts.c
> index 28a06749ae42..b6e9043446d6 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,6 +182,23 @@ static void sun4i_ts_close(struct input_dev *dev)
>  	writel(TEMP_IRQ_EN(1), ts->base + TP_INT_FIFOC);
>  }
>  
> +static int get_temp(void *data, long *temp)
> +{
> +	struct sun4i_ts_data *ts = data;
> +
> +	/* No temp_data until the first irq */
> +	if (ts->temp_data == -1)
> +		return -EAGAIN;
> +
> +	*temp = (ts->temp_data - 1447) * 100;
> +

Care to explain the formula in a simple comment?

> +	return 0;
> +}
> +
> +static struct thermal_zone_of_device_ops sun4i_ts_tz_ops = {
> +	.get_temp = get_temp,
> +};
> +
>  static ssize_t show_temp(struct device *dev, struct device_attribute *devattr,
>  			 char *buf)
>  {
> @@ -288,6 +307,11 @@ static int sun4i_ts_probe(struct platform_device *pdev)
>  	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) {

here.. if input_register_device fails, you will keep an orphan thermal zone
registered in your system:

		error = input_register_device(ts->input);
		if (error) {
			writel(0, ts->base + TP_INT_FIFOC);
			return error;
		}
		...


> @@ -310,6 +334,9 @@ static int sun4i_ts_remove(struct platform_device *pdev)
>  	if (ts->input)
>  		input_unregister_device(ts->input);
>  
> +	if (ts->tz)
> +		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] 41+ messages in thread

* Re: [PATCH 05/17] ARM: dts: sunxi: Enable thermal sensor support for RTP on sun[457]i
  2015-01-06  2:35 ` [PATCH 05/17] ARM: dts: sunxi: Enable thermal sensor support for RTP on sun[457]i Chen-Yu Tsai
@ 2015-01-06 15:25   ` Eduardo Valentin
  2015-01-06 15:52   ` Maxime Ripard
  1 sibling, 0 replies; 41+ messages in thread
From: Eduardo Valentin @ 2015-01-06 15:25 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: 2255 bytes --]

On Tue, Jan 06, 2015 at 10:35:15AM +0800, Chen-Yu Tsai wrote:
> Now that the resistive touchpanel driver supports thermal sensors,
> add the "#thermal-sensor-cells" property as required by the thermal
> framework.
> 
> Signed-off-by: Chen-Yu Tsai <wens@csie.org>

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

> ---
>  arch/arm/boot/dts/sun4i-a10.dtsi  | 1 +
>  arch/arm/boot/dts/sun5i-a10s.dtsi | 1 +
>  arch/arm/boot/dts/sun5i-a13.dtsi  | 1 +
>  arch/arm/boot/dts/sun7i-a20.dtsi  | 1 +
>  4 files changed, 4 insertions(+)
> 
> diff --git a/arch/arm/boot/dts/sun4i-a10.dtsi b/arch/arm/boot/dts/sun4i-a10.dtsi
> index 847d5e09fcfb..f92635ecb937 100644
> --- a/arch/arm/boot/dts/sun4i-a10.dtsi
> +++ b/arch/arm/boot/dts/sun4i-a10.dtsi
> @@ -712,6 +712,7 @@
>  			compatible = "allwinner,sun4i-a10-ts";
>  			reg = <0x01c25000 0x100>;
>  			interrupts = <29>;
> +			#thermal-sensor-cells = <0>;
>  		};
>  
>  		uart0: serial@01c28000 {
> diff --git a/arch/arm/boot/dts/sun5i-a10s.dtsi b/arch/arm/boot/dts/sun5i-a10s.dtsi
> index 3c3c1920788a..8d324ef7e46e 100644
> --- a/arch/arm/boot/dts/sun5i-a10s.dtsi
> +++ b/arch/arm/boot/dts/sun5i-a10s.dtsi
> @@ -535,6 +535,7 @@
>  			compatible = "allwinner,sun4i-a10-ts";
>  			reg = <0x01c25000 0x100>;
>  			interrupts = <29>;
> +			#thermal-sensor-cells = <0>;
>  		};
>  
>  		uart0: serial@01c28000 {
> diff --git a/arch/arm/boot/dts/sun5i-a13.dtsi b/arch/arm/boot/dts/sun5i-a13.dtsi
> index 2448d7f38d6b..4fe0bd192e29 100644
> --- a/arch/arm/boot/dts/sun5i-a13.dtsi
> +++ b/arch/arm/boot/dts/sun5i-a13.dtsi
> @@ -469,6 +469,7 @@
>  			compatible = "allwinner,sun4i-a10-ts";
>  			reg = <0x01c25000 0x100>;
>  			interrupts = <29>;
> +			#thermal-sensor-cells = <0>;
>  		};
>  
>  		uart1: serial@01c28400 {
> diff --git a/arch/arm/boot/dts/sun7i-a20.dtsi b/arch/arm/boot/dts/sun7i-a20.dtsi
> index e21ce5992d56..01c7133e699c 100644
> --- a/arch/arm/boot/dts/sun7i-a20.dtsi
> +++ b/arch/arm/boot/dts/sun7i-a20.dtsi
> @@ -926,6 +926,7 @@
>  			compatible = "allwinner,sun4i-a10-ts";
>  			reg = <0x01c25000 0x100>;
>  			interrupts = <0 29 4>;
> +			#thermal-sensor-cells = <0>;
>  		};
>  
>  		uart0: serial@01c28000 {
> -- 
> 2.1.4
> 

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

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

* Re: [PATCH 07/17] ARM: dts: sun7i: Add cpu thermal zones to dtsi
  2015-01-06  2:35 ` [PATCH 07/17] ARM: dts: sun7i: Add cpu thermal zones " Chen-Yu Tsai
@ 2015-01-06 15:28   ` Eduardo Valentin
  0 siblings, 0 replies; 41+ messages in thread
From: Eduardo Valentin @ 2015-01-06 15:28 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: 1548 bytes --]

On Tue, Jan 06, 2015 at 10:35:17AM +0800, Chen-Yu Tsai wrote:
> 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>
> ---
>  arch/arm/boot/dts/sun7i-a20.dtsi | 32 ++++++++++++++++++++++++++++++++
>  1 file changed, 32 insertions(+)
> 
> diff --git a/arch/arm/boot/dts/sun7i-a20.dtsi b/arch/arm/boot/dts/sun7i-a20.dtsi
> index 887b0521bbfb..951e99ed3aa9 100644
> --- a/arch/arm/boot/dts/sun7i-a20.dtsi
> +++ b/arch/arm/boot/dts/sun7i-a20.dtsi
> @@ -111,6 +111,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 (-1) (-1)>;

Could you please:
+#include <dt-bindings/thermal/thermal.h>

and

+					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
> 

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

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

* Re: [PATCH 14/17] ARM: dts: sun4i: Add cpu thermal zones to dtsi
  2015-01-06  2:35 ` [PATCH 14/17] ARM: dts: sun4i: Add cpu thermal zones " Chen-Yu Tsai
@ 2015-01-06 15:29   ` Eduardo Valentin
  0 siblings, 0 replies; 41+ messages in thread
From: Eduardo Valentin @ 2015-01-06 15:29 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: 1557 bytes --]

On Tue, Jan 06, 2015 at 10:35:24AM +0800, Chen-Yu Tsai wrote:
> 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>
> ---
>  arch/arm/boot/dts/sun4i-a10.dtsi | 32 ++++++++++++++++++++++++++++++++
>  1 file changed, 32 insertions(+)
> 
> diff --git a/arch/arm/boot/dts/sun4i-a10.dtsi b/arch/arm/boot/dts/sun4i-a10.dtsi
> index ce3af83dd80b..eb626833ac86 100644
> --- a/arch/arm/boot/dts/sun4i-a10.dtsi
> +++ b/arch/arm/boot/dts/sun4i-a10.dtsi
> @@ -64,6 +64,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 (-1) (-1)>;

same

Could you please:
+#include <dt-bindings/thermal/thermal.h>

and

+					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
> 

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

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

* Re: [PATCH 11/17] ARM: dts: sun5i: Add cpu thermal zones to dtsi
  2015-01-06  2:35 ` [PATCH 11/17] ARM: dts: sun5i: Add cpu thermal zones " Chen-Yu Tsai
@ 2015-01-06 15:30   ` Eduardo Valentin
  0 siblings, 0 replies; 41+ messages in thread
From: Eduardo Valentin @ 2015-01-06 15:30 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: 1559 bytes --]

On Tue, Jan 06, 2015 at 10:35:21AM +0800, Chen-Yu Tsai wrote:
> 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>
> ---
>  arch/arm/boot/dts/sun5i-a13.dtsi | 32 ++++++++++++++++++++++++++++++++
>  1 file changed, 32 insertions(+)
> 
> diff --git a/arch/arm/boot/dts/sun5i-a13.dtsi b/arch/arm/boot/dts/sun5i-a13.dtsi
> index dd93d227865e..9140cc7c8944 100644
> --- a/arch/arm/boot/dts/sun5i-a13.dtsi
> +++ b/arch/arm/boot/dts/sun5i-a13.dtsi
> @@ -47,6 +47,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 (-1) (-1)>;

same


Could you please:
+#include <dt-bindings/thermal/thermal.h>

and

+					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
> 

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

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

* Re: [PATCH 17/17] ARM: multi_v7_defconfig: Enable TOUCHSCREEN_SUN4I, CPU_THERMAL
  2015-01-06  2:35 ` [PATCH 17/17] ARM: multi_v7_defconfig: Enable TOUCHSCREEN_SUN4I, CPU_THERMAL Chen-Yu Tsai
@ 2015-01-06 15:31   ` Eduardo Valentin
  2015-01-06 16:12   ` Maxime Ripard
  1 sibling, 0 replies; 41+ messages in thread
From: Eduardo Valentin @ 2015-01-06 15:31 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: 1178 bytes --]

On Tue, Jan 06, 2015 at 10:35:27AM +0800, Chen-Yu Tsai wrote:
> This patch enables TOUCHSCREEN_SUN4I and CPU_THERMAL to enable cpufreq
> support with passive cpu cooling (thermal throttling) on sunxi by default.
> 
> Signed-off-by: Chen-Yu Tsai <wens@csie.org>

for the CPU_THERMAL

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

> ---
>  arch/arm/configs/multi_v7_defconfig | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/arch/arm/configs/multi_v7_defconfig b/arch/arm/configs/multi_v7_defconfig
> index 2328fe752e9c..0e7159ad269b 100644
> --- a/arch/arm/configs/multi_v7_defconfig
> +++ b/arch/arm/configs/multi_v7_defconfig
> @@ -189,6 +189,7 @@ CONFIG_MOUSE_PS2_ELANTECH=y
>  CONFIG_INPUT_TOUCHSCREEN=y
>  CONFIG_TOUCHSCREEN_ATMEL_MXT=y
>  CONFIG_TOUCHSCREEN_STMPE=y
> +CONFIG_TOUCHSCREEN_SUN4I=y
>  CONFIG_INPUT_MISC=y
>  CONFIG_INPUT_MPU3050=y
>  CONFIG_SERIO_AMBAKMI=y
> @@ -267,6 +268,7 @@ CONFIG_POWER_RESET_SUN6I=y
>  CONFIG_SENSORS_LM90=y
>  CONFIG_SENSORS_LM95245=y
>  CONFIG_THERMAL=y
> +CONFIG_CPU_THERMAL=y
>  CONFIG_ARMADA_THERMAL=y
>  CONFIG_ST_THERMAL_SYSCFG=y
>  CONFIG_ST_THERMAL_MEMMAP=y
> -- 
> 2.1.4
> 

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

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

* Re: [PATCH 16/17] ARM: sunxi_defconfig: Enable TOUCHSCREEN_SUN4I, CPUFREQ_DT, CPU_THERMAL
  2015-01-06  2:35 ` [PATCH 16/17] ARM: sunxi_defconfig: Enable TOUCHSCREEN_SUN4I, CPUFREQ_DT, CPU_THERMAL Chen-Yu Tsai
@ 2015-01-06 15:32   ` Eduardo Valentin
  2015-01-06 16:13   ` Maxime Ripard
  1 sibling, 0 replies; 41+ messages in thread
From: Eduardo Valentin @ 2015-01-06 15:32 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: 1493 bytes --]

On Tue, Jan 06, 2015 at 10:35:26AM +0800, Chen-Yu Tsai wrote:
> This patch enables TOUCHSCREEN_SUN4I, CPUFREQ_DT, and CPU_THERMAL to
> enable cpufreq support with passive cpu cooling (thermal throttling)
> by default.
> 
> Signed-off-by: Chen-Yu Tsai <wens@csie.org>

For the thermal part:

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

> ---
>  arch/arm/configs/sunxi_defconfig | 7 ++++++-
>  1 file changed, 6 insertions(+), 1 deletion(-)
> 
> diff --git a/arch/arm/configs/sunxi_defconfig b/arch/arm/configs/sunxi_defconfig
> index 7a342d2780a8..46a8688bd49a 100644
> --- a/arch/arm/configs/sunxi_defconfig
> +++ b/arch/arm/configs/sunxi_defconfig
> @@ -9,6 +9,8 @@ CONFIG_HIGHMEM=y
>  CONFIG_HIGHPTE=y
>  CONFIG_ARM_APPENDED_DTB=y
>  CONFIG_ARM_ATAG_DTB_COMPAT=y
> +CONFIG_CPU_FREQ=y
> +CONFIG_CPUFREQ_DT=y
>  CONFIG_VFP=y
>  CONFIG_NEON=y
>  CONFIG_PM=y
> @@ -54,6 +56,8 @@ CONFIG_STMMAC_ETH=y
>  # CONFIG_INPUT_MOUSEDEV is not set
>  # CONFIG_INPUT_KEYBOARD is not set
>  # CONFIG_INPUT_MOUSE is not set
> +CONFIG_INPUT_TOUCHSCREEN=y
> +CONFIG_TOUCHSCREEN_SUN4I=y
>  CONFIG_SERIAL_8250=y
>  CONFIG_SERIAL_8250_CONSOLE=y
>  CONFIG_SERIAL_8250_NR_UARTS=8
> @@ -71,7 +75,8 @@ CONFIG_GPIO_SYSFS=y
>  CONFIG_POWER_SUPPLY=y
>  CONFIG_POWER_RESET=y
>  CONFIG_POWER_RESET_SUN6I=y
> -# CONFIG_HWMON is not set
> +CONFIG_THERMAL=y
> +CONFIG_CPU_THERMAL=y
>  CONFIG_WATCHDOG=y
>  CONFIG_SUNXI_WATCHDOG=y
>  CONFIG_MFD_AXP20X=y
> -- 
> 2.1.4
> 

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

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

* Re: [PATCH 05/17] ARM: dts: sunxi: Enable thermal sensor support for RTP on sun[457]i
  2015-01-06  2:35 ` [PATCH 05/17] ARM: dts: sunxi: Enable thermal sensor support for RTP on sun[457]i Chen-Yu Tsai
  2015-01-06 15:25   ` Eduardo Valentin
@ 2015-01-06 15:52   ` Maxime Ripard
  1 sibling, 0 replies; 41+ messages in thread
From: Maxime Ripard @ 2015-01-06 15:52 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: 412 bytes --]

On Tue, Jan 06, 2015 at 10:35:15AM +0800, Chen-Yu Tsai wrote:
> Now that the resistive touchpanel driver supports thermal sensors,
> add the "#thermal-sensor-cells" property as required by the thermal
> framework.
> 
> Signed-off-by: Chen-Yu Tsai <wens@csie.org>

Applied, 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] 41+ messages in thread

* Re: [PATCH 01/17] ARM: sunxi: Register cpufreq-dt for sun[45678]i
  2015-01-06  2:35 ` [PATCH 01/17] ARM: sunxi: Register cpufreq-dt for sun[45678]i Chen-Yu Tsai
@ 2015-01-06 15:55   ` Maxime Ripard
  2015-01-07  9:07     ` Chen-Yu Tsai
  2015-01-07 10:23   ` Maxime Ripard
  1 sibling, 1 reply; 41+ messages in thread
From: Maxime Ripard @ 2015-01-06 15:55 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: 622 bytes --]

Hi,

On Tue, Jan 06, 2015 at 10:35:11AM +0800, Chen-Yu Tsai wrote:
> On sun[45678]i, we have one cluster of identical cores sharing a
> clock, which is ideal for using cpufreq-dt. Register a platform
> device for cpufreq-dt.
> 
> Signed-off-by: Chen-Yu Tsai <wens@csie.org>

While I don't have anything against this patch, I seem to recall that
it was not necessary anymore, or that there was some work in the
direction of removing that kind of code, have you looked into that?

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] 41+ messages in thread

* Re: [PATCH 04/17] ARM: dts: sunxi: Add dtsi for AXP209 PMIC
  2015-01-06  2:35 ` [PATCH 04/17] ARM: dts: sunxi: Add dtsi for AXP209 PMIC Chen-Yu Tsai
@ 2015-01-06 15:58   ` Maxime Ripard
  2015-01-06 19:09     ` Chen-Yu Tsai
  0 siblings, 1 reply; 41+ messages in thread
From: Maxime Ripard @ 2015-01-06 15:58 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: 4152 bytes --]

Hi,

On Tue, Jan 06, 2015 at 10:35:14AM +0800, Chen-Yu Tsai wrote:
> 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>
> ---
>  arch/arm/boot/dts/axp209.dtsi | 87 +++++++++++++++++++++++++++++++++++++++++++
>  1 file changed, 87 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..3c38cbafe285
> --- /dev/null
> +++ b/arch/arm/boot/dts/axp209.dtsi
> @@ -0,0 +1,87 @@
> +/*
> + * 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 {
> +	regulators {
> +		/* Default work frequency for buck regulators */
> +		x-powers,dcdc-freq = <1500>;
> +
> +		/* This section lists all the regulators */

I don't think this comment is necessary.

> +		reg_dcdc2: dcdc2 {
> +		};
> +
> +		reg_dcdc3: dcdc3 {
> +		};
> +
> +		reg_ldo1: ldo1 {
> +			/* LDO1 is a fixed output regulator */
> +			regulator-always-on;
> +			regulator-min-microvolt = <1300000>;
> +			regulator-max-microvolt = <1300000>;
> +		};
> +
> +		reg_ldo2: ldo2 {
> +		};
> +
> +		reg_ldo3: ldo3 {
> +		};
> +
> +		reg_ldo4: ldo4 {
> +		};
> +
> +		reg_ldo5: ldo5 {
> +		};

Some default names for the regulator would be great!

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] 41+ messages in thread

* Re: [PATCH 02/17] clk: sunxi: Propagate rate changes to parent for mux clocks
  2015-01-06  2:35 ` [PATCH 02/17] clk: sunxi: Propagate rate changes to parent for mux clocks Chen-Yu Tsai
@ 2015-01-06 16:00   ` Maxime Ripard
  0 siblings, 0 replies; 41+ messages in thread
From: Maxime Ripard @ 2015-01-06 16:00 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: 640 bytes --]

On Tue, Jan 06, 2015 at 10:35:12AM +0800, Chen-Yu Tsai wrote:
> The cpu clock on sunxi machines is just a mux clock, which is normally
> fed by the main PLL, but can be muxed to the main or low power oscillator.
> 
> Make the mux clock propagate rate changes to its parent, so we can
> change the clock rate of the PLL, and thus actually implement rate
> changing on the cpu clock.
> 
> This patch also removes the no reparenting limit.
> 
> Signed-off-by: Chen-Yu Tsai <wens@csie.org>

Applied, 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] 41+ messages in thread

* Re: [PATCH 06/17] ARM: dts: sun7i: Add cpu clock reference and operating points to dtsi
  2015-01-06  2:35 ` [PATCH 06/17] ARM: dts: sun7i: Add cpu clock reference and operating points to dtsi Chen-Yu Tsai
@ 2015-01-06 16:07   ` Maxime Ripard
  0 siblings, 0 replies; 41+ messages in thread
From: Maxime Ripard @ 2015-01-06 16:07 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: 580 bytes --]

On Tue, Jan 06, 2015 at 10:35:16AM +0800, Chen-Yu Tsai wrote:
> The cpu core is clocked from the "cpu" clock. Add a reference to it
> in the first cpu node. Also add "cpu0" label to the node.
> 
> The operating points were taken from the A20 FEX files in the
> sunxi-boards repository. Not all boards have the same settings. The
> settings in this patch are the most generic ones.
> 
> Signed-off-by: Chen-Yu Tsai <wens@csie.org>

Applied, 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] 41+ messages in thread

* Re: [PATCH 08/17] ARM: dts: sun7i: cubieboard2: add axp209 regulator nodes
  2015-01-06  2:35 ` [PATCH 08/17] ARM: dts: sun7i: cubieboard2: add axp209 regulator nodes Chen-Yu Tsai
@ 2015-01-06 16:11   ` Maxime Ripard
  0 siblings, 0 replies; 41+ messages in thread
From: Maxime Ripard @ 2015-01-06 16:11 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: 2259 bytes --]

Hi,

On Tue, Jan 06, 2015 at 10:35:18AM +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>
> ---
>  arch/arm/boot/dts/axp209.dtsi               |  4 ++++
>  arch/arm/boot/dts/sun7i-a20-cubieboard2.dts | 35 +++++++++++++++++++++++++----
>  2 files changed, 35 insertions(+), 4 deletions(-)
> 
> diff --git a/arch/arm/boot/dts/axp209.dtsi b/arch/arm/boot/dts/axp209.dtsi
> index 3c38cbafe285..fec3364b2110 100644
> --- a/arch/arm/boot/dts/axp209.dtsi
> +++ b/arch/arm/boot/dts/axp209.dtsi
> @@ -54,6 +54,10 @@
>   */
>  
>  &axp209 {
> +	compatible = "x-powers,axp209";
> +	interrupt-controller;
> +	#interrupt-cells = <1>;
> +

This should be in your patch adding the AXP DTSI.

>  	regulators {
>  		/* Default work frequency for buck regulators */
>  		x-powers,dcdc-freq = <1500>;
> diff --git a/arch/arm/boot/dts/sun7i-a20-cubieboard2.dts b/arch/arm/boot/dts/sun7i-a20-cubieboard2.dts
> index 53680983461a..61e61c0eb829 100644
> --- a/arch/arm/boot/dts/sun7i-a20-cubieboard2.dts
> +++ b/arch/arm/boot/dts/sun7i-a20-cubieboard2.dts
> @@ -84,13 +84,9 @@
>  			status = "okay";
>  
>  			axp209: pmic@34 {
> -				compatible = "x-powers,axp209";
>  				reg = <0x34>;
>  				interrupt-parent = <&nmi_intc>;
>  				interrupts = <0 8>;
> -
> -				interrupt-controller;
> -				#interrupt-cells = <1>;
>  			};
>  		};
>  
> @@ -141,3 +137,34 @@
>  		status = "okay";
>  	};
>  };
> +
> +/include/ "axp209.dtsi"

We've switched to preprocessor includes, please use them instead.

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] 41+ messages in thread

* Re: [PATCH 17/17] ARM: multi_v7_defconfig: Enable TOUCHSCREEN_SUN4I, CPU_THERMAL
  2015-01-06  2:35 ` [PATCH 17/17] ARM: multi_v7_defconfig: Enable TOUCHSCREEN_SUN4I, CPU_THERMAL Chen-Yu Tsai
  2015-01-06 15:31   ` Eduardo Valentin
@ 2015-01-06 16:12   ` Maxime Ripard
  1 sibling, 0 replies; 41+ messages in thread
From: Maxime Ripard @ 2015-01-06 16:12 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: 407 bytes --]

On Tue, Jan 06, 2015 at 10:35:27AM +0800, Chen-Yu Tsai wrote:
> This patch enables TOUCHSCREEN_SUN4I and CPU_THERMAL to enable cpufreq
> support with passive cpu cooling (thermal throttling) on sunxi by default.
> 
> Signed-off-by: Chen-Yu Tsai <wens@csie.org>

Applied, 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] 41+ messages in thread

* Re: [PATCH 16/17] ARM: sunxi_defconfig: Enable TOUCHSCREEN_SUN4I, CPUFREQ_DT, CPU_THERMAL
  2015-01-06  2:35 ` [PATCH 16/17] ARM: sunxi_defconfig: Enable TOUCHSCREEN_SUN4I, CPUFREQ_DT, CPU_THERMAL Chen-Yu Tsai
  2015-01-06 15:32   ` Eduardo Valentin
@ 2015-01-06 16:13   ` Maxime Ripard
  1 sibling, 0 replies; 41+ messages in thread
From: Maxime Ripard @ 2015-01-06 16:13 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: 414 bytes --]

On Tue, Jan 06, 2015 at 10:35:26AM +0800, Chen-Yu Tsai wrote:
> This patch enables TOUCHSCREEN_SUN4I, CPUFREQ_DT, and CPU_THERMAL to
> enable cpufreq support with passive cpu cooling (thermal throttling)
> by default.
> 
> Signed-off-by: Chen-Yu Tsai <wens@csie.org>

Applied, 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] 41+ messages in thread

* Re: [PATCH 04/17] ARM: dts: sunxi: Add dtsi for AXP209 PMIC
  2015-01-06 15:58   ` Maxime Ripard
@ 2015-01-06 19:09     ` Chen-Yu Tsai
  0 siblings, 0 replies; 41+ messages in thread
From: Chen-Yu Tsai @ 2015-01-06 19:09 UTC (permalink / raw)
  To: Maxime Ripard
  Cc: Dmitry Torokhov, Zhang Rui, Eduardo Valentin, Hans de Goede,
	linux-input@vger.kernel.org, linux-arm-kernel, linux-pm

Hi,

On Tue, Jan 6, 2015 at 11:58 PM, Maxime Ripard
<maxime.ripard@free-electrons.com> wrote:
> Hi,
>
> On Tue, Jan 06, 2015 at 10:35:14AM +0800, Chen-Yu Tsai wrote:
>> 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>
>> ---
>>  arch/arm/boot/dts/axp209.dtsi | 87 +++++++++++++++++++++++++++++++++++++++++++
>>  1 file changed, 87 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..3c38cbafe285
>> --- /dev/null
>> +++ b/arch/arm/boot/dts/axp209.dtsi
>> @@ -0,0 +1,87 @@
>> +/*
>> + * 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 {
>> +     regulators {
>> +             /* Default work frequency for buck regulators */
>> +             x-powers,dcdc-freq = <1500>;
>> +
>> +             /* This section lists all the regulators */
>
> I don't think this comment is necessary.
>
>> +             reg_dcdc2: dcdc2 {
>> +             };
>> +
>> +             reg_dcdc3: dcdc3 {
>> +             };
>> +
>> +             reg_ldo1: ldo1 {
>> +                     /* LDO1 is a fixed output regulator */
>> +                     regulator-always-on;
>> +                     regulator-min-microvolt = <1300000>;
>> +                     regulator-max-microvolt = <1300000>;
>> +             };
>> +
>> +             reg_ldo2: ldo2 {
>> +             };
>> +
>> +             reg_ldo3: ldo3 {
>> +             };
>> +
>> +             reg_ldo4: ldo4 {
>> +             };
>> +
>> +             reg_ldo5: ldo5 {
>> +             };
>
> Some default names for the regulator would be great!

Default names are already given through the regulator driver.
They are full uppercase names, like in the datasheet.

I could add lowercase names here for the default.

ChenYu

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

* Re: [PATCH 01/17] ARM: sunxi: Register cpufreq-dt for sun[45678]i
  2015-01-06 15:55   ` Maxime Ripard
@ 2015-01-07  9:07     ` Chen-Yu Tsai
  2015-01-07 10:01       ` Viresh Kumar
  0 siblings, 1 reply; 41+ messages in thread
From: Chen-Yu Tsai @ 2015-01-07  9:07 UTC (permalink / raw)
  To: Maxime Ripard
  Cc: Dmitry Torokhov, Zhang Rui, Eduardo Valentin, Hans de Goede,
	linux-input@vger.kernel.org, linux-arm-kernel, linux-pm,
	Viresh Kumar

Hi,

On Tue, Jan 6, 2015 at 11:55 PM, Maxime Ripard
<maxime.ripard@free-electrons.com> wrote:
> Hi,
>
> On Tue, Jan 06, 2015 at 10:35:11AM +0800, Chen-Yu Tsai wrote:
>> On sun[45678]i, we have one cluster of identical cores sharing a
>> clock, which is ideal for using cpufreq-dt. Register a platform
>> device for cpufreq-dt.
>>
>> Signed-off-by: Chen-Yu Tsai <wens@csie.org>
>
> While I don't have anything against this patch, I seem to recall that
> it was not necessary anymore, or that there was some work in the
> direction of removing that kind of code, have you looked into that?

I believe you are referring to the work done by Viresh Kumar (CCed),
specifically the 2 series "[RFC V1 0/8] CPUFreq: create platform-dev
for DT based cpufreq drivers" and "[RFC] OPP: Redefine bindings to
overcome shortcomings". So far the new code has not appeared in
linux-next. If it does, I will happily use it.

ChenYu

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

* Re: [PATCH 01/17] ARM: sunxi: Register cpufreq-dt for sun[45678]i
  2015-01-07  9:07     ` Chen-Yu Tsai
@ 2015-01-07 10:01       ` Viresh Kumar
  0 siblings, 0 replies; 41+ messages in thread
From: Viresh Kumar @ 2015-01-07 10:01 UTC (permalink / raw)
  To: Chen-Yu Tsai
  Cc: Maxime Ripard, Dmitry Torokhov, Zhang Rui, Eduardo Valentin,
	Hans de Goede, linux-input@vger.kernel.org, linux-arm-kernel,
	linux-pm@vger.kernel.org

On 7 January 2015 at 14:37, Chen-Yu Tsai <wens@csie.org> wrote:
> I believe you are referring to the work done by Viresh Kumar (CCed),
> specifically the 2 series "[RFC V1 0/8] CPUFreq: create platform-dev
> for DT based cpufreq drivers" and "[RFC] OPP: Redefine bindings to
> overcome shortcomings". So far the new code has not appeared in
> linux-next. If it does, I will happily use it.

Yes. You still have to create these platform devices for cpufreq-dt.

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

* Re: [PATCH 01/17] ARM: sunxi: Register cpufreq-dt for sun[45678]i
  2015-01-06  2:35 ` [PATCH 01/17] ARM: sunxi: Register cpufreq-dt for sun[45678]i Chen-Yu Tsai
  2015-01-06 15:55   ` Maxime Ripard
@ 2015-01-07 10:23   ` Maxime Ripard
  1 sibling, 0 replies; 41+ messages in thread
From: Maxime Ripard @ 2015-01-07 10:23 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: 418 bytes --]

On Tue, Jan 06, 2015 at 10:35:11AM +0800, Chen-Yu Tsai wrote:
> On sun[45678]i, we have one cluster of identical cores sharing a
> clock, which is ideal for using cpufreq-dt. Register a platform
> device for cpufreq-dt.
> 
> Signed-off-by: Chen-Yu Tsai <wens@csie.org>

Applied, 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] 41+ messages in thread

* Re: [PATCH 03/17] Input: sun4i-ts: Add thermal zone sensor support
  2015-01-06 15:24   ` Eduardo Valentin
@ 2015-01-07 16:24     ` Chen-Yu Tsai
  2015-01-08 13:33       ` Chen-Yu Tsai
  0 siblings, 1 reply; 41+ messages in thread
From: Chen-Yu Tsai @ 2015-01-07 16:24 UTC (permalink / raw)
  To: Eduardo Valentin
  Cc: Maxime Ripard, Dmitry Torokhov, Zhang Rui, Hans de Goede,
	linux-input@vger.kernel.org, linux-arm-kernel, linux-pm

Hi,

On Tue, Jan 6, 2015 at 11:24 PM, Eduardo Valentin <edubezval@gmail.com> wrote:
> Hello Chen-Yu,
>
>
> On Tue, Jan 06, 2015 at 10:35:13AM +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.
>>
>> Signed-off-by: Chen-Yu Tsai <wens@csie.org>
>> ---
>>  .../bindings/input/touchscreen/sun4i.txt           |  1 +
>>  drivers/input/touchscreen/sun4i-ts.c               | 27 ++++++++++++++++++++++
>>  2 files changed, 28 insertions(+)
>>
>> diff --git a/Documentation/devicetree/bindings/input/touchscreen/sun4i.txt b/Documentation/devicetree/bindings/input/touchscreen/sun4i.txt
>> index aef57791f40b..7f1110adbd24 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
>>
>
> You may want to update your Example section too, below.
> Example:
>
>         rtp: rtp@01c25000 {
>                 compatible = "allwinner,sun4i-a10-ts";
>                 reg = <0x01c25000 0x100>;
>                 interrupts = <29>;
>                 allwinner,ts-attached;
>                 #thermal-sensor-cells = <0>;
>         };

Ok.

>
>
>>  Optional properties:
>>   - allwinner,ts-attached: boolean indicating that an actual touchscreen is
>> diff --git a/drivers/input/touchscreen/sun4i-ts.c b/drivers/input/touchscreen/sun4i-ts.c
>> index 28a06749ae42..b6e9043446d6 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,6 +182,23 @@ static void sun4i_ts_close(struct input_dev *dev)
>>       writel(TEMP_IRQ_EN(1), ts->base + TP_INT_FIFOC);
>>  }
>>
>> +static int get_temp(void *data, long *temp)
>> +{
>> +     struct sun4i_ts_data *ts = data;
>> +
>> +     /* No temp_data until the first irq */
>> +     if (ts->temp_data == -1)
>> +             return -EAGAIN;
>> +
>> +     *temp = (ts->temp_data - 1447) * 100;
>> +
>
> Care to explain the formula in a simple comment?

This was just copied from the hwmon section. AFAIK there is no documentation
for the formula. It was probably copied from Allwinner's SDK code.

Hans? Do you remember where you got this?

>> +     return 0;
>> +}
>> +
>> +static struct thermal_zone_of_device_ops sun4i_ts_tz_ops = {
>> +     .get_temp = get_temp,
>> +};
>> +
>>  static ssize_t show_temp(struct device *dev, struct device_attribute *devattr,
>>                        char *buf)
>>  {
>> @@ -288,6 +307,11 @@ static int sun4i_ts_probe(struct platform_device *pdev)
>>       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) {
>
> here.. if input_register_device fails, you will keep an orphan thermal zone
> registered in your system:
>
>                 error = input_register_device(ts->input);
>                 if (error) {
>                         writel(0, ts->base + TP_INT_FIFOC);

Will add an unregister call here.


Thanks for the review.

ChenYu

>                         return error;
>                 }
>                 ...
>
>
>> @@ -310,6 +334,9 @@ static int sun4i_ts_remove(struct platform_device *pdev)
>>       if (ts->input)
>>               input_unregister_device(ts->input);
>>
>> +     if (ts->tz)
>> +             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	[flat|nested] 41+ messages in thread

* Re: [PATCH 03/17] Input: sun4i-ts: Add thermal zone sensor support
  2015-01-07 16:24     ` Chen-Yu Tsai
@ 2015-01-08 13:33       ` Chen-Yu Tsai
  2015-01-09 18:07         ` Eduardo Valentin
  0 siblings, 1 reply; 41+ messages in thread
From: Chen-Yu Tsai @ 2015-01-08 13:33 UTC (permalink / raw)
  To: Eduardo Valentin
  Cc: Maxime Ripard, Dmitry Torokhov, Zhang Rui, Hans de Goede,
	linux-input@vger.kernel.org, linux-arm-kernel, linux-pm

On Thu, Jan 8, 2015 at 12:24 AM, Chen-Yu Tsai <wens@csie.org> wrote:
> Hi,
>
> On Tue, Jan 6, 2015 at 11:24 PM, Eduardo Valentin <edubezval@gmail.com> wrote:
>> Hello Chen-Yu,
>>
>>
>> On Tue, Jan 06, 2015 at 10:35:13AM +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.
>>>
>>> Signed-off-by: Chen-Yu Tsai <wens@csie.org>
>>> ---
>>>  .../bindings/input/touchscreen/sun4i.txt           |  1 +
>>>  drivers/input/touchscreen/sun4i-ts.c               | 27 ++++++++++++++++++++++
>>>  2 files changed, 28 insertions(+)
>>>
>>> diff --git a/Documentation/devicetree/bindings/input/touchscreen/sun4i.txt b/Documentation/devicetree/bindings/input/touchscreen/sun4i.txt
>>> index aef57791f40b..7f1110adbd24 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
>>>
>>
>> You may want to update your Example section too, below.
>> Example:
>>
>>         rtp: rtp@01c25000 {
>>                 compatible = "allwinner,sun4i-a10-ts";
>>                 reg = <0x01c25000 0x100>;
>>                 interrupts = <29>;
>>                 allwinner,ts-attached;
>>                 #thermal-sensor-cells = <0>;
>>         };
>
> Ok.
>
>>
>>
>>>  Optional properties:
>>>   - allwinner,ts-attached: boolean indicating that an actual touchscreen is
>>> diff --git a/drivers/input/touchscreen/sun4i-ts.c b/drivers/input/touchscreen/sun4i-ts.c
>>> index 28a06749ae42..b6e9043446d6 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,6 +182,23 @@ static void sun4i_ts_close(struct input_dev *dev)
>>>       writel(TEMP_IRQ_EN(1), ts->base + TP_INT_FIFOC);
>>>  }
>>>
>>> +static int get_temp(void *data, long *temp)
>>> +{
>>> +     struct sun4i_ts_data *ts = data;
>>> +
>>> +     /* No temp_data until the first irq */
>>> +     if (ts->temp_data == -1)
>>> +             return -EAGAIN;
>>> +
>>> +     *temp = (ts->temp_data - 1447) * 100;
>>> +
>>
>> Care to explain the formula in a simple comment?
>
> This was just copied from the hwmon section. AFAIK there is no documentation
> for the formula. It was probably copied from Allwinner's SDK code.
>
> Hans? Do you remember where you got this?

So this is from the AXP209 datasheet. The Allwinner SoC datasheets don't
mention the formula to calculate the temperature. But since Allwinner
and X-powers are affiliated, it's possible they use the same formula.

http://comments.gmane.org/gmane.comp.hardware.netbook.arm.sunxi/3838

>>> +     return 0;
>>> +}
>>> +
>>> +static struct thermal_zone_of_device_ops sun4i_ts_tz_ops = {
>>> +     .get_temp = get_temp,
>>> +};
>>> +
>>>  static ssize_t show_temp(struct device *dev, struct device_attribute *devattr,
>>>                        char *buf)
>>>  {
>>> @@ -288,6 +307,11 @@ static int sun4i_ts_probe(struct platform_device *pdev)
>>>       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) {
>>
>> here.. if input_register_device fails, you will keep an orphan thermal zone
>> registered in your system:
>>
>>                 error = input_register_device(ts->input);
>>                 if (error) {
>>                         writel(0, ts->base + TP_INT_FIFOC);
>
> Will add an unregister call here.
>
>
> Thanks for the review.
>
> ChenYu
>
>>                         return error;
>>                 }
>>                 ...
>>
>>
>>> @@ -310,6 +334,9 @@ static int sun4i_ts_remove(struct platform_device *pdev)
>>>       if (ts->input)
>>>               input_unregister_device(ts->input);
>>>
>>> +     if (ts->tz)
>>> +             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	[flat|nested] 41+ messages in thread

* Re: [PATCH 03/17] Input: sun4i-ts: Add thermal zone sensor support
  2015-01-08 13:33       ` Chen-Yu Tsai
@ 2015-01-09 18:07         ` Eduardo Valentin
  2015-01-09 18:24           ` Chen-Yu Tsai
  0 siblings, 1 reply; 41+ messages in thread
From: Eduardo Valentin @ 2015-01-09 18:07 UTC (permalink / raw)
  To: Chen-Yu Tsai
  Cc: Maxime Ripard, Dmitry Torokhov, Zhang Rui, Hans de Goede,
	linux-input@vger.kernel.org, linux-arm-kernel, linux-pm

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

On Thu, Jan 08, 2015 at 09:33:54PM +0800, Chen-Yu Tsai wrote:
> On Thu, Jan 8, 2015 at 12:24 AM, Chen-Yu Tsai <wens@csie.org> wrote:
> > Hi,
> >
> > On Tue, Jan 6, 2015 at 11:24 PM, Eduardo Valentin <edubezval@gmail.com> wrote:
> >> Hello Chen-Yu,
> >>
> >>
> >> On Tue, Jan 06, 2015 at 10:35:13AM +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.
> >>>
> >>> Signed-off-by: Chen-Yu Tsai <wens@csie.org>
> >>> ---
> >>>  .../bindings/input/touchscreen/sun4i.txt           |  1 +
> >>>  drivers/input/touchscreen/sun4i-ts.c               | 27 ++++++++++++++++++++++
> >>>  2 files changed, 28 insertions(+)
> >>>
> >>> diff --git a/Documentation/devicetree/bindings/input/touchscreen/sun4i.txt b/Documentation/devicetree/bindings/input/touchscreen/sun4i.txt
> >>> index aef57791f40b..7f1110adbd24 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
> >>>
> >>
> >> You may want to update your Example section too, below.
> >> Example:
> >>
> >>         rtp: rtp@01c25000 {
> >>                 compatible = "allwinner,sun4i-a10-ts";
> >>                 reg = <0x01c25000 0x100>;
> >>                 interrupts = <29>;
> >>                 allwinner,ts-attached;
> >>                 #thermal-sensor-cells = <0>;
> >>         };
> >
> > Ok.
> >
> >>
> >>
> >>>  Optional properties:
> >>>   - allwinner,ts-attached: boolean indicating that an actual touchscreen is
> >>> diff --git a/drivers/input/touchscreen/sun4i-ts.c b/drivers/input/touchscreen/sun4i-ts.c
> >>> index 28a06749ae42..b6e9043446d6 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,6 +182,23 @@ static void sun4i_ts_close(struct input_dev *dev)
> >>>       writel(TEMP_IRQ_EN(1), ts->base + TP_INT_FIFOC);
> >>>  }
> >>>
> >>> +static int get_temp(void *data, long *temp)
> >>> +{
> >>> +     struct sun4i_ts_data *ts = data;
> >>> +
> >>> +     /* No temp_data until the first irq */
> >>> +     if (ts->temp_data == -1)
> >>> +             return -EAGAIN;
> >>> +
> >>> +     *temp = (ts->temp_data - 1447) * 100;
> >>> +
> >>
> >> Care to explain the formula in a simple comment?
> >
> > This was just copied from the hwmon section. AFAIK there is no documentation
> > for the formula. It was probably copied from Allwinner's SDK code.
> >
> > Hans? Do you remember where you got this?
> 
> So this is from the AXP209 datasheet. The Allwinner SoC datasheets don't
> mention the formula to calculate the temperature. But since Allwinner
> and X-powers are affiliated, it's possible they use the same formula.
> 
> http://comments.gmane.org/gmane.comp.hardware.netbook.arm.sunxi/3838

Ok. We use in the thermal framework  miliCelsius as the temperature
unit. Can you make sure the resulting temperature is in miliCelsius?

Cheers,

> 
> >>> +     return 0;
> >>> +}
> >>> +
> >>> +static struct thermal_zone_of_device_ops sun4i_ts_tz_ops = {
> >>> +     .get_temp = get_temp,
> >>> +};
> >>> +
> >>>  static ssize_t show_temp(struct device *dev, struct device_attribute *devattr,
> >>>                        char *buf)
> >>>  {
> >>> @@ -288,6 +307,11 @@ static int sun4i_ts_probe(struct platform_device *pdev)
> >>>       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) {
> >>
> >> here.. if input_register_device fails, you will keep an orphan thermal zone
> >> registered in your system:
> >>
> >>                 error = input_register_device(ts->input);
> >>                 if (error) {
> >>                         writel(0, ts->base + TP_INT_FIFOC);
> >
> > Will add an unregister call here.
> >
> >
> > Thanks for the review.
> >
> > ChenYu
> >
> >>                         return error;
> >>                 }
> >>                 ...
> >>
> >>
> >>> @@ -310,6 +334,9 @@ static int sun4i_ts_remove(struct platform_device *pdev)
> >>>       if (ts->input)
> >>>               input_unregister_device(ts->input);
> >>>
> >>> +     if (ts->tz)
> >>> +             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] 41+ messages in thread

* Re: [PATCH 03/17] Input: sun4i-ts: Add thermal zone sensor support
  2015-01-09 18:07         ` Eduardo Valentin
@ 2015-01-09 18:24           ` Chen-Yu Tsai
  0 siblings, 0 replies; 41+ messages in thread
From: Chen-Yu Tsai @ 2015-01-09 18:24 UTC (permalink / raw)
  To: Eduardo Valentin
  Cc: Maxime Ripard, Dmitry Torokhov, Zhang Rui, Hans de Goede,
	linux-input@vger.kernel.org, linux-arm-kernel, linux-pm

On Sat, Jan 10, 2015 at 2:07 AM, Eduardo Valentin <edubezval@gmail.com> wrote:
> On Thu, Jan 08, 2015 at 09:33:54PM +0800, Chen-Yu Tsai wrote:
>> On Thu, Jan 8, 2015 at 12:24 AM, Chen-Yu Tsai <wens@csie.org> wrote:
>> > Hi,
>> >
>> > On Tue, Jan 6, 2015 at 11:24 PM, Eduardo Valentin <edubezval@gmail.com> wrote:
>> >> Hello Chen-Yu,
>> >>
>> >>
>> >> On Tue, Jan 06, 2015 at 10:35:13AM +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.
>> >>>
>> >>> Signed-off-by: Chen-Yu Tsai <wens@csie.org>
>> >>> ---
>> >>>  .../bindings/input/touchscreen/sun4i.txt           |  1 +
>> >>>  drivers/input/touchscreen/sun4i-ts.c               | 27 ++++++++++++++++++++++
>> >>>  2 files changed, 28 insertions(+)
>> >>>
>> >>> diff --git a/Documentation/devicetree/bindings/input/touchscreen/sun4i.txt b/Documentation/devicetree/bindings/input/touchscreen/sun4i.txt
>> >>> index aef57791f40b..7f1110adbd24 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
>> >>>
>> >>
>> >> You may want to update your Example section too, below.
>> >> Example:
>> >>
>> >>         rtp: rtp@01c25000 {
>> >>                 compatible = "allwinner,sun4i-a10-ts";
>> >>                 reg = <0x01c25000 0x100>;
>> >>                 interrupts = <29>;
>> >>                 allwinner,ts-attached;
>> >>                 #thermal-sensor-cells = <0>;
>> >>         };
>> >
>> > Ok.
>> >
>> >>
>> >>
>> >>>  Optional properties:
>> >>>   - allwinner,ts-attached: boolean indicating that an actual touchscreen is
>> >>> diff --git a/drivers/input/touchscreen/sun4i-ts.c b/drivers/input/touchscreen/sun4i-ts.c
>> >>> index 28a06749ae42..b6e9043446d6 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,6 +182,23 @@ static void sun4i_ts_close(struct input_dev *dev)
>> >>>       writel(TEMP_IRQ_EN(1), ts->base + TP_INT_FIFOC);
>> >>>  }
>> >>>
>> >>> +static int get_temp(void *data, long *temp)
>> >>> +{
>> >>> +     struct sun4i_ts_data *ts = data;
>> >>> +
>> >>> +     /* No temp_data until the first irq */
>> >>> +     if (ts->temp_data == -1)
>> >>> +             return -EAGAIN;
>> >>> +
>> >>> +     *temp = (ts->temp_data - 1447) * 100;
>> >>> +
>> >>
>> >> Care to explain the formula in a simple comment?
>> >
>> > This was just copied from the hwmon section. AFAIK there is no documentation
>> > for the formula. It was probably copied from Allwinner's SDK code.
>> >
>> > Hans? Do you remember where you got this?
>>
>> So this is from the AXP209 datasheet. The Allwinner SoC datasheets don't
>> mention the formula to calculate the temperature. But since Allwinner
>> and X-powers are affiliated, it's possible they use the same formula.
>>
>> http://comments.gmane.org/gmane.comp.hardware.netbook.arm.sunxi/3838
>
> Ok. We use in the thermal framework  miliCelsius as the temperature
> unit. Can you make sure the resulting temperature is in miliCelsius?

Yes the result is in miliCelsius.

>>
>> >>> +     return 0;
>> >>> +}
>> >>> +
>> >>> +static struct thermal_zone_of_device_ops sun4i_ts_tz_ops = {
>> >>> +     .get_temp = get_temp,
>> >>> +};
>> >>> +
>> >>>  static ssize_t show_temp(struct device *dev, struct device_attribute *devattr,
>> >>>                        char *buf)
>> >>>  {
>> >>> @@ -288,6 +307,11 @@ static int sun4i_ts_probe(struct platform_device *pdev)
>> >>>       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) {
>> >>
>> >> here.. if input_register_device fails, you will keep an orphan thermal zone
>> >> registered in your system:
>> >>
>> >>                 error = input_register_device(ts->input);
>> >>                 if (error) {
>> >>                         writel(0, ts->base + TP_INT_FIFOC);
>> >
>> > Will add an unregister call here.
>> >
>> >
>> > Thanks for the review.
>> >
>> > ChenYu
>> >
>> >>                         return error;
>> >>                 }
>> >>                 ...
>> >>
>> >>
>> >>> @@ -310,6 +334,9 @@ static int sun4i_ts_remove(struct platform_device *pdev)
>> >>>       if (ts->input)
>> >>>               input_unregister_device(ts->input);
>> >>>
>> >>> +     if (ts->tz)
>> >>> +             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	[flat|nested] 41+ messages in thread

end of thread, other threads:[~2015-01-09 18:25 UTC | newest]

Thread overview: 41+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-01-06  2:35 [PATCH 00/17] ARM: sunxi: Support cpufreq on sun[457]i Chen-Yu Tsai
2015-01-06  2:35 ` [PATCH 01/17] ARM: sunxi: Register cpufreq-dt for sun[45678]i Chen-Yu Tsai
2015-01-06 15:55   ` Maxime Ripard
2015-01-07  9:07     ` Chen-Yu Tsai
2015-01-07 10:01       ` Viresh Kumar
2015-01-07 10:23   ` Maxime Ripard
2015-01-06  2:35 ` [PATCH 02/17] clk: sunxi: Propagate rate changes to parent for mux clocks Chen-Yu Tsai
2015-01-06 16:00   ` Maxime Ripard
2015-01-06  2:35 ` [PATCH 03/17] Input: sun4i-ts: Add thermal zone sensor support Chen-Yu Tsai
2015-01-06 15:24   ` Eduardo Valentin
2015-01-07 16:24     ` Chen-Yu Tsai
2015-01-08 13:33       ` Chen-Yu Tsai
2015-01-09 18:07         ` Eduardo Valentin
2015-01-09 18:24           ` Chen-Yu Tsai
2015-01-06  2:35 ` [PATCH 04/17] ARM: dts: sunxi: Add dtsi for AXP209 PMIC Chen-Yu Tsai
2015-01-06 15:58   ` Maxime Ripard
2015-01-06 19:09     ` Chen-Yu Tsai
2015-01-06  2:35 ` [PATCH 05/17] ARM: dts: sunxi: Enable thermal sensor support for RTP on sun[457]i Chen-Yu Tsai
2015-01-06 15:25   ` Eduardo Valentin
2015-01-06 15:52   ` Maxime Ripard
2015-01-06  2:35 ` [PATCH 06/17] ARM: dts: sun7i: Add cpu clock reference and operating points to dtsi Chen-Yu Tsai
2015-01-06 16:07   ` Maxime Ripard
2015-01-06  2:35 ` [PATCH 07/17] ARM: dts: sun7i: Add cpu thermal zones " Chen-Yu Tsai
2015-01-06 15:28   ` Eduardo Valentin
2015-01-06  2:35 ` [PATCH 08/17] ARM: dts: sun7i: cubieboard2: add axp209 regulator nodes Chen-Yu Tsai
2015-01-06 16:11   ` Maxime Ripard
2015-01-06  2:35 ` [PATCH 09/17] ARM: dts: sun7i: cubietruck: " Chen-Yu Tsai
2015-01-06  2:35 ` [PATCH 10/17] ARM: dts: sun5i: Add cpu clock reference and operating points to dtsi Chen-Yu Tsai
2015-01-06  2:35 ` [PATCH 11/17] ARM: dts: sun5i: Add cpu thermal zones " Chen-Yu Tsai
2015-01-06 15:30   ` Eduardo Valentin
2015-01-06  2:35 ` [PATCH 12/17] ARM: dts: sun5i: hsg-h702: add axp209 regulator nodes Chen-Yu Tsai
2015-01-06  2:35 ` [PATCH 13/17] ARM: dts: sun4i: Add cpu clock reference and operating points to dtsi Chen-Yu Tsai
2015-01-06  2:35 ` [PATCH 14/17] ARM: dts: sun4i: Add cpu thermal zones " Chen-Yu Tsai
2015-01-06 15:29   ` Eduardo Valentin
2015-01-06  2:35 ` [PATCH 15/17] ARM: dts: sun4i: cubieboard: add axp209 regulator nodes Chen-Yu Tsai
2015-01-06  2:35 ` [PATCH 16/17] ARM: sunxi_defconfig: Enable TOUCHSCREEN_SUN4I, CPUFREQ_DT, CPU_THERMAL Chen-Yu Tsai
2015-01-06 15:32   ` Eduardo Valentin
2015-01-06 16:13   ` Maxime Ripard
2015-01-06  2:35 ` [PATCH 17/17] ARM: multi_v7_defconfig: Enable TOUCHSCREEN_SUN4I, CPU_THERMAL Chen-Yu Tsai
2015-01-06 15:31   ` Eduardo Valentin
2015-01-06 16:12   ` Maxime Ripard

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).