Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp121292rdb; Mon, 4 Dec 2023 23:51:22 -0800 (PST) X-Google-Smtp-Source: AGHT+IFlZipU+LL6JrXl4n8EpsmqpA0laSrVxM+AQR/8r7NayGsxaMaVhUOr5QSGy+k7mKLmxq/N X-Received: by 2002:a05:6a20:7faa:b0:18c:8db0:2a2c with SMTP id d42-20020a056a207faa00b0018c8db02a2cmr22840155pzj.17.1701762682018; Mon, 04 Dec 2023 23:51:22 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701762681; cv=none; d=google.com; s=arc-20160816; b=H8z4r+MArnFdBX/WD+spa5lBSjGUNADeWeDZD5+QpN4+N2umD/86R9w22MPerUrizI 6i+xByXjpQBiQlf9vuiIEofbdEjUrBJC6J5EIdCnGGx0nfZdW9gQTj3SX8ogiK+F5u/0 5t+wKIRuv3JCGA3sFodyHDFDa8imwvbLbM7gXWgzObZxSwQUZOXi30ejpxrxnNLpAOiI 445SCh44uzGsHzkftJ1DOQIi2a9y7ukGTpEckn41tmK9yDQemgX7u7HM3Ix2nN/3lneb rCYMJUrvi8vIK6ADFz5A8kcPXzDxx9bX6aMQV8uRj9/LxePyff93IQA6Hrvb2VJuJzpj GsBA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:references:to:from:subject:cc :message-id:date:content-transfer-encoding:mime-version :dkim-signature; bh=HyuJyxUi/Di3ImMftt85DOYwPWljWaiyyMsVFy/09DE=; fh=F7+Js+2vTdwSjlgm8CPoh1KAue/oZgqseRqwmsPZAJM=; b=KTmSY1WKFxX2/8inFB/xJ1O/eqUhsm8wpQi9n5Kx0Va8VwSsWADdMAbAjLxmdQAoBk Aamftr2Vz/tbFydxD1B+NTl2Kb0MMdLVpLmupyD1jFFJW9sJXUb1CAGjXUvHDObMAZBg PQqUF92bywilNGh7C3FGobpbr4XzJVr8dAYkale8L0lAIBDAasKI1r7DHAxrgKlgt6eQ /SwUB9ZdVJn+yMA9HJ7bdqMtB/WEL7UakyGjufpwheJqcbbf5yGWFQl0vyy9p7SJAt45 RaOoG18XbXk0RCRG3Uhid+SkGze0VVC3h7O70yTv3fmzcmTjLTNGu6JLhtlguJNjzQWg peZw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@fairphone.com header.s=fair header.b=aMt0c9fP; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=fairphone.com Return-Path: Received: from lipwig.vger.email (lipwig.vger.email. [2620:137:e000::3:3]) by mx.google.com with ESMTPS id p2-20020a170902eac200b001c60c5bbff2si881443pld.201.2023.12.04.23.51.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 Dec 2023 23:51:21 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) client-ip=2620:137:e000::3:3; Authentication-Results: mx.google.com; dkim=pass header.i=@fairphone.com header.s=fair header.b=aMt0c9fP; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=fairphone.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id 2E97A8047D41; Mon, 4 Dec 2023 23:51:19 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344655AbjLEHvE (ORCPT + 99 others); Tue, 5 Dec 2023 02:51:04 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42234 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231696AbjLEHvD (ORCPT ); Tue, 5 Dec 2023 02:51:03 -0500 Received: from mail-ej1-x632.google.com (mail-ej1-x632.google.com [IPv6:2a00:1450:4864:20::632]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D0A2E109 for ; Mon, 4 Dec 2023 23:51:07 -0800 (PST) Received: by mail-ej1-x632.google.com with SMTP id a640c23a62f3a-a1b68ae40efso257156966b.0 for ; Mon, 04 Dec 2023 23:51:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fairphone.com; s=fair; t=1701762666; x=1702367466; darn=vger.kernel.org; h=in-reply-to:references:to:from:subject:cc:message-id:date :content-transfer-encoding:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=HyuJyxUi/Di3ImMftt85DOYwPWljWaiyyMsVFy/09DE=; b=aMt0c9fPfP8qqAIN9CfLZgG9ylV0LZhFN11LbzoPd1TLgc+C0dZzdub5qgfAjuzQl1 t3t4HTZHtOrvVO7hsjrQnXfLES6Obx9ULohP0o5XucMSRDpto+Nagaq+1m/xCFZP7i/c fgF9+TYa+t9e/w/CZeKMlqSMZE0424HIs+tr7MyWWtYxfYLun50upedPMa7Nf5UgB/gD himKFPpghY7ZyKGj8QQ4HWVxOid3WrpXWdheICYQMcadOcbf2Ldkl2iCsedqCWfJhXoj 2RjiYoMQqm/wc7uWuRbxDBJXUmbkp8FEDQcZvaV4sKbEP3EhkIxR4zcW5LmJ0sc2VPj1 T+Dw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701762666; x=1702367466; h=in-reply-to:references:to:from:subject:cc:message-id:date :content-transfer-encoding:mime-version:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=HyuJyxUi/Di3ImMftt85DOYwPWljWaiyyMsVFy/09DE=; b=o0DrB403F9FowWcN2LnKALvUY8nqbT+vf0xxETP0nnrufxOfjr/qLRr3CaiRIvXC1S 9b6FxmzcqNojRDGpR2m7AaHq+0n0C0tVKg9TQtsrbUSY7b9Z992wbrH+DfSSbu274jlc iYF+4ZE0KRgftTVq9Ec8suMHY0xsGpr+LDKSZ+I/g5n2Q3pPUHC0zlr3cvHlOLjrQ15m M+Fp42FgyGvKngx0hD1qldYPBOzIeyMSg/f9by2cg+ZE9yaqDz45D0rf+MlI2RJ6JHo5 xwwYAdaz6NzKIcgWw1WjrxNsYeKNsUxqXgEh8ky6ayu13zCsjOQt+O8USABb8bEqFbrF B5bA== X-Gm-Message-State: AOJu0YxhOiUPl+Hw9YuYczyhvKTo3HCrI/78Mczci5M6sBXZr5gsZl7P 8zes9jpqBzY9eXNTM1Tm9ht5xA== X-Received: by 2002:a17:907:1003:b0:a19:736f:fa25 with SMTP id ox3-20020a170907100300b00a19736ffa25mr3792405ejb.46.1701762666286; Mon, 04 Dec 2023 23:51:06 -0800 (PST) Received: from localhost (144-178-202-138.static.ef-service.nl. [144.178.202.138]) by smtp.gmail.com with ESMTPSA id lr25-20020a170906fb9900b00a19a073e946sm5259853ejb.124.2023.12.04.23.51.05 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 04 Dec 2023 23:51:05 -0800 (PST) Mime-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8 Date: Tue, 05 Dec 2023 08:51:05 +0100 Message-Id: Cc: "Nitin Rawat" , "Andy Gross" , "Bjorn Andersson" , "Konrad Dybcio" , "Alim Akhtar" , "Avri Altman" , "Bart Van Assche" , "Rob Herring" , "Krzysztof Kozlowski" , "Conor Dooley" , , <~postmarketos/upstreaming@lists.sr.ht>, , , , , Subject: Re: [PATCH v5 2/3] arm64: dts: qcom: sc7280: Add UFS nodes for sc7280 soc From: "Luca Weiss" To: "Manivannan Sadhasivam" X-Mailer: aerc 0.15.2 References: <20231204-sc7280-ufs-v5-0-926ceed550da@fairphone.com> <20231204-sc7280-ufs-v5-2-926ceed550da@fairphone.com> <621388b9-dcee-4af2-9763-e5d623d722b7@quicinc.com> <20231204172829.GA69580@thinkpad> In-Reply-To: <20231204172829.GA69580@thinkpad> X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.vger.email 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 (lipwig.vger.email [0.0.0.0]); Mon, 04 Dec 2023 23:51:19 -0800 (PST) On Mon Dec 4, 2023 at 6:28 PM CET, Manivannan Sadhasivam wrote: > On Mon, Dec 04, 2023 at 01:21:42PM +0100, Luca Weiss wrote: > > On Mon Dec 4, 2023 at 1:15 PM CET, Nitin Rawat wrote: > > > > > > > > > On 12/4/2023 3:54 PM, Luca Weiss wrote: > > > > From: Nitin Rawat > > > >=20 > > > > Add UFS host controller and PHY nodes for sc7280 soc. > > > >=20 > > > > Signed-off-by: Nitin Rawat > > > > Reviewed-by: Konrad Dybcio > > > > Tested-by: Konrad Dybcio # QCM6490 FP5 > > > > [luca: various cleanups and additions as written in the cover lette= r] > > > > Signed-off-by: Luca Weiss > > > > --- > > > > arch/arm64/boot/dts/qcom/sc7280.dtsi | 74 +++++++++++++++++++++++= ++++++++++++- > > > > 1 file changed, 73 insertions(+), 1 deletion(-) > > > >=20 > > > > diff --git a/arch/arm64/boot/dts/qcom/sc7280.dtsi b/arch/arm64/boot= /dts/qcom/sc7280.dtsi > > > > index 04bf85b0399a..8b08569f2191 100644 > > > > --- a/arch/arm64/boot/dts/qcom/sc7280.dtsi > > > > +++ b/arch/arm64/boot/dts/qcom/sc7280.dtsi > > > > @@ -15,6 +15,7 @@ > > > > #include > > > > #include > > > > #include > > > > +#include > > > > #include > > > > #include > > > > #include > > > > @@ -906,7 +907,7 @@ gcc: clock-controller@100000 { > > > > clocks =3D <&rpmhcc RPMH_CXO_CLK>, > > > > <&rpmhcc RPMH_CXO_CLK_A>, <&sleep_clk>, > > > > <0>, <&pcie1_phy>, > > > > - <0>, <0>, <0>, > > > > + <&ufs_mem_phy 0>, <&ufs_mem_phy 1>, <&ufs_mem_phy 2>, > > > > <&usb_1_qmpphy QMP_USB43DP_USB3_PIPE_CLK>; > > > > clock-names =3D "bi_tcxo", "bi_tcxo_ao", "sleep_clk", > > > > "pcie_0_pipe_clk", "pcie_1_pipe_clk", > > > > @@ -2238,6 +2239,77 @@ pcie1_phy: phy@1c0e000 { > > > > status =3D "disabled"; > > > > }; > > > > =20 > > > > + ufs_mem_hc: ufs@1d84000 { > > > > + compatible =3D "qcom,sc7280-ufshc", "qcom,ufshc", > > > > + "jedec,ufs-2.0"; > > > > + reg =3D <0x0 0x01d84000 0x0 0x3000>; > > > > + interrupts =3D ; > > > > + phys =3D <&ufs_mem_phy>; > > > > + phy-names =3D "ufsphy"; > > > > + lanes-per-direction =3D <2>; > > > > + #reset-cells =3D <1>; > > > > + resets =3D <&gcc GCC_UFS_PHY_BCR>; > > > > + reset-names =3D "rst"; > > > > + > > > > + power-domains =3D <&gcc GCC_UFS_PHY_GDSC>; > > > > + required-opps =3D <&rpmhpd_opp_nom>; > > > > + > > > > + iommus =3D <&apps_smmu 0x80 0x0>; > > > > + dma-coherent; > > > > + > > > > + interconnects =3D <&aggre1_noc MASTER_UFS_MEM QCOM_ICC_TAG_ALWA= YS > > > > + &mc_virt SLAVE_EBI1 QCOM_ICC_TAG_ALWAYS>, > > > > + <&gem_noc MASTER_APPSS_PROC QCOM_ICC_TAG_ALWAYS > > > > + &cnoc2 SLAVE_UFS_MEM_CFG QCOM_ICC_TAG_ALWAYS>; > > > > + interconnect-names =3D "ufs-ddr", "cpu-ufs"; > > > > + > > > > + clocks =3D <&gcc GCC_UFS_PHY_AXI_CLK>, > > > > + <&gcc GCC_AGGRE_UFS_PHY_AXI_CLK>, > > > > + <&gcc GCC_UFS_PHY_AHB_CLK>, > > > > + <&gcc GCC_UFS_PHY_UNIPRO_CORE_CLK>, > > > > + <&rpmhcc RPMH_CXO_CLK>, > > > > + <&gcc GCC_UFS_PHY_TX_SYMBOL_0_CLK>, > > > > + <&gcc GCC_UFS_PHY_RX_SYMBOL_0_CLK>, > > > > + <&gcc GCC_UFS_PHY_RX_SYMBOL_1_CLK>; > > > > + clock-names =3D "core_clk", > > > > + "bus_aggr_clk", > > > > + "iface_clk", > > > > + "core_clk_unipro", > > > > + "ref_clk", > > > > + "tx_lane0_sync_clk", > > > > + "rx_lane0_sync_clk", > > > > + "rx_lane1_sync_clk"; > > > > + freq-table-hz =3D > > > > + <75000000 300000000>, > > > > + <0 0>, > > > > + <0 0>, > > > > + <75000000 300000000>, > > > > + <0 0>, > > > > + <0 0>, > > > > + <0 0>, > > > > + <0 0>; > > > > + status =3D "disabled"; > > > > + }; > > > > + > > > > + ufs_mem_phy: phy@1d87000 { > > > > + compatible =3D "qcom,sc7280-qmp-ufs-phy"; > > > > + reg =3D <0x0 0x01d87000 0x0 0xe00>; > > > > + clocks =3D <&rpmhcc RPMH_CXO_CLK>, > > > > + <&gcc GCC_UFS_PHY_PHY_AUX_CLK>, > > > > + <&gcc GCC_UFS_1_CLKREF_EN>; > > > > + clock-names =3D "ref", "ref_aux", "qref"; > > > > + > > > > + power-domains =3D <&gcc GCC_UFS_PHY_GDSC>; > >=20 > > Hi Nitin, > >=20 > > > > > > GCC_UFS_PHY_GDSC is UFS controller GDSC. For sc7280 Phy we don't need= this. > >=20 > > In the current dt-bindings the power-domains property is required. > >=20 > > Is there another power-domain for the PHY to use, or do we need to > > adjust the bindings to not require power-domains property for ufs phy o= n > > sc7280? > >=20 > > PHYs are backed by MX power domain. So you should use that. Sounds reasonable (though I understand little how the SoC is wired up internally). > > > Also, with "PHY" in the name, it's interesting that this is not for the > > phy ;) > >=20 > > Yes, confusing indeed. But the controllers (PCIe, UFS, USB etc...) are ba= cked by > GDSCs and all the analog components (PHYs) belong to MX domain since it i= s kind > of always ON. > > I'll submit a series to fix this for the rest of the SoCs. Great! So I'll send v6 with power-domains =3D <&rpmhpd SC7280_MX>; for the phy. Regards Luca > > - Mani > > > Regards > > Luca > >=20 > > > > > > > + > > > > + resets =3D <&ufs_mem_hc 0>; > > > > + reset-names =3D "ufsphy"; > > > > + > > > > + #clock-cells =3D <1>; > > > > + #phy-cells =3D <0>; > > > > + > > > > + status =3D "disabled"; > > > > + }; > > > > + > > > > ipa: ipa@1e40000 { > > > > compatible =3D "qcom,sc7280-ipa"; > > > > =20 > > > >=20 > >=20