qca,qca7000.yaml 2.6 KB

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