Skip to contentSkip to conversation

ARM: at91: at91sam9x5: enable ISI and ov2640 support

PATCH New Josh Wu 3 participants 7 messages Feb 12, 2015 – Mar 4, 2015

Subsystems (3)
lore
Share & tools
lore

Josh Wu

author
#0 lore raw

cover ARM: at91: at91sam9x5: enable ISI and ov2640 support

This patch series will enable ISI and ov2640 sensor support for at91sam9g25ek board.

Josh Wu (4):
ARM: at91: at91sam9x5/dts: add ISI dt support, include isi node,
pinctrls
ARM: at91: at91sam9x5ek/dts: add ov2640 support
ARM: at91: at91sam9g25ek/dts: enable ISI and ov2640
ARM: at91: at91_dt_defconfig: enable ISI and ov2640 support

 arch/arm/boot/dts/at91sam9g25.dtsi    |  1 +
 arch/arm/boot/dts/at91sam9g25ek.dts   | 18 +++++++++++++
 arch/arm/boot/dts/at91sam9x5_isi.dtsi | 46 +++++++++++++++++++++++++++++++++
 arch/arm/boot/dts/at91sam9x5ek.dtsi   | 48 +++++++++++++++++++++++++++++++++++
 arch/arm/configs/at91_dt_defconfig    |  6 +++++
 5 files changed, 119 insertions(+)
Signature · 1 line
1.9.1
author
#1 lore raw

PATCH 1/4 ARM: at91: at91sam9x5/dts: add ISI dt support, include isi node, pinctrls

Add a new file: at91sam9x5_isi.dtsi, which includes ISI node and pinctrls.

---

 arch/arm/boot/dts/at91sam9g25.dtsi    |  1 +
 arch/arm/boot/dts/at91sam9x5_isi.dtsi | 46 +++++++++++++++++++++++++++++++++++
 2 files changed, 47 insertions(+)
arch/arm/boot/dts/at91sam9g25.dtsi +1 -0
index 17b8799..a7da0dd 100644
@@ -7,6 +7,7 @@
  */
 
 #include "at91sam9x5.dtsi"
+#include "at91sam9x5_isi.dtsi"
 #include "at91sam9x5_usart3.dtsi"
 #include "at91sam9x5_macb0.dtsi"
 
arch/arm/boot/dts/at91sam9x5_isi.dtsi +46 -0

57 lines not on this page · raw message

Signature · 1 line
1.9.1
author
#2 lore raw

PATCH 2/4 ARM: at91: at91sam9x5ek/dts: add ov2640 support

In reply to Josh Wu

Add the camera sensor ov2640 dt support. And connect sensor to isi node as well.

---

 arch/arm/boot/dts/at91sam9x5ek.dtsi | 48 +++++++++++++++++++++++++++++++++++++
 1 file changed, 48 insertions(+)
arch/arm/boot/dts/at91sam9x5ek.dtsi +48 -0
index bd16bd3..b633b0f 100644
@@ -66,9 +66,47 @@
 					compatible = "wm8731";
 					reg = <0x1a>;
 				};
