* [PATCH v2 1/3] spi: dt-bindings: spi-sg2044-nor: Add SOPHGO SG2042
2025-05-25 14:58 [PATCH v2 0/3] spi: sophgo: Add SPI NOR controller for SG2042 Zixian Zeng
@ 2025-05-25 14:58 ` Zixian Zeng
2025-05-26 2:10 ` Chen Wang
2025-05-26 15:14 ` Conor Dooley
2025-05-25 14:58 ` [PATCH v2 2/3] mtd: spi-nor: Add GD25LB512ME GigaDevice flash_info Zixian Zeng
` (2 subsequent siblings)
3 siblings, 2 replies; 9+ messages in thread
From: Zixian Zeng @ 2025-05-25 14:58 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, Zixian Zeng
Add bindings for the SOPHGO SG2042 SPI-NOR flash controller,
which is compatible with SOPHGO SG2044.
Signed-off-by: Zixian Zeng <sycamoremoon376@gmail.com>
---
Documentation/devicetree/bindings/spi/spi-sg2044-nor.yaml | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/Documentation/devicetree/bindings/spi/spi-sg2044-nor.yaml b/Documentation/devicetree/bindings/spi/spi-sg2044-nor.yaml
index 948ff7a096433a8c3c64cba13fc1339d18f6c19d..66e54dedab140a167ad84c43f312f93af2bfa06a 100644
--- a/Documentation/devicetree/bindings/spi/spi-sg2044-nor.yaml
+++ b/Documentation/devicetree/bindings/spi/spi-sg2044-nor.yaml
@@ -14,7 +14,12 @@ allOf:
properties:
compatible:
- const: sophgo,sg2044-spifmc-nor
+ oneOf:
+ - const: sophgo,sg2044-spifmc-nor
+ - items:
+ - enum:
+ - sophgo,sg2042-spifmc-nor
+ - const: sophgo,sg2044-spifmc-nor
reg:
maxItems: 1
--
2.49.0
_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv
^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [PATCH v2 1/3] spi: dt-bindings: spi-sg2044-nor: Add SOPHGO SG2042
2025-05-25 14:58 ` [PATCH v2 1/3] spi: dt-bindings: spi-sg2044-nor: Add SOPHGO SG2042 Zixian Zeng
@ 2025-05-26 2:10 ` Chen Wang
2025-05-26 15:14 ` Conor Dooley
1 sibling, 0 replies; 9+ messages in thread
From: Chen Wang @ 2025-05-26 2:10 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
On 2025/5/25 22:58, Zixian Zeng wrote:
> Add bindings for the SOPHGO SG2042 SPI-NOR flash controller,
> which is compatible with SOPHGO SG2044.
>
> Signed-off-by: Zixian Zeng <sycamoremoon376@gmail.com>
> ---
> Documentation/devicetree/bindings/spi/spi-sg2044-nor.yaml | 7 ++++++-
> 1 file changed, 6 insertions(+), 1 deletion(-)
>
> diff --git a/Documentation/devicetree/bindings/spi/spi-sg2044-nor.yaml b/Documentation/devicetree/bindings/spi/spi-sg2044-nor.yaml
> index 948ff7a096433a8c3c64cba13fc1339d18f6c19d..66e54dedab140a167ad84c43f312f93af2bfa06a 100644
> --- a/Documentation/devicetree/bindings/spi/spi-sg2044-nor.yaml
> +++ b/Documentation/devicetree/bindings/spi/spi-sg2044-nor.yaml
> @@ -14,7 +14,12 @@ allOf:
>
> properties:
> compatible:
> - const: sophgo,sg2044-spifmc-nor
> + oneOf:
> + - const: sophgo,sg2044-spifmc-nor
> + - items:
> + - enum:
> + - sophgo,sg2042-spifmc-nor
> + - const: sophgo,sg2044-spifmc-nor
>
> reg:
> maxItems: 1
Reviewed-by: Chen Wang <unicorn_wang@outlook.com>
_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH v2 1/3] spi: dt-bindings: spi-sg2044-nor: Add SOPHGO SG2042
2025-05-25 14:58 ` [PATCH v2 1/3] spi: dt-bindings: spi-sg2044-nor: Add SOPHGO SG2042 Zixian Zeng
2025-05-26 2:10 ` Chen Wang
@ 2025-05-26 15:14 ` Conor Dooley
1 sibling, 0 replies; 9+ messages in thread
From: Conor Dooley @ 2025-05-26 15:14 UTC (permalink / raw)
To: Zixian Zeng
Cc: 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, linux-mtd, linux-kernel, sophgo, linux-spi,
devicetree, linux-riscv
[-- Attachment #1.1: Type: text/plain, Size: 286 bytes --]
On Sun, May 25, 2025 at 10:58:41PM +0800, Zixian Zeng wrote:
> Add bindings for the SOPHGO SG2042 SPI-NOR flash controller,
> which is compatible with SOPHGO SG2044.
>
> Signed-off-by: Zixian Zeng <sycamoremoon376@gmail.com>
Acked-by: Conor Dooley <conor.dooley@microchip.com>
[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
[-- Attachment #2: Type: text/plain, Size: 161 bytes --]
_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH v2 2/3] mtd: spi-nor: Add GD25LB512ME GigaDevice flash_info
2025-05-25 14:58 [PATCH v2 0/3] spi: sophgo: Add SPI NOR controller for SG2042 Zixian Zeng
2025-05-25 14:58 ` [PATCH v2 1/3] spi: dt-bindings: spi-sg2044-nor: Add SOPHGO SG2042 Zixian Zeng
@ 2025-05-25 14:58 ` Zixian Zeng
2025-05-25 14:58 ` [PATCH v2 3/3] riscv: dts: sophgo: Add SPI NOR node for SG2042 Zixian Zeng
2025-05-27 16:44 ` (subset) [PATCH v2 0/3] spi: sophgo: Add SPI NOR controller " Mark Brown
3 siblings, 0 replies; 9+ messages in thread
From: Zixian Zeng @ 2025-05-25 14:58 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, Zixian Zeng
Add GD25LB512ME SPI-NOR flash information.
The following SFDP dump was generated after applying the current commit.
------------------------------------------------------------------------
This flash is populated on the SG2042 Pioneer board and was tested at
100MHz frequency using the spi-sg2044-nor SPI controller.
root@localhost ~ # cat /sys/bus/spi/devices/spi0.0/spi-nor/partname
gd25lb512me
root@localhost ~ # cat /sys/bus/spi/devices/spi0.0/spi-nor/jedec_id
c8671a
root@localhost ~ # cat /sys/bus/spi/devices/spi0.0/spi-nor/manufacturer
gigadevice
root@localhost ~ # xxd -p /sys/bus/spi/devices/spi0.0/spi-nor/sfdp
53464450060102ff00060110300000ffc8000103900000ff84000102c000
00ffffffffffffffffffffffffffffffffffe520eaffffffff1f44eb086b
003b00bbfeffffffffff00ffffff44eb0c200f5210d800ffd531b1fe83d6
1458ec6006337a757a7504bdd55c2906740008500001ffffffffffffffff
ffffffffffffffffffffffffffffffffffffffffffffffff002050169df9
8156d9c8ffffffffffffffffffffffffffffffffffffffffffffffffffff
fffffffffffffffffffffffff38ff0ff215cdcff
root@localhost ~ # sha256sum /sys/bus/spi/devices/spi0.0/spi-nor/sfdp
859eb314b0500aa3e3dc5a1ad514f1013387c7aaa40147ed2d616ffc4b6d851c /sys/bus/spi/devices/spi0.0/spi-nor/sfdp
root@localhost ~ # #Dump debugfs data
root@localhost ~ # cat /sys/kernel/debug/spi-nor/spi0.0/capabilities
Supported read modes by the flash
1S-1S-1S
opcode 0x13
mode cycles 0
dummy cycles 0
1S-1S-4S
opcode 0x6c
mode cycles 0
dummy cycles 8
1S-4S-4S
opcode 0xec
mode cycles 2
dummy cycles 4
4S-4S-4S
opcode 0xec
mode cycles 2
dummy cycles 4
Supported page program modes by the flash
1S-1S-1S
opcode 0x12
1S-1S-4S
opcode 0x34
1S-4S-4S
opcode 0x3e
root@localhost ~ # cat /sys/kernel/debug/spi-nor/spi0.0/params
name gd25lb512me
id c8 67 1a ff c8 67
size 64.0 MiB
write size 1
page size 256
address nbytes 4
flags HAS_SR_TB | 4B_OPCODES | HAS_4BAIT | HAS_LOCK | HAS_16BIT_SR | SOFT_RESET
opcodes
read 0x13
dummy cycles 0
erase 0x21
program 0x12
8D extension none
protocols
read 1S-1S-1S
write 1S-1S-1S
register 1S-1S-1S
erase commands
21 (4.00 KiB) [1]
5c (32.0 KiB) [2]
dc (64.0 KiB) [3]
c7 (64.0 MiB)
sector map
region (in hex) | erase mask | overlaid
------------------+------------+----------
00000000-03ffffff | [ 1 ] | no
root@localhost ~ # dd if=/dev/urandom of=./spi_test bs=1M count=2
2+0 records in
2+0 records out
2097152 bytes (2.1 MB, 2.0 MiB) copied, 0.0279486 s, 75.0 MB/s
root@localhost ~ # mtd_debug erase /dev/mtd0 0 2097152
Erased 2097152 bytes from address 0x00000000 in flash
root@localhost ~ # mtd_debug read /dev/mtd0 0 2097152 spi_read
Copied 2097152 bytes from address 0x00000000 in flash to spi_read
root@localhost ~ # hexdump spi_read
0000000 ffff ffff ffff ffff ffff ffff ffff ffff
*
0200000
root@localhost ~ # sha256sum spi_read
4bda3a28f4ffe603c0ec1258c0034d65a1a0d35ab7bd523a834608adabf03cc5 spi_read
root@localhost ~ # mtd_debug write /dev/mtd0 0 2097152 spi_test
Copied 2097152 bytes from spi_test to address 0x00000000 in flash
root@localhost ~ # mtd_debug read /dev/mtd0 0 2097152 spi_read
Copied 2097152 bytes from address 0x00000000 in flash to spi_read
root@localhost ~ # sha256sum spi*
a2ebfaebe38974847a4efb628b29a72f1d50e78c17318869d8954b033dc32e5d spi_read
a2ebfaebe38974847a4efb628b29a72f1d50e78c17318869d8954b033dc32e5d spi_test
root@localhost ~ # mtd_debug info /dev/mtd0
mtd.type = MTD_NORFLASH
mtd.flags = MTD_CAP_NORFLASH
mtd.size = 67108864 (64M)
mtd.erasesize = 4096 (4K)
mtd.writesize = 1
mtd.oobsize = 0
regions = 0
Signed-off-by: Zixian Zeng <sycamoremoon376@gmail.com>
---
drivers/mtd/spi-nor/gigadevice.c | 17 +++++++++++++++++
1 file changed, 17 insertions(+)
diff --git a/drivers/mtd/spi-nor/gigadevice.c b/drivers/mtd/spi-nor/gigadevice.c
index ef1edd0add70e6ca501620798a779d621d6bb00d..223b2f598ecd651ce8df6789dfbaf938c534f94f 100644
--- a/drivers/mtd/spi-nor/gigadevice.c
+++ b/drivers/mtd/spi-nor/gigadevice.c
@@ -33,6 +33,15 @@ static const struct spi_nor_fixups gd25q256_fixups = {
.post_bfpt = gd25q256_post_bfpt,
};
+static void gd25lb512me_default_init(struct spi_nor *nor)
+{
+ nor->params->quad_enable = spi_nor_sr1_bit6_quad_enable;
+}
+
+static const struct spi_nor_fixups gd25lb512me_fixups = {
+ .default_init = gd25lb512me_default_init,
+};
+
static const struct flash_info gigadevice_nor_parts[] = {
{
.id = SNOR_ID(0xc8, 0x40, 0x15),
@@ -82,6 +91,14 @@ static const struct flash_info gigadevice_nor_parts[] = {
.size = SZ_16M,
.flags = SPI_NOR_HAS_LOCK | SPI_NOR_HAS_TB,
.no_sfdp_flags = SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ,
+ }, {
+ .id = SNOR_ID(0xc8, 0x67, 0x1a),
+ .name = "gd25lb512me",
+ .size = SZ_64M,
+ .flags = SPI_NOR_HAS_LOCK | SPI_NOR_HAS_TB,
+ .no_sfdp_flags = SECT_4K | SPI_NOR_QUAD_READ,
+ .fixups = &gd25lb512me_fixups,
+ .fixup_flags = SPI_NOR_4B_OPCODES,
},
};
--
2.49.0
_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH v2 3/3] riscv: dts: sophgo: Add SPI NOR node for SG2042
2025-05-25 14:58 [PATCH v2 0/3] spi: sophgo: Add SPI NOR controller for SG2042 Zixian Zeng
2025-05-25 14:58 ` [PATCH v2 1/3] spi: dt-bindings: spi-sg2044-nor: Add SOPHGO SG2042 Zixian Zeng
2025-05-25 14:58 ` [PATCH v2 2/3] mtd: spi-nor: Add GD25LB512ME GigaDevice flash_info Zixian Zeng
@ 2025-05-25 14:58 ` Zixian Zeng
2025-05-26 2:14 ` Chen Wang
2025-05-27 16:51 ` Pratyush Yadav
2025-05-27 16:44 ` (subset) [PATCH v2 0/3] spi: sophgo: Add SPI NOR controller " Mark Brown
3 siblings, 2 replies; 9+ messages in thread
From: Zixian Zeng @ 2025-05-25 14:58 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, 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 | 18 ++++++++++++++++
arch/riscv/boot/dts/sophgo/sg2042.dtsi | 24 ++++++++++++++++++++++
2 files changed, 42 insertions(+)
diff --git a/arch/riscv/boot/dts/sophgo/sg2042-milkv-pioneer.dts b/arch/riscv/boot/dts/sophgo/sg2042-milkv-pioneer.dts
index 34645a5f6038389cd00d4940947c6bb71d39ec6f..c59a819e35d3201c484bf98392aec14392a7eb04 100644
--- a/arch/riscv/boot/dts/sophgo/sg2042-milkv-pioneer.dts
+++ b/arch/riscv/boot/dts/sophgo/sg2042-milkv-pioneer.dts
@@ -68,6 +68,24 @@ &sd {
status = "okay";
};
+&spifmc0 {
+ status = "okay";
+
+ flash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ };
+};
+
+&spifmc1 {
+ status = "okay";
+
+ flash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ };
+};
+
&uart0 {
status = "okay";
};
diff --git a/arch/riscv/boot/dts/sophgo/sg2042.dtsi b/arch/riscv/boot/dts/sophgo/sg2042.dtsi
index 212a3edc73fd654de59e10fab2094af2fec7f88f..06b433d5949bcc2374ea90223ff2d81434fad2b5 100644
--- a/arch/riscv/boot/dts/sophgo/sg2042.dtsi
+++ b/arch/riscv/boot/dts/sophgo/sg2042.dtsi
@@ -83,6 +83,30 @@ soc: soc {
interrupt-parent = <&intc>;
ranges;
+ spifmc0: spi@7000180000 {
+ compatible = "sophgo,sg2042-spifmc-nor", "sophgo,sg2044-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", "sophgo,sg2044-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
_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv
^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [PATCH v2 3/3] riscv: dts: sophgo: Add SPI NOR node for SG2042
2025-05-25 14:58 ` [PATCH v2 3/3] riscv: dts: sophgo: Add SPI NOR node for SG2042 Zixian Zeng
@ 2025-05-26 2:14 ` Chen Wang
2025-05-27 16:51 ` Pratyush Yadav
1 sibling, 0 replies; 9+ messages in thread
From: Chen Wang @ 2025-05-26 2:14 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
On 2025/5/25 22:58, Zixian Zeng wrote:
> 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 | 18 ++++++++++++++++
> arch/riscv/boot/dts/sophgo/sg2042.dtsi | 24 ++++++++++++++++++++++
> 2 files changed, 42 insertions(+)
>
> diff --git a/arch/riscv/boot/dts/sophgo/sg2042-milkv-pioneer.dts b/arch/riscv/boot/dts/sophgo/sg2042-milkv-pioneer.dts
> index 34645a5f6038389cd00d4940947c6bb71d39ec6f..c59a819e35d3201c484bf98392aec14392a7eb04 100644
> --- a/arch/riscv/boot/dts/sophgo/sg2042-milkv-pioneer.dts
> +++ b/arch/riscv/boot/dts/sophgo/sg2042-milkv-pioneer.dts
> @@ -68,6 +68,24 @@ &sd {
> status = "okay";
> };
>
> +&spifmc0 {
> + status = "okay";
> +
> + flash@0 {
> + compatible = "jedec,spi-nor";
> + reg = <0>;
> + };
> +};
> +
> +&spifmc1 {
> + status = "okay";
> +
> + flash@0 {
> + compatible = "jedec,spi-nor";
> + reg = <0>;
> + };
> +};
> +
> &uart0 {
> status = "okay";
> };
> diff --git a/arch/riscv/boot/dts/sophgo/sg2042.dtsi b/arch/riscv/boot/dts/sophgo/sg2042.dtsi
> index 212a3edc73fd654de59e10fab2094af2fec7f88f..06b433d5949bcc2374ea90223ff2d81434fad2b5 100644
> --- a/arch/riscv/boot/dts/sophgo/sg2042.dtsi
> +++ b/arch/riscv/boot/dts/sophgo/sg2042.dtsi
> @@ -83,6 +83,30 @@ soc: soc {
> interrupt-parent = <&intc>;
> ranges;
>
> + spifmc0: spi@7000180000 {
> + compatible = "sophgo,sg2042-spifmc-nor", "sophgo,sg2044-spifmc-nor";
> + reg = <0x70 0x00180000 0x0 0x1000000>;
> + #address-cells = <1>;
> + #size-cells = <0>;
> + clocks = <&clkgen GATE_CLK_AHB_SF>;
> + interrupt-parent = <&intc>;
"interrupt-parent" is not needed, because it has been defined in soc level.
> + interrupts = <108 IRQ_TYPE_LEVEL_HIGH>;
> + resets = <&rstgen RST_SF0>;
> + status = "disabled";
> + };
> +
> + spifmc1: spi@7002180000 {
> + compatible = "sophgo,sg2042-spifmc-nor", "sophgo,sg2044-spifmc-nor";
> + reg = <0x70 0x02180000 0x0 0x1000000>;
> + #address-cells = <1>;
> + #size-cells = <0>;
> + clocks = <&clkgen GATE_CLK_AHB_SF>;
> + interrupt-parent = <&intc>;
The same question listed upon.
> + interrupts = <109 IRQ_TYPE_LEVEL_HIGH>;
> + resets = <&rstgen RST_SF1>;
> + status = "disabled";
> + };
> +
> i2c0: i2c@7030005000 {
> compatible = "snps,designware-i2c";
> reg = <0x70 0x30005000 0x0 0x1000>;
Othres LGTM.
Reviewed-by: Chen Wang <unicorn_wang@outlook.com>
>
_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH v2 3/3] riscv: dts: sophgo: Add SPI NOR node for SG2042
2025-05-25 14:58 ` [PATCH v2 3/3] riscv: dts: sophgo: Add SPI NOR node for SG2042 Zixian Zeng
2025-05-26 2:14 ` Chen Wang
@ 2025-05-27 16:51 ` Pratyush Yadav
1 sibling, 0 replies; 9+ messages in thread
From: Pratyush Yadav @ 2025-05-27 16:51 UTC (permalink / raw)
To: Zixian Zeng
Cc: 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, linux-mtd, linux-kernel, sophgo, linux-spi,
devicetree, linux-riscv
On Sun, May 25 2025, Zixian Zeng wrote:
> 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 | 18 ++++++++++++++++
> arch/riscv/boot/dts/sophgo/sg2042.dtsi | 24 ++++++++++++++++++++++
> 2 files changed, 42 insertions(+)
>
> diff --git a/arch/riscv/boot/dts/sophgo/sg2042-milkv-pioneer.dts b/arch/riscv/boot/dts/sophgo/sg2042-milkv-pioneer.dts
> index 34645a5f6038389cd00d4940947c6bb71d39ec6f..c59a819e35d3201c484bf98392aec14392a7eb04 100644
> --- a/arch/riscv/boot/dts/sophgo/sg2042-milkv-pioneer.dts
> +++ b/arch/riscv/boot/dts/sophgo/sg2042-milkv-pioneer.dts
> @@ -68,6 +68,24 @@ &sd {
> status = "okay";
> };
>
> +&spifmc0 {
> + status = "okay";
> +
> + flash@0 {
> + compatible = "jedec,spi-nor";
> + reg = <0>;
Shouldn't you also add other properties like spi-max-frequency or
spi-{rx,tx}-bus-width? Same for the other flash.
> + };
> +};
> +
> +&spifmc1 {
> + status = "okay";
> +
> + flash@0 {
> + compatible = "jedec,spi-nor";
> + reg = <0>;
> + };
> +};
> +
> &uart0 {
> status = "okay";
> };
[...]
--
Regards,
Pratyush Yadav
_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: (subset) [PATCH v2 0/3] spi: sophgo: Add SPI NOR controller for SG2042
2025-05-25 14:58 [PATCH v2 0/3] spi: sophgo: Add SPI NOR controller for SG2042 Zixian Zeng
` (2 preceding siblings ...)
2025-05-25 14:58 ` [PATCH v2 3/3] riscv: dts: sophgo: Add SPI NOR node for SG2042 Zixian Zeng
@ 2025-05-27 16:44 ` Mark Brown
3 siblings, 0 replies; 9+ messages in thread
From: Mark Brown @ 2025-05-27 16:44 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
On Sun, 25 May 2025 22:58:40 +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.
>
>
Applied to
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi.git for-next
Thanks!
[1/3] spi: dt-bindings: spi-sg2044-nor: Add SOPHGO SG2042
commit: 8450f1e0d3d0e0b200eb14d14dfb8ef5ddb9bda9
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
_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv
^ permalink raw reply [flat|nested] 9+ messages in thread