Received: by 2002:a05:6a10:6d10:0:0:0:0 with SMTP id gq16csp305955pxb; Wed, 20 Apr 2022 23:25:44 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzqCPFF8v5aUYygzoxXpp5Wt8b44IKedq3L91WfCPCs4QWtjA8GW1Yz8ckmA+2gjyQLJCjS X-Received: by 2002:a63:7345:0:b0:3aa:8b0:a3c3 with SMTP id d5-20020a637345000000b003aa08b0a3c3mr15582812pgn.219.1650522344396; Wed, 20 Apr 2022 23:25:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650522344; cv=none; d=google.com; s=arc-20160816; b=MgnX7W0DQMsQ0HrSBV8oJzSVg8JGzMDCM6swtsnb8JeSF1vGbHzuMLZtURvxjx7qb5 ukvmVIPtN4Os7P1NF9pWc31hQSc2fRMxOZMe99++L0uM7uOyMEp5Xwb7vHDCjJ2ALRAB UKriFOrH4fju7hV9pNJembN4kmUa0xRNHcXx9zWJgQWs2LFvKM6GBLLZPV/Y3BEtDyzD 3bzRVp1zQVm2Q374eeaJUJICUpfg95rXpDr/SDE/8V51wtOtvgujt+eFM+WJsyUi4hCs TyOOLTS1w9Y8ix0l6X8i9/EleMAdOhzGU+ZQWgrqa1wdmhS8EOollcOSIp/bCQlXDfYB 7utA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :organization:references:in-reply-to:message-id:subject:cc:to:from :date:dkim-signature; bh=zNCqHdoDiIIO8GrtVq7oJYoQzRKdLynJa7XVU5UOud4=; b=KI/s8iv0/raoXhke09ETInSE5P2b5ydofbyvTXH3WyfT1bmzdrlTZ39VfpjfmLK33F pjwZ4mnN4LoTXJ17vSdyzF8Bf68Ds1LWnuPoPIvHJGaZi+Fm3IrsdGT6IZbTMC4bWwWB nmPMr3wsYrkxBq5t3/EXsJ8tlRDS0mdxzu2gBg3k/+bPDKOQ+ePEVojqgcvEd1KSZr/I DBcP643pm6jdkAH35POORor4wimiGu5gtVZRBcqMFOZySXLLeFx3VAdG03fYlbAuil3Q Yf8t7N6SvNHqFgIPONAxUnCaWDJwEcVaKJRplJbZGjrsmRVfH9ACTzjnhmxJMI9vK0Bo QZjw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b="i/MXxswx"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id w3-20020a170902e88300b00156ef408753si4451408plg.238.2022.04.20.23.25.30; Wed, 20 Apr 2022 23:25:44 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b="i/MXxswx"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1376286AbiDTHoF (ORCPT + 99 others); Wed, 20 Apr 2022 03:44:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40990 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241235AbiDTHn7 (ORCPT ); Wed, 20 Apr 2022 03:43:59 -0400 Received: from relay7-d.mail.gandi.net (relay7-d.mail.gandi.net [IPv6:2001:4b98:dc4:8::227]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0A5213B00E for ; Wed, 20 Apr 2022 00:41:13 -0700 (PDT) Received: (Authenticated sender: miquel.raynal@bootlin.com) by mail.gandi.net (Postfix) with ESMTPSA id 8C5DB20002; Wed, 20 Apr 2022 07:41:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1650440472; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=zNCqHdoDiIIO8GrtVq7oJYoQzRKdLynJa7XVU5UOud4=; b=i/MXxswxLD8ta458UREAWTH+0ALFDKozqVuToRsulIqcGNM2YAptjjqKvLAiZz5e2gCndm nqgIMYpubMC1APg2m6WTDjD/Vr1Qlh6UnZ0VB1Z8jA0C6U9vNu7p/6L4Xa1k1r9yP/f5cc Y38ZhebeyKs5bP2uC++iRWh1dajZQgWbv2maBEy/L9zS1dDoCTkRP9I669nwiBMtdpvdH5 FUFlJ/S6RDN7TraAHsce2Hd2joNQF2f57iF3u6iAGcORrGXLZ4JcOa8EuYypCrDv5/5xZo TJjB8vhalj11RjqP5K0Yy3yXK1X4BeuP22UxU5lHKoEWJb76svGcRlKTn2l+eA== Date: Wed, 20 Apr 2022 09:41:07 +0200 From: Miquel Raynal To: Liang Yang Cc: , Rob Herring , Richard Weinberger , Vignesh Raghavendra , Jerome Brunet , Neil Armstrong , Martin Blumenstingl , Kevin Hilman , Jianxin Pan , Victor Wan , XianWei Zhao , Kelvin Zhang , BiChao Zheng , YongHui Yu , , , Subject: Re: [PATCH v4 2/2] dt-bindings: nand: meson: refine Amlogic NAND controller driver Message-ID: <20220420094107.4799f15a@xps13> In-Reply-To: <20220402074921.13316-3-liang.yang@amlogic.com> References: <20220402074921.13316-1-liang.yang@amlogic.com> <20220402074921.13316-3-liang.yang@amlogic.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: quoted-printable X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Liang, liang.yang@amlogic.com wrote on Sat, 2 Apr 2022 15:49:20 +0800: > convert txt to yaml and refine the meson NFC clock document. We generally prefer to split this into two changes (yaml conversion then modifications). You need to be very explicit on the changes you bring to this file afterward. Also you may s/refine/fix/ in your title if this really is a correction of something that does not work at all as you suggest. Please mention that due to the other series about the clock changes never being accepted the current binding was never valid/working (again, I'm not sure it's the case on all Amlogic SoCs, so please be very careful about that). And please use a Link: tag to point to the discussion with Neil and Jerome on your MMC/NAND subclock final discussion. > Signed-off-by: Liang Yang > --- > .../bindings/mtd/amlogic,meson-nand.txt | 60 -------------- > .../bindings/mtd/amlogic,meson-nand.yaml | 80 +++++++++++++++++++ > 2 files changed, 80 insertions(+), 60 deletions(-) > delete mode 100644 Documentation/devicetree/bindings/mtd/amlogic,meson-n= and.txt > create mode 100644 Documentation/devicetree/bindings/mtd/amlogic,meson-n= and.yaml >=20 > diff --git a/Documentation/devicetree/bindings/mtd/amlogic,meson-nand.txt= b/Documentation/devicetree/bindings/mtd/amlogic,meson-nand.txt > deleted file mode 100644 > index 5794ab1147c1..000000000000 > --- a/Documentation/devicetree/bindings/mtd/amlogic,meson-nand.txt > +++ /dev/null > @@ -1,60 +0,0 @@ > -Amlogic NAND Flash Controller (NFC) for GXBB/GXL/AXG family SoCs > - > -This file documents the properties in addition to those available in > -the MTD NAND bindings. > - > -Required properties: > -- compatible : contains one of: > - - "amlogic,meson-gxl-nfc" > - - "amlogic,meson-axg-nfc" > -- clocks : > - A list of phandle + clock-specifier pairs for the clocks listed > - in clock-names. > - > -- clock-names: Should contain the following: > - "core" - NFC module gate clock > - "device" - device clock from eMMC sub clock controller > - "rx" - rx clock phase > - "tx" - tx clock phase > - > -- amlogic,mmc-syscon : Required for NAND clocks, it's shared with SD/eMMC > - controller port C > - > -Optional children nodes: > -Children nodes represent the available nand chips. > - > -Other properties: > -see Documentation/devicetree/bindings/mtd/nand-controller.yaml for gener= ic bindings. > - > -Example demonstrate on AXG SoC: > - > - sd_emmc_c_clkc: mmc@7000 { > - compatible =3D "amlogic,meson-axg-mmc-clkc", "syscon"; > - reg =3D <0x0 0x7000 0x0 0x800>; > - }; > - > - nand-controller@7800 { > - compatible =3D "amlogic,meson-axg-nfc"; > - reg =3D <0x0 0x7800 0x0 0x100>; > - #address-cells =3D <1>; > - #size-cells =3D <0>; > - interrupts =3D ; > - > - clocks =3D <&clkc CLKID_SD_EMMC_C>, > - <&sd_emmc_c_clkc CLKID_MMC_DIV>, > - <&sd_emmc_c_clkc CLKID_MMC_PHASE_RX>, > - <&sd_emmc_c_clkc CLKID_MMC_PHASE_TX>; > - clock-names =3D "core", "device", "rx", "tx"; > - amlogic,mmc-syscon =3D <&sd_emmc_c_clkc>; > - > - pinctrl-names =3D "default"; > - pinctrl-0 =3D <&nand_pins>; > - > - nand@0 { > - reg =3D <0>; > - #address-cells =3D <1>; > - #size-cells =3D <1>; > - > - nand-on-flash-bbt; > - }; > - }; > diff --git a/Documentation/devicetree/bindings/mtd/amlogic,meson-nand.yam= l b/Documentation/devicetree/bindings/mtd/amlogic,meson-nand.yaml > new file mode 100644 > index 000000000000..965a2dd20645 > --- /dev/null > +++ b/Documentation/devicetree/bindings/mtd/amlogic,meson-nand.yaml > @@ -0,0 +1,80 @@ > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) > +%YAML 1.2 > +--- > +$id: http://devicetree.org/schemas/mtd/amlogic,meson-nand.yaml# > +$schema: http://devicetree.org/meta-schemas/core.yaml# > + > +title: Amlogic NAND Flash Controller (NFC) for GXBB/GXL/AXG family SoCs Maybe you need to inherit from nand-controller.yaml. > + > +maintainers: > + - liang.yang@amlogic.com > + > +properties: > + compatible: > + enum: > + - "amlogic,meson-gxl-nfc" > + - "amlogic,meson-axg-nfc" > + > + reg: > + maxItems: 2 > + > + '#address-cells': > + const: 1 Not sure this property is needed. > + > + '#size-cells': > + const: 0 Ditto. Plus, this one looks wrong anyway. > + > + reg-names: > + items: > + - const: nfc > + - const: emmc Why do you need the emmc register map? Do you really need to perform a register access there? > + > + interrupts: > + maxItems: 1 > + > + clocks: > + maxItems: 2 > + > + clock-names: > + items: > + - const: core > + - const: device > + > + "#clock-cells": > + const: 1 ? > + > +required: > + - compatible > + - reg > + - '#address-cells' > + - '#size-cells' > + - reg-names > + - interrupts > + - clocks > + - clock-names > + > +additionalProperties: false I will let Rob check that but I think what you need is unevaluatedProperties: false > + > +examples: > + - | > + #include > + #include > + apb { > + #address-cells =3D <2>; > + #size-cells =3D <2>; Not sure you need this upper node in the example. > + nand-controller@7800 { > + #address-cells =3D <1>; > + #size-cells =3D <0>; > + compatible =3D "amlogic,meson-axg-nfc"; > + reg =3D <0x0 0x7800 0x0 0x100>, > + <0x0 0x7000 0x0 0x800>; > + reg-names =3D "nfc", "emmc"; > + > + interrupts =3D ; > + clocks =3D <&clkc CLKID_SD_EMMC_C>, > + <&clkc CLKID_FCLK_DIV2>; > + clock-names =3D "core", "device"; > + > + }; > + }; > +... Thanks, Miqu=C3=A8l