Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp4151262imm; Mon, 14 May 2018 03:26:05 -0700 (PDT) X-Google-Smtp-Source: AB8JxZr0gXTtE2pQNdVYenRBQQukQ3UhNTqkcbaG+B1ep/+IbcdRhz9nU2HBt7w8NG6nqM4ck1U6 X-Received: by 2002:a62:de02:: with SMTP id h2-v6mr9832780pfg.205.1526293565722; Mon, 14 May 2018 03:26:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526293565; cv=none; d=google.com; s=arc-20160816; b=LRsAt+/HSu1zMmRfPAJ7eSCL8ePPt4dH7zNVj1AM1Luvv6EKtAwcOzyo2Wv035xp/9 zc2FQklBXB9mSu59WT51xaUlwVs2AJ+MIjAk/LevjLYIahaLxDDdE475D4UvuTC1zFpj FFHMpD0op2CB7XTjUvToHW92WID6043AfEbNO3oVsn3OAFhEXrnX0L/K5eHtuVAHsNK6 DMa3oYps7Q7/YRvlyhOe3EB1bgvR5DulEHD2ia/KVV1X86U7uzyulkLk0+W0XlGQe1i7 4ogW4DLCVKLSQIbYAYUTo8hiNtmt+5HT+oeLEAcMPq3xl1mKTGlICfNGVUhAq9oN/GAJ ecdQ== 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-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature :arc-authentication-results; bh=mP7/ZX4MuNLigvsvsahXggC0nE8VJAh0OE3Sfp8J58A=; b=wCqtpRSFtXQnEeaBbwTjiSQKe8PY9wzD6QzsRfUfSKly6qeFC4XIAbuY4spSNIwu0a wEeJgBC97n/Z9q/kqNhfGV+aSihPbZ78hULazsoLguKVKk4I/i5RrbDegXzMJirCSACe 2RZGWlq8z76Vhw/E/wlz7+E1P+VBah0M944cbFOrzVbZEYfKTrpXLmS4dq/7rGAcurr1 c7E5wxgQg/Cf2D+RIX17eB12cSXToNTAXIwAV8/K1WkQ9DkcBED7nvHyTTkrfdty5PP7 ay3E+v6IyW0YDCzlojapAiPSWNVsEYrgqssKj7ThI3Dugk70Yi/6KFeWQUdgeuBzvdVx 7kBA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ragnatech-se.20150623.gappssmtp.com header.s=20150623 header.b=W+y47mZ3; 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 c3-v6si3748357pld.593.2018.05.14.03.25.51; Mon, 14 May 2018 03:26:05 -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; dkim=pass header.i=@ragnatech-se.20150623.gappssmtp.com header.s=20150623 header.b=W+y47mZ3; 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 S1752265AbeENKXd (ORCPT + 99 others); Mon, 14 May 2018 06:23:33 -0400 Received: from mail-lf0-f65.google.com ([209.85.215.65]:35780 "EHLO mail-lf0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752249AbeENKX3 (ORCPT ); Mon, 14 May 2018 06:23:29 -0400 Received: by mail-lf0-f65.google.com with SMTP id y72-v6so17119719lfd.2 for ; Mon, 14 May 2018 03:23:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ragnatech-se.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=mP7/ZX4MuNLigvsvsahXggC0nE8VJAh0OE3Sfp8J58A=; b=W+y47mZ3NakfQ/gShZwAI8aAQNaKBaSDGcdBTurETujCRf7st51NxRRNwdSkMJVw1f 5HGiKBnAxQokZ7ji9oIgujwvPl1F4nm4lBkON6brUOzCYU/E8DKFRVqR+GczQSAlVDuW q2UYmvuqRURAhNZ5WvGvl9GHQBsenXaODrq1nlrBH03yAhg2hGHuFnqEfY6Hh2/bPMF/ PEfN6lZPa7qTbuArhRlaWd2JGbEr8dhLEy0ZjKu8xcAVloTHSRPffeGYNKfWMZbJg8po jlQXvK10fqNi24ohE3+bxQAgAFNAKgCIRz80uLeSkKbvrgDpLp1QBdDHsrKU8zrEI/RO b4Nw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to:user-agent; bh=mP7/ZX4MuNLigvsvsahXggC0nE8VJAh0OE3Sfp8J58A=; b=KfeAQh6qKusixDc/cgiXzxZ5mzc4oRj/Vqbnm5OIg4qUR+B7h4V1TmykOErKMH5c4Q HVKhtKs7TeQAGPPsknEdKJidJ/ahDLree7WrCbRsioZuFo5bPT2hTDZsfjtd0Yu3aEA6 tMN3GQ1b3wZBcxkU6R3Ml6/EQkiVTgp+jpyeNDnvyKlUzgq6BoakwYyM5kM1EXvSX0C3 W87eJtMsBcpYLVVB5CD0s0zODSCMrNlw0WdWYpQ1wbimXClChBbM6F+yZCi9Gf8eL58x bNH12wrl5Pw5XS54CJetHUThOZaKo418z35uemDzSPsHL6G3/d/c/3NQHe/i7DYK3aq4 UzpA== X-Gm-Message-State: ALKqPwdrHFsmE7kYpX7dl49Jyv6+32YxzHc0I4q83MOt1ZCA0YPemutm nF68MtrSzXMUDZkOz58ydudcYQ== X-Received: by 2002:a19:c48f:: with SMTP id u137-v6mr7937738lff.2.1526293407842; Mon, 14 May 2018 03:23:27 -0700 (PDT) Received: from localhost (89-233-230-99.cust.bredband2.com. [89.233.230.99]) by smtp.gmail.com with ESMTPSA id x26-v6sm1720024ljd.81.2018.05.14.03.23.26 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 14 May 2018 03:23:27 -0700 (PDT) Date: Mon, 14 May 2018 12:23:26 +0200 From: Niklas =?iso-8859-1?Q?S=F6derlund?= To: jacopo mondi Cc: Jacopo Mondi , laurent.pinchart@ideasonboard.com, 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 3/3] arm64: dts: renesas: draak: Describe HDMI input Message-ID: <20180514102326.GG30519@bigcity.dyn.berto.se> References: <1526032802-14376-1-git-send-email-jacopo+renesas@jmondi.org> <1526032802-14376-4-git-send-email-jacopo+renesas@jmondi.org> <20180513125755.GQ18974@bigcity.dyn.berto.se> <20180514073520.GA5956@w540> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20180514073520.GA5956@w540> User-Agent: Mutt/1.9.5 (2018-04-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Jacopo, On 2018-05-14 09:39:34 +0200, Jacopo Mondi wrote: > Hi Niklas, > > On Sun, May 13, 2018 at 02:57:55PM +0200, Niklas S?derlund wrote: > > Hi Jacopo, > > > > Thanks for your patch. > > > > On 2018-05-11 12:00:02 +0200, Jacopo Mondi wrote: > > > Describe HDMI input connected to VIN4 interface for R-Car D3 Draak > > > development board. > > > > > > Signed-off-by: Jacopo Mondi > > > --- > > > arch/arm64/boot/dts/renesas/r8a77995-draak.dts | 68 ++++++++++++++++++++++++++ > > > 1 file changed, 68 insertions(+) > > > > > > diff --git a/arch/arm64/boot/dts/renesas/r8a77995-draak.dts b/arch/arm64/boot/dts/renesas/r8a77995-draak.dts > > > index d03f194..e0ce462 100644 > > > --- a/arch/arm64/boot/dts/renesas/r8a77995-draak.dts > > > +++ b/arch/arm64/boot/dts/renesas/r8a77995-draak.dts > > > @@ -59,6 +59,17 @@ > > > }; > > > }; > > > > > > + hdmi-in { > > > + compatible = "hdmi-connector"; > > > + type = "a"; > > > + > > > + port { > > > + hdmi_con_in: endpoint { > > > + remote-endpoint = <&adv7612_in>; > > > + }; > > > + }; > > > + }; > > > + > > > memory@48000000 { > > > device_type = "memory"; > > > /* first 128MB is reserved for secure area. */ > > > @@ -142,6 +153,11 @@ > > > groups = "usb0"; > > > function = "usb0"; > > > }; > > > + > > > + vin4_pins: vin4 { > > > + groups = "vin4_data24", "vin4_sync", "vin4_clk", "vin4_clkenb"; > > > + function = "vin4"; > > > + }; > > > }; > > > > > > &i2c0 { > > > @@ -154,6 +170,35 @@ > > > reg = <0x50>; > > > pagesize = <8>; > > > }; > > > + > > > + hdmi-decoder@4c { > > > + compatible = "adi,adv7612"; > > > + reg = <0x4c>; > > > + default-input = <0>; > > > + > > > + ports { > > > + #address-cells = <1>; > > > + #size-cells = <0>; > > > + > > > + port@0 { > > > + reg = <0>; > > > + adv7612_in: endpoint { > > > + remote-endpoint = <&hdmi_con_in>; > > > + }; > > > + }; > > > + > > > + port@2 { > > > + reg = <2>; > > > + adv7612_out: endpoint { > > > + pclk-sample = <0>; > > > + hsync-active = <0>; > > > + vsync-active = <0>; > > > > This differs from the Gen2 DT bindings which is a very similar hardware > > setup using the same components. Defining these properties will make the > > bus marked as V4L2_MBUS_PARALLEL instead of V4L2_MBUS_BT656. > > And that's what we want.... > > > > > This will change how the hardware is configured for capture if the media > > bus is in a UYVY format, see VNMC_INF register in rvin_setup(). Maybe > > this it not an issue here but still I'm curious to why this differ > > between Gen2 and Gen3 :-) > > Actually this won't impact the VIN configuration as this is the > 'remote endpoint' from VIN perspective and the properties used to > configure the interface are the ones in the 'local endpoint'. You are right, sorry for the confusion and thanks for educating me :-) > > > > > > + > > > + remote-endpoint = <&vin4_in>; > > > + }; > > > + }; > > > + }; > > > + }; > > > }; > > > > > > &i2c1 { > > > @@ -246,3 +291,26 @@ > > > timeout-sec = <60>; > > > status = "okay"; > > > }; > > > + > > > +&vin4 { > > > + pinctrl-0 = <&vin4_pins>; > > > + pinctrl-names = "default"; > > > + > > > + status = "okay"; > > > + > > > + ports { > > > + #address-cells = <1>; > > > + #size-cells = <0>; > > > + > > > + port@0 { > > > + reg = <0>; > > > + > > > + vin4_in: endpoint { > > > + hsync-active = <0>; > > > + vsync-active = <0>; > > > > Comparing this to the Gen2 bindings some properties are missing, > > > > bus-width = <24>; > > pclk-sample = <1>; > > data-active = <1>; > > The VIN driver does not parse them, so there is no value in having > them there, if not confusing people as it happened to me reading the > Gen2 DT. I have no objection removing them. Trying to understand why the description differed from Gen2. > > > > > This is not a big deal as the VIN driver don't use these properties so > > no functional change should come of this but still a difference. > > Exactly. > > On a side note. I have not seen a way to configure the pixel clock > sampling level in the interface datasheet. The register used to > configure synchronism signals polarities is VnDMR2, and there I read > we can configure HSYNC/VSYNC and CLOCKENB (which is data enable, not > pixel clock) polarities. Is it configured through some other > register? I have not seen such a register no. > > > > Over all I'm happy with this change but before I add my tag I would like > > to understand why it differs from the Gen2 configuration for the adv7612 > > properties. > > > > Also on a side not it is possible with hardware switches on the board > > switch the VIN4 source to a completely different pipeline CVBS connector > > -> adv7180 -> VIN4. But I think it's best we keep the HDMI as default as > > this seems to be how the boards are shipped. But maybe mentioning this > > in the commit message would not hurt if you end-up resending the patch. > > Oh I see. SW-49 to SW-52 enables the HDMI input, SW53-SW54 CVBS one. > And actually, reading the 'initial setting of slide switches' in the > Draak board manual, it turns out that the board default configuration > is with CVBS input selected... What should we do here? reflect > defaults in the DT, or prioritize HDMI? I feel this is a question for Laurent. My feeling for how we handled this in other cases is to go with the board default settings. I'm however sure there are exceptions to the rule. So maybe we should go with the most useful (what ever that is) configuration? > > Thanks > j > > > > > > + > > > + remote-endpoint = <&adv7612_out>; > > > + }; > > > + }; > > > + }; > > > +}; > > > -- > > > 2.7.4 > > > > > > > -- > > Regards, > > Niklas S?derlund -- Regards, Niklas S?derlund