Received: by 2002:a05:7412:31a9:b0:e2:908c:2ebd with SMTP id et41csp4418310rdb; Fri, 15 Sep 2023 01:13:26 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEtM0cTZ3yerRbjXRV1UmtModSy9/8/aLiMC5BP9TfeDUzbZjEAau6PXeytxbFr3f6ZTU4c X-Received: by 2002:a05:6358:709:b0:13d:c0:1b0d with SMTP id e9-20020a056358070900b0013d00c01b0dmr1588955rwj.2.1694765605813; Fri, 15 Sep 2023 01:13:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1694765605; cv=none; d=google.com; s=arc-20160816; b=SV5dKU1ipefLKRM1q+X1L6rcO5eDYzZcsu1Oa0NY5lysw7QwVBMjj5ZP+5v2nADiIM AFxgd6hivAk3V9P2coUx9RdJtFG08FF+OqAAvoj3mfFsFjUnPqQkpBnEopZJiVYiteJS 3CxdLFUJzV/Pm4g9maMtvYGks9sxnMdll65RjS5UKB+3uU6DRPjqI8B1pUNuHejg5HrW Db7rPlrtc5xqFAPC/draNeMlUdbUM1sNqAPGnkgZ7rdnbyGGZCSCUwz7lsHjHtnwKrDo 2C+5NCOsj8ofLQmVXxB0zYRUf507QHlrlGivBc3zy2FhjRAScu8pfVdoG0pZXyoVaZr6 1lLQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=4g+QORFF76ZfWsHBcB4mVPvnWyc4sJCKXGtdQn0dNz0=; fh=Q+6/IhNiFR1xTKnqUYTiN9dqgIXi9EpuMlFUkcsWaFk=; b=IyU+8iJUB73X8PhnltbkdrJZHWdSlWFXIkUpP0vDFzW1lWKOEfpeAig5pqRuO4oA7K lHZJAKspMYaaW8x0N4AB01f4I1lWpls/sSDIwrxOrIO44Ad24CAgeZAwTwK9q2H0xi77 mwpz67cQU3mDXJvcosPZOfiw+Bw89704HRXuLqPjhU7kyvERpSXRO5Bb1/Cg+cO3vPy7 2INMfNcnI2J4Qvm/HaGZwvU2sk8sN25CDMKjGg1U5wO08iUYg6bU/w1usom7zjqPdON+ +52vvKHxTckCEVm25TQJza7dFoxeew9DoCIJVKVJ1rDcOdxu7OcR8ggF2I9VZTmJ4qAy yC8w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=Uowb6CZ3; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Return-Path: Received: from snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id l127-20020a632585000000b0057763d820d7si2882656pgl.835.2023.09.15.01.13.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Sep 2023 01:13:25 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=Uowb6CZ3; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id 1788C8129AD5; Thu, 14 Sep 2023 19:17:19 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231965AbjIOCRV (ORCPT + 99 others); Thu, 14 Sep 2023 22:17:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35372 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231772AbjIOCRG (ORCPT ); Thu, 14 Sep 2023 22:17:06 -0400 Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 459C62D53; Thu, 14 Sep 2023 19:17:00 -0700 (PDT) Received: from pps.filterd (m0279869.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 38F1vjdb031638; Fri, 15 Sep 2023 02:16:38 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-type; s=qcppdkim1; bh=4g+QORFF76ZfWsHBcB4mVPvnWyc4sJCKXGtdQn0dNz0=; b=Uowb6CZ3BSwBCgkWOE2i9HTb/mOOcFS1bweyoWfxLHygnVJPX8s+f3EYCkSUyg0EiW7t Sb8y7MOmbLiovMpMR37M5PnHsYSWtLd8R457EvBWPbOuR5hf5WHD1TOlz9H3Dm8o2Jvm 5VrylCUlAD6SFP8qXGsSBWkeFZWnTs6n7zN9CYaRMEdhpBbkBn8E7GLOz9NTrtK4fxHy FByl30v3zzON1U/NEFtLWBdMKJ5z92oqovrE7Q64xoJzXCAEJ6UKE7TJV46Sl4IOuSLD wTAaTy/gdjzOMjppn6NdtN1PccXSmFrq8hjkOTZxuQHjWv52Ewf/Dd7gtGyut0otFkF0 KQ== Received: from nalasppmta05.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3t4e2b01j0-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 15 Sep 2023 02:16:38 +0000 Received: from nalasex01a.na.qualcomm.com (nalasex01a.na.qualcomm.com [10.47.209.196]) by NALASPPMTA05.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 38F2GbvY017116 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 15 Sep 2023 02:16:37 GMT Received: from tengfan2-gv.qualcomm.com (10.80.80.8) by nalasex01a.na.qualcomm.com (10.47.209.196) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.36; Thu, 14 Sep 2023 19:16:28 -0700 From: Tengfei Fan To: , , , , , , , , , CC: , , , , , , , , , , , , , , , , , , Tengfei Fan Subject: [PATCH v2 7/8] arm64: dts: qcom: add uart console support for SM4450 Date: Fri, 15 Sep 2023 10:15:08 +0800 Message-ID: <20230915021509.25773-9-quic_tengfan@quicinc.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20230915021509.25773-1-quic_tengfan@quicinc.com> References: <20230915021509.25773-1-quic_tengfan@quicinc.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: nasanex01b.na.qualcomm.com (10.46.141.250) To nalasex01a.na.qualcomm.com (10.47.209.196) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-GUID: UlfP3JkXXVsbq4T2UByZ8f4tpp8urihd X-Proofpoint-ORIG-GUID: UlfP3JkXXVsbq4T2UByZ8f4tpp8urihd X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.267,Aquarius:18.0.980,Hydra:6.0.601,FMLib:17.11.176.26 definitions=2023-09-15_02,2023-09-14_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 bulkscore=0 spamscore=0 priorityscore=1501 malwarescore=0 suspectscore=0 adultscore=0 mlxscore=0 lowpriorityscore=0 impostorscore=0 clxscore=1015 phishscore=0 mlxlogscore=999 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2308100000 definitions=main-2309150018 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Thu, 14 Sep 2023 19:17:19 -0700 (PDT) Add base description of UART, TLMM, interconnect, TCSRCC and SMMU nodes which helps SM4450 boot to shell with console on boards with this SoC. Signed-off-by: Tengfei Fan --- arch/arm64/boot/dts/qcom/sm4450-qrd.dts | 18 +- arch/arm64/boot/dts/qcom/sm4450.dtsi | 313 +++++++++++++++++++++--- 2 files changed, 301 insertions(+), 30 deletions(-) diff --git a/arch/arm64/boot/dts/qcom/sm4450-qrd.dts b/arch/arm64/boot/dts/qcom/sm4450-qrd.dts index 00a1c81ca397..0f253a2ba170 100644 --- a/arch/arm64/boot/dts/qcom/sm4450-qrd.dts +++ b/arch/arm64/boot/dts/qcom/sm4450-qrd.dts @@ -10,9 +10,23 @@ model = "Qualcomm Technologies, Inc. SM4450 QRD"; compatible = "qcom,sm4450-qrd", "qcom,sm4450"; - aliases { }; + aliases { + serial0 = &uart7; + }; chosen { - bootargs = "console=hvc0"; + stdout-path = "serial0:115200n8"; }; }; + +&qupv3_id_0 { + status = "okay"; +}; + +&tlmm { + gpio-reserved-ranges = <0 4>, <136 1>; +}; + +&uart7 { + status = "okay"; +}; diff --git a/arch/arm64/boot/dts/qcom/sm4450.dtsi b/arch/arm64/boot/dts/qcom/sm4450.dtsi index df59027a2f93..3af976478d0d 100644 --- a/arch/arm64/boot/dts/qcom/sm4450.dtsi +++ b/arch/arm64/boot/dts/qcom/sm4450.dtsi @@ -7,6 +7,8 @@ #include #include #include +#include +#include #include / { @@ -262,6 +264,26 @@ }; }; + firmware { + scm: scm { + compatible = "qcom,scm-sm4450", "qcom,scm"; + interconnects = <&aggre2_noc MASTER_CRYPTO 0 &mc_virt SLAVE_EBI1 0>; + #reset-cells = <1>; + }; + }; + + clk_virt: interconnect-0 { + compatible = "qcom,sm4450-clk-virt"; + #interconnect-cells = <2>; + qcom,bcm-voters = <&apps_bcm_voter>; + }; + + mc_virt: interconnect-1 { + compatible = "qcom,sm4450-mc-virt"; + #interconnect-cells = <2>; + qcom,bcm-voters = <&apps_bcm_voter>; + }; + memory@a0000000 { device_type = "memory"; /* We expect the bootloader to fill in the size */ @@ -350,34 +372,6 @@ dma-ranges = <0 0 0 0 0x10 0>; compatible = "simple-bus"; - apps_rsc: rsc@17a00000 { - compatible = "qcom,rpmh-rsc"; - reg = <0 0x17a00000 0 0x10000>, - <0 0x17a10000 0 0x10000>, - <0 0x17a20000 0 0x10000>; - reg-names = "drv-0", "drv-1", "drv-2"; - interrupts = , - , - ; - label = "apps_rsc"; - qcom,tcs-offset = <0xd00>; - qcom,drv-id = <2>; - qcom,tcs-config = , , - , ; - power-domains = <&CLUSTER_PD>; - - apps_bcm_voter: bcm-voter { - compatible = "qcom,bcm-voter"; - }; - - rpmhcc: clock-controller { - compatible = "qcom,sm4450-rpmh-clk"; - #clock-cells = <1>; - clock-names = "xo"; - clocks = <&xo_board>; - }; - }; - gcc: clock-controller@100000 { compatible = "qcom,sm4450-gcc"; reg = <0x0 0x00100000 0x0 0x1f4200>; @@ -387,12 +381,111 @@ clocks = <&rpmhcc RPMH_CXO_CLK>, <&sleep_clk>; }; + qupv3_id_0: geniqup@ac0000 { + compatible = "qcom,geni-se-qup"; + reg = <0x0 0x00ac0000 0x0 0x2000>; + ranges; + clock-names = "m-ahb", "s-ahb"; + clocks = <&gcc GCC_QUPV3_WRAP_0_M_AHB_CLK>, + <&gcc GCC_QUPV3_WRAP_0_S_AHB_CLK>; + iommus = <&apps_smmu 0x163 0x0>; + interconnects = <&clk_virt MASTER_QUP_CORE_0 0 &clk_virt SLAVE_QUP_CORE_0 0>; + interconnect-names = "qup-core"; + #address-cells = <2>; + #size-cells = <2>; + status = "disabled"; + + uart7: serial@a88000 { + compatible = "qcom,geni-debug-uart"; + reg = <0 0x00a88000 0 0x4000>; + clock-names = "se"; + clocks = <&gcc GCC_QUPV3_WRAP1_S2_CLK>; + interrupts = ; + pinctrl-names = "default"; + pinctrl-0 = <&qup_uart7_tx>, <&qup_uart7_rx>; + status = "disabled"; + }; + }; + + cnoc2: interconnect@1500000 { + compatible = "qcom,sm4450-cnoc2"; + reg = <0 0x1500000 0 0x6200>; + #interconnect-cells = <2>; + qcom,bcm-voters = <&apps_bcm_voter>; + }; + + cnoc3: interconnect@1510000 { + compatible = "qcom,sm4450-cnoc3"; + reg = <0 0x01510000 0 0xF200>; + #interconnect-cells = <2>; + qcom,bcm-voters = <&apps_bcm_voter>; + }; + + system_noc: interconnect@1680000 { + compatible = "qcom,sm4450-system-noc"; + reg = <0 0x1680000 0 0x19080>; + #interconnect-cells = <2>; + qcom,bcm-voters = <&apps_bcm_voter>; + }; + + pcie_anoc: interconnect@16c0000 { + compatible = "qcom,sm4450-pcie-anoc"; + reg = <0 0x16C0000 0 0x7080>; + #interconnect-cells = <2>; + qcom,bcm-voters = <&apps_bcm_voter>; + clocks = <&gcc GCC_AGGRE_NOC_PCIE_0_AXI_CLK>, + <&gcc GCC_CFG_NOC_PCIE_ANOC_AHB_CLK>; + }; + + aggre1_noc: interconnect@16e0000 { + tible = "qcom,sm4450-aggre1-noc"; + reg = <0 0x016e0000 0 0x1c080>; + #interconnect-cells = <2>; + clocks = <&gcc GCC_SDCC2_AHB_CLK>; + qcom,bcm-voters = <&apps_bcm_voter>; + }; + + aggre2_noc: interconnect@1700000 { + compatible = "qcom,sm4450-aggre2-noc"; + reg = <0 0x01700000 0 0x31080>; + #interconnect-cells = <2>; + qcom,bcm-voters = <&apps_bcm_voter>; + clocks = <&rpmhcc RPMH_IPA_CLK>, + <&gcc GCC_AGGRE_USB3_PRIM_AXI_CLK>; + }; + + mmss_noc: interconnect@1740000 { + compatible = "qcom,sm4450-mmss-noc"; + reg = <0 0x1740000 0 0x19080>; + #interconnect-cells = <2>; + qcom,bcm-voters = <&apps_bcm_voter>; + }; + + video_aggre_noc: interconnect@1760000 { + compatible = "qcom,sm4450-video-aggre-noc"; + reg = <0 0x1760000 0 0x1100>; + #interconnect-cells = <2>; + qcom,bcm-voters = <&apps_bcm_voter>; + }; + tcsr_mutex: hwlock@1f40000 { compatible = "qcom,tcsr-mutex"; reg = <0x0 0x01f40000 0x0 0x40000>; #hwlock-cells = <1>; }; + tcsr: syscon@1fc0000 { + compatible = "qcom,sm4450-tcsr", "syscon"; + reg = <0x0 0x1fc0000 0x0 0x30000>; + }; + + lpass_ag_noc: interconnect@3c40000 { + compatible = "qcom,sm4450-lpass-ag-noc"; + reg = <0 0x3C40000 0 0x17200>; + #interconnect-cells = <2>; + qcom,bcm-voters = <&apps_bcm_voter>; + }; + pdc: interrupt-controller@b220000 { compatible = "qcom,sm4450-pdc", "qcom,pdc"; reg = <0 0x0b220000 0 0x30000>, <0 0x174000f0 0 0x64>; @@ -403,6 +496,135 @@ interrupt-controller; }; + tlmm: pinctrl@f100000 { + compatible = "qcom,sm4450-tlmm"; + reg = <0 0x0f100000 0 0x300000>; + interrupts = ; + gpio-controller; + #gpio-cells = <2>; + interrupt-controller; + #interrupt-cells = <2>; + gpio-ranges = <&tlmm 0 0 137>; + wakeup-parent = <&pdc>; + + qup_uart7_rx: qup-uart7-rx-state { + pins = "gpio22"; + function = "qup1_se2_l2"; + drive-strength = <2>; + bias-disable; + }; + + qup_uart7_tx: qup-uart7-tx-state { + pins = "gpio22"; + function = "qup1_se2_l2"; + drive-strength = <2>; + bias-disable; + }; + }; + + apps_smmu: iommu@15000000 { + compatible = "qcom,sm4450-smmu-500", "qcom,smmu-500", "arm,mmu-500"; + reg = <0 0x15000000 0 0x100000>; + #iommu-cells = <2>; + #global-interrupts = <1>; + interrupts = , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + ; + }; + intc: interrupt-controller@17200000 { compatible = "arm,gic-v3"; reg = <0x0 0x17200000 0x0 0x10000>, /* GICD */ @@ -471,6 +693,41 @@ status = "disabled"; }; }; + + apps_rsc: rsc@17a00000 { + compatible = "qcom,rpmh-rsc"; + reg = <0 0x17a00000 0 0x10000>, + <0 0x17a10000 0 0x10000>, + <0 0x17a20000 0 0x10000>; + reg-names = "drv-0", "drv-1", "drv-2"; + interrupts = , + , + ; + label = "apps_rsc"; + qcom,tcs-offset = <0xd00>; + qcom,drv-id = <2>; + qcom,tcs-config = , , + , ; + power-domains = <&CLUSTER_PD>; + + apps_bcm_voter: bcm-voter { + compatible = "qcom,bcm-voter"; + }; + + rpmhcc: clock-controller { + compatible = "qcom,sm4450-rpmh-clk"; + #clock-cells = <1>; + clock-names = "xo"; + clocks = <&xo_board>; + }; + }; + + gem_noc: interconnect@19100000 { + compatible = "qcom,sm4450-gem-noc"; + reg = <0 0x19100000 0 0xBC080>; + #interconnect-cells = <2>; + qcom,bcm-voters = <&apps_bcm_voter>; + }; }; timer { -- 2.17.1