Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp4268776ybi; Mon, 15 Jul 2019 06:29:15 -0700 (PDT) X-Google-Smtp-Source: APXvYqyh5J274BcKjgNSQDuvRRlhe1zBRRsRN6z1aG7djYxNT0GMI4ZlcRCcUMtKyWwRvyX2h+LV X-Received: by 2002:a17:902:1566:: with SMTP id b35mr29203261plh.147.1563197355712; Mon, 15 Jul 2019 06:29:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563197355; cv=none; d=google.com; s=arc-20160816; b=I5Zzf3LLR9hRiyOoOKbhyihflEsqT7eaUnZncnYuwEWEmEov2xlrtzsAb9Ilcq5bbP p1nAeS5NKWa8YQH7WjxUOMvEj99N6YR98eLY7YbSxsgBjN7rnvxl1uy7FHBOsnREEhMN ln9MIlX/6cHcMnqJSvBBsiq21G/V5e5m331ouICmouZEmA6b1g7C1HcFpugPsH2ulbu5 0x/qg5yP6DttSfC7wWyTJ0Su+Ycvpao5VYtR2CUd99zONuhbPTWKeYG88K64dk/33ybS kDC3Yzi+kYzRWK1vecTDCERI04HioGQYv574MN0wmYNp3fRsR80T2rlXd+F+iNbemtEd 40MA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=dGjfrG3uDVoWv4sl/Aeahf+dIoKxVFWkI0GRhD56Mkk=; b=n7e7R8snwCoh6z5SJZI/uueRZWTZil1GReJr+zdySwKTLTnMee39i6X30P8P3HtmFj ltF7I2uIKWqt01SLW/lYMzBq14Od7qPHhEvieJu7G8WSs7mo9Zo83JYu9upnyB+kt/B4 bLD1MCZ/EWuAku8PI5FihsEQ5TIKZkp8Md1gjPBZxsNmqZRGp5KF5ekOY76LigciAmtN HUUEc0eqJY9jOq+YcVIegh1h49+AMMjIqLJaAbIsOEC6BAhZM/LxXFjVbbzo/jqoxpqX zLt7JYceJwyrhFI6S5OGLU4NyHXSqQ9hHm8Q94qbN/XHGahy0arQXWXCm6xEk8/Xo8Cg nolQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=NLvzd1fs; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d21si15432609pjw.18.2019.07.15.06.28.58; Mon, 15 Jul 2019 06:29:15 -0700 (PDT) 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=@kernel.org header.s=default header.b=NLvzd1fs; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730276AbfGON1K (ORCPT + 99 others); Mon, 15 Jul 2019 09:27:10 -0400 Received: from mail.kernel.org ([198.145.29.99]:40894 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730180AbfGON1K (ORCPT ); Mon, 15 Jul 2019 09:27:10 -0400 Received: from mail-qt1-f169.google.com (mail-qt1-f169.google.com [209.85.160.169]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 363CF2083D; Mon, 15 Jul 2019 13:27:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1563197229; bh=GxnhC/Ih/eTne4sAYFx1uwwKG/I5gMIwXQArnlAPCUg=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=NLvzd1fskhQwU1pIotSqBV89rbfMbVYWIngSGmpeuEsPxyKyJnFQ8pXKBNWzMEjxg D3ZoCNenBJ/ixDifgar+e716Ela2R+/V7T8rYIsf7M9DlVgKO3dZHd/aFNgOg05S+q IBso2tRwQXwTgPA9bnI/MYh0VNhzV0kjKVeP+6Yk= Received: by mail-qt1-f169.google.com with SMTP id r6so11358151qtt.0; Mon, 15 Jul 2019 06:27:09 -0700 (PDT) X-Gm-Message-State: APjAAAUXac+UE18PFVdZzA1AfHWHXVbNlsEiueNbh4FSk/ZYHGgJgJU2 4dbdvLlHphvA8ZPmQlXUKuRW4U0GxNvboQLYNQ== X-Received: by 2002:ac8:368a:: with SMTP id a10mr18044197qtc.143.1563197228400; Mon, 15 Jul 2019 06:27:08 -0700 (PDT) MIME-Version: 1.0 References: <20190712033214.24713-1-andrew@aj.id.au> <20190712033214.24713-2-andrew@aj.id.au> <20190712131028.ba4d4jetg4btsx4u@flea> <5c831fd3-d0e2-474b-8a6e-8f51f92fbdf8@www.fastmail.com> In-Reply-To: <5c831fd3-d0e2-474b-8a6e-8f51f92fbdf8@www.fastmail.com> From: Rob Herring Date: Mon, 15 Jul 2019 07:26:57 -0600 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v2 1/2] dt-bindings: mmc: Document Aspeed SD controller To: Andrew Jeffery Cc: Maxime Ripard , linux-mmc , Ulf Hansson , Mark Rutland , Joel Stanley , Adrian Hunter , devicetree@vger.kernel.org, "moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE" , linux-aspeed@lists.ozlabs.org, "linux-kernel@vger.kernel.org" , Ryan Chen Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Jul 14, 2019 at 8:30 PM Andrew Jeffery wrote: > > > > On Fri, 12 Jul 2019, at 22:41, Maxime Ripard wrote: > > Hi, > > > > On Fri, Jul 12, 2019 at 01:02:13PM +0930, Andrew Jeffery wrote: > > > The ASPEED SD/SDIO/eMMC controller exposes two slots implementing the > > > SDIO Host Specification v2.00, with 1 or 4 bit data buses, or an 8 bit > > > data bus if only a single slot is enabled. > > > > > > Signed-off-by: Andrew Jeffery > > > --- > > > In v2: > > > > > > * Rename to aspeed,sdhci.yaml > > > * Rename sd-controller compatible > > > * Add `maxItems: 1` for reg properties > > > * Move sdhci subnode description to patternProperties > > > * Drop sdhci compatible requirement > > > * #address-cells and #size-cells are required > > > * Prevent additional properties > > > * Implement explicit ranges in example > > > * Remove slot property > > > > > > .../devicetree/bindings/mmc/aspeed,sdhci.yaml | 90 +++++++++++++++++++ > > > 1 file changed, 90 insertions(+) > > > create mode 100644 Documentation/devicetree/bindings/mmc/aspeed,sdhci.yaml > > > > > > diff --git a/Documentation/devicetree/bindings/mmc/aspeed,sdhci.yaml b/Documentation/devicetree/bindings/mmc/aspeed,sdhci.yaml > > > new file mode 100644 > > > index 000000000000..67a691c3348c > > > --- /dev/null > > > +++ b/Documentation/devicetree/bindings/mmc/aspeed,sdhci.yaml > > > @@ -0,0 +1,90 @@ > > > +# SPDX-License-Identifier: GPL-2.0-or-later > > > +%YAML 1.2 > > > +--- > > > +$id: http://devicetree.org/schemas/mmc/aspeed,sdhci.yaml# > > > +$schema: http://devicetree.org/meta-schemas/core.yaml# > > > + > > > +title: ASPEED SD/SDIO/eMMC Controller > > > + > > > +maintainers: > > > + - Andrew Jeffery > > > + - Ryan Chen > > > + > > > +description: |+ > > > + The ASPEED SD/SDIO/eMMC controller exposes two slots implementing the SDIO > > > + Host Specification v2.00, with 1 or 4 bit data buses, or an 8 bit data bus if > > > + only a single slot is enabled. > > > + > > > + The two slots are supported by a common configuration area. As the SDHCIs for > > > + the slots are dependent on the common configuration area, they are described > > > + as child nodes. > > > + > > > +properties: > > > + compatible: > > > + enum: [ aspeed,ast2400-sd-controller, aspeed,ast2500-sd-controller ] > > > + reg: > > > + maxItems: 1 > > > + description: Common configuration registers > > > + ranges: true > > > + clocks: > > > + maxItems: 1 > > > + description: The SD/SDIO controller clock gate > > > > #address-cells and #size-cells have not been described here. > > > > > +patternProperties: > > > + "^sdhci@[0-9a-f]+$": > > > + type: object > > > + properties: > > > + compatible: > > > + enum: [ aspeed,ast2400-sdhci, aspeed,ast2500-sdhci ] > > > + reg: > > > + maxItems: 1 > > > + description: The SDHCI registers > > > + clocks: > > > + maxItems: 1 > > > + description: The SD bus clock > > > + interrupts: > > > + maxItems: 1 > > > + description: The SD interrupt shared between both slots > > > + required: > > > + - compatible > > > + - reg > > > + - clocks > > > + - interrupts > > > + > > > +additionalProperties: false > > > > But that means that it will generate a warning in your DT if you ever > > use them. > > > > > +required: > > > + - compatible > > > + - reg > > > + - "#address-cells" > > > + - "#size-cells" > > > + - ranges > > > + - clocks > > > + > > > +examples: > > > + - | > > > + #include > > > + sdc@1e740000 { > > > + compatible = "aspeed,ast2500-sd-controller"; > > > + reg = <0x1e740000 0x100>; > > > + #address-cells = <1>; > > > + #size-cells = <1>; > > > > Starting with your example. > > Heh, right. Thanks. I was inspecting the output of the `dt_binding_check` and > `dtbs_check` make targets, though maybe I overlooked this. The aspeed dtsis > do generate a quite a number of warnings which make it hard to parse, so I'm > going to send a series to clean that up too. FYI, This will run checks with only the schema file you specify: make dtbs_check DT_SCHEMA_FILES=path/to/schema/file Rob