Aleksandr Koltsoff
2009-02-27 07:57:04 UTC
Hello all,
Apologies for the long mail, the issue is somewhat complicated.
First off, the question:
Is it detrimental to continue running the PXA270 with the following
settings:
Initially PMCR==0x15, then nBATT_FAULT goes down and PMCR is at 0x3d.
(0x15==Instead of entering deep-sleep on the fault signals, cause an
interrupt, aka BIDAE+VIDAE+IAS).
The reason why I ask is that the current pxa270 platform code
(mach-pxa/pxa27x.c) always enables the power i2c bus. This causes one of
the following scenarios in our case:
a) nBATT_FAULT occurs. If PMCR is left with default values, this forces
PXA270 to enter deep-sleep immediately (we can't wake it up).
b) If we turn the faults into interrupts (via PMCR-settings), the
nBATT_FAULT condition will cause an interrupt that will trigger the
irq-handler for i2c-1 in Linux. Since none of the I2C status registers
reflect that the source was the power monitoring block, this will cause
a spurious interrupt message (scream_blue_murder). Also, since the I2C
driver doesn't reset the necessary bits in PMCR, the interrupt will stay
"on". This will lead to the irq handler launching continuously (100%)
and this will block the system from any useful work; even PINGs are dropped.
We are using a CPU board that includes a PXA270, flash and some other
peripherals. The regulator is a TI TPS65020 and connects to the
nVDD_FAULT and nBATT_FAULT signals on the PXA270 (as well as the
V-signals). Unfortunately we cannot affect the wiring nor the components
on the CPU board (we don't even have the schemas for the CPU board).
We're running off a stable current source (not a mobile platform).
We are currently using a work around the problem:
1) Set PMCR to 0x15 at the earliest moment (currently in init, but I
plan to move this to uboot at some point).
2) Disable the power i2c driver from the platform driver. This will
disable the irq handler from ever launching, even when the nBATT_FAULT
condition occurs. This also forces me to change the pxa27x.c, which I'd
rather not do, but currently it doesn't offer any way of disabling i2c-1
(other than disabling i2c completely, but we need i2c-0). Ideally, we'd
like to use i2c-1 at some point to access the TPS, but we can live
without it for now.
The way that I read the pxa270 manuals, once an fault interrupt occurs,
the system should "save state"/do whatever it needs, before entering
deep sleep "manually". Since we now do not enter deep-sleep, I'm
wondering whether dragons will fly out of our noses at some point.
The obvious solution would be fixing the regulator/pull-ups/pull-downs,
but as stated above, we can't do this (and the cpu board manufacturer
isn't too forth-coming in admitting that this is a real problem).
Thanks in advance for any suggestions/info on the issue.
Aleksandr Koltsoff
-------------------------------------------------------------------
List admin: http://lists.arm.linux.org.uk/mailman/listinfo/linux-arm
FAQ: http://www.arm.linux.org.uk/mailinglists/faq.php
Etiquette: http://www.arm.linux.org.uk/mailinglists/etiquette.php
Apologies for the long mail, the issue is somewhat complicated.
First off, the question:
Is it detrimental to continue running the PXA270 with the following
settings:
Initially PMCR==0x15, then nBATT_FAULT goes down and PMCR is at 0x3d.
(0x15==Instead of entering deep-sleep on the fault signals, cause an
interrupt, aka BIDAE+VIDAE+IAS).
The reason why I ask is that the current pxa270 platform code
(mach-pxa/pxa27x.c) always enables the power i2c bus. This causes one of
the following scenarios in our case:
a) nBATT_FAULT occurs. If PMCR is left with default values, this forces
PXA270 to enter deep-sleep immediately (we can't wake it up).
b) If we turn the faults into interrupts (via PMCR-settings), the
nBATT_FAULT condition will cause an interrupt that will trigger the
irq-handler for i2c-1 in Linux. Since none of the I2C status registers
reflect that the source was the power monitoring block, this will cause
a spurious interrupt message (scream_blue_murder). Also, since the I2C
driver doesn't reset the necessary bits in PMCR, the interrupt will stay
"on". This will lead to the irq handler launching continuously (100%)
and this will block the system from any useful work; even PINGs are dropped.
We are using a CPU board that includes a PXA270, flash and some other
peripherals. The regulator is a TI TPS65020 and connects to the
nVDD_FAULT and nBATT_FAULT signals on the PXA270 (as well as the
V-signals). Unfortunately we cannot affect the wiring nor the components
on the CPU board (we don't even have the schemas for the CPU board).
We're running off a stable current source (not a mobile platform).
We are currently using a work around the problem:
1) Set PMCR to 0x15 at the earliest moment (currently in init, but I
plan to move this to uboot at some point).
2) Disable the power i2c driver from the platform driver. This will
disable the irq handler from ever launching, even when the nBATT_FAULT
condition occurs. This also forces me to change the pxa27x.c, which I'd
rather not do, but currently it doesn't offer any way of disabling i2c-1
(other than disabling i2c completely, but we need i2c-0). Ideally, we'd
like to use i2c-1 at some point to access the TPS, but we can live
without it for now.
The way that I read the pxa270 manuals, once an fault interrupt occurs,
the system should "save state"/do whatever it needs, before entering
deep sleep "manually". Since we now do not enter deep-sleep, I'm
wondering whether dragons will fly out of our noses at some point.
The obvious solution would be fixing the regulator/pull-ups/pull-downs,
but as stated above, we can't do this (and the cpu board manufacturer
isn't too forth-coming in admitting that this is a real problem).
Thanks in advance for any suggestions/info on the issue.
Aleksandr Koltsoff
-------------------------------------------------------------------
List admin: http://lists.arm.linux.org.uk/mailman/listinfo/linux-arm
FAQ: http://www.arm.linux.org.uk/mailinglists/faq.php
Etiquette: http://www.arm.linux.org.uk/mailinglists/etiquette.php