From patchwork Fri Nov 30 07:58:43 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chen-Yu Tsai X-Patchwork-Id: 10705905 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id A99684B7E for ; Fri, 30 Nov 2018 08:08:04 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9C4092F7A3 for ; Fri, 30 Nov 2018 08:08:04 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8FABC2E52B; Fri, 30 Nov 2018 08:08:04 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2F8FD2E52B for ; Fri, 30 Nov 2018 08:08:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726883AbeK3TQa (ORCPT ); Fri, 30 Nov 2018 14:16:30 -0500 Received: from mirror2.csie.ntu.edu.tw ([140.112.30.76]:50228 "EHLO wens.csie.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726736AbeK3TQ3 (ORCPT ); Fri, 30 Nov 2018 14:16:29 -0500 Received: by wens.csie.org (Postfix, from userid 1000) id 3AE2D5FB8C; Fri, 30 Nov 2018 15:58:55 +0800 (CST) From: Chen-Yu Tsai To: Yong Deng , Mauro Carvalho Chehab , Maxime Ripard , Rob Herring , Mark Rutland Cc: Chen-Yu Tsai , linux-media@vger.kernel.org, linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 0/6] media: sun6i: Separate H3 compatible from A31 Date: Fri, 30 Nov 2018 15:58:43 +0800 Message-Id: <20181130075849.16941-1-wens@csie.org> X-Mailer: git-send-email 2.20.0.rc1 MIME-Version: 1.0 Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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(-) Acked-by: Maxime Ripard