Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp9357930ybi; Wed, 10 Jul 2019 08:56:01 -0700 (PDT) X-Google-Smtp-Source: APXvYqztiojrXj+YF6MtY+RFOxFwpx1DHt4/v4eYhabumqaz70WiBYLsBwx4MYvsNhHd+YV0IRMi X-Received: by 2002:a17:902:2926:: with SMTP id g35mr39498474plb.269.1562774161116; Wed, 10 Jul 2019 08:56:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1562774161; cv=none; d=google.com; s=arc-20160816; b=yZk16+w9f+Ondza9aWUyTUp95ZSx+VAQnlZkUmb0DB0NDnCZrD+uLOL6J1o/WwCHzN OPvhdNHKIOBWjthb/1F8/rSCbbOekQ+RfcVPXcS9ZqmGnnLH+Mvg+u4TICEpIKwmnxvO II80byNVipjhXQb9s6OnlV3usl9Wp05L/z+iVZmv9DlJ9Zng6nD9eol0sVjFAE95vWPv mNmL2fiRnwDgjePdNPxGYfvVQhJP+/fN7HqR2e7H1yCarCH4qJI5JrcemDDVBeLqf2vS /1wG9TENwQ4WACfdbnidRHNWmiOkqlchZKYVUVJA07v3GmjcntzMYaLJCU5qTNOD9UyB j/Uw== 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=HtP/vvfdxllSmCzgBOVL0ZMjUbzjJ8VMdX64lqssxjg=; b=mxNegG1kr8rfiCD2tXw0EvTIP7kHmtOTNXxo3jCW7KGDYVw8ZIcaWdAvONvbPg9dTk aZwdukcPK/YwOLDV5hIpCPYzKiVuUo2BfyOTI0q/xGqfpS59iWx4TigP0J95wK38dvSD 5bUaCMHw2bQGC74eXhVVU1AQHgBKUgAaxsFQTd3vbwiSlV8eyJNHps4jr8EMWxeOJltS yqgs83IOPXRJJIJkUJllVUXR2Lu/OvcjcEJjBucWEhVsxWKFLc78jz7xTC3uJK53nCg/ xKCPf/ZENqtKKlEkVqGO1B69gpPlD8rJkv1oNqyXsLDiUx6jQwQe1KrI1c/JLAkOyDkt 3fEA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=dNr4F5Ha; 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 b69si1319087pga.541.2019.07.10.08.55.44; Wed, 10 Jul 2019 08:56:01 -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=dNr4F5Ha; 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 S1727966AbfGJPuA (ORCPT + 99 others); Wed, 10 Jul 2019 11:50:00 -0400 Received: from mail.kernel.org ([198.145.29.99]:34000 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727290AbfGJPt7 (ORCPT ); Wed, 10 Jul 2019 11:49:59 -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 EAE5E21473; Wed, 10 Jul 2019 15:49:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1562773799; bh=f3705MLDMz7ZVRIZ/2mbpGAvk6+s8V0oHG6b0/yE9pg=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=dNr4F5HawxLIUhCtkX+gOEjtuf9BGR0CEIsliRqZH2O9ZtsdBVaq2kRHWU6Hi1+fo XRZwgaoUmOgituexlwOZw6yF+zL0fvnshjkK4ofv79S4KQTO3bO3TnB7b8CachtiCF KS0ZkAhzVzVQnnkBbUi8ZqjFD274etLB6JypO9QY= Received: by mail-qt1-f169.google.com with SMTP id n11so2948349qtl.5; Wed, 10 Jul 2019 08:49:58 -0700 (PDT) X-Gm-Message-State: APjAAAWrcwvR9UpUlCeNMPJCVSE8VsdGFQEhmZHf8U4qvuKWJOrtWGvG ciR3kcFKYWRp+/Mh+DpumQmy3ylLAIcuujOaow== X-Received: by 2002:ac8:36b9:: with SMTP id a54mr25025832qtc.300.1562773798149; Wed, 10 Jul 2019 08:49:58 -0700 (PDT) MIME-Version: 1.0 References: <20190710141611.21159-1-andrew@aj.id.au> <20190710141611.21159-2-andrew@aj.id.au> In-Reply-To: <20190710141611.21159-2-andrew@aj.id.au> From: Rob Herring Date: Wed, 10 Jul 2019 09:49:45 -0600 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 1/2] dt-bindings: mmc: Document Aspeed SD controller To: Andrew Jeffery Cc: 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" , ryanchen.aspeed@gmail.com 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 Wed, Jul 10, 2019 at 8:16 AM 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 > --- > .../bindings/mmc/sdhci-of-aspeed.yaml | 91 +++++++++++++++++++ aspeed,sdhci.yaml > 1 file changed, 91 insertions(+) > create mode 100644 Documentation/devicetree/bindings/mmc/sdhci-of-aspeed.yaml > > diff --git a/Documentation/devicetree/bindings/mmc/sdhci-of-aspeed.yaml b/Documentation/devicetree/bindings/mmc/sdhci-of-aspeed.yaml > new file mode 100644 > index 000000000000..e98a2ac4d46d > --- /dev/null > +++ b/Documentation/devicetree/bindings/mmc/sdhci-of-aspeed.yaml > @@ -0,0 +1,91 @@ > +# SPDX-License-Identifier: GPL-2.0-or-later The preferred license is (GPL-2.0 OR BSD-2-Clause) if that is okay with you. > +%YAML 1.2 > +--- > +$id: http://devicetree.org/schemas/mmc/sdhci-of-aspeed.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-sdc, aspeed,ast2500-sdc ] > + reg: > + description: Common configuration registers This should have a 'maxItems: 1'. Same for the child reg. > + ranges: true > + clocks: > + maxItems: 1 > + description: The SD/SDIO controller clock gate > + sdhci: This needs to be a pattern (under patternProperties) as these have unit-addresses. > + type: object > + properties: > + compatible: > + allOf: > + - enum: [ aspeed,ast2400-sdhci, aspeed,ast2500-sdhci ] > + - const: sdhci This condition can never be true. What you need is s/allOf/items/. However, 'sdhci' is not really a useful compatible because every implementation has quirks, so I'd drop it. > + reg: > + description: The SDHCI registers > + clocks: > + maxItems: 1 > + description: The SD bus clock > + slot: > + allOf: > + - $ref: /schemas/types.yaml#/definitions/uint32 > + - enum: [0, 1] Is this really needed? Offset 0x100 is slot 0 and offset 0x200 is slot 1. Does that ever change? > + interrupts: > + maxItems: 1 > + description: The SD interrupt shared between both slots > + required: > + - compatible > + - reg > + - clocks > + - slot > + - interrupts > + > +required: > + - compatible > + - reg > + - ranges > + - clocks #address-cells and #size-cells are required too. You should also add 'additionalProperties: false' here so other random properties can't be present. > + > +examples: > + - | > + #include > + sdc@1e740000 { > + compatible = "aspeed,ast2500-sdc"; > + reg = <0x1e740000 0x100>; > + #address-cells = <1>; > + #size-cells = <1>; > + ranges; It's preferred to limit the range here and then the child addresses are 0x100 and 0x200. > + clocks = <&syscon ASPEED_CLK_GATE_SDCLK>; > + > + sdhci0: sdhci@1e740100 { > + compatible = "aspeed,ast2500-sdhci", "sdhci"; > + reg = <0x1e740100 0x100>; > + slot = <0>; > + interrupts = <26>; > + sdhci,auto-cmd12; > + clocks = <&syscon ASPEED_CLK_SDIO>; > + }; > + > + sdhci1: sdhci@1e740200 { > + compatible = "aspeed,ast2500-sdhci", "sdhci"; > + reg = <0x1e740200 0x100>; > + slot = <1>; > + interrupts = <26>; > + sdhci,auto-cmd12; > + clocks = <&syscon ASPEED_CLK_SDIO>; > + }; > + }; > -- > 2.20.1 >