aspeed2500 SPI1 control at run-time with OpenBMC

Andrew Jeffery andrew at aj.id.au
Mon Aug 1 14:25:26 AEST 2022



On Thu, 31 Mar 2022, at 07:40, Oskar Senft wrote:
>> I can
>> switch SPI1 control to master through pinmux-select:
>> [...]
>>
>> However, I cannot access the device. '/dev/mtd6' doesn't exist, and I
>> cannot bind it:
>> $  echo 1e630000.spi >/sys/bus/platform/drivers/aspeed-smc/bind
>> -sh: echo: write error: No such file or directory
>
> Is there an existing interaction (in the code) between the Aspeed SPI
> driver and pinmux? I guess ideally we'd want the SPI driver to talk
> with pinmux to tell it "I'd like to bind the device, can you please
> configure the pins properly" as well as "I just unbound the device.
> pinmux, please release the pins".
>
> With that, I wonder if we somewhat have that already and "pinctrl-0 =
> <&pinctrl_spi1passthru_default>" ends up "confusing" the link between
> the pinmux and the spi driver (since it's actually the opposite of
> what we want)? How is that _supposed_ to work? Maybe there's just a
> bug?

Possibly, getting a driver going for the Aspeed pinmux is hard work :)

>
> Also, I'm wondering: Is it possible to have "&spi1" defined, but not
> bound initially? I guess that's what we want by default?

Zev tried this and got a lot of push-back.

https://lore.kernel.org/all/20211022020032.26980-1-zev@bewilderbeest.net/

Andrew


More information about the Linux-aspeed mailing list