openwrt/target/linux/ramips/patches-5.15/001-v5.18-01-dt-bindings-clock-mediatek-mt7621-sysc-add-reset-cel.patch
Shiji Yang 8cacf2bda8 ramips: add proper system clock and reset driver support for mt7621
This series of upstream patches makes the system controller node as a
reset provider[1][2], and it also includes some clock and reset driver
fixes[3][4]. Meanwhile, all clocks and resets properties in the SoC
device tree have been updated to be compatible with the new driver.

[1] https://lore.kernel.org/r/20220110114930.1406665-2-sergio.paracuellos@gmail.com
[2] https://lore.kernel.org/r/20220210094859.927868-2-sergio.paracuellos@gmail.com
[3] https://lore.kernel.org/r/20221217074806.3225150-1-sergio.paracuellos@gmail.com
[4] https://lore.kernel.org/r/20230206083305.147582-1-sergio.paracuellos@gmail.com

Tested on RAISECOM MSG1500 X.00

Signed-off-by: John Thomson <git@johnthomson.fastmail.com.au>
Signed-off-by: Shiji Yang <yangshiji66@qq.com>
2023-07-30 13:09:23 +02:00

53 lines
1.8 KiB
Diff

From 478b09fa2c00cbc40d25bc061befdf11f04a27ad Mon Sep 17 00:00:00 2001
From: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Date: Thu, 10 Feb 2022 10:48:58 +0100
Subject: [PATCH 1/2] dt-bindings: clock: mediatek,mt7621-sysc: add '#reset-cells' property
Make system controller a reset provider for all the peripherals in the
MT7621 SoC adding '#reset-cells' property.
Acked-by: Rob Herring <robh@kernel.org>
Acked-by: Stephen Boyd <sboyd@kernel.org>
Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Link: https://lore.kernel.org/r/20220210094859.927868-2-sergio.paracuellos@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
.../devicetree/bindings/clock/mediatek,mt7621-sysc.yaml | 12 ++++++++++++
1 file changed, 12 insertions(+)
--- a/Documentation/devicetree/bindings/clock/mediatek,mt7621-sysc.yaml
+++ b/Documentation/devicetree/bindings/clock/mediatek,mt7621-sysc.yaml
@@ -22,6 +22,11 @@ description: |
The clocks are provided inside a system controller node.
+ This node is also a reset provider for all the peripherals.
+
+ Reset related bits are defined in:
+ [2]: <include/dt-bindings/reset/mt7621-reset.h>.
+
properties:
compatible:
items:
@@ -37,6 +42,12 @@ properties:
clocks.
const: 1
+ "#reset-cells":
+ description:
+ The first cell indicates the reset bit within the register, see
+ [2] for available resets.
+ const: 1
+
ralink,memctl:
$ref: /schemas/types.yaml#/definitions/phandle
description:
@@ -61,6 +72,7 @@ examples:
compatible = "mediatek,mt7621-sysc", "syscon";
reg = <0x0 0x100>;
#clock-cells = <1>;
+ #reset-cells = <1>;
ralink,memctl = <&memc>;
clock-output-names = "xtal", "cpu", "bus",
"50m", "125m", "150m",