ChanServ changed the topic of #linux-rockchip to: Rockchip development discussion | Wiki at http://linux-rockchip.info | Logs at http://irclog.whitequark.org/linux-rockchip | ML at http://groups.google.com/group/linux-rockchip
phh_ is now known as phh
VargaD has quit [Ping timeout: 245 seconds]
pacopad has quit [Ping timeout: 256 seconds]
VargaD has joined #linux-rockchip
<naobsd> jmcneill: wow great!
<naobsd> jmcneill: sorry, I can't follow your speed ;)
nighty^ has quit [Quit: Disappears in a puff of smoke]
<jmcneill> the controller itself was pretty standard
<jmcneill> i end up wasting my time on the stupidest things
<jmcneill> in this case, the docs said set PWREN bit to enable card power
<jmcneill> turns out you have to clear PWREN to enable card power
<jmcneill> anxious to find out if that clock code works as-is on your rk3066
<naobsd> ah
<naobsd> I just though I have to write cpu id code first ;)
<naobsd> grf/gpio config will be needed soon, but it's also different between rk3066 and rk3188
<naobsd> btw do you want px2 and rk3288 board?
<jmcneill> i looked at soc id
<jmcneill> the id is in a rom but different phys addr between 3066b and 3188, and not present on 3066 afaict
<jmcneill> i added memsize probing too, but a 2GB kernel doesnt boot yet
<naobsd> rk3066 and px2 is 3066a, probably rk3168 is 3066b
<jmcneill> rk3288 would be helpful
<jmcneill> does it come with a trm? :p
<naobsd> no trm of course ;)
<naobsd> btw
<naobsd> rk3066 rom base 0x10100000
<naobsd> ah
<naobsd> rk3188 rom base 0x10120000
<naobsd> mmm
<jmcneill> yeah if i read the wrong one on rk3188 it hangs
<jmcneill> not sure how else to detect at runtime, unless you pass down from uboot
<naobsd> oh I see linux kernep mapped it to same virt address :(
<naobsd> it should be 16bytes(4words) ASCII data
<jmcneill> yep i wass able to read it fine
<naobsd> maybe adding it in boot args is easier way?
<naobsd> on u-boot
<jmcneill> can parameters be made available?
<jmcneill> board type is already there isnt it?
<naobsd> ah well
<naobsd> rockchip modified u-boot something special
<naobsd> I have to check it well
<jmcneill> i noticed
<jmcneill> so does dwcmmc work for you now?
<naobsd> and if I modify it, I have to care about future, upstream u-boot may be ported
<naobsd> sorry, not tested yet
<naobsd> https://github.com/IIJ-NetBSD/netbsd-src I'm using this now, not updated yet...
<naobsd> I have to prepare *BSD build machine ;)
<jmcneill> i cross build from windows and linux
<naobsd> my home work environment is not good at all. I have to take out board from box before work start, and put back board to box after work end
<naobsd> everytime :(
<naobsd> I'm using linux laptop as frontend, and linux vps as build server
<naobsd> populating FFS root file system for *BSD is difficult for me;)
<jmcneill> i bet
<jmcneill> i used vmware for that
<ganbold_> jmcneill: very cool, you've did it in one day which is very fast
<naobsd> my laptop is not so fast ;)
<naobsd> of course I can/sometimes use VM
<naobsd> very frustrated ;)
<naobsd> I'll buy cheapest vps for *BSD
<naobsd> it should be faster than vm on my laptop ;)
<jmcneill> need to convince gsnbold to come work on netbsd :)
<jmcneill> ganbold, sorry, typing on tablet
<naobsd> well, as far as I know, ganbold is only person who is doing rockchip for FreeBSD
<naobsd> he is v.i.p. for FreeBSD ;)
<naobsd> I also want to do some for FreeBSD
Luke-Jr has quit [Read error: Connection reset by peer]
<naobsd> some people like FreeBSD
<naobsd> like -> want to use FreeBSD on RR
<naobsd> btw
<naobsd> about u-boot bootargs
<naobsd> I think its address is passed by some register, and some evbarm kernel support it
<naobsd> i.e. interface is stable
<naobsd> well
<ganbold_> jmcneill: maybe you can come work on FreeBSD, FreeBSD needs fast and skilled people like you :)
<naobsd> let check bootm interface, I almost forgot it...
<jmcneill> difference in other cases, kernel is tasgged netbsd
Luke-Jr has joined #linux-rockchip
<jmcneill> in this case bootm linux protocol is used afaict
<naobsd> ah yes
<naobsd> I cannot remember difference between bootm linux <-> bootm netbsd
<jmcneill> netbsd protocol is dumb
<jmcneill> ptr to bootinfo struct which is not stable
<jmcneill> and cmdline args
<naobsd> arg[0]: pointer to board info data
<naobsd> arg[1]: image load address
<naobsd> arg[2]: char pointer to the console device to use
<naobsd> arg[3]: char pointer to the boot arguments
<jmcneill> consdev is always null except for maybe one ppc board
<jmcneill> i want to replace it with ptr to uboot env
<naobsd> arg[3] must be text, new info can be added safely...
<jmcneill> yup i use it on awin, omap, etc
<naobsd> so adding cpu id and/or board id to it is not so bad workaround for now
cnxsoft has joined #linux-rockchip
<jmcneill> but do you sre cmdline from rk3188 uboot?
<jmcneill> all four args are 0 for me
<naobsd> strange
<jmcneill> you can see in my dmesg
<jmcneill> uboot arg = 0, 0, 0, 0
<naobsd> ah, I see
<naobsd> all info is passed via atag...
<naobsd> mmm
<naobsd> I misunderstand something
<ganbold_> it would be handy to have rk3288 TRM
<ganbold_> tried to boot freebsd kernel yesterday, but it doesn't print anything
<naobsd> I wonder why linux kernel can get info w/o atag addr
<naobsd> maybe 0x60000800 is hardcoded...
<ganbold_> naobsd: rk3188?
<naobsd> well?
<naobsd> rockchip kernel
<naobsd> rockchip linux kernel
<naobsd> oops, where is entry point...
<ganbold_> naobsd: kernel @ 0x02000000 (0x00608530)
<ganbold_> ramdisk @ 0x04bf0000 (0x00275b8f)
<ganbold_> what does it mean?
<naobsd> it looks like offset and size
<ganbold_> now ./board/rockchip/rk32xx/config.mk says
<ganbold_> # Linux-Kernel is expected to be at 6000'8000, entry 6000'8000
<ganbold_> # (mem base + reserved)
<naobsd> rk32 phys mem is at 0x0
<naobsd> #define CONFIG_KERNEL_LOAD_ADDR (CONFIG_RAM_PHY_START + SZ_32M)
<naobsd> please see Uboot memory map in include/configs/rk_default_config.h
<naobsd> oh I understand why load to RAM doesn't work...
<naobsd> some stack pointers/malloc spaces are around base+16MB...
<naobsd> I dropped ram size 1GB change from current u-boot source :(
<ganbold_> yeah, so CONFIG_RAM_PHY_START + SZ_32M is 0x02000000
zombu2 has quit [Ping timeout: 244 seconds]
<naobsd> jmcneill: it seems there are 2 way to get ddr size, pmu_pmu_sys_reg2 and axi bus register
<jmcneill> look at rockchip_machdep.c, i did it a different way still
<jmcneill> directly with ddr controller
zombu2 has joined #linux-rockchip
<jmcneill> zzz
Astralix has joined #linux-rockchip
Astralix1 has quit [Ping timeout: 250 seconds]
<ganbold_> so kernel at least loads
FreezingCold has quit [Ping timeout: 252 seconds]
hipboi_ has joined #linux-rockchip
hipboi has quit [Ping timeout: 255 seconds]
<naobsd> ok, I confirmed DDR cap info is provided in PMU on RR
<naobsd> I don't know who filled it ;)
npcomp has quit [Ping timeout: 245 seconds]
npcomp has joined #linux-rockchip
<naobsd> I totally forgot what I wanted to do
<naobsd> ah, cpu/board id info and bootargs
<akaizen> @naobsd: how did you port firefox OS to radxa?
<akaizen> is there a guide? I'd like to try to port it to firefly
<naobsd> well, how did you know about it?
<naobsd> if you can see something about it, you can see necessary info too...
Luke-Jr has quit [Excess Flood]
Luke-Jr has joined #linux-rockchip
luke-jr_ has joined #linux-rockchip
Luke-Jr has quit [Ping timeout: 244 seconds]
<akaizen> @naobsd: i saw a post on cnx-software and on g+, nothing explains how you ported it tho...
<akaizen> I see you used a lot of FlingOne, which parts did you extract from the Radxa SDK? Is there any methodology?
<naobsd> kernel
<naobsd> well
<naobsd> I did noting for porting fxos to Rockchip rk30/rk31
<naobsd> what I did/am doing is port it to RR and some other boards
<naobsd> kernel must be replaced
<naobsd> I'm not talking about port it to rk3288
<naobsd> grrr
luke-jr_ is now known as Luke-Jr
<akaizen> Yes, I tried to port to Allwinner A20 and Rockchip RK3188 last year around September but ran into many compile bugs
<naobsd> then you know how to...
<akaizen> I said I tried to and was not successful... I dont know if my approach was correct as I'm not sure which parts can be pulled from AOSP and which parts are required from device specific
<naobsd> I also tried to port fxos to rockchip long time ago (probably when rk3188 was very new or not available yet)
<akaizen> SDK / BSP
<naobsd> anyway fxos for rk30/31 is available, I don't need to do such a work
<naobsd> maybe my answer is "I don't know"
<akaizen> Oh, so rk30/rk31 was already in the repo? What RR specific changes did you make?
<akaizen> If I learn that I can probably separate the required pieces
<naobsd> well
<naobsd> there is fxos for rk30/31, not mine
<naobsd> and they have repo for RR now
<naobsd> my work was done before they prepared repo for RR
<naobsd> and my work was "for RR, use kernel for RR"
<naobsd> I think I explained most important part of "my porting work"
<naobsd> of course there is more detail than few words, but I cannot "explain" it for now
cnxsoft has quit [Read error: Connection reset by peer]
<naobsd> "there is fxos for rk30/rk31, I replaced kernel for RR, then it worked on RR"
cnxsoft has joined #linux-rockchip
<naobsd> there some few minor patches I made
<naobsd> but it just fixes some minor issues (of many many bugs which are not solved yet), it's not "important part of porting work"
<naobsd> please don't expect I'm hiding some secret
<naobsd> akaizen: ok?
<naobsd> I pushed detecting memory size to u-boot-{px2,rk3066,rk3188,rk3188-sdcard}
<naobsd> it will be necessary to make "load onto RAM" really usable
<naobsd> I think u-boot for rk30/31 uses (roughly) first 4MiB and 48MiB end of RAM
<naobsd> fixed 64MB configuration was too small
<naobsd> I'll update my binaries...
<naobsd> then, how should I handle cpu id...
<ganbold_> strange, it seems it is not going to initarm
jas-hacks has joined #linux-rockchip
<jas-hacks> naobsd: hi, is there a dts for the firefly against linux-rockchip?
<naobsd> jas-hacks: what's "against linux-rockchip"? mainline?
<jas-hacks> mainline
<jas-hacks> naobsd: thxs, save me having to start from scratch
<jmcneill> morning
<ganbold_> morning
<jmcneill> whats the good word?
<ganbold_> able to load freebsd kernel on firefly, however few chars only :)
<jmcneill> great!
pacopad has joined #linux-rockchip
<pacopad> Hi , there , is there know bugs in ethernet driver 1000/full mode ?
<jas-hacks> naobsd: what gcc version is needed? "Your compiler is too buggy; it is known to miscompile kernels"
<jas-hacks> naobsd: its ok, found the issue
<naobsd> jas-hacks: >4.8.2
eebrah has joined #linux-rockchip
<jas-hacks> naobsd: is next-20141210 fully bootable on the firefly?
<naobsd> jas-hacks: I cannot remember. if you got error, please explain about it
<jas-hacks> naobsd: http://pastebin.com/DpEwHpVj
<jas-hacks> kernel is hung at that point
<naobsd> jas-hacks: I think you're not using loader with arch timer patch or you didn't apply arch timer patch to kernel
<jas-hacks> naobsd: where is the arch timer patch for the kernel?
<naobsd> jas-hacks: https://github.com/mmind/linux-rockchip/commit/32e43ca4d7351c88fb7b525c17f06f3121363db4 but this patch will not be merged, there is no reason to use this on firefly
<jas-hacks> naobsd: ok, I'll build uboot and give it a try
cnxsoft has quit [Quit: cnxsoft]
<jas-hacks> naobsd: does that uboot still expect dtb to be in resource.img?
field^Mop has joined #linux-rockchip
<naobsd> u-boot and mainline is already confirmed to work
<naobsd> well
<naobsd> "expect dtb to be in resource.img", are you talking about dtb usage in u-boot, not in mainline linux, right?
<naobsd> u-boot supports dtb in resource partition and boot.img
<naobsd> correction, u-boot supports dtb in resource.img in resource partition and boot.img in boot/recovery partition
<naobsd> I don't understand "still expect"
<naobsd> what's "still"?
<naobsd> I'm talking about u-boot from rockchip
<naobsd> not upstream
cnxsoft has joined #linux-rockchip
<naobsd> "that u-boot" I pointed is from rockchip
<naobsd> so I cannot understand "still"
<jmcneill> naobsd, any particular reason you used pmu to find mem size instead of ddr regs?
<naobsd> jmcneill: simplest code! I'm lazy!
<jmcneill> fair enough
<jmcneill> i didn't think to check there
<naobsd> jmcneill: I have no idea who wrote these values to that reg
<jmcneill> i'm guessing the on chip bootloader
<naobsd> jmcneill: I guess DDR blob does it, but not sure
<jmcneill> the one that also prints
<jmcneill> Bus Width=32 Col=10 Bank=8 Row=15 CS=2 Die Bus-Width=16 Size=2048MB
<naobsd> yes, it's done by DDR blob
<naobsd> 1 of 2 part of loader
<naobsd> maskrom load/run DDR init blob, then actual loader is loaded on DRAM
<naobsd> FlashData=DDR init blog, FlashBoot=u-boot
<naobsd> blob
<naobsd> probably objdump -d blob will tell answer ;)
<naobsd> but
<naobsd> if DDR controller can be accessed, it will be better
cnxsoft has quit [Quit: cnxsoft]
<naobsd> btw, NetBSD u-boot bootarg support code only support u-boot image for NetBSD?
<naobsd> jmcneill: on linux, if info in PMU REG is not available,
<naobsd> jmcneill: row, bank, col values are taken from in-kernel-pre-defined table (index is from SysSrv_DdrConf of AXI BUS
<pacopad> Sorry Guys , where could i get a kernel config to compile 3.18 for RK3288 ?
<naobsd> jmcneill: bw is from DDR reg PPCFG BIT(0)
<naobsd> I think PX2 PPCFG[0] description is not about bw...
<naobsd> jmcneill: cs is from PHYCTL PGCR[21:18]
<naobsd> oh I missed DIE info in pmu reg...
<naobsd> ah, PPCFG[0] is used some more
field^Mop has quit [Ping timeout: 272 seconds]
<naobsd> if (PPCFG[0]) col++
mrcan has joined #linux-rockchip
mrcan has quit [Changing host]
mrcan has joined #linux-rockchip
<naobsd> bw = (PPCFG[0]) ? 1 : 2;
<naobsd> if (ddr3) die = (PPCFG[0]) ? 1 : 2;
<pacopad> nobody ?
<naobsd> pacopad: https://github.com/naobsd/linux/blob/naobsd/next-20141210/arch/arm/configs/rk3288_defconfig this is for mainline but I cannot guarantee it works with 3.18
<pacopad> ok thank you
<jas-hacks> naobsd: 'u-boot-rockchip' is rockchip uboot not mainline?
<naobsd> jas-hacks: yes, you can see many commits from rockchip
<jas-hacks> naobsd: so dtb has to be in resource.img ?
<naobsd> jas-hacks: did you read my reply? dtb can be in resource.img/boot.img/recovery.img
<naobsd> jas-hacks: currently I'm talking about u-boot from rockchip, not about mainline linux kernel
<naobsd> jas-hacks: please make your question clear 1st. are you asking about dtb for u-boot from rockchip and/or dtb for linux 3.10 from rockchip and/or dtb for mainline linux?
<naobsd> jas-hacks: I don't understan "still expect", what's "still"?
<jas-hacks> naobsd: Probably didn't ask the right question. I wanted to know if there were any changes in the uboot tree to support loading dtb from a file system
<jmcneill> naobsd: I already checked in a working mem probe using ddr controller :)
<naobsd> jmcneill: yes I saw that
<naobsd> jmcneill: linux does differently
<naobsd> jmcneill: on PX2 board
<naobsd> Bus Width=32 Col=10 Bank=8 Row=15 CS=2 Die Bus-Width=16 Size=2048MB
<naobsd> DDR_PCTL_PPCFG_REG = 0
<naobsd> DDR_PCTL_DTUAWDT_REG = 0x2cb
<naobsd> DDR_PUBL_PGCR_REG = 0x18c2e00
<naobsd> cols=10 rows=15 banks=8 cs=2 bw=4
<naobsd> Detected RAM: 2048 MB
<naobsd> jmcneill: it works
<jmcneill> awesome
<jmcneill> and dwcmmc?
<naobsd> sdmmc0: couldn't enable card: 60
<naobsd> I'm not sure regulator is on
<jmcneill> ah
<jmcneill> if you boot from sd card does it work?
<naobsd> rk3066/px2 doesn't support boot from sd ;)
<jmcneill> yuck
<jmcneill> i definitely don't want one now
<naobsd> grf/gpio is different too
<naobsd> I really need to think how to do cpu/board id
<naobsd> oh
<naobsd> px2 board wants you... ;)
<naobsd> I think I can modify u-boot flashed to on-board flash try to use SD for loading kernel
<naobsd> ah, jmcneill, this px2 board has eMMC, not NAND
<naobsd> now you want this one, do you?
<jas-hacks> naobsd: can u-boot-rockchip be complied with armhf or does it need armel?
<jas-hacks> naobsd: its ok, seem it fails with gcc-linaro-arm-linux-gnueabihf-4.9-2014.09
<naobsd> jas-hacks: well, it shouldn't be matter of armhf or armel
<naobsd> jas-hacks: what you need is not believe experience with another platform or something else
<naobsd> jas-hacks: please follow official supported way at first
<naobsd> jas-hacks: here is pointer http://androtab.info/rockchip/u-boot/
<naobsd> jas-hacks: i.e. use arm-eabi-4.7 as defined in Makefile
<jmcneill> naobsd: not really :)
<naobsd> jmcneill: how about px2+rk3288 ? ;)
<jmcneill> how about rk3288+trm ?
<naobsd> anyway, let's try to attach emmc...
<jmcneill> emmc would use a different clock register i think
<naobsd> jmcneill: don't care about TRM, RK's document has a lot of errors even if it's available ;)
<naobsd> jmcneill: ah, sure
<jmcneill> i care about trm
<naobsd> hehe
<naobsd> of course ;)
<jmcneill> @ABC12-DFG01H1IJKLMZMP<v-...!1@@@2AAA3BBBCCC111222---FFFGGG000111HHH111IIIJJJKKKLLLMMM
<jmcneill> secondard cpus almost started
<jmcneill> they're executing code anyway
<naobsd> it seems +3 cpu
<jmcneill> i'd hope so
<jmcneill> fixed
jas-hacks has left #linux-rockchip [#linux-rockchip]
<naobsd> congrat :)
<rperier> hi all
field^Mop has joined #linux-rockchip
<naobsd> ah,
<naobsd> jmcneill: can dwcmmc handle mmc without card detect signal?
<naobsd> dwcmmc(4) or sdmmc(4)
<jmcneill> not as-is but it's an easy change
<jmcneill> on awin for example i use gpio polling
eebrah has quit [Quit: Lost terminal]
<jmcneill> hm not very stable with mp enabled
<naobsd> probably I have to do some clk things for rk3066/px2
Danukeru has quit [Ping timeout: 250 seconds]
Danukeru has joined #linux-rockchip
<naobsd> jmcneill: about uboot args, please remove #if 0 in rockchip_start...
<jmcneill> that's better, thanks
<jmcneill> uboot arg = 0, 0xbfa, 0x60088000, 0x610a6be0
<naobsd> kernel_entry(0, machid, r2);
<naobsd> machid is fixed number, 3066
<rperier> I think that I will flash uboot on my rock pro :D
<jmcneill> 0xbfa is 3066, not very helpful
<jmcneill> if i'm getting that on 3188
<naobsd> r2 should be bd->bi_boot_params, ATAG
<jmcneill> what is r2?
<jmcneill> ah not cmdline?
<naobsd> yes :(
<jmcneill> no problem
<jmcneill> do you know what 0x610a6be0 is?
<naobsd> garbage?
<jmcneill> possible
<jmcneill> 0x6xxxxxxx is a strange coincidence
<rperier> naobsd: do you know if this page is up-to-date ? http://radxa.com/Rock/U-Boot
<naobsd> netbsd kernel expect it was called from do_bootm_netbsd
<naobsd> but currently do_bootm_linux is used, it passed only 3 args
<naobsd> rperier: http://radxa.com/mw/index.php?title=Rock/U-Boot&action=info recently updated, yes. no idea good or bad.
<naobsd> jmcneill: add atag parsing to netbsd kenrel? or modify u-boot for rk to support uboot image?
<naobsd> or pass cmdline as 4th arg? ;)
<naobsd> I'm lazy...
<jmcneill> i wrote an atag parser, it's easy
<naobsd> oh!
dlezcano has quit [Ping timeout: 265 seconds]
<jmcneill> but i can't seem to access that address
<jmcneill> rockchip_parse_atag: atag_base=0x60088000
<jmcneill> then hangs
<naobsd> sorry, no idea...
<akaizen> @naobsd: that helps, thank you
dlezcano has joined #linux-rockchip
dlezcano has quit [Ping timeout: 244 seconds]
field^Mop has quit [Ping timeout: 272 seconds]
<jmcneill> naobsd: static uint32 g_atag_addr = 0x60000800;
<jmcneill> that doesn't match arg[2]
<jmcneill> > uboot arg = 0, 0xbfa, 0x60088000, 0x610a6be0
pacopad_ has joined #linux-rockchip
pacopad has quit [Ping timeout: 272 seconds]
pacopad has joined #linux-rockchip
pacopad_ has quit [Ping timeout: 265 seconds]
pacopad_ has joined #linux-rockchip
pacopad has quit [Ping timeout: 240 seconds]
pacopad_ is now known as pacopad
FreezingCold has joined #linux-rockchip
zombu2 has quit [Changing host]
zombu2 has joined #linux-rockchip
bengal has joined #linux-rockchip
field^Mop has joined #linux-rockchip
pacopad has quit [Quit: pacopad]
field^Mop has quit [Ping timeout: 250 seconds]
<jmcneill> got it
<jmcneill> initarm: dropping RAM size from 2048MB to 1024MB
<jmcneill> ram_size = 0x40000000
<jmcneill> bootargs = "console=ttyFIQ0 androidboot.console=ttyFIQ0 init=/init initrd=0x62000000,0x004C0000 mtdparts=rk29xxnand:0x00002000@0x00002000(uboot),0x00002000@0x00004000(misc),0x00008000@0x00006000(kernel),0x00010000@0x0000e000(boot) androidboot.bootloader=fastboot fb."
field^Mop has joined #linux-rockchip
bengal has quit [Ping timeout: 256 seconds]