Commit 63b956f9 authored by Miquel Raynal's avatar Miquel Raynal Committed by Paolo Abeni
Browse files

dt-bindings: net: marvell,dfx-server: Convert to yaml



Even though this description is not used anywhere upstream (no matching
driver), while on this file I decided I would try a conversion to yaml
in order to clarify the prestera family description.

I cannot keep the nodename dfx-server@xxxx so I switched to dfx-bus@xxxx
which matches simple-bus.yaml. Otherwise I took the example context from
the only user of this compatible: armada-xp-98dx3236.dtsi, which is a
rather old and not perfect DT.

Signed-off-by: default avatarMiquel Raynal <miquel.raynal@bootlin.com>
Reviewed-by: default avatarKrzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: default avatarPaolo Abeni <pabeni@redhat.com>
parent 98eb05dc
Loading
Loading
Loading
Loading
+62 −0
Original line number Diff line number Diff line
# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
%YAML 1.2
---
$id: http://devicetree.org/schemas/net/marvell,dfx-server.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Marvell Prestera DFX server

maintainers:
  - Miquel Raynal <miquel.raynal@bootlin.com>

select:
  properties:
    compatible:
      contains:
        const: marvell,dfx-server
  required:
    - compatible

properties:
  compatible:
    items:
      - const: marvell,dfx-server
      - const: simple-bus

  reg:
    maxItems: 1

  ranges: true

  '#address-cells':
    const: 1

  '#size-cells':
    const: 1

required:
  - compatible
  - reg
  - ranges

# The DFX server may expose clocks described as subnodes
additionalProperties:
  type: object

examples:
  - |

    #define MBUS_ID(target,attributes) (((target) << 24) | ((attributes) << 16))
    bus@0 {
        reg = <0 0>;
        #address-cells = <2>;
        #size-cells = <1>;

        dfx-bus@ac000000 {
            compatible = "marvell,dfx-server", "simple-bus";
            #address-cells = <1>;
            #size-cells = <1>;
            ranges = <0 MBUS_ID(0x08, 0x00) 0 0x100000>;
            reg = <MBUS_ID(0x08, 0x00) 0 0x100000>;
        };
    };
+0 −18
Original line number Diff line number Diff line
@@ -27,21 +27,3 @@ switch {
		dfx = <&dfx>;
	};
};

DFX Server bindings
-------------------

Required properties:
- compatible: must be "marvell,dfx-server", "simple-bus"
- ranges: describes the address mapping of a memory-mapped bus.
- reg: address and length of the register set for the device.

Example:

dfx-server {
	compatible = "marvell,dfx-server", "simple-bus";
	#address-cells = <1>;
	#size-cells = <1>;
	ranges = <0 MBUS_ID(0x08, 0x00) 0 0x100000>;
	reg = <MBUS_ID(0x08, 0x00) 0 0x100000>;
};