#12525 NORM 4-firmw: XO-4 EC communication problem
Zarro Boogs per Child
bugtracker at laptop.org
Wed Feb 6 00:45:50 EST 2013
#12525: XO-4 EC communication problem
-------------------------------------------+--------------------------------
Reporter: wad | Owner: rsmith
Type: defect | Status: new
Priority: normal | Milestone: 4-firmware
Component: embedded controller | Version: Development source as of this date
Resolution: | Keywords: XO-4, EC
Next_action: diagnose | Verified: 0
Deployment_affected: | Blockedby:
Blocking: |
-------------------------------------------+--------------------------------
Comment(by pgf):
during this, dump_xdata_sfr reports:
{{{
X
GPIOFS fc00: 00 00 40 00 00 00 80 00 00 00 00 00 c7 00 00 00
GPIOOE fc10: 00 b0 6d 00 0f 40 01 08 30 30 10 1c 00 08 00 00
GPIOD fc20: 00 a0 28 00 00 40 01 08 30 20 00 15 00 00 00 00
GPIOIN fc30: df f7 ff ff f0 7f 1f ff ff ff ff fe df ff 07 fe
GPIOPU fc40: 00 00 00 00 0f 00 ff 00 00 00 00 00 20 00 00 00
GPIOOD fc50: 00 00 00 00 00 40 00 00 30 00 00 00 00 00 00 00
GPIOIE fc60: 20 cc 90 00 0f 80 ff 30 30 cc 00 03 20 00 00 01
GPIOMSC fc70: 64 00 00 00 00 00 00
KBC fc80: 40 00 00 00 00 00 10 00 00 08 00 00 00 00 00 00
ESB fc90: 00 00 00 00 00 00 00 00 00 00
IKB fca0: 00 00 00 00 00 00 00 00 ff 00 f7 ff ff 55 00 04
PECI fcd0: 00 00 01 00 00 00 00 00 00 00 00 00 00 00 00 00
OWM fcf0: 00 00 00 00 00 40 40 2d 0a 50 2d 03 14
PWM fe00: 11 00 fe 00 fe 00 c0 c0 00 00 3f fe 00 00 3f fe
FAN fe20: 30 00 0f ff 00 00 00 00 00 00 0f fe 0f 00 0f ff
FAN fe30: 00 00 0f ff 00 00 00 00 0f ff 00 00 0f 00 0f ff
GPT fe50: 08 04 00 00 00 00 0c cd 00 1f
SDI fe70: 1f 00 00 00 00 00 00 00 80 00 01 01 00 00 5a 00
WDT fe80: 80 00 00 00 00 00 00 00 00 00 31 00 0f
XBI fea0: 00 00 00 0f 00 05 04 00 83 00 00 17 90 08 00 00
XBI feb0: 00 00 00 00 00 00 a5 96 2f 13
CIR fec0: 00 00 c0 00 00 00 00 00 00 00 00 44 00 00 00 00
GWG fed0: 00 00 00 00 00 00
PS2 fee0: 00 00 00 00 00 ef 0e
EC ff00: c3 00 0f 90 00 00 00 00 00 c0 22 00 2f 1c 00 41
ADCDAC ff10: 00 00 00 00 00 07 3e 83 35 7f 80 00 00 00 90 10
ADCDAC ff20: 80 00 80 00 04 05 00 03 00 cc 01 5d 5d
EC ff1d: 00 90 10 80 00 80 00 04 05 00 03 00 cc 01 5d 5d
GPWUEN ff30: 00 08 00 00 00 00 00 00 00 44 00 00 00 20 00
GPWUPF ff40: 20 84 90 00 0f 80 f1 00 30 cc 00 03 01 20 00
GPWUPS ff50: 00 08 00 00 00 00 00 00 00 00 00 00 00 00 00
GPWUEL ff60: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
GPWUCHG ff70: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
SMB0 ff90: 00 00 00 30 06 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
SMB1 ffd0: 00 00 00 30 06 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 02 7a fc 02 87 0d 7e 3f 7f 65 22 02 87 13 7e 49
}}}
the ACK bit is bit 5 of the PF[0xd] or EC[0xd] register. it's pending,
and enabled, as i read it.
but we're clearly not getting acks, because the debug count isn't going
up.
but i just probed it, and we're definitely getting 1us 3.2V positive
pulses on ACK. so linux is able to strobe it.
the dump_8051_sfr() output is:
{{{
>I
TCON: 0x00, TMOD: 0x10, TL0: 0x00, TL1: 0x00, SCON: 0x50, P2: 0xf4,
IE: 0x98, SBUF: 0x0d, SCON2: 0x01, PCON2: 0x30, SCON3: 0x21, TH0: 0x00,
TH1: 0x00,
SCON4: 0x00, PCON: 0x00, ACC: 0x00,
P0IE: 0x00, P1IE: 0x80, P3IE: 0xa2,
P0IF: 0x00, P1IF: 0x00, P3IF: 0x00,
}}}
the dump_wakes() output is:
{{{
5844373:Wakes
WU[1] = EN:08 PF:84
WU[9] = EN:44 PF:cc # the CC bits are TD,TC,KC,KD (T=tpad, K=kbd)
WU[d] = EN:20 PF:20 # this is the ACK interrupt bit
}}}
i think this means there are pending and enabled tpadclk and kbddat
interrupts. since these are the same priority as ACK, but they may take
precedence since they're lower bits?
answer: no. writing 0 to ff39, which leaves:
{{{
6908402:Wakes
WU[1] = EN:08 PF:84
WU[d] = EN:20 PF:20
}}}
leaves the missing ACK symptom unchanged.
writing 0x20 to PF[0xd] to clear the pending ACK flag ("w ff4d 20") did
clear the bit, but the code went into an infinite spin -- i've lost the
scrollback, it was so fast. writing 0 to EN[0xd] ("w ff3d 0") got things
under control, and writing it back to 0x20 ("w ff3d 20") made things work
again.
so for some reason we weren't servicing the ACK interrupt. the P3IE value
looks okay. i'm at a loss.
--
Ticket URL: <http://dev.laptop.org/ticket/12525#comment:5>
One Laptop Per Child <http://laptop.org/>
OLPC bug tracking system
More information about the Bugs
mailing list