Received: by 2002:a25:b323:0:0:0:0:0 with SMTP id l35csp2877518ybj; Mon, 23 Sep 2019 10:54:28 -0700 (PDT) X-Google-Smtp-Source: APXvYqzduSGlK6uKkL+NlZXz4MKP1gC6EanZzZw/iCLB2XPNMMO8dCOrgdXm1RSkk5ItW+dwvPhM X-Received: by 2002:a17:906:860d:: with SMTP id o13mr959378ejx.284.1569261268141; Mon, 23 Sep 2019 10:54:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1569261268; cv=none; d=google.com; s=arc-20160816; b=Puwtf/10KkcFk2I8QwNy69Q2GDkTKmwoIFU3qv0cASD40GyT2UsomZP9GRHaIQbziK AQqgq6E56TbOgjQaIsFjpJ7Aq9AbMkVwxWWV+o9UJ6PwgPDtuuYKrs0umB4WRylF/5bu g/n3g6oF/NtRQadqOHRtj10xNrsTiQKGOi7b/rbJ3YaOJFStn5qpGp8KhKYycs+2hgez N0gvMPl3JeDlOvG2DY9jwEnQ796nOxEy53tW9ilmzLyaC0vIPOhyvqjGEgVsWh7qADx8 9nMN3zqldt3ZCTaEQ1TZNJkak+4FSjlBHaR3mun5+3WO1IAMBFonSv4SvpSXDAqHUO7H 3O+g== 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=0VvVyYbylhhn27lwnpj3kEDmecswF/DtGt6I7xL1THE=; b=NZiat66FSJQWIm2nWQJB/ojn8k6ahT4JMkfZn0wIjnLjZPM5ndPYT/YzXUM1W1hIdr zvo/JNE/D0nI+2KaogEXANzDeCAivAIF8wWJ2UvEsVLohaY3IXkBQAIyAf9f7XEtpzUH 3UggqhDTt5VoqfN8ynVG8ILadd7uLOOgngzzTj5bj5lqXK27PRizvmSuwbLh6UF9m606 YycV1R7gbVwG5W4vflvsAvgceMgppJ+p+CR/J5OJqVcH3+gwsj6C0e28Qgoidcr+E8Ap k1HL1lixri0LU0MP603w0ZjyngvHLcXx9qylOnoI0IwOxcPaRI6vdT9mwxXe34CA9tdx j1eA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@googlemail.com header.s=20161025 header.b=AwdZfkWa; 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 p13si5510053ejr.281.2019.09.23.10.54.04; Mon, 23 Sep 2019 10:54:28 -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=AwdZfkWa; 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 S2438084AbfIUPSw (ORCPT + 99 others); Sat, 21 Sep 2019 11:18:52 -0400 Received: from mail-wr1-f65.google.com ([209.85.221.65]:40395 "EHLO mail-wr1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2392043AbfIUPSu (ORCPT ); Sat, 21 Sep 2019 11:18:50 -0400 Received: by mail-wr1-f65.google.com with SMTP id l3so9591654wru.7; Sat, 21 Sep 2019 08:18:49 -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=0VvVyYbylhhn27lwnpj3kEDmecswF/DtGt6I7xL1THE=; b=AwdZfkWa2Zgunj0RMms1Csk0t/Bg4v/uFPqVU7GERZOhx5a+rh7P2KefE2ys3mgPqu 8sp95P0w1G334sr3PxEdxmIvH2QCvBrTN8aHPLl2ln2VNjMp6QF5U41qAzgt07Vt3jNK etQuibrNO5D+4kjr6tb1quq6zE7UmuiM+whDQ0Pt/ca8TCmboJA/I8j3/SW2Rd1eHr5v Bt+60xkXfqkCmntTrq5oeWVgY5ZLULnV9aLK4uBFGEQAh9bMJLtL+wlSnXiPM1WCpoU/ JDdwt0avJHJ+mwWhE5P5hFn29PnNssxuJtf25y/JaSPcy2boWyrnXBP8saOOd30Vdqz+ NHWA== 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=0VvVyYbylhhn27lwnpj3kEDmecswF/DtGt6I7xL1THE=; b=Q4Ei4hDgrQluqeCKdGK/ey8uA0hLUurNL6Zy4kAkpFUWoIOaKDvh7vsTiLKkLe+uYX FSnaiMh045EQBs3fAiIAukUfKNDHJtKSZRhIoTMeK1jsJjvaop3fT3s/JqV+3XzT3emP jbyncNQl3dTOvZsnBZro1zZLJuriC0DxUINGCwl0ZlT0Tj9UhvXIT012+br8C7IW+/Zc KivgCN7ZPbrF3QvG1cgoMXZpDZ/4CX/EbPLp4L49zo4baPoleg9IL8QItKzZXa2kWEGb jSeZqVVXvcbNrU5PvXsBEq+ZfpX9oLn+fV8LMGn1ClNgI90CxKJ9/w4IWfv5xm16EIx3 /evg== X-Gm-Message-State: APjAAAX8UPF4Dx0AkWNTv5Sn+5i06RX2A3D2hciWyU1DRdr8OvrdckGc 3NEPiBW5zoaXrNderoxkkbo= X-Received: by 2002:a5d:6885:: with SMTP id h5mr16181417wru.92.1569079128474; Sat, 21 Sep 2019 08:18:48 -0700 (PDT) Received: from blackbox.darklights.net (p200300F133CE0B0028BAA8C744A6F562.dip0.t-ipconnect.de. [2003:f1:33ce:b00:28ba:a8c7:44a6:f562]) by smtp.googlemail.com with ESMTPSA id c6sm6003120wrb.60.2019.09.21.08.18.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 21 Sep 2019 08:18:47 -0700 (PDT) From: Martin Blumenstingl To: narmstrong@baylibre.com, jbrunet@baylibre.com, robh+dt@kernel.org, mark.rutland@arm.com, linux-amlogic@lists.infradead.org, devicetree@vger.kernel.org, khilman@baylibre.com Cc: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-clk@vger.kernel.org, Martin Blumenstingl Subject: [PATCH 1/6] dt-bindings: clock: add the Amlogic Meson8 DDR clock controller binding Date: Sat, 21 Sep 2019 17:18:30 +0200 Message-Id: <20190921151835.770263-2-martin.blumenstingl@googlemail.com> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20190921151835.770263-1-martin.blumenstingl@googlemail.com> References: <20190921151835.770263-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. 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..bf3ca5888485 --- /dev/null +++ b/Documentation/devicetree/bindings/clock/amlogic,meson8-ddr-clkc.yaml @@ -0,0 +1,50 @@ +# SPDX-License-Identifier: GPL-2.0 +%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