Skip to contentSkip to conversation

Add support for Synopsys DesignWare SSI controller version 2.00a

PATCH In review Changhuang Liang 4 participants 10 messages Jun 12 – Jun 15

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

cover Add support for Synopsys DesignWare SSI controller version 2.00a

Add support for Synopsys DesignWare SSI controller version 2.00a, which is used on the JHB100 SoC.

Changhuang Liang (2):
dt-bindings: spi: snps,dw-apb-ssi: Add support for snps,dwc-ssi-2.00a
spi: dw: Add support for snps,dwc-ssi-2.00a

 Documentation/devicetree/bindings/spi/snps,dw-apb-ssi.yaml | 1 +
 drivers/spi/spi-dw-mmio.c                                  | 1 +
 2 files changed, 2 insertions(+)

--
2.25.1

#1 lore raw

PATCH 1/2 dt-bindings: spi: snps,dw-apb-ssi: Add support for snps,dwc-ssi-2.00a

Add a new compatible string "snps,dwc-ssi-2.00a" for the Synopsys DesignWare SSI controller version 2.00a.

---
 Documentation/devicetree/bindings/spi/snps,dw-apb-ssi.yaml | 1 +
 1 file changed, 1 insertion(+)
Documentation/devicetree/bindings/spi/snps,dw-apb-ssi.yaml +1 -0
index 8ebebcebca16..fb74243d4bdf 100644
@@ -41,6 +41,7 @@ properties:
         enum:
           - snps,dw-apb-ssi
           - snps,dwc-ssi-1.01a
+          - snps,dwc-ssi-2.00a
       - description: Microchip Sparx5 SoC SPI Controller
         const: microchip,sparx5-spi
       - description: Amazon Alpine SPI Controller
Signature · 1 line
2.25.1
maintainer
#2 lore raw

Re: [PATCH v1 1/2] dt-bindings: spi: snps,dw-apb-ssi: Add support for snps,dwc-ssi-2.00a

Quoted 2 lines · Changhuang Liang

Add a new compatible string "snps,dwc-ssi-2.00a" for the Synopsys DesignWare SSI controller version 2.00a.

Please submit patches using subject lines reflecting the style for the subsystem, this makes it easier for people to identify relevant patches. Look at what existing commits in the area you're changing are doing and make sure your subject lines visually resemble what they're doing. There's no need to resubmit to fix this alone.

#3 lore raw

Re: [PATCH v1 1/2] dt-bindings: spi: snps,dw-apb-ssi: Add support for snps,dwc-ssi-2.00a

In reply to Changhuang Liang
Quoted 2 lines · Changhuang Liang

Add a new compatible string "snps,dwc-ssi-2.00a" for the Synopsys DesignWare SSI controller version 2.00a.

Two things. Firstly, driver patch suggests a fallback to 1.01a is possible. Why haven't you added one?
Secondly, I am going to expect that when your starfive user for this appears in my inbox that it has a device-specific compatible, so you may as well add that now.

pw-bot: changes-requested

Cheers,
Conor.

Quoted 21 lines
---
 Documentation/devicetree/bindings/spi/snps,dw-apb-ssi.yaml | 1 +
 1 file changed, 1 insertion(+)
Documentation/devicetree/bindings/spi/snps,dw-apb-ssi.yaml +1 -0
index 8ebebcebca16..fb74243d4bdf 100644
@@ -41,6 +41,7 @@ properties:
         enum:
           - snps,dw-apb-ssi
           - snps,dwc-ssi-1.01a
+          - snps,dwc-ssi-2.00a
       - description: Microchip Sparx5 SoC SPI Controller
         const: microchip,sparx5-spi
       - description: Amazon Alpine SPI Controller
Signature · 1 line
2.25.1
#4 lore raw

Re: [PATCH v1 1/2] dt-bindings: spi: snps,dw-apb-ssi: Add support for snps,dwc-ssi-2.00a

Hi, Conor

Thanks for the review.

Quoted 6 lines · Changhuang Liang
Quoted 2 lines

Add a new compatible string "snps,dwc-ssi-2.00a" for the Synopsys DesignWare SSI controller version 2.00a.

Two things. Firstly, driver patch suggests a fallback to 1.01a is possible. Why haven't you added one?

Will support fallback.

Quoted 3 lines

Secondly, I am going to expect that when your starfive user for this appears in my inbox that it has a device-specific compatible, so you may as well add that now.

Our standard SPI control is completely based on the Synopsys DesignWare SSI controller version 2.00a. However, for the controller that accesses the flash, a set of modifications has been made based on the Synopsys DesignWare SSI controller version 2.00a, and the driver part also requires specific adaptation.

Therefore, on the JHB100 SoC, the initial device tree source I have planned looks like this:

spi0: spi@17f20000 {
      compatible = "snps,dwc-ssi-2.00a";
      reg = <0x0 0x17f20000 0x0 0x10000>;
};
sfc0: spi@18000000 {
      compatible = "starfive,jhb100-spi";
      reg = <0x0 0x18000000 0x0 0x10000>;
};

Thus, I plan to add a new "starfive,jhb100-spi" compatible string for the controller that accesses the flash. For now, I intend to keep these as two separate series.

Best Regards
Changhuang

#5 lore raw

Re: [PATCH v1 1/2] dt-bindings: spi: snps,dw-apb-ssi: Add support for snps,dwc-ssi-2.00a

Quoted 28 lines · Changhuang Liang

Hi, Conor

Thanks for the review.

Quoted 6 lines · Changhuang Liang
Quoted 2 lines

Add a new compatible string "snps,dwc-ssi-2.00a" for the Synopsys DesignWare SSI controller version 2.00a.

Two things. Firstly, driver patch suggests a fallback to 1.01a is possible. Why haven't you added one?

Will support fallback.

Quoted 3 lines

Secondly, I am going to expect that when your starfive user for this appears in my inbox that it has a device-specific compatible, so you may as well add that now.

Our standard SPI control is completely based on the Synopsys DesignWare SSI controller version 2.00a. However, for the controller that accesses the flash, a set of modifications has been made based on the Synopsys DesignWare SSI controller version 2.00a, and the driver part also requires specific adaptation.

Therefore, on the JHB100 SoC, the initial device tree source I have planned looks like this:

spi0: spi@17f20000 {
      compatible = "snps,dwc-ssi-2.00a";
      reg = <0x0 0x17f20000 0x0 0x10000>;
};
Quoted 7 lines
sfc0: spi@18000000 {
      compatible = "starfive,jhb100-spi";
      reg = <0x0 0x18000000 0x0 0x10000>;
};

Thus, I plan to add a new "starfive,jhb100-spi" compatible string for the controller that accesses the flash. For now, I intend to keep these as two separate series.

No, if you have two integrations of the designware IP with different programming models on the jhb100 I expect to see two different soc-specific compatibles used. I don't want to see bare synopsys compatibles on the platforms I am looking after.

Cheers,
Conor.

#6 lore raw

Re: [PATCH v1 1/2] dt-bindings: spi: snps,dw-apb-ssi: Add support for snps,dwc-ssi-2.00a

Hi, Conor

Quoted 35 lines · Changhuang Liang
Quoted 11 lines

Hi, Conor

Thanks for the review.

Quoted 6 lines · Changhuang Liang
Quoted 2 lines

Add a new compatible string "snps,dwc-ssi-2.00a" for the Synopsys DesignWare SSI controller version 2.00a.

Two things. Firstly, driver patch suggests a fallback to 1.01a is possible. Why haven't you added one?

Quoted 7 lines

Will support fallback.

Quoted 3 lines

Secondly, I am going to expect that when your starfive user for this appears in my inbox that it has a device-specific compatible, so you may as well add that now.

Our standard SPI control is completely based on the Synopsys DesignWare

SSI controller version 2.00a.

Quoted 2 lines

However, for the controller that accesses the flash, a set of modifications has been made based on the Synopsys DesignWare SSI

controller version 2.00a, and the driver part also requires specific adaptation.

Quoted 2 lines

Therefore, on the JHB100 SoC, the initial device tree source I have planned

looks like this:

