Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp3435977pxv; Mon, 28 Jun 2021 04:38:27 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxJ9a+4k32EF+JE5yCHuZLrD1NSRtlmyu0Ln483zLu3zjgqDrbqnoVjblGfZdUZPUOLHUs7 X-Received: by 2002:a50:ff01:: with SMTP id a1mr31979813edu.253.1624880306998; Mon, 28 Jun 2021 04:38:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1624880306; cv=none; d=google.com; s=arc-20160816; b=zXSFyqN8a9NZtPI/QttphfxvyFLVogG5goGnyobovtJUHdWRNLK1AjOnhZWbihcigE uAfeuUK3cmNdjgKy2rAAFVbNQEazwBYZmwR7wBzPsOpo2BoRf7SWpOcouDj29ZnbCOU2 r/wgJZNWke2ZQHsd4OIjD+vNfGyadrlqaiFnoEZWcnG6YU6lxFqULuM/YKBEKKB9uoCA j8OvFUc2weE4zNKnALYlObXdeuojdb+ZGVyHZngVD2FuuWtTWP4ev3beIpwaVDd0dudM S4PcGJ25b9K/aQYr7DW1QQi1uHfzyRNnmBkFE5y5gzm9gjE6+WVs2BcauprT6x6bZiG5 Tnug== 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 :message-id:date:subject:cc:to:from; bh=tpCrmjNNtjWfV4zh0QGgxPhubZuZo93jdnTdOuJkTVw=; b=VGMxQ/U4fNdoOxtALFWqV1k691BFesO3KYzd9AAin9tDUx8w2dkkpBQ0h+lnLmVNYD c/uwAwWCN7SufhVPYasp3EsJ+ij6lHfNFhjZmKbNALZEazDR5els2wPj2xIkRihLp8/q EZnptaRSHtEivUX3x7HjKv5sgbnkdDNun/5DhvODBuzDNEdqxw2DO7IO1oq9NaPOKi1M 64da61T04jjsjpMmUPtm3AUS6KOwRYMbBlfA9Jw2y2Htk9BmFJCjdwG2I1FB8ZU8zyOe 1S+3AVSm1GPZQiPnsKw2AFoVj9iHv1xvR+v/nimrxA2k98ek1dWHc5iIJFIUpR7b8DgG IH/g== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=collabora.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id hy23si48980ejc.45.2021.06.28.04.38.02; Mon, 28 Jun 2021 04:38:26 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=collabora.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232860AbhF1LdO (ORCPT + 99 others); Mon, 28 Jun 2021 07:33:14 -0400 Received: from bhuna.collabora.co.uk ([46.235.227.227]:39530 "EHLO bhuna.collabora.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232856AbhF1LdL (ORCPT ); Mon, 28 Jun 2021 07:33:11 -0400 Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: aratiu) with ESMTPSA id 6B3381F42102 From: Adrian Ratiu To: Rob Herring , Heiko Stuebner Cc: jack@radxa.com, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org, kernel@collabora.com Subject: [PATCH] arm64: dts: rockchip: add rock-pi-4 analog audio Date: Mon, 28 Jun 2021 14:30:33 +0300 Message-Id: <20210628113033.9145-1-adrian.ratiu@collabora.com> X-Mailer: git-send-email 2.32.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This adds the necessary pinctrl and nodes to enable the analog audio on rk3399 rock-pi-4 SBCs using the es8316 codec and the audio-graph-card driver. Signed-off-by: Adrian Ratiu --- .../boot/dts/rockchip/rk3399-rock-pi-4.dtsi | 38 +++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/arch/arm64/boot/dts/rockchip/rk3399-rock-pi-4.dtsi b/arch/arm64/boot/dts/rockchip/rk3399-rock-pi-4.dtsi index b28888ea9262..77781d9150ac 100644 --- a/arch/arm64/boot/dts/rockchip/rk3399-rock-pi-4.dtsi +++ b/arch/arm64/boot/dts/rockchip/rk3399-rock-pi-4.dtsi @@ -128,6 +128,12 @@ vdd_log: vdd-log { regulator-max-microvolt = <1400000>; vin-supply = <&vcc5v0_sys>; }; + + sound { + compatible = "audio-graph-card"; + label = "rockchip,rk3399"; + dais = <&i2s0_p0>; + }; }; &cpu_l0 { @@ -422,6 +428,24 @@ &i2c1 { i2c-scl-rising-time-ns = <300>; i2c-scl-falling-time-ns = <15>; status = "okay"; + + es8316: codec@11 { + compatible = "everest,es8316"; + reg = <0x11>; + clocks = <&cru SCLK_I2S_8CH_OUT>; + clock-names = "mclk"; + pinctrl-names = "default"; + pinctrl-0 = <&hp_det_pin>; + interrupt-parent = <&gpio1>; + interrupts = ; + #sound-dai-cells = <0>; + + port { + es8316_p0_0: endpoint { + remote-endpoint = <&i2s0_p0_0>; + }; + }; + }; }; &i2c3 { @@ -441,6 +465,14 @@ &i2s0 { rockchip,capture-channels = <2>; rockchip,playback-channels = <2>; status = "okay"; + + i2s0_p0: port { + i2s0_p0_0: endpoint { + dai-format = "i2s"; + mclk-fs = <256>; + remote-endpoint = <&es8316_p0_0>; + }; + }; }; &i2s1 { @@ -556,6 +588,12 @@ wifi_host_wake_l: wifi-host-wake-l { rockchip,pins = <0 RK_PA3 RK_FUNC_GPIO &pcfg_pull_none>; }; }; + + es8316 { + hp_det_pin: hp-det-pin { + rockchip,pins = <1 RK_PA0 RK_FUNC_GPIO &pcfg_pull_up>; + }; + }; }; &pwm2 { -- 2.32.0