All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chen-Yu Tsai <wens@csie.org>
To: Maxime Ripard <maxime.ripard@bootlin.com>,
	Lee Jones <lee.jones@linaro.org>
Cc: devicetree@vger.kernel.org, Chen-Yu Tsai <wens@csie.org>,
	linux-arm-kernel@lists.infradead.org,
	Icenowy Zheng <icenowy@aosc.io>
Subject: [PATCH v2 1/5] dt-bindings: mfd: axp20x: Add "self-working" mode for AXP806
Date: Thu,  5 Jul 2018 11:11:02 +0800	[thread overview]
Message-ID: <20180705031106.344-2-wens@csie.org> (raw)
In-Reply-To: <20180705031106.344-1-wens@csie.org>

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

WARNING: multiple messages have this Message-ID (diff)
From: wens@csie.org (Chen-Yu Tsai)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2 1/5] dt-bindings: mfd: axp20x: Add "self-working" mode for AXP806
Date: Thu,  5 Jul 2018 11:11:02 +0800	[thread overview]
Message-ID: <20180705031106.344-2-wens@csie.org> (raw)
In-Reply-To: <20180705031106.344-1-wens@csie.org>

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

  reply	other threads:[~2018-07-05  3:11 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-05  3:11 [PATCH v2 0/5] arm64: allwinner: h6: Enable AXP805 PMIC on Pine H64 Chen-Yu Tsai
2018-07-05  3:11 ` Chen-Yu Tsai
2018-07-05  3:11 ` Chen-Yu Tsai [this message]
2018-07-05  3:11   ` [PATCH v2 1/5] dt-bindings: mfd: axp20x: Add "self-working" mode for AXP806 Chen-Yu Tsai
2018-07-12 12:27   ` Lee Jones
2018-07-12 12:27     ` Lee Jones
2018-07-05  3:11 ` [PATCH v2 2/5] mfd: axp20x: Add self-working mode support " Chen-Yu Tsai
2018-07-05  3:11   ` Chen-Yu Tsai
2018-07-12 12:29   ` Lee Jones
2018-07-12 12:29     ` Lee Jones
2018-07-05  3:11 ` [PATCH v2 3/5] mfd: axp20x: Support AXP806 in I2C mode Chen-Yu Tsai
2018-07-05  3:11   ` Chen-Yu Tsai
2018-07-12 12:30   ` Lee Jones
2018-07-12 12:30     ` Lee Jones
2018-07-05  3:11 ` [PATCH v2 4/5] arm64: dts: allwinner: h6: Use macros for R_CCU clock and reset indices Chen-Yu Tsai
2018-07-05  3:11   ` Chen-Yu Tsai
2018-07-05  3:11 ` [PATCH v2 5/5] arm64: dts: allwinner: h6: enable AXP805 PMIC on Pine H64 Chen-Yu Tsai
2018-07-05  3:11   ` Chen-Yu Tsai
2018-07-05  9:41 ` [PATCH v2 0/5] arm64: allwinner: h6: Enable " Maxime Ripard
2018-07-05  9:41   ` Maxime Ripard

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180705031106.344-2-wens@csie.org \
    --to=wens@csie.org \
    --cc=devicetree@vger.kernel.org \
    --cc=icenowy@aosc.io \
    --cc=lee.jones@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=maxime.ripard@bootlin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.