On 05.02.2010 16:02, Tom wrote:
Dirk Behme wrote:
On Thu, Feb 4, 2010 at 8:30 PM, Paulraj, Sandeep <s-paul...@ti.com>
wrote:

On 20.01.2010 18:58, Paulraj, Sandeep wrote:

Subject: Re: [U-Boot] [STATUS] Merge Window closed, waiting for pull
requests

On 19.01.2010 23:30, Wolfgang Denk wrote:
Hi

as you probably have noticed, the merge window closed about 24 hours
ago. Checking my list, I still see s _long_ list of ARM related
patches that have not been processed yet. For many of them I haven't
seen any review comments, nor have architecture maintainer picked
these up and sent pull requests to Tom.

Can you please try and work on this now, so that we can have the
outstanding patches integrated into mainline in the next few days?
I'd like to see the Beagle rev C4 patches applied:

http://lists.denx.de/pipermail/u-boot/2010-January/066629.html
http://lists.denx.de/pipermail/u-boot/2010-January/066632.html
http://lists.denx.de/pipermail/u-boot/2010-January/066634.html
http://lists.denx.de/pipermail/u-boot/2010-January/066636.html
http://lists.denx.de/pipermail/u-boot/2010-January/066638.html
http://lists.denx.de/pipermail/u-boot/2010-January/066640.html
http://lists.denx.de/pipermail/u-boot/2010-January/066642.html

(The ml archive seems to have some issues with these patches. In my
inbox they seem to be fine, though)
Same with me but when I discussed offline with Tom, it appears as if
this set never made it to his Inbox.
We need just a little more time.
What's the recent status of this?
Tom had comments.

Do you (or anybody else) mind to send the archive links of the
comments? Just to be sure that everything will be covered and nothing
is missed ;)

Many thanks and best regards

Dirk
The big ones I remember are copyrights, documenting magic video
settings, clk tweeking needs to move to board level.
These weren't all of them, please see my full comments on 1/23

Ok, thanks.

I found some time to look at them, and I think I was able to update/fix patches 1-3/7. At least they are compiling fine and I think the comments are fixed. For reference please find them in attachment.

It seems I don't have time to look at the other patches, though. So I'm not sure what to do with 1-3, now. Shall I send them as a seperate series 1-3/3? I.e. splitting the 7 patch series into smaller chunks? Or will anybody be able to look at the other comments asap? I'd really like to get them in while this merge window if possible.

Best regards

Dirk
Subject: [PATCH 1/7 v2] ARM OMAP3: Update Beagle revision detection
From: Khasim Syed Mohammed <kha...@beagleboard.org>

New BeagleBoard revision C4 uses a new ID. Update revision detection.

Signed-off-by: Dirk Behme <dirk.be...@googlemail.com>
Signed-off-by: Syed Mohammed Khasim <kha...@ti.com>
---

Changes in v2: No changes, just make subject 'v2' consistent.

 board/ti/beagle/beagle.c |   64 +++++++++++++++++++++++++++++------------------
 board/ti/beagle/beagle.h |    8 ++++-
 2 files changed, 46 insertions(+), 26 deletions(-)

Index: u-boot-main/board/ti/beagle/beagle.c
===================================================================
--- u-boot-main.orig/board/ti/beagle/beagle.c
+++ u-boot-main/board/ti/beagle/beagle.c
@@ -38,7 +38,7 @@
 #include <asm/mach-types.h>
 #include "beagle.h"
 
-static int beagle_revision_c;
+static int beagle_revision;
 
 /*
  * Routine: board_init
@@ -60,41 +60,57 @@ int board_init(void)
 /*
  * Routine: beagle_get_revision
  * Description: Return the revision of the BeagleBoard this code is running on.
- *              If it is a revision Ax/Bx board, this function returns 0,
- *              on a revision C board you will get a 1.
  */
 int beagle_get_revision(void)
 {
-       return beagle_revision_c;
+       return beagle_revision;
 }
 
 /*
  * Routine: beagle_identify
- * Description: Detect if we are running on a Beagle revision Ax/Bx or
- *              Cx. This can be done by GPIO_171. If this is low, we are
- *              running on a revision C board.
+ * Description: Detect if we are running on a Beagle revision Ax/Bx,
+ *             C1/2/3, C4 or D. This can be done by reading
+ *             the level of GPIO173, GPIO172 and GPIO171. This should
+ *             result in
+ *             GPIO173, GPIO172, GPIO171: 1 1 1 => Ax/Bx
+ *             GPIO173, GPIO172, GPIO171: 1 1 0 => C1/2/3
+ *             GPIO173, GPIO172, GPIO171: 1 0 1 => C4
+ *             GPIO173, GPIO172, GPIO171: 0 0 0 => D
  */
 void beagle_identify(void)
 {
-       beagle_revision_c = 0;
-       if (!omap_request_gpio(171)) {
-               unsigned int val;
-
-               omap_set_gpio_direction(171, 1);
-               val = omap_get_gpio_datain(171);
-               omap_free_gpio(171);
-
-               if (val)
-                       beagle_revision_c = 0;
-               else
-                       beagle_revision_c = 1;
-       }
+       omap_request_gpio(171);
+       omap_request_gpio(172);
+       omap_request_gpio(173);
+       omap_set_gpio_direction(171, 1);
+       omap_set_gpio_direction(172, 1);
+       omap_set_gpio_direction(173, 1);
+
+       beagle_revision = omap_get_gpio_datain(173) << 2 |
+                         omap_get_gpio_datain(172) << 1 |
+                         omap_get_gpio_datain(171);
+       omap_free_gpio(171);
+       omap_free_gpio(172);
+       omap_free_gpio(173);
 
        printf("Board revision ");
-       if (beagle_revision_c)
-               printf("C\n");
-       else
+
+       switch (beagle_revision) {
+       case REVISION_AXBX:
                printf("Ax/Bx\n");
+               break;
+       case REVISION_CX:
+               printf("C1/C2/C3\n");
+               break;
+       case REVISION_C4:
+               printf("C4\n");
+               break;
+       case REVISION_D:
+               printf("D\n");
+               break;
+       default:
+               printf("unknown 0x%02x\n", beagle_revision);
+       }
 }
 
 /*
@@ -137,7 +153,7 @@ void set_muxconf_regs(void)
 {
        MUX_BEAGLE();
 
-       if (beagle_revision_c) {
+       if (beagle_revision != REVISION_AXBX) {
                MUX_BEAGLE_C();
        }
 }
Index: u-boot-main/board/ti/beagle/beagle.h
===================================================================
--- u-boot-main.orig/board/ti/beagle/beagle.h
+++ u-boot-main/board/ti/beagle/beagle.h
@@ -33,7 +33,11 @@ const omap3_sysinfo sysinfo = {
 #endif
 };
 
-#define BOARD_REVISION_MASK    (0x1 << 11)
+/* BeagleBoard revisions */
+#define REVISION_AXBX  0x7
+#define REVISION_CX    0x6
+#define REVISION_C4    0x5
+#define REVISION_D     0x0
 
 /*
  * IEN  - Input Enable
@@ -264,7 +268,7 @@ const omap3_sysinfo sysinfo = {
        MUX_VAL(CP(HDQ_SIO),            (IDIS | PTU | EN  | M4)) /*GPIO_170*/\
        MUX_VAL(CP(MCSPI1_CLK),         (IEN  | PTU | EN  | M4)) /*GPIO_171*/\
        MUX_VAL(CP(MCSPI1_SIMO),        (IEN  | PTU | EN  | M4)) /*GPIO_172*/\
-       MUX_VAL(CP(MCSPI1_SOMI),        (IEN  | PTD | DIS | M0)) 
/*McSPI1_SOMI*/\
+       MUX_VAL(CP(MCSPI1_SOMI),        (IEN  | PTU | EN  | M4)) /*GPIO_173*/\
        MUX_VAL(CP(MCSPI1_CS0),         (IEN  | PTD | EN  | M0)) /*McSPI1_CS0*/\
        MUX_VAL(CP(MCSPI1_CS1),         (IDIS | PTD | EN  | M0)) /*McSPI1_CS1*/\
        MUX_VAL(CP(MCSPI1_CS2),         (IDIS | PTD | DIS | M4)) /*GPIO_176*/\
