From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.3 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B2929C33CB1 for ; Fri, 17 Jan 2020 12:16:37 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 84FA52073A for ; Fri, 17 Jan 2020 12:16:37 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="QlIYAxfR" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 84FA52073A Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=amlogic.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-amlogic-bounces+linux-amlogic=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender:Content-Type: Content-Transfer-Encoding:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:Date:Message-ID:From: References:To:Subject:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=3HX/CRQ0XYutIHBbfOg1CyR5384tqsGKejzTrtSkM5k=; b=QlIYAxfRAj04rUpqwfkvNVtXU 5+oTR+H8TAggRUQmvrW3gqD7NLr6NF7odiUapsZZ5Zrrp3VQlUjzIsAqGWnWuWOVd2nD0cyosOCQC GlBnTvZfFdxVoPUyPsjPmTU0kSz8wKQC0dxnEscEaHFmG4KUgAbdIpbyrXuh8U/aQZ+5WHHv2IZJi Joa1jpHQmZOkGT9zwNzYvmO0oeMnTgi8FBfEteanP8ldgRUduoI+qOJwVVGj+ns+yuBZAmqlimfiO uT2z0A95kxe5TL6BZNB6s7pfe/q2SIeiQFi5RXFBjdlKaN6EaIYDhnX7G6H7JzIjYSfgKvJShN/wW /36T2HnOA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1isQY8-00045e-Di; Fri, 17 Jan 2020 12:16:28 +0000 Received: from mail-sz.amlogic.com ([211.162.65.117]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1isQXw-0003ww-0A; Fri, 17 Jan 2020 12:16:20 +0000 Received: from [10.28.39.79] (10.28.39.79) by mail-sz.amlogic.com (10.28.11.5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1591.10; Fri, 17 Jan 2020 20:16:40 +0800 Subject: Re: [PATCH v6 1/5] dt-bindings: clock: meson: add A1 PLL clock controller bindings To: Rob Herring References: <20200116080440.118679-1-jian.hu@amlogic.com> <20200116080440.118679-2-jian.hu@amlogic.com> <20200116204817.GA9529@bogus> From: Jian Hu Message-ID: Date: Fri, 17 Jan 2020 20:16:40 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.3.1 MIME-Version: 1.0 In-Reply-To: <20200116204817.GA9529@bogus> Content-Language: en-US X-Originating-IP: [10.28.39.79] X-ClientProxiedBy: mail-sz.amlogic.com (10.28.11.5) To mail-sz.amlogic.com (10.28.11.5) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200117_041616_044530_6310AC8B X-CRM114-Status: GOOD ( 15.72 ) X-BeenThere: linux-amlogic@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, Victor Wan , Jianxin Pan , Neil Armstrong , Martin Blumenstingl , Kevin Hilman , Michael Turquette , linux-kernel@vger.kernel.org, Stephen Boyd , Qiufang Dai , Chandle Zou , linux-amlogic@lists.infradead.org, linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Jerome Brunet Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Sender: "linux-amlogic" Errors-To: linux-amlogic-bounces+linux-amlogic=archiver.kernel.org@lists.infradead.org Hi Rob Thanks for your review On 2020/1/17 4:48, Rob Herring wrote: > On Thu, Jan 16, 2020 at 04:04:36PM +0800, Jian Hu wrote: >> Add the documentation to support Amlogic A1 PLL clock driver, >> and add A1 PLL clock controller bindings. >> >> Signed-off-by: Jian Hu >> --- >> .../bindings/clock/amlogic,a1-pll-clkc.yaml | 54 +++++++++++++++++++ >> include/dt-bindings/clock/a1-pll-clkc.h | 16 ++++++ >> 2 files changed, 70 insertions(+) >> create mode 100644 Documentation/devicetree/bindings/clock/amlogic,a1-pll-clkc.yaml >> create mode 100644 include/dt-bindings/clock/a1-pll-clkc.h >> >> diff --git a/Documentation/devicetree/bindings/clock/amlogic,a1-pll-clkc.yaml b/Documentation/devicetree/bindings/clock/amlogic,a1-pll-clkc.yaml >> new file mode 100644 >> index 000000000000..071240b65e70 >> --- /dev/null >> +++ b/Documentation/devicetree/bindings/clock/amlogic,a1-pll-clkc.yaml >> @@ -0,0 +1,54 @@ >> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) >> +%YAML 1.2 >> +--- >> +$id: "http://devicetree.org/schemas/amlogic,a1-pll-clkc.yaml#" >> +$schema: "http://devicetree.org/meta-schemas/core.yaml#" >> + >> +title: Amlogic Meson A/C serials PLL Clock Control Unit Device Tree Bindings >> + >> +maintainers: >> + - Neil Armstrong >> + - Jerome Brunet >> + - Jian Hu >> + >> +properties: >> + compatible: >> + const: amlogic,a1-pll-clkc >> + >> + "#clock-cells": >> + const: 1 >> + >> + reg: >> + maxItems: 1 >> + >> + clocks: >> + maxItems: 2 > > Not necessary, so drop. Implied by the length of 'items'. > Ok, I will remove it. >> + items: >> + - description: input xtal_fixpll >> + - description: input xtal_hifipll >> + >> + clock-names: >> + maxItems: 2 > > Same here. OK, remove it. > >> + items: >> + - const: xtal_fixpll >> + - const: xtal_hifipll >> + >> +required: >> + - compatible >> + - "#clock-cells" >> + - reg >> + - clocks >> + - clock-names >> + >> +additionalProperties: false >> + >> +examples: >> + - | >> + clkc_pll: pll-clock-controller@7c80 { >> + compatible = "amlogic,a1-pll-clkc"; >> + reg = <0 0x7c80 0 0x18c>; >> + #clock-cells = <1>; >> + clocks = <&clkc_periphs CLKID_XTAL_FIXPLL>, >> + <&clkc_periphs CLKID_XTAL_HIFIPLL>; > > The example will fail to build because these aren't defined. > > Run 'make dt_binding_check'. > I have verified it, it is caused by CLKID_XTAL_FIXPLL and CLKID_XTAL_HIFIPLL. They are defined in include/dt-bindings/clock/a1-clkc.h in another patch [4/5]. The same with patch [4/5], there will be compiling error, too. If change CLKID_XTAL_FIXPLL to '1', and change CLKID_XTAL_HIFIPLL to '4', it can be compiled successfully. Should I use macros or numbers? >> + clock-names = "xtal_fixpll", "xtal_hifipll"; >> + }; >> diff --git a/include/dt-bindings/clock/a1-pll-clkc.h b/include/dt-bindings/clock/a1-pll-clkc.h >> new file mode 100644 >> index 000000000000..58eae237e503 >> --- /dev/null >> +++ b/include/dt-bindings/clock/a1-pll-clkc.h >> @@ -0,0 +1,16 @@ >> +/* SPDX-License-Identifier: (GPL-2.0+ OR MIT) */ >> +/* >> + * Copyright (c) 2019 Amlogic, Inc. All rights reserved. >> + */ >> + >> +#ifndef __A1_PLL_CLKC_H >> +#define __A1_PLL_CLKC_H >> + >> +#define CLKID_FIXED_PLL 1 >> +#define CLKID_FCLK_DIV2 6 >> +#define CLKID_FCLK_DIV3 7 >> +#define CLKID_FCLK_DIV5 8 >> +#define CLKID_FCLK_DIV7 9 >> +#define CLKID_HIFI_PLL 10 >> + >> +#endif /* __A1_PLL_CLKC_H */ >> -- >> 2.24.0 >> > > . > _______________________________________________ linux-amlogic mailing list linux-amlogic@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-amlogic