Quoted 9 lines
spi0: spi@17f20000 {
      compatible = "snps,dwc-ssi-2.00a";
      reg = <0x0 0x17f20000 0x0 0x10000>; };
sfc0: spi@18000000 {
      compatible = "starfive,jhb100-spi";
      reg = <0x0 0x18000000 0x0 0x10000>; };
Quoted 8 lines
Quoted 1 line

Thus, I plan to add a new "starfive,jhb100-spi" compatible string for the

controller that accesses the flash.

Quoted 1 line

For now, I intend to keep these as two separate series.

No, if you have two integrations of the designware IP with different programming models on the jhb100 I expect to see two different soc-specific compatibles used. I don't want to see bare synopsys compatibles on the platforms I am looking after.

Okay, I will change it to the following:

spi0: spi@17f20000 {
      compatible = " starfive,jhb100-spi";
      reg = <0x0 0x17f20000 0x0 0x10000>; 
};
sfc0: spi@18000000 {
      compatible = "starfive,jhb100-sfc";
      reg = <0x0 0x18000000 0x0 0x10000>; 
};

Best Regards,
Changhuang

#7 lore raw

Re: [PATCH v1 1/2] dt-bindings: spi: snps,dw-apb-ssi: Add support for snps,dwc-ssi-2.00a

Quoted 46 lines · Changhuang Liang

Hi, Conor

Quoted 35 lines · Changhuang Liang
Quoted 11 lines

Hi, Conor

Thanks for the review.

Quoted 6 lines · Changhuang Liang
Quoted 2 lines

Add a new compatible string "snps,dwc-ssi-2.00a" for the Synopsys DesignWare SSI controller version 2.00a.

Two things. Firstly, driver patch suggests a fallback to 1.01a is possible. Why haven't you added one?

Quoted 7 lines

Will support fallback.

Quoted 3 lines

Secondly, I am going to expect that when your starfive user for this appears in my inbox that it has a device-specific compatible, so you may as well add that now.

Our standard SPI control is completely based on the Synopsys DesignWare

SSI controller version 2.00a.

Quoted 2 lines

However, for the controller that accesses the flash, a set of modifications has been made based on the Synopsys DesignWare SSI

controller version 2.00a, and the driver part also requires specific adaptation.

Quoted 2 lines

Therefore, on the JHB100 SoC, the initial device tree source I have planned

looks like this:

Quoted 9 lines
spi0: spi@17f20000 {
      compatible = "snps,dwc-ssi-2.00a";
      reg = <0x0 0x17f20000 0x0 0x10000>; };
sfc0: spi@18000000 {
      compatible = "starfive,jhb100-spi";
      reg = <0x0 0x18000000 0x0 0x10000>; };
Quoted 8 lines
Quoted 1 line

Thus, I plan to add a new "starfive,jhb100-spi" compatible string for the

controller that accesses the flash.

Quoted 1 line

For now, I intend to keep these as two separate series.

No, if you have two integrations of the designware IP with different programming models on the jhb100 I expect to see two different soc-specific compatibles used. I don't want to see bare synopsys compatibles on the platforms I am looking after.

Quoted 4 lines

Okay, I will change it to the following:

spi0: spi@17f20000 {
      compatible = " starfive,jhb100-spi";

This one is compatible with "snps,dwc-ssi-2.00a" and "snps,dwc-ssi-1.00a", so it should probably have those as fallbacks. The latter for sure, the former if you know there's some non-discoverable differences between 2.00a and 1.00a hardware.

Cheers,
Conor.

Quoted 11 lines
      reg = <0x0 0x17f20000 0x0 0x10000>; 
};
sfc0: spi@18000000 {
      compatible = "starfive,jhb100-sfc";
      reg = <0x0 0x18000000 0x0 0x10000>; 
};

Best Regards,
Changhuang

#8 lore raw

Re: [PATCH v1 1/2] dt-bindings: spi: snps,dw-apb-ssi: Add support for snps,dwc-ssi-2.00a

Hi, Conor

Quoted 53 lines · Changhuang Liang
Quoted 26 lines

Hi, Conor

