Documentation / devicetree / bindings / net / pse-pd / realtek,pse-mcu-gen1.yaml


Based on kernel version 7.3. Page generated on 2026-10-19 13:17 EDT.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/net/pse-pd/realtek,pse-mcu-gen1.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Realtek PSE MCU

maintainers:
  - Jonas Jelonek <jelonek.jonas@gmail.com>

description: |
  A microcontroller (MCU) that manages the PSE (Power Sourcing Equipment)
  hardware on a range of managed PoE switches. The host CPU talks only to
  this MCU - over I2C/SMBus or UART - using a small message-based protocol;
  the PSE silicon it drives sits behind the MCU and is never accessed
  directly. For example, on the Zyxel GS1900-10HP the SoC reaches the MCU
  over UART, and the MCU manages the on-board PSE chip.
 
  This binding describes the MCU together with its Realtek firmware: the
  firmware and its host protocol, which are stable across boards. The
  microcontroller silicon is a general-purpose part that varies, and the
  PSE silicon behind the MCU (Realtek RTL823x/RTL8239* or Broadcom
  BCM59xxx) is reported by the MCU and detected at runtime - neither is
  named here.
 
  Two protocol generations exist, both Realtek's:
    gen1  older boards, where the MCU fronts Broadcom PSE silicon
    gen2  the altered protocol used with Realtek's own PSE silicon
 
  On an I2C attachment the framing the MCU firmware expects is part of the
  compatible: '-smbus' (reads carry a leading command byte and a repeated
  start) or '-i2c' (bare block writes and reads). A UART attachment carries
  no framing suffix; the transport is given by the parent 'serial' node.
 
  Each board additionally carries a device-specific compatible that falls
  back to one of the protocol compatibles above. Drivers bind on the
  protocol compatible; the device-specific string identifies the board and
  reserves a place for a future per-board quirk without having to retrofit
  device trees already in the field.

properties:
  compatible:
    oneOf:
      # UART
      - items:
          - enum:
              - zyxel,gs1900-10hp-a1-pse
          - const: realtek,pse-mcu-gen1
 
      # I2C, SMBus framing
      - items:
          - enum:
              - zyxel,gs1920-24hp-v2-pse
          - const: realtek,pse-mcu-gen1-smbus
 
      # UART
      - items:
          - enum:
              - zyxel,gs1900-10hp-b1-pse
              - zyxel,xmg1915-10ep-pse
          - const: realtek,pse-mcu-gen2
 
      # I2C, SMBus framing
      - items:
          - enum:
              - zyxel,xs1930-12hp-pse
          - const: realtek,pse-mcu-gen2-smbus
 
      # I2C, raw framing
      - items:
          - enum:
              - linksys,lgs328mpc-v2-pse
          - const: realtek,pse-mcu-gen2-i2c

  reg:
    maxItems: 1

  reset-gpios:
    description: Reset line of the MCU.
    maxItems: 1

  disable-ports-gpios:
    description:
      Hardware gate that forces all ports into admin-disabled state while
      asserted.
    maxItems: 1

required:
  - compatible

allOf:
  - $ref: pse-controller.yaml#
  # A '-smbus'/'-i2c' compatible is an I2C attachment: it has 'reg' and
  # cannot carry serial bus properties. A bare gen compatible is a UART
  # attachment: no 'reg', the transport comes from the parent serial node.
  - if:
      properties:
        compatible:
          contains:
            enum:
              - realtek,pse-mcu-gen1-smbus
              - realtek,pse-mcu-gen2-smbus
              - realtek,pse-mcu-gen2-i2c
    then:
      required:
        - reg
      properties:
        current-speed: false
        max-speed: false
    else:
      allOf:
        - $ref: /schemas/serial/serial-peripheral-props.yaml#

      properties:
        reg: false

unevaluatedProperties: false

examples:
  # SMBus-framed I2C attachment
  - |
    i2c {
        #address-cells = <1>;
        #size-cells = <0>;
 
        ethernet-pse@20 {
            compatible = "zyxel,xs1930-12hp-pse", "realtek,pse-mcu-gen2-smbus";
            reg = <0x20>;
 
            pse-pis {
                #address-cells = <1>;
                #size-cells = <0>;
 
                pse-pi@0 {
                    reg = <0>;
                    #pse-cells = <0>;
                };
            };
        };
    };

  # Raw-I2C-framed attachment
  - |
    i2c {
        #address-cells = <1>;
        #size-cells = <0>;
 
        ethernet-pse@20 {
            compatible = "linksys,lgs328mpc-v2-pse", "realtek,pse-mcu-gen2-i2c";
            reg = <0x20>;
 
            pse-pis {
                #address-cells = <1>;
                #size-cells = <0>;
 
                pse-pi@0 {
                    reg = <0>;
                    #pse-cells = <0>;
                };
            };
        };
    };

  # UART attachment
  - |
    serial {
        ethernet-pse {
            compatible = "zyxel,gs1900-10hp-a1-pse", "realtek,pse-mcu-gen1";
            current-speed = <19200>;
 
            pse-pis {
                #address-cells = <1>;
                #size-cells = <0>;
 
                pse-pi@0 {
                    reg = <0>;
                    #pse-cells = <0>;
                };
            };
        };
    };