From patchwork Tue Aug 1 11:22:30 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Lin, Meng-Bo" X-Patchwork-Id: 129228 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:918b:0:b0:3e4:2afc:c1 with SMTP id s11csp2611354vqg; Tue, 1 Aug 2023 04:51:10 -0700 (PDT) X-Google-Smtp-Source: APBJJlGTZ0+fM0AUAnsxEhcRPE4tjveoGwKHv5vlLvd0omOSuW0HL++2oKhLlPuHEvX7bBIbPI0Y X-Received: by 2002:a05:6402:180f:b0:522:30d5:6065 with SMTP id g15-20020a056402180f00b0052230d56065mr2370508edy.21.1690890670200; Tue, 01 Aug 2023 04:51:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690890670; cv=none; d=google.com; s=arc-20160816; b=HETyPJXnf0hkdyjMZh1bmjIjB/neqSuBDJO+1OTlyAs3NLfoFC099V3bs8Xt7Kssej uW0WkDRCh7A968gdJm0mxZivBPTcHUAOXNFtr7naWOy6PmqrHpBeCwncEcW/KyGmvUzO YAEWL81uc3gM5g1O4NK9hThZIIHrIrQO2q/bEkNXYqOZstipIhWOtY0jqaIkjG6JCGpo zrOAm0+lARbsHA4ga2wdBUcq/c0VTEScHV+JZvh1DhmnThn6LmNObui4cIrhVwQNQ1vL Wz81qQCWjygPlRtE+OyjUHUg6j+KdP9Vxu6VwPVkGdi36ksaEC/0JoxAbXz8L4SMj70D 5+Kw== 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 :feedback-id:references:in-reply-to:message-id:subject:cc:from:to :dkim-signature:date; bh=1f6zJycLuFoL5WQQ7MMLphiDimdCfGXgDIFs81dzGK8=; fh=MvBPGIPHPulC8Q1odG8LiYECIuv2LKYjDUHt1nt1gLY=; b=hjIrvdJKgRlkTSPE2728sryuZti1Q0TFkgKv4oRRxWWR5JXWcpgEEpF8FutxwgKhAH DjAWehLnG/ZapjGf8A+WO6ey04wwzD9N2E5ax1X0F2gh6bSg19RQ8kidMgPwliK5/zV3 V0Wf7gmBQnaeOYBrv5d51fvoLUIbuPfPf6hax3fK7mi5Pg1y5k3T7UJXBeYllHmkmYNO q0q6KrDXHP1A4iTBcpig+3r/l2QxJ65z1/ZImlOn4kQYLKIdibnlPqNlmYZqGPMJmWVd HHVwENZs26ZNhpz1uHqvYmt+UFW7cB4oIWIw0PQStKDTSDihzur07i4JSG9hEKMu3ZAJ 2QGw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@protonmail.com header.s=protonmail3 header.b=Sb8gYHfk; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=protonmail.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id s26-20020a056402165a00b0051ff0e743c7si8239697edx.397.2023.08.01.04.50.46; Tue, 01 Aug 2023 04:51:10 -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=@protonmail.com header.s=protonmail3 header.b=Sb8gYHfk; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=protonmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231962AbjHALXp (ORCPT + 99 others); Tue, 1 Aug 2023 07:23:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53936 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231591AbjHALXZ (ORCPT ); Tue, 1 Aug 2023 07:23:25 -0400 Received: from mail-4319.protonmail.ch (mail-4319.protonmail.ch [185.70.43.19]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 10BC22720 for ; Tue, 1 Aug 2023 04:22:37 -0700 (PDT) Date: Tue, 01 Aug 2023 11:22:30 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail3; t=1690888956; x=1691148156; bh=1f6zJycLuFoL5WQQ7MMLphiDimdCfGXgDIFs81dzGK8=; h=Date:To:From:Cc:Subject:Message-ID:In-Reply-To:References: Feedback-ID:From:To:Cc:Date:Subject:Reply-To:Feedback-ID: Message-ID:BIMI-Selector; b=Sb8gYHfkY0NpGkrMYc4Rx7l9Pg9zSFBUQbTJeS728HPlx7FAUQQTvqGBQx7ulQCas NKIWkhTb3IMHqUzII3nDIzRWn5vWNwf4wk9c/eujJTI+FzNNF+9v4/z1+M7gdhiDNi NIHVjzF4vQn0/Y3IrgsJuSdg/CVqdEvrceELfAYQGANyoapWjDDijHo7OjApx2wbUF C9RqWa8mcXjGXu3jEp6ZLHPCuuOBVN6+Myuluh3o5SWxhzw0wESyXjR5ECjFT3GMtB R2UsJL/O3pqVw3KrrYkuTa3JRXQnxs0lPbjfq6HEG8LAwlGl/++ILITgySe4Ea9NPB sAUt2xk4JxdYQ== To: linux-kernel@vger.kernel.org From: "Lin, Meng-Bo" Cc: Andy Gross , Bjorn Andersson , Konrad Dybcio , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Stephan Gerhold , Nikita Travkin , linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, ~postmarketos/upstreaming@lists.sr.ht Subject: [PATCH v2 1/3] dt-bindings: qcom: Document new msm8916-samsung devices Message-ID: <20230801112113.4659-1-linmengbo0689@protonmail.com> In-Reply-To: <20230801111745.4629-1-linmengbo0689@protonmail.com> References: <20230801111745.4629-1-linmengbo0689@protonmail.com> Feedback-ID: 40467236:user:proton MIME-Version: 1.0 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM,RCVD_IN_DNSWL_BLOCKED,RCVD_IN_MSPIKE_H5, RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,SPF_PASS,T_SCC_BODY_TEXT_LINE, URIBL_BLOCKED autolearn=ham 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: INBOX X-GMAIL-THRID: 1773027375779224528 X-GMAIL-MSGID: 1773027375779224528 Document the new following device tree bindings used in their device trees: - samsung,fortuna3g - samsung,fortunaltezt - samsung,gprimeltecan - samsung,grandprimelte - samsung,heatqlte - samsung,rossa Signed-off-by: Lin, Meng-Bo Acked-by: Rob Herring --- Documentation/devicetree/bindings/arm/qcom.yaml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Documentation/devicetree/bindings/arm/qcom.yaml b/Documentation/devicetree/bindings/arm/qcom.yaml index 450f616774e0..7172f657bfa4 100644 --- a/Documentation/devicetree/bindings/arm/qcom.yaml +++ b/Documentation/devicetree/bindings/arm/qcom.yaml @@ -235,11 +235,17 @@ properties: - samsung,a5u-eur - samsung,e5 - samsung,e7 + - samsung,fortuna3g + - samsung,fortunaltezt + - samsung,gprimeltecan - samsung,grandmax + - samsung,grandprimelte - samsung,gt510 - samsung,gt58 + - samsung,heatqlte - samsung,j5 - samsung,j5x + - samsung,rossa - samsung,serranove - thwc,uf896 - thwc,ufi001c From patchwork Tue Aug 1 11:22:47 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Lin, Meng-Bo" X-Patchwork-Id: 129227 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:918b:0:b0:3e4:2afc:c1 with SMTP id s11csp2611080vqg; Tue, 1 Aug 2023 04:50:31 -0700 (PDT) X-Google-Smtp-Source: APBJJlFDdVR9uyNF08g4d9MtM26re/e5YeKs9V6RpK6EskBWfxvqhR+VkhSov+5uYYDA5mP/ThIi X-Received: by 2002:a05:6402:185a:b0:522:5548:f357 with SMTP id v26-20020a056402185a00b005225548f357mr2210804edy.28.1690890630707; Tue, 01 Aug 2023 04:50:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690890630; cv=none; d=google.com; s=arc-20160816; b=njDk8pD11ygf17hQyu0r+1czxBrGLEWKRLHTRMdmCIQt0Z4XI1jGtlT0c30fCAgYS0 at/4Gwjf1ZLn0aK61WxqG7DU4la3/5Z4t8Cql0FrXJNjEi5jrlh6bwrpbO6AulPUo9dS BgNbzJgWB8LdlohtKPMhdpcv4Dmo4ftmr7V4q4SLrO4ZdJ0pwMbaI6VrzAvyqvbfnJWR u3wbIunza4JZdR7B+GVVRCJNDPkabe0WTpeCF2/nL3XY80muHItmG0eNkcIWROoigkgQ EhOMyNn3/sTg96y0utngAFV1mohlSdcuaENd13JHxlR/xyGrbbmE+vaJEvxBIWnALHCR OYHA== 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 :feedback-id:references:in-reply-to:message-id:subject:cc:from:to :dkim-signature:date; bh=tNHwD+P01gKFsgZ9e8DyYxM5TJb80TlVC4z16No0tCI=; fh=F2wF4vtKC2Az7MIUyEiTn0q3m2et8eAG2vb6iLgJrTA=; b=N6pN+bv0Zdg6PthLODWJG9pTNVQac8PqEYbASxiFzED4fC2Pd0qIoNvTrlVvzWZeLL oXDCci19AS36T0fxCZV0+Rl37Ar7qrKjxb2sRLYqDF8fHfz0kzcvIrOzmVQ580IxpJd0 O4Tf5mTh48+LE3d3HulcXrYgnHhlbDyZ5fJxxvRdNNYqsAz4NNVoGowL03fbhkdjrISH 1xu5K8wBEYuV2CmpRcYglfjmB8S1H0RxLBXn0qfwfLUTUgDXeVMOzuFctpK3qhcOItvN GHEbpS2OYMf+xpJKw1rlNS7JCmpfGFYr4y3gBOWsuTfXz5VYykBlrPdYenUrty3vu52F A08Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@protonmail.com header.s=protonmail3 header.b="l/FDG9xA"; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=protonmail.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id y25-20020aa7c259000000b005222b655688si8070793edo.368.2023.08.01.04.50.06; Tue, 01 Aug 2023 04:50:30 -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=@protonmail.com header.s=protonmail3 header.b="l/FDG9xA"; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=protonmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234359AbjHALYO (ORCPT + 99 others); Tue, 1 Aug 2023 07:24:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56462 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234028AbjHALXj (ORCPT ); Tue, 1 Aug 2023 07:23:39 -0400 Received: from mail-40141.protonmail.ch (mail-40141.protonmail.ch [185.70.40.141]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 80780E4; Tue, 1 Aug 2023 04:23:06 -0700 (PDT) Date: Tue, 01 Aug 2023 11:22:47 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail3; t=1690888984; x=1691148184; bh=tNHwD+P01gKFsgZ9e8DyYxM5TJb80TlVC4z16No0tCI=; h=Date:To:From:Cc:Subject:Message-ID:In-Reply-To:References: Feedback-ID:From:To:Cc:Date:Subject:Reply-To:Feedback-ID: Message-ID:BIMI-Selector; b=l/FDG9xA/YQaZ07wpCSCHiMdQvRtFECMbyMMXnOnMnYiex+QV/r/BJdAA2HMzyotF NUv00twtrdZgj9Sd1zpxDGWl064rsxljPTes74ZuUgcPVTq6Z5VmFtQyQdnhrNIuzp pl3U6wa51ufpVyI1Iu3Jsc5CsJuAK8jOboGlZwXEt2DNr/k04e9f4XWKxUbISBdyuY s94FoP6iKeqmtm4OZrXeTtWVkavmw3HExHg2kAXjz8GqrbL5gz9YlE2Oteowe+uEq/ qaNHnN7NI9no040iE4Fh4cxyT166H03ODu/MP1/msV7UeEm+dmlNYQTPp0V18HedyS 1zasjU5mG0gvg== To: linux-kernel@vger.kernel.org From: "Lin, Meng-Bo" Cc: Andy Gross , Bjorn Andersson , Konrad Dybcio , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Stephan Gerhold , Nikita Travkin , linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, ~postmarketos/upstreaming@lists.sr.ht, Walter Broemeling , Joe Mason , Siddharth Manthan , Gareth Peoples Subject: [PATCH v2 2/3] arm64: dts: qcom: msm8916-samsung-fortuna: Add initial device trees Message-ID: <20230801112123.4672-1-linmengbo0689@protonmail.com> In-Reply-To: <20230801111745.4629-1-linmengbo0689@protonmail.com> References: <20230801111745.4629-1-linmengbo0689@protonmail.com> Feedback-ID: 40467236:user:proton MIME-Version: 1.0 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM,RCVD_IN_MSPIKE_H5,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS, SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED 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: INBOX X-GMAIL-THRID: 1773027334385954711 X-GMAIL-MSGID: 1773027334385954711 From: Walter Broemeling Samsung Galaxy Core Prime, Grand Prime and Ace 4 are phones based on MSM8916. They are similar to the other Samsung devices based on MSM8916 with only a few minor differences. This initial commit adds support for: - fortuna3g (SM-G530H) - fortunaltezt (SM-G530Y) - gprimeltecan (SM-G530W) - grandprimelte (SM-G530FZ) - heatqlte (SM-G357FZ) - rossa (SM-G360G) The device trees contain initial support with: - GPIO keys - Regulator haptic - SDHCI (internal and external storage) - USB Device Mode - UART (on USB connector via the SM5502/SM5504 MUIC) - WCNSS (WiFi/BT) - Regulators There are different variants of Grand Prime, with some differences in accelerometer, NFC and panel. Core Prime and Grand Prime are similar, with some differences in MUIC, panel and touchscreen. Ace 4 and Core Prime are similar, with some differences in panel and touchscreen. The common parts are shared in msm8916-samsung-fortuna-common.dtsi and msm8916-samsung-rossa-common.dtsi to reduce duplication. Unfortunately, SM-G357FZ and SM-G530Y were released with outdated 32-bit only firmware and never received any update from Samsung. Since the 32-bit TrustZone firmware is signed there seems to be no way currently to actually boot this device tree on arm64 Linux at the moment. However, it is possible to use this device tree by compiling an ARM32 kernel instead. The device tree can be easily built on ARM32 with an #include and it works really well there. To avoid confusion for others it is still better to add this device tree on arm64. Otherwise it's easy to forget to update this one when making some changes that affect all MSM8916 devices. Maybe someone finds a way to boot ARM64 Linux on this device at some point. In this case I expect that this device tree can be simply used as-is. Signed-off-by: Walter Broemeling Co-developed-by: Stephan Gerhold Signed-off-by: Stephan Gerhold [Add fortuna-common.dtsi, buttons, and WiFi] Co-developed-by: Joe Mason Signed-off-by: Joe Mason [Add fortuna3g] Co-developed-by: Siddharth Manthan Signed-off-by: Siddharth Manthan [Add heatqlte] Co-developed-by: Gareth Peoples Signed-off-by: Gareth Peoples [Add grandprimelte and fortunaltezt] [Use msm8916-samsung-rossa-common.dtsi and reword the commit] Co-developed-by: Lin, Meng-Bo Signed-off-by: Lin, Meng-Bo --- arch/arm64/boot/dts/qcom/Makefile | 6 + .../dts/qcom/msm8216-samsung-fortuna3g.dts | 11 ++ .../qcom/msm8916-samsung-fortuna-common.dtsi | 156 ++++++++++++++++++ .../dts/qcom/msm8916-samsung-fortunaltezt.dts | 23 +++ .../dts/qcom/msm8916-samsung-gprimeltecan.dts | 22 +++ .../qcom/msm8916-samsung-grandprimelte.dts | 11 ++ .../dts/qcom/msm8916-samsung-heatqlte.dts | 23 +++ .../qcom/msm8916-samsung-rossa-common.dtsi | 16 ++ .../boot/dts/qcom/msm8916-samsung-rossa.dts | 11 ++ 9 files changed, 279 insertions(+) create mode 100644 arch/arm64/boot/dts/qcom/msm8216-samsung-fortuna3g.dts create mode 100644 arch/arm64/boot/dts/qcom/msm8916-samsung-fortuna-common.dtsi create mode 100644 arch/arm64/boot/dts/qcom/msm8916-samsung-fortunaltezt.dts create mode 100644 arch/arm64/boot/dts/qcom/msm8916-samsung-gprimeltecan.dts create mode 100644 arch/arm64/boot/dts/qcom/msm8916-samsung-grandprimelte.dts create mode 100644 arch/arm64/boot/dts/qcom/msm8916-samsung-heatqlte.dts create mode 100644 arch/arm64/boot/dts/qcom/msm8916-samsung-rossa-common.dtsi create mode 100644 arch/arm64/boot/dts/qcom/msm8916-samsung-rossa.dts diff --git a/arch/arm64/boot/dts/qcom/Makefile b/arch/arm64/boot/dts/qcom/Makefile index 337abc4ceb17..f18db5063eda 100644 --- a/arch/arm64/boot/dts/qcom/Makefile +++ b/arch/arm64/boot/dts/qcom/Makefile @@ -17,6 +17,7 @@ dtb-$(CONFIG_ARCH_QCOM) += ipq9574-rdp433.dtb dtb-$(CONFIG_ARCH_QCOM) += ipq9574-rdp449.dtb dtb-$(CONFIG_ARCH_QCOM) += ipq9574-rdp453.dtb dtb-$(CONFIG_ARCH_QCOM) += ipq9574-rdp454.dtb +dtb-$(CONFIG_ARCH_QCOM) += msm8216-samsung-fortuna3g.dtb dtb-$(CONFIG_ARCH_QCOM) += msm8916-acer-a1-724.dtb dtb-$(CONFIG_ARCH_QCOM) += msm8916-alcatel-idol347.dtb dtb-$(CONFIG_ARCH_QCOM) += msm8916-asus-z00l.dtb @@ -29,11 +30,16 @@ dtb-$(CONFIG_ARCH_QCOM) += msm8916-samsung-a3u-eur.dtb dtb-$(CONFIG_ARCH_QCOM) += msm8916-samsung-a5u-eur.dtb dtb-$(CONFIG_ARCH_QCOM) += msm8916-samsung-e5.dtb dtb-$(CONFIG_ARCH_QCOM) += msm8916-samsung-e7.dtb +dtb-$(CONFIG_ARCH_QCOM) += msm8916-samsung-fortunaltezt.dtb +dtb-$(CONFIG_ARCH_QCOM) += msm8916-samsung-gprimeltecan.dtb dtb-$(CONFIG_ARCH_QCOM) += msm8916-samsung-grandmax.dtb +dtb-$(CONFIG_ARCH_QCOM) += msm8916-samsung-grandprimelte.dtb dtb-$(CONFIG_ARCH_QCOM) += msm8916-samsung-gt510.dtb dtb-$(CONFIG_ARCH_QCOM) += msm8916-samsung-gt58.dtb +dtb-$(CONFIG_ARCH_QCOM) += msm8916-samsung-heatqlte.dtb dtb-$(CONFIG_ARCH_QCOM) += msm8916-samsung-j5.dtb dtb-$(CONFIG_ARCH_QCOM) += msm8916-samsung-j5x.dtb +dtb-$(CONFIG_ARCH_QCOM) += msm8916-samsung-rossa.dtb dtb-$(CONFIG_ARCH_QCOM) += msm8916-samsung-serranove.dtb dtb-$(CONFIG_ARCH_QCOM) += msm8916-thwc-uf896.dtb dtb-$(CONFIG_ARCH_QCOM) += msm8916-thwc-ufi001c.dtb diff --git a/arch/arm64/boot/dts/qcom/msm8216-samsung-fortuna3g.dts b/arch/arm64/boot/dts/qcom/msm8216-samsung-fortuna3g.dts new file mode 100644 index 000000000000..366914be7d53 --- /dev/null +++ b/arch/arm64/boot/dts/qcom/msm8216-samsung-fortuna3g.dts @@ -0,0 +1,11 @@ +// SPDX-License-Identifier: GPL-2.0-only + +/dts-v1/; + +#include "msm8916-samsung-fortuna-common.dtsi" + +/ { + model = "Samsung Galaxy Grand Prime (SM-G530H)"; + compatible = "samsung,fortuna3g", "qcom,msm8916"; + chassis-type = "handset"; +}; diff --git a/arch/arm64/boot/dts/qcom/msm8916-samsung-fortuna-common.dtsi b/arch/arm64/boot/dts/qcom/msm8916-samsung-fortuna-common.dtsi new file mode 100644 index 000000000000..175a1e891c7a --- /dev/null +++ b/arch/arm64/boot/dts/qcom/msm8916-samsung-fortuna-common.dtsi @@ -0,0 +1,156 @@ +// SPDX-License-Identifier: GPL-2.0-only + +#include "msm8916-pm8916.dtsi" +#include +#include +#include + +/ { + aliases { + mmc0 = &sdhc_1; /* eMMC */ + mmc1 = &sdhc_2; /* SD card */ + serial0 = &blsp_uart2; + }; + + chosen { + stdout-path = "serial0"; + }; + + reserved-memory { + /* Additional memory used by Samsung firmware modifications */ + tz-apps@85a00000 { + reg = <0x0 0x85a00000 0x0 0x600000>; + no-map; + }; + }; + + gpio-keys { + compatible = "gpio-keys"; + + pinctrl-0 = <&gpio_keys_default>; + pinctrl-names = "default"; + + label = "GPIO Buttons"; + + button-volume-up { + label = "Volume Up"; + gpios = <&tlmm 107 GPIO_ACTIVE_LOW>; + linux,code = ; + }; + + button-home { + label = "Home"; + gpios = <&tlmm 109 GPIO_ACTIVE_LOW>; + linux,code = ; + }; + }; + + haptic { + compatible = "regulator-haptic"; + haptic-supply = <®_motor_vdd>; + min-microvolt = <3300000>; + max-microvolt = <3300000>; + }; + + reg_motor_vdd: regulator-motor-vdd { + compatible = "regulator-fixed"; + regulator-name = "motor_vdd"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + + gpio = <&tlmm 72 GPIO_ACTIVE_HIGH>; + enable-active-high; + + pinctrl-0 = <&motor_en_default>; + pinctrl-names = "default"; + }; +}; + +&blsp_i2c1 { + status = "okay"; + + muic: extcon@25 { + compatible = "siliconmitus,sm5502-muic"; + reg = <0x25>; + interrupts-extended = <&tlmm 12 IRQ_TYPE_EDGE_FALLING>; + pinctrl-0 = <&muic_int_default>; + pinctrl-names = "default"; + }; +}; + +&blsp_uart2 { + status = "okay"; +}; + +&pm8916_resin { + linux,code = ; + status = "okay"; +}; + +&pm8916_rpm_regulators { + pm8916_l17: l17 { + regulator-min-microvolt = <2850000>; + regulator-max-microvolt = <2850000>; + }; +}; + +&sdhc_1 { + status = "okay"; +}; + +&sdhc_2 { + pinctrl-0 = <&sdc2_default &sdc2_cd_default>; + pinctrl-1 = <&sdc2_sleep &sdc2_cd_default>; + pinctrl-names = "default", "sleep"; + + cd-gpios = <&tlmm 38 GPIO_ACTIVE_LOW>; + + status = "okay"; +}; + +&usb { + extcon = <&muic>, <&muic>; + status = "okay"; +}; + +&usb_hs_phy { + extcon = <&muic>; +}; + +&wcnss { + status = "okay"; +}; + +&wcnss_iris { + compatible = "qcom,wcn3620"; +}; + +&tlmm { + gpio_keys_default: gpio-keys-default-state { + pins = "gpio107", "gpio109"; + function = "gpio"; + drive-strength = <2>; + bias-pull-up; + }; + + motor_en_default: motor-en-default-state { + pins = "gpio72"; + function = "gpio"; + drive-strength = <2>; + bias-disable; + }; + + muic_int_default: muic-int-default-state { + pins = "gpio12"; + function = "gpio"; + drive-strength = <2>; + bias-disable; + }; + + sdc2_cd_default: sdc2-cd-default-state { + pins = "gpio38"; + function = "gpio"; + drive-strength = <2>; + bias-disable; + }; +}; diff --git a/arch/arm64/boot/dts/qcom/msm8916-samsung-fortunaltezt.dts b/arch/arm64/boot/dts/qcom/msm8916-samsung-fortunaltezt.dts new file mode 100644 index 000000000000..f7c4dcb34bb3 --- /dev/null +++ b/arch/arm64/boot/dts/qcom/msm8916-samsung-fortunaltezt.dts @@ -0,0 +1,23 @@ +// SPDX-License-Identifier: GPL-2.0-only + +/dts-v1/; + +#include "msm8916-samsung-fortuna-common.dtsi" + +/* + * NOTE: The original firmware from Samsung can only boot ARM32 kernels. + * Unfortunately, the firmware is signed and cannot be replaced easily. + * There seems to be no way to boot ARM64 kernels on this device at the moment, + * even though the hardware would support it. + * + * However, it is possible to use this device tree by compiling an ARM32 kernel + * instead. For clarity and build testing this device tree is maintained next + * to the other MSM8916 device trees. However, it is actually used through + * arch/arm/boot/dts/qcom-msm8916-samsung-fortunaltezt.dts + */ + +/ { + model = "Samsung Galaxy Grand Prime (SM-G530Y)"; + compatible = "samsung,fortunaltezt", "qcom,msm8916"; + chassis-type = "handset"; +}; diff --git a/arch/arm64/boot/dts/qcom/msm8916-samsung-gprimeltecan.dts b/arch/arm64/boot/dts/qcom/msm8916-samsung-gprimeltecan.dts new file mode 100644 index 000000000000..883f20554dbe --- /dev/null +++ b/arch/arm64/boot/dts/qcom/msm8916-samsung-gprimeltecan.dts @@ -0,0 +1,22 @@ +// SPDX-License-Identifier: GPL-2.0-only + +/dts-v1/; + +#include "msm8916-samsung-fortuna-common.dtsi" + +/ { + model = "Samsung Galaxy Grand Prime (SM-G530W)"; + compatible = "samsung,gprimeltecan", "qcom,msm8916"; + chassis-type = "handset"; + + reserved-memory { + /* Firmware for gprimeltecan needs more space */ + /delete-node/ tz-apps@85a00000; + + /* Additional memory used by Samsung firmware modifications */ + tz-apps@85500000 { + reg = <0x0 0x85500000 0x0 0xb00000>; + no-map; + }; + }; +}; diff --git a/arch/arm64/boot/dts/qcom/msm8916-samsung-grandprimelte.dts b/arch/arm64/boot/dts/qcom/msm8916-samsung-grandprimelte.dts new file mode 100644 index 000000000000..ea8a1e698dd4 --- /dev/null +++ b/arch/arm64/boot/dts/qcom/msm8916-samsung-grandprimelte.dts @@ -0,0 +1,11 @@ +// SPDX-License-Identifier: GPL-2.0-only + +/dts-v1/; + +#include "msm8916-samsung-fortuna-common.dtsi" + +/ { + model = "Samsung Galaxy Grand Prime (SM-G530FZ)"; + compatible = "samsung,grandprimelte", "qcom,msm8916"; + chassis-type = "handset"; +}; diff --git a/arch/arm64/boot/dts/qcom/msm8916-samsung-heatqlte.dts b/arch/arm64/boot/dts/qcom/msm8916-samsung-heatqlte.dts new file mode 100644 index 000000000000..fbf065734cbb --- /dev/null +++ b/arch/arm64/boot/dts/qcom/msm8916-samsung-heatqlte.dts @@ -0,0 +1,23 @@ +// SPDX-License-Identifier: GPL-2.0-only + +/dts-v1/; + +#include "msm8916-samsung-rossa-common.dtsi" + +/* + * NOTE: The original firmware from Samsung can only boot ARM32 kernels. + * Unfortunately, the firmware is signed and cannot be replaced easily. + * There seems to be no way to boot ARM64 kernels on this device at the moment, + * even though the hardware would support it. + * + * However, it is possible to use this device tree by compiling an ARM32 kernel + * instead. For clarity and build testing this device tree is maintained next + * to the other MSM8916 device trees. However, it is actually used through + * arch/arm/boot/dts/qcom-msm8916-samsung-heatqlte.dts + */ + +/ { + model = "Samsung Galaxy Ace 4 (SM-G357FZ)"; + compatible = "samsung,heatqlte", "qcom,msm8916"; + chassis-type = "handset"; +}; diff --git a/arch/arm64/boot/dts/qcom/msm8916-samsung-rossa-common.dtsi b/arch/arm64/boot/dts/qcom/msm8916-samsung-rossa-common.dtsi new file mode 100644 index 000000000000..d66cf1cbd378 --- /dev/null +++ b/arch/arm64/boot/dts/qcom/msm8916-samsung-rossa-common.dtsi @@ -0,0 +1,16 @@ +// SPDX-License-Identifier: GPL-2.0-only + +#include "msm8916-samsung-fortuna-common.dtsi" + +&blsp_i2c1 { + /* SM5504 MUIC instead of SM5502 */ + /delete-node/ extcon@25; + + muic: extcon@14 { + compatible = "siliconmitus,sm5504-muic"; + reg = <0x14>; + interrupts-extended = <&tlmm 12 IRQ_TYPE_EDGE_FALLING>; + pinctrl-0 = <&muic_int_default>; + pinctrl-names = "default"; + }; +}; diff --git a/arch/arm64/boot/dts/qcom/msm8916-samsung-rossa.dts b/arch/arm64/boot/dts/qcom/msm8916-samsung-rossa.dts new file mode 100644 index 000000000000..2c6f04ad2cfe --- /dev/null +++ b/arch/arm64/boot/dts/qcom/msm8916-samsung-rossa.dts @@ -0,0 +1,11 @@ +// SPDX-License-Identifier: GPL-2.0-only + +/dts-v1/; + +#include "msm8916-samsung-rossa-common.dtsi" + +/ { + model = "Samsung Galaxy Core Prime LTE"; + compatible = "samsung,rossa", "qcom,msm8916"; + chassis-type = "handset"; +}; From patchwork Tue Aug 1 11:22:50 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Lin, Meng-Bo" X-Patchwork-Id: 129245 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:918b:0:b0:3e4:2afc:c1 with SMTP id s11csp2619643vqg; Tue, 1 Aug 2023 05:05:53 -0700 (PDT) X-Google-Smtp-Source: APBJJlFB21WoMx0BNCqP9IbttCP4tszbSAIpDoX9p/H6otosMcOFVdHZluxNi8IlveED2m+GqtSV X-Received: by 2002:a05:6a20:8f21:b0:13d:ac08:6b79 with SMTP id b33-20020a056a208f2100b0013dac086b79mr6719351pzk.60.1690891552995; Tue, 01 Aug 2023 05:05:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690891552; cv=none; d=google.com; s=arc-20160816; b=byLnaguBl8knWMtPMT1c2LBiXIX5mY+ZKsxWZFbpBZ6JoOaHXp1QSLoW5vyH11Pi82 GCkyR3ZYBKmJ/toyZwOdT/Dx7uBV7Q2eWRUqAW7VGgd/wNfbJzO0zVCa/zAC7DGioLW7 XSyXC3ZTrRhENNcmO3pFOaUOXuHzsh0ZM7EFSQdzRR43iDWxwEaFaZCGMIMr+9F8+P1u 3Y5Z0XkqNKjko9L7WFc75W3aJTAXNHPECtYwbWogLrGE/5RWYGEihmfYkm2xCAoA2bSx URFc5Dh3+ZO4mbEagktndxhvhZCA48KEHJnasaHxhErrb7l13CHurbav4Biy1avTTutx ETlw== 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 :feedback-id:references:in-reply-to:message-id:subject:cc:from:to :dkim-signature:date; bh=/GbdM8wTz38mFTXJXJcRCr+lPwpUtRE7lW/yp7qtVLY=; fh=hR37oSb4qKdER3RJk6/EW7DkjbOR/5bq2arRhFovEng=; b=F4B19DZBdeuKsTNKwyVUChnfpt75JbL1txyX5EltecolyhsBchrH4O/o2xyUBoh6iq /jRVqwXNyEYLRq7gEurxalYov6OdgdtjtKiHSkFJ1AIg2e7btvcd5c55F4RjYvAydS1B 95EGMGnu40ApKVnm5ooijf3WprSh4qi45gQgv7o209pvswjJKy4V80O3dKj6egWiFy8c uRsR6/yqtjxLRhArcIdam8Ev5+0ZJ3rdGDmeZhV553nHVzBLR2q0SJ1TlSDYR4VdNTmA dlIPnBXS7aI4+7kE/34ctGoraLCNF6wxvq3Imi/1q5RD/M/5bs2oUW4snxyw0NJsdE6v 35PQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@protonmail.com header.s=protonmail3 header.b=Qa9Xr1mc; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=protonmail.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id c4-20020a63d504000000b00563d47599basi2246205pgg.871.2023.08.01.05.05.39; Tue, 01 Aug 2023 05:05:52 -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=@protonmail.com header.s=protonmail3 header.b=Qa9Xr1mc; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=protonmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234131AbjHALYL (ORCPT + 99 others); Tue, 1 Aug 2023 07:24:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53886 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233995AbjHALXi (ORCPT ); Tue, 1 Aug 2023 07:23:38 -0400 Received: from mail-4318.protonmail.ch (mail-4318.protonmail.ch [185.70.43.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C170EB2; Tue, 1 Aug 2023 04:23:05 -0700 (PDT) Date: Tue, 01 Aug 2023 11:22:50 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail3; t=1690888983; x=1691148183; bh=/GbdM8wTz38mFTXJXJcRCr+lPwpUtRE7lW/yp7qtVLY=; h=Date:To:From:Cc:Subject:Message-ID:In-Reply-To:References: Feedback-ID:From:To:Cc:Date:Subject:Reply-To:Feedback-ID: Message-ID:BIMI-Selector; b=Qa9Xr1mcVm25LuHUedB9uIoa86cCeHZ7ol8EWuvfnw91sipA+vvchEBCfwzINcPgw TQD3G0x2HHXL41CMUWyvM70KpLCEoelsC+tsncsPs+E4lpqQKn6LHSahRGzYBRvUuH S3KXaQeSBXLgyUC2z4BFV5tFa+EY8Fck+8jFrd0n+C3g5yejqTCXflpdphRa5x5sIf nErACxz9T8gmk+RcYKfPrsWUfVAYfVd3hSVu8NNL4x/4Tk+VRyuSaPxkkfer6p5Wi7 aOjz5YYwPcRJNSu66nnt7As0A2xnHHbMdrV8KUr7c+ixUjHoRsEqy1lvIt4JR5TgcH kS0mPalOoAAXQ== To: linux-kernel@vger.kernel.org From: "Lin, Meng-Bo" Cc: Andy Gross , Bjorn Andersson , Konrad Dybcio , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Stephan Gerhold , Nikita Travkin , linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, ~postmarketos/upstreaming@lists.sr.ht, Gareth Peoples Subject: [PATCH v2 3/3] ARM: dts: qcom-msm8916-samsung-fortuna: Include dts from arm64 Message-ID: <20230801112134.4689-1-linmengbo0689@protonmail.com> In-Reply-To: <20230801111745.4629-1-linmengbo0689@protonmail.com> References: <20230801111745.4629-1-linmengbo0689@protonmail.com> Feedback-ID: 40467236:user:proton MIME-Version: 1.0 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM,RCVD_IN_MSPIKE_H5,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS, SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham 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: INBOX X-GMAIL-THRID: 1773028300938204648 X-GMAIL-MSGID: 1773028300938204648 After adding all necessary support for MSM8916 SMP/cpuidle without PSCI on ARM32, build fortunaltezt and heatqlte device trees from the arm64 tree together with the ARM32 include to allow booting this device on ARM32. The approach to include device tree files from other architectures is inspired from e.g. the Raspberry Pi (bcm2711-rpi-4-b.dts) where this is used to build the device tree for both ARM32 and ARM64. [Add workaround to TSENS problem] Co-developed-by: Stephan Gerhold Signed-off-by: Stephan Gerhold [Add heatqlte] Co-developed-by: Gareth Peoples Signed-off-by: Gareth Peoples Signed-off-by: Lin, Meng-Bo --- arch/arm/boot/dts/qcom-msm8916-samsung-fortunaltezt.dts | 8 ++++++++ arch/arm/boot/dts/qcom-msm8916-samsung-heatqlte.dts | 8 ++++++++ arch/arm/boot/dts/qcom/Makefile | 2 ++ 3 files changed, 18 insertions(+) create mode 100644 arch/arm/boot/dts/qcom-msm8916-samsung-fortunaltezt.dts create mode 100644 arch/arm/boot/dts/qcom-msm8916-samsung-heatqlte.dts diff --git a/arch/arm/boot/dts/qcom-msm8916-samsung-fortunaltezt.dts b/arch/arm/boot/dts/qcom-msm8916-samsung-fortunaltezt.dts new file mode 100644 index 000000000000..b9704fea7029 --- /dev/null +++ b/arch/arm/boot/dts/qcom-msm8916-samsung-fortunaltezt.dts @@ -0,0 +1,8 @@ +// SPDX-License-Identifier: GPL-2.0-only +#include "arm64/qcom/msm8916-samsung-fortunaltezt.dts" +#include "qcom-msm8916-smp.dtsi" + +&tsens { + /* FIXME: The device crashes when accessing the SROT region for some reason */ + status = "disabled"; +}; diff --git a/arch/arm/boot/dts/qcom-msm8916-samsung-heatqlte.dts b/arch/arm/boot/dts/qcom-msm8916-samsung-heatqlte.dts new file mode 100644 index 000000000000..ec3edd4f31c3 --- /dev/null +++ b/arch/arm/boot/dts/qcom-msm8916-samsung-heatqlte.dts @@ -0,0 +1,8 @@ +// SPDX-License-Identifier: GPL-2.0-only +#include "arm64/qcom/msm8916-samsung-heatqlte.dts" +#include "qcom-msm8916-smp.dtsi" + +&tsens { + /* FIXME: The device crashes when accessing the SROT region for some reason */ + status = "disabled"; +}; diff --git a/arch/arm/boot/dts/qcom/Makefile b/arch/arm/boot/dts/qcom/Makefile index 3dfb1c8cefb8..746d7aa940d9 100644 --- a/arch/arm/boot/dts/qcom/Makefile +++ b/arch/arm/boot/dts/qcom/Makefile @@ -27,7 +27,9 @@ dtb-$(CONFIG_ARCH_QCOM) += \ qcom-msm8660-surf.dtb \ qcom-msm8916-samsung-e5.dtb \ qcom-msm8916-samsung-e7.dtb \ + qcom-msm8916-samsung-fortunaltezt.dtb \ qcom-msm8916-samsung-grandmax.dtb \ + qcom-msm8916-samsung-heatqlte.dtb \ qcom-msm8916-samsung-serranove.dtb \ qcom-msm8960-cdp.dtb \ qcom-msm8960-samsung-expressatt.dtb \