Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 59fc0cc3 authored by Can Guo's avatar Can Guo
Browse files

Merge remote-tracking branch 'origin/dev/msm-next-ufs_port' into msm-next



* origin/dev/msm-next-ufs_port:
  Linux 4.13-rc3
  ARM: dts: msm: enable UFS support on SDM855 RUMI platform
  ARM: dts: msm: Add UFS support for SDM855
  defconfig: arm64: Enable UFSHCD_CMD_LOGGING flag
  defconfig: sdm845: enable CONFIG_UFS_FAULT_INJECTION
  phy: qcom-ufs-qmp-v3: use CDR DIV4 in all bands and fastlock
  phy: qcom-ufs-qmp-v3: fix UFS NOP Timeout
  scsi: ufs: Avoid dead lock during error recovery
  scsi: ufs: add hot plug support for removable UFS cards
  scsi: ufs: update ufs command logging infrastructure
  scsi: ufs: fix unclocked register access
  scsi: ufs: Add states to debug abnormal clocks turn off
  scsi: ufs: fix /proc/interrupts shows same action name
  scsi: ufs: add command logging infrastructure
  scsi: ufs: fix issue with scaling up gear
  scsi: ufs: fix error handing during hibern8 enter
  scsi: ufs: Abort gating if clock on request is pending
  scsi: ufs: scale up the gear in 2 steps
  scsi: ufs: prevent auto-hibern8 trigger during clock frequency scaling
  scsi: ufs: remove printing dumps after link startup failure
  phy: qcom-ufs-qmp-v3: separate out 2 lanes configuration
  phy: qcom-ufs-qmp-v3: remove legacy v3 phy support
  phy: qcom-ufs: set no runtime PM callbacks flag
  phy: qcom-ufs: parse ref-clk details prior to resource request
  scsi: ufs-qcom: Control ufs-ref-clk-supply from host node
  scsi: ufs: full reinit upon resume if link was off
  scsi: ufs: handle LINERESET error only during hibern8 enter
  scsi: ufs: renable AH8 timer on reset
  ufs: add additional sync between ice work queue and pending request
  scsi: ufs: validate input args to queuecommand
  scsi: ufs: fix ufshcd_hold deadlock
  ufs: fixed bugs in ice related to key syncronization
  scsi: ufs: handle auto hibern8 failure
  scsi: ufs: Add clock ungating to a separate workqueue
  msm: Rename msmfalcon/apqfalcon to sdm660/sda660
  scsi: ufs: fix deadlock between clock scaling and shutdown
  scsi: ufs-qcom: skip err message for optional clk
  scsi: ufs: fixed DUN size for ICE encryption to be 4k
  phy: ufs: add UFS PHY support for msmfalcon
  scsi: ufs: fix irq return code
  scsi: ufs: make sure all interrupts are processed
  phy: qcom-ufs: Modify the vdd-phy min-max range
  scsi: ufs: fix shutdown race condition
  phy: qcom-ufs-qmp-v3: increase the minimum time in hibernate
  scsi: ufs: add UFS device reset support
  scsi: ufs: perform full reset at initialization
  scsi: ufs-qcom: update delay between assert/deassert in full reset
  Revert "scsi: ufs: disable ah8 during suspend and enable it on resume"
  scsi: ufs: error out all issued requests after shutdown
  Revert "scsi: ufs: stub UFS shutdown handler"
  scsi: ufs-qcom: update clock scaling sequence
  scsi: ufs: enable auto hibern8 only after device initialization
  scsi: ufs: fix sleep in atomic context
  phy: qcom-ufs: update ufs phy 1-lane settings
  scsi: ufs: handle LINERESET during hibern8
  scsi: ufs-qcom: avoid sleep in atomic context
  scsi: ufs: gate ref_clk during aggressive clk gating
  scsi: ufs: reduce auto hibern8 timeout to save power
  scsi: ufs: do clock gating only after hibern8
  Revert "scsi: ufs: gate ref_clk during aggressive clk gating"
  scsi: ufs_test: fix use after free issue
  scsi: ufs: gate ref_clk during aggressive clk gating
  scsi: ufs-debugfs: Fix hba access
  phy: qcom-ufs: remove warnings for optional clocks
  scsi: ufs-qcom: configure ufs clocks core memory
  phy: qcom-ufs-qmp-v3: add ops to dump phy regs
  scsi: ufs: export set_bus_vote ops
  scsi: ufs-qcom: skip svs2 configuration for newer controllers
  phy: qcom-ufs-qmp-v3: add 2 lane phy support
  phy: qcom-ufs: update ufs phy settings
  scsi: ufs: fix race between hibern8 failure recovery and error handler
  scsi: ufs: kick start clock scaling only after device detection
  scsi: ufs-qcom: disable hibern8 during clk gating
  scsi: ufs: disable ah8 during suspend and enable it on resume
  scsi: ufs: return appropriate error code
  drivers: Fix compiler warnings
  scsi: ufs: Fix suspicious indents
  msm: Rename msmskunk and sdmbat to sdm845 and sdm830
  ANDROID: MMC/UFS IO Latency Histograms.
  scsi: ufs: prefix host device name for hex dumps
  scsi: ufs-qcom: increase max UFS host count to 2
  scsi: ufs-debugfs: change the root dir name to device name
  scsi: ufs: clear and apply dev_quirks on every device probe
  scsi: ufs: clear unit attention after every new device probe
  scsi: ufs-qcom: remove androidboot.bootdevice check
  scsi: ufs: don't try adding boot and rpmb lun if not supported
  scsi: ufs: read device descriptor once
  scsi: ufs: set the device reference clock setting
  scsi: ufs: ignore unavailability of VCCQ for bActiveICCLevel setting
  scsi: ufs: fix handling of bActiveICCLevel
  scsi: ufs: don't rely on prefetched data
  scsi: ufs: add 2 lane support
  phy: qcom-ufs: remove obsolute PHY drivers
  scsi: ufs: add option to override the command timeout
  scsi: add option to override the command timeout
  phy: qcom-ufs-qrbtc-msmskunk: add phy support for msmskunk emulation
  scsi: ufs: add support to limit the gear speed
  scsi: ufs-qcom: remove broken hci version quirk
  scsi: ufs: Crash the system on unrecoverable state
  scsi: ufs-debugfs: add error state
  scsi: ufs: ICE 3.0 changes
  scsi: ufs-qcom : Add quirk for broken auto hibern8
  scsi: ufs-qcom: add svs2 support
  scsi: ufs: add new get_scale_down_gear vops
  phy: qcom-ufs: add svs2 support
  scsi: ufs-qcom: add auto hibern8 support
  scsi: ufs: add ufshcd_dme_rmw wrapper
  scsi: ufs: add auto hibern8 support
  phy: ufs-qcom: add optional ref aux clk
  phy: qcom-ufs: update pll max voltage
  scsi: ufs: qcom-ice: block further requests until ICE config is complete
  crypto: ice: split the config callback
  PFK: fix race between key set and key invalidate in TZ
  scsi: ufs-qcom: Fix bus scaling usage in UFS driver
  phy: qcom-ufs: update pll min/max voltage
  phy: qcom-ufs: update new phy offsets and calibration data
  scsi: ufs: increase the scsi query response timeout
  ufs: qcom: add dts property to disable LPM modes
  scsi: ufs-qcom-ice: add support to print UFS ICE debug registers
  scsi: ufs: fix deadlock between clock scaling and clock ungating work
  phy: phy-qcom-ufs: separate U11 user registers from phy registers
  phy: phy-qcom-ufs: don't probe for "dev_ref_clk_ctrl_mem"
  uapi: scsi: add missing header dependencies
  scsi: ufs-qcom: ifdef msm bus scaling code appropriately
  phy: qcom-ufs-qmp-14nm: disable filler symbol relock
  phy: qcom-ufs-qmp-14nm: update rx min stall noconfig time
  phy: qcom-ufs: add QRBTC V2 UFS phy to makefile
  phy: phy-qocm-ufs: update initialization sequence for msmcobalt RUMI
  phy: phy-qcom-ufs: don't error out if some callbacks are not defined
  phy: qcom-ufs: update phy register offsets and calibration values
  Revert "phy: qcom-ufs: add ufs phy type selection"
  phy: qcom-ufs-qmp-14nm: add PHY initialization table for version 2.2.0
  phy: qcom-ufs: add UFS PHY support for msmcobalt rumi platform
  phy: qcom-ufs: add support in UFS PHY for msmcobalt platform
  phy: qcom-ufs: remove hard-coded vdda-phy voltage definition
  phy: qcom-ufs: remove failure when rx/tx_iface_clk are absence
  phy: qcom-ufs-qmp-14nm: update PHY power up sequence
  phy: qcom-ufs: add ufs phy type selection
  phy: qcom-ufs-qmp-14nm: add workaround to program tuned VCO code
  phy: qcom-ufs-qmp-14nm: update PHY power up sequence
  phy: qcom-ufs-qmp-14nm: add PHY initialization workaround
  phy: qcom-ufs-qmp-14nm: fix analog power collapse handling
  phy: qcom-ufs-qmp-14nm: add UFS_PHY_RX_PWM_GEAR_BAND to power up sequence
  phy: qcom-ufs-qmp-14nm: add hibern8 workaround
  phy: qcom-ufs-qmp-14nm: add svs mode workaround
  scsi: include device.h in scsi.h
  UAPI: scsi: move ioctl related information
  UAPI: scsi: move the scsi ioctl related files
  scsi: ufs: add checks before setting hibern8/clk-gating on idle states
  scsi: ufs: return -ENOIOCTLCMD for unsupported IOCTLs
  scsi: ufs-qcom-ice: add null pointer check
  scsi: ufs: add crypto related operations
  crypto: ice: general driver clean-up
  crypto: ice: Make ICE init & reset API synchronous
  scsi: ufs-ice: fix ICE error handler
  scsi: ufs: add support for compat ioctl
  scsi: ufs: allow updating bBootLunEn via ioctl
  scsi: ufs: Fix compilation failure with CONFIG_LOCK_STAT
  scsi: ufs-debugfs: overwrite error scenario value via debugfs
  scsi: ufs: fix condition in which DME command failure msg is printed out
  scsi: ufs: fix inconsistency of power mode when error is injected
  scsi: ufs: remove redundant condition for power change
  scsi: ufs-debugfs: modify "err_inj_scenario" debugfs entry
  scsi: ufs: do pm qos unvoting before calling scsi_done callback
  scsi: ufs-debugfs: remove unnecessary error scenario use-cases
  scsi: ufs-debugfs: remove debugfs ability to control error codes
  scsi: ufs: add retry for query descriptors
  scsi: ufs-qcom: resume ICE driver after clock ungating
  scsi: ufs: change clock gating timeout based on load
  scsi: ufs-qcom: do clock gating and hibern8 @10ms
  scsi: ufs: don't suspend clock scaling during clock gating
  scsi: ufs: add reference counting for scsi block requests
  scsi: ufs: let aggressive clock gating context known
  scsi: ufs: skip devoting device ref_clk during clock gating
  scsi: ufs: core power collapse after clock gating
  scsi: ufs: don't free irq in suspend
  scsi: ufs: remove the query of ref_clk frequency
  scsi: ufs-qcom: add support for platforms with bus scaling disabled
  scsi: ufs: splits vops and creates wrapper functions
  scsi: ufs: add variant helper functions
  scsi: ufs: enable FASTAUTO mode during low load condition
  scsi: ufs-qcom: disable both host and device LCC
  scsi: ufs-debugfs: fix reading the M-PHY RX attributes
  scsi: ufs: fix order of pm_runtime_get_sync and ufshcd_hold_all calls
  scsi: ufs: do not clear the DL layer timers
  scsi: ufs-qcom-ice: fix incorrect use of memset
  scsi: ufs-debug: add debugfs capability to collect query statistics
  scsi: ufs-debugfs: create statistics folder
  scsi: ufs: remove unused macro
  scsi: ufs: fix null pointer access in case vops is not set
  scsi: ufs: use symbolic print for tracing
  tracing: ufs: create a trace event class template for common events
  scsi: ufs: add debugfs for error injection statistics
  scsi: ufs: add informative debug info for error injection messages
  scsi: ufs: add debugfs to reset and restore the UFS controller
  scsi: ufs: add additional error injection scenarios
  scsi: ufs: add interrupt error injection
  scsi: ufshcd: fix possible unclocked register access
  scsi: ufs: add debugfs options for fault injection capability
  scsi: ufs: Add support for reset controller framework
  scsi: ufs: recovery from hibern8 exit failure
  scsi: ufs: fix compilation errors if debugfs is disabled
  scsi: ufs: handle non spec compliant bkops behaviour by device
  scsi: ufs: fix a bug where accessing an array in invalid index
  scsi: ufs: fix probe failure masked by crypto engine reset
  Revert "scsi: ufs: send request sense after the link reinitialization"
  scsi: ufshcd: reduce clock scaling polling time window
  Revert "scsi: ufs-qcom: disable clock scaling"
  scsi: ufs: fix spinlock recursion
  scsi: ufs-qcom-ice: fix ice_status assignment error
  scsi: ufs: extend UFS fault injection capability
  scsi: ufs: use "sector_range" in "ufs_long" unit-tests
  block: test-iosched: fix bio allocation for test requests
  scsi: ufs-test: disable write descriptor query test
  scsi: ufs: add data integrity test to ufs unit tests
  scsi: ufs: add test case string for long random tests
  scsi: ufs: fix sector increment in ufs_long_seq_test
  scsi: ufs: add long random read/write unit tests
  scsi: ufs: add check_completion_fn to long_sequential unit test
  scsi: ufs: fix's to ufs_lun_depth unit test
  scsi: ufs: fix's to ufs_parallel test
  scsi: ufs: Unit test fixes
  scsi: ufs: ufs device queue depth test
  scsi: ufs: random parallel read and write test
  scsi: ufs: multiple queries test
  scsi: ufs: mixed long sequential
  scsi: ufs: add support for test specific completion check
  scsi: ufs: rework unit test infrastructure
  scsi: ufs: long sequential read/write tests
  scsi: ufs-qcom: disable clock scaling
  scsi: ufs: fix static code analysis issues
  scsi: ufs-qcom: update the bio data stcuture
  scsi: ufs-qcom-ice: add support for register interface changes
  scsi: ufs: convert statistics macros to functions
  scsi: ufs: verify command tag validity
  scsi: ufs: remove debugfs entries on driver unloading
  scsi: ufs: add host state prints in failure cases
  scsi: ufs-qcom: enable power management features
  scsi: ufs: add instance number to UFS debug-fs entry
  scsi: ufs: add request completion time statistics
  scsi: ufs: fix tag statistics for flush requests
  scsi; ufs: compile UFS unit tests as module
  scsi: ufs-qcom: allow HS-G3 on newer host controllers.
  scsi: ufs: renaming "debugfs" files with correct prefix
  scsi: ufs: don't use FTRACE_EVENT_ENABLED macro
  scsi: ufs: enable runtime pm only after ufshcd init
  scsi: ufs: add pre & post status change to clk_scale_notify ops
  scsi: ufs-qcom: disable low power modes and run slow on newer controller
  phy: ufs-qcom: disable RX LineCfg
  scsi: ufs: add UFS power collapse support during hibern8
  scsi: ufs-qcom: change device reference clock control
  scsi: ufs-qcom: expose debug registers by debugfs
  scsi: ufs-qcom: add ICE debug prints
  scsi: ufs-qcom: add print suppressing debugfs mechanism
  scsi: ufs: clear outstanding_request bit in case query timeout
  scsi: ufs: add print suppressing debugfs mechanism
  scsi: ufs: perform ice_init as part of UFS initialization
  scsi: ufs-qcom: add QUniPro hardware support
  scsi: ufs: fix spinlock recursion in ufshcd_queuecommand()
  scsi: ufs: Clear the aborted tag in case of ICE error
  scsi: ufs: adjust DME command delay
  scsi: ufs: optimize clock, pm_qos, hibern8 handling in queuecommand
  scsi: ufs: fix possible unclocked register access during hibern8 exit
  scsi: ufs: send request sense after the link reinitialization
  scsi: ufs: Set DBD setting in mode sense for caching mode page
  scsi: ufs: set the hibern8 on idle state at missing places
  scsi: ufs: add quirk for not allowing link off
  scsi: ufs: add error recovery after DL NAC error
  scsi: ufs: make error handling bit faster
  scsi: ufs: fix the downdifferntial value for clock scaling
  scsi: ufs: fix error recovery after the hibern8 exit failure
  scsi: ufs: add trace event for ufs commands
  scsi: ufs: increase fDeviceInit query response timeout
  scsi: ufs: reduce the delay before DME access commands
  scsi: ufs: stub UFS shutdown handler
  scsi: ufs: add Inline Crypto Engine (ICE) support to UFS
  scsi: ufs: print the correct error state
  scsi: ufs: change clock gating timeout to 50ms
  scsi: ufs: Add sysfs node to dynamically control hibern8 on idle
  scsi: ufs: add support for hibern8 on idle
  scsi: ufs: fix exception event handling
  scsi: ufs: reduce UFS dump prints for error case
  scsi: ufs: move dme peer quirk handling to ufshcd_dme_get_attr()
  scsi: ufs: fix failure to read the string descriptor
  scsi: ufs-qcom: add support for new UFS controller revisions
  scsi: ufs: debugfs: add option to read peer DME attribute
  scsi: ufs: debugfs: add option to read local DME attribute
  scsi: ufs: fix bug when changing power mode via debugfs
  scsi: ufs: add option to change default UFS power management level
  scsi: ufs-qcom: enable hibern8 during clock gating
  scsi: ufs: remove unwanted checks from hibern8 sequence
  scsi: ufs-msm: request UFS register space access after power collapse
  scsi: ufs-msm: Add bus bandwidth voting support
  scsi: ufs: fix a possible kernel info leak to userspace
  scsi: ufs: fix bugs related to null pointer access and array size
  scsi: ufs: fix deadlock during runtime resume
  scsi: ufs: Change power mode at run-time via debug-fs
  scsi: ufs: add debug counters for recoverable errors during runtime
  scsi: ufs: cleanup unused quirks
  scsi: ufs: split broken LCC quirk
  Revert "scsi: ufs: try read capacity (10) first"
  scsi: ufshcd: fix one of the argument type for ufshcd_query_descriptor
  scsi: ufs: disable LCC configuration in the UFS device
  scsi: ufs: provide the quirk to disable the LCC
  scsi: ufs: read ref clk and icc level during init only
  scsi: ufs: Add support for clock scaling using devfreq framework
  PM / devfreq: Add new flag to do simple clock scaling
  scsi: ufs: add queue fullness statistics
  block: add REQ_URGENT to request flags
  scsi: ufs: remove redundant "Illegal ufs-IOCTL" log for BLKROSET command
  scsi: ufs: Override auto suspend tunables for ufs
  scsi: ufs: fix NULL pointer dereference when aborting command
  scsi: ufs: add retries to dme_peer get and set attribute
  scsi: ufs: add wrapper for retrying sending query attribute
  scsi: ufs: read the device bRefClkFreq attribute
  scsi: ufs: Inject errors to verify error handling
  scsi: ufs: undo disabling LCC configuration in UFS device
  scsi: ufs: add queries retry mechanism
  scsi: ufs: add quirk for delay before dme commands
  scsi: ufs: disable LCC configuration
  scsi: ufs: fix spelling in variable
  scsi: ufs: replace debugfs mutex with spinlock
  scsi: ufs: Enable quirk to ignore sending WRITE_SAME command
  scsi: ufs: add ioctl interface for query request
  uapi: scsi: ufs: add ioctl interface for query request
  scsi: ufs: expose driver run time data and hci regs via debugfs
  scsi: ufs: Allowing power mode change
  scsi: ufs: try read capacity (10) first
  scsi: ufs: Allow 64-bit broken quirk
  ufs-pltfrm: initialize DMA mask for device-tree probed device
  scsi: ufs-msm: fix UFS version register bug
  scsi: ufs: add support to allow non standard behaviours (quirks)
  scsi: ufs: Add UFS host PHY driver for MSM targets
  scsi: ufs: add debugfs for ufs
  scsi: ufs: created UFS unit-tests framework
  Revert "sd: Fix rw_max for devices that report an optimal xfer size"
  Revert "scsi: Set request queue runtime PM status back to active on resume"
  scsi: squash of multiple fixes for msm-4.4 kernel

