* [PATCH v3 0/5] arm64: allwinner: h6: Enable AXP805 PMIC on Pine H64
@ 2018-07-12 16:04 Chen-Yu Tsai
2018-07-12 16:04 ` [PATCH v3 1/5] dt-bindings: mfd: axp20x: Add "self-working" mode for AXP806 Chen-Yu Tsai
` (5 more replies)
0 siblings, 6 replies; 10+ messages in thread
From: Chen-Yu Tsai @ 2018-07-12 16:04 UTC (permalink / raw)
To: Maxime Ripard, Lee Jones
Cc: devicetree, Chen-Yu Tsai, linux-arm-kernel, Icenowy Zheng
Hi everyone,
This series enables the AXP805 PMIC found on the Pine64 Pine H64 board.
The AXP805 seems to be identical to the AXP806 when comparing datasheets.
The Pine H64 uses the PMIC in stand-alone or "self-working" mode, using
the I2C interface. Neither features are currently supported. This series
adds support for them, and then adds the PMIC to the device tree.
Unfortunately, v2 was actually an accidental resend of v1. Apologies to
Lee having to review the same stuff twice.
Changes since v1:
- Mentioned "self-working mode" in device tree commit message
- Shortened one line mfd cell into just one line
- Dropped unrelated pinctrl change
- Collected tags from Rob, Icenowy, Lee, and Maxime
Patch 1 adds a new device tree property to describe the self-working mode
for the AXP806.
Patch 2 adds support for the newly added property to the driver.
Patch 3 adds support for the using AXP806 with I2C.
Patch 4 converts raw clock/reset indices for the H6 R_CCU currently found
in the device tree to macros defined as part of the device tree bindings.
Patch 5 adds the PMIC and its regulators to the Pine H64 device tree.
First three patches should go in through Lee's mfd tree. We'll take the
other two through the sunxi tree.
Please have a look.
Regards
ChenYu
Chen-Yu Tsai (4):
dt-bindings: mfd: axp20x: Add "self-working" mode for AXP806
mfd: axp20x: Add self-working mode support for AXP806
mfd: axp20x: Support AXP806 in I2C mode
arm64: dts: allwinner: h6: Use macros for R_CCU clock and reset
indices
Icenowy Zheng (1):
arm64: dts: allwinner: h6: enable AXP805 PMIC on Pine H64
.../devicetree/bindings/mfd/axp20x.txt | 7 +-
.../boot/dts/allwinner/sun50i-h6-pine-h64.dts | 109 ++++++++++++++++++
arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi | 8 +-
drivers/mfd/axp20x-i2c.c | 2 +
drivers/mfd/axp20x.c | 28 ++++-
5 files changed, 146 insertions(+), 8 deletions(-)
--
2.18.0
^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH v3 1/5] dt-bindings: mfd: axp20x: Add "self-working" mode for AXP806
2018-07-12 16:04 [PATCH v3 0/5] arm64: allwinner: h6: Enable AXP805 PMIC on Pine H64 Chen-Yu Tsai
@ 2018-07-12 16:04 ` Chen-Yu Tsai
2018-07-13 7:52 ` Lee Jones
2018-07-12 16:04 ` [PATCH v3 2/5] mfd: axp20x: Add self-working mode support " Chen-Yu Tsai
` (4 subsequent siblings)
5 siblings, 1 reply; 10+ messages in thread
From: Chen-Yu Tsai @ 2018-07-12 16:04 UTC (permalink / raw)
To: Maxime Ripard, Lee Jones
Cc: devicetree, Chen-Yu Tsai, linux-arm-kernel, Icenowy Zheng
The AXP806 has three operation modes:
- master mode: The PMIC is the first or only AXP PMIC in the system,
but is not in charge of power management, i.e. only
provides regulator functions.
- slave mode: The PMIC is the second AXP PMIC in the system, chained
to the first, or master, one.
- self-working mode: The PMIC is the only AXP PMIC in the system, and
is in charge of power sequencing.
The functional differences between these modes can be found in the
"Control and Operation" chapter of the AXP806 (in Chinese) and AXP805
(in English) datasheets. These include how the PMIC responds to external
signals, whether it takes an external voltage reference or uses its own,
and whether the EN/PWRON pin functions as an enable switch or power button.
We already support both slave and master mode. This patch adds a property
for describing the self-working mode, and reworks the description for
the mode properties.
Reviewed-by: Rob Herring <robh@kernel.org>
Reviewed-by: Icenowy Zheng <icenowy@aosc.io>
Tested-by: Icenowy Zheng <icenowy@aosc.io>
Acked-for-MFD-by: Lee Jones <lee.jones@linaro.org>
Acked-by: Maxime Ripard <maxime.ripard@bootlin.com>
Signed-off-by: Chen-Yu Tsai <wens@csie.org>
---
Documentation/devicetree/bindings/mfd/axp20x.txt | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/Documentation/devicetree/bindings/mfd/axp20x.txt b/Documentation/devicetree/bindings/mfd/axp20x.txt
index d1762f3b30af..eaaf79c01e1e 100644
--- a/Documentation/devicetree/bindings/mfd/axp20x.txt
+++ b/Documentation/devicetree/bindings/mfd/axp20x.txt
@@ -45,8 +45,11 @@ Optional properties:
board is driving OTG VBus or not.
(axp221 / axp223 / axp803/ axp813 only)
-- x-powers,master-mode: Boolean (axp806 only). Set this when the PMIC is
- wired for master mode. The default is slave mode.
+- x-powers,self-working-mode and
+ x-powers,master-mode: Boolean (axp806 only). Set either of these when the
+ PMIC is wired for self-working mode or master mode.
+ If neither is set then slave mode is assumed.
+ This corresponds to how the MODESET pin is wired.
- <input>-supply: a phandle to the regulator supply node. May be omitted if
inputs are unregulated, such as using the IPSOUT output
--
2.18.0
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [PATCH v3 2/5] mfd: axp20x: Add self-working mode support for AXP806
2018-07-12 16:04 [PATCH v3 0/5] arm64: allwinner: h6: Enable AXP805 PMIC on Pine H64 Chen-Yu Tsai
2018-07-12 16:04 ` [PATCH v3 1/5] dt-bindings: mfd: axp20x: Add "self-working" mode for AXP806 Chen-Yu Tsai
@ 2018-07-12 16:04 ` Chen-Yu Tsai
2018-07-13 7:53 ` Lee Jones
2018-07-12 16:04 ` [PATCH v3 3/5] mfd: axp20x: Support AXP806 in I2C mode Chen-Yu Tsai
` (3 subsequent siblings)
5 siblings, 1 reply; 10+ messages in thread
From: Chen-Yu Tsai @ 2018-07-12 16:04 UTC (permalink / raw)
To: Maxime Ripard, Lee Jones
Cc: devicetree, Chen-Yu Tsai, linux-arm-kernel, Icenowy Zheng
The AXP806 can operate in a standalone "self-working" mode, in which it
is also responsible for power control of the overall system. This mode
is similar to the master mode, but the EN/PWRON pin functions as a power
button, instead of a level-triggered enable switch.
This patch adds code checking for the new "x-powers,self-working-mode"
property, and a separate mfd_cell list that includes the power button
(PEK) sub-device.
Reviewed-by: Icenowy Zheng <icenowy@aosc.io>
Tested-by: Icenowy Zheng <icenowy@aosc.io>
Acked-for-MFD-by: Lee Jones <lee.jones@linaro.org>
Acked-by: Maxime Ripard <maxime.ripard@bootlin.com>
Signed-off-by: Chen-Yu Tsai <wens@csie.org>
---
drivers/mfd/axp20x.c | 28 +++++++++++++++++++++++++---
1 file changed, 25 insertions(+), 3 deletions(-)
diff --git a/drivers/mfd/axp20x.c b/drivers/mfd/axp20x.c
index 9a2ef3d9b8f8..0be511dd93d0 100644
--- a/drivers/mfd/axp20x.c
+++ b/drivers/mfd/axp20x.c
@@ -221,6 +221,11 @@ static const struct resource axp803_pek_resources[] = {
DEFINE_RES_IRQ_NAMED(AXP803_IRQ_PEK_FAL_EDGE, "PEK_DBF"),
};
+static const struct resource axp806_pek_resources[] = {
+ DEFINE_RES_IRQ_NAMED(AXP806_IRQ_POK_RISE, "PEK_DBR"),
+ DEFINE_RES_IRQ_NAMED(AXP806_IRQ_POK_FALL, "PEK_DBF"),
+};
+
static const struct resource axp809_pek_resources[] = {
DEFINE_RES_IRQ_NAMED(AXP809_IRQ_PEK_RIS_EDGE, "PEK_DBR"),
DEFINE_RES_IRQ_NAMED(AXP809_IRQ_PEK_FAL_EDGE, "PEK_DBF"),
@@ -730,6 +735,15 @@ static const struct mfd_cell axp803_cells[] = {
{ .name = "axp20x-regulator" },
};
+static const struct mfd_cell axp806_self_working_cells[] = {
+ {
+ .name = "axp221-pek",
+ .num_resources = ARRAY_SIZE(axp806_pek_resources),
+ .resources = axp806_pek_resources,
+ },
+ { .name = "axp20x-regulator" },
+};
+
static const struct mfd_cell axp806_cells[] = {
{
.id = 2,
@@ -842,8 +856,14 @@ int axp20x_match_device(struct axp20x_dev *axp20x)
axp20x->regmap_irq_chip = &axp803_regmap_irq_chip;
break;
case AXP806_ID:
- axp20x->nr_cells = ARRAY_SIZE(axp806_cells);
- axp20x->cells = axp806_cells;
+ if (of_property_read_bool(axp20x->dev->of_node,
+ "x-powers,self-working-mode")) {
+ axp20x->nr_cells = ARRAY_SIZE(axp806_self_working_cells);
+ axp20x->cells = axp806_self_working_cells;
+ } else {
+ axp20x->nr_cells = ARRAY_SIZE(axp806_cells);
+ axp20x->cells = axp806_cells;
+ }
axp20x->regmap_cfg = &axp806_regmap_config;
axp20x->regmap_irq_chip = &axp806_regmap_irq_chip;
break;
@@ -901,7 +921,9 @@ int axp20x_device_probe(struct axp20x_dev *axp20x)
*/
if (axp20x->variant == AXP806_ID) {
if (of_property_read_bool(axp20x->dev->of_node,
- "x-powers,master-mode"))
+ "x-powers,master-mode") ||
+ of_property_read_bool(axp20x->dev->of_node,
+ "x-powers,self-working-mode"))
regmap_write(axp20x->regmap, AXP806_REG_ADDR_EXT,
AXP806_REG_ADDR_EXT_ADDR_MASTER_MODE);
else
--
2.18.0
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [PATCH v3 3/5] mfd: axp20x: Support AXP806 in I2C mode
2018-07-12 16:04 [PATCH v3 0/5] arm64: allwinner: h6: Enable AXP805 PMIC on Pine H64 Chen-Yu Tsai
2018-07-12 16:04 ` [PATCH v3 1/5] dt-bindings: mfd: axp20x: Add "self-working" mode for AXP806 Chen-Yu Tsai
2018-07-12 16:04 ` [PATCH v3 2/5] mfd: axp20x: Add self-working mode support " Chen-Yu Tsai
@ 2018-07-12 16:04 ` Chen-Yu Tsai
2018-07-13 7:53 ` Lee Jones
2018-07-12 16:04 ` [PATCH v3 4/5] arm64: dts: allwinner: h6: Use macros for R_CCU clock and reset indices Chen-Yu Tsai
` (2 subsequent siblings)
5 siblings, 1 reply; 10+ messages in thread
From: Chen-Yu Tsai @ 2018-07-12 16:04 UTC (permalink / raw)
To: Maxime Ripard, Lee Jones
Cc: devicetree, Chen-Yu Tsai, linux-arm-kernel, Icenowy Zheng
The Pine64 H64 board uses an AXP806 PMIC in I2C and self-working mode.
The H64 SoC does not have the usual RSB controller.
This patch adds AXP806 to the list of devices supported in I2C mode.
In theory, all RSB-based PMICs can also be used in I2C mode.
Reviewed-by: Icenowy Zheng <icenowy@aosc.io>
Tested-by: Icenowy Zheng <icenowy@aosc.io>
Acked-for-MFD-by: Lee Jones <lee.jones@linaro.org>
Acked-by: Maxime Ripard <maxime.ripard@bootlin.com>
Signed-off-by: Chen-Yu Tsai <wens@csie.org>
---
drivers/mfd/axp20x-i2c.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/mfd/axp20x-i2c.c b/drivers/mfd/axp20x-i2c.c
index d35a5fe6c950..a7b7c5423ea5 100644
--- a/drivers/mfd/axp20x-i2c.c
+++ b/drivers/mfd/axp20x-i2c.c
@@ -65,6 +65,7 @@ static const struct of_device_id axp20x_i2c_of_match[] = {
{ .compatible = "x-powers,axp202", .data = (void *)AXP202_ID },
{ .compatible = "x-powers,axp209", .data = (void *)AXP209_ID },
{ .compatible = "x-powers,axp221", .data = (void *)AXP221_ID },
+ { .compatible = "x-powers,axp806", .data = (void *)AXP806_ID },
{ },
};
MODULE_DEVICE_TABLE(of, axp20x_i2c_of_match);
@@ -74,6 +75,7 @@ static const struct i2c_device_id axp20x_i2c_id[] = {
{ "axp202", 0 },
{ "axp209", 0 },
{ "axp221", 0 },
+ { "axp806", 0 },
{ },
};
MODULE_DEVICE_TABLE(i2c, axp20x_i2c_id);
--
2.18.0
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [PATCH v3 4/5] arm64: dts: allwinner: h6: Use macros for R_CCU clock and reset indices
2018-07-12 16:04 [PATCH v3 0/5] arm64: allwinner: h6: Enable AXP805 PMIC on Pine H64 Chen-Yu Tsai
` (2 preceding siblings ...)
2018-07-12 16:04 ` [PATCH v3 3/5] mfd: axp20x: Support AXP806 in I2C mode Chen-Yu Tsai
@ 2018-07-12 16:04 ` Chen-Yu Tsai
2018-07-12 16:04 ` [PATCH v3 5/5] arm64: dts: allwinner: h6: enable AXP805 PMIC on Pine H64 Chen-Yu Tsai
2018-07-17 2:19 ` [PATCH v3 0/5] arm64: allwinner: h6: Enable " Chen-Yu Tsai
5 siblings, 0 replies; 10+ messages in thread
From: Chen-Yu Tsai @ 2018-07-12 16:04 UTC (permalink / raw)
To: Maxime Ripard, Lee Jones
Cc: devicetree, Chen-Yu Tsai, linux-arm-kernel, Icenowy Zheng
Now that the device tree binding headers for the R_CCU have been merged,
we can use the macros, instead of raw numbers.
Switch to R_CCU macros for clock and reset indices.
Reviewed-by: Icenowy Zheng <icenowy@aosc.io>
Tested-by: Icenowy Zheng <icenowy@aosc.io>
Acked-by: Maxime Ripard <maxime.ripard@bootlin.com>
Signed-off-by: Chen-Yu Tsai <wens@csie.org>
---
arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi
index c72da8cd9ef5..37c2e11fca2e 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi
+++ b/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi
@@ -5,7 +5,9 @@
#include <dt-bindings/interrupt-controller/arm-gic.h>
#include <dt-bindings/clock/sun50i-h6-ccu.h>
+#include <dt-bindings/clock/sun50i-h6-r-ccu.h>
#include <dt-bindings/reset/sun50i-h6-ccu.h>
+#include <dt-bindings/reset/sun50i-h6-r-ccu.h>
/ {
interrupt-parent = <&gic>;
@@ -198,7 +200,7 @@
reg = <0x07022000 0x400>;
interrupts = <GIC_SPI 105 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 111 IRQ_TYPE_LEVEL_HIGH>;
- clocks = <&r_ccu 2>, <&osc24M>, <&osc32k>;
+ clocks = <&r_ccu CLK_R_APB1>, <&osc24M>, <&osc32k>;
clock-names = "apb", "hosc", "losc";
gpio-controller;
#gpio-cells = <3>;
@@ -215,8 +217,8 @@
compatible = "allwinner,sun6i-a31-i2c";
reg = <0x07081400 0x400>;
interrupts = <GIC_SPI 107 IRQ_TYPE_LEVEL_HIGH>;
- clocks = <&r_ccu 8>;
- resets = <&r_ccu 4>;
+ clocks = <&r_ccu CLK_R_APB2_I2C>;
+ resets = <&r_ccu RST_R_APB2_I2C>;
pinctrl-names = "default";
pinctrl-0 = <&r_i2c_pins>;
status = "disabled";
--
2.18.0
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [PATCH v3 5/5] arm64: dts: allwinner: h6: enable AXP805 PMIC on Pine H64
2018-07-12 16:04 [PATCH v3 0/5] arm64: allwinner: h6: Enable AXP805 PMIC on Pine H64 Chen-Yu Tsai
` (3 preceding siblings ...)
2018-07-12 16:04 ` [PATCH v3 4/5] arm64: dts: allwinner: h6: Use macros for R_CCU clock and reset indices Chen-Yu Tsai
@ 2018-07-12 16:04 ` Chen-Yu Tsai
2018-07-17 2:19 ` [PATCH v3 0/5] arm64: allwinner: h6: Enable " Chen-Yu Tsai
5 siblings, 0 replies; 10+ messages in thread
From: Chen-Yu Tsai @ 2018-07-12 16:04 UTC (permalink / raw)
To: Maxime Ripard, Lee Jones
Cc: devicetree, Chen-Yu Tsai, linux-arm-kernel, Icenowy Zheng
From: Icenowy Zheng <icenowy@aosc.io>
Pine H64 board has an AXP805 PMIC on it, wired up in standalone, or
self-working, mode.
Enable it in the device tree.
Signed-off-by: Icenowy Zheng <icenowy@aosc.io>
Reviewed-by: Icenowy Zheng <icenowy@aosc.io>
Tested-by: Icenowy Zheng <icenowy@aosc.io>
Acked-by: Maxime Ripard <maxime.ripard@bootlin.com>
Signed-off-by: Chen-Yu Tsai <wens@csie.org>
---
.../boot/dts/allwinner/sun50i-h6-pine-h64.dts | 109 ++++++++++++++++++
1 file changed, 109 insertions(+)
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h6-pine-h64.dts b/arch/arm64/boot/dts/allwinner/sun50i-h6-pine-h64.dts
index 2e97173c9204..1673636358ef 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-h6-pine-h64.dts
+++ b/arch/arm64/boot/dts/allwinner/sun50i-h6-pine-h64.dts
@@ -44,6 +44,115 @@
&r_i2c {
status = "okay";
+ axp805: pmic@36 {
+ compatible = "x-powers,axp805", "x-powers,axp806";
+ reg = <0x36>;
+ interrupt-parent = <&r_intc>;
+ interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
+ interrupt-controller;
+ #interrupt-cells = <1>;
+ x-powers,self-working-mode;
+
+ regulators {
+ reg_aldo1: aldo1 {
+ regulator-always-on;
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ regulator-name = "vcc-pl";
+ };
+
+ reg_aldo2: aldo2 {
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ regulator-name = "vcc-ac200";
+ };
+
+ reg_aldo3: aldo3 {
+ /* This regulator is connected with CLDO1 */
+ regulator-always-on;
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ regulator-name = "vcc-3v3-1";
+ };
+
+ reg_bldo1: bldo1 {
+ regulator-always-on;
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ regulator-name = "vcc-bias-pll";
+ };
+
+ reg_bldo2: bldo2 {
+ regulator-always-on;
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ regulator-name = "vcc-efuse-pcie-hdmi-io";
+ };
+
+ reg_bldo3: bldo3 {
+ regulator-always-on;
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ regulator-name = "vcc-dcxoio";
+ };
+
+ bldo4 {
+ /* unused */
+ };
+
+ reg_cldo1: cldo1 {
+ /* This regulator is connected with ALDO3 */
+ regulator-always-on;
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ regulator-name = "vcc-3v3-2";
+ };
+
+ reg_cldo2: cldo2 {
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ regulator-name = "vcc-wifi-1";
+ };
+
+ reg_cldo3: cldo3 {
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ regulator-name = "vcc-wifi-2";
+ };
+
+ reg_dcdca: dcdca {
+ regulator-always-on;
+ regulator-min-microvolt = <810000>;
+ regulator-max-microvolt = <1080000>;
+ regulator-name = "vdd-cpu";
+ };
+
+ reg_dcdcc: dcdcc {
+ regulator-min-microvolt = <810000>;
+ regulator-max-microvolt = <1080000>;
+ regulator-name = "vdd-gpu";
+ };
+
+ reg_dcdcd: dcdcd {
+ regulator-always-on;
+ regulator-min-microvolt = <960000>;
+ regulator-max-microvolt = <960000>;
+ regulator-name = "vdd-sys";
+ };
+
+ reg_dcdce: dcdce {
+ regulator-always-on;
+ regulator-min-microvolt = <1200000>;
+ regulator-max-microvolt = <1200000>;
+ regulator-name = "vcc-dram";
+ };
+
+ sw {
+ /* unused */
+ };
+ };
+ };
+
pcf8563: rtc@51 {
compatible = "nxp,pcf8563";
reg = <0x51>;
--
2.18.0
^ permalink raw reply related [flat|nested] 10+ messages in thread
* Re: [PATCH v3 1/5] dt-bindings: mfd: axp20x: Add "self-working" mode for AXP806
2018-07-12 16:04 ` [PATCH v3 1/5] dt-bindings: mfd: axp20x: Add "self-working" mode for AXP806 Chen-Yu Tsai
@ 2018-07-13 7:52 ` Lee Jones
0 siblings, 0 replies; 10+ messages in thread
From: Lee Jones @ 2018-07-13 7:52 UTC (permalink / raw)
To: Chen-Yu Tsai; +Cc: Maxime Ripard, devicetree, linux-arm-kernel, Icenowy Zheng
On Fri, 13 Jul 2018, Chen-Yu Tsai wrote:
> The AXP806 has three operation modes:
>
> - master mode: The PMIC is the first or only AXP PMIC in the system,
> but is not in charge of power management, i.e. only
> provides regulator functions.
>
> - slave mode: The PMIC is the second AXP PMIC in the system, chained
> to the first, or master, one.
>
> - self-working mode: The PMIC is the only AXP PMIC in the system, and
> is in charge of power sequencing.
>
> The functional differences between these modes can be found in the
> "Control and Operation" chapter of the AXP806 (in Chinese) and AXP805
> (in English) datasheets. These include how the PMIC responds to external
> signals, whether it takes an external voltage reference or uses its own,
> and whether the EN/PWRON pin functions as an enable switch or power button.
>
> We already support both slave and master mode. This patch adds a property
> for describing the self-working mode, and reworks the description for
> the mode properties.
>
> Reviewed-by: Rob Herring <robh@kernel.org>
> Reviewed-by: Icenowy Zheng <icenowy@aosc.io>
> Tested-by: Icenowy Zheng <icenowy@aosc.io>
> Acked-for-MFD-by: Lee Jones <lee.jones@linaro.org>
> Acked-by: Maxime Ripard <maxime.ripard@bootlin.com>
> Signed-off-by: Chen-Yu Tsai <wens@csie.org>
> ---
> Documentation/devicetree/bindings/mfd/axp20x.txt | 7 +++++--
> 1 file changed, 5 insertions(+), 2 deletions(-)
Applied, thanks.
--
Lee Jones [李琼斯]
Linaro Services Technical Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
_______________________________________________
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] 10+ messages in thread
* Re: [PATCH v3 2/5] mfd: axp20x: Add self-working mode support for AXP806
2018-07-12 16:04 ` [PATCH v3 2/5] mfd: axp20x: Add self-working mode support " Chen-Yu Tsai
@ 2018-07-13 7:53 ` Lee Jones
0 siblings, 0 replies; 10+ messages in thread
From: Lee Jones @ 2018-07-13 7:53 UTC (permalink / raw)
To: Chen-Yu Tsai; +Cc: Maxime Ripard, devicetree, linux-arm-kernel, Icenowy Zheng
On Fri, 13 Jul 2018, Chen-Yu Tsai wrote:
> The AXP806 can operate in a standalone "self-working" mode, in which it
> is also responsible for power control of the overall system. This mode
> is similar to the master mode, but the EN/PWRON pin functions as a power
> button, instead of a level-triggered enable switch.
>
> This patch adds code checking for the new "x-powers,self-working-mode"
> property, and a separate mfd_cell list that includes the power button
> (PEK) sub-device.
>
> Reviewed-by: Icenowy Zheng <icenowy@aosc.io>
> Tested-by: Icenowy Zheng <icenowy@aosc.io>
> Acked-for-MFD-by: Lee Jones <lee.jones@linaro.org>
> Acked-by: Maxime Ripard <maxime.ripard@bootlin.com>
> Signed-off-by: Chen-Yu Tsai <wens@csie.org>
> ---
> drivers/mfd/axp20x.c | 28 +++++++++++++++++++++++++---
> 1 file changed, 25 insertions(+), 3 deletions(-)
Applied, thanks.
--
Lee Jones [李琼斯]
Linaro Services Technical Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
_______________________________________________
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] 10+ messages in thread
* Re: [PATCH v3 3/5] mfd: axp20x: Support AXP806 in I2C mode
2018-07-12 16:04 ` [PATCH v3 3/5] mfd: axp20x: Support AXP806 in I2C mode Chen-Yu Tsai
@ 2018-07-13 7:53 ` Lee Jones
0 siblings, 0 replies; 10+ messages in thread
From: Lee Jones @ 2018-07-13 7:53 UTC (permalink / raw)
To: Chen-Yu Tsai; +Cc: Maxime Ripard, devicetree, linux-arm-kernel, Icenowy Zheng
On Fri, 13 Jul 2018, Chen-Yu Tsai wrote:
> The Pine64 H64 board uses an AXP806 PMIC in I2C and self-working mode.
> The H64 SoC does not have the usual RSB controller.
>
> This patch adds AXP806 to the list of devices supported in I2C mode.
> In theory, all RSB-based PMICs can also be used in I2C mode.
>
> Reviewed-by: Icenowy Zheng <icenowy@aosc.io>
> Tested-by: Icenowy Zheng <icenowy@aosc.io>
> Acked-for-MFD-by: Lee Jones <lee.jones@linaro.org>
> Acked-by: Maxime Ripard <maxime.ripard@bootlin.com>
> Signed-off-by: Chen-Yu Tsai <wens@csie.org>
> ---
> drivers/mfd/axp20x-i2c.c | 2 ++
> 1 file changed, 2 insertions(+)
Applied, thanks.
--
Lee Jones [李琼斯]
Linaro Services Technical Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
_______________________________________________
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] 10+ messages in thread
* Re: [PATCH v3 0/5] arm64: allwinner: h6: Enable AXP805 PMIC on Pine H64
2018-07-12 16:04 [PATCH v3 0/5] arm64: allwinner: h6: Enable AXP805 PMIC on Pine H64 Chen-Yu Tsai
` (4 preceding siblings ...)
2018-07-12 16:04 ` [PATCH v3 5/5] arm64: dts: allwinner: h6: enable AXP805 PMIC on Pine H64 Chen-Yu Tsai
@ 2018-07-17 2:19 ` Chen-Yu Tsai
5 siblings, 0 replies; 10+ messages in thread
From: Chen-Yu Tsai @ 2018-07-17 2:19 UTC (permalink / raw)
To: Maxime Ripard, Lee Jones
Cc: devicetree, Chen-Yu Tsai, linux-arm-kernel, Icenowy Zheng
On Fri, Jul 13, 2018 at 12:04 AM, Chen-Yu Tsai <wens@csie.org> wrote:
> Hi everyone,
>
> This series enables the AXP805 PMIC found on the Pine64 Pine H64 board.
> The AXP805 seems to be identical to the AXP806 when comparing datasheets.
> The Pine H64 uses the PMIC in stand-alone or "self-working" mode, using
> the I2C interface. Neither features are currently supported. This series
> adds support for them, and then adds the PMIC to the device tree.
>
> Unfortunately, v2 was actually an accidental resend of v1. Apologies to
> Lee having to review the same stuff twice.
>
> Changes since v1:
>
> - Mentioned "self-working mode" in device tree commit message
> - Shortened one line mfd cell into just one line
> - Dropped unrelated pinctrl change
> - Collected tags from Rob, Icenowy, Lee, and Maxime
>
> Patch 1 adds a new device tree property to describe the self-working mode
> for the AXP806.
>
> Patch 2 adds support for the newly added property to the driver.
>
> Patch 3 adds support for the using AXP806 with I2C.
>
> Patch 4 converts raw clock/reset indices for the H6 R_CCU currently found
> in the device tree to macros defined as part of the device tree bindings.
>
> Patch 5 adds the PMIC and its regulators to the Pine H64 device tree.
>
> First three patches should go in through Lee's mfd tree. We'll take the
> other two through the sunxi tree.
Merged the device tree patches.
> Please have a look.
>
> Regards
> ChenYu
>
> Chen-Yu Tsai (4):
> dt-bindings: mfd: axp20x: Add "self-working" mode for AXP806
> mfd: axp20x: Add self-working mode support for AXP806
> mfd: axp20x: Support AXP806 in I2C mode
> arm64: dts: allwinner: h6: Use macros for R_CCU clock and reset
> indices
>
> Icenowy Zheng (1):
> arm64: dts: allwinner: h6: enable AXP805 PMIC on Pine H64
>
> .../devicetree/bindings/mfd/axp20x.txt | 7 +-
> .../boot/dts/allwinner/sun50i-h6-pine-h64.dts | 109 ++++++++++++++++++
> arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi | 8 +-
> drivers/mfd/axp20x-i2c.c | 2 +
> drivers/mfd/axp20x.c | 28 ++++-
> 5 files changed, 146 insertions(+), 8 deletions(-)
>
> --
> 2.18.0
>
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2018-07-17 2:19 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-07-12 16:04 [PATCH v3 0/5] arm64: allwinner: h6: Enable AXP805 PMIC on Pine H64 Chen-Yu Tsai
2018-07-12 16:04 ` [PATCH v3 1/5] dt-bindings: mfd: axp20x: Add "self-working" mode for AXP806 Chen-Yu Tsai
2018-07-13 7:52 ` Lee Jones
2018-07-12 16:04 ` [PATCH v3 2/5] mfd: axp20x: Add self-working mode support " Chen-Yu Tsai
2018-07-13 7:53 ` Lee Jones
2018-07-12 16:04 ` [PATCH v3 3/5] mfd: axp20x: Support AXP806 in I2C mode Chen-Yu Tsai
2018-07-13 7:53 ` Lee Jones
2018-07-12 16:04 ` [PATCH v3 4/5] arm64: dts: allwinner: h6: Use macros for R_CCU clock and reset indices Chen-Yu Tsai
2018-07-12 16:04 ` [PATCH v3 5/5] arm64: dts: allwinner: h6: enable AXP805 PMIC on Pine H64 Chen-Yu Tsai
2018-07-17 2:19 ` [PATCH v3 0/5] arm64: allwinner: h6: Enable " 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).