From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net [23.128.96.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4AEC87E; Wed, 15 Nov 2023 09:16:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b="gkv7Pl+b" Received: from relay1-d.mail.gandi.net (relay1-d.mail.gandi.net [IPv6:2001:4b98:dc4:8::221]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0F2A711C; Wed, 15 Nov 2023 01:16:23 -0800 (PST) Received: by mail.gandi.net (Postfix) with ESMTPSA id 1688524000C; Wed, 15 Nov 2023 09:16:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1700039782; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=fEBGlNa6ETX9qVEVywc0Dk28Tg8zkpZzVQlUPuAs6YA=; b=gkv7Pl+bIME6lgpeIGjLvmlGp04L3bUcTbk094pWAX166nXAAXV0ImUKdI1WHscKuhwpV3 MERBo6HmYIkos69YcUQEJnkmC7paZ+TYedjZgtHgP+qPEeoFv7GFTDd4Q5aft/jLs4R1pR KLXPAO2mSsDrHVSSbIdhVu3A0HjgEuTx441A5evLC3MAHs//ZAAYVrOdzMx/wOD0LFSf5s KEWjVK//XX5iMeegY29KYX9dzQe3/2tJpjhV0Aq5fKHmqBl0g2CXkiXo2pllbBvARZuPk8 Ykaic8DVN4kG3kl4inyELuQsbLjGcuBU6ZkyUZx0ne5d/jShTVhbQFIMXaA7pA== Date: Wed, 15 Nov 2023 10:16:20 +0100 From: Mehdi Djait To: Michael Riesch Cc: mchehab@kernel.org, heiko@sntech.de, hverkuil-cisco@xs4all.nl, krzysztof.kozlowski+dt@linaro.org, robh+dt@kernel.org, conor+dt@kernel.org, linux-media@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, thomas.petazzoni@bootlin.com, alexandre.belloni@bootlin.com, maxime.chevallier@bootlin.com, paul.kocialkowski@bootlin.com Subject: Re: [PATCH v10 2/3] media: rockchip: Add a driver for Rockchip's camera interface Message-ID: References: <4f9bc04b-81af-49ee-9818-d4cd281504e7@wolfvision.net> Precedence: bulk X-Mailing-List: devicetree@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-GND-Sasl: mehdi.djait@bootlin.com On Mon, Nov 13, 2023 at 05:05:12PM +0100, Michael Riesch wrote: > Hi Mehdi, > > On 11/13/23 16:28, Mehdi Djait wrote: > > Hi Michael, > > > > On Fri, Nov 10, 2023 at 03:33:34PM +0100, Michael Riesch wrote: > >> Hi Mehdi, > >> > >> Sorry, forgot one thing: > >> > >> On 11/8/23 17:38, Mehdi Djait wrote: > >>> +static int cif_subdev_notifier(struct cif_device *cif_dev) > >>> +{ > >>> + struct v4l2_async_notifier *ntf = &cif_dev->notifier; > >>> + struct device *dev = cif_dev->dev; > >>> + struct v4l2_async_connection *asd; > >>> + struct v4l2_fwnode_endpoint vep = { > >>> + .bus_type = V4L2_MBUS_PARALLEL, > >> > >> This is surprising. I had to set this to V4L2_MBUS_UNKNOWN, otherwise > >> v4l2_fwnode_endpoint_parse would yield -ENXIO, which indicates a bus > >> type mismatch. Does this really work for your (BT.656, right?) setup? > >> > > > > Yes it works. > > > >> I think we should get the bus type from the device tree, right? > >> > > > > I am looking into this. > > > >> Thanks and best regards, > >> Michael > >> > > > > I assume you have a "bus-type = ;" in the device > > tree definition of your endpoint ? This caused the mismatch as the > > v4l2_fwnode_endpoint is set to PARALLEL > > Yes that's correct. > > The documentation is quite sparse here, but I would guess that the PX30 > VIP accepts parallel data without embedded syncs (= > MEDIA_BUS_TYPE_PARALLEL) as well as parallel data with embedded syncs (= > MEDIA_BUS_TYPE_BT656). If this is actually the case, I think we should > put V4L2_MBUS_UNKNOWN and let the device tree decide. Yes, I will do this. > > We can be sure, however, that the PX30 VIP supports BT.656, so I guess > the safe approach would be to use .bus_type = V4L2_MBUS_BT656. > > What do you think? I agree -- Kind Regards Mehdi Djait > > Best regards, > Michael