linux-samsung-soc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v5 0/3] Enable UFS on gs101 / Pixel 6 (Oriole)
@ 2024-04-30 14:14 Peter Griffin
  2024-04-30 14:14 ` [PATCH v5 1/3] arm64: dts: exynos: gs101: Add the hsi2 sysreg node Peter Griffin
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Peter Griffin @ 2024-04-30 14:14 UTC (permalink / raw)
  To: robh, krzk+dt, conor+dt, alim.akhtar
  Cc: devicetree, linux-arm-kernel, linux-samsung-soc, linux-kernel,
	tudor.ambarus, andre.draszik, saravanak, willmcvicker,
	kernel-team, Peter Griffin

Hi Krzysztof,

This series contains the dts, dtsi that enables UFS on Pixel 6 (Oriole).
From v3 onwards it has been split into separate series as you requested.
v5 has been rebased on next-20240430, to avoid the conflicts with Andre's
USB enablement work that was recently queued.

Along with the various driver code UFS is now functional, the SKhynix
HN8T05BZGKX015 can be enumerated, partitions mounted etc.

UFS bindings in this series are proposed:
https://lore.kernel.org/linux-arm-kernel/20240426122004.2249178-1-peter.griffin@linaro.org/

* Clock cmu_hsi2 bindings used here are already queued by you
* UFS phy bindings used here are already queued by Vinod

kind regards,

Peter.

lore v4: https://lore.kernel.org/linux-kernel/20240429111537.2369227-4-peter.griffin@linaro.org/T/
lore v3: https://lore.kernel.org/lkml/20240426122004.2249178-1-peter.griffin@linaro.org/
lore v2: https://lore.kernel.org/linux-kernel/20240423205006.1785138-1-peter.griffin@linaro.org/
lore v1: https://lore.kernel.org/linux-clk/20240404122559.898930-1-peter.griffin@linaro.org/

Changes since v4:
 - Rebase on next-20240430
 - Drop '0x' from unit address (Krzysztof)

Changes since v3:
 - Fix unit address ordering in gs101.dtsi (Krzysztof)

Changes since v2:
 - Split into separate subsystem series
 - Split dts and dtsi patches (Krzysztof)

Changes since v1:
 - Collect up tags
 - fix google,gs101-hsi2-sysreg size (0x10000 not 0x1000) (Andre)
 - use GPIO defines in DT and add TODO pmic comment (Krzysztof)
 - Add sysreg clock to ufs node (Andre)

Peter Griffin (3):
  arm64: dts: exynos: gs101: Add the hsi2 sysreg node
  arm64: dts: exynos: gs101: Add ufs and ufs-phy dt nodes
  arm64: dts: exynos: gs101: enable ufs, phy on oriole & define ufs
    regulator

 .../boot/dts/exynos/google/gs101-oriole.dts   | 18 ++++++++
 arch/arm64/boot/dts/exynos/google/gs101.dtsi  | 42 +++++++++++++++++++
 2 files changed, 60 insertions(+)

-- 
2.45.0.rc0.197.gbae5840b3b-goog


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

* [PATCH v5 1/3] arm64: dts: exynos: gs101: Add the hsi2 sysreg node
  2024-04-30 14:14 [PATCH v5 0/3] Enable UFS on gs101 / Pixel 6 (Oriole) Peter Griffin
@ 2024-04-30 14:14 ` Peter Griffin
  2024-04-30 14:14 ` [PATCH v5 2/3] arm64: dts: exynos: gs101: Add ufs and ufs-phy dt nodes Peter Griffin
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: Peter Griffin @ 2024-04-30 14:14 UTC (permalink / raw)
  To: robh, krzk+dt, conor+dt, alim.akhtar
  Cc: devicetree, linux-arm-kernel, linux-samsung-soc, linux-kernel,
	tudor.ambarus, andre.draszik, saravanak, willmcvicker,
	kernel-team, Peter Griffin

This has some configuration bits such as sharability that
are required by UFS.

Signed-off-by: Peter Griffin <peter.griffin@linaro.org>
Reviewed-by: André Draszik <andre.draszik@linaro.org>
---
 arch/arm64/boot/dts/exynos/google/gs101.dtsi | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/arch/arm64/boot/dts/exynos/google/gs101.dtsi b/arch/arm64/boot/dts/exynos/google/gs101.dtsi
index e3b068c1a2c1..9f7635a7928e 100644
--- a/arch/arm64/boot/dts/exynos/google/gs101.dtsi
+++ b/arch/arm64/boot/dts/exynos/google/gs101.dtsi
@@ -1320,6 +1320,12 @@ cmu_hsi2: clock-controller@14400000 {
 			clock-names = "oscclk", "bus", "pcie", "ufs", "mmc";
 		};
 
+		sysreg_hsi2: syscon@14420000 {
+			compatible = "google,gs101-hsi2-sysreg", "syscon";
+			reg = <0x14420000 0x10000>;
+			clocks = <&cmu_hsi2 CLK_GOUT_HSI2_SYSREG_HSI2_PCLK>;
+		};
+
 		pinctrl_hsi2: pinctrl@14440000 {
 			compatible = "google,gs101-pinctrl";
 			reg = <0x14440000 0x00001000>;
-- 
2.45.0.rc0.197.gbae5840b3b-goog


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

* [PATCH v5 2/3] arm64: dts: exynos: gs101: Add ufs and ufs-phy dt nodes
  2024-04-30 14:14 [PATCH v5 0/3] Enable UFS on gs101 / Pixel 6 (Oriole) Peter Griffin
  2024-04-30 14:14 ` [PATCH v5 1/3] arm64: dts: exynos: gs101: Add the hsi2 sysreg node Peter Griffin
@ 2024-04-30 14:14 ` Peter Griffin
  2024-04-30 14:14 ` [PATCH v5 3/3] arm64: dts: exynos: gs101: enable ufs, phy on oriole & define ufs regulator Peter Griffin
  2024-04-30 18:47 ` [PATCH v5 0/3] Enable UFS on gs101 / Pixel 6 (Oriole) Krzysztof Kozlowski
  3 siblings, 0 replies; 5+ messages in thread
From: Peter Griffin @ 2024-04-30 14:14 UTC (permalink / raw)
  To: robh, krzk+dt, conor+dt, alim.akhtar
  Cc: devicetree, linux-arm-kernel, linux-samsung-soc, linux-kernel,
	tudor.ambarus, andre.draszik, saravanak, willmcvicker,
	kernel-team, Peter Griffin

Add the ufs controller node and phy node for gs101.

Signed-off-by: Peter Griffin <peter.griffin@linaro.org>
Acked-by: André Draszik <andre.draszik@linaro.org>
---
 arch/arm64/boot/dts/exynos/google/gs101.dtsi | 36 ++++++++++++++++++++
 1 file changed, 36 insertions(+)

diff --git a/arch/arm64/boot/dts/exynos/google/gs101.dtsi b/arch/arm64/boot/dts/exynos/google/gs101.dtsi
index 9f7635a7928e..16e1c474e8dd 100644
--- a/arch/arm64/boot/dts/exynos/google/gs101.dtsi
+++ b/arch/arm64/boot/dts/exynos/google/gs101.dtsi
@@ -1332,6 +1332,42 @@ pinctrl_hsi2: pinctrl@14440000 {
 			interrupts = <GIC_SPI 503 IRQ_TYPE_LEVEL_HIGH 0>;
 		};
 
+		ufs_0: ufs@14700000 {
+			compatible = "google,gs101-ufs";
+			reg = <0x14700000 0x200>,
+			      <0x14701100 0x200>,
+			      <0x14780000 0xa000>,
+			      <0x14600000 0x100>;
+			reg-names = "hci", "vs_hci", "unipro", "ufsp";
+			interrupts = <GIC_SPI 532 IRQ_TYPE_LEVEL_HIGH 0>;
+			clocks = <&cmu_hsi2 CLK_GOUT_HSI2_UFS_EMBD_I_ACLK>,
+				 <&cmu_hsi2 CLK_GOUT_HSI2_UFS_EMBD_I_CLK_UNIPRO>,
+				 <&cmu_hsi2 CLK_GOUT_HSI2_UFS_EMBD_I_FMP_CLK>,
+				 <&cmu_hsi2 CLK_GOUT_HSI2_QE_UFS_EMBD_HSI2_ACLK>,
+				 <&cmu_hsi2 CLK_GOUT_HSI2_QE_UFS_EMBD_HSI2_PCLK>,
+				 <&cmu_hsi2 CLK_GOUT_HSI2_SYSREG_HSI2_PCLK>;
+			clock-names = "core_clk", "sclk_unipro_main", "fmp",
+				      "aclk", "pclk", "sysreg";
+			freq-table-hz = <0 0>, <0 0>, <0 0>, <0 0>, <0 0>, <0 0>;
+			pinctrl-0 = <&ufs_rst_n &ufs_refclk_out>;
+			pinctrl-names = "default";
+			phys = <&ufs_0_phy>;
+			phy-names = "ufs-phy";
+			samsung,sysreg = <&sysreg_hsi2 0x710>;
+			status = "disabled";
+		};
+
+		ufs_0_phy: phy@14704000 {
+			compatible = "google,gs101-ufs-phy";
+			reg = <0x14704000 0x3000>;
+			reg-names = "phy-pma";
+			samsung,pmu-syscon = <&pmu_system_controller>;
+			#phy-cells = <0>;
+			clocks = <&ext_24_5m>;
+			clock-names = "ref_clk";
+			status = "disabled";
+		};
+
 		cmu_apm: clock-controller@17400000 {
 			compatible = "google,gs101-cmu-apm";
 			reg = <0x17400000 0x8000>;
-- 
2.45.0.rc0.197.gbae5840b3b-goog


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

* [PATCH v5 3/3] arm64: dts: exynos: gs101: enable ufs, phy on oriole & define ufs regulator
  2024-04-30 14:14 [PATCH v5 0/3] Enable UFS on gs101 / Pixel 6 (Oriole) Peter Griffin
  2024-04-30 14:14 ` [PATCH v5 1/3] arm64: dts: exynos: gs101: Add the hsi2 sysreg node Peter Griffin
  2024-04-30 14:14 ` [PATCH v5 2/3] arm64: dts: exynos: gs101: Add ufs and ufs-phy dt nodes Peter Griffin
@ 2024-04-30 14:14 ` Peter Griffin
  2024-04-30 18:47 ` [PATCH v5 0/3] Enable UFS on gs101 / Pixel 6 (Oriole) Krzysztof Kozlowski
  3 siblings, 0 replies; 5+ messages in thread
From: Peter Griffin @ 2024-04-30 14:14 UTC (permalink / raw)
  To: robh, krzk+dt, conor+dt, alim.akhtar
  Cc: devicetree, linux-arm-kernel, linux-samsung-soc, linux-kernel,
	tudor.ambarus, andre.draszik, saravanak, willmcvicker,
	kernel-team, Peter Griffin

Enable ufs & ufs phy nodes for Oriole. Also define the ufs regulator node.

ufs regulator is a stub until full s2mpg11 slave pmic support is added.
The gpio defined is for the BOOTLD0 (gs101) signal connected to
UFS_EN(s2mpg11) gpio enabled voltage rail for UFS.

Signed-off-by: Peter Griffin <peter.griffin@linaro.org>
---
 .../boot/dts/exynos/google/gs101-oriole.dts    | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

diff --git a/arch/arm64/boot/dts/exynos/google/gs101-oriole.dts b/arch/arm64/boot/dts/exynos/google/gs101-oriole.dts
index 03b2a6fdfdc4..5e8ffe065081 100644
--- a/arch/arm64/boot/dts/exynos/google/gs101-oriole.dts
+++ b/arch/arm64/boot/dts/exynos/google/gs101-oriole.dts
@@ -59,6 +59,15 @@ reg_placeholder: regulator-0 {
 		compatible = "regulator-fixed";
 		regulator-name = "placeholder_reg";
 	};
+
+	/* TODO: Remove this once S2MPG11 slave PMIC is implemented  */
+	ufs_0_fixed_vcc_reg: regulator-1 {
+		compatible = "regulator-fixed";
+		regulator-name = "ufs-vcc";
+		gpio = <&gpp0 1 GPIO_ACTIVE_HIGH>;
+		regulator-boot-on;
+		enable-active-high;
+	};
 };
 
 &ext_24_5m {
@@ -112,6 +121,15 @@ &serial_0 {
 	status = "okay";
 };
 
+&ufs_0 {
+	status = "okay";
+	vcc-supply = <&ufs_0_fixed_vcc_reg>;
+};
+
+&ufs_0_phy {
+	status = "okay";
+};
+
 &usbdrd31 {
 	status = "okay";
 	vdd10-supply = <&reg_placeholder>;
-- 
2.45.0.rc0.197.gbae5840b3b-goog


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

* Re: [PATCH v5 0/3] Enable UFS on gs101 / Pixel 6 (Oriole)
  2024-04-30 14:14 [PATCH v5 0/3] Enable UFS on gs101 / Pixel 6 (Oriole) Peter Griffin
                   ` (2 preceding siblings ...)
  2024-04-30 14:14 ` [PATCH v5 3/3] arm64: dts: exynos: gs101: enable ufs, phy on oriole & define ufs regulator Peter Griffin
@ 2024-04-30 18:47 ` Krzysztof Kozlowski
  3 siblings, 0 replies; 5+ messages in thread
