Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp5121916pxb; Tue, 28 Sep 2021 10:58:42 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw98vV59fr0PanTiRsPArrAkyb6Gg0uosQ7qGmli1vHmymT8nYFOZ9efTe0dzGY9/KzjjL+ X-Received: by 2002:a65:6287:: with SMTP id f7mr5893128pgv.444.1632851921911; Tue, 28 Sep 2021 10:58:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632851921; cv=none; d=google.com; s=arc-20160816; b=oKxMhJbJPMKznyf9wfPO2I56BP1gF5V1DLm/j6a3gdKT15oMUVfrPC4Pu6L/l94aJy 8otwTU7iBpZOzwqILPIbz9pr4GfqN4r33A68O5yam9R9uLulC26bL/tdED9Bhl+skylf DUtmtRZisCa6pZ6td7EwDyBNod3aHOgGQONCSQYkhyqzD4S6VC6Z2IZexV8Yh7f4Pv+T 3vlMOaVre5vxXzG2z/LVB576w0cTK2uD/WPQ2J06AlGyw+2OBS/jQo8FLrk5N5dL0xZX 4AtJP0mceX8JgRCU5OsMyDsNPj7Q5V24Ju3pkjU4Y3MyaieB5MRYz2HAYYuZ79bXXzBN vJUg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=n8NSpTe2rvcPp4baUIK7oD/80FNQY5TP2F6R7A66d0Y=; b=yK2kpBrV3j1zP67xTts2+YJwAMBKwyv0VuBBCLaqTWTkKTMJEGtDVe0MFHH9FF69GP WguIuBPhqEfXrn6ngtAbrWRul29Z8eNW8NzLkCnVETiZTosGGX2V3ud6oTVMlThXxaA1 M5GWCgY0hn2SE+dGADCdYSCaQJd09clEHjkqVyLWDC1zrEQtQ6sadVPTpuZkdONvlyx5 t4rx5HeaBOlVNIU9Tb/CxIJX3BY3DdYxQkIKBRUfDlffLknSxskQclY9bLaSwjv/B9Oh piS6tPBKSdtLWbQ5c7m8XBhNcmXuzP53qI8R1vDmx6AtR4o/djbG4PeoezCLl5kjjsnk Xucg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=IcngGpWR; 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 n3si26996586pgv.117.2021.09.28.10.58.27; Tue, 28 Sep 2021 10:58:41 -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=IcngGpWR; 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 S242112AbhI1R7E (ORCPT + 99 others); Tue, 28 Sep 2021 13:59:04 -0400 Received: from mail.kernel.org ([198.145.29.99]:43190 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241884AbhI1R7B (ORCPT ); Tue, 28 Sep 2021 13:59:01 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 8C9BC6135A; Tue, 28 Sep 2021 17:57:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1632851841; bh=IitLXklH5pgGwr/QxPgyows3Ty/G/eCRW21HC4763yA=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=IcngGpWRpGd+pEp0EoEj8AWUcEw4iLr4bdM8zMoEu1dEl9BiF1zn4Lv3iiwuZLr6M L/zvOGm5g6EO2DB0rPEimsRHoZ9LfMNPMS+6hILAVqCKgFmLpkOQcaTkPzgNxmwxOY nhZF/phcOVg6ryvwhFgLpWeJAsNM6Sup6M0Qv8RgoG/xKInbOJuCtrdgU7itcNaYNF VUaIKJ+BLaRexubuQEiwBn2uXXPV0DlKMhh/w/9kW5wHRg6SVzDxrKDy6/+f2KAZaW kHftLdkcEP84jtDxvCjOsyEiu0LGYQGmkHcD8NDANSNUmZgu0s6jpO9x1YKn76GCFZ tqBiFcPRFASSA== Received: by mail-ed1-f52.google.com with SMTP id v10so82374804edj.10; Tue, 28 Sep 2021 10:57:21 -0700 (PDT) X-Gm-Message-State: AOAM531zB5dABm2mlBlvF6cpqUs/EHmusix4dCefjkrwOmhAom2gxOBp xgXP2xDzKNCdQmN5EETVn72pu+kA7wnLEY6jGw== X-Received: by 2002:a50:d887:: with SMTP id p7mr9357826edj.164.1632851840048; Tue, 28 Sep 2021 10:57:20 -0700 (PDT) MIME-Version: 1.0 References: <20210922105433.11744-1-pali@kernel.org> <20210922105433.11744-4-pali@kernel.org> <20210927203423.o7aulgj7osaaksxr@pali> In-Reply-To: <20210927203423.o7aulgj7osaaksxr@pali> From: Rob Herring Date: Tue, 28 Sep 2021 12:57:08 -0500 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [RESEND PATCH v5 3/6] dt-bindings: mvebu-uart: document DT bindings for marvell,armada-3700-uart-clock To: =?UTF-8?Q?Pali_Roh=C3=A1r?= Cc: Michael Turquette , Stephen Boyd , Greg Kroah-Hartman , Andrew Lunn , Gregory Clement , Sebastian Hesselbarth , Vladimir Vid , =?UTF-8?B?TWFyZWsgQmVow7pu?= , linux-clk , "open list:SERIAL DRIVERS" , "linux-kernel@vger.kernel.org" , linux-arm-kernel Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Sep 27, 2021 at 3:34 PM Pali Roh=C3=A1r wrote: > > On Monday 27 September 2021 15:17:59 Rob Herring wrote: > > On Wed, Sep 22, 2021 at 5:56 AM Pali Roh=C3=A1r wrote= : > > > > > > This change adds DT bindings documentation for device nodes with comp= atible > > > string "marvell,armada-3700-uart-clock". > > > > Please resend to the DT list so that checks run and this gets reviewed > > in a timely manner. > > OK > > > > Signed-off-by: Pali Roh=C3=A1r > > > --- > > > .../bindings/clock/armada3700-uart-clock.yaml | 57 +++++++++++++++++= ++ > > > 1 file changed, 57 insertions(+) > > > create mode 100644 Documentation/devicetree/bindings/clock/armada370= 0-uart-clock.yaml > > > > > > diff --git a/Documentation/devicetree/bindings/clock/armada3700-uart-= clock.yaml b/Documentation/devicetree/bindings/clock/armada3700-uart-clock.= yaml > > > new file mode 100644 > > > index 000000000000..5bdb23e0ba3e > > > --- /dev/null > > > +++ b/Documentation/devicetree/bindings/clock/armada3700-uart-clock.y= aml > > > @@ -0,0 +1,57 @@ > > > +# SPDX-License-Identifier: GPL-2.0 > > > > Dual license. checkpatch will tell you which ones. > > OK > > > > +%YAML 1.2 > > > +--- > > > +$id: http://devicetree.org/schemas/clock/marvell,armada-3700-uart-cl= ock# > > > +$schema: http://devicetree.org/meta-schemas/core.yaml# > > > +title: Marvell Armada 3720 UART clocks > > > + > > > +properties: > > > + compatible: > > > + const: marvell,armada-3700-uart-clock > > > + > > > + reg: > > > + items: > > > + - description: UART Clock Control Register > > > + - description: UART 2 Baud Rate Divisor Register > > > + > > > + clocks: > > > + description: | > > > + List of parent clocks suitable for UART from following set: > > > + "TBG-A-P", "TBG-B-P", "TBG-A-S", "TBG-B-S", "xtal" > > > + UART clock can use one from this set and when more are provide= d > > > + then kernel would choose and configure the most suitable one. > > > + It is suggest to specify at least one TBG clock to achieve > > > + baudrates above 230400 and also to specify clock which bootloa= der > > > + used for UART (most probably xtal) for smooth boot log on UART= . > > > + > > > + clock-names: > > > + items: > > > + - const: TBG-A-P > > > + - const: TBG-B-P > > > + - const: TBG-A-S > > > + - const: TBG-B-S > > > + - const: xtal > > > + minItems: 1 > > > + maxItems: 5 > > > > Don't need maxItems equal to length of 'items'. > > OK > > > > + > > > + '#clock-cells': > > > + const: 1 > > > + > > > +required: > > > + - compatible > > > + - reg > > > + - clocks > > > + - clock-names > > > + - '#clock-cells' > > > + > > > +additionalProperties: false > > > + > > > +examples: > > > + - | > > > + uartclk: uartclk@12000 { > > > > clock-controller@12010 > > > > > + compatible =3D "marvell,armada-3700-uart-clock"; > > > + reg =3D <0x12010 0x4>, <0x12210 0x4>; > > > > However, looks like this is part of some other block. > > Yes, it is part of UART block. > > Explanation is in commit message of patch 2/6. > > And also discussed here: > https://lore.kernel.org/linux-serial/20210812200804.i4kbcs6ut27mapd3@pali= / > > > The whole block > > needs a binding (or at least the parent and whatever sub-functions you > > know about). > > Whole UART block has already binding. Clock driver just needs access to > these clock bits of these two registers which are in UART block. HW > designers decided that clock which drives UART2 has configuration in > UART1 address space. As explained in commit message of patch 2/6 there > is no easy way how to deal with it in DTS backward compatible way. So > clock and UART driver shares mutex for accessing these two shared > registers, and these two registers are defined in all 3 DT nodes: UART1, > UART2 and UART-clock. That's awful. I guess I don't have a better suggestion. Rob