mbox series

[0/6] media: sun6i: Separate H3 compatible from A31

Message ID 20181130075849.16941-1-wens@csie.org (mailing list archive)
Headers show
Series media: sun6i: Separate H3 compatible from A31 | expand

Message

Chen-Yu Tsai Nov. 30, 2018, 7:58 a.m. UTC
The CSI (camera sensor interface) controller found on the H3 (and H5)
is a reduced version of the one found on the A31. It only has 1 channel,
instead of 4 channels supporting time-multiplexed BT.656 on the A31.
Since the H3 is a reduced version, it cannot "fallback" to a compatible
that implements more features than it supports.

This series separates support for the H3 variant from the A31 variant.

Patches 1 ~ 3 separate H3 CSI from A31 CSI in the bindings, driver, and
device tree, respectively.

Patch 4 adds a pinmux setting for the MCLK (master clock). Some camera
sensors use the master clock from the SoC instead of a standalone
crystal.

Patches 5 and 6 are examples of using a camera sensor with an SBC.
Since the modules are detachable, these changes should not be merged.
They should be implemented as overlays instead.

Please have a look.

In addition, I found that the first frame captured seems to always be
incomplete, with either parts cropped, out of position, or missing
color components.

Regards
ChenYu


Chen-Yu Tsai (6):
  media: dt-bindings: media: sun6i: Separate H3 compatible from A31
  media: sun6i: Add H3 compatible
  ARM: dts: sunxi: h3/h5: Drop A31 fallback compatible for CSI
    controller
  ARM: dts: sunxi: h3-h5: Add pinmux setting for CSI MCLK on PE1
  [DO NOT MERGE] ARM: dts: sunxi: bananapi-m2p: Add HDF5640 camera
    module
  [DO NOT MERGE] ARM: dts: sunxi: libretech-all-h3-cc: Add HDF5640
    camera module

 .../devicetree/bindings/media/sun6i-csi.txt   |  2 +-
 arch/arm/boot/dts/sunxi-bananapi-m2-plus.dtsi | 87 +++++++++++++++++++
 arch/arm/boot/dts/sunxi-h3-h5.dtsi            |  8 +-
 .../boot/dts/sunxi-libretech-all-h3-cc.dtsi   | 81 +++++++++++++++++
 .../platform/sunxi/sun6i-csi/sun6i_csi.c      |  1 +
 5 files changed, 176 insertions(+), 3 deletions(-)

Comments

Maxime Ripard Nov. 30, 2018, 8:47 a.m. UTC | #1
On Fri, Nov 30, 2018 at 03:58:43PM +0800, Chen-Yu Tsai wrote:
> The CSI (camera sensor interface) controller found on the H3 (and H5)
> is a reduced version of the one found on the A31. It only has 1 channel,
> instead of 4 channels supporting time-multiplexed BT.656 on the A31.
> Since the H3 is a reduced version, it cannot "fallback" to a compatible
> that implements more features than it supports.
> 
> This series separates support for the H3 variant from the A31 variant.
> 
> Patches 1 ~ 3 separate H3 CSI from A31 CSI in the bindings, driver, and
> device tree, respectively.
> 
> Patch 4 adds a pinmux setting for the MCLK (master clock). Some camera
> sensors use the master clock from the SoC instead of a standalone
> crystal.
> 
> Patches 5 and 6 are examples of using a camera sensor with an SBC.
> Since the modules are detachable, these changes should not be merged.
> They should be implemented as overlays instead.
> 
> Please have a look.
> 
> In addition, I found that the first frame captured seems to always be
> incomplete, with either parts cropped, out of position, or missing
> color components.

For the first 4 patches,
Acked-by: Maxime Ripard <maxime.ripard@bootlin.com>

Maxime
Sakari Ailus Dec. 13, 2018, 10:10 p.m. UTC | #2
Hi Chen-Yu,

On Fri, Nov 30, 2018 at 03:58:43PM +0800, Chen-Yu Tsai wrote:
> The CSI (camera sensor interface) controller found on the H3 (and H5)
> is a reduced version of the one found on the A31. It only has 1 channel,
> instead of 4 channels supporting time-multiplexed BT.656 on the A31.
> Since the H3 is a reduced version, it cannot "fallback" to a compatible
> that implements more features than it supports.
> 
> This series separates support for the H3 variant from the A31 variant.
> 
> Patches 1 ~ 3 separate H3 CSI from A31 CSI in the bindings, driver, and
> device tree, respectively.
> 
> Patch 4 adds a pinmux setting for the MCLK (master clock). Some camera
> sensors use the master clock from the SoC instead of a standalone
> crystal.

I've picked patches 1 and 2, but I presume patches 3 and 4 would go through
another tree. Is that right?

> 
> Patches 5 and 6 are examples of using a camera sensor with an SBC.
> Since the modules are detachable, these changes should not be merged.
> They should be implemented as overlays instead.
> 
> Please have a look.
> 
> In addition, I found that the first frame captured seems to always be
> incomplete, with either parts cropped, out of position, or missing
> color components.
Chen-Yu Tsai Dec. 14, 2018, 2:23 a.m. UTC | #3
On Fri, Dec 14, 2018 at 6:10 AM <sakari.ailus@iki.fi> wrote:
>
> Hi Chen-Yu,
>
> On Fri, Nov 30, 2018 at 03:58:43PM +0800, Chen-Yu Tsai wrote:
> > The CSI (camera sensor interface) controller found on the H3 (and H5)
> > is a reduced version of the one found on the A31. It only has 1 channel,
> > instead of 4 channels supporting time-multiplexed BT.656 on the A31.
> > Since the H3 is a reduced version, it cannot "fallback" to a compatible
> > that implements more features than it supports.
> >
> > This series separates support for the H3 variant from the A31 variant.
> >
> > Patches 1 ~ 3 separate H3 CSI from A31 CSI in the bindings, driver, and
> > device tree, respectively.
> >
> > Patch 4 adds a pinmux setting for the MCLK (master clock). Some camera
> > sensors use the master clock from the SoC instead of a standalone
> > crystal.
>
> I've picked patches 1 and 2, but I presume patches 3 and 4 would go through
> another tree. Is that right?

We'll merge patch 3 through the sunxi tree, probably as a fix for 4.21-rc.
Maxime has said that pinmux settings won't be merged unless there are actual
users in tree, so patch 4 won't be merged for now.

Thanks!
ChenYu

>
> >
> > Patches 5 and 6 are examples of using a camera sensor with an SBC.
> > Since the modules are detachable, these changes should not be merged.
> > They should be implemented as overlays instead.
> >
> > Please have a look.
> >
> > In addition, I found that the first frame captured seems to always be
> > incomplete, with either parts cropped, out of position, or missing
> > color components.
>
>
> --
> Regards,
>
> Sakari Ailus