Re: [PATCH 1/2] dt-bindings: reset: introduce toshiba,tc9564-reset.yaml

From: Alex Elder

Date: Thu Oct 22 2026 - 15:05:38 EST


On 10/22/26 1:34 PM, Conor Dooley wrote:
On Wed, Oct 21, 2026 at 02:50:41PM -0500, Alex Elder wrote:

. . .

OK. Let's see if I understand what you're saying.

This approach uses:
- A single top-level syscon driver (under drivers/mfd?) which
probes based on a devicetree node compatible string ("toshiba,...")

I'm not sure if it needs to be under mfd (there's some in soc/foo too)
but I guess so.

I'll look at both places and will choose the one that seems
most similar to what I end up with.

- That compatible string will require a (fairly simple) devicetree
binding
- That driver initializes a regmap which will cover the space
defined in its devicetree node (<0x0 0x2000>)

I don't think the driver has to even do this at all, e.g.
sg2044-topsys.c doesn't. Whenever someone requests the regmap it will
get created automatically since you're a syscon.

You're right.

- That driver has an array that uses MFD_CELL_NAME() to define
cells for clock and reset
- That driver will call some form of mfd_add_devices() using the
MFD cell array
- The stmmac driver can refer to this device node with a phandle
property to specify the syscon that provides the regmap it needs

And then, for the clock and reset devices:
- A clock platform driver (under drivers/clk) will match based
on the driver name (matching what's supplied by MFD_CELL_NAME())
- A reset driver will be similar (under drivers/reset)
- As you mentioned, these drivers get at the regmap they need using
device_node_to_regmap() (or dev_get_regmap() or something)

I think "regmap = device_node_to_regmap(pdev->dev.parent->of_node);" is
the correct way to do it.

regmap = device_node_to_regmap(dev_of_node(dev->parent));

- And despite these being separate drivers (from the syscon driver)
they don't have devicetree nodes, and the syscon node itself
defines the clock-controller and reset-controller properties.

Does that sound right? Am I missing anything?

Sounds about right.

This is awesome. I went ahead with this plan and it's working
fine now.

This syscon driver and "sg2044-topsys.c" are awfully trivial,
and they seem like they could be wrapped in something along
the lines of "simple-mfd-i2c.c".

Thank you very much for your help on this Conor.

-Alex

. . .