Received: by 2002:a4f:b056:0:0:0:0:0 with SMTP id m22csp1392139ivi; Fri, 2 Oct 2020 09:03:37 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyKmrbvrJLRgbIW2LQflT/3SNQ+xCDLq0UCcgAbyyjqNRwXCbdgYqBTmYUmtXdnt3p2v5V1 X-Received: by 2002:a17:906:dd2:: with SMTP id p18mr3073481eji.211.1601654617700; Fri, 02 Oct 2020 09:03:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1601654617; cv=none; d=google.com; s=arc-20160816; b=Xg7CHRLn2PPZ7CYqYKWkeSbBe2p9c8OvyBu4K+fJEO8OboFM7prDQEP+L2uHQZdp2i 8zq+eO3HxZrS2ZRUDK7V3WEiSKdl4AlS6Y2b2GSyArxk+Lby+5U5LXKaOD4/ThrtmXYE kJz7Umhq2gsGPN4PnWeiYgDNXWrrhIO5G/AHYHQsTWRsxSROJZqR00WuEQV+kgzYNoxD +u3lv740D6CmlkVl1HGv6vtBpf1iUPE9HzKcSzD730vojJtx4rwClO5E4nz2XHje2846 yzh9dq0McBeN/N6Y8WmhzVpEGnfBm/Qrt4iuJ+ZXe6oOhnhF1AagKIAvd3Ro9Rx7bmHL BwJA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=djx2E1NwbIz4/NZf9pUZHpgnzpKYA44NN+Q6dr4EQBY=; b=GtTJ1cWPLEHcmuOOrJhFfsD9dr1uw/fs1eoKrrHvbrT3Ge5oPAn+72UNIlrrttW67W l19NnNHrd5TcRE03eNpJ96R1kYMrAlXN/38gA3b1tpoasBG7QHosmZj6EABYBH1uMAWm t1hl1tXNh1nVWZf4o7ks632EYISruERVBy83HFzeCEEZeG0P84rMNVjKTmnXNsr5QFlL f4RwD5r+DmxdseQNerzv72gNE26wHTuT7MCjc0BAHmU1c6qyKlXCeyYPCoK9xypwnuUC jedGilCQMxuArb9uOEfUpQw4Bwd7U6zrmogpPORAg0DwfWG5yG1tfChlZkcJu9QyL4cJ A+3w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=VOR2gMTs; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id ds18si1249607ejc.745.2020.10.02.09.03.13; Fri, 02 Oct 2020 09:03:37 -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 header.i=@gmail.com header.s=20161025 header.b=VOR2gMTs; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388053AbgJBQBd (ORCPT + 99 others); Fri, 2 Oct 2020 12:01:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40530 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726017AbgJBQBd (ORCPT ); Fri, 2 Oct 2020 12:01:33 -0400 Received: from mail-io1-xd41.google.com (mail-io1-xd41.google.com [IPv6:2607:f8b0:4864:20::d41]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 56ADCC0613D0; Fri, 2 Oct 2020 09:01:33 -0700 (PDT) Received: by mail-io1-xd41.google.com with SMTP id z25so2048524iol.10; Fri, 02 Oct 2020 09:01:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=djx2E1NwbIz4/NZf9pUZHpgnzpKYA44NN+Q6dr4EQBY=; b=VOR2gMTsMF6YapeksUWrfxuuAonuvm7dyeNpVx9In8aGbHotqpoTp2kPpH9tJMnKd0 MwlDHqMPU/qxAiLIrntySAJ2F3QSZMHfjitSZ4qs8HhpyDW9pLJEuOlnaUu9Fbx1STLP L7jG2/EywJPwzl57SDzNq8n3Q8upBdCBHO8SE4Q95EzDzHnekbehmmjpvQiJ38c4w3d5 I06XIghpFSFn+xXvsH4An6TPEpaG3HwOekq32V+DavFdKvEgCnmw8WVJPhSpTungpf42 FQ4BKfASHwV4Xcmx78Keu9hYXx+x6ftUzKcm1sp3K1nj+8x81GN7oc4yOO0YG0fHc/cu fu9w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=djx2E1NwbIz4/NZf9pUZHpgnzpKYA44NN+Q6dr4EQBY=; b=nmlPKetAxhto/ao46PNpt1a45QtGw1ndLP4dN44vHQn2lNwUinAJmaGjJySUEeldoo rSahQOMF6cpZ/HxSCbVcJPqgblwxjU/hQ3Cgfwv1GEcch5NQ76twxG2zluWN92Iy2W3S WGDlQamkg1ZcpGWqEAXOa2hMFY5L1ayOG9zA+7O6drW4GuJNaoUAQtGk4FvlRqLgSf+E UpDUNxTrPurUccaemEH0j6tczUdkHtBSqcfUXFWFMFQbuGAGYrGTMTH8szSYL30jG3bq +y29mZVyOFOuOQkBJNruKvZ3CAR/aYGq6snA1SfMTMjxjvb9VeGHZoQeiUVYLyEBEth7 eNiQ== X-Gm-Message-State: AOAM532/5xgas/6w+Mk8mlT1LXvouLrSP/OcQ++CEn2JnwCVEPuTsk+P QDOzBcG4+K3ETO5P3L/XqmWuVDDkWba/Z9tpA04= X-Received: by 2002:a5d:8ace:: with SMTP id e14mr2463373iot.124.1601654492346; Fri, 02 Oct 2020 09:01:32 -0700 (PDT) MIME-Version: 1.0 References: <20200927192912.46323-1-peron.clem@gmail.com> <20200927192912.46323-10-peron.clem@gmail.com> In-Reply-To: From: =?UTF-8?B?Q2zDqW1lbnQgUMOpcm9u?= Date: Fri, 2 Oct 2020 18:01:21 +0200 Message-ID: Subject: Re: [linux-sunxi] [PATCH v5 09/20] arm64: dts: allwinner: h6: Add DAI node and soundcard for HDMI To: Chen-Yu Tsai Cc: Maxime Ripard , Rob Herring , Mark Brown , Liam Girdwood , Jaroslav Kysela , Takashi Iwai , Marcus Cooper , Jernej Skrabec , Linux-ALSA , devicetree , linux-arm-kernel , linux-kernel , linux-sunxi Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Chen-Yu, On Mon, 28 Sep 2020 at 07:42, Chen-Yu Tsai wrote: > > On Mon, Sep 28, 2020 at 1:32 PM Chen-Yu Tsai wrote: > > > > On Mon, Sep 28, 2020 at 3:29 AM Cl=C3=A9ment P=C3=A9ron wrote: > > > > > > From: Jernej Skrabec > > > > > > Add the I2S node used by the HDMI and a simple-soundcard to > > > link audio between HDMI and I2S. > > > > > > Note that the HDMI codec requires an inverted frame clock and > > > a fixed I2S width. As there is no such option for I2S we use > > > TDM property of the simple-soundcard to do that. > > > > > > Signed-off-by: Jernej Skrabec > > > Signed-off-by: Marcus Cooper > > > Signed-off-by: Cl=C3=A9ment P=C3=A9ron > > > --- > > > arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi | 33 ++++++++++++++++++= ++ > > > 1 file changed, 33 insertions(+) > > > > > > diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi b/arch/arm6= 4/boot/dts/allwinner/sun50i-h6.dtsi > > > index 28c77d6872f6..a8853ee7885a 100644 > > > --- a/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi > > > +++ b/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi > > > @@ -67,6 +67,25 @@ de: display-engine { > > > status =3D "disabled"; > > > }; > > > > > > + hdmi_sound: hdmi-sound { > > > + compatible =3D "simple-audio-card"; > > > + simple-audio-card,format =3D "i2s"; > > > + simple-audio-card,name =3D "sun50i-h6-hdmi"; > > > + simple-audio-card,mclk-fs =3D <128>; > > > + simple-audio-card,frame-inversion; > > > + status =3D "disabled"; > > > + > > > + simple-audio-card,codec { > > > + sound-dai =3D <&hdmi>; > > > + }; > > > + > > > + simple-audio-card,cpu { > > > + sound-dai =3D <&i2s1>; > > > + dai-tdm-slot-num =3D <2>; > > > > Doesn't this end up limiting the number of audio channels HDMI can carr= y? > > AFAICT the TDM properties are all optional, so just leave it out. > > > > Same goes for the other two patches. > > > > > + dai-tdm-slot-width =3D <32>; > > > + }; > > > + }; > > > + > > > osc24M: osc24M_clk { > > > #clock-cells =3D <0>; > > > compatible =3D "fixed-clock"; > > > @@ -609,6 +628,19 @@ mdio: mdio { > > > }; > > > }; > > > > > > + i2s1: i2s@5091000 { > > > + #sound-dai-cells =3D <0>; > > > + compatible =3D "allwinner,sun50i-h6-i2s"; > > > + reg =3D <0x05091000 0x1000>; > > > + interrupts =3D ; > > > + clocks =3D <&ccu CLK_BUS_I2S1>, <&ccu CLK_I2S= 1>; > > > + clock-names =3D "apb", "mod"; > > > + dmas =3D <&dma 4>, <&dma 4>; > > > + resets =3D <&ccu RST_BUS_I2S1>; > > > + dma-names =3D "rx", "tx"; > > Sorry, missed this one. > > Given that usage for this interface is transmit only, and there is no > RX DRQ number assigned to it, you should drop the RX DMA number and name. Indeed if there is no DRQ number assigned we shouldn't have it in the device-tree but Samuel told me that the `make dtbs_check` reports: i2s@1c22800: dma-names:0: 'rx' was expected i2s@1c22800: dma-names: ['tx'] is too short i2s@1c22800: dmas: [[28, 27]] is too short Should I fix the YAML so? Regards, Clement > > > > + status =3D "disabled"; > > > + }; > > > + > > > spdif: spdif@5093000 { > > > #sound-dai-cells =3D <0>; > > > compatible =3D "allwinner,sun50i-h6-spdif"; > > > @@ -739,6 +771,7 @@ ohci3: usb@5311400 { > > > }; > > > > > > hdmi: hdmi@6000000 { > > > + #sound-dai-cells =3D <0>; > > > compatible =3D "allwinner,sun50i-h6-dw-hdmi"; > > > reg =3D <0x06000000 0x10000>; > > > reg-io-width =3D <1>; > > > > The rest of the patch looks OK.