* [PATCH 0/2] mips: realtek: Add reboot support
@ 2024-09-09 1:47 Chris Packham
0 siblings, 0 replies; 4+ messages in thread
From: Chris Packham @ 2024-09-09 1:47 UTC (permalink / raw)
To: lee, robh, krzk+dt, conor+dt, tsbogend
Cc: devicetree, linux-kernel, linux-mips, Chris Packham
The system reboot on the cameo-rtl9302c (and presumably many other boards based
on the realtek reference design) is connected via the switch reset register
(RST_GLB_CTRL_0). This adds a basic ethernet-switch node with a reboot node so
we can make uses of the syscon-reboot register.
Chris Packham (2):
dt-bindings: mfd: Add Realtek switch
mips: dts: realtek: Add syscon-reboot node
.../bindings/mfd/realtek,switch.yaml | 50 +++++++++++++++++++
.../cameo-rtl9302c-2x-rtl8224-2xge.dts | 3 ++
arch/mips/boot/dts/realtek/rtl930x.dtsi | 11 ++++
3 files changed, 64 insertions(+)
create mode 100644 Documentation/devicetree/bindings/mfd/realtek,switch.yaml
--
2.46.0
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH 0/2] mips: realtek: Add reboot support
@ 2024-09-20 0:01 Chris Packham
2024-09-20 0:01 ` [PATCH 1/2] dt-bindings: mfd: Add Realtek switch Chris Packham
2024-09-20 0:01 ` [PATCH 2/2] mips: dts: realtek: Add syscon-reboot node Chris Packham
0 siblings, 2 replies; 4+ messages in thread
From: Chris Packham @ 2024-09-20 0:01 UTC (permalink / raw)
To: lee, robh, krzk+dt, conor+dt, tsbogend
Cc: devicetree, linux-kernel, linux-mips, Chris Packham
The system reboot on the cameo-rtl9302c (and presumably many other boards based
on the realtek reference design) is connected via the switch reset register
(RST_GLB_CTRL_0).
Because the switch register block encompasses a number of functions that would
normally be separate perhipherals I've represented it as a syscon node. Right
now the only peripheral I've added is the reset (using syscon-reboot). The
binding and syscon node will be expanded in the future to add some additional
functions (e.g. I2C, GPIO, MDIO).
Chris Packham (2):
dt-bindings: mfd: Add Realtek switch
mips: dts: realtek: Add syscon-reboot node
.../bindings/mfd/realtek,rtl9302c-switch.yaml | 50 +++++++++++++++++++
arch/mips/boot/dts/realtek/rtl930x.dtsi | 11 ++++
2 files changed, 61 insertions(+)
create mode 100644 Documentation/devicetree/bindings/mfd/realtek,rtl9302c-switch.yaml
--
2.46.1
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH 1/2] dt-bindings: mfd: Add Realtek switch
2024-09-20 0:01 [PATCH 0/2] mips: realtek: Add reboot support Chris Packham
@ 2024-09-20 0:01 ` Chris Packham
2024-09-20 0:01 ` [PATCH 2/2] mips: dts: realtek: Add syscon-reboot node Chris Packham
1 sibling, 0 replies; 4+ messages in thread
From: Chris Packham @ 2024-09-20 0:01 UTC (permalink / raw)
To: lee, robh, krzk+dt, conor+dt, tsbogend
Cc: devicetree, linux-kernel, linux-mips, Chris Packham
Add device tree schema for the Realtek switch. Currently the only
supported feature is the syscon-reboot which is needed to be able to
reboot the board.
Signed-off-by: Chris Packham <chris.packham@alliedtelesis.co.nz>
---
Notes:
Changes in v3:
- fix schema id to match filename
Changes in v2:
- use filename that matches the compatible
- put maintainers after title
- remove unnecessary label in example
- Rework description to focus on what is implemented rather than what
may be implemented in the future.
.../bindings/mfd/realtek,rtl9302c-switch.yaml | 50 +++++++++++++++++++
1 file changed, 50 insertions(+)
create mode 100644 Documentation/devicetree/bindings/mfd/realtek,rtl9302c-switch.yaml
diff --git a/Documentation/devicetree/bindings/mfd/realtek,rtl9302c-switch.yaml b/Documentation/devicetree/bindings/mfd/realtek,rtl9302c-switch.yaml
new file mode 100644
index 000000000000..2d20dd07a7e9
--- /dev/null
+++ b/Documentation/devicetree/bindings/mfd/realtek,rtl9302c-switch.yaml
@@ -0,0 +1,50 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/mfd/realtek,rtl9302c-switch.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Realtek Switch with Internal CPU
+
+maintainers:
+ - Chris Packham <chris.packham@alliedtelesis.co.nz>
+
+description:
+ The RTL9302 is an Ethernet switch with an integrated CPU. A number of
+ different peripherals are accessed through a common register block,
+ represented here as a syscon node.
+
+properties:
+ compatible:
+ items:
+ - enum:
+ - realtek,rtl9302c-switch
+ - const: syscon
+ - const: simple-mfd
+
+ reg:
+ maxItems: 1
+
+ reboot:
+ $ref: /schemas/power/reset/syscon-reboot.yaml#
+
+required:
+ - compatible
+ - reg
+ - reboot
+
+additionalProperties: false
+
+examples:
+ - |
+ ethernet-switch@1b000000 {
+ compatible = "realtek,rtl9302c-switch", "syscon", "simple-mfd";
+ reg = <0x1b000000 0x10000>;
+
+ reboot {
+ compatible = "syscon-reboot";
+ offset = <0x0c>;
+ value = <0x01>;
+ };
+ };
+
--
2.46.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH 2/2] mips: dts: realtek: Add syscon-reboot node
2024-09-20 0:01 [PATCH 0/2] mips: realtek: Add reboot support Chris Packham
2024-09-20 0:01 ` [PATCH 1/2] dt-bindings: mfd: Add Realtek switch Chris Packham
@ 2024-09-20 0:01 ` Chris Packham
1 sibling, 0 replies; 4+ messages in thread
From: Chris Packham @ 2024-09-20 0:01 UTC (permalink / raw)
To: lee, robh, krzk+dt, conor+dt, tsbogend
Cc: devicetree, linux-kernel, linux-mips, Chris Packham
The board level reset on systems using the RTL9302 can be driven via the
switch. Use a syscon-reboot node to represent this.
Signed-off-by: Chris Packham <chris.packham@alliedtelesis.co.nz>
---
Notes:
Changes in v3:
- None
Changes in v2:
- drop redundant status = "okay"
arch/mips/boot/dts/realtek/rtl930x.dtsi | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/arch/mips/boot/dts/realtek/rtl930x.dtsi b/arch/mips/boot/dts/realtek/rtl930x.dtsi
index f271940f82be..cf1b38b6c353 100644
--- a/arch/mips/boot/dts/realtek/rtl930x.dtsi
+++ b/arch/mips/boot/dts/realtek/rtl930x.dtsi
@@ -29,6 +29,17 @@ lx_clk: clock-175mhz {
#clock-cells = <0>;
clock-frequency = <175000000>;
};
+
+ switch0: switch@1b000000 {
+ compatible = "realtek,rtl9302c-switch", "syscon", "simple-mfd";
+ reg = <0x1b000000 0x10000>;
+
+ reboot {
+ compatible = "syscon-reboot";
+ offset = <0x0c>;
+ value = <0x01>;
+ };
+ };
};
&soc {
--
2.46.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
end of thread, other threads:[~2024-09-20 0:01 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-09-20 0:01 [PATCH 0/2] mips: realtek: Add reboot support Chris Packham
2024-09-20 0:01 ` [PATCH 1/2] dt-bindings: mfd: Add Realtek switch Chris Packham
2024-09-20 0:01 ` [PATCH 2/2] mips: dts: realtek: Add syscon-reboot node Chris Packham
-- strict thread matches above, loose matches on Subject: below --
2024-09-09 1:47 [PATCH 0/2] mips: realtek: Add reboot support Chris Packham
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).