Linux MIPS Architecture development
 help / color / mirror / Atom feed
* [PATCH v2] MIPS: OCTEON: keep the second MIX, TWSI and SMI on CN66XX
@ 2026-12-02 13:15 Orgad Shaneh
  0 siblings, 0 replies; only message in thread
From: Orgad Shaneh @ 2026-12-02 13:15 UTC (permalink / raw)
  To: tsbogend; +Cc: linux-mips, linux-kernel, Orgad Shaneh

octeon_prune_device_tree() keeps two management ports (MIX), I2C buses
(TWSI) and MDIO buses (SMI) on CN63XX, but not on CN66XX, which has two
of each as well. There the prune deletes mix0, mix1, twsi1 and smi1: no
management port is probed, and /dev/i2c-1 and the second MDIO bus are
gone.

Add CN66XX to the three lists.

Signed-off-by: Orgad Shaneh <orgads@gmail.com>
---
v2:
- No code change. The commit message is shorter and no longer cites
  the vendor SDK kernel, whose lists are the same as mainline's.
- Sent on its own; v1 was 2/2 of a series with an unrelated PKO fix:
  https://lore.kernel.org/r/20261201042313.3010724-3-orgads@gmail.com

Tested on a CN6635 (CN66XX) board with a 7.3.7 kernel: both TWSI and
both SMI buses probe, /dev/i2c-1 is back, and mgmt0 and mgmt1 exist.
A CN6335 (CN63XX) board is unchanged.

Applies to torvalds/master and mips-next, where this file is the same.
An LLM helped write this patch.

 arch/mips/cavium-octeon/octeon-platform.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/arch/mips/cavium-octeon/octeon-platform.c b/arch/mips/cavium-octeon/octeon-platform.c
index f53c983..37313dd 100644
--- a/arch/mips/cavium-octeon/octeon-platform.c
+++ b/arch/mips/cavium-octeon/octeon-platform.c
@@ -785,7 +785,8 @@ int __init octeon_prune_device_tree(void)
 		return -EINVAL;
 	}
 
-	if (OCTEON_IS_MODEL(OCTEON_CN52XX) || OCTEON_IS_MODEL(OCTEON_CN63XX))
+	if (OCTEON_IS_MODEL(OCTEON_CN52XX) || OCTEON_IS_MODEL(OCTEON_CN63XX) ||
+	    OCTEON_IS_MODEL(OCTEON_CN66XX))
 		max_port = 2;
 	else if (OCTEON_IS_MODEL(OCTEON_CN56XX) || OCTEON_IS_MODEL(OCTEON_CN68XX))
 		max_port = 1;
@@ -831,6 +832,7 @@ int __init octeon_prune_device_tree(void)
 	/* I2C */
 	if (OCTEON_IS_MODEL(OCTEON_CN52XX) ||
 	    OCTEON_IS_MODEL(OCTEON_CN63XX) ||
+	    OCTEON_IS_MODEL(OCTEON_CN66XX) ||
 	    OCTEON_IS_MODEL(OCTEON_CN68XX) ||
 	    OCTEON_IS_MODEL(OCTEON_CN56XX))
 		max_port = 2;
@@ -863,6 +865,7 @@ int __init octeon_prune_device_tree(void)
 		max_port = 4;
 	else if (OCTEON_IS_MODEL(OCTEON_CN52XX) ||
 		 OCTEON_IS_MODEL(OCTEON_CN63XX) ||
+		 OCTEON_IS_MODEL(OCTEON_CN66XX) ||
 		 OCTEON_IS_MODEL(OCTEON_CN56XX))
 		max_port = 2;
 	else
-- 
2.47.0


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-12-02 13:15 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-12-02 13:15 [PATCH v2] MIPS: OCTEON: keep the second MIX, TWSI and SMI on CN66XX Orgad Shaneh

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox