Luffitys[m] has joined #sm8250-mainline
<Luffitys[m]> Hi I'm trying to bring up the Xiaomi Mi 10 Pro (cmi, sm8250) but I'm having issues. I tried creating a minimal .dts for it but i only see the MI boot logo for a second, it then flickers green once and reboots again. I have pasted my dts here:
<Luffitys[m]> Maybe someone immediately sees what's wrong with it, but I don't see anything
<ungeskriptet> Luffitys[m]: You need gpio-reserved-ranges
<Luffitys[m]> <ungeskriptet> "Luffitys: You need gpio-reserved..." <- I'm not sure where to find the values for it. I tried to find something in the stock DT but didn't see anything. I also added xbl_aop_mem because it seems to differ but I still don't see more than the flicker before the reboot.... (full message at <https://matrix.org/_matrix/media/v3/download/matrix.org/XmMdCrIxUsvEiKehurWGZpgn>)
<ungeskriptet> Luffitys[m]: To get the values you need to mount debugfs in downstream and cat /sys/kernel/debug/gpio. The missing gpios in that output are most likely your reserved gpios
<ungeskriptet> You could also look into the section of the pinctrl driver where it handles debugfs. The skipped gpios should be somewhere in a for loop
<ungeskriptet> They even put a little comment there
<Luffitys[m]> so <28 4>, <40 4> I guess. Will try thanks
<ungeskriptet> Yeah that should be it
<Luffitys[m]> Hm, I still have the same thing. I saw your work for LMI so I tried to take stuff from it and boot but it doesn't work either. CMI and LMI seem to have the exact same reserved memory spaces and gpio reserved ranges (https://github.com/ungeskriptet/linux/commit/bf1abb29c626b5a1cd6e4b75e05d146a24bc7c25)
<Luffitys[m]> So I kind of suspect that something in my build script is incorrect. Pasted here: https://pastebin.com/sSkMYKSB
<Luffitys[m]> So I kind of suspect that something in my build script is incorrect. Pasted here: https://pastebin.com/sSkMYKSB
<Luffitys[m]> * Hm, I still have the same thing. I saw your work for LMI so I tried to take stuff from it and boot but it doesn't work either. CMI and LMI seem to have the exact same reserved memory spaces and gpio reserved ranges (https://github.com/ungeskriptet/linux/commit/bf1abb29c626b5a1cd6e4b75e05d146a24bc7c25)
<Luffitys[m]> And here is the device tree as of now: https://pastebin.com/k7MTHnH2
<ungeskriptet> whar
<ungeskriptet> Why is lineageos there?
<ungeskriptet> Are you doing downstream?
<Luffitys[m]> mkbootimg acts up without it set as build env
<Luffitys[m]> but im a rom maintainer so my clang is there
<ungeskriptet> If you have arch linux you can just install android-tools and use mkbootimg from there
<ungeskriptet> This is the commend I use
<ungeskriptet> The header version might be different for you
<ungeskriptet> If it's a version other than two you need to append the dtb to the end of the kernel image with cat
<Luffitys[m]> 2 should be correct. LineageOS builds my ROM/Kernel with header version 2
<ungeskriptet> Also make sure you're erasing the dtbo partition
<Luffitys[m]> yeah i write a 32MB file to it which is just 0's
<ungeskriptet> fastboot erase dtbo would also work
<ungeskriptet> gki_defconfig might not have all necessary configs enabled
<ungeskriptet> Use this with defconfig
<ungeskriptet> make [options] defconfig sm8250.config
<Luffitys[m]> Aye now I saw the dmesg for a split second then it rebooted me into fastboot
<Luffitys[m]> Need to see if I can find someone real quick that can record slowmos haha
<Luffitys[m]> Tried 3 times. I dont really see why it force reboots into fastboot directly after. i only have like 5 frames at 60fps recording so it reboots basically instantly
<ungeskriptet> Luffitys[m]: You need to disable unused clock cleanup
<ungeskriptet> Add clk_ignore_unused to you cmdline
<Luffitys[m]> its already there rip
<Luffitys[m]> or do i add it as a cmdline in mkbootimg?
<ungeskriptet> No that should be fine
<ungeskriptet> But I'd recommend remove max77705_pd.c
<ungeskriptet> whoop
<ungeskriptet> meant to say fw_devlink=permissive
<ungeskriptet> Also you could disable dispcc entirly
<ungeskriptet> * entirely
<Luffitys[m]> Hm I tried many times and i just dont see anything related to the crash or errors in the super short dmesg. so i cant really make progress
<ungeskriptet[m]> Luffitys: Does it instantly reboot after it goes black or is it stuck there?