Send commitlog mailing list submissions to
        [EMAIL PROTECTED]

To subscribe or unsubscribe via the World Wide Web, visit
        http://lists.openmoko.org/mailman/listinfo/commitlog
or, via email, send a message with subject or body 'help' to
        [EMAIL PROTECTED]

You can reach the person managing the list at
        [EMAIL PROTECTED]

When replying, please edit your Subject line so it is more specific
than "Re: Contents of commitlog digest..."
Today's Topics:

   1. r1737 - in trunk/src/target/OM-2007/openmoko-libs: .
      libmokojournal/src ([EMAIL PROTECTED])
   2. r1738 - trunk/src/target/kernel/patches
      ([EMAIL PROTECTED])
   3. r1739 - trunk/src/target/kernel/patches
      ([EMAIL PROTECTED])
   4. r1740 - in
      trunk/src/target/OM-2007/applications/openmoko-contacts: .        src
      ([EMAIL PROTECTED])
   5. r1741 - in
      trunk/src/target/OM-2007/applications/openmoko-contacts: .        src
      ([EMAIL PROTECTED])
   6. r1742 - in developers/werner: . usb-pullup
      ([EMAIL PROTECTED])
--- Begin Message ---
Author: dodji
Date: 2007-04-13 16:11:30 +0200 (Fri, 13 Apr 2007)
New Revision: 1737

Modified:
   trunk/src/target/OM-2007/openmoko-libs/ChangeLog
   trunk/src/target/OM-2007/openmoko-libs/libmokojournal/src/moko-journal.c
Log:
Update the journal when another process removes entries

        * openmoko-libs/libmokojournal/src/moko-journal.c:
          (moko_journal_load_from_storage): make sure we get notified when
          another process removes an entry.
          (on_entries_removed_cb): added this to handle entry removal by
          another process.


Modified: trunk/src/target/OM-2007/openmoko-libs/ChangeLog
===================================================================
--- trunk/src/target/OM-2007/openmoko-libs/ChangeLog    2007-04-13 08:37:14 UTC 
(rev 1736)
+++ trunk/src/target/OM-2007/openmoko-libs/ChangeLog    2007-04-13 14:11:30 UTC 
(rev 1737)
@@ -1,5 +1,13 @@
 2007-04-13 Dodji Seketeli <[EMAIL PROTECTED]>
 
+       * openmoko-libs/libmokojournal/src/moko-journal.c:
+         (moko_journal_load_from_storage): make sure we get notified when
+         another process removes an entry.
+         (on_entries_removed_cb): added this to handle entry removal by
+         another process.
+
+2007-04-13 Dodji Seketeli <[EMAIL PROTECTED]>
+
        * *.h,c: changed moko_j_email_info* into moko_journal_email_info*
        * openmoko-libs/libmokojournal/src/moko-journal.c:
          (moko_journal_remove_entry_at): only entries that has been

Modified: 
trunk/src/target/OM-2007/openmoko-libs/libmokojournal/src/moko-journal.c
===================================================================
--- trunk/src/target/OM-2007/openmoko-libs/libmokojournal/src/moko-journal.c    
2007-04-13 08:37:14 UTC (rev 1736)
+++ trunk/src/target/OM-2007/openmoko-libs/libmokojournal/src/moko-journal.c    
2007-04-13 14:11:30 UTC (rev 1737)
@@ -92,6 +92,11 @@
 static void on_entries_added_cb (ECalView *a_view,
                                  GList *a_entries,
                                  MokoJournal *a_journal) ;
+static void on_entries_removed_cb (ECalView *a_view,
+                                   GList *uids,
+                                   MokoJournal *a_journal) ;
+
+
 static const gchar*
 entry_type_to_string (MokoJournalEntryType a_type)
 {
@@ -953,6 +958,33 @@
   }
 }
 