Subject: [PATCH 2/7 v2] ARM OMAP3: Enable I2C bus switching
From: Khasim Syed Mohammed <kha...@beagleboard.org>

OMAP3 supports Multiple I2C channels, this patch allows
us to use i2c dev <bus no> command to switch between busses.

Signed-off-by: Syed Mohammed Khasim <kha...@ti.com>
Signed-off-by: Dirk Behme <dirk.be...@googlemail.com>
Acked-by: Heiko Schocher <h...@denx.de>
---

Changes in v2:
- Remove CONFIG_SYS_I2C_NOPROBES as proposed by Ben Warren

 drivers/i2c/omap24xx_i2c.c     |    5 +++++
 include/configs/omap3_beagle.h |    3 +++
 2 files changed, 8 insertions(+)

Index: u-boot-main/drivers/i2c/omap24xx_i2c.c
===================================================================
--- u-boot-main.orig/drivers/i2c/omap24xx_i2c.c
+++ u-boot-main/drivers/i2c/omap24xx_i2c.c
@@ -435,3 +435,8 @@ int i2c_set_bus_num(unsigned int bus)
 
        return 0;
 }
+
+int i2c_get_bus_num(void)
+{
+       return (int) current_bus;
+}
Index: u-boot-main/include/configs/omap3_beagle.h
===================================================================
--- u-boot-main.orig/include/configs/omap3_beagle.h
+++ u-boot-main/include/configs/omap3_beagle.h
@@ -100,6 +100,9 @@
 /* DDR - I use Micron DDR */
 #define CONFIG_OMAP3_MICRON_DDR                1
 
+/* Enable Multi Bus support for I2C */
+#define CONFIG_I2C_MULTI_BUS           1
+
 /* USB */
 #define CONFIG_MUSB_UDC                        1
 #define CONFIG_USB_OMAP3               1
Subject: [PATCH 3/7 v2] ARM OMAP3: API to set twl4030 voltage and dev group
From: Khasim Syed Mohammed <kha...@beagleboard.org>

API to set twl4030 voltage and dev group

Signed-off-by: Syed Mohammed Khasim <kha...@ti.com>
Signed-off-by: Dirk Behme <dirk.be...@googlemail.com>
---

Changes in v2:

- Remain consistent with existing naming. Use the TWL4030_PM_RECEIVER prefix

V3:
Incorporated review comments to set voltage first
and then dev group

V2:
Incorporated review comments to split the patch and
add generic API to set the voltage and device group.
http://www.mail-archive.com/u-boot@lists.denx.de/msg27136.html

V1:
Added support for 720 Mhz
http://www.mail-archive.com/u-boot@lists.denx.de/msg27035.html

 drivers/power/twl4030.c |   32 +++++++++++++++++++-------------
 include/twl4030.h       |   16 ++++++++++++++++
 2 files changed, 35 insertions(+), 13 deletions(-)

Index: u-boot-main/drivers/power/twl4030.c
===================================================================
--- u-boot-main.orig/drivers/power/twl4030.c
+++ u-boot-main/drivers/power/twl4030.c
@@ -59,16 +59,9 @@ void twl4030_power_reset_init(void)
        }
 }
 
-
 /*
  * Power Init
  */
