Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp1779866imm; Tue, 22 May 2018 09:11:28 -0700 (PDT) X-Google-Smtp-Source: AB8JxZq8+uEi4hG2uVEHGJUygxTbn1AnmSPLgLQgeKcl4lcyTIj6uc0ec7ieyGFv4V/PPBxP1D72 X-Received: by 2002:a62:883:: with SMTP id 3-v6mr25131491pfi.154.1527005488485; Tue, 22 May 2018 09:11:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527005488; cv=none; d=google.com; s=arc-20160816; b=AWUt9tT6NRZkwo9oBIhP0fgmfcEF9kNzrXwi7d2e2nJ4Z3uFd2AgXHROEqW+Qsc2J7 1TEVYUS/Hfw9alw0LnyNsalH7QygKyzY1UzVxdui533JfD29c+v1ps0k2zhr/wf3g3ov YvPXgMiw0cMwCQxv2WfZSsycyJsQXkKeyfsUQpoyrEdZb8yfCkmR1Bw/K6P4H1j1dVi3 d0CZw5rZvq70dys239BhmnfTQpoAwxPYgQAwLivGBGbT/tYneBHIn7S6vIoJo2+Y28+t igCpHvWPjt+UBgd58wtCukRGu2omwZiJgwNbyjIolaiIk+eu7Rp0+7a9aRMFRoQYpRaR J6VQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=Xrxh9kDzbwi15844NNMlqldJJ0Z7/qAwbEPQsBx0r8Q=; b=xGdPxsotyWPR0wh8WF7Evw0/gZnx7zzgnMYJdYRvsPxw8mE7sP9/3tHY4N7u8hGVL/ WgVxkP0shoDD89yeJYvCalBOZRRVGhwuKbwK9+VgufQQsyj1VBjNqGF6atUcSIGVT8jj IJ4n3ySRwfZaI8zBHqMfbCQHrRwCJEHP/felncZx09cNSSaToxIyZwqZqpx14iPdiTMF 33c6m1qOw4lV9nYJ7fcrO7peH7byYzNFazoSsj5LlVRv4S5h9+ONdAeXPyIGpXknYmdY Eu/Iu6oS2Scq5lms6ADULu0/h6laKey9b2N5hiAQ7t5WC5fUOohW3eZLev7gzGh0FbTr zmbA== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c2-v6si860945pgp.147.2018.05.22.09.11.12; Tue, 22 May 2018 09:11: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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752257AbeEVQJU (ORCPT + 99 others); Tue, 22 May 2018 12:09:20 -0400 Received: from mail-pl0-f68.google.com ([209.85.160.68]:36545 "EHLO mail-pl0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751240AbeEVQJQ (ORCPT ); Tue, 22 May 2018 12:09:16 -0400 Received: by mail-pl0-f68.google.com with SMTP id v24-v6so11185239plo.3; Tue, 22 May 2018 09:09:16 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=Xrxh9kDzbwi15844NNMlqldJJ0Z7/qAwbEPQsBx0r8Q=; b=OKs0gy493DzIFKdanCKB+PE7kFzUpdZ63OtiYzA2G+35MK55sjq+KbD8cyJt2uNHI7 /vFMMC29OylhUtX0MeylUfuz167f8JjiIG8tWpGGmqChlat6COzGHtgCjiwFgl/h6BJx T00nPERJIbl/EypHctjqex6EnFoNpt4g5BGs08eQA6DDjpGlosAccj7R0EfJtvSLtbox rVuDvAYtqgXN55Y2Mjt3BSuIA7RJMTJhy0ZDhGVcNSRQD37B6FXLwgAbYBSRJWNYjtAt 7XygqUFXM8ugv7P5Aw7KklTE2kulO3+oWaoteNHruHMqeD6fyBDr+7y3Bb/X/6Oqzi2d vhQQ== X-Gm-Message-State: ALKqPwexIngcW+MEPV6XmHuTOSExcoQKsDV24zAE257C4VGr0H6vQvye TXX9NxXetLJL/qD9gjUpGw== X-Received: by 2002:a17:902:684c:: with SMTP id f12-v6mr25639297pln.139.1527005355500; Tue, 22 May 2018 09:09:15 -0700 (PDT) Received: from localhost (24-223-123-72.static.usa-companies.net. [24.223.123.72]) by smtp.gmail.com with ESMTPSA id f2-v6sm18599612pgp.28.2018.05.22.09.09.14 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 22 May 2018 09:09:14 -0700 (PDT) Date: Tue, 22 May 2018 11:09:13 -0500 From: Rob Herring To: Michel Pollet Cc: linux-renesas-soc@vger.kernel.org, Simon Horman , phil.edworthy@renesas.com, Michel Pollet , Magnus Damm , Mark Rutland , Michael Turquette , Stephen Boyd , Geert Uytterhoeven , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-clk@vger.kernel.org Subject: Re: [PATCH v6 3/6] dt-bindings: clock: renesas,rzn1-clocks: document RZ/N1 clock driver Message-ID: <20180522160913.GA7755@rob-hp-laptop> References: <1526983321-41949-1-git-send-email-michel.pollet@bp.renesas.com> <1526983321-41949-4-git-send-email-michel.pollet@bp.renesas.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1526983321-41949-4-git-send-email-michel.pollet@bp.renesas.com> User-Agent: Mutt/1.9.4 (2018-02-28) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, May 22, 2018 at 11:01:23AM +0100, Michel Pollet wrote: > The Renesas RZ/N1 Family (Part #R9A06G0xx) requires a driver > to provide the SoC clock infrastructure for Linux. > > This documents the driver bindings. > > Signed-off-by: Michel Pollet > --- > .../bindings/clock/renesas,rzn1-clocks.txt | 44 ++++++++++++++++++++++ > 1 file changed, 44 insertions(+) > create mode 100644 Documentation/devicetree/bindings/clock/renesas,rzn1-clocks.txt > > diff --git a/Documentation/devicetree/bindings/clock/renesas,rzn1-clocks.txt b/Documentation/devicetree/bindings/clock/renesas,rzn1-clocks.txt > new file mode 100644 > index 0000000..0c41137 > --- /dev/null > +++ b/Documentation/devicetree/bindings/clock/renesas,rzn1-clocks.txt > @@ -0,0 +1,44 @@ > +* Renesas RZ/N1 Clock Driver > + > +This driver provides the clock infrastructure used by all the other drivers. Bindings document h/w not drivers. > + > +One of the 'special' feature of this infrastructure is that Linux doesn't Bindings are not just for Linux. > +necessary 'own' all the clocks on the SoC, some other OS runs on > +the Cortex-M3 core and that OS can access and claim it's own clocks. How is this relevant to the binding? > + > +Required Properties: > + > + - compatible: Must be > + - "renesas,r9a06g032-clocks" for the RZ/N1D > + and "renesas,rzn1-clocks" as a fallback. Is "clocks" how the chip reference manual refers to this block? > + - reg: Base address and length of the memory resource used by the driver > + - #clock-cells: Must be 1 > + > +Examples > +-------- > + > + - Clock driver device node: > + > + clock: clocks@4000c000 { clock-controller@... > + compatible = "renesas,r9a06g032-clocks", > + "renesas,rzn1-clocks"; > + reg = <0x4000c000 0x1000>; > + status = "okay"; Don't show status in examples. (Plus, I doubt you ever want to have this disabled, so you don't need the property in your dts files either). > + #clock-cells = <1>; > + }; > + > + > + - Other drivers can use the clocks as in: s/drivers/nodes/ > + > + uart0: serial@40060000 { > + compatible = "snps,dw-apb-uart"; > + reg = <0x40060000 0x400>; > + interrupts = ; > + reg-shift = <2>; > + reg-io-width = <4>; > + clocks = <&clock RZN1_CLK_UART0>; > + clock-names = "baudclk"; > + }; > + Note the use of RZN1_CLK_UART0 -- these constants are declared in > + the rzn1-clocks.h header file. These are not hardware based constants > + and are Linux specific. No, they are not Linux specific. They are part of the DT ABI. While it is not a requirement to base them on some h/w numbering, it is preferred if you can. That usually only works if you can base them on bit positions or register offsets. Rob