Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp679053rwb; Thu, 8 Dec 2022 01:16:25 -0800 (PST) X-Google-Smtp-Source: AA0mqf6Cfs4tuTCCe+Jt01LsW/f3xDAutuma9l4HFiEQDNgz4FWRODAQ/c4Wj30HSchxnLqq8rra X-Received: by 2002:a17:90a:7a81:b0:21a:1b9b:1391 with SMTP id q1-20020a17090a7a8100b0021a1b9b1391mr4630807pjf.28.1670490985652; Thu, 08 Dec 2022 01:16:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1670490985; cv=none; d=google.com; s=arc-20160816; b=iKR9ETBqpxxxlmt/jwtX2F7TnUkZjELO3OMMgiK0coAJn+IAzJj46y6jo+h+bGs95Z HlyakCi5hObjGETzHStstyNtT05MKrc5KVevHGc6rSSiJZfOAUKmO1F0hxrec3urt3qN b9XLNHE49CRj/ceoiHwhtR71+DXizx+B2lC8B0/pzZorYpl3izx7NYFTEcgmwxt5Lq0y JaB0mb4GogpTFT2r6jPWhud81gztXY8miC8fKJzq5S9c01F7qzfQ9L4Z+G51FB+rrfgP 5hu3slcMfssMQKd8aHIh7HKj5ExEM5gXMJAE2hT825VrXbZgOVIgWe9o213vf5HYWE8I jzvw== 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=LeAya0VSpti9hnkxK7KJZn2L3jCrFe71dZh0PwM8o4M=; b=gSrpyEaFgjQiMiPusy1B0ViT1itt5APKpaMWMadPtNIzOKyD1MT9U64zcvia3vJjX5 78+mY89mzk1HZBLBtcmxepAPu42dfFo74tAf9vZI8G27Y03BAPhOKHF6nuG88Rltf8AD yJgtbDFeR7X6p1gF3l47O6nfDZ9A4CZvkMn9r+Z7Slg9ziBIUQgZlmk+F4Wa08oA7Dnj Osfc9BjLsBzaduW2/lOTqjKPfr/WXMvHkdLiWuBMYp6YxIBA80BFDwrZQPMFaKG3kWfy uY5pOTmHI3VQr2mhoEbOFNj/D4WPm1CaRH9DLkW4iZXRX8A3iTaFNMNhACzr2DiTUouF J5hg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=Ob1mKJGg; 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 d22-20020a63d716000000b00476db6fe4cfsi21375062pgg.829.2022.12.08.01.16.15; Thu, 08 Dec 2022 01:16:25 -0800 (PST) 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=Ob1mKJGg; 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 S229592AbiLHIYy (ORCPT + 73 others); Thu, 8 Dec 2022 03:24:54 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33288 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229546AbiLHIYw (ORCPT ); Thu, 8 Dec 2022 03:24:52 -0500 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 87EB110B52; Thu, 8 Dec 2022 00:24:46 -0800 (PST) Received: (Authenticated sender: herve.codina@bootlin.com) by mail.gandi.net (Postfix) with ESMTPSA id BE90120005; Thu, 8 Dec 2022 08:24:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1670487883; 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=LeAya0VSpti9hnkxK7KJZn2L3jCrFe71dZh0PwM8o4M=; b=Ob1mKJGguYVoZg10T2JV0hnjOIefvmLjS80xg/9qkLZft+dH8O6lOo9VeFhN5X474piEsW fBNIgVFELeFqGllqebNYkUsWnuLRh7Yb9fhS6PPkK/vtuJ9QvJ5gi1rAyFxZ/9LeO4ULlW xV+MV1cjiZXom9/QqQOkR6R/lc+g6K/xW9YlCitY+ZX0yKd73GYOOz/xAi7fG2irOQ6v9t vAcRrBU+a1SUVrpbWXP40rkOEQcdTFPE92BJA+rqW0ojmqBJGLH5NjbnSlwxM4vJeZ9Gps h5/lrDoN6lyko52fUkTSUGCPPI2jjKD3/OVq6QcOzD4Fc3KOBPqS2tSLTfUOmw== Date: Thu, 8 Dec 2022 09:24:39 +0100 From: Herve Codina To: Rob Herring Cc: Geert Uytterhoeven , Michael Turquette , Stephen Boyd , Krzysztof Kozlowski , Greg Kroah-Hartman , Magnus Damm , Gareth Williams , linux-renesas-soc@vger.kernel.org, linux-clk@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org, Thomas Petazzoni , Miquel Raynal Subject: Re: [PATCH v3 0/9] Add the Renesas USBF controller support Message-ID: <20221208092439.6170cf5e@bootlin.com> In-Reply-To: References: <20221207162435.1001782-1-herve.codina@bootlin.com> Organization: Bootlin X-Mailer: Claws Mail 4.1.1 (GTK 3.24.34; x86_64-redhat-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW,SPF_HELO_NONE, SPF_PASS 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 Rob, On Wed, 7 Dec 2022 16:19:42 -0600 Rob Herring wrote: > On Wed, Dec 7, 2022 at 10:24 AM Herve Codina w= rote: > > > > Hi, > > > > This series add support for the Renesas USBF controller (USB Device > > Controller) available in the Renesas RZ/N1 SoC. > > > > Based on previous review: > > https://lore.kernel.org/all/20221114111513.1436165-3-herve.codina@boo= tlin.com/ > > > > A new strategy is proposed to handle the H2MODE bit from CFG_USB > > register compared to the previous versions on the series. As a > > reminder, H2MODE bit allows to configure the internal USB Port > > interface for two hosts or one host and one device. =20 >=20 > Is this case any different from all the phandle properties we have in > bindings that point to some misc registers somewhere else you need to > poke? If so, I'm not really a fan of duplicating the information. Our case is that there is a bit in a register that affect several devices. This bit must be set before the devices are started. If this bit is changed while affected devices are running, system hangs can occurs (datasheet). So, in order to do that we need the device in charge to set this bit (sysctrl) to set this bit before other devices (USBF and PCI bridge) were started. At sysctrl level, the bit is set during the probe() call. The property 'depends-on' aim is to ensure the probe() calls order between provider (sysctrl) and consumers (USBF and PCI bridge). regmap and syscon are used to export registers from one device to an other and the probe() calls order is not ensured by the core or regmap infrastructure. Indeed, the regmap provider probe() will not be called if the regmap provider was not probed before the consumer ask for the regmap. https://elixir.bootlin.com/linux/latest/source/drivers/mfd/syscon.c#L152 https://elixir.bootlin.com/linux/latest/source/drivers/mfd/syscon.c#L43 No specific action synchronisation are done with regmap/syscon other than the regmap creation itself. I don't think the regmap/syscon will help in our case. >=20 > We also have cases of of_find_compatible_node(NULL, NULL, > "foo-bar-syscon") which is a dependency expressed in the driver, but > not DT. In either case, adding 'depends-on' would be an ABI break as > you are requiring a DT change. In order to avoid the DT change, I can keep the 'depends-on' optional in the PCI bridge binding. This will be functionnal as sysctrl is already used in this node (power-domain =3D <&sysctrl>). The relationship is already present with this power-domain link. If ok, I will do this change in v4 series. >=20 > > This new strategy is: > > - Add the new generic 'depends-on' property in the device tree. > > > > This generic property expresses an simple functionnal dependency > > that does not rely on a specific topic. It is an 'order only' > > dependency that can be used for dependencies between consumers > > and producers that are not based on a specific infrastructure > > and not need other relationship than this simple 'order only' > > (ie no API is provided between the provider and the consumer) =20 >=20 > Isn't getting a regmap an API? >=20 > Rob --=20 Herv=C3=A9 Codina, Bootlin Embedded Linux and Kernel engineering https://bootlin.com