Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

dt-bindings: net: convert qca,qca7000.txt yaml format

Convert qca,qca7000.txt yaml format.

Additional changes:
- add refs: spi-peripheral-props.yaml, serial-peripheral-props.yaml and
ethernet-controller.yaml.
- simple spi and uart node name.
- use low case for mac address in examples.
- add check reg choose spi-peripheral-props.yaml or
spi-peripheral-props.yaml.

Reviewed-by: Jacob Keller <jacob.e.keller@intel.com>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Frank Li <Frank.Li@nxp.com>
Link: https://patch.msgid.link/20250618184417.2169745-1-Frank.Li@nxp.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>

authored by

Frank Li and committed by
Jakub Kicinski
bf92ffb0 96c16c59

+110 -88
-87
Documentation/devicetree/bindings/net/qca,qca7000.txt
··· 1 - * Qualcomm QCA7000 2 - 3 - The QCA7000 is a serial-to-powerline bridge with a host interface which could 4 - be configured either as SPI or UART slave. This configuration is done by 5 - the QCA7000 firmware. 6 - 7 - (a) Ethernet over SPI 8 - 9 - In order to use the QCA7000 as SPI device it must be defined as a child of a 10 - SPI master in the device tree. 11 - 12 - Required 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 - 21 - Optional properties: 22 - - spi-max-frequency : Maximum frequency of the SPI bus the chip can operate at. 23 - Numbers smaller than 1000000 or greater than 16000000 24 - are invalid. Missing the property will set the SPI 25 - 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 select 28 - between each data word. In burst mode these gaps aren't 29 - necessary, which is faster. This setting depends on how 30 - the QCA7000 is setup via GPIO pin strapping. If the 31 - property is missing the driver defaults to burst mode. 32 - 33 - The MAC address will be determined using the optional properties 34 - defined in ethernet.txt. 35 - 36 - SPI Example: 37 - 38 - /* Freescale i.MX28 SPI master*/ 39 - ssp2: 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 UART 59 - 60 - In order to use the QCA7000 as UART slave it must be defined as a child of a 61 - UART master in the device tree. It is possible to preconfigure the UART 62 - settings of the QCA7000 firmware, but it's not possible to change them during 63 - runtime. 64 - 65 - Required properties: 66 - - compatible : Should be "qca,qca7000" 67 - 68 - Optional properties: 69 - - local-mac-address : see ./ethernet.txt 70 - - current-speed : current baud rate of QCA7000 which defaults to 115200 71 - if absent, see also ../serial/serial.yaml 72 - 73 - UART Example: 74 - 75 - /* Freescale i.MX28 UART */ 76 - auart0: 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 - };
+109
Documentation/devicetree/bindings/net/qca,qca7000.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 + 7 + title: Qualcomm QCA7000 8 + 9 + maintainers: 10 + - Frank Li <Frank.Li@nxp.com> 11 + 12 + description: | 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 + 29 + properties: 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 + 49 + allOf: 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 + 80 + unevaluatedProperties: false 81 + 82 + examples: 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 + };
+1 -1
MAINTAINERS
··· 20325 20325 M: Stefan Wahren <wahrenst@gmx.net> 20326 20326 L: netdev@vger.kernel.org 20327 20327 S: Maintained 20328 - F: Documentation/devicetree/bindings/net/qca,qca7000.txt 20328 + F: Documentation/devicetree/bindings/net/qca,qca7000.yaml 20329 20329 F: drivers/net/ethernet/qualcomm/qca* 20330 20330 20331 20331 QUALCOMM BAM-DMUX WWAN NETWORK DRIVER