On Oct 3, 2018, at 6:15 AM, Vincent - VLoTech <vincent@...> wrote:
Hi all,
I'm currently extending the support for the sam4s and same70, by adding the SPI driver for it.
To create / extend a board which actually uses the SPI bus, I noticed there several different approaches to handle the pinmux. 1) device tree spec at board level assigning peripheral pins. 2) pinmux.c file using pinmux interface 3) pinmux.c file useing pinmux device interface
What is the preferred way, or better said, what is the design pattern to apply for now and in the near future.
Looking forward to your insights.
Kind regards,
Vincent van der Locht
I’d avoid device tree for right now, it is were we want to be, but requires a bunch of other work we are making progress on.
So we should have a pinmux driver that sets pins, and than we have board level pin settings. You can look at boards/arm/frdm_k64f/pinmux.c and drivers/pinmux/pinmux_mcux.c for an example/pattern to use.