[PATCH V3] ARM: dts: stm32: Add KS8851-16MLL ethernet on FMC2

Patrick DELAUNAY patrick.delaunay at st.com
Thu Apr 9 19:38:53 CEST 2020


Dear Marek,

> From: Marek Vasut <marex at denx.de>
> Sent: jeudi 9 avril 2020 13:27
> 
> On 4/1/20 3:30 PM, Patrick DELAUNAY wrote:
> > Hi Marek,
> 
> Hi,
> 
> [...]
> 
> >> +&pinctrl {
> >> +	/* These should bound to FMC2 bus driver, but we do not have one */
> >
> > As temporarily solution (waiting final solution and real FMC2 bus
> > driver) can you define a NO_OP in board device associated to existing
> > compatible = "st,stm32mp15-fmc2"
> 
> NO_OP ?

Sorry, UCLASS_NOP

After debate with Christophe, I agree that i sis other complicated
for temporarily solution. 
 
> >> +	pinctrl-0 = <&fmc_pins_b>;
> >> +	pinctrl-1 = <&fmc_sleep_pins_b>;
> >> +	pinctrl-names = "default", "sleep";
> >> +
> >> +	fmc_pins_b: fmc-0 {
> >> +		pins1 {
> > [...]
> >> +		};
> >> +	};
> >> +
> >> +	fmc_sleep_pins_b: fmc-sleep-0 {
> >> +		pins {
> > [...]
> >> +		};
> >> +	};
> >> +};
> >> +
> >>  &pmic {
> >>  	u-boot,dm-pre-reloc;
> >>  };
> >
> > For example
> >
> > &fmc {
> > 	pinctrl-names = "default", "sleep";
> > 	pinctrl-0 = <& fmc_pins_b>;
> > 	pinctrl-1 = <& fmc_sleep_pins_b>;
> > 	status = "okay";
> > 	#address-cells = <1>;
> > 	#size-cells = <0>;
> > };
> >
> > static const struct udevice_id stm32_fmc2_bus_ids[] = {
> > 	{.compatible = "st,stm32mp15-fmc2},
> > 	{ }
> > };
> >
> > U_BOOT_DRIVER(stm32_fmc2_bus) = {
> > 	.name		= "stm32mp15-fmc2-ids",
> > 	.id		= UCLASS_NOP,
> > 	.of_match	= stm32_fmc2_bus_ids,
> > 	.bind		= stm32_fmc2_bus,
> > };
> 
> That looks like a hack, it would collide with the actual FMC2 driver and it seems
> the FMC2 DT compatible string is not even stable yet (cfr the Linux patches). So I
> am reluctant to do anything like depending on the FMC DT bindings thus far.

You are aligned with Christophe, he push me to accept your temporarily solution.

[...]
> > Use clk and reset driver model and DT, for example:
> >
> > struct clk clk;
> > struct reset_ctl reset;
> >
> > clk_get_by_index_nodev(ofnode, 0, &clk ;
> > clk_get_by_index_nodev(ofnode, 0,  &reset);
> 
> This very much looks like I can just write the entire bus driver by now, instead of
> just writing these few registers in a real simple way, until the bus driver exists.
> 
> But since the bindings aren't stable, I am not very inclined to do that.

I am convinced now (thanks to Christophe) to keep it simple as it is a temporarily
solution.

Reviewed-by: Patrick Delaunay <patrick.delaunay at st.com>

Thanks

Patrick

> 
> [...]


More information about the U-Boot mailing list