From: <peter.wang@mediatek.com>
To: <linux-kernel@vger.kernel.org>
Cc: <p.zabel@pengutronix.de>, <robh@kernel.org>,
<krzysztof.kozlowski@linaro.org>, <conor+dt@kernel.org>,
<matthias.bgg@gmail.com>,
<angelogioacchino.delregno@collabora.com>,
<wsd_upstream@mediatek.com>, <linux-mediatek@lists.infradead.org>,
<linux-devicetree@vger.kernel.org>, <peter.wang@mediatek.com>,
<chun-hung.wu@mediatek.com>, <alice.chao@mediatek.com>,
<naomi.chu@mediatek.com>, <ed.tsai@mediatek.com>
Subject: [PATCH v1 1/2] Documentation: dt: reset: add mediatek,syscon-reset binding
Date: Fri, 26 Jun 2026 15:46:08 +0800 [thread overview]
Message-ID: <20260626074820.2537772-2-peter.wang@mediatek.com> (raw)
In-Reply-To: <20260626074820.2537772-1-peter.wang@mediatek.com>
From: Peter Wang <peter.wang@mediatek.com>
Add Device Tree binding documentation for the MediaTek SYSCON reset
controller (mediatek,syscon-reset). This binding describes a reset
controller that is part of a MediaTek SYSCON MFD block and manages
multiple reset lines within that block.
The reset lines are defined via the 'mediatek,reset-bits' property,
where each entry is a five-cell tuple specifying the register offsets
and bit positions for asserting and deasserting a reset line:
<set_offset set_bit clear_offset clear_bit delay_us>
Consumers reference individual reset lines by index into this list
using the standard '#reset-cells = <1>' scheme.
An example is provided showing a UFS subsystem use case, where the
reset controller is instantiated as a child node of the UFS syscon
MFD node.
Signed-off-by: Peter Wang <peter.wang@mediatek.com>
---
.../bindings/reset/mediatek,syscon-reset.yaml | 93 +++++++++++++++++++
1 file changed, 93 insertions(+)
create mode 100644 Documentation/devicetree/bindings/reset/mediatek,syscon-reset.yaml
diff --git a/Documentation/devicetree/bindings/reset/mediatek,syscon-reset.yaml b/Documentation/devicetree/bindings/reset/mediatek,syscon-reset.yaml
new file mode 100644
index 000000000000..45520ae6f090
--- /dev/null
+++ b/Documentation/devicetree/bindings/reset/mediatek,syscon-reset.yaml
@@ -0,0 +1,93 @@
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
+%YAML 1.2
+---
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: MediaTek SYSCON Reset Controller
+
+maintainers:
+ - Peter Wang <peter.wang@mediatek.com>
+
+description: |
+ This describes a reset controller which is part of a MediaTek SYSCON block
+ and is designed to manage multiple reset lines within that block.
+
+ The node should be a child of a syscon MFD node; it uses the parent's
+ regmap and therefore does not require its own 'reg' property.
+
+ The reset specifier for consumers is an index into the 'mediatek,reset-bits'
+ list. For example, to reference the second reset line:
+
+ resets = <&ufs0cfgao_rst 1>;
+ reset-names = "hci_rst";
+
+properties:
+ compatible:
+ const: mediatek,syscon-reset
+
+ '#reset-cells':
+ const: 1
+ description:
+ The cell should contain the index into the 'mediatek,reset-bits'
+ property to select the specific reset line.
+
+ mediatek,reset-bits:
+ $ref: /schemas/types.yaml#/definitions/uint32-matrix
+ minItems: 1
+ maxItems: 64
+ description: |
+ A list of reset bit definitions. Each reset line is defined by a
+ five-cell entry: <set_offset set_bit clear_offset clear_bit delay_us>.
+ The reset specifier in the consumer driver will be an index into
+ this list. Up to 64 reset lines are supported per controller instance.
+ items:
+ items:
+ - description: >
+ Register offset from the parent syscon base for asserting
+ the reset. Must be 4-byte aligned.
+ minimum: 0
+ multipleOf: 4
+ - description: >
+ Bit index (0-based) within the register for asserting reset.
+ minimum: 0
+ maximum: 31
+ - description: >
+ Register offset from the parent syscon base for deasserting
+ the reset. Must be 4-byte aligned.
+ minimum: 0
+ multipleOf: 4
+ - description: >
+ Bit index (0-based) within the register for deasserting reset.
+ minimum: 0
+ maximum: 31
+ - description: >
+ Minimum delay in microseconds between assertion and deassertion
+ during a full reset cycle. Use 0 if no delay is required.
+ minimum: 0
+ maximum: 1000000
+
+required:
+ - compatible
+ - '#reset-cells'
+ - mediatek,reset-bits
+
+additionalProperties: false
+
+examples:
+ - |
+ ufs0cfg_ao: syscon@16840000 {
+ compatible = "mediatek,mt8183-ufs0cfg_ao", "syscon", "simple-mfd";
+ reg = <0x16840000 0x1000>;
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ ufs0cfgao_rst: reset-controller {
+ compatible = "mediatek,syscon-reset";
+ #reset-cells = <1>;
+ mediatek,reset-bits =
+ <0x48 3 0x4c 3 100>,
+ <0x148 0 0x14c 0 100>,
+ <0x148 1 0x14c 1 100>,
+ <0x148 2 0x14c 2 0>;
+ };
+ };
--
2.45.2
next prev parent reply other threads:[~2026-06-26 7:48 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-26 7:46 [PATCH v1 0/2] reset: mediatek: add syscon-based reset controller peter.wang
2026-06-26 7:46 ` peter.wang [this message]
2026-06-26 8:33 ` [PATCH v1 1/2] Documentation: dt: reset: add mediatek,syscon-reset binding Philipp Zabel
2026-06-26 15:53 ` Conor Dooley
2026-07-01 6:36 ` Peter Wang (王信友)
2026-07-01 6:35 ` Peter Wang (王信友)
2026-07-01 16:57 ` Conor Dooley
2026-07-02 8:52 ` Peter Wang (王信友)
2026-07-02 18:44 ` Conor Dooley
2026-07-02 8:55 ` AngeloGioacchino Del Regno
2026-07-02 9:39 ` Peter Wang (王信友)
2026-07-03 9:21 ` Philipp Zabel
2026-06-26 7:46 ` [PATCH v1 2/2] reset: mediatek: add syscon-based reset controller driver peter.wang
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=20260626074820.2537772-2-peter.wang@mediatek.com \
--to=peter.wang@mediatek.com \
--cc=alice.chao@mediatek.com \
--cc=angelogioacchino.delregno@collabora.com \
--cc=chun-hung.wu@mediatek.com \
--cc=conor+dt@kernel.org \
--cc=ed.tsai@mediatek.com \
--cc=krzysztof.kozlowski@linaro.org \
--cc=linux-devicetree@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=matthias.bgg@gmail.com \
--cc=naomi.chu@mediatek.com \
--cc=p.zabel@pengutronix.de \
--cc=robh@kernel.org \
--cc=wsd_upstream@mediatek.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