linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Linus Walleij <linus.walleij@linaro.org>
To: Lee Jones <lee.jones@linaro.org>,
	Ulf Hansson <ulf.hansson@linaro.org>,
	Per Forlin <per.forlin@stericsson.com>,
	Johan Rudholm <johan.rudholm@stericsson.com>
Cc: linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org,
	STEricsson_nomadik_linux@list.st.com,
	linus.walleij@stericsson.com, arnd@arndb.de,
	Loic Pallardy <loic.pallardy@stericsson.com>,
	Gabriel FERNANDEZ <gabriel.fernandez@stericsson.com>
Subject: Re: [PATCH 04/19] ARM: ux500: Add SDI (MMC) support to the HREF Device Tree
Date: Mon, 10 Sep 2012 02:51:04 -0700	[thread overview]
Message-ID: <CACRpkdYHd+oDMiwwodkPAMkFW0h4t+7-EzpoJ9jkkpSLgankow@mail.gmail.com> (raw)
In-Reply-To: <1347016499-29354-5-git-send-email-lee.jones@linaro.org>

On Fri, Sep 7, 2012 at 1:14 PM, Lee Jones <lee.jones@linaro.org> wrote:

I really want Ulf, Per or Johan to have a look at this, so Cc:ing them..

> +               // External Micro SD slot

Are C99 comments OK in DTS files?
Else /* comment like that */
(See Documentation/CodingStyle)
Ah well, nitpick, I don't care really.

> +               sdi@80126000 {

Not just sdi@ please, these have names in the current
board code that comes from the DB8500 reference manual.

In this case 80120000 is the per1 (peripheral group one),
and offset 6000 in that group is SDI0.

So the quick fix is to name it like:

sdi0_per1@80126000

But basically we have a deeper problem here. I think the
ux500 Device Tree should be arranged after peripheral
block so it actually reflects the hardware (yeah, a big
fat sorry for not realizing that before....)

So it should *actually* be like:

per_group_1 {
    sdi0@80126000 {
    };
};

per_group_2 {
    sdi4@80114000 {
    };
    sdi1@80118000 {
    };
    sdi3@80119000 {
    };
};

Then I do not know if it's also possible to use the
peripheral group offsets for the registers? Can you do
this thing and have it working?

per_group_1 {
    reg = <0x80110000 0x10000>;
    sdi0@80126000 {
        reg = <0x6000 0x10000>;
    };
};

I.e. so getting the regs for sdi0 would give 0x80116000?

Any of the above proper solutions require a heavy patch
on the SoC .dtsi pushing all peripherals to their
peripheral group to go in first of course.

> +                       arm,primecell-periphid = <0x10480180>;
> +                       max-frequency = <50000000>;
> +                       bus-width = <8>;

Isn't *THIS* (sdi0) the one which is 4 bits? (SD cards only have 4
lines...)

> +                       mmc-cap-sd-highspeed;
> +                       mmc-cap-mmc-highspeed;
> +                       vmmc-supply = <&ab8500_ldo_aux3_reg>;
> +
> +                       #gpio-cells = <1>;

Arnd already complained about this...

> +                       cd-gpios  = <&gpio2 31 0x4>; // 95

95? 95 what? Lightning McQueen?
http://en.wikipedia.org/wiki/Lightning_McQueen

Elaborate or drop ;-)

> +
> +                       status = "okay";
> +               };
> +
> +               // WLAN SDIO channel
> +               sdi@80118000 {
> +                       arm,primecell-periphid = <0x10480180>;
> +                       max-frequency = <50000000>;
> +                       bus-width = <4>;

Isn't this 8 bit capable?

> +
> +                       status = "okay";
> +               };
> +
> +               // PoP:ed eMMC
> +               sdi@80005000 {
> +                       arm,primecell-periphid = <0x10480180>;
> +                       max-frequency = <50000000>;
> +                       bus-width = <8>;
> +                       mmc-cap-mmc-highspeed;
> +
> +                       status = "okay";
> +               };
> +
> +               // On-board eMMC
> +               sdi@80114000 {
> +                       arm,primecell-periphid = <0x10480180>;
> +                       max-frequency = <50000000>;
> +                       bus-width = <8>;
> +                       mmc-cap-mmc-highspeed;
> +                       vmmc-supply = <&ab8500_ldo_aux2_reg>;
> +
> +                       status = "okay";
> +               };
>         };
>  };

