devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 00/10] Allwinner H3 DVFS support
@ 2018-02-06  4:48 Icenowy Zheng
  2018-02-06  4:48 ` [PATCH v2 01/10] dt-bindings: add binding for the SY8106A voltage regulator Icenowy Zheng
                   ` (2 more replies)
  0 siblings, 3 replies; 21+ messages in thread
From: Icenowy Zheng @ 2018-02-06  4:48 UTC (permalink / raw)
  To: Liam Girdwood, Rob Herring, Maxime Ripard, Chen-Yu Tsai
  Cc: linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	devicetree-u79uwXL29TY76Z2rM5mHXA,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	linux-sunxi-/JYPxA39Uh5TLH3MbocFFw, Icenowy Zheng

This patchset tries to add DVFS support for Allwinner H3 SoC,
considering two kinds of adjustable regulators used on H3 boards:
SY8106A I2C-controlled regulator and SY8113B regulator (controllable
by GPIO with some special designs on the board), and also taking the
uncontrollable boards into consider.

PATCH 1 and PATCH 2 are for the SY8106A regulator, then PATCH 3 and
PATCH 4 are for the r_i2c bus, which is used by boards with SY8106A
to communicate with the regulator.

PATCH 5 adds the operating points v2 table to the H3 SoC, but with
OPPs higher than 1008MHz temporarily dropped.

Then there's patches for several tested boards: Orange Pi PC (with
SY8106A), Orange Pi One/Zero (with GPIO-adjustable SY8113B) and
ALL-H3-CC (unadjustable).

Icenowy Zheng (5):
  ARM: sun8i: h3: add operating-points-v2 table for CPU
  ARM: sun8i: h2+: add SY8113B regulator used by Orange Pi Zero board
  ARM: sun8i: h3: add SY8113B regulator used by Orange Pi One board
  ARM: sun8i: h3: fix ALL-H3-CC H3 ver VDD-CPUX voltage
  ARM: sun8i: h3: set the cpu-supply to VDD-CPUX on ALL-H3-CC H3 ver

Ondrej Jirman (5):
  dt-bindings: add binding for the SY8106A voltage regulator
  regulator: add support for SY8106A regulator
  ARM: sunxi: h3/h5: Add r_i2c pinmux node
  ARM: sunxi: h3/h5: Add r_i2c I2C controller
  ARM: sun8i: h3: Add SY8106A regulator to Orange Pi PC

 .../bindings/regulator/sy8106a-regulator.txt       |  20 +++
 arch/arm/boot/dts/sun8i-h2-plus-orangepi-zero.dts  |  21 +++
 arch/arm/boot/dts/sun8i-h3-libretech-all-h3-cc.dts |   8 +-
 arch/arm/boot/dts/sun8i-h3-orangepi-one.dts        |  21 +++
 arch/arm/boot/dts/sun8i-h3-orangepi-pc.dts         |  27 ++++
 arch/arm/boot/dts/sun8i-h3.dtsi                    |  32 +++-
 arch/arm/boot/dts/sunxi-h3-h5.dtsi                 |  18 +++
 drivers/regulator/Kconfig                          |   8 +-
 drivers/regulator/Makefile                         |   2 +-
 drivers/regulator/sy8106a-regulator.c              | 168 +++++++++++++++++++++
 10 files changed, 320 insertions(+), 5 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/regulator/sy8106a-regulator.txt
 create mode 100644 drivers/regulator/sy8106a-regulator.c

-- 
2.15.1

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

* [PATCH v2 01/10] dt-bindings: add binding for the SY8106A voltage regulator
  2018-02-06  4:48 [PATCH v2 00/10] Allwinner H3 DVFS support Icenowy Zheng
@ 2018-02-06  4:48 ` Icenowy Zheng
       [not found] ` <20180206044905.30508-1-icenowy-h8G6r0blFSE@public.gmane.org>
  2018-02-06  4:49 ` [PATCH v2 09/10] ARM: sun8i: h3: fix ALL-H3-CC H3 ver VDD-CPUX voltage Icenowy Zheng
  2 siblings, 0 replies; 21+ messages in thread
From: Icenowy Zheng @ 2018-02-06  4:48 UTC (permalink / raw)
  To: Liam Girdwood, Rob Herring, Maxime Ripard, Chen-Yu Tsai
  Cc: linux-kernel, devicetree, linux-arm-kernel, linux-sunxi,
	Ondrej Jirman, Icenowy Zheng

From: Ondrej Jirman <megous@megous.com>

SY8106A is an I2C-controlled adjustable voltage regulator made by
Silergy Corp.

Add its device tree binding.

Signed-off-by: Ondrej Jirman <megous@megous.com>
[Icenowy: Change commit message and slight fixes]
Signed-off-by: Icenowy Zheng <icenowy@aosc.io>
Reviewed-by: Chen-Yu Tsai <wens@csie.org>
Acked-by: Rob Herring <robh@kernel.org>
---
Changes in v2:
- Added Chen-Yu's Reviewed tag and Rob's ACK tag.
- Specify regulator.txt's directory.

 .../bindings/regulator/sy8106a-regulator.txt         | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/regulator/sy8106a-regulator.txt

diff --git a/Documentation/devicetree/bindings/regulator/sy8106a-regulator.txt b/Documentation/devicetree/bindings/regulator/sy8106a-regulator.txt
new file mode 100644
index 000000000000..82384579b5ef
--- /dev/null
+++ b/Documentation/devicetree/bindings/regulator/sy8106a-regulator.txt
@@ -0,0 +1,20 @@
+SY8106A Voltage regulator
+
+Required properties:
+- compatible: Must be "silergy,sy8106a"
+- reg: I2C slave address - must be <0x65>
+
+Any property defined as part of the core regulator binding, defined in
+./regulator.txt, can also be used.
+
+Example:
+
+	sy8106a {
+		compatible = "silergy,sy8106a";
+		reg = <0x65>;
+		regulator-name = "sy8106a-vdd";
+		regulator-min-microvolt = <1000000>;
+		regulator-max-microvolt = <1400000>;
+		regulator-boot-on;
+		regulator-always-on;
+	};
-- 
2.15.1

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

* [PATCH v2 02/10] regulator: add support for SY8106A regulator
       [not found] ` <20180206044905.30508-1-icenowy-h8G6r0blFSE@public.gmane.org>
@ 2018-02-06  4:48   ` Icenowy Zheng
       [not found]     ` <20180206044905.30508-3-icenowy-h8G6r0blFSE@public.gmane.org>
  2018-02-06  4:48   ` [PATCH v2 03/10] ARM: sunxi: h3/h5: Add r_i2c pinmux node Icenowy Zheng
                     ` (7 subsequent siblings)
  8 siblings, 1 reply; 21+ messages in thread
From: Icenowy Zheng @ 2018-02-06  4:48 UTC (permalink / raw)
  To: Liam Girdwood, Rob Herring, Maxime Ripard, Chen-Yu Tsai
  Cc: linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	devicetree-u79uwXL29TY76Z2rM5mHXA,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	linux-sunxi-/JYPxA39Uh5TLH3MbocFFw, Ondrej Jirman, Icenowy Zheng

From: Ondrej Jirman <megous-5qf/QAjKc83QT0dZR+AlfA@public.gmane.org>

SY8106A is an I2C attached single output regulator made by Silergy Corp,
which is used on several Allwinner H3/H5 SBCs to control the power
supply of the ARM cores.

Add a driver for it.

Signed-off-by: Ondrej Jirman <megous-5qf/QAjKc83QT0dZR+AlfA@public.gmane.org>
[Icenowy: Change commit message, remove enable/disable code, add default
 ramp_delay, add comment for go bit]
Signed-off-by: Icenowy Zheng <icenowy-h8G6r0blFSE@public.gmane.org>
---
Changes in v2:
- Dropped the enable/disable code.
- Added default ramp_delay value.
- Added comment for the "go bit".

 drivers/regulator/Kconfig             |   8 +-
 drivers/regulator/Makefile            |   2 +-
 drivers/regulator/sy8106a-regulator.c | 168 ++++++++++++++++++++++++++++++++++
 3 files changed, 176 insertions(+), 2 deletions(-)
 create mode 100644 drivers/regulator/sy8106a-regulator.c

diff --git a/drivers/regulator/Kconfig b/drivers/regulator/Kconfig
index b27417ca188a..70227230bca2 100644
--- a/drivers/regulator/Kconfig
+++ b/drivers/regulator/Kconfig
@@ -792,6 +792,13 @@ config REGULATOR_STW481X_VMMC
 	  This driver supports the internal VMMC regulator in the STw481x
 	  PMIC chips.
 
+config REGULATOR_SY8106A
+	tristate "Silergy SY8106A regulator"
+	depends on I2C && (OF || COMPILE_TEST)
+	select REGMAP_I2C
+	help
+	  This driver supports SY8106A single output regulator.
+
 config REGULATOR_TPS51632
 	tristate "TI TPS51632 Power Regulator"
 	depends on I2C
@@ -966,4 +973,3 @@ config REGULATOR_WM8994
 	  WM8994 CODEC.
 
 endif
-
diff --git a/drivers/regulator/Makefile b/drivers/regulator/Makefile
index 19fea09ba10a..7564664c64df 100644
--- a/drivers/regulator/Makefile
+++ b/drivers/regulator/Makefile
@@ -99,6 +99,7 @@ obj-$(CONFIG_REGULATOR_SC2731) += sc2731-regulator.o
 obj-$(CONFIG_REGULATOR_SKY81452) += sky81452-regulator.o
 obj-$(CONFIG_REGULATOR_STM32_VREFBUF) += stm32-vrefbuf.o
 obj-$(CONFIG_REGULATOR_STW481X_VMMC) += stw481x-vmmc.o
+obj-$(CONFIG_REGULATOR_SY8106A) += sy8106a-regulator.o
 obj-$(CONFIG_REGULATOR_TI_ABB) += ti-abb-regulator.o
 obj-$(CONFIG_REGULATOR_TPS6105X) += tps6105x-regulator.o
 obj-$(CONFIG_REGULATOR_TPS62360) += tps62360-regulator.o
@@ -124,5 +125,4 @@ obj-$(CONFIG_REGULATOR_WM8350) += wm8350-regulator.o
 obj-$(CONFIG_REGULATOR_WM8400) += wm8400-regulator.o
 obj-$(CONFIG_REGULATOR_WM8994) += wm8994-regulator.o
 
-
 ccflags-$(CONFIG_REGULATOR_DEBUG) += -DDEBUG
diff --git a/drivers/regulator/sy8106a-regulator.c b/drivers/regulator/sy8106a-regulator.c
new file mode 100644
index 000000000000..c5643c33e1e5
--- /dev/null
+++ b/drivers/regulator/sy8106a-regulator.c
@@ -0,0 +1,168 @@
+/*
+ * sy8106a-regulator.c - Regulator device driver for SY8106A
+ *
+ * Copyright (C) 2016 Ondřej Jirman <megous-5qf/QAjKc83QT0dZR+AlfA@public.gmane.org>
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This program 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
+ * Library General Public License for more details.
+ */
+
+#include <linux/err.h>
+#include <linux/i2c.h>
+#include <linux/module.h>
+#include <linux/regmap.h>
+#include <linux/regulator/driver.h>
+#include <linux/regulator/of_regulator.h>
+
+#define SY8106A_REG_VOUT1_SEL		0x01
+#define SY8106A_REG_VOUT_COM		0x02
+#define SY8106A_REG_VOUT1_SEL_MASK	0x7f
+#define SY8106A_DISABLE_REG		BIT(0)
+/*
+ * The I2C controlled voltage will only work when this bit is set; otherwise
+ * it will behave like a fixed regulator.
+ */
+#define SY8106A_GO_BIT			BIT(7)
+
+struct sy8106a {
+	struct regulator_dev *rdev;
+	struct regmap *regmap;
+};
+
+static const struct regmap_config sy8106a_regmap_config = {
+	.reg_bits = 8,
+	.val_bits = 8,
+};
+
+static int sy8106a_set_voltage_sel(struct regulator_dev *rdev, unsigned int sel)
+{
+	/* We use our set_voltage_sel in order to avoid unnecessary I2C
+	 * chatter, because the regulator_get_voltage_sel_regmap using
+	 * apply_bit would perform 4 unnecessary transfers instead of one,
+	 * increasing the chance of error.
+	 */
+	return regmap_write(rdev->regmap, rdev->desc->vsel_reg,
+			    sel | SY8106A_GO_BIT);
+}
+
+static const struct regulator_ops sy8106a_ops = {
+	.set_voltage_sel = sy8106a_set_voltage_sel,
+	.set_voltage_time_sel = regulator_set_voltage_time_sel,
+	.get_voltage_sel = regulator_get_voltage_sel_regmap,
+	.list_voltage = regulator_list_voltage_linear,
+	/* Enabling/disabling the regulator is not yet implemented */
+};
+
+/* Default limits measured in millivolts and milliamps */
+#define SY8106A_MIN_MV		680
+#define SY8106A_MAX_MV		1950
+#define SY8106A_STEP_MV		10
+
+static const struct regulator_desc sy8106a_reg = {
+	.name = "SY8106A",
+	.id = 0,
+	.ops = &sy8106a_ops,
+	.type = REGULATOR_VOLTAGE,
+	.n_voltages = ((SY8106A_MAX_MV - SY8106A_MIN_MV) / SY8106A_STEP_MV) + 1,
+	.min_uV = (SY8106A_MIN_MV * 1000),
+	.uV_step = (SY8106A_STEP_MV * 1000),
+	.vsel_reg = SY8106A_REG_VOUT1_SEL,
+	.vsel_mask = SY8106A_REG_VOUT1_SEL_MASK,
+	/*
+	 * This ramp_delay is a conservative default value which works on
+	 * H3/H5 boards VDD-CPUX situations.
+	 */
+	.ramp_delay = 200,
+	.owner = THIS_MODULE,
+};
+
+/*
+ * I2C driver interface functions
+ */
+static int sy8106a_i2c_probe(struct i2c_client *i2c,
+			    const struct i2c_device_id *id)
+{
+	struct sy8106a *chip;
+	struct device *dev = &i2c->dev;
+	struct regulator_dev *rdev = NULL;
+	struct regulator_config config = { };
+	unsigned int selector;
+	int error;
+
+	chip = devm_kzalloc(&i2c->dev, sizeof(struct sy8106a), GFP_KERNEL);
+	if (!chip)
+		return -ENOMEM;
+
+	chip->regmap = devm_regmap_init_i2c(i2c, &sy8106a_regmap_config);
+	if (IS_ERR(chip->regmap)) {
+		error = PTR_ERR(chip->regmap);
+		dev_err(&i2c->dev, "Failed to allocate register map: %d\n",
+			error);
+		return error;
+	}
+
+	config.dev = &i2c->dev;
+	config.regmap = chip->regmap;
+	config.driver_data = chip;
+
+	config.of_node = dev->of_node;
+	config.init_data = of_get_regulator_init_data(dev, dev->of_node,
+						      &sy8106a_reg);
+
+	if (!config.init_data)
+		return -ENOMEM;
+
+	/* Probe regulator */
+	error = regmap_read(chip->regmap, SY8106A_REG_VOUT1_SEL, &selector);
+	if (error) {
+		dev_err(&i2c->dev, "Failed to read voltage at probe time: %d\n", error);
+		return error;
+	}
+
+	rdev = devm_regulator_register(&i2c->dev, &sy8106a_reg, &config);
+	if (IS_ERR(rdev)) {
+		error = PTR_ERR(rdev);
+		dev_err(&i2c->dev, "Failed to register SY8106A regulator: %d\n", error);
+		return error;
+	}
+
+	chip->rdev = rdev;
+
+	i2c_set_clientdata(i2c, chip);
+
+	return 0;
+}
+
+static const struct of_device_id sy8106a_i2c_of_match[] = {
+	{ .compatible = "silergy,sy8106a" },
+	{ },
+};
+MODULE_DEVICE_TABLE(of, sy8106a_i2c_of_match);
+
+static const struct i2c_device_id sy8106a_i2c_id[] = {
+	{ "sy8106a", 0 },
+	{ },
+};
+MODULE_DEVICE_TABLE(i2c, sy8106a_i2c_id);
+
+static struct i2c_driver sy8106a_regulator_driver = {
+	.driver = {
+		.name = "sy8106a",
+		.of_match_table	= of_match_ptr(sy8106a_i2c_of_match),
+	},
+	.probe = sy8106a_i2c_probe,
+	.id_table = sy8106a_i2c_id,
+};
+
+module_i2c_driver(sy8106a_regulator_driver);
+
+MODULE_AUTHOR("Ondřej Jirman <megous-5qf/QAjKc83QT0dZR+AlfA@public.gmane.org>");
+MODULE_DESCRIPTION("Regulator device driver for Silergy SY8106A");
+MODULE_LICENSE("GPL");
-- 
2.15.1

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

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

* [PATCH v2 03/10] ARM: sunxi: h3/h5: Add r_i2c pinmux node
       [not found] ` <20180206044905.30508-1-icenowy-h8G6r0blFSE@public.gmane.org>
  2018-02-06  4:48   ` [PATCH v2 02/10] regulator: add support for SY8106A regulator Icenowy Zheng
@ 2018-02-06  4:48   ` Icenowy Zheng
  2018-02-06  4:48   ` [PATCH v2 04/10] ARM: sunxi: h3/h5: Add r_i2c I2C controller Icenowy Zheng
                     ` (6 subsequent siblings)
  8 siblings, 0 replies; 21+ messages in thread
From: Icenowy Zheng @ 2018-02-06  4:48 UTC (permalink / raw)
  To: Liam Girdwood, Rob Herring, Maxime Ripard, Chen-Yu Tsai
  Cc: linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	devicetree-u79uwXL29TY76Z2rM5mHXA,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	linux-sunxi-/JYPxA39Uh5TLH3MbocFFw, Ondrej Jirman, Icenowy Zheng

From: Ondrej Jirman <megous-5qf/QAjKc83QT0dZR+AlfA@public.gmane.org>

H3/H5 SoCs contain an I2C controller optionally available
on the PL0 and PL1 pins. This patch adds pinmux configuration
for this controller.

Signed-off-by: Ondrej Jirman <megous-5qf/QAjKc83QT0dZR+AlfA@public.gmane.org>
[Icenowy: change commit message, node name and function name]
Signed-off-by: Icenowy Zheng <icenowy-h8G6r0blFSE@public.gmane.org>
Reviewed-by: Chen-Yu Tsai <wens-jdAy2FN1RRM@public.gmane.org>
---
Changes in v2:
- Added Chen-Yu's Review tag.

 arch/arm/boot/dts/sunxi-h3-h5.dtsi | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/arch/arm/boot/dts/sunxi-h3-h5.dtsi b/arch/arm/boot/dts/sunxi-h3-h5.dtsi
index 7a83b15225c7..fc602aed60a6 100644
--- a/arch/arm/boot/dts/sunxi-h3-h5.dtsi
+++ b/arch/arm/boot/dts/sunxi-h3-h5.dtsi
@@ -731,6 +731,11 @@
 				pins = "PL11";
 				function = "s_cir_rx";
 			};
+
+			r_i2c_pins: r-i2c {
+				pins = "PL0", "PL1";
+				function = "s_i2c";
+			};
 		};
 	};
 };
-- 
2.15.1

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

* [PATCH v2 04/10] ARM: sunxi: h3/h5: Add r_i2c I2C controller
       [not found] ` <20180206044905.30508-1-icenowy-h8G6r0blFSE@public.gmane.org>
  2018-02-06  4:48   ` [PATCH v2 02/10] regulator: add support for SY8106A regulator Icenowy Zheng
  2018-02-06  4:48   ` [PATCH v2 03/10] ARM: sunxi: h3/h5: Add r_i2c pinmux node Icenowy Zheng
