mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Orgad Shaneh <orgads@gmail.com>
To: tsbogend@alpha.franken.de
Cc: linux-mips@vger.kernel.org, linux-kernel@vger.kernel.org,
	Orgad Shaneh <orgads@gmail.com>
Subject: [PATCH 2/2] MIPS: OCTEON: keep the second MIX, TWSI and SMI on CN66XX
Date: Tue,  1 Dec 2026 04:23:12 +0000	[thread overview]
Message-ID: <20261201042313.3010724-3-orgads@gmail.com> (raw)
In-Reply-To: <20261201042313.3010724-1-orgads@gmail.com>

octeon_prune_device_tree() decides from the chip model how many
management ports (MIX), I2C buses (TWSI) and MDIO buses (SMI) of the
built-in device tree to keep. CN66XX has two of each, like CN63XX, but
the three model lists name only CN63XX. On a CN66XX the prune deletes
mix0, mix1, twsi1 and smi1, so /dev/i2c-1 and the second MDIO bus are
gone and no management port is probed.

The vendor SDK kernel registered two MIX ports and two MDIO buses on all
OCTEON II parts and two TWSI buses on CN63XX and CN66XX.

Add CN66XX to the three lists.

Signed-off-by: Orgad Shaneh <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


      parent reply	other threads:[~2026-12-01  4:23 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-12-01  4:23 [PATCH 0/2] MIPS: OCTEON: two CN66XX model checks Orgad Shaneh
2026-12-01  4:23 ` [PATCH 1/2] MIPS: OCTEON: set PKO_REG_QUEUE_MODE on CN63XX and CN66XX Orgad Shaneh
2026-12-01  4:23 ` Orgad Shaneh [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20261201042313.3010724-3-orgads@gmail.com \
    --to=orgads@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mips@vger.kernel.org \
    --cc=tsbogend@alpha.franken.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®