Re: [PATCH v4 7/8] soc: starfive: Add socinfo driver for JHB100 SoC

Changhuang Liang <[email protected]>
Newsgroups org.kernel.vger.linux-clk,org.infradead.lists.linux-riscv,org.kernel.vger.linux-devicetree,org.kernel.vger.linux-kernel
Message-ID <ZQ4PR01MB1202F016AD1F1E699429DDC0F2DB2@ZQ4PR01MB1202.CHNPR01.prod.partner.outlook.cn>
Hi ,Conor

Thanks for the review.

> On Wed, Aug 12, 2026 at 10:37:16AM +0000, Changhuang Liang wrote:
> > Hi, Conor
> >
> > Thanks for the review.
> >
> > > On Tue, Aug 11, 2026 at 05:36:19AM +0000, Changhuang Liang wrote:
> > >
> > > > > On Sat, Aug 08, 2026 at 06:50:53PM -0700, Changhuang Liang wrote:
> > >
> > > > > > +static int __init starfive_socinfo_init(void) {
> > > > > > +	struct soc_device_attribute *attrs;
> > > > > > +	struct soc_device *soc_dev;
> > > > > > +	const char *machine = NULL;
> > > > > > +	struct device_node *np;
> > > > > > +	struct regmap *regmap;
> > > > > > +	char rev_char;
> > > > > > +	u32 rev_id;
> > > > > > +	int ret;
> > > > > > +
> > > > > > +	np = of_find_compatible_node(NULL, NULL,
> > > > > > +"starfive,jhb100-sys0-syscon");
> > > > >
> > > > > Remind me again why this is not just probed as an mfd cell from
> > > > > the syscon driver?
> > > > >
> > > > > (Hint: please put this info in the commit message).
> > > >
> > > > The discussion result with Krzysztof at that time is recorded here:
> > > > https://lore.kernel.org/all/20260405-strong-watchful-marmot-fdfad6
> > > > @quo
> > > > ll/
> > > >
> > > > One register should not be treated as a separate device node.
> > >
> > > That's a different question. In the case of an mfd cell probed from
> > > the syscon driver there would be no devicetree modifications
> > > required compared to what you have now. e.g. sg2044-topsys.c
> >
> > This seems feasible, and I can introduce this modification in the next
> version.
> 
> 
> In fact, you don't even need the mfd cell, because your driver is going to be in
> drivers/soc/starfive anyway? You can just bind directly to the
> sys0 syscon I think.

I suddenly realized that I missed one issue: starfive,jhb100-sys0-syscon is already 
bound to the PLL driver by default, I can't use it to bind another device anymore. 

which is why I used 

np = of_find_compatible_node(NULL, NULL, "starfive,jhb100-sys0-syscon"); 

in jhb100-socinfo.c.

So it seems the MFD cell approach isn't really feasible either?

Best Regards,
Changhuang
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.