linux-mmc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ulf Hansson <ulf.hansson@linaro.org>
To: Jisheng Zhang <Jisheng.Zhang@synaptics.com>
Cc: Rob Herring <robh+dt@kernel.org>,
	"linux-mmc@vger.kernel.org" <linux-mmc@vger.kernel.org>,
	DTML <devicetree@vger.kernel.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v2] dt-bindings: mmc: Convert pwrseq to json-schema
Date: Mon, 6 Jul 2020 16:48:52 +0200	[thread overview]
Message-ID: <CAPDyKFpWAu0uH_1-XL8O5Jj2WS6zPhLV2ZvoXBFQT_dpqnD0FQ@mail.gmail.com> (raw)
In-Reply-To: <20200622164431.3dbc8c5a@xhacker.debian>

On Mon, 22 Jun 2020 at 10:51, Jisheng Zhang <Jisheng.Zhang@synaptics.com> wrote:
>
> Convert the pwrseq binding to DT schema format using json-schema.
>
> At the same time, fix a couple of issues with the examples discovered by
> the validation tool -- missing ";"
>
> Signed-off-by: Jisheng Zhang <Jisheng.Zhang@synaptics.com>

Applied for next, thanks!

Kind regards
Uffe


> ---
> since v1:
>  - conver pwrseq to yaml format rather than fixing old docs
>
>  .../bindings/mmc/mmc-pwrseq-emmc.txt          | 25 --------
>  .../bindings/mmc/mmc-pwrseq-emmc.yaml         | 46 ++++++++++++++
>  .../bindings/mmc/mmc-pwrseq-sd8787.txt        | 16 -----
>  .../bindings/mmc/mmc-pwrseq-sd8787.yaml       | 39 ++++++++++++
>  .../bindings/mmc/mmc-pwrseq-simple.txt        | 31 ----------
>  .../bindings/mmc/mmc-pwrseq-simple.yaml       | 62 +++++++++++++++++++
>  6 files changed, 147 insertions(+), 72 deletions(-)
>  delete mode 100644 Documentation/devicetree/bindings/mmc/mmc-pwrseq-emmc.txt
>  create mode 100644 Documentation/devicetree/bindings/mmc/mmc-pwrseq-emmc.yaml
>  delete mode 100644 Documentation/devicetree/bindings/mmc/mmc-pwrseq-sd8787.txt
>  create mode 100644 Documentation/devicetree/bindings/mmc/mmc-pwrseq-sd8787.yaml
>  delete mode 100644 Documentation/devicetree/bindings/mmc/mmc-pwrseq-simple.txt
>  create mode 100644 Documentation/devicetree/bindings/mmc/mmc-pwrseq-simple.yaml
>
> diff --git a/Documentation/devicetree/bindings/mmc/mmc-pwrseq-emmc.txt b/Documentation/devicetree/bindings/mmc/mmc-pwrseq-emmc.txt
> deleted file mode 100644
> index 3d965d57e00b..000000000000
> --- a/Documentation/devicetree/bindings/mmc/mmc-pwrseq-emmc.txt
> +++ /dev/null
> @@ -1,25 +0,0 @@
> -* The simple eMMC hardware reset provider
> -
> -The purpose of this driver is to perform standard eMMC hw reset
> -procedure, as described by Jedec 4.4 specification. This procedure is
> -performed just after MMC core enabled power to the given mmc host (to
> -fix possible issues if bootloader has left eMMC card in initialized or
> -unknown state), and before performing complete system reboot (also in
> -case of emergency reboot call). The latter is needed on boards, which
> -doesn't have hardware reset logic connected to emmc card and (limited or
> -broken) ROM bootloaders are unable to read second stage from the emmc
> -card if the card is left in unknown or already initialized state.
> -
> -Required properties:
> -- compatible : contains "mmc-pwrseq-emmc".
> -- reset-gpios : contains a GPIO specifier. The reset GPIO is asserted
> -       and then deasserted to perform eMMC card reset. To perform
> -       reset procedure as described in Jedec 4.4 specification, the
> -       gpio line should be defined as GPIO_ACTIVE_LOW.
> -
> -Example:
> -
> -       sdhci0_pwrseq {
> -               compatible = "mmc-pwrseq-emmc";
> -               reset-gpios = <&gpio1 12 GPIO_ACTIVE_LOW>;
> -       }
> diff --git a/Documentation/devicetree/bindings/mmc/mmc-pwrseq-emmc.yaml b/Documentation/devicetree/bindings/mmc/mmc-pwrseq-emmc.yaml
> new file mode 100644
> index 000000000000..77f746f57284
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/mmc/mmc-pwrseq-emmc.yaml
> @@ -0,0 +1,46 @@
> +# SPDX-License-Identifier: GPL-2.0
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/mmc/mmc-pwrseq-emmc.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Simple eMMC hardware reset provider binding
> +
> +maintainers:
> +  - Ulf Hansson <ulf.hansson@linaro.org>
> +
> +description:
> +  The purpose of this driver is to perform standard eMMC hw reset
> +  procedure, as described by Jedec 4.4 specification. This procedure is
> +  performed just after MMC core enabled power to the given mmc host (to
> +  fix possible issues if bootloader has left eMMC card in initialized or
> +  unknown state), and before performing complete system reboot (also in
> +  case of emergency reboot call). The latter is needed on boards, which
> +  doesn't have hardware reset logic connected to emmc card and (limited or
> +  broken) ROM bootloaders are unable to read second stage from the emmc
> +  card if the card is left in unknown or already initialized state.
> +
> +properties:
> +  compatible:
> +    const: mmc-pwrseq-emmc
> +
> +  reset-gpios:
> +    minItems: 1
> +    description:
> +      contains a GPIO specifier. The reset GPIO is asserted
> +      and then deasserted to perform eMMC card reset. To perform
> +      reset procedure as described in Jedec 4.4 specification, the
> +      gpio line should be defined as GPIO_ACTIVE_LOW.
> +
> +required:
> +  - compatible
> +  - reset-gpios
> +
> +examples:
> +  - |
> +    #include <dt-bindings/gpio/gpio.h>
> +    sdhci0_pwrseq {
> +      compatible = "mmc-pwrseq-emmc";
> +      reset-gpios = <&gpio1 12 GPIO_ACTIVE_LOW>;
> +    };
> +...
> diff --git a/Documentation/devicetree/bindings/mmc/mmc-pwrseq-sd8787.txt b/Documentation/devicetree/bindings/mmc/mmc-pwrseq-sd8787.txt
> deleted file mode 100644
> index 22e9340e4ba2..000000000000
> --- a/Documentation/devicetree/bindings/mmc/mmc-pwrseq-sd8787.txt
> +++ /dev/null
> @@ -1,16 +0,0 @@
> -* Marvell SD8787 power sequence provider
> -
> -Required properties:
> -- compatible: must be "mmc-pwrseq-sd8787".
> -- powerdown-gpios: contains a power down GPIO specifier with the
> -                  default active state
> -- reset-gpios: contains a reset GPIO specifier with the default
> -                  active state
> -
> -Example:
> -
> -       wifi_pwrseq: wifi_pwrseq {
> -               compatible = "mmc-pwrseq-sd8787";
> -               powerdown-gpios = <&twl_gpio 0 GPIO_ACTIVE_LOW>;
> -               reset-gpios = <&twl_gpio 1 GPIO_ACTIVE_LOW>;
> -       }
> diff --git a/Documentation/devicetree/bindings/mmc/mmc-pwrseq-sd8787.yaml b/Documentation/devicetree/bindings/mmc/mmc-pwrseq-sd8787.yaml
> new file mode 100644
> index 000000000000..a68820d31d50
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/mmc/mmc-pwrseq-sd8787.yaml
> @@ -0,0 +1,39 @@
> +# SPDX-License-Identifier: GPL-2.0
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/mmc/mmc-pwrseq-sd8787.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Marvell SD8787 power sequence provider binding
> +
> +maintainers:
> +  - Ulf Hansson <ulf.hansson@linaro.org>
> +
> +properties:
> +  compatible:
> +    const: mmc-pwrseq-sd8787
> +
> +  powerdown-gpios:
> +    minItems: 1
> +    description:
> +      contains a power down GPIO specifier with the default active state
> +
> +  reset-gpios:
> +    minItems: 1
> +    description:
> +      contains a reset GPIO specifier with the default active state
> +
> +required:
> +  - compatible
> +  - powerdown-gpios
> +  - reset-gpios
> +
> +examples:
> +  - |
> +    #include <dt-bindings/gpio/gpio.h>
> +    wifi_pwrseq: wifi_pwrseq {
> +      compatible = "mmc-pwrseq-sd8787";
> +      powerdown-gpios = <&twl_gpio 0 GPIO_ACTIVE_LOW>;
> +      reset-gpios = <&twl_gpio 1 GPIO_ACTIVE_LOW>;
> +    };
> +...
> diff --git a/Documentation/devicetree/bindings/mmc/mmc-pwrseq-simple.txt b/Documentation/devicetree/bindings/mmc/mmc-pwrseq-simple.txt
> deleted file mode 100644
> index 9029b45b8a22..000000000000
> --- a/Documentation/devicetree/bindings/mmc/mmc-pwrseq-simple.txt
> +++ /dev/null
> @@ -1,31 +0,0 @@
> -* The simple MMC power sequence provider
> -
> -The purpose of the simple MMC power sequence provider is to supports a set of
> -common properties between various SOC designs. It thus enables us to use the
> -same provider for several SOC designs.
> -
> -Required properties:
> -- compatible : contains "mmc-pwrseq-simple".
> -
> -Optional properties:
> -- reset-gpios : contains a list of GPIO specifiers. The reset GPIOs are asserted
> -       at initialization and prior we start the power up procedure of the card.
> -       They will be de-asserted right after the power has been provided to the
> -       card.
> -- clocks : Must contain an entry for the entry in clock-names.
> -  See ../clocks/clock-bindings.txt for details.
> -- clock-names : Must include the following entry:
> -  "ext_clock" (External clock provided to the card).
> -- post-power-on-delay-ms : Delay in ms after powering the card and
> -       de-asserting the reset-gpios (if any)
> -- power-off-delay-us : Delay in us after asserting the reset-gpios (if any)
> -       during power off of the card.
> -
> -Example:
> -
> -       sdhci0_pwrseq {
> -               compatible = "mmc-pwrseq-simple";
> -               reset-gpios = <&gpio1 12 GPIO_ACTIVE_LOW>;
> -               clocks = <&clk_32768_ck>;
> -               clock-names = "ext_clock";
> -       }
> diff --git a/Documentation/devicetree/bindings/mmc/mmc-pwrseq-simple.yaml b/Documentation/devicetree/bindings/mmc/mmc-pwrseq-simple.yaml
> new file mode 100644
> index 000000000000..449215444723
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/mmc/mmc-pwrseq-simple.yaml
> @@ -0,0 +1,62 @@
> +# SPDX-License-Identifier: GPL-2.0
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/mmc/mmc-pwrseq-simple.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Simple MMC power sequence provider binding
> +
> +maintainers:
> +  - Ulf Hansson <ulf.hansson@linaro.org>
> +
> +description:
> +  The purpose of the simple MMC power sequence provider is to supports a set
> +  of common properties between various SOC designs. It thus enables us to use
> +  the same provider for several SOC designs.
> +
> +properties:
> +  compatible:
> +    const: mmc-pwrseq-simple
> +
> +  reset-gpios:
> +    minItems: 1
> +    description:
> +      contains a list of GPIO specifiers. The reset GPIOs are asserted
> +      at initialization and prior we start the power up procedure of the card.
> +      They will be de-asserted right after the power has been provided to the
> +      card.
> +
> +  clocks:
> +    minItems: 1
> +    description: Handle for the entry in clock-names.
> +
> +  clock-names:
> +    items:
> +      - const: ext_clock
> +    description: External clock provided to the card.
> +
> +  post-power-on-delay-ms:
> +    description:
> +      Delay in ms after powering the card and de-asserting the
> +      reset-gpios (if any).
> +    $ref: /schemas/types.yaml#/definitions/uint32
> +
> +  power-off-delay-us:
> +    description:
> +      Delay in us after asserting the reset-gpios (if any)
> +      during power off of the card.
> +    $ref: /schemas/types.yaml#/definitions/uint32
> +
> +required:
> +  - compatible
> +
> +examples:
> +  - |
> +    #include <dt-bindings/gpio/gpio.h>
> +    sdhci0_pwrseq {
> +      compatible = "mmc-pwrseq-simple";
> +      reset-gpios = <&gpio1 12 GPIO_ACTIVE_LOW>;
> +      clocks = <&clk_32768_ck>;
> +      clock-names = "ext_clock";
> +    };
> +...
> --
> 2.27.0
>

      reply	other threads:[~2020-07-06 14:49 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-22  8:44 [PATCH v2] dt-bindings: mmc: Convert pwrseq to json-schema Jisheng Zhang
2020-07-06 14:48 ` Ulf Hansson [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAPDyKFpWAu0uH_1-XL8O5Jj2WS6zPhLV2ZvoXBFQT_dpqnD0FQ@mail.gmail.com \
    --to=ulf.hansson@linaro.org \
    --cc=Jisheng.Zhang@synaptics.com \
    --cc=devicetree@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mmc@vger.kernel.org \
    --cc=robh+dt@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).