ChanServ changed the topic of #linux-sunxi to: Allwinner/sunxi development - Did you try looking at our wiki? https://linux-sunxi.org - Don't ask to ask. Just ask and wait for an answer! - This channel is logged at https://oftc.irclog.whitequark.org/linux-sunxi
apritzel has quit [Ping timeout: 480 seconds]
<MoeIcenowy> smaeul: I think most features work, but the code is just tooooooooooooooooooo dirty to merge
Mangy_Dog has quit [Ping timeout: 480 seconds]
<MoeIcenowy> smaeul: BTW do you know about SDM in Allwinner CCUs?
<smaeul> MoeIcenowy: there is some documentation in the D1 manual (section 3.2.4.8)
<smaeul> I've only used it to do fractional dividers for audio, not spread spectrum
<smaeul> though ironically as soon as they document the first pattern register, they add a second, undocumented pattern register
<MoeIcenowy> smaeul: well I am dealing with R329
<MoeIcenowy> which has a strange PLL-AUDIO0 that is the parent of DRAM clock
<MoeIcenowy> well I found the clock frequency in BSP kernel source
<MoeIcenowy> it's 1548288kHz
<MoeIcenowy> and it leads to strange DDR3-1548 ;-)
<smaeul> oh, that will be fun to share the PLL with the codec
<smaeul> wow, the SoC has only 4 PLLs
<smaeul> MoeIcenowy: what frequency is the DRAM supposed to be running at?
vagrantc has quit [Quit: leaving]
<MoeIcenowy> smaeul: well BSP runs at 744MHz
<MoeIcenowy> which is just the PLL satisfies
<MoeIcenowy> 774 *
apritzel has joined #linux-sunxi
<MoeIcenowy> some good news for DRAM hacking people: R329 DRAM controller is just nearly the same with V831
cmeerw has joined #linux-sunxi
apritzel has quit [Ping timeout: 480 seconds]
cmeerw has quit [Ping timeout: 480 seconds]
apritzel has joined #linux-sunxi
apritzel has quit [Ping timeout: 480 seconds]
apritzel has joined #linux-sunxi
tnovotny has joined #linux-sunxi
gamiee has joined #linux-sunxi
warpme_ has joined #linux-sunxi
<warpme_> guys: i'm trying to get working wifi on Eachlink-h6-Mini. Has anybody working it with mainline? If no - is there somewhere factory android DT for this box?
<apritzel> warpme_: ah, I have a DT ready for mainline, just didn't manage yet to do the final test and post
<warpme_> oh qll. so where it is :-p
<apritzel> and Wifi was the one thing I didn't test
<apritzel> warpme_: /src/linux/arch/arm64/boot/dts/allwinner/sun50i-h6-eachlink-h6-mini.dts ;-)
<warpme_> apritzel: re wifi: how you determine pwrseq & int i/o lines for wifi hardware in this box? Initially was trying to find android dt from this box - but not able to find....
<apritzel> I found some, but it's not very reliable, I think this was one of them where it contained conflicting information (like the same GPIO assigned to different devices)
lampra has joined #linux-sunxi
lampra has quit []
<warpme_> apritzel: thx. I tried and for wifi i'm receiving "mmc1: error -22 whilst initialising MMC card" (the same like with mine DT). I suspect something with gpio used in pwrseq?
Mangy_Dog has joined #linux-sunxi
<libv> meh, git-repo on debian is a mess
<libv> debian has a package for it
<libv> but repo installs a fresh copy of itself in the local tree, and then uses that to do the work
<libv> the debian default python major version is 2
<libv> and the debian packaged git repo depends on that
<libv> the newer, locally installed version of repo, requires version 3
<libv> as in, throws an exception if it is not version 3
<libv> so you have to fix the alternatives to point the default python to python-3
<libv> but then you cannot reinitialize a fresh repo, for which you use the systems git-repo, which then gets the newest git-repo, which then throws an exception
<libv> and when you've done this dance, you apparently need to invoke "lunch" to build the D1 sdk
<libv> so apt-get install python-lunch...
<libv> which depends on... you guessed it
<jakllsch> repo?
<jakllsch> or python
<libv> python-2
<plaes> you're using too new Debian :)
<jakllsch> hah
<libv> ironically, the exception in the new repo, is a print() warning about an older unsupported python version
<libv> some python-3 version, but still
<libv> i'm going to play somewhere else now, maybe i will get back to this howto writing in future, but definitely not today
<rellla> libv: thanks for that work, i managed to get the repos. but https://github.com/linux-sunxi/d1-sdk-manifest/blob/master/tina-d1-open.xml had to be patched with smaeul's patch to match the url and paths
<rellla> just for info :)
<libv> rellla: yeah, i probably should push the manifest changes
<libv> mnemoc and turl fixed our long expired ssl cert
<libv> and we can now use https://dl.
<rellla> yes, worked with https
<libv> pushed
jernej has quit [Ping timeout: 480 seconds]
<libv> and thanks to the person who downloaded the SDK and handed it to me :)
pg12_ has quit [Ping timeout: 480 seconds]
pg12_ has joined #linux-sunxi
choozy has joined #linux-sunxi
tuxd3v has quit [Remote host closed the connection]
<rellla> apritzel: does the eachlink run stable with your setup? last time i tried (with libreelec) i had issues with hdmi and lan iirc...
<apritzel> rellla: If I don't mix this up with another box, then HDMI needs some extra nudge (for instance on the kernel cmd line), because the hot plug detection doesn't work
<apritzel> rellla: and LAN doesn't work with mainline anyway, until we get AC200 support
<apritzel> as for "stable": I don't really know, I didn't do much testing, I guess I should compile some kernels over night
<apritzel> but at least it worked with my boot testing
<rellla> for ac200 i guess i can borrow the necessary bits from libreelec patches
<warpme_> rellla: apritzel: just fyi: it is possible do get fairly well working eachlink - except wifi and bt. Indeed - ac200 is a must when we want to have eth working - but once you add jernej's ac200 bits - box works well (btw: it quickly overheats as it has very poor thermal design. fortunately dvfs makes it slowdown instead of hanging)
<rellla> warpme_: is there any uboot support upstream?
<apritzel> and I figured the power supply on the USB3 port is abysmal, the moment I connect a SATA SSD via a USB3 adapter the box hangs
<warpme_> i think yes. i'm using it with sunxi custodians u-boot
<apritzel> rellla: U-Boot support was the next step once the DT is accepted in mainline Linux
<apritzel> (I mean I have it working here, there is not really much to it anyway)
<apritzel> no, that's some ancient tree, before proper DRAM support
<apritzel> it's really more like the DT and some bog standard defconfig these days
<warpme_> apritzel: you mentioned some inconsistency you found about wifi gpio on eachlink (iirc). was that from multiple inconsistent android DT or from....?
<apritzel> inconsistencies within the very same Android DT ;-)
<rellla> apritzel: ok, so i should just check for the dts and defconfig
<warpme_> apritzel: so i suspect you can develop 2 or more different hypothesis about how hw wiring looks like. Maybe it is worth to test all of those hypothesis?
<apritzel> warpme_: from my experience the best is to check the actual live Android system: dump the pinctrl registers, also check /sys/kernel/debug/gpios
<warpme_> apritzel: for sure. do you reacall - has is this box working RxD without any additional pull-up required? (iirc TxD requires HW mod due missing pull-up on board)
<apritzel> warpme_: that depends, there seem to be at least two different revisions out there
<warpme_> ehh - looks like i need to open this crappy box again :-(
<apritzel> rellla: the defconfig is very similar to tanix_tx6_defconfig, but I have USB added (not sure why this isn't enabled on the Tanix)
jernej has joined #linux-sunxi
megi has quit [Quit: WeeChat 3.2]
megi has joined #linux-sunxi
gnarface has quit [Remote host closed the connection]
gnarface has joined #linux-sunxi
hlauer has joined #linux-sunxi
hlauer has quit []
hlauer has joined #linux-sunxi
tnovotny has quit []
<warpme_> ehh: it looks like on mine eachlink box, RxD needs to be added with missing pull-up (or pass-through). I connected uart, see prompt on terminal but it seems to not receive anything from terminal....
<apritzel> warpme_: then you got a v1.2?
<warpme_> probably. (can't verify as need to remove heatsink i "integrate" with box case).
<warpme_> apritzel: hmm - it looks we are missing pwrseq gpio as after booting android and then linux i started to see wifi trying to operate:
<warpme_> [ 5.215356] brcmfmac mmc1:0001:1: Falling back to sysfs fallback for: brcm/brcmfmac43455-sdio.eachlink,h6mini.txt
<warpme_> [ 5.215325] brcmfmac mmc1:0001:1: Direct firmware load for brcm/brcmfmac43455-sdio.eachlink,h6mini.txt failed with error -2
<warpme_> [ 12.473544] loop: module loaded
<apritzel> warpme_: sure, could well be, as I said: I didn't test WiFi, and don't remember where I got this GPIO from
<warpme_> so maybe we can query all gpio now (when wifi chip receives power ok ) and after cold boot (no power.) delta will tell us pwrseq gpio box uses?
<apritzel> yes, you can try to read /sys/kernel/debug/gpios, if that is available from Android
<apritzel> otherwise use peekpoke or a busybox devmem to dump the pinctrl registers
<apritzel> I figured dumping pinctrl is the best method, as this speaks truth
<warpme_> no no - i was thinking about linux. I have currently booted 5.13 mainline with working wifi (i mean wlan0 is present)
<apritzel> I understand, but you won't see much from the kernel, as it doesn't know about the GPIOs
<apritzel> you can still dump the GPIOs, and compare with a cold boot
<apritzel> still dump the pinctrl registers, I mean
<jernej> MoeIcenowy: You are probably the only DRAM hacking person with R329 :)
<jernej> apritzel: I simply forgot on USB3 on tanix - I don't use USB in U-Boot so I didn't pay attention
<apritzel> jernej: yeah, I figured ;-)
<apritzel> jernej: you ignoring USB and HDMI in U-Boot is legendary :-D
<jernej> apritzel: well, I didn't ignore HDMI in the past, after all I wrote HDMI support for H3, H5 and A64...
<apritzel> jernej: yeah, I know, just wanted to tease you ;-)
<jernej> apritzel: does DRAM driver work fine on Eachlink H6 mini now?
<apritzel> jernej: as you mentioned the other day that you don't really care about HDMI, and you seem to use U-Boot quite differently from me
<apritzel> jernej: it seems like, yes. At least I didn't see the problems that I had in the past
<jernej> oh, good
<apritzel> but this is still with a somewhat reduced frequency
<apritzel> so there might be some issues lurking in the shadows still, but for now it's good enough
<jernej> I use U-Boot in two ways - stripped down for quick boot in LE or net booting kernel (with rootfs on SD card)
<jernej> for development purposes
<apritzel> I understand, and it makes sense for your use case
<apritzel> I think of U-Boot more of a UEFI provider
cmeerw has joined #linux-sunxi
<warpme_> apritzel: fyi: about wifi in your eachlink dt: wifi INT is ok as i can connect. So it look only powrseq gpio is wrong (for my box)
<warpme_> jernej: apritzel: may you hint me how to quickly read h6 gpio registers under mainline linux?
<jernej> warpme_: if you have access to (serial) terminal on your Eachlink Android, you can dump /sys/firmware/fdt which is binary DT file currently in use
<jernej> you mean via memory or sysfs?
<warpme_> jernej: re android dt: no. hw ver. i have has missing components on rxd line :-(
<jernej> maybe you can install some terminal emulator and acccess it there
<warpme_> so there is no way with linux and i.e. peekpoke to read some registers?
<mnemoc> libv: dl also forces https now
<mnemoc> and the cert should auto-renew
<warpme_> (suspect gpio isn't memory mapped i/o so tools like peekpoke will not work?)
<jernej> sure it is
<jernej> just take a look at datasheet which address to read
<jernej> I mean user manual
<apritzel> warpme_: it's just not straight-forward ;-)
<apritzel> I guess instead of typing this in here for the fifth time I will dump it in the wiki some day ...
<apritzel> warpme_: start dumping the word at 0x300b000 (portA), then add 0x24 to skip to the next port
<apritzel> this would be PA_CFG0, so you should the next three words as well (to cover all 32 possible pins)
hlauer has quit [Remote host closed the connection]
Nemo_bis_ has joined #linux-sunxi
Nemo_bis has quit [Read error: Connection reset by peer]
ftg has joined #linux-sunxi
choozy has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
<libv> mnemoc: yeah, noticed that the manifest was not happy, thanks heaps
<warpme_> apritzel: probably i missed something:
<apritzel> warpme_: yeah, as I hinted above, there is more to it ....
<apritzel> first this is only PA and PB
<apritzel> the interesting parts start at PortC
<apritzel> 0x24, 0x28, 0x2c, 0x30
<apritzel> then add 0x24 for PortD, and so on
<apritzel> my money is on PortG
<apritzel> argh, sorry (you know, not straightforward, and stuff ;-) : it's 0x48++ for portC, 0x6C++ for portD, ...
jakllsch has quit [Quit: Reconnecting]
jakllsch has joined #linux-sunxi
jakllsch has quit []
jakllsch has joined #linux-sunxi
jakllsch has quit []
jakllsch has joined #linux-sunxi
jakllsch has quit []
jakllsch has joined #linux-sunxi
<warpme_> just to be sure:
<apritzel> yes, compare the H6 manual, 3.21 Port Controller
<apritzel> there does not seem to be a PortI, also PortA and PortB are internal
<apritzel> "7" means not configured, 0 is GPIO input, 1 is GPIO output
choozy has joined #linux-sunxi
hlauer has joined #linux-sunxi
choozy has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
cmeerw has quit [Ping timeout: 480 seconds]
warpme_ has quit [Quit: Connection closed for inactivity]
hlauer has quit [Ping timeout: 480 seconds]
Luke-Jr has quit [Ping timeout: 480 seconds]
Luke-Jr has joined #linux-sunxi