linux-spi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/7] ARM: dts: samsung: specify the SPI fifosize
@ 2024-01-25 15:16 Tudor Ambarus
  2024-01-25 15:16 ` [PATCH 1/7] ARM: dts: samsung: s5pv210: " Tudor Ambarus
                   ` (9 more replies)
  0 siblings, 10 replies; 12+ messages in thread
From: Tudor Ambarus @ 2024-01-25 15:16 UTC (permalink / raw)
  To: krzysztof.kozlowski+dt, broonie
  Cc: robh+dt, conor+dt, alim.akhtar, devicetree, linux-arm-kernel,
	linux-samsung-soc, linux-kernel, linux-spi, andre.draszik,
	peter.griffin, semen.protsenko, kernel-team, willmcvicker,
	Tudor Ambarus

Hi,

The "samsung,spi-fifosize" was introduced in the following patch set:
https://lore.kernel.org/linux-arm-kernel/20240125145007.748295-1-tudor.ambarus@linaro.org/T/#t

I expect Mark will provide an immutable tag for the bindings so that it
can be merged into the samsung tree. We'll avoid this way using the
property into the device trees without having it defined into the
bindings.

These patches close the circle and break the dependency between the SPI
of_alias ID and the SPI driver. The SPI of_alias ID was used as an index
into the fifo_lvl_mask to determine the FIFO depth of the SPI node.
Changing the alias ID into the device tree would make the driver choose
a wrong FIFO size configuration, if not accessing past the fifo_lvl_mask
array boundaries. Not specifying an SPI alias would make the driver fail
to probe, which was wrong too. Thus I updated the driver and I provided
alternatives to either infer the FIFO size from the compatible, where
the SoC uses the same FIFO size for all the instances of the IP, or by
using the "samsung,spi-fifosize" dt property, where the SoC uses
different FIFO sizes for the instances of the IP. This patch set takes
care of the second case and adds "samsung,spi-fifosize" for all the SoCs
that need it.

Cheers,
ta

Tudor Ambarus (7):
  ARM: dts: samsung: s5pv210: specify the SPI fifosize
  ARM: dts: samsung: exynos3250: specify the SPI fifosize
  ARM: dts: samsung: exynos4: specify the SPI fifosize
  ARM: dts: samsung: exynos5250: specify the SPI fifosize
  ARM: dts: samsung: exynos5450: specify the SPI fifosize
  ARM: dts: samsung: exynos5433: specify the SPI fifosize
  ARM: dts: samsung: exynosautov9: specify the SPI fifosize

 arch/arm/boot/dts/samsung/exynos3250.dtsi    |  2 ++
 arch/arm/boot/dts/samsung/exynos4.dtsi       |  3 +++
 arch/arm/boot/dts/samsung/exynos5250.dtsi    |  3 +++
 arch/arm/boot/dts/samsung/exynos5420.dtsi    |  3 +++
 arch/arm/boot/dts/samsung/s5pv210.dtsi       |  2 ++
 arch/arm64/boot/dts/exynos/exynos5433.dtsi   |  5 +++++
 arch/arm64/boot/dts/exynos/exynosautov9.dtsi | 12 ++++++++++++
 7 files changed, 30 insertions(+)

-- 
2.43.0.429.g432eaa2c6b-goog


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

* [PATCH 1/7] ARM: dts: samsung: s5pv210: specify the SPI fifosize
  2024-01-25 15:16 [PATCH 0/7] ARM: dts: samsung: specify the SPI fifosize Tudor Ambarus
@ 2024-01-25 15:16 ` Tudor Ambarus
  2024-01-25 15:16 ` [PATCH 2/7] ARM: dts: samsung: exynos3250: " Tudor Ambarus
                   ` (8 subsequent siblings)
  9 siblings, 0 replies; 12+ messages in thread
From: Tudor Ambarus @ 2024-01-25 15:16 UTC (permalink / raw)
  To: krzysztof.kozlowski+dt, broonie
  Cc: robh+dt, conor+dt, alim.akhtar, devicetree, linux-arm-kernel,
	linux-samsung-soc, linux-kernel, linux-spi, andre.draszik,
	peter.griffin, semen.protsenko, kernel-team, willmcvicker,
	Tudor Ambarus

Up to now the SPI alias was used as an index into an array defined in
the SPI driver to determine the SPI FIFO size. Drop the dependency on
the SPI alias and specify the SPI FIFO size directly into the SPI node.

The SPI nodes defined in s5pv210.dtsi are not enabled in any board file.
No SPI aliases are defined, thus I chose the FIFO size using common
sense: index 0 of the array corresponds to spi0, and index 1 to spi1.

Signed-off-by: Tudor Ambarus <tudor.ambarus@linaro.org>
---
 arch/arm/boot/dts/samsung/s5pv210.dtsi | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/arch/arm/boot/dts/samsung/s5pv210.dtsi b/arch/arm/boot/dts/samsung/s5pv210.dtsi
index ed560c9a3aa1..e7225b6c94e8 100644
--- a/arch/arm/boot/dts/samsung/s5pv210.dtsi
+++ b/arch/arm/boot/dts/samsung/s5pv210.dtsi
@@ -161,6 +161,7 @@ spi0: spi@e1300000 {
 			pinctrl-0 = <&spi0_bus>;
 			#address-cells = <1>;
 			#size-cells = <0>;
+			samsung,spi-fifosize = <256>;
 			status = "disabled";
 		};
 
@@ -177,6 +178,7 @@ spi1: spi@e1400000 {
 			pinctrl-0 = <&spi1_bus>;
 			#address-cells = <1>;
 			#size-cells = <0>;
+			samsung,spi-fifosize = <64>;
 			status = "disabled";
 		};
 
-- 
2.43.0.429.g432eaa2c6b-goog


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

* [PATCH 2/7] ARM: dts: samsung: exynos3250: specify the SPI fifosize
  2024-01-25 15:16 [PATCH 0/7] ARM: dts: samsung: specify the SPI fifosize Tudor Ambarus
  2024-01-25 15:16 ` [PATCH 1/7] ARM: dts: samsung: s5pv210: " Tudor Ambarus
@ 2024-01-25 15:16 ` Tudor Ambarus
  2024-01-25 15:16 ` [PATCH 3/7] ARM: dts: samsung: exynos4: " Tudor Ambarus
                   ` (7 subsequent siblings)
  9 siblings, 0 replies; 12+ messages in thread
From: Tudor Ambarus @ 2024-01-25 15:16 UTC (permalink / raw)
  To: krzysztof.kozlowski+dt, broonie
  Cc: robh+dt, conor+dt, alim.akhtar, devicetree, linux-arm-kernel,
	linux-samsung-soc, linux-kernel, linux-spi, andre.draszik,
	peter.griffin, semen.protsenko, kernel-team, willmcvicker,
	Tudor Ambarus

Up to now the SPI alias was used as an index into an array defined in
the SPI driver to determine the SPI FIFO size. Drop the dependency on
the SPI alias and specify the SPI FIFO size directly into the SPI node.

Signed-off-by: Tudor Ambarus <tudor.ambarus@linaro.org>
---
 arch/arm/boot/dts/samsung/exynos3250.dtsi | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/arch/arm/boot/dts/samsung/exynos3250.dtsi b/arch/arm/boot/dts/samsung/exynos3250.dtsi
index 3f1015edab43..2f974059ec45 100644
--- a/arch/arm/boot/dts/samsung/exynos3250.dtsi
+++ b/arch/arm/boot/dts/samsung/exynos3250.dtsi
@@ -826,6 +826,7 @@ spi_0: spi@13920000 {
 			samsung,spi-src-clk = <0>;
 			pinctrl-names = "default";
 			pinctrl-0 = <&spi0_bus>;
+			samsung,spi-fifosize = <256>;
 			status = "disabled";
 		};
 
@@ -842,6 +843,7 @@ spi_1: spi@13930000 {
 			samsung,spi-src-clk = <0>;
 			pinctrl-names = "default";
 			pinctrl-0 = <&spi1_bus>;
+			samsung,spi-fifosize = <64>;
 			status = "disabled";
 		};
 
-- 
2.43.0.429.g432eaa2c6b-goog


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

* [PATCH 3/7] ARM: dts: samsung: exynos4: specify the SPI fifosize
  2024-01-25 15:16 [PATCH 0/7] ARM: dts: samsung: specify the SPI fifosize Tudor Ambarus
  2024-01-25 15:16 ` [PATCH 1/7] ARM: dts: samsung: s5pv210: " Tudor Ambarus
  2024-01-25 15:16 ` [PATCH 2/7] ARM: dts: samsung: exynos3250: " Tudor Ambarus
@ 2024-01-25 15:16 ` Tudor Ambarus
  2024-01-25 15:16 ` [PATCH 4/7] ARM: dts: samsung: exynos5250: " Tudor Ambarus
                   ` (6 subsequent siblings)
  9 siblings, 0 replies; 12+ messages in thread
From: Tudor Ambarus @ 2024-01-25 15:16 UTC (permalink / raw)
  To: krzysztof.kozlowski+dt, broonie
  Cc: robh+dt, conor+dt, alim.akhtar, devicetree, linux-arm-kernel,
	linux-samsung-soc, linux-kernel, linux-spi, andre.draszik,
	peter.griffin, semen.protsenko, kernel-team, willmcvicker,
	Tudor Ambarus

Up to now the SPI alias was used as an index into an array defined in
the SPI driver to determine the SPI FIFO size. Drop the dependency on
the SPI alias and specify the SPI FIFO size directly into the SPI node.

Signed-off-by: Tudor Ambarus <tudor.ambarus@linaro.org>
---
 arch/arm/boot/dts/samsung/exynos4.dtsi | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/arch/arm/boot/dts/samsung/exynos4.dtsi b/arch/arm/boot/dts/samsung/exynos4.dtsi
index 7f981b5c0d64..10967063727c 100644
--- a/arch/arm/boot/dts/samsung/exynos4.dtsi
+++ b/arch/arm/boot/dts/samsung/exynos4.dtsi
@@ -621,6 +621,7 @@ spi_0: spi@13920000 {
 			clock-names = "spi", "spi_busclk0";
 			pinctrl-names = "default";
 			pinctrl-0 = <&spi0_bus>;
+			samsung,spi-fifosize = <256>;
 			status = "disabled";
 		};
 
@@ -636,6 +637,7 @@ spi_1: spi@13930000 {
 			clock-names = "spi", "spi_busclk0";
 			pinctrl-names = "default";
 			pinctrl-0 = <&spi1_bus>;
+			samsung,spi-fifosize = <64>;
 			status = "disabled";
 		};
 
@@ -651,6 +653,7 @@ spi_2: spi@13940000 {
 			clock-names = "spi", "spi_busclk0";
 			pinctrl-names = "default";
 			pinctrl-0 = <&spi2_bus>;
+			samsung,spi-fifosize = <64>;
 			status = "disabled";
 		};
 
-- 
2.43.0.429.g432eaa2c6b-goog


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

* [PATCH 4/7] ARM: dts: samsung: exynos5250: specify the SPI fifosize
  2024-01-25 15:16 [PATCH 0/7] ARM: dts: samsung: specify the SPI fifosize Tudor Ambarus
                   ` (2 preceding siblings ...)
  2024-01-25 15:16 ` [PATCH 3/7] ARM: dts: samsung: exynos4: " Tudor Ambarus
