From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mx1.white.stw.pengutronix.de (mx1.white.stw.pengutronix.de [185.203.200.13]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D089E3FADFD; Tue, 14 Jul 2026 08:19:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.203.200.13 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784017163; cv=none; b=dDi/2eWxYayhobZSByUttfL7VGOMIPySVbtVH44RIW0rCYt/wm7AzMVb0nhsar0Nnole8+TEpii73mKO2yMg4I+QJM+0A3JaBtAHNOxjD+4s8g9tAU4W/eKMf5598wyxZY/TVlGWIIViG/4ClGjkn6FXGtjs2DfiMXdzWTISL2M= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784017163; c=relaxed/simple; bh=wwKTQi9cpPRih9483MgQ+Lfpv5eTWogqhsMzD1Mu8K4=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=rGZWZ4aUCyb3APuVj9/lK43O3oRQbRdfKY8BNKexmX1lAX8u5e7bCvwJnj2cOpLZhZ02ONRmpn/AIQx4PnvHeHQ8XTta3JedB9EkFgWJf3cAolKRwCevfrfv1SeGYu7VSNhGndxWUela1ikJgE7wKfYLKQCQph6ZFFG1YIFhV1s= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=pengutronix.de; spf=pass smtp.mailfrom=pengutronix.de; arc=none smtp.client-ip=185.203.200.13 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=pengutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=pengutronix.de Received: from drehscheibe.grey.stw.pengutronix.de (drehscheibe.grey.stw.pengutronix.de [IPv6:2a0a:edc0:0:c01:1d::a2]) (Authenticated sender: relay-from-drehscheibe.grey.stw.pengutronix.de) by mx1.white.stw.pengutronix.de (Postfix) with ESMTPSA id 15561202203; Tue, 14 Jul 2026 10:19:10 +0200 (CEST) Received: from pty.whiteo.stw.pengutronix.de ([2a0a:edc0:2:b01:1d::c5]) by drehscheibe.grey.stw.pengutronix.de with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1wjYM9-001jwl-39; Tue, 14 Jul 2026 10:19:09 +0200 Received: from ore by pty.whiteo.stw.pengutronix.de with local (Exim 4.98.2) (envelope-from ) id 1wjYM9-000000091z6-3Y9T; Tue, 14 Jul 2026 10:19:09 +0200 Date: Tue, 14 Jul 2026 10:19:09 +0200 From: Oleksij Rempel To: Jonas Jelonek Cc: Kory Maincent , Andrew Lunn , "David S . Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Rob Herring , Krzysztof Kozlowski , Conor Dooley , netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Daniel Golle , =?utf-8?B?QmrDuHJu?= Mork Subject: Re: [PATCH net-next v7 2/4] net: pse-pd: add Realtek PSE MCU core Message-ID: References: <20260712192251.1413279-1-jelonek.jonas@gmail.com> <20260712192251.1413279-3-jelonek.jonas@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20260712192251.1413279-3-jelonek.jonas@gmail.com> X-Sent-From: Pengutronix Hildesheim X-URL: http://www.pengutronix.de/ X-Accept-Language: de,en X-Accept-Content-Type: text/plain On Sun, Jul 12, 2026 at 07:22:48PM +0000, Jonas Jelonek wrote: > A range of managed Realtek-based PoE switches use a small microcontroller > on the PCB to front the actual PSE silicon. The host CPU talks to that > MCU over I2C/SMBus or UART using a fixed 12-byte request/response > protocol with a trailing checksum; the PSE chips are managed by the MCU > and are not accessed directly. Two generations of the protocol exist - > both Realtek's - diverging in opcode numbering and a few response > layouts; the driver handles this with a per-dialect opcode table and > parser hooks for the responses that differ, selected by the compatible. > The specific PSE chip behind the MCU is detected at runtime and only > influences per-chip constants (power scaling and the per-port cap). > > This core module implements the protocol, message framing, the dialect > machinery and the pse_controller_ops glue, and exports a registration > helper for transport modules. The I2C and UART transports that drive it > follow in the next patches; the core (PSE_REALTEK_MCU) is selected > automatically by those transports and is not user-selectable on its own. > > The realtek-pse-mcu-* files and PSE_REALTEK_MCU* symbols match the > realtek,pse-mcu-* compatibles (see the binding for the naming rationale). > The two protocol generations - gen1 on older Broadcom-PSE boards, gen2 on > Realtek's own PSE silicon - are both Realtek's, handled by the same shared > core, each selecting its dialect via the compatible. > > Power budgeting is left to the MCU firmware; the driver advertises > PSE_BUDGET_EVAL_STRAT_DYNAMIC (controller-managed budget) accordingly. > > Signed-off-by: Jonas Jelonek Acked-by: Oleksij Rempel Thank you! -- Pengutronix e.K. | | Steuerwalder Str. 21 | http://www.pengutronix.de/ | 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |