<hno>
wonder why marsboard have not been submitted to the board database.. strange for someone trying to profile as "hacking friendly"
<arokux>
hno, because hackers will do it themselves! :)
<Seppoz>
xD
<hno>
I don't see an AXP power controller on those pictures.
<Seppoz>
same
<hno>
arokux, sure, but it saves everyone a lot of frustration if the ones who know the details of the board do so themselves. Only takes some minutes.
<hno>
compared to some hours for a new hacker.
<hno>
Seppoz, see wiki link before. You really need to add a new board definition. There is no problem in supporting the board, but picking a random definition for some other board will not work well.
<Seppoz>
this also seem to be for a different uboot not the one in current
<Seppoz>
working on it
<arokux>
Seppoz, sorry, my knowledge is very limited
<arokux>
Seppoz, so you sell such boards?
<arokux>
Seppoz, by "such" I mean similar small boards
<Seppoz>
naaw
<Seppoz>
we are just doing a small project
<arokux>
Seppoz, students?
<Seppoz>
not quite anymore just some private project
<Seppoz>
according to the source in boards.c the bord shouldnt hang when printing Failed to set core voltage! Can't set CPU frequency
<Seppoz>
its just some error message
AndroUser has joined #linux-sunxi
<AndroUser>
Hello
<Seppoz>
hi
<AndroUser>
I want to make a20 boot from nfs
<AndroUser>
I made the kernel but i dont know why is not able to mount nfs
<Seppoz>
so this marsboard thing aint work with current, and after i added all the stuff required it stucks at the same place ad cubie
<arokux>
AndroUser, so *what exactly* is wrong and how do you understand it is wrong?
<hno>
I never added that patch as PontusO never answered my request. oliv3r you say you merged it but where?
<AndroUser>
So the kernel i booting normaly if i set rootfs to the mmc is booting, but i think is becouse of the wemac with its random mac address
<hno>
Seppoz, the patch on github is for a very old sunxi u-boot. I asked to have it updated to current so it could be merged but no response.b
<AndroUser>
After it boots it changes the ip
<AndroUser>
I want to know if there isa a way to make the kernel take the mac from u-boot env
<hno>
AndroUser, if it changes IP then your OS is confused.
<AndroUser>
I know... That is the problem
<arokux>
AndroUser, have u set the mac in uboot
<arokux>
?
<AndroUser>
Yes
<AndroUser>
Etheraddr
<hno>
AndroUser, make sure to use the ethernet from u-boot before starting kernel, allowing it to configure the mac address on the ethernet interface. I think the kernel will pick it up then.
<AndroUser>
With the old kernel i was able to set it from uEnv.txt
<hno>
how?
<Seppoz>
i might have one hno if you give me a bit
<AndroUser>
I am on my phone now i have to arrive home to see it, i think with mac_addr
e-ndy has quit [Ping timeout: 248 seconds]
<arokux>
hno, quick question: do you know if devm_usb_get_phy is *only* used for EHCI?
<hno>
arokux, no idea. haven't touched USB kernel driver.
<hno>
Seppoz, add it to the githup pull request.
<AndroUser>
But not all the values for mac wa accepted, i dont know why, i have to check the sun7i_wemac.c
<hno>
AndroUser, there is two possible ways that mac could be passed to kernel from u-boot. Either by having the mac address configured in the emac by u-boot (done by using network from u-boot), or by passing a kernel argument in bootargs that is picked up by the kernel driver.
<hno>
Seppoz, looks normal.
<arokux>
hno, then maybe clk framework? :) is there anything for "reset"?
<hno>
Seppoz, u-boot is looking for uEnv.txt and boot.scr and not finding any.
<Seppoz>
hno: ahh ok
<hno>
arokux, there is no reset other than the watchdog.
<Seppoz>
hno: does it matter if the script.bin is for a10s? i compiled sun4i_defconfig on the kernel so it should atleast boot ut a bit shouldnt it?
<AndroUser>
Int the bootargs i want, i see in the sun7i_wemac.c that is defined MAC_ADDRESS
<Seppoz>
not sure what data abort
<Seppoz>
<Seppoz>
MAYBE you should read doc/README.arm-unaligned-accesses
<Seppoz>
means
<hno>
a10s ix very different from a10.
<Seppoz>
where would i dind a script.bin for a10?
<hno>
Seppoz, you find script.bin for your board on your board.
<hno>
there is no single script.bin for a10, there is one per kind of board.
<hno>
or more..
<hno>
arokux, there is only some module reset bits here and there. i.e. reset of the USB phy, and some other, but much less than you would expect.
<arokux>
hno, my question is if this is managed by the kernel in some high level fashin
<hno>
arokux, what managed?
<Seppoz>
hno: i d/l a script.bin for amrsboard but still getting same error, do you think "MAYBE you should read doc/README.arm-unaligned-accesses" has anything to do with the script bin?
<arokux>
fashion*, like clk_reset(clk)
<hno>
arokux, sorry, I am really the wong person to talk to. I mostly dig in u-boot and registers, not so much kernel.
<arokux>
hno, no prob!
<Seppoz>
seems like the error is still in uboot
<hno>
Seppoz, have you extracted the DRAM settings from your board, or blindly using what PontusO had?
<Seppoz>
the ones he had didnt work at all
<Seppoz>
so i played with em
<Seppoz>
you think thats where the error comes from
<hno>
Seppoz, you really should get the settings from a known working image.
<hno>
Seppoz, do you have something that works in your NAND?
<Seppoz>
i wouldnt call it working but ye
<hno>
Do the kenel boot, and stay up, with correct amount of memory recognised?
<Seppoz>
thnk so yes
<hno>
the rest of whatever OS functionlity you have that might work or not is irrelevant..
<Seppoz>
booted
<hno>
Seppoz, did you read the wiki link I posted before?
<Seppoz>
ye but that command is for uboot isnt it?
<hno>
it is.
<Seppoz>
i dont have any uboot for that bitch board xD
<hno>
for u-boot booted from nand.
<hno>
Seppoz, you have a u-boot already in your nand.
<hno>
But there is another approach using Android if you prefer that...
<Seppoz>
just cant figure out what that error could be
<Turl>
arokux: same as I told wingrime the other day, you can just write a hack to punch those registers manually and then continue writing the driver :)
<arokux>
Seppoz, MAYBE you should read doc/README.arm-unaligned-accesses
<arokux>
Seppoz, you can read only in 4 byte chunks
<Seppoz>
ok but where is the error then?
<arokux>
Seppoz, maybe this is the cause.
<Seppoz>
where would i fix this?
<arokux>
Seppoz, have you added some code?
<Seppoz>
in the kernel or uboot?
<arokux>
Seppoz, uboot of course, kernel isn't even started yet
<arokux>
Seppoz, oh wait, it is!
<arokux>
Seppoz, well yes, then in kernel. have you added some code to the kernel?
<Seppoz>
see if i load the kenrel as zimage
<Seppoz>
and go to it
<Seppoz>
it boots fine
<Seppoz>
i am pretty sur eits uboot
<arokux>
Seppoz, and if you load it as xxxx, it fails, so what is xxxx?
<Seppoz>
uImage
<Seppoz>
but the procedure with uimage loading is different and its beeing uncompressed to another address
<arokux>
Seppoz, ok, give it another try, here are my commands that work for me:
<arokux>
Seppoz, the task I wanted to give you is about clocks
<arokux>
Seppoz, every SoC has tens of clocks
<arokux>
Seppoz, each powering some device, you can turn them on/off and so on. some devices need several clocks. turning on and off is for power saving
<arokux>
use root as user name
<Seppoz>
ok
<arokux>
mount debug file system
<arokux>
mount -t debugfs none /sys/kernel/debug
<arokux>
and do: cat /sys/kernel/debug/clk/clk_summary
<arokux>
Seppoz, do you see a nice tree?
<Seppoz>
ye
<arokux>
Seppoz, so if you are up to the small initial task, after adding some clock it will appear in this tree
<arokux>
now I would recommend you to save all the commands you've just used into some text file, so that you have them later...
<arokux>
Seppoz, afterwards we can talk about clocks' specifics
<Seppoz>
ok i will write all this down now for documentation purpose, also i need to run some errand and later on we hack the kernel :) yay
<Seppoz>
ill be back soon thank you ver ymuch so far
<arokux>
Seppoz, errand?
<Turl>
arokux: a dt for the mele a1000/a2000 would be nice
<Turl>
arokux: mele has red and blue led specific to it on gpios :)
<arokux>
Turl, so far cubie's worked.
<arokux>
Turl, blue LED works for me :)
<arokux>
Turl, heart beats :)
<Turl>
arokux: are they on the same pin? heh, cool
<Turl>
in any case, the cubie hearbeating one is green for instance ;) and so does dt say
<arokux>
Turl, I see. how many LEDs are there? is it different per device?
<Turl>
mele has a blue and a red one from what I recall
<Turl>
arokux: I can make a dt if you don't want to do it, as long as you can test it :)
<arokux>
Turl, yes, I've seen both.
<arokux>
Turl, I can test it of course. the point is I want to finish usb-ohci, leds are of course fun, but one task at a time :)
<Turl>
arokux: red on PH10 and blue on PH20
<arokux>
Turl, was it a question?
pirea has quit [Quit: Leaving]
<Turl>
arokux: no, I'm just stating the pins & led colors :)
<arokux>
Turl, so it would be nice to see your commits on bitbucket, since I want to give a small task (to add some clock) to Seppoz. you can recommend which one, if you want. then i'll help him to add it.
<Turl>
arokux: I'll push an updated branch in a bit, need to pick some stuff for lunch first
<arokux>
Seppoz, these docs are everything we have. they are incomplete and contain mistakes. the other source of the information is the source code dropped or leaked.
<arokux>
Seppoz, the dropped code is feature full and is improved by people here too
<arokux>
Seppoz, this is the branch with most recent stuff
<Seppoz>
so what i need to get to is beeing able to access gpio, add i2c devies with settings and so on, with that souce you dont do that in the mach files anymore right?
<Seppoz>
which kernel is the one with the best support for the a10?
<arokux>
you'd need just stuff that explains how to boot kernel over network
<arokux>
Seppoz, having this you won't need to write anything to the sd and will save time if testing your work
vinifr has quit [Ping timeout: 245 seconds]
<arokux>
Seppoz, i'm back earlier than i though
<arokux>
thought*
<wingrime>
arokux: nice I saw you patch in ML
<arokux>
wingrime, thanks, it's buggy though :) fixed it today in the morning, but there are still some unresolved issues, so i'm waiting before resubmitting
<arokux>
wingrime, how is your IR?
<wingrime>
arokux: works normaly
<wingrime>
arokux: but mripard should send some patches to mainline
<arokux>
wingrime, cool. have you had some kind of reset clock maybe?
fredy has quit [Excess Flood]
<wingrime>
arokux: no
<wingrime>
arokux: about GIT mail
<wingrime>
arokux: I seems not configured it fully
<wingrime>
arokux: my mails in gmane looks not named
<arokux>
wingrime, sorry, I have no idea.
fredy has joined #linux-sunxi
<wingrime>
arokux: realy probem that I have not full clock support
<wingrime>
for IR
<arokux>
wingrime, lack of doc?
<wingrime>
arokux: mripard still not pushed this
<arokux>
wingrime, you can cherry pick
<wingrime>
arokux: also there part simply still not writed
<wingrime>
arokux: so I use clock hack
<wingrime>
arokux: and set clock directly
<arokux>
wingrime, I see. I also needed to add clock for usb host
vinifr has joined #linux-sunxi
adrian_win has quit [Ping timeout: 264 seconds]
<arokux>
wingrime, what you'll do next?
AndroUser has quit [Ping timeout: 264 seconds]
<wingrime>
arokux: axp209 or dma
<wingrime>
arokux: but I stil not tested IR unload
<wingrime>
arokux: as I have no modules
<wingrime>
arokux: normal mmc
<wingrime>
((
<arokux>
wingrime, normal mmc?
<wingrime>
MMC working for mainline
<arokux>
wingrime, you mean there is no mmc for mainline? but you could put modules into ramfs
<vinifr>
wingrime, hi, what do you use for clock IR?
<wingrime>
vinifr: directly, open and set clock by register write
<arokux>
wingrime, what does ioremap second parameter do?
<wingrime>
arokux: size
<wingrime>
arokux: how much mem you want remap
<arokux>
wingrime, than what is remapping? :)
<Turl>
diff.renames
<Turl>
Tells git to detect renames. If set to any boolean value, it will enable basic rename detection. If set to "copies" or "copy", it will detect copies, as well.
<Turl>
arokux: physical to virtual address translation
<arokux>
Turl, hm, ok, but why it needs to know the size? is remapping of the address not enough?
<Turl>
wingrime: what is gmane server? I will try it on thunderbird
<Turl>
arokux: you need to remap a chunk of memory
<Turl>
wingrime: ok, subscribed to sunxi and lkml with it, will test
<arokux>
Turl, wingrime hm.. same shit:
<arokux>
Unable to handle kernel paging request at virtual address f1c13404
<arokux>
should i configure the kernel somehow?
<wingrime>
arokux: adress looks realistic
<arokux>
wingrime, oh, that is something else now. your code worked.
<arokux>
what could CSR mean in context of usb?
<arokux>
Turl, hurra! I've added usb hub!
<Turl>
arokux: cambridge silicon radio? they make bluetooth usb things
<Turl>
arokux: :)
<Turl>
wingrime: gmane has weird address
<wingrime>
Turl: should Makefile and Kconfig be in same patch with driver ?
<hno>
arokux, kernel have IO mapped at a high address.
<arokux>
hno, why it worked without remap for 3.4?
<Turl>
wingrime: yes
<Turl>
wingrime: also binding document
<hno>
arokux, physical I/O addresses have never worked in the kernel.
<wingrime>
Turl: same patch or sending patchset?
<Turl>
arokux: 3.4 has a static mapping for regs on 0xf...
<arokux>
hno, hm.. allwinner's code just written to the hardware
<hno>
arokux, yes, but not using the physical addresses. Only the high virtual address.
<Turl>
wingrime: I think binding should go with driver
<Turl>
but you can make it separate patch too
<Turl>
not big deal
<arokux>
hno, ok
<arokux>
ok, so hub showed up. it i declare it as success. however nothing happens if i put a usb stick into one of the ports. so need to work further. :)
<hno>
arokux, trying to get USB to work mainline?
<arokux>
hno, need to. my goal is to get wifi up and running
<hno>
arokux, the host controller I assume? not the musb based otg.
<arokux>
hno, yes. {o,e}hci
<hno>
arokux, you are very welcome to join in getting that working for u-boot as well. Would be very nice to be able to boot from USB storage.
<arokux>
hno, to boot per usb from uboot?
<hno>
yes, have u-boot load kernel and initrd from USB drive.
<arokux>
hno, you could put kernel into sd and boot from usb drive too
<hno>
mass storage support is there, but no drivers for the sunxi usb host controllers..
<hno>
arokux, I know, but not quite the same thing.
<arokux>
hno, I kind of agree with people which say that uboot should get to be the separate kernel...
<arokux>
hno, anyway, I'll get it working in kernel then will see.
<hno>
yes, kexec booting is nice as well.
<arokux>
hno, how does it work?
<hno>
kexec?
<wingrime>
Turl: what means status = "okay";
<wingrime>
in dt
<arokux>
wingrime, the device will be probed
<Turl>
wingrime: it means device is usable
<Turl>
wingrime: opposite of status = "disable"
<Turl>
(or disabled, don't remember exactly)
<wingrime>
Turl: is it required?
<arokux>
hno, yes, from what i remember it can be used in the running system to boot new kernel.
fredy has quit [Excess Flood]
<Turl>
wingrime: I dunno on your case
<arokux>
hno, so you mean the kernel on sd card kexec's the one on the usb drive?
<Turl>
wingrime: it is required if inherited device had status = "disable"
<hno>
arokux, yes. You boot one kernel, do whatever you need to do to load the kernel you want to run into memory and then kexec to gently hand over execution to that kernel instead
<Turl>
linux as bootloader
<arokux>
hno, ah, then it's perfect. no need for usb support in uboot!
<arokux>
hno, and you need to flash uboot to the sd card anyway, so no big deal if you also flash uImage and dtb
<WarheadsSE>
kexec can be fun, and annoying
fredy has joined #linux-sunxi
<hno>
in large systems it is also used for crash recovery. When system starts you preload another kernel + initrd into memory + reserved memory region. On kernel panic kexec to that for crash diagnostics and recovery.
<WarheadsSE>
yup
<arokux>
I see some dma stuff in usb. should there be some support for that in mainline which is not there yet?
<Turl>
it can come in handy too if your bootloader is locked
<arokux>
or this is smth that is already in the stock kernel
<Turl>
arokux: dma is not on mainline, indeed
<Turl>
arokux: wingrime was working on it
<Turl>
it may be possible to operate the controller in PIO mode too
<hno>
Turl, yes that too. locked bootloader with kexec enabled kernel is someone not doing their homework in how to lock down a system.
<Turl>
hno: s/kexec enabled/module loading/
<hno>
module loading of unsigned modules yes.
<hno>
kernel have full support for signed modules these days.
<arokux>
Turl, PIO is slower than DMA?
<hno>
arokux, PIO means I/O done by the CPU one word at a time.
<Turl>
hno: I haven't seen anyone using signed modules yet
<wingrime>
Turl: interrupts = <0 5 1>; , can I use <5> like on others soc's
<Turl>
arokux: usually for large qty of data, see what hno said
<arokux>
hno, ok, then slower.
<hno>
It's sometimes slover, sometimes faster, depends. But it is almost always much more CPU intensive.
<Turl>
wingrime: I dunno, never used interrupts on dt
<arokux>
hno, ok. i've thought PIO mode is yet something else
<Turl>
arokux: Processor I/O
<arokux>
Turl, ah.. I thought Pins I/O :D
* hno
did interrupts in DT not that long ago but do not remember at all what the interrupts specification means..
<arokux>
wingrime, I've did interrupts
<arokux>
interrupts = <64>;
<hno>
Yes, that specification is simple.
<arokux>
and then in *.c: irq = platform_get_irq(pdev, 0);
<wingrime>
hno: <0 5 1> ?
<hno>
no, <64>
<wingrime>
hno: why not use <5>
<wingrime>
hno: I about IR0 IRQ
<wingrime>
not usb
<arokux>
wingrime, what do you mean why not? those are constants you need to read of from the doc or legacy code, or?
<wingrime>
Turl: also about naming
<arokux>
new mystery HPCR
<wingrime>
Turl: ir0: ir@01c2180
<wingrime>
Turl: it realy require address?
<arokux>
wingrime, aren't you using this address in the driver?
<wingrime>
there reg = <0x01C21800 0x40>;
<wingrime>
too
<hno>
ah, yes, interrupts format is defined by the interrupt controller.
<hno>
wingrime, it is quite nice to have the address in the name.
<Turl>
wingrime: yes, you should include address
<hno>
not requires, but helps keeping structure.
<arokux>
wingrime, yes, it's kind of duplication...
<hno>
it is, but helps you in the long run.
<hno>
used for different purposes.
<Turl>
hno: if the standard doesn't enforce it, then it has kind of grown on developers as a good practice
<hno>
yes
<Turl>
name is used on sysfs for example
<hno>
name is used in many places.
vinifr has quit [Quit: Saindo]
<Turl>
also I believe it needs to be unique, so if you are going to use ir it needs to @something
<hno>
usually you keep the name before the @ unique as well.
<hno>
i.e. ir0 for the first IR controller, ir1 for the second etc..
<Turl>
hno: I think some of them are standarized though
<hno>
HSIC looks like just USB2.0 using digital signalling instead of serial, for chip-to-chip channels.
<hno>
same controller interface.
<hno>
different way of connecting "the cable".
<arokux>
hno, no no, the question isn't about it.
<hno>
I know.
<arokux>
now I want to understand what port is, so that i look if there is already something similar in the kernel
<Turl>
hno: looks to me that it's dram controller's HPCR, used to map sram for use with USB controller
<hno>
Ah, now I do see your question. That is in fact one of the DRAM controller HPCR registers. Do the USB controller code really mess with that one?
<arokux>
Turl, translate plz :p
<arokux>
hno, yes...
<Turl>
hno: it needs to map SRAM for usb, maybe for use on dma, I don't know for sure
<Turl>
but I've seen sram, usb mentioned on the docs
<arokux>
vim drivers/usb/host/sw_hci_sunxi.c +401
<hno>
oliv3r have mapped up more details on the HPCR bits than I have. But not aware of those being for SRAM access.. only SDRAM DMA I think.
\\Mr_C\\ has joined #linux-sunxi
<Turl>
arokux: btw, I just pushed a rebased sunxi-clk, not much new code in there
<hno>
SRAM mappings is done by the system controller (0x01c00000-0x1c000fff)
<Turl>
with a bit of luck I might sit down tonight, docs in hand, and write bindings for sun5i and maybe sun7i
<arokux>
hno, what is sram mapping at all?
<arokux>
sram is just memory. i've thought stuff gets mapped to memory, so it can be accessible
<hno>
arokux, controlling which parts of the internal SRAM is used by whom.. but I don't think the USB host controllers are using SRAM. Only seen it mentioned for the OTG controller.
<arokux>
Turl, nice. do not forget to omit usb clk stuff.
<hno>
and DRAMC do not know about SRAM.
<hno>
arokux, where is the usb host controller messing with that register?
<arokux>
<arokux> vim drivers/usb/host/sw_hci_sunxi.c +401
<deasy>
i have replace the u-boot and spl provided by archlinuxarm and it works
<hno>
which matches with what the driver does. But not sure why one would want to close access to an DRAMC Host Port. Should be fine to leave them always enabled.
<arokux>
hno, where is this info from? the one on rhombus-tech?
<hno>
The register guide on rhombus-tech is my scatchpad for collecing register details. Scubbing details from the available sources (but not register guide)
bsdfox has quit [Ping timeout: 276 seconds]
<wingrime>
Turl: I send patch to ML
<wingrime>
Turl: you can take a look
<Turl>
wingrime: sure, I'll have a look in a minute
<arokux>
hno, why would one be interested in denying access to the port?
<hno>
arokux, exactly.
<hno>
what I said above.
<hno>
wonder what the default setting is.. /me goes into u-boot to look.
<arokux>
hno, maybe this is just some IP with such an option
<hno>
arokux, they are both enabled by default.
<arokux>
hno, :)
<Turl>
wingrime: what kind of comments are you interested in?
<hno>
well, not on sun5i.. confusing.
<Seppoz>
arokux: back now aswell, compilinx 3.4 now
<arokux>
hno, so I shouldn't rely on it
<hno>
on sun5i HPCR 4 & 5 do not exists
<hno>
or is at least initialized to all 0.
<arokux>
Seppoz, no need to compile it.. but if you like :) 3.4 is used for "reading" mostly if working on the mainline
<hno>
confusing.
<hno>
arokux, you can rely on it I'd say. If there is a problem on sun5i defaults then we fix those.
<wingrime>
Turl: anything
<arokux>
hno, in uboot?
<hno>
yes
<wingrime>
Turl: before it go to mailine
<Seppoz>
arokux: i want to manage to get a working system togeter as step 1
<Seppoz>
than tweak it
<arokux>
hno, what about if somebody don't want to use usb, will it maybe eat more power if enabled?
<Turl>
wingrime: by mail or here?
<hno>
arokux, I don't think so.
<wingrime>
Turl: there faster))
<arokux>
hno, ok
<arokux>
Seppoz, what are you going to tweak?
<Seppoz>
arokux: i only started working with this allwiner stuff 24 hours ago so i really need to get to know the basics before touching stuff i think
<arokux>
Seppoz, ok, take you time :)
<hno>
arokux, also, there is nothing that disables these if you have disabled USB entirely.
<Seppoz>
i want to add i2c devices
<Seppoz>
and play with IOs
<wingrime>
Turl: by mail better comment when I will push it to mainline
<arokux>
hno, true
<Turl>
wingrime: ok
<arokux>
Seppoz, i've seen some i2c devices added..
<Turl>
wingrime: "clocks" description on binding could be better
<Seppoz>
yea? in the actual code or via ste scripts bin?
<hno>
Seppoz, AXP PMU is on I2C. And Olimiex also hae an EEPROM on another I2C channel.
<wingrime>
Turl: for ecxample
<Turl>
wingrime: "First clock should be the AHB bus gate for the IR module. Second clock should be the IR clock itself."
<Seppoz>
hno: do they do that via the code or via the scripts bin?
<hno>
Seppoz, not sure I understand the question.
<hno>
script.bin enabled the I2C ports and defines who is where.
<Seppoz>
hno: in past i just added a structure to the mach file and thats it, as i dont find mach files for each board heare im having a hard time
<Turl>
wingrime: constain -> contain
<hno>
code implements talking on the i2c bus.
<hno>
Seppoz, then it's script.bin.
<Turl>
isn't the i2c bus autodiscoverable?
<wingrime>
Turl: clock indeed can be better , but I thinked that description should go when you try bring this driver to anouther SoC
<hno>
Turl, not really. Partially probeable if you like gambling.
<Seppoz>
hno:so cant keep my old definitions for the i2c chips in old c style but have to implement it somehow using the scripts file?
<wingrime>
Turl: anythin else?
<hno>
Turl, with careful control of the signals you can prove which addresses are in use, and from the address numbers you can try to guess what kind of device there is, and then probe known registers on that device for more info..
<Turl>
wingrime: I'm looking
dwilkins has joined #linux-sunxi
<hno>
or for some addresses just assume it's that device as trying to probe it further will do bad things..
<hno>
Seppoz, allwinner puts all in script.bin, but not sure how well supported the i2c bus is.
<Seppoz>
usually you just define the addesses and devices on the bus but i allways did that in the board mach files
<wingrime>
hno: also, you can look
<Turl>
wingrime: btw, do not send to mainline with clock hack, wait until patches get merged and you can use them
<Seppoz>
is there still a way to do it there?
<hno>
wingrime, look where?
<Seppoz>
or only in the script.bin file?
<wingrime>
hno: ML
<wingrime>
hno: I send IR driver patch
<wingrime>
hno: for RFC
<hno>
Anything in particular you want me to look at in the patch?
<wingrime>
hno: code, thats must come to mainline
<Turl>
wingrime: /* Bit Definition of IR_RXINTS_REG Register */
<Turl>
wingrime: you can use BIT(..) macro there if you want
<wingrime>
Turl: next time
<wingrime>
Turl: I also (maybe) try implemet axp
<Turl>
wingrime: all macro under +/*Hardware supported fifo size*/ look unaligned
<Turl>
might be my editor
<Turl>
s/editor/mail client
<Turl>
much->many /* How much messages in fifo*/
<wingrime>
Turl: yep
<Turl>
that function could use better variable names too, "rc", "dt" are confusing
<Seppoz>
is there any ready to go rootfs for testing?
<Seppoz>
a tarball not .img
<arokux>
Seppoz, you could extract cpio i've given you
<Seppoz>
ahh ye good idea
<Seppoz>
:)
fredy has quit [Excess Flood]
<Turl>
wingrime: also input name is hardcoded, probably not good if you want to use both ir0 and ir1
<wingrime>
Turl: I thinked about
<wingrime>
Turl: but I have no idea how fix it
<arokux>
Seppoz, cpio extracting is tricky though
<arokux>
hno, what addresses should be used in uboot, physical or virtual?
fredy has joined #linux-sunxi
<wingrime>
Turl: also, about clocks, mripard still not sended cubieboard2.dts to mainline
<Turl>
wingrime: maybe name from dt node + sprintf
<arokux>
wingrime, get the node name from dev tree?
<Seppoz>
we will see in a sec
<wingrime>
Turl: bad idea
<wingrime>
Turl: I saw that kernel can assign numbers automaticly
<Turl>
wingrime: then use that :)
<wingrime>
Turl:it was times ago
<hno>
wingrime, when was it sent? And what subject?
<Turl>
wingrime: driver also has many magic constants on writel
<Turl>
hno: [linux-sunxi] [RFC PATCH] [media] rc: Add support for Allwinner sunXi SoC family IR contoller
<Turl>
hno: send ~30m ago
<Turl>
sent*
<hno>
ok.
<wingrime>
oliv3r: ping
<wingrime>
Turl: also, this driver for CIR support
<wingrime>
Turl: but we can FIR and MIR
<wingrime>
Turl: but I have no hardware that can be tested (cb have only reciver)
<Turl>
maybe looking up the register on the user manual will give you a hint
<arokux>
Turl, thanks
<Seppoz>
arokux: do you mind sharing your cubieboard script.bin? also yould i see a 3.4 bootlog? im having alot of outputs like: <3>[uart]: failed to get uart0's used information and sunximmc_init fetch mmc0 using configuration failed, right now the kernel fails with: <6>Waiting for root device /dev/mmcblk0p2...
<arokux>
Seppoz, i do not have cubieboard and i do not build old kernel, only mainline
<Seppoz>
oh ok
<Seppoz>
does the mainline next one from the wiki have the same driver support as the 3.4?
<Seppoz>
so you also cant tell me where those errors are from i guess
<arokux>
Seppoz, right.
<Seppoz>
ok ill keep searching :)
<oliv3r>
wingrime: on vacation pong :p
bsdfox has joined #linux-sunxi
<wingrime>
oliv3r: hramrach seems begin work on rock-chip
<wingrime>
oliv3r: also I sended patch to ML for first look
<Seppoz>
arokux: my script.bin was fail
<Seppoz>
makeing it myself worked :)
<arokux>
Seppoz, I see, good for you
<Seppoz>
even tho some pieces are new for me you guys did an amazing job with providing material and sources!
<Seppoz>
its not like the s3c samsum crap where you have to use google translate from chinees to get any info at all
fredy has quit [Excess Flood]
fredy has joined #linux-sunxi
<oliv3r>
Seppoz: marsboard should be supported just fine; but getting it into u-boot is still a wip (or i said i would do it but forgoet, i don't remember, i'll look at it soon)
<arokux>
Seppoz, what is s3c anyway?
<arokux>
oliv3r, he got it working, see ML
<arokux>
hell, this usb is touching everything..........
<arokux>
not gpio pins
<arokux>
what is this: sunxi_gpio_request_array?
<arokux>
hno ---^
<arokux>
Turl, --------------------^
<Turl>
arokux: request a bunch of gpios? just guessing
<Turl>
arokux: use the source luke :)
<arokux>
Turl, yes, but the luke doesn't know background
<arokux>
Turl, what does it mean to request a gpio?
<Turl>
arokux: something like "hey, this gpio is mine, don't let anyone touch it" I suppose :)
<arokux>
Turl, and then this pin can be used somehow?
<Turl>
arokux: yes, usually muxed or something
<arokux>
Turl, the point is the following. usb requests some random pin and then writes to it. and comment says:
<arokux>
Set USB Power
<arokux>
Turl, so how can a write to a random pin turn usb power on?!
<Turl>
well, output pins can provide power
<Turl>
but I suppose not on 5v
<arokux>
Turl, still.. we are requesting random pin how it can then provide power if it's not physically connected to usb hardware
<oliv3r>
hno i tried to commit what i figured out about hpcr to my hpcr branch on github; it's not much more then what you documented though
<arokux>
oliv3r, maybe you can help with gpio pins?
<oliv3r>
arokux: that's because allwinner drivers are horrible crap; they are set/cange anything that the ymight need, it's really bad
<oliv3r>
i'm in bed, after a 12 hour drive; i'm going to sleepin a min :p
<arokux>
oliv3r, ok, good night
<oliv3r>
Seppoz: what is your intention with sunxi anyway? Just write some software to make some hardware work, or actually write kernel code?
<oliv3r>
arokux: thanks :)
<oliv3r>
Seppoz: i think marsboard dind't get merged initally, because the dram_marsboard.c was exactly the same as dram_cubieboard.c; so i suggested to only change boards.cfg and the other thing and just use dram_cubieboard.c; we never got an updated patch. I'll useyours soon to make support proper
<oliv3r>
and now i'm sleeping, it's 27C here in .at at 00:30 :S
wingrime has quit [Ping timeout: 240 seconds]
<hno>
arokux, the AXP pokes USB a bit.. it does monitor VBUS and reports VBUS state (including IRQ on change).
<arokux>
hno, I cannot understand what happens.
<arokux>
hno, usb grabs some random pin and writes to it
<hno>
arokux, what?
<arokux>
hno, how writing to a random pin can power usb?
<hno>
what random pin writing?
<arokux>
vim drivers/usb/host/sw_hci_sunxi.c +470
<hno>
The only USB pin writing I know about is VBUS power control which is done via GPIO.
<hno>
and pin is HW dependent, set in script.bin and must also go in DT somehow.
<hno>
Does not matter for USB as such, only VBUS power mode.
<hno>
There might also be GPIO inputs for reporting USB overcurrent. Perhaps even EINT mapped, not sure.
<arokux>
hno, usb just does sunxi_gpio_request_array. why it gets back a *correct* pin?
<hno>
Regarding the AXP that's only on the OTG port, as it's one of the power sources the AXP can use for powering the board.
<arokux>
hno, there is some pin fiddling for usb-host too.
<arokux>
hno, does is mean that turning any pin on will provide power to something. and usb is just a part of that something?
<arokux>
hno, then, some different device could have powered some other pin already...
<hno>
arokux, see get_usb_cfg().
<hno>
the script.bin section & field name is set there.
<hno>
the sunxi_gpio_request_array() call is just requesting GPIO access to the already identified pin.
<arokux>
hno, now it make sense, no idea how i missed usb_cfg!
<hno>
In general, driving the right GPIO pin high will trigger a MOS gate to provide power on the USB HOST ports VBUS pin. Driving that pin low will cut power on the USB port.
<arokux>
hno, thanks!
<arokux>
hno, I see. why there is no only one switch?
<hno>
What do you mean?
<arokux>
hno, I mean, I thought it is enough to switch the clock off
<hno>
VBUS power is really separate from USB as such.
<hno>
You can run USB just fine without providing any power on VBUS. You just won't be able to attach any bus powered device.
<arokux>
hno, I see.
<hno>
Likewise, you can provide VBUS power without even running USB on the port.
<arokux>
hno, does the latter has any use?
<hno>
just look at the number of USB lamps available...
<hno>
or desktop fans etc...
<hno>
but my point is that USB VBUS control is completely separate from the USB controller in terms of hardware.
<hno>
USB VBUS power control is just a plain GPIO pin connecting to a MOS FET transitstor that powers the VBUS pin in the USB connector.
<hno>
If there is one. Some hardwire power always on, some hardwire not providing any power at all..
<arokux>
hno, ok, I think I got it.
<arokux>
hno, thanks a lot.
<arokux>
hno, usb touches everything one can imagine
<hno>
arokux, not really. But sure it touches many areas. USB, SDRAM (and SRAM for the OTG port), clocks, GPIO, DMA, plus all the usual stuff of a kernel driver.
<arokux>
hno, and considering the fact very little is there... and me a noob, well, you've got an idea
<deasy>
clap clap and kiss for all hackers who do the job for get a mainline kernel support :p
<arokux>
deasy, what are you working on :P
<arokux>
?
<deasy>
i work on waiting for get the source who work on my a10 lol
<deasy>
(in vanilla :p)
<deasy>
the day we can have a gentoo or others working out of the box, wouhouuuuuu
<arokux>
deasy, I suggest you start helping us, otherwise your device will get obsolete till the time we'll mainline stuff
<deasy>
i can't, i'm not an hacker
<arokux>
deasy, who are you? I bet I can find a job for you too.
<deasy>
i'm a not competent admin sys, that's all :)
<arokux>
deasy, do you have some A10 devices?
<deasy>
i have a cubieboard
<arokux>
deasy, not bad for a start
<deasy>
i have get the full kit with ttl serial cable
<arokux>
deasy, want to improve our wiki? there is a how to missing how to build rootfs, like with buildroot
<deasy>
i can try it
<arokux>
deasy, a lot of people are asking for it.
<deasy>
does it need to have 2 times u-boot on a sdcard for booting and why?
<deasy>
one time write raw in the first MB and one time on a FAT partition
<hno>
no u-boot needed in FAT. In fact no FAT needed at all.
<deasy>
ok so the FAT is ony for uEnv.txt
<deasy>
i have also a kernel in the FAT from the archlinuxarm tutorial
<hno>
not even needed for that. u-boot reads uEnv.txt just fine from ext*.
<hno>
having / as the first partition, with /boot having all the boot files is just fine.
<hno>
all in one ext* partition.
<arokux>
hno, /boot directory is the requirement?
<deasy>
ok like the archlinux tutorial give a 3.0.57 i think it's really obsolete
<hno>
u-boot by default looks at forst partiition only, and scans FAT /, ext* /boot and ext* /
<hno>
first partition.
<deasy>
they use a old uboot who say my board is 512MB
<deasy>
i think their tutorial is based on thos old version
<deasy>
this*
<deasy>
thank you :)
<arokux>
hno, hm.. ext* didn't work for me, but maybe i've messed up
<deasy>
depends of the uboot no?
<hno>
yes
<deasy>
i think some read not ext4(old)
<deasy>
the last can read i think
<hno>
correct. but no need to bother about old versions when writing a new tutorial.
<arokux>
hno, i've used -current
<deasy>
hmm it's always interesting to give this aknowledgement
<arokux>
hno, but forget it, will try it out once again some time
<deasy>
oops my word is wrong
<hno>
arokux, a boot log would help..
<deasy>
knowledge*
<hno>
there have been a few bugs that make it fail to set the right root automatically in some cases, but that do not really apply to mainline booting.
<hno>
for mainline booting you really only want u-boot to look for uEnv.txt or boot.scr and then take over the boot sequence from there.
<deasy>
this one use a fat boot partition separated
xtofury has joined #linux-sunxi
<hno>
deasy, fat boot partition still works. Just not required.
<deasy>
(and i hate FAT FS)
<deasy>
disapear FAT !
<hno>
agreed
<hno>
I prefer a single partition also containint /boot with the boot files.
<xtofury>
anybody know how I can change the screen resolution to something useable in the cubieboard ubuntu 12.04 image? It's using LXDE as far as I can tell, and the text is so small in the terminal it is basically impossible to read, plus the VGA version does not work, connected using HDMI cable, and also doesn't work on my TV.
<deasy>
which uefi require it...it's like going in the past
<deasy>
requires*
<hno>
xtofury, VGA version requires VGA connection using special VGA connector kit.
<hno>
For display connection via HDMI port you should use normal version.
<xtofury>
hmmm well I have the normal version on here, it displays on my 8" 800x600 screen but it is not legible because it's set to do 1280x1024...
<deasy>
you can set the resolution in uEnv.txt but i don't know on the fly the syntax
<hno>
xtofury, not sure how that works in the Allwinner 3.3 kernel, or what lxde looks like in Ubuntu.
<deasy>
(sorry if i'm wrong)
<hno>
The current 3.4 kernel can autodetect screen resolutons using EDID making this much less of a pain.
<xtofury>
hmmm ok I'm trying to figure out where uEnv.txt is...
<deasy>
i experience my cubie for webserver and i doesn't have a hdmi screen so i can't test display
<hno>
xtofury, are you using an SD card, or flashed to NAND?
<xtofury>
this is like the only box I can use to setup a develop environment, is this going to work or am I going to be hitting another wall. I tried virtualbox but it won't write to sdcard with raw access because it's integrated into my laptop...
<deasy>
verify if /boot is a separated partition if not mount, mount it and look in it
<xtofury>
oh it's on nand, I flashed it using livesuit, somehow I managed to get through those horrible chinglish instructions.
<hno>
xtofury, then there is no uEnv.txt.
<xtofury>
sigh... which means I have to recompile the kernel, and for that I need a development environment, and for that I need a box that can actually run ubuntu 12 without any problems :(
<hno>
not sure if you can change kernel boot arguments at all without using UART console cable.
<xtofury>
if I did that I'm guessing I'm going to hit another brick wall having windows 7 on this laptop... I tried loading ubuntu 12.10 on here and it just crashes, no go, not a headache I wanna solve....
<hno>
xtofury, do you have a uart console cable?
<xtofury>
uhhh you mean the usb that goes into the FEL port or is that something else I need?
<xtofury>
I've been using that with ADB to work with the android tv-box version.... heck I already know what I need to do it's just super annoying having no means of compiling it. uboot fails with the sunxi firststep instructs in virtualbox, which is another reason why I was ruling that one out.
<deasy>
xtofury, the cable who was in the full kit
<xtofury>
court has me so tapped right now, I'm literally waiting a month before I can buy more stuff....
<deasy>
with 4 female pin
<xtofury>
oh no I don't have that I just bought the board and the case....
<deasy>
(DO NOT USE THE RED)
<hno>
xtofury, I mean the UART cable that connects to the serial console port.
<hno>
xtofury, then try the route of using an sdcard image. Gives you a fair bit more flexibility in changing things..
<xtofury>
I guess that's the way to go but I've been trying to avoid that one, I still need to recompile the kernel from what I've been told to get ts2-calibrate in there for the android image....
<xtofury>
plus ts2-calibrate might not work for my screen I hear it is incorrect and fails with larger screens.
<hno>
now you want Android? Didn't you say ubuntu above?
<xtofury>
I'm just putting it on there to have an environment to compile the kernel for android image with.
<hno>
You don't want to compile kernel on cubieboard.. use a virtualbox on your PC for that.
<xtofury>
but then I run into problems with uboot failing on the make command, and the raw access to sdcard is not working.
<xtofury>
hold on I'll get the error from uboot maybe one of you is familiar with it.