Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp2564911pxk; Sun, 27 Sep 2020 12:33:11 -0700 (PDT) X-Google-Smtp-Source: ABdhPJynXzcZH3QG+O1Y8yrIVTi8BSXMQHQElsYZ3bnTMAH9nlIw7Z5HqmFFWvaNgFsgTjGi1p7O X-Received: by 2002:a05:6402:6c1:: with SMTP id n1mr12585392edy.215.1601235191234; Sun, 27 Sep 2020 12:33:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1601235191; cv=none; d=google.com; s=arc-20160816; b=T95HsF4w9f4EUWiZ5mjpzitWU3zCzAMyG3lSj072O4dTarw1lkSoDfBv6uNabKehyv shMP0XO531rK1A65EEAmwQLZoSLezfg3D2tdHfdumnn2kRAu+tMLFdIKyKnk7M4ppiNp YvqVA2It3O2DwhACjMd3QkLL7J/wAN9wo5wclc2Cf9wR0xMm2+IiYI0esWkszq9/H6nt CVjDE74GBmUyj8sukypYUDekaEbidQu04/jXkdJC+XaQ7iFQaT9CDxaMb7ff9ATXilfW qWN7/RcXrRVk5Q3mQ7J9vjnpNHiHH6BvtX8owjNxguegZgSGqbUquXoIZsmgWg+D+cJG N6Cw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=qinYT+htnv5raGBG7/lcRXg3HUQ8nsG0V/iyMvoCrjw=; b=SHAtLt/SJZO7T9Kla5aF0pPV6EhvTBDG3/gI9DSGLov0OYZAHchBv4/yPRIRhpvQwe B3kifMiF7fV4NmGRuF9WX1DpPWGmmeExBr0Pzu8JMiBQs7/HKRwvLEmKecW9saQj/VUp v0crAu2tYaWldny62rZl5SS+trZL3Z9ln2CbOI8LxYzAd2kcHkGAeWVnDmHvGgEBZDlw FcvtPvQocvnRXLDv05r0LMTvwaoGPuaFzABfb76ZR21Z52VswsDAMw8Ry3YdRmlGz2CV rRmObfQ3/3KxJsq3iZZN7osCUx6JF74t0pK1Njiid6hC/aPfOcpBDo7i1W18o0OsvZIA 4bUA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=dtm3KvhW; 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 o10si5304772edt.499.2020.09.27.12.32.48; Sun, 27 Sep 2020 12:33:11 -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=dtm3KvhW; 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 S1726604AbgI0T3f (ORCPT + 99 others); Sun, 27 Sep 2020 15:29:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34300 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726325AbgI0T3c (ORCPT ); Sun, 27 Sep 2020 15:29:32 -0400 Received: from mail-wm1-x341.google.com (mail-wm1-x341.google.com [IPv6:2a00:1450:4864:20::341]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B2273C0613D6; Sun, 27 Sep 2020 12:29:31 -0700 (PDT) Received: by mail-wm1-x341.google.com with SMTP id y15so4630377wmi.0; Sun, 27 Sep 2020 12:29:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=qinYT+htnv5raGBG7/lcRXg3HUQ8nsG0V/iyMvoCrjw=; b=dtm3KvhWEjETON47MufCoWFczcCy9gWFncPJN6+SivV/cbZW/bpplLpDhNS2X0TXos jrLvrLhY8Gt3YHD7TK/49WPAmIbIkFLCj3UAv83nMC7/J3v0M+WIinhl7DHjoRP4Twgx QBK7KlThYbVtGDz3gCtB2VNdG24PNDqJLbTPrM7r1yLM2r6gefMj+CHG63Ykq3F+8XjN O+EMH2d+GRLYyXbFBffJbyFVJ68RBufeP4Bz7dccEOGoVKR5bg1C+P4XOegesib4PYNO JyRDGEYeO6zzYIMuzv/2lCkRnZyu9+LXe9h9nGlipwMPacBDG2XZ8Dk2UR62MjpFL167 qsfw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=qinYT+htnv5raGBG7/lcRXg3HUQ8nsG0V/iyMvoCrjw=; b=uQyHH8CnIGJJd5Bnu43wSChr23D81XjR5W6KitcTfrJXPBKupkVWJ9m6DSG6a3s0QS VWbb/aTW5OA5deN/71/uhdhHOOrE8InEx5ryqOGQucqVVNkNGa/bWk1KNM5P+UaRCj79 Br9AQ7lrbPeWx08HCj17c6WY6FG4K8XSd+pkEwZtYgVaUnKk7W39Ztqa8BFuT9AVGNv1 XAF0gZAdPSOVfKMtIO44RH0YWtLPH9nZ2MRkEcIKMWV+TniNL+9C86dHL9Z1DsP6WGIv 9oWvHS01nDqDl7Nguh9g84K5mKHj1XQk29w+1YUyc4xO27DuVlh31F7NZkUv5Vm29Xst wlOQ== X-Gm-Message-State: AOAM5336shFeMeF2bpg8s4OFjtLQoUh2xy0S+XmUV765DE95BGgvWvir c7fcnooAYYhvqeLMQ2SRrmk= X-Received: by 2002:a7b:c192:: with SMTP id y18mr7685544wmi.108.1601234970301; Sun, 27 Sep 2020 12:29:30 -0700 (PDT) Received: from clement-Latitude-7490.numericable.fr (213-245-241-245.rev.numericable.fr. [213.245.241.245]) by smtp.gmail.com with ESMTPSA id n21sm6149609wmi.21.2020.09.27.12.29.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 27 Sep 2020 12:29:29 -0700 (PDT) From: =?UTF-8?q?Cl=C3=A9ment=20P=C3=A9ron?= To: Maxime Ripard , Chen-Yu Tsai , Rob Herring , Mark Brown , Liam Girdwood Cc: Jaroslav Kysela , Takashi Iwai , Marcus Cooper , Jernej Skrabec , alsa-devel@alsa-project.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-sunxi@googlegroups.com, =?UTF-8?q?Cl=C3=A9ment=20P=C3=A9ron?= Subject: [PATCH v5 11/20] arm: dts: sunxi: h3/h5: Add DAI node and soundcard for HDMI Date: Sun, 27 Sep 2020 21:29:03 +0200 Message-Id: <20200927192912.46323-12-peron.clem@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200927192912.46323-1-peron.clem@gmail.com> References: <20200927192912.46323-1-peron.clem@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Marcus Cooper Add the new DAI block for I2S2 which is used for HDMI audio 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ément Péron --- arch/arm/boot/dts/sunxi-h3-h5.dtsi | 33 ++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/arch/arm/boot/dts/sunxi-h3-h5.dtsi b/arch/arm/boot/dts/sunxi-h3-h5.dtsi index 22d533d18992..7168e9412410 100644 --- a/arch/arm/boot/dts/sunxi-h3-h5.dtsi +++ b/arch/arm/boot/dts/sunxi-h3-h5.dtsi @@ -105,6 +105,25 @@ de: display-engine { status = "disabled"; }; + hdmi_sound: hdmi-sound { + compatible = "simple-audio-card"; + simple-audio-card,format = "i2s"; + simple-audio-card,name = "sun8i-h3-hdmi"; + simple-audio-card,mclk-fs = <128>; + simple-audio-card,frame-inversion; + status = "disabled"; + + simple-audio-card,codec { + sound-dai = <&hdmi>; + }; + + simple-audio-card,cpu { + sound-dai = <&i2s2>; + dai-tdm-slot-num = <2>; + dai-tdm-slot-width = <32>; + }; + }; + soc { compatible = "simple-bus"; #address-cells = <1>; @@ -662,6 +681,19 @@ i2s1: i2s@1c22400 { status = "disabled"; }; + i2s2: i2s@1c22800 { + #sound-dai-cells = <0>; + compatible = "allwinner,sun8i-h3-i2s"; + reg = <0x01c22800 0x400>; + interrupts = ; + clocks = <&ccu CLK_BUS_I2S2>, <&ccu CLK_I2S2>; + clock-names = "apb", "mod"; + dmas = <&dma 27>, <&dma 27>; + resets = <&ccu RST_BUS_I2S2>; + dma-names = "rx", "tx"; + status = "disabled"; + }; + codec: codec@1c22c00 { #sound-dai-cells = <0>; compatible = "allwinner,sun8i-h3-codec"; @@ -793,6 +825,7 @@ csi: camera@1cb0000 { }; hdmi: hdmi@1ee0000 { + #sound-dai-cells = <0>; compatible = "allwinner,sun8i-h3-dw-hdmi", "allwinner,sun8i-a83t-dw-hdmi"; reg = <0x01ee0000 0x10000>; -- 2.25.1