Change-Id: Iea4f918ceaacbf22820ae0819f17e8da72a93c31
Signed-off-by: default avatarCan Guo <cang@codeaurora.org>
parents 4ba9441e a658ca87
Loading
Loading
Loading
Loading
+33 −0
Original line number Diff line number Diff line
* 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,ufsphy"
- reg               : <registers mapping>
- 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,ufsphy";
		reg = <0xfc597000 0x800>;
		vdda-phy-supply = <&pma8084_l4>;
		vdda-pll-supply = <&pma8084_l12>;
		vdda-phy-max-microamp = <50000>;
		vdda-pll-max-microamp = <1000>;
	};

	ufshc@0xfc598000 {
		...
		ufs-phy = <&ufsphy1>;
	};
+10 −2
Original line number Diff line number Diff line
@@ -8,8 +8,13 @@ contain a phandle reference to UFS PHY node.

Required properties:
- compatible        : compatible list, contains one of the following -
			"qcom,ufs-phy-qmp-20nm" for 20nm ufs phy,
			"qcom,ufs-phy-qmp-14nm" for legacy 14nm ufs phy,
			"qcom,ufs-phy-qmp-v3" for V3 ufs phy present
			 on msmcobalt platform,
			"qcom,ufs-phy-qrbtc-sdm845" for phy support
			 for sdm845 emulation
		        "qcom,ufs-phy-qmp-v3-falcon" for phy support
			 for msmfalcon
			"qcom,msm8996-ufs-phy-qmp-14nm" for 14nm ufs phy
			 present on MSM8996 chipset.