+static void
+on_entries_removed_cb (ECalView *a_view,
+                       GList *a_uids,
+                       MokoJournal *a_journal)
+{
+  GList *cur = NULL ;
+
+  g_return_if_fail (a_view && E_IS_CAL_VIEW (a_view)) ;
+  g_return_if_fail (a_journal) ;
+
+  /*TODO:
+   * we should notify the world before removing an entry.
+   * Otherwise, client code may hold a reference to
+   * what will become a dangling pointer after we remove it here
+   */
+  for (cur = a_uids ; cur ; cur = cur->next)
+  {
+    if (cur->data)
+    {
+      if (!moko_journal_remove_entry_by_uid (a_journal, cur->data))
+      {
+        g_message ("failed to remove entry of uid %s\n", cur->data) ;
+      }
+    }
+  }
+}
+
 /**
  * moko_journal_load_from_storage:
  * @a_journal: the journal to load entries into
@@ -998,6 +1030,11 @@
                       "objects-added",
                       G_CALLBACK (on_entries_added_cb),
                       a_journal) ;
+    g_signal_connect (G_OBJECT (a_journal->ecal_view),
+                      "objects-removed",
+                      G_CALLBACK (on_entries_removed_cb),
+                      a_journal) ;
+
     e_cal_view_start (a_journal->ecal_view) ;
   }
 




--- End Message ---
--- Begin Message ---
Author: laforge
Date: 2007-04-13 18:23:43 +0200 (Fri, 13 Apr 2007)
New Revision: 1738

Modified:
   trunk/src/target/kernel/patches/gta01-vibrator.patch
Log:
* fix kernel oops during vibrator use and suspend. (Daniel Willmann)


Modified: trunk/src/target/kernel/patches/gta01-vibrator.patch
===================================================================
--- trunk/src/target/kernel/patches/gta01-vibrator.patch        2007-04-13 
14:11:30 UTC (rev 1737)
+++ trunk/src/target/kernel/patches/gta01-vibrator.patch        2007-04-13 
16:23:43 UTC (rev 1738)
@@ -2,10 +2,10 @@
 uses the existing LED class driver framework, since there's a lot of
 similarity between the LED and the vibrator function.
 
-Index: linux-2.6.20.4/drivers/leds/leds-gta01.c
+Index: linux-2.6.20.4-moko/drivers/leds/leds-gta01.c
 ===================================================================
---- /dev/null  1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6.20.4/drivers/leds/leds-gta01.c   2007-03-30 22:58:37.000000000 
+0200
+--- /dev/null
++++ linux-2.6.20.4-moko/drivers/leds/leds-gta01.c
 @@ -0,0 +1,133 @@
 +/*
 + * LED driver for the FIC GTA01 (Neo1973) GSM Phone Vibrator
@@ -43,10 +43,10 @@
 +
 +static inline struct gta01_vib_priv *to_vpriv(struct led_classdev *led_cdev)
 +{
-+      return container_of(led_cdev, struct gta01_vib_priv, cdev);
++      return dev_get_drvdata(led_cdev->class_dev->dev);
 +}
 +
-+static void gta01led_vib_set(struct led_classdev *led_cdev, enum 
led_brightness value)
++static void gta01vib_vib_set(struct led_classdev *led_cdev, enum 
led_brightness value)
 +{
 +      struct gta01_vib_priv *vp = to_vpriv(led_cdev);
 +
@@ -58,24 +58,24 @@
 +
 +static struct led_classdev gta01_vib_led = {
 +      .name                   = "gta01:vibrator",
-+      .brightness_set         = gta01led_vib_set,
++      .brightness_set         = gta01vib_vib_set,
 +};
 +
 +#ifdef CONFIG_PM
-+static int gta01led_suspend(struct platform_device *dev, pm_message_t state)
++static int gta01vib_suspend(struct platform_device *dev, pm_message_t state)
 +{
 +      led_classdev_suspend(&gta01_vib_led);
 +      return 0;
 +}
 +
-+static int gta01led_resume(struct platform_device *dev)
++static int gta01vib_resume(struct platform_device *dev)
 +{
 +      led_classdev_resume(&gta01_vib_led);
 +      return 0;
 +}
 +#endif
 +
-+static int gta01led_probe(struct platform_device *pdev)
++static int gta01vib_probe(struct platform_device *pdev)
 +{
 +      struct gta01_vib_priv *vp;
 +      struct resource *r;
@@ -101,7 +101,7 @@
 +      return led_classdev_register(&pdev->dev, &gta01_vib_led);
 +}
 +
-+static int gta01led_remove(struct platform_device *pdev)
++static int gta01vib_remove(struct platform_device *pdev)
 +{
 +      struct gta01_vib_priv *vp = pdev_to_vpriv(pdev);
 +
@@ -112,38 +112,38 @@
 +      return 0;
 +}
 +
-+static struct platform_driver gta01led_driver = {
-+      .probe          = gta01led_probe,
-+      .remove         = gta01led_remove,
++static struct platform_driver gta01vib_driver = {
++      .probe          = gta01vib_probe,
++      .remove         = gta01vib_remove,
 +#ifdef CONFIG_PM
-+      .suspend        = gta01led_suspend,
-+      .resume         = gta01led_resume,
++      .suspend        = gta01vib_suspend,
++      .resume         = gta01vib_resume,
 +#endif
 +      .driver         = {
 +              .name           = "gta01-led",
 +      },
 +};
 +
-+static int __init gta01led_init(void)
++static int __init gta01vib_init(void)
 +{
-+      return platform_driver_register(&gta01led_driver);
++      return platform_driver_register(&gta01vib_driver);
 +}
 +
-+static void __exit gta01led_exit(void)
++static void __exit gta01vib_exit(void)
 +{
-+      platform_driver_unregister(&gta01led_driver);
++      platform_driver_unregister(&gta01vib_driver);
 +}
 +
-+module_init(gta01led_init);
-+module_exit(gta01led_exit);
++module_init(gta01vib_init);
++module_exit(gta01vib_exit);
 +
 +MODULE_AUTHOR("Harald Welte <[EMAIL PROTECTED]>");
-+MODULE_DESCRIPTION("FIC GTA01 LED driver");
++MODULE_DESCRIPTION("FIC GTA01 Vibrator driver");
 +MODULE_LICENSE("GPL");
-Index: linux-2.6.20.4/drivers/leds/Kconfig
+Index: linux-2.6.20.4-moko/drivers/leds/Kconfig
 ===================================================================
---- linux-2.6.20.4.orig/drivers/leds/Kconfig   2007-03-30 22:55:57.000000000 
+0200
-+++ linux-2.6.20.4/drivers/leds/Kconfig        2007-03-30 22:56:03.000000000 
+0200
+--- linux-2.6.20.4-moko.orig/drivers/leds/Kconfig
++++ linux-2.6.20.4-moko/drivers/leds/Kconfig
 @@ -82,6 +82,12 @@
        help
          This option enables support for the PCEngines WRAP programmable LEDs.
@@ -157,10 +157,10 @@
  comment "LED Triggers"
  
  config LEDS_TRIGGERS
-Index: linux-2.6.20.4/drivers/leds/Makefile
+Index: linux-2.6.20.4-moko/drivers/leds/Makefile
 ===================================================================
---- linux-2.6.20.4.orig/drivers/leds/Makefile  2007-03-30 22:55:59.000000000 
+0200
-+++ linux-2.6.20.4/drivers/leds/Makefile       2007-03-30 22:56:03.000000000 
+0200
+--- linux-2.6.20.4-moko.orig/drivers/leds/Makefile
++++ linux-2.6.20.4-moko/drivers/leds/Makefile
 @@ -14,6 +14,7 @@
  obj-$(CONFIG_LEDS_AMS_DELTA)          += leds-ams-delta.o
  obj-$(CONFIG_LEDS_NET48XX)            += leds-net48xx.o




--- End Message ---
--- Begin Message ---
Author: laforge
Date: 2007-04-13 18:24:40 +0200 (Fri, 13 Apr 2007)
New Revision: 1739

Modified:
   trunk/src/target/kernel/patches/gta01-core.patch
Log:
* fix vibrator GPIO pin for Bv2 and Bv3 (Daniel Willmann)


Modified: trunk/src/target/kernel/patches/gta01-core.patch
===================================================================
--- trunk/src/target/kernel/patches/gta01-core.patch    2007-04-13 16:23:43 UTC 
(rev 1738)
+++ trunk/src/target/kernel/patches/gta01-core.patch    2007-04-13 16:24:40 UTC 
(rev 1739)
@@ -1,10 +1,10 @@
 This patch adds support for the FIC GTA01 machine type to the ARM port of
 the linux kernel.
 
-Index: linux-2.6.20.4/arch/arm/mach-s3c2410/Kconfig
+Index: linux-2.6.20.4-moko/arch/arm/mach-s3c2410/Kconfig
 ===================================================================
---- linux-2.6.20.4.orig/arch/arm/mach-s3c2410/Kconfig  2007-04-02 
20:55:06.000000000 +0200
-+++ linux-2.6.20.4/arch/arm/mach-s3c2410/Kconfig       2007-04-02 
20:56:34.000000000 +0200
+--- linux-2.6.20.4-moko.orig/arch/arm/mach-s3c2410/Kconfig
++++ linux-2.6.20.4-moko/arch/arm/mach-s3c2410/Kconfig
 @@ -86,6 +86,14 @@
        help
           Say Y here if you are using the Armzone QT2410
@@ -20,10 +20,10 @@
  config ARCH_S3C2440
        bool "SMDK2440"
        select CPU_S3C2440
-Index: linux-2.6.20.4/arch/arm/mach-s3c2410/Makefile
+Index: linux-2.6.20.4-moko/arch/arm/mach-s3c2410/Makefile
 ===================================================================
---- linux-2.6.20.4.orig/arch/arm/mach-s3c2410/Makefile 2007-04-02 
20:55:06.000000000 +0200
-+++ linux-2.6.20.4/arch/arm/mach-s3c2410/Makefile      2007-04-02 
20:56:33.000000000 +0200
+--- linux-2.6.20.4-moko.orig/arch/arm/mach-s3c2410/Makefile
++++ linux-2.6.20.4-moko/arch/arm/mach-s3c2410/Makefile
 @@ -89,5 +89,6 @@
  obj-$(CONFIG_MACH_NEXCODER_2440) += mach-nexcoder.o
  obj-$(CONFIG_MACH_VSTMS)      += mach-vstms.o
@@ -31,11 +31,11 @@
 +obj-$(CONFIG_MACH_GTA01)      += mach-gta01.o
  
  obj-$(CONFIG_MACH_SMDK)               += common-smdk.o
-Index: linux-2.6.20.4/arch/arm/mach-s3c2410/mach-gta01.c
+Index: linux-2.6.20.4-moko/arch/arm/mach-s3c2410/mach-gta01.c
 ===================================================================
---- /dev/null  1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6.20.4/arch/arm/mach-s3c2410/mach-gta01.c  2007-04-02 
20:57:23.000000000 +0200
-@@ -0,0 +1,735 @@
+--- /dev/null
++++ linux-2.6.20.4-moko/arch/arm/mach-s3c2410/mach-gta01.c
+@@ -0,0 +1,740 @@
 +/*
 + * linux/arch/arm/mach-s3c2410/mach-gta01.c
 + *
@@ -260,11 +260,12 @@
 +              break;
 +      case GTA01Bv3_SYSTEM_REV:
 +      case GTA01Bv2_SYSTEM_REV:
-+              gta01_pcf_pdata.rails[PCF50606_REGULATOR_D3REG].name = "user1";
-+              gta01_pcf_pdata.rails[PCF50606_REGULATOR_D3REG].flags =
-+                                                      PMU_VRAIL_F_UNUSED;
-+              gta01_pcf_pdata.rails[PCF50606_REGULATOR_DCUD].flags =
-+                                                      PMU_VRAIL_F_SUSPEND_ON;
++              gta01_pcf_pdata.rails[PCF50606_REGULATOR_D3REG]
++                                      .name = "user1";
++              gta01_pcf_pdata.rails[PCF50606_REGULATOR_D3REG]
++                                      .flags &= ~PMU_VRAIL_F_SUSPEND_ON;
++              gta01_pcf_pdata.rails[PCF50606_REGULATOR_D3REG]
++                                      .flags = PMU_VRAIL_F_UNUSED;
 +              break;
 +      case GTA01v4_SYSTEM_REV:
 +              cfg_pmu_vrail(&gta01_pcf_pdata.rails[PCF50606_REGULATOR_DCUD],
@@ -742,9 +743,13 @@
 +      switch (system_rev) {
 +      case GTA01v3_SYSTEM_REV:
 +      case GTA01v4_SYSTEM_REV:
++              /* just use the default (GTA01_IRQ_PCF50606) */
++              break;
 +      case GTA01Bv2_SYSTEM_REV:
 +      case GTA01Bv3_SYSTEM_REV:
 +              /* just use the default (GTA01_IRQ_PCF50606) */