@ 2018-02-06  4:48   ` Icenowy Zheng
  2018-02-06  4:49   ` [PATCH v2 05/10] ARM: sun8i: h3: add operating-points-v2 table for CPU Icenowy Zheng
                     ` (5 subsequent siblings)
  8 siblings, 0 replies; 21+ messages in thread
From: Icenowy Zheng @ 2018-02-06  4:48 UTC (permalink / raw)
  To: Liam Girdwood, Rob Herring, Maxime Ripard, Chen-Yu Tsai
  Cc: linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	devicetree-u79uwXL29TY76Z2rM5mHXA,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	linux-sunxi-/JYPxA39Uh5TLH3MbocFFw, Ondrej Jirman, Icenowy Zheng

From: Ondrej Jirman <megous-5qf/QAjKc83QT0dZR+AlfA@public.gmane.org>

Allwinner H3/H5 SoCs have an I2C controller at PL GPIO bank.

Add support for it in the device tree.

Signed-off-by: Ondrej Jirman <megous-5qf/QAjKc83QT0dZR+AlfA@public.gmane.org>
[Icenowy: Change to use r_ccu and change pinmux node name]
Signed-off-by: Icenowy Zheng <icenowy-h8G6r0blFSE@public.gmane.org>
Reviewed-by: Chen-Yu Tsai <wens-jdAy2FN1RRM@public.gmane.org>
---
Changes in v2:
- Added Chen-Yu's Review tag.

 arch/arm/boot/dts/sunxi-h3-h5.dtsi | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/arch/arm/boot/dts/sunxi-h3-h5.dtsi b/arch/arm/boot/dts/sunxi-h3-h5.dtsi
index fc602aed60a6..57606900a949 100644
--- a/arch/arm/boot/dts/sunxi-h3-h5.dtsi
+++ b/arch/arm/boot/dts/sunxi-h3-h5.dtsi
@@ -716,6 +716,19 @@
 			status = "disabled";
 		};
 
+		r_i2c: i2c@1f02400 {
+			compatible = "allwinner,sun6i-a31-i2c";
+			reg = <0x01f02400 0x400>;
+			interrupts = <GIC_SPI 44 IRQ_TYPE_LEVEL_HIGH>;
+			pinctrl-names = "default";
+			pinctrl-0 = <&r_i2c_pins>;
+			clocks = <&r_ccu CLK_APB0_I2C>;
+			resets = <&r_ccu RST_APB0_I2C>;
+			status = "disabled";
+			#address-cells = <1>;
+			#size-cells = <0>;
+		};
+
 		r_pio: pinctrl@1f02c00 {
 			compatible = "allwinner,sun8i-h3-r-pinctrl";
 			reg = <0x01f02c00 0x400>;
-- 
2.15.1

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

* [PATCH v2 05/10] ARM: sun8i: h3: add operating-points-v2 table for CPU
       [not found] ` <20180206044905.30508-1-icenowy-h8G6r0blFSE@public.gmane.org>
                     ` (2 preceding siblings ...)
  2018-02-06  4:48   ` [PATCH v2 04/10] ARM: sunxi: h3/h5: Add r_i2c I2C controller Icenowy Zheng
@ 2018-02-06  4:49   ` Icenowy Zheng
       [not found]     ` <20180206044905.30508-6-icenowy-h8G6r0blFSE@public.gmane.org>
  2018-02-06  4:49   ` [PATCH v2 06/10] ARM: sun8i: h2+: add SY8113B regulator used by Orange Pi Zero board Icenowy Zheng
                     ` (4 subsequent siblings)
  8 siblings, 1 reply; 21+ messages in thread
From: Icenowy Zheng @ 2018-02-06  4:49 UTC (permalink / raw)
  To: Liam Girdwood, Rob Herring, Maxime Ripard, Chen-Yu Tsai
  Cc: linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	devicetree-u79uwXL29TY76Z2rM5mHXA,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	linux-sunxi-/JYPxA39Uh5TLH3MbocFFw, Icenowy Zheng

The CPU on Allwinner H3 can do dynamic frequency scaling.

Add a DVFS table based on the one shipped with Allwinner's H3 SDK. The
voltage-frequency relationship seems to be conservative, and Armbian has
another DVFS table which uses lower voltage at a certain frequency.
However, the official one is chosen for safety.

Frequencies higher than 1008MHz are temporarily dropped in the table, as
they may lead to over voltage on boards without proper regulator
settings or over temperature on boards with proper regulator settings.
They will be added back once regulator settings are ready and thermal
sensor driver is merged.

In order to satisfy all different regulators (SY8106A which is 50mV per
level, SY8113B which have two states: 1.1V and 1.3V, and some board with
non-tweakable regulators), all the OPPs are defined with a range which has
the target value as the minimum allowed value, and 1.3V (the highest
VDD-CPUX voltage suggested by the datasheet) as the maximum allowed value.
It's proven to work well with a board with SY8113B.

Signed-off-by: Icenowy Zheng <icenowy-h8G6r0blFSE@public.gmane.org>
---
Changes in v2:
- Switch to BSP OPP table, which is more conservative.

 arch/arm/boot/dts/sun8i-h3.dtsi | 32 +++++++++++++++++++++++++++++++-
 1 file changed, 31 insertions(+), 1 deletion(-)

