[ltp] ThinkPad 600X and TPCTL

Juan Pablo Martinez Sanchez linux-thinkpad@linux-thinkpad.org
Mon, 30 Dec 2002 19:54:50 +0100 (CET)


Hello Dan,

there's nothing to do, i am not able to use the serial port yet in linux.
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 = 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 powered
> 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 something
> >about it i'd
> >be grateful.
> >
> >The model is a 2645-EYG, the bios version is ITET47WW (11/30/99). The
> >kernel version is:
> >
> >
> >
> >>uname -a
> >>
> >>
> >
> >
> >
> >>>Linux hobbit 2.4.18 #5 SMP Fri Dec 27 14:16:35 CET 2002 i686 unknown
> >>>
> >>>
> >
> >
> >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 = 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 correctly,
> >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/power
> >>>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 was
> >>>
> >>>
> >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=disable --rs2=off --rs1=enable --rs1=on
> >>
> >>
> >
> >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/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  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 power
> >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.
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
>
>