Skip to contentSkip to conversation

spi/rockchip: add rk3036/rk3228/rk3368 SoCs for spi document

PATCH In review Caesar Wang 4 participants 8 messages May 19, 2016 – May 20, 2016

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH v2 1/3 spi/rockchip: add rk3036/rk3228/rk3368 SoCs for spi document

We had supported the rk3036/rk3066/rk3188/rk3228/rk3288/rk3368/rk3399 family SoCs in linux kernel.

Let's add the other SoCs, in order to a better understanding from the rockchip spi document.

Cc Rob Herring <[email protected]>
Cc Mark Brown <[email protected]>
Cc Heiko Stuebner <[email protected]>
Cc linux-rockchip at lists.infradead.org

---

Changes in v2:
- Drop the fallbacks, As Heiko comments on https://patchwork.kernel.org/patch/9127881/
- update commit

 Documentation/devicetree/bindings/spi/spi-rockchip.txt | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)
Documentation/devicetree/bindings/spi/spi-rockchip.txt +7 -4
index 1b14d69..d2ca153 100644
@@ -6,10 +6,13 @@ and display controllers using the SPI communication interface.
 Required Properties:
 
 - compatible: should be one of the following.
-    "rockchip,rk3066-spi" for rk3066.
-    "rockchip,rk3188-spi", "rockchip,rk3066-spi" for rk3188.
-    "rockchip,rk3288-spi", "rockchip,rk3066-spi" for rk3288.
-    "rockchip,rk3399-spi", "rockchip,rk3066-spi" for rk3399.
+    "rockchip,rk3036-spi" for rk3036 SoCS.
+    "rockchip,rk3066-spi" for rk3066 SoCs.
+    "rockchip,rk3188-spi" for rk3188 SoCs.
+    "rockchip,rk3228-spi" for rk3228 SoCS.
+    "rockchip,rk3288-spi" for rk3288 SoCs.
+    "rockchip,rk3368-spi" for rk3368 SoCs.
+    "rockchip,rk3399-spi" for rk3399 SoCs.
 - reg: physical base address of the controller and length of memory mapped
        region.
 - interrupts: The interrupt number to the cpu. The interrupt specifier format
Signature · 1 line
2.7.4
#1 lore raw

PATCH v2 2/3 spi/rockchip: add the rk3036/rk3228/rk3368 to match for driver

In gerenal, the "rockchip,rockchip-spi" string will match the dts that's great in spi driver. After all the most of rockchip SoCs ar same spi controller.

Then, we should keep the old style to match the dts various.

Cc Mark Brown <[email protected]>
Cc Heiko Stuebner <[email protected]>
Cc linux-rockchip at lists.infradead.org

---

Changes in v2: None

 drivers/spi/spi-rockchip.c | 3 +++
 1 file changed, 3 insertions(+)
drivers/spi/spi-rockchip.c +3 -0
index 6c6c001..dd08b68 100644
@@ -893,9 +893,12 @@ static const struct dev_pm_ops rockchip_spi_pm = {
 };
 
 static const struct of_device_id rockchip_spi_dt_match[] = {
+	{ .compatible = "rockchip,rk3036-spi", },
 	{ .compatible = "rockchip,rk3066-spi", },
 	{ .compatible = "rockchip,rk3188-spi", },
+	{ .compatible = "rockchip,rk3228-spi", },
 	{ .compatible = "rockchip,rk3288-spi", },
+	{ .compatible = "rockchip,rk3368-spi", },
 	{ .compatible = "rockchip,rk3399-spi", },
 	{ },
 };
Signature · 1 line
2.7.4
#2 lore raw

PATCH v2 3/3 ARM: dts: rockchip: fixes the spi compatible for rk3036

In reply to Caesar Wang

That's seem the incorrect string to match the spi driver.

Fixes commit f629fcfab2cd
("ARM: dts: rockchip: support the spi for rk3036")

Cc Heiko Stuebner <[email protected]>
Cc linux-rockchip at lists.infradead.org

---

Changes in v2: None

 arch/arm/boot/dts/rk3036.dtsi | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/boot/dts/rk3036.dtsi +1 -1
