Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp2961545pxa; Tue, 25 Aug 2020 08:00:44 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw7h+h2yr7rJBl/Nshd5qOryX+kcWitjOakVmeUnJu+7JPgBgoyeyRsNFomKHiFeozAKEeB X-Received: by 2002:a17:907:2092:: with SMTP id pv18mr10813509ejb.534.1598367643859; Tue, 25 Aug 2020 08:00:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1598367643; cv=none; d=google.com; s=arc-20160816; b=lEE7BfI4HTB1TPNfMpWF+u+OsiyCUcZ0n3GfYAXj5t5G1y6NFIUroFku+PK1/+DD0K 6A/waVWKiL9baKUZ1AF7yPal0Ia38sAyvhojhdSlj8GJQyG+NlJZ0XZymFvg6xhtw/ia aicFewqaDGp9/lb+iResj/G+UxGOulCWB1GIwtWx0Z4jNEny/w7tKX9pJ2YDaFZY7jwV yPXMtXcux5kCfkaa1BAzEd5BW+Mt1YVw6CSrnjJpqkSPJcaRsw+GKZSh7WIbEY4Pg/0p odM13v+pDsgwHumqwlFAqRTlZ6nIrBvUxsDASGqV7KkwN2WtriJJaceZvIltnLawZOsM f1qQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:organization:autocrypt:references:to:from:subject :reply-to:dkim-signature; bh=SZV5LQwJiJQRwbiVi/HlaawyIfSE20lY774YeDLuCpk=; b=TikW/HwuvqJeYIjpkwlv3pgMmk8r9rtEKZWFX91B4b5q72iujNuu4KLtxFvbDI9+ir pkROmKaHcgJc3B7kZuhH3NdMAtnmFByrVHOR5tWM2k+py5BZyvKVuZ6TPCmjCGqd7JmE kjnHb1wrH010MXuulZ7jFtgDmY6dIz7YA+W+uRWWcjMZ/Di+1gLKtjm48S6gDBQqv72R ltPHDE1xI4Pn//KGMx0z2O9afjAnWlp9GWT63AnZQFRxceu1n5JoQZGanVn4PTqZ4+Kq TpZNBUyquGO6b74aiqLTO111dM3QauJLRHT6+N/t9wCb9x0CDhtxYmfXNaKHFAx9tkwT JIDg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass (test mode) header.i=@ideasonboard.com header.s=mail header.b=H5z51FJG; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id f24si7514909ejw.458.2020.08.25.08.00.20; Tue, 25 Aug 2020 08:00:43 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass (test mode) header.i=@ideasonboard.com header.s=mail header.b=H5z51FJG; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726697AbgHYO52 (ORCPT + 99 others); Tue, 25 Aug 2020 10:57:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37914 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727066AbgHYO5N (ORCPT ); Tue, 25 Aug 2020 10:57:13 -0400 Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4B1CAC061574; Tue, 25 Aug 2020 07:57:12 -0700 (PDT) Received: from [192.168.0.20] (cpc89244-aztw30-2-0-cust3082.18-1.cable.virginm.net [86.31.172.11]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 7972029E; Tue, 25 Aug 2020 16:57:07 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1598367428; bh=ApFDUDAZh97tdh8G+B/ThY2Go5hWkE36+XZ4tnyH2c0=; h=Reply-To:Subject:From:To:References:Date:In-Reply-To:From; b=H5z51FJGbyJguEYCNyY0/0s0QD+/zUvg4YVL1hh1z8W9l0P3FXK+nIXMR5QsxJhP5 zjSr1Bx/NLsYClfN6CX2WyvpD+JJGN1xyb4lqDGiQElbT+3ciKTjR85XqTk2WkvJS1 iqQOBoD0NV6wfHTcmWHoZlGDdtBwwk+WfEWSD9mw= Reply-To: kieran.bingham@ideasonboard.com Subject: Re: [PATCH v5 9/9] arm64: dts: renesas: salvator: add a connection from adv748x codec (HDMI input) to the R-Car SoC From: Kieran Bingham To: Alex Riesen , Geert Uytterhoeven , Mauro Carvalho Chehab , Hans Verkuil , Laurent Pinchart , Rob Herring , Mark Rutland , Kuninori Morimoto , devel@driverdev.osuosl.org, linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux-renesas-soc@vger.kernel.org References: <90f2c14fcbe5d06eefdaeadbe8a6efc8c91523f3.1585852001.git.alexander.riesen@cetitec.com> Autocrypt: addr=kieran.bingham@ideasonboard.com; keydata= mQINBFYE/WYBEACs1PwjMD9rgCu1hlIiUA1AXR4rv2v+BCLUq//vrX5S5bjzxKAryRf0uHat V/zwz6hiDrZuHUACDB7X8OaQcwhLaVlq6byfoBr25+hbZG7G3+5EUl9cQ7dQEdvNj6V6y/SC rRanWfelwQThCHckbobWiQJfK9n7rYNcPMq9B8e9F020LFH7Kj6YmO95ewJGgLm+idg1Kb3C potzWkXc1xmPzcQ1fvQMOfMwdS+4SNw4rY9f07Xb2K99rjMwZVDgESKIzhsDB5GY465sCsiQ cSAZRxqE49RTBq2+EQsbrQpIc8XiffAB8qexh5/QPzCmR4kJgCGeHIXBtgRj+nIkCJPZvZtf Kr2EAbc6tgg6DkAEHJb+1okosV09+0+TXywYvtEop/WUOWQ+zo+Y/OBd+8Ptg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OBlwNlcKG7j7W2MC06BlTbdEkUp ECzuuRBv8wX4OQl+hbWbB/VKIx5HKlLu1eypen/5lNVzSqMMIYkkZcjV2SWQyUGxSwq0O/sx S0A8/atCHUXOboUsn54qdxrVDaK+6jIAuo8JiRWctP16KjzUM7MO0/+4zllM8EY57rXrj48j sbEYX0YQnzaj+jO6kJtoZsIaYR7rMMq9aUAjyiaEZpmP1qF/2sYenDx0Fg2BSlLvLvXM0vU8 pQk3kgDu7kb/7PRYrZvBsr21EIQoIjXbZxDz/o7z95frkP71EaICttZ6k9q5oxxA5WC6sTXc MW8zs8avFNuA9VpXt0YupJd2ijtZy2mpZNG02fFVXhIn4G807G7+9mhuC4XG5rKlBBUXTvPU AfYnB4JBDLmLzBFavQfvonSfbitgXwCG3vS+9HEwAjU30Bar1PEOmIbiAoMzuKeRm2LVpmq4 WZw01QYHU/GUV/zHJSFk Organization: Ideas on Board Message-ID: Date: Tue, 25 Aug 2020 15:57:04 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-GB Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Alex, On 18/06/2020 17:32, Kieran Bingham wrote: > Hi Alex, > > On 02/04/2020 19:35, Alex Riesen wrote: >> As all known variants of the Salvator board have the HDMI decoder >> chip (the ADV7482) connected to the SSI4 on R-Car SoC, the ADV7482 >> endpoint and the connection definitions are placed in the common board >> file. >> >> For the same reason, the CLK_C clock line and I2C configuration (similar >> to the ak4613, on the same interface) are added into the common file. >> >> Signed-off-by: Alexander Riesen >> >> -- >> >> v5: Add dummy ssi4 node to the rcar sound card in r8a77961, as the >> devices (Salvator-X 2nd version with R-Car M3 W+) also reference >> salvator-common.dtsi. >> Suggested-by: Geert Uytterhoeven >> >> v2: Also add ssi4_ctrl pin group in the sound pins. The pins are >> responsible for SCK4 (sample clock) WS4 and (word boundary input), >> and are required for SSI audio input over I2S. >> >> The adv748x shall provide its own implementation of the output clock >> (MCLK), connected to the audio_clk_c line of the R-Car SoC. >> >> If the frequency of the ADV748x MCLK were fixed, the clock >> implementation were not necessary, but it does not seem so: the MCLK >> depends on the value in a speed multiplier register and the input sample >> rate (48kHz). >> >> Remove audio clock C from the clocks of adv7482. >> >> The clocks property of the video-receiver node lists the input >> clocks of the device, which is quite the opposite from the >> original intention: the adv7482 on Salvator X boards is a >> provide of the MCLK clock for I2S audio output. >> >> Remove old definition of &sound_card.dais and reduce size of changes >> in the Salvator-X specific device tree source. >> >> Declare video-receiver a clock producer, as the adv748x driver >> implements the master clock used I2S audio output. >> >> Suggested-by: Geert Uytterhoeven >> >> v2: The driver provides only MCLK clock, not the SCLK and LRCLK, >> which are part of the I2S protocol. >> >> Suggested-by: Laurent Pinchart >> --- >> .../boot/dts/renesas/r8a77950-salvator-x.dts | 3 +- >> arch/arm64/boot/dts/renesas/r8a77961.dtsi | 1 + >> .../boot/dts/renesas/salvator-common.dtsi | 47 +++++++++++++++++-- Once again I'm back trying to test this series, and one issue I've had is that the board I have (r8a77951-salvator-xs.dts) isn't included in this DT update. For v6, Should we include the relevant changes to all the following? arch/arm64/boot/dts/renesas/r8a77950-salvator-x.dts arch/arm64/boot/dts/renesas/r8a77951-salvator-x.dts arch/arm64/boot/dts/renesas/r8a77960-salvator-x.dts arch/arm64/boot/dts/renesas/r8a77965-salvator-x.dts arch/arm64/boot/dts/renesas/salvator-x.dtsi And perhaps handle the salvator-xs in a second (yet very similar) patch? arch/arm64/boot/dts/renesas/r8a77951-salvator-xs.dts arch/arm64/boot/dts/renesas/r8a77960-salvator-xs.dts arch/arm64/boot/dts/renesas/r8a77961-salvator-xs.dts arch/arm64/boot/dts/renesas/r8a77965-salvator-xs.dts arch/arm64/boot/dts/renesas/salvator-xs.dtsi I think I've added the relevant entries to my dtb, but I haven't successfully captured audio yet. I can see the device being listed through arecord: kbingham@salvator-xs:~$ arecord -l **** List of CAPTURE Hardware Devices **** card 0: rcarsound [rcar-sound], device 0: rsnd-dai.0-ak4613-hifi ak4613-hifi-0 [] Subdevices: 0/1 Subdevice #0: subdevice #0 card 0: rcarsound [rcar-sound], device 3: rsnd-dai.3-adv748x-i2s adv748x.4-0070-3 [] Subdevices: 1/1 Subdevice #0: subdevice #0 But as yet, everything I try to record fails or is empty silence. Debugging ... -- Regards Kieran >> 3 files changed, 45 insertions(+), 6 deletions(-) >> >> diff --git a/arch/arm64/boot/dts/renesas/r8a77950-salvator-x.dts b/arch/arm64/boot/dts/renesas/r8a77950-salvator-x.dts >> index 2438825c9b22..e16c146808b6 100644 >> --- a/arch/arm64/boot/dts/renesas/r8a77950-salvator-x.dts >> +++ b/arch/arm64/boot/dts/renesas/r8a77950-salvator-x.dts >> @@ -146,7 +146,8 @@ &sata { >> &sound_card { >> dais = <&rsnd_port0 /* ak4613 */ >> &rsnd_port1 /* HDMI0 */ >> - &rsnd_port2>; /* HDMI1 */ >> + &rsnd_port2 /* HDMI1 */ >> + &rsnd_port3>; /* adv7482 hdmi-in */ > > Ah - that was confusing at first... but HDMI0 and HDMI1 are *outputs*, > where of course the adv7482 is an input ;-) > > > Otherwise, I can't spot anything else yet so: > > Reviewed-by: Kieran Bingham > > But I fear there may have been some churn around here, so it would be > good to see a rebase too. > > -- > Kieran > > > >> }; >> >> &usb2_phy2 { >> diff --git a/arch/arm64/boot/dts/renesas/r8a77961.dtsi b/arch/arm64/boot/dts/renesas/r8a77961.dtsi >> index be3824bda632..b79907beaf31 100644 >> --- a/arch/arm64/boot/dts/renesas/r8a77961.dtsi >> +++ b/arch/arm64/boot/dts/renesas/r8a77961.dtsi >> @@ -861,6 +861,7 @@ rcar_sound,src { >> rcar_sound,ssi { >> ssi0: ssi-0 { }; >> ssi1: ssi-1 { }; >> + ssi4: ssi-4 { }; >> }; >> }; >> >> diff --git a/arch/arm64/boot/dts/renesas/salvator-common.dtsi b/arch/arm64/boot/dts/renesas/salvator-common.dtsi >> index 98bbcafc8c0d..ead7f8d7a929 100644 >> --- a/arch/arm64/boot/dts/renesas/salvator-common.dtsi >> +++ b/arch/arm64/boot/dts/renesas/salvator-common.dtsi >> @@ -460,7 +460,7 @@ pca9654: gpio@20 { >> #gpio-cells = <2>; >> }; >> >> - video-receiver@70 { >> + adv7482_hdmi_in: video-receiver@70 { >> compatible = "adi,adv7482"; >> reg = <0x70 0x71 0x72 0x73 0x74 0x75 >> 0x60 0x61 0x62 0x63 0x64 0x65>; >> @@ -469,6 +469,7 @@ video-receiver@70 { >> >> #address-cells = <1>; >> #size-cells = <0>; >> + #clock-cells = <0>; /* the MCLK for I2S output */ >> >> interrupt-parent = <&gpio6>; >> interrupt-names = "intrq1", "intrq2"; >> @@ -510,6 +511,15 @@ adv7482_txb: endpoint { >> remote-endpoint = <&csi20_in>; >> }; >> }; >> + >> + port@c { >> + reg = <12>; >> + >> + adv7482_i2s: endpoint { >> + remote-endpoint = <&rsnd_endpoint3>; >> + system-clock-direction-out; >> + }; >> + }; >> }; >> >> csa_vdd: adc@7c { >> @@ -684,7 +694,8 @@ sdhi3_pins_uhs: sd3_uhs { >> }; >> >> sound_pins: sound { >> - groups = "ssi01239_ctrl", "ssi0_data", "ssi1_data_a"; >> + groups = "ssi01239_ctrl", "ssi0_data", "ssi1_data_a", >> + "ssi4_data", "ssi4_ctrl"; >> function = "ssi"; >> }; >> >> @@ -733,8 +744,8 @@ &rcar_sound { >> pinctrl-0 = <&sound_pins &sound_clk_pins>; >> pinctrl-names = "default"; >> >> - /* Single DAI */ >> - #sound-dai-cells = <0>; >> + /* multi DAI */ >> + #sound-dai-cells = <1>; >> >> /* audio_clkout0/1/2/3 */ >> #clock-cells = <1>; >> @@ -758,8 +769,19 @@ &rcar_sound { >> <&cpg CPG_MOD 1020>, <&cpg CPG_MOD 1021>, >> <&cpg CPG_MOD 1019>, <&cpg CPG_MOD 1018>, >> <&audio_clk_a>, <&cs2000>, >> - <&audio_clk_c>, >> + <&adv7482_hdmi_in>, >> <&cpg CPG_CORE CPG_AUDIO_CLK_I>; >> + clock-names = "ssi-all", >> + "ssi.9", "ssi.8", "ssi.7", "ssi.6", >> + "ssi.5", "ssi.4", "ssi.3", "ssi.2", >> + "ssi.1", "ssi.0", >> + "src.9", "src.8", "src.7", "src.6", >> + "src.5", "src.4", "src.3", "src.2", >> + "src.1", "src.0", >> + "mix.1", "mix.0", >> + "ctu.1", "ctu.0", >> + "dvc.0", "dvc.1", >> + "clk_a", "clk_b", "clk_c", "clk_i"; >> >> ports { >> #address-cells = <1>; >> @@ -777,6 +799,21 @@ rsnd_endpoint0: endpoint { >> capture = <&ssi1 &src1 &dvc1>; >> }; >> }; >> + rsnd_port3: port@3 { >> + reg = <3>; >> + rsnd_endpoint3: endpoint { >> + remote-endpoint = <&adv7482_i2s>; >> + >> + dai-tdm-slot-num = <8>; >> + dai-tdm-slot-width = <32>; >> + dai-format = "left_j"; >> + mclk-fs = <256>; >> + bitclock-master = <&adv7482_i2s>; >> + frame-master = <&adv7482_i2s>; >> + >> + capture = <&ssi4>; >> + }; >> + }; >> }; >> }; >> >> > -- Regards -- Kieran