<Wizzup>
I want to see (like last week, now I have time again) if I can my usb otg(?)miniUSB port on my lime to work
<Wizzup>
to work as simple host port* even
<Wizzup>
It seems that the exynos_defconfig doesn't really enable anything MUSB related, but I figured that should be enabled?
<Wizzup>
The wiki doesn't really mention much wrt otg/musb on mainline
<plaes>
exynos_defconfig?
<Wizzup>
er
<Wizzup>
sunxi_defconfig
<Wizzup>
Sorry, messing with different arm devices... I meant to say (and used sunxi_defconfig)
<Wizzup>
I think I may have figured it out - had to enable various options before MUSB_SUNXI was enabled
<plaes>
yeah, it's not in defconfig yet
<Wizzup>
Took some time to find NOP_USB_XCEIV
<Wizzup>
Compiling now :)
<vishnup>
wens: I was looking at A80 dtsi, I do not understand how cpus_clk has relation with pll4?
RzR is now known as rZr
ricardocrudo has joined #linux-sunxi
RSpliet has quit [Read error: Connection reset by peer]
kaspter has joined #linux-sunxi
RSpliet has joined #linux-sunxi
camh has quit [Quit: WeeChat 1.0.1]
<orbifx>
are any of the ready downloadable images built with sunxi-linux?
camh has joined #linux-sunxi
adj_ has quit [Quit: Leaving]
pmattern has joined #linux-sunxi
camh has quit [Quit: WeeChat 1.0.1]
camh has joined #linux-sunxi
kaspter has quit [Ping timeout: 240 seconds]
mnr has joined #linux-sunxi
avph has quit [Ping timeout: 246 seconds]
avph has joined #linux-sunxi
<orbifx>
found it
<orbifx>
well, U-Boot atleast
florian has quit [Ping timeout: 246 seconds]
<mnr>
orbifx: what exactly are you looking for?
<orbifx>
Generally I want to put U-Boot on a Lime2's NAND and my OS in a SATA hdd
<orbifx>
To avoid building for the rest of the day, I want to find pre-built images
<orbifx>
I found a uboot one from archlinux-arm
<mnr>
orbifx: The LIME2 is generally well supported, both in mainline kernel as well as in mainline u-boot.
<mnr>
orbifx: NAND support in mainline is still very experimental though.
<plaes>
orbifx: you need u-boot from git
<mnr>
orbifx: meaning, NAND support is currently not really usable for end-users in mainline
<plaes>
and kernel with extra patches to support nand (so you can write the bootloader)
<mnr>
orbifx: How about putting u-boot on an SD card?
<mnr>
orbifx: Debian supports that setup out of the box.
<orbifx>
mnr: that is my second best option.. but then i got the NAND one for nothing :P
<orbifx>
mnr: supports installing the bootloader to the NAND and os in hdd?
<orbifx>
plaes: yeah, I figured I need the sunxi branch to access /dev/nand correct?
<mnr>
mnr: no installation to the NAND at the moment. U-Boot on SD and OS on the harddisk is supported out of the box.
<plaes>
err.. no
<orbifx>
when you say it is experimental, am I looking at installation issues, or even boot issues?
<mnr>
orbifx: even boot issues
<plaes>
well, I got it working accidentally :D
<orbifx>
mnr: can get that setup with Arch too, which I may end up doing now just to get moving..
<orbifx>
plaes: lol
<orbifx>
who is developing the NAND support?
<plaes>
I have cubietrucks that do netboot
<plaes>
bbrezillon, mostly
<orbifx>
maybe I can help at some point
<orbifx>
and what is the story with MTD replacing the current work on NAND?
<plaes>
MTD is the corrent way
<plaes>
allwinner developed their own blockdevice thingy that doesn't work that well
<orbifx>
where is MTD (Status)? is it mainline?
<plaes>
nope
<ssvb>
plaes: it's kinda the other way around :) allwinner developed their own blockdevice thingy, and it works in real devices, which are already available on the market since years ago
<ssvb>
plaes: and the linux mtd has issues with mlc nand
<plaes>
heh
<plaes>
does it 'sync' properly? :P
<plaes>
ssvb: do you have any idea how to debug whether accelerometer IRQ is properly configured?
<plaes>
IRQ count in /proc/interrupts stays 0
<plaes>
the bma250 accelerometer that my Gemei G9 has, also works without IRQ
<ssvb>
plaes: I don't use accelerometer or touchscreen myself, I'm a 'linux desktop' user (which means hdmi monitor, real keyboard, etc.)
<plaes>
well, yeah.. just trying to get the dts fixed up
<ssvb>
adding debugging prints in the relevant parts of code usually helps
<plaes>
yup :)
<orbifx>
plaes: so say I go ahead with sdcard+sata for now. Is there a chance one good day the OS will get an update that allows it to see the NAND and mount it?
<mnr>
orbifx: Yes, there is a chance. How long it will take is something I cannot really estimate.
<mnr>
orbifx: First NAND support must be stable and included in an official mainline kernel resp. u-boot release. Then the distributions must pick up the changes and include them in their next release.
<ssvb>
orbifx: if you mean it to mount the existing allwinner's blockdevice based setup, then this will probably never happen
<ssvb>
orbifx: but if I understand it correctly, you only want u-boot in nand?
<plaes>
yea, he does
<ssvb>
this should already work with some experimental branches
<ssvb>
and somebody could just try to document it in a clean way
<plaes>
yeah.. I tried to do it, but then some ubifs patches were added on top of the initial patches, so I didn't get it to work
<ssvb>
orbifx: moving u-boot from the sd card to nand should be relatively painless and require no changes on your sata hard drive
<orbifx>
ssvb: yes only uboot
<ssvb>
plaes: the old state before the ubifs patches were added could be preserved and documented as a 'known working' configuration for the time being
<plaes>
btw, did you see that CAN patches hit the list.. :)
<plaes>
yesterday I was looking at
<plaes>
..at the forks of the sunxi-can repos that I managed to restore from old mail postage and found a fork-of-the-fork that had WiP stuff in there
<plaes>
apparently one guy was already working on rev5 of the can patchset
<Wizzup>
Hm... I don't think the miniusb/otg port works yet with 4.3-rc1: http://sprunge.us/CVPJ
<Wizzup>
[ 2.538671] musb-sunxi 1c13000.usb: Invalid or missing 'dr_mode' property
swiftgeek has quit [Ping timeout: 255 seconds]
<ssvb>
Wizzup: does your dts file have the usb otg bits?
<Wizzup>
Well, this is 4.3-rc1, which has the support merged -- sun4i-a10-olinuxino-lime
<Wizzup>
Which includes sun4i-a10.dtsi, and that seems to have musb and usb otg references
<Wizzup>
fwiw I didn't enable USB_MUSB_DUAL_ROLE
<Wizzup>
but USB_MUSB_HOST is set
<Wizzup>
The error I pasted seems to happen if of_usb_get_dr_mode(np) (line 620 in drivers/usb/musb/sunxi.c) returns something that is not recognized
<Wizzup>
Which seems odd, since USB_MUSB_HOST is enabled, so likely USB_DR_MODE_HOST is not returned by said function
<Wizzup>
Again, it may just be misconfiguration somehow. But I haven't been able to find a particular known good config / set of instructions
<Wizzup>
Hm... It seems the dts file has dr_mode hardcoded to OTG
<wens>
vishnup: see the prcm section of the manual
philectro has joined #linux-sunxi
<Wizzup>
Ok, I guess the only option is to tell the driver to fall back to using no dma, since no dma option is avail
<Wizzup>
I was a bit confused because dma support was merged, but not yet hooked up to the driver I guess
<Wizzup>
(to the musb driver)
<wens>
Wizzup: the musb driver does not support dma on sunxi yet
<Wizzup>
I just found out
<wens>
well there's no way you could merge dma support for a platform specific device driver if you can't test it, so the dmaengine driver comes first, then the peripherals
<Wizzup>
wens: correct, not complaining, just got confused
<wens>
hopefully it won't be too hard to add
<Wizzup>
wens: stupid question, but I'm struggling with musb, how can I set it to function in host mode when the config is set to dual role
<Wizzup>
Presumably somewhere in /sys, but I'm having trouble finding the right entry
<Wizzup>
Ended up at an article for the omap 3 series some time ago, when I tried to get musb to work on my n900 with 4.1.0, but never managed...
<ssvb>
Wizzup: does the hardware even support dual role?
<ssvb>
Wizzup: on some boards the VBUS pin is unconditionally powered and the ID pin could be missing
<Wizzup>
ssvb: I think it should? (Olimex A10 LIME) Mostly because the dts file sets the dr_mode to otg and the only way to get it to work in the kernel is by setting the dual role mode to on
<mripard>
Wizzup: which should probably be fixed
<Wizzup>
regardless, I don't think I see any power coming from the otg port atm
<mripard>
you never know what board you run your kernel on when you compile it
<mripard>
or at least, there's a good chance you don't know.
<Wizzup>
Yeah - in my case I do, but correct, that
<Wizzup>
's an issue
<Wizzup>
But I think the conclusion that the hw should support dual role, because the dts states "otg" is correct?
<mripard>
yep
<Wizzup>
As I stated previously, I don't actually care about gadgets, I just want to get the usb port to operate in host mode. But at least now it shows up in lsusb
<mripard>
if you look at the usb_phy node, you'll see that it even has an ID pin and a VBUS detect one
<Wizzup>
The most 'useful' page on musb seems to be this: http://processors.wiki.ti.com/index.php/Usbgeneralpage#musb_driver_debugfs -- seems to suggest using 'testmode' to set it to hostmode / full speed / high speed, but when I then look at dmesg, it states the sunxi musb doesn't support testmode :)
<ssvb>
Wizzup: you can try to change the dts file to force it into a host mode
<ssvb>
Wizzup: what kind of the OTG cable are you using?
<Wizzup>
ssvb: I will try that if I cannot figure out how to do it from sys
<Wizzup>
ssvb: wrt cable: hang on
<ssvb>
Wizzup: it might be the one, which is not shorting the ID pin, so that nobody knows that you want it to switch OTG into host mode
<Wizzup>
ssvb: hmm, perhaps. I have used it succesfully on my n900, but I guess the n900 does some dirty tricks and no detection
<ssvb>
Wizzup: doesn't n900 have a micro usb connector?
<Wizzup>
I think you may be right, my cable is a generic miniusb to usb cable, with a female <-> female usb plug (that I think is marketed as otg thing), and then a usb stick attached
<Wizzup>
ssvb: it does, and the n900 officially doesn't support hostmode, but they managed to make it work, so I guess my experience there does not count
<ssvb>
Wizzup: I don't quite understand if the ID pin is really routed outside or just pulled up
<ssvb>
Wizzup: USB0-IDDET
<Wizzup>
Hm..
<ssvb>
Wizzup: you can add debugging prints in u-boot code around http://git.denx.de/?p=u-boot.git;a=blob;f=drivers/usb/musb-new/sunxi.c;h=a146c0861fffd5145cc3de314c37e909b20f6cff;hb=efde6a579fe3c172d214fb3047b02c827779738a#l211
<ssvb>
Wizzup: or just look at U-Boot messages when booting with this cable connected and check if there is anything abnormal
<Wizzup>
Ok, will do that
<Wizzup>
I wonder if I also have a guaranteed to work 'real' otg cable somewhere...
avph has quit [Ping timeout: 265 seconds]
avph has joined #linux-sunxi
<orbifx>
"houston we got a succesful boot"
<orbifx>
plaes: went with the sd-card + sata approach, installed archlinux-arm
<Wizzup>
ssvb: working on it, right now building the new u-boot, I had an older one
<Wizzup>
so I guess I can take a stab at the cable
arossdotme-planb has joined #linux-sunxi
arossdotme has quit [Ping timeout: 256 seconds]
<Wizzup>
ssvb: thanks for the help. I will get a proper otg cable later today (probably better use of my time than hacking a cable now), meanwhile I am testing setting dr_mode="host" in the lime dts
<Wizzup>
(plus the proper setting in the kernel)
<Wizzup>
If you want I can follow up on the u-boot change you made, and possible mail them somewhere stating that I tested this and that it seems to work
<ssvb>
Wizzup: in fact, I have fetched my a10 lime board from a drawer and also a bunch of 3 mini usb otg cables to run some tests with them
<Wizzup>
:-)
<ssvb>
Wizzup: turns out that only one of these 3 cables has the id pin shorted to the ground :-)
<Wizzup>
Interesting...
<Wizzup>
I set dr_mode to "host" in the lime dts, changed the kernel to assume host only, but I then get the old error: musb-sunxi 1c13000.usb: Invalid or missing 'dr_mode' property
<ssvb>
Wizzup: well, in fact I also have a fourth cable (with a proper mini-A plug), but it does not fit in the a10 lime "wrong" usb otg connector :-)
<ssvb>
wens: that's interesting, I'm also interested in checking this e-mail
<ssvb>
wens: any idea how to find it?
<Wizzup>
ssvb: did you manage to get otg to work? I am asking because in the linked cable picture, the wiki page states that with only one of those cables you can get otg to work with the a10 lime
<Wizzup>
er, provides host*
<ssvb>
Wizzup: with the first cable, I got U-Boot detecting a USB stick
<ssvb>
Wizzup: and "id_det=0" in the log
<Wizzup>
and the second one doesn't work because it doesn't fit, right?
<ssvb>
yes
<ssvb>
I know that it is a standard compliant OTG cable, so it should have the ID pin grounded (that was the whole idea of introducing the Mini-AB receptacle, which is mechanically different)
<Wizzup>
Yeah. My cable is Mini-B <-> USB Type A Male. Then I have a Female Type A <-> Female Type A, and afterwards some random usb stick (storage device)
<Wizzup>
so I guess I need to mod the mini-b part to short the id pin
<Wizzup>
Which I tried, because I have a few of these cables, but the pins were not as reachable as I had hoped
<ssvb>
Wizzup: I will probably submit a patch to U-boot, enabling USB OTG for the a10-lime and the cubietruck
<Wizzup>
cool, I also have a a20-lime2 here
<wens>
ssvb: i don't have the link, just remember something like that
<Wizzup>
if you want I can also try it with that
<Wizzup>
and perhaps even a a20-lime ... somewhere
<Wizzup>
s/with that/with those/
<ssvb>
Wizzup: and I should also mention that if I patch the U-Boot code to "see" the id pin as 0, then all of these cables work as USB host :-)
<Wizzup>
ssvb: but they only work like that in u-boot - right
<ssvb>
yes, but it's exactly the same story for the kernel
<Wizzup>
ok, I will have to test this now. I just tried modifying the lime dts for linux, removing the entire id-det line, but now usb simply doesn't work at all
<Wizzup>
right
<ssvb>
Wizzup: I will try to compile the kernel for a10-lime later today and check how it works with usb otg using these cables
vishnup has quit [Remote host closed the connection]
<Wizzup>
ssvb: okay, I will take a break then, been at it for quite a while
<ssvb>
wens: ok thanks, I just could not find anything relevant doing simple searches in the mailing list archive
<ssvb>
wens: I guess, it's easier to send a patch, mention the problem and hope that Hans explains his plan about dealing with it :-)
avph has quit [Ping timeout: 265 seconds]
avph has joined #linux-sunxi
hotwings has left #linux-sunxi [#linux-sunxi]
<Wizzup>
ssvb: ok, I changed the id det pin to be the same as the vbus det pin
<Wizzup>
now it works
<Wizzup>
at least, power is sent over the line
<ssvb>
:-)
<Wizzup>
not sure if it being enumerated yet
<Wizzup>
if it is*
avph has quit [Ping timeout: 246 seconds]
avph has joined #linux-sunxi
<Wizzup>
yeah, seems to be only providing power
<Wizzup>
ok - taking a break now
premoboss has joined #linux-sunxi
<ssvb>
Wizzup: btw, why do you need to use USB OTG in the first place? Are two USB host ports in A10-Lime not enough for you?
<Wizzup>
ssvb: it's a specific use case, we're creating a case of the A20 LIME2, and it's very hard to fit in a usb hub, and we'd prefer to use one normal usb port and hte otg port (because of its placement)
<Wizzup>
simply hacking something together is not particularly feasible since I'd have to do it quite a few times then
<Wizzup>
a case for the a20 lime 2 (but same design as a10 lime)
<Wizzup>
*
viccuad has joined #linux-sunxi
pmattern has quit [Quit: Genug für heute.]
Igorpec3 has joined #linux-sunxi
lynxis has quit [Ping timeout: 240 seconds]
lynxis has joined #linux-sunxi
<plaes>
is there a way to change & reload part of device tree?
<mnr>
plaes: For the time being not that I know of. Kernel upstream is working on an overlay/quirks mechanism, though.
<plaes>
I'm getting "ASoC: no sink widget found for Headphone Jack"
<plaes>
though audio works
viccuad has joined #linux-sunxi
florian has joined #linux-sunxi
<Wizzup>
ssvb: mixed up A and B?
<ssvb>
Wizzup: ?
<Wizzup>
I was wondering why you said: I stand corrected
<Wizzup>
Page looks good :)
florian has quit [Ping timeout: 268 seconds]
<ssvb>
Wizzup: unlike Cubietruck (which I initially used for testing), Lime has a universal Mini-AB receptacle
<Wizzup>
Ah, right
<Wizzup>
Ok
<ssvb>
this makes it usable with 2 cables out of 4
<Wizzup>
right, but you still need to short the mini-B
<Wizzup>
I just shorted one of my mini-A cables
Igorpec3 has joined #linux-sunxi
<ssvb>
Wizzup: shouldn't the mini-A cables be already shorted? that's exactly the difference between mini-A and mini-B
<ssvb>
Wizzup: well, and the shape of the plug is a bit different too, but I'm talking about the differences on the electrical side
Netlynx has quit [Quit: Leaving]
<Wizzup>
ssvb: perhaps I am confusing A and B. but the ones I have are not shorted. I used a multimeter to verify
Ntemis has joined #linux-sunxi
<ssvb>
Wizzup: it's interesting that searching for mini-a cables on ebay returns a lot of results with mini-b cables (based on looking at the pictures)
<Wizzup>
It's not easy to spot the differences initially :)
BorgCuba has quit [Quit: leaving]
<JohnDoe_71Rus>
programmers day! Thank you
<Wizzup>
ssvb: right, I should have said: one of my mini-B cables
<ssvb>
Wizzup: that's cool, does it work?
avph has quit [Ping timeout: 244 seconds]
<Wizzup>
cannot test it atm :< had to move to the local hackerspace (proper tools), but didn't bring my lime
avph has joined #linux-sunxi
<Wizzup>
will test it tonight or tomorrow at latest
mnr has quit [Quit: leaving]
afaerber__ has joined #linux-sunxi
afaerber_ has quit [Ping timeout: 256 seconds]
teamacc has joined #linux-sunxi
<teamacc>
Hello everyone, i'm looking for some buying advice on a torrent/nzb/nas device
<teamacc>
i was looking at some a20 devices, which are capable of having a native sata port
<teamacc>
ive seen that the banana pi can go up to 470mbit/s on its network port, so i assume a similar performance will be reached among other a20 devices
<teamacc>
however, nzb/torrents will require a lot of cpu power, so i've also been looking at the h3 quadcore devices
<teamacc>
so my idea was to have an a20 device connected to a hdd and share that over ethernet using nfs
<teamacc>
would that give me significantly better performance compared to just hooking it up to the usb of an h3 board?
ZbooNet has quit [Read error: Connection reset by peer]
ZbooNet has joined #linux-sunxi
<Wizzup>
ssvb: Interesting that most mini usb cables on ebay are type b
nashpa has quit [Quit: Going away]
JohnDoe6 has joined #linux-sunxi
xypron has joined #linux-sunxi
Ntemis has quit [Read error: Connection reset by peer]
JohnDoe_71Rus has quit [Ping timeout: 255 seconds]
Igorpec3 has quit [Ping timeout: 264 seconds]
teamacc has quit [Quit: Page closed]
swiftgeek has joined #linux-sunxi
premoboss has quit [Read error: No route to host]
avph has quit [Ping timeout: 244 seconds]
avph has joined #linux-sunxi
mibofra has joined #linux-sunxi
avph has quit [Ping timeout: 250 seconds]
<mibofra>
hi guys, does someone get the 3D acceleration work on the powervr on the a80 ?
<mibofra>
*just for curiosity
avph has joined #linux-sunxi
<mibofra>
on the cc-a80 kernel repo there is the source for the modules and co: https://github.com/cubieboard/CC-A80-kernel-source/tree/master/modules/rogue_km , they're compiled an the configuration it's ok, but: ""gbm: failed to open any driver (search paths /usr/lib/arm-linux-gnueabihf/dri:${ORIGIN}/dri:/usr/lib/dri)", seems mesa gbm does not see the pvr_dri (arm-linux-gnueabihf/dri/pvr_dri.so) library
<mibofra>
just to know if someone has tried to get it working
avph has quit [Ping timeout: 268 seconds]
avph has joined #linux-sunxi
mibofra has quit [Read error: Connection reset by peer]