[PATCH 09/16] pinctrl: renesas: Add RZ/G2L PFC driver

Biju Das biju.das.jz at bp.renesas.com
Wed Oct 4 15:56:08 CEST 2023


Hi Marek,
> Subject: Re: [PATCH 09/16] pinctrl: renesas: Add RZ/G2L PFC driver
> 
> On 10/4/23 14:56, Biju Das wrote:
> 
> [...]
> 
> >>>>> +		return -EINVAL;
> >>>>> +	}
> >>>>> +
> >>>>> +	uc_priv->gpio_count = args.args[2];
> >>>>> +	return rzg2l_pfc_enable(dev);
> >>>>> +}
> >>>>> +
> >>>>> +U_BOOT_DRIVER(rzg2l_pfc_gpio) = {
> >>>>> +	.name		= "rzg2l-pfc-gpio",
> >>>>> +	.id		= UCLASS_GPIO,
> >>>>> +	.ops		= &rzg2l_gpio_ops,
> >>>>> +	.probe		= rzg2l_gpio_probe,
> >>>>> +};
> >>>>
> >>>> Can you please split the GPIO and PFC drivers into separate files ?
> >>>
> >>> I assume you mean gpio and pinctrl here - the PFC handles both. I
> >>> can move the gpio driver out to drivers/gpio.
> >>
> >> Thanks. R-Car already does it that way.
> >
> > RCar has separate GPIO block and Pin control block So we have separate
> > drivers.
> >
> > On RZ/G2L we have only pinctrl block, ie, the reason it is integrated
> > driver in linux.
> >
> > If you make separate driver, how do you plan to share resources in u-
> boot. For eg: register/clock/reset??
> 
> Clock and reset are easy, just grab them twice, once in each driver.
> 
> Registers, well ... have a look at gen3_cpg_bind() in
> drivers/clk/renesas/clk-rcar-gen3.c . Specifically, see
> device_bind_with_driver_data() and how one common "superdriver" can get
> bound to an IP, and then instantiate and bind two "subdrivers" which each
> obtain resources claimed by the "superdriver" via (in this case) the 'info'
> parameter. That should work, right ?

Yes, it should work.

Thanks for the explanation.

Cheers,
Biju


More information about the U-Boot mailing list