Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp501974pxb; Fri, 15 Oct 2021 09:49:47 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzV3/SCTkHoQU3DXaFeZAJtoHyCbHpL2IEy6ycqoCJLq8DN9dENReWJB3byEA0/ew1/D+x3 X-Received: by 2002:aa7:df83:: with SMTP id b3mr19059124edy.294.1634316587765; Fri, 15 Oct 2021 09:49:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1634316587; cv=none; d=google.com; s=arc-20160816; b=dsSzymKmFfkacgkC9u1Ht2NjyCYLysMgcdeUKLZjsB5yBhbWFGn4BUXA0j+q6kdXgV 5p6nJ7ZM42hp8ihwhYAz3jNXBT3Of7Kw72ZQhbxlv5IYKe/R5YuzqjxLG1ELlqgVcXI9 euhYbh6ScZTXZPwysZAxqSaMnrr0IdxRijAx154gVNEZ9eCYGl5daCzeoSHBh/G8Sf+Z 0gctclbbSpd+bAQknOUGn//g0Sl8V36WG3GwuBAG6d2U73nPgnjRTCZTCN+25mHpcDwj ppN92YsK+jjFyLZKvo/eL0pk3VvHyQno6xzZvZWzWZv3BYCRDNnovViQrHnAmboFEAAO wE+A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=Mg6PVA/6PxwCgT+vZGCVDq1ooTZipA2sPhFwT22tguE=; b=SWgdYO9Nhq7LfT6hfyMSz/Pw2BFQBawtZK9rYjn457xREW9QxvCwf0U6eksROz+eCr S/A4su9ZpV8rDn+hLbI9/a61v+w6E0lf1df+m6nErMZRIARWKBliicNRiPnd+zPFNl5N Y7xVIyFdE+cDJqvo2r+//6aV5fIV1DjJQAdMcvVhi0p0NpONgDZ/PiCPoaVYXrlCIFxK 3xIevaxt6q0tzmNXl95i16jkC23x67Kqpypjp+OqP40lKx/M+zKVXa7lhxQTn26uN2aT eXWh6MKeqrD9v0J1Nb6nriyKWR+9E9KNiT9W/AbueEqdHCC358padBGqZlDmjLAM1f9W 4p+A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Fd8YKgeP; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id w2si8621585ejn.164.2021.10.15.09.49.21; Fri, 15 Oct 2021 09:49:47 -0700 (PDT) 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; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Fd8YKgeP; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231552AbhJOJLr (ORCPT + 99 others); Fri, 15 Oct 2021 05:11:47 -0400 Received: from mail.kernel.org ([198.145.29.99]:58340 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231971AbhJOJLq (ORCPT ); Fri, 15 Oct 2021 05:11:46 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 1BFAE60F70; Fri, 15 Oct 2021 09:09:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1634288980; bh=gKlmBZCKfh377td8Ai6w0QzUjV+rvKC3o7zhAOzeFS0=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Fd8YKgeP+xXi8oXh/Q0MY+iTcyS6Os7t5d0ZReea+QOPW8mm/Ofwv/96h81wbBMWL 6OGgpY8NKVIEMJkEfttNQZ1rvAnKgY+FjPbWb0cxDajhudVdH32dmrTlyBmnAG483F LmPmGLNitQvXTKq/Sl9CVvw0sf72uYPKTJFTKnWSpNasgxTNGN2/wB/xlqnZUpaeV1 fe72nGFHS/v42AUGNhtXoJj6DR3/AiSJjA5mDbAlaTmu6O5rHgpQNPmlYIhKSXQoAM Vfy51Ob0BZc0SxziOeybOOOi/UGfx3cINJHtxxCXd1QZBzbnZY4Cbc5rlw58L8ykl8 pCANqiz3vKJ1w== Received: by pali.im (Postfix) id 8374D80A; Fri, 15 Oct 2021 11:09:37 +0200 (CEST) Date: Fri, 15 Oct 2021 11:09:37 +0200 From: Pali =?utf-8?B?Um9ow6Fy?= To: Stephen Boyd Cc: Greg Kroah-Hartman , Michael Turquette , Rob Herring , Andrew Lunn , Gregory Clement , Sebastian Hesselbarth , Vladimir Vid , Marek =?utf-8?B?QmVow7pu?= , linux-clk@vger.kernel.org, linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org Subject: Re: [PATCH v7 3/6] dt-bindings: mvebu-uart: document DT bindings for marvell,armada-3700-uart-clock Message-ID: <20211015090937.gnt66hgugrhwnkei@pali> References: <20210930095838.28145-1-pali@kernel.org> <20210930095838.28145-4-pali@kernel.org> <163425678347.1688384.10695189000353676651@swboyd.mtv.corp.google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <163425678347.1688384.10695189000353676651@swboyd.mtv.corp.google.com> User-Agent: NeoMutt/20180716 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thursday 14 October 2021 17:13:03 Stephen Boyd wrote: > Quoting Pali Rohár (2021-09-30 02:58:35) > > diff --git a/Documentation/devicetree/bindings/clock/marvell,armada-3700-uart-clock.yaml b/Documentation/devicetree/bindings/clock/marvell,armada-3700-uart-clock.yaml > > new file mode 100644 > > index 000000000000..175f5c8f2bc5 > > --- /dev/null > > +++ b/Documentation/devicetree/bindings/clock/marvell,armada-3700-uart-clock.yaml > > @@ -0,0 +1,59 @@ > [..] > > + '#clock-cells': > > + const: 1 > > + > > +required: > > + - compatible > > + - reg > > + - clocks > > + - clock-names > > + - '#clock-cells' > > + > > +additionalProperties: false > > + > > +examples: > > + - | > > + uartclk: clock-controller@12010 { > > The uart device is at 0x12000 and the clock-controller is at 0x12010? > This looks like a node is being put into DT to represent a clk driver. > Why can't we register a clk from the uart device driver itself? I think > we talked about this a month or two ago but it still isn't clear to me. We have already talked about it and I have already wrote reasons. UART clk is shared for both UART1 and UART2. And UART clk regs are in both address spaces of UART1 and UART2. UART1 or UART2 can be independently disabled on particular board (as pins are MPP which may be configured to different function). So you have a board only with UART2, you have to disable UART1 node, but at the same time you have to access UART clk to drive UART2. And UART clk bits are in UART1 address space. > > + compatible = "marvell,armada-3700-uart-clock"; > > + reg = <0x12010 0x4>, <0x12210 0x4>; > > + clocks = <&tbg 0>, <&tbg 1>, <&tbg 2>, <&tbg 3>, <&xtalclk>; > > + clock-names = "TBG-A-P", "TBG-B-P", "TBG-A-S", "TBG-B-S", "xtal"; > > + #clock-cells = <1>; > > + }; > > -- > > 2.20.1 > >