summaryrefslogtreecommitdiffstats
path: root/Documentation/devicetree/bindings/net/micrel,ks8851.yaml
blob: 5aa7cf2eacb1ad03b242fa56ba083ccc2ca4fc3d (plain)
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
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/net/micrel,ks8851.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Micrel KS8851 Ethernet MAC (SPI and Parallel bus options)

maintainers:
  - Marek Vasut <marex@denx.de>

properties:
  compatible:
    enum:
      - micrel,ks8851      # SPI bus option
      - micrel,ks8851-mll  # Parallel bus option

  interrupts:
    maxItems: 1

  reg:
    minItems: 1
    items:
      - description: SPI or Parallel bus hardware address
      - description: Parallel bus command mode address

  reset-gpios:
    maxItems: 1
    description:
      The reset_n input pin

  vdd-supply:
    description: |
      Analog 3.3V supply for Ethernet MAC

  vdd-io-supply:
    description: |
      Digital 1.8V IO supply for Ethernet MAC

required:
  - compatible
  - reg
  - interrupts

allOf:
  - $ref: ethernet-controller.yaml#
  - if:
      properties:
        compatible:
          contains:
            const: micrel,ks8851
    then:
      properties:
        reg:
          maxItems: 1
  - if:
      properties:
        compatible:
          contains:
            const: micrel,ks8851-mll
    then:
      properties:
        reg:
          minItems: 2

unevaluatedProperties: false

examples:
  - |
    /* SPI bus option */
    spi {
        #address-cells = <1>;
        #size-cells = <0>;
        ethernet@0 {
            compatible = "micrel,ks8851";
            reg = <0>;
            interrupt-parent = <&msmgpio>;
            interrupts = <90 8>;
            vdd-supply = <&ext_l2>;
            vdd-io-supply = <&pm8921_lvs6>;
            reset-gpios = <&msmgpio 89 0>;
        };
    };
  - |
    #include <dt-bindings/interrupt-controller/irq.h>
    /* Parallel bus option */
    memory-controller {
        #address-cells = <2>;
        #size-cells = <1>;
        ethernet@1,0 {
            compatible = "micrel,ks8851-mll";
            reg = <1 0x0 0x2>, <1 0x2 0x20000>;
            interrupt-parent = <&gpioc>;
            interrupts = <3 IRQ_TYPE_LEVEL_LOW>;
        };
    };