forked from openwrt/openwrt
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
sunxi: add csi video support for nanopi-neo-air
add dtc configuration that declare CSI connection with ov5640 Signed-off-by: Michel Promonet <[email protected]> Link: openwrt#15967 Signed-off-by: Hauke Mehrtens <[email protected]>
- Loading branch information
Showing
1 changed file
with
107 additions
and
0 deletions.
There are no files selected for viewing
107 changes: 107 additions & 0 deletions
107
target/linux/sunxi/patches-6.6/451-sunxi-add-csi-video-support-for-nanopi-neo-air.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,107 @@ | ||
From 4c3a3af679bd59660ac80889b560bddaf475ba81 Mon Sep 17 00:00:00 2001 | ||
From: Michel Promonet <[email protected]> | ||
Date: Sun, 21 Jul 2024 19:04:19 +0200 | ||
Subject: [PATCH] sunxi: add csi video support for nanopi-neo-air | ||
|
||
--- | ||
.../dts/allwinner/sun8i-h3-nanopi-neo-air.dts | 85 +++++++++++++++++++ | ||
1 file changed, 85 insertions(+) | ||
|
||
--- a/arch/arm/boot/dts/allwinner/sun8i-h3-nanopi-neo-air.dts | ||
+++ b/arch/arm/boot/dts/allwinner/sun8i-h3-nanopi-neo-air.dts | ||
@@ -77,6 +77,39 @@ | ||
compatible = "mmc-pwrseq-simple"; | ||
reset-gpios = <&r_pio 0 7 GPIO_ACTIVE_LOW>; /* PL7 */ | ||
}; | ||
+ | ||
+ 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 = "cam-avdd"; | ||
+ regulator-min-microvolt = <2800000>; | ||
+ regulator-max-microvolt = <2800000>; | ||
+ vin-supply = <®_vcc3v3>; | ||
+ }; | ||
+ | ||
+ reg_cam_dovdd: cam-dovdd { | ||
+ compatible = "regulator-fixed"; | ||
+ regulator-name = "cam-dovdd"; | ||
+ regulator-min-microvolt = <1800000>; | ||
+ regulator-max-microvolt = <1800000>; | ||
+ vin-supply = <®_vcc3v3>; | ||
+ }; | ||
+ | ||
+ reg_cam_dvdd: cam-dvdd { | ||
+ compatible = "regulator-fixed"; | ||
+ regulator-name = "cam-dvdd"; | ||
+ regulator-min-microvolt = <1500000>; | ||
+ regulator-max-microvolt = <1500000>; | ||
+ vin-supply = <®_vcc3v3>; | ||
+ }; | ||
+ | ||
+ | ||
}; | ||
|
||
&mmc0 { | ||
@@ -141,3 +174,55 @@ | ||
/* USB VBUS is always on */ | ||
status = "okay"; | ||
}; | ||
+ | ||
+&csi { | ||
+ status = "okay"; | ||
+ | ||
+ port { | ||
+ #address-cells = <1>; | ||
+ #size-cells = <0>; | ||
+ | ||
+ /* Parallel bus endpoint */ | ||
+ csi_from_ov5640: endpoint { | ||
+ remote-endpoint = <&ov5640_to_csi>; | ||
+ bus-width = <8>; | ||
+ data-shift = <2>; | ||
+ hsync-active = <1>; /* Active high */ | ||
+ vsync-active = <0>; /* Active low */ | ||
+ data-active = <1>; /* Active high */ | ||
+ pclk-sample = <1>; /* Rising */ | ||
+ }; | ||
+ }; | ||
+}; | ||
+ | ||
+&i2c2 { | ||
+ status = "okay"; | ||
+ | ||
+ ov5640: camera@3c { | ||
+ compatible = "ovti,ov5640"; | ||
+ reg = <0x3c>; | ||
+ clocks = <&cam_xclk>; | ||
+ clock-names = "xclk"; | ||
+ | ||
+ reset-gpios = <&pio 4 14 GPIO_ACTIVE_LOW>; | ||
+ powerdown-gpios = <&pio 4 15 GPIO_ACTIVE_HIGH>; | ||
+ AVDD-supply = <®_cam_avdd>; | ||
+ DOVDD-supply = <®_cam_dovdd>; | ||
+ DVDD-supply = <®_cam_dvdd>; | ||
+ | ||
+ port { | ||
+ ov5640_to_csi: endpoint { | ||
+ remote-endpoint = <&csi_from_ov5640>; | ||
+ bus-width = <8>; | ||
+ data-shift = <2>; | ||
+ hsync-active = <1>; /* Active high */ | ||
+ vsync-active = <0>; /* Active low */ | ||
+ data-active = <1>; /* Active high */ | ||
+ pclk-sample = <1>; /* Rising */ | ||
+ }; | ||
+ }; | ||
+ }; | ||
+}; | ||
+&i2c2_pins { | ||
+ bias-pull-up; | ||
+}; |