TonyStone has quit [Remote host closed the connection]
TonyStone has joined #maemo-leste
joerg has quit [Ping timeout: 240 seconds]
joerg has joined #maemo-leste
xmn has quit [Quit: ZZZzzz…]
pere has quit [Ping timeout: 250 seconds]
mardy has joined #maemo-leste
xmn has joined #maemo-leste
xmn has quit [Quit: ZZZzzz…]
alex1216 has joined #maemo-leste
xes has quit [Quit: WeeChat 3.3]
xes has joined #maemo-leste
alex1216 has quit [Ping timeout: 268 seconds]
_inky has quit [Ping timeout: 250 seconds]
inky has joined #maemo-leste
inky_ has quit [Ping timeout: 250 seconds]
_inky has joined #maemo-leste
<bencoh>
Wizzup: gpio-keys misbehaving in OFF mode might (?) be an invalid pullup configuration issue
<bencoh>
assuming it uses a different pin configuration for sleep modes (some chips do)
<sicelo>
Wizzup: yay @wl1251. you also had made nice writeup really :-)
<bencoh>
Wizzup: see TRM Chapter 7.4.4 Pad Functional Multiplexing, bit OFFPULLUDENABLE
<sicelo>
are we going to handle CVE-2021-39685 in Leste kernels?
<Wizzup>
we'll pull in latest 5.15-stable or so
<Wizzup>
bencoh: hm, could be the same for ssi-protocol then
<Wizzup>
basically what I am seeing is that it wakes up every few seconds (gpio_keys), sends slider press/unpress, and then sleep again for a bit
<bencoh>
Wizzup: can you try devmem 0x480020de 16 ?
<bencoh>
I'd like to compare the result with what I see on fremantle
<bencoh>
(spoiler: on fremantle OFF-related bits are all 0, meaning I was wrong)
<bencoh>
(I get 0x4114 for the records)
<Wizzup>
bencoh: just to check, you have devmem on fremantle?
Pali has joined #maemo-leste
<bencoh>
Wizzup: yeah
<Wizzup>
bencoh: you just compiled it in scratchbox or something
<Wizzup>
?
<bencoh>
I don't think so
<bencoh>
wait, where does it come from ....
<Wizzup>
I need to read some regs for Tony as well, which is why I am asking
<bencoh>
dpkg says not found
<bencoh>
wth
<bencoh>
alright lemme check my sb vm
<bencoh>
aaah, symlink to /bin/busybox :)
<bencoh>
you just need busybox-power
<bencoh>
(I still think you should check 0x480020de on leste btw, just to make sure)
<sicelo>
bencoh: i also got zeros the other day too, but then wondered if it wasn't just what Pali mentioned, that userspace isn't allowed to read them
<sicelo>
in fremantle, that is
<Wizzup>
is it sane to just apt install busybox-power ?
<Wizzup>
s/sane/safe/
<bencoh>
sicelo: no, I get 0x4114; you just need to run it as root
<sicelo>
ah :-)
<bencoh>
sicelo: also, unpowered components may return 0s or bus error, depending on the SoC
<bencoh>
Wizzup: I think so
<sicelo>
well i was doing it with sudo (but not the addresses you're checking. i was checking the ones from tony)
<Pali>
sicelo: if userspace cannot read /dev/mem then process either segfault or open fails with EPERM
<bencoh>
(the n900 schematics are a blessing)
<Wizzup>
ftr
<Wizzup>
# devmem 0x480020de
<Wizzup>
Illegal instruction
<Wizzup>
devmem 0x48004a08
<Wizzup>
0x00000000
<Wizzup>
tmlind: so 0x48004a08 seems to be 0x00000000
<bencoh>
Wizzup: devmem 0x480020de 16
<bencoh>
otherwise it's unaligned :)
<Wizzup>
oh
<Wizzup>
# sleep 5 ; devmem 0x480020de 16
<Wizzup>
0x4114
<bencoh>
Wizzup: on leste or fremantle?
<Wizzup>
fremantle
<Wizzup>
I need to compile devmem on leste still
<bencoh>
ah, I was asking about leste :)
<bencoh>
to compile it? can't you just install it?
<Wizzup>
yeah, ok, but I'm still just being happy that I can do this on fremantle since Tony asked about wrt bandgap
<Wizzup>
bencoh: from where?
<bencoh>
memdump
<bencoh>
I think
<Wizzup>
memdump - utility to dump memory contents to standard output
<bencoh>
hmm, that's not devmem actually, but good enough I guess
<Wizzup>
omg, just running 'memdump' without args causes it to dump memory
<bencoh>
haha
<bencoh>
you can also try memtool if you prefer
<bencoh>
memtool md -w 0x480020de
<Wizzup>
it reads a pretty big region
<Wizzup>
maybe adding +0x4 makes sense?
<Wizzup>
# memtool md -w 0x480020de+0x4
<Wizzup>
480020de: 0114 0104
* bencoh
headscratches
<bencoh>
what's the +0x4 ?
uvos has joined #maemo-leste
<bencoh>
ah, bytes
<Wizzup>
Memory regions can be specified in two different forms: START+SIZE
<bencoh>
so it would be +0x2
<Wizzup>
# memtool md -w 0x480020de+0x2
<bencoh>
looks like it is 0x0114 anyway
<Wizzup>
480020de: 0114
<bencoh>
so different from fremantle
<bencoh>
the missing bit is the WAKEUP_EN flag
<bencoh>
you could try setting it, see if it stays there even after hitting OFF mode, and see if it makes a difference, I guess
<Wizzup>
every time I start to think I understand how this works even a bit I get lost again
<Wizzup>
ok, let me see where to set thatr
<Wizzup>
it looks that in dts it mostly goes in pinctrl
<bencoh>
ah, if you want to do it properly, then yes, it goes in one of the pinmuxes
<bencoh>
the gpio-keys node doesn't refer to any pinctrl yet
<Wizzup>
what is the non-proper way to do it?
<uvos>
just write to the register with rwmem/devmem whatever
<bencoh>
yeah
<Wizzup>
so in omap3-n900.dts gpio_keys refers to &gpio3, &gpio4, &gpio6
<Wizzup>
this pin doesn't fall in any of their regs