devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v4 0/4] spi: sophgo: Add SPI NOR controller for SG2042
@ 2025-07-20  8:31 Zixian Zeng
  2025-07-20  8:31 ` [PATCH v4 1/4] spi: dt-bindings: spi-sg2044-nor: Change SOPHGO SG2042 Zixian Zeng
                   ` (5 more replies)
  0 siblings, 6 replies; 8+ messages in thread
From: Zixian Zeng @ 2025-07-20  8:31 UTC (permalink / raw)
  To: Tudor Ambarus, Pratyush Yadav, Michael Walle, Miquel Raynal,
	Richard Weinberger, Vignesh Raghavendra, Chen Wang, Inochi Amaoto,
	Mark Brown, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Paul Walmsley, Palmer Dabbelt, Albert Ou, Alexandre Ghiti,
	Longbin Li
  Cc: linux-mtd, linux-kernel, sophgo, linux-spi, devicetree,
	linux-riscv, Conor Dooley, Zixian Zeng

Add support SPI NOR flash memory controller for SG2042, using upstreamed
SG2044 SPI NOR driver.

Tested on SG2042 Pioneer Box, read, write operations.
Thanks Chen Wang who provided machine and guidance.

Signed-off-by: Zixian Zeng <sycamoremoon376@gmail.com>
---
Changes in v4:
- patch1: Explain why SG2042 is not compatible with SG2044 and add Fixes tag.
- patch2: Explain the hardware differences between SG2042 and SG2044.
- patch4: Remove the extra "sophgo,sg2044-spifmc-nor" compatible property.
- Link to v3: https://lore.kernel.org/r/20250629-sfg-spifmc-v3-0-28db1f27e999@gmail.com

Changes in v3:
- Drop the patch which adds additional flash_info into gigadevice.c
- patch1: Because of the incompatibility, separate the SG2042 from the previous fallback mechanism to independent one.
- patch2: Newly add configurable options to spi-sg2044-nor driver.
- patch3: Fix reading bytes issue that causes the spi_nor_check_sfdp_signature() failure on SG2042.
- Link to v2: https://lore.kernel.org/r/20250525-sfg-spifmc-v2-0-a3732b6f5ab4@gmail.com

Changes in v2:
- patch1: Accept devicetree nodes whose compatible contains only
  "sophgo,sg2044-spifmc-nor" to avoid breaking existing devicetrees.
- patch1: Improve the commit subject message.
- patch2: Dump the SFDP information to commit message.
- Link to v1: https://lore.kernel.org/r/20250523-sfg-spifmc-v1-0-4cf16cf3fd2a@gmail.com

---
Zixian Zeng (4):
      spi: dt-bindings: spi-sg2044-nor: Change SOPHGO SG2042
      spi: spi-sg2044-nor: Add configurable chip_info
      spi: spi-sg2044-nor: Add SPI-NOR controller for SG2042
      riscv: dts: sophgo: Add SPI NOR node for SG2042

 .../devicetree/bindings/spi/spi-sg2044-nor.yaml    |  9 +++----
 .../riscv/boot/dts/sophgo/sg2042-milkv-pioneer.dts | 24 ++++++++++++++++++
 arch/riscv/boot/dts/sophgo/sg2042.dtsi             | 24 ++++++++++++++++++
 drivers/spi/spi-sg2044-nor.c                       | 29 +++++++++++++++++++---
 4 files changed, 77 insertions(+), 9 deletions(-)
---
base-commit: 8727665368cd4af112146b650ec0ebac038b5cf5
change-id: 20250523-sfg-spifmc-7a910290e964

Best regards,
-- 
Zixian Zeng <sycamoremoon376@gmail.com>


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

* [PATCH v4 1/4] spi: dt-bindings: spi-sg2044-nor: Change SOPHGO SG2042
  2025-07-20  8:31 [PATCH v4 0/4] spi: sophgo: Add SPI NOR controller for SG2042 Zixian Zeng
@ 2025-07-20  8:31 ` Zixian Zeng
  2025-07-21 15:04   ` Rob Herring (Arm)
  2025-07-20  8:31 ` [PATCH v4 2/4] spi: spi-sg2044-nor: Add configurable chip_info Zixian Zeng
                   ` (4 subsequent siblings)
  5 siblings, 1 reply; 8+ messages in thread