+
+				ov2640: camera at 0x30 {
+					compatible = "ovti,ov2640";
+					reg = <0x30>;
+					pinctrl-names = "default";
+					pinctrl-0 = <&pinctrl_pck0_as_isi_mck &pinctrl_sensor_power &pinctrl_sensor_reset>;
+					resetb-gpios = <&pioA 7 GPIO_ACTIVE_LOW>;
+					pwdn-gpios = <&pioA 13 GPIO_ACTIVE_HIGH>;
+					clocks = <&pck0>;
+					clock-names = "xvclk";
+					assigned-clocks = <&pck0>;
+					assigned-clock-rates = <25000000>;
+					status = "disabled";
+
+					port {
+						ov2640_0: endpoint {
+							remote-endpoint = <&isi_0>;
+							bus-width = <8>;
+						};
+					};
+				};
 			};
 
 			pinctrl at fffff400 {
+				camera_sensor {
+					pinctrl_pck0_as_isi_mck: pck0_as_isi_mck-0 {
+						atmel,pins =
+							<AT91_PIOC 15 AT91_PERIPH_C AT91_PINCTRL_NONE>;			/* PC15 periph C ISI_MCK */
+					};
+
+					pinctrl_sensor_reset: sensor_reset-0 {
+						atmel,pins =
+							<AT91_PIOA 7 AT91_PERIPH_GPIO AT91_PINCTRL_NONE>;		/* PA7 gpio */
+					};
+
+					pinctrl_sensor_power: sensor_power-0 {
+						atmel,pins =
+							<AT91_PIOA 13 AT91_PERIPH_GPIO AT91_PINCTRL_NONE>;		/* PA13 gpio */
+					};
+				};
+
 				mmc0 {
 					pinctrl_board_mmc0: mmc0-board {
 						atmel,pins =
@@ -122,6 +160,16 @@
 		usb1: ehci at 00700000 {
 			status = "okay";
 		};
+
+		isi: isi at f8048000 {
+			status = "disabled";
+			port {
+				isi_0: endpoint at 0 {
+					remote-endpoint = <&ov2640_0>;
+					bus-width = <8>;
+				};
+			};
+		};
 	};
 
 	sound {
Signature · 1 line
1.9.1
author
#3 lore raw

PATCH 3/4 ARM: at91: at91sam9g25ek/dts: enable ISI and ov2640

In reply to Josh Wu

Enable ISI and ov2640 for at91sam9g25ek board.
Meantime, we need to disable the mmc1 and spi0 as they have pin conflict with ISI.

---

 arch/arm/boot/dts/at91sam9g25ek.dts | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)
arch/arm/boot/dts/at91sam9g25ek.dts +18 -0
index 1e4c49c..9808990 100644
@@ -16,10 +16,28 @@
 
 	ahb {
 		apb {
+			spi0: spi at f0000000 {
+				status = "disabled";
+			};
+
+			mmc1: mmc at f000c000 {
+				status = "disabled";
+			};
+
+			i2c0: i2c at f8010000 {
+				ov2640: camera at 0x30 {
+					status = "okay";
+				};
+			};
+
 			macb0: ethernet at f802c000 {
 				phy-mode = "rmii";
 				status = "okay";
 			};
 		};
+
+		isi: isi at f8048000 {
+			status = "okay";
+		};
 	};
 };
Signature · 1 line
1.9.1
author
#4 lore raw

PATCH 4/4 ARM: at91: at91_dt_defconfig: enable ISI and ov2640 support

In reply to Josh Wu

Add ISI and ov2640 support in at91_dt_defconfig file.

---

 arch/arm/configs/at91_dt_defconfig | 6 ++++++
 1 file changed, 6 insertions(+)
arch/arm/configs/at91_dt_defconfig +6 -0
index a67375f..de4e1a5 100644
@@ -135,6 +135,12 @@ CONFIG_POWER_RESET=y
 CONFIG_WATCHDOG=y
 CONFIG_AT91SAM9X_WATCHDOG=y
 CONFIG_SSB=m
+CONFIG_MEDIA_SUPPORT=y
+CONFIG_MEDIA_CAMERA_SUPPORT=y
+CONFIG_V4L_PLATFORM_DRIVERS=y
+CONFIG_SOC_CAMERA=y
+CONFIG_VIDEO_ATMEL_ISI=y
+CONFIG_SOC_CAMERA_OV2640=y
 CONFIG_FB=y
 CONFIG_FB_ATMEL=y
 CONFIG_BACKLIGHT_LCD_SUPPORT=y
Signature · 1 line
1.9.1
#5 lore raw

cover ARM: at91: at91sam9x5: enable ISI and ov2640 support

In reply to Josh Wu
Quoted 2 lines · On Thu, 12 Feb 2015 16:06:22 +0800 Josh Wu <[email protected]> wrote:

This patch series will enable ISI and ov2640 sensor support for at91sam9g25ek board.

This series looks good to me.

Quoted 16 lines

Josh Wu (4):
ARM: at91: at91sam9x5/dts: add ISI dt support, include isi node,
pinctrls
ARM: at91: at91sam9x5ek/dts: add ov2640 support
ARM: at91: at91sam9g25ek/dts: enable ISI and ov2640
ARM: at91: at91_dt_defconfig: enable ISI and ov2640 support

 arch/arm/boot/dts/at91sam9g25.dtsi    |  1 +
 arch/arm/boot/dts/at91sam9g25ek.dts   | 18 +++++++++++++
 arch/arm/boot/dts/at91sam9x5_isi.dtsi | 46 +++++++++++++++++++++++++++++++++
 arch/arm/boot/dts/at91sam9x5ek.dtsi   | 48 +++++++++++++++++++++++++++++++++++
 arch/arm/configs/at91_dt_defconfig    |  6 +++++
 5 files changed, 119 insertions(+)
Signature · 3 lines
Boris Brezillon, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
#6 lore raw

cover ARM: at91: at91sam9x5: enable ISI and ov2640 support

Le 12/02/2015 10:08, Boris Brezillon a ?crit :

Quoted 9 lines
Quoted 2 lines · On Thu, 12 Feb 2015 16:06:22 +0800 Josh Wu <[email protected]> wrote:

This patch series will enable ISI and ov2640 sensor support for at91sam9g25ek board.

This series looks good to me.

3 first patches stacked on top of at91-4.1-dt. Last one on at91-4.1-defconfig.

Thank, bye.

Quoted 17 lines
Quoted 14 lines

Josh Wu (4):
ARM: at91: at91sam9x5/dts: add ISI dt support, include isi node,
pinctrls
ARM: at91: at91sam9x5ek/dts: add ov2640 support
ARM: at91: at91sam9g25ek/dts: enable ISI and ov2640
ARM: at91: at91_dt_defconfig: enable ISI and ov2640 support

 arch/arm/boot/dts/at91sam9g25.dtsi    |  1 +
 arch/arm/boot/dts/at91sam9g25ek.dts   | 18 +++++++++++++
 arch/arm/boot/dts/at91sam9x5_isi.dtsi | 46 +++++++++++++++++++++++++++++++++
 arch/arm/boot/dts/at91sam9x5ek.dtsi   | 48 +++++++++++++++++++++++++++++++++++
 arch/arm/configs/at91_dt_defconfig    |  6 +++++
 5 files changed, 119 insertions(+)
Signature · 1 line
Nicolas Ferre