<youmukonpaku133>
in the root alpine rootfs ill assume?
<youmukonpaku133>
*of an
<apritzel>
sure
<apritzel>
though I'd try stuff from U-Boot first, that gives you easy low level access to everything
<apritzel>
for instance the "mmc" command
<youmukonpaku133>
alr
<apritzel>
mmc dev 0
<apritzel>
mmc info
<youmukonpaku133>
mmc0 is nand/emmc i suppose?
<apritzel>
depends on your DT, but typically it's SD card
<apritzel>
use "2" for eMMC
<youmukonpaku133>
wouldnt sd need to be activated from ldo4
<youmukonpaku133>
WAIRT
<youmukonpaku133>
*wait
<youmukonpaku133>
i have a horrible idea
<youmukonpaku133>
solder vdd on microusb to a 3.3v source
<youmukonpaku133>
then i wont have to screw with ldo4
<apritzel>
Vbus on a USB connector?
<youmukonpaku133>
thats 5v
<youmukonpaku133>
too much
<youmukonpaku133>
iirc vdd on sd is 3.3v
<youmukonpaku133>
as megi said yesterday
<apritzel>
yeah, so if you want to fry your SD card, then this is the way to go
<youmukonpaku133>
*oh*
<youmukonpaku133>
nvm then lmao
<apritzel>
not sure why you sugeested that?
<youmukonpaku133>
yeah now that i think of it, it is dumb
<apritzel>
you seem to look for the most complicated way to solve things ;-)
<youmukonpaku133>
so i suppose ill just enable sd in DT
<apritzel>
if you stare at the Pocketbook DT, you will see how it enabled the power supply for the SD card
<youmukonpaku133>
you mean FEX?
<youmukonpaku133>
or dt for the pocketbook626
<apritzel>
the DT: as mentioned before, I deny FEX files exist ;-)
<apritzel>
and then you look how the DT handles references to the PMIC's LDO regulators
<youmukonpaku133>
i see
<apritzel>
if you stare at this for a while, it should come to you how this works
<youmukonpaku133>
will check once i finish stripping this usb connector lmao
<apritzel>
look for ldo2 and ldo3 in the existing DT, then you should be able to create a DT node for LDO4 in your DT, accordingly
<youmukonpaku133>
oh ok i see
<youmukonpaku133>
ok done stripping this usb connector
<youmukonpaku133>
lets see now
<apritzel>
take your time in this, it's logical, but not necessarily straightforward
<apritzel>
but once you have understood this principle, it makes working with DTs much easier
<youmukonpaku133>
apritzel: i suppose i should be looking at the regulators section?
kuba2k2 has quit []
<youmukonpaku133>
OH i see
<youmukonpaku133>
on the pb3 DT with ldo3 as an example regulator name is defined (vcc-wifi) (although seems like its not necessary), then voltage in hexadecimal, then i suppose "regulator-soft-start" means it starts after regulator-ramp-delay milliseconds and phandle... probably some kind of handle to access it from linux? idk
<youmukonpaku133>
apritzel: seems like the only things necessary are defining max and min voltage and phandle
<youmukonpaku133>
*oh*
<apritzel>
please don't look at a decompiled DTB, look at the source
<youmukonpaku133>
phandle is a way to reference another node in DT
<youmukonpaku133>
wait
<youmukonpaku133>
wha
<youmukonpaku133>
apritzel: ok where can i grab the source for this lmao
<apritzel>
the eMMC (mmc2) might be easier, I guess there is no extra regulator needed: the power should be hardwired, otherwise the BROM couldn't use it
<youmukonpaku133>
i suppose in my case i swap out vmmc-supply = <®_3v3_mmc0>; for vmmc-supply= <®_ldo4>;
<apritzel>
yes, that's it
<youmukonpaku133>
keep gpio pins the same?
<apritzel>
that's basically also the blueprint for the rest of the DT work: find and set the regulator, then enable the device, and reference that regulator
<youmukonpaku133>
oh
<youmukonpaku133>
so keep stuff like gpio the same?
<youmukonpaku133>
sounds mostly easy
<apritzel>
I cannot answer that
<youmukonpaku133>
oh
<apritzel>
because that depends on your board
<apritzel>
and how it differs
<youmukonpaku133>
i mean if i dont keep them the same worst case is i just cant access em?
<youmukonpaku133>
nothing will get *fried* right
<apritzel>
put you had a decompiled FEX file, didn't you? I saw megi citing from it ...
<youmukonpaku133>
oh true
<apritzel>
IIRC I saw SD detect being PG0 as well?
<youmukonpaku133>
lemme check actually
<youmukonpaku133>
yep tis pg0
<youmukonpaku133>
so should be good
<youmukonpaku133>
now onto mmc2
<youmukonpaku133>
apritzel: the dts for pb626 mentions "&mmc2_4bit_pc_pins" yet it isnt in the file, i assume its included in axp209.dtsi?
<youmukonpaku133>
nevermind it is NOT
<youmukonpaku133>
hm
<youmukonpaku133>
theyre defined in sun5i.dtsi
<youmukonpaku133>
it seems
<youmukonpaku133>
*oh* this makes sense
<youmukonpaku133>
yep i can copy mmc2 completely
<youmukonpaku133>
apritzel: alr brb and i suppose ill move onto keys now? or i2c stuff
<apritzel>
keep in mind that your board probably has an 8-bit connection
<youmukonpaku133>
yep checked fex it does
<apritzel>
I think mmc2 is another SD card on the pb626?
<youmukonpaku133>
so i should use that?
<youmukonpaku133>
yes
<youmukonpaku133>
pb626 has 2 sd cards
<apritzel>
I think most eMMC modes require 8-bit, even, and I don't see why you want to drop 50% of the performance anyway ;-)
<youmukonpaku133>
fair enough
<youmukonpaku133>
ill just change it to 8bit
<youmukonpaku133>
its defined too :p
<youmukonpaku133>
apritzel: should i do i2c now
<apritzel>
that's why I mean you work step by step for each device, there are lot of those small things to consider
<youmukonpaku133>
i see
<apritzel>
have you tested what you have so far?
<youmukonpaku133>
nope
<youmukonpaku133>
will do right now
<youmukonpaku133>
anyway this is actually pretty fun :D
<youmukonpaku133>
oh oops i set "mmc2_8bit_pc_pins" instead of mmc2_8bit_pins
<youmukonpaku133>
thank god compiler threw an error lmao
<youmukonpaku133>
anyway will boot in a sec
<youmukonpaku133>
apritzel: huh i cant boot into fel /my phone doesnt see the device??
<apritzel>
try again, also try to disconnect serial if that doesn't help
<youmukonpaku133>
apritzel: ive tried like 10 times, serial is disconnected
<youmukonpaku133>
what
<youmukonpaku133>
ok so if i try to boot into fel it waits like 20 seconds and then boots into pocketbook ui
<youmukonpaku133>
does it crash and reboot or somethibg
<youmukonpaku133>
huh seems like if i hold for long enough it doesnt happen but still no fel
<youmukonpaku133>
weird
<youmukonpaku133>
wait let me reboot my phone might helo
<youmukonpaku133>
*help
youmukonpaku133 has quit [Read error: Connection reset by peer]
youmukonpaku133 has joined #linux-sunxi
<youmukonpaku133>
btw apritzel do you have issues with OFTC throwing somethig about failing to look up hostname?