xref: /linux/Documentation/devicetree/bindings/net/micrel,ks8851.yaml (revision 762f99f4f3cb41a775b5157dd761217beba65873)
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,ks8851.yaml#
5$schema: http://devicetree.org/meta-schemas/core.yaml#
6
7title: Micrel KS8851 Ethernet MAC (SPI and Parallel bus options)
8
9maintainers:
10  - Marek Vasut <marex@denx.de>
11
12properties:
13  compatible:
14    enum:
15      - micrel,ks8851      # SPI bus option
16      - micrel,ks8851-mll  # Parallel bus option
17
18  interrupts:
19    maxItems: 1
20
21  reg:
22    minItems: 1
23    items:
24      - description: SPI or Parallel bus hardware address
25      - description: Parallel bus command mode address
26
27  reset-gpios:
28    maxItems: 1
29    description:
30      The reset_n input pin
31
32  vdd-supply:
33    description: |
34      Analog 3.3V supply for Ethernet MAC
35
36  vdd-io-supply:
37    description: |
38      Digital 1.8V IO supply for Ethernet MAC
39
40required:
41  - compatible
42  - reg
43  - interrupts
44
45allOf:
46  - $ref: ethernet-controller.yaml#
47  - if:
48      properties:
49        compatible:
50          contains:
51            const: micrel,ks8851
52    then:
53      properties:
54        reg:
55          maxItems: 1
56  - if:
57      properties:
58        compatible:
59          contains:
60            const: micrel,ks8851-mll
61    then:
62      properties:
63        reg:
64          minItems: 2
65
66unevaluatedProperties: false
67
68examples:
69  - |
70    /* SPI bus option */
71    spi {
72        #address-cells = <1>;
73        #size-cells = <0>;
74        ethernet@0 {
75            compatible = "micrel,ks8851";
76            reg = <0>;
77            interrupt-parent = <&msmgpio>;
78            interrupts = <90 8>;
79            vdd-supply = <&ext_l2>;
80            vdd-io-supply = <&pm8921_lvs6>;
81            reset-gpios = <&msmgpio 89 0>;
82        };
83    };
84  - |
85    #include <dt-bindings/interrupt-controller/irq.h>
86    /* Parallel bus option */
87    memory-controller {
88        #address-cells = <2>;
89        #size-cells = <1>;
90        ethernet@1,0 {
91            compatible = "micrel,ks8851-mll";
92            reg = <1 0x0 0x2>, <1 0x2 0x20000>;
93            interrupt-parent = <&gpioc>;
94            interrupts = <3 IRQ_TYPE_LEVEL_LOW>;
95        };
96    };
97