From: Zixian Zeng @ 2025-07-20  8:31 UTC (permalink / raw)
  To: Tudor Ambarus, Pratyush Yadav, Michael Walle, Miquel Raynal,
	Richard Weinberger, Vignesh Raghavendra, Chen Wang, Inochi Amaoto,
	Mark Brown, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Paul Walmsley, Palmer Dabbelt, Albert Ou, Alexandre Ghiti,
	Longbin Li
  Cc: linux-mtd, linux-kernel, sophgo, linux-spi, devicetree,
	linux-riscv, Conor Dooley, Zixian Zeng

With further testing, directly using the spi-sg2044-nor driver on SG2042
does not work. SG2042 is found to lack full compatibility with SG2044.
SG2044 has OPT register and it's necessary to write but SG2042 does not.
Due to other possible hardware detail differences, it is better
to bind SG2042 independently.

Fixes: 8450f1e0d3d0 ("spi: dt-bindings: spi-sg2044-nor: Add SOPHGO SG2042")
Signed-off-by: Zixian Zeng <sycamoremoon376@gmail.com>
---
 Documentation/devicetree/bindings/spi/spi-sg2044-nor.yaml | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)

diff --git a/Documentation/devicetree/bindings/spi/spi-sg2044-nor.yaml b/Documentation/devicetree/bindings/spi/spi-sg2044-nor.yaml
index 66e54dedab140a167ad84c43f312f93af2bfa06a..0e7ead7637052a008c64b82477d060d180c43acf 100644
--- a/Documentation/devicetree/bindings/spi/spi-sg2044-nor.yaml
+++ b/Documentation/devicetree/bindings/spi/spi-sg2044-nor.yaml
@@ -14,12 +14,9 @@ allOf:
 
 properties:
   compatible:
-    oneOf:
-      - const: sophgo,sg2044-spifmc-nor
-      - items:
-          - enum:
-              - sophgo,sg2042-spifmc-nor
-          - const: sophgo,sg2044-spifmc-nor
+    enum:
+      - sophgo,sg2042-spifmc-nor
+      - sophgo,sg2044-spifmc-nor
 
   reg:
     maxItems: 1

-- 
2.49.0


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

