From cbaa29c4c3a7b880d196c15b41fc20dcfdac9ac1 Mon Sep 17 00:00:00 2001 From: Bo Shen Date: Sun, 4 Jan 2015 17:02:27 +0800 Subject: ARM: at91: dts: sama5d3: split isi pinctrl As the ISI has 12 data lines, however we only use 8 data lines with sensor module. So, split the data line into two groups which make it can be choosed depends on the hardware design. Signed-off-by: Bo Shen Acked-by: Alexandre Belloni Signed-off-by: Josh Wu Signed-off-by: Nicolas Ferre --- arch/arm/boot/dts/sama5d3xmb.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'arch/arm/boot/dts/sama5d3xmb.dtsi') diff --git a/arch/arm/boot/dts/sama5d3xmb.dtsi b/arch/arm/boot/dts/sama5d3xmb.dtsi index 49c10d33df30..2530541680e7 100644 --- a/arch/arm/boot/dts/sama5d3xmb.dtsi +++ b/arch/arm/boot/dts/sama5d3xmb.dtsi @@ -61,7 +61,7 @@ isi: isi@f0034000 { pinctrl-names = "default"; - pinctrl-0 = <&pinctrl_isi &pinctrl_isi_pck_as_mck &pinctrl_isi_power &pinctrl_isi_reset>; + pinctrl-0 = <&pinctrl_isi_data_0_7 &pinctrl_isi_pck_as_mck &pinctrl_isi_power &pinctrl_isi_reset>; }; mmc1: mmc@f8000000 { -- cgit v1.2.3 From 24fe3f02c0bfae19736f454bc76a9863a0c76e5d Mon Sep 17 00:00:00 2001 From: Bo Shen Date: Sun, 4 Jan 2015 17:02:29 +0800 Subject: ARM: at91: dts: sama5d3: move the isi mck pin to mb The mck is decided by the board design, move it to mb related dtsi file. Signed-off-by: Bo Shen Acked-by: Alexandre Belloni Signed-off-by: Josh Wu Signed-off-by: Nicolas Ferre --- arch/arm/boot/dts/sama5d3xmb.dtsi | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'arch/arm/boot/dts/sama5d3xmb.dtsi') diff --git a/arch/arm/boot/dts/sama5d3xmb.dtsi b/arch/arm/boot/dts/sama5d3xmb.dtsi index 2530541680e7..6af1cbab3572 100644 --- a/arch/arm/boot/dts/sama5d3xmb.dtsi +++ b/arch/arm/boot/dts/sama5d3xmb.dtsi @@ -117,6 +117,11 @@ ; /* PD30 periph B */ }; + pinctrl_isi_pck_as_mck: isi_pck_as_mck-0 { + atmel,pins = + ; /* PD31 periph B ISI_MCK */ + }; + pinctrl_isi_reset: isi_reset-0 { atmel,pins = ; /* PE24 gpio */ -- cgit v1.2.3 From 97889b14ed6f18e85dedca32116c2e4502b445c6 Mon Sep 17 00:00:00 2001 From: Josh Wu Date: Sun, 4 Jan 2015 17:02:30 +0800 Subject: ARM: at91: dts: sama5d3: change name of pinctrl_isi_{power,reset} For sama5d3xmb board, the pins: pinctrl_isi_{power,reset} is used to power-down or reset camera sensor. So we should let camera sensor instead of ISI to configure the pins. This patch will change pinctrl name from pinctrl_isi_{power,reset} to pinctrl_sensor_{power,reset}. And remove these two pinctrl from ISI's DT node. We will add these two pinctrl to sensor's DT node. Signed-off-by: Josh Wu Acked-by: Alexandre Belloni Signed-off-by: Nicolas Ferre --- arch/arm/boot/dts/sama5d3xmb.dtsi | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'arch/arm/boot/dts/sama5d3xmb.dtsi') diff --git a/arch/arm/boot/dts/sama5d3xmb.dtsi b/arch/arm/boot/dts/sama5d3xmb.dtsi index 6af1cbab3572..db47f8b81837 100644 --- a/arch/arm/boot/dts/sama5d3xmb.dtsi +++ b/arch/arm/boot/dts/sama5d3xmb.dtsi @@ -61,7 +61,7 @@ isi: isi@f0034000 { pinctrl-names = "default"; - pinctrl-0 = <&pinctrl_isi_data_0_7 &pinctrl_isi_pck_as_mck &pinctrl_isi_power &pinctrl_isi_reset>; + pinctrl-0 = <&pinctrl_isi_data_0_7 &pinctrl_isi_pck_as_mck>; }; mmc1: mmc@f8000000 { @@ -122,12 +122,12 @@ ; /* PD31 periph B ISI_MCK */ }; - pinctrl_isi_reset: isi_reset-0 { + pinctrl_sensor_reset: sensor_reset-0 { atmel,pins = ; /* PE24 gpio */ }; - pinctrl_isi_power: isi_power-0 { + pinctrl_sensor_power: sensor_power-0 { atmel,pins = ; /* PE29 gpio */ }; -- cgit v1.2.3 From fbe18601a521d2ac2a6190107970a4e882a06a5d Mon Sep 17 00:00:00 2001 From: Josh Wu Date: Sun, 4 Jan 2015 17:02:31 +0800 Subject: ARM: at91: dts: sama5d3: change name of pinctrl of ISI_MCK For sama5d3xmb board, the pins: pinctrl_isi_pck_as_mck is pck1, and used to provide MCK for camera sensor. We change its name to: pinctrl_pck1_as_isi_mck. As we want camera sensor instead of ISI to configure the pck1 (ISI_MCK) pin. So we remove this pinctrl from ISI DT node. It will be added in sensor's DT node. Signed-off-by: Josh Wu Acked-by: Alexandre Belloni Signed-off-by: Nicolas Ferre --- arch/arm/boot/dts/sama5d3xmb.dtsi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'arch/arm/boot/dts/sama5d3xmb.dtsi') diff --git a/arch/arm/boot/dts/sama5d3xmb.dtsi b/arch/arm/boot/dts/sama5d3xmb.dtsi index db47f8b81837..d9464fce4c0e 100644 --- a/arch/arm/boot/dts/sama5d3xmb.dtsi +++ b/arch/arm/boot/dts/sama5d3xmb.dtsi @@ -61,7 +61,7 @@ isi: isi@f0034000 { pinctrl-names = "default"; - pinctrl-0 = <&pinctrl_isi_data_0_7 &pinctrl_isi_pck_as_mck>; + pinctrl-0 = <&pinctrl_isi_data_0_7>; }; mmc1: mmc@f8000000 { @@ -117,7 +117,7 @@ ; /* PD30 periph B */ }; - pinctrl_isi_pck_as_mck: isi_pck_as_mck-0 { + pinctrl_pck1_as_isi_mck: pck1_as_isi_mck-0 { atmel,pins = ; /* PD31 periph B ISI_MCK */ }; -- cgit v1.2.3 From 4dd32e6d24932b0b0327d3a8ce526a56446e9b98 Mon Sep 17 00:00:00 2001 From: Josh Wu Date: Wed, 14 Jan 2015 10:41:54 +0800 Subject: ARM: at91: dts: sama5d3: add ov2640 camera sensor support According to v4l2 dt document, we add: a camera host: ISI port. a i2c camera sensor: ov2640 port. to sama5d3xmb.dtsi. The ov2640 node defines the pinctrls, clocks and refer to isi port. The ISI node also has a reference to the ov2640 port. Signed-off-by: Josh Wu Acked-by: Alexandre Belloni Signed-off-by: Nicolas Ferre --- arch/arm/boot/dts/sama5d3xmb.dtsi | 31 +++++++++++++++++++++++++++++-- 1 file changed, 29 insertions(+), 2 deletions(-) (limited to 'arch/arm/boot/dts/sama5d3xmb.dtsi') diff --git a/arch/arm/boot/dts/sama5d3xmb.dtsi b/arch/arm/boot/dts/sama5d3xmb.dtsi index d9464fce4c0e..9fdb8a07b145 100644 --- a/arch/arm/boot/dts/sama5d3xmb.dtsi +++ b/arch/arm/boot/dts/sama5d3xmb.dtsi @@ -52,6 +52,29 @@ }; }; + i2c1: i2c@f0018000 { + ov2640: camera@0x30 { + compatible = "ovti,ov2640"; + reg = <0x30>; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_pck1_as_isi_mck &pinctrl_sensor_power &pinctrl_sensor_reset>; + resetb-gpios = <&pioE 24 GPIO_ACTIVE_LOW>; + pwdn-gpios = <&pioE 29 GPIO_ACTIVE_HIGH>; + /* use pck1 for the master clock of ov2640 */ + clocks = <&pck1>; + clock-names = "xvclk"; + assigned-clocks = <&pck1>; + assigned-clock-rates = <25000000>; + + port { + ov2640_0: endpoint { + remote-endpoint = <&isi_0>; + bus-width = <8>; + }; + }; + }; + }; + usart1: serial@f0020000 { dmas = <0>, <0>; /* Do not use DMA for usart1 */ pinctrl-names = "default"; @@ -60,8 +83,12 @@ }; isi: isi@f0034000 { - pinctrl-names = "default"; - pinctrl-0 = <&pinctrl_isi_data_0_7>; + port { + isi_0: endpoint { + remote-endpoint = <&ov2640_0>; + bus-width = <8>; + }; + }; }; mmc1: mmc@f8000000 { -- cgit v1.2.3