lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1579689918-7181-14-git-send-email-yamonkar@cadence.com>
Date:   Wed, 22 Jan 2020 11:45:17 +0100
From:   Yuti Amonkar <yamonkar@...ence.com>
To:     <linux-kernel@...r.kernel.org>, <devicetree@...r.kernel.org>,
        <kishon@...com>, <robh+dt@...nel.org>, <mark.rutland@....com>,
        <maxime@...no.tech>
CC:     <jsarha@...com>, <tomi.valkeinen@...com>, <praneeth@...com>,
        <mparab@...ence.com>, <sjakhade@...ence.com>,
        <yamonkar@...ence.com>
Subject: [PATCH v3 13/14] dt-bindings: phy: phy-cadence-torrent: Add subnode bindings.

From: Swapnil Jakhade <sjakhade@...ence.com>

Add sub-node bindings for each group of PHY lanes based on PHY
type. Only PHY_TYPE_DP is supported currently. Each sub-node
includes properties such as master lane number, link reset, phy
type, number of lanes etc.

Signed-off-by: Swapnil Jakhade <sjakhade@...ence.com>
---
 .../bindings/phy/phy-cadence-torrent.yaml          | 90 ++++++++++++++++++----
 1 file changed, 73 insertions(+), 17 deletions(-)

diff --git a/Documentation/devicetree/bindings/phy/phy-cadence-torrent.yaml b/Documentation/devicetree/bindings/phy/phy-cadence-torrent.yaml
index dbb8aa5..eb21615 100644
--- a/Documentation/devicetree/bindings/phy/phy-cadence-torrent.yaml
+++ b/Documentation/devicetree/bindings/phy/phy-cadence-torrent.yaml
@@ -19,6 +19,12 @@ properties:
       - cdns,torrent-phy
       - ti,j721e-serdes-10g
 
+  '#address-cells':
+    const: 1
+
+  '#size-cells':
+    const: 0
+
   clocks:
     maxItems: 1
     description:
@@ -41,44 +47,94 @@ properties:
       - const: torrent_phy
       - const: dptx_phy
 
-  "#phy-cells":
-    const: 0
+  resets:
+    description:
+      Must contain an entry for each in reset-names.
+      See Documentation/devicetree/bindings/reset/reset.txt
 
-  num_lanes:
+  reset-names:
     description:
-      Number of DisplayPort lanes.
-    allOf:
-      - $ref: /schemas/types.yaml#/definitions/uint32
-      - enum: [1, 2, 4]
+      Must be "torrent_reset". It controls the reset to the
+      torrent PHY.
 
-  max_bit_rate:
+patternProperties:
+  '^torrent-phy@[0-7]+$':
+    type: object
     description:
-      Maximum DisplayPort link bit rate to use, in Mbps
-    allOf:
-      - $ref: /schemas/types.yaml#/definitions/uint32
-      - enum: [2160, 2430, 2700, 3240, 4320, 5400, 8100]
+      Each group of PHY lanes with a single master lane should be represented as a sub-node.
+    properties:
+      reg:
+        description:
+          The master lane number. This is the lowest numbered lane in the lane group.
+
+      resets:
+        description:
+          Contains list of resets to get all the link lanes out of reset.
+
+      "#phy-cells":
+        description:
+          Generic PHY binding.
+        const: 0
+
+      cdns,phy-type:
+        description:
+          Should be PHY_TYPE_DP.
+        $ref: /schemas/types.yaml#/definitions/uint32
+
+      cdns,num-lanes:
+        description:
+          Number of DisplayPort lanes.
+        allOf:
+          - $ref: /schemas/types.yaml#/definitions/uint32
+          - enum: [1, 2, 4]
+
+      cdns,max-bit-rate:
+        description:
+          Maximum DisplayPort link bit rate to use, in Mbps
+        allOf:
+          - $ref: /schemas/types.yaml#/definitions/uint32
+          - enum: [2160, 2430, 2700, 3240, 4320, 5400, 8100]
+
+    required:
+      - reg
+      - resets
+      - "#phy-cells"
+      - cdns,phy-type
 
 required:
   - compatible
+  - "#address-cells"
+  - "#size-cells"
   - clocks
   - clock-names
   - reg
   - reg-names
-  - "#phy-cells"
+  - resets
+  - reset-names
 
 additionalProperties: false
 
 examples:
   - |
-    dp_phy: phy@...b500000 {
+    #include <dt-bindings/phy/phy.h>
+    torrent_phy: phy@...b500000 {
           compatible = "cdns,torrent-phy";
           reg = <0xf0 0xfb500000 0x0 0x00100000>,
                 <0xf0 0xfb030a00 0x0 0x00000040>;
           reg-names = "torrent_phy", "dptx_phy";
-          num_lanes = <4>;
-          max_bit_rate = <8100>;
-          #phy-cells = <0>;
+          resets = <&phyrst 0>;
+          reset-names = "torrent_reset";
           clocks = <&ref_clk>;
           clock-names = "refclk";
+          #address-cells = <1>;
+          #size-cells = <0>;
+          torrent_phy_dp: torrent-phy@0 {
+                    reg = <0>;
+                    resets = <&phyrst 1>;
+                    #phy-cells = <0>;
+                    cdns,phy-type = <PHY_TYPE_DP>;
+                    cdns,num-lanes = <4>;
+                    cdns,max-bit-rate = <8100>;
+          };
     };
 ...
-- 
2.4.5

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