Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp2947983imm; Thu, 24 May 2018 19:41:01 -0700 (PDT) X-Google-Smtp-Source: AB8JxZportj4QBOFwQT6l9aDmrVOY7RY00+IHuesMoOLdeIVZQH9OBAC6nwT39RNDjFfqgotxvXg X-Received: by 2002:a65:4282:: with SMTP id j2-v6mr451445pgp.189.1527216061180; Thu, 24 May 2018 19:41:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527216061; cv=none; d=google.com; s=arc-20160816; b=mn7kS4h2Rzca9ibVd/pl8QgIuDy1kMfODUu5WdyHfZ+LhAU/aYV7uuSoAZmv1jy25S /2Q2B+y2OHkfRb1fMcwfU344RbNvMK5dcScQnjWDwtWrIyzxmEATvhLNjp0kJqiaIf4M Ev91INizEzfwstjSrQjOOnXM0F6VZPDGlo3+To7QaS1cnv2VWjZLgm5fMJmYnvCynfSl 9SMUy1sG0UCQB9R9nBc3alVnbXv1TFJzAb1DpVK2iLaKDXDB6OfZX00pHck+1eCR5ZCh Ji8E7MBUp4KMD2EtSWFf75ByzBYDOoDyz6c6B9JjWKWMWEqv+sotjOuhaOSkhL7bzbQG 2M/A== 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:arc-authentication-results; bh=vACUeEklPiiBYmYlTnOx+bVDzO9c+FjKSOIKQkKakh8=; b=uL2jbrIT5fDpOTyDmxNPyO3rLomF/Tww4sbm1C6/Vmb40sINJl6D6LnVCm71MktMyi ftHCx9iL1fOcM2lx9amS6N8PhbMcJZQIJmiu6ucprf79EFpNQmQymQbV1rq//ck0+CC7 ag07LztVliEHJAP5ukfaXUsxuHYBm1yNSeG8uJZZ98/j1i8In/b+bPQEPsw8HKoymsrs SgbRwDs+QTRQvJHT3ELB7ofGTZ114oflped4xZpaNYQ1yy2KRgIUaU7YfEzi86g9cXs8 yPEL2173wHFjZWcicbyHLXjTO0/6aLSwnxmZzSE+m9Tj28UXbBDNRLG+ZaIw8d9a+Dqv 79ZQ== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i1-v6si21762715pld.152.2018.05.24.19.40.46; Thu, 24 May 2018 19:41:01 -0700 (PDT) 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1161258AbeEXT7z (ORCPT + 99 others); Thu, 24 May 2018 15:59:55 -0400 Received: from relay1-d.mail.gandi.net ([217.70.183.193]:49061 "EHLO relay1-d.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1161267AbeEXT7u (ORCPT ); Thu, 24 May 2018 15:59:50 -0400 X-Originating-IP: 2.224.242.101 Received: from w540 (2-224-242-101.ip172.fastwebnet.it [2.224.242.101]) (Authenticated sender: jacopo@jmondi.org) by relay1-d.mail.gandi.net (Postfix) with ESMTPSA id 6B5E6240006; Thu, 24 May 2018 21:59:48 +0200 (CEST) Date: Thu, 24 May 2018 21:59:43 +0200 From: jacopo mondi To: Laurent Pinchart Cc: Jacopo Mondi , niklas.soderlund@ragnatech.se, horms@verge.net.au, geert@glider.be, magnus.damm@gmail.com, robh+dt@kernel.org, linux-renesas-soc@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v3 2/3] arm64: dts: renesas: draak: Describe CVBS input Message-ID: <20180524195943.GC18369@w540> References: <1526654878-11143-1-git-send-email-jacopo+renesas@jmondi.org> <6943843.2osudLfTFd@avalon> <20180521123340.GA15035@w540> <1728709.thk7gXDxlo@avalon> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="cPi+lWm09sJ+d57q" Content-Disposition: inline In-Reply-To: <1728709.thk7gXDxlo@avalon> User-Agent: Mutt/1.5.24 (2015-08-30) X-Spam-Level: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --cPi+lWm09sJ+d57q Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable HI Laurent, On Mon, May 21, 2018 at 04:10:34PM +0300, Laurent Pinchart wrote: > Hi Jacopo, > > On Monday, 21 May 2018 15:33:40 EEST jacopo mondi wrote: > > On Mon, May 21, 2018 at 01:54:55PM +0300, Laurent Pinchart wrote: > > > On Monday, 21 May 2018 12:57:05 EEST jacopo mondi wrote: > > >> On Fri, May 18, 2018 at 06:12:15PM +0300, Laurent Pinchart wrote: > > >>> On Friday, 18 May 2018 17:47:57 EEST Jacopo Mondi wrote: > > >>>> Describe CVBS video input through analog video decoder ADV7180 > > >>>> connected to video input interface VIN4. > > >>>> > > >>>> The video input signal path is shared with HDMI video input, and > > >>>> selected by on-board switches SW-53 and SW-54 with CVBS input > > >>>> selected by the default switches configuration. > > >>>> > > >>>> Signed-off-by: Jacopo Mondi > > >>>> Reviewed-by: Niklas S=C3=B6derlund > > >>>> > > >>>> --- > > >>>> v2 -> v3: > > >>>> - Add comment to describe the shared input video path > > >>>> - Add my SoB and Niklas' R-b tags > > >>>> --- > > >>>> > > >>>> arch/arm64/boot/dts/renesas/r8a77995-draak.dts | 42 +++++++++++++= +++++ > > >>>> 1 file changed, 42 insertions(+) > > >>>> > > >>>> diff --git a/arch/arm64/boot/dts/renesas/r8a77995-draak.dts > > >>>> b/arch/arm64/boot/dts/renesas/r8a77995-draak.dts index > > >>>> 9d73de8..95745fc > > >>>> 100644 > > >>>> --- a/arch/arm64/boot/dts/renesas/r8a77995-draak.dts > > >>>> +++ b/arch/arm64/boot/dts/renesas/r8a77995-draak.dts > > >>>> @@ -142,6 +142,11 @@ > > >>>> groups =3D "usb0"; > > >>>> function =3D "usb0"; > > >>>> }; > > >>>> + > > >>>> + vin4_pins_cvbs: vin4 { > > >>>> + groups =3D "vin4_data8", "vin4_sync", "vin4_clk"; > > >>>> + function =3D "vin4"; > > >>>> + }; > > >>>> }; > > >>>> > > >>>> &i2c0 { > > >>>> @@ -154,6 +159,23 @@ > > >>>> reg =3D <0x50>; > > >>>> pagesize =3D <8>; > > >>>> }; > > >>>> + > > >>>> + analog-video@20 { > > >>>> + compatible =3D "adi,adv7180"; > > >>>> + reg =3D <0x20>; > > >>>> + > > >>>> + port { > > >>> > > >>> The adv7180 DT bindings document the output port as 3 or 6 > > >>> (respectively for the CP and ST versions of the chip). You should t= hus > > >>> number the port. Apart from that the patch looks good. > > >> > > >> I admit I have barely copied this from Gen-2 boards DTS, but reading > > >> the driver code and binding description again, I think this is > > >> correct, as the output port numbering and mandatory input port (which > > >> is missing here) only apply to adv7180cp/st chip versions. > > >> > > >> Here we describe plain adv7180, no need to number output ports afaic= t. > > > > > > Indeed, my bad. > > > > > > Shouldn't you however use "adi,adv7180cp" as that's the chip we are u= sing > > > ? > > > The "adi,adv7180" has no port documented in its DT bindings, so it > > > shouldn't have any port node at all. > > > > I'm a bit confused here. > > > > The only Gen-2 board using the "adi,adv7180cp" compatible string is > > Gose, which is also the only one I can get schematics for. That board > > indeed feature an ADV7180WBCP32Z, as the Draak does. I cannot get > > schematics for any other Gen-2 board, to compare the ADV7180 variant > > installed there. If anyone can confirm that all other Gen-2 board uses > > a different version (or that all other Gen-2 board DTS file use a > > wrong compatible string value), I'll re-send this with a different > > compatible value and proper port nodes numbering. > > Other Gen2 boards use a ADV7180WBCP32Z as well. The issue here isn't that= the > chip you're trying to support is different. The DT bindings that were > initially written for the adi,adv7180 didn't have port nodes. When it was= time > to add them, we realized that two variants of the chip existed with diffe= rent > connectivity. We have thus added two new compatible strings to differenti= ate > them, with different port numbers. The old compatible string should be > deprecated in favour of the new ones. > Ack, thanks for explaining. I don't have any Gen2 board here, but if someone is willing to test, I can change the Gen2 bindings to use the new version in a follow-up series. Thanks j > > >>>> + /* > > >>>> + * The VIN4 video input path is shared between > > >>>> + * CVBS and HDMI inputs through SW[49-54] switches. > > >>>> + * > > >>>> + * CVBS is the default selection, link it to VIN4 here. > > >>>> + */ > > >>>> + adv7180_out: endpoint { > > >>>> + remote-endpoint =3D <&vin4_in>; > > >>>> + }; > > >>>> + }; > > >>>> + }; > > >>>> }; > > >>>> > > >>>> &i2c1 { > > >>>> @@ -246,3 +268,23 @@ > > >>>> timeout-sec =3D <60>; > > >>>> status =3D "okay"; > > >>>> }; > >>>> + > > >>>> +&vin4 { > > >>>> + pinctrl-0 =3D <&vin4_pins_cvbs>; > > >>>> + pinctrl-names =3D "default"; > > >>>> + > > >>>> + status =3D "okay"; > > >>>> + > > >>>> + ports { > > >>>> + #address-cells =3D <1>; > > >>>> + #size-cells =3D <0>; > > >>>> + > > >>>> + port@0 { > > >>>> + reg =3D <0>; > > >>>> + > > >>>> + vin4_in: endpoint { > > >>>> + remote-endpoint =3D <&adv7180_out>; > > >>>> + }; > > >>>> + }; > > >>>> + }; > > >>>> +}; > > -- > Regards, > > Laurent Pinchart > > > --cPi+lWm09sJ+d57q Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBAgAGBQJbBxmvAAoJEHI0Bo8WoVY8T4MP/3q1sl9D+YjiLyumyYZW0JC7 aNpreQtnGkaLWUSh0Y2/0rkHnIgUSR+xfSn1aYlWMfs8B4lbx/qbX6PuX58NZHd+ IfUq1lHLQTIE4wMFxyOsB9jfd4tuzylpvYu7tOYj4ovz08qRyHqZkCGNImReAYtx VHgZSiMJCxeko9MIIpMkHKfvFyKeWEj2km0vfyvcCGNHKoxV0iTPQi5WX+wLQcHx uv8LVS71m2t9/yqNZr4o/O74xCXfPsz7tj3MdH7v3skCglqIvLo/iKwVBMWkn4aE /muWnzeeh1GYHD46a6p6tWEU2wbY4H/WZNoHdCQOkBLZ3MzZTevESNE23J4tYq+U Orc/5xlFR6nu9dTgfpRMapElFBSjyTJmDWnS0gA+xO2ikDgQAnRdX0j2DrZAwCtp l49Ig/8uvatsBUWTWX6Q1BmKNuKgQzOJAgt73Rj9Xa4GUXxeAHMbeceLDFPWHt4s PECbnGkES8mhJQVJE6Sw06CbOkswWT9fY10FHjy9QmZI1nIKSsCJIj4MC6ill1/i 2bPuTaKF5bmMalHpfmhL176uq/0JgduURcOIBAKM4AeC8jEvcOG5/NePxaT86O2r seZC/YYOWJViAs1VgNBcBYeJuuWHXycl/EkiqGg+XSPuzPjmX4Yjo61P0su8yZ1m 5Gd1tkps81NiDgwWR49X =IxYo -----END PGP SIGNATURE----- --cPi+lWm09sJ+d57q--