From: Herve Codina <herve.codina@bootlin.com>
To: Rob Herring <robh+dt@kernel.org>
Cc: Geert Uytterhoeven <geert+renesas@glider.be>,
Michael Turquette <mturquette@baylibre.com>,
Stephen Boyd <sboyd@kernel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Magnus Damm <magnus.damm@gmail.com>,
Gareth Williams <gareth.williams.jx@renesas.com>,
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 <thomas.petazzoni@bootlin.com>,
Miquel Raynal <miquel.raynal@bootlin.com>
Subject: Re: [PATCH v3 0/9] Add the Renesas USBF controller support
Date: Thu, 8 Dec 2022 09:24:39 +0100 [thread overview]
Message-ID: <20221208092439.6170cf5e@bootlin.com> (raw)
In-Reply-To: <CAL_JsqJiZU=sHVPc92nDNoqUjm7FUb=u0izGYa+irkUW1XmA_w@mail.gmail.com>
Hi Rob,
On Wed, 7 Dec 2022 16:19:42 -0600
Rob Herring <robh+dt@kernel.org> wrote:
> On Wed, Dec 7, 2022 at 10:24 AM Herve Codina <herve.codina@bootlin.com> wrote:
> >
> > 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@bootlin.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.
>
> 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.
>
> 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 = <&sysctrl>). The relationship is already present
with this power-domain link.
If ok, I will do this change in v4 series.
>
> > 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)
>
> Isn't getting a regmap an API?
>
> Rob
--
Hervé Codina, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
next prev parent reply other threads:[~2022-12-08 8:24 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-07 16:24 [PATCH v3 0/9] Add the Renesas USBF controller support Herve Codina
2022-12-07 16:24 ` [PATCH v3 1/9] dt-bindings: PCI: renesas,pci-rcar-gen2: Add depends-on for RZ/N1 SoC family Herve Codina
2022-12-07 16:24 ` [PATCH v3 2/9] ARM: dts: r9a06g032: Add dependency to sysctrl in the PCI bridge Herve Codina
2022-12-07 16:24 ` [PATCH v3 3/9] dt-bindings: PCI: renesas,pci-rcar-gen2: 'depends-on' is no more optional Herve Codina
2022-12-08 8:26 ` Krzysztof Kozlowski
2022-12-08 9:05 ` Herve Codina
2022-12-08 9:46 ` Krzysztof Kozlowski
2022-12-08 15:51 ` Herve Codina
2022-12-09 8:06 ` Krzysztof Kozlowski
2022-12-13 13:22 ` Herve Codina
2022-12-07 16:24 ` [PATCH v3 4/9] of: property: fw_devlink: Add support for "depends-on" Herve Codina
2022-12-07 16:24 ` [PATCH v3 5/9] dt-bindings: usb: add the Renesas RZ/N1 USBF controller Herve Codina
2022-12-07 16:24 ` [PATCH v3 6/9] soc: renesas: r9a06g032-sysctrl: Handle h2mode setting based on USBF presence Herve Codina
2022-12-08 9:05 ` Geert Uytterhoeven
2022-12-13 13:28 ` Herve Codina
2022-12-07 16:24 ` [PATCH v3 7/9] usb: gadget: udc: add Renesas RZ/N1 USBF controller support Herve Codina
2022-12-08 18:07 ` kernel test robot
2022-12-07 16:24 ` [PATCH v3 8/9] ARM: dts: r9a06g032: Add the USBF controller node Herve Codina
2022-12-08 9:09 ` Geert Uytterhoeven
2022-12-13 13:27 ` Herve Codina
2022-12-07 16:24 ` [PATCH v3 9/9] MAINTAINERS: add the Renesas RZ/N1 USBF controller entry Herve Codina
2022-12-07 22:19 ` [PATCH v3 0/9] Add the Renesas USBF controller support Rob Herring
2022-12-08 8:24 ` Herve Codina [this message]
2022-12-08 9:11 ` Geert Uytterhoeven
2022-12-08 20:44 ` Rob Herring
2022-12-13 13:26 ` Herve Codina
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20221208092439.6170cf5e@bootlin.com \
--to=herve.codina@bootlin.com \
--cc=devicetree@vger.kernel.org \
--cc=gareth.williams.jx@renesas.com \
--cc=geert+renesas@glider.be \
--cc=gregkh@linuxfoundation.org \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=linux-clk@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-renesas-soc@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=magnus.damm@gmail.com \
--cc=miquel.raynal@bootlin.com \
--cc=mturquette@baylibre.com \
--cc=robh+dt@kernel.org \
--cc=sboyd@kernel.org \
--cc=thomas.petazzoni@bootlin.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).