Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for Raspberry Pi Camera Module v3 to Kirkstone (compatibility patch) #1197

Open
wants to merge 2 commits into
base: kirkstone
Choose a base branch
from

Conversation

Jessseee
Copy link
Contributor

@Jessseee Jessseee commented Jun 29, 2023

The imx708 devicetree layer is required for use of the Raspberry Pi Camera Module v3. This was implemented in #1158 on master. However, the dts file is not included with Kernel 5.10. Therefore, to port these changes to Kirkstone, I added a dynamic layer to install the imx708 devicetree overlay when building for Linux kernel 5.10. Also see #1172 for more context.

@agherzan
Copy link
Owner

agherzan commented Jul 3, 2023

Could you add the rationale and context in the description?

@agherzan agherzan closed this Jul 3, 2023
@agherzan agherzan reopened this Jul 3, 2023
@agherzan
Copy link
Owner

agherzan commented Jul 3, 2023

Reopened as I've closed it by mistake.

@Jessseee
Copy link
Contributor Author

Jessseee commented Jul 5, 2023

Could you add the rationale and context in the description?

I hope this is clear enough.

@mhazley
Copy link

mhazley commented Oct 24, 2023

@Jessseee made it here from the Balena thread? Any way we can help get this over the line, we'd like to use camera v3 on Balena OS on Pi4

@agherzan
Copy link
Owner

I'm generally happy with this, but we will need to first land it via a review in master. It looks good to me otherwise.

@mhazley
Copy link

mhazley commented Oct 24, 2023

I'm generally happy with this, but we will need to first land it via a review in master. It looks good to me otherwise.

Is is possible this is already done via #1158?

@agherzan
Copy link
Owner

agherzan commented Oct 24, 2023

That's what I hoped and thought, but this seems to include more things. @Jessseee can you explain the backport so I understand where we are with this?

I suspect it is something along the "we don't have the right dtb in the kirkstone kernel versions" but I would expect a bbappend to our recipes not an external layer.

@mhazley
Copy link

mhazley commented Oct 24, 2023

but this seems to include more things

Sorry, I completely missed that!

@Jessseee
Copy link
Contributor Author

I am quite new to working with yocto, so I am not quite sure what the best approach is. However, my idea was that because the dts file is completely missing from Kernel 5.10 it has to be externally added.

@agherzan
Copy link
Owner

That makes sense @Jessseee. I think the best would be to introduce it in the kernel recipes we have in the layer - linux-raspberrypi ones.

@mhazley
Copy link

mhazley commented Oct 25, 2023

@Jessseee I think you can just make your bbappend for the dts recipes-kernel/linux/linux-raspberrypi_%.bbappend and it will apply the append to both the 5.10 and the 5.15 recipes.

I am quite new to yocto too, but I patched a dtoverlay in a similar way in BalenaOS once.

@Jessseee
Copy link
Contributor Author

Jessseee commented Oct 25, 2023

@mhazley The problem is that the devicetree files should only be added to linux-raspberrypi-dev and raspberrypi-5.10, because I think you will run into issues with 5.15 as it already has these files. As @agherzan said, they need to be added directly to the kernel recipes. Also, I found out that apparently the devicetree layer also needs a dtsi file.

@ScottGibb
Copy link

@agherzan Is there any update on this approved? Also thank you for doing the work and adding it to the meta-raspberrypi layer!

@agherzan
Copy link
Owner

agherzan commented Nov 1, 2023

@Jessseee This looks good. One last request: can you please squash "imx708: Add compatibility layer " into "recipe-bsp: Add support for Raspberry Pi Camera Module v3". They make sense as one commit. Otherwise, I think we are good to go.

@Jessseee Jessseee force-pushed the kirkstone branch 2 times, most recently from 2e22b78 to b47af61 Compare November 7, 2023 10:20
@Jessseee
Copy link
Contributor Author

Jessseee commented Nov 7, 2023

I squashed the commits and updated the branch.

@@ -24,6 +24,8 @@ SRC_URI = " \
git://git.yoctoproject.org/yocto-kernel-cache;type=kmeta;name=meta;branch=${LINUX_RPI_KMETA_BRANCH};destsuffix=${KMETA} \
file://powersave.cfg \
file://android-drivers.cfg \
file://imx708-overlay.dts;subdir=git/arch/${ARCH}/boot/dts/overlays \
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Interesting approach. @kraj does this have any downsides? I don't see any - maybe when using devtool?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it might be better to have it as a patch, if it gets added in one of future kernels then we wont be overwriting it without knowing.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That is a fair point. @Jessseee do you reckon you can update this with a patch?

Copy link
Contributor Author

@Jessseee Jessseee Apr 20, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@agherzan, I changed the addition of the imx708 dt-overlay to a patch.

@compiaffe
Copy link

What is the next step to get this merged in?
@agherzan @Jessseee

@Jessseee Jessseee changed the title Add support for Raspberry Pi Camera Module v3 to Kirkstone (compatibility layer) Add support for Raspberry Pi Camera Module v3 to Kirkstone (compatibility patch) Apr 20, 2024
@Jessseee Jessseee requested a review from kraj April 27, 2024 08:16
Copy link
Owner

@agherzan agherzan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for chasing this up.

@@ -0,0 +1,196 @@
From a66bb44e8c32170d2de5ea29ae16b30d9a5e2b06 Mon Sep 17 00:00:00 2001
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I might have been misunderstood. I was proposing to have this as a commit over the kernel source. Ideally, a formatted patch directly from rpi Linux kernel upstream. Does that make sense? Also, mind Upstream-status footer.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To be clear, I expect:

  1. Cherry-pick Add support for Raspberry Pi Camera Module v3 #1158
  2. Add a commit that adds a kernel patch to include the respective dtb (ideally as clean/backported patch from upstream)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants