* [PATCH 2/6] dt-bindings: ata: sata-brcm: Describe the NSP IDM registers
2026-10-21 16:55 [PATCH 0/6] Fix SATA support for NSP SoCs Florian Fainelli
@ 2026-10-21 16:55 ` Florian Fainelli
2026-10-21 16:55 ` [PATCH 3/6] ata: ahci_brcm: Initialize the NSP interface clock and reset Florian Fainelli
` (5 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: Florian Fainelli @ 2026-10-21 16:55 UTC (permalink / raw)
To: linux-arm-kernel
Cc: Florian Fainelli, Damien Le Moal, Niklas Cassel, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Ray Jui, Scott Branden,
Broadcom internal kernel review list, Vinod Koul, Neil Armstrong,
Manivannan Sadhasivam, Kishon Vijay Abraham I, Tejun Heo,
Yendapally Reddy Dhananjaya Reddy,
open list:LIBATA SUBSYSTEM (Serial and Parallel ATA drivers),
open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
open list, open list:GENERIC PHY FRAMEWORK
Northstar Plus uses the SATA IDM block to enable the interface clock and
deassert the core reset before accessing the controller registers.
Allow an optional third register region named "idm" for the NSP
controller. Keep other compatibles limited to their existing two
register regions and allow older NSP descriptions without the IDM.
Signed-off-by: Florian Fainelli <florian.fainelli@broadcom.com>
---
.../bindings/ata/brcm,sata-brcm.yaml | 20 ++++++++++++++++++-
1 file changed, 19 insertions(+), 1 deletion(-)
diff --git a/Documentation/devicetree/bindings/ata/brcm,sata-brcm.yaml b/Documentation/devicetree/bindings/ata/brcm,sata-brcm.yaml
index fe7f091e744f..98529784b1fa 100644
--- a/Documentation/devicetree/bindings/ata/brcm,sata-brcm.yaml
+++ b/Documentation/devicetree/bindings/ata/brcm,sata-brcm.yaml
@@ -15,6 +15,21 @@ maintainers:
allOf:
- $ref: ahci-common.yaml#
+ - if:
+ properties:
+ compatible:
+ contains:
+ const: brcm,bcm-nsp-ahci
+ then:
+ properties:
+ reg:
+ description: AHCI, top control and optional IDM register regions
+ else:
+ properties:
+ reg:
+ maxItems: 2
+ reg-names:
+ maxItems: 2
properties:
compatible:
@@ -30,12 +45,15 @@ properties:
- const: brcm,bcm-nsp-ahci
reg:
- maxItems: 2
+ minItems: 2
+ maxItems: 3
reg-names:
+ minItems: 2
items:
- const: ahci
- const: top-ctrl
+ - const: idm
interrupts:
maxItems: 1
--
2.53.0
^ permalink raw reply [flat|nested] 8+ messages in thread* [PATCH 3/6] ata: ahci_brcm: Initialize the NSP interface clock and reset
2026-10-21 16:55 [PATCH 0/6] Fix SATA support for NSP SoCs Florian Fainelli
2026-10-21 16:55 ` [PATCH 2/6] dt-bindings: ata: sata-brcm: Describe the NSP IDM registers Florian Fainelli
@ 2026-10-21 16:55 ` Florian Fainelli
2026-10-21 16:55 ` [PATCH 4/6] ARM: dts: broadcom: Add the NSP SATA IDM registers Florian Fainelli
` (4 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: Florian Fainelli @ 2026-10-21 16:55 UTC (permalink / raw)
To: linux-arm-kernel
Cc: Florian Fainelli, Damien Le Moal, Niklas Cassel, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Ray Jui, Scott Branden,
Broadcom internal kernel review list, Vinod Koul, Neil Armstrong,
Manivannan Sadhasivam, Kishon Vijay Abraham I, Tejun Heo,
Yendapally Reddy Dhananjaya Reddy,
open list:LIBATA SUBSYSTEM (Serial and Parallel ATA drivers),
open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
open list, open list:GENERIC PHY FRAMEWORK
The NSP probe path assumes firmware has enabled the SATA IDM interface
clock and released the core reset. The downstream iProc config_AHCI()
sequence explicitly performs both operations before accessing AHCI.
Without that setup, a cold boot can access an inactive controller.
Map the optional NSP IDM register region and enable the interface clock
before releasing reset, retaining the downstream settling intervals.
Perform the sequence at probe and resume before reconfiguring SATA.
Keep the resource optional so older device trees continue to rely on
firmware initialization.
Fixes: 3ee2e6dcaa35 ("ata: ahci_brcm: Add support for Broadcom NSP SoC")
Signed-off-by: Florian Fainelli <florian.fainelli@broadcom.com>
---
drivers/ata/ahci_brcm.c | 34 ++++++++++++++++++++++++++++++++++
1 file changed, 34 insertions(+)
diff --git a/drivers/ata/ahci_brcm.c b/drivers/ata/ahci_brcm.c
index 29be74fedcf0..2ed60806b671 100644
--- a/drivers/ata/ahci_brcm.c
+++ b/drivers/ata/ahci_brcm.c
@@ -6,7 +6,9 @@
*/
#include <linux/ahci_platform.h>
+#include <linux/bcma/bcma_regs.h>
#include <linux/compiler.h>
+#include <linux/delay.h>
#include <linux/device.h>
#include <linux/init.h>
#include <linux/interrupt.h>
@@ -83,6 +85,7 @@ enum brcm_ahci_quirks {
struct brcm_ahci_priv {
struct device *dev;
void __iomem *top_ctrl;
+ void __iomem *idm;
u32 port_mask;
u32 quirks;
enum brcm_ahci_version version;
@@ -230,6 +233,25 @@ static u32 brcm_ahci_get_portmask(struct ahci_host_priv *hpriv,
return impl;
}
+static void brcm_sata_init_idm(struct brcm_ahci_priv *priv)
+{
+ u32 data;
+
+ if (!priv->idm)
+ return;
+
+ /* Enable the interface clock before taking the SATA core out of reset. */
+ data = readl(priv->idm + BCMA_IOCTL);
+ writel(data | BCMA_IOCTL_CLK, priv->idm + BCMA_IOCTL);
+ readl(priv->idm + BCMA_IOCTL);
+ usleep_range(1000, 2000);
+
+ data = readl(priv->idm + BCMA_RESET_CTL);
+ writel(data & ~BCMA_RESET_CTL_RESET, priv->idm + BCMA_RESET_CTL);
+ readl(priv->idm + BCMA_RESET_CTL);
+ usleep_range(1000, 2000);
+}
+
static void brcm_sata_init(struct brcm_ahci_priv *priv)
{
void __iomem *ctrl = priv->top_ctrl + SATA_TOP_CTRL_BUS_CTRL;
@@ -369,6 +391,8 @@ static int __maybe_unused brcm_ahci_resume(struct device *dev)
struct brcm_ahci_priv *priv = hpriv->plat_data;
int ret = 0;
+ brcm_sata_init_idm(priv);
+
ret = reset_control_deassert(priv->rcdev_ahci);
if (ret)
return ret;
@@ -453,6 +477,14 @@ static int brcm_ahci_probe(struct platform_device *pdev)
priv->version = (unsigned long)of_id->data;
priv->dev = dev;
+ /* Older NSP device trees rely on firmware to initialize the IDM. */
+ if (priv->version == BRCM_SATA_NSP &&
+ platform_get_resource_byname(pdev, IORESOURCE_MEM, "idm")) {
+ priv->idm = devm_platform_ioremap_resource_byname(pdev, "idm");
+ if (IS_ERR(priv->idm))
+ return PTR_ERR(priv->idm);
+ }
+
priv->top_ctrl = devm_platform_ioremap_resource_byname(pdev, "top-ctrl");
if (IS_ERR(priv->top_ctrl))
return PTR_ERR(priv->top_ctrl);
@@ -493,6 +525,8 @@ static int brcm_ahci_probe(struct platform_device *pdev)
if (ret)
return ret;
+ brcm_sata_init_idm(priv);
+
ret = ahci_platform_enable_clks(hpriv);
if (ret)
goto out_reset;
--
2.53.0
^ permalink raw reply [flat|nested] 8+ messages in thread* [PATCH 4/6] ARM: dts: broadcom: Add the NSP SATA IDM registers
2026-10-21 16:55 [PATCH 0/6] Fix SATA support for NSP SoCs Florian Fainelli
2026-10-21 16:55 ` [PATCH 2/6] dt-bindings: ata: sata-brcm: Describe the NSP IDM registers Florian Fainelli
2026-10-21 16:55 ` [PATCH 3/6] ata: ahci_brcm: Initialize the NSP interface clock and reset Florian Fainelli
@ 2026-10-21 16:55 ` Florian Fainelli
2026-10-21 16:55 ` [PATCH 5/6] ARM: dts: broadcom: Enable SATA on BCM958625HR Florian Fainelli
` (3 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: Florian Fainelli @ 2026-10-21 16:55 UTC (permalink / raw)
To: linux-arm-kernel
Cc: Florian Fainelli, Damien Le Moal, Niklas Cassel, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Ray Jui, Scott Branden,
Broadcom internal kernel review list, Vinod Koul, Neil Armstrong,
Manivannan Sadhasivam, Kishon Vijay Abraham I, Tejun Heo,
Yendapally Reddy Dhananjaya Reddy,
open list:LIBATA SUBSYSTEM (Serial and Parallel ATA drivers),
open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
open list, open list:GENERIC PHY FRAMEWORK
The NSP SATA description omits the IDM block at 0x1811e000, leaving the
interface clock and core reset dependent on firmware initialization.
Supply the IDM as the third controller register region so ahci_brcm can
perform the downstream clock/reset sequence. Extend the AXI bus range to
cover the complete IDM aperture.
Fixes: 8dbcad020f2e ("ARM: dts: nsp: Add sata device tree entry")
Signed-off-by: Florian Fainelli <florian.fainelli@broadcom.com>
---
arch/arm/boot/dts/broadcom/bcm-nsp.dtsi | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/arch/arm/boot/dts/broadcom/bcm-nsp.dtsi b/arch/arm/boot/dts/broadcom/bcm-nsp.dtsi
index 6a4482c93167..9dbcd810e27b 100644
--- a/arch/arm/boot/dts/broadcom/bcm-nsp.dtsi
+++ b/arch/arm/boot/dts/broadcom/bcm-nsp.dtsi
@@ -168,7 +168,7 @@ periph_clk: periph_clk {
axi: axi@18000000 {
compatible = "simple-bus";
- ranges = <0x00000000 0x18000000 0x0011c40c>;
+ ranges = <0x00000000 0x18000000 0x0011f000>;
#address-cells = <1>;
#size-cells = <1>;
@@ -538,8 +538,9 @@ sata_phy1: sata-phy@1 {
sata: sata@41000 {
compatible = "brcm,bcm-nsp-ahci";
- reg-names = "ahci", "top-ctrl";
- reg = <0x41000 0x1000>, <0x40020 0x1c>;
+ reg-names = "ahci", "top-ctrl", "idm";
+ reg = <0x41000 0x1000>, <0x40020 0x1c>,
+ <0x11e000 0x1000>;
interrupts = <GIC_SPI 159 IRQ_TYPE_LEVEL_HIGH>;
#address-cells = <1>;
#size-cells = <0>;
--
2.53.0
^ permalink raw reply [flat|nested] 8+ messages in thread* [PATCH 5/6] ARM: dts: broadcom: Enable SATA on BCM958625HR
2026-10-21 16:55 [PATCH 0/6] Fix SATA support for NSP SoCs Florian Fainelli
` (2 preceding siblings ...)
2026-10-21 16:55 ` [PATCH 4/6] ARM: dts: broadcom: Add the NSP SATA IDM registers Florian Fainelli
@ 2026-10-21 16:55 ` Florian Fainelli
2026-10-21 16:55 ` [PATCH 5/6] ARM: dts: broadcom: Use noncoherent SATA DMA " Florian Fainelli
` (2 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: Florian Fainelli @ 2026-10-21 16:55 UTC (permalink / raw)
To: linux-arm-kernel
Cc: Florian Fainelli, Damien Le Moal, Niklas Cassel, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Ray Jui, Scott Branden,
Broadcom internal kernel review list, Vinod Koul, Neil Armstrong,
Manivannan Sadhasivam, Kishon Vijay Abraham I, Tejun Heo,
Yendapally Reddy Dhananjaya Reddy,
open list:LIBATA SUBSYSTEM (Serial and Parallel ATA drivers),
open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
open list, open list:GENERIC PHY FRAMEWORK
Commit 77416ab35f57 ("ARM: dts: NSP: Disable AHCI controller for HR NSP
boards") disabled AHCI after reports of boot hangs. Both SATA PHYs
remain enabled, but the disabled controller leaves the eSATA ports
unavailable.
With explicit IDM clock/reset setup and the corrected shared PHY
register aperture in place, enable the controller on BCM958625HR.
This enablement has been build and schema checked. Cold-boot and eSATA
I/O validation on HR hardware are still required to establish whether
the original hang is resolved.
Signed-off-by: Florian Fainelli <florian.fainelli@broadcom.com>
---
arch/arm/boot/dts/broadcom/bcm958625hr.dts | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/arch/arm/boot/dts/broadcom/bcm958625hr.dts b/arch/arm/boot/dts/broadcom/bcm958625hr.dts
index a9b6aa04d573..3e86f3c2593a 100644
--- a/arch/arm/boot/dts/broadcom/bcm958625hr.dts
+++ b/arch/arm/boot/dts/broadcom/bcm958625hr.dts
@@ -182,6 +182,10 @@ partition@700000 {
};
};
+&sata {
+ status = "okay";
+};
+
&sata_phy0 {
status = "okay";
};
--
2.53.0
^ permalink raw reply [flat|nested] 8+ messages in thread* [PATCH 5/6] ARM: dts: broadcom: Use noncoherent SATA DMA on BCM958625HR
2026-10-21 16:55 [PATCH 0/6] Fix SATA support for NSP SoCs Florian Fainelli
` (3 preceding siblings ...)
2026-10-21 16:55 ` [PATCH 5/6] ARM: dts: broadcom: Enable SATA on BCM958625HR Florian Fainelli
@ 2026-10-21 16:55 ` Florian Fainelli
2026-10-21 16:55 ` [PATCH 6/6] " Florian Fainelli
2026-10-21 17:02 ` [PATCH 0/6] Fix SATA support for NSP SoCs Florian Fainelli
6 siblings, 0 replies; 8+ messages in thread
From: Florian Fainelli @ 2026-10-21 16:55 UTC (permalink / raw)
To: linux-arm-kernel
Cc: Florian Fainelli, Damien Le Moal, Niklas Cassel, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Ray Jui, Scott Branden,
Broadcom internal kernel review list, Vinod Koul, Neil Armstrong,
Manivannan Sadhasivam, Kishon Vijay Abraham I, Tejun Heo,
Yendapally Reddy Dhananjaya Reddy,
open list:LIBATA SUBSYSTEM (Serial and Parallel ATA drivers),
open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
open list, open list:GENERIC PHY FRAMEWORK
The AHCI controller on BCM958625HR fails with the dma-coherent property
inherited from bcm-nsp.dtsi. Soft reset times out waiting for the first
FIS command, subsequent engine resets fail, and the disk is not detected.
AHCI allocates its command tables and received-FIS buffers with the DMA
API. Declaring the controller coherent bypasses the cache handling that
these buffers require on this board. Removing the property restores
hard disk detection and operation, as confirmed with a diagnostic DTB
that changed only this property.
Use noncoherent DMA for SATA on BCM958625HR, matching the downstream SDK.
Fixes: 56e2ff0346a3 ("ARM: dts: NSP: Add dma-coherent to relevant DT entries")
Signed-off-by: Florian Fainelli <florian.fainelli@broadcom.com>
---
arch/arm/boot/dts/broadcom/bcm958625hr.dts | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/arch/arm/boot/dts/broadcom/bcm958625hr.dts b/arch/arm/boot/dts/broadcom/bcm958625hr.dts
index a9b6aa04d573..53acae385822 100644
--- a/arch/arm/boot/dts/broadcom/bcm958625hr.dts
+++ b/arch/arm/boot/dts/broadcom/bcm958625hr.dts
@@ -182,6 +182,10 @@ partition@700000 {
};
};
+&sata {
+ /delete-property/ dma-coherent;
+};
+
&sata_phy0 {
status = "okay";
};
--
2.53.0
^ permalink raw reply [flat|nested] 8+ messages in thread* [PATCH 6/6] ARM: dts: broadcom: Use noncoherent SATA DMA on BCM958625HR
2026-10-21 16:55 [PATCH 0/6] Fix SATA support for NSP SoCs Florian Fainelli
` (4 preceding siblings ...)
2026-10-21 16:55 ` [PATCH 5/6] ARM: dts: broadcom: Use noncoherent SATA DMA " Florian Fainelli
@ 2026-10-21 16:55 ` Florian Fainelli
2026-10-21 17:02 ` [PATCH 0/6] Fix SATA support for NSP SoCs Florian Fainelli
6 siblings, 0 replies; 8+ messages in thread
From: Florian Fainelli @ 2026-10-21 16:55 UTC (permalink / raw)
To: linux-arm-kernel
Cc: Florian Fainelli, Damien Le Moal, Niklas Cassel, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Ray Jui, Scott Branden,
Broadcom internal kernel review list, Vinod Koul, Neil Armstrong,
Manivannan Sadhasivam, Kishon Vijay Abraham I, Tejun Heo,
Yendapally Reddy Dhananjaya Reddy,
open list:LIBATA SUBSYSTEM (Serial and Parallel ATA drivers),
open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
open list, open list:GENERIC PHY FRAMEWORK
The AHCI controller on BCM958625HR fails with the dma-coherent property
inherited from bcm-nsp.dtsi. Soft reset times out waiting for the first
FIS command, subsequent engine resets fail, and the disk is not detected.
AHCI allocates its command tables and received-FIS buffers with the DMA
API. Declaring the controller coherent bypasses the cache handling that
these buffers require on this board. Removing the property restores
hard disk detection and operation, as confirmed with a diagnostic DTB
that changed only this property.
Use noncoherent DMA for SATA on BCM958625HR, matching the downstream SDK.
Fixes: 56e2ff0346a3 ("ARM: dts: NSP: Add dma-coherent to relevant DT entries")
Signed-off-by: Florian Fainelli <florian.fainelli@broadcom.com>
---
arch/arm/boot/dts/broadcom/bcm958625hr.dts | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/arm/boot/dts/broadcom/bcm958625hr.dts b/arch/arm/boot/dts/broadcom/bcm958625hr.dts
index 3e86f3c2593a..f6717ca76aef 100644
--- a/arch/arm/boot/dts/broadcom/bcm958625hr.dts
+++ b/arch/arm/boot/dts/broadcom/bcm958625hr.dts
@@ -183,6 +183,7 @@ partition@700000 {
};
&sata {
+ /delete-property/ dma-coherent;
status = "okay";
};
--
2.53.0
^ permalink raw reply [flat|nested] 8+ messages in thread* Re: [PATCH 0/6] Fix SATA support for NSP SoCs
2026-10-21 16:55 [PATCH 0/6] Fix SATA support for NSP SoCs Florian Fainelli
` (5 preceding siblings ...)
2026-10-21 16:55 ` [PATCH 6/6] " Florian Fainelli
@ 2026-10-21 17:02 ` Florian Fainelli
6 siblings, 0 replies; 8+ messages in thread
From: Florian Fainelli @ 2026-10-21 17:02 UTC (permalink / raw)
To: linux-arm-kernel
Cc: Damien Le Moal, Niklas Cassel, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Ray Jui, Scott Branden,
Broadcom internal kernel review list, Vinod Koul, Neil Armstrong,
Manivannan Sadhasivam, Kishon Vijay Abraham I, Tejun Heo,
Yendapally Reddy Dhananjaya Reddy,
open list:LIBATA SUBSYSTEM (Serial and Parallel ATA drivers),
open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
open list, open list:GENERIC PHY FRAMEWORK
On 10/21/26 09:55, Florian Fainelli wrote:
> This patch series fixes SATA on the Northstar Plus (BCM58xxx/8831x)
> which was broken due to a number of things:
>
> - the SATA PHY assumed separate PCB windows when a shared one is used
> for this generation of SoCs
> - the clock/reset (IDM) was not being configured by the driver which
> meant that depending upon what the boot loader did, or did not, we
> could have had the AHCI controller still in reset by then
> - on some reference boards, the AHCI controller is not DMA coherent,
> assuming so leads to all sorts of timeouts, data corruption, etc.
>
> Since this touches several subsystems: DT, PHY, AHCI and DTS, I would be
> keen on having Damien merge all of those via his tree if acceptable by
> the DT and PHY maintainers, I am OK either way for Broadcom SoC.
Argh, looks like I submitted patches 5 and 6 twice after I had
re-ordered them, the correct order is in the cover letter:
ARM: dts: broadcom: Use noncoherent SATA DMA on BCM958625HR
ARM: dts: broadcom: Enable SATA on BCM958625HR
Will wait for feedback and resubmit if necessary. Thanks!
--
Florian
^ permalink raw reply [flat|nested] 8+ messages in thread