Received: by 2002:a25:c205:0:0:0:0:0 with SMTP id s5csp6823312ybf; Fri, 6 Mar 2020 05:17:32 -0800 (PST) X-Google-Smtp-Source: ADFU+vtfWs/9fu9ERUpDeF2gPniA46v3K5tusGLMhvuwHOhXgYRsK7vN5DKV70L6PydH7IOMiQlB X-Received: by 2002:a05:6830:1ded:: with SMTP id b13mr2286082otj.330.1583500652347; Fri, 06 Mar 2020 05:17:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1583500652; cv=none; d=google.com; s=arc-20160816; b=KnAihgsZhgvP6LNB0pY/Rb+A0yiIoFmb4G/dyFsUektRTrHKLJOjd9oA1GH8yvQVBQ UpKZyWCbk5tVXfg4V21e9cZ9yOYASsPD2wuFSBwYwJ1wcss5RgcWUWVJx1yy9CKqXVdb rNoYwwJYNZpX3U7541QWcqk3fcYGOetll/n1zGe7HxryXbprFnfE5D88nhTpPLSdW/xe LdTlJ0oyqqqT9YpqSN8zF1Kn0WV6OT23qchZBx2LVwkbGgDQZMRFrdhsZfvLyu74d88L x0tlcQTHY/R2xxLzDArtfofvUfgf0PND3DhAsDnyiE7a9IHZbl9+wX2HfUcyaEMPXQJR ZESQ== 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:dkim-signature; bh=+qr8wCGXQgWhX2PTdyHhWMixtYfSX2T6/MEZjgHvY+g=; b=ZeloqUn8Tjc0rlAKivPzHLqrPijmYn5WunvnMB48yuSE9SjZQHOC/EubGnOn7kaYFA Xx64wfh4nrziTQGXuq2P7g/rhCI1xCCUmDZY4LvIX1Lm2SxMBpZr0mt2sjXc4rh/tUeq RfjNyGUGaIYFDYYrn69mMk09/JT9BrvZagoinE4rnC5267xVQcdHZG7TmjSCFSgbJpVU FRwwscmOJDlOT+HKhOxbnKTBeCekR5IuZn+3e3njf6IXjEWd9gwlluliNcJgnD7b9HsV KOjVtbjOz2GiEspuLl0HER1gVFoAwzKmXDHjxfnWANqTEVUKXS5y01u9x+rPIHY/dned zERw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass (test mode) header.i=@ideasonboard.com header.s=mail header.b=Qk7w4kF6; 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 l8si1279741oii.249.2020.03.06.05.17.20; Fri, 06 Mar 2020 05:17:32 -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; dkim=pass (test mode) header.i=@ideasonboard.com header.s=mail header.b=Qk7w4kF6; 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 S1727392AbgCFNQj (ORCPT + 99 others); Fri, 6 Mar 2020 08:16:39 -0500 Received: from perceval.ideasonboard.com ([213.167.242.64]:44518 "EHLO perceval.ideasonboard.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726992AbgCFNQi (ORCPT ); Fri, 6 Mar 2020 08:16:38 -0500 Received: from pendragon.ideasonboard.com (81-175-216-236.bb.dnainternet.fi [81.175.216.236]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 2DF4524B; Fri, 6 Mar 2020 14:16:35 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1583500595; bh=/rMq1rqwJlIIRSEMtL+O8FDFAd+2QA+1ULHVhkvPuv0=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Qk7w4kF6at+pQnnz2ADC9S4gjiYsADhj1rdQaSA+cm0KFFqJDg80QotWNNPjaITBX pUjsV4phQR1MOqE6wB3JKlpsytbxxdu8aUnjftX7FQ//8GwxHrmscS9ccS3zgpuLnG eVSDq/x5DxD7tI8l8suf7pFQJUp7AY9+vipyH7Dk= Date: Fri, 6 Mar 2020 15:16:32 +0200 From: Laurent Pinchart To: Alex Riesen 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: <20200306131632.GA4878@pendragon.ideasonboard.com> References: <20200113141556.GI3606@pflmari> <20200302134011.GA3717@pflmari> <20200302150706.GB3717@pflmari> <20200302160906.GC3717@pflmari> <20200305143628.GB25741@pflmari> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20200305143628.GB25741@pflmari> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Alex, 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). > > > > There is no need for a fixed-clock compatible, nor for clock-frequency > > > > and clock-output-names. > > > > > > > > But most important: this should be documented in the adv748x DT bindings, > > > > and implemented in the adv748x driver. > > > > > > So if the driver is to export that clock for the kernel (like in this case), > > > it must implement its support? > > > > Exactly. Unless that pin is hardcoded to output a fixed clock, in which case > > you can just override the existing audio_clk_c rate. > > 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. > 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. -- Regards, Laurent Pinchart