Received: by 2002:a25:ef43:0:0:0:0:0 with SMTP id w3csp1002827ybm; Wed, 27 May 2020 13:27:35 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyYFPMNNlqiqy2gA7QqaXbbj6EtiUqIsEJRzft4Q8vOjMSCRDRV5OJDZqZ+ovX7gOv86IWD X-Received: by 2002:a05:6402:39a:: with SMTP id o26mr7888987edv.10.1590611255214; Wed, 27 May 2020 13:27:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1590611255; cv=none; d=google.com; s=arc-20160816; b=tXE8GtBzpkqzWhIjH6I+XhSGzmJ5UaF/FgrVkpIzUog6GvpzNZcTGe63pH3zGI92ay 04pLiSLRWQHbwZvFm8kPGqg1go8lt8YkJpDrIj1ky0rv49c63aPTZIwmgBdCMCzYnrgb FZ4sGMuT9PD71UrSRd4V3BigP9cCeBdGy8BCp/cIhA6nkotH9W/bcQT3nVdrrMYipsFI N0z8vqdrDKxX4l7Ij2HtGH6gpIzftFjSuoDXrhot7SjI2kMCZIWbzYwR6JaQeFBPMLxP TkVk89uWgpcx7mXfkC55vfwQSXnrmRCQWhThYV9yd9NZqWDaFQ3+nK9TDp/I0zYH6nXN dBIA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from; bh=NizjCppGLKiMGM1XaVk7otelJ6xwYaoJbfnIHm634aA=; b=VT0NJZJYM2F4qYxM8gM5Mg54IdLvwUNhqsFI9YHSdvWDICPMzUiF/xTNCQZ4sIKK8V f4yLI2TlvZ/DUURxwFWhG7P9OMYt/efiQkEa4gWCi292yuJ+9IjKsX34bsFdU2MAqz0c uy+/F4HIPMHH4OT7+CNk8l/4SxluzsFbtcFJJEYp78LjO82aKUmZ9z8Y5IrcK9BVdgb3 AEF5dH8HVdC6dk5Azih3mw192VUVQb8+ywEk5cgWHzJwkpJ/2ArmEGCS1am2rjfJ4McA CJMXeat5bxro+rzwijwfVRm0MPI+iht22k4Fo1YgHoCpJ9POZ8/dred1EpknxEChO2br BSGg== ARC-Authentication-Results: i=1; mx.google.com; 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 f19si2270286edy.584.2020.05.27.13.27.10; Wed, 27 May 2020 13:27:35 -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; 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 S1728929AbgE0UY7 (ORCPT + 99 others); Wed, 27 May 2020 16:24:59 -0400 Received: from relmlor2.renesas.com ([210.160.252.172]:49681 "EHLO relmlie6.idc.renesas.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727004AbgE0UY6 (ORCPT ); Wed, 27 May 2020 16:24:58 -0400 X-IronPort-AV: E=Sophos;i="5.73,442,1583161200"; d="scan'208";a="47962815" Received: from unknown (HELO relmlir6.idc.renesas.com) ([10.200.68.152]) by relmlie6.idc.renesas.com with ESMTP; 28 May 2020 05:24:57 +0900 Received: from localhost.localdomain (unknown [10.226.36.204]) by relmlir6.idc.renesas.com (Postfix) with ESMTP id 21B6640E2567; Thu, 28 May 2020 05:24:54 +0900 (JST) From: Lad Prabhakar To: Geert Uytterhoeven , Magnus Damm , Rob Herring Cc: linux-renesas-soc@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Prabhakar , Lad Prabhakar Subject: [PATCH 3/3] ARM: dts: r8a7742-iwg21d-q7: Sound DMA support via DVC on DTS Date: Wed, 27 May 2020 21:23:33 +0100 Message-Id: <1590611013-26029-4-git-send-email-prabhakar.mahadev-lad.rj@bp.renesas.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1590611013-26029-1-git-send-email-prabhakar.mahadev-lad.rj@bp.renesas.com> References: <1590611013-26029-1-git-send-email-prabhakar.mahadev-lad.rj@bp.renesas.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Enable sound with DMA support on carrier board. DMA transfer uses DVC DMA DMApp [MEM] -> [SRC] -> [DVC] -> [SSIU] -> [SSI] DMA DMApp [MEM] <- [DVC] <- [SRC] <- [SSIU] <- [SSI] Signed-off-by: Lad Prabhakar Reviewed-by: Marian-Cristian Rotariu --- arch/arm/boot/dts/r8a7742-iwg21d-q7.dts | 63 +++++++++++++++++++++++++++++++++ 1 file changed, 63 insertions(+) diff --git a/arch/arm/boot/dts/r8a7742-iwg21d-q7.dts b/arch/arm/boot/dts/r8a7742-iwg21d-q7.dts index d6154fd..704fe22 100644 --- a/arch/arm/boot/dts/r8a7742-iwg21d-q7.dts +++ b/arch/arm/boot/dts/r8a7742-iwg21d-q7.dts @@ -5,6 +5,29 @@ * Copyright (C) 2020 Renesas Electronics Corp. */ +/* + * SSI-SGTL5000 + * + * This command is required when Playback/Capture + * + * amixer set "DVC Out" 100% + * amixer set "DVC In" 100% + * + * You can use Mute + * + * amixer set "DVC Out Mute" on + * amixer set "DVC In Mute" on + * + * You can use Volume Ramp + * + * amixer set "DVC Out Ramp Up Rate" "0.125 dB/64 steps" + * amixer set "DVC Out Ramp Down Rate" "0.125 dB/512 steps" + * amixer set "DVC Out Ramp" on + * aplay xxx.wav & + * amixer set "DVC Out" 80% // Volume Down + * amixer set "DVC Out" 100% // Volume Up + */ + /dts-v1/; #include "r8a7742-iwg21m.dtsi" @@ -37,6 +60,21 @@ regulator-always-on; }; + rsnd_sgtl5000: sound { + compatible = "simple-audio-card"; + simple-audio-card,format = "i2s"; + simple-audio-card,bitclock-master = <&sndcodec>; + simple-audio-card,frame-master = <&sndcodec>; + + sndcpu: simple-audio-card,cpu { + sound-dai = <&rcar_sound>; + }; + + sndcodec: simple-audio-card,codec { + sound-dai = <&sgtl5000>; + }; + }; + vcc_sdhi2: regulator-vcc-sdhi2 { compatible = "regulator-fixed"; @@ -152,6 +190,11 @@ power-source = <1800>; }; + sound_pins: sound { + groups = "ssi34_ctrl", "ssi3_data", "ssi4_data"; + function = "ssi"; + }; + usb0_pins: usb0 { groups = "usb0"; function = "usb0"; @@ -168,6 +211,22 @@ }; }; +&rcar_sound { + pinctrl-0 = <&sound_pins>; + pinctrl-names = "default"; + status = "okay"; + + /* Single DAI */ + #sound-dai-cells = <0>; + + rcar_sound,dai { + dai0 { + playback = <&ssi4 &src4 &dvc1>; + capture = <&ssi3 &src3 &dvc0>; + }; + }; +}; + &rwdt { timeout-sec = <60>; status = "okay"; @@ -201,6 +260,10 @@ status = "okay"; }; +&ssi4 { + shared-pin; +}; + &usbphy { status = "okay"; }; -- 2.7.4