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

dt-bindings: net: sun4i-emac: Convert the binding to a schemas

Switch our Allwinner A10 EMAC controller binding to a YAML schema to enable
the DT validation.

Reviewed-by: Rob Herring <robh@kernel.org>
Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com>
Signed-off-by: Rob Herring <robh@kernel.org>

authored by

Maxime Ripard and committed by
Rob Herring
8c5b0944 4abe7a3a

+56 -19
+56
Documentation/devicetree/bindings/net/allwinner,sun4i-a10-emac.yaml
··· 1 + # SPDX-License-Identifier: GPL-2.0 2 + %YAML 1.2 3 + --- 4 + $id: http://devicetree.org/schemas/net/allwinner,sun4i-a10-emac.yaml# 5 + $schema: http://devicetree.org/meta-schemas/core.yaml# 6 + 7 + title: Allwinner A10 EMAC Ethernet Controller Device Tree Bindings 8 + 9 + allOf: 10 + - $ref: "ethernet-controller.yaml#" 11 + 12 + maintainers: 13 + - Chen-Yu Tsai <wens@csie.org> 14 + - Maxime Ripard <maxime.ripard@bootlin.com> 15 + 16 + properties: 17 + compatible: 18 + const: allwinner,sun4i-a10-emac 19 + 20 + reg: 21 + maxItems: 1 22 + 23 + interrupts: 24 + maxItems: 1 25 + 26 + clocks: 27 + maxItems: 1 28 + 29 + allwinner,sram: 30 + description: Phandle to the device SRAM 31 + $ref: /schemas/types.yaml#/definitions/phandle-array 32 + 33 + required: 34 + - compatible 35 + - reg 36 + - interrupts 37 + - clocks 38 + - phy-handle 39 + - allwinner,sram 40 + 41 + examples: 42 + - | 43 + emac: ethernet@1c0b000 { 44 + compatible = "allwinner,sun4i-a10-emac"; 45 + reg = <0x01c0b000 0x1000>; 46 + interrupts = <55>; 47 + clocks = <&ahb_gates 17>; 48 + phy-handle = <&phy0>; 49 + allwinner,sram = <&emac_sram 1>; 50 + }; 51 + 52 + # FIXME: We should set it, but it would report all the generic 53 + # properties as additional properties. 54 + # additionalProperties: false 55 + 56 + ...
-19
Documentation/devicetree/bindings/net/allwinner,sun4i-emac.txt
··· 1 - * Allwinner EMAC ethernet controller 2 - 3 - Required properties: 4 - - compatible: should be "allwinner,sun4i-a10-emac" (Deprecated: 5 - "allwinner,sun4i-emac") 6 - - reg: address and length of the register set for the device. 7 - - interrupts: interrupt for the device 8 - - phy: see ethernet.txt file in the same directory. 9 - - clocks: A phandle to the reference clock for this device 10 - 11 - Example: 12 - 13 - emac: ethernet@1c0b000 { 14 - compatible = "allwinner,sun4i-a10-emac"; 15 - reg = <0x01c0b000 0x1000>; 16 - interrupts = <55>; 17 - clocks = <&ahb_gates 17>; 18 - phy = <&phy0>; 19 - };