From: Chintan Vankar <c-vankar@ti.com>
To: Conor Dooley <conor+dt@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Rob Herring <robh@kernel.org>, Peter Rosin <peda@axentia.se>
Cc: <s-vadapalli@ti.com>, <danishanwar@ti.com>,
<linux-kernel@vger.kernel.org>, <devicetree@vger.kernel.org>,
Chintan Vankar <c-vankar@ti.com>
Subject: [RFC PATCH v2 1/2] devicetree: bindings: mux: reg-mux: Update bindings for reg-mux for new property
Date: Tue, 4 Mar 2025 15:53:05 +0530 [thread overview]
Message-ID: <20250304102306.2977836-2-c-vankar@ti.com> (raw)
In-Reply-To: <20250304102306.2977836-1-c-vankar@ti.com>
DT-binding of reg-mux is defined in such a way that one need to provide
register offset and mask in a "mux-reg-masks" property and corresponding
register value in "idle-states" property. This constraint forces to define
these values in such a way that "mux-reg-masks" and "idle-states" must be
in sync with each other. This implementation would be more complex if
specific register or set of registers need to be configured which has
large memory space. Introduce a new property "mux-reg-masks-state" which
allow to specify offset, mask and value as a tuple in a single property.
Signed-off-by: Chintan Vankar <c-vankar@ti.com>
---
Link to v1:
https://lore.kernel.org/r/20250227202206.2551305-2-c-vankar@ti.com/
Changes from v1 to v2:
- Updated dt-bindings for the required conditions as suggested by Conor
Dooley and Andrew Davis.
.../devicetree/bindings/mux/reg-mux.yaml | 28 +++++++++++++++----
1 file changed, 23 insertions(+), 5 deletions(-)
diff --git a/Documentation/devicetree/bindings/mux/reg-mux.yaml b/Documentation/devicetree/bindings/mux/reg-mux.yaml
index dc4be092fc2f..5255e4a06920 100644
--- a/Documentation/devicetree/bindings/mux/reg-mux.yaml
+++ b/Documentation/devicetree/bindings/mux/reg-mux.yaml
@@ -32,12 +32,30 @@ 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.
-required:
- - compatible
- - mux-reg-masks
- - '#mux-control-cells'
+ 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 in a single property.
+
+allOf:
+ - not:
+ required: [mux-reg-masks, mux-reg-masks-state]
+
+ - if:
+ required:
+ - mux-reg-masks-state
+ then:
+ properties:
+ idle-states: false
additionalProperties: false
--
2.34.1
next prev parent reply other threads:[~2025-03-04 10:23 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-04 10:23 [RFC PATCH v2 0/2] Extend mmio-mux driver to configure mux with new DT property Chintan Vankar
2025-03-04 10:23 ` Chintan Vankar [this message]
2025-03-04 10:47 ` [RFC PATCH v2 1/2] devicetree: bindings: mux: reg-mux: Update bindings for reg-mux for new property Vankar, Chintan
2025-03-04 15:39 ` Rob Herring
2025-03-04 19:03 ` Vankar, Chintan
2025-03-04 20:40 ` Rob Herring
2025-03-05 21:43 ` Vankar, Chintan
2025-03-05 22:14 ` Rob Herring
2025-03-05 22:30 ` Vankar, Chintan
2025-04-22 8:42 ` Chintan Vankar
2025-03-04 10:23 ` [RFC PATCH v2 2/2] mux: mmio: Extend mmio-mux driver to configure mux with new DT property Chintan Vankar
2025-05-20 5:29 ` [RFC PATCH v2 0/2] " Chintan Vankar
2025-05-30 17:05 ` Vankar, Chintan
2025-05-31 5:52 ` Greg Kroah-Hartman
2025-05-31 9:37 ` Vankar, Chintan
2025-05-31 12:28 ` Greg Kroah-Hartman
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=20250304102306.2977836-2-c-vankar@ti.com \
--to=c-vankar@ti.com \
--cc=conor+dt@kernel.org \
--cc=danishanwar@ti.com \
--cc=devicetree@vger.kernel.org \
--cc=krzk+dt@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=peda@axentia.se \
--cc=robh@kernel.org \
--cc=s-vadapalli@ti.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox