Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp8970729ybl; Fri, 17 Jan 2020 04:17:27 -0800 (PST) X-Google-Smtp-Source: APXvYqxxrehdvseNqkigfu30zpBHnBTFNMMkFnXqZT8MrG7Q+qxgjTf2n1Ub8NWhCd5MSNfPMR2b X-Received: by 2002:a9d:4e99:: with SMTP id v25mr5994581otk.363.1579263447351; Fri, 17 Jan 2020 04:17:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1579263447; cv=none; d=google.com; s=arc-20160816; b=jndqv9EqKcGDT/iplZYU5bFEJycxddEcDmwszKW4Jb43wOEKbXD1ehNXUpgqjGGOrN BTxhD72ANZWNBXlLfhxCWIJrzAoPoAkUw8Ag7PnVCPGLerjUBe6TM5v8fVma6aHChso7 hFhKTL6EWsabDx/04U8XNkxoTZHMc5OhxKtBOFWT5Hy/b7oNq5bUGSclK5lcMVw34BR/ PZY/MltzO8U1wQfP2xeBWMlKwuKHPsfwUsz2EGkBzkYmtgx5JY8yzbbse9lk/8DUm5bz lFza+aiRrj44M0ti00tXLdC7A0R/1SpIYhLia2v4odCWv9muP+ZROpz25amyinf7XUkU h+ww== 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 :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=rJt6V34cokuqLEjeX55WKMt7LO7zDbWZxDsKNvc6kmI=; b=OFM1Na19YMGp7/9rpPmYXpr+S4nryc5jA/e4lbbPbf0MUFpVHhF6La9Z1KCsrs+2+K m5/3IRkGx9dUbLdd/18IU0IxBrk21mfEMu6WPb2Qbxw0bCVqGnoL+oy8SKpj3OAGoPD/ 4BEMWXLYv9iKFozOZhhlTGVI6mbWWZXjMJngJpAMU8W1COL6sUmmlq2H0yEvpbzibkVA Dju2Rps8VwtcrkkksMS1CLHUYms/qqXWWPw3Ej1kHvP8eJZv1UO9llN9ZvefTKS7TE+0 P7wJ44iKbxQ1l/1wyltfzxcLJGhR9DkJtXFL5UXLRF5/tfjAx40U8Z3KjoBXk84XWpZV x2gg== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w15si14608567otm.263.2020.01.17.04.17.14; Fri, 17 Jan 2020 04:17:27 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727003AbgAQMQP (ORCPT + 99 others); Fri, 17 Jan 2020 07:16:15 -0500 Received: from mail-sz.amlogic.com ([211.162.65.117]:46620 "EHLO mail-sz.amlogic.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726892AbgAQMQO (ORCPT ); Fri, 17 Jan 2020 07:16:14 -0500 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 CC: Jerome Brunet , Neil Armstrong , Kevin Hilman , Martin Blumenstingl , Michael Turquette , Stephen Boyd , Qiufang Dai , Jianxin Pan , Victor Wan , Chandle Zou , , , , , 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-Type: text/plain; charset="windows-1252"; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit 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) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.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 >> > > . >