From patchwork Wed Mar 13 16:01:07 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jyri Sarha X-Patchwork-Id: 160251 Delivered-To: patch@linaro.org Received: by 2002:a02:5cc1:0:0:0:0:0 with SMTP id w62csp14484231jad; Wed, 13 Mar 2019 09:01:43 -0700 (PDT) X-Google-Smtp-Source: APXvYqwMtP7oXTOnW4iHF9v9pz3ikZTuBBC1b5eplRI23JXVdP7RkFFVNAn2Q1iAj3sBQSKk6xWR X-Received: by 2002:a65:6642:: with SMTP id z2mr41167115pgv.196.1552492903019; Wed, 13 Mar 2019 09:01:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1552492903; cv=none; d=google.com; s=arc-20160816; b=dddan5V4QU+Wdvu3D+ICrNLTbji6R2FW5u9ahYv2gDfTVT4z/eqshq1vexEZQ1eg2x 8lhMXL/WK3SHCcJc8t8PDhHQ1THJSB27YuWZLpMvTqTzlOhGCjMG4oXt+7LEUNtl3rcm QEr0yinyKYVFV3GPCzqa6cc4EQnONEDo/pDdON5+mUYRihm5qOJy/jf3/uVyfSnNFefp et8/pgxF4iDwEG8a1z6GziX+KTWjwXHDv/EKZyj8/mMbpy0/w6cx3222fUDwgVJqzSkq +kAGWxw4wZxpWpBxjeQCMT692QoLfBSmJCdm7FhSF5B7zgJbfp2OQIim3J7gSDc05i+o 34dQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=RXmyccsa9XnqVie17r9mIwq/C2syXBwxy4AgY/PU1eA=; b=O0sxQQE/ZP/KsvgPfu14inKl3/xPJouf/MNub8agzr8lEbDlFROcTy/LooIN2AXlIx 0shn8qm34I9L9W5pYkrT72a9obCwbgjLm2lo8wZmi0mpOVK55goJLBKIubuO9DxnJ53Z XhPGqk/M1pPeCZdCvgb0nlXy4PCU/nsokx21QS2J1bqdnGkxpvfYxlYxPHxxy5zOFFne 237h4kRnvkZaz4bia4lki8P1a5qtlaHJSJF8lpRFtUFfg94xJMNI1WbuuQLnqvNOb4pq hkj6mhfRc2Rzrt2HyGzNbHY8n+u0UE/byZvyimBln4k//UtJr/kNXmU2BeRuGgwxM2As 88dQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=WEldAGxw; spf=pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t2si2667940plr.179.2019.03.13.09.01.42; Wed, 13 Mar 2019 09:01:43 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=WEldAGxw; spf=pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726033AbfCMQBm (ORCPT + 7 others); Wed, 13 Mar 2019 12:01:42 -0400 Received: from lelv0142.ext.ti.com ([198.47.23.249]:33380 "EHLO lelv0142.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725926AbfCMQBm (ORCPT ); Wed, 13 Mar 2019 12:01:42 -0400 Received: from lelv0266.itg.ti.com ([10.180.67.225]) by lelv0142.ext.ti.com (8.15.2/8.15.2) with ESMTP id x2DG1QtU090594; Wed, 13 Mar 2019 11:01:26 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1552492886; bh=RXmyccsa9XnqVie17r9mIwq/C2syXBwxy4AgY/PU1eA=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=WEldAGxwe29vu7MiRMgxvgS9lz72A1ckV1GSZYoPYG68KZRf7mZljZH8Cofo2TJ3F VFOdngHCjDi8APi2n2P4hdEgU85FKMTcbJSDsoOHP/jvKJqef77M2ltFZ3aiacVLYR /UnK7g7FPQUavp13b2vNQYcfixjULc1O83ZdRJvU= Received: from DFLE100.ent.ti.com (dfle100.ent.ti.com [10.64.6.21]) by lelv0266.itg.ti.com (8.15.2/8.15.2) with ESMTPS id x2DG1Qp8079320 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Wed, 13 Mar 2019 11:01:26 -0500 Received: from DFLE113.ent.ti.com (10.64.6.34) by DFLE100.ent.ti.com (10.64.6.21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1713.5; Wed, 13 Mar 2019 11:01:24 -0500 Received: from dlep32.itg.ti.com (157.170.170.100) by DFLE113.ent.ti.com (10.64.6.34) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.1591.10 via Frontend Transport; Wed, 13 Mar 2019 11:01:24 -0500 Received: from jadmar.ti.com (ileax41-snat.itg.ti.com [10.172.224.153]) by dlep32.itg.ti.com (8.14.3/8.13.8) with ESMTP id x2DG187E004603; Wed, 13 Mar 2019 11:01:22 -0500 From: Jyri Sarha To: , CC: , , , , , , , , Subject: [PATCH v3 5/6] dt-bindings: display: sii902x: Add HDMI audio bindings Date: Wed, 13 Mar 2019 18:01:07 +0200 Message-ID: X-Mailer: git-send-email 2.17.1 In-Reply-To: References: MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org The sii902x chip family supports also HDMI audio. Add binding for describing the necessary i2s and mclk wiring for it. Signed-off-by: Jyri Sarha --- .../bindings/display/bridge/sii902x.txt | 34 +++++++++++++++++++ include/dt-bindings/sound/sii902x-audio.h | 17 ++++++++++ 2 files changed, 51 insertions(+) create mode 100644 include/dt-bindings/sound/sii902x-audio.h -- Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki. Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki diff --git a/Documentation/devicetree/bindings/display/bridge/sii902x.txt b/Documentation/devicetree/bindings/display/bridge/sii902x.txt index c4c1855ca654..977756841193 100644 --- a/Documentation/devicetree/bindings/display/bridge/sii902x.txt +++ b/Documentation/devicetree/bindings/display/bridge/sii902x.txt @@ -8,6 +8,29 @@ Optional properties: - interrupts: describe the interrupt line used to inform the host about hotplug events. - reset-gpios: OF device-tree gpio specification for RST_N pin. + - sil,i2s-fifo-routing: Array of exactly 4 integers indicating i2s + pins for audio fifo routing. First integer defines routing to + fifo 0 and second to fifo 1, etc. Integers can be filled with + definitions from: include/dt-bindings/sound/sii902x-audio.h + The available definitions are: + - ENABLE_BIT: enable this audio fifo + - CONNECT_SD#: route audio input from SD0, SD1, SD2, or SD3 i2s + data input pin + - LEFT_RIGHT_SWAP_BIT: swap i2s input channels for this fifo + I2S HDMI audio is configured only if this property is found. + - clocks: phandle mclk + - clock-names: "mclk" + Describes SII902x MCLK input. MCLK is used to produce + HDMI audio CTS values. This property is required if + "i2s-fifo-routing"-property is present. This property follows + Documentation/devicetree/bindings/clock/clock-bindings.txt + consumer binding. + - #sound-dai-cells = <0>: ASoC codec dai available for simple-card + If audio properties are present sii902x provides an ASoC + codec component driver that can be used by other ASoC + components like simple-card. See binding document for + details: + Documentation/devicetree/bindings/sound/simple-card.txt Optional subnodes: - video input: this subnode can contain a video input port node @@ -21,6 +44,17 @@ Example: compatible = "sil,sii9022"; reg = <0x39>; reset-gpios = <&pioA 1 0>; + + #sound-dai-cells = <0>; + sil,i2s-fifo-routing = < + (ENABLE_BIT|CONNECT_SD0) + 0 + 0 + 0 + >; + clocks = <&mclk>; + clock-names = "mclk"; + ports { #address-cells = <1>; #size-cells = <0>; diff --git a/include/dt-bindings/sound/sii902x-audio.h b/include/dt-bindings/sound/sii902x-audio.h new file mode 100644 index 000000000000..0a849904754b --- /dev/null +++ b/include/dt-bindings/sound/sii902x-audio.h @@ -0,0 +1,17 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * Copyright (C) 2019 Texas Instruments Incorporated - http://www.ti.com/ + * Author: Jyri Sarha + */ + +#ifndef __DT_SII9022_AUDIO_H +#define __DT_SII9022_AUDIO_H + +#define ENABLE_BIT 0x80 +#define CONNECT_SD0 0x00 +#define CONNECT_SD1 0x10 +#define CONNECT_SD2 0x20 +#define CONNECT_SD3 0x30 +#define LEFT_RIGHT_SWAP_BIT 0x04 + +#endif /* __DT_SII9022_AUDIO_H */