-
Notifications
You must be signed in to change notification settings - Fork 15
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
ov5640_read_reg: error: reg=300a #6
Comments
You need to enable:
The message:
|
I check my I2C setting, it seems right
My OV5640 is not BPI sensor, I just bought an BPI official one last night and will test it later. Can you please tell me what difference between Normal OV5640 and BPI OV5640? Thanks a lot |
The pinouts are reversed 180º. Pin 1 is pin 16, Pin 2 is pin 15, and so on. (in a 16 pin example) |
Thank you very much. |
Unfortunately no, this will not work. Only for BSP now. I will try to update for mainline kernel this weekend. |
@chdwjzd |
I just do some change on your code form https://github.com/avafinger/cap-v4l2
Thank you again , your work help me a lot |
I try to Enable OV5640 on Banana Pi M64 too;used armbian with kernel 5.10; but when kernel start OV5640 has an error
[ 6.771712] brcmfmac: brcmf_c_preinit_dcmds: Firmware: BCM43430/1 wl0: Mar 30 2016 11:30:56 version 7.45.77.h8.4 FWID 01-ee8a6268 [ 7.185164] ov5640 1-003c: ov5640_read_reg: error: reg=300a [ 7.185180] ov5640 1-003c: ov5640_set_power_on: failed to read chip identifier [ 7.904788] Adding 985724k swap on /dev/zram0. Priority:5 extents:1 across:985724k SSFS [ 9.133355] zram1: detected capacity change from 0 to 52428800
I added this to sun50i-a64-bananapi-m64.dts:
i2c-csi { compatible = "i2c-gpio"; sda-gpios = <&pio 4 13 GPIO_ACTIVE_HIGH>; /* PE13 */ scl-gpios = <&pio 4 12 GPIO_ACTIVE_HIGH>; /* PE12 */ i2c-gpio,delay-us = <5>; #address-cells = <1>; #size-cells = <0>; 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 = <®_dldo3>; DOVDD-supply = <®_aldo1>; DVDD-supply = <®_eldo3>; reset-gpios = <&pio 4 16 GPIO_ACTIVE_LOW>; /* PE16 */ powerdown-gpios = <&pio 4 17 GPIO_ACTIVE_HIGH>; /* PE17 */ port { ov5640_ep: endpoint { remote-endpoint = <&csi_ep>; bus-width = <8>; hsync-active = <1>; /* Active high */ vsync-active = <0>; /* Active low */ data-active = <1>; /* Active high */ pclk-sample = <1>; /* Rising */ }; }; }; }; &csi { status = "okay"; port { #address-cells = <1>; #size-cells = <0>; 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 */ }; }; };
and according to your answer in armbian I try to change I2C to:
sda-gpios = <&pio 4 13 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN|GPIO_PULL_UP)>; /* CSI0-SDA: PE13 */ [scl-gpios = <&pio 4 12 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN|GPIO_PULL_UP)>; /* CSI0-SCK: PE12 */
but the result is the same
I just check my I2C setting,it seems right
root@bananapim64:~# lsmod|grep ov ov5640 28672 1 v4l2_fwnode 24576 2 ov5640,sun6i_csi videodev 233472 9 sunxi_cedrus,sun8i_rotate,v4l2_fwnode,ov5640,videobuf2_v4l2,sun8i_di,sun6i_csi,videobuf2_common,v4l2_mem2mem mc 49152 7 sunxi_cedrus,videodev,ov5640,videobuf2_v4l2,sun6i_csi,videobuf2_common,v4l2_mem2mem
root@bananapim64:~# dmesg | grep sun6i-csi [ 5.985118] sun6i-csi 1cb0000.csi: creating ov5640 1-003c:0 -> sun6i-csi:0 link root@bananapim64:~#
I don't know how to solve this problem, can you help me, thank you
The text was updated successfully, but these errors were encountered: