<luoyi>
the current sunxi i2s BCLCDIV and MCLCDIV algorithm looks like differ from the A20 user manual .
<luoyi>
but it hears OK for me . does this algorithm comes from A13's user manual ?
vagrantc has quit [Quit: leaving]
p1u3sch1 has quit [Ping timeout: 260 seconds]
p1u3sch1_ has joined #linux-sunxi
luoyi_ has joined #linux-sunxi
luoyi has quit [Ping timeout: 250 seconds]
luoyi_ has quit [Ping timeout: 250 seconds]
cnxsoft1 has joined #linux-sunxi
cnxsoft has quit [Ping timeout: 240 seconds]
cnxsoft1 is now known as cnxsoft
IgorPec111114 has joined #linux-sunxi
IgorPec111115 has joined #linux-sunxi
IgorPec111114 has quit [Read error: Connection reset by peer]
IgorPec111116 has joined #linux-sunxi
IgorPec111115 has quit [Ping timeout: 276 seconds]
Gerwin_J has joined #linux-sunxi
IgorPec has joined #linux-sunxi
IgorPec111116 has quit [Ping timeout: 276 seconds]
cnxsoft has quit [Remote host closed the connection]
cnxsoft1 has joined #linux-sunxi
cnxsoft1 is now known as cnxsoft
p1u3sch1_ has quit [Ping timeout: 246 seconds]
tkaiser has joined #linux-sunxi
fredy has quit [Excess Flood]
IgorPec has quit [Ping timeout: 260 seconds]
p1u3sch1 has joined #linux-sunxi
fredy has joined #linux-sunxi
<tkaiser>
willmore: In case you're talking about BSP kernel you could use /sys/devices/virtual/thermal/cooling_device0/cur_state on H3 devices to control a fan
<plaes>
ssvb: how big is your SPI flash chip?
cnxsoft has quit [Quit: cnxsoft]
cnxsoft has joined #linux-sunxi
<ssvb>
plaes: this one is 16MB (128Mbit), just because I wanted to be able to also experiment with the kernel+initrd loading from it
<phiplii>
willmore : depending on the fan, it might be worth considering in most cases, try to isolate the fan power supply from the board. Fans are very electrically noisy - especially when stopping / starting.
Mr__Anderson has quit [Ping timeout: 250 seconds]
<phiplii>
willmore : best thing to do would be to use a completely independent supply and switch the fan on and off with a transistor / mosfet switched through an optoisolator
<phiplii>
willmore : if you're going for variable speed - pick your fan carefully. Most computer fans don't like PWM and you'll need some kind of constant current circuit or filter out the PWM.
<KotCzarny>
phiplii: or just good design for convection cooling
<phiplii>
KotCzarny : easier, smaller... less expensive...
<phiplii>
... but less fun :)
<phiplii>
I have an automatic temperature controlled fan in my conservatory that basically does what he needs
<phiplii>
because we have a recovering pigeon in there
<phiplii>
and it would get too warm otherwise
Amit_t_ has joined #linux-sunxi
<KotCzarny>
:)
<KotCzarny>
my a20/h3 boards run fanless, just vertically mounted
<wens>
natural up-draft?
<phiplii>
The heatsinks I ordered for my H3s are too small (I ordered them before I had the boards in a rush)
<phiplii>
I have some more on the way (for now I've just wound the clockspeed back a bit on the OPi PCs)
<phiplii>
But I've ordered a couple of very small computer fans as well to play. I was just going to leave them running though. If they're not stop/starting I can probably run them off the GPIO with only a bit of smoothing, without causing a brownout!
<KotCzarny>
opi pc survives 1.3ghz happily with the proper voltage
<phiplii>
I've had one on 24x7 for a few months and it seems to be coping
<phiplii>
not doing much, but it was the test for it.
<phiplii>
tkaiser : willmore: I get '0' from cooling_device0. I've been using /sys/devices/virtual/thermal/thermal_tone0/temp
Branson2k has joined #linux-sunxi
<phiplii>
not typing with my fists, that is actually : /sys/devices/virtual/thermal/thermal_zone0/temp
tkaiser has joined #linux-sunxi
Amit_t_ has quit [Ping timeout: 250 seconds]
<tkaiser>
phiplii: If /sys/devices/virtual/thermal/cooling_device0/cur_state shows 0 then your device is operated in a condition defined by cooler_table entry 0. In other words: No overheating currently
<tkaiser>
cur_state reflects the cooler_table entries. So if more heat dissipation is needed (and throttling occurs as defined by cooler_table) then this value increases.
<tkaiser>
And in cooler_table only the first 2 entries are of interest since the latter 2 define behaviour with big.LITTLE (like A80). Eg which cluster to choose in which thermal state
<phiplii>
tkaiser : that makes sense - thought we were looking at deg C
<tkaiser>
You're looking at another sysfs node I'm not talking about. Correct
<phiplii>
removes the need for most of the control logic
<phiplii>
uses what is already there
<phiplii>
Is there any / much smoothing in the value? If you have active cooling, are you likely to end up in a cycle between 0 and 1 every time the fan kicks in?
<tkaiser>
phiplii: But if in doubt always use a good heatsink first. Fan only with no heatsink is no good idea since it's less efficient (made some experiments with H3 and A64 a while ago). So a fan in addition to heatsink is ok but then you could also just use a thermal treshold
<tkaiser>
phiplii: There is no smoothing so you better average values to base fan control on
<phiplii>
add some hysteresis - run the fan for 2 minutes after the initial trigger
<phiplii>
but anyway
<phiplii>
I'm not actually building this
<tkaiser>
phiplii: If you use a BSP kernel and a Debian based distro you can easily install RPi-Monitor to get a clue. In Armbian simply by 'sudo armbianmonitor -r'
<phiplii>
just getting carried away in design :S
Amit_t_ has joined #linux-sunxi
<phiplii>
tkaiser : Ta - I'm loading up armbianmonitor now. Might make a brew while it downloads...
Mr__Anderson has joined #linux-sunxi
Amit_t_ has quit [Ping timeout: 250 seconds]
<phiplii>
ah, so this is where everyone generates those load / temperature / frequency etc plots
<KotCzarny>
not everyone, mostly tkaiser
<KotCzarny>
;)
<phiplii>
but, by prevalence on the forum/website, on average everyone :p
scream has joined #linux-sunxi
<KotCzarny>
tkaiser is prevalent on armbian forums :P
<phiplii>
:)
apritzel has joined #linux-sunxi
Mr__Anderson has quit [Ping timeout: 260 seconds]
<tkaiser>
One of RPi-Monitor's advantages is that you can configure data collection to be least invasive (lightweight). I tried other monitoring solutions out and they manipulate system behaviour (constantly running at the highest clockspeed just to collect *and* graph data. RPi-Monitor graphs with JavaScript in the client's browser)
IgorPec has joined #linux-sunxi
IgorPec has quit [Write error: Connection reset by peer]
<phiplii>
yeah
<phiplii>
on some of these machines even htop takes a couple of %
<phiplii>
quite a nice interface
<phiplii>
I wonder how re-usable it is for providing a web interface for other logging work
<tkaiser>
phiplii: I'm interested currently in further tuning dvfs/THS settings for some H3 devices. And then it gets really ugly if your monitoring solution prevents testing out different scenarios.
<tkaiser>
phiplii: It's endlessly extendable. Just look at the RPi-Monitor homepage. Xavier Berger provides a lot of examples
<phiplii>
I started reading the github page, but got distracted when it was up and running
<phiplii>
I'll go back and read through
<phiplii>
might be useful for work with a bank of 16 thermocouples...
<phiplii>
tkaiser : by the way, I loaded up the thermal settings you sent me last night - I just loaded up the board and with some underclocking visible the SOC temperature seemed to be balancing in the low 80s
IgorPec has joined #linux-sunxi
<phiplii>
I didn't run it for too long though because I don't have a heatsink on that board yet
<phiplii>
No cores dropped out though.
<tkaiser>
phiplii: Igor dropped me a note that Steven/Xunlong is sending out an OPi Lite to me to test with. So I'm able to do some further testing on my own with just 1.1V/1.3V available without heatsink. I also want to provide a 'self tuning' script in Armbian that creates an optimized dvfs table (device specific using Linpack to detect undervoltage). But this will take some time
<phiplii>
Based on their normal delivery times (assuming they weren't selling before they had stock)
<phiplii>
I should have a Lite early this week
<phiplii>
Shout if it is any use to test on another machine
<tkaiser>
phiplii: Shouldn't matter whether One or Lite, the type of voltage regulator is important. And the One I tested with that is now in Zador's hands shows broken thermal readouts (way too high)
<tkaiser>
phiplii: Yes, I will do. Maybe preparing a customized Armbian image for testing through this stuff (dvfs table and optimised THS settings)
<tkaiser>
Now time to enjoy the sun. afk from now :)
<luoyi>
and the current code have some ugly trick to work around with the mod1 clock bug. so it can be used with the mainline kernel.
avph has quit [Ping timeout: 260 seconds]
<Amit_t_>
has cpuburn-a7 tested on H3 based board , I tried to run it from u-boot but got the crash , http://paste.ubuntu.com/16600236/
avph has joined #linux-sunxi
<wens>
luoyi: mod1 clock bug?
<wens>
you mean the missing flag?
<wens>
would have been better if you separated all your changes into different commits after the original file
<wens>
or just base the repo on the wip branch you picked the file from
<luoyi>
wens: yes, without the parent flag, we can't get pll2 set
<luoyi>
I just modify one file. not many
<luoyi>
I ioremap the ccu memory address, and writel the pll2 value myself.
<luoyi>
if the parent flag get set, we don't need to do this
ikmaak has quit [Ping timeout: 260 seconds]
<wens>
"1. fix stop&start pop noise."?
Branson2k has joined #linux-sunxi
<KotCzarny>
well, pop is audible for normal audio card too
cnxsoft has quit [Quit: cnxsoft]
IgorPec has quit [Ping timeout: 260 seconds]
Amit_t_ has quit [Ping timeout: 250 seconds]
<ssvb>
Amit_T: yes, of course, cpuburn-a7 runs fine from linux
<ssvb>
Amit_T: if you want to run it from U-Boot, then you need to find a way how to parallelize in on all CPU cores without using linux-specific syscalls :-)
jernej has quit [Ping timeout: 252 seconds]
Amit_t_ has joined #linux-sunxi
apritzel has quit [Ping timeout: 244 seconds]
nove has joined #linux-sunxi
juri_ has quit [Ping timeout: 244 seconds]
juri_ has joined #linux-sunxi
avph has quit [Ping timeout: 260 seconds]
avph has joined #linux-sunxi
<Amit_t_>
ssvb: Thanks, u-boot code runs only on one core, right ?
<Amit_t_>
ssvb: Also, PMIC support you're talking about is for u-boot ?
<luoyi>
wens: and I also want to know your sunxi kernel compile device or envrionment. I've tried to compile the kernel the bpi m1+, but it still doesn't finish after 5 hours.
<wens>
luoyi: you could use your repo just fine, what i meant is that you could split out what fixes you did into separate commits, so the people that will actually submit the driver for inclusion can also pick up your fixes
<ssvb>
Amit_T: that was for A64 and AXP803 PMIC
<wens>
without doing a manual diff
<wens>
luoyi: so like, commit 1: initial import of sun4i-dai.c from xxx wip repo
<wens>
luoyi: commit 2: add standalone makefile and license
<wens>
luoyi: commit 3 ~ n : fixes
<luoyi>
wens: I got it. I'll try to create a new repo for it. very thanks for your patient.
<wens>
make the fixes easily accessible :)
<Amit_t_>
ssvb: Yeah, I tried it for A64 but it seems to be difficult to program PMIC from u-boot due to A64 exception level where RSB can only be programmed from EL3 (and u-boot runs in el2).
jernej has joined #linux-sunxi
<Amit_t_>
ssvb: I think I see your point, cpuburn-a7 runs on the core other than cpu0 , right ?
<ssvb>
Amit_T: it runs on all CPU cores, because it's the best way to heat the SoC :-)
<ssvb>
but you can still run it on a single core too
<ssvb>
just remove the syscalls from the beginning
<Amit_t_>
ok
Mr__Anderson has quit [Quit: Leaving.]
Mr__Anderson has joined #linux-sunxi
<Amit_t_>
ssvb: BTW, is it useful to have THS driver in u-boot ?
Nyuutwo has quit [Ping timeout: 240 seconds]
<ssvb>
Amit_T: maybe not
Nyuutwo has joined #linux-sunxi
<MoeIcenowy>
is it possible to develop a driver rsb-dev like i2c-dev or spi-dev ?
<wens>
luoyi: would be even better if you could split out the pll2 hack and the debug printf stuff
<wens>
MoeIcenowy: i don't see why not, but you'd have to develop a userspace program that uses it as well
<apritzel>
MoeIcenowy: what do you want to do? Play around with the PMIC?
<luoyi>
wens: do I need to revert the git repo ?
<apritzel>
MoeIcenowy: I wrote something like devmem2-on-speed yesterday, where I can send commands via RSB to the PMIC from the Linux command line
<apritzel>
MoeIcenowy: ./peekpoke -b 0x1f03400 w 0x2e 0x8b w 0x10 0x20 w 0x00 0x80 r 0x1c
<apritzel>
(this reads register 0x20 from the PMIC)
<wens>
luoyi: if you know how, you could always reset and re-commit various parts
<wens>
playing around with the PMIC sounds like a bad idea :p
<apritzel>
wens: that's why it's a hacker tool, I ran it from a BSP kernel to dump the PMIC configuration
<apritzel>
and (apart from devmem2 being broken for 64-bit) I couldn't do this with devmem2 reliably on a BSP kernel because someone (arisc?) was reading the PMIC periodically (battery level register, I think)
luoyi has quit []
<apritzel>
wens: btw: that' how I learned that the BSP code disables PD14 (function 7 instead of 4), apparently it's pulled up, so leaving it floating from the SoC is fine
<wens>
:)
Gerwin_J has quit [Quit: Gerwin_J]
<apritzel>
wens: also this GPIO1 output is _not_ driven to 2.5 Volts as the schematics hints, but left floating on the PMIC side
<wens>
gpio1? you lost me
<apritzel>
wens: the schematics shows _two_ connections between the PMIC and the PHY: "DC1_SW to GMAC_3V" (sic!) and "GPIO1-LDO to VDD25"
<apritzel>
so that is GPIO1 on the PMIC
<apritzel>
register 0x92 and 0x93
<wens>
apritzel: i'm not sure we have the same schematics
vagrantc has joined #linux-sunxi
<wens>
oh, i see it
<apritzel>
so I was programming it to 2.5V, but it didn't help, also the BSP kernel leaves it disabled
<wens>
the whole ethernet page is a mess
<apritzel>
wens: +1
<vagrantc>
any suggestions on a kernel tree fairly close to mainline supporting cubietruck plus (a83t) with usb, mmc and ideally ethernet?
<apritzel>
wens: it's apparently from Allwinner, showing _all_ possible options with different PHY models
<wens>
apritzel: they are using rgmii with 3.3v, not 2.5v
<wens>
that's my guess anyway
<wens>
VCC-PD is driven from DCDC1, which is 3.3v
<wens>
if it were 2.5v, it would be a different source
<apritzel>
wens: yeah, I was confused by that already
<apritzel>
also there is another regulator in the schematics, creating 2.5V from 3.3V
<apritzel>
but that also seems to be an option
<wens>
yup, optional
<wens>
it's seen on the cubietruck (a20)
<wens>
on the newer boards, they just use an ldo from the pmic to do 2.5V
<jelle>
tlol
jernej has quit [Ping timeout: 276 seconds]
<MoeIcenowy>
apritzel: yes I want...
<MoeIcenowy>
I did it on Atom systems with AXP288 but no usable driver
<jrg>
ok so i'm a bit new to the embedded structure of getting things to work. i guess there was a place that explained how to get the microsd slot to detect when booting from emmc but i don't quite understand it. apparently i have to update a .fex file on the boot partition
<jrg>
but i don't quite understand how you get it to register with the bananapi after editing it
<jrg>
root@bpi:/mnt/boot/bananapi/bpi-m3/linux# ls
<jrg>
that is the forum... someone named eternalwalker had a solution but i don't quite understand what he did to get it working
iamfrankenstein has joined #linux-sunxi
<KotCzarny>
jrg: he only wanted to make sd cards removable
<KotCzarny>
Change sdc_detmode from 3 to 1
<KotCzarny>
so basically he boots without sd card, then inserts it later
<jrg>
oh :/
<jrg>
thought that was an easy fix to try to get it to boot from emmc while having an SD inserted to be mounted later
<jrg>
guess i'll go back to trying to figure out how to do it. there isn't much information about it though. right now i'm about to just use the emmc as swap or something and boot from the microsd
<jrg>
i'd love to just boot from the emmc and use the SD as storage but have no idea how to get that working
<KotCzarny>
jrg: just boot kernel from sd card and you can use emmc as rootfs then
<KotCzarny>
if you have same uboot and kernel on both emmc and sd card you will get sys on emmc with sd card system
<jrg>
yah. seems like that's what i'll have to do if i can't figure it out. i've had SDs die on me before tho
<KotCzarny>
anyway, nite nite
<jrg>
i'm trying to think of an easy way to do that... maybe write the img then rm the 2nd partition?
<KotCzarny>
um, what?
<jrg>
i don't understand how i would ge the same uboot and kernel onto both
<KotCzarny>
dd ?
<jrg>
can't dd to the sd if it can't see the sd after boot
<KotCzarny>
use pc?
<KotCzarny>
or usb adapter?
<jrg>
the otg connection will show the emmc as a drive?
<KotCzarny>
btw. his fix makes sd card visible after emmc boot
<KotCzarny>
i think that's what he meant
<jrg>
the one in the forum
<jrg>
yah but i am not familiar with the embedded systems
<KotCzarny>
treat it as regular linux
<jrg>
wouldn't his fix require building a new kernel then dd it to the mmcblk0p1?
<KotCzarny>
he talks about fex
<KotCzarny>
unless bananas m3 do it different
<KotCzarny>
otherwise fex and kernel are in /boot somewhere
<jrg>
i edited the fex file
<KotCzarny>
after editing fex you have to 'compile' it
<jrg>
ok so i have to git the tree ... then edit that .fex... then build it all?
<jrg>
then dd it to the emmc?
<KotCzarny>
mkimage -C none -A arm -T script -d boot.cmd boot.scr
<KotCzarny>
erm
<KotCzarny>
wrong line, moment
<KotCzarny>
sunxi-fexc -I fex -O bin script.fex script.bin
<KotCzarny>
this one
<jrg>
hm
<jrg>
i would do that to config_sys.fex ?
<KotCzarny>
hmm
<KotCzarny>
do you have .bin file somewhere in / or /boot ?
<KotCzarny>
The manufacturer uses an u-boot.2011-something version without support for script.bin
<KotCzarny>
:/
<jrg>
yes
<jrg>
script.bin
<jrg>
oh
<jrg>
then why is script.bin in the /boot dir and in the boot partition (mmcblk0p1) ?