All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] board: sifive: unmatched: enable booting on a second NVME device
@ 2023-01-07 22:32 Aurelien Jarno
  2023-01-07 23:02 ` Heinrich Schuchardt
  0 siblings, 1 reply; 3+ messages in thread
From: Aurelien Jarno @ 2023-01-07 22:32 UTC (permalink / raw)
  To: Paul Walmsley, Pragnesh Patel, Green Wan; +Cc: open list, Aurelien Jarno

The HiFive Unmatched board has a M2 slot for NVME and a PCIe slot that
can also be used for NVME. Enable support for a second NVME device, so
that software RAID-1 configurations can be supported at the u-boot
level.

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
---
 include/configs/sifive-unmatched.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/include/configs/sifive-unmatched.h b/include/configs/sifive-unmatched.h
index 85fab92719..9261932af9 100644
--- a/include/configs/sifive-unmatched.h
+++ b/include/configs/sifive-unmatched.h
@@ -19,6 +19,7 @@
 
 #define BOOT_TARGET_DEVICES(func) \
 	func(NVME, nvme, 0) \
+	func(NVME, nvme, 1) \
 	func(USB, usb, 0) \
 	func(MMC, mmc, 0) \
 	func(SCSI, scsi, 0) \
-- 
2.35.1


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

* Re: [PATCH] board: sifive: unmatched: enable booting on a second NVME device
  2023-01-07 22:32 [PATCH] board: sifive: unmatched: enable booting on a second NVME device Aurelien Jarno
@ 2023-01-07 23:02 ` Heinrich Schuchardt
  2023-01-08 14:54   ` Maciej W. Rozycki
  0 siblings, 1 reply; 3+ messages in thread
From: Heinrich Schuchardt @ 2023-01-07 23:02 UTC (permalink / raw)
  To: Aurelien Jarno; +Cc: open list, Paul Walmsley, Pragnesh Patel, Green Wan

On 1/7/23 23:32, Aurelien Jarno wrote:
> The HiFive Unmatched board has a M2 slot for NVME and a PCIe slot that
> can also be used for NVME. Enable support for a second NVME device, so
> that software RAID-1 configurations can be supported at the u-boot
> level.
>
> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
> ---
>   include/configs/sifive-unmatched.h | 1 +
>   1 file changed, 1 insertion(+)
>
> diff --git a/include/configs/sifive-unmatched.h b/include/configs/sifive-unmatched.h
> index 85fab92719..9261932af9 100644
> --- a/include/configs/sifive-unmatched.h
> +++ b/include/configs/sifive-unmatched.h
> @@ -19,6 +19,7 @@
>
>   #define BOOT_TARGET_DEVICES(func) \
>   	func(NVME, nvme, 0) \
> +	func(NVME, nvme, 1) \

We can have up to three NVMe drives directly connected. Just put an
adapter into the 2230 m.2 slot (e.g.
https://www.aliexpress.com/item/32968036136.html, NGFF M.2 Key M to Key
A+E Extension Cable NGFF Key M to A+E Adapter Card Board).

>   	func(USB, usb, 0) \
>   	func(MMC, mmc, 0) \
>   	func(SCSI, scsi, 0) \

It is a generic problem that include/config_distro_bootcmd.h requires
explicitly enumerating the device numbers instead of scanning all devices.

With a SATA adapter you can have more than one instance of SCSI too (cf.
IOCREST M.2 NGFF to Sata3 Adapter Card A-Key + E-Key to 2 Ports SATA
6Gb/S
https://www.walmart.ca/en/ip/IOCREST-M-2-NGFF-to-Sata3-Adapter-Card-A-Key-E-Key-to-2-Ports-SATA-6Gb-S-Free-Driver-PCIe-3-0-Bus-for-Wifi-SSD-HDD-PC-Black/PRD67D114EQV1VO).

Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>

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

* Re: [PATCH] board: sifive: unmatched: enable booting on a second NVME device
  2023-01-07 23:02 ` Heinrich Schuchardt
@ 2023-01-08 14:54   ` Maciej W. Rozycki
  0 siblings, 0 replies; 3+ messages in thread
From: Maciej W. Rozycki @ 2023-01-08 14:54 UTC (permalink / raw)
  To: Heinrich Schuchardt
  Cc: Aurelien Jarno, open list, Paul Walmsley, Pragnesh Patel, Green Wan

On Sun, 8 Jan 2023, Heinrich Schuchardt wrote:

> > diff --git a/include/configs/sifive-unmatched.h
> > b/include/configs/sifive-unmatched.h
> > index 85fab92719..9261932af9 100644
> > --- a/include/configs/sifive-unmatched.h
> > +++ b/include/configs/sifive-unmatched.h
> > @@ -19,6 +19,7 @@
> > 
> >   #define BOOT_TARGET_DEVICES(func) \
> >   	func(NVME, nvme, 0) \
> > +	func(NVME, nvme, 1) \
> 
> We can have up to three NVMe drives directly connected. Just put an
> adapter into the 2230 m.2 slot (e.g.
> https://www.aliexpress.com/item/32968036136.html, NGFF M.2 Key M to Key
> A+E Extension Cable NGFF Key M to A+E Adapter Card Board).

 Or you can have an adapter with a PCIe switch such as the SI-PEX40152 
<https://www.sybausa.com/index.php?route=product/product&product_id=1052> 
plugged with up to 4 NVMe devices.  So it really looks to me like this 
should be dynamic or at least set to a reasonably high static limit such 
as 16.

 NB I have 12 buses present with various devices in the PCIe hierarchy 
with my Unmatched system, so it's up to the user really how far to extend 
the system and it has to be taken into account while arranging firmware 
configuration IMHO:

00:00.0 PCI bridge: SiFive, Inc. FU740-C000 RISC-V SoC PCI Express x8 to AXI4 Bridge
01:00.0 PCI bridge: ASMedia Technology Inc. ASM2824 PCIe Gen3 Packet Switch (rev 01)
02:00.0 PCI bridge: ASMedia Technology Inc. ASM2824 PCIe Gen3 Packet Switch (rev 01)
02:02.0 PCI bridge: ASMedia Technology Inc. ASM2824 PCIe Gen3 Packet Switch (rev 01)
02:03.0 PCI bridge: ASMedia Technology Inc. ASM2824 PCIe Gen3 Packet Switch (rev 01)
02:04.0 PCI bridge: ASMedia Technology Inc. ASM2824 PCIe Gen3 Packet Switch (rev 01)
02:08.0 PCI bridge: ASMedia Technology Inc. ASM2824 PCIe Gen3 Packet Switch (rev 01)
04:00.0 USB controller: ASMedia Technology Inc. ASM1042A USB 3.0 Host Controller
05:00.0 PCI bridge: Pericom Semiconductor PI7C9X2G304 EL/SL PCIe2 3-Port/4-Lane Packet Switch (rev 05)
06:01.0 PCI bridge: Pericom Semiconductor PI7C9X2G304 EL/SL PCIe2 3-Port/4-Lane Packet Switch (rev 05)
06:02.0 PCI bridge: Pericom Semiconductor PI7C9X2G304 EL/SL PCIe2 3-Port/4-Lane Packet Switch (rev 05)
07:00.0 Parallel controller: Oxford Semiconductor Ltd OXPCIe952 Parallel Port
07:00.3 Serial controller: Oxford Semiconductor Ltd OXPCIe952 Native 950 UART
08:00.0 PCI bridge: ASMedia Technology Inc. ASM1083/1085 PCIe to PCI Bridge (rev 04)
09:01.0 FDDI network controller: Digital Equipment Corporation PCI-to-PDQ Interface Chip [PFI] FDDI (DEFPA) (rev 02)
09:02.0 ATM network controller: Microsemi / PMC / IDT IDT77201/77211 155Mbps ATM SAR Controller [NICStAR] (rev 03)
0a:00.0 Non-Volatile memory controller: Samsung Electronics Co Ltd NVMe SSD Controller SM981/PM981/PM983
0b:00.0 SATA controller: Marvell Technology Group Ltd. 88SE9120 SATA 6Gb/s Controller (rev 20)
0b:00.1 IDE interface: Marvell Technology Group Ltd. 88SE912x IDE Controller (rev 20)

  Maciej

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

end of thread, other threads:[~2023-01-08 14:54 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-01-07 22:32 [PATCH] board: sifive: unmatched: enable booting on a second NVME device Aurelien Jarno
2023-01-07 23:02 ` Heinrich Schuchardt
2023-01-08 14:54   ` Maciej W. Rozycki

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.