Received: by 2002:a25:c205:0:0:0:0:0 with SMTP id s5csp557594ybf; Wed, 26 Feb 2020 18:29:01 -0800 (PST) X-Google-Smtp-Source: APXvYqzr3nCyYacRfYzvjGxfH+E+kR+FWjhzE3dIaZCO8zjvkrKNlDkYqnPFvErnt9oHHh7W+7GY X-Received: by 2002:a9d:7ccc:: with SMTP id r12mr1620388otn.22.1582770541640; Wed, 26 Feb 2020 18:29:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582770541; cv=none; d=google.com; s=arc-20160816; b=oanS7hedIIaCfF/yV6Amk0EYvtCAPea0eSAg+U+NJQm6lL4L2v0DMYXGBQ9oNYRaV+ 6cq9ALpUkaszEx3hQg9yYRYrHJFqd3TRnynRcJVFFzZDoJApG7JnQDngOwCDn4vfpz9V BCaLrvSRSMre9lKhmSQEhOWWKWj9OYvHns4rbmF6NYVDJiCSvMFHYqRtc/6em7mdLc94 ZcI6MjxVQevHnvpsEnFUViJIgWHEV/Fz/m0Q608vVthtyi+VSinNHIL03WR5N7A52a7q 9RD05yOrgANzK0Jg2wqgBFKDdmB/0w3B662ZeoPVcErgYstJ9/n61dtCyI2FbseADIrq 7L5w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=P8Lr83wNxTFREKN1d8E1dyvqjENy/kw2pJKojCtakbE=; b=cHFLe3K1P/PT4S2+sNZ3pZsdslOelld/DQjMjgOU9rn1bRuwD+8DEjPOzSUwnKVm0G ONlafZGRWBzX01pml7QR2P5N5fpmwsgfCx6u3ZNMkTMJg9T69BaCuhvL8u2UQd633j7n 0LwDSuaY33zf2uGPVCyX9TUO5ZO2f8UzczhRp9FHJxtu9fcgcPQ+GjCtCrBi0VZmmC4X D8lThYrOxxRRqxedg0L6BUXtW6ZcA3it1p47pxRPTb9w8miVKUGw+eVI+mDmmsA+TD/O PUdSkz70vpZlUWn3G2euUGC7IO5CCAZS+zOehZDIKvc0wlWF3ZfNm4ufdliRptM1WOfU qlzQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=i9ZotFPx; 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=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 18si337349oin.182.2020.02.26.18.28.48; Wed, 26 Feb 2020 18:29:01 -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=@gmail.com header.s=20161025 header.b=i9ZotFPx; 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=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728284AbgB0C21 (ORCPT + 99 others); Wed, 26 Feb 2020 21:28:27 -0500 Received: from mail-wr1-f66.google.com ([209.85.221.66]:40181 "EHLO mail-wr1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728185AbgB0C21 (ORCPT ); Wed, 26 Feb 2020 21:28:27 -0500 Received: by mail-wr1-f66.google.com with SMTP id r17so1393257wrj.7; Wed, 26 Feb 2020 18:28:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=P8Lr83wNxTFREKN1d8E1dyvqjENy/kw2pJKojCtakbE=; b=i9ZotFPxkm7GQc49OJKH81Y7IDYieuPltjdBMQ8RtayWDXsEW2l5Vse9B0juD/Zf6R n5wiYTkrGB4LyCfiL5an9ze9p88cATCobO06hR38mDhDj0rap5m8HBJDTG8J2T/r7yPH kCeUR5kiQ9igj++voYjo28hkQs5lsxJ1GIS9ubGA598q0rlwc0Yz0ZCMr8Wlltn5eoQ1 q6VoyaPqLpe9l31CaT2lvxG97NOilDCYaKSuHGAsHYBH9VEXf05+thAC/Ss7ov28edUQ 2i5KiF03aEMRn5ccvmAefJzaih16Ai8u4Y9Ree90YFn9SLQK/V6ABMJgx3mj6kzUb6Vt zpGA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=P8Lr83wNxTFREKN1d8E1dyvqjENy/kw2pJKojCtakbE=; b=NhU9AKWOKE9G9jkyjbzsTsOPNiYQacgYBb3PJb3ku7F/8vjC5FvtPJwkIWas4evZyN waKaRESUOcmer0pPY+x6SXkL6q4VNwjmdFkYvuG1SMVyLg/JC58jp5i9Et3Tro4A5kD7 4LjLYZVskVx6oaiSs46R00yRw0MS0FY68w2KOx4JAeO7QG1jxrWgqLQaz4gYmeNnuNmj gOYRRGT0SXDYmE4wYoHbkb8sI67hsIlomzUlXMeF3ucQ7DFCU8iaz8iYglVGzCxDeFWg 5hc4VUedHozXGS3nREHx7mXAMm3PxeMdYO34GfOv4V6Gd377DgA4IGkYc/g19Otd857T 3xsQ== X-Gm-Message-State: APjAAAVtr3iLgYd1gKNfxC23PONDn4EG3D30gk+IWviaZExXcS6MtoAh K20R46GT5VbWg1EwvDcV0NuyKtEDiBLt5mvetEnWQQ== X-Received: by 2002:adf:f648:: with SMTP id x8mr1950156wrp.198.1582770504539; Wed, 26 Feb 2020 18:28:24 -0800 (PST) MIME-Version: 1.0 References: <20200219040915.2153-1-zhang.lyra@gmail.com> <20200219040915.2153-4-zhang.lyra@gmail.com> <20200226152642.GA26474@bogus> In-Reply-To: <20200226152642.GA26474@bogus> From: Chunyan Zhang Date: Thu, 27 Feb 2020 10:27:47 +0800 Message-ID: Subject: Re: [PATCH v5 3/7] dt-bindings: clk: sprd: add bindings for sc9863a clock controller To: Rob Herring Cc: Stephen Boyd , Michael Turquette , Mark Rutland , linux-clk , DTML , Linux Kernel Mailing List , Orson Zhai , Baolin Wang , Chunyan Zhang Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 26 Feb 2020 at 23:26, Rob Herring wrote: > > On Wed, Feb 19, 2020 at 12:09:11PM +0800, Chunyan Zhang wrote: > > From: Chunyan Zhang > > > > add a new bindings to describe sc9863a clock compatible string. > > > > Signed-off-by: Chunyan Zhang > > --- > > .../bindings/clock/sprd,sc9863a-clk.yaml | 110 ++++++++++++++++++ > > 1 file changed, 110 insertions(+) > > create mode 100644 Documentation/devicetree/bindings/clock/sprd,sc9863a-clk.yaml > > > > diff --git a/Documentation/devicetree/bindings/clock/sprd,sc9863a-clk.yaml b/Documentation/devicetree/bindings/clock/sprd,sc9863a-clk.yaml > > new file mode 100644 > > index 000000000000..b31569b524e5 > > --- /dev/null > > +++ b/Documentation/devicetree/bindings/clock/sprd,sc9863a-clk.yaml > > @@ -0,0 +1,110 @@ > > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) > > +# Copyright 2019 Unisoc Inc. > > +%YAML 1.2 > > +--- > > +$id: "http://devicetree.org/schemas/clock/sprd,sc9863a-clk.yaml#" > > +$schema: "http://devicetree.org/meta-schemas/core.yaml#" > > + > > +title: SC9863A Clock Control Unit Device Tree Bindings > > + > > +maintainers: > > + - Orson Zhai > > + - Baolin Wang > > + - Chunyan Zhang > > + > > +properties: > > + "#clock-cells": > > + const: 1 > > + > > + compatible : > > + enum: > > + - sprd,sc9863a-ap-clk > > + - sprd,sc9863a-aon-clk > > + - sprd,sc9863a-apahb-gate > > + - sprd,sc9863a-pmu-gate > > + - sprd,sc9863a-aonapb-gate > > + - sprd,sc9863a-pll > > + - sprd,sc9863a-mpll > > + - sprd,sc9863a-rpll > > + - sprd,sc9863a-dpll > > + - sprd,sc9863a-mm-gate > > + - sprd,sc9863a-apapb-gate > > + > > + clocks: > > + minItems: 1 > > + maxItems: 4 > > + description: | > > + The input parent clock(s) phandle for this clock, only list fixed > > + clocks which are declared in devicetree. > > + > > + clock-names: > > + minItems: 1 > > + maxItems: 4 > > + description: | > > + Clock name strings used for driver to reference. > > Drop this. That's all 'clock-names'. Ok. > > > + items: > > + - const: ext-26m > > + - const: ext-32k > > + - const: ext-4m > > + - const: rco-100m > > + > > + reg: > > + description: | > > + Contain the registers base address and length. > > Drop this. You need to define how many entries (maxItems: 1). Ok. > > > + > > +required: > > + - compatible > > + - '#clock-cells' > > + > > +if: > > + properties: > > + compatible: > > + enum: > > + - sprd,sc9863a-ap-clk > > + - sprd,sc9863a-aon-clk > > +then: > > + required: > > + - reg > > + > > +else: > > + description: | > > + Other SC9863a clock nodes should be the child of a syscon node with > > + the required property: > > + > > + - compatible: Should be the following: > > + "sprd,sc9863a-glbregs", "syscon", "simple-mfd" > > + > > + The 'reg' property is also required if there is a sub range of > > + registers for the clocks that are contiguous. > > Which ones are these? You should be able to define that exactly starting > with the example below. This is for the second example below, which clocks are under syscon node. > > > + > > +examples: > > + - | > > + ap_clk: clock-controller@21500000 { > > + compatible = "sprd,sc9863a-ap-clk"; > > + reg = <0 0x21500000 0 0x1000>; > > + clocks = <&ext_26m>, <&ext_32k>; > > + clock-names = "ext-26m", "ext-32k"; > > + #clock-cells = <1>; > > + }; > > + > > + - | > > + soc { > > + #address-cells = <2>; > > + #size-cells = <2>; > > + > > + ap_ahb_regs: syscon@20e00000 { > > + compatible = "sprd,sc9863a-glbregs", "syscon", "simple-mfd"; > > + reg = <0 0x20e00000 0 0x4000>; > > + #address-cells = <1>; > > + #size-cells = <1>; > > + ranges = <0 0 0x20e00000 0x4000>; > > + > > + apahb_gate: apahb-gate@0 { > > + compatible = "sprd,sc9863a-apahb-gate"; > > + reg = <0x0 0x1020>; > > + #clock-cells = <1>; > > Doesn't this block have input clocks? Since it switched to the new way of referencing parent, some clocks whose parents are all in the same driver don't need to get their parent from DT. Thanks, Chunyan