++              gta01_led_resources[0].start =
++                      gta01_led_resources[0].end = GTA01Bv2_GPIO_VIBRATOR_ON;
 +              break;
 +      case GTA01Bv4_SYSTEM_REV:
 +              gta01_pmu_resources[0].start =
@@ -771,10 +776,10 @@
 +MACHINE_END
 +
 +
-Index: linux-2.6.20.4/include/asm-arm/arch-s3c2410/gta01.h
+Index: linux-2.6.20.4-moko/include/asm-arm/arch-s3c2410/gta01.h
 ===================================================================
---- /dev/null  1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6.20.4/include/asm-arm/arch-s3c2410/gta01.h        2007-04-02 
20:55:32.000000000 +0200
+--- /dev/null
++++ linux-2.6.20.4-moko/include/asm-arm/arch-s3c2410/gta01.h
 @@ -0,0 +1,69 @@
 +#ifndef _GTA01_H
 +#define _GTA01_H




--- End Message ---
--- Begin Message ---
Author: thomas
Date: 2007-04-13 18:34:38 +0200 (Fri, 13 Apr 2007)
New Revision: 1740

Modified:
   trunk/src/target/OM-2007/applications/openmoko-contacts/ChangeLog
   
trunk/src/target/OM-2007/applications/openmoko-contacts/src/contacts-callbacks-ebook.c
Log:
* src/contacts-callbacks-ebook.c: (contacts_changed_cb):

        Make sure cell phone column is updated when a contact is saved. Fixes 
bug 400.


Modified: trunk/src/target/OM-2007/applications/openmoko-contacts/ChangeLog
===================================================================
--- trunk/src/target/OM-2007/applications/openmoko-contacts/ChangeLog   
2007-04-13 16:24:40 UTC (rev 1739)
+++ trunk/src/target/OM-2007/applications/openmoko-contacts/ChangeLog   
2007-04-13 16:34:38 UTC (rev 1740)
@@ -1,3 +1,9 @@
+2007-04-13  Thomas Wood  <[EMAIL PROTECTED]>
+
+       * src/contacts-callbacks-ebook.c: (contacts_changed_cb):
+
+       Make sure cell phone column is updated when a contact is saved. Fixes 
bug 400.
+
 2007-04-04  Thomas Wood  <[EMAIL PROTECTED]>
 
        * src/contacts-contact-pane.c: (set_type), (get_type),

Modified: 
trunk/src/target/OM-2007/applications/openmoko-contacts/src/contacts-callbacks-ebook.c
===================================================================
--- 
trunk/src/target/OM-2007/applications/openmoko-contacts/src/contacts-callbacks-ebook.c
      2007-04-13 16:24:40 UTC (rev 1739)
+++ 
trunk/src/target/OM-2007/applications/openmoko-contacts/src/contacts-callbacks-ebook.c
      2007-04-13 16:34:38 UTC (rev 1740)
