Received: by 2002:a05:6a10:eb17:0:0:0:0 with SMTP id hx23csp257200pxb; Tue, 7 Sep 2021 23:59:13 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz/MhSfghKgi2J31bvxhk/w/meubMKaZFQ5AiyabvCGSFZneUX9DYDUz3iGSA6MDr2UxEdd X-Received: by 2002:a50:ee94:: with SMTP id f20mr2282981edr.117.1631084352927; Tue, 07 Sep 2021 23:59:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631084352; cv=none; d=google.com; s=arc-20160816; b=pZs9PSZF7p+PagAFRqTRodSMAKWbRmzWnX46EvY4P/TR8E8WgooItwbSVTavVSkvbJ 88+bnRl7lPPXL0D3+Og9Km4tsK564uKuGWTF9BZaMiGFNWSwnSQcFUotBmppnJXlrykh EjS0vycWtcFX2EgIbdyC65A9FK3xLGWOIFLIvwyef+d6Vi8TdXmBdo5OVaQwwCKjRaT1 4N/nWFqnqQkynjVG0tydIu+rsoujz7ZteDGCrLW+MHxFlZReJGFp4A4PXgy5sXNYe3vO pbA+89VkRotd0sYrqJ8leXYZJP0nUf31YOcIzKc04PcCE9cBiFnDeuycG6hCCxsCDBZX N7eQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature; bh=0zmk5fh6QzbNoDKtMnv+xBOvxbuMyK1sSmo7mx42VK0=; b=V6EL7HKXehQV5MqIIkdOAvNHhnBBzjxgzTJAEBtxGsYvkSghPw0Awja3mariDDHrXC Uc6e3D1aWoGBQafpbWCtTsH2LK8fiLNd8Z2oj2woLGZd21Gps1A98gkT/V08n8S48SX4 AC/QKknp1lImcc3VR1zMBjXP+juGTg+mY5135S/M4wm1fmMrHJUvaZLed+n9Mss8kF3Z N1oaidT2jBe9Yv4+cTQ1TmqVx6CbRK/2CZvPmq3Rwzaeb2g+0owmXI6hhLQDcYjbkbyq ff/lG4VI5+LY/lN8l2E1dW3ixPi2heFKXDy/YKwigj7Z6tnlW4iS9WcPFAOPRIgIrN/X Yn6g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=YGmWnvzd; 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 x18si1378871ejd.405.2021.09.07.23.58.39; Tue, 07 Sep 2021 23:59:12 -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=YGmWnvzd; 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 S1347897AbhIHG4u (ORCPT + 99 others); Wed, 8 Sep 2021 02:56:50 -0400 Received: from mail.kernel.org ([198.145.29.99]:36620 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1347781AbhIHG4s (ORCPT ); Wed, 8 Sep 2021 02:56:48 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 44D6361108; Wed, 8 Sep 2021 06:55:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1631084140; bh=FrGPJdJBZEV5HyoegsQjNhTyFYyz8tCFNEFbAKy1Jfw=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From; b=YGmWnvzdr5tyGnxxSxNfsmNNoiU0KPZR+G0pMPFtuw18kg87eAU7fKcW4IYfm2G6k sZ+vQuPgkKwArV56ZeCbs2k/Eh4rBl+wn4JVFonhlmEA8vqlJt7hkSX/s9V13jMjbS N9M1UY7SJCx7ZjYx8KrKKUsI9pyrryKyLPs4JlIhXToJYyAjvFd9WMdmZ3HG1c83EY OoxhCqiau1fgfISAeWmry51N0+NxM/WzFRpl+3lWCXXq4tLBuQTpIlHUT98VdKeKTP cyEhWVJ1MFRmzNcYoio52+d0e7ok3eMCiAt3/+GeBT4rE5BQN8V4GD40YDq3ygpn4o vLw/uGDEghbCg== Subject: Re: [PATCH v3 5/8] dt-bindings: mtd: ti,gpmc-nand: Convert to yaml To: Rob Herring Cc: Miquel Raynal , Grygorii Strashko , tony@atomide.com, nm@ti.com, lokeshvutla@ti.com, nsekhar@ti.com, krzysztof.kozlowski@canonical.com, devicetree@vger.kernel.org, linux-mtd@lists.infradead.org, linux-omap@vger.kernel.org, linux-kernel@vger.kernel.org References: <20210907113226.31876-1-rogerq@kernel.org> <20210907113226.31876-6-rogerq@kernel.org> <20210907160317.2ec5304a@xps13> <20210907183545.3e281b7d@xps13> <2c6491c2-dae8-c8b3-9f8c-14a7583720f1@kernel.org> From: Roger Quadros Message-ID: <1afc71e6-5104-2ce1-f176-97f4583507ef@kernel.org> Date: Wed, 8 Sep 2021 09:55:36 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.13.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 08/09/2021 01:24, Rob Herring wrote: > On Tue, Sep 7, 2021 at 11:57 AM Roger Quadros wrote: >> >> Hi Miquel, >> >> On 07/09/2021 19:35, Miquel Raynal wrote: >>> Hi Grygorii, >>> >>>>> >>>>>> + >>>>>> + nand-bus-width: >>>>>> + description: >>>>>> + Bus width to the NAND chip >>>>>> + $ref: /schemas/types.yaml#/definitions/uint32 >>>>>> + enum: [8, 16] >>>>>> + default: 8 >>>>> >>>>> This is part of nand-controller.yaml binding and should not be there. >>>>> >>>>>> + >>>>>> +allOf: >>>>>> + - $ref: "../memory-controllers/ti,gpmc-child.yaml" >>>>> >>>>> Maybe you need to reference the nand controller bindings as well >>>>> >>>> >>>> This will not work out of the box :( as nand-controller.yaml defines both >>>> nand controller and nand memory. It potentially might work if it will be possible to split >>>> nand memory definition (or nand memory properties) out of and-controller.yaml, similarly to >>>> ti,gpmc-child.yaml from this series. >>> >>> What you think would be the issue? >> >> The issue is that dt_binding checks will fail if I reference nand-controller.yaml >> as we currently represent the controller as follows >> >> memory-controller { /* GPMC controller */ >> memory-controller-props; >> nand-chip { >> /* @chip select 0 */ >> nand-controller-props; >> memory-controller-timing-props; >> chip-props; >> } >> nand-chip { >> /* @chip select 1 */ >> nand-controller-props; >> memory-controller-timing-props; >> chip-props; >> } >> nor-chip { >> /* @chip select 2 */ >> memory-controller-timing-props; >> chip-props; >> } >> } >> >> The NAND controller IO registers are at different addresses for different >> chip select regions. Also, this is one way we can specify GPMC settings/timings >> for different chip selects. >> >>> >>> I am not opposed to split nand-controller.yaml into >>> nand-controller.yaml and nand-chip.yaml if it simplifies the >>> description of controllers but I don't get why it would be needed. In >>> particular since we expect all drivers to support the >>> >>> nand-controller { >>> controller-props; >>> nand-chip { >>> chip-props; >>> } >>> } >> >> Changing to this format will cause a lot of churn in DT files, which I'm not sure >> if it gives enough benefit. >> TI platforms will never have 2 NAND chips in the same chip select region. > > Probably best to just leave this alone. Unless this is getting used in > new chips? If so, I'd say it's a separate change. > >>> organization which has been enforced since at least 2018. Having a >>> controller vs. chip representation is fundamentally right. But here I >>> see how "legacy" are these bindings with so much unneeded specific "ti," >>> properties... On one side it would be good to verify that the driver >>> supports this representation (which I believe is true) and on the other >>> side maybe it's time to advertise "better" bindings as well. >> >> Yes, I'm OK to mark ti specific properties deprecated and use standard NAND chip >> bindings. > > I don't think it's really worth it to go half way using common > properties but not the common structure. I agree. We will be having new chips that will use this driver but we will migrate to new common structure when adding support for those chips. So I will leave this patch as it is for now. cheers, -roger