Received: by 2002:a25:d7c1:0:0:0:0:0 with SMTP id o184csp2069246ybg; Sun, 27 Oct 2019 10:24:12 -0700 (PDT) X-Google-Smtp-Source: APXvYqyHhIDMTgGNRIlhqHBtGzXoKqeWv9OY47fwvoQUyk7nGSqWYiqdj4uwQnbcmqShxkQv6G+d X-Received: by 2002:a05:6402:32e:: with SMTP id q14mr960519edw.53.1572197052213; Sun, 27 Oct 2019 10:24:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1572197052; cv=none; d=google.com; s=arc-20160816; b=DD9JFSGN/QQ9DKLeorgkWlM4RyA5DC+Kh4DtRArLMe3cyYRrn+egHh4tVZYkYWZriR +4Q2L0FvYDyHqF4vYiAUcE9ljS7Sh7lnn7FATgjihZGsjCW31IJOChu8pHHFUkuNENnT CLRfjyXCxRRsANWGky3YWvLs6SCG/yB9dQ0yE3Ej2o2KMghYcfClBGu7wwrJI66D33nG o0Ij51rHE6r3UjnMH4dclNVU3AZvFN5waIgvueCYQUL+a4rQOaN67dxKxF+AsfaZbj3k oOvUHAKcF01EzQ+qZzaC2e9/8M5bSNdSYuKbYUSdxcNEVZS2JCI3A9rvB2KSZnRzUQ1O Vxjg== 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=GWbTlN2rWt2ied7AfeNCro8kNhdCw9BqWl6E/dShDHM=; b=NL8/qIdCeTzygAmPcjLBMPJ74rUpc2oCZIx0VaIIO7OHcrMcWN59MY6Vvz5Kh51Dmd NK7LcwMhWcHZqcL1X4iHqdrSmNXvw02up8ayAIR24JAEH8aoG6hXMiXbs9fyEX89c9zJ wwDDOZmwAhbgTRdWDqQ9dXd3aoohbi3gxzUr4rtDXAaoqvYDlKJKIpbSMFNj97HteeHp OLOzTLj6o+dxWabdPSzpQH0Xfmq1GxCdaT6vnxUQjXQmDJjTD44RNtIdyRasIpUmDZw0 gF/LN+FhQu+fYQOeOTF2pSDxLXK6E1zwHkz/VgRTljQ1U1JcTX1fdGC4gFkC5S0xzun3 VVQg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@googlemail.com header.s=20161025 header.b="pCgUOiR/"; 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 hh9si4721550ejb.313.2019.10.27.10.23.48; Sun, 27 Oct 2019 10:24:12 -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=@googlemail.com header.s=20161025 header.b="pCgUOiR/"; 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 S1727486AbfJ0QXp (ORCPT + 99 others); Sun, 27 Oct 2019 12:23:45 -0400 Received: from mail-wr1-f66.google.com ([209.85.221.66]:43824 "EHLO mail-wr1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727024AbfJ0QXn (ORCPT ); Sun, 27 Oct 2019 12:23:43 -0400 Received: by mail-wr1-f66.google.com with SMTP id c2so7362610wrr.10; Sun, 27 Oct 2019 09:23:41 -0700 (PDT) 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=GWbTlN2rWt2ied7AfeNCro8kNhdCw9BqWl6E/dShDHM=; b=pCgUOiR/1l5Uat1i9ODdivZgGrUR8Pa1WmVT+96e3Io7y6zNE8LiPpSLbneTIFPDpS RhL1RIlEFtXXqBNKZlHkkUOgflEhYPq2hMiZp+ko8yo5lADiImaWyuWsECR3uT6UDOhi tmPjdhrI3bX+bNcTc+oRxSCqEb45PFWrXjBu7TpDXbBarGEudlmDdfx2eLIlOUOcTNaA 5NyA49hZ35RznaDd7fBTq2Y5Hmu2+oM8iIrc2NUO7VOzXrpq1bRx9b3aY60rW7mDSg+f ltmja1byUvCyRGdFdiBdixcM070kcvyClAfl/BkQyLcOWpm0voT5BOXIXtXLPvwzODmz Ed5A== 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=GWbTlN2rWt2ied7AfeNCro8kNhdCw9BqWl6E/dShDHM=; b=L9yxu5Obtnr3eNx+PMsDRxwaz3qqBO76HSX3fZRozrh9FYWoamGV+d8uB8r88vCBRy lUwWmwRucQ0go3BaFzZhi33DP3J8qFv6/R/AJlAFTPDyGMLh4iCwuB4D4Orhe9+JKkTJ t9nlitfPdtPQlqFTfuyRtd+ZHVauWinOW85685aCUuTWwrU5bCpZ7dEy7pFJRxi9XCYO qqcISSmr5gjDR9mE4IGVkd5nU3N/OZbuZMJ8kOfegaAWG2rP23i/r4oSo27LyGd81TIG VqzDDSidL5/n2KU+GZgKJZdf5NNtkKu2OOQKZM5NKYq47a/1XOTLYE1FnOYzzXS1ZyMQ pi8w== X-Gm-Message-State: APjAAAXpcDffoX7cJiUGQtoEyRO6ZiHKF3ppuLx87xefEswUXqIkFNWt HILNZ05dm/wjk0r5jRnRXoU= X-Received: by 2002:adf:e403:: with SMTP id g3mr11120841wrm.128.1572193421194; Sun, 27 Oct 2019 09:23:41 -0700 (PDT) Received: from localhost.localdomain (p200300F133D01300428D5CFFFEB99DB8.dip0.t-ipconnect.de. [2003:f1:33d0:1300:428d:5cff:feb9:9db8]) by smtp.googlemail.com with ESMTPSA id 1sm8243299wrr.16.2019.10.27.09.23.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 27 Oct 2019 09:23:40 -0700 (PDT) From: Martin Blumenstingl To: narmstrong@baylibre.com, jbrunet@baylibre.com, linux-amlogic@lists.infradead.org, khilman@baylibre.com Cc: robh+dt@kernel.org, mark.rutland@arm.com, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-clk@vger.kernel.org, Martin Blumenstingl , Rob Herring Subject: [PATCH v2 1/5] dt-bindings: clock: add the Amlogic Meson8 DDR clock controller binding Date: Sun, 27 Oct 2019 17:23:24 +0100 Message-Id: <20191027162328.1177402-2-martin.blumenstingl@googlemail.com> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20191027162328.1177402-1-martin.blumenstingl@googlemail.com> References: <20191027162328.1177402-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 Amlogic Meson8, Meson8b and Meson8m2 SoCs have a DDR clock controller in the MMCBUS registers. There is no public documentation on this, but the GPL u-boot sources from the Amlogic BSP show that: - it uses the same XTAL input as the main clock controller - it contains a PLL which seems to be implemented just like the other PLLs in this SoC - there is a power-of-two PLL post-divider Add the documentation and header file for this DDR clock controller. Reviewed-by: Rob Herring Signed-off-by: Martin Blumenstingl --- .../clock/amlogic,meson8-ddr-clkc.yaml | 50 +++++++++++++++++++ include/dt-bindings/clock/meson8-ddr-clkc.h | 4 ++ 2 files changed, 54 insertions(+) create mode 100644 Documentation/devicetree/bindings/clock/amlogic,meson8-ddr-clkc.yaml create mode 100644 include/dt-bindings/clock/meson8-ddr-clkc.h diff --git a/Documentation/devicetree/bindings/clock/amlogic,meson8-ddr-clkc.yaml b/Documentation/devicetree/bindings/clock/amlogic,meson8-ddr-clkc.yaml new file mode 100644 index 000000000000..4b8669f870ec --- /dev/null +++ b/Documentation/devicetree/bindings/clock/amlogic,meson8-ddr-clkc.yaml @@ -0,0 +1,50 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/clock/amlogic,meson8-ddr-clkc.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Amlogic DDR Clock Controller Device Tree Bindings + +maintainers: + - Martin Blumenstingl + +properties: + compatible: + enum: + - amlogic,meson8-ddr-clkc + - amlogic,meson8b-ddr-clkc + + reg: + maxItems: 1 + + clocks: + maxItems: 1 + + clock-names: + items: + - const: xtal + + "#clock-cells": + const: 1 + +required: + - compatible + - reg + - clocks + - clock-names + - "#clock-cells" + +additionalProperties: false + +examples: + - | + ddr_clkc: clock-controller@400 { + compatible = "amlogic,meson8-ddr-clkc"; + reg = <0x400 0x20>; + clocks = <&xtal>; + clock-names = "xtal"; + #clock-cells = <1>; + }; + +... diff --git a/include/dt-bindings/clock/meson8-ddr-clkc.h b/include/dt-bindings/clock/meson8-ddr-clkc.h new file mode 100644 index 000000000000..a8e0fa2987ab --- /dev/null +++ b/include/dt-bindings/clock/meson8-ddr-clkc.h @@ -0,0 +1,4 @@ +/* SPDX-License-Identifier: GPL-2.0 */ + +#define DDR_CLKID_DDR_PLL_DCO 0 +#define DDR_CLKID_DDR_PLL 1 -- 2.23.0