Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp2403631ybl; Sat, 11 Jan 2020 16:26:52 -0800 (PST) X-Google-Smtp-Source: APXvYqwfLfIk36xrMuPJ1QBQFgIlpf81gsQLvl6jLG2lOQJAnNgR0KBj9UOUXBT4CsSab1DFXfWx X-Received: by 2002:a05:6830:c2:: with SMTP id x2mr8518334oto.8.1578788811998; Sat, 11 Jan 2020 16:26:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1578788811; cv=none; d=google.com; s=arc-20160816; b=r95SZGXun7njw0TXZPWRmd10i5SyX3p1b8YxwRDGUXKcbyJ7ukbO+9yKyYEIRwC5JL kd7X3aaMye+kfgVHhMq0xjqzwJPgDb75S7NnjsVrt28b+zhVbjvakj3MV5VB1dAPPLPn hzuHaPpj05QO6q5uGjIUb5g1+KP6bYukN8PvMrPLqhbM6XpOGMl9LQawemX2ITOnaJGJ JvXEC3KEL/kqsIhMhhafbA7+z38v37cVDIjXIaOlGs35nB9ZN9IICiMuRsbZ9O/uN/Af jy2IrxLqZabjEk64hsqKf27Qg7jDsZ2UjTWJgEGz8hUPQZIPf33vmC2tRMyNac7u61+7 zP1A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=CRYfuTJuy4ICmcEVYmYYaJ9iq8iqh3Fd6F2pqTPly4U=; b=n+EY8M8X2CeFVtsEdarqq2voUNjQ8XpOfTEnh+fqv1mdi4mEK+QVAvjt9l8qc+CPap PtJ4Izs1vI1bGMI61VfE95xA/ojmwm13du5R85MVX4fzt9r0CaHsSWtesWugV928iq6p 1o6IKARolPs91AYCrVZH4EEWhOjy8EOIkVam2yqElVT5L/oYJ3tEMYErPBsdToo174D7 9fmWUXB93LYnDgOqbrlOxcBZow8Ghd7mCzDw09XZFBnShUWXTM9UyRIALaOGlprvOnDu i3/78Q2+h1YsJsrxjf64zXWt3mINqg92Zz+lN+d2N+OFXDR47oUs0vdMTazSXzioGTW3 i02Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@googlemail.com header.s=20161025 header.b=vZ3qFYvj; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=googlemail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k1si3721986oic.245.2020.01.11.16.26.40; Sat, 11 Jan 2020 16:26:51 -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=@googlemail.com header.s=20161025 header.b=vZ3qFYvj; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=googlemail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731804AbgALAZY (ORCPT + 99 others); Sat, 11 Jan 2020 19:25:24 -0500 Received: from mail-wr1-f65.google.com ([209.85.221.65]:40076 "EHLO mail-wr1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731729AbgALAZX (ORCPT ); Sat, 11 Jan 2020 19:25:23 -0500 Received: by mail-wr1-f65.google.com with SMTP id c14so5197063wrn.7; Sat, 11 Jan 2020 16:25:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=CRYfuTJuy4ICmcEVYmYYaJ9iq8iqh3Fd6F2pqTPly4U=; b=vZ3qFYvjxPQnSXjLDUC2VIqRG1l5EmaQe6BwYk/le+x0rNyTYMiiTy7tYkf/z0eAy+ BA0bcljF3UTSGyq7u1Wsb8or9I0ddWWKb4xR13jdqzd/xJvxy0wF8WmjL8YUYd5M/asy 91Ea+lHlxn6rmY79AL0ex0ZFDc69lgvIMVwpyG5ikv5f9iH6Vz9K8QsupKPxhGN4grlX H8CYutfnwVMKL9V07i4wAPask6eNF6PYMgqpzoeuIcVKg3kNYIB5/9CTfbYMlt0o7coI FXy+yngMsfjR0uucp+IzRYdFSXOsnKHReCzKx2AOQElGRG+8X29B20wEmnfLaxbNUhM3 Sb0g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=CRYfuTJuy4ICmcEVYmYYaJ9iq8iqh3Fd6F2pqTPly4U=; b=TGhQpDYumLRomnSbT+Iqp7KNl6/+QdQpwk3+50GcF7rCws8So1Mqb6ZLjpCLHT+1/S igajTX7AIGroViffGydnvR2ux6zT6zIkNJyRZo2h9lDV+iFpyd4T26OvsX2zsH5W/6Re TxzErXj7YeUpnjAAWNqVAI7J1KNqm5Xz8XKsckGPehtudFmjRx8SwQ3BfYq1ZH5gUox7 aho332wNM59w27zTvbgJrnOgb7CVlH3jWBIJiT3yLsOwj2Ntp7Xc1VYssaUqzrygXtbA P6squnx5f4lXzGug9aDEI2pGaF/T/GD7WEFsmWb0bp9AOTptEfcZls9a++ErQzWLiEEP r/bw== X-Gm-Message-State: APjAAAVtHAIqSVIAOgPjhy20fUAvZtUmtaykog4+WyuU/HE/bdu+44Of lwfXU4YU0EkBtwPDBsrg+dE= X-Received: by 2002:a05:6000:1248:: with SMTP id j8mr10351489wrx.44.1578788720393; Sat, 11 Jan 2020 16:25:20 -0800 (PST) Received: from localhost.localdomain (p200300F1373A1900428D5CFFFEB99DB8.dip0.t-ipconnect.de. [2003:f1:373a:1900:428d:5cff:feb9:9db8]) by smtp.googlemail.com with ESMTPSA id t5sm8407389wrr.35.2020.01.11.16.25.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 11 Jan 2020 16:25:19 -0800 (PST) From: Martin Blumenstingl To: linux-amlogic@lists.infradead.org, devicetree@vger.kernel.org, linux-mmc@vger.kernel.org, ulf.hansson@linaro.org, robh+dt@kernel.org Cc: jianxin.pan@amlogic.com, mark.rutland@arm.com, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, lnykww@gmail.com, yinxin_1989@aliyun.com, Martin Blumenstingl Subject: [PATCH v4 1/3] dt-bindings: mmc: Document the Amlogic Meson SDHC MMC host controller Date: Sun, 12 Jan 2020 01:24:57 +0100 Message-Id: <20200112002459.2124850-2-martin.blumenstingl@googlemail.com> X-Mailer: git-send-email 2.24.1 In-Reply-To: <20200112002459.2124850-1-martin.blumenstingl@googlemail.com> References: <20200112002459.2124850-1-martin.blumenstingl@googlemail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This documents the devicetree bindings for the SDHC MMC host controller found in Meson6, Meson8, Meson8b and Meson8m2 SoCs. It can use a bus-width of 1/4/8-bit and it supports eMMC spec 4.4x/4.5x including HS200 mode (up to 100MHz clock). It embeds an internal clock controller which outputs four clocks (mod_clk, sd_clk, tx_clk and rx_clk) and is fed by four external input clocks (clkin[0-3]). "pclk" is the module register clock, it has to be enabled to access the registers. Signed-off-by: Martin Blumenstingl --- .../bindings/mmc/amlogic,meson-mx-sdhc.yaml | 83 +++++++++++++++++++ .../dt-bindings/clock/meson-mx-sdhc-clkc.h | 8 ++ 2 files changed, 91 insertions(+) create mode 100644 Documentation/devicetree/bindings/mmc/amlogic,meson-mx-sdhc.yaml create mode 100644 include/dt-bindings/clock/meson-mx-sdhc-clkc.h diff --git a/Documentation/devicetree/bindings/mmc/amlogic,meson-mx-sdhc.yaml b/Documentation/devicetree/bindings/mmc/amlogic,meson-mx-sdhc.yaml new file mode 100644 index 000000000000..74632692ce26 --- /dev/null +++ b/Documentation/devicetree/bindings/mmc/amlogic,meson-mx-sdhc.yaml @@ -0,0 +1,83 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/mmc/amlogic,meson-mx-sdhc.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Amlogic Meson SDHC controller Device Tree Bindings + +allOf: + - $ref: "mmc-controller.yaml" + +maintainers: + - Martin Blumenstingl + +description: | + The SDHC MMC host controller on Amlogic SoCs provides an eMMC and MMC + card interface with 1/4/8-bit bus width. + It supports eMMC spec 4.4x/4.5x including HS200 (up to 100MHz clock). + +properties: + compatible: + items: + - enum: + - amlogic,meson8-sdhc + - amlogic,meson8b-sdhc + - amlogic,meson8m2-sdhc + - const: amlogic,meson-mx-sdhc + + reg: + minItems: 1 + + interrupts: + minItems: 1 + + "#clock-cells": + const: 1 + + clocks: + minItems: 9 + + clock-names: + items: + - const: pclk + - const: mod_clk + - const: sd_clk + - const: rx_clk + - const: tx_clk + - const: clkin0 + - const: clkin1 + - const: clkin2 + - const: clkin3 + +required: + - compatible + - reg + - interrupts + - "#clock-cells" + - clocks + - clock-names + +examples: + - | + #include ; + #include + #include + + sdhc: mmc@8e00 { + compatible = "amlogic,meson8-sdhc", "amlogic,meson-mx-sdhc"; + reg = <0x8e00 0x42>; + interrupts = ; + #clock-cells = <1>; + clocks = <&sdhc_pclk>, + <&sdhc SDHC_CLKID_MOD_CLK>, + <&sdhc SDHC_CLKID_SD_CLK>, + <&sdhc SDHC_CLKID_TX_CLK>, + <&sdhc SDHC_CLKID_RX_CLK>, + <&xtal>, + <&fclk_div4>, + <&fclk_div3>, + <&fclk_div5>; + clock-names = "pclk", "mod_clk", "sd_clk", "tx_clk", "rx_clk", + "clkin0", "clkin1", "clkin2", "clkin3"; + }; diff --git a/include/dt-bindings/clock/meson-mx-sdhc-clkc.h b/include/dt-bindings/clock/meson-mx-sdhc-clkc.h new file mode 100644 index 000000000000..ad9f6e4dc426 --- /dev/null +++ b/include/dt-bindings/clock/meson-mx-sdhc-clkc.h @@ -0,0 +1,8 @@ +/* SPDX-License-Identifier: GPL-2.0 */ + +#define SDHC_CLKID_SRC_SEL 0 +#define SDHC_CLKID_DIV 1 +#define SDHC_CLKID_MOD_CLK 2 +#define SDHC_CLKID_SD_CLK 3 +#define SDHC_CLKID_TX_CLK 4 +#define SDHC_CLKID_RX_CLK 5 -- 2.24.1