lanefu changed the topic of #armbian-rockchip to: Armbian - Linux for ARM development boards | Rockchip SoC | www.armbian.com | This channel is relayed to the equivalent Discord channel | this channel is logged
DC-IRC has quit [Remote host closed the connection]
DC-IRC has joined #armbian-rockchip
<DC-IRC> [Discord] <zeeto9> while its not yet included or available in the 6.10rc7 that I have, its definitely on its way. The one thing I am unsure of is if this still applies to an orange pi 5 plus, since its specifically tested for rock5b, they are both rk3588, but im unsure if thats enough for it to still apply or if orange pi would need additional modifications.
<DC-IRC> [Discord] <zeeto9> im going to keep my eye on it for progress. https://lkml.org/lkml/2024/7/19/424
<DC-IRC> [Discord] <zeeto9> the rk3588-collabora.config even looks to have a place for it: #
<DC-IRC> [Discord] <zeeto9> # Sunxi media platform drivers
<DC-IRC> [Discord] <zeeto9> #
<DC-IRC> [Discord] <zeeto9> # CONFIG_VIDEO_SYNOPSYS_HDMIRX is not set
<DC-IRC> [Discord] <zeeto9> the rk3588-collabora.config even looks to have a place for it: #
<DC-IRC> [Discord] <zeeto9> # Sunxi media platform drivers
<DC-IRC> [Discord] <zeeto9> #
<DC-IRC> [Discord] <zeeto9> # CONFIG_VIDEO_SYNOPSYS_HDMIRX is not set
<DC-IRC> [Discord] <zeeto9> After working from downloading armbian edge 6.10, then switching kernel to collabora 6.9, I loose all gui, but can still remote in, but now the interesting thing is this is the first time hdmrx shows up, but as far as I can tell, collabora 6.9 does not currently have overlay support, preventing me from even attempting a test. 😅 I’m going to switch it to nightly build update <clipped message>
<DC-IRC> [Discord] <zeeto9> and roll the dice to see what happens. 🤷‍♂️
<DC-IRC> [Discord] <zeeto9> Armbian 6.10rc7 which I also tested from my build appears to have some issues with hui hdmi out. I didn’t get a chance to do any digging since I couldn’t even ssh in.
<DC-IRC> [Discord] <Werner> Yeah somewhere between RCs HDMI got broken iirc
<DC-IRC> [Discord] <zeeto9> im not complaining. im learning lots just by digging around in here and finally learning the armbian way
<DC-IRC> [Discord] <zeeto9> https://pastebin.com/raw/6FrPZCnx
<DC-IRC> [Discord] <beohoff3174> How hard is it to apply patches to the edge kernel to pull in the collabora functionality that hasn't landed in mainline yet?
<DC-IRC> [Discord] <beohoff3174> So if I'm understanding the directory correctly, if I wanted to add patches to the current edge kernel, it looks like I would need to drop them in this directory: `build/patch/kernel/archive/rockchip-rk3588-6.10`
<DC-IRC> [Discord] <hewlettpackardlovecraft> dumb question - is it only the desktop images that include trunk MESA / VPU?
<DC-IRC> [Discord] <Werner> If it doesn't fit your needs feel free to build your own with a different GUI or userspace
<DC-IRC> [Discord] <hewlettpackardlovecraft> i see, thanks - just wanted to check if I had missed it somehow before trying to build it on my own
<DC-IRC> [Discord] <hewlettpackardlovecraft> dumb question - for orange pi 5 is it only the desktop images that include trunk MESA / VPU?
<DC-IRC> [Discord] <zeeto9> Forgot to mention, moving to nightly build/unstable for 6.10rc7 brought back hdmi tx functionality. Even though tx isn’t included, this nightly seems to be in the best place (for me)
<DC-IRC> [Discord] <zeeto9> Forgot to mention, moving to nightly build/unstable for 6.10rc7 brought back hdmi tx functionality. Even though rx isn’t included, this nightly seems to be in the best place (for me)
<DC-IRC> [Discord] <beohoff3174> r.10.0 works with hdmi out, but you'd have to pull in the pr from paolosabatino
<DC-IRC> [Discord] <zeeto9> Currently on nightly and just upgraded to (24.8.0-trunk.429) on 6.10rc7 and my hdmi out is working as well.
<DC-IRC> [Discord] <zeeto9> When you say r6.10.0, do you mean the full release of 6.10 (think it was last week it went out)?
<DC-IRC> [Discord] <zeeto9> Currently on nightly and just upgraded to (24.8.0-trunk.429) on 6.10rc7 and my hdmi out is working as well.
<DC-IRC> [Discord] <zeeto9> When you say r6.10.0, do you mean the full release of 6.10 (think it was last week it went out)?
<DC-IRC> [Discord] <beohoff3174> yep
<DC-IRC> [Discord] <beohoff3174> Are you compililng nightly? or downloading it?
<DC-IRC> [Discord] <beohoff3174> yep, or at least that is my understanding
<DC-IRC> [Discord] <zeeto9> I took a roundabout process. Building 6.10rc7 had display issues with hdmi tx (I decided not to pull out uart and debug further). I wanted to verify if any worked properly, so I downloaded 6.10rc4, switched to nightly that brought me up to 6.10rc7.
<DC-IRC> [Discord] <zeeto9> When I attempted switching to collabora kernel (from armbian config) the hdmi tx wasn’t working, but headless was fine. In this situation, hdmi rx still isn’t recognized, but it did include the in the works hdmirx device.
<DC-IRC> [Discord] <zeeto9> My next steps are reading in depth on patching device driver for hdmirx and all the various locations that are affected. From there, I’m going to use collabora hdmirx info and update/modify if need be for orange pi 5 plus. Then, this is where I’m hoping to be back to building it with the patch(s) and likely will spend a lot of time with my tty/uart cable figuring out what I did wrong. 😅
<DC-IRC> [Discord] <zeeto9> Also, for anyone following along, any suggestions are absolutely welcome. I’m stumbling my way around and hoping I’m going down the right path.
<DC-IRC> [Discord] <beohoff3174> I'm basically doing the same thing, can't wait anymore for this to land in mainline
<DC-IRC> [Discord] <beohoff3174> @zeeto9 , this is what I came up with for patches:
<DC-IRC> [Discord] <zeeto9> wow, you are fast, im only now pulling the collabora kernel to look through the patches. 😅
<DC-IRC> [Discord] <beohoff3174> haha, yeah "fast"..... I've been working on this since like 9 AM
<DC-IRC> [Discord] <beohoff3174> would be interesting if you took a swing at it as well and see what you come up with
<DC-IRC> [Discord] <beohoff3174> the latest patch from Collabora builds on a patch that didn't land in 6.10
<DC-IRC> [Discord] <zeeto9> i looked through yours, but I am going to see what I come up myself. compare and contrast, see what I missed, and gain some knowledge. but hopefully ill have something in a couple hours
<DC-IRC> [Discord] <beohoff3174> Collabora broke apart the dtsi files in the boot directory: https://lore.kernel.org/linux-rockchip/171891591943.88443.4575073298967084067.b4-ty@sntech.de/T/
<DC-IRC> [Discord] <beohoff3174> The other thing that I found helpful that might save you some time is just raw getting the diffs. I used this site: https://patchwork.kernel.org/project/linux-media/patch/20240719124032.26852-2-shreeya.patel@collabora.com/
<DC-IRC> [Discord] <beohoff3174> And clicked the "series" button in the top right. I'm sure there's a cleaner way to get a diff set from the mailing lists, but I didn't know one
<DC-IRC> [Discord] <beohoff3174> Looks like I didn't get it all the way figured out:
<DC-IRC> [Discord] <beohoff3174> https://pastebin.com/1NUHvV2Y
<DC-IRC> [Discord] <beohoff3174> Not seeing hdmi-in on v4l2
<DC-IRC> [Discord] <zeeto9> i have been using https://lwn.net/ml/all/search searching on hdmi rx rk3588 and sorting by date. as far as I can tell, this is going to touch a few parts of the system when fully patched
<DC-IRC> [Discord] <zeeto9> stuff for the control;er: https://lwn.net/ml/all/c926b73e-9ee7-4c4f-9c06-761929425468%40yandex.com/
<DC-IRC> [Discord] <zeeto9> also I noticed there is an armbian branch: orangepi5--collab-with-efectn
<DC-IRC> [Discord] <efectn> Did you enable it from opi5plus devicetree
<DC-IRC> [Discord] <zeeto9> i think we'll also need to actually include hdmi rx logic for it to actually function? https://gitlab.collabora.com/hardware-enablement/rockchip-3588/linux/-/blob/rk3588-hdmirx-v5/drivers/media/platform/synopsys/hdmirx/snps_hdmirx.c?ref_type=heads#L1134
<DC-IRC> [Discord] <zeeto9> i think we'll also need to actually include hdmi rx logic for it to actually function? https://gitlab.collabora.com/hardware-enablement/rockchip-3588/linux/-/blob/rk3588-hdmirx-v5/drivers/media/platform/synopsys/hdmirx/snps_hdmirx.c?ref_type=heads#L1134
<DC-IRC> [Discord] <beohoff3174> I did not, and I'd have to dig a bit to understand what that means. I just realized that I hadn't added the config to build the module which I have edited in
<DC-IRC> [Discord] <beohoff3174> `config/kernel/linux-rockchip-rk3588-6.10.config` to the following setting:
<DC-IRC> [Discord] <beohoff3174> `CONFIG_VIDEO_SYNOPSYS_HDMIRX=m`
<DC-IRC> [Discord] <beohoff3174> just figured out it wasn't compiling, and I'm missing some logic in my patchset.
<DC-IRC> [Discord] <beohoff3174> Looks like the version in the repo and the version in the patchset are different.
<DC-IRC> [Discord] <beohoff3174> In the repo, for the file snps_hdmirx.c, the signature for the function is:
<DC-IRC> [Discord] <beohoff3174> static int hdmirx_remove(struct platform_device *pdev)
<DC-IRC> [Discord] <beohoff3174> While in the patchset that was submitted it on 07/19:
<DC-IRC> [Discord] <beohoff3174> static void hdmirx_remove(struct platform_device *pdev)
<DC-IRC> [Discord] <beohoff3174> Which doesn't compile.
<DC-IRC> [Discord] <beohoff3174> interestingly, the patches submitted on 02/16 looks right
<DC-IRC> [Discord] <beohoff3174> Looks like the version in the repo and the version in the patchset are different.
<DC-IRC> [Discord] <beohoff3174> In the repo, for the file snps_hdmirx.c, the signature for the function is:
<DC-IRC> [Discord] <beohoff3174> static int hdmirx_remove(struct platform_device *pdev)
<DC-IRC> [Discord] <beohoff3174> While in the patchset that was submitted it on 07/19:
<DC-IRC> [Discord] <beohoff3174> static void hdmirx_remove(struct platform_device *pdev)
<DC-IRC> [Discord] <beohoff3174> The static void function, doesn't compile and throws erros
<DC-IRC> [Discord] <beohoff3174> interestingly, the patches submitted on 02/16 looks right
<DC-IRC> [Discord] <beohoff3174> Looks like the version in the repo and the version in the patchset are different.
<DC-IRC> [Discord] <beohoff3174> In the repo, for the file snps_hdmirx.c, the signature for the function is:
<DC-IRC> [Discord] <beohoff3174> `static int hdmirx_remove(struct platform_device *pdev)`
<DC-IRC> [Discord] <beohoff3174> While in the patchset that was submitted it on 07/19:
<DC-IRC> [Discord] <beohoff3174> `static void hdmirx_remove(struct platform_device *pdev)`
<DC-IRC> [Discord] <beohoff3174> The `static void` function, doesn't compile and throws errors
<DC-IRC> [Discord] <beohoff3174> interestingly, the patches submitted on 02/16 looks right
<DC-IRC> [Discord] <beohoff3174> Looks like they should have used `remove_new`
<DC-IRC> [Discord] <zeeto9> their "Notes for Rockchip 3588" has good stuff in it. Reading through "Current kernel mainline support", it lists all the features and at which branch they first introduced. HDMI Input
<DC-IRC> [Discord] <zeeto9> #4
<DC-IRC> [Discord] <zeeto9> sent
<DC-IRC> [Discord] <zeeto9> n/a
<DC-IRC> [Discord] <zeeto9> sent
<DC-IRC> [Discord] <zeeto9> TODO
<DC-IRC> [Discord] <zeeto9> PATCHv4
<DC-IRC> [Discord] <zeeto9> the hdmi input currently has only rock5b work being done, but its only be sent so far in PATCHv4. https://gitlab.collabora.com/hardware-enablement/rockchip-3588/notes-for-rockchip-3588/-/blob/main/mainline-status.md
<DC-IRC> [Discord] <zeeto9> which looks to be the stuff I found on the kernel list archives
<DC-IRC> [Discord] <zeeto9> | 8 +
<DC-IRC> [Discord] <zeeto9> .../dts/rockchip/rk3588-base-pinctrl.dtsi | 14 +
<DC-IRC> [Discord] <zeeto9> .../arm64/boot/dts/rockchip/rk3588-extra.dtsi | 56 +
<DC-IRC> [Discord] <zeeto9> drivers/media/platform/Kconfig | 1 +
<DC-IRC> [Discord] <zeeto9> drivers/media/platform/Makefile | 1 +
<DC-IRC> [Discord] <zeeto9> drivers/media/platform/synopsys/Kconfig | 3 +
<DC-IRC> [Discord] <zeeto9> drivers/media/platform/synopsys/Makefile | 2 + ...... ETC.... but its useful because it points of several of the things that will need to be taken care
<DC-IRC> [Discord] <zeeto9> such as, just enabling an hdmi rx dts isnt enough, things like gpio pins need to also be resolved so they are not left open as if available
<DC-IRC> [Discord] <zeeto9> I believe this is THE patch to be starting from
<DC-IRC> [Discord] <beohoff3174> yep, that's the one I pulled from
<DC-IRC> [Discord] <beohoff3174> @efectn , if you add the following two "functions" to rk3588.dtsi:
<DC-IRC> [Discord] <beohoff3174> hdmi_receiver_cma,
<DC-IRC> [Discord] <beohoff3174> hdmi_receiver,
<DC-IRC> [Discord] <beohoff3174>
<DC-IRC> [Discord] <beohoff3174> and default them to status disabled, then you would need to override in the op5plus device tree correct?
<DC-IRC> [Discord] <beohoff3174> I guess I'm wondering if the pins are going to be correctly defined, or if I need to go trace them from the OrangePi5 plus documentation
<DC-IRC> [Discord] <efectn> alternatively you can create an overlay here so as not to mess with devicetree patches https://github.com/armbian/build/tree/34fe6f183b682338fb85c03bf72b996679417c47/patch/kernel/archive/rockchip-rk3588-6.8/overlay
<DC-IRC> [Discord] <efectn> btw i recommend you using 6.10 instead of 6.8
<DC-IRC> [Discord] <beohoff3174> Wouldn't you need to do it here: `build/patch/u-boot/legacy/u-boot-radxa-rk35xx/dt/rk3588-orangepi-5-plus.dts`
<DC-IRC> [Discord] <beohoff3174> Or am I not understanding this?
<DC-IRC> [Discord] <beohoff3174> Yep, I'm using 6.10
<DC-IRC> [Discord] <efectn> nope it has nothing to do with uboot devicetree
<DC-IRC> [Discord] <tyro_noob> Hi, is there an image for the orange pi CM5?
<DC-IRC> [Discord] <efectn> an overlay like this should work https://paste.laravel.io/2970cedb-ec16-4e0f-8a45-6b077fb3dab2
<DC-IRC> [Discord] <beohoff3174> Thank you for the pointers!
<DC-IRC> [Discord] <zeeto9> even though we have some ways to go, I am exciting at the steps we are taking.
<DC-IRC> [Discord] <zeeto9> does this process sound like the approach to applying patches that are only in the email list back down to armbian? if I clone mainline linux 6.10, grab the .mbox mailing list file, I think I can then apply with git-am (git-am - Apply a series of patches from a mailbox) to my mainline branch (forked), commit, create a patch from those changes, and then bring into armbian?
<DC-IRC> [Discord] <zeeto9> there are plenty of steps left out and I dont even know of yet, I mainly am hoping someone can give me advice if this is the normal process someone would use to apply patches from mailing list
<DC-IRC> [Discord] <lanefu> @rpardini any tips? Ill have to dig into my notes but I believe we have some tooling to slurp an mbox file
<DC-IRC> [Discord] <beohoff3174> These last three commits are my swag at it: https://github.com/armbian/build/compare/main...benhoff:build:patch
<DC-IRC> [Discord] <beohoff3174> I don't know why, but I'm still not seeing the device as an input
<DC-IRC> [Discord] <beohoff3174> Yes, that sounds like the right process. There's a few changes from linux-next from linux 6.10 that you would need to either backport the changes or target the next version of linux. Specifically the signature of hdrmi_remove (int/void) and then the changes with ditsi file naming (https://lore.kernel.org/linux-rockchip/171891591943.88443.4575073298967084067.b4-ty@sntech.de/T/)
<DC-IRC> [Discord] <beohoff3174> Well I say that... and it didn't work for me so....
<DC-IRC> [Discord] <zeeto9> yea I bet there is a lot of stuff that helps streamline it, but its also good for me to know the various individual steps that an automated solution would do, so that I understand what actually is happening, otherwise it will be more "magic". plus understanding this, gets me more comfrotable with linux kernel all around. im learning so much the past few days
<DC-IRC> [Discord] <zeeto9> this knowledge and ability to do all this will only become more useful (at least for me) as I get going. i have other boards and things I want to tackle in the future and inevitable boards will be shipped originally a little wacky, which is where this back porting will be invaluable. at least for me, on my long term goals.
<DC-IRC> [Discord] <zeeto9> but first, patchv4 will be conquered. question. if one day in the future I actually contribute something and its accepted, do I print out that email thread and hang it on my wall? as if earning a first dollar for a business? because i totally would do that
<DC-IRC> [Discord] <t1msu_87222> @beohoff3174 @zeeto9 So i got a bit further. I changed remove to remove_new and could successfully compile the kernel
<DC-IRC> [Discord] <t1msu_87222> also added the following overlay with `armbian-add-overlay` https://paste.armbian.com/avutuzoyal.pl
<DC-IRC> [Discord] <t1msu_87222> Now i get the error in dmesg:
<DC-IRC> [Discord] <t1msu_87222> ```
<DC-IRC> [Discord] <t1msu_87222> [ 5.928232] snps_hdmirx fdee0000.hdmi_receiver: assigned reserved memory node hdmi-receiver-cma
<DC-IRC> [Discord] <t1msu_87222> [ 5.934488] snps_hdmirx fdee0000.hdmi_receiver: error -EINVAL: failed to get hdmirx-5v irq
<DC-IRC> [Discord] <t1msu_87222> [ 5.934529] snps_hdmirx fdee0000.hdmi_receiver: probe with driver snps_hdmirx failed with error -22
<DC-IRC> [Discord] <t1msu_87222> ```
<DC-IRC> [Discord] <beohoff3174> Do it for sure! Can't remember what my first open source contribution was that got accepted, but I do remember checking it everyday even though it was super minor
<DC-IRC> [Discord] <beohoff3174> I'm super jealous that you were able to get something in dmesg!
<DC-IRC> [Discord] <beohoff3174> What hardware are you on? I sort of assumed that the pins might need to be defined/set for each board, but I haven't dug into that yet
<DC-IRC> [Discord] <beohoff3174> Do it for sure! Can't remember what my first open source contribution was that got accepted, but I do remember checking it everyday to see if it had gotten merged even though it was super minor
<DC-IRC> [Discord] <t1msu_87222> So using this overlay I don't get the error message anymore:
<DC-IRC> [Discord] <t1msu_87222> http://paste.armbian.com/fimajazezi.pl
<DC-IRC> [Discord] <t1msu_87222> But still no device listed
<DC-IRC> [Discord] <t1msu_87222> I'm using Nanopc CM3588 NAS
<DC-IRC> [Discord] <beohoff3174> I'm sort of shooting in the dark, but the repo looks like the overlay is a bit different: https://gitlab.collabora.com/hardware-enablement/rockchip-3588/linux/-/commit/fdf56913334a3c96b28de16d11b0b30a3626d069#637ff37958a75d1ea15150df6239f2cc9bbc88e4
<DC-IRC> [Discord] <beohoff3174> That's probably what I'll be trying next
<DC-IRC> [Discord] <efectn> I think you need hdmirx-5v-detection property in hdmirx node
<DC-IRC> [Discord] <efectn> I think you need to define hdmirx-5v-detection property in hdmirx node
<DC-IRC> [Discord] <t1msu_87222> Using `dtc -I fs /sys/firmware/devicetree/base` you can look at your current device tree. For some reason my hdmi-receiver-cma node is still disabled
<DC-IRC> [Discord] <t1msu_87222> I did that correct in my paste, right?
<DC-IRC> [Discord] <efectn> Which is equal https://github.com/armbian/linux-rockchip/blob/7d54e5474cf840533fcc862d3f3bd978e00fb2d5/drivers/media/platform/rockchip/hdmirx/rk_hdmirx.c#L3888 in BSP kernel tree. Hence, adding `hdmirx-5v-detection = <&gpio1 RK_PC6 GPIO_ACTIVE_LOW>;` property to hdmirx node should be solving the issue
<DC-IRC> [Discord] <efectn> Can you try the solution i've just proposed
<DC-IRC> [Discord] <t1msu_87222> https://lore.kernel.org/linux-rockchip/3328a8-669e6400-1-609f7800@94177214/ I oversaw that the original message included an example for the device tree
<DC-IRC> [Discord] <zeeto9> Also not sure if this was posted yet: https://patchwork.kernel.org/project/linux-arm-kernel/list/?series=872537. Definitely easier for me to view the patches. But I don’t think 4/4 has been sent yet.
<DC-IRC> [Discord] <zeeto9> Wish I had started here. All in one place, organized, and out of mbox format
<DC-IRC> [Discord] <zeeto9> Alright, I’m realizing much of the stuff I have posted, is the same thing, but provided through various mechanisms. Mail lists, patchwork, lore for more in depth. And it looks like patchv4 4/4 has commits today
<DC-IRC> [Discord] <zeeto9> https://lkml.org/lkml/2024/7/22/998
<DC-IRC> [Discord] <zeeto9> https://lkml.org/lkml/2024/7/22/695
<DC-IRC> [Discord] <zeeto9> And it looks like this one is the one with formats: https://lkml.org/lkml/2024/7/22/980