IRC logs for #openrisc Tuesday, 2013-06-11

--- Log opened Tue Jun 11 00:00:38 2013
stekernworkshop starts out great, they don't even have boards for everyone...06:52
stekernhno: I'll let the a31 questions begin, first is; in the example for the fel tool, you are using 0x2000 as the start address, does the internal SRAM start there or is there some other reason you chose that?07:51
stekernit's perhaps not so important, I've setup my initial stack pointer at 0x8000, I guess that's fine either case07:53
stekern(sp grows towards lower addresses on arm, right?)07:53
olofkstekern: Did you get a board?07:54
stekernolofk: dunno, we're sharing now07:55
stekernthe ones that doesn't get one with them at the end of the day get one sent to them later though07:55
hnothe SRAM starts at 0, but the rom does use some areas.07:58
stekernok, fair enought07:59
hnoThere is a stack set up already by the ROM. FEL is quite nice method for doing early stuff, just write a function and call it via fel.08:00
stekernoh, what does the ROM set it up to?08:01
hnoDon't remember exactly.08:01
stekernI've got a close to finished uart output baremetal app, thrown together from various u-boot parts08:02
stekernleft to do is test if it works ;)08:02
hnoWe have a FEL u-boot SPL nowdays, which just configures the DRAM and does a bit of UART output. Not adjusted for A31 yet.08:03
hnobut I would not be supriced if running the A20 version at least gives UART output on A31 too.08:04
hnoAlso have a baremetal skeleton at used for early attempts in getting the DRAM controller configured on A13.08:08
hnostekern, looked up som old notes and the stacks is at -0x2000 and -0x7000. (see the end) was what I gathered from probing the SRAM usage an A10.08:12
stekernoh, ok, that explains the 0x2000 value too =P08:16
stekernthanks for digging that up08:17
hnoThe usage on A31 may differ, but probably not too much.08:17
hnoThe A10/A13/A20 is all very similar at this level.08:18
hnoI don't have an A31 to play with yet.08:18
olofkhno: You can always build the interesting bits of A31 from source ;)08:19
stekernif there some diagnostics you want w´me to run while "I'm in there", just let me know08:19
hnoolofk, true. Unfortuntately I have to worry more for the other parts..08:22
hnostekern, I am sure there is, but most diagnostics require access to the bootloader console. Possible via SD breakout if you don't mind reflashing.08:25
stekernI don't mind, the kids might when their angry birds games disappear ;)08:26
hnousing a firmware configured to route the console (&JTAG) to the SD port, no functional difference otherwise (but SD slot no longer an SD slot..)08:26
stekernhno: bootloader console = u-boot console?08:28
hnoboot0 + boot1 + u-boot, and kernel...08:28
hnoActually only chaning script.bin might be sufficient for u-boot & kernel console.08:29
stekernif I have understood things correctly, I think you're right, the u-boot sources read that "dynamically"08:30
hnoyou got the A31 SDK?08:31
stekernno, just the u-boot sources that allwinner put on their homepage08:31
stekernhno: what are boot0 and boot1? is one of those SPL, and what is the other?08:42
hnoHmm.. do you have some physical buttons on the tablet?08:42
stekerna power and home button08:42
stekernand you get to the FEL mode by pressing the home button and then the power button08:42
hnoboot0+boot1 is Allwinner own bootloader. Configures the board and then loads u-boot.08:43
hnou-boot SPL is the free software alternative.08:43
stekernok, where reside?08:43
stekernI see08:43
stekern+does those08:43
stekernsorry, that was confusing...08:44
hnowhere boot0 & boot1 is loaded from?08:44
stekernI'm trying to understand how the bootup works08:44
stekernyes, where are they loaded from08:44
hnothe first blocks of the NAND, accessed in a slightly special manner.08:44
hnonot visible from Linux when usingthe Allwinner NAND driver.08:45
hnoOk, if you are using the power button method for entering FEL then you have the board already configured when FEL is running. So no need to worry about DRAM initialization.08:46
stekernumm, you power off the device before you do the FEL entering08:46
hnoAnother thing you can try is to hold home + power. Then release home. If I am not mistaken then this will actually give you access to boot1.08:47
hnoThere is many ways to enter FEL. The button + three times on the power button trick is done by boot1.08:47
hnoor you just hold the home button at power on?08:48
stekernno, the "three times trick" is what I've used08:48
hnoWays I know of:08:48
hnoa) Boot failure.08:49
hnob) Hard FEL boot forced by the UBOOT pin.08:49
hnoc) Button + 3 times on the power button08:49
hnod) Sending '2' to boot1 on the console during bootup.08:49
stekernok, and c+d are handled in boot108:50
hnoa/b should change place. The hard FEL boot has priority.08:50
hnoa & b is done by the boot rom (BROM), and in that state the DRAM is not accessible. c & d is done by boot1 with the board fully configured.08:51
hnoso you cn just FEL load a linux image and boot that if you like.08:52
stekernI'll continue with my basic baremetal uart output program first ;)08:53
hnoAlso try what I said above. Hold down home button at power on, then hold power button and release home. This should route UART0 to the SD slot for you.08:56
stekernah, ok I didn't get that that was what you meant with "give you access to boot1" with that method08:57
stekernwill try that when I got access to the device08:57
stekernI'm still at the workshop, waiting for the others to catch up =P08:57
hnoand if you then send 2 to boot1 you should get into FEL mode with UART0 ready to go. No clockbits, PIO or UART settings needed, just write to the UART data port and you should get output.09:02
stekernbut that's too easy, I've already went through the trouble copy-pasting that stuff from u-boot ;)09:49
juliusbfor the record:
juliusbwow, looks like you can get good access to the AR100 core in the allwinner, huh?12:53
stekernI was one of the lucky ones that got a board with me home13:27
stekernhno: with the "hold home button" trick, would it be expected that the board boots completely if no interaction during boot1 is made?14:05
stekernbecause it does boot into android when I try that14:06
stekernthere's no uart output though, but that can be due to other reasons of course (wrong baudrate etc)14:07
hnostekern, it should boot normal.15:24
stekernhno: any hints about the baudrate, i tried 115200 now15:53
hno115200. But maybe that trick do not work in A31 or your script.bin isn't set for it.15:54
hnocan you upload your script.bin somewhere?15:55
stekernI will, when I'm home again16:21
stekernhno: was it this you meant?
stekernoops, that wasn't what I meant to paste... but this:
hnostekern, no debug_uart section in there so the power home+power probably won't work.19:51
hnoHmm... looking at sun6i bootloader sources and seems the handler for this boot mode have been removed there. Wonder why...19:52
stekerndon't ask me ;)20:21
stekernmy baremetal uart output didn't work neither, I'm taking a step back and start toggling pins now20:22
stekernscoping it shows that something is happening on the tx pin though...20:36
stekernand it is sending at ~115khz...20:46
hnowhat serial cable are you using?20:47
stekerna stk500 + usb-serial converter20:47
stekernstuff I've used before, so I thought it was a known to be good setup20:48
stekernstarting to doubt that now20:48
hnowhat's the stk500 used for?20:48
stekernttl uart to rs23220:49
hnoYou are doing PC>RS232>STK500>TTL_UART_ON_ST500>TABLET?20:50
hnoAnd the RS232 is an USB one?20:52
stekernit's clearly something in the stk500-pc chain that is not working (although I've never had problems with that before), since the tablet is sending uart data as it should20:55
hnoThat's a slightly overengineered solution :)   You know there is $3.5 (including shipping) USB TTL UART cables on Aliexpress?20:57
stekernI know, but that's not laying around in my drawers right now ;)20:58
hnoDo the STK500 pass a loopback test on the TTL side?20:58
hnoAnd you got TX/RX right? And the STK500 likes 3.3V signals?21:00
stekernwell, tx should go to rx and it is sending at 3.3V itself21:00
stekernthis is odd, has to be something stupid I'm overseeing21:01
hnoDon't see much that can go wrong...21:01
hnoI assume you connected GND.21:01
stekernok, now there came a burst of uart output in the terminal, but then it stopped21:20
stekernI just realised that there's a ttl uart converter on the orsoc debugger I have21:20
stekernok, now it seems to work21:38
stekerntime for bed, tomorrow we'll try to kick some life into ar100 and speak with that21:43
--- Log closed Wed Jun 12 00:00:39 2013

Generated by 2.15.2 by Marius Gedminas - find it at!