[PATCH 1/2] dt-bindings: mfd: Add Realtek switch
From: Chris Packham
Date: Sun Sep 08 2024 - 21:47:37 EST
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@xxxxxxxxxxxxxxxxxxx>
---
.../bindings/mfd/realtek,switch.yaml | 50 +++++++++++++++++++
1 file changed, 50 insertions(+)
create mode 100644 Documentation/devicetree/bindings/mfd/realtek,switch.yaml
diff --git a/Documentation/devicetree/bindings/mfd/realtek,switch.yaml b/Documentation/devicetree/bindings/mfd/realtek,switch.yaml
new file mode 100644
index 000000000000..84b57f87bd3a
--- /dev/null
+++ b/Documentation/devicetree/bindings/mfd/realtek,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,switch.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Realtek Switch with Internal CPU
+
+description:
+ The RTL9302 ethernet switch has an internal CPU. The switch is a multi-port
+ networking switch that supports many interfaces. Additionally, the device can
+ support MDIO, SPI and I2C busses.
+
+maintainers:
+ - Chris Packham <chris.packham@xxxxxxxxxxxxxxxxxxx>
+
+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:
+ - |
+ switch0: ethernet-switch@1b000000 {
+ compatible = "realtek,rtl9302c-switch", "syscon", "simple-mfd";
+ reg = <0x1b000000 0x10000>;
+
+ reboot {
+ compatible = "syscon-reboot";
+ offset = <0x0c>;
+ value = <0x01>;
+ };
+ };
+
--
2.46.0