From: Krzysztof Kozlowski @ 2024-04-30 18:47 UTC (permalink / raw)
  To: robh, krzk+dt, conor+dt, alim.akhtar, Peter Griffin
  Cc: devicetree, linux-arm-kernel, linux-samsung-soc, linux-kernel,
	tudor.ambarus, andre.draszik, saravanak, willmcvicker,
	kernel-team


On Tue, 30 Apr 2024 15:14:42 +0100, Peter Griffin wrote:
> This series contains the dts, dtsi that enables UFS on Pixel 6 (Oriole).
> From v3 onwards it has been split into separate series as you requested.
> v5 has been rebased on next-20240430, to avoid the conflicts with Andre's
> USB enablement work that was recently queued.
> 
> Along with the various driver code UFS is now functional, the SKhynix
> HN8T05BZGKX015 can be enumerated, partitions mounted etc.
> 
> [...]

Applied, thanks!

[1/3] arm64: dts: exynos: gs101: Add the hsi2 sysreg node
      https://git.kernel.org/krzk/linux/c/b5f5fe4b317c0fbda725a44d9c92d97930ad68e9
[2/3] arm64: dts: exynos: gs101: Add ufs and ufs-phy dt nodes
      https://git.kernel.org/krzk/linux/c/4c65d7054b4ce8ceb30ba2b8aed90ceff6158d73
[3/3] arm64: dts: exynos: gs101: enable ufs, phy on oriole & define ufs regulator
      https://git.kernel.org/krzk/linux/c/aaafb21e8190cd2bc8cadf3e0f017bc5c11bb109

Best regards,
-- 
Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>


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

end of thread, other threads:[~2024-04-30 18:47 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-04-30 14:14 [PATCH v5 0/3] Enable UFS on gs101 / Pixel 6 (Oriole) Peter Griffin
2024-04-30 14:14 ` [PATCH v5 1/3] arm64: dts: exynos: gs101: Add the hsi2 sysreg node Peter Griffin
2024-04-30 14:14 ` [PATCH v5 2/3] arm64: dts: exynos: gs101: Add ufs and ufs-phy dt nodes Peter Griffin
2024-04-30 14:14 ` [PATCH v5 3/3] arm64: dts: exynos: gs101: enable ufs, phy on oriole & define ufs regulator Peter Griffin
2024-04-30 18:47 ` [PATCH v5 0/3] Enable UFS on gs101 / Pixel 6 (Oriole) Krzysztof Kozlowski

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).