Quoted 24 lines · Changhuang Liang
Quoted 11 lines

Hi, Conor

Thanks for the review.

Quoted 6 lines · Changhuang Liang
Quoted 2 lines

Add a new compatible string "snps,dwc-ssi-2.00a" for the Synopsys DesignWare SSI controller version 2.00a.

Two things. Firstly, driver patch suggests a fallback to 1.01a is possible. Why haven't you added one?

Quoted 8 lines

Will support fallback.

Quoted 3 lines

Secondly, I am going to expect that when your starfive user for this appears in my inbox that it has a device-specific compatible, so you may as well add that now.

Our standard SPI control is completely based on the Synopsys DesignWare

SSI controller version 2.00a.

Quoted 2 lines

However, for the controller that accesses the flash, a set of modifications has been made based on the Synopsys DesignWare SSI

controller version 2.00a, and the driver part also requires specific

adaptation.

Quoted 25 lines
Quoted 15 lines
Quoted 3 lines

Therefore, on the JHB100 SoC, the initial device tree source I have planned

looks like this:

Quoted 11 lines
spi0: spi@17f20000 {
      compatible = "snps,dwc-ssi-2.00a";
      reg = <0x0 0x17f20000 0x0 0x10000>; };
sfc0: spi@18000000 {
      compatible = "starfive,jhb100-spi";
      reg = <0x0 0x18000000 0x0 0x10000>; };

Thus, I plan to add a new "starfive,jhb100-spi" compatible string for the

Quoted 7 lines

controller that accesses the flash.

Quoted 1 line

For now, I intend to keep these as two separate series.

No, if you have two integrations of the designware IP with different programming models on the jhb100 I expect to see two different soc-specific compatibles used. I don't want to see bare synopsys compatibles on the platforms I am looking after.

Okay, I will change it to the following:

Quoted 8 lines
Quoted 2 lines
spi0: spi@17f20000 {
      compatible = " starfive,jhb100-spi";

This one is compatible with "snps,dwc-ssi-2.00a" and "snps,dwc-ssi-1.00a", so it should probably have those as fallbacks. The latter for sure, the former if you know there's some non-discoverable differences between 2.00a and 1.00a hardware.

'm not sure about the hardware differences between 2.00a and 1.00a at the moment either. I'll use the following method first:

compatible = "starfive,jhb100-spi", "snps,dwc-ssi-2.00a", "snps,dwc-ssi-1.01a"

Quoted 12 lines

Cheers,
Conor.

Quoted 9 lines
      reg = <0x0 0x17f20000 0x0 0x10000>; };
sfc0: spi@18000000 {
      compatible = "starfive,jhb100-sfc";
      reg = <0x0 0x18000000 0x0 0x10000>; };

Best Regards,
Changhuang

Best Regards,
Changhuang

#9 lore raw

PATCH 2/2 spi: dw: Add support for snps,dwc-ssi-2.00a

In reply to Changhuang Liang

Add a new compatible entry "snps,dwc-ssi-2.00a" for the Synopsys DesignWare SSI controller version 2.00a. This variant uses the same initialization routine as snps,dwc-ssi-1.01a (dw_spi_hssi_init).

---
 drivers/spi/spi-dw-mmio.c | 1 +
 1 file changed, 1 insertion(+)
drivers/spi/spi-dw-mmio.c +1 -0
index 4fc864d38cff..603e81a92c57 100644
@@ -438,6 +438,7 @@ static const struct of_device_id dw_spi_mmio_of_match[] = {
 	{ .compatible = "amazon,alpine-dw-apb-ssi", .data = dw_spi_alpine_init},
 	{ .compatible = "renesas,rzn1-spi", .data = dw_spi_pssi_init},
 	{ .compatible = "snps,dwc-ssi-1.01a", .data = dw_spi_hssi_init},
+	{ .compatible = "snps,dwc-ssi-2.00a", .data = dw_spi_hssi_init},
 	{ .compatible = "intel,keembay-ssi", .data = dw_spi_hssi_no_dma_init},
 	{
 		.compatible = "intel,mountevans-imc-ssi",
Signature · 1 line
2.25.1