@@ -125,7 +125,7 @@
                EContact *contact = E_CONTACT (c->data);
                EContactListHash *hash;
                GList *contact_groups;
-               const gchar *uid, *name;
+               const gchar *uid, *name, *cell;
 
                /* Lookup if contact exists in internal list (it should) */
                uid = e_contact_get_const (contact, E_CONTACT_UID);
@@ -144,9 +144,13 @@
                name = e_contact_get_const (contact, E_CONTACT_FULL_NAME);
                if ((!name) || (g_utf8_strlen (name, -1) <= 0))
                        name = "Unnamed";
-               gtk_list_store_set (model, &hash->iter, CONTACT_NAME_COL, name,
-                       -1);
+               gtk_list_store_set (model, &hash->iter, CONTACT_NAME_COL, name, 
-1);
 
+               cell = e_contact_get_const (contact, E_CONTACT_PHONE_MOBILE);
+               if ((!cell) || (g_utf8_strlen (cell, -1) <= 0))
+      cell = "";
+                       gtk_list_store_set (model, &hash->iter, 
CONTACT_CELLPHONE_COL, cell, -1);
+
                /* If contact is currently selected, update display */
                if (current_contact) {
                        if (strcmp (e_contact_get_const




--- End Message ---
--- Begin Message ---
Author: thomas
Date: 2007-04-13 19:06:20 +0200 (Fri, 13 Apr 2007)
New Revision: 1741

Modified:
   trunk/src/target/OM-2007/applications/openmoko-contacts/ChangeLog
   
trunk/src/target/OM-2007/applications/openmoko-contacts/src/contacts-callbacks-ui.c
Log:
* src/contacts-callbacks-ui.c: (contacts_selection_cb): Don't try to commit a
NULL contact when selection changes. Fixes bug 423.


Modified: trunk/src/target/OM-2007/applications/openmoko-contacts/ChangeLog
===================================================================
--- trunk/src/target/OM-2007/applications/openmoko-contacts/ChangeLog   
2007-04-13 16:34:38 UTC (rev 1740)
+++ trunk/src/target/OM-2007/applications/openmoko-contacts/ChangeLog   
2007-04-13 17:06:20 UTC (rev 1741)
@@ -1,5 +1,10 @@
 2007-04-13  Thomas Wood  <[EMAIL PROTECTED]>
 
+       * src/contacts-callbacks-ui.c: (contacts_selection_cb): Don't try to 
commit a
+       NULL contact when selection changes. Fixes bug 423.
+
+2007-04-13  Thomas Wood  <[EMAIL PROTECTED]>
+
        * src/contacts-callbacks-ebook.c: (contacts_changed_cb):
 
        Make sure cell phone column is updated when a contact is saved. Fixes 
bug 400.

Modified: 
trunk/src/target/OM-2007/applications/openmoko-contacts/src/contacts-callbacks-ui.c
===================================================================
--- 
trunk/src/target/OM-2007/applications/openmoko-contacts/src/contacts-callbacks-ui.c
 2007-04-13 16:34:38 UTC (rev 1740)
+++ 
trunk/src/target/OM-2007/applications/openmoko-contacts/src/contacts-callbacks-ui.c
 2007-04-13 17:06:20 UTC (rev 1741)
@@ -118,7 +118,7 @@
        gint current_pane;
 
        /* if we have modified the previous contact, but not saved it, do so 
now */
-       if (data->changed)
+       if (data->changed && data->contact)
                e_book_async_commit_contact (data->book, data->contact, NULL, 
NULL);
 
        current_pane = gtk_notebook_get_current_page (GTK_NOTEBOOK 
(data->ui->main_notebook));




--- End Message ---
--- Begin Message ---
Author: werner
Date: 2007-04-13 21:58:31 +0200 (Fri, 13 Apr 2007)
New Revision: 1742

Added:
   developers/werner/usb-pullup/
   developers/werner/usb-pullup/README
   developers/werner/usb-pullup/new.fig
   developers/werner/usb-pullup/new.spice
   developers/werner/usb-pullup/old.spice
   developers/werner/usb-pullup/runs
   developers/werner/usb-pullup/si.pl
Log:
Proposed change of the 49XX USB pullup circuit (for GTA02).



Added: developers/werner/usb-pullup/README
===================================================================
--- developers/werner/usb-pullup/README 2007-04-13 17:06:20 UTC (rev 1741)
+++ developers/werner/usb-pullup/README 2007-04-13 19:58:31 UTC (rev 1742)
@@ -0,0 +1,65 @@
+Suggested changes
+=================
+
+1) Change R1713 (nRESET pull-up) from 100 kOhm to 33 kOhm
+
+2) Replace R1911, Q4901, R4910, and D4910 with the circuit shown
+   in new.fig
+
+   For Q1, Q2, RB1, and RB2 an NXP PEMH19 can be used, so the number
+   of components stays the same.
+
+   R4910 is split into R1 and R2 in order to bias both transistors.
+   The value of R1 and R2 has been slightly adjusted to compensate
+   for losses over Q1 and Q2.
+
+   This two-transistor solution also eliminates the USB_PULLUP to
+   nRESET path that might allow mis-configured GPIO to keep the
+   device out of reset.
+
+
+Simulation
+==========
+
+The goal of this simulation is only to obtain indicative results.
+For a more comprehensive analysis, the transistors should be modeled
+with more detail, and component tolerances should be taken into
+account.
+
+
+Reference data from the old solution (nRESET omitted for simplicity)
+--------------------------------------------------------------------
+
+USB_PULLUP        Q2.IE   I(IO_3V3)             Description
+Z                 1.44 mA  1.45 mA              pull-up enabled
+L                 3.3  pA 70.2  uA              pull-up disabled
+
+Note: to compare power consumption with the new circuit, add 10 uA
+to I(IO_3V3).
+
+
+New circuit
+-----------
+
+The simulation also models the 10 uA the CPU may draw on nRESET.
+To perform all simulations shown here, simply run "./runs".
+
+USB attached:
+
+Switches        Q2.IE      I(IO_3V3)  V(nRESET)
+USB:              2.09 mA    2.10 mA    2.63  V  pull-up enabled
+USB+UG:           2.26 pA   58.11 uA    2.96  V  pull-up disabled
+USB+UP:           2.31 mA    2.32 mA    2.61  V  invalid !
+USB+RG:           3.04 pA  100.00 uA   90.00 nV  reset
+USB+RG+UG:        0.00 pA  100.00 uA   90.00 nV  reset
+USB+RG+UP:      184.93 uA  284.92 uA   90.00 nV  reset (*)
+
+
+Without USB:
+
+Switches        Q2.IE      I(IO_3V3)  V(nRESET)
+:                 0.00 pA   10.00 uA    2.97  V  pull-up enabled
+UG:               0.00 pA   58.11 uA    2.96  V  pull-up disabled
+RG:               0.00 pA  100.00 uA   90.00 nV  reset
+
+(*) Is such a high Q2.IE acceptable in this (probably rare) state ?

Added: developers/werner/usb-pullup/new.fig
===================================================================
--- developers/werner/usb-pullup/new.fig        2007-04-13 17:06:20 UTC (rev 
1741)
+++ developers/werner/usb-pullup/new.fig        2007-04-13 19:58:31 UTC (rev 
1742)
@@ -0,0 +1,127 @@
+#FIG 3.2
+Landscape
+Center
+Inches
+Letter  
+100.00
+Single
+-2
+1200 2
+6 3225 3975 3900 4125
+2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
+        3225 3975 3375 3975 3375 4125 3225 4125 3225 3975
+4 0 0 50 -1 0 12 0.0000 4 135 375 3525 4125 RRG\001
+-6
+6 8250 7200 8850 8100
+2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
+        8550 7200 8550 7800
+2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
+        8250 7800 8850 7800
+4 1 0 50 -1 2 12 0.0000 4 135 90 8550 8100 0\001
+-6
+1 3 0 1 0 7 50 -1 -1 0.000 1 0.0000 2400 4050 300 300 2400 4050 2700 4050
+2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
+        3900 3300 4800 3300 4800 3600 3900 3600 3900 3300
+2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 3
+        3900 3450 3300 3450 3300 4800
+2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
+        3300 3450 3300 2700
+2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
+        5700 3000 5700 3900
+2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
+        4800 3450 5700 3450
+2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2
+       1 0 1.00 60.00 120.00
+        5700 3450 6150 3900
+2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
+        6000 1800 6300 1800 6300 2700 6000 2700 6000 1800
+2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
+        6150 1350 6150 1800
+2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 3
+        6150 2700 6150 3000 5700 3450
+2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
+        6150 3900 6150 5100
+2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
+        3300 900 3300 1200
+2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
+        3150 1050 3450 1050
+2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
+        6150 900 6150 1200
+2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
+        6000 1050 6300 1050
+2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
+        3150 1800 3450 1800 3450 2700 3150 2700 3150 1800
+2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
+        3300 1350 3300 1800
+2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
+        6900 4350 7800 4350 7800 4650 6900 4650 6900 4350
+2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
+        6150 4500 6900 4500
+2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 3
+        3300 3450 2400 3450 2400 3750
+2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2
+       1 0 1.00 60.00 120.00
+        2400 3825 2400 4275
+2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 5
+       1 0 1.00 60.00 120.00
+        7800 4500 8550 4500 8550 6300 8100 6750 8550 7200
+2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
+        3000 4800 3600 4800
+2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
+        2100 4800 2700 4800
+2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
+        2400 4350 2400 4800
+2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
+        6000 5100 6300 5100 6300 6000 6000 6000 6000 5100
+2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
+        6600 6600 7500 6600 7500 6900 6600 6900 6600 6600
+2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
+        8100 6300 8100 7200
+2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
+        3600 6750 6600 6750
+2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
+        6150 6000 6150 6750
+2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
+        7500 6750 8100 6750
+2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
+        3600 7500 3600 5850
+2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
+        3300 7500 3900 7500
+2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
+        3600 5700 3600 5400
+2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
+        3450 5550 3750 5550
+2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
+        3525 6225 3675 6225 3675 6375 3525 6375 3525 6225
+2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
+        3525 6975 3675 6975 3675 7125 3525 7125 3525 6975
+4 0 0 50 -1 0 12 0.0000 4 135 705 3600 2325 RR = 33k\001
+4 0 0 50 -1 0 12 0.0000 4 135 675 6450 2325 R1 = 680\001
+4 1 0 50 -1 0 12 0.0000 4 135 795 4350 3150 RB1 = 22k\001
+4 0 0 50 -1 0 12 0.0000 4 180 1200 6000 3525 Q1 (hFE = 200)\001
+4 0 0 50 -1 2 12 0.0000 4 135 90 3450 1725 1\001
+4 0 0 50 -1 2 12 0.0000 4 135 90 6300 1725 1\001
+4 1 0 50 -1 2 12 0.0000 4 135 90 5250 3300 3\001
+4 1 0 50 -1 2 12 0.0000 4 135 90 6300 3075 4\001
+4 1 0 50 -1 0 12 0.0000 4 135 675 7350 4200 R2 = 680\001
+4 1 0 50 -1 2 12 0.0000 4 135 90 6000 4575 5\001
+4 1 0 50 -1 2 12 0.0000 4 135 90 3150 3300 2\001
+4 0 0 50 -1 0 12 0.0000 4 135 840 3600 1125 VIO =3.3V\001
+4 1 0 50 -1 2 12 0.0000 4 135 90 3000 1125 1\001
+4 1 0 50 -1 2 12 0.0000 4 135 90 5850 1125 1\001
+4 1 0 50 -1 2 12 0.0000 4 135 90 3300 5100 0\001
+4 1 0 50 -1 2 12 0.0000 4 135 90 2400 5100 0\001
+4 1 0 50 -1 0 12 0.0000 4 135 795 7050 6450 RB2 = 22k\001
+4 0 0 50 -1 0 12 0.0000 4 180 1200 8400 6825 Q2 (hFE = 200)\001
+4 0 0 50 -1 0 12 0.0000 4 135 720 6450 5625 RU = 47k\001
+4 1 0 50 -1 2 12 0.0000 4 135 90 3600 7800 0\001
+4 1 0 50 -1 2 12 0.0000 4 135 90 5850 6600 7\001
+4 1 0 50 -1 2 12 0.0000 4 135 90 8700 5625 8\001
+4 1 0 50 -1 2 12 0.0000 4 135 90 7800 6600 9\001
+4 1 0 50 -1 2 12 0.0000 4 135 180 8700 7275 10\001
+4 0 0 50 -1 0 12 0.0000 4 135 360 3825 6375 RUP\001
+4 0 0 50 -1 0 12 0.0000 4 135 390 3750 7125 RUG\001
+4 0 0 50 -1 0 12 0.0000 4 180 5145 3600 8925 Q1, Q2, RB1, and RB2 are 
integrated in an NXP PEMH19 dual NPN\001
+4 1 0 50 -1 2 12 0.0000 4 135 90 3300 5625 1\001
+4 2 0 50 -1 0 12 0.0000 4 135 555 1950 4275 = 10uA\001
+4 2 0 50 -1 0 12 0.0000 4 135 630 1950 3975 IRESET\001

Added: developers/werner/usb-pullup/new.spice
===================================================================
--- developers/werner/usb-pullup/new.spice      2007-04-13 17:06:20 UTC (rev 
1741)
+++ developers/werner/usb-pullup/new.spice      2007-04-13 19:58:31 UTC (rev 
1742)
@@ -0,0 +1,30 @@
+USB PULL-UP CIRCUIT (NEW)
+
+VIO 1 0 DC 3.3
+IRESET 2 0 DC 0.00001
+
+RR 1 2 33000
+RB1 2 3 22000
+RB2 7 9 22000
+RU 5 7 47000
+
+* Drop IO_3V3 in two steps, so that we get a useful bias on each transistor
+R1 1 4 680
+R3 5 8 680
+
+Q1 4 3 5 QMOD
+Q2 8 9 10 QMOD
+
+* Switch: uncomment to pull nRESET low
+*RRG 2 0 0.001
+* Switch: uncomment to drive USB_PULLUP high (invalid !)
+*RUP 1 7 0.001
+* Switch: uncomment to drive USB_PULLUP low
+*RUG 7 0 0.001
+* Switch: uncomment to connect USB
+*RUSB 10 0 0.001
+
+.MODEL QMOD NPN BF=200
+.OP
+.PRINT OP @Q2[IE] I(VIO) V(2)
+.END

Added: developers/werner/usb-pullup/old.spice
===================================================================
--- developers/werner/usb-pullup/old.spice      2007-04-13 17:06:20 UTC (rev 
1741)
+++ developers/werner/usb-pullup/old.spice      2007-04-13 19:58:31 UTC (rev 
1742)
@@ -0,0 +1,15 @@
+USB PULL-UP CIRCUIT (OLD)
+
+VIO 1 0 DC 3.3
+
+R4911 1 2 47000
+Q4901 1 2 4 QMOD
+R4910 4 0 1500
+
+* Switch: uncomment to pull USB_PULLUP low
+*RUG 2 0 0.001
+
+.MODEL QMOD NPN BF=200
+
+.OP
+.END

Added: developers/werner/usb-pullup/runs
===================================================================
--- developers/werner/usb-pullup/runs   2007-04-13 17:06:20 UTC (rev 1741)
+++ developers/werner/usb-pullup/runs   2007-04-13 19:58:31 UTC (rev 1742)
@@ -0,0 +1,14 @@
+#!/bin/sh
+echo "Switches        Q2.IE      I(IO_3V3)  V(nRESET)"
+for n in USB USB+UG USB+UP USB+RG USB+RG+UG USB+RG+UP \
+  '' UG RG; do
+    printf "%-16s" "$n:"
+    sed '/^\*R\('`echo "$n" |
+      sed 's/+/\\\\|/g'`'\) /s/^.//' <new.spice |
+      spice -b 2>/dev/null |
+      sed '/^0 */s///p;d' |
+      perl si.pl A A V
+done
+
+# Don't know why SPICE complains about my .PRINT commands. It does the right
+# calculations anyway.


Property changes on: developers/werner/usb-pullup/runs
___________________________________________________________________
Name: svn:executable
   + *

Added: developers/werner/usb-pullup/si.pl
===================================================================
--- developers/werner/usb-pullup/si.pl  2007-04-13 17:06:20 UTC (rev 1741)
+++ developers/werner/usb-pullup/si.pl  2007-04-13 19:58:31 UTC (rev 1742)
@@ -0,0 +1,47 @@
+#!/usr/bin/perl
+
+sub cvt
+{
+    $_[0] =~ /-?(\d.\d+)e[-+](\d+)/ || die "$_[0]";
+    $m = $1;
+    $e = $2;
+    $p = " ";
+    while ($e % 3) {
+       $m *= 10;
+       $e++;
+    }
+    if ($e > 9) {
+       $p = "p";
+       $e -= 12;
+    }
+    elsif ($e > 6) {
+       $p = "n";
+       $e -= 9;
+    }
+    elsif ($e > 3) {
+       $p = "u";
+       $e -= 6;
+    }
+    elsif ($e > 0) {
+       $p = "m";
+       $e -= 3;
+    }
+    while ($e > 0) {
+       $m /= 10;
+       $e--;
+    }
+    print sprintf("%6.2f",$m)." $p";
+}
+
+while (<STDIN>) {
+    chop;
+    s/^\s*//;
+    s/\s*$//;
+    $i = 0;
+    for (split(/\s+/)) {
+       &cvt($_);
+       print "@ARGV[$i]  ";
+       $i++;
+    }
+    print "\n";
+}


Property changes on: developers/werner/usb-pullup/si.pl
___________________________________________________________________
Name: svn:executable
   + *




--- End Message ---
_______________________________________________
commitlog mailing list
[EMAIL PROTECTED]
http://lists.openmoko.org/mailman/listinfo/commitlog

Reply via email to