Re: How to put an 'if' statement in a dts?

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

 



Hi Chris,

On Wed, Sep 14, 2016 at 2:35 PM, Chris Brandt <Chris.Brandt@xxxxxxxxxxx> wrote:
> On the RZ/A1 RSK board, the one card slot can be used for SDHI or MMC (SDHI1 and MMC share the same pins).
>
> For the r7s72100-rskrza1.dts, I would like to add in support for both SDHI1 and MMC for someone to use as reference. Of course they should only pick one.
>
> So my options are:
>
> A) Make some type of an 'if' statement in the dts that can be selected at boot time

Ugh, doesn't sound right.

> B) Leave one as 'status = "disabled"', and then the user just has to switch around the 'status' properties before boot (either modify the dts file or change it in u-boot with the fdt command)

I take it you can actually use both SDHI or MMC on RSK, without
changing a jumper?

> C) Pick one and forget about the other (because you're not allowed to have inactive nodes in your board dts files)

Probably SDHI is the best performing option?

You could also provide a DT overlay for switching to MMC.
But upstream DT overlay support is incomplete.
Cfr. http://elinux.org/R-Car/DT-Overlays

> The MMC also needs a 3.3v "regulator-fixed" node, so it would be nice to put that in the 'if' statement too, but since the dts for the rskrza1 board is mostly for reference, it's not a big deal if that one is just always active.

On Genmai, the regulator setup is more complex (seem to support both
3.3V and 5V),
so if we add support for that, there's a second example.

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@xxxxxxxxxxxxxx

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds



[Index of Archives]     [Linux Samsung SOC]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux