Linux-ARM-Kernel Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] arm64: dts: rockchip: Add spi nodes for RK3528
@ 2025-05-20 10:01 Chukun Pan
  2025-05-20 10:01 ` [PATCH 1/2] spi: dt-bindings: Add rk3528-spi compatible Chukun Pan
                   ` (3 more replies)
  0 siblings, 4 replies; 8+ messages in thread
From: Chukun Pan @ 2025-05-20 10:01 UTC (permalink / raw)
  To: Heiko Stuebner
  Cc: Yao Zi, Rob Herring, Mark Brown, Jonas Karlman, Chukun Pan,
	Conor Dooley, Krzysztof Kozlowski, linux-arm-kernel,
	linux-rockchip, linux-kernel, devicetree, linux-spi

There are 2 SPI controllers on the RK3528 SoC, describe it.
Tested using st7789v chip with spi-cpha and spi-cpol properties.

[   10.831306] fb_st7789v spi0.0: fbtft_property_value: buswidth = 8
[   11.042915] graphics fb0: fb_st7789v frame buffer, 240x320, 150 KiB
 video memory, 4 KiB buffer memory, fps=20, spi0.0 at 15 MHz

Chukun Pan (2):
  spi: dt-bindings: Add rk3528-spi compatible
  arm64: dts: rockchip: Add spi nodes for RK3528

 .../devicetree/bindings/spi/spi-rockchip.yaml |  1 +
 arch/arm64/boot/dts/rockchip/rk3528.dtsi      | 28 +++++++++++++++++++
 2 files changed, 29 insertions(+)

-- 
2.25.1



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

* [PATCH 1/2] spi: dt-bindings: Add rk3528-spi compatible
  2025-05-20 10:01 [PATCH 0/2] arm64: dts: rockchip: Add spi nodes for RK3528 Chukun Pan
@ 2025-05-20 10:01 ` Chukun Pan
  2025-05-20 15:45   ` Conor Dooley
  2025-05-20 10:01 ` [PATCH 2/2] arm64: dts: rockchip: Add spi nodes for RK3528 Chukun Pan
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 8+ messages in thread
From: Chukun Pan @ 2025-05-20 10:01 UTC (permalink / raw)
  To: Heiko Stuebner
  Cc: Yao Zi, Rob Herring, Mark Brown, Jonas Karlman, Chukun Pan,
	Conor Dooley, Krzysztof Kozlowski, linux-arm-kernel,
	linux-rockchip, linux-kernel, devicetree, linux-spi

This adds a compatible string for the SPI controller on RK3528.

Signed-off-by: Chukun Pan <amadeus@jmu.edu.cn>
---
 Documentation/devicetree/bindings/spi/spi-rockchip.yaml | 1 +
 1 file changed, 1 insertion(+)

diff --git a/Documentation/devicetree/bindings/spi/spi-rockchip.yaml b/Documentation/devicetree/bindings/spi/spi-rockchip.yaml
index 104f5ffdd04e..748faf7f7081 100644
--- a/Documentation/devicetree/bindings/spi/spi-rockchip.yaml
+++ b/Documentation/devicetree/bindings/spi/spi-rockchip.yaml
@@ -34,6 +34,7 @@ properties:
               - rockchip,rk3328-spi
               - rockchip,rk3368-spi
               - rockchip,rk3399-spi
+              - rockchip,rk3528-spi
               - rockchip,rk3562-spi
               - rockchip,rk3568-spi
               - rockchip,rk3576-spi
-- 
2.25.1



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

* [PATCH 2/2] arm64: dts: rockchip: Add spi nodes for RK3528
  2025-05-20 10:01 [PATCH 0/2] arm64: dts: rockchip: Add spi nodes for RK3528 Chukun Pan
  2025-05-20 10:01 ` [PATCH 1/2] spi: dt-bindings: Add rk3528-spi compatible Chukun Pan
@ 2025-05-20 10:01 ` Chukun Pan
  2025-05-20 10:51   ` Jonas Karlman
  2025-05-21 17:56 ` (subset) [PATCH 0/2] " Mark Brown
  2025-06-09 10:22 ` Heiko Stuebner
  3 siblings, 1 reply; 8+ messages in thread
From: Chukun Pan @ 2025-05-20 10:01 UTC (permalink / raw)
  To: Heiko Stuebner
  Cc: Yao Zi, Rob Herring, Mark Brown, Jonas Karlman, Chukun Pan,
	Conor Dooley, Krzysztof Kozlowski, linux-arm-kernel,
	linux-rockchip, linux-kernel, devicetree, linux-spi

There are 2 SPI controllers on the RK3528 SoC, describe it.

Signed-off-by: Chukun Pan <amadeus@jmu.edu.cn>
---
 arch/arm64/boot/dts/rockchip/rk3528.dtsi | 28 ++++++++++++++++++++++++
 1 file changed, 28 insertions(+)

diff --git a/arch/arm64/boot/dts/rockchip/rk3528.dtsi b/arch/arm64/boot/dts/rockchip/rk3528.dtsi
index b2724c969a76..4d60c09219f9 100644
--- a/arch/arm64/boot/dts/rockchip/rk3528.dtsi
+++ b/arch/arm64/boot/dts/rockchip/rk3528.dtsi
@@ -371,6 +371,34 @@ ioc_grf: syscon@ff540000 {
 			reg = <0x0 0xff540000 0x0 0x40000>;
 		};
 
+		spi0: spi@ff9c0000 {
+			compatible = "rockchip,rk3528-spi",
+				     "rockchip,rk3066-spi";
+			reg = <0x0 0xff9c0000 0x0 0x1000>;
+			clocks = <&cru CLK_SPI0>, <&cru PCLK_SPI0>;
+			clock-names = "spiclk", "apb_pclk";
+			interrupts = <GIC_SPI 131 IRQ_TYPE_LEVEL_HIGH>;
+			dmas = <&dmac 25>, <&dmac 24>;
+			dma-names = "tx", "rx";
+			#address-cells = <1>;
+			#size-cells = <0>;
+			status = "disabled";
+		};
+
+		spi1: spi@ff9d0000 {
+			compatible = "rockchip,rk3528-spi",
+				     "rockchip,rk3066-spi";
+			reg = <0x0 0xff9d0000 0x0 0x1000>;
+			clocks = <&cru CLK_SPI1>, <&cru PCLK_SPI1>;
+			clock-names = "spiclk", "apb_pclk";
+			interrupts = <GIC_SPI 132 IRQ_TYPE_LEVEL_HIGH>;
+			dmas = <&dmac 31>, <&dmac 30>;
+			dma-names = "tx", "rx";
+			#address-cells = <1>;
+			#size-cells = <0>;
+			status = "disabled";
+		};
+
 		uart0: serial@ff9f0000 {
 			compatible = "rockchip,rk3528-uart", "snps,dw-apb-uart";
 			reg = <0x0 0xff9f0000 0x0 0x100>;
-- 
2.25.1



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

* Re: [PATCH 2/2] arm64: dts: rockchip: Add spi nodes for RK3528
  2025-05-20 10:01 ` [PATCH 2/2] arm64: dts: rockchip: Add spi nodes for RK3528 Chukun Pan
@ 2025-05-20 10:51   ` Jonas Karlman
  2025-05-20 12:01     ` Chukun Pan
  0 siblings, 1 reply; 8+ messages in thread
From: Jonas Karlman @ 2025-05-20 10:51 UTC (permalink / raw)
  To: Chukun Pan, Heiko Stuebner
  Cc: Yao Zi, Rob Herring, Mark Brown, Conor Dooley,
	Krzysztof Kozlowski, linux-arm-kernel@lists.infradead.org,
	linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org,
	devicetree@vger.kernel.org, linux-spi@vger.kernel.org

On 2025-05-20 12:01, Chukun Pan wrote:
> There are 2 SPI controllers on the RK3528 SoC, describe it.
> 
> Signed-off-by: Chukun Pan <amadeus@jmu.edu.cn>
> ---
>  arch/arm64/boot/dts/rockchip/rk3528.dtsi | 28 ++++++++++++++++++++++++
>  1 file changed, 28 insertions(+)
> 
> diff --git a/arch/arm64/boot/dts/rockchip/rk3528.dtsi b/arch/arm64/boot/dts/rockchip/rk3528.dtsi
> index b2724c969a76..4d60c09219f9 100644
> --- a/arch/arm64/boot/dts/rockchip/rk3528.dtsi
> +++ b/arch/arm64/boot/dts/rockchip/rk3528.dtsi
> @@ -371,6 +371,34 @@ ioc_grf: syscon@ff540000 {
>  			reg = <0x0 0xff540000 0x0 0x40000>;
>  		};
>  
> +		spi0: spi@ff9c0000 {
> +			compatible = "rockchip,rk3528-spi",
> +				     "rockchip,rk3066-spi";
> +			reg = <0x0 0xff9c0000 0x0 0x1000>;
> +			clocks = <&cru CLK_SPI0>, <&cru PCLK_SPI0>;
> +			clock-names = "spiclk", "apb_pclk";
> +			interrupts = <GIC_SPI 131 IRQ_TYPE_LEVEL_HIGH>;
> +			dmas = <&dmac 25>, <&dmac 24>;
> +			dma-names = "tx", "rx";

This is missing power-domains after "rockchip: Add power controller
support for RK3528" [1], spi0 depend on pclk_rkvenc_root:

	power-domains = <&power RK3528_PD_RKVENC>;

> +			#address-cells = <1>;
> +			#size-cells = <0>;
> +			status = "disabled";
> +		};
> +
> +		spi1: spi@ff9d0000 {
> +			compatible = "rockchip,rk3528-spi",
> +				     "rockchip,rk3066-spi";
> +			reg = <0x0 0xff9d0000 0x0 0x1000>;
> +			clocks = <&cru CLK_SPI1>, <&cru PCLK_SPI1>;
> +			clock-names = "spiclk", "apb_pclk";
> +			interrupts = <GIC_SPI 132 IRQ_TYPE_LEVEL_HIGH>;
> +			dmas = <&dmac 31>, <&dmac 30>;
> +			dma-names = "tx", "rx";

Same here, spi1 depend on pclk_vpu_root:

	power-domains = <&power RK3528_PD_VPU>;

[1] https://lore.kernel.org/r/20250518220707.669515-1-jonas@kwiboo.se

Regards,
Jonas

> +			#address-cells = <1>;
> +			#size-cells = <0>;
> +			status = "disabled";
> +		};
> +
>  		uart0: serial@ff9f0000 {
>  			compatible = "rockchip,rk3528-uart", "snps,dw-apb-uart";
>  			reg = <0x0 0xff9f0000 0x0 0x100>;



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

* Re: [PATCH 2/2] arm64: dts: rockchip: Add spi nodes for RK3528
  2025-05-20 10:51   ` Jonas Karlman
@ 2025-05-20 12:01     ` Chukun Pan
  0 siblings, 0 replies; 8+ messages in thread
From: Chukun Pan @ 2025-05-20 12:01 UTC (permalink / raw)
  To: jonas
  Cc: amadeus, broonie, conor+dt, heiko, krzk+dt, ziyao, devicetree,
	linux-arm-kernel, linux-kernel, linux-rockchip, linux-spi

Hi,

> This is missing power-domains after "rockchip: Add power controller
> support for RK3528" [1], spi0 depend on pclk_rkvenc_root:
>
> 	power-domains = <&power RK3528_PD_RKVENC>;

> Same here, spi1 depend on pclk_vpu_root:
>
> 	power-domains = <&power RK3528_PD_VPU>;
>
> [1] https://lore.kernel.org/r/20250518220707.669515-1-jonas@kwiboo.se

Thanks for the reminder, I didn't notice this.
If the power-domains patches gets merged I'll add it.

Thanks,
Chukun

--
2.25.1



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

* Re: [PATCH 1/2] spi: dt-bindings: Add rk3528-spi compatible
  2025-05-20 10:01 ` [PATCH 1/2] spi: dt-bindings: Add rk3528-spi compatible Chukun Pan
@ 2025-05-20 15:45   ` Conor Dooley
  0 siblings, 0 replies; 8+ messages in thread
From: Conor Dooley @ 2025-05-20 15:45 UTC (permalink / raw)
  To: Chukun Pan
  Cc: Heiko Stuebner, Yao Zi, Rob Herring, Mark Brown, Jonas Karlman,
	Conor Dooley, Krzysztof Kozlowski, linux-arm-kernel,
	linux-rockchip, linux-kernel, devicetree, linux-spi

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

On Tue, May 20, 2025 at 06:01:01PM +0800, Chukun Pan wrote:
> This adds a compatible string for the SPI controller on RK3528.
> 
> Signed-off-by: Chukun Pan <amadeus@jmu.edu.cn>

Acked-by: Conor Dooley <conor.dooley@microchip.com>

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

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

* Re: (subset) [PATCH 0/2] arm64: dts: rockchip: Add spi nodes for RK3528
  2025-05-20 10:01 [PATCH 0/2] arm64: dts: rockchip: Add spi nodes for RK3528 Chukun Pan
  2025-05-20 10:01 ` [PATCH 1/2] spi: dt-bindings: Add rk3528-spi compatible Chukun Pan
  2025-05-20 10:01 ` [PATCH 2/2] arm64: dts: rockchip: Add spi nodes for RK3528 Chukun Pan
@ 2025-05-21 17:56 ` Mark Brown
  2025-06-09 10:22 ` Heiko Stuebner
  3 siblings, 0 replies; 8+ messages in thread
From: Mark Brown @ 2025-05-21 17:56 UTC (permalink / raw)
  To: Heiko Stuebner, Chukun Pan
  Cc: Yao Zi, Rob Herring, Jonas Karlman, Conor Dooley,
	Krzysztof Kozlowski, linux-arm-kernel, linux-rockchip,
	linux-kernel, devicetree, linux-spi

On Tue, 20 May 2025 18:01:00 +0800, Chukun Pan wrote:
> There are 2 SPI controllers on the RK3528 SoC, describe it.
> Tested using st7789v chip with spi-cpha and spi-cpol properties.
> 
> [   10.831306] fb_st7789v spi0.0: fbtft_property_value: buswidth = 8
> [   11.042915] graphics fb0: fb_st7789v frame buffer, 240x320, 150 KiB
>  video memory, 4 KiB buffer memory, fps=20, spi0.0 at 15 MHz
> 
> [...]

Applied to

   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi.git for-next

Thanks!

[1/2] spi: dt-bindings: Add rk3528-spi compatible
      commit: 70e5f38e734572ca5a56cff48cf01a0f31917099

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a 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.

Thanks,
Mark



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

* Re: (subset) [PATCH 0/2] arm64: dts: rockchip: Add spi nodes for RK3528
  2025-05-20 10:01 [PATCH 0/2] arm64: dts: rockchip: Add spi nodes for RK3528 Chukun Pan
                   ` (2 preceding siblings ...)
  2025-05-21 17:56 ` (subset) [PATCH 0/2] " Mark Brown
@ 2025-06-09 10:22 ` Heiko Stuebner
  3 siblings, 0 replies; 8+ messages in thread
From: Heiko Stuebner @ 2025-06-09 10:22 UTC (permalink / raw)
  To: Chukun Pan
  Cc: Heiko Stuebner, Yao Zi, Rob Herring, Mark Brown, Jonas Karlman,
	Conor Dooley, Krzysztof Kozlowski, linux-arm-kernel,
	linux-rockchip, linux-kernel, devicetree, linux-spi


On Tue, 20 May 2025 18:01:00 +0800, Chukun Pan wrote:
> There are 2 SPI controllers on the RK3528 SoC, describe it.
> Tested using st7789v chip with spi-cpha and spi-cpol properties.
> 
> [   10.831306] fb_st7789v spi0.0: fbtft_property_value: buswidth = 8
> [   11.042915] graphics fb0: fb_st7789v frame buffer, 240x320, 150 KiB
>  video memory, 4 KiB buffer memory, fps=20, spi0.0 at 15 MHz
> 
> [...]

Applied, thanks!

[2/2] arm64: dts: rockchip: Add spi nodes for RK3528
      commit: 2783335329e5762deb0dc5b6d634225d8613af16

Best regards,
-- 
Heiko Stuebner <heiko@sntech.de>


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

end of thread, other threads:[~2025-06-09 10:43 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-05-20 10:01 [PATCH 0/2] arm64: dts: rockchip: Add spi nodes for RK3528 Chukun Pan
2025-05-20 10:01 ` [PATCH 1/2] spi: dt-bindings: Add rk3528-spi compatible Chukun Pan
2025-05-20 15:45   ` Conor Dooley
2025-05-20 10:01 ` [PATCH 2/2] arm64: dts: rockchip: Add spi nodes for RK3528 Chukun Pan
2025-05-20 10:51   ` Jonas Karlman
2025-05-20 12:01     ` Chukun Pan
2025-05-21 17:56 ` (subset) [PATCH 0/2] " Mark Brown
2025-06-09 10:22 ` Heiko Stuebner

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