ARM: at91/dt: add isi & ov2640 dt nodes for at91sam9m10g45ek board
authorJosh Wu <josh.wu@atmel.com>
Tue, 16 Jun 2015 10:08:34 +0000 (18:08 +0800)
committerNicolas Ferre <nicolas.ferre@atmel.com>
Thu, 30 Jul 2015 12:09:21 +0000 (14:09 +0200)
First we group the isi data pins, and for now we only use 0~7 data pins
with HSYNC and VSYNC.
Also add the link for atmel-isi and ov2640 sensor node.

Signed-off-by: Josh Wu <josh.wu@atmel.com>
[nicolas.ferre@atmel.com: move the pinctrl properties in board .dts file]
Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
arch/arm/boot/dts/at91sam9g45.dtsi
arch/arm/boot/dts/at91sam9m10g45ek.dts

index 18177f5a7464200453c9a82415b08bc73e6a6703..4268341b0ebba290fa6299ea5df0adfd0470a99d 100644 (file)
                                };
 
                                isi {
-                                       pinctrl_isi: isi-0 {
-                                               atmel,pins = <AT91_PIOB 8 AT91_PERIPH_B AT91_PINCTRL_NONE /* D8 */
-                                                             AT91_PIOB 9 AT91_PERIPH_B AT91_PINCTRL_NONE /* D9 */
-                                                             AT91_PIOB 10 AT91_PERIPH_B AT91_PINCTRL_NONE /* D10 */
-                                                             AT91_PIOB 11 AT91_PERIPH_B AT91_PINCTRL_NONE /* D11 */
-                                                             AT91_PIOB 20 AT91_PERIPH_A AT91_PINCTRL_NONE /* D0 */
-                                                             AT91_PIOB 21 AT91_PERIPH_A AT91_PINCTRL_NONE /* D1 */
-                                                             AT91_PIOB 22 AT91_PERIPH_A AT91_PINCTRL_NONE /* D2 */
-                                                             AT91_PIOB 23 AT91_PERIPH_A AT91_PINCTRL_NONE /* D3 */
-                                                             AT91_PIOB 24 AT91_PERIPH_A AT91_PINCTRL_NONE /* D4 */
-                                                             AT91_PIOB 25 AT91_PERIPH_A AT91_PINCTRL_NONE /* D5 */
-                                                             AT91_PIOB 26 AT91_PERIPH_A AT91_PINCTRL_NONE /* D6 */
-                                                             AT91_PIOB 27 AT91_PERIPH_A AT91_PINCTRL_NONE /* D7 */
-                                                             AT91_PIOB 28 AT91_PERIPH_A AT91_PINCTRL_NONE /* PCK */
-                                                             AT91_PIOB 29 AT91_PERIPH_A AT91_PINCTRL_NONE /* VSYNC */
-                                                             AT91_PIOB 30 AT91_PERIPH_A AT91_PINCTRL_NONE /* HSYNC */
-                                                             AT91_PIOB 31 AT91_PERIPH_A AT91_PINCTRL_NONE /* MCK */>;
+                                       pinctrl_isi_data_0_7: isi-0-data-0-7 {
+                                               atmel,pins =
+                                                       <AT91_PIOB 20 AT91_PERIPH_A AT91_PINCTRL_NONE /* D0 */
+                                                       AT91_PIOB 21 AT91_PERIPH_A AT91_PINCTRL_NONE /* D1 */
+                                                       AT91_PIOB 22 AT91_PERIPH_A AT91_PINCTRL_NONE /* D2 */
+                                                       AT91_PIOB 23 AT91_PERIPH_A AT91_PINCTRL_NONE /* D3 */
+                                                       AT91_PIOB 24 AT91_PERIPH_A AT91_PINCTRL_NONE /* D4 */
+                                                       AT91_PIOB 25 AT91_PERIPH_A AT91_PINCTRL_NONE /* D5 */
+                                                       AT91_PIOB 26 AT91_PERIPH_A AT91_PINCTRL_NONE /* D6 */
+                                                       AT91_PIOB 27 AT91_PERIPH_A AT91_PINCTRL_NONE /* D7 */
+                                                       AT91_PIOB 28 AT91_PERIPH_A AT91_PINCTRL_NONE /* PCK */
+                                                       AT91_PIOB 29 AT91_PERIPH_A AT91_PINCTRL_NONE /* VSYNC */
+                                                       AT91_PIOB 30 AT91_PERIPH_A AT91_PINCTRL_NONE>; /* HSYNC */
+                                       };
+
+                                       pinctrl_isi_data_8_9: isi-0-data-8-9 {
+                                               atmel,pins =
+                                                       <AT91_PIOB 8 AT91_PERIPH_B AT91_PINCTRL_NONE /* D8 */
+                                                       AT91_PIOB 9 AT91_PERIPH_B AT91_PINCTRL_NONE>; /* D9 */
+                                       };
+
+                                       pinctrl_isi_data_10_11: isi-0-data-10-11 {
+                                               atmel,pins =
+                                                       <AT91_PIOB 10 AT91_PERIPH_B AT91_PINCTRL_NONE /* D10 */
+                                                       AT91_PIOB 11 AT91_PERIPH_B AT91_PINCTRL_NONE>; /* D11 */
                                        };
                                };
 
                                interrupts = <26 IRQ_TYPE_LEVEL_HIGH 5>;
                                clocks = <&isi_clk>;
                                clock-names = "isi_clk";
-                               pinctrl-names = "default";
-                               pinctrl-0 = <&pinctrl_isi>;
                                status = "disabled";
+                               port {
+                                       #address-cells = <1>;
+                                       #size-cells = <0>;
+                               };
                        };
 
                        pwm0: pwm@fffb8000 {
index 1375d33626031d03829b53213502f530e9034f66..d1ae60a855d492ad45209df921e5004e7998796e 100644 (file)
 
                        i2c0: i2c@fff84000 {
                                status = "okay";
+                               ov2640: camera@30 {
+                                       compatible = "ovti,ov2640";
+                                       reg = <0x30>;
+                                       pinctrl-names = "default";
+                                       pinctrl-0 = <&pinctrl_pck1_as_isi_mck &pinctrl_sensor_power &pinctrl_sensor_reset>;
+                                       resetb-gpios = <&pioD 12 GPIO_ACTIVE_LOW>;
+                                       pwdn-gpios = <&pioD 13 GPIO_ACTIVE_HIGH>;
+                                       clocks = <&pck1>;
+                                       clock-names = "xvclk";
+                                       assigned-clocks = <&pck1>;
+                                       assigned-clock-rates = <25000000>;
+
+                                       port {
+                                               ov2640_0: endpoint {
+                                                       remote-endpoint = <&isi_0>;
+                                                       bus-width = <8>;
+                                               };
+                                       };
+                               };
                        };
 
                        i2c1: i2c@fff88000 {
                        };
 
                        pinctrl@fffff200 {
+                               camera_sensor {
+                                       pinctrl_pck1_as_isi_mck: pck1_as_isi_mck-0 {
+                                               atmel,pins =
+                                                       <AT91_PIOB 31 AT91_PERIPH_B AT91_PINCTRL_NONE>;
+                                       };
+
+                                       pinctrl_sensor_reset: sensor_reset-0 {
+                                               atmel,pins =
+                                                       <AT91_PIOD 12 AT91_PERIPH_GPIO AT91_PINCTRL_NONE>;
+                                       };
+
+                                       pinctrl_sensor_power: sensor_power-0 {
+                                               atmel,pins =
+                                                       <AT91_PIOD 13 AT91_PERIPH_GPIO AT91_PINCTRL_NONE>;
+                                       };
+                               };
                                mmc0 {
                                        pinctrl_board_mmc0: mmc0-board {
                                                atmel,pins =
                                status = "okay";
                        };
 
+                       isi@fffb4000 {
+                               pinctrl-names = "default";
+                               pinctrl-0 = <&pinctrl_isi_data_0_7>;
+                               status = "okay";
+                               port {
+                                       isi_0: endpoint {
+                                               remote-endpoint = <&ov2640_0>;
+                                               bus-width = <8>;
+                                       };
+                               };
+                       };
+
                        pwm0: pwm@fffb8000 {
                                status = "okay";