Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp508932imu; Thu, 22 Nov 2018 00:48:40 -0800 (PST) X-Google-Smtp-Source: AJdET5eMwfYd8wsZM5sikW6AfAxVPpMrhtIiIok670qcm8KM0jWnbRWi/1RV5kji99BbBpraQoor X-Received: by 2002:a62:6143:: with SMTP id v64mr10553523pfb.142.1542876520254; Thu, 22 Nov 2018 00:48:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542876520; cv=none; d=google.com; s=arc-20160816; b=mkT73s5kfjCxwUdXnK9TfjTsxprqQtbqHSzYOl2hsKyyTk124I7QIoHiPvAQgFL+6O 5ZlSDpITd/lAlzm5l+QZ8i93VPhg8t4ZMjLZnsjPR0RFYgmz2lRF23hpc8ubzHwDfRKr A4O1RczdydCk4USAhyIeNziWSKLkN37obhGaCIJqvn5NHuhzgwtzEDMKgRm9MDJzEXlB /Y9unsbzURIVYmIlEUPwO6t5xcdPk1085ZIMULR2ZbAm2XY0V78KoTd/qlrQuAKWrCbU /TsE9dutKZHYfRHFc4CjjWHXiDEYdzv4JCHPV18oXoyHkFxK/90/Cv3HU34zPIaF5HX0 C0XA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=aihetCB+vypsEiJ+89BU/JRQZ/m8jMxQNQZrp74kyM4=; b=CZjWbSX6YRiRDUiZERIAtfq6+4AzqW/Rtg+jELsFTnOj9VCKs2pWe/MIj+DK7mg08D M7zvl13KM2kiJOPR5Xtk732KiboqkWri4xomZ3EDWc8nLDqZ5Dp1mcD8leNYIa2WCApq wvvST7NnQ34hbVPNsjYW6C8QbwjMqV4hvMSFhViMvnhBKhyz6cg9agNZiAcDUviIyeHY XOt6WMDl4Xs5yVmM+SB5AaA/mXQRoZqBcTO9ZudJOMUWuXGgKx07w/Gzhl0sLPoePbk3 AJVqhCfzZThazV5lZLXNo5F7D1oT+cc0EOHkjeNfY7IxzUNDr06nT23xAv16AbsocYtL +MjQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n4si24473920pgm.487.2018.11.22.00.48.25; Thu, 22 Nov 2018 00:48:40 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731816AbeKVIdI (ORCPT + 99 others); Thu, 22 Nov 2018 03:33:08 -0500 Received: from mga05.intel.com ([192.55.52.43]:39355 "EHLO mga05.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731600AbeKVIdI (ORCPT ); Thu, 22 Nov 2018 03:33:08 -0500 X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by fmsmga105.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 21 Nov 2018 13:56:57 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.56,262,1539673200"; d="scan'208";a="88244060" Received: from uoffert-mobl1.ger.corp.intel.com (HELO mara.localdomain) ([10.252.30.150]) by fmsmga008.fm.intel.com with ESMTP; 21 Nov 2018 13:56:54 -0800 Received: from sailus by mara.localdomain with local (Exim 4.89) (envelope-from ) id 1gPaUN-0000Ld-DA; Wed, 21 Nov 2018 23:56:51 +0200 Date: Wed, 21 Nov 2018 23:56:50 +0200 From: Sakari Ailus To: Maxime Ripard Cc: Hans Verkuil , Mauro Carvalho Chehab , Thomas Petazzoni , Laurent Pinchart , linux-media@vger.kernel.org, Andrzej Hajda , Chen-Yu Tsai , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, Mark Rutland , Rob Herring , Frank Rowand Subject: Re: [PATCH 1/5] dt-bindings: media: Add Allwinner A10 CSI binding Message-ID: <20181121215650.urefxctd245os6t5@mara.localdomain> References: <60494dd4245ab01473d074dc5cd46198a2181614.1542097288.git-series.maxime.ripard@bootlin.com> <20181113083855.s5jxrb32ru3myu3t@kekkonen.localdomain> <20181115190424.gpuekifrjli5mu77@flea> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20181115190424.gpuekifrjli5mu77@flea> User-Agent: NeoMutt/20170113 (1.7.2) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Maxime, On Thu, Nov 15, 2018 at 08:04:24PM +0100, Maxime Ripard wrote: > Hi Sakari, > > On Tue, Nov 13, 2018 at 10:38:55AM +0200, Sakari Ailus wrote: > > > + - allwinner,has-isp: Whether the CSI controller has an ISP > > > + associated to it or not > > > > Is the ISP a part of the same device? It sounds like that this is actually > > a different device if it contains an ISP as well, and that should be > > apparent from the compatible string. What do you think? > > I guess we can see it as both. It seems to be the exact same register > set, except for the fact that the first instance has that ISP in > addition, and several channels, as you pointed out in your other mail. I'm simply referring to existing practices as far as I know them. If it's a different device, it should have a different compatible string, not a vendor-specific property to tell it's somehow different. Many SoCs also separate the DMA and the CSI-2 receivers, and thus they have separate drivers. I don't know about your case, but the ISP requiring a different clock is a hint. > > What these channels are is not exactly clear. It looks like it's > related to the BT656 interface where you could interleave channel > bytes over the bus. I haven't really looked into it, and it doesn't > look like we have any code (or hardware) able to do that though. > > > > + > > > +If allwinner,has-isp is set, an additional "isp" clock is needed, > > > +being a phandle to the clock driving the ISP. > > > + > > > +The CSI node should contain one 'port' child node with one child > > > +'endpoint' node, according to the bindings defined in > > > +Documentation/devicetree/bindings/media/video-interfaces.txt. The > > > +endpoint's bus type must be parallel or BT656. > > > + > > > +Endpoint node properties for CSI > > > +--------------------------------- > > > + > > > +- remote-endpoint : (required) a phandle to the bus receiver's endpoint > > > + node > > > > Rob's opinion has been (AFAIU) that this is not needed as it's already a > > part of the graph bindings. Unless you want to say that it's required, that > > is --- the graph bindings document it as optional. > > Ok, I'll remove it. > > > > +- bus-width: : (required) must be 8 > > > > If this is the only value the hardware supports, I don't see why you should > > specify it here. > > Ditto :) > > > > +- pclk-sample : (optional) (default: sample on falling edge) > > > +- hsync-active : (only required for parallel) > > > +- vsync-active : (only required for parallel) > > > + > > > +Example: > > > + > > > +csi0: csi@1c09000 { > > > + compatible = "allwinner,sun7i-a20-csi", > > > + "allwinner,sun4i-a10-csi"; > > > + reg = <0x01c09000 0x1000>; > > > + interrupts = ; > > > + clocks = <&ccu CLK_AHB_CSI0>, <&ccu CLK_CSI0>, > > > + <&ccu CLK_CSI_SCLK>, <&ccu CLK_DRAM_CSI0>; > > > + clock-names = "ahb", "mod", "isp", "ram"; > > > + resets = <&ccu RST_CSI0>; > > > + allwinner,csi-channels = <4>; > > > + allwinner,has-isp; > > > + > > > + port { > > > + csi_from_ov5640: endpoint { > > > + remote-endpoint = <&ov5640_to_csi>; > > > + bus-width = <8>; > > > + data-shift = <2>; > > > > data-shift needs to be documented above if it's relevant for the device. > > It's not really related to the CSI device in that case but the sensor, > so I'll just leave it out. Hmm. data-shift should only be relevant for the receiver, shoudn't it? -- Regards, Sakari Ailus sakari.ailus@linux.intel.com