[linux-sunxi] Re: [PATCH v2 30/52] dt-bindings: mmc: Convert MMC Card binding to a schema

2021-09-06 Thread Ulf Hansson
On Wed, 1 Sept 2021 at 11:19, Maxime Ripard  wrote:
>
> MMC Cards can have an optional Device Tree binding to add
> non-discoverable properties.
>
> Now that we have the DT validation in place, let's convert the device
> tree bindings for that driver over to a YAML schema.
>
> Some of these properties were already described in the MMC controller
> binding, even though they are not generic and do not apply to any
> device, so we took the occasion to fix this.
>
> Cc: linux-...@vger.kernel.org
> Cc: Ulf Hansson 
> Signed-off-by: Maxime Ripard 
>

Queued for v5.16 on the temporary devel branch, thanks!

Kind regards
Uffe


> ---
>
> Changes from v1:
>   - Fixed additionalProperties
> ---
>  .../devicetree/bindings/mmc/mmc-card.txt  | 30 
>  .../devicetree/bindings/mmc/mmc-card.yaml | 48 +++
>  .../bindings/mmc/mmc-controller.yaml  |  6 ---
>  3 files changed, 48 insertions(+), 36 deletions(-)
>  delete mode 100644 Documentation/devicetree/bindings/mmc/mmc-card.txt
>  create mode 100644 Documentation/devicetree/bindings/mmc/mmc-card.yaml
>
> diff --git a/Documentation/devicetree/bindings/mmc/mmc-card.txt 
> b/Documentation/devicetree/bindings/mmc/mmc-card.txt
> deleted file mode 100644
> index 8d2d71758907..
> --- a/Documentation/devicetree/bindings/mmc/mmc-card.txt
> +++ /dev/null
> @@ -1,30 +0,0 @@
> -mmc-card / eMMC bindings
> -
> -
> -This documents describes the devicetree bindings for a mmc-host controller
> -child node describing a mmc-card / an eMMC, see "Use of Function subnodes"
> -in mmc.txt
> -
> -Required properties:
> --compatible : Must be "mmc-card"
> --reg: Must be <0>
> -
> -Optional properties:
> --broken-hpi : Use this to indicate that the mmc-card has a broken hpi
> -  implementation, and that hpi should not be used
> -
> -Example:
> -
> - {
> -   pinctrl-names = "default";
> -   pinctrl-0 = <_pins_a>;
> -   vmmc-supply = <_vcc3v3>;
> -   bus-width = <8>;
> -   non-removable;
> -
> -   mmccard: mmccard@0 {
> -   reg = <0>;
> -   compatible = "mmc-card";
> -   broken-hpi;
> -   };
> -};
> diff --git a/Documentation/devicetree/bindings/mmc/mmc-card.yaml 
> b/Documentation/devicetree/bindings/mmc/mmc-card.yaml
> new file mode 100644
> index ..b17d454442b3
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/mmc/mmc-card.yaml
> @@ -0,0 +1,48 @@
> +# SPDX-License-Identifier: GPL-2.0
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/mmc/mmc-card.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: MMC Card / eMMC Generic Device Tree Bindings
> +
> +maintainers:
> +  - Ulf Hansson 
> +
> +description: |
> +  This documents describes the devicetree bindings for a mmc-host controller
> +  child node describing a mmc-card / an eMMC.
> +
> +properties:
> +  compatible:
> +const: mmc-card
> +
> +  reg:
> +const: 0
> +
> +  broken-hpi:
> +$ref: /schemas/types.yaml#/definitions/flag
> +description:
> +  Use this to indicate that the mmc-card has a broken hpi
> +  implementation, and that hpi should not be used.
> +
> +required:
> +  - compatible
> +  - reg
> +
> +additionalProperties: false
> +
> +examples:
> +  - |
> +mmc {
> +#address-cells = <1>;
> +#size-cells = <0>;
> +
> +card@0 {
> +compatible = "mmc-card";
> +reg = <0>;
> +broken-hpi;
> +};
> +};
> +
> +...
> diff --git a/Documentation/devicetree/bindings/mmc/mmc-controller.yaml 
> b/Documentation/devicetree/bindings/mmc/mmc-controller.yaml
> index 25ac8e200970..513f3c8758aa 100644
> --- a/Documentation/devicetree/bindings/mmc/mmc-controller.yaml
> +++ b/Documentation/devicetree/bindings/mmc/mmc-controller.yaml
> @@ -333,12 +333,6 @@ patternProperties:
>subnode describes. A value of 0 denotes the memory SD
>function, values from 1 to 7 denote the SDIO functions.
>
> -  broken-hpi:
> -$ref: /schemas/types.yaml#/definitions/flag
> -description:
> -  Use this to indicate that the mmc-card has a broken hpi
> -  implementation, and that hpi should not be used.
> -
>  required:
>- reg
>
> --
> 2.31.1
>

-- 
You received this message because you are subscribed to the Google Groups 
"linux-sunxi" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to linux-sunxi+unsubscr...@googlegroups.com.
To view this discussion on the web, visit 
https://groups.google.com/d/msgid/linux-sunxi/CAPDyKFrZr-%2BQeVE7DtZqVWDLFgLi1wYOzTMngD9JYXJBQ-ZtLA%40mail.gmail.com.


[linux-sunxi] Re: [PATCH v2 30/52] dt-bindings: mmc: Convert MMC Card binding to a schema

2021-09-03 Thread Rob Herring
On Wed, 01 Sep 2021 11:18:30 +0200, Maxime Ripard wrote:
> MMC Cards can have an optional Device Tree binding to add
> non-discoverable properties.
> 
> Now that we have the DT validation in place, let's convert the device
> tree bindings for that driver over to a YAML schema.
> 
> Some of these properties were already described in the MMC controller
> binding, even though they are not generic and do not apply to any
> device, so we took the occasion to fix this.
> 
> Cc: linux-...@vger.kernel.org
> Cc: Ulf Hansson 
> Signed-off-by: Maxime Ripard 
> 
> ---
> 
> Changes from v1:
>   - Fixed additionalProperties
> ---
>  .../devicetree/bindings/mmc/mmc-card.txt  | 30 
>  .../devicetree/bindings/mmc/mmc-card.yaml | 48 +++
>  .../bindings/mmc/mmc-controller.yaml  |  6 ---
>  3 files changed, 48 insertions(+), 36 deletions(-)
>  delete mode 100644 Documentation/devicetree/bindings/mmc/mmc-card.txt
>  create mode 100644 Documentation/devicetree/bindings/mmc/mmc-card.yaml
> 

Reviewed-by: Rob Herring 

-- 
You received this message because you are subscribed to the Google Groups 
"linux-sunxi" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to linux-sunxi+unsubscr...@googlegroups.com.
To view this discussion on the web, visit 
https://groups.google.com/d/msgid/linux-sunxi/YTJ7cReisyxIE6Cy%40robh.at.kernel.org.