Subject: Re: iBook internal modem
To: Ben Elliston <bje@wasabisystems.com>
From: Bruce ONeel <edoneel@sdf.lonestar.org>
List: port-macppc
Date: 07/02/2003 12:01:53
Ben Elliston <bje@wasabisystems.com> wrote:
> The macppc web page lists the iBook internal modem as "not yet
> supported".  Is there any reason why it can't be made to work?  Is
> there any active work going on to get it supported?
> 
> Cheers, Ben

Hi,

My first edition toilet seat model works with the following patch:

Date: 13 Jun 2002 00:09:41 -0400
From: "Nathan J. Williams" <nathanw@wasabisystems.com>
Subject: Re: ibook modem
To: Bruce ONeel <beoneel@bluewin.ch>
Cc: Bill Studenmund <wrstuden@netbsd.org>, port-macppc@netbsd.org
organization: Wasabi Systems, Inc.

Bruce ONeel <beoneel@bluewin.ch> writes:

> Would a usb to serial adapter let me use a regular modem
> on my iBook?  Would it run ppp then?  That
> would be great.

It would, or you could just use the patch that enables the modem
serial port on the iBook; it works fine, I spent most of the last
Christmas holiday dialed up from NetBSD on my iBook.

(I should probably just commit this. Would whoever posted this patch
speak up so I can give them credit?)

        - Nathan

Index: obio.c
===================================================================
RCS file: /cvsroot/syssrc/sys/arch/macppc/dev/obio.c,v
retrieving revision 1.14
diff -c -r1.14 obio.c
*** obio.c      2001/06/17 19:54:47     1.14
--- obio.c      2002/06/13 04:08:02
***************
*** 133,138 ****
--- 133,146 ----
        if (PCI_PRODUCT(pa->pa_id) == PCI_PRODUCT_APPLE_PADDINGTON)
                out8(ca.ca_baseaddr + 0x37, 0x03);
  
+         /* XXX Enable internal modem (Pangea) */
+       if (PCI_PRODUCT(pa->pa_id) == PCI_PRODUCT_APPLE_PANGEA_MACIO) {
+               out8(ca.ca_baseaddr + 0x006a + 0x03, 0x04); /* set reset */
+               out8(ca.ca_baseaddr + 0x006a + 0x02, 0x04); /* power modem on */
+               out8(ca.ca_baseaddr + 0x006a + 0x03, 0x05); /* unset reset */
+        }
+ 
+ 
        for (child = OF_child(node); child; child = OF_peer(child)) {
                namelen = OF_getprop(child, "name", name, sizeof(name));
                if (namelen < 0)


BEO ADDITION

It's PR 15505

The important code is:

+       /* XXX Enable internal modem (KeyLargo) */
+       if (PCI_PRODUCT(pa->pa_id) == PCI_PRODUCT_APPLE_KEYLARGO) {
+         printf("enabling KeyLargo internal modem\n");
+         out32rb(ca.ca_baseaddr + 0x40,
+                 in32rb(ca.ca_baseaddr + 0x40) & ~((u_int32_t)1<<25)); /* powe
r modem on */ 
+       }