diff --git a/arch/arm/boot/dts/sun8i-h3.dtsi b/arch/arm/boot/dts/sun8i-h3.dtsi
index 8495deecedad..36608c03f02b 100644
--- a/arch/arm/boot/dts/sun8i-h3.dtsi
+++ b/arch/arm/boot/dts/sun8i-h3.dtsi
@@ -43,32 +43,62 @@
 #include "sunxi-h3-h5.dtsi"
 
 / {
+	cpu0_opp_table: opp_table0 {
+		compatible = "operating-points-v2";
+		opp-shared;
+
+		opp@648000000 {
+			opp-hz = /bits/ 64 <648000000>;
+			opp-microvolt = <1040000 1040000 1300000>;
+			clock-latency-ns = <244144>; /* 8 32k periods */
+		};
+
+		opp@816000000 {
+			opp-hz = /bits/ 64 <816000000>;
+			opp-microvolt = <1100000 1100000 1300000>;
+			clock-latency-ns = <244144>; /* 8 32k periods */
+		};
+
+		opp@1008000000 {
+			opp-hz = /bits/ 64 <1008000000>;
+			opp-microvolt = <1200000 1200000 1300000>;
+			clock-latency-ns = <244144>; /* 8 32k periods */
+		};
+	};
+
 	cpus {
 		#address-cells = <1>;
 		#size-cells = <0>;
 
-		cpu@0 {
+		cpu0: cpu@0 {
 			compatible = "arm,cortex-a7";
 			device_type = "cpu";
 			reg = <0>;
+			clocks = <&ccu CLK_CPUX>;
+			clock-names = "cpu";
+			operating-points-v2 = <&cpu0_opp_table>;
+			#cooling-cells = <0x2>;
 		};
 
 		cpu@1 {
 			compatible = "arm,cortex-a7";
 			device_type = "cpu";
 			reg = <1>;
+			operating-points-v2 = <&cpu0_opp_table>;
 		};
 
 		cpu@2 {
 			compatible = "arm,cortex-a7";
 			device_type = "cpu";
 			reg = <2>;
+			operating-points-v2 = <&cpu0_opp_table>;
 		};
 
 		cpu@3 {
 			compatible = "arm,cortex-a7";
 			device_type = "cpu";
 			reg = <3>;
+			operating-points-v2 = <&cpu0_opp_table>;
 		};
 	};
 
-- 
2.15.1

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

* [PATCH v2 06/10] ARM: sun8i: h2+: add SY8113B regulator used by Orange Pi Zero board
       [not found] ` <20180206044905.30508-1-icenowy-h8G6r0blFSE@public.gmane.org>
                     ` (3 preceding siblings ...)
  2018-02-06  4:49   ` [PATCH v2 05/10] ARM: sun8i: h3: add operating-points-v2 table for CPU Icenowy Zheng
@ 2018-02-06  4:49   ` Icenowy Zheng
       [not found]     ` <20180206044905.30508-7-icenowy-h8G6r0blFSE@public.gmane.org>
  2018-02-06  4:49   ` [PATCH v2 07/10] ARM: sun8i: h3: add SY8113B regulator used by Orange Pi One board Icenowy Zheng
                     ` (3 subsequent siblings)
  8 siblings, 1 reply; 21+ messages in thread
From: Icenowy Zheng @ 2018-02-06  4:49 UTC (permalink / raw)
  To: Liam Girdwood, Rob Herring, Maxime Ripard, Chen-Yu Tsai
  Cc: linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	devicetree-u79uwXL29TY76Z2rM5mHXA,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	linux-sunxi-/JYPxA39Uh5TLH3MbocFFw, Icenowy Zheng

Orange Pi Zero board has a SY8113B regulator, which is controlled via
GPIO and capable of outputing 1.1V when the PL6 GPIO is set to output 0
or 1.3V when the PL6 GPIO is set to input or output 1, and the output is
the power supply of the ARM cores in H2+ SoC.

Add the device tree node of this regulator and set the cpu's cpu-supply
property to it.

Signed-off-by: Icenowy Zheng <icenowy-h8G6r0blFSE@public.gmane.org>
---
No changes in v2.

 arch/arm/boot/dts/sun8i-h2-plus-orangepi-zero.dts | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)

diff --git a/arch/arm/boot/dts/sun8i-h2-plus-orangepi-zero.dts b/arch/arm/boot/dts/sun8i-h2-plus-orangepi-zero.dts
index 6713d0f2b3f4..34fc35737090 100644
--- a/arch/arm/boot/dts/sun8i-h2-plus-orangepi-zero.dts
+++ b/arch/arm/boot/dts/sun8i-h2-plus-orangepi-zero.dts
@@ -94,6 +94,27 @@
 		reset-gpios = <&r_pio 0 7 GPIO_ACTIVE_LOW>;
 		post-power-on-delay-ms = <200>;
 	};
+
+	reg_sy8113b: gpio-regulator {
+		compatible = "regulator-gpio";
+		regulator-name = "vdd-cpux";
+		regulator-type = "voltage";
+		regulator-boot-on;
+		regulator-always-on;
+		regulator-min-microvolt = <1100000>;
+		regulator-max-microvolt = <1300000>;
+		regulator-ramp-delay = <50>; /* 4ms */
+
+		gpios = <&r_pio 0 6 GPIO_ACTIVE_HIGH>; /* PL6 */
+		enable-active-high;
+		gpios-states = <0x1>;
+		states = <1100000 0x0
+			  1300000 0x1>;
+	};
+};
+
+&cpu0 {
+	cpu-supply = <&reg_sy8113b>;
 };
 
 &ehci0 {
-- 
2.15.1

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

* [PATCH v2 07/10] ARM: sun8i: h3: add SY8113B regulator used by Orange Pi One board
       [not found] ` <20180206044905.30508-1-icenowy-h8G6r0blFSE@public.gmane.org>
                     ` (4 preceding siblings ...)
  2018-02-06  4:49   ` [PATCH v2 06/10] ARM: sun8i: h2+: add SY8113B regulator used by Orange Pi Zero board Icenowy Zheng
@ 2018-02-06  4:49   ` Icenowy Zheng
  2018-02-06  9:10     ` Maxime Ripard
  2018-02-06  4:49   ` [PATCH v2 08/10] ARM: sun8i: h3: Add SY8106A regulator to Orange Pi PC Icenowy Zheng
                     ` (2 subsequent siblings)
  8 siblings, 1 reply; 21+ messages in thread
From: Icenowy Zheng @ 2018-02-06  4:49 UTC (permalink / raw)
  To: Liam Girdwood, Rob Herring, Maxime Ripard, Chen-Yu Tsai
  Cc: linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	devicetree-u79uwXL29TY76Z2rM5mHXA,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	linux-sunxi-/JYPxA39Uh5TLH3MbocFFw, Icenowy Zheng

Orange Pi One board has a SY8113B regulator, which is controlled via
GPIO and capable of outputing 1.1V when the PL6 GPIO is set to output 0
or 1.3V when the PL6 GPIO is set to input or output 1, and the output is
the power supply of the ARM cores in H3 SoC.

Add the device tree node of this regulator and set the cpu's cpu-supply
property to it.

Signed-off-by: Icenowy Zheng <icenowy-h8G6r0blFSE@public.gmane.org>
---
New patch in v2.

 arch/arm/boot/dts/sun8i-h3-orangepi-one.dts | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)

diff --git a/arch/arm/boot/dts/sun8i-h3-orangepi-one.dts b/arch/arm/boot/dts/sun8i-h3-orangepi-one.dts
index 82e5d28cd698..d8250aacfda1 100644
--- a/arch/arm/boot/dts/sun8i-h3-orangepi-one.dts
+++ b/arch/arm/boot/dts/sun8i-h3-orangepi-one.dts
@@ -88,6 +88,27 @@
 			gpios = <&r_pio 0 3 GPIO_ACTIVE_LOW>;
 		};
 	};
+
+	reg_sy8113b: gpio-regulator {
+		compatible = "regulator-gpio";
+		regulator-name = "vdd-cpux";
+		regulator-type = "voltage";
+		regulator-boot-on;
+		regulator-always-on;
+		regulator-min-microvolt = <1100000>;
+		regulator-max-microvolt = <1300000>;
+		regulator-ramp-delay = <50>; /* 4ms */
+
+		gpios = <&r_pio 0 6 GPIO_ACTIVE_HIGH>; /* PL6 */
+		enable-active-high;
+		gpios-states = <0x1>;
+		states = <1100000 0x0
+			  1300000 0x1>;
+	};
+};
+
+&cpu0 {
+	cpu-supply = <&reg_sy8113b>;
 };
 
 &ehci0 {
-- 
2.15.1

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

* [PATCH v2 08/10] ARM: sun8i: h3: Add SY8106A regulator to Orange Pi PC
       [not found] ` <20180206044905.30508-1-icenowy-h8G6r0blFSE@public.gmane.org>
                     ` (5 preceding siblings ...)
  2018-02-06  4:49   ` [PATCH v2 07/10] ARM: sun8i: h3: add SY8113B regulator used by Orange Pi One board Icenowy Zheng
@ 2018-02-06  4:49   ` Icenowy Zheng
       [not found]     ` <20180206044905.30508-9-icenowy-h8G6r0blFSE@public.gmane.org>
  2018-02-06  4:49   ` [PATCH v2 10/10] ARM: sun8i: h3: set the cpu-supply to VDD-CPUX on ALL-H3-CC H3 ver Icenowy Zheng
  2018-04-16  4:41   ` [PATCH v2 00/10] Allwinner H3 DVFS support Chen-Yu Tsai
  8 siblings, 1 reply; 21+ messages in thread
From: Icenowy Zheng @ 2018-02-06  4:49 UTC (permalink / raw)
  To: Liam Girdwood, Rob Herring, Maxime Ripard, Chen-Yu Tsai
  Cc: linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	devicetree-u79uwXL29TY76Z2rM5mHXA,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	linux-sunxi-/JYPxA39Uh5TLH3MbocFFw, Ondrej Jirman, Icenowy Zheng

From: Ondrej Jirman <megous-5qf/QAjKc83QT0dZR+AlfA@public.gmane.org>

Add SY8106A regulator to r_i2c bus and enable the r_i2c bus on
Orange Pi PC, then set the power supply of the ARM cores to this
regulator, in order to enable DVFS.

Signed-off-by: Ondrej Jirman <megous-5qf/QAjKc83QT0dZR+AlfA@public.gmane.org>
[Icenowy: Enable DVFS in this patch, slight changes and change commit
 message]
Signed-off-by: Icenowy Zheng <icenowy-h8G6r0blFSE@public.gmane.org>
---
Changes in v2:
- Reduce maximum voltage to 1.3V.
- Slightly changed the comment at 1.0V minimum voltage for taking BSP
  DVFS table instead of Armbian one.

 arch/arm/boot/dts/sun8i-h3-orangepi-pc.dts | 27 +++++++++++++++++++++++++++
 1 file changed, 27 insertions(+)

diff --git a/arch/arm/boot/dts/sun8i-h3-orangepi-pc.dts b/arch/arm/boot/dts/sun8i-h3-orangepi-pc.dts
index d22546df1b82..ded9d8d6d008 100644
--- a/arch/arm/boot/dts/sun8i-h3-orangepi-pc.dts
+++ b/arch/arm/boot/dts/sun8i-h3-orangepi-pc.dts
@@ -98,6 +98,10 @@
 	status = "okay";
 };
 
+&cpu0 {
+	cpu-supply = <&reg_sy8106a>;
+};
+
 &ehci0 {
 	status = "okay";
 };
@@ -160,6 +164,29 @@
 	};
 };
 
+&r_i2c {
+	status = "okay";
+
+	reg_sy8106a: regulator@65 {
+		compatible = "silergy,sy8106a";
+		reg = <0x65>;
+		regulator-name = "vdd-cpux";
+		/*
+		 * The datasheet uses 1.1V as the minimum value of VDD-CPUX,
+		 * however both the Armbian DVFS table and the official one
+		 * have operating points with voltage under 1.1V, and both
+		 * DVFS table are known to work properly at the lowest
+		 * operating point.
+		 *
+		 * Use 1.0V as the minimum voltage instead.
+		 */
+		regulator-min-microvolt = <1000000>;
+		regulator-max-microvolt = <1300000>;
+		regulator-boot-on;
+		regulator-always-on;
+	};
+};
+
 &r_pio {
 	leds_r_opc: led_pins {
 		pins = "PL10";
-- 
2.15.1

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

* [PATCH v2 09/10] ARM: sun8i: h3: fix ALL-H3-CC H3 ver VDD-CPUX voltage
  2018-02-06  4:48 [PATCH v2 00/10] Allwinner H3 DVFS support Icenowy Zheng
  2018-02-06  4:48 ` [PATCH v2 01/10] dt-bindings: add binding for the SY8106A voltage regulator Icenowy Zheng
       [not found] ` <20180206044905.30508-1-icenowy-h8G6r0blFSE@public.gmane.org>
@ 2018-02-06  4:49 ` Icenowy Zheng
       [not found]   ` <20180206044905.30508-10-icenowy-h8G6r0blFSE@public.gmane.org>
  2 siblings, 1 reply; 21+ messages in thread
From: Icenowy Zheng @ 2018-02-06  4:49 UTC (permalink / raw)
  To: Liam Girdwood, Rob Herring, Maxime Ripard, Chen-Yu Tsai
  Cc: linux-kernel, devicetree, linux-arm-kernel, linux-sunxi, Icenowy Zheng

The VDD-CPUX voltage of ALL-H3-CC H3 ver should be 1.2V, not the 3.3V
currently defined in the device tree.

Fix the voltage in the device tree.

Fixes: 6ca358645d4d ("ARM: dts: sun8i: h3: Add dts file for Libre Computer Board ALL-H3-CC H3 ver.")
Signed-off-by: Icenowy Zheng <icenowy@aosc.io>
---
New patch in v2.

 arch/arm/boot/dts/sun8i-h3-libretech-all-h3-cc.dts | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/arm/boot/dts/sun8i-h3-libretech-all-h3-cc.dts b/arch/arm/boot/dts/sun8i-h3-libretech-all-h3-cc.dts
index d406571a0dd6..ca974d872357 100644
--- a/arch/arm/boot/dts/sun8i-h3-libretech-all-h3-cc.dts
+++ b/arch/arm/boot/dts/sun8i-h3-libretech-all-h3-cc.dts
@@ -102,8 +102,8 @@
 	reg_vdd_cpux: vdd-cpux {
 		compatible = "regulator-fixed";
 		regulator-name = "vdd-cpux";
-		regulator-min-microvolt = <3300000>;
-		regulator-max-microvolt = <3300000>;
+		regulator-min-microvolt = <1200000>;
+		regulator-max-microvolt = <1200000>;
 		regulator-always-on;
 		regulator-boot-on;
 		vin-supply = <&reg_vcc5v0>;
-- 
2.15.1

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

* [PATCH v2 10/10] ARM: sun8i: h3: set the cpu-supply to VDD-CPUX on ALL-H3-CC H3 ver
       [not found] ` <20180206044905.30508-1-icenowy-h8G6r0blFSE@public.gmane.org>
                     ` (6 preceding siblings ...)
  2018-02-06  4:49   ` [PATCH v2 08/10] ARM: sun8i: h3: Add SY8106A regulator to Orange Pi PC Icenowy Zheng
@ 2018-02-06  4:49   ` Icenowy Zheng
  2018-04-16  4:41   ` [PATCH v2 00/10] Allwinner H3 DVFS support Chen-Yu Tsai
  8 siblings, 0 replies; 21+ messages in thread
From: Icenowy Zheng @ 2018-02-06  4:49 UTC (permalink / raw)
  To: Liam Girdwood, Rob Herring, Maxime Ripard, Chen-Yu Tsai
  Cc: linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	devicetree-u79uwXL29TY76Z2rM5mHXA,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	linux-sunxi-/JYPxA39Uh5TLH3MbocFFw, Icenowy Zheng

The ALL-H3-CC has a fixed VDD-CPUX voltage at 1.2V, which is supplied
by a regulator.

Set the CPU's cpu-supply property to the VDD-CPUX regulator.

Signed-off-by: Icenowy Zheng <icenowy-h8G6r0blFSE@public.gmane.org>
---
New patch in v2.

 arch/arm/boot/dts/sun8i-h3-libretech-all-h3-cc.dts | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/arch/arm/boot/dts/sun8i-h3-libretech-all-h3-cc.dts b/arch/arm/boot/dts/sun8i-h3-libretech-all-h3-cc.dts
index ca974d872357..02eb50b91a8f 100644
--- a/arch/arm/boot/dts/sun8i-h3-libretech-all-h3-cc.dts
+++ b/arch/arm/boot/dts/sun8i-h3-libretech-all-h3-cc.dts
@@ -112,6 +112,10 @@
 	};
 };
 
