xref: /linux/Documentation/devicetree/bindings/net/micrel,ks8851.yaml (revision cdd5b5a9761fd66d17586e4f4ba6588c70e640ea)
18480a727SMarek Vasut# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
28480a727SMarek Vasut%YAML 1.2
38480a727SMarek Vasut---
48480a727SMarek Vasut$id: http://devicetree.org/schemas/net/micrel,ks8851.yaml#
58480a727SMarek Vasut$schema: http://devicetree.org/meta-schemas/core.yaml#
68480a727SMarek Vasut
78480a727SMarek Vasuttitle: Micrel KS8851 Ethernet MAC (SPI and Parallel bus options)
88480a727SMarek Vasut
98480a727SMarek Vasutmaintainers:
108480a727SMarek Vasut  - Marek Vasut <marex@denx.de>
118480a727SMarek Vasut
128480a727SMarek Vasutproperties:
138480a727SMarek Vasut  compatible:
148480a727SMarek Vasut    enum:
158480a727SMarek Vasut      - micrel,ks8851      # SPI bus option
168480a727SMarek Vasut      - micrel,ks8851-mll  # Parallel bus option
178480a727SMarek Vasut
188480a727SMarek Vasut  interrupts:
198480a727SMarek Vasut    maxItems: 1
208480a727SMarek Vasut
218480a727SMarek Vasut  reg:
228480a727SMarek Vasut    minItems: 1
238480a727SMarek Vasut    items:
248480a727SMarek Vasut      - description: SPI or Parallel bus hardware address
258480a727SMarek Vasut      - description: Parallel bus command mode address
268480a727SMarek Vasut
278480a727SMarek Vasut  reset-gpios:
288480a727SMarek Vasut    maxItems: 1
298480a727SMarek Vasut    description:
308480a727SMarek Vasut      The reset_n input pin
318480a727SMarek Vasut
328480a727SMarek Vasut  vdd-supply:
338480a727SMarek Vasut    description: |
348480a727SMarek Vasut      Analog 3.3V supply for Ethernet MAC
358480a727SMarek Vasut
368480a727SMarek Vasut  vdd-io-supply:
378480a727SMarek Vasut    description: |
388480a727SMarek Vasut      Digital 1.8V IO supply for Ethernet MAC
398480a727SMarek Vasut
408480a727SMarek Vasutrequired:
418480a727SMarek Vasut  - compatible
428480a727SMarek Vasut  - reg
438480a727SMarek Vasut  - interrupts
448480a727SMarek Vasut
458480a727SMarek VasutallOf:
468480a727SMarek Vasut  - $ref: ethernet-controller.yaml#
478480a727SMarek Vasut  - if:
488480a727SMarek Vasut      properties:
498480a727SMarek Vasut        compatible:
508480a727SMarek Vasut          contains:
518480a727SMarek Vasut            const: micrel,ks8851
528480a727SMarek Vasut    then:
53*1ca09f57SKrzysztof Kozlowski      $ref: /schemas/spi/spi-peripheral-props.yaml#
548480a727SMarek Vasut      properties:
558480a727SMarek Vasut        reg:
568480a727SMarek Vasut          maxItems: 1
578480a727SMarek Vasut  - if:
588480a727SMarek Vasut      properties:
598480a727SMarek Vasut        compatible:
608480a727SMarek Vasut          contains:
618480a727SMarek Vasut            const: micrel,ks8851-mll
628480a727SMarek Vasut    then:
63*1ca09f57SKrzysztof Kozlowski      $ref: /schemas/memory-controllers/mc-peripheral-props.yaml#
648480a727SMarek Vasut      properties:
658480a727SMarek Vasut        reg:
668480a727SMarek Vasut          minItems: 2
678480a727SMarek Vasut
688480a727SMarek VasutunevaluatedProperties: false
698480a727SMarek Vasut
708480a727SMarek Vasutexamples:
718480a727SMarek Vasut  - |
728480a727SMarek Vasut    /* SPI bus option */
738480a727SMarek Vasut    spi {
748480a727SMarek Vasut        #address-cells = <1>;
758480a727SMarek Vasut        #size-cells = <0>;
768480a727SMarek Vasut        ethernet@0 {
778480a727SMarek Vasut            compatible = "micrel,ks8851";
788480a727SMarek Vasut            reg = <0>;
798480a727SMarek Vasut            interrupt-parent = <&msmgpio>;
808480a727SMarek Vasut            interrupts = <90 8>;
818480a727SMarek Vasut            vdd-supply = <&ext_l2>;
828480a727SMarek Vasut            vdd-io-supply = <&pm8921_lvs6>;
838480a727SMarek Vasut            reset-gpios = <&msmgpio 89 0>;
848480a727SMarek Vasut        };
858480a727SMarek Vasut    };
868480a727SMarek Vasut  - |
878480a727SMarek Vasut    #include <dt-bindings/interrupt-controller/irq.h>
888480a727SMarek Vasut    /* Parallel bus option */
898480a727SMarek Vasut    memory-controller {
908480a727SMarek Vasut        #address-cells = <2>;
918480a727SMarek Vasut        #size-cells = <1>;
928480a727SMarek Vasut        ethernet@1,0 {
938480a727SMarek Vasut            compatible = "micrel,ks8851-mll";
948480a727SMarek Vasut            reg = <1 0x0 0x2>, <1 0x2 0x20000>;
958480a727SMarek Vasut            interrupt-parent = <&gpioc>;
968480a727SMarek Vasut            interrupts = <3 IRQ_TYPE_LEVEL_LOW>;
978480a727SMarek Vasut        };
988480a727SMarek Vasut    };
99