Re: [PATCH v2 1/2] dt-bindings: fpga: Convert bridge binding to yaml

From: Krzysztof Kozlowski
Date: Tue Jan 09 2024 - 03:10:40 EST


On 09/01/2024 08:58, Michal Simek wrote:
> Convert the generic fpga bridge DT binding to json-schema.
>
> Signed-off-by: Michal Simek <michal.simek@xxxxxxx>
> Reviewed-by: Xu Yilun <yilun.xu@xxxxxxxxx>
> Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@xxxxxxxxxx>
> ---
>
> (no changes since v1)
>
> .../devicetree/bindings/fpga/fpga-bridge.txt | 13 --------
> .../devicetree/bindings/fpga/fpga-bridge.yaml | 30 +++++++++++++++++++
> .../bindings/fpga/xlnx,pr-decoupler.yaml | 5 +++-
> 3 files changed, 34 insertions(+), 14 deletions(-)
> delete mode 100644 Documentation/devicetree/bindings/fpga/fpga-bridge.txt
> create mode 100644 Documentation/devicetree/bindings/fpga/fpga-bridge.yaml
>
> diff --git a/Documentation/devicetree/bindings/fpga/fpga-bridge.txt b/Documentation/devicetree/bindings/fpga/fpga-bridge.txt
> deleted file mode 100644
> index 72e06917288a..000000000000
> --- a/Documentation/devicetree/bindings/fpga/fpga-bridge.txt
> +++ /dev/null
> @@ -1,13 +0,0 @@
> -FPGA Bridge Device Tree Binding
> -
> -Optional properties:
> -- bridge-enable : 0 if driver should disable bridge at startup
> - 1 if driver should enable bridge at startup
> - Default is to leave bridge in current state.
> -
> -Example:
> - fpga_bridge3: fpga-bridge@ffc25080 {
> - compatible = "altr,socfpga-fpga2sdram-bridge";
> - reg = <0xffc25080 0x4>;
> - bridge-enable = <0>;
> - };
> diff --git a/Documentation/devicetree/bindings/fpga/fpga-bridge.yaml b/Documentation/devicetree/bindings/fpga/fpga-bridge.yaml
> new file mode 100644
> index 000000000000..248639c6b560
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/fpga/fpga-bridge.yaml
> @@ -0,0 +1,30 @@
> +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/fpga/fpga-bridge.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: FPGA Bridge
> +
> +maintainers:
> + - Michal Simek <michal.simek@xxxxxxx>
> +
> +properties:
> + $nodename:
> + pattern: "^fpga-bridge(@.*)?$"

Either I misunderstood previous messages or something is still wrong.

One message said: always unit address, so there will be no
fpga-bridge-1. This means "?" is not correct.

Other message was saying "reg" is not required in one of the bindings,
thus "fpga-bridge-1" is reasonable if there are more than one bridge
(which was already said as possibility?).

Best regards,
Krzysztof