* [PATCH] hw/arm: Attach PSPI module to NPCM8XX SoC
@ 2025-04-14 2:06 Tim Lee
2025-04-14 10:43 ` Philippe Mathieu-Daudé
2025-05-06 12:53 ` Peter Maydell
0 siblings, 2 replies; 5+ messages in thread
From: Tim Lee @ 2025-04-14 2:06 UTC (permalink / raw)
To: peter.maydell, wuhaotsh, kfting, chli30; +Cc: qemu-arm, qemu-devel, Tim Lee
Nuvoton's PSPI is a general purpose SPI module which enables
connections to SPI-based peripheral devices. Attach it to the NPCM8XX.
Tested:
NPCM8XX PSPI driver probed successfully from dmesg log.
Signed-off-by: Tim Lee <timlee660101@gmail.com>
---
hw/arm/npcm8xx.c | 11 ++++++++++-
include/hw/arm/npcm8xx.h | 2 ++
2 files changed, 12 insertions(+), 1 deletion(-)
diff --git a/hw/arm/npcm8xx.c b/hw/arm/npcm8xx.c
index f182accc47..a7888afb6e 100644
--- a/hw/arm/npcm8xx.c
+++ b/hw/arm/npcm8xx.c
@@ -67,6 +67,9 @@
/* SDHCI Modules */
#define NPCM8XX_MMC_BA 0xf0842000
+/* PSPI Modules */
+#define NPCM8XX_PSPI_BA 0xf0201000
+
/* Run PLL1 at 1600 MHz */
#define NPCM8XX_PLLCON1_FIXUP_VAL 0x00402101
/* Run the CPU from PLL1 and UART from PLL2 */
@@ -83,6 +86,7 @@ enum NPCM8xxInterrupt {
NPCM8XX_PECI_IRQ = 6,
NPCM8XX_KCS_HIB_IRQ = 9,
NPCM8XX_MMC_IRQ = 26,
+ NPCM8XX_PSPI_IRQ = 28,
NPCM8XX_TIMER0_IRQ = 32, /* Timer Module 0 */
NPCM8XX_TIMER1_IRQ,
NPCM8XX_TIMER2_IRQ,
@@ -441,6 +445,7 @@ static void npcm8xx_init(Object *obj)
}
object_initialize_child(obj, "mmc", &s->mmc, TYPE_NPCM7XX_SDHCI);
+ object_initialize_child(obj, "pspi", &s->pspi, TYPE_NPCM_PSPI);
}
static void npcm8xx_realize(DeviceState *dev, Error **errp)
@@ -705,6 +710,11 @@ static void npcm8xx_realize(DeviceState *dev, Error **errp)
sysbus_connect_irq(SYS_BUS_DEVICE(&s->mmc), 0,
npcm8xx_irq(s, NPCM8XX_MMC_IRQ));
+ /* PSPI */
+ sysbus_realize(SYS_BUS_DEVICE(&s->pspi), &error_abort);
+ sysbus_mmio_map(SYS_BUS_DEVICE(&s->pspi), 0, NPCM8XX_PSPI_BA);
+ sysbus_connect_irq(SYS_BUS_DEVICE(&s->pspi), 0,
+ npcm8xx_irq(s, NPCM8XX_PSPI_IRQ));
create_unimplemented_device("npcm8xx.shm", 0xc0001000, 4 * KiB);
create_unimplemented_device("npcm8xx.gicextra", 0xdfffa000, 24 * KiB);
@@ -720,7 +730,6 @@ static void npcm8xx_realize(DeviceState *dev, Error **errp)
create_unimplemented_device("npcm8xx.siox[1]", 0xf0101000, 4 * KiB);
create_unimplemented_device("npcm8xx.siox[2]", 0xf0102000, 4 * KiB);
create_unimplemented_device("npcm8xx.tmps", 0xf0188000, 4 * KiB);
- create_unimplemented_device("npcm8xx.pspi", 0xf0201000, 4 * KiB);
create_unimplemented_device("npcm8xx.viru1", 0xf0204000, 4 * KiB);
create_unimplemented_device("npcm8xx.viru2", 0xf0205000, 4 * KiB);
create_unimplemented_device("npcm8xx.jtm1", 0xf0208000, 4 * KiB);
diff --git a/include/hw/arm/npcm8xx.h b/include/hw/arm/npcm8xx.h
index 9812e6fa7e..3436abff99 100644
--- a/include/hw/arm/npcm8xx.h
+++ b/include/hw/arm/npcm8xx.h
@@ -36,6 +36,7 @@
#include "hw/usb/hcd-ehci.h"
#include "hw/usb/hcd-ohci.h"
#include "target/arm/cpu.h"
+#include "hw/ssi/npcm_pspi.h"
#define NPCM8XX_MAX_NUM_CPUS (4)
@@ -99,6 +100,7 @@ struct NPCM8xxState {
OHCISysBusState ohci[2];
NPCM7xxFIUState fiu[3];
NPCM7xxSDHCIState mmc;
+ NPCMPSPIState pspi;
};
struct NPCM8xxClass {
--
2.34.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] hw/arm: Attach PSPI module to NPCM8XX SoC
2025-04-14 2:06 [PATCH] hw/arm: Attach PSPI module to NPCM8XX SoC Tim Lee
@ 2025-04-14 10:43 ` Philippe Mathieu-Daudé
2025-04-22 21:09 ` Hao Wu
2025-05-06 12:53 ` Peter Maydell
1 sibling, 1 reply; 5+ messages in thread
From: Philippe Mathieu-Daudé @ 2025-04-14 10:43 UTC (permalink / raw)
To: Tim Lee, peter.maydell, wuhaotsh, kfting, chli30; +Cc: qemu-arm, qemu-devel
On 14/4/25 04:06, Tim Lee wrote:
> Nuvoton's PSPI is a general purpose SPI module which enables
> connections to SPI-based peripheral devices. Attach it to the NPCM8XX.
>
> Tested:
> NPCM8XX PSPI driver probed successfully from dmesg log.
>
> Signed-off-by: Tim Lee <timlee660101@gmail.com>
> ---
> hw/arm/npcm8xx.c | 11 ++++++++++-
> include/hw/arm/npcm8xx.h | 2 ++
> 2 files changed, 12 insertions(+), 1 deletion(-)
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] hw/arm: Attach PSPI module to NPCM8XX SoC
2025-04-14 10:43 ` Philippe Mathieu-Daudé
@ 2025-04-22 21:09 ` Hao Wu
2025-05-05 2:59 ` KFTING
0 siblings, 1 reply; 5+ messages in thread
From: Hao Wu @ 2025-04-22 21:09 UTC (permalink / raw)
To: Philippe Mathieu-Daudé
Cc: Tim Lee, peter.maydell, kfting, chli30, qemu-arm, qemu-devel
[-- Attachment #1: Type: text/plain, Size: 668 bytes --]
On Mon, Apr 14, 2025 at 3:43 AM Philippe Mathieu-Daudé <philmd@linaro.org>
wrote:
> On 14/4/25 04:06, Tim Lee wrote:
> > Nuvoton's PSPI is a general purpose SPI module which enables
> > connections to SPI-based peripheral devices. Attach it to the NPCM8XX.
> >
> > Tested:
> > NPCM8XX PSPI driver probed successfully from dmesg log.
> >
> > Signed-off-by: Tim Lee <timlee660101@gmail.com>
> > ---
> > hw/arm/npcm8xx.c | 11 ++++++++++-
> > include/hw/arm/npcm8xx.h | 2 ++
> > 2 files changed, 12 insertions(+), 1 deletion(-)
>
> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
>
Reviewed-by: Hao Wu < wuhaotsh@google.com>
[-- Attachment #2: Type: text/html, Size: 1251 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* RE: [PATCH] hw/arm: Attach PSPI module to NPCM8XX SoC
2025-04-22 21:09 ` Hao Wu
@ 2025-05-05 2:59 ` KFTING
0 siblings, 0 replies; 5+ messages in thread
From: KFTING @ 2025-05-05 2:59 UTC (permalink / raw)
To: Hao Wu, Philippe Mathieu-Daudé
Cc: Tim Lee, peter.maydell@linaro.org, CHLI30@nuvoton.com,
qemu-arm@nongnu.org, qemu-devel@nongnu.org
From: Hao Wu <wuhaotsh@google.com>
Sent: Wednesday, April 23, 2025 5:09 AM
To: Philippe Mathieu-Daudé <philmd@linaro.org>
Cc: Tim Lee <timlee660101@gmail.com>; peter.maydell@linaro.org; CS20 KFTing <KFTING@nuvoton.com>; CS20 CHLi30 <CHLI30@nuvoton.com>; qemu-arm@nongnu.org; qemu-devel@nongnu.org
Subject: Re: [PATCH] hw/arm: Attach PSPI module to NPCM8XX SoC
On Mon, Apr 14, 2025 at 3:43 AM Philippe Mathieu-Daudé <mailto:philmd@linaro.org> wrote:
On 14/4/25 04:06, Tim Lee wrote:
> Nuvoton's PSPI is a general purpose SPI module which enables
> connections to SPI-based peripheral devices. Attach it to the NPCM8XX.
>
> Tested:
> NPCM8XX PSPI driver probed successfully from dmesg log.
>
> Signed-off-by: Tim Lee <mailto:timlee660101@gmail.com>
> ---
> hw/arm/npcm8xx.c | 11 ++++++++++-
> include/hw/arm/npcm8xx.h | 2 ++
> 2 files changed, 12 insertions(+), 1 deletion(-)
Reviewed-by: Philippe Mathieu-Daudé <mailto:philmd@linaro.org>
Reviewed-by: Hao Wu < mailto:wuhaotsh@google.com>
Reviewed-by: Tyrone Ting <kfting@nuvoton.com>
________________________________
________________________________
The privileged confidential information contained in this email is intended for use only by the addressees as indicated by the original sender of this email. If you are not the addressee indicated in this email or are not responsible for delivery of the email to such a person, please kindly reply to the sender indicating this fact and delete all copies of it from your computer and network server immediately. Your cooperation is highly appreciated. It is advised that any unauthorized use of confidential information of Nuvoton is strictly prohibited; and any information in this email irrelevant to the official business of Nuvoton shall be deemed as neither given nor endorsed by Nuvoton.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] hw/arm: Attach PSPI module to NPCM8XX SoC
2025-04-14 2:06 [PATCH] hw/arm: Attach PSPI module to NPCM8XX SoC Tim Lee
2025-04-14 10:43 ` Philippe Mathieu-Daudé
@ 2025-05-06 12:53 ` Peter Maydell
1 sibling, 0 replies; 5+ messages in thread
From: Peter Maydell @ 2025-05-06 12:53 UTC (permalink / raw)
To: Tim Lee; +Cc: wuhaotsh, kfting, chli30, qemu-arm, qemu-devel
On Mon, 14 Apr 2025 at 03:07, Tim Lee <timlee660101@gmail.com> wrote:
>
> Nuvoton's PSPI is a general purpose SPI module which enables
> connections to SPI-based peripheral devices. Attach it to the NPCM8XX.
>
> Tested:
> NPCM8XX PSPI driver probed successfully from dmesg log.
>
> Signed-off-by: Tim Lee <timlee660101@gmail.com>
Applied to target-arm.next; thanks to everybody who reviewed this.
-- PMM
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2025-05-06 12:54 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-04-14 2:06 [PATCH] hw/arm: Attach PSPI module to NPCM8XX SoC Tim Lee
2025-04-14 10:43 ` Philippe Mathieu-Daudé
2025-04-22 21:09 ` Hao Wu
2025-05-05 2:59 ` KFTING
2025-05-06 12:53 ` Peter Maydell
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).