From patchwork Mon Oct 16 12:47:01 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nia Espera X-Patchwork-Id: 13423186 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8DA75CDB485 for ; Mon, 16 Oct 2023 12:47:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233502AbjJPMrU (ORCPT ); Mon, 16 Oct 2023 08:47:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34602 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233491AbjJPMrR (ORCPT ); Mon, 16 Oct 2023 08:47:17 -0400 Received: from fanzine2.igalia.com (fanzine.igalia.com [178.60.130.6]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5AE15F5; Mon, 16 Oct 2023 05:47:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=igalia.com; s=20170329; h=Cc:To:In-Reply-To:References:Message-Id: Content-Transfer-Encoding:Content-Type:MIME-Version:Subject:Date:From:Sender: Reply-To: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=PJALcNBz9ImCFUk6lytLPYTwt4DBsHnDsm7gSz1x8lo=; b=ff3G7CT6bnQycp0nllKxCQQDhD zeSvojJucET6lcblBDwzfvLHu3iWKjSLvwEQYdTY3IWhOcYXe6JkIlmgz50IJ/QoAghxE2FRD8g2u W8osi/fZoZwcV3GSP12kypy6EfNmCda56Im0EAFNfYMawfpSXazqeSeoZoN5i2H1wcjb1xXoQX4W+ xp3mWJndP8nIFjLcNHKXQRQcmlMTb2+nuz6shzg+/bWm0trpuUSob0pyUXvGG9OzNnpOh4e41F0v7 enNWAejnwCwmhUN2qRg4fHB5t97+T6K+119V1JM1v40DDTJK2tozppe6pzU+zh2JU7w+TsmcT0cr0 U+EeXRYw==; Received: from re-byods-146-50-198-227.wireless.uva.nl ([146.50.198.227]) by fanzine2.igalia.com with esmtpsa (Cipher TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim) id 1qsN02-0013kp-Ah; Mon, 16 Oct 2023 14:47:10 +0200 From: Nia Espera Date: Mon, 16 Oct 2023 14:47:01 +0200 Subject: [PATCH 1/5] iio: adc: add smb139x bindings MIME-Version: 1.0 Message-Id: <20231016-nia-sm8350-for-upstream-v1-1-bb557a0af2e9@igalia.com> References: <20231016-nia-sm8350-for-upstream-v1-0-bb557a0af2e9@igalia.com> In-Reply-To: <20231016-nia-sm8350-for-upstream-v1-0-bb557a0af2e9@igalia.com> To: Andy Gross , Bjorn Andersson , Konrad Dybcio , Jonathan Cameron , Lars-Peter Clausen , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Kees Cook , Tony Luck , "Guilherme G. Piccoli" Cc: linux-arm-msm@vger.kernel.org, linux-iio@vger.kernel.org, devicetree@vger.kernel.org, phone-devel@vger.kernel.org, Rob , Clayton Craft , ~postmarketos/upstreaming@lists.sr.ht, Nia Espera X-Mailer: b4 0.12.3 X-Developer-Signature: v=1; a=openpgp-sha256; l=1119; i=nespera@igalia.com; h=from:subject:message-id; bh=JHRfmZAZO9Oy7nubEEb+3rg3Tspx6ftNhCKm1jVHvjY=; b=owEB7QES/pANAwAIAfIkzsI3VuKtAcsmYgBlLTDMffV0GpejRx7QmlbEg2PlwXRVuPTe6tPP8 xqD1HE7EEmJAbMEAAEIAB0WIQSBPDomug3slDJEnubyJM7CN1birQUCZS0wzAAKCRDyJM7CN1bi rTsWC/0XeieJo2IcVNzUcx9Jsfe9cTj9Up0k1WgcjRrpMwX3+DYKzDOLW1vEeoz/tAasmpNODWT 9EGUTEsIzLwb7BNuR8VyNfR7ynOcXKb+2uB5FRzHTAirulWrTebIcIv27mQy5LDxtLdBK6U5PNv cONwZgTu/w+I++iBvdsq0wVxsKSiP2umK05khO6WWVrc09sVrhvv+yhL9R5VcNP2aHaMzKVFIFv 7gcxaT5Hb3CJkEgCE0rEa2VsD/0ROVB8F0EOjrhXgZ13jMWH9SEPB3Y6mSRsqz+iGMOxu+hDAcz 03+yxQruoE0eLyxxts26bAthoZ1PcA5UjWzPGFLw3p9e46KOxtCVo1wGcFoxiS0fIApZwjg+UdA oARxtd6LgeliRR1E0JxgHEv95LrAWt9yQDkZY6XePf3M/PZGsG0jkh6b6GhnwRplMW9jOQ+bvGM nKMhn1HTb0imE0G/upd7QG0K5XMkQBbd4+760su63q955yRqObKsuQYxwiTvCPdqoLBeM= X-Developer-Key: i=nespera@igalia.com; a=openpgp; fpr=813C3A26BA0DEC9432449EE6F224CEC23756E2AD Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Bindings for a charger controller chip found on sm8350 Signed-off-by: Nia Espera --- include/dt-bindings/iio/qcom,spmi-adc7-smb139x.h | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/include/dt-bindings/iio/qcom,spmi-adc7-smb139x.h b/include/dt-bindings/iio/qcom,spmi-adc7-smb139x.h new file mode 100644 index 000000000000..fe163cd8bbdd --- /dev/null +++ b/include/dt-bindings/iio/qcom,spmi-adc7-smb139x.h @@ -0,0 +1,17 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ +/* + * Copyright (c) 2020 The Linux Foundation. All rights reserved. + */ + +#ifndef _DT_BINDINGS_QCOM_SPMI_VADC_SMB139X_H +#define _DT_BINDINGS_QCOM_SPMI_VADC_SMB139X_H + +#define SMB139x_1_ADC7_SMB_TEMP (SMB139x_1_SID << 8 | 0x06) +#define SMB139x_1_ADC7_ICHG_SMB (SMB139x_1_SID << 8 | 0x18) +#define SMB139x_1_ADC7_IIN_SMB (SMB139x_1_SID << 8 | 0x19) + +#define SMB139x_2_ADC7_SMB_TEMP (SMB139x_2_SID << 8 | 0x06) +#define SMB139x_2_ADC7_ICHG_SMB (SMB139x_2_SID << 8 | 0x18) +#define SMB139x_2_ADC7_IIN_SMB (SMB139x_2_SID << 8 | 0x19) + +#endif From patchwork Mon Oct 16 12:47:02 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nia Espera X-Patchwork-Id: 13423185 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 28400C46CA1 for ; Mon, 16 Oct 2023 12:47:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233538AbjJPMrT (ORCPT ); Mon, 16 Oct 2023 08:47:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34570 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233412AbjJPMrR (ORCPT ); Mon, 16 Oct 2023 08:47:17 -0400 Received: from fanzine2.igalia.com (fanzine.igalia.com [178.60.130.6]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5A9A5B4; Mon, 16 Oct 2023 05:47:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=igalia.com; s=20170329; h=Cc:To:In-Reply-To:References:Message-Id: Content-Transfer-Encoding:Content-Type:MIME-Version:Subject:Date:From:Sender: Reply-To: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=gZRV5updU3JChhVgMmhjsN3bQoEHIwgtUSD+mM5NGdo=; b=UG75TLDyG8G6zfBjQpFqPNURqj Ty0X7Ja4/kzPtQMj+vJZyPf1EsCQ8yX9jMnHtcRpqGGspPtiLt9PTR4d/F8Stgc1QDM6DzhEFZE7U LNMabbO/d33tPMfI2OKdbaRL2wPBPndoLCVy39SPVq8Dd33qt4JM3vjNePX/cUGxDKPH47vQ42LOd xFBCNGqPqdb3LighgZirwpwRilbgpa9Fyd/JKmWVAKRWfQU9RHWPohaThmDpFgVGKoFJV0zhbEAqP 5wWN1LDK/d7mb8lqSY/16hNoCIEg5ZsUDRjSgLRcboGTAFVZubbHiayCBEmi8ulzrQ5lb7FPpFGgG nQtbP2ZQ==; Received: from re-byods-146-50-198-227.wireless.uva.nl ([146.50.198.227]) by fanzine2.igalia.com with esmtpsa (Cipher TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim) id 1qsN03-0013kp-4I; Mon, 16 Oct 2023 14:47:11 +0200 From: Nia Espera Date: Mon, 16 Oct 2023 14:47:02 +0200 Subject: [PATCH 2/5] arm64: dts: qcom: sm8350: Fix DMA0 address MIME-Version: 1.0 Message-Id: <20231016-nia-sm8350-for-upstream-v1-2-bb557a0af2e9@igalia.com> References: <20231016-nia-sm8350-for-upstream-v1-0-bb557a0af2e9@igalia.com> In-Reply-To: <20231016-nia-sm8350-for-upstream-v1-0-bb557a0af2e9@igalia.com> To: Andy Gross , Bjorn Andersson , Konrad Dybcio , Jonathan Cameron , Lars-Peter Clausen , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Kees Cook , Tony Luck , "Guilherme G. Piccoli" Cc: linux-arm-msm@vger.kernel.org, linux-iio@vger.kernel.org, devicetree@vger.kernel.org, phone-devel@vger.kernel.org, Rob , Clayton Craft , ~postmarketos/upstreaming@lists.sr.ht, Nia Espera X-Mailer: b4 0.12.3 X-Developer-Signature: v=1; a=openpgp-sha256; l=936; i=nespera@igalia.com; h=from:subject:message-id; bh=O+vro6lsVyRiJ+WlZZyMlPQe73DrzOBSb3On81V2liY=; b=owEB7QES/pANAwAIAfIkzsI3VuKtAcsmYgBlLTDMSGrz73g92XkqVSA+Ad8jmZbiHJWW8CFj7 T1zAoQpSWKJAbMEAAEIAB0WIQSBPDomug3slDJEnubyJM7CN1birQUCZS0wzAAKCRDyJM7CN1bi ra4bC/0fDuE3KWZz7p2965vVdmO/CYW8wqxushzXsmw6tbydZqRdN8tLYrsx9/gkLGkmBtAMy67 ZGczzIz0jro9hSkdglJOFdmzRJAA2yluhZjAOfkdFhuxFWAdGxHpHC9r161POz/YTmtWRoL5C40 6gvD7e5jwOhQ13wqdwqNwY/nGYW6bvJvhMSthP+iZfvy//Q2x/emxFRtAu+yLlwFliP8G1m28uM 5aLznT0EPBIu3rtdAzT+DklG3cQVoDpdPINyb3C7DT/m5ekKe9SHKX8kY6OOhBDJDydgJHuxA+v Umo/VMLns2fAUpExIM4USIlYxNW1X1Z0klTbglvOuGwlPek77rpgc81rLKG+qHsJEakeJOWUTza JSJaCUTQwGjtFcAyJGB8uaBXNMFYu7wZndNX6ctGy2FjywQBV2Z8N8V7/qVXBxaGyR6XuCzwMph Ld6lhFEGVIgC2Idqx8njL5HsSevfGAbSndCvIAELdXeHXKa+d/7sLBe9Yp6RTjsysm4Iw= X-Developer-Key: i=nespera@igalia.com; a=openpgp; fpr=813C3A26BA0DEC9432449EE6F224CEC23756E2AD Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org DMA0 node downstream is specified at 0x900000, so fix the typo. Without this, enabling any i2c node using DMA0 causes a hang. Signed-off-by: Nia Espera Reviewed-by: Konrad Dybcio --- arch/arm64/boot/dts/qcom/sm8350.dtsi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/arm64/boot/dts/qcom/sm8350.dtsi b/arch/arm64/boot/dts/qcom/sm8350.dtsi index 00604bf7724f..6d12066389fa 100644 --- a/arch/arm64/boot/dts/qcom/sm8350.dtsi +++ b/arch/arm64/boot/dts/qcom/sm8350.dtsi @@ -918,9 +918,9 @@ spi19: spi@894000 { }; }; - gpi_dma0: dma-controller@9800000 { + gpi_dma0: dma-controller@900000 { compatible = "qcom,sm8350-gpi-dma", "qcom,sm6350-gpi-dma"; - reg = <0 0x09800000 0 0x60000>; + reg = <0 0x00900000 0 0x60000>; interrupts = , , , From patchwork Mon Oct 16 12:47:03 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nia Espera X-Patchwork-Id: 13423187 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 81718CDB488 for ; Mon, 16 Oct 2023 12:47:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233552AbjJPMrU (ORCPT ); Mon, 16 Oct 2023 08:47:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34592 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233477AbjJPMrR (ORCPT ); Mon, 16 Oct 2023 08:47:17 -0400 Received: from fanzine2.igalia.com (fanzine.igalia.com [178.60.130.6]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5AB77F1; Mon, 16 Oct 2023 05:47:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=igalia.com; s=20170329; h=Cc:To:In-Reply-To:References:Message-Id: Content-Transfer-Encoding:Content-Type:MIME-Version:Subject:Date:From:Sender: Reply-To: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=aSw/SitkCdghTwzNFGWOAeZtBD5jT+hGocMeTU5ypa8=; b=HIM79nsm3NMawH9LAl7a/gxsf7 m5DkG5QU2h2Br9Md060uHeeQK7Mo/gzmoJUkEVv7ZudtbxeqVFHbUZNzN59fYaCwXpCL8/nF3kvf6 5yIhx2zX0JttueZeGYcAKVMTVkTrqujpvgvHF6NbaoUUmbvVcgK2/kteZUHZsUnsAY0YiaPac3J4Q qZllcbIzyWONuJPKXt3DWXPvGXL35Mj++CpMzjr+SY4W0ZtheDcyEBzAR6x+HmFJQKcUFUvaVPziS +5ZI5JzLHeTDTzAhjIR8ZXrOd/E5ZeyG1GqzL6WOzyN7My6/EeTEAPXwE8zq9xDUlSPn/+q5X7Crt KX1DaqJg==; Received: from re-byods-146-50-198-227.wireless.uva.nl ([146.50.198.227]) by fanzine2.igalia.com with esmtpsa (Cipher TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim) id 1qsN03-0013kp-Tt; Mon, 16 Oct 2023 14:47:11 +0200 From: Nia Espera Date: Mon, 16 Oct 2023 14:47:03 +0200 Subject: [PATCH 3/5] arm64: dts: qcom: pm8350k: remove hanging whitespace MIME-Version: 1.0 Message-Id: <20231016-nia-sm8350-for-upstream-v1-3-bb557a0af2e9@igalia.com> References: <20231016-nia-sm8350-for-upstream-v1-0-bb557a0af2e9@igalia.com> In-Reply-To: <20231016-nia-sm8350-for-upstream-v1-0-bb557a0af2e9@igalia.com> To: Andy Gross , Bjorn Andersson , Konrad Dybcio , Jonathan Cameron , Lars-Peter Clausen , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Kees Cook , Tony Luck , "Guilherme G. Piccoli" Cc: linux-arm-msm@vger.kernel.org, linux-iio@vger.kernel.org, devicetree@vger.kernel.org, phone-devel@vger.kernel.org, Rob , Clayton Craft , ~postmarketos/upstreaming@lists.sr.ht, Nia Espera X-Mailer: b4 0.12.3 X-Developer-Signature: v=1; a=openpgp-sha256; l=627; i=nespera@igalia.com; h=from:subject:message-id; bh=eL/xbH1y2VfLlWI0VS2+3fBxKQWeWtx0gu6ZMciNzu0=; b=owEB7QES/pANAwAIAfIkzsI3VuKtAcsmYgBlLTDM9Qvo5Dz5VAgsxXtZNrsqRkuHh6vIY96MZ CpUy7M5k/KJAbMEAAEIAB0WIQSBPDomug3slDJEnubyJM7CN1birQUCZS0wzAAKCRDyJM7CN1bi rZKNC/4yPqov6mprRsUKbWrS48z3NkIhHI3+y7O5xRFbI3urq9MesZYff6vi5f5JRAvRLuKCdwd 8HWnO+BMrnBAqxMLmPUH6IbWI3p+oK5kJUzVafcdY7Ze8iV/v/+F83ufSGfCHwaJdws+JRWzT85 zZ8IzvXAY536A5E+lllr2DGFVvZl1o1+yW4UevFG0VACUdnzB3RMR2ZRcR5F2AeGy9hvlP7ojLX 67FBuLRTsBjqwjYte/R8jKes6Tgk/48ZMgUnAS4uyPB+Ildv204axmcqco5vM0mzCCzRIlD/7Xb Ih3Z4tll7WHjm/iV9YNcjC57xwjGaoSHwzUmH00rNhpMw6t9+cShqiTJ+IuPZ+fkVGnQ/64/Zbk rAHwscBJoJHMttmdGhd8JOVAnOOInv3SCEX2B6PHncwm+x1HaVW443+tPjLyPB+cxQFeZNpsNYX uSy+ZXIFYXvi+LFGxXcZY1WM4KARbbmnJYT1TLgGbEhEs98c1b/m+wDA1jQkpsXDZJlA4= X-Developer-Key: i=nespera@igalia.com; a=openpgp; fpr=813C3A26BA0DEC9432449EE6F224CEC23756E2AD Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org pmk8350 has a random tab character inserted, so remove it. Signed-off-by: Nia Espera Reviewed-by: Konrad Dybcio --- arch/arm64/boot/dts/qcom/pmk8350.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm64/boot/dts/qcom/pmk8350.dtsi b/arch/arm64/boot/dts/qcom/pmk8350.dtsi index 1eb74017062d..f0ed15458dd7 100644 --- a/arch/arm64/boot/dts/qcom/pmk8350.dtsi +++ b/arch/arm64/boot/dts/qcom/pmk8350.dtsi @@ -22,7 +22,7 @@ reboot-mode { mode-bootloader = <0x02>; }; }; - + &spmi_bus { pmk8350: pmic@PMK8350_SID { compatible = "qcom,pmk8350", "qcom,spmi-pmic"; From patchwork Mon Oct 16 12:47:04 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nia Espera X-Patchwork-Id: 13423188 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0884ACDB48A for ; Mon, 16 Oct 2023 12:47:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233581AbjJPMrV (ORCPT ); Mon, 16 Oct 2023 08:47:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34614 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233499AbjJPMrS (ORCPT ); Mon, 16 Oct 2023 08:47:18 -0400 Received: from fanzine2.igalia.com (fanzine.igalia.com [178.60.130.6]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EF985AB; Mon, 16 Oct 2023 05:47:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=igalia.com; s=20170329; h=Cc:To:In-Reply-To:References:Message-Id: Content-Transfer-Encoding:Content-Type:MIME-Version:Subject:Date:From:Sender: Reply-To: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=efNuveP4VSQprhkHQkpwOHrplziHFsZy17voswzgGok=; b=oA1Gxot/Wn84Xqdp2axfR3lh8/ qxIRkM6hdqp4MOTXpd2xJ0hbH5RtgijelO/9/8mazQmFqhqE8l2NJVuPcgLuLEJiULGzzcLPda/7G HVErL+6+Wts7qAv7jAeErAxt+NetFEN2L3CyNno2SwH/j1OdgpQZrDk77LqIPtWPNkTNhK3wETItz e1PC3U9XKRHZ6zW2gYKH03iRUbHzZlAzToMoQ2jNhApsNNh1U04IKUyC8bGk854VfxjyvamGj1veN c/KSXDKkwCW3fJSNXge7B3qDASi0JKR1oQrq2Z1Ckk317iCpR2gOuc9St0y9qzvUm3VGh8ftQAcla L/A6iTwg==; Received: from re-byods-146-50-198-227.wireless.uva.nl ([146.50.198.227]) by fanzine2.igalia.com with esmtpsa (Cipher TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim) id 1qsN04-0013kp-OF; Mon, 16 Oct 2023 14:47:12 +0200 From: Nia Espera Date: Mon, 16 Oct 2023 14:47:04 +0200 Subject: [PATCH 4/5] arm64: dts: qcom: sm8350: Fix remoteproc interrupt type MIME-Version: 1.0 Message-Id: <20231016-nia-sm8350-for-upstream-v1-4-bb557a0af2e9@igalia.com> References: <20231016-nia-sm8350-for-upstream-v1-0-bb557a0af2e9@igalia.com> In-Reply-To: <20231016-nia-sm8350-for-upstream-v1-0-bb557a0af2e9@igalia.com> To: Andy Gross , Bjorn Andersson , Konrad Dybcio , Jonathan Cameron , Lars-Peter Clausen , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Kees Cook , Tony Luck , "Guilherme G. Piccoli" Cc: linux-arm-msm@vger.kernel.org, linux-iio@vger.kernel.org, devicetree@vger.kernel.org, phone-devel@vger.kernel.org, Rob , Clayton Craft , ~postmarketos/upstreaming@lists.sr.ht, Nia Espera X-Mailer: b4 0.12.3 X-Developer-Signature: v=1; a=openpgp-sha256; l=2332; i=nespera@igalia.com; h=from:subject:message-id; bh=2PFXMWXBlmj0rQF2r2HKHb1q9m6vmsAuphNOSZ7iliw=; b=owEB7QES/pANAwAIAfIkzsI3VuKtAcsmYgBlLTDMr64l6MLHf5aiEWMAqZ9PXu3oPY0It062a QarwAUm+0WJAbMEAAEIAB0WIQSBPDomug3slDJEnubyJM7CN1birQUCZS0wzAAKCRDyJM7CN1bi rQcADACUCuXjFvLkvcXmHWlMIDsPJXEArIW9tmbRnIINcMWbeHSMRRotF+IDgh1bgcHZVsU9IVh 1K91K+MstHUrWOFoZ8LRuL9rQXXtNucCSnxlJ8sdiB9n+TR8GGV7czb4XRqQZW4a8Yp22KgT8Bx WuPYegzBobnXzoeQR9sK34BVNSrQYhyHtr+rRi0pCVSnyD77OjuKyHG4HbYW2v2KUWaVh5XEf4C GLsLw/E/qZjRRvzK8Q+KJoEGQqH5a04dzVmXb+5OLINSu+s1Y3boOkaNcw9QtKaboioQCPepwse mjFZEi9FkPZc2Iy0gyzzHI2qyKQs+3FpX419Gwv8IuPP8omVGRMPC2UgFE7OtcUXgz5af5qj2y+ x0HUve6qtz+dbjCpxrq1bqQlNnrnTEqGtffkd1WfFet9V16krCijS1jixLR1p7ddq4mfO0Fs4pl /u52SMW7udGeAypNSCaZuZCoKM/IJUMaR7jW5bnBUVXMWu50Ve0gXXMlTC9y8e3teHXgo= X-Developer-Key: i=nespera@igalia.com; a=openpgp; fpr=813C3A26BA0DEC9432449EE6F224CEC23756E2AD Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org In a similar vein to https://lore.kernel.org/lkml/20220530080842.37024-3-manivannan.sadhasivam@linaro.org/, the remote processors on sm8350 fail to initialize with the 'correct' (i.e., specified in downstream) IRQ type. Change this to EDGE_RISING. Signed-off-by: Nia Espera --- arch/arm64/boot/dts/qcom/sm8350.dtsi | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/arch/arm64/boot/dts/qcom/sm8350.dtsi b/arch/arm64/boot/dts/qcom/sm8350.dtsi index 6d12066389fa..7d5ea338a870 100644 --- a/arch/arm64/boot/dts/qcom/sm8350.dtsi +++ b/arch/arm64/boot/dts/qcom/sm8350.dtsi @@ -2020,7 +2020,7 @@ mpss: remoteproc@4080000 { compatible = "qcom,sm8350-mpss-pas"; reg = <0x0 0x04080000 0x0 0x4040>; - interrupts-extended = <&intc GIC_SPI 264 IRQ_TYPE_LEVEL_HIGH>, + interrupts-extended = <&intc GIC_SPI 264 IRQ_TYPE_EDGE_RISING>, <&smp2p_modem_in 0 IRQ_TYPE_EDGE_RISING>, <&smp2p_modem_in 1 IRQ_TYPE_EDGE_RISING>, <&smp2p_modem_in 2 IRQ_TYPE_EDGE_RISING>, @@ -2062,7 +2062,7 @@ slpi: remoteproc@5c00000 { compatible = "qcom,sm8350-slpi-pas"; reg = <0 0x05c00000 0 0x4000>; - interrupts-extended = <&pdc 9 IRQ_TYPE_LEVEL_HIGH>, + interrupts-extended = <&pdc 9 IRQ_TYPE_EDGE_RISING>, <&smp2p_slpi_in 0 IRQ_TYPE_EDGE_RISING>, <&smp2p_slpi_in 1 IRQ_TYPE_EDGE_RISING>, <&smp2p_slpi_in 2 IRQ_TYPE_EDGE_RISING>, @@ -3206,7 +3206,7 @@ adsp: remoteproc@17300000 { compatible = "qcom,sm8350-adsp-pas"; reg = <0 0x17300000 0 0x100>; - interrupts-extended = <&pdc 6 IRQ_TYPE_LEVEL_HIGH>, + interrupts-extended = <&pdc 6 IRQ_TYPE_EDGE_RISING>, <&smp2p_adsp_in 0 IRQ_TYPE_EDGE_RISING>, <&smp2p_adsp_in 1 IRQ_TYPE_EDGE_RISING>, <&smp2p_adsp_in 2 IRQ_TYPE_EDGE_RISING>, @@ -3511,7 +3511,7 @@ cdsp: remoteproc@98900000 { compatible = "qcom,sm8350-cdsp-pas"; reg = <0 0x98900000 0 0x1400000>; - interrupts-extended = <&intc GIC_SPI 578 IRQ_TYPE_LEVEL_HIGH>, + interrupts-extended = <&intc GIC_SPI 578 IRQ_TYPE_EDGE_RISING>, <&smp2p_cdsp_in 0 IRQ_TYPE_EDGE_RISING>, <&smp2p_cdsp_in 1 IRQ_TYPE_EDGE_RISING>, <&smp2p_cdsp_in 2 IRQ_TYPE_EDGE_RISING>, From patchwork Mon Oct 16 12:47:05 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nia Espera X-Patchwork-Id: 13423189 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id CF42CCDB48D for ; Mon, 16 Oct 2023 12:47:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233550AbjJPMrW (ORCPT ); Mon, 16 Oct 2023 08:47:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34626 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233561AbjJPMrU (ORCPT ); Mon, 16 Oct 2023 08:47:20 -0400 Received: from fanzine2.igalia.com (fanzine.igalia.com [178.60.130.6]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D05CAF3; Mon, 16 Oct 2023 05:47:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=igalia.com; s=20170329; h=Cc:To:In-Reply-To:References:Message-Id: Content-Transfer-Encoding:Content-Type:MIME-Version:Subject:Date:From:Sender: Reply-To: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=uNaMEMMeS3hwnEtgSQH2W5VmbpUHWOBBS/W5zXcMXlg=; b=S6vPIlaI/3EhGSlMIdkpP/n3zL V1Faby1jlc1dKe8bQDT8fppL8qhVEvOqfTcVqwhyTRvUYevIJm8/3Syv/SmSjgW8KVPqaz1HmPKU7 Xo3ODi83VUX8pH26NSFZQNhrVgw00oyoI533+DgeXDQWcyQrQgmAdfJgURaVh6Jg7WPf4ycxk7xUt kuIH08FeNH+NtEC0ZYmaChPxa0WZLOVNp2gjNNzTTdatnyIyB63Xm3ptunxuj7adMGZ4jqCqr2oUQ Y2nEdHkOtYF7PpoWnpTlGYXfqfC3uPHYXVwvsUvrW6kIYHoAxjI0crvbJgmIuNkzRWrrUJ5uY/iDS xttSjlAg==; Received: from re-byods-146-50-198-227.wireless.uva.nl ([146.50.198.227]) by fanzine2.igalia.com with esmtpsa (Cipher TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim) id 1qsN05-0013kp-IJ; Mon, 16 Oct 2023 14:47:13 +0200 From: Nia Espera Date: Mon, 16 Oct 2023 14:47:05 +0200 Subject: [PATCH 5/5] arm64: dts: qcom: sm8350-lemonade(p): new devices MIME-Version: 1.0 Message-Id: <20231016-nia-sm8350-for-upstream-v1-5-bb557a0af2e9@igalia.com> References: <20231016-nia-sm8350-for-upstream-v1-0-bb557a0af2e9@igalia.com> In-Reply-To: <20231016-nia-sm8350-for-upstream-v1-0-bb557a0af2e9@igalia.com> To: Andy Gross , Bjorn Andersson , Konrad Dybcio , Jonathan Cameron , Lars-Peter Clausen , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Kees Cook , Tony Luck , "Guilherme G. Piccoli" Cc: linux-arm-msm@vger.kernel.org, linux-iio@vger.kernel.org, devicetree@vger.kernel.org, phone-devel@vger.kernel.org, Rob , Clayton Craft , ~postmarketos/upstreaming@lists.sr.ht, Nia Espera X-Mailer: b4 0.12.3 X-Developer-Signature: v=1; a=openpgp-sha256; l=33233; i=nespera@igalia.com; h=from:subject:message-id; bh=Xp2/d9RAagCkIPpkyMVx8AG/xze0w4xMb86cuC8ohbQ=; b=owEB7QES/pANAwAIAfIkzsI3VuKtAcsmYgBlLTDMIdk52AsZyTBk/BsBiwQJalhmzu2QwwZOJ EzUXwwbsnOJAbMEAAEIAB0WIQSBPDomug3slDJEnubyJM7CN1birQUCZS0wzAAKCRDyJM7CN1bi rTCnC/9rlhYzQ28JBYgxzJzGWFnXeC7A5VsOAAAyRVva4FnsGxuRkvRvW3cjohHLk/sfcXG1BBY DDK81NnFmAMpNT1tIKvpKiMun3YHX59hHE+P35+bf7+WylO7UOnvhuMUrugJIp6xIR4WvbbuR/g H1OOSWRTKf+XjjwOC9hBTsxoxRJpWhfYKZcWCtp69BlE1GawLFq99evvajbOSKX6kKJkARv/Imc 43e96yFfhi0XsExazcHHQQ3aZh/a8vyzMGWcK2CmyVj9n6Fz9qjMK2c7AEgrDMGClmn9hjpbz6s 1Xo8uANOqpcsHZTONgjQ1aMOjPmmpw816ZLzbew56CzeayD8Ia62mTMSzHZq3s6MKmW9kUabF1P 3U0IYexAoK0jCaYJJPlyfFRGM7fE2OOhVy0npcecmXPpmtQcV3HSvrsOToOmPbdpdLCVk23Wvlo covwYpvqI7FZqfpxrQOp6kpp9gQ5MNvT2E8EEvbDDAYdoGvVyRf0KYD22Y70GNwqkpEpM= X-Developer-Key: i=nespera@igalia.com; a=openpgp; fpr=813C3A26BA0DEC9432449EE6F224CEC23756E2AD Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Device tree files for OnePlus 9 and 9 Pro. Details of supported features mentioned in the cover letter for this patch series, but for accessibility also repeated here: - USB OTG - UFS - Framebuffer display - Touchscreen (for lemonade) - Power & volume down keys - Battery reading - Modem, IPA, and remoteproc bringup Steps to get booting: - Wipe dtbo partition - Flash vbmeta with disabled verity bit - Flash kernel and initfs to boot partition with CLI args pd_ignore_unused and clk_ignore_unused - Flash rootfs to some other partition (probably super or userdata) Signed-off-by: Nia Espera Reviewed-by: Caleb Connolly --- arch/arm64/boot/dts/qcom/Makefile | 2 + .../arm64/boot/dts/qcom/sm8350-oneplus-common.dtsi | 1247 ++++++++++++++++++++ .../boot/dts/qcom/sm8350-oneplus-lemonade.dts | 82 ++ .../boot/dts/qcom/sm8350-oneplus-lemonadep.dts | 37 + 4 files changed, 1368 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/Makefile b/arch/arm64/boot/dts/qcom/Makefile index 2cca20563a1d..369ad4721b29 100644 --- a/arch/arm64/boot/dts/qcom/Makefile +++ b/arch/arm64/boot/dts/qcom/Makefile @@ -211,6 +211,8 @@ dtb-$(CONFIG_ARCH_QCOM) += sm8250-xiaomi-elish-csot.dtb dtb-$(CONFIG_ARCH_QCOM) += sm8350-hdk.dtb dtb-$(CONFIG_ARCH_QCOM) += sm8350-microsoft-surface-duo2.dtb dtb-$(CONFIG_ARCH_QCOM) += sm8350-mtp.dtb +dtb-$(CONFIG_ARCH_QCOM) += sm8350-oneplus-lemonade.dtb +dtb-$(CONFIG_ARCH_QCOM) += sm8350-oneplus-lemonadep.dtb dtb-$(CONFIG_ARCH_QCOM) += sm8350-sony-xperia-sagami-pdx214.dtb dtb-$(CONFIG_ARCH_QCOM) += sm8350-sony-xperia-sagami-pdx215.dtb dtb-$(CONFIG_ARCH_QCOM) += sm8450-hdk.dtb diff --git a/arch/arm64/boot/dts/qcom/sm8350-oneplus-common.dtsi b/arch/arm64/boot/dts/qcom/sm8350-oneplus-common.dtsi new file mode 100644 index 000000000000..2f6768f35259 --- /dev/null +++ b/arch/arm64/boot/dts/qcom/sm8350-oneplus-common.dtsi @@ -0,0 +1,1247 @@ +// SPDX-License-Identifier: BSD-3-Clause +/* + * Copyright (c) 2023 Caleb Connolly + * + * Copyright (c) 2023 Igalia S.L. + * Authors: + * Nia Espera + */ + +#include +#include +#define SMB139x_1_SID 0x0b +#define SMB139x_2_SID 0x0c +#include +#include +#include +#include "sm8350.dtsi" +#include "pm8350.dtsi" +#include "pm8350b.dtsi" +#include "pm8350c.dtsi" +#include "pmk8350.dtsi" +#include "pmr735a.dtsi" +#include "pmr735b.dtsi" + +/ { + /* As with the Sony devices, msm-id and board-id aren't needed here */ + chassis-type = "handset"; + interrupt-parent = <&intc>; + + chosen { + #address-cells = <2>; + #size-cells = <2>; + ranges; + + framebuffer: framebuffer@e4d00000 { + compatible = "simple-framebuffer"; + reg = <0 0xe4d00000 0 0x2400000>; + width = <1080>; + height = <2412>; + stride = <(1080 * 4)>; + format = "a8r8g8b8"; + /* + * That's (going to be) a lot of clocks, but it's + * necessary due to unused clk cleanup & no panel + * driver yet. + */ + clocks = <&gcc GCC_DISP_HF_AXI_CLK>, + <&gcc GCC_DISP_SF_AXI_CLK>; + }; + }; + + gpio-keys { + compatible = "gpio-keys"; + + pinctrl-names = "default"; + pinctrl-0 = <&vol_down_n>; + + key-vol-up { + label = "Volume Up"; + linux,code = ; + gpios = <&pmk8350_gpios 6 GPIO_ACTIVE_LOW>; + debounce-interval = <15>; + linux,can-disable; + wakeup-source; + }; + }; + + bat: battery { + compatible = "simple-battery"; + device-chemistry = "lithium-ion"; + voltage-min-design-microvolt = <3200000>; + energy-full-design-microwatt-hours = <15840000>; + charge-full-design-microamp-hours = <2225000>; + }; + + vph_pwr: vph-pwr-regulator { + compatible = "regulator-fixed"; + regulator-name = "vph_pwr"; + regulator-min-microvolt = <3700000>; + regulator-max-microvolt = <3700000>; + + regulator-always-on; + regulator-boot-on; + }; + + display_panel_avdd: display_regulator@1 { + compatible = "regulator-fixed"; + regulator-name = "display_panel_avdd"; + regulator-min-microvolt = <5500000>; + regulator-max-microvolt = <5500000>; + regulator-enable-ramp-delay = <233>; + + enable-active-high; + regulator-boot-on; + }; + + /* + * Hack; OP9 bootloader specifically checks that the timer node has + * this label. + */ + arch_timer: timer {}; +}; + +&reserved_memory { + /* EFI splash screen */ + memory@e1000000 { + reg = <0 0xe4d00000 0 0x02400000>; + no-map; + label = "cont_splash_region"; + }; + + ramoops: ramoops@E9700000 { + compatible = "ramoops"; + reg = <0 0xe9700000 0 0x05b8000>; + record-size = <0x40000>; + console-size = <0x40000>; + ftrace-size = <0x200000>; + pmsg-size = <0x200000>; + devinfo-size = <0x08000>; + dumpinfo-size = <0x08000>; + rsv01info-size= <0x08000>; + rsv02info-size= <0x08000>; + rsv03info-size= <0x08000>; + rsv04info-size= <0x08000>; + rsv05info-size= <0x08000>; + ecc-size= <0x0>; + }; + + /* bootloader log buffer */ + memory@9fff7000 { + reg = <0x00 0x9fff7000 0x00 0x8000>; + }; + + /* unknown; "param_mem" downstream */ + memory@ea700000 { + reg = <0x00 0xea700000 0x00 0x800000>; + }; +}; + +&apps_rsc { + regulators-0 { + compatible = "qcom,pm8350-rpmh-regulators"; + qcom,pmic-id = "b"; + + vdd-s1-supply = <&vph_pwr>; + vdd-s2-supply = <&vph_pwr>; + vdd-s3-supply = <&vph_pwr>; + vdd-s4-supply = <&vph_pwr>; + vdd-s5-supply = <&vph_pwr>; + vdd-s6-supply = <&vph_pwr>; + vdd-s7-supply = <&vph_pwr>; + vdd-s8-supply = <&vph_pwr>; + vdd-s9-supply = <&vph_pwr>; + vdd-s10-supply = <&vph_pwr>; + vdd-s11-supply = <&vph_pwr>; + vdd-s12-supply = <&vph_pwr>; + + vdd-l1-l4-supply = <&pm8350_s11>; + vdd-l2-l7-supply = <&vreg_bob>; + vdd-l3-l5-supply = <&vreg_bob>; + vdd-l6-l9-l10-supply = <&pm8350_s11>; + vdd-l8-supply = <&pmr735a_s2>; + + /* + * ARC regulators: + * S5 - mx.lvl + * S6 - gfx.lvl + * S9 - mxc.lvl + */ + + pm8350_s10: smps10 { + regulator-name = "pm8350_s10"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + regulator-initial-mode = ; + }; + + pm8350_s11: smps11 { + regulator-name = "pm8350_s11"; + regulator-min-microvolt = <752000>; + regulator-max-microvolt = <1012000>; + regulator-initial-mode = ; + }; + + pm8350_s12: smps12 { + regulator-name = "pm8350_s12"; + regulator-min-microvolt = <1224000>; + regulator-max-microvolt = <1360000>; + regulator-initial-mode = ; + }; + + pm8350_l1: ldo1 { + regulator-name = "pm8350_l1"; + regulator-min-microvolt = <912000>; + regulator-max-microvolt = <920000>; + regulator-initial-mode = ; + }; + + pm8350_l2: ldo2 { + regulator-name = "pm8350_l2"; + regulator-min-microvolt = <3072000>; + regulator-max-microvolt = <3072000>; + regulator-initial-mode = ; + }; + + pm8350_l3: ldo3 { + regulator-name = "pm8350_l3"; + regulator-min-microvolt = <904000>; + regulator-max-microvolt = <904000>; + regulator-initial-mode = ; + }; + + /* L4 - lmx.lvl (ARC) */ + + pm8350_l5: ldo5 { + regulator-name = "pm8350_l5"; + regulator-min-microvolt = <880000>; + regulator-max-microvolt = <888000>; + regulator-initial-mode = ; + regulator-allow-set-load; + regulator-allowed-modes = ; + }; + + pm8350_l6: ldo6 { + regulator-name = "pm8350_l6"; + regulator-min-microvolt = <1200000>; + regulator-max-microvolt = <1208000>; + regulator-initial-mode = ; + regulator-allow-set-load; + regulator-allowed-modes = ; + }; + + pm8350_l7: ldo7 { + regulator-name = "pm8350_l7"; + regulator-min-microvolt = <2400000>; + regulator-max-microvolt = <3008000>; + regulator-initial-mode = ; + regulator-allow-set-load; + regulator-allowed-modes = ; + }; + + /* L8 - lcx.lvl (ARC) */ + + pm8350_l9: ldo9 { + regulator-name = "pm8350_l9"; + regulator-min-microvolt = <1200000>; + regulator-max-microvolt = <1200000>; + regulator-initial-mode = ; + regulator-allow-set-load; + regulator-allowed-modes = ; + }; + }; + + regulators-1 { + compatible = "qcom,pm8350c-rpmh-regulators"; + qcom,pmic-id = "c"; + + vdd-s1-supply = <&vph_pwr>; + vdd-s2-supply = <&vph_pwr>; + vdd-s3-supply = <&vph_pwr>; + vdd-s4-supply = <&vph_pwr>; + vdd-s5-supply = <&vph_pwr>; + vdd-s6-supply = <&vph_pwr>; + vdd-s7-supply = <&vph_pwr>; + vdd-s8-supply = <&vph_pwr>; + vdd-s9-supply = <&vph_pwr>; + vdd-s10-supply = <&vph_pwr>; + + vdd-l1-l12-supply = <&pm8350c_s1>; + vdd-l2-l8-supply = <&pm8350c_s1>; + vdd-l3-l4-l5-l7-l13-supply = <&vreg_bob>; + vdd-l6-l9-l11-supply = <&vreg_bob>; + vdd-l10-supply = <&pm8350_s12>; + + vdd-bob-supply = <&vph_pwr>; + + pm8350c_s1: smps1 { + regulator-name = "pm8350c_s1"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1952000>; + regulator-initial-mode = ; + }; + + /* S2 - ebi.lvl (ARC) */ + + pm8350c_s3: smps3 { + regulator-name = "pm8350c_s3"; + regulator-min-microvolt = <300000>; + regulator-max-microvolt = <704000>; + regulator-initial-mode = ; + }; + + /* + * ARC regulators: + * S4 - mss.lvl + * S6 - cx.lvl + * S8 - mmcx.lvl + */ + + pm8350c_s10: smps10 { + regulator-name = "pm8350c_s10"; + regulator-min-microvolt = <1048000>; + regulator-max-microvolt = <1128000>; + regulator-initial-mode = ; + }; + + pm8350c_l1: ldo1 { + regulator-name = "pm8350c_l1"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + regulator-initial-mode = ; + }; + + pm8350c_l2: ldo2 { + regulator-name = "pm8350c_l2"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + regulator-initial-mode = ; + }; + + pm8350c_l3: ldo3 { + regulator-name = "pm8350c_l3"; + regulator-min-microvolt = <3000000>; + regulator-max-microvolt = <3300000>; + regulator-initial-mode = ; + }; + + pm8350c_l4: ldo4 { + regulator-name = "pm8350c_l4"; + regulator-min-microvolt = <1704000>; + regulator-max-microvolt = <3000000>; + regulator-initial-mode = ; + }; + + pm8350c_l5: ldo5 { + regulator-name = "pm8350c_l5"; + regulator-min-microvolt = <1704000>; + regulator-max-microvolt = <3000000>; + regulator-initial-mode = ; + }; + + pm8350c_l6: ldo6 { + regulator-name = "pm8350c_l6"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <2960000>; + regulator-initial-mode = ; + }; + + pm8350c_l7: ldo7 { + regulator-name = "pm8350c_l7"; + regulator-min-microvolt = <3008000>; + regulator-max-microvolt = <3008000>; + regulator-initial-mode = ; + }; + + pm8350c_l8: ldo8 { + regulator-name = "pm8350c_l8"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + regulator-initial-mode = ; + }; + + pm8350c_l9: ldo9 { + regulator-name = "pm8350c_l9"; + regulator-min-microvolt = <2800000>; + regulator-max-microvolt = <3008000>; + regulator-initial-mode = ; + }; + + pm8350c_l10: ldo10 { + regulator-name = "pm8350c_l10"; + regulator-min-microvolt = <1200000>; + regulator-max-microvolt = <1200000>; + regulator-initial-mode = ; + }; + + pm8350c_l11: ldo11 { + regulator-name = "pm8350c_l11"; + regulator-min-microvolt = <2400000>; + regulator-max-microvolt = <3008000>; + regulator-initial-mode = ; + }; + + pm8350c_l12: ldo12 { + regulator-name = "pm8350c_l12"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <2000000>; + regulator-initial-mode = ; + }; + + pm8350c_l13: ldo13 { + regulator-name = "pm8350c_l13"; + regulator-min-microvolt = <3000000>; + regulator-max-microvolt = <3200000>; + regulator-initial-mode = ; + }; + + vreg_bob: bob { + regulator-name = "vreg_bob"; + regulator-min-microvolt = <3400000>; + regulator-max-microvolt = <3960000>; + regulator-initial-mode = ; + }; + }; + + /* regulators-2 unused for now */ + + regulators-3 { + compatible = "qcom,pmr735a-rpmh-regulators"; + qcom,pmic-id = "e"; + + vdd-s1-supply = <&vph_pwr>; + vdd-s2-supply = <&vph_pwr>; + vdd-s3-supply = <&vph_pwr>; + + vdd-l1-l2-supply = <&pmr735a_s2>; + vdd-l3-supply = <&pmr735a_s1>; + vdd-l4-supply = <&pm8350c_s1>; + vdd-l5-l6-supply = <&pm8350c_s1>; + vdd-l7-bob-supply = <&vreg_bob>; + + pmr735a_s1: smps1 { + regulator-name = "pmr735a_s1"; + regulator-min-microvolt = <1200000>; + regulator-max-microvolt = <1280000>; + }; + + pmr735a_s2: smps2 { + regulator-name = "pmr735a_s2"; + regulator-min-microvolt = <500000>; + regulator-max-microvolt = <976000>; + }; + + pmr735a_s3: smps3 { + regulator-name = "pmr735a_s3"; + regulator-min-microvolt = <2208000>; + regulator-max-microvolt = <2352000>; + }; + + pmr735a_l1: ldo1 { + regulator-name = "pmr735a_l1"; + regulator-min-microvolt = <912000>; + regulator-max-microvolt = <912000>; + }; + + pmr735a_l2: ldo2 { + regulator-name = "pmr735a_l2"; + regulator-min-microvolt = <1200000>; + regulator-max-microvolt = <1200000>; + }; + + pmr735a_l3: ldo3 { + regulator-name = "pmr735a_l3"; + regulator-min-microvolt = <1200000>; + regulator-max-microvolt = <1200000>; + }; + + pmr735a_l4: ldo4 { + regulator-name = "pmr735a_l4"; + regulator-min-microvolt = <1776000>; + regulator-max-microvolt = <1872000>; + }; + + pmr735a_l5: ldo5 { + regulator-name = "pmr735a_l5"; + regulator-min-microvolt = <800000>; + regulator-max-microvolt = <800000>; + }; + + pmr735a_l6: ldo6 { + regulator-name = "pmr735a_l6"; + regulator-min-microvolt = <480000>; + regulator-max-microvolt = <904000>; + }; + + pmr735a_l7: ldo7 { + regulator-name = "pmr735a_l7"; + regulator-min-microvolt = <2800000>; + regulator-max-microvolt = <2800000>; + }; + }; +}; + +&adsp { + firmware-name = "qcom/OnePlus/lemonade/adsp.mbn"; + status = "okay"; +}; + +&cdsp { + firmware-name = "qcom/OnePlus/lemonade/cdsp.mbn"; + status = "okay"; +}; + +&slpi { + firmware-name = "qcom/OnePlus/lemonade/slpi.mbn"; + status = "okay"; +}; + +&ipa { + qcom,gsi-loader = "self"; + memory-region = <&pil_ipa_fw_mem>; + firmware-name = "qcom/OnePlus/lemonade/ipa_fws.mbn"; + status = "okay"; +}; + +&mpss { + firmware-name = "qcom/OnePlus/lemonade/modem.mbn", + "qcom/OnePlus/lemonade/mcfg_hw.mbn"; + + status = "okay"; +}; + +&i2c4 { + clock-frequency = <400000>; + status = "okay"; + + /* Touchscreens: Syna TCM oncell or Samsung s6sy761 */ +}; + +&i2c13 { + clock-frequency = <100000>; + status = "okay"; + + fsa4480@42 { + compatible = "fcs,fsa4480"; + reg = <0x42>; + mode-switch; + orientation-switch; + }; + + /* Qualcomm PM8008i/PM8008j (?) @ 8, 9, c, d */ +}; + +&i2c15 { + clock-frequency = <400000>; + status = "okay"; + + /* sn-nci NFC controller @ 28 */ +}; + +&pm8350_gpios { + usb2_vbus_boost_default: usb2_vbus_boost_default { + pins = "gpio8"; + function = "normal"; + output-low; + power-source = <0x00>; + phandle = <0x5e1>; + }; + + usb2_vbus_det_default: usb2_vbus_det_default { + pins = "gpio9"; + function = "normal"; + input-enable; + bias-disable; + power-source = <0x00>; + phandle = <0x5e0>; + }; + + gpio1_adc_default: gpio1-adc-default { + pins = "gpio1"; + function = "normal"; + bias-high-impedance; + bias-disable; + phandle = <0x566>; + }; + + gpio3_adc_default: gpio3-adc-default { + pins = "gpio3"; + function = "normal"; + bias-high-impedance; + bias-disable; + phandle = <0x567>; + }; +}; + +&pm8350b_gpios { + vol_down_n: vol-down-n-state { + pins = "gpio6"; + function = "normal"; + power-source = <1>; + bias-pull-up; + input-enable; + }; +}; + +&pmk8350_rtc { + status = "okay"; +}; + +&pmk8350_vadc { + pinctrl-0 = <&gpio1_adc_default &gpio1_adc_default>; + pinctrl-names = "default"; + + pmk8350_ref_gnd { + reg = <0x00>; + label = "pmk8350_ref_gnd"; + qcom,pre-scaling = <0x01 0x01>; + }; + + pmk8350_vref_1p25 { + reg = <0x01>; + label = "pmk8350_vref_1p25"; + qcom,pre-scaling = <0x01 0x01>; + }; + + pmk8350_die_temp { + reg = <0x03>; + label = "pmk8350_die_temp"; + qcom,pre-scaling = <0x01 0x01>; + }; + + pmk8350_xo_therm { + reg = <0x44>; + label = "pmk8350_xo_therm"; + qcom,ratiometric; + qcom,hw-settle-time = <0xc8>; + qcom,pre-scaling = <0x01 0x01>; + }; + + pm8350_ref_gnd { + reg = <0x100>; + label = "pm8350_ref_gnd"; + qcom,pre-scaling = <0x01 0x01>; + }; + + pm8350_vref_1p25 { + reg = <0x101>; + label = "pm8350_vref_1p25"; + qcom,pre-scaling = <0x01 0x01>; + }; + + pm8350_die_temp { + reg = <0x103>; + label = "pm8350_die_temp"; + qcom,pre-scaling = <0x01 0x01>; + }; + + pm8350_vph_pwr { + reg = <0x18e>; + label = "pm8350_vph_pwr"; + qcom,pre-scaling = <0x01 0x03>; + }; + + pm8350b_ref_gnd { + reg = <0x300>; + label = "pm8350b_ref_gnd"; + qcom,pre-scaling = <0x01 0x01>; + }; + + pm8350b_vref_1p25 { + reg = <0x301>; + label = "pm8350b_vref_1p25"; + qcom,pre-scaling = <0x01 0x01>; + }; + + pm8350b_die_temp { + reg = <0x303>; + label = "pm8350b_die_temp"; + qcom,pre-scaling = <0x01 0x01>; + }; + + pm8350b_vph_pwr { + reg = <0x38e>; + label = "pm8350b_vph_pwr"; + qcom,pre-scaling = <0x01 0x03>; + }; + + pm8350b_vbat_sns { + reg = <0x38f>; + label = "pm8350b_vbat_sns"; + qcom,pre-scaling = <0x01 0x03>; + }; + + pm8350_msm_therm { + reg = ; + label = "pm8350_msm_therm"; + qcom,ratiometric; + qcom,hw-settle-time = <200>; + qcom,pre-scaling = <1 1>; + }; + + pm8350_cam_flash_therm { + reg = ; + label = "pm8350_cam_flash_therm"; + qcom,ratiometric; + qcom,hw-settle-time = <200>; + qcom,pre-scaling = <1 1>; + }; + + pm8350_hot_pocket_therm { + reg = ; + label = "pm8350_hot_pocket_therm"; + qcom,ratiometric; + qcom,hw-settle-time = <200>; + qcom,pre-scaling = <1 1>; + }; + + pm8350_wide_rfc_therm { + reg = ; + label = "pm8350_wide_rfc_therm"; + qcom,ratiometric; + qcom,hw-settle-time = <200>; + qcom,pre-scaling = <1 1>; + }; + + pm8350_rear_tof_therm { + reg = ; + label = "pm8350_rear_tof_therm"; + qcom,ratiometric; + qcom,hw-settle-time = <200>; + qcom,pre-scaling = <1 1>; + }; + + pm8350b_usb_conn_therm { + reg = ; + label = "pm8350b_usb_conn_therm"; + qcom,ratiometric; + qcom,hw-settle-time = <200>; + qcom,pre-scaling = <1 1>; + }; + + pm8350b_wl_chg_therm { + reg = ; + label = "pm8350b_wl_chg_therm"; + qcom,ratiometric; + qcom,hw-settle-time = <200>; + qcom,pre-scaling = <1 1>; + }; + + pm8350b_chg_temp { + reg = ; + label = "pm8350b_chg_temp"; + qcom,pre-scaling = <1 1>; + }; + + pmr735a_ref_gnd { + reg = <0x400>; + label = "pmr735a_ref_gnd"; + qcom,pre-scaling = <0x01 0x01>; + }; + + pmr735a_vref_1p25 { + reg = <0x401>; + label = "pmr735a_vref_1p25"; + qcom,pre-scaling = <0x01 0x01>; + }; + + pmr735a_die_temp { + reg = <0x403>; + label = "pmr735a_die_temp"; + qcom,pre-scaling = <0x01 0x01>; + }; + + pmr735b_ref_gnd { + reg = <0x500>; + label = "pmr735b_ref_gnd"; + qcom,pre-scaling = <0x01 0x01>; + }; + + pmr735b_vref_1p25 { + reg = <0x501>; + label = "pmr735b_vref_1p25"; + qcom,pre-scaling = <0x01 0x01>; + }; + + pmr735b_die_temp { + reg = <0x503>; + label = "pmr735b_die_temp"; + qcom,pre-scaling = <0x01 0x01>; + }; + + smb139x_1_smb_temp { + reg = ; + label = "smb139x_1_smb_temp"; + qcom,pre-scaling = <1 1>; + }; + + smb139x_2_smb_temp { + reg = ; + label = "smb139x_2_smb_temp"; + qcom,pre-scaling = <1 1>; + }; + + gpio1_v { + reg = <0x128>; + label = "gpio1_v"; + qcom,ratiometric; + qcom,hw-settle-time = <0x2bc>; + qcom,pre-scaling = <0x01 0x01>; + }; + + gpio3_v { + reg = <0x12b>; + label = "gpio3_v"; + qcom,ratiometric; + qcom,hw-settle-time = <0x2bc>; + qcom,pre-scaling = <0x01 0x01>; + }; +}; + +&pmk8350_adc_tm { + status = "okay"; + + pm8350_msm_therm { + reg = <0x144>; + qcom,ratiometric; + qcom,hw-settle-time = <0xc8>; + }; + + pm8350_cam_flash_therm { + reg = <0x145>; + qcom,ratiometric; + qcom,hw-settle-time = <0xc8>; + }; + + pm8350_hot_pocket_therm { + reg = <0x146>; + qcom,ratiometric; + qcom,hw-settle-time = <0xc8>; + }; + + pm8350_wide_rfc_therm { + reg = <0x147>; + qcom,ratiometric; + qcom,hw-settle-time = <0xc8>; + }; + + pm8350_rear_tof_therm { + reg = <0x148>; + qcom,ratiometric; + qcom,hw-settle-time = <0xc8>; + }; + + pm8350b_usb_conn_therm { + reg = <0x347>; + qcom,ratiometric; + qcom,hw-settle-time = <0xc8>; + }; + + pm8350b_wl_chg_therm { + reg = <0x34b>; + qcom,ratiometric; + qcom,hw-settle-time = <0xc8>; + }; + + pmk8350_xo_therm { + reg = <0x44>; + qcom,ratiometric; + qcom,hw-settle-time = <0xc8>; + }; +}; + +&pon_pwrkey { + status = "okay"; +}; + +&pon_resin { + linux,code = ; + status = "okay"; +}; + +&qupv3_id_0 { + status = "okay"; +}; + +&qupv3_id_1 { + status = "okay"; +}; + +&qupv3_id_2 { + status = "okay"; +}; + +&gpi_dma0 { + status = "okay"; +}; + +&gpi_dma1 { + status = "okay"; +}; + +&gpi_dma2 { + status = "okay"; +}; + +&removed_mem { + reg = <0x0 0xd8800000 0x0 0x8e00000>; +}; + +&tlmm { + gpio-reserved-ranges = <52 8>; + + pcie0_default_state: pcie0-default-state { + perst-pins { + pins = "gpio94"; + function = "gpio"; + drive-strength = <2>; + bias-pull-down; + }; + + clkreq-pins { + pins = "gpio95"; + function = "pcie0_clkreqn"; + drive-strength = <2>; + bias-pull-up; + }; + + wake-pins { + pins = "gpio96"; + function = "gpio"; + drive-strength = <2>; + bias-pull-up; + }; + + sleep-pins { + pins = "gpio95"; + function = "gpio"; + drive-strength = <2>; + bias-pull-up; + }; + }; + + pcie1_default_state: pcie1-default-state { + perst-pins { + pins = "gpio97"; + function = "gpio"; + drive-strength = <2>; + bias-pull-down; + }; + + clkreq-pins { + pins = "gpio98"; + function = "pcie1_clkreqn"; + drive-strength = <2>; + bias-pull-up; + }; + + wake-pins { + pins = "gpio99"; + function = "gpio"; + drive-strength = <2>; + bias-pull-up; + /* wil6210_refclk_en_pin lives here also */ + }; + }; + + tp_rst_active: tp_rst_active { + pins = "gpio22"; + function = "gpio"; + drive-strength = <8>; + bias-pull-up; + }; + + /* tp_rst_suspend pin is different per device, don't specify here */ + + tp_irq_active: tp_irq_active { + pins = "gpio23"; + function = "gpio"; + drive-strength = <8>; + bias-disable; + input-enable; + }; + + tp_irq_suspend: tp_irq_suspend { + pins = "gpio23"; + function = "gpio"; + drive-strength = <2>; + bias-pull-down; + }; + + sde_dsi_active: sde-dsi-active { + pins = "gpio24"; + function = "gpio"; + drive-strength = <8>; + bias-disable = <0>; + }; + + sde_dsi_suspend: sde-dsi-suspend { + pins = "gpio24"; + function = "gpio"; + drive-strength = <2>; + bias-pull-down; + }; + + sde_te_active: sde-te-active { + pins = "gpio82"; + function = "mdp_vsync"; + drive-strength = <2>; + bias-pull-down; + }; + + sde_te_suspend: sde-te-suspend { + pins = "gpio82"; + function = "mdp_vsync"; + drive-strength = <2>; + bias-pull-down; + }; + + aw_irq: aw_irq { + pins = "gpio14"; + function = "gpio"; + drive-strength = <2>; + bias-pull-up; + }; + + aw_reset: aw_reset { + pins = "gpio75"; + function = "gpio"; + drive-strength = <2>; + bias-disable; + }; + + display_panel_avdd_default: display_panel_avdd_default { + pins = "gpio12"; + function = "gpio"; + drive-strength = <8>; + bias-disable = <0>; + output-high; + }; + + /* Modem-related pin common on both devices */ + rf_cable_ant0_active: rf_cable_ant0_active { + pins = "gpio165"; + function = "gpio"; + drive-strength = <2>; + bias-pull-up; + }; + + usb_int_default: usb_int_default { + pins = "gpio198"; + function = "gpio"; + drive-strength = <2>; + bias-pull-down; + input-enable; + }; + + qupv3_se18_default_cts: qupv3_se18_default_cts { + pins = "gpio68"; + function = "gpio"; + drive-strength = <2>; + bias-disable; + }; + + qupv3_se18_default_rtsrx: qupv3_se18_default_rtsrx { + pins = "gpio69", "gpio71"; + function = "gpio"; + drive-strength = <2>; + bias-pull-down; + }; + + qupv3_se18_default_tx: qupv3_se18_default_tx { + pins = "gpio70"; + function = "gpio"; + drive-strength = <2>; + bias-pull-up; + }; + + qupv3_se18_ctsrx: qupv3_se18_ctsrx { + pins = "gpio68", "gpio71"; + function = "qup18"; + drive-strength = <2>; + bias-disable; + }; + + qupv3_se18_rts: qupv3_se18_rts { + pins = "gpio69"; + function = "qup18"; + drive-strength = <2>; + bias-pull-down; + }; + + qupv3_se18_tx: qupv3_se18_tx { + pins = "gpio70"; + function = "qup18"; + drive-strength = <2>; + bias-pull-up; + }; + + usb3phy_portselect_default: usb3phy_portselect_default { + pins = "gpio81"; + function = "usb_phy"; + drive-strength = <2>; + bias-disable; + }; + + usb3phy_portselect_gpio: usb3phy_portselect_gpio { + pins = "gpio81"; + function = "gpio"; + drive-strength = <2>; + bias-disable; + }; + + ext1_otg_default: ext1_otg_default { + pins = "gpio8"; + function = "gpio"; + drive-strength = <16>; + bias-pull-down; + input-enable; + }; + + cnss_wlan_en_active: cnss_wlan_en_active { + pins = "gpio64"; + function = "gpio"; + drive-strength = <16>; + output-high; + bias-pull-up; + }; + + cnss_wlan_en_sleep: cnss_wlan_en_sleep { + pins = "gpio64"; + function = "gpio"; + drive-strength = <2>; + output-low; + bias-pull-down; + }; + + bt_en_sleep: bt_en_sleep { + pins = "gpio65"; + function = "gpio"; + drive-strength = <2>; + output-low; + bias-pull-down; + }; +}; + +&ufs_mem_hc { + reset-gpios = <&tlmm 203 GPIO_ACTIVE_LOW>; + + vcc-supply = <&pm8350_l7>; + vcc-voltage-level = <2504000 2950000>; + vcc-max-microamp = <800000>; + vccq-supply = <&pm8350_l9>; + vccq-max-microamp = <900000>; + + qcom,vddp-ref-clk-supply = <&pm8350_l9>; + qcom,vddp-ref-clk-max-microamp = <100>; + + qcom,vddp-ref-clk-supply = <&pm8350_s12>; + qcom,vccq-parent-max-microamp = <210000>; + + status = "okay"; +}; + +&ufs_mem_phy { + vdda-phy-supply = <&pm8350_l5>; + vdda-phy-always-on; + vdda-max-microamp = <91600>; + vdda-pll-supply = <&pm8350_l6>; + vdda-pll-max-microamp = <19000>; + + status = "okay"; +}; + +&usb_1 { + /* Bug in interconnect driver breaks USB */ + /delete-property/ interconnects; + /delete-property/ interconnect-names; + + /* + * USB3 is not tested (though it is enabled downstream) so limit to + * high-speed for now. + */ + qcom,select-utmi-as-pipe-clk; + + status = "okay"; +}; + +&usb_1_dwc3 { + /* Mode switching is untested */ + dr_mode = "peripheral"; + maximum-speed = "high-speed"; + phys = <&usb_1_hsphy>; + phy-names = "usb2-phy"; +}; + +&usb_1_hsphy { + vdda-pll-supply = <&pm8350_l5>; + vdda18-supply = <&pm8350c_l1>; + vdda33-supply = <&pm8350_l2>; + + status = "okay"; +}; + +/* Enabling this is necessary only for displayport */ +&usb_1_qmpphy { + vdda-phy-supply = <&pm8350_l6>; + vdda-pll-supply = <&pm8350_l1>; + + status = "okay"; +}; + +&i2c2 { + clock-frequency = <100000>; + status = "okay"; + + bq27541: fuel-gauge@55 { + compatible = "ti,bq27541"; + reg = <0x55>; + monitored-battery = <&bat>; + }; +}; +/* Crypto drivers currently fail & cause an XPU violation */ +&cryptobam { + status = "disabled"; +}; + +&crypto { + status = "disabled"; +}; + +&pcie0 { + pinctrl-names = "default"; + pinctrl-0 = <&pcie0_default_state>; + + perst-gpios = <&tlmm 94 GPIO_ACTIVE_HIGH>; + wake-gpios = <&tlmm 96 GPIO_ACTIVE_HIGH>; + + status = "okay"; +}; + +&pcie0_phy { + vdda-phy-supply = <&pm8350_l5>; + vdda-pll-supply = <&pm8350_l6>; + + status = "okay"; +}; + +&pcie1 { + pinctrl-names = "default"; + pinctrl-0 = <&pcie1_default_state>; + + perst-gpios = <&tlmm 97 GPIO_ACTIVE_HIGH>; + wake-gpios = <&tlmm 99 GPIO_ACTIVE_HIGH>; + + status = "okay"; +}; + +&pcie1_phy { + vdda-phy-supply = <&pm8350_l5>; + vdda-pll-supply = <&pm8350_l6>; + + status = "okay"; +}; diff --git a/arch/arm64/boot/dts/qcom/sm8350-oneplus-lemonade.dts b/arch/arm64/boot/dts/qcom/sm8350-oneplus-lemonade.dts new file mode 100644 index 000000000000..f2c27894f3c4 --- /dev/null +++ b/arch/arm64/boot/dts/qcom/sm8350-oneplus-lemonade.dts @@ -0,0 +1,82 @@ +// SPDX-License-Identifier: BSD-3-Clause +/* + * Copyright (c) 2023 Igalia S.L. + * Authors: + * Nia Espera + */ + +/dts-v1/; + +#include "sm8350-oneplus-common.dtsi" + +/ { + model = "OnePlus 9"; + compatible = "oneplus,lemonade", "qcom,sm8350"; +}; + +&i2c4 { + touchscreen@48 { + compatible = "samsung,s6sy761"; + reg = <0x48>; + interrupts-extended = <&tlmm 23 0x2008>; + + vdd-supply = <&pm8350c_l8>; + avdd-supply = <&pm8350c_l13>; + + pinctrl-names = "default", "sleep"; + pinctrl-0 = <&tp_rst_active &tp_irq_active>; + pinctrl-1 = <&tp_rst_suspend &tp_irq_suspend>; + }; +}; + +&tlmm { + tp_rst_suspend: tp_rst_suspend { + pins = "gpio22"; + function = "gpio"; + drive-strength = <2>; + bias-pull-down; + }; + + tp_enable_2v8: tp_enable_2v8 { + pins = "gpio74"; + function = "gpio"; + drive-strength = <8>; + bias-pull-up; + output-high; + }; + + /* Modem antenna pins exclusive to lemonade */ + rf_cable_ant1_active: rf_cable_ant1_active { + pins = "gpio27"; + function = "gpio"; + drive-strength = <2>; + bias-pull-up; + }; + rf_cable_ant2_active: rf_cable_ant2_active { + pins = "gpio92"; + function = "gpio"; + drive-strength = <2>; + bias-pull-up; + }; + rf_cable_ant3_active: rf_cable_ant3_active { + pins = "gpio44"; + function = "gpio"; + drive-strength = <2>; + bias-pull-up; + }; + rf_cable_ant7_active: rf_cable_ant7_active { + pins = "gpio155"; + function = "gpio"; + drive-strength = <2>; + bias-pull-up; + }; +}; + +&mpss { + pinctrl-names = "default"; + pinctrl-1 = <&rf_cable_ant0_active + &rf_cable_ant1_active + &rf_cable_ant2_active + &rf_cable_ant3_active + &rf_cable_ant7_active>; +}; diff --git a/arch/arm64/boot/dts/qcom/sm8350-oneplus-lemonadep.dts b/arch/arm64/boot/dts/qcom/sm8350-oneplus-lemonadep.dts new file mode 100644 index 000000000000..de8597d26091 --- /dev/null +++ b/arch/arm64/boot/dts/qcom/sm8350-oneplus-lemonadep.dts @@ -0,0 +1,37 @@ +// SPDX-License-Identifier: BSD-3-Clause +/* + * Copyright (c) 2023 Igalia S.L. + * Authors: + * Nia Espera + */ + +/dts-v1/; + +#include "sm8350-oneplus-common.dtsi" + +/ { + model = "OnePlus 9 Pro"; + compatible = "oneplus,lemonadep", "qcom,sm8350"; +}; + +&tlmm { + tp_rst_suspend: tp_rst_suspend { + pins = "gpio22"; + function = "gpio"; + drive-strength = <8>; + bias-pull-down; + }; + + tp_enable_2v8: tp_enable_2v8 { + pins = "gpio31"; + function = "gpio"; + drive-strength = <8>; + bias-pull-up; + output-high; + }; +}; + +&mpss { + pinctrl-names = "default"; + pinctrl-1 = <&rf_cable_ant0_active>; +};