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 DAF5EC433FE for ; Fri, 17 Dec 2021 15:51:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235851AbhLQPvK convert rfc822-to-8bit (ORCPT ); Fri, 17 Dec 2021 10:51:10 -0500 Received: from relay3-d.mail.gandi.net ([217.70.183.195]:53349 "EHLO relay3-d.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232296AbhLQPvJ (ORCPT ); Fri, 17 Dec 2021 10:51:09 -0500 Received: (Authenticated sender: miquel.raynal@bootlin.com) by relay3-d.mail.gandi.net (Postfix) with ESMTPSA id 7D67460007; Fri, 17 Dec 2021 15:51:04 +0000 (UTC) Date: Fri, 17 Dec 2021 16:51:02 +0100 From: Miquel Raynal To: Geert Uytterhoeven Cc: Richard Weinberger , Vignesh Raghavendra , Tudor Ambarus , Pratyush Yadav , Michael Walle , MTD Maling List , Rob Herring , "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , Milan Stevanovic , Jimmy Lalande , Thomas Petazzoni , Linux-Renesas , Magnus Damm , Gareth Williams , Phil Edworthy , Wolfram Sang , Chris Brandt , Ralph Siemsen , Geert Uytterhoeven , Rob Herring Subject: Re: [PATCH v6 1/4] dt-bindings: mtd: renesas: Describe Renesas R-Car Gen3 & RZ/N1 NAND controller Message-ID: <20211217165102.6950cf40@xps13> In-Reply-To: References: <20211217142033.353599-1-miquel.raynal@bootlin.com> <20211217142033.353599-2-miquel.raynal@bootlin.com> Organization: Bootlin X-Mailer: Claws Mail 3.17.7 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8BIT Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Hi Geert, geert@linux-m68k.org wrote on Fri, 17 Dec 2021 16:44:59 +0100: > Hi Miquel, > > On Fri, Dec 17, 2021 at 3:20 PM Miquel Raynal wrote: > > Add a Yaml description for this Renesas NAND controller. > > > > As this controller is embedded on different SoC families, provide: > > * a family-specific "r-car-gen3" compatible and a more specific > > "r8a77951" one > > * a family-specific "rzn1" compatible and a more specific "r9a06g032" > > one > > > > More compatibles can be added later if new SoCs with this controller > > must be supported. > > > > Signed-off-by: Miquel Raynal > > Reviewed-by: Geert Uytterhoeven > > Reviewed-by: Rob Herring > > Thanks for the update! > > > --- /dev/null > > +++ b/Documentation/devicetree/bindings/mtd/renesas-nandc.yaml > > @@ -0,0 +1,66 @@ > > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) > > +%YAML 1.2 > > +--- > > +$id: http://devicetree.org/schemas/mtd/renesas-nandc.yaml# > > +$schema: http://devicetree.org/meta-schemas/core.yaml# > > + > > +title: Renesas R-Car Gen3 & RZ/N1x NAND flash controller device tree bindings > > + > > +maintainers: > > + - Miquel Raynal > > + > > +allOf: > > + - $ref: "nand-controller.yaml" > > + > > +properties: > > + compatible: > > + oneOf: > > + - items: > > + - enum: > > + - renesas,r8a77951-nandc > > + - const: renesas,rcar-gen3-nandc > > Might be a bit premature to add these before they have been tested, > and because there are small differences in integration, cfr. below. > > > + > > + - items: > > + - enum: > > + - renesas,r9a06g032-nandc > > + - const: renesas,rzn1-nandc > > + > > + reg: > > + maxItems: 1 > > + > > + interrupts: > > + maxItems: 1 > > + > > + clocks: > > + items: > > + - description: APB host controller clock > > + - description: External NAND bus clock > > + > > + clock-names: > > + items: > > + - const: hclk > > + - const: eclk > > On R-Car Gen3, there's a single module clock. > Plus a power-domain to manage that. > > Actually the RZ/N1 clock driver also registers a PM Domain, so letting > Runtime PM manage the clocks may work on RZ/N1, too... > > On R-Car Gen3, there's also a module reset. Ok, I didn't know. I propose to drop the r-car-gen3 compatible entirely from the driver and the binding when I'll apply the series. Is it fine for you? > > > + > > +required: > > + - compatible > > + - reg > > + - clocks > > + - clock-names > > + - interrupts > > + > > +unevaluatedProperties: false > > + > > +examples: > > + - | > > + #include > > + #include > > + > > + nand-controller@40102000 { > > + compatible = "renesas,r9a06g032-nandc", "renesas,rzn1-nandc"; > > + reg = <0x40102000 0x2000>; > > + interrupts = ; > > + clocks = <&sysctrl R9A06G032_HCLK_NAND>, <&sysctrl R9A06G032_CLK_NAND>; > > + clock-names = "hclk", "eclk"; > > + #address-cells = <1>; > > + #size-cells = <0>; > > + }; > > Gr{oetje,eeting}s, > > Geert > > -- > Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org > > In personal conversations with technical people, I call myself a hacker. But > when I'm talking to journalists I just say "programmer" or something like that. > -- Linus Torvalds Thanks, Miquèl