Re: [PATCH v5] ARM/mmc: Convert old mmci-omap to GPIO descriptors

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, May 18, 2023 at 12:13 AM Aaro Koskinen <aaro.koskinen@xxxxxx> wrote:
> On Wed, May 17, 2023 at 11:35:38PM +0200, Linus Walleij wrote:
> > A recent change to the OMAP driver making it use a dynamic GPIO
> > base created problems with some old OMAP1 board files, among
> > them Nokia 770, SX1 and also the OMAP2 Nokia n8x0.
> >
> > Fix up all instances of GPIOs being used for the MMC driver
> > by pushing the handling of power, slot selection and MMC
> > "cover" into the driver as optional GPIOs.
>
> OMAP2 and N8x0 uses DT, so could the GPIO table data pushed there instead
> of the board file?

The board file is actually supplying "auxdata" which is a (unrecommended)
way of augmenting existing device tree nodes with some extra platform
data.

Nevertheless: it could. The current MMC nodes for n8x0 looks like this:

                msdi1: mmc@4809c000 {
                        compatible = "ti,omap2420-mmc";
                        ti,hwmods = "msdi1";
                        reg = <0x4809c000 0x80>;
                        interrupts = <83>;
                        dmas = <&sdma 61 &sdma 62>;
                        dma-names = "tx", "rx";
                };

As you can see this node has no distinction of the two "slots" that is
used by the MMC, so the device tree bindings will need to be augmented
to define the two slots (I guess as separate nodes?), so we can put the
GPIOs in the right slot.

Then these bindings are text based, so they need to be converted to
YAML at this point, before adding props.

So the task quickly grows a bit out of hand :/ also I feel very insecure
about such things since I can't test it on hardware...

Ideally everything in arch/arm/mach-omap2/board-n8x0.c should be
put into the device tree and/or pushed down into respective driver,
but at least this makes it a bit easier to fix it, I hope.

Yours,
Linus Walleij




[Index of Archives]     [Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux