On 09/12/2018 02:16 PM, Hubert Denkmair wrote: > Thank you Chris! > > Unfortunately, using multiple DT overlays is not a good solution for me; > I want the raspi bootloader to load the overlay from the hat's EEPROM, > and afaik, there can be only one overlay per EEPROM. > > For now, I'm using a udev rules file: > --- > ACTION=="add", SUBSYSTEM=="net", DEVPATH=="/devices/platform/soc/*/spi0.0/net/can?", NAME="can0" > ACTION=="add", SUBSYSTEM=="net", DEVPATH=="/devices/platform/soc/*/spi0.1/net/can?", NAME="can1" > ACTION=="add", SUBSYSTEM=="net", DEVPATH=="/devices/platform/soc/*/spi1.0/net/can?", NAME="can2" > ACTION=="add", SUBSYSTEM=="net", DEVPATH=="/devices/platform/soc/*/spi1.1/net/can?", NAME="can3" > --- > > But that still requires installing that file in the linux image; > If possible, I'd still prefer some way to achieve this in the device tree overlay. Try to add support for "of_alias_get_id()" to the driver, similar to: https://elixir.bootlin.com/linux/latest/source/drivers/tty/serial/imx.c#L2152 And an alias section to the dtsi: https://elixir.bootlin.com/linux/latest/source/arch/arm/boot/dts/imx6qdl.dtsi#L40 But as there is an udev solution kernel people don't seem to like this idea nowadys... Marc -- Pengutronix e.K. | Marc Kleine-Budde | Industrial Linux Solutions | Phone: +49-231-2826-924 | Vertretung West/Dortmund | Fax: +49-5121-206917-5555 | Amtsgericht Hildesheim, HRA 2686 | http://www.pengutronix.de |
Attachment:
signature.asc
Description: OpenPGP digital signature