Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp1366313pxb; Fri, 21 Jan 2022 16:39:19 -0800 (PST) X-Google-Smtp-Source: ABdhPJwaXTXyF887VLNEZlSRt6Ihx/+klUeSBfYVbo0utK4gh3MY0/GMzZoJz053PhhwaoKfeA75 X-Received: by 2002:a17:90b:1c02:: with SMTP id oc2mr3079738pjb.31.1642811959644; Fri, 21 Jan 2022 16:39:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1642811959; cv=none; d=google.com; s=arc-20160816; b=TvZLzBsQxzYMh5tVVIiwDAkF7voLrD9i5KIHWKOQdEcN8amTNY8YnDnt5BJZ7xK1gO wf0Otm8afFyT/b+39pxiU9nu/z05ySAx9ensjQMXDRxhi0+loABMtY/bRHk5lMDiUqaV Qp7hFVgAKy6gDl/7RpiFTeRQhiKEA4nely57zTA0c485W+ZT554M6H0esBOMAbzFSsN2 mJQJn7/uGkZuu2pFvhwQfccmVbKs1+jyosSQvKRJop0tgXE6v6QreEWR4QVA5Dfy7rAg kRkLd5q0yvCrMRQoj2bEIB5X7dStvGjPL3n2KYjcXzRnWiry3dtIY5oy5n2b2e3RJOfo 1cdA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=9fsrZkc9JFFZA8smhkMRo5kiSIzzmV3n05NsepLqa+I=; b=edzmIVzLFQ3MX5vYumz0tQ9wTc6rgd9IKlS5Xgp62VA7kC35A1p3u7oK74SKINE0Me K9sPS14v+5SYpzy1RlE3w28RJOUOpi1HpwVnL0HueA3OhFeckyKYRIGU8qymg6QQVff7 szUR7gPt5FQ71k55hp7lVDhVhNbIfBNq+XDLcgxFLBwdB1m3ExymTjeApGfKWyk9vCO5 pXWsWcqZJln8zvsviTnMG8mu1Bd+XSniHcFLY3I/Sg2V/BL/xK25HoQ3lsj3DQmgPrlb HrAzQ+3Qrx5APaZxBsTvKn3TJXlcF+6omeA4/Yu7PjtJoZGyrGaZWkGFxw107JOKnGT4 v4qw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id d12si6612682pfr.324.2022.01.21.16.39.08; Fri, 21 Jan 2022 16:39:19 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1379174AbiAUHpb (ORCPT + 99 others); Fri, 21 Jan 2022 02:45:31 -0500 Received: from mail-sz.amlogic.com ([211.162.65.117]:15143 "EHLO mail-sz.amlogic.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1379114AbiAUHpY (ORCPT ); Fri, 21 Jan 2022 02:45:24 -0500 Received: from droid11-sz.amlogic.com (10.28.8.21) by mail-sz.amlogic.com (10.28.11.5) with Microsoft SMTP Server id 15.1.2176.2; Fri, 21 Jan 2022 15:45:20 +0800 From: Liang Yang To: Neil Armstrong , Jerome Brunet , Kevin Hilman , Michael Turquette , Stephen Boyd , Rob Herring , CC: Liang Yang , Martin Blumenstingl , Jianxin Pan , Victor Wan , XianWei Zhao , Kelvin Zhang , BiChao Zheng , YongHui Yu , , , Subject: [PATCH v10 3/4] clk: meson: add DT documentation for emmc clock controller Date: Fri, 21 Jan 2022 15:45:07 +0800 Message-ID: <20220121074508.42168-4-liang.yang@amlogic.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220121074508.42168-1-liang.yang@amlogic.com> References: <20220121074508.42168-1-liang.yang@amlogic.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-Originating-IP: [10.28.8.21] Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Document the MMC sub clock controller driver, the potential consumer of this driver is MMC or NAND. Also add four clock bindings IDs which provided by this driver. Signed-off-by: Liang Yang --- .../bindings/clock/amlogic,mmc-clkc.yaml | 64 +++++++++++++++++++ include/dt-bindings/clock/amlogic,mmc-clkc.h | 14 ++++ 2 files changed, 78 insertions(+) create mode 100644 Documentation/devicetree/bindings/clock/amlogic,mmc-clkc.yaml create mode 100644 include/dt-bindings/clock/amlogic,mmc-clkc.h diff --git a/Documentation/devicetree/bindings/clock/amlogic,mmc-clkc.yaml b/Documentation/devicetree/bindings/clock/amlogic,mmc-clkc.yaml new file mode 100644 index 000000000000..0fe2e33c2082 --- /dev/null +++ b/Documentation/devicetree/bindings/clock/amlogic,mmc-clkc.yaml @@ -0,0 +1,64 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/clock/amlogic,mmc-clkc.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Amlogic MMC Sub Clock Controller Driver Device Tree Bindings + +maintainers: + - jianxin.pan@amlogic.com + - liang.yang@amlogic.com + +properties: + compatible: + enum: + - "amlogic,axg-mmc-clkc", "syscon" + - "amlogic,gx-mmc-clkc", "syscon" + + reg: + maxItems: 1 + + clocks: + maxItems: 2 + + clock-names: + items: + - const: "clkin0", "clkin1" + + "#clock-cells": + const: 1 + +required: + - compatible + - reg + - clocks + - clock-names + - "#clock-cells" + +additionalProperties: false + +examples: + - | + sd_mmc_c_clkc: clock-controller@7000 { + compatible = "amlogic,axg-mmc-clkc", "syscon"; + reg = <0x0 0x7000 0x0 0x4>; + #clock-cells = <1>; + + clock-names = "clkin0", "clkin1"; + clocks = <&clkc CLKID_SD_EMMC_C_CLK0>, + <&clkc CLKID_FCLK_DIV2>; + }; + + - | + sd_emmc_b_clkc: clock-controller@5000 { + compatible = "amlogic,axg-mmc-clkc", "syscon"; + reg = <0x0 0x5000 0x0 0x4>; + + #clock-cells = <1>; + clock-names = "clkin0", "clkin1"; + clocks = <&clkc CLKID_SD_EMMC_B_CLK0>, + <&clkc CLKID_FCLK_DIV2>; + }; + +... \ No newline at end of file diff --git a/include/dt-bindings/clock/amlogic,mmc-clkc.h b/include/dt-bindings/clock/amlogic,mmc-clkc.h new file mode 100644 index 000000000000..71301517b183 --- /dev/null +++ b/include/dt-bindings/clock/amlogic,mmc-clkc.h @@ -0,0 +1,14 @@ +/* SPDX-License-Identifier: (GPL-2.0+ OR MIT) */ +/* + * Copyright (c) 2019 Amlogic, Inc. All rights reserved. + */ + +#ifndef __MMC_CLKC_H +#define __MMC_CLKC_H + +#define CLKID_MMC_DIV 0 +#define CLKID_MMC_PHASE_CORE 1 +#define CLKID_MMC_PHASE_TX 2 +#define CLKID_MMC_PHASE_RX 3 + +#endif -- 2.34.1