+&cpu0 {
+	cpu-supply = <&reg_vdd_cpux>;
+};
+
 &codec {
 	allwinner,audio-routing =
 		"Line Out", "LINEOUT",
-- 
2.15.1

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

* Re: [PATCH v2 05/10] ARM: sun8i: h3: add operating-points-v2 table for CPU
       [not found]     ` <20180206044905.30508-6-icenowy-h8G6r0blFSE@public.gmane.org>
@ 2018-02-06  9:06       ` Maxime Ripard
  2018-02-06  9:10         ` Icenowy Zheng
  0 siblings, 1 reply; 21+ messages in thread
From: Maxime Ripard @ 2018-02-06  9:06 UTC (permalink / raw)
  To: Icenowy Zheng
  Cc: Liam Girdwood, Rob Herring, Chen-Yu Tsai,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	devicetree-u79uwXL29TY76Z2rM5mHXA,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	linux-sunxi-/JYPxA39Uh5TLH3MbocFFw

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

On Tue, Feb 06, 2018 at 12:49:00PM +0800, Icenowy Zheng wrote:
> The CPU on Allwinner H3 can do dynamic frequency scaling.
> 
> Add a DVFS table based on the one shipped with Allwinner's H3 SDK. The
> voltage-frequency relationship seems to be conservative, and Armbian has
> another DVFS table which uses lower voltage at a certain frequency.
> However, the official one is chosen for safety.
> 
> Frequencies higher than 1008MHz are temporarily dropped in the table, as
> they may lead to over voltage on boards without proper regulator
> settings or over temperature on boards with proper regulator settings.
> They will be added back once regulator settings are ready and thermal
> sensor driver is merged.
> 
> In order to satisfy all different regulators (SY8106A which is 50mV per
> level, SY8113B which have two states: 1.1V and 1.3V, and some board with
> non-tweakable regulators), all the OPPs are defined with a range which has
> the target value as the minimum allowed value, and 1.3V (the highest
> VDD-CPUX voltage suggested by the datasheet) as the maximum allowed value.
> It's proven to work well with a board with SY8113B.
> 
> Signed-off-by: Icenowy Zheng <icenowy-h8G6r0blFSE@public.gmane.org>
> ---
> Changes in v2:
> - Switch to BSP OPP table, which is more conservative.
> 
>  arch/arm/boot/dts/sun8i-h3.dtsi | 32 +++++++++++++++++++++++++++++++-
>  1 file changed, 31 insertions(+), 1 deletion(-)
> 
> diff --git a/arch/arm/boot/dts/sun8i-h3.dtsi b/arch/arm/boot/dts/sun8i-h3.dtsi
> index 8495deecedad..36608c03f02b 100644
> --- a/arch/arm/boot/dts/sun8i-h3.dtsi
> +++ b/arch/arm/boot/dts/sun8i-h3.dtsi
> @@ -43,32 +43,62 @@
>  #include "sunxi-h3-h5.dtsi"
>  
>  / {
> +	cpu0_opp_table: opp_table0 {
> +		compatible = "operating-points-v2";
> +		opp-shared;
> +
> +		opp@648000000 {
> +			opp-hz = /bits/ 64 <648000000>;
> +			opp-microvolt = <1040000 1040000 1300000>;
> +			clock-latency-ns = <244144>; /* 8 32k periods */
> +		};
> +
> +		opp@816000000 {
> +			opp-hz = /bits/ 64 <816000000>;
> +			opp-microvolt = <1100000 1100000 1300000>;
> +			clock-latency-ns = <244144>; /* 8 32k periods */
> +		};
> +
> +		opp@1008000000 {
> +			opp-hz = /bits/ 64 <1008000000>;
> +			opp-microvolt = <1200000 1200000 1300000>;
> +			clock-latency-ns = <244144>; /* 8 32k periods */
> +		};
> +	};
> +
>  	cpus {
>  		#address-cells = <1>;
>  		#size-cells = <0>;
>  
> -		cpu@0 {
> +		cpu0: cpu@0 {
>  			compatible = "arm,cortex-a7";
>  			device_type = "cpu";
>  			reg = <0>;
> +			clocks = <&ccu CLK_CPUX>;
> +			clock-names = "cpu";
> +			operating-points-v2 = <&cpu0_opp_table>;
> +			#cooling-cells = <0x2>;

So, that would be 2?

There's this pattern on pretty much all the other patches following
this one as well, you should address them too.

Maxime

-- 
Maxime Ripard, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
http://bootlin.com

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

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

* Re: [PATCH v2 05/10] ARM: sun8i: h3: add operating-points-v2 table for CPU
  2018-02-06  9:06       ` Maxime Ripard
@ 2018-02-06  9:10         ` Icenowy Zheng
  0 siblings, 0 replies; 21+ messages in thread
From: Icenowy Zheng @ 2018-02-06  9:10 UTC (permalink / raw)
  To: Maxime Ripard
  Cc: Liam Girdwood, Rob Herring, Chen-Yu Tsai,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	devicetree-u79uwXL29TY76Z2rM5mHXA,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	linux-sunxi-/JYPxA39Uh5TLH3MbocFFw



于 2018年2月6日 GMT+08:00 下午5:06:56, Maxime Ripard <maxime.ripard-LDxbnhwyfcJBDgjK7y7TUQ@public.gmane.org> 写到:
>On Tue, Feb 06, 2018 at 12:49:00PM +0800, Icenowy Zheng wrote:
>> The CPU on Allwinner H3 can do dynamic frequency scaling.
>> 
>> Add a DVFS table based on the one shipped with Allwinner's H3 SDK.
>The
>> voltage-frequency relationship seems to be conservative, and Armbian
>has
>> another DVFS table which uses lower voltage at a certain frequency.
>> However, the official one is chosen for safety.
>> 
>> Frequencies higher than 1008MHz are temporarily dropped in the table,
>as
>> they may lead to over voltage on boards without proper regulator
>> settings or over temperature on boards with proper regulator
>settings.
>> They will be added back once regulator settings are ready and thermal
>> sensor driver is merged.
>> 
>> In order to satisfy all different regulators (SY8106A which is 50mV
>per
>> level, SY8113B which have two states: 1.1V and 1.3V, and some board
>with
>> non-tweakable regulators), all the OPPs are defined with a range
>which has
>> the target value as the minimum allowed value, and 1.3V (the highest
>> VDD-CPUX voltage suggested by the datasheet) as the maximum allowed
>value.
>> It's proven to work well with a board with SY8113B.
>> 
>> Signed-off-by: Icenowy Zheng <icenowy-h8G6r0blFSE@public.gmane.org>
>> ---
>> Changes in v2:
>> - Switch to BSP OPP table, which is more conservative.
>> 
>>  arch/arm/boot/dts/sun8i-h3.dtsi | 32
>+++++++++++++++++++++++++++++++-
>>  1 file changed, 31 insertions(+), 1 deletion(-)
>> 
>> diff --git a/arch/arm/boot/dts/sun8i-h3.dtsi
>b/arch/arm/boot/dts/sun8i-h3.dtsi
>> index 8495deecedad..36608c03f02b 100644
>> --- a/arch/arm/boot/dts/sun8i-h3.dtsi
>> +++ b/arch/arm/boot/dts/sun8i-h3.dtsi
>> @@ -43,32 +43,62 @@
>>  #include "sunxi-h3-h5.dtsi"
>>  
>>  / {
>> +	cpu0_opp_table: opp_table0 {
>> +		compatible = "operating-points-v2";
>> +		opp-shared;
>> +
>> +		opp@648000000 {
>> +			opp-hz = /bits/ 64 <648000000>;
>> +			opp-microvolt = <1040000 1040000 1300000>;
>> +			clock-latency-ns = <244144>; /* 8 32k periods */
>> +		};
>> +
>> +		opp@816000000 {
>> +			opp-hz = /bits/ 64 <816000000>;
>> +			opp-microvolt = <1100000 1100000 1300000>;
>> +			clock-latency-ns = <244144>; /* 8 32k periods */
>> +		};
>> +
>> +		opp@1008000000 {
>> +			opp-hz = /bits/ 64 <1008000000>;
>> +			opp-microvolt = <1200000 1200000 1300000>;
>> +			clock-latency-ns = <244144>; /* 8 32k periods */
>> +		};
>> +	};
>> +
>>  	cpus {
>>  		#address-cells = <1>;
>>  		#size-cells = <0>;
>>  
>> -		cpu@0 {
>> +		cpu0: cpu@0 {
>>  			compatible = "arm,cortex-a7";
>>  			device_type = "cpu";
>>  			reg = <0>;
>> +			clocks = <&ccu CLK_CPUX>;
>> +			clock-names = "cpu";
>> +			operating-points-v2 = <&cpu0_opp_table>;
>> +			#cooling-cells = <0x2>;
>
>So, that would be 2?

Okay.

>
>There's this pattern on pretty much all the other patches following
>this one as well, you should address them too.
>
>Maxime

-- 
You received this message because you are subscribed to the Google Groups "linux-sunxi" group.
To unsubscribe from this group and stop receiving emails from it, send an email to linux-sunxi+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
For more options, visit https://groups.google.com/d/optout.

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

* Re: [PATCH v2 07/10] ARM: sun8i: h3: add SY8113B regulator used by Orange Pi One board
  2018-02-06  4:49   ` [PATCH v2 07/10] ARM: sun8i: h3: add SY8113B regulator used by Orange Pi One board Icenowy Zheng
@ 2018-02-06  9:10     ` Maxime Ripard
  0 siblings, 0 replies; 21+ messages in thread
From: Maxime Ripard @ 2018-02-06  9:10 UTC (permalink / raw)
  To: Icenowy Zheng
  Cc: devicetree, linux-sunxi, Liam Girdwood, linux-kernel,
	Chen-Yu Tsai, Rob Herring, linux-arm-kernel


[-- Attachment #1.1: Type: text/plain, Size: 1281 bytes --]

On Tue, Feb 06, 2018 at 12:49:02PM +0800, Icenowy Zheng wrote:
> Orange Pi One board has a SY8113B regulator, which is controlled via
> GPIO and capable of outputing 1.1V when the PL6 GPIO is set to output 0
> or 1.3V when the PL6 GPIO is set to input or output 1, and the output is
> the power supply of the ARM cores in H3 SoC.
> 
> Add the device tree node of this regulator and set the cpu's cpu-supply
> property to it.
> 
> Signed-off-by: Icenowy Zheng <icenowy@aosc.io>
> ---
> New patch in v2.
> 
>  arch/arm/boot/dts/sun8i-h3-orangepi-one.dts | 21 +++++++++++++++++++++
>  1 file changed, 21 insertions(+)
> 
> diff --git a/arch/arm/boot/dts/sun8i-h3-orangepi-one.dts b/arch/arm/boot/dts/sun8i-h3-orangepi-one.dts
> index 82e5d28cd698..d8250aacfda1 100644
> --- a/arch/arm/boot/dts/sun8i-h3-orangepi-one.dts
> +++ b/arch/arm/boot/dts/sun8i-h3-orangepi-one.dts
> @@ -88,6 +88,27 @@
>  			gpios = <&r_pio 0 3 GPIO_ACTIVE_LOW>;
>  		};
>  	};
> +
> +	reg_sy8113b: gpio-regulator {

There's multiple of them on those boards, so the name and label should
avoid conflicting names (this also applies to your other patches).

Maxime

-- 
Maxime Ripard, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
http://bootlin.com

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

[-- Attachment #2: Type: text/plain, Size: 176 bytes --]

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

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

* Re: [PATCH v2 09/10] ARM: sun8i: h3: fix ALL-H3-CC H3 ver VDD-CPUX voltage
       [not found]   ` <20180206044905.30508-10-icenowy-h8G6r0blFSE@public.gmane.org>
@ 2018-03-30  7:43     ` Chen-Yu Tsai
  0 siblings, 0 replies; 21+ messages in thread
From: Chen-Yu Tsai @ 2018-03-30  7:43 UTC (permalink / raw)
  To: Icenowy Zheng
  Cc: Liam Girdwood, Rob Herring, Maxime Ripard, linux-kernel,
	devicetree, linux-arm-kernel, linux-sunxi

On Tue, Feb 6, 2018 at 12:49 PM, Icenowy Zheng <icenowy-h8G6r0blFSE@public.gmane.org> wrote:
> The VDD-CPUX voltage of ALL-H3-CC H3 ver should be 1.2V, not the 3.3V
> currently defined in the device tree.
>
> Fix the voltage in the device tree.
>
> Fixes: 6ca358645d4d ("ARM: dts: sun8i: h3: Add dts file for Libre Computer Board ALL-H3-CC H3 ver.")
> Signed-off-by: Icenowy Zheng <icenowy-h8G6r0blFSE@public.gmane.org>

Reviewed-by: Chen-Yu Tsai <wens-jdAy2FN1RRM@public.gmane.org>

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

* Re: [PATCH v2 06/10] ARM: sun8i: h2+: add SY8113B regulator used by Orange Pi Zero board
       [not found]     ` <20180206044905.30508-7-icenowy-h8G6r0blFSE@public.gmane.org>
@ 2018-03-30  7:49       ` Chen-Yu Tsai
  0 siblings, 0 replies; 21+ messages in thread
From: Chen-Yu Tsai @ 2018-03-30  7:49 UTC (permalink / raw)
  To: Icenowy Zheng
  Cc: Liam Girdwood, Rob Herring, Maxime Ripard, linux-kernel,
	devicetree, linux-arm-kernel, linux-sunxi

On Tue, Feb 6, 2018 at 12:49 PM, Icenowy Zheng <icenowy-h8G6r0blFSE@public.gmane.org> wrote:
> Orange Pi Zero board has a SY8113B regulator, which is controlled via
> GPIO and capable of outputing 1.1V when the PL6 GPIO is set to output 0
> or 1.3V when the PL6 GPIO is set to input or output 1, and the output is
> the power supply of the ARM cores in H2+ SoC.
>
> Add the device tree node of this regulator and set the cpu's cpu-supply
> property to it.
>
> Signed-off-by: Icenowy Zheng <icenowy-h8G6r0blFSE@public.gmane.org>

Reviewed-by: Chen-Yu Tsai <wens-jdAy2FN1RRM@public.gmane.org>

However,

> ---
> No changes in v2.
>
>  arch/arm/boot/dts/sun8i-h2-plus-orangepi-zero.dts | 21 +++++++++++++++++++++
>  1 file changed, 21 insertions(+)
>
> diff --git a/arch/arm/boot/dts/sun8i-h2-plus-orangepi-zero.dts b/arch/arm/boot/dts/sun8i-h2-plus-orangepi-zero.dts
> index 6713d0f2b3f4..34fc35737090 100644
> --- a/arch/arm/boot/dts/sun8i-h2-plus-orangepi-zero.dts
> +++ b/arch/arm/boot/dts/sun8i-h2-plus-orangepi-zero.dts
> @@ -94,6 +94,27 @@
>                 reset-gpios = <&r_pio 0 7 GPIO_ACTIVE_LOW>;
>                 post-power-on-delay-ms = <200>;
>         };
> +
> +       reg_sy8113b: gpio-regulator {

You might want to change the node name to something a bit more specific,
like vdd-cpux-regulator. This would decrease the chance of name collisions,
either from other additions or device tree overlays.

ChenYu

> +               compatible = "regulator-gpio";
> +               regulator-name = "vdd-cpux";
> +               regulator-type = "voltage";
> +               regulator-boot-on;
> +               regulator-always-on;
> +               regulator-min-microvolt = <1100000>;
> +               regulator-max-microvolt = <1300000>;
> +               regulator-ramp-delay = <50>; /* 4ms */
> +
> +               gpios = <&r_pio 0 6 GPIO_ACTIVE_HIGH>; /* PL6 */
> +               enable-active-high;
> +               gpios-states = <0x1>;
> +               states = <1100000 0x0
> +                         1300000 0x1>;
> +       };
> +};
> +
> +&cpu0 {
> +       cpu-supply = <&reg_sy8113b>;
>  };
>
>  &ehci0 {
> --
> 2.15.1
>
> --
> You received this message because you are subscribed to the Google Groups "linux-sunxi" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to linux-sunxi+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
> For more options, visit https://groups.google.com/d/optout.

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

* Re: [PATCH v2 02/10] regulator: add support for SY8106A regulator
       [not found]     ` <20180206044905.30508-3-icenowy-h8G6r0blFSE@public.gmane.org>
@ 2018-03-30  8:03       ` Chen-Yu Tsai
  0 siblings, 0 replies; 21+ messages in thread
From: Chen-Yu Tsai @ 2018-03-30  8:03 UTC (permalink / raw)
  To: Icenowy Zheng
  Cc: Liam Girdwood, Rob Herring, Maxime Ripard, linux-kernel,
	devicetree, linux-arm-kernel, linux-sunxi, Ondrej Jirman

On Tue, Feb 6, 2018 at 12:48 PM, Icenowy Zheng <icenowy-h8G6r0blFSE@public.gmane.org> wrote:
> From: Ondrej Jirman <megous-5qf/QAjKc83QT0dZR+AlfA@public.gmane.org>
>
> SY8106A is an I2C attached single output regulator made by Silergy Corp,
> which is used on several Allwinner H3/H5 SBCs to control the power
> supply of the ARM cores.
>
> Add a driver for it.
>
> Signed-off-by: Ondrej Jirman <megous-5qf/QAjKc83QT0dZR+AlfA@public.gmane.org>
> [Icenowy: Change commit message, remove enable/disable code, add default
>  ramp_delay, add comment for go bit]
> Signed-off-by: Icenowy Zheng <icenowy-h8G6r0blFSE@public.gmane.org>
> ---
> Changes in v2:
> - Dropped the enable/disable code.
> - Added default ramp_delay value.
> - Added comment for the "go bit".
>
>  drivers/regulator/Kconfig             |   8 +-
>  drivers/regulator/Makefile            |   2 +-
>  drivers/regulator/sy8106a-regulator.c | 168 ++++++++++++++++++++++++++++++++++
>  3 files changed, 176 insertions(+), 2 deletions(-)
>  create mode 100644 drivers/regulator/sy8106a-regulator.c
>
> diff --git a/drivers/regulator/Kconfig b/drivers/regulator/Kconfig
> index b27417ca188a..70227230bca2 100644
> --- a/drivers/regulator/Kconfig
> +++ b/drivers/regulator/Kconfig
> @@ -792,6 +792,13 @@ config REGULATOR_STW481X_VMMC
>           This driver supports the internal VMMC regulator in the STw481x
>           PMIC chips.
>
> +config REGULATOR_SY8106A
> +       tristate "Silergy SY8106A regulator"
> +       depends on I2C && (OF || COMPILE_TEST)
> +       select REGMAP_I2C
> +       help
> +         This driver supports SY8106A single output regulator.
> +
>  config REGULATOR_TPS51632
>         tristate "TI TPS51632 Power Regulator"
>         depends on I2C
> @@ -966,4 +973,3 @@ config REGULATOR_WM8994
>           WM8994 CODEC.
>
>  endif
> -
> diff --git a/drivers/regulator/Makefile b/drivers/regulator/Makefile
> index 19fea09ba10a..7564664c64df 100644
> --- a/drivers/regulator/Makefile
> +++ b/drivers/regulator/Makefile
> @@ -99,6 +99,7 @@ obj-$(CONFIG_REGULATOR_SC2731) += sc2731-regulator.o
>  obj-$(CONFIG_REGULATOR_SKY81452) += sky81452-regulator.o
>  obj-$(CONFIG_REGULATOR_STM32_VREFBUF) += stm32-vrefbuf.o
>  obj-$(CONFIG_REGULATOR_STW481X_VMMC) += stw481x-vmmc.o
> +obj-$(CONFIG_REGULATOR_SY8106A) += sy8106a-regulator.o
>  obj-$(CONFIG_REGULATOR_TI_ABB) += ti-abb-regulator.o
>  obj-$(CONFIG_REGULATOR_TPS6105X) += tps6105x-regulator.o
>  obj-$(CONFIG_REGULATOR_TPS62360) += tps62360-regulator.o
> @@ -124,5 +125,4 @@ obj-$(CONFIG_REGULATOR_WM8350) += wm8350-regulator.o
>  obj-$(CONFIG_REGULATOR_WM8400) += wm8400-regulator.o
>  obj-$(CONFIG_REGULATOR_WM8994) += wm8994-regulator.o
>
> -

Extra whitespace change. Otherwise,

Reviewed-by: Chen-Yu Tsai <wens-jdAy2FN1RRM@public.gmane.org>

>  ccflags-$(CONFIG_REGULATOR_DEBUG) += -DDEBUG

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

* Re: [PATCH v2 08/10] ARM: sun8i: h3: Add SY8106A regulator to Orange Pi PC
       [not found]     ` <20180206044905.30508-9-icenowy-h8G6r0blFSE@public.gmane.org>
@ 2018-03-30  8:16       ` Chen-Yu Tsai
  0 siblings, 0 replies; 21+ messages in thread
From: Chen-Yu Tsai @ 2018-03-30  8:16 UTC (permalink / raw)
  To: Icenowy Zheng
  Cc: Liam Girdwood, Rob Herring, Maxime Ripard, linux-kernel,
	devicetree, linux-arm-kernel, linux-sunxi, Ondrej Jirman

On Tue, Feb 6, 2018 at 12:49 PM, Icenowy Zheng <icenowy-h8G6r0blFSE@public.gmane.org> wrote:
> From: Ondrej Jirman <megous-5qf/QAjKc83QT0dZR+AlfA@public.gmane.org>
>
> Add SY8106A regulator to r_i2c bus and enable the r_i2c bus on
> Orange Pi PC, then set the power supply of the ARM cores to this
> regulator, in order to enable DVFS.
>
> Signed-off-by: Ondrej Jirman <megous-5qf/QAjKc83QT0dZR+AlfA@public.gmane.org>
> [Icenowy: Enable DVFS in this patch, slight changes and change commit
>  message]
> Signed-off-by: Icenowy Zheng <icenowy-h8G6r0blFSE@public.gmane.org>

Reviewed-by: Chen-Yu Tsai <wens-jdAy2FN1RRM@public.gmane.org>

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

* Re: [PATCH v2 00/10] Allwinner H3 DVFS support
       [not found] ` <20180206044905.30508-1-icenowy-h8G6r0blFSE@public.gmane.org>
                     ` (7 preceding siblings ...)
  2018-02-06  4:49   ` [PATCH v2 10/10] ARM: sun8i: h3: set the cpu-supply to VDD-CPUX on ALL-H3-CC H3 ver Icenowy Zheng
@ 2018-04-16  4:41   ` Chen-Yu Tsai
       [not found]     ` <CAGb2v67FaU3_su9XGaGj4zVSoAnpfN8cAhbBHEJu3Owt=Qicmg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
  2018-04-24  2:10     ` [linux-sunxi] " Chen-Yu Tsai
  8 siblings, 2 replies; 21+ messages in thread
From: Chen-Yu Tsai @ 2018-04-16  4:41 UTC (permalink / raw)
  To: Icenowy Zheng
  Cc: Liam Girdwood, Rob Herring, Maxime Ripard, linux-kernel,
	devicetree, linux-arm-kernel, linux-sunxi

Hi,

On Tue, Feb 6, 2018 at 12:48 PM, Icenowy Zheng <icenowy-h8G6r0blFSE@public.gmane.org> wrote:
> This patchset tries to add DVFS support for Allwinner H3 SoC,
> considering two kinds of adjustable regulators used on H3 boards:
> SY8106A I2C-controlled regulator and SY8113B regulator (controllable
> by GPIO with some special designs on the board), and also taking the
> uncontrollable boards into consider.
>
> PATCH 1 and PATCH 2 are for the SY8106A regulator, then PATCH 3 and
> PATCH 4 are for the r_i2c bus, which is used by boards with SY8106A
> to communicate with the regulator.
>
> PATCH 5 adds the operating points v2 table to the H3 SoC, but with
> OPPs higher than 1008MHz temporarily dropped.
>
> Then there's patches for several tested boards: Orange Pi PC (with
> SY8106A), Orange Pi One/Zero (with GPIO-adjustable SY8113B) and
> ALL-H3-CC (unadjustable).
>
> Icenowy Zheng (5):
>   ARM: sun8i: h3: add operating-points-v2 table for CPU
>   ARM: sun8i: h2+: add SY8113B regulator used by Orange Pi Zero board
>   ARM: sun8i: h3: add SY8113B regulator used by Orange Pi One board
>   ARM: sun8i: h3: fix ALL-H3-CC H3 ver VDD-CPUX voltage
>   ARM: sun8i: h3: set the cpu-supply to VDD-CPUX on ALL-H3-CC H3 ver
>
> Ondrej Jirman (5):
>   dt-bindings: add binding for the SY8106A voltage regulator
>   regulator: add support for SY8106A regulator
>   ARM: sunxi: h3/h5: Add r_i2c pinmux node
>   ARM: sunxi: h3/h5: Add r_i2c I2C controller
>   ARM: sun8i: h3: Add SY8106A regulator to Orange Pi PC

I've applied all the device tree patches for 4.18, taking into account
comments from Maxime. See

    https://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux.git/log/?h=sunxi/h3-h5-for-4.17

Mostly it's just renaming the regulator node names and labels.

Please resend the first two patches to Mark Brown, the regulator
subsystem maintainer. And you might want to mention the branch
above in case he needs a use case reference.

Regards
ChenYu

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

* Re: [PATCH v2 00/10] Allwinner H3 DVFS support
       [not found]     ` <CAGb2v67FaU3_su9XGaGj4zVSoAnpfN8cAhbBHEJu3Owt=Qicmg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2018-04-16  4:47       ` Chen-Yu Tsai
  0 siblings, 0 replies; 21+ messages in thread
From: Chen-Yu Tsai @ 2018-04-16  4:47 UTC (permalink / raw)
  To: Icenowy Zheng
  Cc: Liam Girdwood, Rob Herring, Maxime Ripard, linux-kernel,
	devicetree, linux-arm-kernel, linux-sunxi

On Mon, Apr 16, 2018 at 12:41 PM, Chen-Yu Tsai <wens-jdAy2FN1RRM@public.gmane.org> wrote:
> Hi,
>
> On Tue, Feb 6, 2018 at 12:48 PM, Icenowy Zheng <icenowy-h8G6r0blFSE@public.gmane.org> wrote:
>> This patchset tries to add DVFS support for Allwinner H3 SoC,
>> considering two kinds of adjustable regulators used on H3 boards:
>> SY8106A I2C-controlled regulator and SY8113B regulator (controllable
>> by GPIO with some special designs on the board), and also taking the
>> uncontrollable boards into consider.
>>
>> PATCH 1 and PATCH 2 are for the SY8106A regulator, then PATCH 3 and
>> PATCH 4 are for the r_i2c bus, which is used by boards with SY8106A
>> to communicate with the regulator.
>>
>> PATCH 5 adds the operating points v2 table to the H3 SoC, but with
>> OPPs higher than 1008MHz temporarily dropped.
>>
>> Then there's patches for several tested boards: Orange Pi PC (with
>> SY8106A), Orange Pi One/Zero (with GPIO-adjustable SY8113B) and
>> ALL-H3-CC (unadjustable).
>>
>> Icenowy Zheng (5):
>>   ARM: sun8i: h3: add operating-points-v2 table for CPU
>>   ARM: sun8i: h2+: add SY8113B regulator used by Orange Pi Zero board
>>   ARM: sun8i: h3: add SY8113B regulator used by Orange Pi One board
>>   ARM: sun8i: h3: fix ALL-H3-CC H3 ver VDD-CPUX voltage
>>   ARM: sun8i: h3: set the cpu-supply to VDD-CPUX on ALL-H3-CC H3 ver
>>
>> Ondrej Jirman (5):
>>   dt-bindings: add binding for the SY8106A voltage regulator
>>   regulator: add support for SY8106A regulator
>>   ARM: sunxi: h3/h5: Add r_i2c pinmux node
>>   ARM: sunxi: h3/h5: Add r_i2c I2C controller
>>   ARM: sun8i: h3: Add SY8106A regulator to Orange Pi PC
>
> I've applied all the device tree patches for 4.18, taking into account
> comments from Maxime. See
>
>     https://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux.git/log/?h=sunxi/h3-h5-for-4.17

I meant

    https://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux.git/log/?h=sunxi/h3-h5-for-4.18

of course...

> Mostly it's just renaming the regulator node names and labels.
>
> Please resend the first two patches to Mark Brown, the regulator
> subsystem maintainer. And you might want to mention the branch
> above in case he needs a use case reference.
>
> Regards
> ChenYu

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

* Re: [linux-sunxi] [PATCH v2 00/10] Allwinner H3 DVFS support
  2018-04-16  4:41   ` [PATCH v2 00/10] Allwinner H3 DVFS support Chen-Yu Tsai
       [not found]     ` <CAGb2v67FaU3_su9XGaGj4zVSoAnpfN8cAhbBHEJu3Owt=Qicmg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2018-04-24  2:10     ` Chen-Yu Tsai
  1 sibling, 0 replies; 21+ messages in thread
From: Chen-Yu Tsai @ 2018-04-24  2:10 UTC (permalink / raw)
  To: Icenowy Zheng
  Cc: Maxime Ripard, linux-kernel, devicetree, linux-arm-kernel, linux-sunxi

On Mon, Apr 16, 2018 at 12:41 PM, Chen-Yu Tsai <wens@csie.org> wrote:
> Hi,
>
> On Tue, Feb 6, 2018 at 12:48 PM, Icenowy Zheng <icenowy@aosc.io> wrote:
>> This patchset tries to add DVFS support for Allwinner H3 SoC,
>> considering two kinds of adjustable regulators used on H3 boards:
>> SY8106A I2C-controlled regulator and SY8113B regulator (controllable
>> by GPIO with some special designs on the board), and also taking the
>> uncontrollable boards into consider.
>>
>> PATCH 1 and PATCH 2 are for the SY8106A regulator, then PATCH 3 and
>> PATCH 4 are for the r_i2c bus, which is used by boards with SY8106A
>> to communicate with the regulator.
>>
>> PATCH 5 adds the operating points v2 table to the H3 SoC, but with
>> OPPs higher than 1008MHz temporarily dropped.
>>
>> Then there's patches for several tested boards: Orange Pi PC (with
>> SY8106A), Orange Pi One/Zero (with GPIO-adjustable SY8113B) and
>> ALL-H3-CC (unadjustable).
>>
>> Icenowy Zheng (5):
>>   ARM: sun8i: h3: add operating-points-v2 table for CPU
>>   ARM: sun8i: h2+: add SY8113B regulator used by Orange Pi Zero board
>>   ARM: sun8i: h3: add SY8113B regulator used by Orange Pi One board
>>   ARM: sun8i: h3: fix ALL-H3-CC H3 ver VDD-CPUX voltage
>>   ARM: sun8i: h3: set the cpu-supply to VDD-CPUX on ALL-H3-CC H3 ver
>>
>> Ondrej Jirman (5):
>>   dt-bindings: add binding for the SY8106A voltage regulator
>>   regulator: add support for SY8106A regulator
>>   ARM: sunxi: h3/h5: Add r_i2c pinmux node
>>   ARM: sunxi: h3/h5: Add r_i2c I2C controller
>>   ARM: sun8i: h3: Add SY8106A regulator to Orange Pi PC