index d0f4bb7..a30700a 100644
@@ -431,7 +431,7 @@
 	};
 
 	spi: spi at 20074000 {
-		compatible = "rockchip,rockchip-spi";
+		compatible = "rockchip,rk3036-spi";
 		reg = <0x20074000 0x1000>;
 		interrupts = <GIC_SPI 23 IRQ_TYPE_LEVEL_HIGH>;
 		clocks =<&cru PCLK_SPI>, <&cru SCLK_SPI>;
Signature · 1 line
2.7.4
#3 lore raw

Re: [PATCH v2 3/3] ARM: dts: rockchip: fixes the spi compatible for rk3036

? 2016/5/20 7:56, Caesar Wang ??:

Quoted 2 lines

That's seem the incorrect string to match the spi driver.

Will it break the backward compatibility for some dtb if not falling back to "rockchip,rockchip-spi" ?

Quoted 28 lines

Fixes commit f629fcfab2cd
("ARM: dts: rockchip: support the spi for rk3036")

Cc Heiko Stuebner <[email protected]>
Cc linux-rockchip at lists.infradead.org

---

Changes in v2: None

 arch/arm/boot/dts/rk3036.dtsi | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/boot/dts/rk3036.dtsi +1 -1
index d0f4bb7..a30700a 100644
@@ -431,7 +431,7 @@
 	};
 
 	spi: spi at 20074000 {
-		compatible = "rockchip,rockchip-spi";
+		compatible = "rockchip,rk3036-spi";
 		reg = <0x20074000 0x1000>;
 		interrupts = <GIC_SPI 23 IRQ_TYPE_LEVEL_HIGH>;
 		clocks =<&cru PCLK_SPI>, <&cru SCLK_SPI>;
#4 lore raw

Re: [PATCH v2 3/3] ARM: dts: rockchip: fixes the spi compatible for rk3036

? 2016?05?20? 20:35, Shawn Lin ??:

Quoted 6 lines

? 2016/5/20 7:56, Caesar Wang ??:

Quoted 2 lines

That's seem the incorrect string to match the spi driver.

Will it break the backward compatibility for some dtb if not falling back to "rockchip,rockchip-spi" ?

The rk3036 shouldn't work if you read the driver/spi/spi-rockchip.c. since the "rockchip,rockchip-spi" is *not* exist in linux kernel.

..

  static const struct of_device_id rockchip_spi_dt_match[] = {
     { .compatible = "rockchip,rk3066-spi", },
     { .compatible = "rockchip,rk3188-spi", },
     { .compatible = "rockchip,rk3288-spi", },
     { .compatible = "rockchip,rk3399-spi", },
     { },
}

..

-Caesar

Quoted 34 lines
Quoted 30 lines

Fixes commit f629fcfab2cd
("ARM: dts: rockchip: support the spi for rk3036")

Cc Heiko Stuebner <[email protected]>
Cc linux-rockchip at lists.infradead.org

---

Changes in v2: None

 arch/arm/boot/dts/rk3036.dtsi | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/boot/dts/rk3036.dtsi +1 -1
index d0f4bb7..a30700a 100644
@@ -431,7 +431,7 @@
     };
 
     spi: spi at 20074000 {
-        compatible = "rockchip,rockchip-spi";
+        compatible = "rockchip,rk3036-spi";
         reg = <0x20074000 0x1000>;
         interrupts = <GIC_SPI 23 IRQ_TYPE_LEVEL_HIGH>;
         clocks =<&cru PCLK_SPI>, <&cru SCLK_SPI>;
Signature · 1 line
caesar wang | software engineer | wxt at rock-chip.com
maintainer
#6 lore raw

Re: [PATCH v2 3/3] ARM: dts: rockchip: fixes the spi compatible for rk3036

In reply to Shawn Lin

Am Freitag, 20. Mai 2016, 20:35:53 schrieb Shawn Lin:

Quoted 5 lines

? 2016/5/20 7:56, Caesar Wang ??:

Quoted 1 line

That's seem the incorrect string to match the spi driver.

Will it break the backward compatibility for some dtb if not falling back to "rockchip,rockchip-spi" ?

in what dtb did you see "rockchip,rockchip-spi"? I.e. it isn't part of any current _mainline_ devicetree files.

Heiko

Quoted 31 lines
Quoted 31 lines

Fixes commit f629fcfab2cd
("ARM: dts: rockchip: support the spi for rk3036")

Cc Heiko Stuebner <[email protected]>
Cc linux-rockchip at lists.infradead.org

---

Changes in v2: None

 arch/arm/boot/dts/rk3036.dtsi | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
(quoted diff) +0 -0

b/arch/arm/boot/dts/rk3036.dtsi index d0f4bb7..a30700a 100644

arch/arm/boot/dts/rk3036.dtsi +1 -1
@@ -431,7 +431,7 @@
 
 	};
 
 	spi: spi at 20074000 {
 
-		compatible = "rockchip,rockchip-spi";
+		compatible = "rockchip,rk3036-spi";
 
arch/arm/boot/dts/rk3036.dtsi +0 -0
 		reg = <0x20074000 0x1000>;
 		interrupts = <GIC_SPI 23 IRQ_TYPE_LEVEL_HIGH>;
 		clocks =<&cru PCLK_SPI>, <&cru SCLK_SPI>;
#5 lore raw

Re: [PATCH v2 3/3] ARM: dts: rockchip: fixes the spi compatible for rk3036

In reply to Caesar Wang

? 2016/5/20 20:57, Caesar Wang ??:

Quoted 12 lines

? 2016?05?20? 20:35, Shawn Lin ??:

Quoted 6 lines

? 2016/5/20 7:56, Caesar Wang ??:

Quoted 2 lines

That's seem the incorrect string to match the spi driver.

Will it break the backward compatibility for some dtb if not falling back to "rockchip,rockchip-spi" ?

The rk3036 shouldn't work if you read the driver/spi/spi-rockchip.c. since the "rockchip,rockchip-spi" is *not* exist in linux kernel.

okay, so that means we take "rockchip,rockchip-spi" from local branch by mistake?

Quoted 48 lines

..

 static const struct of_device_id rockchip_spi_dt_match[] = {
    { .compatible = "rockchip,rk3066-spi", },
    { .compatible = "rockchip,rk3188-spi", },
    { .compatible = "rockchip,rk3288-spi", },
    { .compatible = "rockchip,rk3399-spi", },
    { },
}

..

-Caesar

Quoted 34 lines
Quoted 30 lines

Fixes commit f629fcfab2cd
("ARM: dts: rockchip: support the spi for rk3036")

Cc Heiko Stuebner <[email protected]>
Cc linux-rockchip at lists.infradead.org

---

Changes in v2: None

 arch/arm/boot/dts/rk3036.dtsi | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/boot/dts/rk3036.dtsi +1 -1
index d0f4bb7..a30700a 100644
@@ -431,7 +431,7 @@
     };
 
     spi: spi at 20074000 {
-        compatible = "rockchip,rockchip-spi";
+        compatible = "rockchip,rk3036-spi";
         reg = <0x20074000 0x1000>;
         interrupts = <GIC_SPI 23 IRQ_TYPE_LEVEL_HIGH>;
         clocks =<&cru PCLK_SPI>, <&cru SCLK_SPI>;
Signature · 2 lines
Best Regards
Shawn Lin
#7 lore raw

Re: [PATCH v2 3/3] ARM: dts: rockchip: fixes the spi compatible for rk3036

In reply to Heiko Stuebner
Quoted 8 lines · Heiko Stuebner

Am Freitag, 20. Mai 2016, 20:35:53 schrieb Shawn Lin:

Quoted 5 lines

? 2016/5/20 7:56, Caesar Wang ??:

Quoted 1 line

That's seem the incorrect string to match the spi driver.

Will it break the backward compatibility for some dtb if not falling back to "rockchip,rockchip-spi" ?

in what dtb did you see "rockchip,rockchip-spi"?

I'm not 100% sure, but I remember we toke this name on local branch for rk3036 when we were developing this Soc.

Quoted 2 lines

I.e. it isn't part of any current _mainline_ devicetree files.

Caesar, Could you check our develop-3.10 branch to see if it does exist?

Anyway, "rockchip,rockchip-spi" isn't a part of mainline dt property.

Quoted 36 lines

Heiko

Quoted 31 lines
Quoted 31 lines

Fixes commit f629fcfab2cd
("ARM: dts: rockchip: support the spi for rk3036")

Cc Heiko Stuebner <[email protected]>
Cc linux-rockchip at lists.infradead.org

---

Changes in v2: None

 arch/arm/boot/dts/rk3036.dtsi | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
(quoted diff) +0 -0

b/arch/arm/boot/dts/rk3036.dtsi index d0f4bb7..a30700a 100644

arch/arm/boot/dts/rk3036.dtsi +1 -1
@@ -431,7 +431,7 @@
 
 	};
 
 	spi: spi at 20074000 {
 
-		compatible = "rockchip,rockchip-spi";
+		compatible = "rockchip,rk3036-spi";
 
arch/arm/boot/dts/rk3036.dtsi +0 -0
 		reg = <0x20074000 0x1000>;
 		interrupts = <GIC_SPI 23 IRQ_TYPE_LEVEL_HIGH>;
 		clocks =<&cru PCLK_SPI>, <&cru SCLK_SPI>;
Signature · 2 lines
Best Regards
Shawn Lin