xref: /freebsd/sys/contrib/device-tree/Bindings/net/micrel,ks8851.yaml (revision f126890ac5386406dadf7c4cfa9566cbb56537c5)
1354d7675SEmmanuel Vadot# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2354d7675SEmmanuel Vadot%YAML 1.2
3354d7675SEmmanuel Vadot---
4354d7675SEmmanuel Vadot$id: http://devicetree.org/schemas/net/micrel,ks8851.yaml#
5354d7675SEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml#
6354d7675SEmmanuel Vadot
7354d7675SEmmanuel Vadottitle: Micrel KS8851 Ethernet MAC (SPI and Parallel bus options)
8354d7675SEmmanuel Vadot
9354d7675SEmmanuel Vadotmaintainers:
10354d7675SEmmanuel Vadot  - Marek Vasut <marex@denx.de>
11354d7675SEmmanuel Vadot
12354d7675SEmmanuel Vadotproperties:
13354d7675SEmmanuel Vadot  compatible:
14354d7675SEmmanuel Vadot    enum:
15354d7675SEmmanuel Vadot      - micrel,ks8851      # SPI bus option
16354d7675SEmmanuel Vadot      - micrel,ks8851-mll  # Parallel bus option
17354d7675SEmmanuel Vadot
18354d7675SEmmanuel Vadot  interrupts:
19354d7675SEmmanuel Vadot    maxItems: 1
20354d7675SEmmanuel Vadot
21354d7675SEmmanuel Vadot  reg:
22354d7675SEmmanuel Vadot    minItems: 1
23354d7675SEmmanuel Vadot    items:
24354d7675SEmmanuel Vadot      - description: SPI or Parallel bus hardware address
25354d7675SEmmanuel Vadot      - description: Parallel bus command mode address
26354d7675SEmmanuel Vadot
27354d7675SEmmanuel Vadot  reset-gpios:
28354d7675SEmmanuel Vadot    maxItems: 1
29354d7675SEmmanuel Vadot    description:
30354d7675SEmmanuel Vadot      The reset_n input pin
31354d7675SEmmanuel Vadot
32354d7675SEmmanuel Vadot  vdd-supply:
33354d7675SEmmanuel Vadot    description: |
34354d7675SEmmanuel Vadot      Analog 3.3V supply for Ethernet MAC
35354d7675SEmmanuel Vadot
36354d7675SEmmanuel Vadot  vdd-io-supply:
37354d7675SEmmanuel Vadot    description: |
38354d7675SEmmanuel Vadot      Digital 1.8V IO supply for Ethernet MAC
39354d7675SEmmanuel Vadot
40354d7675SEmmanuel Vadotrequired:
41354d7675SEmmanuel Vadot  - compatible
42354d7675SEmmanuel Vadot  - reg
43354d7675SEmmanuel Vadot  - interrupts
44354d7675SEmmanuel Vadot
45354d7675SEmmanuel VadotallOf:
46354d7675SEmmanuel Vadot  - $ref: ethernet-controller.yaml#
47354d7675SEmmanuel Vadot  - if:
48354d7675SEmmanuel Vadot      properties:
49354d7675SEmmanuel Vadot        compatible:
50354d7675SEmmanuel Vadot          contains:
51354d7675SEmmanuel Vadot            const: micrel,ks8851
52354d7675SEmmanuel Vadot    then:
53*f126890aSEmmanuel Vadot      $ref: /schemas/spi/spi-peripheral-props.yaml#
54354d7675SEmmanuel Vadot      properties:
55354d7675SEmmanuel Vadot        reg:
56354d7675SEmmanuel Vadot          maxItems: 1
57354d7675SEmmanuel Vadot  - if:
58354d7675SEmmanuel Vadot      properties:
59354d7675SEmmanuel Vadot        compatible:
60354d7675SEmmanuel Vadot          contains:
61354d7675SEmmanuel Vadot            const: micrel,ks8851-mll
62354d7675SEmmanuel Vadot    then:
63*f126890aSEmmanuel Vadot      $ref: /schemas/memory-controllers/mc-peripheral-props.yaml#
64354d7675SEmmanuel Vadot      properties:
65354d7675SEmmanuel Vadot        reg:
66354d7675SEmmanuel Vadot          minItems: 2
67354d7675SEmmanuel Vadot
68354d7675SEmmanuel VadotunevaluatedProperties: false
69354d7675SEmmanuel Vadot
70354d7675SEmmanuel Vadotexamples:
71354d7675SEmmanuel Vadot  - |
72354d7675SEmmanuel Vadot    /* SPI bus option */
73354d7675SEmmanuel Vadot    spi {
74354d7675SEmmanuel Vadot        #address-cells = <1>;
75354d7675SEmmanuel Vadot        #size-cells = <0>;
76354d7675SEmmanuel Vadot        ethernet@0 {
77354d7675SEmmanuel Vadot            compatible = "micrel,ks8851";
78354d7675SEmmanuel Vadot            reg = <0>;
79354d7675SEmmanuel Vadot            interrupt-parent = <&msmgpio>;
80354d7675SEmmanuel Vadot            interrupts = <90 8>;
81354d7675SEmmanuel Vadot            vdd-supply = <&ext_l2>;
82354d7675SEmmanuel Vadot            vdd-io-supply = <&pm8921_lvs6>;
83354d7675SEmmanuel Vadot            reset-gpios = <&msmgpio 89 0>;
84354d7675SEmmanuel Vadot        };
85354d7675SEmmanuel Vadot    };
86354d7675SEmmanuel Vadot  - |
87354d7675SEmmanuel Vadot    #include <dt-bindings/interrupt-controller/irq.h>
88354d7675SEmmanuel Vadot    /* Parallel bus option */
89354d7675SEmmanuel Vadot    memory-controller {
90354d7675SEmmanuel Vadot        #address-cells = <2>;
91354d7675SEmmanuel Vadot        #size-cells = <1>;
92354d7675SEmmanuel Vadot        ethernet@1,0 {
93354d7675SEmmanuel Vadot            compatible = "micrel,ks8851-mll";
94354d7675SEmmanuel Vadot            reg = <1 0x0 0x2>, <1 0x2 0x20000>;
95354d7675SEmmanuel Vadot            interrupt-parent = <&gpioc>;
96354d7675SEmmanuel Vadot            interrupts = <3 IRQ_TYPE_LEVEL_LOW>;
97354d7675SEmmanuel Vadot        };
98354d7675SEmmanuel Vadot    };
99