Cranium has quit [Remote host closed the connection]
raspo666 has joined #linux-sunxi
AneoX has joined #linux-sunxi
qschulz has quit [Quit: leaving]
qschulz has joined #linux-sunxi
qschulz has quit [Client Quit]
qschulz has joined #linux-sunxi
qschulz has quit [Client Quit]
qschulz has joined #linux-sunxi
Pe3ucTop has quit [Quit: leaving]
<anonus>
so i don't get it with axp223, so bananapi m2m has external 5V regulator, enable pin of which tied to 3V0 DCDC1 of axp223, which means that 5V will be enabled when you turn off DCDC1, next datasheet says that shutdown bit will disable all outputs of axp223 except RTC_VCC and charger and shutdown bit is equivalent to long press on power button but even if i power off the board with button usb is still
<anonus>
powered on
<anonus>
then i found PWREN registers that control PWREN behaviour (whatever it means) for all the regulators, it is by default disabled for every regulator and kernel code doesn't modify it, so i added reg_write 0xff to both of them but it didn't change anything
<anonus>
and it seems that schematics isn't lying since i can sense 3 V (and not VBAT) on the EN pin of this extrenal regulator
<anonus>
any idea what's going on?
<anonus>
oh, btw USB OTG VBUS powered down as expected because power cut through DRIVEVBUS pin of AXP223 through some mosfet
dddddd has joined #linux-sunxi
<anonus>
why axp223 may decide not to disable DCDC1 after shutdown?
xes_ has joined #linux-sunxi
xes has quit [Ping timeout: 240 seconds]
<anonus>
oh, also is there rsb userspace tools like i2cget/set so i can poke AXP223 without recompiling kernel?
<KotCzarny>
devmem2
<KotCzarny>
but requires setting access in uboot i guess
<anonus>
meh
xes__ has joined #linux-sunxi
xes_ has quit [Ping timeout: 252 seconds]
<wens>
anonus: enable pin tied to dcdc1, means when dcdc1 is on, the 5v regulator is also on
<anonus>
wens: exactly, but why dcdc1 is on when axp223 is in shutdown mode?
<wens>
anonus: try holding the power button for over 16 sec. which forces a real shutdown, is dcdc1 still on after that?
<anonus>
i did hold power button until it shut down (i think it was 6 seconds), it was on after that, but i will try 16 secs
<wens>
if dcdc1 is still on, but the soc is not, the power led should be lit
<anonus>
i think power led is not wired on this board, but it has a test point where power led should be, so i'll check that
<wens>
oh, ok... mine has an LED soldered on
<wens>
now I'm guessing that when the pmic is off, PS is still tied to whatever input (ACIN / VBUS) is available
<wens>
and since the 5v boost regulator has in and out tied together through an inductor, current can still flow through even though the booster is off, just at a lower voltage
<wens>
the output from PS would be close to 5v anyway
<anonus>
it has 3 leds and all of them wired to SoC, it has test point for charge led, but i don't see any power leds on schematics
raspo666 has quit [Ping timeout: 252 seconds]
<anonus>
so in case when board is battery powered, PS = VBAT through some MOSFET (charge driver?)
<anonus>
i'm more worried that board has regulator that is on and pissing power away reducing battery life
<anonus>
it ate 2% of 10000 mAh battery overnight
<anonus>
sorry
<anonus>
6000 mAh
<anonus>
and it was "powered off"
<NeuroScr>
120mAh / 12 hours = 10mA per hour
nuuuciano has joined #linux-sunxi
<anonus>
sounds like terrible shutdown state
<NeuroScr>
also mixtape++
<NeuroScr>
where did you hear about mixtape?
<NeuroScr>
always surprised when I see other people using it
<anonus>
i'm using it for ages, don't remeber when i first heard about it
<anonus>
i think somebody just gave me mixtape.sh script on irc to share images
<NeuroScr>
honestly sounds like you’re way more sensitive to drain then my batteries usages
<NeuroScr>
you could look at a bigger battery
<NeuroScr>
or maybe some mosfets to disconnect the usb devices from the computer
<anonus>
6 Ah is probably the biggest stuff i can jam into the case that i'm using
<NeuroScr>
I’m not sure how you’re powering on/off the soc vs your usb devices
<KotCzarny>
NeuroScr: if battery doesnt have some protection, it's a sure way to kill it sooner or later
<NeuroScr>
kot: what is?
<KotCzarny>
because of the dumb draw in 'off' state
<anonus>
well, it sat overnight with no USB device attached, so 10 mA was the "shutdown" current of just regulator (or maybe other regulators?) pissing power away
<NeuroScr>
only the soc connected to the battery?
<anonus>
i can shut down usb device (my usb 4g modem has AT!POWERDOWN command)
<anonus>
only SoC
<anonus>
and AXP
<anonus>
oh well
<NeuroScr>
does it have a POWERUP command? :^P
<anonus>
actually not
<anonus>
there is also AP6212 wifi
<anonus>
but it is powered from axp223
<NeuroScr>
that some sort of microcontroller?
<NeuroScr>
oh PMU
<NeuroScr>
what soc board is this?
<anonus>
well, everything is powered up from axp223 on the board except USB 5V
<anonus>
A33
<anonus>
it was R16 board and i think they just soldered A33 on it, but afaik it is the same chip, isn't it?
<NeuroScr>
does it have gpios, IR and/or ethernet port?
<anonus>
it has gpios, no IR or ethernet
<NeuroScr>
R16 is just a different name for A33
<anonus>
right
<NeuroScr>
I know some opi can be powered up by the gpio port
<NeuroScr>
*opi boards
<NeuroScr>
it maybe draining to listen for that
<NeuroScr>
so you need a soft-shutdown to power everything off?
<KotCzarny>
opi boards dont feature pmu
<anonus>
i tried to shut down board with holding power button but USB is still powered on
<KotCzarny>
those are only available with Axx socs
<anonus>
that's what bothers me
<NeuroScr>
yea, I’ve run into that with raspi boards I think
<anonus>
i mean it does sound a bit like wiring issue, but schematics doesn't show the problem and me poking with tester seems to agree with schematics
<NeuroScr>
one solution is hard or soft (mosfet) switch on the batteries
<NeuroScr>
can’t drain what isn’t connected
<anonus>
yeah, there is another problem, i don't want to cut off the battery because of RTC
<anonus>
which is very important in my case
<NeuroScr>
what’s your rtc expected power draw?
<anonus>
what's an A33 rtc power draw? i bet it's microamps
<KotCzarny>
Axx boards usually feature battery circuit for rtc power backup
<anonus>
oh, actually i have an idea, i'll check what will happen if i disconnect and reconnect the battery without turning board on, will 5V be present or not
<KotCzarny>
so check if you dont have second battery pads somewhere
<anonus>
KotCzarny: in this case output of AXP223 VCC_RTC wired straight to A33 without any capacitor/supercap/backup battery
<KotCzarny>
oh well
<anonus>
well, again, according to schematics
<anonus>
i'm still not convinced that i can trust it
<anonus>
i can desolder tiny decoupling cap and bodge a supercap there
<KotCzarny>
or just use ntp
<KotCzarny>
;)
<anonus>
but i rather avoid that
<anonus>
yeah, cannot rely on ntp since when you power this thing there could be no signal
<anonus>
i wonder why there is no diode in the circuit of DCDC* wiring of AXP223
<anonus>
i mean SMPS needs a diode, doesn't it?
<karlp>
not always.
<karlp>
sync/nonsync
<anonus>
oh right
* anonus
not an expert
Xalius_Ph has quit [Ping timeout: 240 seconds]
<anonus>
hmm, actually according to schematics EN pin is not pulled down as it is recommended in SY7152 datasheet, i wonder if that might be an issue
<anonus>
i mean it has no pull-down resistor
lkcl has quit [Ping timeout: 252 seconds]
<karlp>
"Don’t leave it floated" from the docs :)
<karlp>
what is it connected to?
<anonus>
karlp: 3V0 output of DCDC1 of AXP223
<anonus>
well, i suppose there are bunch of consumers of 3 V on 3V rail
<wens>
nope that's not the issue
<wens>
IN and LX are connected together by an inductor, which current and voltage can pass through
<anonus>
but i don't believe that wifi chip can be considered as very expensive pull-down resistor
<wens>
even when the SY7152 is off, you'll still get voltage equal to the input
<wens>
see page 4 of the SY7152 datasheet
<karlp>
what is the output defined to do on dcdc1 if it's on/off? it might be considered sufficient to be low there, without any explicitly pulldown
<anonus>
oh shi~, you're right
<anonus>
PS connected to USB5V trhough diode
<anonus>
so even when it is powered down it still should have 4.2 V or so if battery is fully charged
<anonus>
what a shitty design
<wens>
correct
<karlp>
why would you have a shutdown/enable pin that just turns off the boost, rather than actually turns it off.
jaganteki has joined #linux-sunxi
<jaganteki>
Hi wens,
selfbg has quit [Remote host closed the connection]
<anonus>
ok
<wens>
jaganteki: hi?
<anonus>
but that doesn't explain what is pissing 10 mA away when there is not USB device attached
<wens>
drain from any electrolyte caps?
<wens>
+ RTC
<anonus>
10 mA for RTC sounds like extremely bad RTC
<anonus>
not a single electrolyte on the board
<jaganteki>
wen, on BPI-M64 two pins PE14, 15 were grouped i2c2 as well as LED1, LED2