[ltp] ThinkPad 600X and TPCTL

James Mckenzie linux-thinkpad@linux-thinkpad.org
31 Dec 2002 19:53:06 -0700


Juan:

Run the PS2 SE ON command once.  It does not need to be run twice.

James Mckenzie


On Mon, 2002-12-30 at 16:10, Juan Pablo Martinez Sanchez wrote:
>=20
>=20
> Hello,
>=20
> i have done the following, firstly using PS2:
>=20
> PS2 IR DISABLE     -->  OK
> PS2 SE ON          -->  OK
> PS2 SERA ON        -->  Memory Error, try Easy-Setup and Initialize  -->
> But i don't do it because in principle the Serial Port is ON
>=20
> After this i boot linux:
>=20
> Kernel doesn=C2=B4t recognize the ttyS0.
> Execute setserial /dev/ttyS0 irq 4 port 0x03f8 uart 16550A    ---> OK
> Execute tpctl --rs1=3DIRQ4 --rs1=3D0x3f8 --rs1=3Denable             ---> =
OK, but
> the power/mode for rs1 is (error)
> Try minicom with another PC    ---> NOT OK, Minicom when transmitting
> from the ThinkPad get error 5 and it is due to the fact that kernel
> didn't recognize the ttyS0, cable and application already tested with
> another PC's
>=20
>=20
>=20
> So, i proved another way:
>=20
>=20
> Easy-Setup and Initialize
> Boot Linux and kernel recognizes ttyS0
> Execute: setserial /dev/ttyS0 irq 4 port 0x03f8 uart 16550A  -->OK
> Execute: tpctl --rs2=3Ddisable   -->OK
> Execute: tpctl --rs1=3DIRQ4 --rs1=3D0x3f8 --rs1=3Denable      -->OK, but =
again
> the power/mode for rs1 is (error)
> Try minicom with another PC    --> NOT OK, Minicom in ThinkPad transmits
> correctly, i mean, there are not errors and the info in
> /proc/tty/driver/serial indicates that there are TX's, but the another PC
> don't receive anything...
>=20
>=20
> I don't know what can be happening, but i suspect that the problem is wit=
h
> the power management for the serial port 1
>=20
> Any idea?, and thanks a lot,
>=20
>=20
> Juan Pablo.
>=20
>=20
>=20
>=20
>=20
> On Mon, 30 Dec 2002, jjmckenzie51@earthlink.net wrote:
>=20
> > Juan:
> >
> > It appears that the IR port and the serial port are set to use the same
> > IRQ.  Try to disable the IR port and enable the serial port (this may b=
e
> > the source of your error message.)
> >
> > Also, W2K uses software to enable the port (as does W98 and WXP).  Thus=
 the
> > port can be powered down upon startup and turned on and off as needed
> > through the operating system.  Linux and OS/2 must have the port powere=
d up
> > prior to booting.  This is done through the use of the PS2 Serial Enabl=
e
> > command.  You may have to disable the IR port PRIOR to the attempt to t=
urn
> > on the serial port.
> >
> > The error message you receive is from the CMOS BIOS and usually can be
> > ignored.  I had it when setting my parallel port to EPP/ECP and the por=
t
> > started up just fine.
> >
> > James Mckenzie
> >
> > Original Message:
> > -----------------
> > From: Juan Pablo Martinez Sanchez is04796@salleURL.edu
> > Date: Mon, 30 Dec 2002 19:54:50 +0100 (CET)
> > To: linux-thinkpad@linux-thinkpad.org
> > Subject: Re: [ltp] ThinkPad 600X and TPCTL
> >
> >
> >
> >
> > Hello Dan,
> >
> > there's nothing to do, i am not able to use the serial port yet in linu=
x.
> > I don't know what to do because i have tried all the ways. What i find
> > strange is that when kernel boots it recognizes the device:
> >
> > >ttyS00 at 0x03f8 (irq =3D 4) is a 16550A
> >
> > And when executing tpctl --rs1 --rs2 the output is:
> >
> > >resource state                   ioaddr irq#   able? mode/power
> > >thinkpadpm: Power state of device 0x400 could not be got; 0x9999 was
> > >returned as the state -- APM error 0x1
> > >   serial port 1:                 0x0   IRQ0 disable (error)
> > >   serial port 2:                 0x3f8 IRQ4  enable
> >
> > In principle resource serial port 2 is the Infrared Port, so i don't
> > understand why if the kernel recognizes a serial port (for the 16550A)
> > then tpctl reads that port & irq for the Infrared Port.
> >
> > Also, a test i have done is to measure the voltage in a serial port in =
a
> > PC (linux mandrake 8.1) and the values are -11 V. When i measure the
> > voltage in the serial port in the ThinkPad 600X the values are 0 V. So =
i
> > think that perhaps the message error from module thinkpadpm indicates
> > something is happening with power in serial port. But i don't know why =
if
> > windows 2000 uses the port normally...
> >
> > Thanks a lot,
> >
> > Juan Pablo.
> >
> >
> >
> >
> >
> >
> > On Sun, 29 Dec 2002, Dan Sawyer wrote:
> >
> > > Juan,
> > >
> > > I have a 600x and the serial port works reliably. Below is the tpctl
> > > output. The power indicator does not seem to be reliable; it is power=
ed
> > > even though it is marked off
> > >
> > > I booted windows in dos mode and ran ps2.exe. This apparently set the
> > > bios corectly. Linux picks that up and works reliably.
> > >
> > > Let me know how that works,
> > > Dan
> > >
> > > resource state:                        ioaddr irq#   able? mode/power
> > >    floppy controller:                   0x3f0 IRQ6  enable
> > >    parallel port:                       0x3bc IRQ7  enable ext
> > >    serial port 1:                       0x2f8 IRQ3  enable off
> > >    serial port 2:                       0x0   IRQ0 disable
> > >
> > >
> > > Juan Pablo Martinez Sanchez wrote:
> > >
> > > >Hi all,
> > > >
> > > >the serial port of my ThinkPad 600X goes ok in win 2000, but i need =
it to
> > > >run
> > > >in linux and i have some problems. So, if you could tell me somethin=
g
> > > >about it i'd
> > > >be grateful.
> > > >
> > > >The model is a 2645-EYG, the bios version is ITET47WW (11/30/99). Th=
e
> > > >kernel version is:
> > > >
> > > >
> > > >
> > > >>uname -a
> > > >>
> > > >>
> > > >
> > > >
> > > >
> > > >>>Linux hobbit 2.4.18 #5 SMP Fri Dec 27 14:16:35 CET 2002 i686 unkno=
wn
> > > >>>
> > > >>>
> > > >
> > > >
> > > >I'm using libc 2.2.5, modutils 2.4.15, gcc 2.95.3, make 3.79.1.
> > > >
> > > >Once the kernel boots i try the following commands:
> > > >
> > > >
> > > >
> > > >>dmesg | grep tty
> > > >>
> > > >>
> > > >
> > > >
> > > >
> > > >>>ttyS00 at 0x03f8 (irq =3D 4) is a 16550A
> > > >>>
> > > >>>
> > > >
> > > >
> > > >
> > > >
> > > >>cat /proc/ioports | grep serial
> > > >>
> > > >>
> > > >
> > > >
> > > >
> > > >>>03f8-03ff : serial(auto)
> > > >>>
> > > >>>
> > > >
> > > >
> > > >
> > > >
> > > >>cat /proc/interrupts
> > > >>
> > > >>
> > > >
> > > >
> > > >
> > > >>> 0:   324586        XT-PIC  timer
> > > >>> 1:     1268        XT-PIC  keyboard
> > > >>> 2:        0        XT-PIC  cascade
> > > >>> 8:        1        XT-PIC  rtc
> > > >>>11:        0        XT-PIC  Texas Instruments PCI1450, Texas
> > > >>>
> > > >>>
> > > >Instruments PC
> > > >
> > > >
> > > >>>I1450 (#2), usb-uhci, eth0
> > > >>>14:      659        XT-PIC  ide0
> > > >>>15:        3        XT-PIC  ide1
> > > >>>NMI:        0
> > > >>>LOC:        0
> > > >>>ERR:        0
> > > >>>MIS:        0
> > > >>>
> > > >>>
> > > >
> > > >
> > > >
> > > >
> > > >>cat /proc/tty/driver/serial | grep port:3F8
> > > >>
> > > >>
> > > >
> > > >
> > > >
> > > >>>0: uart:16550A port:3F8 irq:4 tx:0 rx:0 CTS|DSR
> > > >>>
> > > >>>
> > > >
> > > >
> > > >I have compiled and installed thinkpad and tpctl version 4.1 correct=
ly,
> > > >following instructions
> > > >in the README file. When i try:
> > > >
> > > >
> > > >
> > > >>tpctl --rs1 --rs2
> > > >>
> > > >>
> > > >
> > > >obtain:
> > > >
> > > >
> > > >
> > > >>>thinkpad: I have registered to handle major: 10 minor: 170.
> > > >>>resource state:                        ioaddr irq#   able? mode/po=
wer
> > > >>>superio: Super I/O chip (non-virgin) in plug-n-play mode found at =
port
> > > >>>
> > > >>>
> > > >base 0x2e
> > > >
> > > >
> > > >>>. :-)
> > > >>>superio: I/O ports for Super I/O chip not available, but ignoring =
this.
> > > >>>thinkpadpm: Found APM BIOS version 1.2 flags 0x03 entry 0x48:0x0. =
:-)
> > > >>>thinkpadpm: Power state of device 0x400 could not be got; 0x9999 w=
as
> > > >>>
> > > >>>
> > > >returned as
> > > >
> > > >
> > > >>>the state -- APM error 0x1
> > > >>>  serial port 1:                       0x0    IRQ0 disable (error)
> > > >>>  serial port 2:                       0x3f8  IRQ4  enable
> > > >>>
> > > >>>
> > > >
> > > >
> > > >And if i try:
> > > >
> > > >
> > > >
> > > >>tpctl --rs2=3Ddisable --rs2=3Doff --rs1=3Denable --rs1=3Don
> > > >>
> > > >>
> > > >
> > > >obtain:
> > > >
> > > >
> > > >
> > > >>>tpctl: serial port 1 has been enabled
> > > >>>tpctl: serial port 1 power management is disabled
> > > >>>tpctl: serial port 2 has been disabled
> > > >>>tpctl: serial port 2 base address has been set to 0x4001
> > > >>>resource state:                        ioaddr irq#   able? mode/po=
wer
> > > >>>thinkpadpm: Power state of device 0x400 could not be got; 0x9999 w=
as
> > > >>>
> > > >>>
> > > >returned as
> > > >
> > > >
> > > >>>the state -- APM error 0x1
> > > >>>  serial port 1:                       0x0   IRQ0  enable (error)
> > > >>>  serial port 2:                       0x4000 IRQ4 disable
> > > >>>
> > > >>>
> > > >
> > > >
> > > >
> > > >So, i have an error when turning on the serial port 1. I have taken =
a
> > look
> > > >at TROUBLESHOOTING
> > > >in tpctl/thinkpad v4.1 but not find anything. Also i have checked my
> > model
> > > >is contained in
> > > >SUPPORTED-MODELS and it seems to be similar as 2645-7EG (i have powe=
r
> > > >management version 1.07
> > > >and POSI/BIOS version 1.12).
> > > >Also, i have taken a look at source file
> > > >..../thinpad-4.1/2.4/drivers/thinkpadpm.c in function
> > > >apm_bios_call(...) but i lose myself.
> > > >
> > > >If any help or idea to solve this error will be very well received,
> > > >
> > > >Thanks a lot,
> > > >
> > > >Juan Pablo.
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > >
> > >
> >
> > --
> > The linux-thinkpad mailing list home page is at:
> > http://mailman.linux-thinkpad.org/mailman/listinfo/linux-thinkpad
> >
> > --------------------------------------------------------------------
> > mail2web - Check your email from the web at
> > http://mail2web.com/ .
> >
> >
> > --
> > The linux-thinkpad mailing list home page is at:
> > http://mailman.linux-thinkpad.org/mailman/listinfo/linux-thinkpad
> >
>=20
> --=20
> The linux-thinkpad mailing list home page is at:
> http://mailman.linux-thinkpad.org/mailman/listinfo/linux-thinkpad