From patchwork Wed Oct 6 16:47:09 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Srinivas Kandagatla X-Patchwork-Id: 515371 Delivered-To: patch@linaro.org Received: by 2002:ac0:b5cc:0:0:0:0:0 with SMTP id x12csp592588ime; Wed, 6 Oct 2021 09:47:21 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzTpSrjmMVTr44lTdbMCJwLqT2EIGy8tN0B+hvn3ryCNLdY/lEEJojSufHzm6ngJHmKsFmk X-Received: by 2002:a17:906:70c4:: with SMTP id g4mr32427710ejk.363.1633538841025; Wed, 06 Oct 2021 09:47:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1633538841; cv=none; d=google.com; s=arc-20160816; b=0KcNCFCfMtF/U1Sf6Bw8lHYtpLpn72z90D4z5FV1cdpt2YxLNWZ+IhZfnjW7og8lvK TDSDB6EXU8czQcTSXxl2A0z2MjiFlZAdYi12WICuCPJq0uUxFcgy5hHyW44MtS16LhnA 9YSAp6QQHP+crCEAtTtnQRZ2b8e2qdLi7Zi2xcPuSfjbAH96VJITRoSzU31sDP7OprL4 9ob+EWiTlxFvUYT7KHUOD1t94HDH4oldbUz89YZzzte2okdL/ebxacSZmLs7dkyh+5/g mSljnCFiBSVEQXztLfYzltzf6CPpc76Vp3H/2j/pjX/1s5RUbGeu0jegzOKrCkGcBGuF NtOQ== 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=Su+mMhgdtQyUzMfFC/RU+YIiNnpBILw1YMYPYhSpL7k=; b=0RZBe2qiObeNLA3tNh4cVxpnzd+gKXKqahO/Q0jNUcoxoZC5FZy7lmPPm5wOFQgXVt c1LNmD18o51FYrEsU3uwZmNDMv1Q3TfcsFaq/+VpJ4a8XRgpfQ4Httir5YuVuqkr08H4 kasgYhQ2DRoG5mHOGyi022+Dv3/t/bIVHevbaZ8MqnTKdOima0oLd/0SIv/6xBJbUooR DNDPYuagyA2wvLTezrDxyhR3rflIsJ4PUtswjJh0kRbn0f2VzRyLHjF0p9LvIpi7PmK6 pAnIoEI7npylAFPRpzt3kVjHLbZ2Bus1dh0jB5/hVtXLj3NIRzdNk7XiguuPWs0Sm7Vn mLww== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=OhCP2qS3; spf=pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id 18si24613928ejj.476.2021.10.06.09.47.20; Wed, 06 Oct 2021 09:47:21 -0700 (PDT) Received-SPF: pass (google.com: domain of devicetree-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=@linaro.org header.s=google header.b=OhCP2qS3; spf=pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231802AbhJFQtL (ORCPT + 7 others); Wed, 6 Oct 2021 12:49:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42128 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229548AbhJFQtL (ORCPT ); Wed, 6 Oct 2021 12:49:11 -0400 Received: from mail-wr1-x433.google.com (mail-wr1-x433.google.com [IPv6:2a00:1450:4864:20::433]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D81D4C061746 for ; Wed, 6 Oct 2021 09:47:18 -0700 (PDT) Received: by mail-wr1-x433.google.com with SMTP id r10so10713794wra.12 for ; Wed, 06 Oct 2021 09:47:18 -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 :mime-version:content-transfer-encoding; bh=Su+mMhgdtQyUzMfFC/RU+YIiNnpBILw1YMYPYhSpL7k=; b=OhCP2qS3X4FkzAMQNjhZ3dozKq9ovyQR0HSWcIaV6c1L7aSf+dIv0SpM7q6mBQ7KmP nC2WBqD0u/nErPwz6eQwqx2ItLPYsua0puB1nJT/bRB8VUrn3ORA/dQtKlkjSOv6J6e6 eYzhE+aBFURjEBM8YvJ4fbUX6HpPfxUfU8fhS+2Y6nj8ZCnS5LUtFT59cuMNpYONneNJ Eqe/pzluTs0x3RNa0Emtp6qO5TLfhyxHvc7PpMkvEyBbRqt8kqp33yQt8EsEYA58vB9Z 6LqbY+2JMRouVSBSb0fctybWAw4AO3NEGpXM7wjBVVwyB7VOHda/KsQgsjQJmXXkFcvz RCWA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=Su+mMhgdtQyUzMfFC/RU+YIiNnpBILw1YMYPYhSpL7k=; b=mjzbQmm8yKGopMxN42a7CBXLcUEX6y5B8VW+x5JO6PgdTqMi21s0dANOzh/zrfx36Y YdF+b+hmKYmfSDNO5y8h0YJ6NHwynWGIHNPx2Kqr0/fHtD/wV58Ql1CJejmewUNsvaET nDs074litxpk5ALW+vHUkawVrMFsFF6629pFqAqa4xoktL8r+Kv+mH/e3IdtU225EeF6 ywqhoT3PEVktt3GXgltckRPzqrJFlxEoQTpIfyR9mUxCDN1I16/FuI2CXwdAq1XwpEJ+ x4yUX+TW20W/JM+LnYibW62zdYrh+rMWEtWjkaES+Gs9pQ/25dve1xnu2m4T5Fs2ubmn EAPQ== X-Gm-Message-State: AOAM531W5eXrsxiw22IKu2po5c+T7oUFuxY1p9197WDXjcZJ4OFHBtnD PgKtTYUPdj7c8jvnnKmKhfqxSA== X-Received: by 2002:adf:ba0d:: with SMTP id o13mr11922632wrg.339.1633538837488; Wed, 06 Oct 2021 09:47:17 -0700 (PDT) Received: from srini-hackbox.lan (cpc86377-aztw32-2-0-cust226.18-1.cable.virginm.net. [92.233.226.227]) by smtp.gmail.com with ESMTPSA id l21sm6785165wmg.18.2021.10.06.09.47.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Oct 2021 09:47:17 -0700 (PDT) From: Srinivas Kandagatla To: bjorn.andersson@linaro.org Cc: agross@kernel.org, robh+dt@kernel.org, linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, Srinivas Kandagatla Subject: [PATCH 1/4] arm64: dts: qcom: sm8250: Add nodes for tx and rx macros with soundwire masters Date: Wed, 6 Oct 2021 17:47:09 +0100 Message-Id: <20211006164712.16078-2-srinivas.kandagatla@linaro.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20211006164712.16078-1-srinivas.kandagatla@linaro.org> References: <20211006164712.16078-1-srinivas.kandagatla@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org SM8250 has TX and RX macros with SoundWire Controllers to attach with codecs like WCD938x. Add these nodes for sm8250 mtp audio use case. Signed-off-by: Srinivas Kandagatla --- arch/arm64/boot/dts/qcom/sm8250.dtsi | 157 +++++++++++++++++++++++++++ 1 file changed, 157 insertions(+) -- 2.21.0 diff --git a/arch/arm64/boot/dts/qcom/sm8250.dtsi b/arch/arm64/boot/dts/qcom/sm8250.dtsi index 8c15d9fed08f..356b530f067b 100644 --- a/arch/arm64/boot/dts/qcom/sm8250.dtsi +++ b/arch/arm64/boot/dts/qcom/sm8250.dtsi @@ -1839,6 +1839,101 @@ #sound-dai-cells = <1>; }; + rxmacro: rxmacro@3200000 { + pinctrl-names = "default"; + pinctrl-0 = <&rx_swr_active>; + compatible = "qcom,sm8250-lpass-rx-macro"; + reg = <0 0x3200000 0 0x1000>; + + clocks = <&q6afecc LPASS_CLK_ID_TX_CORE_MCLK LPASS_CLK_ATTRIBUTE_COUPLE_NO>, + <&q6afecc LPASS_CLK_ID_TX_CORE_NPL_MCLK LPASS_CLK_ATTRIBUTE_COUPLE_NO>, + <&q6afecc LPASS_HW_MACRO_VOTE LPASS_CLK_ATTRIBUTE_COUPLE_NO>, + <&q6afecc LPASS_HW_DCODEC_VOTE LPASS_CLK_ATTRIBUTE_COUPLE_NO>, + <&vamacro>; + + clock-names = "mclk", "npl", "macro", "dcodec", "fsgen"; + + #clock-cells = <0>; + clock-frequency = <9600000>; + clock-output-names = "mclk"; + #sound-dai-cells = <1>; + }; + + swr1: soundwire-controller@3210000 { + reg = <0 0x3210000 0 0x2000>; + compatible = "qcom,soundwire-v1.5.1"; + interrupts = ; + clocks = <&rxmacro>; + clock-names = "iface"; + label = "RX"; + qcom,din-ports = <0>; + qcom,dout-ports = <5>; + + qcom,ports-sinterval-low = /bits/ 8 <0x03 0x1F 0x1F 0x07 0x00>; + qcom,ports-offset1 = /bits/ 8 <0x00 0x00 0x0B 0x01 0x00>; + qcom,ports-offset2 = /bits/ 8 <0x00 0x00 0x0B 0x00 0x00>; + qcom,ports-hstart = /bits/ 8 <0xFF 0x03 0xFF 0xFF 0xFF>; + qcom,ports-hstop = /bits/ 8 <0xFF 0x06 0xFF 0xFF 0xFF>; + qcom,ports-word-length = /bits/ 8 <0x01 0x07 0x04 0xFF 0xFF>; + qcom,ports-block-pack-mode = /bits/ 8 <0xFF 0x00 0x01 0xFF 0xFF>; + qcom,ports-lane-control = /bits/ 8 <0x01 0x00 0x00 0x00 0x00>; + qcom,ports-block-group-count = /bits/ 8 <0xFF 0xFF 0xFF 0xFF 0x00>; + + #sound-dai-cells = <1>; + #address-cells = <2>; + #size-cells = <0>; + }; + + txmacro: txmacro@3220000 { + pinctrl-names = "default"; + pinctrl-0 = <&tx_swr_active>; + compatible = "qcom,sm8250-lpass-tx-macro"; + reg = <0 0x3220000 0 0x1000>; + + clocks = <&q6afecc LPASS_CLK_ID_TX_CORE_MCLK LPASS_CLK_ATTRIBUTE_COUPLE_NO>, + <&q6afecc LPASS_CLK_ID_TX_CORE_NPL_MCLK LPASS_CLK_ATTRIBUTE_COUPLE_NO>, + <&q6afecc LPASS_HW_MACRO_VOTE LPASS_CLK_ATTRIBUTE_COUPLE_NO>, + <&q6afecc LPASS_HW_DCODEC_VOTE LPASS_CLK_ATTRIBUTE_COUPLE_NO>, + <&vamacro>; + + clock-names = "mclk", "npl", "macro", "dcodec", "fsgen"; + + #clock-cells = <0>; + clock-frequency = <9600000>; + clock-output-names = "mclk"; + #address-cells = <2>; + #size-cells = <2>; + #sound-dai-cells = <1>; + }; + + /* tx macro */ + swr2: soundwire-controller@3230000 { + reg = <0 0x3230000 0 0x2000>; + compatible = "qcom,soundwire-v1.5.1"; + interrupts-extended = <&intc GIC_SPI 297 IRQ_TYPE_LEVEL_HIGH>; + interrupt-names = "core"; + + clocks = <&txmacro>; + clock-names = "iface"; + label = "TX"; + + qcom,din-ports = <5>; + qcom,dout-ports = <0>; + qcom,ports-sinterval-low = /bits/ 8 <0xFF 0x01 0x01 0x03 0x03>; + qcom,ports-offset1 = /bits/ 8 <0xFF 0x01 0x00 0x02 0x00>; + qcom,ports-offset2 = /bits/ 8 <0xFF 0x00 0x00 0x00 0x00>; + qcom,ports-block-pack-mode = /bits/ 8 <0xFF 0xFF 0xFF 0xFF 0xFF>; + qcom,ports-hstart = /bits/ 8 <0xFF 0xFF 0xFF 0xFF 0xFF>; + qcom,ports-hstop = /bits/ 8 <0xFF 0xFF 0xFF 0xFF 0xFF>; + qcom,ports-word-length = /bits/ 8 <0xFF 0xFF 0xFF 0xFF 0xFF>; + qcom,ports-block-group-count = /bits/ 8 <0xFF 0xFF 0xFF 0xFF 0xFF>; + qcom,ports-lane-control = /bits/ 8 <0xFF 0x00 0x01 0x00 0x01>; + qcom,port-offset = <1>; + #sound-dai-cells = <1>; + #address-cells = <2>; + #size-cells = <0>; + }; + aoncc: clock-controller@3380000 { compatible = "qcom,sm8250-lpass-aoncc"; reg = <0 0x03380000 0 0x40000>; @@ -1931,6 +2026,68 @@ input-enable; }; }; + + rx_swr_active: rx_swr-active-pins { + clk { + pins = "gpio3"; + function = "swr_rx_clk"; + drive-strength = <2>; + slew-rate = <1>; + bias-disable; + }; + + data { + pins = "gpio4", "gpio5"; + function = "swr_rx_data"; + drive-strength = <2>; + slew-rate = <1>; + bias-bus-hold; + }; + }; + + tx_swr_active: tx_swr-active-pins { + clk { + pins = "gpio0"; + function = "swr_tx_clk"; + drive-strength = <2>; + slew-rate = <1>; + bias-disable; + }; + + data { + pins = "gpio1", "gpio2"; + function = "swr_tx_data"; + drive-strength = <2>; + slew-rate = <1>; + bias-bus-hold; + }; + }; + + tx_swr_sleep: tx_swr-sleep-pins { + clk { + pins = "gpio0"; + function = "swr_tx_clk"; + drive-strength = <2>; + input-enable; + bias-pull-down; + }; + + data1 { + pins = "gpio1"; + function = "swr_tx_data"; + drive-strength = <2>; + input-enable; + bias-bus-hold; + }; + + data2 { + pins = "gpio2"; + function = "swr_tx_data"; + drive-strength = <2>; + input-enable; + bias-pull-down; + }; + }; }; gpu: gpu@3d00000 {