Inspecting board-mop500-sdi.c I see missing pieces that gets me
worried about whether this device tree even works, and which
I am sure has regressions in highly demanding usecases because
these things are there for a reason:

- .sigdir is defined with some flags for the MMCI platform data
  for sdi0 (SD card), and no DT bindings are available for it.
  I think Ulf had a patch for pushing this into the driver that will
  need to go in first.

- SDI0 has a callback .ios_handler that I guess must be passed
  in using platform data. If you don't have this, level-shifting
  cards will not be run at optimal voltage, symptom: you cannot
  gear up signals level and will get bad blocks at some high
  speeds on some cards.

(The .ocr_mask is surplus though!)

I really think the above needs to be resolved (preferrably
by pusing some of Ulfs MMCI patches) before we can move
on with MMC DT.

Yours,
Linus Walleij

  parent reply	other threads:[~2012-09-10  9:51 UTC|newest]

Thread overview: 87+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-07 11:14 [PATCH 00/19] First HREF Device Tree enablement patch-set Lee Jones
2012-09-07 11:14 ` [PATCH 01/19] ARM: ux500: Add skeleton Device Tree for the HREF reference board Lee Jones
2012-09-10  8:47   ` Linus Walleij
2012-09-14  9:37     ` Lee Jones
2012-09-14 14:01       ` Linus Walleij
2012-09-07 11:14 ` [PATCH 02/19] ARM: ux500: Add UART support to the HREF Device Tree Lee Jones
2012-09-10  8:49   ` Linus Walleij
2012-09-07 11:14 ` [PATCH 03/19] ARM: ux500: Pass SDI DMA information though AUX_DATA to MMCI Lee Jones
2012-09-10  8:50   ` Linus Walleij
2012-09-07 11:14 ` [PATCH 04/19] ARM: ux500: Add SDI (MMC) support to the HREF Device Tree Lee Jones
2012-09-07 12:29   ` Arnd Bergmann
2012-09-07 12:39     ` Lee Jones
2012-09-10  9:51   ` Linus Walleij [this message]
2012-09-07 11:14 ` [PATCH 05/19] ARM: ux500: Stop registering HREF's SDI devices from platform data Lee Jones
2012-09-07 12:30   ` Arnd Bergmann
2012-09-07 11:14 ` [PATCH 06/19] ARM: ux500: Add nodes for the MSP into the HREF Device Tree Lee Jones
2012-09-10  9:53   ` Linus Walleij
2012-09-14  9:23     ` Lee Jones
2012-09-14 14:00       ` Linus Walleij
2012-09-07 11:14 ` [PATCH 07/19] ARM: ux500: Add all encompassing sound node to " Lee Jones
2012-09-10  9:56   ` Linus Walleij
2012-09-14  9:20     ` Lee Jones
2012-09-07 11:14 ` [PATCH 08/19] ARM: ux500: Stop registering Audio devices for HREF when DT is enabled Lee Jones
2012-09-10  9:57   ` Linus Walleij
2012-09-07 11:14 ` [PATCH 09/19] ARM: ux500: Enable SSP (SPI) for HREF when booting Device Tree Lee Jones
2012-09-10 11:11   ` Linus Walleij
2012-09-14  9:18     ` Lee Jones
2012-09-17 17:03     ` Roland Stigge
2012-09-18 12:08       ` Linus Walleij
2012-09-18 12:13         ` Roland Stigge
2012-09-07 11:14 ` [PATCH 10/19] ARM: ux500: Remove redundant #gpio-cell properties from HREF and Snowball DT Lee Jones
2012-09-10 11:12   ` Linus Walleij
2012-09-14  9:10     ` Lee Jones
2012-09-14 13:58       ` Linus Walleij
2012-09-07 11:14 ` [PATCH 11/19] ARM: ux500: Add all known I2C sub-device nodes to the HREF DT Lee Jones
2012-09-10 11:34   ` Linus Walleij
2012-09-14  8:47     ` Lee Jones
2012-09-20  6:51       ` Linus Walleij
2012-09-18 15:49     ` Lee Jones
2012-09-07 11:14 ` [PATCH 12/19] i2c-nomadik: Register sub-devices when passed via Device Tree Lee Jones
2012-09-10 11:42   ` Linus Walleij
2012-09-12 10:52     ` Wolfram Sang
2012-09-14  8:27       ` Lee Jones
2012-09-14  8:41         ` Wolfram Sang
2012-09-14  9:02           ` Lee Jones
2012-09-14  9:39             ` Wolfram Sang
2012-09-14 10:15               ` Lee Jones
2012-09-14 11:32                 ` Wolfram Sang
2012-09-19 20:12                   ` Lee Jones
2012-10-06 11:25                     ` Wolfram Sang
2012-09-14  8:22     ` Lee Jones
2012-09-07 11:14 ` [PATCH 13/19] ARM: ux500: Stop registering I2C sub-devices for HREF when DT is enabled Lee Jones
2012-09-10 12:56   ` Linus Walleij
2012-09-07 11:14 ` [PATCH 14/19] ARM: ux500: Apply tc3589x's GPIO/IRQ properties to HREF's DT Lee Jones
2012-09-10 12:58   ` Linus Walleij
2012-09-14  8:33     ` Lee Jones
2012-09-07 11:14 ` [PATCH 15/19] mfd: Don't convert just one IRQ using irqdomain if a range is provided Lee Jones
2012-09-07 12:35   ` Arnd Bergmann
2012-09-07 12:46     ` Lee Jones
2012-09-07 13:37       ` Arnd Bergmann
2012-09-07 13:43         ` Lee Jones
2012-09-07 13:57           ` Arnd Bergmann
2012-09-17 13:45             ` Samuel Ortiz
2012-09-17 14:11               ` Lee Jones
2012-09-21 22:20                 ` Samuel Ortiz
2012-09-07 11:14 ` [PATCH 16/19] mfd: Provide the tc3589x with its own IRQ domain Lee Jones
2012-09-10 13:05   ` Linus Walleij
2012-09-16 23:45   ` Samuel Ortiz
2012-09-07 11:14 ` [PATCH 17/19] mfd: Enable the tc3589x for Device Tree Lee Jones
2012-09-10 13:08   ` Linus Walleij
2012-09-16 23:45   ` Samuel Ortiz
2012-09-07 11:14 ` [PATCH 18/19] gpio: Provide the tc3589x GPIO expander driver with an IRQ domain Lee Jones
2012-09-10 13:10   ` Linus Walleij
2012-09-12 13:04     ` Linus Walleij
2012-09-14  8:14     ` Lee Jones
2012-09-12 21:21   ` Linus Walleij
2012-09-07 11:14 ` [PATCH 19/19] gpio: Enable the tc3298x GPIO expander driver for Device Tree Lee Jones
2012-09-10 13:20   ` Linus Walleij
2012-09-12 21:21   ` Linus Walleij
2012-09-07 12:41 ` [PATCH 00/19] First HREF Device Tree enablement patch-set Arnd Bergmann
2012-09-07 13:01   ` Lee Jones
2012-09-07 13:58     ` Arnd Bergmann
2012-09-07 14:22       ` Lee Jones
2012-09-10  8:41       ` Linus Walleij
2012-09-10 10:13         ` Arnd Bergmann
2012-09-10 11:29           ` Linus Walleij
2012-09-10 13:49             ` Arnd Bergmann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CACRpkdYHd+oDMiwwodkPAMkFW0h4t+7-EzpoJ9jkkpSLgankow@mail.gmail.com \
    --to=linus.walleij@linaro.org \
    --cc=STEricsson_nomadik_linux@list.st.com \
    --cc=arnd@arndb.de \
    --cc=gabriel.fernandez@stericsson.com \
    --cc=johan.rudholm@stericsson.com \
    --cc=lee.jones@linaro.org \
    --cc=linus.walleij@stericsson.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=loic.pallardy@stericsson.com \
    --cc=per.forlin@stericsson.com \
    --cc=ulf.hansson@linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).