<mripard_>
hno: I tested with the A10S-olinuxino dtb
<oliv3r>
hno: but can you boot the stock android 'normally'? E.g. apply power, connect hdmi, watch the screen?
<oliv3r>
hno: I can boot into fel mode via the '2' trick or the button; i can read stuff; but i tried to write u-boot-spl.bin (the FEL version) but the write fails after a few minutes
vicenteH has joined #linux-sunxi
notmart has joined #linux-sunxi
notmart has joined #linux-sunxi
notmart has quit [Changing host]
<hno>
oliv3r, I can boot the stock android. Have not looked into what it outputs on HDMI.
<hno>
oliv3r, if you use the '2' trick then it's u-boot.bin you should upload to 0x4a000000
<oliv3r>
hno ah ok will try that
<oliv3r>
hno: i will also try adb; it does boot 'something' but does'nt output anything
<hno>
if you hard boot to fel then the FEL version of u-boot-spl.bin should be uploaded to 0x2000
<hno>
I have added some additional sun7i boards to u-boot lichee-dev-a20 branch. The sun7i_none board is perhaps the more interesting (no default environment).
<hno>
if you use the '2' trick and then load that u-boot.bin you will get to the u-boot prompt, from where it works to manually boot android from nand.
<oliv3r>
hno ok cool
<oliv3r>
well it does boot the kernel and appears to load android, but crashes or doesn't do much and no output; i hadn't tried adb however (busy weekend :( )
<oliv3r>
hno: i've taken the liberty to use your a20 tree and do some cleanup; luke's patch wasn't very clean
<hno>
The android boot is fairly quiet.
<oliv3r>
and i'll run those files through checkpatch
<hno>
The wip/a20 tree should pass checkpatch save for some debug stuff with too long lines.
<oliv3r>
ok then maybe just display output doesn't work
<oliv3r>
the 1024:600 makes me think it defaults to LCD
<oliv3r>
*should have tried adb :S *
<hno>
There is a command line on mine.
<hno>
no prompt, but accepts commands.
<oliv3r>
hmm, didn't get that
<oliv3r>
ok very simple question; is there any purpouse to have 1 readl specifically readl(reg ^ (0x1U << 31) ? (note the 1u bit)? i don't see that contstruct used anywhere else, I can't see it's needed here either
<oliv3r>
ok lower there's 4 more uses, but the rest of the code base doesn't use it at all
<hno>
oliv3r, just ran checkpatch.pl on it again, and only get a bunch of "WARNING: line over 80 characters" and a two "ERROR: Missing Signed-off-by:"
<oliv3r>
hmm, i find TONS of missing spaces
<oliv3r>
dllcr[4])>>14)&0xf)<<12);
<oliv3r>
for example
<oliv3r>
i did use --strict
<oliv3r>
but cleaned it mostly all up allready
<hno>
I did fix very many of those.
<hno>
--strict gives the same.
<hno>
Maybe you are looking at a older tree..
focus_it has quit [Remote host closed the connection]
<oliv3r>
wip/a20
<oliv3r>
i just pulled 10 mins ago
<oliv3r>
i'll pull again
<oliv3r>
Saved working directory and index state WIP on wip/sun7i: 49092dc Spelling correction
<oliv3r>
Saved working directory and index state WIP on wip/sun7i: 49092dc Spelling correction
<oliv3r>
wip/sun7i is wip/a20 checked out
<oliv3r>
is a branch of *
<oliv3r>
hno: did you forget to commit?
<hno>
oliv3r, it's committed & pushed.
<hno>
but it was rebased a number of times, not sure pull works.
<oliv3r>
hmm
<oliv3r>
well github doesn't show those fixes either
<Turl>
bfree: did you get it booting, do you want me to test anything still? I can do so now
<Turl>
oliv3r: get me docs and an a20 board :)
<Turl>
:p
focus has joined #linux-sunxi
<bfree>
Turl: no, I haven't got anywhere. I think hno did the test on a cubie and had the same problem I did (trying mripard's uImage+uInitrd) :-/
<bfree>
Turl: I guess you could try uImage+uInitrd from http://free-electrons.com/~maxime/pub/ to see if your old u-boot or whatever devicetree you've been using somehow makes it work for you
_BJfreeman has joined #linux-sunxi
_BJfreeman is now known as BJfreeman
<Turl>
bfree: this is what I use to boot, for the record
<Turl>
bfree: can you try with initrd_high=no set on the uboot env?
<bfree>
Turl: http://paste.debian.net/9423/ was my simple test (not even earlyprintk or any panic/loglevel just to rule out the length of my long cmdline), those values to match mr's attempts (but I've tried all sorts just in case). ftr I also had failures with a built-in initrd but got it working once I gutted the initramfs_source files down to get the kernel <4M (not sure where the actual limit was)
<hno>
oliv3r, you mean 912MHz clock instead of 1008MHz? Not sure that counts as an clock issue, but 912 MHz is the clock set in the FEX on the two A20 boards I know of (EOMA & A20 OLinuXino)
<oliv3r>
it's defined on some archs, but not ours
<bfree>
Turl: ftr I've no bootenv to load so I guess first two lines are irrelevant
<oliv3r>
hno: yeah that's exactly what i meant
<Turl>
bfree: yeah that's because I'm lazy and that sets up my ip etc for tftp :)
<oliv3r>
Turl: there is bitops.h but they probably forked it from an older linux kernel version
<oliv3r>
Turl: now BIT() just lives its live in some files only; redifined a few times
<hno>
I am happy with 912MHz. But you can probably increase a bit.
<oliv3r>
hno: well just makes that ifdef looks weird
<hno>
first prio now is to figure out why booting from SPL fails..
<hno>
clock settings, dram parameters & voltage levels really should move out to configration instead of code.
<bfree>
Turl: YAY, that does indeed get further for me (nothing useful of course but that's expected) ... now to try my real desired kernel/initrd/command line :-D
<Turl>
bfree: :)
<Turl>
there seems to be some issue with the higher addresses, maybe because it's highmem
<oliv3r>
hno: i thought that with luke's patch, u-boot 'works' once again
Guest47586 is now known as zumbi
<hno>
u-boot works fine. Trying to figure out why the android kernel don't want to boot when booted via SPL or the early fel hook of boot1 (button + power 3 times), but works if using the later fel hook of boot1 (2 on console)
<oliv3r>
hno: how doy ou mean, move out of code? I thought the entire purpouse of dramc.c was to setup and configure the dram :)
<oliv3r>
hno: ah ok; yeah that's quite bizare
<oliv3r>
hno: btw, if I power via the OTG port, linux doesn't boot
<oliv3r>
is the only line i get after starting kernel ...
<oliv3r>
maybe power issue?
<Turl>
hno: axp initialization?
<ssvb_>
hno: do we have all the same "1.2GHz" and "1.5GHz" marketing crap with A20? :-(
<hno>
I mean that board/sunxi/dram_*, board/sunxi/board.c hardcoded axp parameters, and hardcoded clock parameters all should move out to include/configs/...
<Turl>
ssvb_: I think it's "dual core" now :p
<oliv3r>
hno: ok not 100% sure what you mean, but i'll try to look at it
<hno>
I haven't read a A20 marketing brief.
<hno>
oliv3r, and also most of the parameters we set in boards.cfg.
<ssvb_>
I hoped for at least single threaded performance parity with A10
<oliv3r>
A7 vs A8 :p
<hno>
oliv3r, lets take the PLL1 clock as an example. Should be set by a CONFIG_... .parameter in include/configs/sun7i.h, not specified hard in the .c file.
<oliv3r>
it seems to be clocked lower per default (what i asked hno above)
<oliv3r>
hno: ah yeah absolutly
<oliv3r>
hno: ok i'll look into it
<bfree>
Turl: thanks, progress. now I just have to figure out what's wrong with eth/nbd in the initramfs ;) http://paste.debian.net/9484/
<oliv3r>
hno: you want to keep them together because they are similar, or is it really not wiser to have them 'in order'
<oliv3r>
I guess there's something to be said about both approaches
<hno>
oliv3r, I don't know. But the similarity was what kept me from reordering.
<oliv3r>
I agree
<oliv3r>
but having it in order ... makes it look prettier :)
<Turl>
bfree: you just need to rebuilt the dtb btw, no need to rebuild the entire kernel :)
<oliv3r>
hno: i'll resend it now with the divines referted
<bfree>
Turl: no change :-/
<Turl>
bfree: can you paste the new log?
<bfree>
[ 1.470000] sun4i-emac 1c0b000.ethernet eth0: could not find the PHY is first sign of trouble
<Turl>
bfree: also, paste the kernel config too if you can
<oliv3r>
hno: i have to warn you though; i only now found out why i wasn't getting compile errors, I was building in a wrong place/unclean so if you have comments i'll resubmit those in a v3 (i'm sure i'll find typos)
<hno>
I plan on having A20 support in a separate patch there, not merged with the A10/A13 parts.
<oliv3r>
hno ok so you want me to split the patches that match the A20 patch from lkcl so it can go in as 'one go' makes sense
<oliv3r>
hno: so how do you want to handle the 'other cleanups' that I did, albeit small
<oliv3r>
you'll do a 'ARM: sunxi: code cleanup' one?
<hno>
I'll split if if you don't.
<oliv3r>
don't wanna burden you; i'll do it as best as I can
<hno>
git makes it not too hard to split a patch. Just do a rebase -i and repeat the same patch for every part touched by the patch.
<oliv3r>
hno: does header inclusion order matter to u-boot? We don't prefer alphabetical sorted headers
vicenteH has quit [Ping timeout: 240 seconds]
<hno>
I don't know if there is a coding standard on header inclusion order.
<oliv3r>
i think linux kernel folks strongly prefer alphabetical (or in name-length otherwise)
<oliv3r>
i re-ordered it for u-boot; but it now fails to build, so I take it u-boot is more picky there?
<hno>
If it is then there is bugs I think.
aexl has joined #linux-sunxi
<bfree>
Turl: success :-D failed first time (eth didn't light up, not sure if it was up in u-boot wasn't looking). did a cold boot and it's alive! You are a star, thank you! now I'll just have to turn it into a wishlist bug with patch for Debian's 3.10 ;)
<Turl>
bfree: awesome, thanks to you too :D debian is my favorite distro btw :)
<oliv3r>
vim sunxi_gpio.c
<oliv3r>
erm hoops
<Turl>
oliv3r: vim: command not found
<bfree>
actually first I'll do a proper package build (not an ugly ubuntu crossbuild) that I could upload to dl.linux-sunxi.org and be sure it's all clean and proper ;)
<oliv3r>
Turl: vi sunxi_gpio.c
<Turl>
oliv3r: vi: command not found
<oliv3r>
Turl: emerge vim-gnome
<Turl>
oliv3r: emerge: command not found
<oliv3r>
Turl: apt-get install gentoo
<Turl>
unrecoverable error detected, please echo o > /proc/sysrq-trigger
shalem has joined #linux-sunxi
shalem has quit [Remote host closed the connection]
hansg has quit [Remote host closed the connection]
\\Mr_C\\ has quit []
hansg has joined #linux-sunxi
<oliv3r>
hno: yep bugs; will send patch now
<oliv3r>
well now :p took longer then expected
\\Mr_C\\ has joined #linux-sunxi
Yaku321 has joined #linux-sunxi
<hno>
oliv3r, ok. will look at this tomorrow. having a bad cold & 6 kids to take care of.
<oliv3r>
6? wow :p (jealous though)
<oliv3r>
hno: sure no prob; get well! that's more important
<oliv3r>
i'll cook up a split patchset for the a20 stuff
<oliv3r>
i still want to know if 912 MHz is the new 'max speed' for A20. otherwise it's silly to make it run at 912 MHz
<oliv3r>
if linux/android runs it at 1008 'as usual' then we shouldn't add a 912 MHz hack to u-boot imo
<hno>
Gah! In current A10 sources they have made the cedar driver a blob. A 8KB large one.. And it's slightly larger than the binary build from our sources.
<Turl>
hno: yeah I saw it :( on one of A20/A31 it was open though
<Turl>
hno: lkcl might be able to ask for its source, considering the previous version was GPL so they are technically in violation
<Turl>
bfree: btw, I was just going through net-next, there are some other fixes for stuff in probe() and the like that you might want to include if you are going to get them running in debian
<bfree>
Turl: yep, I was up to date when I started at this ;) not surprised there's been a few more bits since. I'll try and get those in for the big overnight compile of the lot (and then for the to be written wishlist bug report)
<Turl>
n01: oliv3r: what's your latest version of watchdog/sid? :) I'm getting sunxi-devel up to speed
gzamboni has joined #linux-sunxi
mdp has quit [Read error: No route to host]
mdp_ has joined #linux-sunxi
mdp_ is now known as mdp
<n01>
Turl: v5
n01 is now known as n01|away
sanka has joined #linux-sunxi
paulk-desktop has quit [Remote host closed the connection]
paulk-desktop has joined #linux-sunxi
<Turl>
n01|away: ok, updated, thanks :)
<oliv3r>
great, my A20 SID is blank
<oliv3r>
well A20 has it replaced with an additional I2C controller; wasn't that binary only driver a twi wrapper? :)
<oliv3r>
md.l 0x01c23800 4 hno if your broed and don't know what to do :)
<oliv3r>
Turl: they can relincense and re-blob it though :) their code their rules
<oliv3r>
Turl: i will push it later; want to look over it quickly
<ojn>
mripard_: got bounced off the channel. irccloud used to be dependable, not so much any more. :(
<mripard_>
oh, I never noticed that you joined then
<wingrime>
boot0 have code for enable icache and dcache
<ojn>
ah, been here for a week or two
mdfe has joined #linux-sunxi
<oliv3r>
wingrime: boot0/1 we have (Gpl) code now
<oliv3r>
we know brom is build with partially the same files; doubt we'll ever get code for that
<oliv3r>
but with the boot0/1 code, you can pretty much guess how it looks like (very messy)
<oliv3r>
there's even BROM includes in that drop if you search for it :)
<oliv3r>
also, this was leaked earlier, but not as complete as it is now
<wingrime>
oliv3r: I find cool stuff there
<wingrime>
for exmaple super_standby it mean full reset for CPU
<oliv3r>
i think 7 or 8 people had that code; but so far, nothing special or something we needed
<oliv3r>
wingrime: that stuff of course, only ueberhackers like you find :p (not kidding, i think your pretty ok :)
<wingrime>
oliv3r: It have spi and nor boot
<oliv3r>
wingrime: pm
<oliv3r>
yeah, spi-nor
<oliv3r>
boot nor via SPI
<wingrime>
oliv3r: dcache on there
mdfe has quit [Remote host closed the connection]
eebrah has joined #linux-sunxi
<oliv3r>
go investigate more
<oliv3r>
i did put quite some info on the wiki
hramrach_ has joined #linux-sunxi
<hno>
wingrime, the boot code it's mostly pushed for archival reasons. I doubt the code can be built as it is.
<bfree>
mripard_: you probably didn't notice the good news, but Túrl provided "setenv initrd_high 0xffffffff;" as the magic u-boot incantation to get the initrd working on cubieboard :) subsequently discovered I was missing CONFIG_MDIO_SUN4I and wonder if emac should just depend on it in it's Kconfig?
gzamboni has quit [Quit: Quitte]
<hno>
oliv3r, the Android SPL boot issue is confusing. Does not seem to be related to a CCM setting at least.
<hno>
wingrime, as far as I understand MELIS is their OS, used on earlier generation products before they switched to Android.
<hno>
and is still used in boot1 and the .axf programs you find in the boot partition.
<mripard_>
bfree: great
<mripard_>
maybe not depend on it
<mripard_>
but rather select it
<bfree>
sorry, yes, that's what I was thinking of
<n01>
uhm ... is it ok to have msleep(500) in a driver?
<n01>
I'm working on the RTC ... the aw's driver is crazy shit
<oliv3r>
what a great summary :)
<n01>
:D
<mripard_>
n01: well, it depends :)
<n01>
ok, I'll go with it ... probably I'll submit a v1 only to linux-sunxi for a first screening of the driver
<mripard_>
technically speaking, sleeping during 500ms is ok with msleep
<mripard_>
but most of the time, it's not needed :)
<oliv3r>
any a10/a20 users here that could test a new version of a10-meminfo?
<n01>
I'm in bed and cubie on the table ... too lazy to stand up :P
sanka has quit [Quit: Leaving]
<oliv3r>
lol i'll push it to my github and you can try some other time :)
<n01>
yep
<Turl>
oliv3r: my mele is always networked to test userspace stuff :)
<Turl>
oliv3r: if it works on a20 it might need a new name though
wingrime has quit [Read error: Operation timed out]
<oliv3r>
the static is updated and should run
<oliv3r>
i haven't tested on a20;
<hno>
oliv3r, what have changed?
<oliv3r>
hno: before, the base clock was assumed to be always 24 Mhz, so they did a N * 24 = clock
<oliv3r>
it now accounts bit 31, N, M or P
<oliv3r>
and K
<oliv3r>
which usually hardly ever are different, but could, in theory anyway
<oliv3r>
Turl: should know, he's the clock guy
<hno>
the assumption holds for any sane frequency.
<oliv3r>
then why have those registers at all :p
<oliv3r>
we now have N * K * 24 / M
<oliv3r>
but we ignore K and M in a10-meminfo and assume them all to be 1; while it's 99.9% of the time true, on a 'meminfo tool' we shouldn't just assume imo
<hno>
The registers are there becuse it is a generic PLL,
<hno>
you don't mess with a PLL design that works..
<oliv3r>
it won't hurt taking that information into account though?
<oliv3r>
you want the info tool to be accurate
<oliv3r>
it's not like you run it constatly and burn cycles :)
<hno>
oliv3r, The letters in PLL configuration should relate to where in the PLL the divisor is. I do not think they have used the same letter for different places in different PLLs.
<hno>
and there may be divisors both before and after, and two different after depending on where you tap the clock (before or after N)
leowt has joined #linux-sunxi
<oliv3r>
hno: yeah, but we're talking about allwinner 'design' :p
<leowt>
can someone explain me what does it change between an 4.0 to 4.1 in android so that an a1x gets slow?
<hno>
leowt, does it?
<leowt>
i mean, what is the reason behind that
n01 has quit [Ping timeout: 246 seconds]
<leowt>
4.0 is way smooth comparing to 4.1 in a a13
<leowt>
both build with sdk
<hno>
leowt, is the same frequency scaling govenor used in both images?
<leowt>
well, yes
<leowt>
default performance
<Turl>
leowt: do you have 1G ram?
<leowt>
thing is, ppl warn that 4.1 is way slower already
<hno>
Turl, A13 can only take 512MB..
<leowt>
at least olimex guys
<Turl>
hno: oh, A13
<leowt>
512
<Turl>
well 512 - 64 - cedar - fb -others leaves like 300-something
<Turl>
way too little to run any modern android
<hno>
Didn't they drop the use of G2D in 4.1?
<hno>
or was that before even?
<leowt>
but it changes so greatly in 4.1?
<leowt>
from 4.0 to 4.1?
<Turl>
I don't recall hno
<Turl>
leowt: well, run top the next time you boot each of them and compare :p
<leowt>
Turl: first time building android
<leowt>
still messing around
<leowt>
xD
<Turl>
and check how hard is lowmemorykiller is running on dmesg
<leowt>
no experience with android builds
<hno>
I only remember that Android have used 2D acceleration, but nowdays relies entirely on 3D acceleration. Don't remember which versions.
<leowt>
hmm
<leowt>
i have a mele a1000
<leowt>
and i dont even understand
<hno>
understand what?
<leowt>
how they sell devices with that sluggish rom
<leowt>
using ics
<leowt>
but the thing i dont understand
<leowt>
is what is that makes for example
<leowt>
scrolling home pages slow
<leowt>
hno: so, does it not use 2d accel? so why is that the same on some devices with lower cpu specs perform better?
<Turl>
leowt: too much gc world stops? :)
<leowt>
Turl: sorry?
<hno>
leowt, performance is a complex chapter with many parameters. CPU power, amount of RAM, speed of flash, speed of 3D acceleration, resolution used, software used, and a number of perameters more..
<hno>
there is no easy answers without going into details.
<leowt>
i understand that
<leowt>
so
<leowt>
512, ~70mb/s (SD card), no 3d in this case im describing, 800x600, android only
<hno>
but as Turl said, an Allwinner device with 512MB is very short on memory and first bottleneck is likely there. It has considerably less memory than most other designs using 512MB.
<leowt>
so, maybie 4.1 is because of memory
<leowt>
i will dig it further
<leowt>
bandwith is not so big either
<oliv3r>
my a10 tablet has 512
<oliv3r>
but its always nearly oom
<leowt>
oliv3r: ics?
<Turl>
leowt: garbage collection on the java vm pauses the app so it 'stutters'
<leowt>
im just trying to get around android
<leowt>
its my second day messing with builds
<leowt>
and with android in general
<leowt>
anyways just trying to know the core so i can try ports for ubuntu touch and sailfish
<leowt>
by the way
<leowt>
Turl: thats why i dont like android
<leowt>
hate java
<leowt>
xD
<leowt>
*opinion*
<oliv3r>
jn
<Turl>
I'm not a java fan either
<oliv3r>
jb
<leowt>
oliv3r: how is the overall experience?
<leowt>
fluid? not so fluid?
<oliv3r>
i strongly dislike jave, but do appreciate android
<hno>
The java language as such isn't that bad.
<leowt>
oliv3r: i do appreciate what android could be
<oliv3r>
reasonable,wishing i had 1tig
<leowt>
i do appreciate low level android stuff
<oliv3r>
galaxy s2 is MUCH smoother
<leowt>
hno: i just think android project relying on java is being very late
<leowt>
xD
<leowt>
oliv3r: what about home page scrolling, does it lag?
<oliv3r>
java is easu to run apps under
<oliv3r>
sometimes yeah
<oliv3r>
like im in term rifht now and oom closed trebuchet
<hno>
oliv3r, not fair to compare a underequipped A10 tablet to Galaxy S2. The S2 is more than double in everything.
<leowt>
oliv3r:since android uses its own vm, the only benefit that is left from java is: very high java programmer rate
<oliv3r>
i go to the homescreen, it stiters while reloading and gcing
<oliv3r>
hno: yeah but got it only last eee and was amazed :p
<hno>
Nice! Olimex made EFUSE_VDDQ configurable on A10/A20 OLinuXino MICRO.
<oliv3r>
hno: where is it?
<oliv3r>
mine is all 0
<hno>
Configured by changing R23/R24
<oliv3r>
i saw a nand_e jumper, not sure what that is yet
<hno>
you need a scalpell, a solder iron and a short piece of wire.
<oliv3r>
oh cool, how did you find out? datasheet?
<Turl>
oliv3r: This should add support for the sunxi-sid driver to the device table for sun4i and sun5i
<Turl>
oliv3r: this adds :p
<oliv3r>
lol true
<hno>
oliv3r, the schematics.
<oliv3r>
hno i peaked at them nut where hard to read
<oliv3r>
and didnt even work on tablet oom :p
<hno>
The Olimex schematics isn't that bad. Seen much worse.
leowt has quit [Read error: Connection reset by peer]
<oliv3r>
its tight and looked like there where bulgarian comments/errors
<hno>
But would be easier if they split in multiple pages, but the design then requires a paid version of the program they use so they try their best to keep designs on a single page.
<hno>
easier for others to reuse schematics then.
<oliv3r>
ah ok
<oliv3r>
kicad/geda! :p
<hno>
oliv3r, the A20 SID is unprogrammed? Haven't looked at mine yet..
<hno>
Yep.. all 0.
<hno>
Hm... the SID registers seem to differ a bit on the A20.
<oliv3r>
really? how, more? how can all 0 be diff
<rz2k>
allwinner did ever use sid?
<hno>
The all 1 test differs noticeably.
<oliv3r>
to id chips yes
<rz2k>
so the 16xx data is stored there? thing we read at start?
<oliv3r>
hno i never tried that with sid
<hno>
rz2k, yes. newer A10 and every A13 seen have it preprogrammed with an unique (but not random) identifier.
<rz2k>
oh
<rz2k>
so serial number
<oliv3r>
rz2k: sometimes but we use sramc for that
<hno>
model, batch, something more, serial number
<rz2k>
weird for them, usually this stuff is used for "high assurance boot"
<hno>
oliv3r, we use sramc for the model.
<rz2k>
to store sha/whatever keys :p
<rz2k>
(welcome to samsung and their weird SPL)
<oliv3r>
hno where do you write all 1 to? maybe efuse-vdd is h9gh on micto
<hno>
rz2k, yes, but there is no secure bootloader in BROM.
<oliv3r>
16xx is the model no
<hno>
oliv3r, using u-boot. efusse-vdd is tied to GND so no worries about accidenty programming anything.