[PATCH V2 1/2] dt-bindings: syscon: Add syscon-names to refer to syscon easily

From: Orson Zhai
Date: Wed Nov 20 2019 - 10:46:34 EST


Make life easier when syscon consumer want to access multiple syscon
nodes with dozens of items.
Add syscon-names and relative properties to help to manage different
cases when accessing more than one syscon node even with arguments.

Signed-off-by: Orson Zhai <orson.zhai@xxxxxxxxxx>
---
.../devicetree/bindings/mfd/syscon.txt | 43 +++++++++++++++++++
1 file changed, 43 insertions(+)

diff --git a/Documentation/devicetree/bindings/mfd/syscon.txt b/Documentation/devicetree/bindings/mfd/syscon.txt
index 25d9e9c2fd53..4c7bdb74bb0a 100644
--- a/Documentation/devicetree/bindings/mfd/syscon.txt
+++ b/Documentation/devicetree/bindings/mfd/syscon.txt
@@ -30,3 +30,46 @@ hwlock1: hwspinlock@40500000 {
reg = <0x40500000 0x1000>;
#hwlock-cells = <1>;
};
+
+
+
+==Syscon Name==
+
+Syscon name is a helper to be used in consumer nodes who refer to system
+controller node. It provides a way to refer to syscon node by names with
+phandle args in syscon consumer node. It will help people who have a lot
+of syscon references to be managed. It is not a must feature and has no
+effect to syscon node itself at all.
+
+Required properties:
+- syscons: List of phandles and any number of arguments if needed. Arguments
+ is specific to differnet vendors and its usage should be described at each
+ vendor's bindings. For example: In Unisoc SoCs, the 1st arg will be treated
+ as register address offset and the 2nd is bit mask.
+
+- syscon-names: List of syscon node name strings sorted in the same order as
+ what it represents in property syscons.
+
+Optional property:
+- #.*-cells: Represents the number of arguments in single phandle in syscons
+ list. ".*" is vendor specific. If this property is not set, default value
+ will be 0.
+
+Examples:
+
+apb_regs: syscon@20008000 {
+ compatible = "sprd,apb-glb", "syscon";
+ reg = <0x20008000 0x100>;
+};
+
+aon_regs: syscon@40008000 {
+ compatible = "sprd,aon-glb", "syscon";
+ reg = <0x40008000 0x100>;
+};
+
+display@40500000 {
+ ...
+ #syscon-disp-cells = <2>;
+ syscons = <&ap_apb_regs 0x4 0xf00>, <&aon_regs 0x8 0x7>;
+ syscon-names = "enable", "power";
+};
--
2.18.0

________________________________
This email (including its attachments) is intended only for the person or entity to which it is addressed and may contain information that is privileged, confidential or otherwise protected from disclosure. Unauthorized use, dissemination, distribution or copying of this email or the information herein or taking any action in reliance on the contents of this email or the information herein, by anyone other than the intended recipient, or an employee or agent responsible for delivering the message to the intended recipient, is strictly prohibited. If you are not the intended recipient, please do not read, copy, use or disclose any part of this e-mail to others. Please notify the sender immediately and permanently delete this e-mail and any attachments if you received it in error. Internet communications cannot be guaranteed to be timely, secure, error-free or virus-free. The sender does not accept liability for any errors or omissions.
æéäååéäåæäåæèïåæåäæäåæéïäåéçæéäææçåæääãäçéçææäçãåäãååæååæéäæåååãèéèçåæääïèåéèãååã äçææéæéäçääååãèèææéäïèäççäæäæåéæéäåææéäïåäååéäçæååååçåääãææäèäèçéäåæãååãæèæéæãåääåääéæåäææèäã