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: <20250605063422.3813260-2-c-vankar@ti.com>
Date: Thu, 5 Jun 2025 12:04:21 +0530
From: Chintan Vankar <c-vankar@...com>
To: Thorsten Blum <thorsten.blum@...ux.dev>, Andrew Davis <afd@...com>,
        Chintan Vankar <c-vankar@...com>, Conor Dooley <conor+dt@...nel.org>,
        Krzysztof Kozlowski <krzk+dt@...nel.org>,
        Rob Herring <robh@...nel.org>, Peter Rosin <peda@...ntia.se>
CC: <linux-kernel@...r.kernel.org>, <devicetree@...r.kernel.org>,
        <s-vadapalli@...com>, <vigneshr@...com>, <nm@...com>,
        <danishanwar@...com>
Subject: [PATCH 1/2] devicetree: bindings: mux: reg-mux: Add support for new property 'mux-reg-masks-state'

The DT binding for reg-mux currenly requires specifying register offset
and masks in the "mux-reg-masks" property, while corresponding register
values are defined in the "idle-states" property. This approach imposes a
constraint where "mux-reg-masks" and "idle-states" must remain
synchroniszed, adding complexity when configuring specific registers or a
set of registers with large memory spaces.

Add support of a new property "mux-reg-masks-state" to remove this
constraint, allowing offset, mask and value to be specified together as a
tuple.

Signed-off-by: Chintan Vankar <c-vankar@...com>
---
 .../devicetree/bindings/mux/reg-mux.yaml      | 32 +++++++++++++++++--
 1 file changed, 30 insertions(+), 2 deletions(-)

diff --git a/Documentation/devicetree/bindings/mux/reg-mux.yaml b/Documentation/devicetree/bindings/mux/reg-mux.yaml
index dc4be092fc2f..b029e2f28df0 100644
--- a/Documentation/devicetree/bindings/mux/reg-mux.yaml
+++ b/Documentation/devicetree/bindings/mux/reg-mux.yaml
@@ -32,11 +32,39 @@ properties:
         - description: pre-shifted bitfield mask
     description: Each entry pair describes a single mux control.
 
-  idle-states: true
+  idle-states:
+    description: Each entry describes mux register state.
+
+  mux-reg-masks-state:
+    $ref: /schemas/types.yaml#/definitions/uint32-matrix
+    items:
+      items:
+        - description: register offset
+        - description: pre-shifted bitfield mask
+        - description: register value to be set
+    description: This property is an extension of mux-reg-masks which
+                 allows specifying register offset, mask and register
+                 value to be set.
+
+allOf:
+  - oneOf:
+      - required: [mux-reg-masks]
+      - required: [mux-reg-masks-state]
+
+  - if:
+      required: [mux-reg-masks-state]
+    then:
+      not:
+        required: [idle-states]
+
+  - if:
+      required: [mux-reg-masks]
+    then:
+      properties:
+        idle-states: true
 
 required:
   - compatible
-  - mux-reg-masks
   - '#mux-control-cells'
 
 additionalProperties: false
-- 
2.34.1


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