Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp2073503imm; Thu, 18 Oct 2018 08:39:07 -0700 (PDT) X-Google-Smtp-Source: ACcGV61MXbDTBNHxZs9obW7uJol/yGWNqpKaoIdsR9TfG85Hk/E8TSHOjR1pnIe9+1SQ45IfRQ9+ X-Received: by 2002:a63:904a:: with SMTP id a71-v6mr29647253pge.264.1539877147159; Thu, 18 Oct 2018 08:39:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539877147; cv=none; d=google.com; s=arc-20160816; b=vOQ5POwfZFBO5lZRjqND9/v7TL+BA2/5ZEWK6NZBQjkqHV9iCx8FWgQmWOKkCdsVT/ P8EyWLos/VOLJjrcKxIcZ7rHBJdNEFE4N5ytSafQPduQ85X6yfsk4lT6eGiI/dR1JzFV g5FchVXfRE4vkSeOQsW4JRS2oyDXCAjElrP/kjOM91eePoJ1vfGvpaQpy27+XrFAOaBA Rij0T+lkQ/eDEsDM5RWIKi3usHDAYjoRYhyXp660SR6zX1D7yIQLqY89orJdIs1g2e6w Cjo3d4mgJGUvHCYdH9Hmmqol6RkKy111N9TT/SGdVn8n6beF3KB9kWf7pv7gi26833WH FrMQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=eXrfVk16zNXEqijFqlsEMsOQlU7crDJ5P5ug1ROucUM=; b=lmgI7WrzoUtbECLOEV/5UarqVy0QSItM7aujS101Johb3pz9ETAwn4Wu61z5aJbj35 +K5GnVPdXcit5DmrQv8hE4rTcTc7ZO+FIrW67B9jQ5jVQhu9IsynnyxdAcyP1TQETj5B ghCqlACOqv4BF9FqhxkpNPsb0QlV45h68QM5tcbLEmKhf6Vw/1+oUndMaVO5Lpah2jEj 6snw8taXuhhDenkLWFfwRCnE3qdT36De0SpViKl+6N95t5xvRFMMMVU4F+D5nqR+I16c DhLUESaOmgxoCtGOD0BnwZ/RZVTA456sitc3uQNtsrZxeaCdvYh2sHhbBdmJzt9bSJwV sixA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=mjFqUj2v; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l191-v6si21034239pgd.543.2018.10.18.08.38.51; Thu, 18 Oct 2018 08:39:07 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=mjFqUj2v; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728388AbeJRXjy (ORCPT + 99 others); Thu, 18 Oct 2018 19:39:54 -0400 Received: from mail-lj1-f195.google.com ([209.85.208.195]:33841 "EHLO mail-lj1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728366AbeJRXjy (ORCPT ); Thu, 18 Oct 2018 19:39:54 -0400 Received: by mail-lj1-f195.google.com with SMTP id j17-v6so28165085lja.1 for ; Thu, 18 Oct 2018 08:38:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=eXrfVk16zNXEqijFqlsEMsOQlU7crDJ5P5ug1ROucUM=; b=mjFqUj2vDnm86NQaMjr2quDc/CblqcQqcEVIQ+TwDciXynfsmLIy9tGOAKjXjzJW1O Xd2RmcSz20lDINXkAjmlP9AoqlVgA3wqyWomTgJdKyMaOo25Fkxvdz3kttihf/4CITlc ORzjBzrr/PUSK6xnH0rRO5lnfQIlEKqFYaOc8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=eXrfVk16zNXEqijFqlsEMsOQlU7crDJ5P5ug1ROucUM=; b=cLN+l8Gn6xfnlldoplqR3fn8v50hYcUpB4bosR7UH/U0dDrJs+hQwvKjCft1Ht1R8e vdWxlkTbMGLuA06bRwtof7EWJ7xdsqn7Hc2bCQozB+4XLAzaqmZAUksG6P/YBbVbo/H9 Cay+EDXoMS4vyWY08+RpSO+gx6jseudg2X0vOF3H3corNt0qC9JTX/rvU4sp7551GuEg jovDHO3Z/ajDPkCYLnnajKLFg1z1q6dUAlulS8i/9d0Y4WiKFIoPppq3zgzFGV5fttt/ 9N+N/jzepT3W2/pU5O2C33qSjRRlbBggIn4n0WYFAammVxHs7WbNCXy1ezUN0s6RJhCu mYpw== X-Gm-Message-State: ABuFfoi5fpPkxPu0IpUcVdmDLDdHjfgecfzrEOxKvRvs+Vki62qOF6xv dz5lMgbDAAbIhbUg3Nf8NGy/gstHQ+0= X-Received: by 2002:a2e:8257:: with SMTP id j23-v6mr17587910ljh.38.1539877098340; Thu, 18 Oct 2018 08:38:18 -0700 (PDT) Received: from mail-lj1-f180.google.com (mail-lj1-f180.google.com. [209.85.208.180]) by smtp.gmail.com with ESMTPSA id n3-v6sm4424232lfe.8.2018.10.18.08.38.15 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 18 Oct 2018 08:38:15 -0700 (PDT) Received: by mail-lj1-f180.google.com with SMTP id p89-v6so28161918ljb.3 for ; Thu, 18 Oct 2018 08:38:15 -0700 (PDT) X-Received: by 2002:a2e:7c18:: with SMTP id x24-v6mr2062724ljc.174.1539877095144; Thu, 18 Oct 2018 08:38:15 -0700 (PDT) MIME-Version: 1.0 References: <20181017172312.194281-1-evgreen@chromium.org> <20181017172312.194281-2-evgreen@chromium.org> In-Reply-To: From: Evan Green Date: Thu, 18 Oct 2018 08:37:37 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 1/2] arm64: dts: qcom: sdm845: add UFS controller To: vivek.gautam@codeaurora.org Cc: Andy Gross , David Brown , robh+dt@kernel.org, mark.rutland@arm.com, linux-arm-msm@vger.kernel.org, linux-soc@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, swboyd@chromium.org, Doug Anderson Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Oct 18, 2018 at 4:33 AM Vivek Gautam wrote: > > Hi Evan, > > On Wed, Oct 17, 2018 at 10:55 PM Evan Green wrote: > > > > This change adds the UFS controller and PHY to SDM845. > > > > Signed-off-by: Evan Green > > Signed-off-by: Douglas Anderson > > --- > > arch/arm64/boot/dts/qcom/sdm845.dtsi | 66 ++++++++++++++++++++++++++++++++++++ > > 1 file changed, 66 insertions(+) > > > > diff --git a/arch/arm64/boot/dts/qcom/sdm845.dtsi b/arch/arm64/boot/dts/qcom/sdm845.dtsi > > index b72bdb0a31a5..20b2c258816a 100644 > > --- a/arch/arm64/boot/dts/qcom/sdm845.dtsi > > +++ b/arch/arm64/boot/dts/qcom/sdm845.dtsi > > @@ -808,6 +808,72 @@ > > }; > > }; > > > > + ufshc1: ufshc@1d84000 { > > + compatible = "qcom,sdm845-ufshc", "qcom,ufshc", > > + "jedec,ufs-2.0"; > > + reg = <0x1d84000 0x2500>; > > + interrupts = ; > > + phys = <&ufsphy1_lanes>; > > + phy-names = "ufsphy"; > > + lanes-per-direction = <2>; > > + power-domains = <&gcc UFS_PHY_GDSC>; > > + > > + clock-names = > > + "core_clk", > > + "bus_aggr_clk", > > + "iface_clk", > > + "core_clk_unipro", > > + "ref_clk", > > + "tx_lane0_sync_clk", > > + "rx_lane0_sync_clk", > > + "rx_lane1_sync_clk"; > > + clocks = > > + <&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>; > > + freq-table-hz = > > + <50000000 200000000>, > > + <0 0>, > > + <0 0>, > > + <37500000 150000000>, > > + <0 0>, > > + <0 0>, > > + <0 0>, > > + <0 0>; > > + > > + resets = <&gcc GCC_UFS_PHY_BCR>; > > + reset-names = "rst"; > > + > > + status = "disabled"; > > + }; > > + > > + ufsphy1: ufsphy@1d87000 { > > nit: s/ufsphy@1d87000/phy@1d87000 Ok, will change. > > > + compatible = "qcom,sdm845-qmp-ufs-phy"; > > + reg = <0x1d87000 0x18c>; > > + #clock-cells = <1>; > > why do we need this clock-cells? ufsphy i think is not providing any > clocks. Is it? Right. USB provides the pipe clock, but you're right, UFS doesn't provide any clocks, so I'll remove. > Rest looks good. > > Best regards > Vivek > > > + #address-cells = <1>; > > + #size-cells = <1>; > > + ranges; > > + clock-names = "ref", > > + "ref_aux"; > > + clocks = <&gcc GCC_UFS_MEM_CLKREF_CLK>, > > + <&gcc GCC_UFS_PHY_PHY_AUX_CLK>; > > + > > + status = "disabled"; > > + > > + ufsphy1_lanes: lanes@1d87400 { > > + reg = <0x1d87400 0x108>, > > + <0x1d87600 0x1e0>, > > + <0x1d87c00 0x1dc>; Doug, Stephen and I were looking more at the PHY driver and realized it overreaches its registers here by adding 0x400 to get at the second lane. We found this unappealing. Our current thinking is to add two more reg regions here and fix up the binding, so that tx2 and rx2 are properly specified. I'll try to come up with that patch today and resend along with this. -Evan