From patchwork Tue Apr 4 07:39:15 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 78896 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp2845409vqo; Tue, 4 Apr 2023 00:50:17 -0700 (PDT) X-Google-Smtp-Source: AKy350a1lTq1wZw3ccvf6VmSInSQtf+nzDBv2Evh3ymuY8zbBaolyfrUDmwAKvitvCLZ9nEjmcHl X-Received: by 2002:a17:90b:4d0a:b0:23d:e0c1:8b93 with SMTP id mw10-20020a17090b4d0a00b0023de0c18b93mr1840120pjb.34.1680594617603; Tue, 04 Apr 2023 00:50:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680594617; cv=none; d=google.com; s=arc-20160816; b=A+69bE317Wq4nqjpdXcmlmzqhJ9RTOJBaO22paVrjnISiXCg49NBg0gQEpDdV/L7xI LKX0y2zgIdPJGjbAstswJeXb/OxzsmdjxVbx7VkDFbMYV/T7wkMLNFaXBU1qXRDDs1Qj N1Fvn9sSYnD2jWQ7rD8WIU+wkdH/7NH3ymbjd02rKJ4lyBILiGnFbPoQ9eK6rPxhUv8z On5WA8QgKPxvhhfHazGmDWRSf/Rk2Zuczq2ddBCeIUETabTjVJfSX6Yz5zLXo3lIoKPo SF7w+s20ExURhnIxOOj460UXGurS06Sp11KKgN66Mw8LVuKlb+VSxEPE8UozxTQjsuyZ kxhg== 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:dkim-signature; bh=FQFR9OK3d9Ov7bOc+s6HXJvCMI19apY7iPPFxBQVsps=; b=vpNdG43WHIe1ZqaZGNh6lp6V+EO07F9M/GWbWWQp8K9mA/0f1Tuu3evQ9jcejW3XG+ OSWSePLWD3Q7YsRMabil3wXN1D4NX+URcKI0B1KX76XgMKwBdeiVql50K9V1O4hL/PuA C6Rk6Jw5or+q3OVvgEOz9+783Pwwq/jtxPlLzu4ybAW9KD01au1vYKUuN4OhZX7rgWyv ZGc5Yfy3lYkmMdh1W4GMkyc7weYTKnKvzp2g/wQx92z889wLg2fSGQrJ7DQf0t8v6cbx t95IcuJ7vEwQgjDIQ5mOIIUkDAPEi25DBo6q0Yj8NlKv7HgxmnRz4UXdsndGtAa2MwO0 1E2Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=BqvxioI+; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id e10-20020a17090301ca00b001a25ae310a7si10096596plh.50.2023.04.04.00.50.05; Tue, 04 Apr 2023 00:50:17 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=BqvxioI+; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-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 S233979AbjDDHjX (ORCPT + 99 others); Tue, 4 Apr 2023 03:39:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45874 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233955AbjDDHjV (ORCPT ); Tue, 4 Apr 2023 03:39:21 -0400 Received: from mail-ed1-x535.google.com (mail-ed1-x535.google.com [IPv6:2a00:1450:4864:20::535]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4691F1985 for ; Tue, 4 Apr 2023 00:39:20 -0700 (PDT) Received: by mail-ed1-x535.google.com with SMTP id y4so126885893edo.2 for ; Tue, 04 Apr 2023 00:39:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1680593959; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=FQFR9OK3d9Ov7bOc+s6HXJvCMI19apY7iPPFxBQVsps=; b=BqvxioI+0FwIHI5HLehDRY99pfhW8N6yM/oK4loVUIaXQRElkp9rgzhSQAyPUi79xR 7/CctlbJ4efyot+QLcZY30c20DBal+cq/nMSVaL9pPonNBZgvta7+kVUv4I55k5uWUYo IvlLSoA79QtiDjfWcrhijyP5VI2hkg1T9kSu7r0UMhr/3NiQl6xmk+AVzlDRG+qejLqy wJv4XyWZHWoNSGCYlvn0dOoVtFIeRKxvkoLQpnKMCW85d32U0Uqf+VZ7yFVYH3M2YONP jRlz64c1plvLU4fNOYoLJ9gqa0jtcMfgbHO3h16ZJsXUtV+9XdtzA43yHJOO05atoEvT jBiQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680593959; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=FQFR9OK3d9Ov7bOc+s6HXJvCMI19apY7iPPFxBQVsps=; b=oMoSojEVfD+EkztK24E2gZiapD+WJgl+BhLjnGFjikwm6OModQ99Gbefvlay7brgnI u8UzEqYUXWzx1FR9gJYpDfbApwxt20WpuPIGgFqsIgV0hfJFCkUyBwcQtk4+HQVBpwZJ SEGf8Xk665hLiMXMcOd7+Eklxb0vftEYpxCbOq/t0oA0vUHgh024kL/n+uJdRT0b4bHT IJGEqbKLX2Ri0lzBKnGk5r2tNMy37byBfdntMKeu6t1VAN3GIvPrVrtEWSEEplR50J3R ufwl6bQy0oj55Jk8SROtp7PnFiGPKJRTNiT1qzUzHn5aOakLBVeKJ/0fCojMOopn+i5m ZGxg== X-Gm-Message-State: AAQBX9fG2X00N4nJInN5WT5KcpcB8A0doBmmY7X2dpNTYzoQYIyfzdQB gIt2KoM/b/C64QJaW4gdSROH6k38dbDKB4nngtY= X-Received: by 2002:a17:907:62a6:b0:946:c60b:470b with SMTP id nd38-20020a17090762a600b00946c60b470bmr1913012ejc.63.1680593958739; Tue, 04 Apr 2023 00:39:18 -0700 (PDT) Received: from krzk-bin.. ([2a02:810d:15c0:828:233a:5c18:b527:381e]) by smtp.gmail.com with ESMTPSA id xi3-20020a170906dac300b00947ab65d932sm5248173ejb.83.2023.04.04.00.39.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 04 Apr 2023 00:39:17 -0700 (PDT) From: Krzysztof Kozlowski To: Andy Gross , Bjorn Andersson , Konrad Dybcio , Rob Herring , Krzysztof Kozlowski , linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Krzysztof Kozlowski Subject: [PATCH v2] arm64: dts: qcom: sm8550: add Soundwire controllers Date: Tue, 4 Apr 2023 09:39:15 +0200 Message-Id: <20230404073915.61779-1-krzysztof.kozlowski@linaro.org> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 X-Spam-Status: No, score=-0.2 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1762231181871512027?= X-GMAIL-MSGID: =?utf-8?q?1762231181871512027?= Add nodes for LPASS Soundwire v2.0.0 controllers. Use labels with indices matching downstream DTS, to make any comparisons easier. Signed-off-by: Krzysztof Kozlowski --- Changes since v1: 1. Correct IO range length. The bindings and driver are here: https://lore.kernel.org/linux-arm-msm/20230403132503.62090-1-krzysztof.kozlowski@linaro.org/T/#t --- arch/arm64/boot/dts/qcom/sm8550.dtsi | 109 +++++++++++++++++++++++++++ 1 file changed, 109 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/sm8550.dtsi b/arch/arm64/boot/dts/qcom/sm8550.dtsi index dc6150e97d46..14e4de7a1a0e 100644 --- a/arch/arm64/boot/dts/qcom/sm8550.dtsi +++ b/arch/arm64/boot/dts/qcom/sm8550.dtsi @@ -2004,6 +2004,33 @@ lpass_wsa2macro: codec@6aa0000 { #sound-dai-cells = <1>; }; + /* WSA2 */ + swr3: soundwire-controller@6ab0000 { + compatible = "qcom,soundwire-v2.0.0"; + reg = <0 0x06ab0000 0 0x10000>; + interrupts = ; + clocks = <&lpass_wsa2macro>; + clock-names = "iface"; + + qcom,din-ports = <4>; + qcom,dout-ports = <9>; + + qcom,ports-sinterval = <0x07 0x1f 0x3f 0x07 0x1f 0x3f 0x18f 0xff 0xff 0x0f 0x0f 0xff 0x31f>; + qcom,ports-offset1 = /bits/ 8 <0x01 0x03 0x05 0x02 0x04 0x15 0x00 0xff 0xff 0x06 0x0d 0xff 0x00>; + qcom,ports-offset2 = /bits/ 8 <0xff 0x07 0x1f 0xff 0x07 0x1f 0xff 0xff 0xff 0xff 0xff 0xff 0xff>; + qcom,ports-hstart = /bits/ 8 <0xff 0xff 0xff 0xff 0xff 0xff 0x08 0xff 0xff 0xff 0xff 0xff 0x0f>; + qcom,ports-hstop = /bits/ 8 <0xff 0xff 0xff 0xff 0xff 0xff 0x08 0xff 0xff 0xff 0xff 0xff 0x0f>; + qcom,ports-word-length = /bits/ 8 <0xff 0xff 0xff 0xff 0xff 0xff 0x08 0xff 0xff 0xff 0xff 0xff 0x18>; + qcom,ports-block-pack-mode = /bits/ 8 <0x00 0x01 0x01 0x00 0x01 0x01 0x00 0x00 0x00 0x01 0x01 0x00 0x00>; + qcom,ports-block-group-count = /bits/ 8 <0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff>; + qcom,ports-lane-control = /bits/ 8 <0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff>; + + #address-cells = <2>; + #size-cells = <0>; + #sound-dai-cells = <1>; + status = "disabled"; + }; + lpass_rxmacro: codec@6ac0000 { compatible = "qcom,sm8550-lpass-rx-macro"; reg = <0 0x06ac0000 0 0x1000>; @@ -2023,6 +2050,32 @@ lpass_rxmacro: codec@6ac0000 { #sound-dai-cells = <1>; }; + swr1: soundwire-controller@6ad0000 { + compatible = "qcom,soundwire-v2.0.0"; + reg = <0 0x06ad0000 0 0x10000>; + interrupts = ; + clocks = <&lpass_rxmacro>; + clock-names = "iface"; + label = "RX"; + qcom,din-ports = <0>; + qcom,dout-ports = <10>; + + qcom,ports-sinterval = <0x03 0x3f 0x1f 0x07 0x00 0x18f 0xff 0xff 0xff 0xff>; + qcom,ports-offset1 = /bits/ 8 <0x00 0x00 0x0b 0x01 0x00 0x00 0xff 0xff 0xff 0xff>; + qcom,ports-offset2 = /bits/ 8 <0x00 0x00 0x0b 0x00 0x00 0x00 0xff 0xff 0xff 0xff>; + qcom,ports-hstart = /bits/ 8 <0xff 0x03 0xff 0xff 0xff 0x08 0xff 0xff 0xff 0xff>; + qcom,ports-hstop = /bits/ 8 <0xff 0x06 0xff 0xff 0xff 0x08 0xff 0xff 0xff 0xff>; + qcom,ports-word-length = /bits/ 8 <0x01 0x07 0x04 0xff 0xff 0x0f 0xff 0xff 0xff 0xff>; + qcom,ports-block-pack-mode = /bits/ 8 <0xff 0x00 0x01 0xff 0xff 0x00 0xff 0xff 0xff 0xff>; + qcom,ports-block-group-count = /bits/ 8 <0xff 0xff 0xff 0xff 0x00 0x00 0xff 0xff 0xff 0xff>; + qcom,ports-lane-control = /bits/ 8 <0x01 0x00 0x00 0x00 0x00 0x00 0xff 0xff 0xff 0xff>; + + #address-cells = <2>; + #size-cells = <0>; + #sound-dai-cells = <1>; + status = "disabled"; + }; + lpass_txmacro: codec@6ae0000 { compatible = "qcom,sm8550-lpass-tx-macro"; reg = <0 0x06ae0000 0 0x1000>; @@ -2061,6 +2114,62 @@ lpass_wsamacro: codec@6b00000 { #sound-dai-cells = <1>; }; + /* WSA */ + swr0: soundwire-controller@6b10000 { + compatible = "qcom,soundwire-v2.0.0"; + reg = <0 0x06b10000 0 0x10000>; + interrupts = ; + clocks = <&lpass_wsamacro>; + clock-names = "iface"; + + qcom,din-ports = <4>; + qcom,dout-ports = <9>; + + qcom,ports-sinterval = <0x07 0x1f 0x3f 0x07 0x1f 0x3f 0x18f 0xff 0xff 0x0f 0x0f 0xff 0x31f>; + qcom,ports-offset1 = /bits/ 8 <0x01 0x03 0x05 0x02 0x04 0x15 0x00 0xff 0xff 0x06 0x0d 0xff 0x00>; + qcom,ports-offset2 = /bits/ 8 <0xff 0x07 0x1f 0xff 0x07 0x1f 0xff 0xff 0xff 0xff 0xff 0xff 0xff>; + qcom,ports-hstart = /bits/ 8 <0xff 0xff 0xff 0xff 0xff 0xff 0x08 0xff 0xff 0xff 0xff 0xff 0x0f>; + qcom,ports-hstop = /bits/ 8 <0xff 0xff 0xff 0xff 0xff 0xff 0x08 0xff 0xff 0xff 0xff 0xff 0x0f>; + qcom,ports-word-length = /bits/ 8 <0xff 0xff 0xff 0xff 0xff 0xff 0x08 0xff 0xff 0xff 0xff 0xff 0x18>; + qcom,ports-block-pack-mode = /bits/ 8 <0x00 0x01 0x01 0x00 0x01 0x01 0x00 0x00 0x00 0x01 0x01 0x00 0x00>; + qcom,ports-block-group-count = /bits/ 8 <0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff>; + qcom,ports-lane-control = /bits/ 8 <0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff>; + + #address-cells = <2>; + #size-cells = <0>; + #sound-dai-cells = <1>; + status = "disabled"; + }; + + swr2: soundwire-controller@6d30000 { + compatible = "qcom,soundwire-v2.0.0"; + reg = <0 0x06d30000 0 0x10000>; + interrupts-extended = <&intc GIC_SPI 496 IRQ_TYPE_LEVEL_HIGH>, + <&intc GIC_SPI 520 IRQ_TYPE_LEVEL_HIGH>; + interrupt-names = "core", "wakeup"; + + clocks = <&lpass_vamacro>; + clock-names = "iface"; + label = "TX"; + + qcom,din-ports = <4>; + qcom,dout-ports = <0>; + qcom,ports-sinterval-low = /bits/ 8 <0x01 0x01 0x03 0x03>; + qcom,ports-offset1 = /bits/ 8 <0x00 0x00 0x01 0x01>; + qcom,ports-offset2 = /bits/ 8 <0x00 0x00 0x00 0x00>; + qcom,ports-hstart = /bits/ 8 <0xff 0xff 0xff 0xff>; + qcom,ports-hstop = /bits/ 8 <0xff 0xff 0xff 0xff>; + qcom,ports-word-length = /bits/ 8 <0xff 0xff 0xff 0xff>; + qcom,ports-block-pack-mode = /bits/ 8 <0xff 0xff 0xff 0xff>; + qcom,ports-block-group-count = /bits/ 8 <0xff 0xff 0xff 0xff>; + qcom,ports-lane-control = /bits/ 8 <0x01 0x02 0x00 0x00>; + + #address-cells = <2>; + #size-cells = <0>; + #sound-dai-cells = <1>; + status = "disabled"; + }; + lpass_vamacro: codec@6d44000 { compatible = "qcom,sm8550-lpass-va-macro"; reg = <0 0x06d44000 0 0x1000>;