- reg               : should contain PHY register address space (mandatory),
@@ -29,14 +34,17 @@ Optional properties:
- vdda-pll-max-microamp : specifies max. load that can be drawn from pll supply
- vddp-ref-clk-supply   : phandle to UFS device ref_clk pad power supply
- vddp-ref-clk-max-microamp : specifies max. load that can be drawn from this supply
- qcom,disable-lpm : disable various LPM mechanisms in UFS for platform compatibility
  (limit link to PWM Gear-1, 1-lane slow mode; disable hibernate, and avoid suspend/resume)

Example:

	ufsphy1: ufsphy@0xfc597000 {
		compatible = "qcom,ufs-phy-qmp-20nm";
		compatible = "qcom,ufs-phy-qmp-14nm";
		reg = <0xfc597000 0x800>;
		reg-names = "phy_mem";
		#phy-cells = <0>;
		lanes-per-direction = <1>;
		vdda-phy-supply = <&pma8084_l4>;
		vdda-pll-supply = <&pma8084_l12>;
		vdda-phy-max-microamp = <50000>;
+122 −1
Original line number Diff line number Diff line
@@ -11,6 +11,11 @@ Required properties:
					  "qcom,ufshc"
- interrupts        : <interrupt mapping for UFS host controller IRQ>
- reg               : <registers mapping>
		      first entry should contain UFS host controller register address space (mandatory),
                      second entry is the device ref. clock control register map (optional).
- reset             : reset specifier pair consists of phandle for the reset provider
                      and reset lines used by this controller.
- reset-names       : reset signal name strings sorted in the same order as the resets property.

Optional properties:
- phys                  : phandle to UFS PHY node
@@ -38,9 +43,34 @@ Optional properties:
			  defined or a value in the array is "0" then it is assumed
			  that the frequency is set by the parent clock or a
			  fixed rate clock source.
- rpm-level		: UFS Runtime power management level. Following PM levels are supported:
			  0 - Both UFS device and Link in active state (Highest power consumption)
			  1 - UFS device in active state but Link in Hibern8 state
			  2 - UFS device in Sleep state but Link in active state
			  3 - UFS device in Sleep state and Link in hibern8 state (default PM level)
			  4 - UFS device in Power-down state and Link in Hibern8 state
			  5 - UFS device in Power-down state and Link in OFF state (Lowest power consumption)
- spm-level		: UFS System power management level. Allowed PM levels are same as rpm-level.
- ufs-qcom-crypto	: phandle to UFS-QCOM ICE (Inline Cryptographic Engine) node
-lanes-per-direction	: number of lanes available per direction - either 1 or 2.
			  Note that it is assume same number of lanes is used both
			  directions at once. If not specified, default is 2 lanes per direction.
- pinctrl-names, pinctrl-0, pinctrl-1,.. pinctrl-n: Refer to "Documentation/devicetree/bindings/pinctrl/pinctrl-bindings.txt"
			for these optional properties
- limit-tx-hs-gear	: Specify the max. limit on the TX HS gear.
			  Valid range: 1-3. 1 => HS-G1, 2 => HS-G2, 3 => HS-G3
- limit-rx-hs-gear	: Specify the max. limit on the RX HS gear. Refer "limit-tx-hs-gear" for expected values.
- limit-tx-pwm-gear	: Specify the max. limit on the TX PWM gear
			  Valid range: 1-4. 1 => PWM-G1, 2 => PWM-G2, 3 => PWM-G3, 4 => PWM-G4
- limit-rx-pwm-gear	: Specify the max. limit on the RX PWM gear. Refer "limit-tx-pwm-gear" for expected values.
- scsi-cmd-timeout	: Specify the command timeout (in seconds) for scsi commands
- dev-ref-clk-freq	: Specify the device reference clock frequency, must be one of the following:
			  0: 19.2 MHz
			  1: 26 MHz
			  2: 38.4 MHz
			  3: 52 MHz
			  Defaults to 26 MHz if not specified.
- extcon:       phandle to external connector (Refer Documentation/devicetree/bindings/extcon/extcon-gpio.txt for more details).

Note: If above properties are not defined it can be assumed that the supply
regulators or clocks are always on.
@@ -48,9 +78,10 @@ regulators or clocks are always on.
Example:
	ufshc@0xfc598000 {
		compatible = "jedec,ufs-1.1";
		reg = <0xfc598000 0x800>;
		reg = <0xfc598000 0x800>, <0xfd512074 0x4>;
		interrupts = <0 28 0>;

		ufs-qcom-crypto = <&ufs_ice>;
		vdd-hba-supply = <&xxx_reg0>;
		vdd-hba-fixed-regulator;
		vcc-supply = <&xxx_reg1>;
@@ -64,6 +95,96 @@ Example:
		clocks = <&core 0>, <&ref 0>, <&iface 0>;
		clock-names = "core_clk", "ref_clk", "iface_clk";
		freq-table-hz = <100000000 200000000>, <0 0>, <0 0>;
		resets = <clock_gcc GCC_UFS_BCR>;
		reset-names = "core_reset";
		phys = <&ufsphy1>;
		phy-names = "ufsphy";
		rpm-level = <3>;
		spm-level = <5>;
		dev-ref-clk-freq = <0>; /* reference clock freq: 19.2 MHz */
	};

==== MSM UFS platform driver properties =====
* For UFS host controller in MSM platform following clocks are required -
    Controller clock source -
        "core_clk_src", max-clock-frequency-hz = 200MHz

    Controller System clock branch:
        "core_clk" - Controller core clock

    AHB/AXI interface clocks:
        "iface_clk" - AHB interface clock
        "bus_clk" - AXI bus master clock

    PHY to controller symbol synchronization clocks:
        "rx_lane0_sync_clk" - RX Lane 0
        "rx_lane1_sync_clk" - RX Lane 1
        "tx_lane0_sync_clk" - TX Lane 0
        "tx_lane1_sync_clk" - TX Lane 1

    Optional reference clock input to UFS device
        "ref_clk", max-clock-frequency-hz = 19.2MHz

* Following bus parameters are required -
- qcom,msm-bus,name
- qcom,msm-bus,num-cases
- qcom,msm-bus,num-paths
- qcom,msm-bus,vectors-KBps
For the above four properties please refer to
Documentation/devicetree/bindings/arm/msm/msm_bus.txt
Note: The instantaneous bandwidth (IB) value in the vectors-KBps field should
      be zero as UFS data transfer path doesn't have latency requirements and
      voting for aggregated bandwidth (AB) should take care of providing
      optimum throughput requested.

- qcom,bus-vector-names: specifies string IDs for the corresponding
bus vectors in the same order as qcom,msm-bus,vectors-KBps property.

- qcom,vddp-ref-clk-supply	 : reference clock to ufs device. Controlled by the host driver.
- qcom,vddp-ref-clk-max-microamp : specifies max. load that can be drawn for
				   ref-clk supply.

Example:
	ufshc@0xfc598000 {
		...

		qcom,msm-bus,name = "ufs1";
		qcom,msm-bus,num-cases = <22>;
		qcom,msm-bus,num-paths = <2>;
		qcom,msm-bus,vectors-KBps =
				<95 512 0 0>, <1 650 0 0>,         /* No vote */

				<95 512 922 0>, <1 650 1000 0>,   /* PWM G1 */
				<95 512 1844 0>, <1 650 1000 0>, /* PWM G2 */
				<95 512 3688 0>, <1 650 1000 0>, /* PWM G3 */
				<95 512 7376 0>, <1 650 1000 0>,  /* PWM G4 */
				<95 512 1844 0>, <1 650 1000 0>, /* PWM G1 L2 */
				<95 512 3688 0>, <1 650 1000 0>, /* PWM G2 L2 */
				<95 512 7376 0>, <1 650 1000 0>,  /* PWM G3 L2 */
				<95 512 14752 0>, <1 650 1000 0>,  /* PWM G4 L2 */

				<95 512 127796 0>, <1 650 1000 0>,  /* HS G1 RA */
				<95 512 255591 0>, <1 650 1000 0>, /* HS G2 RA */
				<95 512 511181 0>, <1 650 1000 0>, /* HS G3 RA */
				<95 512 255591 0>, <1 650 1000 0>, /* HS G1 RA L2 */
				<95 512 511181 0>, <1 650 1000 0>, /* HS G2 RA L2 */
				<95 512 1022362 0>, <1 650 1000 0>, /* HS G3 RA L2 */

				<95 512 149422 0>, <1 650 1000 0>,  /* HS G1 RB */
				<95 512 298189 0>, <1 650 1000 0>, /* HS G2 RB */
				<95 512 596378 0>, <1 650 1000 0>, /* HS G3 RB */
				<95 512 298189 0>, <1 650 1000 0>, /* HS G1 RB L2 */
				<95 512 596378 0>, <1 650 1000 0>, /* HS G2 RB L2 */
				<95 512 1192756 0>, <1 650 1000 0>, /* HS G3 RB L2 */

				<95 512 4096000 0>, <1 650 1000 0>; /* Max. bandwidth */

		qcom,bus-vector-names = "MIN",
					"PWM_G1_L1", "PWM_G2_L1", "PWM_G3_L1", "PWM_G4_L1",
					"PWM_G1_L2", "PWM_G2_L2", "PWM_G3_L2", "PWM_G4_L2",
					"HS_RA_G1_L1", "HS_RA_G2_L1", "HS_RA_G3_L1",
					"HS_RA_G1_L2", "HS_RA_G2_L2", "HS_RA_G3_L2",
					"HS_RB_G1_L1", "HS_RB_G2_L1", "HS_RB_G3_L1",
					"HS_RB_G1_L2", "HS_RB_G2_L2", "HS_RB_G3_L2",
					"MAX";
	};
+46 −0
Original line number Diff line number Diff line
@@ -19,5 +19,51 @@
		#gpio-cells = <2>;
		interrupt-controller;
		#interrupt-cells = <2>;

		ufs_dev_reset_assert: ufs_dev_reset_assert {
			config {
				pins = "ufs_reset";
				bias-pull-down;		/* default: pull down */
				/*
				 * UFS_RESET driver strengths are having
				 * different values/steps compared to typical
				 * GPIO drive strengths.
				 *
				 * Following table clarifies:
				 *
				 * HDRV value | UFS_RESET | Typical GPIO
				 *   (dec)    |   (mA)    |    (mA)
				 *     0      |   0.8     |    2
				 *     1      |   1.55    |    4
				 *     2      |   2.35    |    6
				 *     3      |   3.1     |    8
				 *     4      |   3.9     |    10
				 *     5      |   4.65    |    12
				 *     6      |   5.4     |    14
				 *     7      |   6.15    |    16
				 *
				 * POR value for UFS_RESET HDRV is 3 which means
				 * 3.1mA and we want to use that. Hence just
				 * specify 8mA to "drive-strength" binding and
				 * that should result into writing 3 to HDRV
				 * field.
				 */
				drive-strength = <8>;	/* default: 3.1 mA */
				output-low; /* active low reset */
			};
		};

		ufs_dev_reset_deassert: ufs_dev_reset_deassert {
			config {
				pins = "ufs_reset";
				bias-pull-down;		/* default: pull down */
				/*
				 * default: 3.1 mA
				 * check comments under ufs_dev_reset_assert
				 */
				drive-strength = <8>;
				output-high; /* active low reset */
			};
		};
	};
};
+31 −0
Original line number Diff line number Diff line
@@ -64,3 +64,34 @@
		dr_mode = "peripheral";
	};
};

&ufsphy_mem {
	compatible = "qcom,ufs-phy-qrbtc-sdm845";

	vdda-phy-supply = <&pm855_l5>;
	vdda-pll-supply = <&pm855_l3>;
	vdda-phy-max-microamp = <87100>;
	vdda-pll-max-microamp = <18800>;

	status = "ok";
};

&ufshc_mem {
	limit-tx-hs-gear = <1>;
	limit-rx-hs-gear = <1>;

	vdd-hba-supply = <&ufs_phy_gdsc>;
	vdd-hba-fixed-regulator;
	vcc-supply = <&pm855_l10>;
	vccq2-supply = <&pm855_s4>;
	vcc-max-microamp = <750000>;
	vccq2-max-microamp = <750000>;

	qcom,vddp-ref-clk-supply = <&pm855_l9>;
	qcom,vddp-ref-clk-max-microamp = <100>;

	qcom,disable-lpm;
	rpm-level = <0>;
	spm-level = <0>;
	status = "ok";
};
Loading