|
| 1 | +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) |
| 2 | +%YAML 1.2 |
| 3 | +--- |
| 4 | +$id: http://devicetree.org/schemas/mfd/realtek,rtl9301-switch.yaml# |
| 5 | +$schema: http://devicetree.org/meta-schemas/core.yaml# |
| 6 | + |
| 7 | +title: Realtek Switch with Internal CPU |
| 8 | + |
| 9 | +maintainers: |
| 10 | + - Chris Packham <chris.packham@alliedtelesis.co.nz> |
| 11 | + |
| 12 | +description: |
| 13 | + The RTL9300 is a series of is an Ethernet switches with an integrated CPU. A |
| 14 | + number of different peripherals are accessed through a common register block, |
| 15 | + represented here as a syscon node. |
| 16 | + |
| 17 | +properties: |
| 18 | + compatible: |
| 19 | + items: |
| 20 | + - enum: |
| 21 | + - realtek,rtl9301-switch |
| 22 | + - realtek,rtl9302b-switch |
| 23 | + - realtek,rtl9302c-switch |
| 24 | + - realtek,rtl9303-switch |
| 25 | + - const: syscon |
| 26 | + - const: simple-mfd |
| 27 | + |
| 28 | + reg: |
| 29 | + maxItems: 1 |
| 30 | + |
| 31 | + '#address-cells': |
| 32 | + const: 1 |
| 33 | + |
| 34 | + '#size-cells': |
| 35 | + const: 1 |
| 36 | + |
| 37 | +patternProperties: |
| 38 | + 'reboot@[0-9a-f]+$': |
| 39 | + $ref: /schemas/power/reset/syscon-reboot.yaml# |
| 40 | + |
| 41 | + 'i2c@[0-9a-f]+$': |
| 42 | + $ref: /schemas/i2c/realtek,rtl9301-i2c.yaml# |
| 43 | + |
| 44 | +required: |
| 45 | + - compatible |
| 46 | + - reg |
| 47 | + |
| 48 | +additionalProperties: false |
| 49 | + |
| 50 | +examples: |
| 51 | + - | |
| 52 | + ethernet-switch@1b000000 { |
| 53 | + compatible = "realtek,rtl9301-switch", "syscon", "simple-mfd"; |
| 54 | + reg = <0x1b000000 0x10000>; |
| 55 | + #address-cells = <1>; |
| 56 | + #size-cells = <1>; |
| 57 | +
|
| 58 | + reboot@c { |
| 59 | + compatible = "syscon-reboot"; |
| 60 | + reg = <0x0c 0x4>; |
| 61 | + value = <0x01>; |
| 62 | + }; |
| 63 | +
|
| 64 | + i2c@36c { |
| 65 | + compatible = "realtek,rtl9301-i2c"; |
| 66 | + reg = <0x36c 0x14>; |
| 67 | + #address-cells = <1>; |
| 68 | + #size-cells = <0>; |
| 69 | +
|
| 70 | + i2c@0 { |
| 71 | + reg = <0>; |
| 72 | + #address-cells = <1>; |
| 73 | + #size-cells = <0>; |
| 74 | + gpio@20 { |
| 75 | + compatible = "nxp,pca9555"; |
| 76 | + gpio-controller; |
| 77 | + #gpio-cells = <2>; |
| 78 | + reg = <0x20>; |
| 79 | + }; |
| 80 | + }; |
| 81 | +
|
| 82 | + i2c@2 { |
| 83 | + reg = <2>; |
| 84 | + #address-cells = <1>; |
| 85 | + #size-cells = <0>; |
| 86 | + gpio@20 { |
| 87 | + compatible = "nxp,pca9555"; |
| 88 | + gpio-controller; |
| 89 | + #gpio-cells = <2>; |
| 90 | + reg = <0x20>; |
| 91 | + }; |
| 92 | + }; |
| 93 | + }; |
| 94 | +
|
| 95 | + i2c@388 { |
| 96 | + compatible = "realtek,rtl9301-i2c"; |
| 97 | + reg = <0x388 0x14>; |
| 98 | + #address-cells = <1>; |
| 99 | + #size-cells = <0>; |
| 100 | +
|
| 101 | + i2c@7 { |
| 102 | + reg = <7>; |
| 103 | + #address-cells = <1>; |
| 104 | + #size-cells = <0>; |
| 105 | + gpio@20 { |
| 106 | + compatible = "nxp,pca9555"; |
| 107 | + gpio-controller; |
| 108 | + #gpio-cells = <2>; |
| 109 | + reg = <0x20>; |
| 110 | + }; |
| 111 | + }; |
| 112 | + }; |
| 113 | + }; |
| 114 | +
|
0 commit comments