Received: by 2002:a25:c205:0:0:0:0:0 with SMTP id s5csp6845257ybf; Fri, 6 Mar 2020 05:42:47 -0800 (PST) X-Google-Smtp-Source: ADFU+vvoBYVbc/wPiys0DIATMkKnrp9kepNhCS8dEgga0WpZA5tNS2C1YMic4hMQxmk/627cwkix X-Received: by 2002:a9d:6051:: with SMTP id v17mr2613794otj.300.1583502167680; Fri, 06 Mar 2020 05:42:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1583502167; cv=none; d=google.com; s=arc-20160816; b=vGIFWIJS7eBze2Lo5pl0hNMVH6coAxY5X0+pEWU9Rhi0Rp6dq8bIwXqF0RU+Soptis oto8Ujt2tBHe0Q6U/7nn6nlZK471+Z2CFSqhOphEPN5ohm8oM8q99IQKIGbh1N18gTiZ aBd+vyobp9pjTS51T+7iHOWNX18au1uAId3ayeO4mSL+++fXj2YCa0FAYSv3NusufJCx z2GWzsUeBQPwz3uZzf37CuHoq4pHoES/ZWVznO1bQBC5rlk9YbfG+CSEk+y1eUm0B1wv y58dRMzQUcjgNm6ATeAmw8kX3Qxt6zHr0OI6AlN6q1ilyoSLHlOBvhXRImTrifmvd3tY rU9A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:mail-followup-to:message-id:subject:cc:to :from:date; bh=NYJlEQ3cIi5fK2z6Q9sAlPrOZdQZXRJ1E1i3zUxL3NY=; b=s35ymJ1Md5s8lQbDs+XdJgoxo4YPicgM73FXLrib+0hhOIeKJK+51/jzdujg6WsBoH AeWhoggXrQ2nYJwFlQi0KVCBdJ8jYiuZxkaiscGqzIOd6gJLYfwaIQeYVhs53AaJXuN0 01xJuRr7mvyPKozF9pLf6advEkZ0XF+AH0V0PgEGMSbDyxD94dwB7yBh1yPnMs1OSPuj Ij1wpWS1c0GKNbNvLMLZ4FdOmBhfXtLexZw94jauFfYt6KOH65V8XchLS+ky/r042yZ7 cSgSTrGqTLweB6wVNFdcNSYDpEom9RSUZFoD0gFkQz/o4WEBZMj8e3Ax6CP1uFR59gCV D8rA== 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 w5si1281551otq.238.2020.03.06.05.42.35; Fri, 06 Mar 2020 05:42:47 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726915AbgCFNmJ (ORCPT + 99 others); Fri, 6 Mar 2020 08:42:09 -0500 Received: from mout.kundenserver.de ([217.72.192.74]:47109 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726314AbgCFNmI (ORCPT ); Fri, 6 Mar 2020 08:42:08 -0500 Received: from mail.cetitecgmbh.com ([87.190.42.90]) by mrelayeu.kundenserver.de (mreue108 [212.227.15.183]) with ESMTPSA (Nemesis) id 1MPGNn-1j0Vx30J4P-00PfWP; Fri, 06 Mar 2020 14:41:56 +0100 Received: from pflvmailgateway.corp.cetitec.com (unknown [127.0.0.1]) by mail.cetitecgmbh.com (Postfix) with ESMTP id E0ECD64F2B8; Fri, 6 Mar 2020 13:41:54 +0000 (UTC) X-Virus-Scanned: amavisd-new at cetitec.com Received: from mail.cetitecgmbh.com ([127.0.0.1]) by pflvmailgateway.corp.cetitec.com (pflvmailgateway.corp.cetitec.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id CcPke4HdLmdh; Fri, 6 Mar 2020 14:41:54 +0100 (CET) Received: from pfwsexchange.corp.cetitec.com (unknown [10.10.1.99]) by mail.cetitecgmbh.com (Postfix) with ESMTPS id 756F064CD35; Fri, 6 Mar 2020 14:41:54 +0100 (CET) Received: from pflmari.corp.cetitec.com (10.10.2.141) by PFWSEXCHANGE.corp.cetitec.com (10.10.1.99) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Fri, 6 Mar 2020 14:41:54 +0100 Received: by pflmari.corp.cetitec.com (Postfix, from userid 1000) id 1C188804FA; Fri, 6 Mar 2020 14:41:54 +0100 (CET) Date: Fri, 6 Mar 2020 14:41:54 +0100 From: Alex Riesen To: Laurent Pinchart CC: Geert Uytterhoeven , Kieran Bingham , Mauro Carvalho Chehab , Hans Verkuil , Rob Herring , Mark Rutland , Driver Development , Linux Media , Linux Kernel , Device Tree , Renesas SoC Subject: Re: [PATCH 8/8] arm64: dts: renesas: salvator: add a connection from adv748x codec (HDMI input) to the R-Car SoC Message-ID: <20200306134154.GD27714@pflmari> Mail-Followup-To: Alex Riesen , Laurent Pinchart , Geert Uytterhoeven , Kieran Bingham , Mauro Carvalho Chehab , Hans Verkuil , Rob Herring , Mark Rutland , Driver Development , Linux Media , Linux Kernel , Device Tree , Renesas SoC References: <20200113141556.GI3606@pflmari> <20200302134011.GA3717@pflmari> <20200302150706.GB3717@pflmari> <20200302160906.GC3717@pflmari> <20200305143628.GB25741@pflmari> <20200306131632.GA4878@pendragon.ideasonboard.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <20200306131632.GA4878@pendragon.ideasonboard.com> X-Originating-IP: [10.10.2.141] X-ClientProxiedBy: PFWSEXCHANGE.corp.cetitec.com (10.10.1.99) To PFWSEXCHANGE.corp.cetitec.com (10.10.1.99) X-EsetResult: clean, is OK X-EsetId: 37303A29536F936F637265 X-Provags-ID: V03:K1:MYH9fUJEmTLzs751ZE7H3XogVug1Pd2e7lMETYI9kqko498wXNx fS9i28Ga1cv76eGr+epr2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cPGYDS10YRdq3xrCY Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Laurent, Laurent Pinchart, Fri, Mar 06, 2020 14:16:32 +0100: > On Thu, Mar 05, 2020 at 03:36:28PM +0100, Alex Riesen wrote: > > Geert Uytterhoeven, Mon, Mar 02, 2020 17:13:30 +0100: > > > On Mon, Mar 2, 2020 at 5:09 PM Alex Riesen wrote: > > > > Geert Uytterhoeven, Mon, Mar 02, 2020 16:32:32 +0100: > > > > > > > > > > The #clock-cells should be in the main video-receiver node. > > > > > Probably there is more than one clock output, so #clock-cells may be 1? > > > > > > > > AFAICS, the device can provide only this one clock line (audio master clock > > > > for I2S output)... I shall re-check, just in case. > > > > And you're right, of course: the audio output formatting module of the ADV748x > > devices provides a set of clock lines related to the I2S pins: the already > > discussed master clock, left-right channel clock and the serial clock (bit > > clock?). > > I don't think we need to model the last two clocks through CCF though, > they're part of the I2S protocol, not clock sources that need to be > explicitly controlled (or queried). That's good, because I'm right now having hard time finding out how to calculate the frequencies! > > Just to try it out (I'll set #clock-cells to 1), I registered a fixed rate > > clock in the driver, added a clock provider: > > > > adv748x_probe: > > > > clk = clk_register_fixed_rate(state->dev, > > "clk-hdmi-i2s-mclk", > > NULL /* parent_name */, > > 0 /* flags */, > > 12288000 /* rate */); > > of_clk_add_provider(state->dev->of_node, of_clk_src_simple_get, clk); > > > > And removed the audio_clk_c frequency setting. I also replaced the audio_clk_c > > in the list of input clocks of the R-Car-side sound card with the phandle of > > the adv7482 main node: > > > > salvator-common.dtsi: > > > > &i2c4 { > > status = "okay"; > > > > adv7482_hdmi_decoder: video-receiver@70 { > > #clock-cells = <0>; // to be replaced with <1> > > }; > > }; > > > > &rcar_sound { > > clocks = ..., <&adv7482_hdmi_decoder>, ...; > > }; > > > > As everything continues to work as before, I assume that at least the clock > > dependencies were resolved. > > This looks good to me. Ok, I settle on this than. > > Is there a way to verify that the added input clock is actually used? > > IOW, if its frequency is actually has been programmed into the ssi4 (R-Car > > receiving hardware) registers, and not just a left-over from previuos attempts > > or plain default setting? > > > > As the ADV748x devices seem to provide also the clocks for video outputs, will > > it make any sense to place the clock definition into the port node? > > Or should all provided clocks be indexed in the main device node? > > Those clocks are part of the CSI-2 protocol and also don't need to be > explicitly controlled. As far as I can tell from a quick check of the > ADV7482 documentation, only the I2S MCLK is a general-purpose clock that > needs to be exposed. Thanks, that's good to know! Do you know, by chance, which of the snd_soc* callbacks should be used to implement setting of the MCLK? The one in snd_soc_component_driver or snd_soc_dai_driver->ops (snd_soc_dai_ops)? Or how the userspace interface looks like? Or, if there is no userspace interface for this, how the MCLK is supposed to be set? Through mclk-fs? Regards, Alex