* [PATCH v3 0/6] media/sun6i: Allwinner A64 CSI support
@ 2018-12-10 11:52 Jagan Teki
2018-12-10 11:52 ` [PATCH v3 1/6] dt-bindings: media: sun6i: Add A64 CSI compatible Jagan Teki
` (5 more replies)
0 siblings, 6 replies; 11+ messages in thread
From: Jagan Teki @ 2018-12-10 11:52 UTC (permalink / raw)
To: Yong Deng, Mauro Carvalho Chehab, Maxime Ripard, Rob Herring,
Mark Rutland, Chen-Yu Tsai, linux-media, linux-arm-kernel,
devicetree, linux-kernel, linux-sunxi, linux-amarula,
Michael Trimarchi
Cc: Jagan Teki
This series support CSI on Allwinner A64.
Allwinner A64 CSI has single channel time-multiplexed BT.656
CMOS sensor interface like H3 but work by lowering clock than
default mod clock.
Changes for v3:
- update dt-bindings for A64
- set mod clock via csi driver
- remove assign clocks from dtsi
- remove i2c-gpio opendrian
- fix avdd and dovdd supplies
- remove vcc-csi pin group supply
Note: This series created on top of H3 changes [1]
[1] https://patchwork.kernel.org/cover/10705905/
Any inputs,
Jagan.
Jagan Teki (6):
dt-bindings: media: sun6i: Add A64 CSI compatible
media: sun6i: Add A64 compatible support
media: sun6i: Set 300MHz mod clock for A64
arm64: dts: allwinner: a64: Add A64 CSI controller
arm64: dts: allwinner: a64: Add pinmux setting for CSI MCLK on PE1
arm64: dts: allwinner: a64-amarula-relic: Add OV5640 camera node
.../devicetree/bindings/media/sun6i-csi.txt | 1 +
.../allwinner/sun50i-a64-amarula-relic.dts | 53 +++++++++++++++++++
arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi | 25 +++++++++
.../platform/sunxi/sun6i-csi/sun6i_csi.c | 6 +++
4 files changed, 85 insertions(+)
--
2.18.0.321.gffc6fa0e3
^ permalink raw reply [flat|nested] 11+ messages in thread
* [PATCH v3 1/6] dt-bindings: media: sun6i: Add A64 CSI compatible
2018-12-10 11:52 [PATCH v3 0/6] media/sun6i: Allwinner A64 CSI support Jagan Teki
@ 2018-12-10 11:52 ` Jagan Teki
2018-12-10 23:24 ` Rob Herring
2018-12-10 11:52 ` [PATCH v3 2/6] media: sun6i: Add A64 compatible support Jagan Teki
` (4 subsequent siblings)
5 siblings, 1 reply; 11+ messages in thread
From: Jagan Teki @ 2018-12-10 11:52 UTC (permalink / raw)
To: Yong Deng, Mauro Carvalho Chehab, Maxime Ripard, Rob Herring,
Mark Rutland, Chen-Yu Tsai, linux-media, linux-arm-kernel,
devicetree, linux-kernel, linux-sunxi, linux-amarula,
Michael Trimarchi
Cc: Jagan Teki
Allwinner A64 CSI has single channel time-multiplexed BT.656
CMOS sensor interface like H3 but work by lowering clock than
default mod clock.
Add a compatible string for it.
Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
---
Documentation/devicetree/bindings/media/sun6i-csi.txt | 1 +
1 file changed, 1 insertion(+)
diff --git a/Documentation/devicetree/bindings/media/sun6i-csi.txt b/Documentation/devicetree/bindings/media/sun6i-csi.txt
index cc37cf7fd051..376aade669a1 100644
--- a/Documentation/devicetree/bindings/media/sun6i-csi.txt
+++ b/Documentation/devicetree/bindings/media/sun6i-csi.txt
@@ -7,6 +7,7 @@ Required properties:
- compatible: value must be one of:
* "allwinner,sun6i-a31-csi"
* "allwinner,sun8i-h3-csi"
+ * "allwinner,sun50i-a64-csi"
* "allwinner,sun8i-v3s-csi"
- reg: base address and size of the memory-mapped region.
- interrupts: interrupt associated to this IP
--
2.18.0.321.gffc6fa0e3
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [PATCH v3 2/6] media: sun6i: Add A64 compatible support
2018-12-10 11:52 [PATCH v3 0/6] media/sun6i: Allwinner A64 CSI support Jagan Teki
2018-12-10 11:52 ` [PATCH v3 1/6] dt-bindings: media: sun6i: Add A64 CSI compatible Jagan Teki
@ 2018-12-10 11:52 ` Jagan Teki
2018-12-11 15:43 ` Maxime Ripard
2018-12-10 11:52 ` [PATCH v3 3/6] media: sun6i: Set 300MHz mod clock for A64 Jagan Teki
` (3 subsequent siblings)
5 siblings, 1 reply; 11+ messages in thread
From: Jagan Teki @ 2018-12-10 11:52 UTC (permalink / raw)
To: Yong Deng, Mauro Carvalho Chehab, Maxime Ripard, Rob Herring,
Mark Rutland, Chen-Yu Tsai, linux-media, linux-arm-kernel,
devicetree, linux-kernel, linux-sunxi, linux-amarula,
Michael Trimarchi
Cc: Jagan Teki
Allwinner A64 CSI has single channel time-multiplexed BT.656
CMOS sensor interface like H3 but work by lowering clock than
default mod clock.
So use separate compatibe to support it.
Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
---
drivers/media/platform/sunxi/sun6i-csi/sun6i_csi.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/media/platform/sunxi/sun6i-csi/sun6i_csi.c b/drivers/media/platform/sunxi/sun6i-csi/sun6i_csi.c
index ee882b66a5ea..bbe45e893722 100644
--- a/drivers/media/platform/sunxi/sun6i-csi/sun6i_csi.c
+++ b/drivers/media/platform/sunxi/sun6i-csi/sun6i_csi.c
@@ -892,6 +892,7 @@ static int sun6i_csi_remove(struct platform_device *pdev)
}
static const struct of_device_id sun6i_csi_of_match[] = {
+ { .compatible = "allwinner,sun50i-a64-csi", },
{ .compatible = "allwinner,sun6i-a31-csi", },
{ .compatible = "allwinner,sun8i-h3-csi", },
{ .compatible = "allwinner,sun8i-v3s-csi", },
--
2.18.0.321.gffc6fa0e3
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [PATCH v3 3/6] media: sun6i: Set 300MHz mod clock for A64
2018-12-10 11:52 [PATCH v3 0/6] media/sun6i: Allwinner A64 CSI support Jagan Teki
2018-12-10 11:52 ` [PATCH v3 1/6] dt-bindings: media: sun6i: Add A64 CSI compatible Jagan Teki
2018-12-10 11:52 ` [PATCH v3 2/6] media: sun6i: Add A64 compatible support Jagan Teki
@ 2018-12-10 11:52 ` Jagan Teki
2018-12-11 15:44 ` Maxime Ripard
2018-12-10 11:52 ` [PATCH v3 4/6] arm64: dts: allwinner: a64: Add A64 CSI controller Jagan Teki
` (2 subsequent siblings)
5 siblings, 1 reply; 11+ messages in thread
From: Jagan Teki @ 2018-12-10 11:52 UTC (permalink / raw)
To: Yong Deng, Mauro Carvalho Chehab, Maxime Ripard, Rob Herring,
Mark Rutland, Chen-Yu Tsai, linux-media, linux-arm-kernel,
devicetree, linux-kernel, linux-sunxi, linux-amarula,
Michael Trimarchi
Cc: Jagan Teki
The default CSI_SCLK seems unable to drive the sensor to capture
the image, so update it to working clock rate 300MHz for A64.
Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
---
drivers/media/platform/sunxi/sun6i-csi/sun6i_csi.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/drivers/media/platform/sunxi/sun6i-csi/sun6i_csi.c b/drivers/media/platform/sunxi/sun6i-csi/sun6i_csi.c
index bbe45e893722..4b872800b244 100644
--- a/drivers/media/platform/sunxi/sun6i-csi/sun6i_csi.c
+++ b/drivers/media/platform/sunxi/sun6i-csi/sun6i_csi.c
@@ -822,6 +822,11 @@ static int sun6i_csi_resource_request(struct sun6i_csi_dev *sdev,
return PTR_ERR(sdev->clk_mod);
}
+ /* A64 need 300MHz mod clock to operate properly */
+ if (of_device_is_compatible(pdev->dev.of_node,
+ "allwinner,sun50i-a64-csi"))
+ clk_set_rate_exclusive(sdev->clk_mod, 300000000);
+
sdev->clk_ram = devm_clk_get(&pdev->dev, "ram");
if (IS_ERR(sdev->clk_ram)) {
dev_err(&pdev->dev, "Unable to acquire dram-csi clock\n");
--
2.18.0.321.gffc6fa0e3
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [PATCH v3 4/6] arm64: dts: allwinner: a64: Add A64 CSI controller
2018-12-10 11:52 [PATCH v3 0/6] media/sun6i: Allwinner A64 CSI support Jagan Teki
` (2 preceding siblings ...)
2018-12-10 11:52 ` [PATCH v3 3/6] media: sun6i: Set 300MHz mod clock for A64 Jagan Teki
@ 2018-12-10 11:52 ` Jagan Teki
2018-12-10 11:52 ` [PATCH v3 5/6] arm64: dts: allwinner: a64: Add pinmux setting for CSI MCLK on PE1 Jagan Teki
2018-12-10 11:52 ` [PATCH v3 6/6] arm64: dts: allwinner: a64-amarula-relic: Add OV5640 camera node Jagan Teki
5 siblings, 0 replies; 11+ messages in thread
From: Jagan Teki @ 2018-12-10 11:52 UTC (permalink / raw)
To: Yong Deng, Mauro Carvalho Chehab, Maxime Ripard, Rob Herring,
Mark Rutland, Chen-Yu Tsai, linux-media, linux-arm-kernel,
devicetree, linux-kernel, linux-sunxi, linux-amarula,
Michael Trimarchi
Cc: Jagan Teki
Allwinner A64 CSI controller has similar features as like in
H3, but work by lowering clock than default mod clock.
Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
---
arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi | 20 +++++++++++++++++++
1 file changed, 20 insertions(+)
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi
index 384c417cb7a2..89a0deb3fe6a 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi
@@ -532,6 +532,12 @@
interrupt-controller;
#interrupt-cells = <3>;
+ csi_pins: csi-pins {
+ pins = "PE0", "PE2", "PE3", "PE4", "PE5", "PE6",
+ "PE7", "PE8", "PE9", "PE10", "PE11";
+ function = "csi0";
+ };
+
i2c0_pins: i2c0_pins {
pins = "PH0", "PH1";
function = "i2c0";
@@ -899,6 +905,20 @@
status = "disabled";
};
+ csi: csi@1cb0000 {
+ compatible = "allwinner,sun50i-a64-csi";
+ reg = <0x01cb0000 0x1000>;
+ interrupts = <GIC_SPI 84 IRQ_TYPE_LEVEL_HIGH>;
+ clocks = <&ccu CLK_BUS_CSI>,
+ <&ccu CLK_CSI_SCLK>,
+ <&ccu CLK_DRAM_CSI>;
+ clock-names = "bus", "mod", "ram";
+ resets = <&ccu RST_BUS_CSI>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&csi_pins>;
+ status = "disabled";
+ };
+
hdmi: hdmi@1ee0000 {
compatible = "allwinner,sun50i-a64-dw-hdmi",
"allwinner,sun8i-a83t-dw-hdmi";
--
2.18.0.321.gffc6fa0e3
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [PATCH v3 5/6] arm64: dts: allwinner: a64: Add pinmux setting for CSI MCLK on PE1
2018-12-10 11:52 [PATCH v3 0/6] media/sun6i: Allwinner A64 CSI support Jagan Teki
` (3 preceding siblings ...)
2018-12-10 11:52 ` [PATCH v3 4/6] arm64: dts: allwinner: a64: Add A64 CSI controller Jagan Teki
@ 2018-12-10 11:52 ` Jagan Teki
2018-12-10 11:52 ` [PATCH v3 6/6] arm64: dts: allwinner: a64-amarula-relic: Add OV5640 camera node Jagan Teki
5 siblings, 0 replies; 11+ messages in thread
From: Jagan Teki @ 2018-12-10 11:52 UTC (permalink / raw)
To: Yong Deng, Mauro Carvalho Chehab, Maxime Ripard, Rob Herring,
Mark Rutland, Chen-Yu Tsai, linux-media, linux-arm-kernel,
devicetree, linux-kernel, linux-sunxi, linux-amarula,
Michael Trimarchi
Cc: Jagan Teki
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 89a0deb3fe6a..dd5740bc3fc9 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi
@@ -538,6 +538,11 @@
function = "csi0";
};
+ csi_mclk_pin: csi-mclk {
+ pins = "PE1";
+ function = "csi0";
+ };
+
i2c0_pins: i2c0_pins {
pins = "PH0", "PH1";
function = "i2c0";
--
2.18.0.321.gffc6fa0e3
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [PATCH v3 6/6] arm64: dts: allwinner: a64-amarula-relic: Add OV5640 camera node
2018-12-10 11:52 [PATCH v3 0/6] media/sun6i: Allwinner A64 CSI support Jagan Teki
` (4 preceding siblings ...)
2018-12-10 11:52 ` [PATCH v3 5/6] arm64: dts: allwinner: a64: Add pinmux setting for CSI MCLK on PE1 Jagan Teki
@ 2018-12-10 11:52 ` Jagan Teki
5 siblings, 0 replies; 11+ messages in thread
From: Jagan Teki @ 2018-12-10 11:52 UTC (permalink / raw)
To: Yong Deng, Mauro Carvalho Chehab, Maxime Ripard, Rob Herring,
Mark Rutland, Chen-Yu Tsai, linux-media, linux-arm-kernel,
devicetree, linux-kernel, linux-sunxi, linux-amarula,
Michael Trimarchi
Cc: Jagan Teki
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 6cb2b7f0c817..ea6286ce5de3 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
^ permalink raw reply related [flat|nested] 11+ messages in thread
* Re: [PATCH v3 1/6] dt-bindings: media: sun6i: Add A64 CSI compatible
2018-12-10 11:52 ` [PATCH v3 1/6] dt-bindings: media: sun6i: Add A64 CSI compatible Jagan Teki
@ 2018-12-10 23:24 ` Rob Herring
0 siblings, 0 replies; 11+ messages in thread
From: Rob Herring @ 2018-12-10 23:24 UTC (permalink / raw)
To: Jagan Teki
Cc: Yong Deng, Mauro Carvalho Chehab, Maxime Ripard, Mark Rutland,
Chen-Yu Tsai, linux-media, linux-arm-kernel, devicetree,
linux-kernel, linux-sunxi, linux-amarula, Michael Trimarchi,
Jagan Teki
On Mon, 10 Dec 2018 17:22:41 +0530, Jagan Teki wrote:
> Allwinner A64 CSI has single channel time-multiplexed BT.656
> CMOS sensor interface like H3 but work by lowering clock than
> default mod clock.
>
> Add a compatible string for it.
>
> Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
> ---
> Documentation/devicetree/bindings/media/sun6i-csi.txt | 1 +
> 1 file changed, 1 insertion(+)
>
Reviewed-by: Rob Herring <robh@kernel.org>
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH v3 2/6] media: sun6i: Add A64 compatible support
2018-12-10 11:52 ` [PATCH v3 2/6] media: sun6i: Add A64 compatible support Jagan Teki
@ 2018-12-11 15:43 ` Maxime Ripard
0 siblings, 0 replies; 11+ messages in thread
From: Maxime Ripard @ 2018-12-11 15:43 UTC (permalink / raw)
To: Jagan Teki
Cc: Yong Deng, Mauro Carvalho Chehab, Rob Herring, Mark Rutland,
Chen-Yu Tsai, linux-media, linux-arm-kernel, devicetree,
linux-kernel, linux-sunxi, linux-amarula, Michael Trimarchi
[-- Attachment #1: Type: text/plain, Size: 1104 bytes --]
On Mon, Dec 10, 2018 at 05:22:42PM +0530, Jagan Teki wrote:
> Allwinner A64 CSI has single channel time-multiplexed BT.656
> CMOS sensor interface like H3 but work by lowering clock than
> default mod clock.
>
> So use separate compatibe to support it.
>
> Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
> ---
> drivers/media/platform/sunxi/sun6i-csi/sun6i_csi.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/media/platform/sunxi/sun6i-csi/sun6i_csi.c b/drivers/media/platform/sunxi/sun6i-csi/sun6i_csi.c
> index ee882b66a5ea..bbe45e893722 100644
> --- a/drivers/media/platform/sunxi/sun6i-csi/sun6i_csi.c
> +++ b/drivers/media/platform/sunxi/sun6i-csi/sun6i_csi.c
> @@ -892,6 +892,7 @@ static int sun6i_csi_remove(struct platform_device *pdev)
> }
>
> static const struct of_device_id sun6i_csi_of_match[] = {
> + { .compatible = "allwinner,sun50i-a64-csi", },
Even though it's not strictly alphabetical, we usually order the 50
after the 8.
Maxime
--
Maxime Ripard, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH v3 3/6] media: sun6i: Set 300MHz mod clock for A64
2018-12-10 11:52 ` [PATCH v3 3/6] media: sun6i: Set 300MHz mod clock for A64 Jagan Teki
@ 2018-12-11 15:44 ` Maxime Ripard
2018-12-11 15:50 ` Jagan Teki
0 siblings, 1 reply; 11+ messages in thread
From: Maxime Ripard @ 2018-12-11 15:44 UTC (permalink / raw)
To: Jagan Teki
Cc: Yong Deng, Mauro Carvalho Chehab, Rob Herring, Mark Rutland,
Chen-Yu Tsai, linux-media, linux-arm-kernel, devicetree,
linux-kernel, linux-sunxi, linux-amarula, Michael Trimarchi
[-- Attachment #1: Type: text/plain, Size: 1295 bytes --]
On Mon, Dec 10, 2018 at 05:22:43PM +0530, Jagan Teki wrote:
> The default CSI_SCLK seems unable to drive the sensor to capture
> the image, so update it to working clock rate 300MHz for A64.
>
> Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
> ---
> drivers/media/platform/sunxi/sun6i-csi/sun6i_csi.c | 5 +++++
> 1 file changed, 5 insertions(+)
>
> diff --git a/drivers/media/platform/sunxi/sun6i-csi/sun6i_csi.c b/drivers/media/platform/sunxi/sun6i-csi/sun6i_csi.c
> index bbe45e893722..4b872800b244 100644
> --- a/drivers/media/platform/sunxi/sun6i-csi/sun6i_csi.c
> +++ b/drivers/media/platform/sunxi/sun6i-csi/sun6i_csi.c
> @@ -822,6 +822,11 @@ static int sun6i_csi_resource_request(struct sun6i_csi_dev *sdev,
> return PTR_ERR(sdev->clk_mod);
> }
>
> + /* A64 need 300MHz mod clock to operate properly */
> + if (of_device_is_compatible(pdev->dev.of_node,
> + "allwinner,sun50i-a64-csi"))
> + clk_set_rate_exclusive(sdev->clk_mod, 300000000);
> +
Where is that 300MHz coming from? You claim in your comment that it
"operates properly", yet in your previous mail about this, you were
saying that 1080p @30Hz is broken. Which one is it?
Maxime
--
Maxime Ripard, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH v3 3/6] media: sun6i: Set 300MHz mod clock for A64
2018-12-11 15:44 ` Maxime Ripard
@ 2018-12-11 15:50 ` Jagan Teki
0 siblings, 0 replies; 11+ messages in thread
From: Jagan Teki @ 2018-12-11 15:50 UTC (permalink / raw)
To: Maxime Ripard
Cc: Yong Deng, Mauro Carvalho Chehab, Rob Herring, Mark Rutland,
Chen-Yu Tsai, linux-media, linux-arm-kernel, devicetree,
linux-kernel, linux-sunxi, linux-amarula, Michael Trimarchi
On Tue, Dec 11, 2018 at 9:14 PM Maxime Ripard <maxime.ripard@bootlin.com> wrote:
>
> On Mon, Dec 10, 2018 at 05:22:43PM +0530, Jagan Teki wrote:
> > The default CSI_SCLK seems unable to drive the sensor to capture
> > the image, so update it to working clock rate 300MHz for A64.
> >
> > Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
> > ---
> > drivers/media/platform/sunxi/sun6i-csi/sun6i_csi.c | 5 +++++
> > 1 file changed, 5 insertions(+)
> >
> > diff --git a/drivers/media/platform/sunxi/sun6i-csi/sun6i_csi.c b/drivers/media/platform/sunxi/sun6i-csi/sun6i_csi.c
> > index bbe45e893722..4b872800b244 100644
> > --- a/drivers/media/platform/sunxi/sun6i-csi/sun6i_csi.c
> > +++ b/drivers/media/platform/sunxi/sun6i-csi/sun6i_csi.c
> > @@ -822,6 +822,11 @@ static int sun6i_csi_resource_request(struct sun6i_csi_dev *sdev,
> > return PTR_ERR(sdev->clk_mod);
> > }
> >
> > + /* A64 need 300MHz mod clock to operate properly */
> > + if (of_device_is_compatible(pdev->dev.of_node,
> > + "allwinner,sun50i-a64-csi"))
> > + clk_set_rate_exclusive(sdev->clk_mod, 300000000);
> > +
>
> Where is that 300MHz coming from? You claim in your comment that it
from BSP, even "Chen-Yu Tsai" mentioned the same. (Chen-Yu, can you
comment here)
> "operates properly", yet in your previous mail about this, you were
> saying that 1080p @30Hz is broken. Which one is it?
1080p is broken from sensor end, ie what I mentioned on the respective mail.
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2018-12-11 16:23 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-12-10 11:52 [PATCH v3 0/6] media/sun6i: Allwinner A64 CSI support Jagan Teki
2018-12-10 11:52 ` [PATCH v3 1/6] dt-bindings: media: sun6i: Add A64 CSI compatible Jagan Teki
2018-12-10 23:24 ` Rob Herring
2018-12-10 11:52 ` [PATCH v3 2/6] media: sun6i: Add A64 compatible support Jagan Teki
2018-12-11 15:43 ` Maxime Ripard
2018-12-10 11:52 ` [PATCH v3 3/6] media: sun6i: Set 300MHz mod clock for A64 Jagan Teki
2018-12-11 15:44 ` Maxime Ripard
2018-12-11 15:50 ` Jagan Teki
2018-12-10 11:52 ` [PATCH v3 4/6] arm64: dts: allwinner: a64: Add A64 CSI controller Jagan Teki
2018-12-10 11:52 ` [PATCH v3 5/6] arm64: dts: allwinner: a64: Add pinmux setting for CSI MCLK on PE1 Jagan Teki
2018-12-10 11:52 ` [PATCH v3 6/6] arm64: dts: allwinner: a64-amarula-relic: Add OV5640 camera node Jagan Teki
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).