@ 2024-01-25 15:16 ` Tudor Ambarus
  2024-01-25 15:16 ` [PATCH 5/7] ARM: dts: samsung: exynos5450: " Tudor Ambarus
                   ` (5 subsequent siblings)
  9 siblings, 0 replies; 12+ messages in thread
From: Tudor Ambarus @ 2024-01-25 15:16 UTC (permalink / raw)
  To: krzysztof.kozlowski+dt, broonie
  Cc: robh+dt, conor+dt, alim.akhtar, devicetree, linux-arm-kernel,
	linux-samsung-soc, linux-kernel, linux-spi, andre.draszik,
	peter.griffin, semen.protsenko, kernel-team, willmcvicker,
	Tudor Ambarus

Up to now the SPI alias was used as an index into an array defined in
the SPI driver to determine the SPI FIFO size. Drop the dependency on
the SPI alias and specify the SPI FIFO size directly into the SPI node.

Signed-off-by: Tudor Ambarus <tudor.ambarus@linaro.org>
---
 arch/arm/boot/dts/samsung/exynos5250.dtsi | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/arch/arm/boot/dts/samsung/exynos5250.dtsi b/arch/arm/boot/dts/samsung/exynos5250.dtsi
index 99c84bebf25a..8e81d49622b7 100644
--- a/arch/arm/boot/dts/samsung/exynos5250.dtsi
+++ b/arch/arm/boot/dts/samsung/exynos5250.dtsi
@@ -511,6 +511,7 @@ spi_0: spi@12d20000 {
 			clock-names = "spi", "spi_busclk0";
 			pinctrl-names = "default";
 			pinctrl-0 = <&spi0_bus>;
+			samsung,spi-fifosize = <256>;
 		};
 
 		spi_1: spi@12d30000 {
@@ -526,6 +527,7 @@ spi_1: spi@12d30000 {
 			clock-names = "spi", "spi_busclk0";
 			pinctrl-names = "default";
 			pinctrl-0 = <&spi1_bus>;
+			samsung,spi-fifosize = <64>;
 		};
 
 		spi_2: spi@12d40000 {
@@ -541,6 +543,7 @@ spi_2: spi@12d40000 {
 			clock-names = "spi", "spi_busclk0";
 			pinctrl-names = "default";
 			pinctrl-0 = <&spi2_bus>;
+			samsung,spi-fifosize = <64>;
 		};
 
 		mmc_0: mmc@12200000 {
-- 
2.43.0.429.g432eaa2c6b-goog


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

* [PATCH 5/7] ARM: dts: samsung: exynos5450: specify the SPI fifosize
  2024-01-25 15:16 [PATCH 0/7] ARM: dts: samsung: specify the SPI fifosize Tudor Ambarus
                   ` (3 preceding siblings ...)
  2024-01-25 15:16 ` [PATCH 4/7] ARM: dts: samsung: exynos5250: " Tudor Ambarus
@ 2024-01-25 15:16 ` Tudor Ambarus
  2024-01-30 17:08   ` Henrik Grimler
  2024-01-25 15:16 ` [PATCH 6/7] ARM: dts: samsung: exynos5433: " Tudor Ambarus
                   ` (4 subsequent siblings)
  9 siblings, 1 reply; 12+ messages in thread
From: Tudor Ambarus @ 2024-01-25 15:16 UTC (permalink / raw)
  To: krzysztof.kozlowski+dt, broonie
  Cc: robh+dt, conor+dt, alim.akhtar, devicetree, linux-arm-kernel,
	linux-samsung-soc, linux-kernel, linux-spi, andre.draszik,
	peter.griffin, semen.protsenko, kernel-team, willmcvicker,
	Tudor Ambarus

Up to now the SPI alias was used as an index into an array defined in
the SPI driver to determine the SPI FIFO size. Drop the dependency on
the SPI alias and specify the SPI FIFO size directly into the SPI node.

Signed-off-by: Tudor Ambarus <tudor.ambarus@linaro.org>
---
 arch/arm/boot/dts/samsung/exynos5420.dtsi | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/arch/arm/boot/dts/samsung/exynos5420.dtsi b/arch/arm/boot/dts/samsung/exynos5420.dtsi
index 25ed90374679..e22692063aa9 100644
--- a/arch/arm/boot/dts/samsung/exynos5420.dtsi
+++ b/arch/arm/boot/dts/samsung/exynos5420.dtsi
@@ -658,6 +658,7 @@ spi_0: spi@12d20000 {
 			pinctrl-0 = <&spi0_bus>;
 			clocks = <&clock CLK_SPI0>, <&clock CLK_SCLK_SPI0>;
 			clock-names = "spi", "spi_busclk0";
+			samsung,spi-fifosize = <256>;
 			status = "disabled";
 		};
 
@@ -674,6 +675,7 @@ spi_1: spi@12d30000 {
 			pinctrl-0 = <&spi1_bus>;
 			clocks = <&clock CLK_SPI1>, <&clock CLK_SCLK_SPI1>;
 			clock-names = "spi", "spi_busclk0";
+			samsung,spi-fifosize = <64>;
 			status = "disabled";
 		};
 
@@ -690,6 +692,7 @@ spi_2: spi@12d40000 {
 			pinctrl-0 = <&spi2_bus>;
 			clocks = <&clock CLK_SPI2>, <&clock CLK_SCLK_SPI2>;
 			clock-names = "spi", "spi_busclk0";
+			samsung,spi-fifosize = <64>;
 			status = "disabled";
 		};
 
-- 
2.43.0.429.g432eaa2c6b-goog


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

* [PATCH 6/7] ARM: dts: samsung: exynos5433: specify the SPI fifosize
  2024-01-25 15:16 [PATCH 0/7] ARM: dts: samsung: specify the SPI fifosize Tudor Ambarus
                   ` (4 preceding siblings ...)
  2024-01-25 15:16 ` [PATCH 5/7] ARM: dts: samsung: exynos5450: " Tudor Ambarus
@ 2024-01-25 15:16 ` Tudor Ambarus
  2024-01-25 15:16 ` [PATCH 7/7] ARM: dts: samsung: exynosautov9: " Tudor Ambarus
                   ` (3 subsequent siblings)
  9 siblings, 0 replies; 12+ messages in thread
From: Tudor Ambarus @ 2024-01-25 15:16 UTC (permalink / raw)
  To: krzysztof.kozlowski+dt, broonie
  Cc: robh+dt, conor+dt, alim.akhtar, devicetree, linux-arm-kernel,
	linux-samsung-soc, linux-kernel, linux-spi, andre.draszik,
	peter.griffin, semen.protsenko, kernel-team, willmcvicker,
	Tudor Ambarus

Up to now the SPI alias was used as an index into an array defined in
the SPI driver to determine the SPI FIFO size. Drop the dependency on
the SPI alias and specify the SPI FIFO size directly into the SPI node.

The FIFO sizes were determined based on the SPI aliases that are defined
in exynos5433-tm2-common.dtsi.

Signed-off-by: Tudor Ambarus <tudor.ambarus@linaro.org>
---
 arch/arm64/boot/dts/exynos/exynos5433.dtsi | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/arch/arm64/boot/dts/exynos/exynos5433.dtsi b/arch/arm64/boot/dts/exynos/exynos5433.dtsi
index 7fbbec04bff0..b5c898703e3b 100644
--- a/arch/arm64/boot/dts/exynos/exynos5433.dtsi
+++ b/arch/arm64/boot/dts/exynos/exynos5433.dtsi
@@ -1468,6 +1468,7 @@ spi_0: spi@14d20000 {
 			pinctrl-names = "default";
 			pinctrl-0 = <&spi0_bus>;
 			num-cs = <1>;
+			samsung,spi-fifosize = <256>;
 			status = "disabled";
 		};
 
@@ -1487,6 +1488,7 @@ spi_1: spi@14d30000 {
 			pinctrl-names = "default";
 			pinctrl-0 = <&spi1_bus>;
 			num-cs = <1>;
+			samsung,spi-fifosize = <64>;
 			status = "disabled";
 		};
 
@@ -1506,6 +1508,7 @@ spi_2: spi@14d40000 {
 			pinctrl-names = "default";
 			pinctrl-0 = <&spi2_bus>;
 			num-cs = <1>;
+			samsung,spi-fifosize = <64>;
 			status = "disabled";
 		};
 
@@ -1525,6 +1528,7 @@ spi_3: spi@14d50000 {
 			pinctrl-names = "default";
 			pinctrl-0 = <&spi3_bus>;
 			num-cs = <1>;
+			samsung,spi-fifosize = <64>;
 			status = "disabled";
 		};
 
@@ -1544,6 +1548,7 @@ spi_4: spi@14d00000 {
 			pinctrl-names = "default";
 			pinctrl-0 = <&spi4_bus>;
 			num-cs = <1>;
+			samsung,spi-fifosize = <64>;
 			status = "disabled";
 		};
 
-- 
2.43.0.429.g432eaa2c6b-goog


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

* [PATCH 7/7] ARM: dts: samsung: exynosautov9: specify the SPI fifosize
  2024-01-25 15:16 [PATCH 0/7] ARM: dts: samsung: specify the SPI fifosize Tudor Ambarus
                   ` (5 preceding siblings ...)
  2024-01-25 15:16 ` [PATCH 6/7] ARM: dts: samsung: exynos5433: " Tudor Ambarus
