Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp267678ybv; Sat, 22 Feb 2020 03:26:52 -0800 (PST) X-Google-Smtp-Source: APXvYqxbZH62MsTbNeVTjdCeyOTOcRETJmsThX0+lB1MqxybZXgWW8GJLy5ddkrHuXLskohPeI4/ X-Received: by 2002:a05:6808:5d1:: with SMTP id d17mr5913164oij.129.1582370812523; Sat, 22 Feb 2020 03:26:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582370812; cv=none; d=google.com; s=arc-20160816; b=j1lp40P2Qrx1Zr54HnsZPncvAgQ5ddMMaBN2mdMXqN0K0oB4VapRg+6sZqYQo3nrhH cKip8VUiprJ14LLG3gzTzv/0AB4im1dn4BvnxeKMsBCuA8lLzEl1qHj/qGtInYUwscOR CdceuzHp8M3YNVE4tLx4gCweAb+fRRjQJIshaIHSL+LoR5wisogXnD2Ax/eai5SQc771 uvAreBnXuOXtCUosiRdpSWcUSd4v25WoBFEeU+UOPQUSswDtdczzvwzgbMah8fXXqVcU HeeIoXSI6Oh5yBj7WJyM64R06HjATIHxKgbIpPqV1NKFmyCvZmW5kKY/RX+7yj+8xWvk xfyA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature:dkim-filter; bh=eXDfPRFxogywQqOMeY/U+G4h/BSruC6jLHkszgzRqkE=; b=CiRyrYmsrsGs5Ez47JhZ0N4EoFrfEMbUl4WQ9/Gswxa0ED+jVztUSMYjQL7ywlRmP3 j8LH9zUUBQkc6x+sGHDuKm1ZSNcawvwEZxR3qu5dGGEBTXGQk4c8rVFq2Vscg85ejkjL ZRGZCejN7rDgqHV/IcifIqMrstptsqa+E87QQrC2nz8Cl7rX2fks+UZiOBCxycranNHK zHO0Frpbvhu77Kx1Rg1xkz+PyR0as5PteUj0zkrbSEvKeN30MllL/+iFVAbkadLT3pGT 12Nu0/HIbztT3Lu4BLsYEz8M1VQj3PS8QeJ4C0Mur8yCodDoRWEYQzP/LTSu8J2VBcL8 VUpg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=PNIDnbjh; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f16si2325777oib.269.2020.02.22.03.26.39; Sat, 22 Feb 2020 03:26:52 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=PNIDnbjh; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727090AbgBVL0c (ORCPT + 99 others); Sat, 22 Feb 2020 06:26:32 -0500 Received: from conuserg-11.nifty.com ([210.131.2.78]:23006 "EHLO conuserg-11.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726726AbgBVL0b (ORCPT ); Sat, 22 Feb 2020 06:26:31 -0500 X-Greylist: delayed 114357 seconds by postgrey-1.27 at vger.kernel.org; Sat, 22 Feb 2020 06:26:30 EST Received: from grover.flets-west.jp (softbank126093102113.bbtec.net [126.93.102.113]) (authenticated) by conuserg-11.nifty.com with ESMTP id 01MBPiNS007850; Sat, 22 Feb 2020 20:25:44 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-11.nifty.com 01MBPiNS007850 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1582370745; bh=eXDfPRFxogywQqOMeY/U+G4h/BSruC6jLHkszgzRqkE=; h=From:To:Cc:Subject:Date:From; b=PNIDnbjhGTxyWhYNsljipr3Yqg6frgIECAzLzYlcG0pdOioG+oCJmo97l9MlMxWXg Zhf81tCfdaY5LMXuENpGh8Y2rku/dMVLor/DpuCiKTdkKJtiGIFF+nnfWSgHgxS2BI UYuqEchS+8+XsD5d+1G41ZcvJTxDEq3X9hE/z1Aqq54sK7/cO6kTFLxB7r2rPotBl6 EjqNPjdzx6Ysb1OXz4c1E5weZFdeJscRXDiPq/UATQhU2duek/7yb0fjU9z30BqWNg x4RMAiMg/UcstwWA7hRnhC+H/0ShSAZhStD2zrbrz1b2em4265Nn9mYghvggwILbtr J9yvZe+oNr9vg== X-Nifty-SrcIP: [126.93.102.113] From: Masahiro Yamada To: Rob Herring , devicetree@vger.kernel.org Cc: linux-kernel@vger.kernel.org, masahiroy@kernel.org, Masahiro Yamada , Mark Rutland , Ulf Hansson , linux-arm-kernel@lists.infradead.org, linux-mmc@vger.kernel.org Subject: [PATCH] dt-bindings: mmc: Convert UniPhier SD controller to json-schema Date: Sat, 22 Feb 2020 20:25:41 +0900 Message-Id: <20200222112541.573-1-yamada.masahiro@socionext.com> X-Mailer: git-send-email 2.17.1 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Convert the UniPhier SD controller binding to DT schema format. Signed-off-by: Masahiro Yamada --- If there is a better way to describe reset-names, please let me know. .../bindings/mmc/socionext,uniphier-sd.yaml | 99 +++++++++++++++++++ .../devicetree/bindings/mmc/uniphier-sd.txt | 55 ----------- 2 files changed, 99 insertions(+), 55 deletions(-) create mode 100644 Documentation/devicetree/bindings/mmc/socionext,uniphier-sd.yaml delete mode 100644 Documentation/devicetree/bindings/mmc/uniphier-sd.txt diff --git a/Documentation/devicetree/bindings/mmc/socionext,uniphier-sd.yaml b/Documentation/devicetree/bindings/mmc/socionext,uniphier-sd.yaml new file mode 100644 index 000000000000..cdfac9b4411b --- /dev/null +++ b/Documentation/devicetree/bindings/mmc/socionext,uniphier-sd.yaml @@ -0,0 +1,99 @@ +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/mmc/socionext,uniphier-sd.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: UniPhier SD/SDIO/eMMC controller + +maintainers: + - Masahiro Yamada + +properties: + compatible: + description: version 2.91, 3.1, 3.1.1, respectively + enum: + - socionext,uniphier-sd-v2.91 + - socionext,uniphier-sd-v3.1 + - socionext,uniphier-sd-v3.1.1 + + reg: + maxItems: 1 + + interrupts: + maxItems: 1 + + clocks: + maxItems: 1 + + reset-names: + description: | + There are three reset signals at maximum + host: mandatory for all variants + bridge: exist only for version 2.91 + hw: optional. exist if eMMC hw reset line is available + oneOf: + - const: host + - items: + - const: host + - const: bridge + - items: + - const: host + - const: hw + - items: + - const: host + - const: bridge + - const: hw + + resets: + minItems: 1 + maxItems: 3 + +allOf: + - $ref: mmc-controller.yaml + + - if: + properties: + compatible: + contains: + const: socionext,uniphier-sd-v2.91 + then: + properties: + reset-names: + contains: + const: bridge + else: + properties: + reset-names: + not: + contains: + const: bridge + +required: + - compatible + - reg + - interrupts + - clocks + - reset-names + - resets + +examples: + - | + sd: mmc@5a400000 { + compatible = "socionext,uniphier-sd-v2.91"; + reg = <0x5a400000 0x200>; + interrupts = <0 76 4>; + pinctrl-names = "default", "uhs"; + pinctrl-0 = <&pinctrl_sd>; + pinctrl-1 = <&pinctrl_sd_uhs>; + clocks = <&mio_clk 0>; + reset-names = "host", "bridge"; + resets = <&mio_rst 0>, <&mio_rst 3>; + dma-names = "rx-tx"; + dmas = <&dmac 4>; + bus-width = <4>; + cap-sd-highspeed; + sd-uhs-sdr12; + sd-uhs-sdr25; + sd-uhs-sdr50; + }; diff --git a/Documentation/devicetree/bindings/mmc/uniphier-sd.txt b/Documentation/devicetree/bindings/mmc/uniphier-sd.txt deleted file mode 100644 index e1d658755722..000000000000 --- a/Documentation/devicetree/bindings/mmc/uniphier-sd.txt +++ /dev/null @@ -1,55 +0,0 @@ -UniPhier SD/eMMC controller - -Required properties: -- compatible: should be one of the following: - "socionext,uniphier-sd-v2.91" - IP version 2.91 - "socionext,uniphier-sd-v3.1" - IP version 3.1 - "socionext,uniphier-sd-v3.1.1" - IP version 3.1.1 -- reg: offset and length of the register set for the device. -- interrupts: a single interrupt specifier. -- clocks: a single clock specifier of the controller clock. -- reset-names: should contain the following: - "host" - mandatory for all versions - "bridge" - should exist only for "socionext,uniphier-sd-v2.91" - "hw" - should exist if eMMC hw reset line is available -- resets: a list of reset specifiers, corresponding to the reset-names - -Optional properties: -- pinctrl-names: if present, should contain the following: - "default" - should exist for all instances - "uhs" - should exist for SD instance with UHS support -- pinctrl-0: pin control state for the default mode -- pinctrl-1: pin control state for the UHS mode -- dma-names: should be "rx-tx" if present. - This property can exist only for "socionext,uniphier-sd-v2.91". -- dmas: a single DMA channel specifier - This property can exist only for "socionext,uniphier-sd-v2.91". -- bus-width: see mmc.txt -- cap-sd-highspeed: see mmc.txt -- cap-mmc-highspeed: see mmc.txt -- sd-uhs-sdr12: see mmc.txt -- sd-uhs-sdr25: see mmc.txt -- sd-uhs-sdr50: see mmc.txt -- cap-mmc-hw-reset: should exist if reset-names contains "hw". see mmc.txt -- non-removable: see mmc.txt - -Example: - - sd: sdhc@5a400000 { - compatible = "socionext,uniphier-sd-v2.91"; - reg = <0x5a400000 0x200>; - interrupts = <0 76 4>; - pinctrl-names = "default", "uhs"; - pinctrl-0 = <&pinctrl_sd>; - pinctrl-1 = <&pinctrl_sd_uhs>; - clocks = <&mio_clk 0>; - reset-names = "host", "bridge"; - resets = <&mio_rst 0>, <&mio_rst 3>; - dma-names = "rx-tx"; - dmas = <&dmac 4>; - bus-width = <4>; - cap-sd-highspeed; - sd-uhs-sdr12; - sd-uhs-sdr25; - sd-uhs-sdr50; - }; -- 2.17.1