Now that the camera interface has been merged in mainline Kernel, I would like to try to use the OrangePi OV5640 camera module on my OrangePi One.
So with the latest Armbian Bionic (20.02.1, kernel 5.4.20), I have been trying to get a device tree overlay.
But for now, it fails to compile with:
$ sudo armbian-add-overlay sun8i-h3-csi.dts
Compiling the overlay
Error: sun8i-h3-csi.dts:27.23-24 syntax error
FATAL ERROR: Unable to parse input tree
Error compiling the overlay
My current overlay looks like this:
/dts-v1/;/plugin/;/{
compatible ="allwinner,sun8i-h3";
fragment@0 {
target =<&pio>;
__overlay__ {
csi_mclk_pin: csi-mclk-pin {
pins ="PE1";
function ="csi";};};};
fragment@1 {
target =<&i2c2>;
__overlay__ {
status ="okay";
ov5640: camera@3c {
compatible ="ovti,ov5640";
reg =<0x3c>;
pinctrl-names ="default";
pinctrl-0=<&csi_mclk_pin>;
clocks =<&ccu CLK_CSI_MCLK>;
clock-names ="xclk";
AVDD-supply =<®_aldo1>;
DOVDD-supply =<®_dldo3>;
DVDD-supply =<®_eldo3>;
reset-gpios =<&pio 414 GPIO_ACTIVE_LOW>;/* CSI-RST-R: PE14 */
powerdown-gpios =<&pio 415 GPIO_ACTIVE_HIGH>;/* CSI-STBY-R: PE15 */
port {
ov5640_ep: endpoint {
remote-endpoint =<&csi_ep>;
bus-width =<8>;
data-shift =<2>;/* lines 9:2 are used */
hsync-active =<1>;/* Active high */
vsync-active =<0>;/* Active low */
data-active =<1>;/* Active high */
pclk-sample =<1>;/* Rising */};};};};};
fragment@2 {
target =<&csi>;
__overlay__ {
status ="okay";
port {
csi_ep: endpoint {
remote-endpoint =<&ov5640_ep>;
bus-width =<8>;
hsync-active =<1>;/* Active high */
vsync-active =<0>;/* Active low */
data-active =<1>;/* Active high */
pclk-sample =<1>;/* Rising */};};};};};
So the line 27, which seem to trigger the error is: `clocks = <&ccu CLK_CSI_MCLK>;`
Also, according to the documentation, the regulator fields are required but this board does not have much regulators (like AXP209), so I have no idea what to write here.
But this is my first time writing a device-tree overlay so I am not sure what is wrong with this line.
Could someone guide me to get my overlay right?
And, does anyone already got the CSI interface working with OV5460 sensor on a H3 based board?
You can post now and register later.
If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.
Question
rreignier
Hi!
Now that the camera interface has been merged in mainline Kernel, I would like to try to use the OrangePi OV5640 camera module on my OrangePi One.
So with the latest Armbian Bionic (20.02.1, kernel 5.4.20), I have been trying to get a device tree overlay.
But for now, it fails to compile with:
My current overlay looks like this:
So the line 27, which seem to trigger the error is: `clocks = <&ccu CLK_CSI_MCLK>;`
Also, according to the documentation, the regulator fields are required but this board does not have much regulators (like AXP209), so I have no idea what to write here.
But this is my first time writing a device-tree overlay so I am not sure what is wrong with this line.
Could someone guide me to get my overlay right?
And, does anyone already got the CSI interface working with OV5460 sensor on a H3 based board?
Thank you.
Link to comment
Share on other sites
91 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.