devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: ygardi@codeaurora.org
To: Kumar Gala <galak@codeaurora.org>
Cc: Yaniv Gardi <ygardi@codeaurora.org>,
	james.bottomley@hansenpartnership.com, hch@infradead.org,
	linux-kernel@vger.kernel.org, linux-scsi@vger.kernel.org,
	linux-arm-msm@vger.kernel.org, santoshsy@gmail.com,
	linux-scsi-owner@vger.kernel.org, subhashj@codeaurora.org,
	noag@codeaurora.org, draviv@codeaurora.org,
	Rob Herring <robh+dt@kernel.org>, Pawel Moll <pawel.moll@arm.com>,
	Mark Rutland <mark.rutland@arm.com>,
	Ian Campbell <ijc+devicetree@hellion.org.uk>,
	Vinayak Holikatti <vinholikatti@gmail.com>,
	"James E.J. Bottomley" <jbottomley@parallels.com>,
	Grant Likely <grant.likely@linaro.org>,
	Sujit Reddy Thumma <sthumma@codeaurora.org>,
	Sahitya Tummala <stummala@codeaurora.org>,
	"open list:OPEN FIRMWARE AND..." <devicetree@vger.kernel.org>
Subject: Re: [PATCH v3] scsi: ufs-msm: add UFS controller support for Qualcomm MSM chips
Date: Thu, 21 Aug 2014 09:53:48 -0000	[thread overview]
Message-ID: <026bb3e4ba9969dcfb0eca516f811e68.squirrel@www.codeaurora.org> (raw)
In-Reply-To: <F891F359-FFF1-4F72-ADEF-B023F1D50A0F@codeaurora.org>

>
> On Aug 14, 2014, at 9:22 AM, Yaniv Gardi <ygardi@codeaurora.org> wrote:
>
>> The files in this change implement the UFS HW (controller & PHY)
>> specific
>> behavior in Qualcomm MSM chips.
>>
>> Signed-off-by: Yaniv Gardi <ygardi@codeaurora.org>
>> ---
>> Documentation/devicetree/bindings/ufs/ufs-msm.txt  |   37 +
>> .../devicetree/bindings/ufs/ufshcd-pltfrm.txt      |    4 +
>> drivers/scsi/ufs/Kconfig                           |   12 +
>> drivers/scsi/ufs/Makefile                          |    4 +
>> drivers/scsi/ufs/ufs-msm-phy-qmp-20nm.c            |  254 +++++
>> drivers/scsi/ufs/ufs-msm-phy-qmp-20nm.h            |  216 ++++
>> drivers/scsi/ufs/ufs-msm-phy-qmp-28nm.c            |  368 +++++++
>> drivers/scsi/ufs/ufs-msm-phy-qmp-28nm.h            |  735 +++++++++++++
>> drivers/scsi/ufs/ufs-msm-phy.c                     |  646 ++++++++++++
>> drivers/scsi/ufs/ufs-msm-phy.h                     |  193 ++++
>
> Any reason not to put the phy driver in drivers/phy ?
Yes. Phy driver introduces a generic phy framework.
And as a framework it provides with API's, callbacks,
And data structures.
I think the right place to have the >implementation< of the ufs-msm-phy code
Is under drivers/scsi/ufs as it's more related to ufs than it's related to
the framework itself.


>
>> drivers/scsi/ufs/ufs-msm.c                         | 1105
>> ++++++++++++++++++++
>> drivers/scsi/ufs/ufs-msm.h                         |  158 +++
>> 12 files changed, 3732 insertions(+)
>> create mode 100644 Documentation/devicetree/bindings/ufs/ufs-msm.txt
>> create mode 100644 drivers/scsi/ufs/ufs-msm-phy-qmp-20nm.c
>> create mode 100644 drivers/scsi/ufs/ufs-msm-phy-qmp-20nm.h
>> create mode 100644 drivers/scsi/ufs/ufs-msm-phy-qmp-28nm.c
>> create mode 100644 drivers/scsi/ufs/ufs-msm-phy-qmp-28nm.h
>> create mode 100644 drivers/scsi/ufs/ufs-msm-phy.c
>> create mode 100644 drivers/scsi/ufs/ufs-msm-phy.h
>> create mode 100644 drivers/scsi/ufs/ufs-msm.c
>> create mode 100644 drivers/scsi/ufs/ufs-msm.h
>
> Seems like we should spit this into two patches, one for the phy and one
> for the UFS driver itself.  Maybe even three, one for the 20nm phy, one
> for the 28nm phy, and one for ufs-msm.c,h.
we could try to split it, but since we didn't split this change into
functional sub-changes, we decided to upload this change as a whole,
as one change without the other wouldn't work anyhow, and they are both
needed for proper functionality.

