diff mbox series

[v3,01/10] dt-bindings: add powercontroller

Message ID 20190729174154.4335-2-frank-w@public-files.de (mailing list archive)
State New, archived
Headers show
Series implement poweroff for mt6323 / bpi-r2 | expand

Commit Message

Frank Wunderlich July 29, 2019, 5:41 p.m. UTC
From: Josef Friedl <josef.friedl@speed.at>

add mt6323-rtc and mt6323-pwrc to mt6397 mfd DT bindings
an example is shown in mt6323-poweroff.txt

changes since v2: separated rtc-mt6397.txt to part 2

Suggested-by: Frank Wunderlich <frank-w@public-files.de>
Signed-off-by: Josef Friedl <josef.friedl@speed.at>
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>
---
 .../devicetree/bindings/mfd/mt6397.txt        | 10 +++++++++-
 .../bindings/power/reset/mt6323-poweroff.txt  | 20 +++++++++++++++++++
 2 files changed, 29 insertions(+), 1 deletion(-)
 create mode 100644 Documentation/devicetree/bindings/power/reset/mt6323-poweroff.txt

--
2.17.1

Comments

Lee Jones Aug. 12, 2019, 10:20 a.m. UTC | #1
On Mon, 29 Jul 2019, Frank Wunderlich wrote:

> From: Josef Friedl <josef.friedl@speed.at>
> 
> add mt6323-rtc and mt6323-pwrc to mt6397 mfd DT bindings
> an example is shown in mt6323-poweroff.txt
> 
> changes since v2: separated rtc-mt6397.txt to part 2
> 
> Suggested-by: Frank Wunderlich <frank-w@public-files.de>
> Signed-off-by: Josef Friedl <josef.friedl@speed.at>
> Signed-off-by: Frank Wunderlich <frank-w@public-files.de>
> ---
>  .../devicetree/bindings/mfd/mt6397.txt        | 10 +++++++++-
>  .../bindings/power/reset/mt6323-poweroff.txt  | 20 +++++++++++++++++++
>  2 files changed, 29 insertions(+), 1 deletion(-)
>  create mode 100644 Documentation/devicetree/bindings/power/reset/mt6323-poweroff.txt
> 
> diff --git a/Documentation/devicetree/bindings/mfd/mt6397.txt b/Documentation/devicetree/bindings/mfd/mt6397.txt
> index 0ebd08af777d..44acb9827716 100644
> --- a/Documentation/devicetree/bindings/mfd/mt6397.txt
> +++ b/Documentation/devicetree/bindings/mfd/mt6397.txt
> @@ -8,6 +8,7 @@ MT6397/MT6323 is a multifunction device with the following sub modules:
>  - Clock
>  - LED
>  - Keys
> +- Power controller
> 
>  It is interfaced to host controller using SPI interface by a proprietary hardware
>  called PMIC wrapper or pwrap. MT6397/MT6323 MFD is a child device of pwrap.
> @@ -22,8 +23,10 @@ compatible: "mediatek,mt6397" or "mediatek,mt6323"
>  Optional subnodes:
> 
>  - rtc
> -	Required properties:
> +	Required properties: Should be one of follows
> +		- compatible: "mediatek,mt6323-rtc"
>  		- compatible: "mediatek,mt6397-rtc"
> +	For details, see Documentation/devicetree/bindings/rtc/rtc-mt6397.txt

Please use relative paths.

E.g: ../bindings/rtc/rtc-mt6397.txt

Apart from that, the MFD parts look okay to me.

For my own reference:
  Acked-for-MFD-by: Lee Jones <lee.jones@linaro.org>
Frank Wunderlich Aug. 12, 2019, 11:10 a.m. UTC | #2
> Gesendet: Montag, 12. August 2019 um 12:20 Uhr
> Von: "Lee Jones" <lee.jones@linaro.org>

> > --- a/Documentation/devicetree/bindings/mfd/mt6397.txt
...
> > +	For details, see Documentation/devicetree/bindings/rtc/rtc-mt6397.txt
>
> Please use relative paths.
>
> E.g: ../bindings/rtc/rtc-mt6397.txt

Hi,

as we are in Documentation/devicetree/bindings/mfd/ it should be ../../bindings/..., right? or ../rtc/rtc-mt6397.txt ?

regards Frank
Lee Jones Aug. 12, 2019, 11:25 a.m. UTC | #3
On Mon, 12 Aug 2019, Frank Wunderlich wrote:

> > Gesendet: Montag, 12. August 2019 um 12:20 Uhr
> > Von: "Lee Jones" <lee.jones@linaro.org>
> 
> > > --- a/Documentation/devicetree/bindings/mfd/mt6397.txt
> ...
> > > +	For details, see Documentation/devicetree/bindings/rtc/rtc-mt6397.txt
> >
> > Please use relative paths.
> >
> > E.g: ../bindings/rtc/rtc-mt6397.txt
> 
> Hi,
> 
> as we are in Documentation/devicetree/bindings/mfd/ it should be
> ../../bindings/..., right? or ../rtc/rtc-mt6397.txt ?

It was an example (hence the "E.g.").

You will need to adapt it depending on where the file ends up.
Frank Wunderlich Aug. 12, 2019, 11:37 a.m. UTC | #4
> Gesendet: Montag, 12. August 2019 um 13:25 Uhr
> Von: "Lee Jones" <lee.jones@linaro.org>
> It was an example (hence the "E.g.").
>
> You will need to adapt it depending on where the file ends up.

i saw the e.g., but i wanted to know relative to which directory ;) your example mentions that it should contain the dt-bindings-folder and i think it should be relative to current file...

have applied your suggestions to my tree

https://github.com/frank-w/BPI-R2-4.14/commits/5.3-poweroff

please take a short look if i don't miss anything

regards Frank
Lee Jones Aug. 12, 2019, 11:51 a.m. UTC | #5
On Mon, 12 Aug 2019, Frank Wunderlich wrote:

> > Gesendet: Montag, 12. August 2019 um 13:25 Uhr
> > Von: "Lee Jones" <lee.jones@linaro.org>
> > It was an example (hence the "E.g.").
> >
> > You will need to adapt it depending on where the file ends up.
> 
> i saw the e.g., but i wanted to know relative to which directory ;) your example mentions that it should contain the dt-bindings-folder and i think it should be relative to current file...
> 
> have applied your suggestions to my tree
> 
> https://github.com/frank-w/BPI-R2-4.14/commits/5.3-poweroff
> 
> please take a short look if i don't miss anything

Just resubmit them.  Doing off-list reviews is a slippery slope.
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/mfd/mt6397.txt b/Documentation/devicetree/bindings/mfd/mt6397.txt
index 0ebd08af777d..44acb9827716 100644
--- a/Documentation/devicetree/bindings/mfd/mt6397.txt
+++ b/Documentation/devicetree/bindings/mfd/mt6397.txt
@@ -8,6 +8,7 @@  MT6397/MT6323 is a multifunction device with the following sub modules:
 - Clock
 - LED
 - Keys
+- Power controller

 It is interfaced to host controller using SPI interface by a proprietary hardware
 called PMIC wrapper or pwrap. MT6397/MT6323 MFD is a child device of pwrap.
@@ -22,8 +23,10 @@  compatible: "mediatek,mt6397" or "mediatek,mt6323"
 Optional subnodes:

 - rtc
-	Required properties:
+	Required properties: Should be one of follows
+		- compatible: "mediatek,mt6323-rtc"
 		- compatible: "mediatek,mt6397-rtc"
+	For details, see Documentation/devicetree/bindings/rtc/rtc-mt6397.txt
 - regulators
 	Required properties:
 		- compatible: "mediatek,mt6397-regulator"
@@ -46,6 +49,11 @@  Optional subnodes:
 		- compatible: "mediatek,mt6397-keys" or "mediatek,mt6323-keys"
 	see Documentation/devicetree/bindings/input/mtk-pmic-keys.txt

+- power-controller
+	Required properties:
+		- compatible: "mediatek,mt6323-pwrc"
+	For details, see Documentation/devicetree/bindings/power/reset/mt6323-poweroff.txt
+
 Example:
 	pwrap: pwrap@1000f000 {
 		compatible = "mediatek,mt8135-pwrap";
diff --git a/Documentation/devicetree/bindings/power/reset/mt6323-poweroff.txt b/Documentation/devicetree/bindings/power/reset/mt6323-poweroff.txt
new file mode 100644
index 000000000000..933f0c48e887
--- /dev/null
+++ b/Documentation/devicetree/bindings/power/reset/mt6323-poweroff.txt
@@ -0,0 +1,20 @@ 
+Device Tree Bindings for Power Controller on MediaTek PMIC
+
+The power controller which could be found on PMIC is responsible for externally
+powering off or on the remote MediaTek SoC through the circuit BBPU.
+
+Required properties:
+- compatible: Should be one of follows
+       "mediatek,mt6323-pwrc": for MT6323 PMIC
+
+Example:
+
+       pmic {
+               compatible = "mediatek,mt6323";
+
+               ...
+
+               power-controller {
+                       compatible = "mediatek,mt6323-pwrc";
+               };
+       }