linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next v3 0/2] net: mvneta: Armada 98DX2530 SoC
@ 2022-03-15  1:17 Chris Packham
  2022-03-15  1:17 ` [PATCH net-next v3 1/2] dt-bindings: net: mvneta: Add marvell,armada-ac5-neta Chris Packham
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Chris Packham @ 2022-03-15  1:17 UTC (permalink / raw)
  To: davem, kuba, robh+dt, thomas.petazzoni
  Cc: netdev, devicetree, linux-kernel, Chris Packham

This is split off from [1] to let it go in via net-next rather than waiting for
the rest of the series to land.

[1] - https://lore.kernel.org/lkml/20220314213143.2404162-1-chris.packham@alliedtelesis.co.nz/

Chris Packham (2):
  dt-bindings: net: mvneta: Add marvell,armada-ac5-neta
  net: mvneta: Add support for 98DX2530 Ethernet port

 .../bindings/net/marvell-armada-370-neta.txt        |  1 +
 drivers/net/ethernet/marvell/mvneta.c               | 13 +++++++++++++
 2 files changed, 14 insertions(+)

-- 
2.35.1


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

* [PATCH net-next v3 1/2] dt-bindings: net: mvneta: Add marvell,armada-ac5-neta
  2022-03-15  1:17 [PATCH net-next v3 0/2] net: mvneta: Armada 98DX2530 SoC Chris Packham
@ 2022-03-15  1:17 ` Chris Packham
  2022-03-15  1:17 ` [PATCH net-next v3 2/2] net: mvneta: Add support for 98DX2530 Ethernet port Chris Packham
  2022-03-15  5:35 ` [PATCH net-next v3 0/2] net: mvneta: Armada 98DX2530 SoC Jakub Kicinski
  2 siblings, 0 replies; 5+ messages in thread
From: Chris Packham @ 2022-03-15  1:17 UTC (permalink / raw)
  To: davem, kuba, robh+dt, thomas.petazzoni
  Cc: netdev, devicetree, linux-kernel, Chris Packham

The out of band port on the 98DX2530 SoC is similar to the armada-3700
except it requires a slightly different MBUS window configuration. Add a
new compatible string so this difference can be accounted for.

Signed-off-by: Chris Packham <chris.packham@alliedtelesis.co.nz>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
---

Notes:
    Changes in v3:
    - Split from larger series
    - Add review from Andrew
    Changes in v2:
    - New

 .../devicetree/bindings/net/marvell-armada-370-neta.txt          | 1 +
 1 file changed, 1 insertion(+)

diff --git a/Documentation/devicetree/bindings/net/marvell-armada-370-neta.txt b/Documentation/devicetree/bindings/net/marvell-armada-370-neta.txt
index 691f886cfc4a..2bf31572b08d 100644
--- a/Documentation/devicetree/bindings/net/marvell-armada-370-neta.txt
+++ b/Documentation/devicetree/bindings/net/marvell-armada-370-neta.txt
@@ -5,6 +5,7 @@ Required properties:
 	"marvell,armada-370-neta"
 	"marvell,armada-xp-neta"
 	"marvell,armada-3700-neta"
+	"marvell,armada-ac5-neta"
 - reg: address and length of the register set for the device.
 - interrupts: interrupt for the device
 - phy: See ethernet.txt file in the same directory.
-- 
2.35.1


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