* [PATCH v4 2/4] spi: spi-sg2044-nor: Add configurable chip_info
  2025-07-20  8:31 [PATCH v4 0/4] spi: sophgo: Add SPI NOR controller for SG2042 Zixian Zeng
  2025-07-20  8:31 ` [PATCH v4 1/4] spi: dt-bindings: spi-sg2044-nor: Change SOPHGO SG2042 Zixian Zeng
@ 2025-07-20  8:31 ` Zixian Zeng
  2025-07-20  8:31 ` [PATCH v4 3/4] spi: spi-sg2044-nor: Add SPI-NOR controller for SG2042 Zixian Zeng
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 8+ messages in thread
From: Zixian Zeng @ 2025-07-20  8:31 UTC (permalink / raw)
  To: Tudor Ambarus, Pratyush Yadav, Michael Walle, Miquel Raynal,
	Richard Weinberger, Vignesh Raghavendra, Chen Wang, Inochi Amaoto,
	Mark Brown, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Paul Walmsley, Palmer Dabbelt, Albert Ou, Alexandre Ghiti,
	Longbin Li
  Cc: linux-mtd, linux-kernel, sophgo, linux-spi, devicetree,
	linux-riscv, Conor Dooley, Zixian Zeng

SG2044 and SG2042 have similar SPI-NOR flash controller design,
but have incompatibility which causes existing driver
not working on SG2042:
1. SPI-NOR flash controller on SG2042 have no OPT register.
2. FIFO trigger level on SG2042 should be strictly less than 8.

So introduce a new configurable chip_info structure to hold the
different configuration.

Link: https://github.com/sophgo/sophgo-doc/blob/main/SG2042/TRM/source/SPI-flash.rst
Signed-off-by: Zixian Zeng <sycamoremoon376@gmail.com>
---
 drivers/spi/spi-sg2044-nor.c | 23 ++++++++++++++++++++---
 1 file changed, 20 insertions(+), 3 deletions(-)

diff --git a/drivers/spi/spi-sg2044-nor.c b/drivers/spi/spi-sg2044-nor.c
index a59aa3fc55d277653d01df9c83b3f0aa08edab46..0ef569eb28b7609df1f23d89a6b3e7afc2569c80 100644
--- a/drivers/spi/spi-sg2044-nor.c
+++ b/drivers/spi/spi-sg2044-nor.c
@@ -84,12 +84,18 @@
 
 #define SPIFMC_MAX_READ_SIZE			0x10000
 
+struct sg204x_spifmc_chip_info {
+	bool has_opt_reg;
+	u32 rd_fifo_int_trigger_level;
+};
+
 struct sg2044_spifmc {
 	struct spi_controller *ctrl;
 	void __iomem *io_base;
 	struct device *dev;
 	struct mutex lock;
 	struct clk *clk;
+	const struct sg204x_spifmc_chip_info *chip_info;
 };
 
 static int sg2044_spifmc_wait_int(struct sg2044_spifmc *spifmc, u8 int_type)
@@ -139,7 +145,7 @@ static ssize_t sg2044_spifmc_read_64k(struct sg2044_spifmc *spifmc,
 
 	reg = sg2044_spifmc_init_reg(spifmc);
 	reg |= (op->addr.nbytes + op->dummy.nbytes) << SPIFMC_TRAN_CSR_ADDR_BYTES_SHIFT;
-	reg |= SPIFMC_TRAN_CSR_FIFO_TRG_LVL_8_BYTE;
+	reg |= spifmc->chip_info->rd_fifo_int_trigger_level;
 	reg |= SPIFMC_TRAN_CSR_WITH_CMD;
 	reg |= SPIFMC_TRAN_CSR_TRAN_MODE_RX;
 
@@ -335,7 +341,8 @@ static ssize_t sg2044_spifmc_trans_reg(struct sg2044_spifmc *spifmc,
 		reg |= SPIFMC_TRAN_CSR_TRAN_MODE_RX;
 		reg |= SPIFMC_TRAN_CSR_TRAN_MODE_TX;
 
-		writel(SPIFMC_OPT_DISABLE_FIFO_FLUSH, spifmc->io_base + SPIFMC_OPT);
+		if (spifmc->chip_info->has_opt_reg)
+			writel(SPIFMC_OPT_DISABLE_FIFO_FLUSH, spifmc->io_base + SPIFMC_OPT);
 	} else {
 		/*
 		 * If write values to the Status Register,
@@ -457,6 +464,11 @@ static int sg2044_spifmc_probe(struct platform_device *pdev)
 	ret = devm_mutex_init(dev, &spifmc->lock);
 	if (ret)
 		return ret;
+	spifmc->chip_info = device_get_match_data(&pdev->dev);
+	if (!spifmc->chip_info) {
+		dev_err(&pdev->dev, "Failed to get specific chip info\n");
+		return -EINVAL;
+	}
 
 	sg2044_spifmc_init(spifmc);
 	sg2044_spifmc_init_reg(spifmc);
@@ -468,8 +480,13 @@ static int sg2044_spifmc_probe(struct platform_device *pdev)
 	return 0;
 }
 
+static const struct sg204x_spifmc_chip_info sg2044_chip_info = {
+	.has_opt_reg = true,
+	.rd_fifo_int_trigger_level = SPIFMC_TRAN_CSR_FIFO_TRG_LVL_8_BYTE,
+};
+
 static const struct of_device_id sg2044_spifmc_match[] = {
-	{ .compatible = "sophgo,sg2044-spifmc-nor" },
+	{ .compatible = "sophgo,sg2044-spifmc-nor", .data = &sg2044_chip_info },
 	{ /* sentinel */ }
 };
 MODULE_DEVICE_TABLE(of, sg2044_spifmc_match);

-- 
2.49.0


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

* [PATCH v4 3/4] spi: spi-sg2044-nor: Add SPI-NOR controller for SG2042
  2025-07-20  8:31 [PATCH v4 0/4] spi: sophgo: Add SPI NOR controller for SG2042 Zixian Zeng
  2025-07-20  8:31 ` [PATCH v4 1/4] spi: dt-bindings: spi-sg2044-nor: Change SOPHGO SG2042 Zixian Zeng
  2025-07-20  8:31 ` [PATCH v4 2/4] spi: spi-sg2044-nor: Add configurable chip_info Zixian Zeng
@ 2025-07-20  8:31 ` Zixian Zeng
  2025-07-20  8:31 ` [PATCH v4 4/4] riscv: dts: sophgo: Add SPI NOR node " Zixian Zeng
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 8+ messages in thread
From: Zixian Zeng @ 2025-07-20  8:31 UTC (permalink / raw)
  To: Tudor Ambarus, Pratyush Yadav, Michael Walle, Miquel Raynal,
	Richard Weinberger, Vignesh Raghavendra, Chen Wang, Inochi Amaoto,
	Mark Brown, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Paul Walmsley, Palmer Dabbelt, Albert Ou, Alexandre Ghiti,
	Longbin Li
  Cc: linux-mtd, linux-kernel, sophgo, linux-spi, devicetree,
	linux-riscv, Conor Dooley, Zixian Zeng

Add support for SOPHGO SG2042 SPI-NOR flash controller.

Signed-off-by: Zixian Zeng <sycamoremoon376@gmail.com>
---
 drivers/spi/spi-sg2044-nor.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/drivers/spi/spi-sg2044-nor.c b/drivers/spi/spi-sg2044-nor.c
index 0ef569eb28b7609df1f23d89a6b3e7afc2569c80..af48b1fcda930f3cd0bdd57d80e076918d94010d 100644
--- a/drivers/spi/spi-sg2044-nor.c
+++ b/drivers/spi/spi-sg2044-nor.c
@@ -485,8 +485,14 @@ static const struct sg204x_spifmc_chip_info sg2044_chip_info = {
 	.rd_fifo_int_trigger_level = SPIFMC_TRAN_CSR_FIFO_TRG_LVL_8_BYTE,
 };
 
+static const struct sg204x_spifmc_chip_info sg2042_chip_info = {
+	.has_opt_reg = false,
+	.rd_fifo_int_trigger_level = SPIFMC_TRAN_CSR_FIFO_TRG_LVL_1_BYTE,
+};
+
 static const struct of_device_id sg2044_spifmc_match[] = {
 	{ .compatible = "sophgo,sg2044-spifmc-nor", .data = &sg2044_chip_info },
+	{ .compatible = "sophgo,sg2042-spifmc-nor", .data = &sg2042_chip_info },
 	{ /* sentinel */ }
 };
 MODULE_DEVICE_TABLE(of, sg2044_spifmc_match);

-- 
2.49.0


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

* [PATCH v4 4/4] riscv: dts: sophgo: Add SPI NOR node for SG2042
  2025-07-20  8:31 [PATCH v4 0/4] spi: sophgo: Add SPI NOR controller for SG2042 Zixian Zeng
                   ` (2 preceding siblings ...)
  2025-07-20  8:31 ` [PATCH v4 3/4] spi: spi-sg2044-nor: Add SPI-NOR controller for SG2042 Zixian Zeng
@ 2025-07-20  8:31 ` Zixian Zeng
  2025-07-21 12:58 ` [PATCH v4 0/4] spi: sophgo: Add SPI NOR controller " Chen Wang
  2025-07-24 23:34 ` (subset) " Mark Brown
  5 siblings, 0 replies; 8+ messages in thread