-#define DEV_GRP_P1             0x20
-#define VAUX3_VSEL_28          0x03
-#define DEV_GRP_ALL            0xE0
-#define VPLL2_VSEL_18          0x05
-#define VDAC_VSEL_18           0x03
-
 void twl4030_power_init(void)
 {
        unsigned char byte;
@@ -77,7 +70,7 @@ void twl4030_power_init(void)
        byte = DEV_GRP_P1;
        twl4030_i2c_write_u8(TWL4030_CHIP_PM_RECEIVER, byte,
                             TWL4030_PM_RECEIVER_VAUX3_DEV_GRP);
-       byte = VAUX3_VSEL_28;
+       byte = TWL4030_PM_RECEIVER_VAUX3_VSEL_28;
        twl4030_i2c_write_u8(TWL4030_CHIP_PM_RECEIVER, byte,
                             TWL4030_PM_RECEIVER_VAUX3_DEDICATED);
 
@@ -85,7 +78,7 @@ void twl4030_power_init(void)
        byte = DEV_GRP_ALL;
        twl4030_i2c_write_u8(TWL4030_CHIP_PM_RECEIVER, byte,
                             TWL4030_PM_RECEIVER_VPLL2_DEV_GRP);
-       byte = VPLL2_VSEL_18;
+       byte = TWL4030_PM_RECEIVER_VPLL2_VSEL_18;
        twl4030_i2c_write_u8(TWL4030_CHIP_PM_RECEIVER, byte,
                             TWL4030_PM_RECEIVER_VPLL2_DEDICATED);
 
@@ -93,13 +86,11 @@ void twl4030_power_init(void)
        byte = DEV_GRP_P1;
        twl4030_i2c_write_u8(TWL4030_CHIP_PM_RECEIVER, byte,
                             TWL4030_PM_RECEIVER_VDAC_DEV_GRP);
-       byte = VDAC_VSEL_18;
+       byte = TWL4030_PM_RECEIVER_VDAC_VSEL_18;
        twl4030_i2c_write_u8(TWL4030_CHIP_PM_RECEIVER, byte,
                             TWL4030_PM_RECEIVER_VDAC_DEDICATED);
 }
 
-#define VMMC1_VSEL_30          0x02
-
 void twl4030_power_mmc_init(void)
 {
        unsigned char byte;
@@ -109,7 +100,22 @@ void twl4030_power_mmc_init(void)
                             TWL4030_PM_RECEIVER_VMMC1_DEV_GRP);
 
        /* 3 Volts */
-       byte = VMMC1_VSEL_30;
+       byte = TWL4030_PM_RECEIVER_VMMC1_VSEL_30;
        twl4030_i2c_write_u8(TWL4030_CHIP_PM_RECEIVER, byte,
                             TWL4030_PM_RECEIVER_VMMC1_DEDICATED);
 }
+
+/*
+ * Generic function to select Device Group and Voltage
+ */
+void twl4030_pmrecv_vsel_cfg(u8 vsel_reg, u8 vsel_val,
+                               u8 dev_grp, u8 dev_grp_sel)
+{
+       /* Select the Voltage */
+       twl4030_i2c_write_u8(TWL4030_CHIP_PM_RECEIVER, vsel_val,
+                               vsel_reg);
+
+       /* Select the Device Group */
+       twl4030_i2c_write_u8(TWL4030_CHIP_PM_RECEIVER, dev_grp_sel,
+                               dev_grp);
+}
Index: u-boot-main/include/twl4030.h
===================================================================
--- u-boot-main.orig/include/twl4030.h
+++ u-boot-main/include/twl4030.h
@@ -471,6 +471,22 @@
 #define TWL4030_USB_PHY_CLK_CTRL_STS                   0xFF
 
 /*
+ * Voltage Selection in PM Receiver Module
+ */
+#define TWL4030_PM_RECEIVER_VAUX2_VSEL_18              0x05
+#define TWL4030_PM_RECEIVER_VDD1_VSEL_14               0x40
+#define TWL4030_PM_RECEIVER_VAUX3_VSEL_28              0x03
+#define TWL4030_PM_RECEIVER_VPLL2_VSEL_18              0x05
+#define TWL4030_PM_RECEIVER_VDAC_VSEL_18               0x03
+#define TWL4030_PM_RECEIVER_VMMC1_VSEL_30              0x02
+
+/*
+ * Device Selection
+ */
+#define DEV_GRP_P1             0x20
+#define DEV_GRP_ALL            0xE0
+
+/*
  * Convience functions to read and write from TWL4030
  *
  * chip_no is the i2c address, it must be one of the chip addresses
_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot

Reply via email to