* [PATCH net-next v3 2/2] net: mvneta: Add support for 98DX2530 Ethernet port
  2022-03-15  1:17 [PATCH net-next v3 0/2] net: mvneta: Armada 98DX2530 SoC Chris Packham
  2022-03-15  1:17 ` [PATCH net-next v3 1/2] dt-bindings: net: mvneta: Add marvell,armada-ac5-neta Chris Packham
@ 2022-03-15  1:17 ` Chris Packham
  2022-03-15  5:35 ` [PATCH net-next v3 0/2] net: mvneta: Armada 98DX2530 SoC Jakub Kicinski
  2 siblings, 0 replies; 5+ messages in thread
From: Chris Packham @ 2022-03-15  1:17 UTC (permalink / raw)
  To: davem, kuba, robh+dt, thomas.petazzoni
  Cc: netdev, devicetree, linux-kernel, Chris Packham

The 98DX2530 SoC is similar to the Armada 3700 except it needs a
different MBUS window configuration. Add a new compatible string to
identify this device and the required MBUS window configuration.

Signed-off-by: Chris Packham <chris.packham@alliedtelesis.co.nz>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
---

Notes:
    Changes in v3:
    - Split from larger series
    - Add review from Andrew
    Changes in v2:
    - New

 drivers/net/ethernet/marvell/mvneta.c | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/drivers/net/ethernet/marvell/mvneta.c b/drivers/net/ethernet/marvell/mvneta.c
index 83c8908f0cc7..000929794266 100644
--- a/drivers/net/ethernet/marvell/mvneta.c
+++ b/drivers/net/ethernet/marvell/mvneta.c
@@ -76,6 +76,8 @@
 #define MVNETA_WIN_SIZE(w)                      (0x2204 + ((w) << 3))
 #define MVNETA_WIN_REMAP(w)                     (0x2280 + ((w) << 2))
 #define MVNETA_BASE_ADDR_ENABLE                 0x2290
+#define      MVNETA_AC5_CNM_DDR_TARGET		0x2
+#define      MVNETA_AC5_CNM_DDR_ATTR		0xb
 #define MVNETA_ACCESS_PROTECT_ENABLE            0x2294
 #define MVNETA_PORT_CONFIG                      0x2400
 #define      MVNETA_UNI_PROMISC_MODE            BIT(0)
@@ -544,6 +546,7 @@ struct mvneta_port {
 
 	/* Flags for special SoC configurations */
 	bool neta_armada3700;
+	bool neta_ac5;
 	u16 rx_offset_correction;
 	const struct mbus_dram_target_info *dram_target_info;
 };
@@ -5272,6 +5275,10 @@ static void mvneta_conf_mbus_windows(struct mvneta_port *pp,
 			win_protect |= 3 << (2 * i);
 		}
 	} else {
+		if (pp->neta_ac5)
+			mvreg_write(pp, MVNETA_WIN_BASE(0),
+				    (MVNETA_AC5_CNM_DDR_ATTR << 8) |
+				    MVNETA_AC5_CNM_DDR_TARGET);
 		/* For Armada3700 open default 4GB Mbus window, leaving
 		 * arbitration of target/attribute to a different layer
 		 * of configuration.
@@ -5397,6 +5404,11 @@ static int mvneta_probe(struct platform_device *pdev)
 	/* Get special SoC configurations */
 	if (of_device_is_compatible(dn, "marvell,armada-3700-neta"))
 		pp->neta_armada3700 = true;
+	if (of_device_is_compatible(dn, "marvell,armada-ac5-neta")) {
+		pp->neta_armada3700 = true;
+		pp->neta_ac5 = true;
+	}
+
 
 	pp->clk = devm_clk_get(&pdev->dev, "core");
 	if (IS_ERR(pp->clk))
@@ -5720,6 +5732,7 @@ static const struct of_device_id mvneta_match[] = {
 	{ .compatible = "marvell,armada-370-neta" },
 	{ .compatible = "marvell,armada-xp-neta" },
 	{ .compatible = "marvell,armada-3700-neta" },
+	{ .compatible = "marvell,armada-ac5-neta" },
 	{ }
 };
 MODULE_DEVICE_TABLE(of, mvneta_match);
-- 
2.35.1


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

* Re: [PATCH net-next v3 0/2] net: mvneta: Armada 98DX2530 SoC
  2022-03-15  1:17 [PATCH net-next v3 0/2] net: mvneta: Armada 98DX2530 SoC Chris Packham
  2022-03-15  1:17 ` [PATCH net-next v3 1/2] dt-bindings: net: mvneta: Add marvell,armada-ac5-neta Chris Packham
  2022-03-15  1:17 ` [PATCH net-next v3 2/2] net: mvneta: Add support for 98DX2530 Ethernet port Chris Packham
@ 2022-03-15  5:35 ` Jakub Kicinski
  2022-03-15 20:28   ` Chris Packham
  2 siblings, 1 reply; 5+ messages in thread
From: Jakub Kicinski @ 2022-03-15  5:35 UTC (permalink / raw)
  To: Chris Packham
  Cc: davem, robh+dt, thomas.petazzoni, netdev, devicetree, linux-kernel

On Tue, 15 Mar 2022 14:17:40 +1300 Chris Packham wrote:
> This is split off from [1] to let it go in via net-next rather than waiting for
> the rest of the series to land.
> 
> [1] - https://lore.kernel.org/lkml/20220314213143.2404162-1-chris.packham@alliedtelesis.co.nz/

Patchwork says it doesn't apply cleanly to net-next [1].
Could you double check?

[1] https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next.git/

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

* Re: [PATCH net-next v3 0/2] net: mvneta: Armada 98DX2530 SoC
  2022-03-15  5:35 ` [PATCH net-next v3 0/2] net: mvneta: Armada 98DX2530 SoC Jakub Kicinski
@ 2022-03-15 20:28   ` Chris Packham
  0 siblings, 0 replies; 5+ messages in thread
From: Chris Packham @ 2022-03-15 20:28 UTC (permalink / raw)
  To: Jakub Kicinski
  Cc: davem, robh+dt, thomas.petazzoni, netdev, devicetree, linux-kernel


On 15/03/22 18:35, Jakub Kicinski wrote:
> On Tue, 15 Mar 2022 14:17:40 +1300 Chris Packham wrote:
>> This is split off from [1] to let it go in via net-next rather than waiting for
>> the rest of the series to land.
>>
>> [1] - https://scanmail.trustwave.com/?c=20988&d=nKWw4otBS8no711-ly1FNC4uR0v3LkysRvdxYwm1Rg&u=https%3a%2f%2flore%2ekernel%2eorg%2flkml%2f20220314213143%2e2404162-1-chris%2epackham%40alliedtelesis%2eco%2enz%2f
> Patchwork says it doesn't apply cleanly to net-next [1].
> Could you double check?
>
> [1] https://scanmail.trustwave.com/?c=20988&d=nKWw4otBS8no711-ly1FNC4uR0v3LkysRqx8aF21QQ&u=https%3a%2f%2fgit%2ekernel%2eorg%2fpub%2fscm%2flinux%2fkernel%2fgit%2fnetdev%2fnet-next%2egit%2f
Yeah sorry looks like this will clash with 72bb9531162a ("net: mvneta: 
reorder initialisation"). I'll rebase my branch on top of 
net-next/master. The logical change is simple enough but I can see why 
git am would object.

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

end of thread, other threads:[~2022-03-15 20:28 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-15  1:17 [PATCH net-next v3 0/2] net: mvneta: Armada 98DX2530 SoC Chris Packham
2022-03-15  1:17 ` [PATCH net-next v3 1/2] dt-bindings: net: mvneta: Add marvell,armada-ac5-neta Chris Packham
2022-03-15  1:17 ` [PATCH net-next v3 2/2] net: mvneta: Add support for 98DX2530 Ethernet port Chris Packham
2022-03-15  5:35 ` [PATCH net-next v3 0/2] net: mvneta: Armada 98DX2530 SoC Jakub Kicinski
2022-03-15 20:28   ` Chris Packham

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).