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 19FB9C433EF for ; Wed, 20 Apr 2022 12:16:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1378439AbiDTMTQ (ORCPT ); Wed, 20 Apr 2022 08:19:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60620 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242236AbiDTMTN (ORCPT ); Wed, 20 Apr 2022 08:19:13 -0400 Received: from relay9-d.mail.gandi.net (relay9-d.mail.gandi.net [217.70.183.199]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B048425284 for ; Wed, 20 Apr 2022 05:16:26 -0700 (PDT) Received: (Authenticated sender: miquel.raynal@bootlin.com) by mail.gandi.net (Postfix) with ESMTPSA id 23321FF805; Wed, 20 Apr 2022 12:16:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1650456985; 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=z6u55jL+XmZA+fHd05psyLDQ16L/uB8ALDHyFrbmkic=; b=aJkjaeqJFBhCS2FkHRCKWdLWfLlpTA4DxfP+ZF47mKkengFjj4PyzO/qrovv6sFgfsbDDJ ynMAI2a5RdfIQv8i8MNgAxwcbSrtg5V0WW6X8E0txevji75qDUZug8PAcwTCcGM/xIBg5L KsneZafPiuvbM1yGwWuEsECzQNCg9jrjJlq8SunHQIgTfaq6x+VsyaziI+wEV2jH+CVMDu Ya8Wel/qLkxBmnLtyMaxQ62hSKk5vz9v3y+zrAPZpnV+iYyOFMsNPYNyXXHV5qjH3YJiR5 M/dmHwPBlQm7ANzENtulJFZ405nEg/VGVqUF7kQ5NAP5YZjsO39tL6uBJVdWVQ== Date: Wed, 20 Apr 2022 14:16:20 +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: <20220420141620.4fd68eef@xps13> In-Reply-To: References: <20220402074921.13316-1-liang.yang@amlogic.com> <20220402074921.13316-3-liang.yang@amlogic.com> <20220420094107.4799f15a@xps13> 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 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Liang, > >> +maintainers: > >> + - liang.yang@amlogic.com > >> + > >> +properties: > >> + compatible: > >> + enum: > >> + - "amlogic,meson-gxl-nfc" > >> + - "amlogic,meson-axg-nfc" > >> + > >> + reg: > >> + maxItems: 2 > >> + > >> + '#address-cells': > >> + const: 1 =20 > >=20 > > Not sure this property is needed. =20 > this is for the subnode, such as nand@0. Yes but if you refer to nand-controller.yaml you no longer need these. > > =20 > >> + > >> + '#size-cells': > >> + const: 0 =20 > >=20 > > Ditto. Plus, this one looks wrong anyway. =20 > this is for the subnode, such as nand@0. do you mean s/''/""/? Sorry, this is not "wrong anyway", my fault. But still, you don't need this property for the same reason as above. > > =20 > >> + > >> + reg-names: > >> + items: > >> + - const: nfc > >> + - const: emmc =20 > >=20 > > Why do you need the emmc register map? Do you really need to perform a > > register access there? =20 > yes, we have to access the emmc register map. because the NFC clock comes= from SDEMMC_CLOCK register. But if it's a clock you should get the clock and call clk_prepare_enable(), you don't need to poke directly in the registers. Do you? > >> +examples: > >> + - | > >> + #include > >> + #include > >> + apb { > >> + #address-cells =3D <2>; > >> + #size-cells =3D <2>; =20 > >=20 > > Not sure you need this upper node in the example. =20 > use the upper node to indicate the "#address-cells" and "#size-cells". if= i do not do that, dt_binding_check will report: > ".....reg:0: [0, 30720, 0, 256] is too long" and > ".....reg:1: [0, 28672, 0, 2048] is too long". ok, maybe, I'll let bindings maintainer review that. > > =20 > >> + 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"; > >> + > >> + }; > >> + }; > >> +... =20 Thanks, Miqu=C3=A8l