* [PATCH 0/2] mfd: rsmu_spi: fixes and new IC support
@ 2026-04-21 9:07 Matthew Bystrin
2026-04-21 9:07 ` [PATCH 1/2] mfd: rsmu_spi: fix page register setup Matthew Bystrin
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Matthew Bystrin @ 2026-04-21 9:07 UTC (permalink / raw)
To: Lee Jones, Richard Cochran, Min Li; +Cc: linux-kernel, netdev
Greetings!
First patch fixes Renesas 8A34002 SPI driver.
In my setup 8A34002 is connected to VisionFive2 via SPI. I've discovered that
upstream driver does not work:
[ 4.728771] 8a3400x-phc 8a3400x-phc.0.auto: 4.8.7, Id: 0x4002 HW Rev: 5 OTP Config Select: 0
[ 4.737389] 8a3400x-phc 8a3400x-phc.0.auto: requesting firmware 'idtcm.bin'
[ 4.744462] 8a3400x-phc 8a3400x-phc.0.auto: Direct firmware load for idtcm.bin failed with error -2
[ 4.753547] 8a3400x-phc 8a3400x-phc.0.auto: Failed at line 1273 in idtcm_load_firmware!
[ 4.761576] 8a3400x-phc 8a3400x-phc.0.auto: loading firmware failed with -2
[ 4.769411] 8a3400x-phc 8a3400x-phc.0.auto: No wait state: DPLL_SYS_STATE 0
[ 4.776374] 8a3400x-phc 8a3400x-phc.0.auto: Continuing while SYS APLL/DPLL is not locked
[ 4.785206] 8a3400x-phc 8a3400x-phc.0.auto: Unsupported MANUAL_REFERENCE: 0x00
[ 4.796930] 8a3400x-phc 8a3400x-phc.0.auto: PLL2 registered as ptp0
This being caused by a piece of code in rsmu_write_page_register() function:
if (reg < RSMU_CM_SCSR_BASE)
return 0;
All addresses in include/linux/mfd/idt8a340_reg.h are less than
RSMU_CM_SCSR_BASE so function was returning early, before any modifications to
the page register. Valid read of versions - is just a coincidence, because
default value of the page register is zero.
There were 2 separate patch series which have to be merged in one time: mfd and
ptp. The latter have been merged, the former[1] have not. As result we've got a
broken driver.
This patch can be reverted later when the second part will be ready (of course
if it is planned to do so). Any comments, Min? I could support with testing.
Also I've had a quick look into I2C part. It may also require the same kind of
fixes to work properly. But I didn't tested it. I could do some experiments and
return with patches later.
Second patch just adds support for 8A34002, which is compatible with 8A34001. As
I can see there is no need to update bindings, everything is already being done.
Link: https://lore.kernel.org/netdev/LV3P220MB1202F8E2FCCFBA2519B4966EA0192@LV3P220MB1202.NAMP220.PROD.OUTLOOK.COM/
Signed-off-by: Matthew Bystrin <dev.mbstr@gmail.com>
Matthew Bystrin (2):
mfd: rsmu_spi: fix page register setup
mfd: rsmu_spi: add 8a34002 support
drivers/mfd/rsmu_spi.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
--
2.53.0
^ permalink raw reply [flat|nested] 4+ messages in thread* [PATCH 1/2] mfd: rsmu_spi: fix page register setup 2026-04-21 9:07 [PATCH 0/2] mfd: rsmu_spi: fixes and new IC support Matthew Bystrin @ 2026-04-21 9:07 ` Matthew Bystrin 2026-04-21 9:07 ` [PATCH 2/2] mfd: rsmu_spi: add 8a34002 support Matthew Bystrin 2026-04-27 19:50 ` [PATCH 0/2] mfd: rsmu_spi: fixes and new IC support Matthew Bystrin 2 siblings, 0 replies; 4+ messages in thread From: Matthew Bystrin @ 2026-04-21 9:07 UTC (permalink / raw) To: Lee Jones, Richard Cochran, Min Li; +Cc: linux-kernel, netdev Fix writes to page register in 8A3400x family (Clock Matrix). All calls to rsmu_write_page_register() have resulted in early return, becase all addresses in include/linux/mfd/idt8a340_reg.h are less than RSMU_CM_SCSR_BASE. There were 2 separate patch series which have to be merged in one time: mfd and ptp. The latter have been merged, the former[1] have not. Link: https://lore.kernel.org/netdev/LV3P220MB1202F8E2FCCFBA2519B4966EA0192@LV3P220MB1202.NAMP220.PROD.OUTLOOK.COM/ Fixes: 67d6c76fc815 ("mfd: rsmu: Support 32-bit address space") Signed-off-by: Matthew Bystrin <dev.mbstr@gmail.com> --- drivers/mfd/rsmu_spi.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/mfd/rsmu_spi.c b/drivers/mfd/rsmu_spi.c index 39d9be1e141f..55c5698e7e77 100644 --- a/drivers/mfd/rsmu_spi.c +++ b/drivers/mfd/rsmu_spi.c @@ -101,11 +101,9 @@ static int rsmu_write_page_register(struct rsmu_ddata *rsmu, u32 reg) switch (rsmu->type) { case RSMU_CM: - /* Do not modify page register for none-scsr registers */ - if (reg < RSMU_CM_SCSR_BASE) - return 0; page_reg = RSMU_CM_PAGE_ADDR; page = reg & RSMU_PAGE_MASK; + page |= RSMU_CM_SCSR_BASE; buf[0] = (u8)(page & 0xFF); buf[1] = (u8)((page >> 8) & 0xFF); buf[2] = (u8)((page >> 16) & 0xFF); -- 2.53.0 ^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH 2/2] mfd: rsmu_spi: add 8a34002 support 2026-04-21 9:07 [PATCH 0/2] mfd: rsmu_spi: fixes and new IC support Matthew Bystrin 2026-04-21 9:07 ` [PATCH 1/2] mfd: rsmu_spi: fix page register setup Matthew Bystrin @ 2026-04-21 9:07 ` Matthew Bystrin 2026-04-27 19:50 ` [PATCH 0/2] mfd: rsmu_spi: fixes and new IC support Matthew Bystrin 2 siblings, 0 replies; 4+ messages in thread From: Matthew Bystrin @ 2026-04-21 9:07 UTC (permalink / raw) To: Lee Jones, Richard Cochran, Min Li; +Cc: linux-kernel, netdev Add separate compatible string and spi_devcie_id to support 8a34002. Signed-off-by: Matthew Bystrin <dev.mbstr@gmail.com> --- drivers/mfd/rsmu_spi.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/mfd/rsmu_spi.c b/drivers/mfd/rsmu_spi.c index 55c5698e7e77..2d4ad9606aec 100644 --- a/drivers/mfd/rsmu_spi.c +++ b/drivers/mfd/rsmu_spi.c @@ -242,6 +242,7 @@ static void rsmu_spi_remove(struct spi_device *client) static const struct spi_device_id rsmu_spi_id[] = { { "8a34000", RSMU_CM }, { "8a34001", RSMU_CM }, + { "8a34002", RSMU_CM }, { "82p33810", RSMU_SABRE }, { "82p33811", RSMU_SABRE }, {} @@ -251,6 +252,7 @@ MODULE_DEVICE_TABLE(spi, rsmu_spi_id); static const struct of_device_id rsmu_spi_of_match[] = { { .compatible = "idt,8a34000", .data = (void *)RSMU_CM }, { .compatible = "idt,8a34001", .data = (void *)RSMU_CM }, + { .compatible = "idt,8a34002", .data = (void *)RSMU_CM }, { .compatible = "idt,82p33810", .data = (void *)RSMU_SABRE }, { .compatible = "idt,82p33811", .data = (void *)RSMU_SABRE }, {} -- 2.53.0 ^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH 0/2] mfd: rsmu_spi: fixes and new IC support 2026-04-21 9:07 [PATCH 0/2] mfd: rsmu_spi: fixes and new IC support Matthew Bystrin 2026-04-21 9:07 ` [PATCH 1/2] mfd: rsmu_spi: fix page register setup Matthew Bystrin 2026-04-21 9:07 ` [PATCH 2/2] mfd: rsmu_spi: add 8a34002 support Matthew Bystrin @ 2026-04-27 19:50 ` Matthew Bystrin 2 siblings, 0 replies; 4+ messages in thread From: Matthew Bystrin @ 2026-04-27 19:50 UTC (permalink / raw) To: Matthew Bystrin, Lee Jones, Richard Cochran, Min Li; +Cc: linux-kernel, netdev Hi! On the weekends I founded out that rsmu_i2c have the same issue. I'll send v2 series with i2c fixes inlcuded. -- Best regards Matthew ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2026-04-27 19:43 UTC | newest] Thread overview: 4+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2026-04-21 9:07 [PATCH 0/2] mfd: rsmu_spi: fixes and new IC support Matthew Bystrin 2026-04-21 9:07 ` [PATCH 1/2] mfd: rsmu_spi: fix page register setup Matthew Bystrin 2026-04-21 9:07 ` [PATCH 2/2] mfd: rsmu_spi: add 8a34002 support Matthew Bystrin 2026-04-27 19:50 ` [PATCH 0/2] mfd: rsmu_spi: fixes and new IC support Matthew Bystrin
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.