ChanServ changed the topic of #linux-sunxi to: Allwinner/sunxi development - Did you try looking at our wiki? https://linux-sunxi.org - Don't ask to ask. Just ask and wait for an answer! - This channel is logged at https://oftc.irclog.whitequark.org/linux-sunxi
montjoie_ has joined #linux-sunxi
montjoie has quit [Ping timeout: 480 seconds]
fraolt_ has joined #linux-sunxi
fraolt has quit [Ping timeout: 480 seconds]
youmukonpaku133 has quit [Read error: Connection reset by peer]
youmukonpaku133 has joined #linux-sunxi
youmukonpaku133 has quit [Ping timeout: 480 seconds]
youmukonpaku133 has joined #linux-sunxi
youmukonpaku133 has quit [Read error: Connection reset by peer]
youmukonpaku133 has joined #linux-sunxi
hexdump0815 has joined #linux-sunxi
hexdump01 has quit [Ping timeout: 480 seconds]
youmukonpaku133 has quit [Ping timeout: 480 seconds]
hexdump01 has joined #linux-sunxi
hexdump0815 has quit [Ping timeout: 480 seconds]
junari_ has joined #linux-sunxi
JohnDoe_71Rus has joined #linux-sunxi
junari has joined #linux-sunxi
junari_ has quit [Ping timeout: 480 seconds]
warpme has joined #linux-sunxi
warpme has quit []
warpme has joined #linux-sunxi
warpme has quit []
warpme has joined #linux-sunxi
warpme has quit []
warpme has joined #linux-sunxi
warpme has quit []
warpme has joined #linux-sunxi
warpme has quit []
warpme has joined #linux-sunxi
warpme has quit []
warpme has joined #linux-sunxi
warpme has quit []
warpme has joined #linux-sunxi
warpme has quit []
warpme has joined #linux-sunxi
warpme has quit []
warpme has joined #linux-sunxi
warpme has quit []
warpme has joined #linux-sunxi
warpme has quit []
warpme has joined #linux-sunxi
warpme has quit []
warpme has joined #linux-sunxi
warpme has quit []
warpme has joined #linux-sunxi
warpme has quit []
warpme has joined #linux-sunxi
warpme has quit []
warpme has joined #linux-sunxi
warpme has quit []
warpme has joined #linux-sunxi
warpme has quit []
warpme has joined #linux-sunxi
warpme has quit []
warpme has joined #linux-sunxi
warpme has quit []
warpme has joined #linux-sunxi
warpme has quit []
warpme has joined #linux-sunxi
warpme has quit []
kuba2k2 has joined #linux-sunxi
warpme has joined #linux-sunxi
warpme has quit []
warpme has joined #linux-sunxi
warpme has quit []
warpme has joined #linux-sunxi
warpme has quit []
warpme has joined #linux-sunxi
warpme has quit []
warpme has joined #linux-sunxi
warpme has quit []
warpme has joined #linux-sunxi
warpme has quit []
warpme has joined #linux-sunxi
junari has quit [Ping timeout: 480 seconds]
warpme has quit []
warpme has joined #linux-sunxi
warpme has quit []
warpme has joined #linux-sunxi
warpme has quit []
JohnDoe_71Rus has quit []
apritzel has joined #linux-sunxi
youmukonpaku133 has joined #linux-sunxi
youmukonpaku133 has quit [Read error: Connection reset by peer]
youmukonpaku133 has joined #linux-sunxi
youmukonpaku133 has quit [Read error: Connection reset by peer]
youmukonpaku133 has joined #linux-sunxi
kuba2k2 has quit [Ping timeout: 480 seconds]
youmukonpaku133 has quit [Ping timeout: 480 seconds]
youmukonpaku133 has joined #linux-sunxi
<youmukonpaku133> apritzel: alright so i got a uboot with a basic dtb, now i just boot it through FEL and see what happens?
<youmukonpaku133> YEAAAAA
<youmukonpaku133> uboot starts
<youmukonpaku133> apritzel: now what
<youmukonpaku133> keep adding stuff to dt?
warpme has joined #linux-sunxi
kuba2k2 has joined #linux-sunxi
JohnDoe_71Rus has joined #linux-sunxi
youmukonpaku133 has quit [Remote host closed the connection]
youmukonpaku133 has joined #linux-sunxi
<apritzel> yes, start with the SD card (mmc0) and eMMC (mmc2). The latter is probably easier
apritzel has quit [Ping timeout: 480 seconds]
<Jookia> youmukonpaku133: congrats on the u-boot start :)
warpme has quit []
warpme has joined #linux-sunxi
youmukonpaku133 has quit [Read error: Connection reset by peer]
youmukonpaku133 has joined #linux-sunxi
warpme has quit []
apritzel has joined #linux-sunxi
gsz has joined #linux-sunxi
apritzel has quit [Ping timeout: 480 seconds]
macromorgan has quit [Quit: Leaving]
kuba2k2 has quit [Ping timeout: 480 seconds]
apritzel has joined #linux-sunxi
kuba2k2 has joined #linux-sunxi
youmukonpaku133 has quit [Read error: Connection reset by peer]
youmukonpaku133 has joined #linux-sunxi
macromorgan has joined #linux-sunxi
warpme has joined #linux-sunxi
<youmukonpaku133> apritzel: what do i do to know if something in DT works or doesn't
warpme has quit []
warpme has joined #linux-sunxi
<youmukonpaku133> apritzel: ?
<Jookia> youmukonpaku133: have you tried testing it
<Jookia> like the functionality
<youmukonpaku133> i only have uboot atm
<youmukonpaku133> and i have absolutely 0 idea how to use uboot shell xD
youmukonpaku133 has quit [Read error: Connection reset by peer]
youmukonpaku133 has joined #linux-sunxi
warpme has quit []
<Jookia> that's ok, nobody does
<Jookia> did you build u-boot from source?
JohnDoe_71Rus has quit []
kuba2k2 has quit [Ping timeout: 480 seconds]
youmukonpaku133 has quit [Read error: Connection reset by peer]
youmukonpaku133 has joined #linux-sunxi
<youmukonpaku133> Jookia: yes i built uboot from source
<Jookia> nice!
<Jookia> which device is this?
<Jookia> your next step is probably to try and boot linux
youmukonpaku133 has quit [Read error: Connection reset by peer]
vagrantc has joined #linux-sunxi
youmukonpaku133 has joined #linux-sunxi
<youmukonpaku133> the device i have is a pocketbook 616
<youmukonpaku133> Jookia
<youmukonpaku133> hmm yeah i suppose that could be a start
<youmukonpaku133> if i want to boot an alpine rootfs will i have to recompress it into cpio?
<youmukonpaku133> *repack
<Jookia> do you mean rootfs or initramfs
<youmukonpaku133> i want to boot into an alpine rootfs
<Jookia> it shouldn't matter either way. the job of u-boot is to load the kernel zImage, an initramfs (optional), and device tree
<youmukonpaku133> from what ive heard in the tux845 discord initramfs isnt important
<youmukonpaku133> as long as you define root=
<youmukonpaku133> id like to boot alpine in ramdisk so that i can check stuff and flash emmc from there
<Jookia> if your kernel has the appropriate filesystem and block device drivers built in then yes you can just use root=
<Jookia> you need to put the rootfs somewhere
gsz has quit [Quit: leaving]
kuba2k2 has joined #linux-sunxi
<youmukonpaku133> yeah problem is
<youmukonpaku133> Jookia: i only can boot off ram atm
<Jookia> you probably want to add support for the storage then in u-boot
warpme has joined #linux-sunxi
youmukonpaku133 has quit [Ping timeout: 480 seconds]
vagrantc has quit [Quit: leaving]
warpme has quit []
hexdump01 has quit []
hexdump0815 has joined #linux-sunxi
youmukonpaku133 has joined #linux-sunxi
<youmukonpaku133> Jookia: id prefer to boot alpine in ram then flash off that, much more useful
<Jookia> you need an initramfs then :)
<youmukonpaku133> alr how can i make one
<apritzel> find ./ | cpio --create -H newc > output.cpio
<apritzel> then gzip that
<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> arch/arm/boot/dts/allwinner/sun5i-a13-pocketbook-touch-lux-3.dts
<apritzel> in a Linux tree
<youmukonpaku133> thanks
<apritzel> or arch/arm/dts/sun5i-a13-pocketbook-touch-lux-3.dts in U-Boot, should be the same thing
<youmukonpaku133> alr
<youmukonpaku133> i already have uboot cloned so ill check that
<apritzel> but yeah, you are getting there, the source should make things more clearer
<youmukonpaku133> oh i see
<youmukonpaku133> this looks a little saner
<apritzel> just a few more "oh I see" now ... ;-)
<youmukonpaku133> hmm since i suppose sd doesn't need to always be enabled i can probably omit regulator-always-on
<youmukonpaku133> alright so i suppose i only need to define voltage and name?
<youmukonpaku133> unless a rampup is needed
<apritzel> yeah, I don't think you need a rampup
<apritzel> and in case you wonder: phandle properties are inserted by the dtc compiler, they don't appear in the source
<apritzel> instead you use labels (followed by a colon), and reference them by prefixing an ampersand
<youmukonpaku133> alright so something like this looks good? https://pastebin.com/BbQ1jUPt
<apritzel> yes
<youmukonpaku133> cool
<apritzel> that's part one, now for the mmc0 node
<youmukonpaku133> as for mmc2...
<youmukonpaku133> wait
<youmukonpaku133> oh
<youmukonpaku133> true
<youmukonpaku133> hmm im thinking
<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 = <&reg_3v3_mmc0>; for vmmc-supply= <&reg_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?
<youmukonpaku133> huh
<youmukonpaku133> this might be a bad cable
<youmukonpaku133> brb