<KotCzarny>
willmore: i've hooked physical switch on the power cable to save the connector and jack, my issue was that when i was testing uboot via fel mode, when resetting board via 'reset' command in uboot it didnt accept next fel uboot
<beeble>
KotCzarny: i meant to introduce an additional fdt value.
tsuggs has quit [Ping timeout: 245 seconds]
<igraltist>
on armbian orangepi-pc the pulseaudio often lose the audiodevice
<KotCzarny>
beeble: but that still requires user action, right?
<KotCzarny>
igraltist: then uninstall pa-from-hell and just use alsa
<igraltist>
i think is to old
<igraltist>
version 5
<igraltist>
i need it vor later use
<igraltist>
i try if the cpu power enough to be a remote browsing station
<beeble>
KotCzarny: i was assuming you would have a specific dts per device. if you want to have a single uboot (seems a nice idea but usually doesn't work that well) you would need a detection command
<KotCzarny>
beeble: yes, that's what i meant/wanted
<KotCzarny>
but as i've found, its not that easy to do, since there is no config/model name to be found on clean boot
<beeble>
KotCzarny: i would still go with a dedicated command and a boot.cmd script. seems easier to rebase since it's not likely something that would be merged mainline
<KotCzarny>
so far i've did opipc as a default, and add per-serial# exceptions, and for a limited number of boxes (<20) its feasible and works nicely
<KotCzarny>
beeble: i haven't modified uboot yet, only done it via standard uboot scripting
Putti has joined #linux-sunxi
<KotCzarny>
it would be much easier if vendor simply selected one sid longword to put vendor_id+model_id there
jernej has joined #linux-sunxi
tsuggs has joined #linux-sunxi
MXfive has quit [Quit: Sleep Quit.]
DullTube has joined #linux-sunxi
lemonzest has joined #linux-sunxi
<KotCzarny>
would be nice if people added more sid values to the wiki, bigger data, better guessing algo
<MoeIcenowy>
apritzel: are you interested in reading all of your Jide Remix Mini's eFUSE?
<apritzel>
MoeIcenowy: sure, can do, though I believe some parts (if not all?) are restricted from non-secure world
<apritzel>
that's why Allwinner has some callback in ATF to read the SID
<MoeIcenowy>
ah-oh...
<apritzel>
and I don't believe that you can actually change the SID by writing to it
<MoeIcenowy>
I read out a lot of 0 on my H3 within /dev/mem
<apritzel>
you may change the current readout, but it should be reset after reboot ?
<MoeIcenowy>
no
<MoeIcenowy>
the readout cannot even be changed
<apritzel>
OK, then I misread something above ...
<MoeIcenowy>
I think the real chipid 0x0 readout on H3 is 0x02c00081
<MoeIcenowy>
however
IgorPec has quit [Ping timeout: 260 seconds]
<MoeIcenowy>
when something is not initialized
<MoeIcenowy>
the value is not read out
<MoeIcenowy>
and a random 0x02004620 is stored there
<MoeIcenowy>
maybe on other chips there's also double readout ;-)
<apritzel>
well, apparently you _can_ write the SID by applying a special voltage to a specific pin on the SoC and following some write sequence
<apritzel>
though on most boards this pin in tied to GND
<MoeIcenowy>
the special voltage is needed?
<MoeIcenowy>
the SID interface give me a sense that there's a poor "bridge"
<MoeIcenowy>
I write controll command to a register
<MoeIcenowy>
wait the work to be done
Worf has quit [Quit: Konversation terminated!]
<MoeIcenowy>
and retrieve the value from another register
<apritzel>
VDD-EFUSE: it's supposed to be 3.0V
<MoeIcenowy>
oh...
<MoeIcenowy>
not noticed this
<apritzel>
wasn't it connected on the OrangePi-One?
<apritzel>
I mean -Zero ...
<MoeIcenowy>
I will check it
<MoeIcenowy>
yes got this pin
<MoeIcenowy>
the schematics says that it's connected to "VCC3V3-EFUSE"
<MoeIcenowy>
and it's connected to VCC-IO
<apritzel>
yeah, so I remembered right ;-)
<MoeIcenowy>
but maybe it's not the write voltage...
<apritzel>
technically VCC-IO is 3.3V and not 3.0V, but that hopefully doesn't matter
<MoeIcenowy>
maybe it's just the voltage to power the efuse part of the SoC
<MoeIcenowy>
and some internal thing can provide the write voltage
<MoeIcenowy>
(I do not know well about electronics
<apritzel>
mmh, there is VDDBP-EFUSE as well...
<MoeIcenowy>
yes this may be the writing voltage ;-)
techping has quit [Ping timeout: 246 seconds]
<apritzel>
it would make sense to make this a separate pin with a special voltage, so a board vendor (or the SoC fab) could initialize the SID on a tester machine
<apritzel>
and it's read-only on a normal board
<KotCzarny>
or they come preinitialised from aw already
<KotCzarny>
because programming every chip by vendors eats time and money
<KotCzarny>
and would require specialized equipment
<apritzel>
KotCzarny: yeah, that's what I meant with "or the SoC fab"
Da_Coynul has joined #linux-sunxi
<MoeIcenowy>
but now here's a problem
<apritzel>
but having a pin leaves the option for a board vendor to program the SID as well
<MoeIcenowy>
what SID first byte should we use?
fkluknav has quit [Ping timeout: 245 seconds]
<MoeIcenowy>
the old readout before the SID controller call
<MoeIcenowy>
or the new readout after calling the SID controller?
<KotCzarny>
MoeIcenowy: we shall investigate further
<MoeIcenowy>
the new readout is, at least, able to differ H3 and H2+
<KotCzarny>
then we can decide
<KotCzarny>
right now we dont know what those values are
<KotCzarny>
and we cane leave them as such before we get a working tool
apritzel has left #linux-sunxi [#linux-sunxi]
<MoeIcenowy>
I think Allwinner themselves considered the new readout as their SID value
<KotCzarny>
nice and cozy segmentation fault. mmm
popolon has joined #linux-sunxi
mzki has joined #linux-sunxi
<igraltist>
is the orangepi setup identical to cubietruck for booting routine on mainline kernel?
<igraltist>
on armbian i see a script.bin but iam not sure how to create them
<KotCzarny>
you should really read wiki about mainline/legacy uboot and kernel
<igraltist>
then its the same
<igraltist>
and no script bin anymore
<plaes>
igraltist: script.bin is legacy kernel specific
<MoeIcenowy>
I compared my one's readout before register readout and after register readout
<MoeIcenowy>
before is : 02004620 74358720 5027048e 3c0000c3 after is : 02c00081 74004620 50358720 3c27048e
<MoeIcenowy>
and after got a OEM word of 0x000000c3
<MoeIcenowy>
so I think without register readout we lost 3 bytes
<MoeIcenowy>
which contains the H3 series chip idenfication byte
<MoeIcenowy>
KotCzarnyL got it?
<MoeIcenowy>
KotCzarny: ^
<KotCzarny>
so you got that 02c00.. via fel twiddling? and without twiddling you get usual 02004620.. ?
<MoeIcenowy>
I think the original design of Allwinner is to get the eFUSE value ready at 0x01c14200 at boot, however, their eFUSE controller has some bugs that makes the things a mess
<MoeIcenowy>
KotCzarny: yes
<MoeIcenowy>
I will try this code on A64
<KotCzarny>
then that code should also go into sunxi-tools
<MoeIcenowy>
It seems that A64 has 0x....4620 in its second byte
<MoeIcenowy>
not in the first
<MoeIcenowy>
maybe it's a bug only in H3
<KotCzarny>
now if you could fireup mainlinux and compare
<MoeIcenowy>
and the BSP did a full readout in u-boot
<KotCzarny>
maybe all of that is just a bug in sunxi-tools
<MoeIcenowy>
but abandoned the read value
<MoeIcenowy>
maybe it's to workaround this bug
<MoeIcenowy>
see arch/arm/cpu/armv7/sun8iw7/efuse.c, which abandoned the return value of sid_read_key
<MoeIcenowy>
(oh I mean silicon bug
<MoeIcenowy>
(not software bug
<KotCzarny>
yes, it's what i based sid.c on
<KotCzarny>
and why i wanted to confirm if it gets same output on mainline
<MoeIcenowy>
yes I proved in A64 the register-based readout is not needed for right value
cnxsoft has quit [Quit: cnxsoft]
<MoeIcenowy>
KotCzarny: could you provide a pastebin item that comes with both the bad value and the right value?
<MoeIcenowy>
I want to send out a email for discussing the mainline policy to it
MXfive has joined #linux-sunxi
lemonzest has quit [Quit: Leaving]
msevwork has quit [Quit: Leaving]
<KotCzarny>
MoeIcenowy: sure, in a moment
<MoeIcenowy>
I will compose the email now
<MoeIcenowy>
when you see it, could you reply it with your data?
<KotCzarny>
i'm not on the list
deskwizard has joined #linux-sunxi
<MoeIcenowy>
ok could you give me you email?
<MoeIcenowy>
I will add you to "To:"
<MoeIcenowy>
I think you should paticipate the discuss
leviathanch has joined #linux-sunxi
<KotCzarny>
hmm
<KotCzarny>
no output from your script
<MoeIcenowy>
the fel version?
<KotCzarny>
yes
<MoeIcenowy>
oh I forgot to say
<MoeIcenowy>
you should start a new bash process with root permission
<KotCzarny>
im running as root
<KotCzarny>
its in vm anyway
<MoeIcenowy>
then use the "." or "source" to execute the script within the bash
<MoeIcenowy>
then use sid_read_key function
<MoeIcenowy>
the parameter is the offset in SID
<KotCzarny>
syntax error
<KotCzarny>
:)
<MoeIcenowy>
?!
<MoeIcenowy>
Ah-oh
<MoeIcenowy>
are you sure you're using bash?
<KotCzarny>
bash 4.3.30
f0xx has quit [Ping timeout: 256 seconds]
<MoeIcenowy>
do not execute with "sh", but "bash"
<KotCzarny>
line 48
<montjoie>
always use only '.', source is a bashisms
<montjoie>
so . is portable:)
<MoeIcenowy>
the script itself is bashism
<KotCzarny>
:)
<MoeIcenowy>
KotCzarny: can you run it now?
<KotCzarny>
told you, syntax error
<MoeIcenowy>
or you can try just add sid_read_key 0x0 after ths script
<MoeIcenowy>
line 48 is a null line...
<KotCzarny>
remove 2
<KotCzarny>
i've added #!/bin/bash and a newline
<KotCzarny>
so line 46 in your version
<MoeIcenowy>
have you passed a parameter to sid_read_key?
<MoeIcenowy>
it needs a number as parameter
<MoeIcenowy>
(Yes I must admit my code is badly documented, no, not documented
<KotCzarny>
usb error -7
<MoeIcenowy>
check your usb connection, reset your board
<KotCzarny>
nope, its fine with sunxi-fel ver
<MoeIcenowy>
oh mysterious
<MoeIcenowy>
maybe just reset the board will work...
<MoeIcenowy>
FEL is easily to trap into some exception mode, which cannot be recovered without reset
<jelle>
does anyone actually have their rootfs loaded with sunxi-fel?
|Jeroen| has quit [Ping timeout: 258 seconds]
<jelle>
as in Linux
<MoeIcenowy>
jelle: me, when debugging with A33 tablet
<jelle>
MoeIcenowy: ahh, I got a bit annoying by switching my sd card all the time (with indeed an A33 tablet ;-) )
<apritzel>
KotCzarny: did you get the SID values via devmem2 on an aarch64 system on the Opi PC2?
<apritzel>
KotCzarny: because I think that devmem2 is broken on 64-bit systems ...
<KotCzarny>
i dont have opi pc2
<KotCzarny>
only a20 and h3 based ones
<apritzel>
KotCzarny: oh, because your Wiki commit speaks of "kc's opipc2" in the comments columns ...
<KotCzarny>
that's opi+2e
<KotCzarny>
:)
<KotCzarny>
opi plus 2e
f0xx has quit [Ping timeout: 264 seconds]
<MoeIcenowy>
apritzel: because he have two opipcs
<ErwinH>
Maybe add an # ;)
<apritzel>
so it should read "2nd opipc" then?
<KotCzarny>
yup
<KotCzarny>
sorry for the confusion, but its in h3 section anyway
<apritzel>
KotCzarny: I get updates via RSS, and there is no section in this diff ;-)
<KotCzarny>
anyway, sid mystery is at least partially solved for h3
<MoeIcenowy>
KotCzarny: is your awdetect.php automatical?
chomwitt has quit [Quit: WeeChat 1.0.1]
<KotCzarny>
if you press refresh it grabs wiki page and scraps data from it
chomwitt has joined #linux-sunxi
<KotCzarny>
i mea n that link on page
<MoeIcenowy>
and it seems that all your on the page is the wrong ones for H3?
<KotCzarny>
thats becaudse ive added (wrongly) one override
<MoeIcenowy>
you dropped the correct ones?
<KotCzarny>
k, removed override. yup
<KotCzarny>
even worse, change first word. but its removed now
cptG has joined #linux-sunxi
<MoeIcenowy>
oh it might be interesting to test H5 ;-)
<apritzel>
you guys could use my peekpoke, you can do stuff like: ./peekpoke -b 0x1c14200 r.l 0x0 r.l 0x4 r.l 0x8 r.l 0xc
<apritzel>
and that works on 64-bit as well
<KotCzarny>
apritzel: aw code does a lot more
<KotCzarny>
and remembering all those defines is pain
<KotCzarny>
with sid.c i just dump all known sid fields
fdcx has joined #linux-sunxi
<MoeIcenowy>
yes H5 is also fixed
<MoeIcenowy>
only H3/H2+ is found to be affected now
<KotCzarny>
MoeIcenowy: if third byte in first word is 0 then its fixed probably
<KotCzarny>
and that's why i was curious about a33
cptG_ has quit [Ping timeout: 260 seconds]
<MoeIcenowy>
but A33 seems not to have a big eFUSE like H3...
<MoeIcenowy>
I think it's still the old SID
<KotCzarny>
maybe we should add more columns in sid page for newer socs, to dump oem value too
buZz has joined #linux-sunxi
buZz is now known as Guest98334
Guest98334 is now known as buZz
<KotCzarny>
otoh, we can probably easily fix those wrong sids, because first word stays the same for h3 and last word is a free oem dump ;)
Christos has joined #linux-sunxi
ErwinH has quit [Remote host closed the connection]
<MoeIcenowy>
KotCzarny: I'm not sure
<MoeIcenowy>
the BSP lists two values for H3
<MoeIcenowy>
0x00 and 0x81
<MoeIcenowy>
although all we seen is 0x81
<KotCzarny>
took the wild guess and put 02c00081 for now
<KotCzarny>
to see if it unmangled them at least for my opipcs
buZz has quit [Ping timeout: 260 seconds]
<KotCzarny>
yup
apritzel has left #linux-sunxi [#linux-sunxi]
tucker has joined #linux-sunxi
<tucker>
I see a discussion about the SID value and that it seems that it's the devmem2 method that actually gives correct values. My http://linux-sunxi.org/HYH-TBH3 gives 2C00081 4620 51900618 A058E187 by devmem2 method (with an orangepi 3.4 image on the SD card)
<KotCzarny>
you shouldnt omit 0's
<KotCzarny>
also, go ahead and add it to the list (with method in notes)
<MoeIcenowy>
tucker: please add 0 to your sid values before the number to make it to have a width of 8
<MoeIcenowy>
so 02C00081 00004620 51900618 A058E187
<KotCzarny>
and i think my other opipc sid dump might be wrong, gotta redo when i have it in my hands
ErwinH has joined #linux-sunxi
buZz has joined #linux-sunxi
buZz is now known as Guest82886
Guest82886 is now known as buZz
ErwinH has quit [Ping timeout: 240 seconds]
<Christos>
apritzel: (or anyone who might know) is there any info on how to use those two repos mentioned before for OPiPC2 and produce a working image? (I'm kinda new.. :-)) )
<MoeIcenowy>
wrote a fixed H3 SID sunxi-fel branch
<KotCzarny>
though i should read it not form sid_rdkey, right?
<KotCzarny>
*from
<MoeIcenowy>
I think both is ok
<KotCzarny>
humm
<MoeIcenowy>
KotCzarny: my zero's sid is fixed
<KotCzarny>
but i'm running it on the legacy kernel
<KotCzarny>
so it was proper value anyway
<jski>
works now when I actually use a gpio pin XD
<jski>
why they not following the same 40pin design :(
<jski>
was hoping it would be a standard
<MoeIcenowy>
as they're not the same SoC.
<MoeIcenowy>
oh your code do not have the lock...
<MoeIcenowy>
and when I try to use the read code in U-Boot, it failed...
<MoeIcenowy>
when trying to write EFUSE_OP_LOCK to SID_PRCTL
<MoeIcenowy>
or I should say it blocked...
<KotCzarny>
it does thje SID_OP_LOCK
<KotCzarny>
in sid_read_key
<KotCzarny>
because that's what aw code had
<MoeIcenowy>
oh I think I met some bugs in gcc
<MoeIcenowy>
the previous time when I met the bug is when testing jernej's hdmi driver
<KotCzarny>
i've used gcc 4.6 i think, from bsp
Amit_T_ has joined #linux-sunxi
<KotCzarny>
yeah, 4.6.3 20120201 linaro
<MoeIcenowy>
my homebrew 4.9 sucks
chomwitt has quit [Ping timeout: 245 seconds]
<MoeIcenowy>
and I tried with linaro 6.1, then ok
lkcl has quit [Ping timeout: 246 seconds]
<KotCzarny>
there is also 'sid_security_mode()' in efuse.c
<KotCzarny>
i wonder what it would change, or what would stop working
<KotCzarny>
and again, there is no EFUSE_OP_LOCK in efuse.c
<MoeIcenowy>
it may be the secure boot feature said by dgp
<KotCzarny>
SID_OP_LOCK is 0xAC
matthias_bgg has quit [Ping timeout: 265 seconds]
<Christos>
hmm.. interesting, no-one knows how to use apritzel's H5 repos..
The_Loko has joined #linux-sunxi
massi has quit [Quit: Leaving]
<libv>
Christos: i tried some rockchip stuff a few weeks ago, it was amazing.
<libv>
the sunxi wiki is a blessing.
<libv>
but not everyone seems to think so, not everyone seems to want users.
<Christos>
I'm interested in the H5 and it looks apritzel has done quite some work there, but need info on how to generate an image out of his repos, interestingly didnt saw much replies from others, so it seems I need to wait for apritzel directly to see the backlog..
Mr__Anderson has quit [Remote host closed the connection]
ErwinH has joined #linux-sunxi
<willmore>
Christos, I'll be intereseted in that status in a little over a week when I get back home from travel.
ErwinH has quit [Ping timeout: 250 seconds]
<[TheLinuxBug]>
libv: I constantly praise linux-sunxi and your guys work, I know that there are people out there taht do greatly appriciate all your guys work ;)
techping has joined #linux-sunxi
enrico__ has quit [Quit: Bye]
chomwitt has joined #linux-sunxi
<willmore>
tkaiser, can you post higher res scans of the NAS board? I'm trying to see how signals are routed.
Pepe has joined #linux-sunxi
techping has quit [Remote host closed the connection]
techping has joined #linux-sunxi
Amit_T_ has quit [Quit: ChatZilla 0.9.93 [Firefox 46.0.1/20160511224619]]
heffer has quit [Ping timeout: 258 seconds]
heffer has joined #linux-sunxi
Ntemis has joined #linux-sunxi
techping has quit [Remote host closed the connection]
techping has joined #linux-sunxi
iamfrankenstein has quit [Read error: Connection reset by peer]
iamfrankenstein has joined #linux-sunxi
terra854 has quit [Quit: Connection closed for inactivity]
apritzel has joined #linux-sunxi
noblock has joined #linux-sunxi
noblock has quit [Client Quit]
noblock has joined #linux-sunxi
<noblock>
One question - Do you know how to install the apritzel's h5 branch on a SD card? I tried: dd if=orangepi_pc2-u-boot-dtb.bin of=/dev/mmc bs=1024c seek=8; And the board don't start anymore...
<KotCzarny>
wrong file?
<noblock>
Do you know the right one?
<KotCzarny>
usually something with spl in name
<noblock>
The makefile don't generate any spl bin with the H5 config - Maybe something is missing.
<KotCzarny>
also, try bs=1024
MXfive has quit [Quit: Sleep Quit.]
<noblock>
OK I will try. Thanks.
<KotCzarny>
also, you can try booting via fel mode
<KotCzarny>
so you dont have to write sd card
<noblock>
Is this a non spl bin with the FEL mode?
<KotCzarny>
and most importantly, do you have uart cable?
<KotCzarny>
ejecting sdcard should trigger fel mode
<KotCzarny>
(assuming there is nothing on nor flash)
<noblock>
To be sure - I've used: make CROSS_COMPILE=aarch64-linux-gnueabihf-; The H5 start using the aarch64 mode - Is this right?
<KotCzarny>
maybe you need ARCH=something too
<noblock>
And the 32 bits mode arm-linux-gnueabihf- ?
<KotCzarny>
you should ask author in which mode this thing should work
<KotCzarny>
or try both
<noblock>
Indeed, an update of the Orange PC 2 page is welcome.
<KotCzarny>
and as i've said, for 32bit mode try adding ARCH=arm
<apritzel>
noblock: unfortunately it's a bit more complicated
<apritzel>
noblock: you have to concatenate spl/sunxi-spl.bin and u-boot.bin
<apritzel>
with the second starting at 32KB after the first
<noblock>
And how to generate the sunxi-spl.bin file?
<apritzel>
it should be in the spl directory?
<noblock>
OK.
<noblock>
Is the aarch64 mode the right one to generate the .bin file?
<apritzel>
yes, for now
<apritzel>
if you enable more SPL features, it grows too big
<apritzel>
that's why you can combine a 32-bit SPL with a 64-bit u-boot.bin
<apritzel>
oh, you have to use u-boot.img, not .bin
<apritzel>
(if you concatenate)
<apritzel>
but the problem is that this still doesn't give you the full glory
<apritzel>
because you miss ARM Trusted Firmware
<apritzel>
FEL booting works fine with this, though
<Christos>
apritzel: can you please give us some info on how to generate the various needed parts of your H5 repos in order to have a bootable SD? or to update the PC2 build sunxi page?
<apritzel>
Christos: yes, when I find some time ...