Dropped this patch at your request. The rest will be in -next.

ChenYu

>
> I've applied all the device tree patches for 4.18, taking into account
> comments from Maxime. See
>
>     https://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux.git/log/?h=sunxi/h3-h5-for-4.17
>
> Mostly it's just renaming the regulator node names and labels.
>
> Please resend the first two patches to Mark Brown, the regulator
> subsystem maintainer. And you might want to mention the branch
> above in case he needs a use case reference.
>
> Regards
> ChenYu

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

end of thread, other threads:[~2018-04-24  2:10 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-02-06  4:48 [PATCH v2 00/10] Allwinner H3 DVFS support Icenowy Zheng
2018-02-06  4:48 ` [PATCH v2 01/10] dt-bindings: add binding for the SY8106A voltage regulator Icenowy Zheng
     [not found] ` <20180206044905.30508-1-icenowy-h8G6r0blFSE@public.gmane.org>
2018-02-06  4:48   ` [PATCH v2 02/10] regulator: add support for SY8106A regulator Icenowy Zheng
     [not found]     ` <20180206044905.30508-3-icenowy-h8G6r0blFSE@public.gmane.org>
2018-03-30  8:03       ` Chen-Yu Tsai
2018-02-06  4:48   ` [PATCH v2 03/10] ARM: sunxi: h3/h5: Add r_i2c pinmux node Icenowy Zheng
2018-02-06  4:48   ` [PATCH v2 04/10] ARM: sunxi: h3/h5: Add r_i2c I2C controller Icenowy Zheng
2018-02-06  4:49   ` [PATCH v2 05/10] ARM: sun8i: h3: add operating-points-v2 table for CPU Icenowy Zheng
     [not found]     ` <20180206044905.30508-6-icenowy-h8G6r0blFSE@public.gmane.org>
2018-02-06  9:06       ` Maxime Ripard
2018-02-06  9:10         ` Icenowy Zheng
2018-02-06  4:49   ` [PATCH v2 06/10] ARM: sun8i: h2+: add SY8113B regulator used by Orange Pi Zero board Icenowy Zheng
     [not found]     ` <20180206044905.30508-7-icenowy-h8G6r0blFSE@public.gmane.org>
2018-03-30  7:49       ` Chen-Yu Tsai
2018-02-06  4:49   ` [PATCH v2 07/10] ARM: sun8i: h3: add SY8113B regulator used by Orange Pi One board Icenowy Zheng
2018-02-06  9:10     ` Maxime Ripard
2018-02-06  4:49   ` [PATCH v2 08/10] ARM: sun8i: h3: Add SY8106A regulator to Orange Pi PC Icenowy Zheng
     [not found]     ` <20180206044905.30508-9-icenowy-h8G6r0blFSE@public.gmane.org>
2018-03-30  8:16       ` Chen-Yu Tsai
2018-02-06  4:49   ` [PATCH v2 10/10] ARM: sun8i: h3: set the cpu-supply to VDD-CPUX on ALL-H3-CC H3 ver Icenowy Zheng
2018-04-16  4:41   ` [PATCH v2 00/10] Allwinner H3 DVFS support Chen-Yu Tsai
     [not found]     ` <CAGb2v67FaU3_su9XGaGj4zVSoAnpfN8cAhbBHEJu3Owt=Qicmg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2018-04-16  4:47       ` Chen-Yu Tsai
2018-04-24  2:10     ` [linux-sunxi] " Chen-Yu Tsai
2018-02-06  4:49 ` [PATCH v2 09/10] ARM: sun8i: h3: fix ALL-H3-CC H3 ver VDD-CPUX voltage Icenowy Zheng
     [not found]   ` <20180206044905.30508-10-icenowy-h8G6r0blFSE@public.gmane.org>
2018-03-30  7:43     ` Chen-Yu Tsai

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).