You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In one of our Projects, we use the Arducam OV9281. We want to transition to libcamera, since they have deprecated their MIPI Driver.
Now for the actual problem: Our product relies on the external trigger functionality. After skimming through this repo and a bit of trial-and-error, I'm not really sure this is supported in libcamera with this module.
I've seen that #5260e6a7eed added support for the OV7251 external trigger, so maybe the process would be similar?
I thought I'd already added it, but don't see such a patch.
OV9281 was a downstream patch. Full support has now been merged into the mainline ov9282 driver, so currently from 6.2 we will be using that. I suspect I'll backport it to 6.1 as well. Changes aren't going to be made to the ov9281 driver on 5.15 now.
The process will be near identical to ov7251, but the registers involved may be different. I'll see what I can dig out.
Seeing as this repo is a request for a Linux kernel driver change, https://github.com/raspberrypi/linux is the appropriate repo. I'll see if I can find someone with appropriate permissions to move this issue.
Ah, I'm sorry, I had both repos open and got confused when opening the issue... I was wondering why the Commit Hash wouldn't link automatically, that explains it.
Sounds like good news though, thanks!
@6by9 We used Arducams "MIPI Userland Driver" on Raspbian Buster before. Even then I have run into weird consistency issues with the external trigger on this module, though I was able to fix them... I got my hands on a OV9281 camera module today and will do some tests tomorrow.
I can confirm that it works with these register settings on Buster: {0x4F00, 0x01}, {0x3030, 0x04}, {0x303F, 0x01}, {0x302C, 0x00}, {0x302F, 0x7F}, {0x3823, 0x00}, {0x0100, 0x00}, I just had a look into it. As far as I understand from my limited access to the datasheet and some sniffing the sensor needs to be in "software standby" aka "sleep mode" in order for external trigger to work...
Thank you very much for your answer. Following this register configuration, I successfully enabled the external trigger mode of ov9281 in Linux for Tegra and obtained stable images. The following is my configuration code:
hi, which device did you used for trigger signal?
I used custom board which outputs active low signal, which seems not compatible with the ov9281 chip (active high)
could you tell me your setup? thanks.
i refactored the official ov9282 driver( which can be used ov9281 as well) with this configuration and it worked. Thank you.
Thank you very much for your answer. Following this register configuration, I successfully enabled the external trigger mode of ov9281 in Linux for Tegra and obtained stable images. The following is my configuration code:
I will say that we've relented slightly on hacking in external trigger / strobe type functionality with imx477 and imx296, setting them via device tree and/or module parameters.
If someone fancied creating a PR in a similar style to #5560 and #6827 (for imx296) or #4656 (for imx477), then it will be accepted.
Activity
6by9 commentedon Feb 13, 2023
I thought I'd already added it, but don't see such a patch.
OV9281 was a downstream patch. Full support has now been merged into the mainline ov9282 driver, so currently from 6.2 we will be using that. I suspect I'll backport it to 6.1 as well. Changes aren't going to be made to the ov9281 driver on 5.15 now.
The process will be near identical to ov7251, but the registers involved may be different. I'll see what I can dig out.
Seeing as this repo is a request for a Linux kernel driver change, https://github.com/raspberrypi/linux is the appropriate repo. I'll see if I can find someone with appropriate permissions to move this issue.
fxweidinger commentedon Feb 13, 2023
Ah, I'm sorry, I had both repos open and got confused when opening the issue... I was wondering why the Commit Hash wouldn't link automatically, that explains it.
Sounds like good news though, thanks!
fxweidinger commentedon Feb 17, 2023
@6by9 So I looked into this a little: The way I see it, the only changes to be made are:
linux/drivers/media/i2c/ov9282.c
Line 1035 in ddaf4dc
Anything else I have perhaps overlooked?
I might have some time on my hands to do this when I get my hands on a ov9281 again.
6by9 commentedon Feb 24, 2023
Can I ask which driver you have been using that supports external trigger?
I've made the register changes that I'd expected to need for external trigger based on the datasheet, but the sensor keeps free-running.
fxweidinger commentedon Mar 1, 2023
@6by9 We used Arducams "MIPI Userland Driver" on Raspbian Buster before. Even then I have run into weird consistency issues with the external trigger on this module, though I was able to fix them... I got my hands on a OV9281 camera module today and will do some tests tomorrow.
6by9 commentedon Mar 1, 2023
Presumably that is https://github.com/ArduCAM/MIPI_Camera/
In which case https://github.com/ArduCAM/MIPI_Camera/blob/master/RPI/ov9281_external_trigger.c#L16 looks interesting. The most confusing part being
{0x0100, 0x00},which actually sets the camera into standby mode, not streaming.If you can confirm that the old stack really does still work, then that would be a useful stepping stone.
fxweidinger commentedon Mar 1, 2023
I can confirm that it works with these register settings on Buster:
{0x4F00, 0x01}, {0x3030, 0x04}, {0x303F, 0x01}, {0x302C, 0x00}, {0x302F, 0x7F}, {0x3823, 0x00}, {0x0100, 0x00},I just had a look into it. As far as I understand from my limited access to the datasheet and some sniffing the sensor needs to be in "software standby" aka "sleep mode" in order for external trigger to work...Jason-xy commentedon Aug 8, 2023
Thank you very much for your answer. Following this register configuration, I successfully enabled the external trigger mode of ov9281 in Linux for Tegra and obtained stable images. The following is my configuration code:
enlighten-ch commentedon Feb 5, 2024
hi, which device did you used for trigger signal?
I used custom board which outputs active low signal, which seems not compatible with the ov9281 chip (active high)
could you tell me your setup? thanks.
omeredemen commentedon Jul 10, 2025
i refactored the official ov9282 driver( which can be used ov9281 as well) with this configuration and it worked. Thank you.
6by9 commentedon Jul 10, 2025
I will say that we've relented slightly on hacking in external trigger / strobe type functionality with imx477 and imx296, setting them via device tree and/or module parameters.
If someone fancied creating a PR in a similar style to #5560 and #6827 (for imx296) or #4656 (for imx477), then it will be accepted.
media: i2c: ov9282: Arm FSIN wake last in external trigger setup
media: i2c: ov9282: Arm FSIN wake last in external trigger setup
media: i2c: ov9282: Arm FSIN wake last in external trigger setup
media: i2c: ov9282: Arm FSIN wake last in external trigger setup
media: i2c: ov9282: Arm FSIN wake last in external trigger setup
media: i2c: ov9282: Arm FSIN wake last in external trigger setup
media: i2c: ov9282: Arm FSIN wake last in external trigger setup
media: i2c: ov9282: Arm FSIN wake last in external trigger setup
media: i2c: ov9282: Arm FSIN wake last in external trigger setup