>
>>
>> diff --git a/Documentation/devicetree/bindings/ufs/ufs-msm.txt
>> b/Documentation/devicetree/bindings/ufs/ufs-msm.txt
>> new file mode 100644
>> index 0000000..b5caace
>> --- /dev/null
>> +++ b/Documentation/devicetree/bindings/ufs/ufs-msm.txt
>
> This should probably be bindings/phy/qcom-ufs-phy.txt
>
>> @@ -0,0 +1,37 @@
>> +* MSM Universal Flash Storage (UFS) PHY
>> +
>> +UFSPHY nodes are defined to describe on-chip UFS PHY hardware macro.
>> +Each UFS PHY node should have its own node.
>> +
>> +To bind UFS PHY with UFS host controller, the controller node should
>> +contain a phandle reference to UFS PHY node.
>> +
>> +Required properties:
>> +- compatible        : compatible list, contains
>> "qcom,ufs-msm-phy-qmp-28nm"
>> +                      or "qcom,ufs-msm-phy-qmp-20nm" according to the
>> relevant
>> +                      phy in use
>
> Do we really need ‘-msm’ in the compat name?
>
>> +- reg               : <registers mapping>
>> +- #phy-cells         : This property shall be set to 0
>> +- vdda-phy-supply   : phandle to main PHY supply for analog domain
>> +- vdda-pll-supply   : phandle to PHY PLL and Power-Gen block power
>> supply
>> +
>> +Optional properties:
>> +- vdda-phy-max-microamp : specifies max. load that can be drawn from
>> phy supply
>> +- vdda-pll-max-microamp : specifies max. load that can be drawn from
>> pll supply
>> +
>> +Example:
>> +
>> +	ufsphy1: ufsphy@0xfc597000 {
>> +		compatible = "qcom,ufs-msm-phy-qmp-28nm";
>> +		reg = <0xfc597000 0x800>;
>> +		#phy-cells = <0>;
>> +		vdda-phy-supply = <&pma8084_l4>;
>> +		vdda-pll-supply = <&pma8084_l12>;
>> +		vdda-phy-max-microamp = <50000>;
>> +		vdda-pll-max-microamp = <1000>;
>> +	};
>> +
>> +	ufshc@0xfc598000 {
>> +		...
>> +		phys = <&ufsphy1>;
>> +	};
>> diff --git a/Documentation/devicetree/bindings/ufs/ufshcd-pltfrm.txt
>> b/Documentation/devicetree/bindings/ufs/ufshcd-pltfrm.txt
>> index e73a619..378585c 100644
>> --- a/Documentation/devicetree/bindings/ufs/ufshcd-pltfrm.txt
>> +++ b/Documentation/devicetree/bindings/ufs/ufshcd-pltfrm.txt
>> @@ -9,6 +9,9 @@ Required properties:
>> - reg               : <registers mapping>
>>
>> Optional properties:
>> +- phys			: phandle to UFS PHY node
>> +- phy-names		: the string "ufs_msm_phy" when is found in a node, along
>> +			  with "phys" attribute, provides phandle to UFS PHY node
>
> seems like the phy-names should be more generic like “ufsphy"
>
>> - vcc-supply            : phandle to VCC supply regulator node
>> - vccq-supply           : phandle to VCCQ supply regulator node
>> - vccq2-supply          : phandle to VCCQ2 supply regulator node
>> @@ -39,6 +42,7 @@ Example:
>> 		reg = <0xfc598000 0x800>;
>> 		interrupts = <0 28 0>;
>>
>> +		ufs-phy = <&ufsphy>;
>> 		vcc-supply = <&xxx_reg1>;
>> 		vcc-supply-1p8;
>> 		vccq-supply = <&xxx_reg2>;
>
>
>> diff --git a/drivers/scsi/ufs/Kconfig b/drivers/scsi/ufs/Kconfig
>> index 6e07b2a..a8259e0 100644
>> --- a/drivers/scsi/ufs/Kconfig
>> +++ b/drivers/scsi/ufs/Kconfig
>> @@ -70,3 +70,15 @@ config SCSI_UFSHCD_PLATFORM
>> 	If you have a controller with this interface, say Y or M here.
>>
>> 	  If unsure, say N.
>> +
>> +config SCSI_UFS_MSM
>> +	bool "MSM specific hooks to UFS controller platform driver"
>> +	depends on SCSI_UFSHCD_PLATFORM && ARCH_MSM
>
> This should probably be ARCH_QCOM instead of ARCH_MSM
>
>> +	help
>> +	  This selects the MSM specific additions to UFSHCD platform driver.
>> +	  UFS host on MSM needs some vendor specific configuration before
>> +	  accessing the hardware which includes PHY configuration and vendor
>> +	  specific registers.
>> +
>> +	  Select this if you have UFS controller on MSM chipset.
>> +	  If unsure, say N.
>
> [ snip ]
>
> - k
> --
> Employee of Qualcomm Innovation Center, Inc.
> Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted
> by The Linux Foundation
>
>

  reply	other threads:[~2014-08-21  9:53 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-14 14:22 [PATCH v3] scsi: ufs-msm: add UFS controller support for Qualcomm MSM chips Yaniv Gardi
2014-08-14 14:27 ` Yaniv Gardi
2014-08-14 15:03 ` Kumar Gala
2014-08-21  9:53   ` ygardi [this message]
2014-08-16 17:33 ` Dan Aloni
2014-08-24 13:51   ` Yaniv Gardi
  -- strict thread matches above, loose matches on Subject: below --
2014-08-22  0:50 subhashj

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=026bb3e4ba9969dcfb0eca516f811e68.squirrel@www.codeaurora.org \
    --to=ygardi@codeaurora.org \
    --cc=devicetree@vger.kernel.org \
    --cc=draviv@codeaurora.org \
    --cc=galak@codeaurora.org \
    --cc=grant.likely@linaro.org \
    --cc=hch@infradead.org \
    --cc=ijc+devicetree@hellion.org.uk \
    --cc=james.bottomley@hansenpartnership.com \
    --cc=jbottomley@parallels.com \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi-owner@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=noag@codeaurora.org \
    --cc=pawel.moll@arm.com \
    --cc=robh+dt@kernel.org \
    --cc=santoshsy@gmail.com \
    --cc=sthumma@codeaurora.org \
    --cc=stummala@codeaurora.org \
    --cc=subhashj@codeaurora.org \
    --cc=vinholikatti@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).