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 951CC43DA49; Wed, 29 Jul 2026 09:06:44 +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=1785316007; cv=none; b=KGrbVcNGvvTGKIfl7Jr94pIX88IKqFpF+8gXmKeCnzY58y6A6JCD4MVOZFC1OjnXwnu5Y90rWkBc5UsItqh++soxQO/NgoRuedE7qW1LeqGWpUSYR+SYhgMj5VjfTH8p+dLIdWxxTiMlhVpWEMG6qLKc2KAi7KF0/pdvf3Chpcs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785316007; c=relaxed/simple; bh=00DZ9vWyNOSETeO1x71RqwLCqdL4qftaF8Rs2mDDr9E=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=V/qdTHDjIObzvzHvcj6Gdf3stvhsQJInyzzl2Cw/OAVgBxCO60x9iDzn6NMnmk4BbvZe/C9ZxszkZY5EEkukya1ftQSD+ezCq0jiW0OUin83yIFlhqxQDgD7HsM2uHbzXiQh06BH90kOTsB4xJeIB5m+TsVxxBCkmqIIpwRbkLg= 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 5688F202ACC; Wed, 29 Jul 2026 11:06:42 +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 1wp0FO-001rJX-0r; Wed, 29 Jul 2026 11:06:42 +0200 Received: from ore by pty.whiteo.stw.pengutronix.de with local (Exim 4.98.2) (envelope-from ) id 1wp0FO-0000000CNm4-0bqH; Wed, 29 Jul 2026 11:06:42 +0200 Date: Wed, 29 Jul 2026 11:06:42 +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 v10 2/4] net: pse-pd: add Realtek PSE MCU core Message-ID: References: <20260728084307.2129515-1-jelonek.jonas@gmail.com> <20260728084307.2129515-3-jelonek.jonas@gmail.com> Precedence: bulk X-Mailing-List: netdev@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: <20260728084307.2129515-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 Tue, Jul 28, 2026 at 08:43:04AM +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 accordingly. > > Signed-off-by: Jonas Jelonek Acked-by: Oleksij Rempel -- 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 |