<stoned0651_>
i am trying to enable the embedded i2s codec based on board H3-BGA3XX_11
pg12 has quit [Ping timeout: 276 seconds]
pg12_ has joined #linux-sunxi
Net147 has quit [Ping timeout: 240 seconds]
Net147 has joined #linux-sunxi
Net147 has quit [Read error: Connection reset by peer]
<MoeIcenowy>
rah: does your board feature VGA connector?
Net147 has joined #linux-sunxi
Andy-D has quit [Ping timeout: 240 seconds]
Net147 has quit [Read error: Connection reset by peer]
terra854 has joined #linux-sunxi
Net147 has joined #linux-sunxi
Net147 has quit [Read error: Connection reset by peer]
Net147 has joined #linux-sunxi
TheSeven has quit [Ping timeout: 245 seconds]
TheSeven has joined #linux-sunxi
Net147 has quit [Ping timeout: 255 seconds]
BenG83 has quit [Ping timeout: 264 seconds]
Net147 has joined #linux-sunxi
Guest67191 has joined #linux-sunxi
huawei has joined #linux-sunxi
Guest67191 has quit []
JohnDoe_71Rus has joined #linux-sunxi
Xal1us_Ph has joined #linux-sunxi
Xal1us_Ph has quit [Client Quit]
Xalius_Ph has quit [Ping timeout: 255 seconds]
Xalius_Ph has joined #linux-sunxi
Xal1us_Ph has joined #linux-sunxi
Xalius_Ph has quit [Ping timeout: 240 seconds]
chomwitt has quit [Ping timeout: 240 seconds]
flygoat has joined #linux-sunxi
<KotCzarny>
nice. they didnt broke boot order on that nolimbook, time to hack away
codekipper_ has joined #linux-sunxi
<MoeIcenowy>
KotCzarny: what SoC?
<codekipper_>
stoned0651_: the dts is wrong..you're binding the internal codec to the internal i2s block. You need to add whatever codec you're using to the dts and ensure that's it's being compiled.
MXfive has joined #linux-sunxi
<codekipper_>
see sound/soc/codecs
f0xx has joined #linux-sunxi
<codekipper_>
what device are you trying to connect to?
<stoned0651_>
i want to use the embedded I2s in Nano pi M1
<codekipper_>
I2S is just a DAI...you need to attach it to something external
<codekipper_>
there isn't many sunxi devices out there with i2s onboard
<stoned0651_>
ok. Do you see any issues with the hdmi configuration? It doesn't show the hdmi as well
<codekipper_>
the nano pi has the i2s pins on the header I believe...you can spoof a connection to an external codec like the pcm5102a
<KotCzarny>
MoeIcenowy: a13
<codekipper_>
hdmi looks ok from the logs...did you boot with it connected?
<stoned0651_>
no
<codekipper_>
It's not really my area...and I usually run my devices headless
fkluknav has joined #linux-sunxi
<stoned0651_>
no worries. i am primarily concerned for the i2s support. So do u reckon with pcm5102a i can use the i2s pins on the header ?
<codekipper_>
I've not had any success with my pcm5102 but I didn't really spend much time with it...I've used a uda1380 which requires a i2c interface as well
<KotCzarny>
does sunxi-fel have some reset/reboot command?
<KotCzarny>
ssvb: found something funny
<KotCzarny>
# sunxi-fel hex 0 0x40000000
<KotCzarny>
Segmentation fault
<KotCzarny>
i know it's not smart, but still, tool shouldnt segfault ;)
<KotCzarny>
also, got usb_bulk_send error -7 after that ;)
codekipper_ has quit [Ping timeout: 260 seconds]
<NiteHawk>
KotCzarny: booting the vendor SPL / boot0? the usb timeout might be normal in that case
<KotCzarny>
nitehawk, nah, it got -7 after that hex command
<KotCzarny>
and fel mode was triggered via sdcard
<NiteHawk>
"hex 0" is nasty :P
<KotCzarny>
still, made fel stack crash, and tool to segfault :P
<KotCzarny>
tool should'nt segfault
<NiteHawk>
as you're accessing DRAM at 0x40000000 - was that initialized properly (i.e. ./sunxi-fel spl ...)?
<KotCzarny>
nope, i was just starting to play with it
<NiteHawk>
otherwise you're expected to crash the SoC, which will take FEL down with it
<KotCzarny>
and again, tool shouldnt crash but print meaningful error msg
<KotCzarny>
i've managed to b0rk fs on that device and now i need to create some rescue os
<NiteHawk>
yeah, i'll check if it's reproducible with other SoCs
<KotCzarny>
maybe you should print 'soc/fel stack probably crashed' after -7 error
netlynx has joined #linux-sunxi
<KotCzarny>
that would save some time for new sunxi-fel users
<NiteHawk>
yes. the "problem" is there's little we can do if the FEL goes to nirvana - sunxi-fel is waiting for feedback from the device, and will end up with "USB timeout"
<KotCzarny>
maybe issue ver command after -7 and if that also times out print information that fel crashed
maz has quit [Ping timeout: 258 seconds]
<NiteHawk>
i doubt that BROM/FEL would ever recover gracefully after "error -7", but it's an interesting idea nevertheless
<MoeIcenowy>
yes a better error message is better
<MoeIcenowy>
for example "FEL crashed, please try to reset the board"
<KotCzarny>
also, since you both are here, can board be reset via sunxi-fel somehow? assuming it's still responding
<MoeIcenowy>
maybe you can try to set watchdog via FEL
<KotCzarny>
how?
<MoeIcenowy>
see function reset_cpu of mainline u-boot arch/arm/mach-sunxi/board.c
<NiteHawk>
also we have (specialized) code to issue a RMR (reset management register) request for ARM64. but I'm not sure that can be generalized to more SoCs (older ones are lacking that register iirc)
<NiteHawk>
you could also try to jump to the BROM entry point, maybe?
<MoeIcenowy>
NiteHawk: for older SoCs software reset is triggered by watchdog
<NiteHawk>
MoeIcenowy: ah, thanks
<KotCzarny>
hmm, it's some asm
<KotCzarny>
nitehawk, care to implement that reset idea?
<KotCzarny>
how does it translate to fel commands?
<NiteHawk>
i don't feel like it right now, to be honest. we're safer telling people to do a "hard" reset - if needed, by power-cycling the board. IMHO the software stack for BROM is too fragile to be relied on
<KotCzarny>
umkay, and for the second question? ie. how to translate that asm into fel commands?
<NiteHawk>
but it's certainly possible. you'd create an ARM thunk out of it, and then upload and execute that piece of code via FEL. (which would probably give you another error -7 :D)
<KotCzarny>
but it should be possible to make it fel oneliner
<KotCzarny>
as all it does is putting some data in memory
<MoeIcenowy>
yes... it's really -7 able
<MoeIcenowy>
but you can omit the dead loop in the code
<MoeIcenowy>
so that it will be 0.5 sec time after wdt is set
<MoeIcenowy>
thus it can go back to FEL and return
<KotCzarny>
what does mov r0, r0 do?
<MoeIcenowy>
after 0.5s you will enter a new FEL ;-)
<KotCzarny>
otherwise it's only writing 0x3 to 0x01c20c94
<NiteHawk>
KotCzarny: not much, i'd assume it to be a "noop" / delay
komunista has joined #linux-sunxi
<NiteHawk>
just for fun you could try "./sunxi-fel writel 0x01c20c94 3"
Xal1us_Ph has quit [Ping timeout: 260 seconds]
<KotCzarny>
hmm
<KotCzarny>
maybe wd needs some timer configured
<KotCzarny>
hmm i think it worked
<KotCzarny>
(card wasnt eject fully before)
<KotCzarny>
now i get usual usb fel device not found
<NiteHawk>
to verify it, you could first boot to FEL (without card), then insert a SD card with uart0-helloworld. try to reset, and if you get the expected uart output, all is fine
<KotCzarny>
don't have uart yet
<KotCzarny>
i fail at soldering and need to invent some way to connect pins
Xalius_Ph has joined #linux-sunxi
souther has quit [Remote host closed the connection]
<NiteHawk>
i might play around with that "softreset" idea later, but i need to fix some other things first (e.g. plaes' pull request). plus. my btrfs raid1 is playing antics on me, and needs to be recovered first :P
<KotCzarny>
no worries, i've added softreset to tips and tricks on fel page so i won't forget
lemonzest has joined #linux-sunxi
<KotCzarny>
also, i've verified that softreset works. when running it after ejecting card i get 'fel device not found', if card stays inserted 'ver' works as expected (ie. means fel was reentered
<KotCzarny>
at least on a13, but most likely it's the same on a10/a20 at least
<Putti>
Hi, I got these outputs from serial console: http://paste2.org/YbEFbGca (android boot), http://paste2.org/I6NtcWkJ (fel mode). The command "sunxi-fel uboot u-boot-sunxi-with-spl.bin" still fails with "usb_bulk_send() ERROR -7: Operation timed out" – do these console outputs give any help for resolving this issue?
<Putti>
Btw, I also tried pressing zero (as it said "Hit any key to stop autoboot: 0") but it didn't work. Maybe there is something wrong in my transmitting?
<Putti>
I connected the TX of my USB UART converter to CD pin of the sd card breakout board
<Putti>
(and tried with others too without success)
<NiteHawk>
Putti: according to the second log, your U-Boot version seems to have some sort of "run key detect" that causes it to reset the cpu in the end (which explains the -7). is that a vendor-provided u-boot flavor, and did you cross-check against a u-boot you compiled from source yourself?
<NiteHawk>
iirc, u-boot has a setting that can be customized to accomodate for the sd-breakout (to remux the uart pins)
<KotCzarny>
on a funny note, this a13 tablet accepts 2gb sd card that a20 refused
flygoat has quit [Quit: Connection closed for inactivity]
f0xx has quit [Ping timeout: 252 seconds]
pg12 has joined #linux-sunxi
apritzel has joined #linux-sunxi
apritzel has quit [Quit: Leaving.]
LargePrime has quit [Ping timeout: 264 seconds]
MXfive has quit [Quit: Sleep Quit.]
_whitelogger has joined #linux-sunxi
flygoat has joined #linux-sunxi
LargePrime has joined #linux-sunxi
chomwitt has joined #linux-sunxi
reinforce has joined #linux-sunxi
Mr__Anderson has joined #linux-sunxi
fkluknav has quit [Ping timeout: 256 seconds]
<Putti>
NiteHawk, okay, I might be pressing the vol up and pwr buttons wrongly, let me try again and maybe this time there won't be "reset cpu". With cross-checking you mean? And I have not yet gotten my own u-boot there because of the -7 error.
IgorPec5 has joined #linux-sunxi
fkluknav has joined #linux-sunxi
fkluknav has quit [Ping timeout: 258 seconds]
jernej has joined #linux-sunxi
<NiteHawk>
Putti: the key combination is (only) required to *enter* FEL mode. once you're there (which can be confirmed by "./sunxi-fel ver"), there's no need to keep any buttons pressed.
<Putti>
NiteHawk, I get to the FEL mode but and sunxi-fel works, but the "cpu reset" is still there
<NiteHawk>
by "cross-checking" i meant if you have tried to use a generic u-boot compiled from source, to see if it shows the same behaviour. don't worry about the USB timeout (error -7) too much at this point, once you have sunxi-fel working with the "uboot" (or "spl") command, you're pretty much free to run any suitable bootloader
<Putti>
NiteHawk, I meant that sunxi-fel ver works (but the other commands do not)
<NiteHawk>
the output you provided seems to indicate that "sunxi-fel uboot ..." works fine. it's just that u-boot doesn't behave as expected / would grant you a prompt?
<Putti>
NiteHawk, no, "sunxi-fel uboot u-boot-sunxi-with-spl.bin" doesn't work but "sunxi-fel ver" works
<Putti>
and so "sunxi-fel uboot u-boot-sunxi-with-spl.bin" gives that -7 error
<Putti>
so I think I have to figure out how to get that "reset cpu" not to show up
<NiteHawk>
oh, i may have misread you then. i thought http://paste2.org/I6NtcWkJ "fel mode" was what you got from booting u-boot
<Putti>
with "fel mode" I meant the serial console output that I got by pressing VOL UP and PWR buttons
<NiteHawk>
where did you get that particular u-boot-sunxi-with-spl.bin from then? and please pastebin the output of "sunxi-fel -v uboot u-boot-sunxi-with-spl.bin" - note the -v for 'verbose'
<Putti>
I compiled it with q8_a33_tablet_800x480_defconfig from the latest u-boot source code (which I was yesterday suggested to try a release version)
<NiteHawk>
okay, that looks as if the SPL doesn't execute properly - it seems it never gets to uploading and starting u-boot itself
mossroy has joined #linux-sunxi
<Putti>
right, because of the "cpu reset", I think
<NiteHawk>
no, please ignore that - that reset message might in fact just indicate the switch to FEL mode (which you have verified with "sunxi-fel ver")
<Putti>
Hmm, is it possible to boot to u-boot from the vendor provided Android OS?
<Putti>
Or some other way
<Putti>
btw, the "cpu reset" message comes on the third power button press
<Putti>
aha, ok
<NiteHawk>
actually i was asking myself that very question, maybe a "boot0" image (= SPL) extracted from the vendor firmware would take you further. but since the device boots from nand normally, getting that boot0 might be a bit tricky
<Putti>
though, I found this code online so resetting the cpu doesn't sound good: http://paste2.org/IIawJtFE
jernej has quit [Remote host closed the connection]
<Putti>
right, I will do some research on my own for a while and will come back with my findings. Thanks for the help NiteHawk!
jernej has joined #linux-sunxi
maik_ has joined #linux-sunxi
<maik_>
Hi, i like to build a buildroot image for my nanopi-neo board. So far it works. But I like to use the analog audio output. For that i switched to kernel 4.10-rc7. "CONFIG_SND_SUN8I_CODEC_ANALOG=y" is set. But after booting, no soundcard is found. Any hint for solving this issue? Maik
codekipper_ has joined #linux-sunxi
<codekipper_>
maik_: If it's not showing up with aplay -lL then it's not enabled by your dts...if it is then I guess you need to play with alsamixer
<maik_>
I think, it is not enabled by dts. But how ca I do this?
<vinimac>
But can be read in any point, even in sun4i_spi_runtime_resume. But i did test in this line only
<plaes>
you explicitly enable that bit there and print the variable
<vinimac>
but not the SDM bit
<ssvb>
that's a different bit, but still something is strange
my123 has joined #linux-sunxi
my123 has joined #linux-sunxi
my123 has quit [Changing host]
maik_ has joined #linux-sunxi
<ssvb>
can you just as an experiment also try to set the high bits of this register?
<vinimac>
yes, i can
<ssvb>
if they all also read back as set to 1, then it's very different from what I'm observing here
<vinimac>
ah, it is correct. It is exactly the bit 20, not 21-31
<vinimac>
I meant, SDM is the bit 20
<ssvb>
so you can change the bit 20 on your A13, but not bits 21-31?
<vinimac>
I did not test it yet, but i will
<ssvb>
I just wonder with what page attributes are these SPI hardware registers mapped in Linux
<maik_>
I am trying to get audio working on a nanopi-neo with buildroot and kernel 4.10.rc7. I did a sun8i-h3.dtsi patch. Sound card "H3_Audio_Codec - H3 Audio Codec" is listed in /proc/asound/cards. dmesg shows "sun4i-codec 1c22c00.codec: ASoC: /soc/codec-analog@01f015c0 not registered"," sun4i-codec 1c22c00.codec: Failed to register our card","sun4i-codec 1c22c00.codec: Codec <-> 1c22c00.codec mapping ok". No audio on line-out. Any hint