mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v2 0/2] arm64: dts: ti: k3-j784s4: Add UFS support
@ 2023-07-25 13:36 Udit Kumar
  2023-07-25 13:36 ` [PATCH v2 1/2] arm64: dts: ti: k3-j784s4-main: Add DT node for UFS Udit Kumar
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Udit Kumar @ 2023-07-25 13:36 UTC (permalink / raw)
  To: vigneshr, nm, kristo, robh+dt, linux-arm-kernel,
	krzysztof.kozlowski+dt, conor+dt, devicetree, linux-kernel
  Cc: Udit Kumar

This patch series adds UFS support for J784S4 SOC,
UFS is kept disabled at SOC level, and enabled in EVM where
UFS flash is present.

This patch is tested by enabling below configs on top of defconfig
CONFIG_SCSI_UFS_BSG=y
CONFIG_SCSI_UFS_CDNS_PLATFORM=y
CONFIG_SCSI_UFS_TI_J721E=y

Change log:

Changes in v2
v1: https://lore.kernel.org/all/20230725053843.1721028-1-u-kumar1@ti.com/
Add DT node for UFS:
  Corrected typo
  Added 0x00 instead of 0x0 to align with test of file
  Added Tested by

Add Support for UFS peripheral
  Added Tested by

Test logs of v1 patch
https://gist.github.com/uditkumarti/ab188e4b433058ae86734cd46eff7d94


Udit Kumar (2):
  arm64: dts: ti: k3-j784s4-main: Add DT node for UFS
  arm64: dts: ti: k3-j784s4-evm: Add Support for UFS peripheral

 arch/arm64/boot/dts/ti/k3-j784s4-evm.dts   |  4 ++++
 arch/arm64/boot/dts/ti/k3-j784s4-main.dtsi | 24 ++++++++++++++++++++++
 2 files changed, 28 insertions(+)

-- 
2.34.1


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH v2 1/2] arm64: dts: ti: k3-j784s4-main: Add DT node for UFS
  2023-07-25 13:36 [PATCH v2 0/2] arm64: dts: ti: k3-j784s4: Add UFS support Udit Kumar
@ 2023-07-25 13:36 ` Udit Kumar
  2023-07-25 13:36 ` [PATCH v2 2/2] arm64: dts: ti: k3-j784s4-evm: Add Support for UFS peripheral Udit Kumar
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: Udit Kumar @ 2023-07-25 13:36 UTC (permalink / raw)
  To: vigneshr, nm, kristo, robh+dt, linux-arm-kernel,
	krzysztof.kozlowski+dt, conor+dt, devicetree, linux-kernel
  Cc: Udit Kumar, Chai Wenle

Add UFS support present in J784S4 SOC.

UFS is documented in J784S4 TRM[1]
Section 12.3.7 'Universal Flash Storage (UFS) Interface'

[1] http://www.ti.com/lit/zip/spruj52

Cc: Chai Wenle <Wenle.Chai@windriver.com>
Tested-by: Chai Wenle <Wenle.Chai@windriver.com>
Signed-off-by: Udit Kumar <u-kumar1@ti.com>
---
 arch/arm64/boot/dts/ti/k3-j784s4-main.dtsi | 24 ++++++++++++++++++++++
 1 file changed, 24 insertions(+)

diff --git a/arch/arm64/boot/dts/ti/k3-j784s4-main.dtsi b/arch/arm64/boot/dts/ti/k3-j784s4-main.dtsi
index 11f163e5cadf..a04c44708a09 100644
--- a/arch/arm64/boot/dts/ti/k3-j784s4-main.dtsi
+++ b/arch/arm64/boot/dts/ti/k3-j784s4-main.dtsi
@@ -1370,6 +1370,30 @@ main_spi7: spi@2170000 {
 		status = "disabled";
 	};
 
+	ufs_wrapper: ufs-wrapper@4e80000 {
+		compatible = "ti,j721e-ufs";
+		reg = <0x00 0x4e80000 0x00 0x100>;
+		power-domains = <&k3_pds 387 TI_SCI_PD_EXCLUSIVE>;
+		clocks = <&k3_clks 387 3>;
+		assigned-clocks = <&k3_clks 387 3>;
+		assigned-clock-parents = <&k3_clks 387 6>;
+		ranges;
+		#address-cells = <2>;
+		#size-cells = <2>;
+		status = "disabled";
+
+		ufs@4e84000 {
+			compatible = "cdns,ufshc-m31-16nm", "jedec,ufs-2.0";
+			reg = <0x00 0x4e84000 0x00 0x10000>;
+			interrupts = <GIC_SPI 17 IRQ_TYPE_LEVEL_HIGH>;
+			freq-table-hz = <250000000 250000000>, <19200000 19200000>,
+					<19200000 19200000>;
+			clocks = <&k3_clks 387 1>, <&k3_clks 387 3>, <&k3_clks 387 3>;
+			clock-names = "core_clk", "phy_clk", "ref_clk";
+			dma-coherent;
+		};
+	};
+
 	main_r5fss0: r5fss@5c00000 {
 		compatible = "ti,j721s2-r5fss";
 		ti,cluster-mode = <1>;
-- 
2.34.1


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH v2 2/2] arm64: dts: ti: k3-j784s4-evm: Add Support for UFS peripheral
  2023-07-25 13:36 [PATCH v2 0/2] arm64: dts: ti: k3-j784s4: Add UFS support Udit Kumar
  2023-07-25 13:36 ` [PATCH v2 1/2] arm64: dts: ti: k3-j784s4-main: Add DT node for UFS Udit Kumar
