* [PATCH 1/2] arm64: dts: allwinner: a64: Add pinmux setting for CSI MCLK on PE1 @ 2019-04-18 8:38 Jagan Teki 2019-04-18 8:38 ` [PATCH 2/2] arm64: dts: allwinner: a64-amarula-relic: Add OV5640 camera node Jagan Teki 2019-04-18 11:20 ` [PATCH 1/2] arm64: dts: allwinner: a64: Add pinmux setting for CSI MCLK on PE1 Maxime Ripard 0 siblings, 2 replies; 4+ messages in thread From: Jagan Teki @ 2019-04-18 8:38 UTC (permalink / raw) To: Maxime Ripard, Chen-Yu Tsai, Rob Herring, Mark Rutland Cc: devicetree, linux-kernel, Jagan Teki, Michael Trimarchi, linux-amarula, linux-arm-kernel Some camera modules have the SoC feeding a master clock to the sensor instead of having a standalone crystal. This clock signal is generated from the clock control unit and output from the CSI MCLK function of pin PE1. Add a pinmux setting for it for camera sensors to reference. Signed-off-by: Jagan Teki <jagan@amarulasolutions.com> --- arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi index 6f27eb082429..6f4e00ec9c68 100644 --- a/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi +++ b/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi @@ -597,6 +597,11 @@ function = "csi"; }; + csi_mclk_pin: csi-mclk { + pins = "PE1"; + function = "csi"; + }; + i2c0_pins: i2c0-pins { pins = "PH0", "PH1"; function = "i2c0"; -- 2.18.0.321.gffc6fa0e3 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel ^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH 2/2] arm64: dts: allwinner: a64-amarula-relic: Add OV5640 camera node 2019-04-18 8:38 [PATCH 1/2] arm64: dts: allwinner: a64: Add pinmux setting for CSI MCLK on PE1 Jagan Teki @ 2019-04-18 8:38 ` Jagan Teki 2019-04-18 11:20 ` Maxime Ripard 2019-04-18 11:20 ` [PATCH 1/2] arm64: dts: allwinner: a64: Add pinmux setting for CSI MCLK on PE1 Maxime Ripard 1 sibling, 1 reply; 4+ messages in thread From: Jagan Teki @ 2019-04-18 8:38 UTC (permalink / raw) To: Maxime Ripard, Chen-Yu Tsai, Rob Herring, Mark Rutland Cc: devicetree, linux-kernel, Jagan Teki, Michael Trimarchi, linux-amarula, linux-arm-kernel Amarula A64-Relic board by default bound with OV5640 camera, so add support for it with below pin information. - PE13, PE12 via i2c-gpio bitbanging - CLK_CSI_MCLK as external clock - PE1 as external clock pin muxing - ALDO1 as AVDD supply - DLDO3 as DOVDD supply - ELDO3 as DVDD supply - PE14 gpio for reset pin - PE15 gpio for powerdown pin Signed-off-by: Jagan Teki <jagan@amarulasolutions.com> --- .../allwinner/sun50i-a64-amarula-relic.dts | 53 +++++++++++++++++++ 1 file changed, 53 insertions(+) diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-amarula-relic.dts b/arch/arm64/boot/dts/allwinner/sun50i-a64-amarula-relic.dts index 3819ce396073..56c76b712e3b 100644 --- a/arch/arm64/boot/dts/allwinner/sun50i-a64-amarula-relic.dts +++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-amarula-relic.dts @@ -22,6 +22,41 @@ stdout-path = "serial0:115200n8"; }; + i2c-csi { + compatible = "i2c-gpio"; + sda-gpios = <&pio 4 13 GPIO_ACTIVE_HIGH>; /* CSI-SDA: PE13 */ + scl-gpios = <&pio 4 12 GPIO_ACTIVE_HIGH>; /* CSI-SCK: PE12 */ + 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 = <®_aldo1>; + DOVDD-supply = <®_dldo3>; + DVDD-supply = <®_eldo3>; + reset-gpios = <&pio 4 14 GPIO_ACTIVE_LOW>; /* CSI-RST-R: PE14 */ + powerdown-gpios = <&pio 4 15 GPIO_ACTIVE_HIGH>; /* CSI-STBY-R: PE15 */ + + 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 */ + }; + }; + }; + }; + wifi_pwrseq: wifi-pwrseq { compatible = "mmc-pwrseq-simple"; clocks = <&rtc 1>; @@ -30,6 +65,24 @@ }; }; +&csi { + status = "okay"; + + port { + #address-cells = <1>; + #size-cells = <0>; + + 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 */ + }; + }; +}; + &ehci0 { status = "okay"; }; -- 2.18.0.321.gffc6fa0e3 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel ^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH 2/2] arm64: dts: allwinner: a64-amarula-relic: Add OV5640 camera node 2019-04-18 8:38 ` [PATCH 2/2] arm64: dts: allwinner: a64-amarula-relic: Add OV5640 camera node Jagan Teki @ 2019-04-18 11:20 ` Maxime Ripard 0 siblings, 0 replies; 4+ messages in thread From: Maxime Ripard @ 2019-04-18 11:20 UTC (permalink / raw) To: Jagan Teki Cc: Mark Rutland, devicetree, linux-kernel, Chen-Yu Tsai, Rob Herring, Michael Trimarchi, linux-amarula, linux-arm-kernel [-- Attachment #1.1: Type: text/plain, Size: 2558 bytes --] Hi, On Thu, Apr 18, 2019 at 02:08:13PM +0530, Jagan Teki wrote: > Amarula A64-Relic board by default bound with OV5640 camera, > so add support for it with below pin information. > > - PE13, PE12 via i2c-gpio bitbanging > - CLK_CSI_MCLK as external clock > - PE1 as external clock pin muxing > - ALDO1 as AVDD supply > - DLDO3 as DOVDD supply > - ELDO3 as DVDD supply > - PE14 gpio for reset pin > - PE15 gpio for powerdown pin > > Signed-off-by: Jagan Teki <jagan@amarulasolutions.com> > --- > > .../allwinner/sun50i-a64-amarula-relic.dts | 53 +++++++++++++++++++ > 1 file changed, 53 insertions(+) > > diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-amarula-relic.dts b/arch/arm64/boot/dts/allwinner/sun50i-a64-amarula-relic.dts > index 3819ce396073..56c76b712e3b 100644 > --- a/arch/arm64/boot/dts/allwinner/sun50i-a64-amarula-relic.dts > +++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-amarula-relic.dts > @@ -22,6 +22,41 @@ > stdout-path = "serial0:115200n8"; > }; > > + i2c-csi { That node should be named i2c > + compatible = "i2c-gpio"; > + sda-gpios = <&pio 4 13 GPIO_ACTIVE_HIGH>; /* CSI-SDA: PE13 */ > + scl-gpios = <&pio 4 12 GPIO_ACTIVE_HIGH>; /* CSI-SCK: PE12 */ There's no need to document what those pins are here for, it's already in the property name. > + 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 = <®_aldo1>; > + DOVDD-supply = <®_dldo3>; > + DVDD-supply = <®_eldo3>; > + reset-gpios = <&pio 4 14 GPIO_ACTIVE_LOW>; /* CSI-RST-R: PE14 */ > + powerdown-gpios = <&pio 4 15 GPIO_ACTIVE_HIGH>; /* CSI-STBY-R: PE15 */ > + > + 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 */ > + }; > + }; > + }; > + }; > + > wifi_pwrseq: wifi-pwrseq { > compatible = "mmc-pwrseq-simple"; > clocks = <&rtc 1>; > @@ -30,6 +65,24 @@ > }; > }; > > +&csi { > + status = "okay"; > + > + port { > + #address-cells = <1>; > + #size-cells = <0>; This isn't needed, you don't have a reg property in your child node. Maxime -- Maxime Ripard, Bootlin Embedded Linux and Kernel engineering https://bootlin.com [-- Attachment #1.2: signature.asc --] [-- Type: application/pgp-signature, Size: 228 bytes --] [-- Attachment #2: Type: text/plain, Size: 176 bytes --] _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 1/2] arm64: dts: allwinner: a64: Add pinmux setting for CSI MCLK on PE1 2019-04-18 8:38 [PATCH 1/2] arm64: dts: allwinner: a64: Add pinmux setting for CSI MCLK on PE1 Jagan Teki 2019-04-18 8:38 ` [PATCH 2/2] arm64: dts: allwinner: a64-amarula-relic: Add OV5640 camera node Jagan Teki @ 2019-04-18 11:20 ` Maxime Ripard 1 sibling, 0 replies; 4+ messages in thread From: Maxime Ripard @ 2019-04-18 11:20 UTC (permalink / raw) To: Jagan Teki Cc: Mark Rutland, devicetree, linux-kernel, Chen-Yu Tsai, Rob Herring, Michael Trimarchi, linux-amarula, linux-arm-kernel [-- Attachment #1.1: Type: text/plain, Size: 1044 bytes --] On Thu, Apr 18, 2019 at 02:08:12PM +0530, Jagan Teki wrote: > Some camera modules have the SoC feeding a master clock to the sensor > instead of having a standalone crystal. This clock signal is generated > from the clock control unit and output from the CSI MCLK function of > pin PE1. > > Add a pinmux setting for it for camera sensors to reference. > > Signed-off-by: Jagan Teki <jagan@amarulasolutions.com> > --- > arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi | 5 +++++ > 1 file changed, 5 insertions(+) > > diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi > index 6f27eb082429..6f4e00ec9c68 100644 > --- a/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi > +++ b/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi > @@ -597,6 +597,11 @@ > function = "csi"; > }; > > + csi_mclk_pin: csi-mclk { The name of the pin should be ending with -pin, and please add /omit-if-no-ref/ Thanks! Maxime -- Maxime Ripard, Bootlin Embedded Linux and Kernel engineering https://bootlin.com [-- Attachment #1.2: signature.asc --] [-- Type: application/pgp-signature, Size: 228 bytes --] [-- Attachment #2: Type: text/plain, Size: 176 bytes --] _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2019-04-18 11:21 UTC | newest] Thread overview: 4+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2019-04-18 8:38 [PATCH 1/2] arm64: dts: allwinner: a64: Add pinmux setting for CSI MCLK on PE1 Jagan Teki 2019-04-18 8:38 ` [PATCH 2/2] arm64: dts: allwinner: a64-amarula-relic: Add OV5640 camera node Jagan Teki 2019-04-18 11:20 ` Maxime Ripard 2019-04-18 11:20 ` [PATCH 1/2] arm64: dts: allwinner: a64: Add pinmux setting for CSI MCLK on PE1 Maxime Ripard
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).