From patchwork Tue Sep 26 16:51:18 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephan Gerhold X-Patchwork-Id: 726501 Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net [23.128.96.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0E5B634CE0 for ; Tue, 26 Sep 2023 16:51:59 +0000 (UTC) Received: from mo4-p02-ob.smtp.rzone.de (mo4-p02-ob.smtp.rzone.de [85.215.255.84]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 84C53124; Tue, 26 Sep 2023 09:51:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695747098; cv=none; d=strato.com; s=strato-dkim-0002; b=k/rKQBb2dF9ATI80TPY5GeU+GDXwp8btyYSvV7lXIE9fIo+1xaK4aBlId1hZt3Zn4p dCKxzzOIiUGmDnJykSCbobgvLgUidW7soVjUnj0SGsyUisgatrOxq5cUaVDoDf4rWxPx tZ2Jymo/Nq3qC9YNKyo5fkx3OGzXiSnuUhEPkii5Qlda7VdCZ7iiYnamJQdoWKpPFOpd VSQP/hZBjMhfa/CN/4S9sKyYC+IJ7Kuy/PHpQb/9et1qsdWnKwKk9DLb8uo+aKVt+pB5 Bjm11F0Cqm/JZNWjV6+d/2af8NJN1mCMmbRsxVufn8mkgsVY2MMYYQPjPibkXS8cWPiy jJoA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; t=1695747098; s=strato-dkim-0002; d=strato.com; h=Cc:To:In-Reply-To:References:Message-Id:Subject:Date:From:Cc:Date: From:Subject:Sender; bh=T07F4EQbQn/5OhhvTsQJCuEuYJbCRTqeoJsSzoUsJB4=; b=Cuo5OmzPvHviifAilu+MPo75WomBntft5H5EHYvh/NZlmzI9BweSPNrP6PNnsjAnGO aimNjrD78uKTFATUiMk/ST2u0ov2HOaSVo6o5fGW35ihMHxg++bv+z3FsU5YVMsR+q/J mXFaeh9nbxG8SbPyTz0jSgB7jOyXatv2pPIsOgj8SCkBvGjUcZAVI5008FPh1ve4hMto wbC0Tu7jRyKm9nrh9m3iXLCS8nGmkjKDarMSs18ca9FR4DGF14PaxAdm+XL8xLMlbLi2 h9c65QBugH0kzx+sW0YzLIoA/Lb1Pkwxhr5BGg/f+BTQIuyKz17FhzprL9UFCdqOZMn6 aTOg== ARC-Authentication-Results: i=1; strato.com; arc=none; dkim=none X-RZG-CLASS-ID: mo02 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1695747098; s=strato-dkim-0002; d=gerhold.net; h=Cc:To:In-Reply-To:References:Message-Id:Subject:Date:From:Cc:Date: From:Subject:Sender; bh=T07F4EQbQn/5OhhvTsQJCuEuYJbCRTqeoJsSzoUsJB4=; b=NRwYpKAMjSLyaRZn/1zRX+en2LxRUOsr4QeiXfyx2uFDUzQiSKiz5eyDcFI/nGzUvI vMImm2I2wieMFoUPSpfNfAZvjwsg9OAuq/3ExaRLEUAMoOWbjE7dkSQXDeUawebIOYcB FviX5mprGUQVmqq01be9ytcHI5KbvzSDmKb5sLRk6R66Ke1b6ba68BwO4g1xO+ET7F+q JaqlH/HcLgPalZcvVbZec1ECNNTnjMonmLCWQkk0dcvqHQtEFvbh/scttpfVPwbhrgEG yYgESSinaWEyz6op6il6b12wHYn44NboqsaVVjPE80XHSSEf4uYgnjPvbtQuCnsG0nF/ PxyA== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; t=1695747098; s=strato-dkim-0003; d=gerhold.net; h=Cc:To:In-Reply-To:References:Message-Id:Subject:Date:From:Cc:Date: From:Subject:Sender; bh=T07F4EQbQn/5OhhvTsQJCuEuYJbCRTqeoJsSzoUsJB4=; b=x9Rdz8G7gfyyVlgEQ6VB8y5XO1BTiX5HjDy6pfrFXGF6UcP8COOL7aVzJNgE33tLRJ dHMFf82MKetj4mKWnkAA== X-RZG-AUTH: ":P3gBZUipdd93FF5ZZvYFPugejmSTVR2nRPhVOQjVd4CteZ/7jYgS+mLFY+H0JAn9VOH+nz0=" Received: from [192.168.244.3] by smtp.strato.de (RZmta 49.8.2 SBL|AUTH) with ESMTPSA id R04c57z8QGpcg5b (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256 bits)) (Client did not present a certificate); Tue, 26 Sep 2023 18:51:38 +0200 (CEST) From: Stephan Gerhold Date: Tue, 26 Sep 2023 18:51:18 +0200 Subject: [PATCH 04/13] arm64: dts: qcom: msm8916-samsung-a2015: Add sound and modem Precedence: bulk X-Mailing-List: devicetree@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20230926-msm8916-modem-v1-4-398eec74bac9@gerhold.net> References: <20230926-msm8916-modem-v1-0-398eec74bac9@gerhold.net> In-Reply-To: <20230926-msm8916-modem-v1-0-398eec74bac9@gerhold.net> To: Bjorn Andersson Cc: Andy Gross , Konrad Dybcio , linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, phone-devel@vger.kernel.org, ~postmarketos/upstreaming@lists.sr.ht, Bryan O'Donoghue , Stephan Gerhold , "Lin, Meng-Bo" X-Mailer: b4 0.12.3 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, SPF_HELO_PASS,SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Enable sound and modem for the Samsung A2015 based devices (A3, A5, E5, E7, Grand Max). The setup is similar to most MSM8916 devices, i.e.: - QDSP6 audio - Earpiece/headphones/microphones via digital/analog codec in MSM8916/PM8916 - WWAN Internet via BAM-DMUX except: - NXP TFA9895 codec for speaker on Quaternary MI2S - Samsung-specific audio jack detection (not supported yet) [Lin: Add e2015 and grandmax] Co-developed-by: "Lin, Meng-Bo" Signed-off-by: "Lin, Meng-Bo" Signed-off-by: Stephan Gerhold --- .../dts/qcom/msm8916-samsung-a2015-common.dtsi | 55 ++++++++++++++++++++++ .../dts/qcom/msm8916-samsung-e2015-common.dtsi | 4 ++ .../boot/dts/qcom/msm8916-samsung-grandmax.dts | 4 ++ 3 files changed, 63 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/msm8916-samsung-a2015-common.dtsi b/arch/arm64/boot/dts/qcom/msm8916-samsung-a2015-common.dtsi index 0b29132b74e1..f71b18d89bf9 100644 --- a/arch/arm64/boot/dts/qcom/msm8916-samsung-a2015-common.dtsi +++ b/arch/arm64/boot/dts/qcom/msm8916-samsung-a2015-common.dtsi @@ -1,10 +1,13 @@ // SPDX-License-Identifier: GPL-2.0-only #include "msm8916-pm8916.dtsi" +#include "msm8916-modem-qdsp6.dtsi" + #include #include #include #include +#include / { aliases { @@ -196,6 +199,18 @@ vibrator: vibrator { }; }; +&blsp_i2c1 { + status = "okay"; + + speaker_codec: audio-codec@34 { + compatible = "nxp,tfa9895"; + reg = <0x34>; + vddd-supply = <&pm8916_l5>; + sound-name-prefix = "Speaker"; + #sound-dai-cells = <0>; + }; +}; + &blsp_i2c2 { status = "okay"; @@ -243,6 +258,13 @@ &gpu { status = "okay"; }; +&lpass { + dai-link@3 { + reg = ; + qcom,playback-sd-lines = <1>; + }; +}; + &mdss { status = "okay"; }; @@ -253,6 +275,10 @@ &mdss_dsi0 { pinctrl-1 = <&mdss_sleep>; }; +&mpss_mem { + reg = <0x0 0x86800000 0x0 0x5400000>; +}; + &pm8916_resin { status = "okay"; linux,code = ; @@ -265,6 +291,13 @@ pm8916_l17: l17 { }; }; +&q6afedai { + dai@22 { + reg = ; + qcom,sd-lines = <1>; + }; +}; + &sdhc_1 { status = "okay"; }; @@ -279,6 +312,28 @@ &sdhc_2 { cd-gpios = <&tlmm 38 GPIO_ACTIVE_LOW>; }; +&sound { + status = "okay"; + + model = "samsung-a2015"; + audio-routing = + "AMIC1", "MIC BIAS External1", + "AMIC2", "MIC BIAS Internal2", + "AMIC3", "MIC BIAS External1"; + + pinctrl-0 = <&cdc_pdm_default &sec_mi2s_default>; + pinctrl-1 = <&cdc_pdm_sleep &sec_mi2s_sleep>; + pinctrl-names = "default", "sleep"; +}; + +&sound_dai_quaternary { + status = "okay"; + + codec { + sound-dai = <&speaker_codec>; + }; +}; + &usb { status = "okay"; extcon = <&muic>, <&muic>; diff --git a/arch/arm64/boot/dts/qcom/msm8916-samsung-e2015-common.dtsi b/arch/arm64/boot/dts/qcom/msm8916-samsung-e2015-common.dtsi index 0824ab041d80..3c49dac92d2d 100644 --- a/arch/arm64/boot/dts/qcom/msm8916-samsung-e2015-common.dtsi +++ b/arch/arm64/boot/dts/qcom/msm8916-samsung-e2015-common.dtsi @@ -65,6 +65,10 @@ accelerometer@1d { }; }; +&mpss_mem { + reg = <0x0 0x86800000 0x0 0x5a00000>; +}; + ®_motor_vdd { regulator-min-microvolt = <3300000>; regulator-max-microvolt = <3300000>; diff --git a/arch/arm64/boot/dts/qcom/msm8916-samsung-grandmax.dts b/arch/arm64/boot/dts/qcom/msm8916-samsung-grandmax.dts index 3f145dde4059..5882b3a593b8 100644 --- a/arch/arm64/boot/dts/qcom/msm8916-samsung-grandmax.dts +++ b/arch/arm64/boot/dts/qcom/msm8916-samsung-grandmax.dts @@ -49,6 +49,10 @@ ®_touch_key { status = "disabled"; }; +&sound { + model = "samsung-gmax"; /* No secondary microphone */ +}; + &tlmm { gpio_leds_default: gpio-led-default-state { pins = "gpio60"; From patchwork Tue Sep 26 16:51:19 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephan Gerhold X-Patchwork-Id: 726506 Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net [23.128.96.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id BF09B27ED8 for ; Tue, 26 Sep 2023 16:51:53 +0000 (UTC) Received: from mo4-p02-ob.smtp.rzone.de (mo4-p02-ob.smtp.rzone.de [81.169.146.168]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7DE49CE; Tue, 26 Sep 2023 09:51:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695747099; cv=none; d=strato.com; s=strato-dkim-0002; b=kSGFRL0zczKR3GIhD0fBFecewo53+uDiKTogTmJlTtLxM+8XNEtStpUE7lOJGNU6Xs bBs4QfG7Tk2O7mbnEAAj0hyuiHLFZx6e6Uf7tYxlkXqZw4OxVeddi3LYUCNDz+TB9oGG 1z3QfVXD9I7CoOwxFDLcbZUEuJuck72kSinX3DYvSw7YAvcd7BgGWfb2JQfkHdfLlJyB 29FZdPCxjLIgmBbO/2oFOCivPKdt6WqCZIoRHw5fsKtn2dpVk6vLm8NZ++Es54+y85Gm QoT1TEH7X7nWognKz3StPwsUUWLpNl5LD8a4Sbm7+HMYgJvD5RF1MW7yZIzqdxlLdVLH +o/g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; t=1695747099; s=strato-dkim-0002; d=strato.com; h=Cc:To:In-Reply-To:References:Message-Id:Subject:Date:From:Cc:Date: From:Subject:Sender; bh=kyLgD0VCEKhD2y8R4NJw6xg2f+jq7nFO8XPoZEM39PI=; b=qWUp7D/ozf0IoHlmaMWDw66CbbZAaOgOVF5vpVQSd4goJ7i8TC6x9qua40FvR3DKoG qpwojcngonQsxk6oz8g2naNoicw3LrvkDqeIdq7/4AucGeeGmGKGy6OM3MieeIOiPcdg k+/MFAn9yVdd4mrFz+C6OLwMVt/Y378t+EqKcOeEXVH+BLVrYBAcWv2FKxcjvdRPzF9U Ndf+K6Dj2+TymDiwnraGv+VcAhzgfOFVF89bFtN6o36+u4FM+8SLrz0c2zyiujvyH3xm Ff0N/2HV1a2UFN7TMFdeOWYGc8HQs4i7bOE/aCnk4zXqmiG3YXWe5TENNqkSkU3FkSV7 UsUg== ARC-Authentication-Results: i=1; strato.com; arc=none; dkim=none X-RZG-CLASS-ID: mo02 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1695747099; s=strato-dkim-0002; d=gerhold.net; h=Cc:To:In-Reply-To:References:Message-Id:Subject:Date:From:Cc:Date: From:Subject:Sender; bh=kyLgD0VCEKhD2y8R4NJw6xg2f+jq7nFO8XPoZEM39PI=; b=qN0xIDrnsba8VB+jVQHf8f8g+5cKa03AFC4PUnujw6zKM82sxvp5NrPmeY8sVQVwyQ jT8FQ8+tvBJYObv3M3BW6cLvJYVX7Qaiu3iJQhl0lFVB3DHq0j3Vd+2FIewJOMA7xxB7 lTA6drxIdkGrs6VxtkTL/0xB1Xt1Mmm0FTwVSwMGdV8UJrOmqJrTTwDrSW2em78GQg5R waa1eBENczjTxSuvkf2q7CwHsJ3sh5064AZlavj7V5Rc0f3s5vEo7K411FMLRmKfHIHn iboUpJYZQXPeBXMdNmhoxC3JUQNXDRL1ibeuk/c973LoVKX01yknpJtW0IOdUKv3n2UF cAyA== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; t=1695747099; s=strato-dkim-0003; d=gerhold.net; h=Cc:To:In-Reply-To:References:Message-Id:Subject:Date:From:Cc:Date: From:Subject:Sender; bh=kyLgD0VCEKhD2y8R4NJw6xg2f+jq7nFO8XPoZEM39PI=; b=QfnfrnH4GbxLcHfantWYb0dmhglBgmIv6aNlJsC7JvONpru5q5gfW2qCoNpG4BVjrV XTj0hjpfp8ghGdHxXZAA== X-RZG-AUTH: ":P3gBZUipdd93FF5ZZvYFPugejmSTVR2nRPhVOQjVd4CteZ/7jYgS+mLFY+H0JAn9VOH+nz0=" Received: from [192.168.244.3] by smtp.strato.de (RZmta 49.8.2 SBL|AUTH) with ESMTPSA id R04c57z8QGpcg5c (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256 bits)) (Client did not present a certificate); Tue, 26 Sep 2023 18:51:38 +0200 (CEST) From: Stephan Gerhold Date: Tue, 26 Sep 2023 18:51:19 +0200 Subject: [PATCH 05/13] arm64: dts: qcom: msm8916-samsung-serranove: Add sound and modem Precedence: bulk X-Mailing-List: devicetree@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20230926-msm8916-modem-v1-5-398eec74bac9@gerhold.net> References: <20230926-msm8916-modem-v1-0-398eec74bac9@gerhold.net> In-Reply-To: <20230926-msm8916-modem-v1-0-398eec74bac9@gerhold.net> To: Bjorn Andersson Cc: Andy Gross , Konrad Dybcio , linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, phone-devel@vger.kernel.org, ~postmarketos/upstreaming@lists.sr.ht, Bryan O'Donoghue , Stephan Gerhold X-Mailer: b4 0.12.3 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Enable sound and modem for the Samsung S4 Mini Value Edition. The setup is similar to most MSM8916 devices, i.e.: - QDSP6 audio - Speaker/earpiece/headphones/microphones via digital/analog codec in MSM8916/PM8916 - WWAN Internet via BAM-DMUX except: - Samsung-specific audio jack detection (not supported yet) Signed-off-by: Stephan Gerhold --- arch/arm64/boot/dts/qcom/msm8916-samsung-serranove.dts | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/msm8916-samsung-serranove.dts b/arch/arm64/boot/dts/qcom/msm8916-samsung-serranove.dts index 68da2a2d3077..5f33aa0ad7b5 100644 --- a/arch/arm64/boot/dts/qcom/msm8916-samsung-serranove.dts +++ b/arch/arm64/boot/dts/qcom/msm8916-samsung-serranove.dts @@ -6,6 +6,8 @@ /dts-v1/; #include "msm8916-pm8916.dtsi" +#include "msm8916-modem-qdsp6.dtsi" + #include #include #include @@ -319,6 +321,10 @@ &blsp_uart2 { status = "okay"; }; +&mpss_mem { + reg = <0x0 0x86800000 0x0 0x5a00000>; +}; + &pm8916_resin { status = "okay"; linux,code = ; @@ -350,6 +356,14 @@ &sdhc_2 { no-1-8-v; }; +&sound { + status = "okay"; + audio-routing = + "AMIC1", "MIC BIAS External1", + "AMIC2", "MIC BIAS Internal2", + "AMIC3", "MIC BIAS External1"; +}; + &usb { status = "okay"; extcon = <&muic>, <&muic>; From patchwork Tue Sep 26 16:51:22 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephan Gerhold X-Patchwork-Id: 726504 Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net [23.128.96.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0A3ED341A0 for ; Tue, 26 Sep 2023 16:51:59 +0000 (UTC) Received: from mo4-p03-ob.smtp.rzone.de (mo4-p03-ob.smtp.rzone.de [81.169.146.173]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A2ED6126; Tue, 26 Sep 2023 09:51:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695747100; cv=none; d=strato.com; s=strato-dkim-0002; b=kyS9j3istprNUcTC6bgnIEhaTIkRL6SVLdcGxlsrwqYoxsLkWI5/7xBUAOLiZqaQM0 KhRIj/Rbkf0Jh3egdyD3byW+IEGfU5Wi6XRG7z/oBO5Ad1PeC5/zBm5AS0HQWCAl/J/M gKrs+opVEo5K6GEsZfhrDOta5iYhYTA6Q3O6sXNWLCF1FDfzAwPWeT2es12Zw6oaUDaR 7rRV/czRcxdfaUo4gBPiITMvb2GwzHcbiTvI5Yz646r6skaMbQ15zF49x/ABQ+kiQFYX QU3IF25iy1iLl8d13Qmrcimgl5AfNoq6/32Le5wfcSoco9HYrHgfj9cyqJNrDT1mXkOM scVA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; t=1695747100; s=strato-dkim-0002; d=strato.com; h=Cc:To:In-Reply-To:References:Message-Id:Subject:Date:From:Cc:Date: From:Subject:Sender; bh=hfQak+qd/CwUYQT+9N6dyj+xLdEMvd0p5kk5akj7nGU=; b=Tzd1U2NF+NtOQ2MhvE3g/gbqVb5Daoju0zmRwL5fvbQmpome6SDCqD6R2d1y1rN9m2 GRYvcN77aAwq5Quxpb2470byvWow1Ieo+diCoxlBHKgDidKll9GFZKMp14GC+QCrA77l kp3QHf8/7j3ONY9Li/FovmliarobQomNvMCpFbwzdt5RbGTA3HeXrBwIunn2pXvWPsho kliK99zd2qJrP4KXwJ0Rf+GHcSMGfhwVgVCH/Xw9dL1b0vLlWjeuotkX+x9iANsVoA8t S8tSzOUXe1kB2CxUmOMAqf0d3AwxJ9pGoFWUUDmNzQfeQNL0xnBWaVizt55jgeV8IFPy /Qmw== ARC-Authentication-Results: i=1; strato.com; arc=none; dkim=none X-RZG-CLASS-ID: mo03 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1695747100; s=strato-dkim-0002; d=gerhold.net; h=Cc:To:In-Reply-To:References:Message-Id:Subject:Date:From:Cc:Date: From:Subject:Sender; bh=hfQak+qd/CwUYQT+9N6dyj+xLdEMvd0p5kk5akj7nGU=; b=VnQHgOps50nsAIiERHfVNOuSa40qCFL6yGuN276zeDuD6msOE2c/VcMvJICs/1MPHl yJqQwTpzVKyXK54lrG3gp/eIe3hD/R0pOt9kaMKQL6wKky2sMq80Zg8a2R7Ada35zREo hov5Mlw9IVRb4Jf1G3oAdyphG8W2ms2Ll6aMlr1vT8iMlbdtLTApehlWwBpTlGedw0l/ U3ydHVsvqykfGDB+o1uVU+dliOhKW++cEGz+HVfhdJDty1dBPQv6qICzT6rQKTEAEehu RlsyQxr3gLss42En7ORoK7mvlnWPMkldDm+VRMcfh+8XmHOKwB9IVgroHmoiHUAyh9b3 iO0w== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; t=1695747100; s=strato-dkim-0003; d=gerhold.net; h=Cc:To:In-Reply-To:References:Message-Id:Subject:Date:From:Cc:Date: From:Subject:Sender; bh=hfQak+qd/CwUYQT+9N6dyj+xLdEMvd0p5kk5akj7nGU=; b=rqIulaC7MlJuPwOTo2//YHIuOUFMhYcyls2nynyq5XIpuWDB9OvBOndaUzy0frrlsw 9FF4O6UCl7O2Ppn1msCg== X-RZG-AUTH: ":P3gBZUipdd93FF5ZZvYFPugejmSTVR2nRPhVOQjVd4CteZ/7jYgS+mLFY+H0JAn9VOH+nz0=" Received: from [192.168.244.3] by smtp.strato.de (RZmta 49.8.2 SBL|AUTH) with ESMTPSA id R04c57z8QGpdg5f (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256 bits)) (Client did not present a certificate); Tue, 26 Sep 2023 18:51:39 +0200 (CEST) From: Stephan Gerhold Date: Tue, 26 Sep 2023 18:51:22 +0200 Subject: [PATCH 08/13] arm64: dts: qcom: msm8916-asus-z00l: Add sound and modem Precedence: bulk X-Mailing-List: devicetree@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20230926-msm8916-modem-v1-8-398eec74bac9@gerhold.net> References: <20230926-msm8916-modem-v1-0-398eec74bac9@gerhold.net> In-Reply-To: <20230926-msm8916-modem-v1-0-398eec74bac9@gerhold.net> To: Bjorn Andersson Cc: Andy Gross , Konrad Dybcio , linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, phone-devel@vger.kernel.org, ~postmarketos/upstreaming@lists.sr.ht, Bryan O'Donoghue , Stephan Gerhold , "J.R. Divya Antony" X-Mailer: b4 0.12.3 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, SPF_HELO_PASS,SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net From: "J.R. Divya Antony" Enable sound and modem for the ASUS Zenfone 2 Laser. The setup is similar to most MSM8916 devices, i.e.: - QDSP6 audio - Speakear/earpiece/headphones/microphones via digital/analog codec in MSM8916/PM8916 - Audio jack detection via analog codec in PM8916 - WWAN Internet via BAM-DMUX Signed-off-by: J.R. Divya Antony [Stephan: rebase and simplify, add consistent commit message] Signed-off-by: Stephan Gerhold --- arch/arm64/boot/dts/qcom/msm8916-asus-z00l.dts | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/msm8916-asus-z00l.dts b/arch/arm64/boot/dts/qcom/msm8916-asus-z00l.dts index a8be6ff66893..ff8eb0a94795 100644 --- a/arch/arm64/boot/dts/qcom/msm8916-asus-z00l.dts +++ b/arch/arm64/boot/dts/qcom/msm8916-asus-z00l.dts @@ -3,6 +3,8 @@ /dts-v1/; #include "msm8916-pm8916.dtsi" +#include "msm8916-modem-qdsp6.dtsi" + #include #include #include @@ -130,6 +132,18 @@ &blsp_uart2 { status = "okay"; }; +&mpss_mem { + reg = <0x0 0x86800000 0x0 0x5500000>; +}; + +&pm8916_codec { + qcom,micbias-lvl = <2800>; + qcom,mbhc-vthreshold-low = <75 150 237 450 500>; + qcom,mbhc-vthreshold-high = <75 150 237 450 500>; + qcom,micbias1-ext-cap; + qcom,hphl-jack-type-normally-open; +}; + &pm8916_rpm_regulators { pm8916_l17: l17 { regulator-min-microvolt = <2850000>; @@ -151,6 +165,14 @@ &sdhc_2 { cd-gpios = <&tlmm 38 GPIO_ACTIVE_LOW>; }; +&sound { + status = "okay"; + audio-routing = + "AMIC1", "MIC BIAS External1", + "AMIC2", "MIC BIAS Internal2", + "AMIC3", "MIC BIAS External1"; +}; + &usb { status = "okay"; extcon = <&usb_id>, <&usb_id>; From patchwork Tue Sep 26 16:51:23 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephan Gerhold X-Patchwork-Id: 726505 Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net [23.128.96.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0BE4B3418C for ; Tue, 26 Sep 2023 16:51:54 +0000 (UTC) Received: from mo4-p03-ob.smtp.rzone.de (mo4-p03-ob.smtp.rzone.de [85.215.255.103]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DF9F310E; Tue, 26 Sep 2023 09:51:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695747100; cv=none; d=strato.com; s=strato-dkim-0002; b=ZO1bkRACfadu9xOhXlCcAPEtWgKgleYqnaaYoY9+kAaAVUwYTc6CoR2YVNiWt132WG n2vcRbZ5MSrknEcpK++XAWZt+ohVivDbC6qmXzLGFMf8wVetlcWO010dFl+krRkaV1a+ OE/tDpd5r2rduuzfofgZQIK0C2yYwj8JOisFIYWt4ioWQ+hzeyGl06P19x28+EB7zlMo nXSFUx+BaAYs2S5yFj/wfU+Hh2Lm3eiuzeH61qhrdgglf0YWc+rnUnUT96Nbxe5ihA4t IEzPO+thJ8KvKvdTvXOFiXwIdP3QjlVYlFC8HPzTenPkDM5EN1sgCzRnfjEAetFOVE1O st2g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; t=1695747100; s=strato-dkim-0002; d=strato.com; h=Cc:To:In-Reply-To:References:Message-Id:Subject:Date:From:Cc:Date: From:Subject:Sender; bh=gmsYc8rXCbXWg/VO14Z+EOACh1i4V1W7ETcSIol4nmk=; b=QgHwPgg1hBnZ2d2DcL1EehrHe+nubZbpTi+wJZmmxErqDkiQwowjYSjJwDGNzaTmuy dMbm8cwSmFvVjbKlkfWDYYezgLdKPmLVWIkOljbU4TqvsDhnkFUFevCMJDohbf6nc0AO N3oWmUqQdb/wmE+dTL2Xxk21XHfxBl1cpNQ6sDOi7yZy6kJuJnTzPvByY2bQZWIcbVdl t0PSVX1ODFze+QIacR1MZTfGBKU7giIm0Mj+4HxWn2xGW8vytUUPEaCnlyUSmK/AeYfv 5+kEXu96MPdrYIc4gleuf5QheOG3XA23C1LdAa5dxs0kpNIorZ77YcYmTXeuURSTz7BD mFFQ== ARC-Authentication-Results: i=1; strato.com; arc=none; dkim=none X-RZG-CLASS-ID: mo03 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1695747100; s=strato-dkim-0002; d=gerhold.net; h=Cc:To:In-Reply-To:References:Message-Id:Subject:Date:From:Cc:Date: From:Subject:Sender; bh=gmsYc8rXCbXWg/VO14Z+EOACh1i4V1W7ETcSIol4nmk=; b=AZvtVSur+sBsv5AGZTweqSIzkEGC0C2TupeYszbk0BFZfdCM9rIMzyrYaGV2BjNT9l DtEVBDgloO0rkcGnHcVXPRriftf//GpkbmrMgXmEgGgTV4i/fRQjKsLzE0oUf7mjWO+5 EXoMAbGcPg6DuC4CQoosGYRZNH+nILPBHS538fGe2fK6ivKRm2ejkf9zkpDo7PDebpfh ngCPKDhs9PK53VYFCViLFuyLzfwy2Ni4OhQVI1tUpoCNHy58CkOEHNLprZLc9IQD4dN5 RPXCYLeNJVdOr13MJvBm4JuNa0ukGtlqq0Oy6iJKwoolegGjlnN+BL5jUvCu0/Rcqnj9 QwpQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; t=1695747100; s=strato-dkim-0003; d=gerhold.net; h=Cc:To:In-Reply-To:References:Message-Id:Subject:Date:From:Cc:Date: From:Subject:Sender; bh=gmsYc8rXCbXWg/VO14Z+EOACh1i4V1W7ETcSIol4nmk=; b=WxbKU7DA/kq7Axy8ayGYSniTa3U9Cn1gmmFpkLiTRAdKDAUKYXE9bP0FgilXtKvV+2 ebcHZhNibhdGd1xQ3QAA== X-RZG-AUTH: ":P3gBZUipdd93FF5ZZvYFPugejmSTVR2nRPhVOQjVd4CteZ/7jYgS+mLFY+H0JAn9VOH+nz0=" Received: from [192.168.244.3] by smtp.strato.de (RZmta 49.8.2 SBL|AUTH) with ESMTPSA id R04c57z8QGpeg5g (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256 bits)) (Client did not present a certificate); Tue, 26 Sep 2023 18:51:40 +0200 (CEST) From: Stephan Gerhold Date: Tue, 26 Sep 2023 18:51:23 +0200 Subject: [PATCH 09/13] arm64: dts: qcom: msm8916-longcheer-l8150: Add sound and modem Precedence: bulk X-Mailing-List: devicetree@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20230926-msm8916-modem-v1-9-398eec74bac9@gerhold.net> References: <20230926-msm8916-modem-v1-0-398eec74bac9@gerhold.net> In-Reply-To: <20230926-msm8916-modem-v1-0-398eec74bac9@gerhold.net> To: Bjorn Andersson Cc: Andy Gross , Konrad Dybcio , linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, phone-devel@vger.kernel.org, ~postmarketos/upstreaming@lists.sr.ht, Bryan O'Donoghue , Stephan Gerhold , Nikita Travkin X-Mailer: b4 0.12.3 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, SPF_HELO_PASS,SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net From: Nikita Travkin Enable sound and modem for the Longcheer L8150 (e.g. Wileyfox Swift). The setup is similar to most MSM8916 devices, i.e.: - QDSP6 audio - Speaker/earpiece/headphones/microphones via digital/analog codec in MSM8916/PM8916 - Audio jack detection via analog codec in PM8916 - WWAN Internet via BAM-DMUX except: - The mpss firmware region must be relocated to a different address. This is because the wcnss firmware is not relocatable for some reason. The mpss firmware is too large to avoid overlap with wcnss when placed at the default address (0x86800000). Surprisingly the vendor kernel does not handle this. The firmware regions end up overlapping there and somehow this does not explode. We try to handle this more safely by relocating the mpss region to the first higher address that is working correctly: 0x8e800000. Signed-off-by: Nikita Travkin Co-developed-by: Stephan Gerhold Signed-off-by: Stephan Gerhold --- .../boot/dts/qcom/msm8916-longcheer-l8150.dts | 32 ++++++++++++++++++++-- 1 file changed, 29 insertions(+), 3 deletions(-) diff --git a/arch/arm64/boot/dts/qcom/msm8916-longcheer-l8150.dts b/arch/arm64/boot/dts/qcom/msm8916-longcheer-l8150.dts index 47d1c5cb13f4..78f08254b287 100644 --- a/arch/arm64/boot/dts/qcom/msm8916-longcheer-l8150.dts +++ b/arch/arm64/boot/dts/qcom/msm8916-longcheer-l8150.dts @@ -3,6 +3,8 @@ /dts-v1/; #include "msm8916-pm8916.dtsi" +#include "msm8916-modem-qdsp6.dtsi" + #include #include #include @@ -25,17 +27,26 @@ chosen { /* * For some reason, the signed wcnss firmware is not relocatable. - * It must be loaded at 0x8b600000. All other firmware is relocatable, - * so place wcnss at the fixed address and then all other firmware - * regions will be automatically allocated at a fitting place. + * It must be loaded at 0x8b600000. Unfortunately, this also means that + * mpss_mem does not fit when loaded to the typical address at 0x86800000. + * + * Load wcnss_mem to the fixed address and relocate mpss_mem to the next + * working higher address. For some reason the modem firmware does not + * boot when placed at 0x8a800000 to 0x8e800000. */ reserved-memory { + /delete-node/ mpss@86800000; /delete-node/ wcnss; wcnss_mem: wcnss@8b600000 { reg = <0x0 0x8b600000 0x0 0x600000>; no-map; }; + + mpss_mem: mpss@8e800000 { + reg = <0x0 0x8e800000 0x0 0x5000000>; + no-map; + }; }; gpio-keys { @@ -225,6 +236,13 @@ &blsp_uart2 { status = "okay"; }; +&pm8916_codec { + qcom,micbias-lvl = <2800>; + qcom,mbhc-vthreshold-low = <75 150 237 450 500>; + qcom,mbhc-vthreshold-high = <75 150 237 450 500>; + qcom,hphl-jack-type-normally-open; +}; + &pm8916_resin { status = "okay"; linux,code = ; @@ -254,6 +272,14 @@ &sdhc_2 { non-removable; }; +&sound { + status = "okay"; + audio-routing = + "AMIC1", "MIC BIAS Internal1", + "AMIC2", "MIC BIAS Internal2", + "AMIC3", "MIC BIAS Internal3"; +}; + &usb { status = "okay"; dr_mode = "peripheral"; From patchwork Tue Sep 26 16:51:26 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephan Gerhold X-Patchwork-Id: 726500 Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net [23.128.96.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id DD13534CF5 for ; Tue, 26 Sep 2023 16:52:02 +0000 (UTC) Received: from mo4-p03-ob.smtp.rzone.de (mo4-p03-ob.smtp.rzone.de [85.215.255.102]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E6DBF11F; Tue, 26 Sep 2023 09:52:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695747101; cv=none; d=strato.com; s=strato-dkim-0002; b=nkG3qo4wxa6uPpr8wezU1QB3J9gPmARwh2pUsEBIO4644ypuWj3bpf4jKsNSGPvWsG nl/MuQeFBWPMKOUYuANpUr9YbI3GtmsAz98pY+MR3fF399SvTCEQIYNE+9tFSBW4n9uo dOrXyYy9YhviBsVcejoXiOUB3OFdAwXN/Mao0I+mZMqc3+9GU+dDg2A6yvPh2Rg9rr90 YaOUAK6OAhYR0JAZbzHGQxdu2EBgeHpVRfmevT7IxMYgdKGhTRUlRXEuWbp0cmgTPVGJ OWI4GctFmkqzvS9etyeH3uQXQPz39SZdEVVfLsfpVbDEYrGaoJBXNUG8+3dp9lc8Wqql biWw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; t=1695747101; s=strato-dkim-0002; d=strato.com; h=Cc:To:In-Reply-To:References:Message-Id:Subject:Date:From:Cc:Date: From:Subject:Sender; bh=tufcaIR3gqhuRrY5aJ18aw1wfuMM/cmSUyyyezmaDvk=; b=M28tOYed4a+uDYp3SoHeC+ceSs4//LjQgD/5ycLgv4AdtTpGim06TmHxZXG/jakZMM 87fcbONDMmIGaaZLoibW/DUKlPJs/22vqL56EOAgSqNk/JpcmeRPnnIGsr5MV9D6gzzP ncgBOxfn55AyDy1Fzcg3nY80B8stlFSdsGbAepZ3hgm5awLqzw0ofluuoSec6fCz0NMb b4OpQR5ePCD4tim2FMamSNjVRr25f/2zGExPXPkC26cdNpBJ3CVYrBOa+oX9lYIkc2fk oNHE9TbepYh7m6BLwP1MeqZVsUssdzs1kDRzmkjl0dKZLunwIVc7P+7+bnrsx0428sIF EMmA== ARC-Authentication-Results: i=1; strato.com; arc=none; dkim=none X-RZG-CLASS-ID: mo03 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1695747101; s=strato-dkim-0002; d=gerhold.net; h=Cc:To:In-Reply-To:References:Message-Id:Subject:Date:From:Cc:Date: From:Subject:Sender; bh=tufcaIR3gqhuRrY5aJ18aw1wfuMM/cmSUyyyezmaDvk=; b=MpeJFR55+/Kra0BqLqqlt8ubm8S6O6XtQqKaj4XZPWGn1lG//QsIOEhcgoThOYgN3C /Xe7X7fSTuMqKkBdp88GFh2QHVE5VgflVpDzVhm78C+Ncqj3o6x8w7F6C5DhBUDuK8cJ uK6ncWrZa6EU5JAi8Oc65/nw0K9ajxpQp2f20z8Nd2VnPd5oJkK5NV7buJkKONEx0rrH LvrzI7l2MTX9oAhndIqPRF/wcKiWXpl7V7Xon3T32aouvXxpuVVFs5dExqN8biUjNA4t /EBVm+zcT0yP+cpAEyp44eqK1EaWSoLJxwdnMtpOQpdWWVgtyNL3fxu9QoAnM7roS45m TUew== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; t=1695747101; s=strato-dkim-0003; d=gerhold.net; h=Cc:To:In-Reply-To:References:Message-Id:Subject:Date:From:Cc:Date: From:Subject:Sender; bh=tufcaIR3gqhuRrY5aJ18aw1wfuMM/cmSUyyyezmaDvk=; b=DSs3zEBZOD9PDojf0ZDEnz39N/bXVBh80JJXu3OOaptca1U40I7321k1R3mY0/Rv0q M9SzyIlCTUqrcKTGjxBg== X-RZG-AUTH: ":P3gBZUipdd93FF5ZZvYFPugejmSTVR2nRPhVOQjVd4CteZ/7jYgS+mLFY+H0JAn9VOH+nz0=" Received: from [192.168.244.3] by smtp.strato.de (RZmta 49.8.2 SBL|AUTH) with ESMTPSA id R04c57z8QGpfg5j (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256 bits)) (Client did not present a certificate); Tue, 26 Sep 2023 18:51:41 +0200 (CEST) From: Stephan Gerhold Date: Tue, 26 Sep 2023 18:51:26 +0200 Subject: [PATCH 12/13] arm64: dts: qcom: msm8916-samsung-j5: Add sound and modem Precedence: bulk X-Mailing-List: devicetree@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20230926-msm8916-modem-v1-12-398eec74bac9@gerhold.net> References: <20230926-msm8916-modem-v1-0-398eec74bac9@gerhold.net> In-Reply-To: <20230926-msm8916-modem-v1-0-398eec74bac9@gerhold.net> To: Bjorn Andersson Cc: Andy Gross , Konrad Dybcio , linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, phone-devel@vger.kernel.org, ~postmarketos/upstreaming@lists.sr.ht, Bryan O'Donoghue , Stephan Gerhold , "Lin, Meng-Bo" , Markuss Broks X-Mailer: b4 0.12.3 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, SPF_HELO_PASS,SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net From: "Lin, Meng-Bo" Enable sound and modem for the Samsung J5 smartphones. The setup is similar to most MSM8916 devices, i.e.: - QDSP6 audio - Speaker/earpiece/headphones/microphones via digital/analog codec in MSM8916/PM8916 - WWAN Internet via BAM-DMUX except: - There is no secondary microphone, so a different "model" is used to differentiate that in the UCM configuration. - Samsung-specific audio jack detection (not supported yet) Co-developed-by: Markuss Broks Signed-off-by: Markuss Broks Signed-off-by: "Lin, Meng-Bo" [Stephan: Add consistent commit message] Signed-off-by: Stephan Gerhold --- arch/arm64/boot/dts/qcom/msm8916-samsung-j5-common.dtsi | 15 +++++++++++++++ arch/arm64/boot/dts/qcom/msm8916-samsung-j5.dts | 4 ++++ 2 files changed, 19 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/msm8916-samsung-j5-common.dtsi b/arch/arm64/boot/dts/qcom/msm8916-samsung-j5-common.dtsi index fe59be3505fe..2caa820b0c26 100644 --- a/arch/arm64/boot/dts/qcom/msm8916-samsung-j5-common.dtsi +++ b/arch/arm64/boot/dts/qcom/msm8916-samsung-j5-common.dtsi @@ -1,6 +1,8 @@ // SPDX-License-Identifier: GPL-2.0-only #include "msm8916-pm8916.dtsi" +#include "msm8916-modem-qdsp6.dtsi" + #include #include #include @@ -135,6 +137,10 @@ &blsp_uart2 { status = "okay"; }; +&mpss_mem { + reg = <0x0 0x86800000 0x0 0x5800000>; +}; + &pm8916_resin { status = "okay"; linux,code = ; @@ -154,6 +160,15 @@ &sdhc_2 { cd-gpios = <&tlmm 38 GPIO_ACTIVE_LOW>; }; +&sound { + model = "msm8916-1mic"; + audio-routing = + "AMIC1", "MIC BIAS External1", + "AMIC2", "MIC BIAS Internal2", + "AMIC3", "MIC BIAS External1"; + status = "okay"; +}; + &usb { extcon = <&muic>, <&muic>; status = "okay"; diff --git a/arch/arm64/boot/dts/qcom/msm8916-samsung-j5.dts b/arch/arm64/boot/dts/qcom/msm8916-samsung-j5.dts index 58c2f5a70e78..ba8650971d6a 100644 --- a/arch/arm64/boot/dts/qcom/msm8916-samsung-j5.dts +++ b/arch/arm64/boot/dts/qcom/msm8916-samsung-j5.dts @@ -19,6 +19,10 @@ &blsp_i2c5 { status = "disabled"; }; +&pm8916_codec { + qcom,micbias1-ext-cap; +}; + &touchscreen { /* FIXME: Missing sm5703-mfd driver to power up vdd-supply */ }; From patchwork Tue Sep 26 16:51:27 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephan Gerhold X-Patchwork-Id: 726502 Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net [23.128.96.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 38F38341BF for ; Tue, 26 Sep 2023 16:52:01 +0000 (UTC) Received: from mo4-p03-ob.smtp.rzone.de (mo4-p03-ob.smtp.rzone.de [85.215.255.102]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 87035136; Tue, 26 Sep 2023 09:51:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695747101; cv=none; d=strato.com; s=strato-dkim-0002; b=oX0OUl60dqkGoVI54R7HrEoRF04f6UnPz6Y8x5nxA4PGCc8BafGVmfqPGNo/YV1Yel eySgDh9M3pIQ8v14bnXSeXSUm/0/Ym/xSMSCe6fCrgFHmAIvYvbDguHQRQbOoDX85kRG Dz2V2PSp8ordMPy17avmBAJHajOEsKWfbZX32/N6wLj8KYYe/PU3iHuP5KdTMsXq9BDp 4sW9aU807i8IcfSMfuy9Vf3dy9sgJvqbAy72RoNh9Fcuhai+/h68QPnOa+VpauafXKs0 oqUPYFwBvGW4vxlwCpDeC3DZB2IQNXFDYkaQI+BALtP1EtFyMzOiNCEK2coHCrRMNOwM x8Jg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; t=1695747101; s=strato-dkim-0002; d=strato.com; h=Cc:To:In-Reply-To:References:Message-Id:Subject:Date:From:Cc:Date: From:Subject:Sender; bh=A/XrVYjcUCNSKSvfCQZickf7SKDX4aDHb6KOg+W+CCo=; b=GF6ucFMhmQXy2sl3bo0J6xsMwDFf1CHSCn+obpe4CyTPf9NNqOMocH5cBLlj0FAuiO y4ocj5CrZADOaB/l+VSCUCzh18zPxyHiyV3+nStxynC267yk9mmWDZ33pl22EN1HC1jA g8rXHveREBVdy1qG9ajvB5eMDHgVrHfrMfPIgccfCO+kwCAr1Fqb7WiGJ4781SOGjYQJ yiQtjH0rGt5yc+lC1nEHvXO4F7Cko9FDoxGwWsgcgkErv8qCLy3FVD99kszUHNHeqb/T mEMRu9qDjjKcQXH9hpEEqmUfrbEb7wINzW4mOcHtwL0zsz02pePMcIemSsi7uOrMDXTf OKpw== ARC-Authentication-Results: i=1; strato.com; arc=none; dkim=none X-RZG-CLASS-ID: mo03 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1695747101; s=strato-dkim-0002; d=gerhold.net; h=Cc:To:In-Reply-To:References:Message-Id:Subject:Date:From:Cc:Date: From:Subject:Sender; bh=A/XrVYjcUCNSKSvfCQZickf7SKDX4aDHb6KOg+W+CCo=; b=deevSVjmGYXJYdSJ5qhdXybM8kGnZhulYYmEd7SZnWdLHrSutbOoEGwDDge5OVzsB3 hVht+7bAJJECkRlzJWtQ+zsqXH/vu4CQ1tNkUMaiSLszOHjaA/3Yu3KXxYm1b9xGnaE3 VSsSDt0jw6heR8hkhF4bnBAFctuMEUiQz7CmXK+Yn3ApBX+RXjTe6Sxyr4KtWu4APquj 3Pta4/NforJvntynXzHCbtDVFDEDmEPro5qFA+8DEnJKZXLCErez8zIXQlTkzF9kaVoH B/r+fy97B7LD123yrs78uMiykJS78YEPXh5UaApj7q4++k2vEAm7/xpbQM5ZLPmJX6ov 9JGA== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; t=1695747101; s=strato-dkim-0003; d=gerhold.net; h=Cc:To:In-Reply-To:References:Message-Id:Subject:Date:From:Cc:Date: From:Subject:Sender; bh=A/XrVYjcUCNSKSvfCQZickf7SKDX4aDHb6KOg+W+CCo=; b=3iq7OZgpqQgWUjkQ6WtVAavIeXJZhZyeuPqsqoeqgNeOlFtEtLejP6NvJnqixJskxw WATb2Bp8ui6wlurOdKDQ== X-RZG-AUTH: ":P3gBZUipdd93FF5ZZvYFPugejmSTVR2nRPhVOQjVd4CteZ/7jYgS+mLFY+H0JAn9VOH+nz0=" Received: from [192.168.244.3] by smtp.strato.de (RZmta 49.8.2 SBL|AUTH) with ESMTPSA id R04c57z8QGpfg5k (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256 bits)) (Client did not present a certificate); Tue, 26 Sep 2023 18:51:41 +0200 (CEST) From: Stephan Gerhold Date: Tue, 26 Sep 2023 18:51:27 +0200 Subject: [PATCH 13/13] arm64: dts: qcom: msm8939-samsung-a7: Add sound and modem Precedence: bulk X-Mailing-List: devicetree@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20230926-msm8916-modem-v1-13-398eec74bac9@gerhold.net> References: <20230926-msm8916-modem-v1-0-398eec74bac9@gerhold.net> In-Reply-To: <20230926-msm8916-modem-v1-0-398eec74bac9@gerhold.net> To: Bjorn Andersson Cc: Andy Gross , Konrad Dybcio , linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, phone-devel@vger.kernel.org, ~postmarketos/upstreaming@lists.sr.ht, Bryan O'Donoghue , Stephan Gerhold , "Lin, Meng-Bo" X-Mailer: b4 0.12.3 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, SPF_HELO_PASS,SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net From: "Lin, Meng-Bo" Enable sound and modem for the Samsung A7. The setup is similar to most MSM8916 devices, i.e.: - QDSP6 audio - Earpiece/headphones/microphones via digital/analog codec in MSM8916/PM8916 - WWAN Internet via BAM-DMUX except for the same differences as the MSM8916-based Samsung A2015 devices: - NXP TFA9895 codec for speaker on Quaternary MI2S - Samsung-specific audio jack detection (not supported yet) Signed-off-by: "Lin, Meng-Bo" [Stephan: Add consistent commit message] Signed-off-by: Stephan Gerhold --- arch/arm64/boot/dts/qcom/msm8939-samsung-a7.dts | 54 +++++++++++++++++++++++++ 1 file changed, 54 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/msm8939-samsung-a7.dts b/arch/arm64/boot/dts/qcom/msm8939-samsung-a7.dts index fccd8fec8b8f..4951b3e265d2 100644 --- a/arch/arm64/boot/dts/qcom/msm8939-samsung-a7.dts +++ b/arch/arm64/boot/dts/qcom/msm8939-samsung-a7.dts @@ -3,10 +3,12 @@ /dts-v1/; #include "msm8939-pm8916.dtsi" +#include "msm8916-modem-qdsp6.dtsi" #include #include #include +#include / { model = "Samsung Galaxy A7 (2015)"; @@ -287,6 +289,18 @@ muic: extcon@25 { }; }; +&blsp_i2c2 { + status = "okay"; + + speaker_codec: audio-codec@34 { + compatible = "nxp,tfa9895"; + reg = <0x34>; + vddd-supply = <&pm8916_l5>; + sound-name-prefix = "Speaker"; + #sound-dai-cells = <0>; + }; +}; + &blsp_i2c5 { status = "okay"; @@ -309,6 +323,17 @@ &blsp_uart2 { status = "okay"; }; +&lpass { + dai-link@3 { + reg = ; + qcom,playback-sd-lines = <1>; + }; +}; + +&mpss_mem { + reg = <0x0 0x86800000 0x0 0x5800000>; +}; + &pm8916_resin { linux,code = ; status = "okay"; @@ -321,6 +346,13 @@ pm8916_l17: l17 { }; }; +&q6afedai { + dai@22 { + reg = ; + qcom,sd-lines = <1>; + }; +}; + &sdhc_1 { status = "okay"; }; @@ -335,6 +367,28 @@ &sdhc_2 { status = "okay"; }; +&sound { + model = "samsung-a2015"; + audio-routing = + "AMIC1", "MIC BIAS External1", + "AMIC2", "MIC BIAS Internal2", + "AMIC3", "MIC BIAS External1"; + + pinctrl-0 = <&cdc_pdm_default &sec_mi2s_default>; + pinctrl-1 = <&cdc_pdm_sleep &sec_mi2s_sleep>; + pinctrl-names = "default", "sleep"; + + status = "okay"; +}; + +&sound_dai_quaternary { + status = "okay"; + + codec { + sound-dai = <&speaker_codec>; + }; +}; + &usb { extcon = <&muic>, <&muic>; status = "okay";