@ 2023-07-25 13:36 ` Udit Kumar
  2023-07-28  8:47 ` [PATCH v2 0/2] arm64: dts: ti: k3-j784s4: Add UFS support Vignesh Raghavendra
  2023-08-02  5:06 ` Nishanth Menon
  3 siblings, 0 replies; 5+ messages in thread
From: Udit Kumar @ 2023-07-25 13:36 UTC (permalink / raw)
  To: vigneshr, nm, kristo, robh+dt, linux-arm-kernel,
	krzysztof.kozlowski+dt, conor+dt, devicetree, linux-kernel
  Cc: Udit Kumar, Chai Wenle

J784S4 EVM board has 32GB Non-Volatile UFS Memory.
So enabling UFS at board level.

UFS flash details are documented in board data sheet[1]
Section 1.2 Key Features and Interfaces.

[1] https://www.ti.com/lit/pdf/spruj62

Cc: Chai Wenle <Wenle.Chai@windriver.com>
Tested-by: Chai Wenle <Wenle.Chai@windriver.com>
Signed-off-by: Udit Kumar <u-kumar1@ti.com>
---
 arch/arm64/boot/dts/ti/k3-j784s4-evm.dts | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/arch/arm64/boot/dts/ti/k3-j784s4-evm.dts b/arch/arm64/boot/dts/ti/k3-j784s4-evm.dts
index 7ad152a1b90f..1e38a8f1bec5 100644
--- a/arch/arm64/boot/dts/ti/k3-j784s4-evm.dts
+++ b/arch/arm64/boot/dts/ti/k3-j784s4-evm.dts
@@ -430,6 +430,10 @@ &main_uart8 {
 	pinctrl-0 = <&main_uart8_pins_default>;
 };
 
+&ufs_wrapper {
+	status = "okay";
+};
+
 &fss {
 	status = "okay";
 };
-- 
2.34.1


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH v2 0/2] arm64: dts: ti: k3-j784s4: Add UFS support
  2023-07-25 13:36 [PATCH v2 0/2] arm64: dts: ti: k3-j784s4: Add UFS support Udit Kumar
  2023-07-25 13:36 ` [PATCH v2 1/2] arm64: dts: ti: k3-j784s4-main: Add DT node for UFS Udit Kumar
  2023-07-25 13:36 ` [PATCH v2 2/2] arm64: dts: ti: k3-j784s4-evm: Add Support for UFS peripheral Udit Kumar
@ 2023-07-28  8:47 ` Vignesh Raghavendra
  2023-08-02  5:06 ` Nishanth Menon
  3 siblings, 0 replies; 5+ messages in thread
From: Vignesh Raghavendra @ 2023-07-28  8:47 UTC (permalink / raw)
  To: Udit Kumar, nm, kristo, robh+dt, linux-arm-kernel,
	krzysztof.kozlowski+dt, conor+dt, devicetree, linux-kernel



On 25/07/23 19:06, Udit Kumar wrote:
> This patch series adds UFS support for J784S4 SOC,
> UFS is kept disabled at SOC level, and enabled in EVM where
> UFS flash is present.
> 
> This patch is tested by enabling below configs on top of defconfig
> CONFIG_SCSI_UFS_BSG=y
> CONFIG_SCSI_UFS_CDNS_PLATFORM=y
> CONFIG_SCSI_UFS_TI_J721E=y
> 
> Change log:
> 
> Changes in v2
> v1: https://lore.kernel.org/all/20230725053843.1721028-1-u-kumar1@ti.com/
> Add DT node for UFS:
>   Corrected typo
>   Added 0x00 instead of 0x0 to align with test of file
>   Added Tested by
> 
> Add Support for UFS peripheral
>   Added Tested by
> 
> Test logs of v1 patch
> https://gist.github.com/uditkumarti/ab188e4b433058ae86734cd46eff7d94
> 
> 
> Udit Kumar (2):
>   arm64: dts: ti: k3-j784s4-main: Add DT node for UFS
>   arm64: dts: ti: k3-j784s4-evm: Add Support for UFS peripheral
> 
>  arch/arm64/boot/dts/ti/k3-j784s4-evm.dts   |  4 ++++
>  arch/arm64/boot/dts/ti/k3-j784s4-main.dtsi | 24 ++++++++++++++++++++++
>  2 files changed, 28 insertions(+)
> 

Reviewed-by: Vignesh Raghavendra <vigneshr@ti.com>

-- 
Regards
Vignesh

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH v2 0/2] arm64: dts: ti: k3-j784s4: Add UFS support
  2023-07-25 13:36 [PATCH v2 0/2] arm64: dts: ti: k3-j784s4: Add UFS support Udit Kumar
                   ` (2 preceding siblings ...)
  2023-07-28  8:47 ` [PATCH v2 0/2] arm64: dts: ti: k3-j784s4: Add UFS support Vignesh Raghavendra
@ 2023-08-02  5:06 ` Nishanth Menon
  3 siblings, 0 replies; 5+ messages in thread