From: Zixian Zeng @ 2025-07-20  8:31 UTC (permalink / raw)
  To: Tudor Ambarus, Pratyush Yadav, Michael Walle, Miquel Raynal,
	Richard Weinberger, Vignesh Raghavendra, Chen Wang, Inochi Amaoto,
	Mark Brown, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Paul Walmsley, Palmer Dabbelt, Albert Ou, Alexandre Ghiti,
	Longbin Li
  Cc: linux-mtd, linux-kernel, sophgo, linux-spi, devicetree,
	linux-riscv, Conor Dooley, Zixian Zeng

Add SPI-NOR controller and flash nodes to device tree for SG2042.

Signed-off-by: Zixian Zeng <sycamoremoon376@gmail.com>
---
 .../riscv/boot/dts/sophgo/sg2042-milkv-pioneer.dts | 24 ++++++++++++++++++++++
 arch/riscv/boot/dts/sophgo/sg2042.dtsi             | 24 ++++++++++++++++++++++
 2 files changed, 48 insertions(+)

diff --git a/arch/riscv/boot/dts/sophgo/sg2042-milkv-pioneer.dts b/arch/riscv/boot/dts/sophgo/sg2042-milkv-pioneer.dts
index ef3a602172b1e5bf3dcf54a8cacdad5172b7f50e..554ec14d58453a44a02a82da40a7aedb80d61dc9 100644
--- a/arch/riscv/boot/dts/sophgo/sg2042-milkv-pioneer.dts
+++ b/arch/riscv/boot/dts/sophgo/sg2042-milkv-pioneer.dts
@@ -138,6 +138,30 @@ &sd {
 	status = "okay";
 };
 
