File Index
Files and directories
Sign in
FILE

qca,qca7000.yaml

File preview with syntax highlighting.

linux-6.19.14/Documentation/devicetree/bindings/net/qca,qca7000.yaml YAML
  1# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
  2%YAML 1.2
  3---
  4$id: http://devicetree.org/schemas/net/qca,qca7000.yaml#
  5$schema: http://devicetree.org/meta-schemas/core.yaml#
  6
  7title: Qualcomm QCA7000
  8
  9maintainers:
 10  - Frank Li <Frank.Li@nxp.com>
 11
 12description: |
 13  The QCA7000 is a serial-to-powerline bridge with a host interface which could
 14  be configured either as SPI or UART slave. This configuration is done by
 15  the QCA7000 firmware.
 16
 17  (a) Ethernet over SPI
 18
 19  In order to use the QCA7000 as SPI device it must be defined as a child of a
 20  SPI master in the device tree.
 21
 22  (b) Ethernet over UART
 23
 24  In order to use the QCA7000 as UART slave it must be defined as a child of a
 25  UART master in the device tree. It is possible to preconfigure the UART
 26  settings of the QCA7000 firmware, but it's not possible to change them during
 27  runtime
 28
 29properties:
 30  compatible:
 31    const: qca,qca7000
 32
 33  reg:
 34    maxItems: 1
 35
 36  interrupts:
 37    maxItems: 1
 38
 39  qca,legacy-mode:
 40    $ref: /schemas/types.yaml#/definitions/flag
 41    description:
 42      Set the SPI data transfer of the QCA7000 to legacy mode.
 43      In this mode the SPI master must toggle the chip select
 44      between each data word. In burst mode these gaps aren't
 45      necessary, which is faster. This setting depends on how
 46      the QCA7000 is setup via GPIO pin strapping. If the
 47      property is missing the driver defaults to burst mode.
 48
 49allOf:
 50  - $ref: ethernet-controller.yaml#
 51
 52  - if:
 53      required:
 54        - reg
 55
 56    then:
 57      properties:
 58        spi-cpha: true
 59
 60        spi-cpol: true
 61
 62        spi-max-frequency:
 63          default: 8000000
 64          maximum: 16000000
 65          minimum: 1000000
 66
 67      allOf:
 68        - $ref: /schemas/spi/spi-peripheral-props.yaml#
 69
 70    else:
 71      properties:
 72        current-speed:
 73          default: 115200
 74
 75        qca,legacy-mode: false
 76
 77      allOf:
 78        - $ref: /schemas/serial/serial-peripheral-props.yaml#
 79
 80unevaluatedProperties: false
 81
 82examples:
 83  - |
 84    #include <dt-bindings/interrupt-controller/irq.h>
 85
 86    spi {
 87        #address-cells = <1>;
 88        #size-cells = <0>;
 89
 90        ethernet@0 {
 91            compatible = "qca,qca7000";
 92            reg = <0x0>;
 93            interrupt-parent = <&gpio3>;
 94            interrupts = <25 IRQ_TYPE_EDGE_RISING>;
 95            spi-cpha;
 96            spi-cpol;
 97            spi-max-frequency = <8000000>;
 98            local-mac-address = [ a0 b0 c0 d0 e0 f0 ];
 99        };
100    };
101
102  - |
103    serial {
104        ethernet {
105            compatible = "qca,qca7000";
106            local-mac-address = [ a0 b0 c0 d0 e0 f0 ];
107            current-speed = <38400>;
108        };
109    };
~/ Read-only file preview.