From patchwork Tue May 29 10:18:28 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Srinivas Kandagatla X-Patchwork-Id: 10434989 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 34AC1601E9 for ; Tue, 29 May 2018 11:06:49 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 21D15286AC for ; Tue, 29 May 2018 11:06:49 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 16038286E4; Tue, 29 May 2018 11:06:49 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI autolearn=unavailable version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 639D7286AC for ; Tue, 29 May 2018 11:06:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=DKf26fc2nPxaBoaYMtmtEu5VeZgExgQGAig4aJsyvUw=; b=XIyGT9cQYOFohUMWCesmMm7xUi L6zQq5lDJTJvGhVl7L6p87wuiAU1ycYJ8NuLDpPGOZXfqHXcqtTaWR0iX/VD1SLmX9BjJDS+vFUeA ipE0CHQnrzpNLAk3bNhhf0fLKy+mdqw1BwI85xtSlPAZ6rxDQ//5Wuy5lohOk3tXJJHdQv31gjrVh Jl2wLTPFoKBdr/bxWUloxjp4jA1VLPKuzVJjlC/73qX3rp1orylUziYHNfwgn1NXEpNnBpDPYnSco GeKzYNWrX6g9hiWPG9u1011tKHnjEjskWxCQNzozrd1xpb6SxTAbDrvnlod28Z5+pgF28wt8NxQTN caJmJ7Jg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1fNcSY-0006eh-8I; Tue, 29 May 2018 11:06:34 +0000 Received: from merlin.infradead.org ([2001:8b0:10b:1231::1]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fNcRS-00067c-Tt for linux-arm-kernel@bombadil.infradead.org; Tue, 29 May 2018 11:05:27 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.20170209; h=References:In-Reply-To:Message-Id:Date: Subject:Cc:To:From:Sender:Reply-To:MIME-Version:Content-Type: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=dlXdEBu2DSVmIvfqtEk4E+/Hs96++Vn+x9of7/o8tRQ=; b=TTmq2DIh/2VtVQhSAGA2j3fQ3 qXZs1OZCwXFlVFgunZt3EuL+MQNrb4ZPapX0wKCWpldvmGEWv6kWFs4mm4dxiWZx+ZtdJwV5RgVRN 8SxmY2oPhw1GTY/UE/fCyYERr9SsJysSwVXlfg24fl74CtGJfJMG1mig2rOsnnt8Yr19QFghjf9o4 1FDUTIdpEO4jEDBOnQbZZGgNqT6HTh+Ra2XMV3DmfQwHEaihMFSobx1fh8igo6mNDF1xWF5ZZO+nw G0qtuyeqgKXvh7ENHE/Dq9+VTcuaGAX4SzHh/v/M8yKCxjb3lfPfenue3RJ0JDsOvxr4z4txUR1GS MuveVg4vA==; Received: from mail-wr0-x243.google.com ([2a00:1450:400c:c0c::243]) by merlin.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fNbka-00073D-01 for linux-arm-kernel@lists.infradead.org; Tue, 29 May 2018 10:21:09 +0000 Received: by mail-wr0-x243.google.com with SMTP id w7-v6so12606532wrn.6 for ; Tue, 29 May 2018 03:20:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=dlXdEBu2DSVmIvfqtEk4E+/Hs96++Vn+x9of7/o8tRQ=; b=QP+VHn8IEdldY6h12R5XVt+BZv+rqNfCl3E/psaTL7CWjdM4IzJBatsZdmujWJPt8G HzdXpP4LfwnN/aZT4MNlbJDYf4p6WjOjkDwp5S3JXnwczRcH0ph8wpVD914A3Z7IxjtP PkqjwzXEUeX0xNWshri+MhX8+9uCMl7BfBzd4= 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; bh=dlXdEBu2DSVmIvfqtEk4E+/Hs96++Vn+x9of7/o8tRQ=; b=RELUGbB/EB09NxoXxMfmCWnZLxrPShy6g2ygncyXx+8H8SStwb3eqEfUA7TqGFxWW4 QGDPYB7Sf23feyAZOMBfZyj0U/uWZAS+0dBDPMbTQjCnutOX4N21+ktiMImd3g6RLpmB aKBu96cznaTyz1MfkZMwvbtZASosCf5gLZVd/tlp23fJk1f+KlTeoyjzhIOwCkKl2Fzt jllx2gT2KkoeqJ0SCnZu6M1go533u8qzzhVt0FMEszf4Mct6Lz6D+bnwLLHr7xzOytwq grZ6e4vR+LCaL1jApHb0dChxyzdeM0BqTfXWJCa2sE8hnYQwVrjB9mt8l9EGoUTl9qyW nMmw== X-Gm-Message-State: ALKqPwduKf2gItmz5/n2HsvOjozFCUcoQZBlX6B6qylCi/GJV9eNWvvn zFyIKF4achSONh6iQVR21O3MRQ== X-Google-Smtp-Source: AB8JxZobGbS5tuPy4Ue8LR1pA0HWrRkH4spMXLyFgZ6Fp3mRp/0bKc0ou488EGqv+WbxuHTusyoVew== X-Received: by 2002:adf:a104:: with SMTP id o4-v6mr12924351wro.106.1527589253236; Tue, 29 May 2018 03:20:53 -0700 (PDT) Received: from localhost.localdomain (cpc90716-aztw32-2-0-cust92.18-1.cable.virginm.net. [86.26.100.93]) by smtp.gmail.com with ESMTPSA id 60-v6sm23825021wrc.42.2018.05.29.03.20.52 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 29 May 2018 03:20:52 -0700 (PDT) From: Srinivas Kandagatla To: broonie@kernel.org, linux-arm-msm@vger.kernel.org, alsa-devel@alsa-project.org, robh+dt@kernel.org, bgoswami@codeaurora.org Subject: [PATCH 1/6] ASoC: qdsp6: dt-bindings: Add q6afe tdm dt binding Date: Tue, 29 May 2018 11:18:28 +0100 Message-Id: <20180529101833.30489-2-srinivas.kandagatla@linaro.org> X-Mailer: git-send-email 2.16.2 In-Reply-To: <20180529101833.30489-1-srinivas.kandagatla@linaro.org> References: <20180529101833.30489-1-srinivas.kandagatla@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180529_062108_084231_D7659249 X-CRM114-Status: GOOD ( 16.68 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: mark.rutland@arm.com, devicetree@vger.kernel.org, rohkumar@qti.qualcomm.com, linux-kernel@vger.kernel.org, plai@codeaurora.org, tiwai@suse.com, lgirdwood@gmail.com, perex@perex.cz, Srinivas Kandagatla , spatakok@qti.qualcomm.com, linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP This patch adds bindings required for TDM ports on AFE. Signed-off-by: Srinivas Kandagatla --- .../devicetree/bindings/sound/qcom,q6afe.txt | 68 ++++++++++++++++++ include/dt-bindings/sound/qcom,q6afe.h | 80 ++++++++++++++++++++++ 2 files changed, 148 insertions(+) diff --git a/Documentation/devicetree/bindings/sound/qcom,q6afe.txt b/Documentation/devicetree/bindings/sound/qcom,q6afe.txt index 14335a08b963..bdbf87df8c0b 100644 --- a/Documentation/devicetree/bindings/sound/qcom,q6afe.txt +++ b/Documentation/devicetree/bindings/sound/qcom,q6afe.txt @@ -46,6 +46,53 @@ configuration of each dai. Must contain the following properties. Definition: Must be list of serial data lines used by this dai. should be one or more of the 1-4 sd lines. + - qcom,tdm-sync-mode: + Usage: required for tdm interface + Value type: + Definition: Synchronization mode. + 0 - Short sync bit mode + 1 - Long sync mode + 2 - Short sync slot mode + + - qcom,tdm-sync-src: + Usage: required for tdm interface + Value type: + Definition: Synchronization source. + 0 - External source + 1 - Internal source + + - qcom,tdm-data-out: + Usage: required for tdm interface + Value type: + Definition: Data out signal to drive with other masters. + 0 - Disable + 1 - Enable + + - qcom,tdm-invert-sync: + Usage: required for tdm interface + Value type: + Definition: Invert the sync. + 0 - Normal + 1 - Invert + + - qcom,tdm-data-delay: + Usage: required for tdm interface + Value type: + Definition: Number of bit clock to delay data + with respect to sync edge. + 0 - 0 bit clock cycle + 1 - 1 bit clock cycle + 2 - 2 bit clock cycle + + - qcom,tdm-data-align: + Usage: required for tdm interface + Value type: + Definition: Indicate how data is packed + within the slot. For example, 32 slot width in case of + sample bit width is 24. + 0 - MSB + 1 - LSB + = EXAMPLE q6afe@4 { @@ -61,6 +108,27 @@ q6afe@4 { reg = <1>; }; + tdm@24 { + reg = <24>; + qcom,tdm-sync-mode = <1>: + qcom,tdm-sync-src = <1>; + qcom,tdm-data-out = <0>; + qcom,tdm-invert-sync = <1>; + qcom,tdm-data-delay = <1>; + qcom,tdm-data-align = <0>; + + }; + + tdm@25 { + reg = <25>; + qcom,tdm-sync-mode = <1>: + qcom,tdm-sync-src = <1>; + qcom,tdm-data-out = <0>; + qcom,tdm-invert-sync = <1>; + qcom,tdm-data-delay <1>: + qcom,tdm-data-align = <0>; + }; + prim-mi2s-rx@16 { reg = <16>; qcom,sd-lines = <1 3>; diff --git a/include/dt-bindings/sound/qcom,q6afe.h b/include/dt-bindings/sound/qcom,q6afe.h index e162045f5dc9..e2d3892240b8 100644 --- a/include/dt-bindings/sound/qcom,q6afe.h +++ b/include/dt-bindings/sound/qcom,q6afe.h @@ -26,6 +26,86 @@ #define TERTIARY_MI2S_TX 21 #define QUATERNARY_MI2S_RX 22 #define QUATERNARY_MI2S_TX 23 +#define PRIMARY_TDM_RX_0 24 +#define PRIMARY_TDM_TX_0 25 +#define PRIMARY_TDM_RX_1 26 +#define PRIMARY_TDM_TX_1 27 +#define PRIMARY_TDM_RX_2 28 +#define PRIMARY_TDM_TX_2 29 +#define PRIMARY_TDM_RX_3 30 +#define PRIMARY_TDM_TX_3 31 +#define PRIMARY_TDM_RX_4 32 +#define PRIMARY_TDM_TX_4 33 +#define PRIMARY_TDM_RX_5 34 +#define PRIMARY_TDM_TX_5 35 +#define PRIMARY_TDM_RX_6 36 +#define PRIMARY_TDM_TX_6 37 +#define PRIMARY_TDM_RX_7 38 +#define PRIMARY_TDM_TX_7 39 +#define SECONDARY_TDM_RX_0 40 +#define SECONDARY_TDM_TX_0 41 +#define SECONDARY_TDM_RX_1 42 +#define SECONDARY_TDM_TX_1 43 +#define SECONDARY_TDM_RX_2 44 +#define SECONDARY_TDM_TX_2 45 +#define SECONDARY_TDM_RX_3 46 +#define SECONDARY_TDM_TX_3 47 +#define SECONDARY_TDM_RX_4 48 +#define SECONDARY_TDM_TX_4 49 +#define SECONDARY_TDM_RX_5 50 +#define SECONDARY_TDM_TX_5 51 +#define SECONDARY_TDM_RX_6 52 +#define SECONDARY_TDM_TX_6 53 +#define SECONDARY_TDM_RX_7 54 +#define SECONDARY_TDM_TX_7 55 +#define TERTIARY_TDM_RX_0 56 +#define TERTIARY_TDM_TX_0 57 +#define TERTIARY_TDM_RX_1 58 +#define TERTIARY_TDM_TX_1 59 +#define TERTIARY_TDM_RX_2 60 +#define TERTIARY_TDM_TX_2 61 +#define TERTIARY_TDM_RX_3 62 +#define TERTIARY_TDM_TX_3 63 +#define TERTIARY_TDM_RX_4 64 +#define TERTIARY_TDM_TX_4 65 +#define TERTIARY_TDM_RX_5 66 +#define TERTIARY_TDM_TX_5 67 +#define TERTIARY_TDM_RX_6 68 +#define TERTIARY_TDM_TX_6 69 +#define TERTIARY_TDM_RX_7 70 +#define TERTIARY_TDM_TX_7 71 +#define QUATERNARY_TDM_RX_0 72 +#define QUATERNARY_TDM_TX_0 73 +#define QUATERNARY_TDM_RX_1 74 +#define QUATERNARY_TDM_TX_1 75 +#define QUATERNARY_TDM_RX_2 76 +#define QUATERNARY_TDM_TX_2 77 +#define QUATERNARY_TDM_RX_3 78 +#define QUATERNARY_TDM_TX_3 79 +#define QUATERNARY_TDM_RX_4 80 +#define QUATERNARY_TDM_TX_4 81 +#define QUATERNARY_TDM_RX_5 82 +#define QUATERNARY_TDM_TX_5 83 +#define QUATERNARY_TDM_RX_6 84 +#define QUATERNARY_TDM_TX_6 85 +#define QUATERNARY_TDM_RX_7 86 +#define QUATERNARY_TDM_TX_7 87 +#define QUINARY_TDM_RX_0 88 +#define QUINARY_TDM_TX_0 89 +#define QUINARY_TDM_RX_1 90 +#define QUINARY_TDM_TX_1 91 +#define QUINARY_TDM_RX_2 92 +#define QUINARY_TDM_TX_2 93 +#define QUINARY_TDM_RX_3 94 +#define QUINARY_TDM_TX_3 95 +#define QUINARY_TDM_RX_4 96 +#define QUINARY_TDM_TX_4 97 +#define QUINARY_TDM_RX_5 98 +#define QUINARY_TDM_TX_5 99 +#define QUINARY_TDM_RX_6 100 +#define QUINARY_TDM_TX_6 101 +#define QUINARY_TDM_RX_7 102 +#define QUINARY_TDM_TX_7 103 #endif /* __DT_BINDINGS_Q6_AFE_H__ */