Re: [PATCH] [OMAP] HTCHERALD: MMC, I2C, HTCPLD, SPI, TSC2046

2010-11-25 Thread Cory Maccarrone
2010/9/30 Tony Lindgren :
> * Tony Lindgren  [100930 12:07]:
>> * Michał Mirosław  [100930 11:57]:
>> > 2010/9/30 Tony Lindgren :
>> > > * Cory Maccarrone  [100930 11:34]:
>> > >> > Looks like also board-sx1-mmc.c and board-h[23]-mmc.c have the
>> > >> > same spotty voltage range.
>> > >> > Cory, care to do a patch that fixes it for all of them?
>> > >> Yeah, I can do that.  I'll resubmit this patch too with the fixed up 
>> > >> ranges.
>> > > Turns out I already did it :) Care to test/ack this one?
>> >
>> > [...]
>> > > diff --git a/arch/arm/mach-omap1/board-sx1-mmc.c 
>> > > b/arch/arm/mach-omap1/board-sx1-mmc.c
>> > > index 5b33ae8..be5a365 100644
>> > > --- a/arch/arm/mach-omap1/board-sx1-mmc.c
>> > > +++ b/arch/arm/mach-omap1/board-sx1-mmc.c
>> > > @@ -44,7 +44,8 @@ static struct omap_mmc_platform_data mmc1_data = {
>> > >        .nr_slots                       = 1,
>> > >        .slots[0]       = {
>> > >                .set_power              = mmc_set_power,
>> > > -               .ocr_mask               = MMC_VDD_28_29 | MMC_VDD_30_31 |
>> > > +               .ocr_mask               = MMC_VDD_28_29 | MMC_VDD_29_30 |
>> > > +                                         MMC_VDD_30_31 | MMC_VDD_31_32 |
>> > >                                          MMC_VDD_32_33 | MMC_VDD_33_34,
>> > >                .name                   = "mmcblk",
>> > >        },
>> > [...]
>> >
>> > Al least this one seems wrong (haven't checked others) as the
>> > mmc_set_power() ignores vdd parameter. This suggests that the board
>> > supports only one particular voltage, not the whole range.
>>
>> Hmm yeah good catch. With the external power it's board specific.
>
> Most likely they all support only 3.3V cards except for n8x0. Not changing
> the n8x0 for what voltages it handles although it may be missing the
> MMC_VDD_27_28 voltage. Here's the updated patch.
>
> Regards,
>
> Tony
>
> From: Tony Lindgren 
> Subject: [PATCH] omap: Fix spotty MMC voltages
> ...

Finally got around to testing this, and it indeed works perfectly for
me.  I still get a bunch of weird CMD5 and CMD8 errors on init, but no
ill effects were introduced by it, and the card works fine.

- Cory
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] [OMAP] HTCHERALD: MMC, I2C, HTCPLD, SPI, TSC2046

2010-09-30 Thread Tony Lindgren
* Tony Lindgren  [100930 12:07]:
> * Michał Mirosław  [100930 11:57]:
> > 2010/9/30 Tony Lindgren :
> > > * Cory Maccarrone  [100930 11:34]:
> > >> > Looks like also board-sx1-mmc.c and board-h[23]-mmc.c have the
> > >> > same spotty voltage range.
> > >> > Cory, care to do a patch that fixes it for all of them?
> > >> Yeah, I can do that.  I'll resubmit this patch too with the fixed up 
> > >> ranges.
> > > Turns out I already did it :) Care to test/ack this one?
> > 
> > [...]
> > > diff --git a/arch/arm/mach-omap1/board-sx1-mmc.c 
> > > b/arch/arm/mach-omap1/board-sx1-mmc.c
> > > index 5b33ae8..be5a365 100644
> > > --- a/arch/arm/mach-omap1/board-sx1-mmc.c
> > > +++ b/arch/arm/mach-omap1/board-sx1-mmc.c
> > > @@ -44,7 +44,8 @@ static struct omap_mmc_platform_data mmc1_data = {
> > >        .nr_slots                       = 1,
> > >        .slots[0]       = {
> > >                .set_power              = mmc_set_power,
> > > -               .ocr_mask               = MMC_VDD_28_29 | MMC_VDD_30_31 |
> > > +               .ocr_mask               = MMC_VDD_28_29 | MMC_VDD_29_30 |
> > > +                                         MMC_VDD_30_31 | MMC_VDD_31_32 |
> > >                                          MMC_VDD_32_33 | MMC_VDD_33_34,
> > >                .name                   = "mmcblk",
> > >        },
> > [...]
> > 
> > Al least this one seems wrong (haven't checked others) as the
> > mmc_set_power() ignores vdd parameter. This suggests that the board
> > supports only one particular voltage, not the whole range.
> 
> Hmm yeah good catch. With the external power it's board specific. 

Most likely they all support only 3.3V cards except for n8x0. Not changing
the n8x0 for what voltages it handles although it may be missing the
MMC_VDD_27_28 voltage. Here's the updated patch.

Regards,

Tony

From: Tony Lindgren 
Subject: [PATCH] omap: Fix spotty MMC voltages

As noted by Michał Mirosław , the voltages should
cover the supported voltage range, or support only one voltage.

As all these boards are using a GPIO to enable the power, chances
are that only 3.3V cards are supported on these boards.

Reported-by: Michał Mirosław 
Signed-off-by: Tony Lindgren 

diff --git a/arch/arm/mach-omap1/board-h2-mmc.c 
b/arch/arm/mach-omap1/board-h2-mmc.c
index b30c499..f2fc43d 100644
--- a/arch/arm/mach-omap1/board-h2-mmc.c
+++ b/arch/arm/mach-omap1/board-h2-mmc.c
@@ -58,8 +58,7 @@ static struct omap_mmc_platform_data mmc1_data = {
.dma_mask   = 0x,
.slots[0]   = {
.set_power  = mmc_set_power,
-   .ocr_mask   = MMC_VDD_28_29 | MMC_VDD_30_31 |
- MMC_VDD_32_33 | MMC_VDD_33_34,
+   .ocr_mask   = MMC_VDD_32_33 | MMC_VDD_33_34,
.name   = "mmcblk",
},
 };
diff --git a/arch/arm/mach-omap1/board-h3-mmc.c 
b/arch/arm/mach-omap1/board-h3-mmc.c
index 54b0f06..2098525 100644
--- a/arch/arm/mach-omap1/board-h3-mmc.c
+++ b/arch/arm/mach-omap1/board-h3-mmc.c
@@ -40,8 +40,7 @@ static struct omap_mmc_platform_data mmc1_data = {
.dma_mask   = 0x,
.slots[0]   = {
.set_power  = mmc_set_power,
-   .ocr_mask   = MMC_VDD_28_29 | MMC_VDD_30_31 |
- MMC_VDD_32_33 | MMC_VDD_33_34,
+   .ocr_mask   = MMC_VDD_32_33 | MMC_VDD_33_34,
.name   = "mmcblk",
},
 };
diff --git a/arch/arm/mach-omap1/board-htcherald.c 
b/arch/arm/mach-omap1/board-htcherald.c
index 7ea75c1..88c97e2 100644
--- a/arch/arm/mach-omap1/board-htcherald.c
+++ b/arch/arm/mach-omap1/board-htcherald.c
@@ -410,8 +410,7 @@ static struct omap_mmc_platform_data htc_mmc1_data = {
.nr_slots   = 1,
.switch_slot= NULL,
.slots[0]   = {
-   .ocr_mask   = MMC_VDD_28_29 | MMC_VDD_30_31 |
- MMC_VDD_32_33 | MMC_VDD_33_34,
+   .ocr_mask   = MMC_VDD_32_33 | MMC_VDD_33_34,
.name   = "mmcblk",
.nomux  = 1,
.wires  = 4,
diff --git a/arch/arm/mach-omap1/board-sx1-mmc.c 
b/arch/arm/mach-omap1/board-sx1-mmc.c
index 5b33ae8..e8ddd86 100644
--- a/arch/arm/mach-omap1/board-sx1-mmc.c
+++ b/arch/arm/mach-omap1/board-sx1-mmc.c
@@ -44,8 +44,7 @@ static struct omap_mmc_platform_data mmc1_data = {
.nr_slots   = 1,
.slots[0]   = {
.set_power  = mmc_set_power,
-   .ocr_mask   = MMC_VDD_28_29 | MMC_VDD_30_31 |
- MMC_VDD_32_33 | MMC_VDD_33_34,
+   .ocr_mask   = MMC_VDD_32_33 | MMC_VDD_33_34,
.name 

Re: [PATCH] [OMAP] HTCHERALD: MMC, I2C, HTCPLD, SPI, TSC2046

2010-09-30 Thread Tony Lindgren
* Michał Mirosław  [100930 11:57]:
> 2010/9/30 Tony Lindgren :
> > * Cory Maccarrone  [100930 11:34]:
> >> > Looks like also board-sx1-mmc.c and board-h[23]-mmc.c have the
> >> > same spotty voltage range.
> >> > Cory, care to do a patch that fixes it for all of them?
> >> Yeah, I can do that.  I'll resubmit this patch too with the fixed up 
> >> ranges.
> > Turns out I already did it :) Care to test/ack this one?
> 
> [...]
> > diff --git a/arch/arm/mach-omap1/board-sx1-mmc.c 
> > b/arch/arm/mach-omap1/board-sx1-mmc.c
> > index 5b33ae8..be5a365 100644
> > --- a/arch/arm/mach-omap1/board-sx1-mmc.c
> > +++ b/arch/arm/mach-omap1/board-sx1-mmc.c
> > @@ -44,7 +44,8 @@ static struct omap_mmc_platform_data mmc1_data = {
> >        .nr_slots                       = 1,
> >        .slots[0]       = {
> >                .set_power              = mmc_set_power,
> > -               .ocr_mask               = MMC_VDD_28_29 | MMC_VDD_30_31 |
> > +               .ocr_mask               = MMC_VDD_28_29 | MMC_VDD_29_30 |
> > +                                         MMC_VDD_30_31 | MMC_VDD_31_32 |
> >                                          MMC_VDD_32_33 | MMC_VDD_33_34,
> >                .name                   = "mmcblk",
> >        },
> [...]
> 
> Al least this one seems wrong (haven't checked others) as the
> mmc_set_power() ignores vdd parameter. This suggests that the board
> supports only one particular voltage, not the whole range.

Hmm yeah good catch. With the external power it's board specific. 

Tony
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] [OMAP] HTCHERALD: MMC, I2C, HTCPLD, SPI, TSC2046

2010-09-30 Thread Michał Mirosław
2010/9/30 Tony Lindgren :
> * Cory Maccarrone  [100930 11:34]:
>> > Looks like also board-sx1-mmc.c and board-h[23]-mmc.c have the
>> > same spotty voltage range.
>> > Cory, care to do a patch that fixes it for all of them?
>> Yeah, I can do that.  I'll resubmit this patch too with the fixed up ranges.
> Turns out I already did it :) Care to test/ack this one?

[...]
> diff --git a/arch/arm/mach-omap1/board-sx1-mmc.c 
> b/arch/arm/mach-omap1/board-sx1-mmc.c
> index 5b33ae8..be5a365 100644
> --- a/arch/arm/mach-omap1/board-sx1-mmc.c
> +++ b/arch/arm/mach-omap1/board-sx1-mmc.c
> @@ -44,7 +44,8 @@ static struct omap_mmc_platform_data mmc1_data = {
>        .nr_slots                       = 1,
>        .slots[0]       = {
>                .set_power              = mmc_set_power,
> -               .ocr_mask               = MMC_VDD_28_29 | MMC_VDD_30_31 |
> +               .ocr_mask               = MMC_VDD_28_29 | MMC_VDD_29_30 |
> +                                         MMC_VDD_30_31 | MMC_VDD_31_32 |
>                                          MMC_VDD_32_33 | MMC_VDD_33_34,
>                .name                   = "mmcblk",
>        },
[...]

Al least this one seems wrong (haven't checked others) as the
mmc_set_power() ignores vdd parameter. This suggests that the board
supports only one particular voltage, not the whole range.

Best Regards,
Michał Mirosław
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] [OMAP] HTCHERALD: MMC, I2C, HTCPLD, SPI, TSC2046

2010-09-30 Thread Cory Maccarrone
On Thu, Sep 30, 2010 at 11:48 AM, Tony Lindgren  wrote:
> * Cory Maccarrone  [100930 11:34]:
>> >
>> > Looks like also board-sx1-mmc.c and board-h[23]-mmc.c have the
>> > same spotty voltage range.
>> >
>> > Cory, care to do a patch that fixes it for all of them?
>> >
>>
>> Yeah, I can do that.  I'll resubmit this patch too with the fixed up ranges.
>
> Turns out I already did it :) Care to test/ack this one?
>
> Tony
>
> From: Tony Lindgren 
> Date: Thu, 30 Sep 2010 11:40:56 -0700
> Subject: [PATCH] omap: Fix spotty MMC voltages
>
> As noted by Michał Mirosław , the voltages should
> cover the supported voltage range instead of missing some values
> within the range.
>
> Reported-by: Michał Mirosław 
> Signed-off-by: Tony Lindgren 
>
> diff --git a/arch/arm/mach-omap1/board-h2-mmc.c 
> b/arch/arm/mach-omap1/board-h2-mmc.c
> index b30c499..50d9032 100644
> --- a/arch/arm/mach-omap1/board-h2-mmc.c
> +++ b/arch/arm/mach-omap1/board-h2-mmc.c
> @@ -58,7 +58,8 @@ static struct omap_mmc_platform_data mmc1_data = {
>        .dma_mask                       = 0x,
>        .slots[0]       = {
>                .set_power              = mmc_set_power,
> -               .ocr_mask               = MMC_VDD_28_29 | MMC_VDD_30_31 |
> +               .ocr_mask               = MMC_VDD_28_29 | MMC_VDD_29_30 |
> +                                         MMC_VDD_30_31 | MMC_VDD_31_32 |
>                                          MMC_VDD_32_33 | MMC_VDD_33_34,
>                .name                   = "mmcblk",
>        },
> diff --git a/arch/arm/mach-omap1/board-h3-mmc.c 
> b/arch/arm/mach-omap1/board-h3-mmc.c
> index 54b0f06..9f073bf 100644
> --- a/arch/arm/mach-omap1/board-h3-mmc.c
> +++ b/arch/arm/mach-omap1/board-h3-mmc.c
> @@ -40,7 +40,8 @@ static struct omap_mmc_platform_data mmc1_data = {
>        .dma_mask                       = 0x,
>        .slots[0]       = {
>                .set_power              = mmc_set_power,
> -               .ocr_mask               = MMC_VDD_28_29 | MMC_VDD_30_31 |
> +               .ocr_mask               = MMC_VDD_28_29 | MMC_VDD_29_30 |
> +                                         MMC_VDD_30_31 | MMC_VDD_31_32 |
>                                          MMC_VDD_32_33 | MMC_VDD_33_34,
>                .name                   = "mmcblk",
>        },
> diff --git a/arch/arm/mach-omap1/board-htcherald.c 
> b/arch/arm/mach-omap1/board-htcherald.c
> index 7ea75c1..909fdeb 100644
> --- a/arch/arm/mach-omap1/board-htcherald.c
> +++ b/arch/arm/mach-omap1/board-htcherald.c
> @@ -410,7 +410,8 @@ static struct omap_mmc_platform_data htc_mmc1_data = {
>        .nr_slots                       = 1,
>        .switch_slot                    = NULL,
>        .slots[0]       = {
> -               .ocr_mask               = MMC_VDD_28_29 | MMC_VDD_30_31 |
> +               .ocr_mask               = MMC_VDD_28_29 | MMC_VDD_29_30 |
> +                                         MMC_VDD_30_31 | MMC_VDD_31_32 |
>                                          MMC_VDD_32_33 | MMC_VDD_33_34,
>                .name                   = "mmcblk",
>                .nomux                  = 1,
> diff --git a/arch/arm/mach-omap1/board-sx1-mmc.c 
> b/arch/arm/mach-omap1/board-sx1-mmc.c
> index 5b33ae8..be5a365 100644
> --- a/arch/arm/mach-omap1/board-sx1-mmc.c
> +++ b/arch/arm/mach-omap1/board-sx1-mmc.c
> @@ -44,7 +44,8 @@ static struct omap_mmc_platform_data mmc1_data = {
>        .nr_slots                       = 1,
>        .slots[0]       = {
>                .set_power              = mmc_set_power,
> -               .ocr_mask               = MMC_VDD_28_29 | MMC_VDD_30_31 |
> +               .ocr_mask               = MMC_VDD_28_29 | MMC_VDD_29_30 |
> +                                         MMC_VDD_30_31 | MMC_VDD_31_32 |
>                                          MMC_VDD_32_33 | MMC_VDD_33_34,
>                .name                   = "mmcblk",
>        },
> diff --git a/arch/arm/mach-omap2/board-n8x0.c 
> b/arch/arm/mach-omap2/board-n8x0.c
> index 7a93bd5..abd7e77 100644
> --- a/arch/arm/mach-omap2/board-n8x0.c
> +++ b/arch/arm/mach-omap2/board-n8x0.c
> @@ -493,7 +493,8 @@ static struct omap_mmc_platform_data mmc1_data = {
>                .set_bus_mode           = n8x0_mmc_set_bus_mode,
>                .get_cover_state        = n8x0_mmc_get_cover_state,
>                .ocr_mask               = MMC_VDD_165_195 | MMC_VDD_30_31 |
> -                                               MMC_VDD_32_33   | 
> MMC_VDD_33_34,
> +                                               MMC_VDD_31_32 | MMC_VDD_32_33 
> |
> +                                               MMC_VDD_33_34,
>                .name                   = "internal",
>        },
>        .slots[1] = {
>

Sure thing, hopefully in the next day or two. :)

- Cory
N�r��yb�X��ǧv�^�)޺{.n�+{��f��{ay�ʇڙ�,j��f���h���z��w���
���j:+v���w�j�mzZ+�ݢj"��!�i

Re: [PATCH] [OMAP] HTCHERALD: MMC, I2C, HTCPLD, SPI, TSC2046

2010-09-30 Thread Tony Lindgren
* Cory Maccarrone  [100930 11:34]:
> >
> > Looks like also board-sx1-mmc.c and board-h[23]-mmc.c have the
> > same spotty voltage range.
> >
> > Cory, care to do a patch that fixes it for all of them?
> >
> 
> Yeah, I can do that.  I'll resubmit this patch too with the fixed up ranges.

Turns out I already did it :) Care to test/ack this one?

Tony

From: Tony Lindgren 
Date: Thu, 30 Sep 2010 11:40:56 -0700
Subject: [PATCH] omap: Fix spotty MMC voltages

As noted by Michał Mirosław , the voltages should
cover the supported voltage range instead of missing some values
within the range.

Reported-by: Michał Mirosław 
Signed-off-by: Tony Lindgren 

diff --git a/arch/arm/mach-omap1/board-h2-mmc.c 
b/arch/arm/mach-omap1/board-h2-mmc.c
index b30c499..50d9032 100644
--- a/arch/arm/mach-omap1/board-h2-mmc.c
+++ b/arch/arm/mach-omap1/board-h2-mmc.c
@@ -58,7 +58,8 @@ static struct omap_mmc_platform_data mmc1_data = {
.dma_mask   = 0x,
.slots[0]   = {
.set_power  = mmc_set_power,
-   .ocr_mask   = MMC_VDD_28_29 | MMC_VDD_30_31 |
+   .ocr_mask   = MMC_VDD_28_29 | MMC_VDD_29_30 |
+ MMC_VDD_30_31 | MMC_VDD_31_32 |
  MMC_VDD_32_33 | MMC_VDD_33_34,
.name   = "mmcblk",
},
diff --git a/arch/arm/mach-omap1/board-h3-mmc.c 
b/arch/arm/mach-omap1/board-h3-mmc.c
index 54b0f06..9f073bf 100644
--- a/arch/arm/mach-omap1/board-h3-mmc.c
+++ b/arch/arm/mach-omap1/board-h3-mmc.c
@@ -40,7 +40,8 @@ static struct omap_mmc_platform_data mmc1_data = {
.dma_mask   = 0x,
.slots[0]   = {
.set_power  = mmc_set_power,
-   .ocr_mask   = MMC_VDD_28_29 | MMC_VDD_30_31 |
+   .ocr_mask   = MMC_VDD_28_29 | MMC_VDD_29_30 |
+ MMC_VDD_30_31 | MMC_VDD_31_32 |
  MMC_VDD_32_33 | MMC_VDD_33_34,
.name   = "mmcblk",
},
diff --git a/arch/arm/mach-omap1/board-htcherald.c 
b/arch/arm/mach-omap1/board-htcherald.c
index 7ea75c1..909fdeb 100644
--- a/arch/arm/mach-omap1/board-htcherald.c
+++ b/arch/arm/mach-omap1/board-htcherald.c
@@ -410,7 +410,8 @@ static struct omap_mmc_platform_data htc_mmc1_data = {
.nr_slots   = 1,
.switch_slot= NULL,
.slots[0]   = {
-   .ocr_mask   = MMC_VDD_28_29 | MMC_VDD_30_31 |
+   .ocr_mask   = MMC_VDD_28_29 | MMC_VDD_29_30 |
+ MMC_VDD_30_31 | MMC_VDD_31_32 |
  MMC_VDD_32_33 | MMC_VDD_33_34,
.name   = "mmcblk",
.nomux  = 1,
diff --git a/arch/arm/mach-omap1/board-sx1-mmc.c 
b/arch/arm/mach-omap1/board-sx1-mmc.c
index 5b33ae8..be5a365 100644
--- a/arch/arm/mach-omap1/board-sx1-mmc.c
+++ b/arch/arm/mach-omap1/board-sx1-mmc.c
@@ -44,7 +44,8 @@ static struct omap_mmc_platform_data mmc1_data = {
.nr_slots   = 1,
.slots[0]   = {
.set_power  = mmc_set_power,
-   .ocr_mask   = MMC_VDD_28_29 | MMC_VDD_30_31 |
+   .ocr_mask   = MMC_VDD_28_29 | MMC_VDD_29_30 |
+ MMC_VDD_30_31 | MMC_VDD_31_32 |
  MMC_VDD_32_33 | MMC_VDD_33_34,
.name   = "mmcblk",
},
diff --git a/arch/arm/mach-omap2/board-n8x0.c b/arch/arm/mach-omap2/board-n8x0.c
index 7a93bd5..abd7e77 100644
--- a/arch/arm/mach-omap2/board-n8x0.c
+++ b/arch/arm/mach-omap2/board-n8x0.c
@@ -493,7 +493,8 @@ static struct omap_mmc_platform_data mmc1_data = {
.set_bus_mode   = n8x0_mmc_set_bus_mode,
.get_cover_state= n8x0_mmc_get_cover_state,
.ocr_mask   = MMC_VDD_165_195 | MMC_VDD_30_31 |
-   MMC_VDD_32_33   | MMC_VDD_33_34,
+   MMC_VDD_31_32 | MMC_VDD_32_33 |
+   MMC_VDD_33_34,
.name   = "internal",
},
.slots[1] = {
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] [OMAP] HTCHERALD: MMC, I2C, HTCPLD, SPI, TSC2046

2010-09-30 Thread Cory Maccarrone
2010/9/24 Tony Lindgren :
> * Michał Mirosław  [100924 09:03]:
>> W dniu 24 września 2010 17:38 użytkownik Cory Maccarrone
>>  napisał:
>> > 2010/9/24 Michał Mirosław :
>> >> 2010/8/18 Cory Maccarrone :
>> >>> This change adds in MMC and I2C support to the HTC Herald board, as well
>> >>> as adding the HTCPLD driver for the PLD used on this phone.  It also
>> >>> adds in the gpio-keys entries for the front directional keys and
>> >>> selector and the cursor keys on the slide-out keyboard, and gpio-leds
>> >>> support for the LEDs attached to the htcpld.
>> >>>
>> >>> Additionally, SPI bus support (using the spi100k driver) and
>> >>> touchscreen support (using the ads7846 driver) were added.
>> >>>
>> >>> Signed-off-by: Cory Maccarrone 
>> >>> ---
>> >> [...]
>> >>> +/* MMC Card */
>> >>> +#if defined(CONFIG_MMC_OMAP) || defined(CONFIG_MMC_OMAP_MODULE)
>> >>> +static struct omap_mmc_platform_data htc_mmc1_data = {
>> >>> +       .nr_slots                       = 1,
>> >>> +       .switch_slot                    = NULL,
>> >>> +       .slots[0]       = {
>> >>> +               .ocr_mask               = MMC_VDD_28_29 | MMC_VDD_30_31 |
>> >>> +                                         MMC_VDD_32_33 | MMC_VDD_33_34,
>> >>> +               .name                   = "mmcblk",
>> >>> +               .nomux                  = 1,
>> >>> +               .wires                  = 4,
>> >>> +               .switch_pin             = -1,
>> >>> +       },
>> >>> +};
>> >> [...]
>> >> What voltages can this MMC controller provide? That's a rather unusual 
>> >> OCR mask.
>> > Not really sure, I wasn't the one who first came up with that mask.
>> > All I know is that it seems to work, and not just for my device, but
>> > lots of other HTC OMAP850 devices we've tried it on too.
>> >
>> > I'm interested though, what in particular makes it unusual?
>>
>> It specifies, that device supports voltage ranges:
>> 2.8V - 2.9V, 3.0V - 3.1V, 3.2V - 3.4V
>> (so: 2.9V - 3.0V and 3.1V - 3.2V are not available).
>> Are there really 2.8V, 3.0V, 3.3V VDDs settable?
>>
>> If the host supports only VDD = 3.3V for example, then correct OCR
>> mask would be: MMC_VDD_32_33 | MMC_VDD_33_34 (or just one flag).
>
> Looks like also board-sx1-mmc.c and board-h[23]-mmc.c have the
> same spotty voltage range.
>
> Cory, care to do a patch that fixes it for all of them?
>

Yeah, I can do that.  I'll resubmit this patch too with the fixed up ranges.

- Cory
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] [OMAP] HTCHERALD: MMC, I2C, HTCPLD, SPI, TSC2046

2010-09-24 Thread Tony Lindgren
* Michał Mirosław  [100924 09:03]:
> W dniu 24 września 2010 17:38 użytkownik Cory Maccarrone
>  napisał:
> > 2010/9/24 Michał Mirosław :
> >> 2010/8/18 Cory Maccarrone :
> >>> This change adds in MMC and I2C support to the HTC Herald board, as well
> >>> as adding the HTCPLD driver for the PLD used on this phone.  It also
> >>> adds in the gpio-keys entries for the front directional keys and
> >>> selector and the cursor keys on the slide-out keyboard, and gpio-leds
> >>> support for the LEDs attached to the htcpld.
> >>>
> >>> Additionally, SPI bus support (using the spi100k driver) and
> >>> touchscreen support (using the ads7846 driver) were added.
> >>>
> >>> Signed-off-by: Cory Maccarrone 
> >>> ---
> >> [...]
> >>> +/* MMC Card */
> >>> +#if defined(CONFIG_MMC_OMAP) || defined(CONFIG_MMC_OMAP_MODULE)
> >>> +static struct omap_mmc_platform_data htc_mmc1_data = {
> >>> +       .nr_slots                       = 1,
> >>> +       .switch_slot                    = NULL,
> >>> +       .slots[0]       = {
> >>> +               .ocr_mask               = MMC_VDD_28_29 | MMC_VDD_30_31 |
> >>> +                                         MMC_VDD_32_33 | MMC_VDD_33_34,
> >>> +               .name                   = "mmcblk",
> >>> +               .nomux                  = 1,
> >>> +               .wires                  = 4,
> >>> +               .switch_pin             = -1,
> >>> +       },
> >>> +};
> >> [...]
> >> What voltages can this MMC controller provide? That's a rather unusual OCR 
> >> mask.
> > Not really sure, I wasn't the one who first came up with that mask.
> > All I know is that it seems to work, and not just for my device, but
> > lots of other HTC OMAP850 devices we've tried it on too.
> >
> > I'm interested though, what in particular makes it unusual?
> 
> It specifies, that device supports voltage ranges:
> 2.8V - 2.9V, 3.0V - 3.1V, 3.2V - 3.4V
> (so: 2.9V - 3.0V and 3.1V - 3.2V are not available).
> Are there really 2.8V, 3.0V, 3.3V VDDs settable?
> 
> If the host supports only VDD = 3.3V for example, then correct OCR
> mask would be: MMC_VDD_32_33 | MMC_VDD_33_34 (or just one flag).

Looks like also board-sx1-mmc.c and board-h[23]-mmc.c have the
same spotty voltage range.

Cory, care to do a patch that fixes it for all of them?

Regards,

Tony
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] [OMAP] HTCHERALD: MMC, I2C, HTCPLD, SPI, TSC2046

2010-09-24 Thread Michał Mirosław
W dniu 24 września 2010 17:38 użytkownik Cory Maccarrone
 napisał:
> 2010/9/24 Michał Mirosław :
>> 2010/8/18 Cory Maccarrone :
>>> This change adds in MMC and I2C support to the HTC Herald board, as well
>>> as adding the HTCPLD driver for the PLD used on this phone.  It also
>>> adds in the gpio-keys entries for the front directional keys and
>>> selector and the cursor keys on the slide-out keyboard, and gpio-leds
>>> support for the LEDs attached to the htcpld.
>>>
>>> Additionally, SPI bus support (using the spi100k driver) and
>>> touchscreen support (using the ads7846 driver) were added.
>>>
>>> Signed-off-by: Cory Maccarrone 
>>> ---
>> [...]
>>> +/* MMC Card */
>>> +#if defined(CONFIG_MMC_OMAP) || defined(CONFIG_MMC_OMAP_MODULE)
>>> +static struct omap_mmc_platform_data htc_mmc1_data = {
>>> +       .nr_slots                       = 1,
>>> +       .switch_slot                    = NULL,
>>> +       .slots[0]       = {
>>> +               .ocr_mask               = MMC_VDD_28_29 | MMC_VDD_30_31 |
>>> +                                         MMC_VDD_32_33 | MMC_VDD_33_34,
>>> +               .name                   = "mmcblk",
>>> +               .nomux                  = 1,
>>> +               .wires                  = 4,
>>> +               .switch_pin             = -1,
>>> +       },
>>> +};
>> [...]
>> What voltages can this MMC controller provide? That's a rather unusual OCR 
>> mask.
> Not really sure, I wasn't the one who first came up with that mask.
> All I know is that it seems to work, and not just for my device, but
> lots of other HTC OMAP850 devices we've tried it on too.
>
> I'm interested though, what in particular makes it unusual?

It specifies, that device supports voltage ranges:
2.8V - 2.9V, 3.0V - 3.1V, 3.2V - 3.4V
(so: 2.9V - 3.0V and 3.1V - 3.2V are not available).
Are there really 2.8V, 3.0V, 3.3V VDDs settable?

If the host supports only VDD = 3.3V for example, then correct OCR
mask would be: MMC_VDD_32_33 | MMC_VDD_33_34 (or just one flag).

Best Regards,
Michał Mirosław
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] [OMAP] HTCHERALD: MMC, I2C, HTCPLD, SPI, TSC2046

2010-09-24 Thread Russell King - ARM Linux
On Fri, Sep 24, 2010 at 08:38:37AM -0700, Cory Maccarrone wrote:
> Not really sure, I wasn't the one who first came up with that mask.
> All I know is that it seems to work, and not just for my device, but
> lots of other HTC OMAP850 devices we've tried it on too.
> 
> I'm interested though, what in particular makes it unusual?

It's normal to set all bits between the maximum and minimum voltages
rather than alternate bits.  So if you support voltages between 3.0
and 3.5 volts, all these should be used:

#define MMC_VDD_30_31   0x0004  /* VDD voltage 3.0 ~ 3.1 */
#define MMC_VDD_31_32   0x0008  /* VDD voltage 3.1 ~ 3.2 */
#define MMC_VDD_32_33   0x0010  /* VDD voltage 3.2 ~ 3.3 */
#define MMC_VDD_33_34   0x0020  /* VDD voltage 3.3 ~ 3.4 */
#define MMC_VDD_34_35   0x0040  /* VDD voltage 3.4 ~ 3.5 */

rather than just MMC_VDD_30_31, MMC_VDD_32_33, MMC_VDD_34_35.

Note that if you support just one voltage, (eg, 3.3V) you should
use the two which overlap this - MMC_VDD_32_33 and MMC_VDD_33_34.
There are cards which go unresponsive if you supply just a single
bit in the OCR mask.
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] [OMAP] HTCHERALD: MMC, I2C, HTCPLD, SPI, TSC2046

2010-09-24 Thread Cory Maccarrone
2010/9/24 Michał Mirosław :
> 2010/8/18 Cory Maccarrone :
>> This change adds in MMC and I2C support to the HTC Herald board, as well
>> as adding the HTCPLD driver for the PLD used on this phone.  It also
>> adds in the gpio-keys entries for the front directional keys and
>> selector and the cursor keys on the slide-out keyboard, and gpio-leds
>> support for the LEDs attached to the htcpld.
>>
>> Additionally, SPI bus support (using the spi100k driver) and
>> touchscreen support (using the ads7846 driver) were added.
>>
>> Signed-off-by: Cory Maccarrone 
>> ---
> [...]
>> +/* MMC Card */
>> +#if defined(CONFIG_MMC_OMAP) || defined(CONFIG_MMC_OMAP_MODULE)
>> +static struct omap_mmc_platform_data htc_mmc1_data = {
>> +       .nr_slots                       = 1,
>> +       .switch_slot                    = NULL,
>> +       .slots[0]       = {
>> +               .ocr_mask               = MMC_VDD_28_29 | MMC_VDD_30_31 |
>> +                                         MMC_VDD_32_33 | MMC_VDD_33_34,
>> +               .name                   = "mmcblk",
>> +               .nomux                  = 1,
>> +               .wires                  = 4,
>> +               .switch_pin             = -1,
>> +       },
>> +};
> [...]
>
> What voltages can this MMC controller provide? That's a rather unusual OCR 
> mask.
>
> Best Regards,
> Michał Mirosław
>

Not really sure, I wasn't the one who first came up with that mask.
All I know is that it seems to work, and not just for my device, but
lots of other HTC OMAP850 devices we've tried it on too.

I'm interested though, what in particular makes it unusual?

- Cory
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] [OMAP] HTCHERALD: MMC, I2C, HTCPLD, SPI, TSC2046

2010-09-24 Thread Michał Mirosław
2010/8/18 Cory Maccarrone :
> This change adds in MMC and I2C support to the HTC Herald board, as well
> as adding the HTCPLD driver for the PLD used on this phone.  It also
> adds in the gpio-keys entries for the front directional keys and
> selector and the cursor keys on the slide-out keyboard, and gpio-leds
> support for the LEDs attached to the htcpld.
>
> Additionally, SPI bus support (using the spi100k driver) and
> touchscreen support (using the ads7846 driver) were added.
>
> Signed-off-by: Cory Maccarrone 
> ---
[...]
> +/* MMC Card */
> +#if defined(CONFIG_MMC_OMAP) || defined(CONFIG_MMC_OMAP_MODULE)
> +static struct omap_mmc_platform_data htc_mmc1_data = {
> +       .nr_slots                       = 1,
> +       .switch_slot                    = NULL,
> +       .slots[0]       = {
> +               .ocr_mask               = MMC_VDD_28_29 | MMC_VDD_30_31 |
> +                                         MMC_VDD_32_33 | MMC_VDD_33_34,
> +               .name                   = "mmcblk",
> +               .nomux                  = 1,
> +               .wires                  = 4,
> +               .switch_pin             = -1,
> +       },
> +};
[...]

What voltages can this MMC controller provide? That's a rather unusual OCR mask.

Best Regards,
Michał Mirosław
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] [OMAP] HTCHERALD: MMC, I2C, HTCPLD, SPI, TSC2046

2010-09-23 Thread Tony Lindgren
* Cory Maccarrone  [100923 10:18]:
> On Thu, Sep 23, 2010 at 10:22 AM, Tony Lindgren  wrote:
> > * Cory Maccarrone  [100817 21:28]:
> >> This change adds in MMC and I2C support to the HTC Herald board, as well
> >> as adding the HTCPLD driver for the PLD used on this phone.  It also
> >> adds in the gpio-keys entries for the front directional keys and
> >> selector and the cursor keys on the slide-out keyboard, and gpio-leds
> >> support for the LEDs attached to the htcpld.
> >>
> >> Additionally, SPI bus support (using the spi100k driver) and
> >> touchscreen support (using the ads7846 driver) were added.
> >
> > Thanks, I'll add this into omap-for-linus for the upcoming merge
> > window. Cory, can you please check if you have other pending
> > patches? I don't see others in patchwork.kernel.org, but thought
> > there may be some that did not get merged last merge window?
> >
> 
> I believe you have everything.  I had submitted a series of 5 patches
> that you commented on, and this one was the boiled down combination of
> all of those (minus one element which I'm still looking into).  So,
> just this one should be pending.

OK thanks.

Tony
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] [OMAP] HTCHERALD: MMC, I2C, HTCPLD, SPI, TSC2046

2010-09-23 Thread Cory Maccarrone
On Thu, Sep 23, 2010 at 10:22 AM, Tony Lindgren  wrote:
> * Cory Maccarrone  [100817 21:28]:
>> This change adds in MMC and I2C support to the HTC Herald board, as well
>> as adding the HTCPLD driver for the PLD used on this phone.  It also
>> adds in the gpio-keys entries for the front directional keys and
>> selector and the cursor keys on the slide-out keyboard, and gpio-leds
>> support for the LEDs attached to the htcpld.
>>
>> Additionally, SPI bus support (using the spi100k driver) and
>> touchscreen support (using the ads7846 driver) were added.
>
> Thanks, I'll add this into omap-for-linus for the upcoming merge
> window. Cory, can you please check if you have other pending
> patches? I don't see others in patchwork.kernel.org, but thought
> there may be some that did not get merged last merge window?
>

I believe you have everything.  I had submitted a series of 5 patches
that you commented on, and this one was the boiled down combination of
all of those (minus one element which I'm still looking into).  So,
just this one should be pending.

Thanks
- Cory
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] [OMAP] HTCHERALD: MMC, I2C, HTCPLD, SPI, TSC2046

2010-09-23 Thread Tony Lindgren
* Cory Maccarrone  [100817 21:28]:
> This change adds in MMC and I2C support to the HTC Herald board, as well
> as adding the HTCPLD driver for the PLD used on this phone.  It also
> adds in the gpio-keys entries for the front directional keys and
> selector and the cursor keys on the slide-out keyboard, and gpio-leds
> support for the LEDs attached to the htcpld.
> 
> Additionally, SPI bus support (using the spi100k driver) and
> touchscreen support (using the ads7846 driver) were added.

Thanks, I'll add this into omap-for-linus for the upcoming merge
window. Cory, can you please check if you have other pending
patches? I don't see others in patchwork.kernel.org, but thought
there may be some that did not get merged last merge window?

Regards,

Tony
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html