@ 2024-01-25 15:16 ` Tudor Ambarus
  2024-01-25 15:53 ` [PATCH 0/7] ARM: dts: samsung: " Mark Brown
                   ` (2 subsequent siblings)
  9 siblings, 0 replies; 12+ messages in thread
From: Tudor Ambarus @ 2024-01-25 15:16 UTC (permalink / raw)
  To: krzysztof.kozlowski+dt, broonie
  Cc: robh+dt, conor+dt, alim.akhtar, devicetree, linux-arm-kernel,
	linux-samsung-soc, linux-kernel, linux-spi, andre.draszik,
	peter.griffin, semen.protsenko, kernel-team, willmcvicker,
	Tudor Ambarus

Up to now the SPI alias was used as an index into an array defined in
the SPI driver to determine the SPI FIFO size. Drop the dependency on
the SPI alias and specify the SPI FIFO size directly into the SPI node.

There are no SPI aliases defined, thus the FIFO size was determined by
matching the FIFO size of the I2C node of the same USI parent.

Signed-off-by: Tudor Ambarus <tudor.ambarus@linaro.org>
---
 arch/arm64/boot/dts/exynos/exynosautov9.dtsi | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/arch/arm64/boot/dts/exynos/exynosautov9.dtsi b/arch/arm64/boot/dts/exynos/exynosautov9.dtsi
index c871a2f49fda..3615da60dc9a 100644
--- a/arch/arm64/boot/dts/exynos/exynosautov9.dtsi
+++ b/arch/arm64/boot/dts/exynos/exynosautov9.dtsi
@@ -435,6 +435,7 @@ spi_0: spi@10300000 {
 				num-cs = <1>;
 				#address-cells = <1>;
 				#size-cells = <0>;
+				samsung,spi-fifosize = <256>;
 				status = "disabled";
 			};
 
@@ -526,6 +527,7 @@ spi_1: spi@10320000 {
 				num-cs = <1>;
 				#address-cells = <1>;
 				#size-cells = <0>;
+				samsung,spi-fifosize = <256>;
 				status = "disabled";
 			};
 
@@ -617,6 +619,7 @@ spi_2: spi@10340000 {
 				num-cs = <1>;
 				#address-cells = <1>;
 				#size-cells = <0>;
+				samsung,spi-fifosize = <64>;
 				status = "disabled";
 			};
 
@@ -708,6 +711,7 @@ spi_3: spi@10360000 {
 				num-cs = <1>;
 				#address-cells = <1>;
 				#size-cells = <0>;
+				samsung,spi-fifosize = <64>;
 				status = "disabled";
 			};
 
@@ -799,6 +803,7 @@ spi_4: spi@10380000 {
 				num-cs = <1>;
 				#address-cells = <1>;
 				#size-cells = <0>;
+				samsung,spi-fifosize = <64>;
 				status = "disabled";
 			};
 
@@ -890,6 +895,7 @@ spi_5: spi@103a0000 {
 				num-cs = <1>;
 				#address-cells = <1>;
 				#size-cells = <0>;
+				samsung,spi-fifosize = <64>;
 				status = "disabled";
 			};
 
@@ -981,6 +987,7 @@ spi_6: spi@10900000 {
 				num-cs = <1>;
 				#address-cells = <1>;
 				#size-cells = <0>;
+				samsung,spi-fifosize = <256>;
 				status = "disabled";
 			};
 
@@ -1072,6 +1079,7 @@ spi_7: spi@10920000 {
 				num-cs = <1>;
 				#address-cells = <1>;
 				#size-cells = <0>;
+				samsung,spi-fifosize = <64>;
 				status = "disabled";
 			};
 
@@ -1163,6 +1171,7 @@ spi_8: spi@10940000 {
 				num-cs = <1>;
 				#address-cells = <1>;
 				#size-cells = <0>;
+				samsung,spi-fifosize = <64>;
 				status = "disabled";
 			};
 
@@ -1254,6 +1263,7 @@ spi_9: spi@10960000 {
 				num-cs = <1>;
 				#address-cells = <1>;
 				#size-cells = <0>;
+				samsung,spi-fifosize = <64>;
 				status = "disabled";
 			};
 
@@ -1345,6 +1355,7 @@ spi_10: spi@10980000 {
 				num-cs = <1>;
 				#address-cells = <1>;
 				#size-cells = <0>;
+				samsung,spi-fifosize = <64>;
 				status = "disabled";
 			};
 
@@ -1434,6 +1445,7 @@ spi_11: spi@109a0000 {
 				num-cs = <1>;
 				#address-cells = <1>;
 				#size-cells = <0>;
+				samsung,spi-fifosize = <64>;
 				status = "disabled";
 			};
 
-- 
2.43.0.429.g432eaa2c6b-goog


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

* Re: [PATCH 0/7] ARM: dts: samsung: specify the SPI fifosize
  2024-01-25 15:16 [PATCH 0/7] ARM: dts: samsung: specify the SPI fifosize Tudor Ambarus
                   ` (6 preceding siblings ...)
  2024-01-25 15:16 ` [PATCH 7/7] ARM: dts: samsung: exynosautov9: " Tudor Ambarus
@ 2024-01-25 15:53 ` Mark Brown
  2024-01-25 15:56 ` Krzysztof Kozlowski
  2024-02-01 10:33 ` Krzysztof Kozlowski
  9 siblings, 0 replies; 12+ messages in thread
