Re: [PATCH] [OMAP] HTCHERALD: MMC, I2C, HTCPLD, SPI, TSC2046
2010/9/30 Tony Lindgren t...@atomide.com: * Tony Lindgren t...@atomide.com [100930 12:07]: * Michał Mirosław mir...@gmail.com [100930 11:57]: 2010/9/30 Tony Lindgren t...@atomide.com: * Cory Maccarrone darkstar6...@gmail.com [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 t...@atomide.com 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/9/24 Tony Lindgren t...@atomide.com: * Michał Mirosław mir...@gmail.com [100924 09:03]: W dniu 24 września 2010 17:38 użytkownik Cory Maccarrone darkstar6...@gmail.com napisał: 2010/9/24 Michał Mirosław mir...@gmail.com: 2010/8/18 Cory Maccarrone darkstar6...@gmail.com: 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 darkstar6...@gmail.com --- [...] +/* 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
* Cory Maccarrone darkstar6...@gmail.com [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 t...@atomide.com Date: Thu, 30 Sep 2010 11:40:56 -0700 Subject: [PATCH] omap: Fix spotty MMC voltages As noted by Michał Mirosław mir...@gmail.com, the voltages should cover the supported voltage range instead of missing some values within the range. Reported-by: Michał Mirosław mir...@gmail.com Signed-off-by: Tony Lindgren t...@atomide.com 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
On Thu, Sep 30, 2010 at 11:48 AM, Tony Lindgren t...@atomide.com wrote: * Cory Maccarrone darkstar6...@gmail.com [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 t...@atomide.com Date: Thu, 30 Sep 2010 11:40:56 -0700 Subject: [PATCH] omap: Fix spotty MMC voltages As noted by Michał Mirosław mir...@gmail.com, the voltages should cover the supported voltage range instead of missing some values within the range. Reported-by: Michał Mirosław mir...@gmail.com Signed-off-by: Tony Lindgren t...@atomide.com 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/9/30 Tony Lindgren t...@atomide.com: * Cory Maccarrone darkstar6...@gmail.com [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
* Michał Mirosław mir...@gmail.com [100930 11:57]: 2010/9/30 Tony Lindgren t...@atomide.com: * Cory Maccarrone darkstar6...@gmail.com [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
* Tony Lindgren t...@atomide.com [100930 12:07]: * Michał Mirosław mir...@gmail.com [100930 11:57]: 2010/9/30 Tony Lindgren t...@atomide.com: * Cory Maccarrone darkstar6...@gmail.com [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 t...@atomide.com Subject: [PATCH] omap: Fix spotty MMC voltages As noted by Michał Mirosław mir...@gmail.com, 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 mir...@gmail.com Signed-off-by: Tony Lindgren t...@atomide.com 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 |
Re: [PATCH] [OMAP] HTCHERALD: MMC, I2C, HTCPLD, SPI, TSC2046
2010/8/18 Cory Maccarrone darkstar6...@gmail.com: 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 darkstar6...@gmail.com --- [...] +/* 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/9/24 Michał Mirosław mir...@gmail.com: 2010/8/18 Cory Maccarrone darkstar6...@gmail.com: 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 darkstar6...@gmail.com --- [...] +/* 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
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
W dniu 24 września 2010 17:38 użytkownik Cory Maccarrone darkstar6...@gmail.com napisał: 2010/9/24 Michał Mirosław mir...@gmail.com: 2010/8/18 Cory Maccarrone darkstar6...@gmail.com: 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 darkstar6...@gmail.com --- [...] +/* 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
* Michał Mirosław mir...@gmail.com [100924 09:03]: W dniu 24 września 2010 17:38 użytkownik Cory Maccarrone darkstar6...@gmail.com napisał: 2010/9/24 Michał Mirosław mir...@gmail.com: 2010/8/18 Cory Maccarrone darkstar6...@gmail.com: 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 darkstar6...@gmail.com --- [...] +/* 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
* Cory Maccarrone darkstar6...@gmail.com [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
Re: [PATCH] [OMAP] HTCHERALD: MMC, I2C, HTCPLD, SPI, TSC2046
On Thu, Sep 23, 2010 at 10:22 AM, Tony Lindgren t...@atomide.com wrote: * Cory Maccarrone darkstar6...@gmail.com [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
[PATCH] [OMAP] HTCHERALD: MMC, I2C, HTCPLD, SPI, TSC2046
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 darkstar6...@gmail.com --- arch/arm/mach-omap1/board-htcherald.c | 322 - 1 files changed, 316 insertions(+), 6 deletions(-) This submission is a merging of the two patches: [OMAP] HTCHERALD: MMC, I2C, HTCPLD and related devices [OMAP] htcherald: SPI register config, TSC2046 touchscreen diff --git a/arch/arm/mach-omap1/board-htcherald.c b/arch/arm/mach-omap1/board-htcherald.c index 311899f..7ea75c1 100644 --- a/arch/arm/mach-omap1/board-htcherald.c +++ b/arch/arm/mach-omap1/board-htcherald.c @@ -30,6 +30,13 @@ #include linux/input.h #include linux/io.h #include linux/gpio.h +#include linux/gpio_keys.h +#include linux/i2c.h +#include linux/i2c-gpio.h +#include linux/htcpld.h +#include linux/leds.h +#include linux/spi/spi.h +#include linux/spi/ads7846.h #include asm/mach-types.h #include asm/mach/arch.h @@ -39,6 +46,7 @@ #include plat/board.h #include plat/keypad.h #include plat/usb.h +#include plat/mmc.h #include mach/irqs.h @@ -52,13 +60,123 @@ #define OMAP_LCDC_CTRL_LCD_EN (1 0) #define OMAP_LCDC_STAT_DONE (1 0) -static struct omap_lcd_config htcherald_lcd_config __initdata = { - .ctrl_name = internal, -}; +/* GPIO definitions for the power button and keyboard slide switch */ +#define HTCHERALD_GPIO_POWER 139 +#define HTCHERALD_GPIO_SLIDE 174 +#define HTCHERALD_GIRQ_BTNS 141 -static struct omap_board_config_kernel htcherald_config[] __initdata = { - { OMAP_TAG_LCD, htcherald_lcd_config }, -}; +/* GPIO definitions for the touchscreen */ +#define HTCHERALD_GPIO_TS 76 + +/* HTCPLD definitions */ + +/* + * CPLD Logic + * + * Chip 3 - 0x03 + * + * Function7 6 5 4 3 2 1 0 + * + * DPAD light x x x x x x x 1 + * SoundDevx x x x 1 x x x + * Screen white1 x x x x x x x + * MMC power onx x x x x 1 x x + * Happy times (n) 0 x x x x 1 x x + * + * Chip 4 - 0x04 + * + * Function7 6 5 4 3 2 1 0 + * + * Keyboard light x x x x x x x 1 + * LCD Bright (4) x x x x x 1 1 x + * LCD Bright (3) x x x x x 0 1 x + * LCD Bright (2) x x x x x 1 0 x + * LCD Bright (1) x x x x x 0 0 x + * LCD Off x x x x 0 x x x + * LCD image (fb) 1 x x x x x x x + * LCD image (white) 0 x x x x x x x + * Caps lock LED x x 1 x x x x x + * + * Chip 5 - 0x05 + * + * Function7 6 5 4 3 2 1 0 + * + * Red (solid) x x x x x 1 x x + * Red (flash) x x x x x x 1 x + * Green (GSM flash) x x x x 1 x x x + * Green (GSM solid) x x x 1 x x x x + * Green (wifi flash) x x 1 x x x x x + * Blue (bt flash) x 1 x x x x x x + * DPAD Int Enable 1 x x x x x x 0 + * + * (Combinations of the above can be made for different colors.) + * The direction pad interrupt enable must be set each time the + * interrupt is handled. + * + * Chip 6 - 0x06 + * + * Function7 6 5 4 3 2 1 0 + * + * Vibratorx x x x 1 x x x + * Alt LED x x x 1 x x x x + * Screen white1 x x x x x x x + * Screen whitex x 1 x x x x x + * Screen whitex 0 x x x x x x + * Enable kbd dpad x x x x x x 0 x + * Happy Times 0 1 0 x x x 0 x + */ + +/* + * HTCPLD GPIO lines start 16 after OMAP_MAX_GPIO_LINES to account + * for the 16 MPUIO lines. + */ +#define HTCPLD_GPIO_START_OFFSET (OMAP_MAX_GPIO_LINES + 16) +#define HTCPLD_IRQ(chip, offset) (OMAP_IRQ_END + 8 * (chip) + (offset)) +#define HTCPLD_BASE(chip, offset) \ + (HTCPLD_GPIO_START_OFFSET + 8 * (chip) + (offset)) + +#define HTCPLD_GPIO_LED_DPAD HTCPLD_BASE(0, 0) +#define HTCPLD_GPIO_LED_KBDHTCPLD_BASE(1, 0) +#define HTCPLD_GPIO_LED_CAPS HTCPLD_BASE(1, 5) +#define HTCPLD_GPIO_LED_RED_FLASH HTCPLD_BASE(2, 1) +#define HTCPLD_GPIO_LED_RED_SOLID HTCPLD_BASE(2, 2) +#define HTCPLD_GPIO_LED_GREEN_FLASHHTCPLD_BASE(2, 3) +#define HTCPLD_GPIO_LED_GREEN_SOLIDHTCPLD_BASE(2, 4) +#define HTCPLD_GPIO_LED_WIFI HTCPLD_BASE(2, 5) +#define HTCPLD_GPIO_LED_BT HTCPLD_BASE(2, 6) +#define HTCPLD_GPIO_LED_VIBRATEHTCPLD_BASE(3, 3) +#define HTCPLD_GPIO_LED_ALTHTCPLD_BASE(3, 4) + +#define HTCPLD_GPIO_RIGHT_KBD HTCPLD_BASE(6, 7) +#define HTCPLD_GPIO_UP_KBD HTCPLD_BASE(6,
[PATCH] [OMAP] HTCHERALD: MMC, I2C, HTCPLD, SPI, TSC2046
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 darkstar6...@gmail.com --- arch/arm/mach-omap1/board-htcherald.c | 322 - 1 files changed, 316 insertions(+), 6 deletions(-) This submission is a merging of the two patches: [OMAP] HTCHERALD: MMC, I2C, HTCPLD and related devices [OMAP] htcherald: SPI register config, TSC2046 touchscreen diff --git a/arch/arm/mach-omap1/board-htcherald.c b/arch/arm/mach-omap1/board-htcherald.c index 311899f..7ea75c1 100644 --- a/arch/arm/mach-omap1/board-htcherald.c +++ b/arch/arm/mach-omap1/board-htcherald.c @@ -30,6 +30,13 @@ #include linux/input.h #include linux/io.h #include linux/gpio.h +#include linux/gpio_keys.h +#include linux/i2c.h +#include linux/i2c-gpio.h +#include linux/htcpld.h +#include linux/leds.h +#include linux/spi/spi.h +#include linux/spi/ads7846.h #include asm/mach-types.h #include asm/mach/arch.h @@ -39,6 +46,7 @@ #include plat/board.h #include plat/keypad.h #include plat/usb.h +#include plat/mmc.h #include mach/irqs.h @@ -52,13 +60,123 @@ #define OMAP_LCDC_CTRL_LCD_EN (1 0) #define OMAP_LCDC_STAT_DONE (1 0) -static struct omap_lcd_config htcherald_lcd_config __initdata = { - .ctrl_name = internal, -}; +/* GPIO definitions for the power button and keyboard slide switch */ +#define HTCHERALD_GPIO_POWER 139 +#define HTCHERALD_GPIO_SLIDE 174 +#define HTCHERALD_GIRQ_BTNS 141 -static struct omap_board_config_kernel htcherald_config[] __initdata = { - { OMAP_TAG_LCD, htcherald_lcd_config }, -}; +/* GPIO definitions for the touchscreen */ +#define HTCHERALD_GPIO_TS 76 + +/* HTCPLD definitions */ + +/* + * CPLD Logic + * + * Chip 3 - 0x03 + * + * Function7 6 5 4 3 2 1 0 + * + * DPAD light x x x x x x x 1 + * SoundDevx x x x 1 x x x + * Screen white1 x x x x x x x + * MMC power onx x x x x 1 x x + * Happy times (n) 0 x x x x 1 x x + * + * Chip 4 - 0x04 + * + * Function7 6 5 4 3 2 1 0 + * + * Keyboard light x x x x x x x 1 + * LCD Bright (4) x x x x x 1 1 x + * LCD Bright (3) x x x x x 0 1 x + * LCD Bright (2) x x x x x 1 0 x + * LCD Bright (1) x x x x x 0 0 x + * LCD Off x x x x 0 x x x + * LCD image (fb) 1 x x x x x x x + * LCD image (white) 0 x x x x x x x + * Caps lock LED x x 1 x x x x x + * + * Chip 5 - 0x05 + * + * Function7 6 5 4 3 2 1 0 + * + * Red (solid) x x x x x 1 x x + * Red (flash) x x x x x x 1 x + * Green (GSM flash) x x x x 1 x x x + * Green (GSM solid) x x x 1 x x x x + * Green (wifi flash) x x 1 x x x x x + * Blue (bt flash) x 1 x x x x x x + * DPAD Int Enable 1 x x x x x x 0 + * + * (Combinations of the above can be made for different colors.) + * The direction pad interrupt enable must be set each time the + * interrupt is handled. + * + * Chip 6 - 0x06 + * + * Function7 6 5 4 3 2 1 0 + * + * Vibratorx x x x 1 x x x + * Alt LED x x x 1 x x x x + * Screen white1 x x x x x x x + * Screen whitex x 1 x x x x x + * Screen whitex 0 x x x x x x + * Enable kbd dpad x x x x x x 0 x + * Happy Times 0 1 0 x x x 0 x + */ + +/* + * HTCPLD GPIO lines start 16 after OMAP_MAX_GPIO_LINES to account + * for the 16 MPUIO lines. + */ +#define HTCPLD_GPIO_START_OFFSET (OMAP_MAX_GPIO_LINES + 16) +#define HTCPLD_IRQ(chip, offset) (OMAP_IRQ_END + 8 * (chip) + (offset)) +#define HTCPLD_BASE(chip, offset) \ + (HTCPLD_GPIO_START_OFFSET + 8 * (chip) + (offset)) + +#define HTCPLD_GPIO_LED_DPAD HTCPLD_BASE(0, 0) +#define HTCPLD_GPIO_LED_KBDHTCPLD_BASE(1, 0) +#define HTCPLD_GPIO_LED_CAPS HTCPLD_BASE(1, 5) +#define HTCPLD_GPIO_LED_RED_FLASH HTCPLD_BASE(2, 1) +#define HTCPLD_GPIO_LED_RED_SOLID HTCPLD_BASE(2, 2) +#define HTCPLD_GPIO_LED_GREEN_FLASHHTCPLD_BASE(2, 3) +#define HTCPLD_GPIO_LED_GREEN_SOLIDHTCPLD_BASE(2, 4) +#define HTCPLD_GPIO_LED_WIFI HTCPLD_BASE(2, 5) +#define HTCPLD_GPIO_LED_BT HTCPLD_BASE(2, 6) +#define HTCPLD_GPIO_LED_VIBRATEHTCPLD_BASE(3, 3) +#define HTCPLD_GPIO_LED_ALTHTCPLD_BASE(3, 4) + +#define HTCPLD_GPIO_RIGHT_KBD HTCPLD_BASE(6, 7) +#define HTCPLD_GPIO_UP_KBD HTCPLD_BASE(6,