+&spifmc0 {
+	status = "okay";
+
+	flash@0 {
+		compatible = "jedec,spi-nor";
+		reg = <0>;
+		spi-max-frequency = <100000000>;
+		spi-tx-bus-width = <4>;
+		spi-rx-bus-width = <4>;
+	};
+};
+
+&spifmc1 {
+	status = "okay";
+
+	flash@0 {
+		compatible = "jedec,spi-nor";
+		reg = <0>;
+		spi-max-frequency = <100000000>;
+		spi-tx-bus-width = <4>;
+		spi-rx-bus-width = <4>;
+	};
+};
+
 &uart0 {
 	pinctrl-0 = <&uart0_cfg>;
 	pinctrl-names = "default";
diff --git a/arch/riscv/boot/dts/sophgo/sg2042.dtsi b/arch/riscv/boot/dts/sophgo/sg2042.dtsi
index b3e4d3c18fdcf94c2294a56ed6ad866fc59a6adb..0f7d8a3743c35046ceec902902af2b8d3ec8e6bd 100644
--- a/arch/riscv/boot/dts/sophgo/sg2042.dtsi
+++ b/arch/riscv/boot/dts/sophgo/sg2042.dtsi
@@ -48,6 +48,30 @@ soc: soc {
 		interrupt-parent = <&intc>;
 		ranges;
 
+		spifmc0: spi@7000180000 {
+			compatible = "sophgo,sg2042-spifmc-nor";
+			reg = <0x70 0x00180000 0x0 0x1000000>;
+			#address-cells = <1>;
+			#size-cells = <0>;
+			clocks = <&clkgen GATE_CLK_AHB_SF>;
+			interrupt-parent = <&intc>;
+			interrupts = <108 IRQ_TYPE_LEVEL_HIGH>;
+			resets = <&rstgen RST_SF0>;
+			status = "disabled";
+		};
+
+		spifmc1: spi@7002180000 {
+			compatible = "sophgo,sg2042-spifmc-nor";
+			reg = <0x70 0x02180000 0x0 0x1000000>;
+			#address-cells = <1>;
+			#size-cells = <0>;
+			clocks = <&clkgen GATE_CLK_AHB_SF>;
+			interrupt-parent = <&intc>;
+			interrupts = <109 IRQ_TYPE_LEVEL_HIGH>;
+			resets = <&rstgen RST_SF1>;
+			status = "disabled";
+		};
+
 		i2c0: i2c@7030005000 {
 			compatible = "snps,designware-i2c";
 			reg = <0x70 0x30005000 0x0 0x1000>;

-- 
2.49.0


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

* Re: [PATCH v4 0/4] spi: sophgo: Add SPI NOR controller for SG2042
  2025-07-20  8:31 [PATCH v4 0/4] spi: sophgo: Add SPI NOR controller for SG2042 Zixian Zeng
                   ` (3 preceding siblings ...)
  2025-07-20  8:31 ` [PATCH v4 4/4] riscv: dts: sophgo: Add SPI NOR node " Zixian Zeng
@ 2025-07-21 12:58 ` Chen Wang
  2025-07-24 23:34 ` (subset) " Mark Brown
  5 siblings, 0 replies; 8+ messages in thread
From: Chen Wang @ 2025-07-21 12:58 UTC (permalink / raw)
  To: Zixian Zeng, Tudor Ambarus, Pratyush Yadav, Michael Walle,
	Miquel Raynal, Richard Weinberger, Vignesh Raghavendra,
	Inochi Amaoto, Mark Brown, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Paul Walmsley, Palmer Dabbelt, Albert Ou,
	Alexandre Ghiti, Longbin Li
  Cc: linux-mtd, linux-kernel, sophgo, linux-spi, devicetree,
	linux-riscv, Conor Dooley


On 2025/7/20 16:31, Zixian Zeng wrote:
> Add support SPI NOR flash memory controller for SG2042, using upstreamed
> SG2044 SPI NOR driver.
>
> Tested on SG2042 Pioneer Box, read, write operations.
> Thanks Chen Wang who provided machine and guidance.
>
> Signed-off-by: Zixian Zeng <sycamoremoon376@gmail.com>

Reviewed-by: Chen Wang <unicorn_wang@outlook.com> & Tested-by: Chen Wang 
<unicorn_wang@outlook.com>

Note I just have pioneerbox/sg2042 so I can only run with my board in hand.

Hi, Longbin,

As you are auther of this SPI driver, can you please help review and 
test it on sg2044?

Thanks,

Chen.

> ---
> Changes in v4:
> - patch1: Explain why SG2042 is not compatible with SG2044 and add Fixes tag.
> - patch2: Explain the hardware differences between SG2042 and SG2044.
> - patch4: Remove the extra "sophgo,sg2044-spifmc-nor" compatible property.
> - Link to v3: https://lore.kernel.org/r/20250629-sfg-spifmc-v3-0-28db1f27e999@gmail.com
>
> Changes in v3:
> - Drop the patch which adds additional flash_info into gigadevice.c
> - patch1: Because of the incompatibility, separate the SG2042 from the previous fallback mechanism to independent one.
> - patch2: Newly add configurable options to spi-sg2044-nor driver.
> - patch3: Fix reading bytes issue that causes the spi_nor_check_sfdp_signature() failure on SG2042.
> - Link to v2: https://lore.kernel.org/r/20250525-sfg-spifmc-v2-0-a3732b6f5ab4@gmail.com
>
> Changes in v2:
> - patch1: Accept devicetree nodes whose compatible contains only
>    "sophgo,sg2044-spifmc-nor" to avoid breaking existing devicetrees.
> - patch1: Improve the commit subject message.
> - patch2: Dump the SFDP information to commit message.
> - Link to v1: https://lore.kernel.org/r/20250523-sfg-spifmc-v1-0-4cf16cf3fd2a@gmail.com
>
> ---
> Zixian Zeng (4):
>        spi: dt-bindings: spi-sg2044-nor: Change SOPHGO SG2042
>        spi: spi-sg2044-nor: Add configurable chip_info
>        spi: spi-sg2044-nor: Add SPI-NOR controller for SG2042
>        riscv: dts: sophgo: Add SPI NOR node for SG2042
>
>   .../devicetree/bindings/spi/spi-sg2044-nor.yaml    |  9 +++----
>   .../riscv/boot/dts/sophgo/sg2042-milkv-pioneer.dts | 24 ++++++++++++++++++
>   arch/riscv/boot/dts/sophgo/sg2042.dtsi             | 24 ++++++++++++++++++
>   drivers/spi/spi-sg2044-nor.c                       | 29 +++++++++++++++++++---
>   4 files changed, 77 insertions(+), 9 deletions(-)
> ---
> base-commit: 8727665368cd4af112146b650ec0ebac038b5cf5
> change-id: 20250523-sfg-spifmc-7a910290e964
>
> Best regards,

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

* Re: [PATCH v4 1/4] spi: dt-bindings: spi-sg2044-nor: Change SOPHGO SG2042
  2025-07-20  8:31 ` [PATCH v4 1/4] spi: dt-bindings: spi-sg2044-nor: Change SOPHGO SG2042 Zixian Zeng
@ 2025-07-21 15:04   ` Rob Herring (Arm)
  0 siblings, 0 replies; 8+ messages in thread
From: Rob Herring (Arm) @ 2025-07-21 15:04 UTC (permalink / raw)
  To: Zixian Zeng
  Cc: Alexandre Ghiti, Mark Brown, Palmer Dabbelt, linux-spi,
	Longbin Li, Pratyush Yadav, Conor Dooley, Krzysztof Kozlowski,
	linux-riscv, Conor Dooley, sophgo, Chen Wang, linux-mtd,
	Richard Weinberger, Vignesh Raghavendra, Inochi Amaoto,
	Tudor Ambarus, Albert Ou, linux-kernel, devicetree, Miquel Raynal,
	Michael Walle, Paul Walmsley


On Sun, 20 Jul 2025 16:31:43 +0800, Zixian Zeng wrote:
> With further testing, directly using the spi-sg2044-nor driver on SG2042
> does not work. SG2042 is found to lack full compatibility with SG2044.
> SG2044 has OPT register and it's necessary to write but SG2042 does not.
> Due to other possible hardware detail differences, it is better
> to bind SG2042 independently.
> 
> Fixes: 8450f1e0d3d0 ("spi: dt-bindings: spi-sg2044-nor: Add SOPHGO SG2042")
> Signed-off-by: Zixian Zeng <sycamoremoon376@gmail.com>
> ---
>  Documentation/devicetree/bindings/spi/spi-sg2044-nor.yaml | 9 +++------
>  1 file changed, 3 insertions(+), 6 deletions(-)
> 

Acked-by: Rob Herring (Arm) <robh@kernel.org>


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

* Re: (subset) [PATCH v4 0/4] spi: sophgo: Add SPI NOR controller for SG2042
  2025-07-20  8:31 [PATCH v4 0/4] spi: sophgo: Add SPI NOR controller for SG2042 Zixian Zeng
                   ` (4 preceding siblings ...)
  2025-07-21 12:58 ` [PATCH v4 0/4] spi: sophgo: Add SPI NOR controller " Chen Wang
@ 2025-07-24 23:34 ` Mark Brown
  5 siblings, 0 replies; 8+ messages in thread
From: Mark Brown @ 2025-07-24 23:34 UTC (permalink / raw)
  To: Tudor Ambarus, Pratyush Yadav, Michael Walle, Miquel Raynal,
	Richard Weinberger, Vignesh Raghavendra, Chen Wang, Inochi Amaoto,
	Rob Herring, Krzysztof Kozlowski, Conor Dooley, Paul Walmsley,
	Palmer Dabbelt, Albert Ou, Alexandre Ghiti, Longbin Li,
	Zixian Zeng
  Cc: linux-mtd, linux-kernel, sophgo, linux-spi, devicetree,
	linux-riscv, Conor Dooley

On Sun, 20 Jul 2025 16:31:42 +0800, Zixian Zeng wrote:
> Add support SPI NOR flash memory controller for SG2042, using upstreamed
> SG2044 SPI NOR driver.
> 
> Tested on SG2042 Pioneer Box, read, write operations.
> Thanks Chen Wang who provided machine and guidance.
> 
> 
> [...]

Applied to

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

Thanks!

[1/4] spi: dt-bindings: spi-sg2044-nor: Change SOPHGO SG2042
      commit: 7438379cfc47046f7507dfdb54906acf56288b9f
[2/4] spi: spi-sg2044-nor: Add configurable chip_info
      commit: 5653b4f8840801d9d141ba6a6c10e7cc15040c5b
[3/4] spi: spi-sg2044-nor: Add SPI-NOR controller for SG2042
      commit: f6b159431697c903da1418e70c825faa0cddbdae

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

end of thread, other threads:[~2025-07-24 23:34 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-07-20  8:31 [PATCH v4 0/4] spi: sophgo: Add SPI NOR controller for SG2042 Zixian Zeng
2025-07-20  8:31 ` [PATCH v4 1/4] spi: dt-bindings: spi-sg2044-nor: Change SOPHGO SG2042 Zixian Zeng
2025-07-21 15:04   ` Rob Herring (Arm)
2025-07-20  8:31 ` [PATCH v4 2/4] spi: spi-sg2044-nor: Add configurable chip_info Zixian Zeng
2025-07-20  8:31 ` [PATCH v4 3/4] spi: spi-sg2044-nor: Add SPI-NOR controller for SG2042 Zixian Zeng
2025-07-20  8:31 ` [PATCH v4 4/4] riscv: dts: sophgo: Add SPI NOR node " Zixian Zeng
2025-07-21 12:58 ` [PATCH v4 0/4] spi: sophgo: Add SPI NOR controller " Chen Wang
2025-07-24 23:34 ` (subset) " Mark Brown

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