Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp341176ybk; Fri, 15 May 2020 02:04:55 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwceqUKSRTsTxMJLGBx4BpgxxvLJPuzCAfssVSrhGi/CXIaPieoVdrKQzOc7LJQLMVf04u7 X-Received: by 2002:a17:906:3e0d:: with SMTP id k13mr1696826eji.145.1589533494862; Fri, 15 May 2020 02:04:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1589533494; cv=none; d=google.com; s=arc-20160816; b=BABjh6wXa0mpZ1v6DB5KvOucUZtPAdLciXH3qxkw9tEUZUeXXGx2sxfDH4Ce0NhRSg n0OvmtGurkEkjtZ0edKpCQcEh3QKbOWDk30KAWhc5pffS63z2ohDOdZPSXKG77uMxw2S Z94chYg1YE6tlUSDi2IyqP4Ng8yjrg4u+XRm5MTz0Uf1hV4wf65Z6tp9FEzqhnffsPWG tAcIOExaiisjK0Vqo6nuGwtGXDBSkt11jESAhJlusK/JyxkLnVnPMdwXEcB1Avr6Hd6A r/PXsg0Wt8mgXwXOs/5Wzz3lXVHiE/buNEEnUR6b9Wf3j2J577tr6EFTLzNqGrqyVDtd G8ew== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=hq0yOpTmRS0k57eXjZHsS0+DHOsIgaIpHyTmBrD4HFk=; b=DBRiSvwJtQ3CHyBSpOBZQS4wb3woJIdkK5jG9/cCzKqqPx3P7l8Dp1rX5l45oC8ozo T8XvtZJeH/3/ckMw7ArNiGy1LZivfV4CT4L2mKGHKZIFOrVAARBZa649NKZ56ZL/jvrg nvI+0aPRjTjeu5PnzCxL1WXumy6Wz+f+Bh5SGU5I6vZb82CXCTm8kMH9ggxrYVYFeW3l ceegcuFmuDgP80qm7SrqRY3gRrxTcygCt+WtRq4Zp479BEPwuZkLsv3a7QjDnrFpDwPi 6/q7Hs88lCcvFKar5tOMYCOEgpI9z71vW8MLmD85lyH5IZS4GNqzepLR/sFL8BdzGQMN KXeg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@st.com header.s=STMicroelectronics header.b=Opl2LUPY; 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=st.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id n21si926032eja.402.2020.05.15.02.04.30; Fri, 15 May 2020 02:04:54 -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=@st.com header.s=STMicroelectronics header.b=Opl2LUPY; 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=st.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727857AbgEOJDE (ORCPT + 99 others); Fri, 15 May 2020 05:03:04 -0400 Received: from mx08-00178001.pphosted.com ([91.207.212.93]:13450 "EHLO mx07-00178001.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726722AbgEOJDD (ORCPT ); Fri, 15 May 2020 05:03:03 -0400 Received: from pps.filterd (m0046660.ppops.net [127.0.0.1]) by mx07-00178001.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 04F8wViO006970; Fri, 15 May 2020 11:02:39 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=st.com; h=subject : to : cc : references : from : message-id : date : mime-version : in-reply-to : content-type : content-transfer-encoding; s=STMicroelectronics; bh=hq0yOpTmRS0k57eXjZHsS0+DHOsIgaIpHyTmBrD4HFk=; b=Opl2LUPYsf6vW2IRAL6IE1rzsUXTolLe7tnktfb38zOD5SkHAEUlJ6+2JfLhQCyfDomd lJXikqCAu3c5LBiWAi7l8l8xLw4Pj5vl1hgc5sH37vlUt6O3kj+3VSZjlIWc+l7whmbD ufh2PmS4QIUZ3L3+Rc5t8TrXABB81F8N21LGtXs/PB41S2Kr9qCOSrUwlzkg7na/JYNU 21c/X2T4PIgUEOu6z2LpuYnt+u0PX4AR4QaapWqOgq8rfcwA4VBcq7V9nnXgwFk7o3VS aqIImLK7VqWYkLiJmeKFWGm0oRGx81rEinNHJYeFgd0yrpwwipv/q8/4LS6+BEjjT/4P qA== Received: from beta.dmz-eu.st.com (beta.dmz-eu.st.com [164.129.1.35]) by mx07-00178001.pphosted.com with ESMTP id 3100vps1ep-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 15 May 2020 11:02:39 +0200 Received: from euls16034.sgp.st.com (euls16034.sgp.st.com [10.75.44.20]) by beta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 5EA7910002A; Fri, 15 May 2020 11:02:38 +0200 (CEST) Received: from Webmail-eu.st.com (sfhdag6node2.st.com [10.75.127.17]) by euls16034.sgp.st.com (STMicroelectronics) with ESMTP id 4216F2A531B; Fri, 15 May 2020 11:02:38 +0200 (CEST) Received: from [10.211.11.124] (10.75.127.46) by SFHDAG6NODE2.st.com (10.75.127.17) with Microsoft SMTP Server (TLS) id 15.0.1347.2; Fri, 15 May 2020 11:02:37 +0200 Subject: Re: [PATCH v4 06/10] dt-bindings: mtd: update STM32 FMC2 NAND controller documentation To: Rob Herring CC: =?UTF-8?Q?Miqu=c3=a8l_Raynal?= , Richard Weinberger , Vignesh R , Mark Rutland , Greg Kroah-Hartman , Boris Brezillon , MTD Maling List , "linux-kernel@vger.kernel.org" , , , =?UTF-8?Q?Marek_Va=c5=a1ut?= References: <1588756279-17289-1-git-send-email-christophe.kerello@st.com> <1588756279-17289-7-git-send-email-christophe.kerello@st.com> <20200514150028.GB28489@bogus> <9ffc04cf-137f-5ee5-57ff-39a876abfb34@st.com> From: Christophe Kerello Message-ID: <3c860c17-f8dd-6130-861b-afccb9202093@st.com> Date: Fri, 15 May 2020 11:02:36 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset="utf-8"; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [10.75.127.46] X-ClientProxiedBy: SFHDAG7NODE3.st.com (10.75.127.21) To SFHDAG6NODE2.st.com (10.75.127.17) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.216,18.0.676 definitions=2020-05-15_03:2020-05-14,2020-05-15 signatures=0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Rob, On 5/14/20 7:55 PM, Rob Herring wrote: > On Thu, May 14, 2020 at 11:35 AM Christophe Kerello > wrote: >> >> Hi Rob, >> >> On 5/14/20 5:00 PM, Rob Herring wrote: >>> On Wed, May 06, 2020 at 11:11:15AM +0200, Christophe Kerello wrote: >>>> These bindings can be used on SOCs where the FMC2 NAND controller is >>>> in standalone. In case that the FMC2 embeds 2 controllers (an external >>>> bus controller and a raw NAND controller), the register base and the >>>> clock will be defined in the parent node. It is the reason why the >>>> register base address and the clock are now optional. >>>> >>>> Signed-off-by: Christophe Kerello >>>> --- >>>> .../devicetree/bindings/mtd/st,stm32-fmc2-nand.yaml | 19 ++++++++++--------- >>>> 1 file changed, 10 insertions(+), 9 deletions(-) >>>> >>>> diff --git a/Documentation/devicetree/bindings/mtd/st,stm32-fmc2-nand.yaml b/Documentation/devicetree/bindings/mtd/st,stm32-fmc2-nand.yaml >>>> index b059267..68fac1a 100644 >>>> --- a/Documentation/devicetree/bindings/mtd/st,stm32-fmc2-nand.yaml >>>> +++ b/Documentation/devicetree/bindings/mtd/st,stm32-fmc2-nand.yaml >>>> @@ -18,13 +18,15 @@ properties: >>>> >>>> reg: >>>> items: >>>> - - description: Registers >>>> + - description: Registers (optional) >>> >>> The only thing that can be optional are the last entries. You have to do >>> a 'oneOf' with 6 entries and 7 entries. >> >> Ok, so the way to describe the reg property in my case should be: >> reg: >> oneOf: >> - description: FMC2 embeds the NFC controller in standalone. >> items: >> - description: Registers >> - description: Chip select 0 data >> - description: Chip select 0 command >> - description: Chip select 0 address space >> - description: Chip select 1 data >> - description: Chip select 1 command >> - description: Chip select 1 address space >> >> - description: FMC2 embeds the NFC controller and the EBI >> controller. >> items: >> - description: Chip select 0 data >> - description: Chip select 0 command >> - description: Chip select 0 address space >> - description: Chip select 1 data >> - description: Chip select 1 command >> - description: Chip select 1 address space >> >>> >>> And where's your new compatible string for this different h/w? >> >> From NFC controller point of view, it is the same HW. > > That's what everyone says until they have some quirk or integration > difference to handle. > >> In the case that we have 2 controllers embedded, the register base is >> shared. >> The NFC driver will check at probe time the compatible string of its >> parent node. >> In case that it is "st,stm32mp1-fmc2-ebi", then the driver will find the >> register base in the parent node (EBI node), otherwise it will find it >> in the NFC node. >> Is it better to have 2 compatible strings (one for each reg description) >> than checking the parent's compatible string and have only one >> compatible string? > > Why not just put the register base into the child node too? While > overlapping 'reg' regions for siblings is bad, it's fine for child > nodes. I guess since there are chip selects for the child nodes that > may not work here. > > It doesn't hurt to have another compatible. You can always make the > old one a fallback. With different compatibles you can make sure reg > has the right number of entries. > > Rob > I will add a new compatible string to handle the reg property. It will be part of v5. Regards, Christophe Kerello.