From: Mark Brown @ 2024-01-25 15:53 UTC (permalink / raw)
  To: Tudor Ambarus
  Cc: krzysztof.kozlowski+dt, robh+dt, conor+dt, alim.akhtar,
	devicetree, linux-arm-kernel, linux-samsung-soc, linux-kernel,
	linux-spi, andre.draszik, peter.griffin, semen.protsenko,
	kernel-team, willmcvicker

[-- Attachment #1: Type: text/plain, Size: 758 bytes --]

On Thu, Jan 25, 2024 at 03:16:23PM +0000, Tudor Ambarus wrote:

> These patches close the circle and break the dependency between the SPI
> of_alias ID and the SPI driver. The SPI of_alias ID was used as an index
> into the fifo_lvl_mask to determine the FIFO depth of the SPI node.
> Changing the alias ID into the device tree would make the driver choose
> a wrong FIFO size configuration, if not accessing past the fifo_lvl_mask
> array boundaries. Not specifying an SPI alias would make the driver fail
> to probe, which was wrong too. Thus I updated the driver and I provided

Specifying a specific compatible is just good practice, it makes the DT
much more robust for when we discover new things about the hardware and
reduces the surface of the ABI.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

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

* Re: [PATCH 0/7] ARM: dts: samsung: specify the SPI fifosize
  2024-01-25 15:16 [PATCH 0/7] ARM: dts: samsung: specify the SPI fifosize Tudor Ambarus
                   ` (7 preceding siblings ...)
  2024-01-25 15:53 ` [PATCH 0/7] ARM: dts: samsung: " Mark Brown
@ 2024-01-25 15:56 ` Krzysztof Kozlowski
  2024-02-01 10:33 ` Krzysztof Kozlowski
  9 siblings, 0 replies; 12+ messages in thread
From: Krzysztof Kozlowski @ 2024-01-25 15:56 UTC (permalink / raw)
  To: Tudor Ambarus, krzysztof.kozlowski+dt, broonie
  Cc: robh+dt, conor+dt, alim.akhtar, devicetree, linux-arm-kernel,
	linux-samsung-soc, linux-kernel, linux-spi, andre.draszik,
	peter.griffin, semen.protsenko, kernel-team, willmcvicker

On 25/01/2024 16:16, Tudor Ambarus wrote:
> Hi,
> 
> The "samsung,spi-fifosize" was introduced in the following patch set:
> https://lore.kernel.org/linux-arm-kernel/20240125145007.748295-1-tudor.ambarus@linaro.org/T/#t
> 
> I expect Mark will provide an immutable tag for the bindings so that it
> can be merged into the samsung tree. We'll avoid this way using the
> property into the device trees without having it defined into the
> bindings.

No need. Any merge back to DTS branch would anyway question my pull
request to arm soc, so I am not going to do this, unless absolutely
necessary.

I'll take the DTS once binding is merged to ASoC, so everything will be
fine as long linux-next is fine.

Best regards,
Krzysztof


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

* Re: [PATCH 5/7] ARM: dts: samsung: exynos5450: specify the SPI fifosize
  2024-01-25 15:16 ` [PATCH 5/7] ARM: dts: samsung: exynos5450: " Tudor Ambarus
@ 2024-01-30 17:08   ` Henrik Grimler
  0 siblings, 0 replies; 12+ messages in thread
From: Henrik Grimler @ 2024-01-30 17:08 UTC (permalink / raw)
  To: Tudor Ambarus
  Cc: krzysztof.kozlowski+dt, broonie, robh+dt, conor+dt, alim.akhtar,
	devicetree, linux-arm-kernel, linux-samsung-soc, linux-kernel,
	linux-spi, andre.draszik, peter.griffin, semen.protsenko,
	kernel-team, willmcvicker

Hi Tudor,

There is a typo in the subject of this patch, exynos 5450 instead of
5420.  Maybe that is something krzk can fix when applying.

Best regards,
Henrik Grimler

On Thu, Jan 25, 2024 at 03:16:28PM +0000, Tudor Ambarus wrote:
> Up to now the SPI alias was used as an index into an array defined in
> the SPI driver to determine the SPI FIFO size. Drop the dependency on
> the SPI alias and specify the SPI FIFO size directly into the SPI node.
> 
> Signed-off-by: Tudor Ambarus <tudor.ambarus@linaro.org>
> ---
>  arch/arm/boot/dts/samsung/exynos5420.dtsi | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/arch/arm/boot/dts/samsung/exynos5420.dtsi b/arch/arm/boot/dts/samsung/exynos5420.dtsi
> index 25ed90374679..e22692063aa9 100644
> --- a/arch/arm/boot/dts/samsung/exynos5420.dtsi
> +++ b/arch/arm/boot/dts/samsung/exynos5420.dtsi
> @@ -658,6 +658,7 @@ spi_0: spi@12d20000 {
>  			pinctrl-0 = <&spi0_bus>;
>  			clocks = <&clock CLK_SPI0>, <&clock CLK_SCLK_SPI0>;
>  			clock-names = "spi", "spi_busclk0";
> +			samsung,spi-fifosize = <256>;
>  			status = "disabled";
>  		};
>  
> @@ -674,6 +675,7 @@ spi_1: spi@12d30000 {
>  			pinctrl-0 = <&spi1_bus>;
>  			clocks = <&clock CLK_SPI1>, <&clock CLK_SCLK_SPI1>;
>  			clock-names = "spi", "spi_busclk0";
> +			samsung,spi-fifosize = <64>;
>  			status = "disabled";
>  		};
>  
> @@ -690,6 +692,7 @@ spi_2: spi@12d40000 {
>  			pinctrl-0 = <&spi2_bus>;
>  			clocks = <&clock CLK_SPI2>, <&clock CLK_SCLK_SPI2>;
>  			clock-names = "spi", "spi_busclk0";
> +			samsung,spi-fifosize = <64>;
>  			status = "disabled";
>  		};
>  
> -- 
> 2.43.0.429.g432eaa2c6b-goog
> 
> 

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

* Re: [PATCH 0/7] ARM: dts: samsung: specify the SPI fifosize
  2024-01-25 15:16 [PATCH 0/7] ARM: dts: samsung: specify the SPI fifosize Tudor Ambarus
                   ` (8 preceding siblings ...)
  2024-01-25 15:56 ` Krzysztof Kozlowski
@ 2024-02-01 10:33 ` Krzysztof Kozlowski
  9 siblings, 0 replies; 12+ messages in thread
From: Krzysztof Kozlowski @ 2024-02-01 10:33 UTC (permalink / raw)
  To: Tudor Ambarus, krzysztof.kozlowski+dt, broonie
  Cc: robh+dt, conor+dt, alim.akhtar, devicetree, linux-arm-kernel,
	linux-samsung-soc, linux-kernel, linux-spi, andre.draszik,
	peter.griffin, semen.protsenko, kernel-team, willmcvicker

On 25/01/2024 16:16, Tudor Ambarus wrote:
> Hi,
> 
> The "samsung,spi-fifosize" was introduced in the following patch set:
> https://lore.kernel.org/linux-arm-kernel/20240125145007.748295-1-tudor.ambarus@linaro.org/T/#t
> 

Judging by Rob's statement the bindings were not accepted, so I drop
this series for now.

Best regards,
Krzysztof


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

end of thread, other threads:[~2024-02-01 10:33 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-01-25 15:16 [PATCH 0/7] ARM: dts: samsung: specify the SPI fifosize Tudor Ambarus
2024-01-25 15:16 ` [PATCH 1/7] ARM: dts: samsung: s5pv210: " Tudor Ambarus
2024-01-25 15:16 ` [PATCH 2/7] ARM: dts: samsung: exynos3250: " Tudor Ambarus
2024-01-25 15:16 ` [PATCH 3/7] ARM: dts: samsung: exynos4: " Tudor Ambarus
2024-01-25 15:16 ` [PATCH 4/7] ARM: dts: samsung: exynos5250: " Tudor Ambarus
2024-01-25 15:16 ` [PATCH 5/7] ARM: dts: samsung: exynos5450: " Tudor Ambarus
2024-01-30 17:08   ` Henrik Grimler
2024-01-25 15:16 ` [PATCH 6/7] ARM: dts: samsung: exynos5433: " Tudor Ambarus
2024-01-25 15:16 ` [PATCH 7/7] ARM: dts: samsung: exynosautov9: " Tudor Ambarus
2024-01-25 15:53 ` [PATCH 0/7] ARM: dts: samsung: " Mark Brown
2024-01-25 15:56 ` Krzysztof Kozlowski
2024-02-01 10:33 ` 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).