Skip to content
View in the app

A better way to browse. Learn more.

Armbian Community Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Enable OV5640 on NanoPi A64

Featured Replies

This weekend I was revising and testing the OV5640 for some A64 boards.

To enable the Camera (OV5640) on NanoPi A64 for the mainline kernel you have to update the following:

* DT

* GPIO-I2C 

Here is the excerpt :

Spoiler

 


 {
    model = "FriendlyARM ...";
    .
    .
    reg_vcc3v3: vcc3v3 {
        compatible = "regulator-fixed";
        regulator-name = "vcc3v3";
        regulator-min-microvolt = <3300000>;
        regulator-max-microvolt = <3300000>;
    };    
    
    cam_xclk: cam-xclk {
        #clock-cells = <0>;
        compatible = "fixed-clock";
        clock-frequency = <24000000>;
        clock-output-names = "cam-xclk";
    };

    reg_cam_avdd: cam-avdd {
        compatible = "regulator-fixed";
        regulator-name = "cam500b-avdd";
        regulator-min-microvolt = <2800000>;
        regulator-max-microvolt = <2800000>;
        vin-supply = <&reg_vcc3v3>;
    };

    reg_cam_dovdd: cam-dovdd {
        compatible = "regulator-fixed";
        regulator-name = "cam500b-dovdd";
        regulator-min-microvolt = <1800000>;
        regulator-max-microvolt = <1800000>;
        vin-supply = <&reg_vcc3v3>;
    };

    reg_cam_dvdd: cam-dvdd {
        compatible = "regulator-fixed";
        regulator-name = "cam500b-dvdd";
        regulator-min-microvolt = <1500000>;
        regulator-max-microvolt = <1500000>;
        vin-supply = <&reg_vcc3v3>;
    };    
    
    i2c {
        compatible = "i2c-gpio";
        sda-gpios = <&pio 4 13 GPIO_ACTIVE_HIGH>;
        scl-gpios = <&pio 4 12 GPIO_ACTIVE_HIGH>;
        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 = <&reg_cam_avdd>;
            DOVDD-supply = <&reg_cam_dovdd>;
            DVDD-supply = <&reg_cam_dvdd>;
            reset-gpios = <&pio 4 16 GPIO_ACTIVE_LOW>; /* CSI-RST-R: PE16 */
            powerdown-gpios = <&pio 4 17 GPIO_ACTIVE_HIGH>; /* CSI-STBY-R: 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 {
		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 */
		};
	};
};
          

 

Kernel config:

 

CONFIG_I2C_GPIO=m

CONFIG_VIDEO_OV5640=m

CONFIG_VIDEO_SUN6I_CSI=m

 

Edited by @lex
added spoiler + csi

Guest
This topic is now closed to further replies.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.