brintos

brintos / linux-shallow public Read only

0
0
Text · 2.8 KiB · 8f5ae0b Raw
88 lines · plain
1* Qualcomm QCA70002 3The QCA7000 is a serial-to-powerline bridge with a host interface which could4be configured either as SPI or UART slave. This configuration is done by5the QCA7000 firmware.6 7(a) Ethernet over SPI8 9In order to use the QCA7000 as SPI device it must be defined as a child of a10SPI master in the device tree.11 12Required properties:13- compatible	    : Should be "qca,qca7000"14- reg		    : Should specify the SPI chip select15- interrupts	    : The first cell should specify the index of the source16		      interrupt and the second cell should specify the trigger17		      type as rising edge18- spi-cpha	    : Must be set19- spi-cpol	    : Must be set20 21Optional properties:22- spi-max-frequency : Maximum frequency of the SPI bus the chip can operate at.23		      Numbers smaller than 1000000 or greater than 1600000024		      are invalid. Missing the property will set the SPI25		      frequency to 8000000 Hertz.26- qca,legacy-mode   : Set the SPI data transfer of the QCA7000 to legacy mode.27		      In this mode the SPI master must toggle the chip select28		      between each data word. In burst mode these gaps aren't29		      necessary, which is faster. This setting depends on how30		      the QCA7000 is setup via GPIO pin strapping. If the31		      property is missing the driver defaults to burst mode.32 33The MAC address will be determined using the optional properties34defined in ethernet.txt.35 36SPI Example:37 38/* Freescale i.MX28 SPI master*/39ssp2: spi@80014000 {40	#address-cells = <1>;41	#size-cells = <0>;42	compatible = "fsl,imx28-spi";43	pinctrl-names = "default";44	pinctrl-0 = <&spi2_pins_a>;45 46	qca7000: ethernet@0 {47		compatible = "qca,qca7000";48		reg = <0x0>;49		interrupt-parent = <&gpio3>;      /* GPIO Bank 3 */50		interrupts = <25 0x1>;            /* Index: 25, rising edge */51		spi-cpha;                         /* SPI mode: CPHA=1 */52		spi-cpol;                         /* SPI mode: CPOL=1 */53		spi-max-frequency = <8000000>;    /* freq: 8 MHz */54		local-mac-address = [ A0 B0 C0 D0 E0 F0 ];55	};56};57 58(b) Ethernet over UART59 60In order to use the QCA7000 as UART slave it must be defined as a child of a61UART master in the device tree. It is possible to preconfigure the UART62settings of the QCA7000 firmware, but it's not possible to change them during63runtime.64 65Required properties:66- compatible        : Should be "qca,qca7000"67 68Optional properties:69- local-mac-address : see ./ethernet.txt70- current-speed     : current baud rate of QCA7000 which defaults to 11520071		      if absent, see also ../serial/serial.yaml72 73UART Example:74 75/* Freescale i.MX28 UART */76auart0: serial@8006a000 {77	compatible = "fsl,imx28-auart", "fsl,imx23-auart";78	reg = <0x8006a000 0x2000>;79	pinctrl-names = "default";80	pinctrl-0 = <&auart0_2pins_a>;81 82	qca7000: ethernet {83		compatible = "qca,qca7000";84		local-mac-address = [ A0 B0 C0 D0 E0 F0 ];85		current-speed = <38400>;86	};87};88