From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id ACDA3C77B7C for ; Sun, 21 May 2023 09:24:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229545AbjEUJYx (ORCPT ); Sun, 21 May 2023 05:24:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57002 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229511AbjEUJYw (ORCPT ); Sun, 21 May 2023 05:24:52 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 157BDBA; Sun, 21 May 2023 02:24:51 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 9F1E26163B; Sun, 21 May 2023 09:24:50 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0BD1CC433D2; Sun, 21 May 2023 09:24:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1684661090; bh=VFUii29FV4EQioWM+zCcaPyRQxlTB11/ZC6sCA8N8UY=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=k9I4iu8tkFEXqV0QmJ6D5PsZZLo5qVH6r6Frzo9prgUXEGs6GzcA2Z9m/FqJLKxx/ TgKeGBUxjf23Tpabbe939cTayUaPqJxOk4x3eNuuKcs2uGeOn+6/Q8DVfkpb3p1XAm SvPrndOr0/zwxjtK93EdXBwlt0JsWD8IbOwvWxYMq7cwkS2h8Z2epjSQNP++0iOKdl dNsdkOuMt5SBdjafmY3xTkR5+PhARKrXk/pqHvmlN1u1eDlHUwY4g4AKS6saKm2/XG eIF2oNbqVmWgJmHs7YE38kQSZm5oqMbFz67l87+rdiouLGln0Xwhk/q2KUyzrpmNH0 Mw9Z4EnPj6Yhw== Date: Sun, 21 May 2023 17:13:38 +0800 From: Jisheng Zhang To: Samuel Holland Cc: linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org, devicetree@vger.kernel.org, linux-serial@vger.kernel.org, Palmer Dabbelt , Thomas Gleixner , Marc Zyngier , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Palmer Dabbelt , Paul Walmsley , Albert Ou , Greg Kroah-Hartman , Jiri Slaby Subject: Re: [PATCH v4 03/10] dt-bindings: serial: add documentation for Bouffalolab UART Driver Message-ID: References: <20230518152244.2178-1-jszhang@kernel.org> <20230518152244.2178-4-jszhang@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-serial@vger.kernel.org On Thu, May 18, 2023 at 10:00:50PM -0500, Samuel Holland wrote: > Hi Jisheng, Hi Samuel, > > On 5/18/23 10:22, Jisheng Zhang wrote: > > Add bindings doc for Bouffalolab UART Driver > > > > Signed-off-by: Jisheng Zhang > > Acked-by: Palmer Dabbelt > > --- > > .../serial/bouffalolab,bl808-uart.yaml | 47 +++++++++++++++++++ > > 1 file changed, 47 insertions(+) > > create mode 100644 Documentation/devicetree/bindings/serial/bouffalolab,bl808-uart.yaml > > > > diff --git a/Documentation/devicetree/bindings/serial/bouffalolab,bl808-uart.yaml b/Documentation/devicetree/bindings/serial/bouffalolab,bl808-uart.yaml > > new file mode 100644 > > index 000000000000..0ef858e50efb > > --- /dev/null > > +++ b/Documentation/devicetree/bindings/serial/bouffalolab,bl808-uart.yaml > > @@ -0,0 +1,47 @@ > > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) > > +# Copyright (C) 2022 Jisheng Zhang > > +%YAML 1.2 > > +--- > > +$id: http://devicetree.org/schemas/serial/bouffalolab,bl808-uart.yaml# > > +$schema: http://devicetree.org/meta-schemas/core.yaml# > > + > > +title: Bouffalolab UART Controller > > + > > +maintainers: > > + - Jisheng Zhang > > + > > +allOf: > > + - $ref: serial.yaml# > > + > > +properties: > > + compatible: > > + const: bouffalolab,bl808-uart > > + > > + reg: > > + maxItems: 1 > > + > > + interrupts: > > + maxItems: 1 > > + > > + clocks: > > + maxItems: 1 > > This is not complete. There are separate APB and module (baud) clocks, > as well as a peripheral reset line. If we are going to keep the binding > stable, these need to be described up front. IIUC, the only requirement is to keep the driver compatible with both new dts and old dts. clk tree and reset can be added latter. I have seen sevral such examples from other SoCs' mainline progress. > > (I still don't fully understand the clock tree, and so far that has been > the main blocker for me sending a follow-up series with additional > bindings for hardware that's otherwise already supported, like the > Ethernet MAC.) > > Regards, > Samuel > > > + > > +required: > > + - compatible > > + - reg > > + - interrupts > > + - clocks > > + > > +unevaluatedProperties: false > > + > > +examples: > > + - | > > + #include > > + > > + uart0: serial@30002000 { > > + compatible = "bouffalolab,bl808-uart"; > > + reg = <0x30002000 0x1000>; > > + interrupts = <53 IRQ_TYPE_LEVEL_HIGH>; > > + clocks = <&xtal>; > > + }; > > +... >