From: Ondrej Jirman <[email protected]>
This is a re-send of Chen-Yu's A83T CSI patch series with review tags
applied and removed address/size cells from csi_in port. Already applied
patches from v1 were dropped.
The series is ready to be merged:
Patch 1 and 2 via sunxi tree
Patch 3 via media tree
v2:
- dropped address/size cells from csi_in port
- added review tags
Please take a look and merge.
Thank you,
Ondrej
--------------------------
Original description:
Hi everyone,
This series adds support for the camera sensor interface controller
found on the Allwinner A83T SoC. The controller is similar to the one
found on the H3, with the addition of a MIPI CSI-2 interface. However,
this series only supports parallel and BT.656 interfaces, based on the
existing driver.
Patch 1 adds an undocumented clock parent of the CSI MCLK. This was
found after finding the default value to sometimes work and sometimes
not, and then comparing against BSP code.
Patch 2 adds a compatible string for the A83T variant.
Patch 3 adds support for the A83T variant to the existing sun6i-csi
driver.
Patch 4 adds a device node for the controller, as well as commonly
used pin muxing options.
Patch 5 adds a pin muxing option for I2C1 on the PE pins, used in
conjunction with the CSI pins.
Patch 6 provides an example usage of the CSI controller: the Bananapi M3
with its camera module attached.
Please have a look.
Regards
ChenYu
Chen-Yu Tsai (3):
dt-bindings: media: sun6i-csi: Add compatible string for A83T variant
media: sun6i: Support A83T variant
ARM: dts: sun8i: a83t: Add device node for CSI (Camera Sensor
Interface)
.../devicetree/bindings/media/sun6i-csi.txt | 1 +
arch/arm/boot/dts/sun8i-a83t.dtsi | 29 +++++++++++++++++++
.../platform/sunxi/sun6i-csi/sun6i_csi.c | 1 +
3 files changed, 31 insertions(+)
--
2.21.0
From: Chen-Yu Tsai <[email protected]>
The A83T SoC has a camera sensor interface (known as CSI in Allwinner
lingo), which is similar to the one found on the A64 and H3. The only
difference seems to be that support of MIPI CSI through a connected
MIPI CSI-2 bridge.
Add a device node for it, and pinctrl nodes for the commonly used MCLK
and 8-bit parallel interface. The property /omit-if-no-ref/ is added to
the pinctrl nodes to keep the device tree blob size down if they are
unused.
Signed-off-by: Chen-Yu Tsai <[email protected]>
Signed-off-by: Ondrej Jirman <[email protected]>
---
arch/arm/boot/dts/sun8i-a83t.dtsi | 29 +++++++++++++++++++++++++++++
1 file changed, 29 insertions(+)
diff --git a/arch/arm/boot/dts/sun8i-a83t.dtsi b/arch/arm/boot/dts/sun8i-a83t.dtsi
index 392b0cabbf0d..ada6d08bc540 100644
--- a/arch/arm/boot/dts/sun8i-a83t.dtsi
+++ b/arch/arm/boot/dts/sun8i-a83t.dtsi
@@ -679,6 +679,20 @@
#interrupt-cells = <3>;
#gpio-cells = <3>;
+ /omit-if-no-ref/
+ csi_8bit_parallel_pins: csi-8bit-parallel-pins {
+ pins = "PE0", "PE2", "PE3", "PE6", "PE7",
+ "PE8", "PE9", "PE10", "PE11",
+ "PE12", "PE13";
+ function = "csi";
+ };
+
+ /omit-if-no-ref/
+ csi_mclk_pin: csi-mclk-pin {
+ pins = "PE1";
+ function = "csi";
+ };
+
emac_rgmii_pins: emac-rgmii-pins {
pins = "PD2", "PD3", "PD4", "PD5", "PD6", "PD7",
"PD11", "PD12", "PD13", "PD14", "PD18",
@@ -997,6 +1011,21 @@
interrupts = <GIC_PPI 9 (GIC_CPU_MASK_SIMPLE(8) | IRQ_TYPE_LEVEL_HIGH)>;
};
+ csi: camera@1cb0000 {
+ compatible = "allwinner,sun8i-a83t-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>;
+ status = "disabled";
+
+ csi_in: port {
+ };
+ };
+
hdmi: hdmi@1ee0000 {
compatible = "allwinner,sun8i-a83t-dw-hdmi";
reg = <0x01ee0000 0x10000>;
--
2.21.0
From: Chen-Yu Tsai <[email protected]>
The A83T SoC has a camera sensor interface (known as CSI in Allwinner
lingo), which is similar to the one found on the A64 and H3. The only
difference seems to be that support of MIPI CSI through a connected
MIPI CSI-2 bridge.
Add a compatible string for this variant.
Signed-off-by: Chen-Yu Tsai <[email protected]>
Acked-by: Maxime Ripard <[email protected]>
Reviewed-by: Rob Herring <[email protected]>
---
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 0dd540bb03db..a2e3e56f0257 100644
--- a/Documentation/devicetree/bindings/media/sun6i-csi.txt
+++ b/Documentation/devicetree/bindings/media/sun6i-csi.txt
@@ -6,6 +6,7 @@ Allwinner V3s SoC features a CSI module(CSI1) with parallel interface.
Required properties:
- compatible: value must be one of:
* "allwinner,sun6i-a31-csi"
+ * "allwinner,sun8i-a83t-csi"
* "allwinner,sun8i-h3-csi"
* "allwinner,sun8i-v3s-csi"
* "allwinner,sun50i-a64-csi"
--
2.21.0
On Mon, May 20, 2019 at 05:06:34PM +0200, verejna wrote:
> From: Ondrej Jirman <[email protected]>
>
> This is a re-send of Chen-Yu's A83T CSI patch series with review tags
> applied and removed address/size cells from csi_in port. Already applied
> patches from v1 were dropped.
>
> The series is ready to be merged:
>
> Patch 1 and 2 via sunxi tree
> Patch 3 via media tree
Sorry, wrong numbers. 2 is for media tree, 3 is for sunxi, 1 is a dt-bindings
patch, where I'm not sure.
thanks,
Ondrej
> v2:
> - dropped address/size cells from csi_in port
> - added review tags
>
> Please take a look and merge.
>
> Thank you,
> Ondrej
>
> --------------------------
> Original description:
>
> Hi everyone,
>
> This series adds support for the camera sensor interface controller
> found on the Allwinner A83T SoC. The controller is similar to the one
> found on the H3, with the addition of a MIPI CSI-2 interface. However,
> this series only supports parallel and BT.656 interfaces, based on the
> existing driver.
>
> Patch 1 adds an undocumented clock parent of the CSI MCLK. This was
> found after finding the default value to sometimes work and sometimes
> not, and then comparing against BSP code.
>
> Patch 2 adds a compatible string for the A83T variant.
>
> Patch 3 adds support for the A83T variant to the existing sun6i-csi
> driver.
>
> Patch 4 adds a device node for the controller, as well as commonly
> used pin muxing options.
>
> Patch 5 adds a pin muxing option for I2C1 on the PE pins, used in
> conjunction with the CSI pins.
>
> Patch 6 provides an example usage of the CSI controller: the Bananapi M3
> with its camera module attached.
>
> Please have a look.
>
> Regards
> ChenYu
>
> Chen-Yu Tsai (3):
> dt-bindings: media: sun6i-csi: Add compatible string for A83T variant
> media: sun6i: Support A83T variant
> ARM: dts: sun8i: a83t: Add device node for CSI (Camera Sensor
> Interface)
>
> .../devicetree/bindings/media/sun6i-csi.txt | 1 +
> arch/arm/boot/dts/sun8i-a83t.dtsi | 29 +++++++++++++++++++
> .../platform/sunxi/sun6i-csi/sun6i_csi.c | 1 +
> 3 files changed, 31 insertions(+)
>
> --
> 2.21.0
>
>
> _______________________________________________
> linux-arm-kernel mailing list
> [email protected]
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
On Mon, May 20, 2019 at 11:10 PM Ondřej Jirman <[email protected]> wrote:
>
> On Mon, May 20, 2019 at 05:06:34PM +0200, verejna wrote:
> > From: Ondrej Jirman <[email protected]>
> >
> > This is a re-send of Chen-Yu's A83T CSI patch series with review tags
> > applied and removed address/size cells from csi_in port. Already applied
> > patches from v1 were dropped.
> >
> > The series is ready to be merged:
> >
> > Patch 1 and 2 via sunxi tree
> > Patch 3 via media tree
>
> Sorry, wrong numbers. 2 is for media tree, 3 is for sunxi, 1 is a dt-bindings
> patch, where I'm not sure.
Bindings typically go with the driver.
Sakari, this series is and has been ready for some time since before the merge
window. Could you please merge patches 1 and 2.
Thanks
ChenYu
>
> thanks,
> Ondrej
>
> > v2:
> > - dropped address/size cells from csi_in port
> > - added review tags
> >
> > Please take a look and merge.
> >
> > Thank you,
> > Ondrej
> >
> > --------------------------
> > Original description:
> >
> > Hi everyone,
> >
> > This series adds support for the camera sensor interface controller
> > found on the Allwinner A83T SoC. The controller is similar to the one
> > found on the H3, with the addition of a MIPI CSI-2 interface. However,
> > this series only supports parallel and BT.656 interfaces, based on the
> > existing driver.
> >
> > Patch 1 adds an undocumented clock parent of the CSI MCLK. This was
> > found after finding the default value to sometimes work and sometimes
> > not, and then comparing against BSP code.
> >
> > Patch 2 adds a compatible string for the A83T variant.
> >
> > Patch 3 adds support for the A83T variant to the existing sun6i-csi
> > driver.
> >
> > Patch 4 adds a device node for the controller, as well as commonly
> > used pin muxing options.
> >
> > Patch 5 adds a pin muxing option for I2C1 on the PE pins, used in
> > conjunction with the CSI pins.
> >
> > Patch 6 provides an example usage of the CSI controller: the Bananapi M3
> > with its camera module attached.
> >
> > Please have a look.
> >
> > Regards
> > ChenYu
> >
> > Chen-Yu Tsai (3):
> > dt-bindings: media: sun6i-csi: Add compatible string for A83T variant
> > media: sun6i: Support A83T variant
> > ARM: dts: sun8i: a83t: Add device node for CSI (Camera Sensor
> > Interface)
> >
> > .../devicetree/bindings/media/sun6i-csi.txt | 1 +
> > arch/arm/boot/dts/sun8i-a83t.dtsi | 29 +++++++++++++++++++
> > .../platform/sunxi/sun6i-csi/sun6i_csi.c | 1 +
> > 3 files changed, 31 insertions(+)
> >
> > --
> > 2.21.0
> >
> >
> > _______________________________________________
> > linux-arm-kernel mailing list
> > [email protected]
> > http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Hi Chen-Yu,
On Tue, May 28, 2019 at 09:03:06PM +0800, Chen-Yu Tsai wrote:
> On Mon, May 20, 2019 at 11:10 PM Ondřej Jirman <[email protected]> wrote:
> >
> > On Mon, May 20, 2019 at 05:06:34PM +0200, verejna wrote:
> > > From: Ondrej Jirman <[email protected]>
> > >
> > > This is a re-send of Chen-Yu's A83T CSI patch series with review tags
> > > applied and removed address/size cells from csi_in port. Already applied
> > > patches from v1 were dropped.
> > >
> > > The series is ready to be merged:
> > >
> > > Patch 1 and 2 via sunxi tree
> > > Patch 3 via media tree
> >
> > Sorry, wrong numbers. 2 is for media tree, 3 is for sunxi, 1 is a dt-bindings
> > patch, where I'm not sure.
>
> Bindings typically go with the driver.
>
> Sakari, this series is and has been ready for some time since before the merge
> window. Could you please merge patches 1 and 2.
Don't wait, instead cc or ping me; that helps. :-)
The two patches are fine; I'll merge them.
--
Kind regards,
Sakari Ailus
[email protected]
On Mon, May 20, 2019 at 05:06:37PM +0200, [email protected] wrote:
> From: Chen-Yu Tsai <[email protected]>
>
> The A83T SoC has a camera sensor interface (known as CSI in Allwinner
> lingo), which is similar to the one found on the A64 and H3. The only
> difference seems to be that support of MIPI CSI through a connected
> MIPI CSI-2 bridge.
>
> Add a device node for it, and pinctrl nodes for the commonly used MCLK
> and 8-bit parallel interface. The property /omit-if-no-ref/ is added to
> the pinctrl nodes to keep the device tree blob size down if they are
> unused.
>
> Signed-off-by: Chen-Yu Tsai <[email protected]>
> Signed-off-by: Ondrej Jirman <[email protected]>
Applied, thanks!
Maxime
--
Maxime Ripard, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com