Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp1727339ybc; Sun, 17 Nov 2019 06:09:20 -0800 (PST) X-Google-Smtp-Source: APXvYqyQAB5aSxRtjgHc5E0fgHhK/MjZ+nKMayMNJynrJTw2htib2uukcPKFiH1KCXNzxyPwOkVD X-Received: by 2002:a17:906:7051:: with SMTP id r17mr735370ejj.30.1573999760350; Sun, 17 Nov 2019 06:09:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573999760; cv=none; d=google.com; s=arc-20160816; b=wWE3l3pb9ENGRc7aY0JmyU4aPCa1M77gyT01xCVKo9j9sFIzPcDGq7ypeW4sBchXi8 U/ClA5GhH9hGbknLy07D6titryT61hDcM64m+s9ezmouE2XtVsbxQILbLP7XGaeSmwW9 qLCM8KD4Z2N1M3ZsSid8d2lhE/9kOgWlKNLPUXE3V1T0V/rKp9QkmubiNAAKIN1ofIeR jDw21CFvLAn1tQGnEwzN8oDatSwHQe6cKZz2GZPZoset3z4SbywIioc7AyUs3bqGVgK6 IvfNNYdZaUqF/YGZaPe5qvnUYtOyWRG+E9TxF7TP2QPEbvPx4I7wJdMQTc4dFUZ76dgm ipKQ== 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=tiyYxTb8Rk/mH72C96BXIjZ0994JQE265VRKbdZ6Y4s=; b=lSE9YHxj6J3uAdwZ2Bv+S8J0SWMe9STgnPPEgqo9ucxWP/q6cWv9YR+1PBiAO1YEjt 3zg4/gNS5+/csKg0W2BxFM/cfRxtTbxc5FcveJLsLL2MjlQ8Z3JEqDSB37Y7g3IVqbSC 2ZYNLsa2/DPF03ZZe3kVq7NSKpHvjUFYoOUCerPYPNuI9h2ahVAR3NkKOZkHSTgwfP3w uLnZIVMcYgMBRr2DKiwGyYLx22xFIeCHOaguJeEpuGuNv0ngL5uZ3FrLvox9gTkiQomD 5VNLEIhtKfeTVj3+rAM7yfVNIMPoyWUsmO8qxyByHm0nPBoSHpnmbQb4VQo8YEV2XSg9 up5w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@googlemail.com header.s=20161025 header.b=EVVkWJcF; 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 l13si9590135eja.13.2019.11.17.06.08.55; Sun, 17 Nov 2019 06:09:20 -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=EVVkWJcF; 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 S1726266AbfKQOHp (ORCPT + 99 others); Sun, 17 Nov 2019 09:07:45 -0500 Received: from mail-wr1-f68.google.com ([209.85.221.68]:35423 "EHLO mail-wr1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726237AbfKQOHp (ORCPT ); Sun, 17 Nov 2019 09:07:45 -0500 Received: by mail-wr1-f68.google.com with SMTP id s5so16399724wrw.2; Sun, 17 Nov 2019 06:07:42 -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=tiyYxTb8Rk/mH72C96BXIjZ0994JQE265VRKbdZ6Y4s=; b=EVVkWJcFjAUrdne3BkCeB4MZ1JQmeLwk168bJwNqsL7WjU+GOUeD6/qGmmqltNv+pb +gB2wG9KbzlzWwFQb6WRV5ac1d950G8wG6UGLncopSi6JOof9v6RfpFc0wxZH4iTi3pG 1Y32KlJ11z3OQLFduc78NnjwMiekx/m50BD56AMK3tNx+wbX2jtzBk8TTBjjTWJF9W4P 3WqUeWOeQIT+YSDKFtwsofghZyWxQoILvQZFMJBXG2WEx73NVvCClFJCZsn0pGz0IYCy k1SY9jXB/xKS75alrQvK7A1SB52LgIwKMwMbF3Us0axjaE9ZLGjR83DS8AmZhZGK6Kea Y6hw== 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=tiyYxTb8Rk/mH72C96BXIjZ0994JQE265VRKbdZ6Y4s=; b=QRf4HuJOyLcw0xEvHPcUPs8MfHED9dZb94lYFij5gSPOorHFSRgA66/P4h13zWZkSZ CqWArmBPoBOW/WTUz+hdnJfIydwUh9HiO3o3TUw1SdnBI9DFo3oQo7oTsMrAXUir9R5g dY/MBiS+c/C0l/l1jL9L+hsVL0Y8pW0d0K5X4+lpO8eizXgJv/wPG5tCFlG97ymkqOtQ Ea9P7rn9uVLvzCUB1BdybJI01LcQRiGfVnGuser9AGHY8TqDOWcAuKfQK9SwG1mD95xm nAu3JZqj/OXnN5Nf9mbbpNX8Mv1EZpGsjhT2aKWvXqPoNrjQsEe0r+Api2SAVG7Ezwac ywqg== X-Gm-Message-State: APjAAAXNO5VaFs4KN5Z2C9wViIDAJKGEPGJQXbRr4iqwPTgFB4qmgJHk w18YvEDdWap3CMHEvIt9zjc= X-Received: by 2002:a5d:54c4:: with SMTP id x4mr25727213wrv.247.1573999661231; Sun, 17 Nov 2019 06:07:41 -0800 (PST) Received: from localhost.localdomain (p200300F1371CB100428D5CFFFEB99DB8.dip0.t-ipconnect.de. [2003:f1:371c:b100:428d:5cff:feb9:9db8]) by smtp.googlemail.com with ESMTPSA id n23sm16632977wmc.18.2019.11.17.06.07.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 17 Nov 2019 06:07:40 -0800 (PST) From: Martin Blumenstingl To: narmstrong@baylibre.com, jbrunet@baylibre.com, linux-amlogic@lists.infradead.org Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org, sboyd@kernel.org, Martin Blumenstingl , Rob Herring Subject: [PATCH v3 1/2] dt-bindings: clock: add the Amlogic Meson8 DDR clock controller binding Date: Sun, 17 Nov 2019 15:07:30 +0100 Message-Id: <20191117140731.137378-2-martin.blumenstingl@googlemail.com> X-Mailer: git-send-email 2.24.0 In-Reply-To: <20191117140731.137378-1-martin.blumenstingl@googlemail.com> References: <20191117140731.137378-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 Acked-by: Stephen Boyd 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.24.0