From: Nishanth Menon @ 2023-08-02  5:06 UTC (permalink / raw)
  To: vigneshr, kristo, robh+dt, linux-arm-kernel,
	krzysztof.kozlowski+dt, conor+dt, devicetree, linux-kernel,
	Udit Kumar
  Cc: Nishanth Menon

Hi Udit Kumar,

On Tue, 25 Jul 2023 19:06:05 +0530, Udit Kumar wrote:
> This patch series adds UFS support for J784S4 SOC,
> UFS is kept disabled at SOC level, and enabled in EVM where
> UFS flash is present.
> 
> This patch is tested by enabling below configs on top of defconfig
> CONFIG_SCSI_UFS_BSG=y
> CONFIG_SCSI_UFS_CDNS_PLATFORM=y
> CONFIG_SCSI_UFS_TI_J721E=y
> 
> [...]

I have applied the following to branch ti-k3-dts-next on [1].
Thank you!

[1/2] arm64: dts: ti: k3-j784s4-main: Add DT node for UFS
      commit: f33f5e4c801b7f1838f05aae81eaed8189a1eac4
[2/2] arm64: dts: ti: k3-j784s4-evm: Add Support for UFS peripheral
      commit: 5d55545cc2da8ad320b73705b26a5c0a837b20da

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent up the chain during
the next merge window (or sooner if it is a relevant bug fix), however if
problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

[1] https://git.kernel.org/pub/scm/linux/kernel/git/ti/linux.git
-- 
Regards,
Nishanth Menon
Key (0xDDB5849D1736249D) / Fingerprint: F8A2 8693 54EB 8232 17A3  1A34 DDB5 849D 1736 249D


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2023-08-02  5:06 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-07-25 13:36 [PATCH v2 0/2] arm64: dts: ti: k3-j784s4: Add UFS support Udit Kumar
2023-07-25 13:36 ` [PATCH v2 1/2] arm64: dts: ti: k3-j784s4-main: Add DT node for UFS Udit Kumar
2023-07-25 13:36 ` [PATCH v2 2/2] arm64: dts: ti: k3-j784s4-evm: Add Support for UFS peripheral Udit Kumar
2023-07-28  8:47 ` [PATCH v2 0/2] arm64: dts: ti: k3-j784s4: Add UFS support Vignesh Raghavendra
2023-08-02  5:06 ` Nishanth Menon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®