xref: /linux/Documentation/devicetree/bindings/net/qca,qca7000.txt (revision bfd5bb6f90af092aa345b15cd78143956a13c2a8)
1* Qualcomm QCA7000
2
3The QCA7000 is a serial-to-powerline bridge with a host interface which could
4be configured either as SPI or UART slave. This configuration is done by
5the QCA7000 firmware.
6
7(a) Ethernet over SPI
8
9In order to use the QCA7000 as SPI device it must be defined as a child of a
10SPI master in the device tree.
11
12Required properties:
13- compatible	    : Should be "qca,qca7000"
14- reg		    : Should specify the SPI chip select
15- interrupts	    : The first cell should specify the index of the source
16		      interrupt and the second cell should specify the trigger
17		      type as rising edge
18- spi-cpha	    : Must be set
19- spi-cpol	    : Must be set
20
21Optional properties:
22- interrupt-parent  : Specify the pHandle of the source interrupt
23- spi-max-frequency : Maximum frequency of the SPI bus the chip can operate at.
24		      Numbers smaller than 1000000 or greater than 16000000
25		      are invalid. Missing the property will set the SPI
26		      frequency to 8000000 Hertz.
27- local-mac-address : see ./ethernet.txt
28- qca,legacy-mode   : Set the SPI data transfer of the QCA7000 to legacy mode.
29		      In this mode the SPI master must toggle the chip select
30		      between each data word. In burst mode these gaps aren't
31		      necessary, which is faster. This setting depends on how
32		      the QCA7000 is setup via GPIO pin strapping. If the
33		      property is missing the driver defaults to burst mode.
34
35SPI Example:
36
37/* Freescale i.MX28 SPI master*/
38ssp2: spi@80014000 {
39	#address-cells = <1>;
40	#size-cells = <0>;
41	compatible = "fsl,imx28-spi";
42	pinctrl-names = "default";
43	pinctrl-0 = <&spi2_pins_a>;
44
45	qca7000: ethernet@0 {
46		compatible = "qca,qca7000";
47		reg = <0x0>;
48		interrupt-parent = <&gpio3>;      /* GPIO Bank 3 */
49		interrupts = <25 0x1>;            /* Index: 25, rising edge */
50		spi-cpha;                         /* SPI mode: CPHA=1 */
51		spi-cpol;                         /* SPI mode: CPOL=1 */
52		spi-max-frequency = <8000000>;    /* freq: 8 MHz */
53		local-mac-address = [ A0 B0 C0 D0 E0 F0 ];
54	};
55};
56
57(b) Ethernet over UART
58
59In order to use the QCA7000 as UART slave it must be defined as a child of a
60UART master in the device tree. It is possible to preconfigure the UART
61settings of the QCA7000 firmware, but it's not possible to change them during
62runtime.
63
64Required properties:
65- compatible        : Should be "qca,qca7000"
66
67Optional properties:
68- local-mac-address : see ./ethernet.txt
69- current-speed     : current baud rate of QCA7000 which defaults to 115200
70		      if absent, see also ../serial/slave-device.txt
71
72UART Example:
73
74/* Freescale i.MX28 UART */
75auart0: serial@8006a000 {
76	compatible = "fsl,imx28-auart", "fsl,imx23-auart";
77	reg = <0x8006a000 0x2000>;
78	pinctrl-names = "default";
79	pinctrl-0 = <&auart0_2pins_a>;
80
81	qca7000: ethernet {
82		compatible = "qca,qca7000";
83		local-mac-address = [ A0 B0 C0 D0 E0 F0 ];
84		current-speed = <38400>;
85	};
86};
87