rellla changed the topic of #linux-sunxi to: Allwinner/sunxi /development discussion - did you try looking at our wiki? https://linux-sunxi.org - Don't ask to ask. Just ask and wait! - https://github.com/linux-sunxi/ - Logs at http://irclog.whitequark.org/linux-sunxi - *only registered users can talk*
dev1990 has quit [Quit: Konversation terminated!]
\\Mr_C\\ has quit [Quit: (Read error: Connection reset by beer)]
The_Loko has quit [Quit: Leaving]
cmeerw has quit [Ping timeout: 260 seconds]
cnxsoft has joined #linux-sunxi
lurchi_ is now known as lurchi__
apritzel has quit [Ping timeout: 240 seconds]
victhor has quit [Ping timeout: 260 seconds]
matthias_bgg has quit [Quit: Leaving]
andy25225 has quit [Ping timeout: 272 seconds]
andy25225 has joined #linux-sunxi
Mangy_Dog has quit [Ping timeout: 260 seconds]
jstein has quit [Quit: quit]
ChriChri_ has joined #linux-sunxi
ChriChri has quit [Ping timeout: 246 seconds]
ChriChri_ is now known as ChriChri
TheSeven has quit [Disconnected by services]
[7] has joined #linux-sunxi
luke-jr has quit [Remote host closed the connection]
luke-jr has joined #linux-sunxi
hlauer has joined #linux-sunxi
ChriChri_ has joined #linux-sunxi
ChriChri has quit [Ping timeout: 240 seconds]
ChriChri_ is now known as ChriChri
chewitt has quit [Ping timeout: 246 seconds]
JohnDoe_71Rus has joined #linux-sunxi
chewitt has joined #linux-sunxi
chewitt has quit [Ping timeout: 246 seconds]
chewitt has joined #linux-sunxi
lurchi_ has joined #linux-sunxi
random_yanek has quit [Read error: No route to host]
random_yanek has joined #linux-sunxi
lurchi__ has quit [Ping timeout: 246 seconds]
_whitelogger has joined #linux-sunxi
cnxsoft1 has joined #linux-sunxi
cnxsoft has quit [Read error: Connection reset by peer]
fl_0 has quit [Ping timeout: 272 seconds]
apritzel has joined #linux-sunxi
fl_0 has joined #linux-sunxi
s_frit has joined #linux-sunxi
s_frit_ has quit [Ping timeout: 246 seconds]
apritzel has quit [Ping timeout: 265 seconds]
fl_0 has quit [Ping timeout: 264 seconds]
fl_0 has joined #linux-sunxi
chewitt has quit [Read error: Connection reset by peer]
chewitt has joined #linux-sunxi
iyzsong- has joined #linux-sunxi
dlan has quit [Remote host closed the connection]
iyzsong has quit [Ping timeout: 256 seconds]
iyzsong- is now known as iyzsong
vagrantc has quit [Quit: leaving]
cmeerw has joined #linux-sunxi
AneoX has joined #linux-sunxi
kaspter has joined #linux-sunxi
JohnDoe_71Rus has quit [Quit: KVIrc KVIrc Aria 5.0.1, revision: 5.0.1+git-7433-0df9f22f2, build type: debug, sources date: 20160102, built on: 2019-12-08 19:19:20 UTC 5.0.1+git-7433-0df9f22f2 http://www.kvirc.net/]
victhor has joined #linux-sunxi
victhor_ has joined #linux-sunxi
victhor has quit [Ping timeout: 240 seconds]
apritzel has joined #linux-sunxi
marble_visions_ has quit [Quit: bye]
marble_visions has joined #linux-sunxi
warpme_ has quit [Quit: Connection closed for inactivity]
atsampson has quit [Quit: leaving]
atsampson has joined #linux-sunxi
victhor_ is now known as victhor
lucascastro has joined #linux-sunxi
lucas_ has joined #linux-sunxi
lucascastro has quit [Ping timeout: 264 seconds]
andy25225 has quit [Ping timeout: 240 seconds]
andy25225 has joined #linux-sunxi
notme has joined #linux-sunxi
notme is now known as Guest92538
\\Mr_C\\ has joined #linux-sunxi
tmlind has quit [Ping timeout: 240 seconds]
JohnDoe_71Rus has joined #linux-sunxi
dev1990 has joined #linux-sunxi
Mangy_Dog has joined #linux-sunxi
tuxillo has quit [Remote host closed the connection]
apritzel has quit [Ping timeout: 256 seconds]
kaspter has quit [Remote host closed the connection]
kaspter has joined #linux-sunxi
ldevulder_ has joined #linux-sunxi
ldevulder has quit [Ping timeout: 246 seconds]
Harrier has quit [Quit: http://quassel-irc.org - Chat comfortably. Anywhere.]
Harrier has joined #linux-sunxi
cnxsoft1 has quit [Quit: cnxsoft1]
netlynx has joined #linux-sunxi
netlynx has joined #linux-sunxi
tuxillo has joined #linux-sunxi
kaspter has quit [Quit: kaspter]
warpme_ has joined #linux-sunxi
gaston1980 has joined #linux-sunxi
apritzel has joined #linux-sunxi
tmlind has joined #linux-sunxi
agates[m] has quit [Quit: Idle for 30+ days]
hpagseddy[m] has quit [Quit: Idle for 30+ days]
AneoX has quit [Ping timeout: 265 seconds]
AneoX has joined #linux-sunxi
gaston1980 has quit [Quit: Konversation terminated!]
tuxd3v has joined #linux-sunxi
apritzel has quit [Ping timeout: 260 seconds]
jbrown has quit [Ping timeout: 272 seconds]
AneoX has quit [Quit: Textual IRC Client: www.textualapp.com]
jbrown has joined #linux-sunxi
gnarface has quit [Quit: Leaving]
hlauer has quit [Ping timeout: 264 seconds]
gnarface has joined #linux-sunxi
StandaSK has joined #linux-sunxi
<anarsoul> jernej: IIRC Icenowy had one and it didn't fit into SPL
<jernej> I know, this one is DM, which means it resides in U-Boot proper
StandaSK has quit [Remote host closed the connection]
apritzel has joined #linux-sunxi
victhor_ has joined #linux-sunxi
victhor has quit [Ping timeout: 264 seconds]
JohnDoe_71Rus has quit [Quit: KVIrc 5.0.1 Aria http://www.kvirc.net/]
gnarface__ has joined #linux-sunxi
gnarface has quit [Ping timeout: 246 seconds]
gnarface__ has left #linux-sunxi [#linux-sunxi]
gnarface has joined #linux-sunxi
lurchi_ is now known as lurchi__
vagrantc has joined #linux-sunxi
netlynx has quit [Quit: Ex-Chat]
hexdump0815 has joined #linux-sunxi
<hexdump0815> apritzel: i did give the gpio register dumping in u-boot a try and was also able to verify the sd card gpio on my x96q box by diffing the gpio state with sd card inserted and out
<hexdump0815> apritzel: but on the tx6s box i did not see any change on the gpio values when changing the card ... the strange thing is: in android the box does recognize if an sd card is inserted
<hexdump0815> apritzel: any idea how else it might recognize it?
<apritzel> hexdump0815: nice, good job
<apritzel> hexdump0815: did you try *all* GPIOs?
hlauer has joined #linux-sunxi
<hexdump0815> apritzel: i did md.l 0x0300b000 128 - does that make sense? in my understanding that should cover all of them, but i might be wrong
<apritzel> hexdump0815: did you configure the pins as "input"
<apritzel> ?
<hexdump0815> apritzel: ok, then i guess my idea of how it works seems to be too simple :) ... how do i configure them as "input"?
<apritzel> every port occupies 0x24 bytes (9 words)
<apritzel> the first four are the function, 4 bits per pin
<apritzel> you typically spot a lot of 7's, which means High-Z
<apritzel> GPIO input is function 0
<hexdump0815> oh - looks i overlooked some of the things you mentioned last time ...
<apritzel> well, a quick diff seemed to already worked, because the pin was already configured as input
<apritzel> it should be safe to replace every 7 with a 0, since HighZ is very similar to GPIO input
<hexdump0815> this is the dump of the pinctrl region: https://pastebin.com/raw/Phexc6zh
<hexdump0815> i see the 777...'s
<apritzel> yeah, PI ends at 0x144, so you just need to dump 0x51 registers
<apritzel> (U-Boot takes everything as hex, even without the 0x prefix)
<apritzel> I would focus on PortG and H first, they have the most usable free pins
<apritzel> page 690 in the H616 manual gives a nice overview of the pins
<hexdump0815> just to understand it right: PI starts at 0x120 then? and 0xfc until there would be PH and 0xd9 to 0xfc PG?
popolon has joined #linux-sunxi
<hexdump0815> this is the x96q case: https://pastebin.com/raw/6jvMCfcb - here 0xc7 flips from 00 with sd to 40 without sd - according to dts it is PF6 - how am i getting this mapped to each other?
<smaeul> 0xc4 is the PF status register, 0x40 is bit 6 => PF6
<smaeul> where PF is (zero-based) port number 5, and 5 * 0x24 + 0x10 => 0xc4
Guest92538 has quit [Remote host closed the connection]
<hexdump0815> smaeul: thanks a lot - now i got it ... and to configure the gpios as input as mentioned above by apritzel i have to set 0xb4-0xc3 to 0 then?
<apritzel> hexdump0815: roughly, but not all pins are implemented
<apritzel> for PF it's only 7, in fact, so just the first word would suffice
<apritzel> PF6 is the 7 in "07222222"
<apritzel> hexdump0815: and be careful with clearing non-7's to 0, as you might mess up something (losing the UART comes to mind)
<hexdump0815> apritzel: so for the PG case i would set 0xd9-0xdf and 0xe2-0xe2 (all the 7 in the PG range) to 00?
<hexdump0815> apritzel: sorry 0xe2-0xe3 i ment
<smaeul> MMIO here is always done with 32-bit words, so you wouldn't set 0xe2 or 0xe3, you do a read-modify-write on 0xe0
vagrantc has quit [Quit: leaving]
<hexdump0815> ok - what would be the corresponding proper u-boot command this example?
<smaeul> mw.l 0300b0e0 0
<smaeul> the reading you already did, and the modifying is done in your head :)
<apritzel> exactly!
<smaeul> though it would be nice if u-boot had a set-bits or clear-bits command
<apritzel> well, it's a bootloader, not a debug monitor ...
<apritzel> we just abuse it as such, since it's available and is comparably easy to get running
<hexdump0815> so it would be: mw.l 0300b0e0 0 + mw.l 0300b0d9 0 + mw.l 0300b0dd 0 for the full PG case here then?
<smaeul> there's already three memory-modify commands (mm, mw, nm), what's the harm in adding two more? ;)
qschulz has quit [Read error: Connection reset by peer]
<smaeul> hexdump0815: you're off by one, it would be d8 and dc
<smaeul> otherwise that's correct
<hexdump0815> smaeul: right - zero start :)
qschulz has joined #linux-sunxi
<apritzel> hexdump0815: you will learn that pretty quickly, since unaligned accesses to device memory will introduce you to the exception handler ;-)
<hexdump0815> apritzel: i think i already ran across that - it will reboot - right? ... btw. nothing in PG, so let me try PH
hlauer has quit [Ping timeout: 256 seconds]
<hexdump0815> so for PH it would be mw.l 0300b0fc 22 + mw.l 0300b100 0 then?
<apritzel> hexdump0815: yes
<hexdump0815> nothing there neither - so lets check PI, which is what is actually in the android dtb ... btw. can it also be that some wait time is needed? i think i saw such a parameter at least in a kernel dts - does it exist also for u-boot?
<apritzel> no wait time for CD GPIO pins
<apritzel> PortL is a special snowflake, it's at 0x7022000
<apritzel> PortI is Ethernet, I doubt they use a pin there
<apritzel> does the Android dtb list a CD pin for the SD card?
<hexdump0815> yes - PI10 i think: cd-gpios = <0x53 0x8 0x10 0x6 0x1 0x3 0xffffffff>;
<apritzel> PI16, you mean (0x10)
<apritzel> yeah, that's the only optional pin on PI
dev1990 has quit [Quit: Konversation terminated!]
<apritzel> (plus the _NULL pins)