xref: /linux/Documentation/devicetree/bindings/net/micrel.yaml (revision 20bed0d6ff62d985fe8222958825504b8aad4e88)
1# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2%YAML 1.2
3---
4$id: http://devicetree.org/schemas/net/micrel.yaml#
5$schema: http://devicetree.org/meta-schemas/core.yaml#
6
7title: Micrel KSZ series PHYs and switches
8
9maintainers:
10  - Andrew Lunn <andrew@lunn.ch>
11  - Stefan Eichenberger <eichest@gmail.com>
12
13description:
14  The Micrel KSZ series contains different network phys and switches.
15
16properties:
17  compatible:
18    enum:
19      - ethernet-phy-id000e.7237  # KSZ8873MLL
20      - ethernet-phy-id0022.1430  # KSZ886X
21      - ethernet-phy-id0022.1435  # KSZ8863
22      - ethernet-phy-id0022.1510  # KSZ8041
23      - ethernet-phy-id0022.1537  # KSZ8041RNLI
24      - ethernet-phy-id0022.1550  # KSZ8051
25      - ethernet-phy-id0022.1555  # KSZ8021
26      - ethernet-phy-id0022.1556  # KSZ8031
27      - ethernet-phy-id0022.1560  # KSZ8081, KSZ8091
28      - ethernet-phy-id0022.1570  # KSZ8061
29      - ethernet-phy-id0022.161a  # KSZ8001
30      - ethernet-phy-id0022.1720  # KS8737
31
32  micrel,fiber-mode:
33    type: boolean
34    description: |
35      If present the PHY is configured to operate in fiber mode.
36
37      The KSZ8041FTL variant supports fiber mode, enabled by the FXEN
38      boot strapping pin. It can't be determined from the PHY registers
39      whether the PHY is in fiber mode, so this boolean device tree
40      property can be used to describe it.
41
42      In fiber mode, auto-negotiation is disabled and the PHY can only
43      work in 100base-fx (full and half duplex) modes.
44
45  micrel,led-mode:
46    $ref: /schemas/types.yaml#/definitions/uint32
47    description: |
48      LED mode value to set for PHYs with configurable LEDs.
49
50      Configure the LED mode with single value. The list of PHYs and the
51      bits that are currently supported:
52
53      KSZ8001: register 0x1e, bits 15..14
54      KSZ8021: register 0x1f, bits 5..4
55      KSZ8031: register 0x1f, bits 5..4
56      KSZ8041: register 0x1e, bits 15..14
57      KSZ8041RNLI: register 0x1e, bits 15..14
58      KSZ8051: register 0x1f, bits 5..4
59      KSZ8081: register 0x1f, bits 5..4
60      KSZ8091: register 0x1f, bits 5..4
61
62      See the respective PHY datasheet for the mode values.
63    minimum: 0
64    maximum: 3
65
66  micrel,rmii-reference-clock-select-25-mhz:
67    enum: [ 1 ]
68    description: |
69      RMII Reference Clock Select bit selects 25 MHz mode.
70
71      Setting the RMII Reference Clock Select bit enables 25 MHz rather
72      than 50 MHz clock mode.
73
74allOf:
75  - $ref: ethernet-phy.yaml#
76  - if:
77      not:
78        properties:
79          compatible:
80            contains:
81              const: ethernet-phy-id0022.1510
82    then:
83      properties:
84        micrel,fiber-mode: false
85  - if:
86      not:
87        properties:
88          compatible:
89            contains:
90              enum:
91                - ethernet-phy-id0022.1510
92                - ethernet-phy-id0022.1537
93                - ethernet-phy-id0022.1550
94                - ethernet-phy-id0022.1555
95                - ethernet-phy-id0022.1556
96                - ethernet-phy-id0022.1560
97                - ethernet-phy-id0022.161a
98    then:
99      properties:
100        micrel,led-mode: false
101  - if:
102      not:
103        properties:
104          compatible:
105            contains:
106              enum:
107                - ethernet-phy-id0022.1555
108                - ethernet-phy-id0022.1556
109                - ethernet-phy-id0022.1560
110    then:
111      properties:
112        micrel,rmii-reference-clock-select-25-mhz: false
113  - if:
114      properties:
115        compatible:
116          contains:
117            enum:
118              - ethernet-phy-id0022.1555
119              - ethernet-phy-id0022.1556
120              - ethernet-phy-id0022.1560
121    then:
122      properties:
123        clock-names:
124          const: rmii-ref
125          description:
126            The RMII reference input clock. Used to determine the XI input
127            clock.
128
129dependentRequired:
130  micrel,rmii-reference-clock-select-25-mhz: [ clock-names ]
131
132unevaluatedProperties: false
133
134examples:
135  - |
136    mdio {
137        #address-cells = <1>;
138        #size-cells = <0>;
139
140        ethernet-phy@5 {
141            compatible = "ethernet-phy-id0022.1510";
142            reg = <5>;
143            micrel,led-mode = <2>;
144            micrel,fiber-mode;
145        };
146    };
147